summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--AUTHORS38
-rw-r--r--COPYING280
-rw-r--r--COPYING-DOCS397
-rw-r--r--ChangeLog19
-rw-r--r--INSTALL167
-rw-r--r--INSTALL.docs8
-rw-r--r--Makefile.am.in30
-rw-r--r--Makefile.cvs15
-rw-r--r--NEWS2
-rw-r--r--PACKAGING77
-rw-r--r--README24
-rw-r--r--TODO1
-rw-r--r--VERSION1
-rw-r--r--configure.in.bot8
-rw-r--r--configure.in.in264
-rw-r--r--doc/Makefile.am4
-rw-r--r--doc/kfilereplace/Makefile.am2
-rw-r--r--doc/kfilereplace/addstringsdialog_window.pngbin0 -> 24518 bytes
-rw-r--r--doc/kfilereplace/backup_option.pngbin0 -> 979 bytes
-rw-r--r--doc/kfilereplace/casesensitive_option.pngbin0 -> 1177 bytes
-rw-r--r--doc/kfilereplace/command_option.pngbin0 -> 1132 bytes
-rw-r--r--doc/kfilereplace/edit.pngbin0 -> 1076 bytes
-rw-r--r--doc/kfilereplace/edit_add.pngbin0 -> 820 bytes
-rw-r--r--doc/kfilereplace/edit_remove.pngbin0 -> 713 bytes
-rw-r--r--doc/kfilereplace/eraser.pngbin0 -> 339 bytes
-rw-r--r--doc/kfilereplace/filereplace.pngbin0 -> 1115 bytes
-rw-r--r--doc/kfilereplace/filesearch.pngbin0 -> 1163 bytes
-rw-r--r--doc/kfilereplace/filesimulate.pngbin0 -> 1113 bytes
-rw-r--r--doc/kfilereplace/index.docbook613
-rw-r--r--doc/kfilereplace/invert.pngbin0 -> 1218 bytes
-rw-r--r--doc/kfilereplace/kfr_standalone_main_window_1.pngbin0 -> 84930 bytes
-rw-r--r--doc/kfilereplace/optionsdialog_main_window_1.pngbin0 -> 44754 bytes
-rw-r--r--doc/kfilereplace/optionsdialog_main_window_2.pngbin0 -> 36903 bytes
-rw-r--r--doc/kfilereplace/project.pngbin0 -> 808 bytes
-rw-r--r--doc/kfilereplace/projectdialog_main_window_1.pngbin0 -> 54660 bytes
-rw-r--r--doc/kfilereplace/projectdialog_main_window_2.pngbin0 -> 61588 bytes
-rw-r--r--doc/kfilereplace/recursive_option.pngbin0 -> 615 bytes
-rw-r--r--doc/kfilereplace/regularexpression_option.pngbin0 -> 959 bytes
-rw-r--r--doc/kfilereplace/report_example.pngbin0 -> 61894 bytes
-rw-r--r--doc/kfilereplace/results_view.pngbin0 -> 54796 bytes
-rw-r--r--doc/kfilereplace/stop.pngbin0 -> 1330 bytes
-rw-r--r--doc/kfilereplace/strings_view.pngbin0 -> 9518 bytes
-rw-r--r--doc/kfilereplace/toolbar.pngbin0 -> 8217 bytes
-rw-r--r--doc/kfilereplace/unsortedList.pngbin0 -> 279 bytes
-rw-r--r--doc/klinkstatus/Makefile.am2
-rw-r--r--doc/klinkstatus/index.docbook498
-rw-r--r--doc/klinkstatus/screenshot.pngbin0 -> 80998 bytes
-rw-r--r--doc/kommander/Makefile.am3
-rw-r--r--doc/kommander/basics.docbook135
-rw-r--r--doc/kommander/buttongroup.pngbin0 -> 648 bytes
-rw-r--r--doc/kommander/checkbox.pngbin0 -> 817 bytes
-rw-r--r--doc/kommander/closebutton.pngbin0 -> 585 bytes
-rw-r--r--doc/kommander/combobox.pngbin0 -> 549 bytes
-rw-r--r--doc/kommander/commands.docbook14
-rw-r--r--doc/kommander/contents.pngbin0 -> 1300 bytes
-rw-r--r--doc/kommander/credits.docbook59
-rw-r--r--doc/kommander/datepicker.pngbin0 -> 965 bytes
-rw-r--r--doc/kommander/dcop.docbook203
-rw-r--r--doc/kommander/editor.docbook642
-rw-r--r--doc/kommander/editor.pngbin0 -> 29040 bytes
-rw-r--r--doc/kommander/extending.docbook440
-rw-r--r--doc/kommander/frame.pngbin0 -> 521 bytes
-rw-r--r--doc/kommander/glossary.docbook39
-rw-r--r--doc/kommander/groupbox.pngbin0 -> 439 bytes
-rw-r--r--doc/kommander/index.docbook121
-rw-r--r--doc/kommander/installation.docbook50
-rw-r--r--doc/kommander/interface.pngbin0 -> 175153 bytes
-rw-r--r--doc/kommander/introduction.docbook134
-rw-r--r--doc/kommander/kfontcombo.pngbin0 -> 1194 bytes
-rw-r--r--doc/kommander/kommander.pngbin0 -> 1480 bytes
-rw-r--r--doc/kommander/konsole.pngbin0 -> 1155 bytes
-rw-r--r--doc/kommander/label.pngbin0 -> 953 bytes
-rw-r--r--doc/kommander/lineedit.pngbin0 -> 461 bytes
-rw-r--r--doc/kommander/listbox.pngbin0 -> 386 bytes
-rw-r--r--doc/kommander/listview.pngbin0 -> 759 bytes
-rw-r--r--doc/kommander/multilineedit.pngbin0 -> 1031 bytes
-rw-r--r--doc/kommander/parser.docbook751
-rw-r--r--doc/kommander/pixlabel.pngbin0 -> 1229 bytes
-rw-r--r--doc/kommander/progress.pngbin0 -> 609 bytes
-rw-r--r--doc/kommander/pushbutton.pngbin0 -> 408 bytes
-rw-r--r--doc/kommander/q-and-a.docbook11
-rw-r--r--doc/kommander/radiobutton.pngbin0 -> 586 bytes
-rw-r--r--doc/kommander/richtextedit.pngbin0 -> 834 bytes
-rw-r--r--doc/kommander/shadow.pngbin0 -> 213 bytes
-rw-r--r--doc/kommander/shellscript.pngbin0 -> 1053 bytes
-rw-r--r--doc/kommander/slider.pngbin0 -> 729 bytes
-rw-r--r--doc/kommander/specials.docbook371
-rw-r--r--doc/kommander/spinbox.pngbin0 -> 455 bytes
-rw-r--r--doc/kommander/statusbar.pngbin0 -> 294 bytes
-rw-r--r--doc/kommander/table.pngbin0 -> 483 bytes
-rw-r--r--doc/kommander/tabwidget.pngbin0 -> 572 bytes
-rw-r--r--doc/kommander/textbrowser.pngbin0 -> 514 bytes
-rw-r--r--doc/kommander/textedit.pngbin0 -> 497 bytes
-rw-r--r--doc/kommander/timer.pngbin0 -> 1462 bytes
-rw-r--r--doc/kommander/toolbox.pngbin0 -> 783 bytes
-rw-r--r--doc/kommander/translating.docbook72
-rw-r--r--doc/kommander/tutorials.docbook380
-rw-r--r--doc/kommander/widgets.docbook599
-rw-r--r--doc/kxsldbg/1downarrow.pngbin0 -> 637 bytes
-rw-r--r--doc/kxsldbg/Makefile.am3
-rw-r--r--doc/kxsldbg/breakpoints_window.pngbin0 -> 33227 bytes
-rw-r--r--doc/kxsldbg/callstack.docbook37
-rw-r--r--doc/kxsldbg/callstack_window.pngbin0 -> 29040 bytes
-rw-r--r--doc/kxsldbg/configure.pngbin0 -> 615 bytes
-rw-r--r--doc/kxsldbg/configure_window.pngbin0 -> 23978 bytes
-rw-r--r--doc/kxsldbg/credits.docbook44
-rw-r--r--doc/kxsldbg/entities.docbook42
-rw-r--r--doc/kxsldbg/entities_window.pngbin0 -> 23751 bytes
-rw-r--r--doc/kxsldbg/exit.pngbin0 -> 855 bytes
-rw-r--r--doc/kxsldbg/glossary.docbook47
-rw-r--r--doc/kxsldbg/index.docbook150
-rw-r--r--doc/kxsldbg/kxsldbg_configure.docbook102
-rw-r--r--doc/kxsldbg/kxsldbg_inspector.docbook103
-rw-r--r--doc/kxsldbg/kxsldbg_mainwindow.docbook455
-rw-r--r--doc/kxsldbg/kxsldbg_tools.docbook93
-rw-r--r--doc/kxsldbg/main_window.pngbin0 -> 42654 bytes
-rw-r--r--doc/kxsldbg/next.pngbin0 -> 235 bytes
-rw-r--r--doc/kxsldbg/publicid_window.pngbin0 -> 10418 bytes
-rw-r--r--doc/kxsldbg/run.pngbin0 -> 740 bytes
-rw-r--r--doc/kxsldbg/sources.docbook44
-rw-r--r--doc/kxsldbg/sources_window.pngbin0 -> 23928 bytes
-rw-r--r--doc/kxsldbg/step.pngbin0 -> 473 bytes
-rw-r--r--doc/kxsldbg/systemid_window.pngbin0 -> 10601 bytes
-rw-r--r--doc/kxsldbg/templates.docbook34
-rw-r--r--doc/kxsldbg/templates_window.pngbin0 -> 28975 bytes
-rw-r--r--doc/kxsldbg/variables.docbook69
-rw-r--r--doc/kxsldbg/variables_window.pngbin0 -> 27799 bytes
-rw-r--r--doc/kxsldbg/walk_window.pngbin0 -> 13018 bytes
-rw-r--r--doc/kxsldbg/xsldbg_break.pngbin0 -> 221 bytes
-rw-r--r--doc/kxsldbg/xsldbg_data.pngbin0 -> 243 bytes
-rw-r--r--doc/kxsldbg/xsldbg_delete.pngbin0 -> 228 bytes
-rw-r--r--doc/kxsldbg/xsldbg_enable.pngbin0 -> 336 bytes
-rw-r--r--doc/kxsldbg/xsldbg_output.pngbin0 -> 120 bytes
-rw-r--r--doc/kxsldbg/xsldbg_refresh.pngbin0 -> 232 bytes
-rw-r--r--doc/kxsldbg/xsldbg_source.pngbin0 -> 231 bytes
-rw-r--r--doc/kxsldbg/xsldbg_stepdown.pngbin0 -> 137 bytes
-rw-r--r--doc/kxsldbg/xsldbg_stepup.pngbin0 -> 195 bytes
-rw-r--r--doc/quanta/Makefile.am3
-rw-r--r--doc/quanta/adv-quanta.docbook623
-rw-r--r--doc/quanta/attribute_tree.pngbin0 -> 14685 bytes
-rw-r--r--doc/quanta/config-quanta.docbook125
-rw-r--r--doc/quanta/contents2.pngbin0 -> 1111 bytes
-rw-r--r--doc/quanta/credits-license.docbook150
-rw-r--r--doc/quanta/debugging-quanta.docbook400
-rw-r--r--doc/quanta/doc-view1.pngbin0 -> 8801 bytes
-rw-r--r--doc/quanta/dtd-conversion.pngbin0 -> 22812 bytes
-rw-r--r--doc/quanta/dtep_doc_img15.pngbin0 -> 57012 bytes
-rw-r--r--doc/quanta/dtep_doc_img18.pngbin0 -> 22351 bytes
-rw-r--r--doc/quanta/dtep_doc_img21.pngbin0 -> 19433 bytes
-rw-r--r--doc/quanta/dtep_doc_img22.pngbin0 -> 19806 bytes
-rw-r--r--doc/quanta/dtep_doc_img23.pngbin0 -> 19785 bytes
-rw-r--r--doc/quanta/dtep_doc_img24.pngbin0 -> 3342 bytes
-rw-r--r--doc/quanta/dtep_doc_img25.pngbin0 -> 3803 bytes
-rw-r--r--doc/quanta/dtep_doc_img7.pngbin0 -> 22311 bytes
-rw-r--r--doc/quanta/dtep_doc_img8.pngbin0 -> 22396 bytes
-rw-r--r--doc/quanta/edit-upload-profile.pngbin0 -> 28223 bytes
-rw-r--r--doc/quanta/event-editing.pngbin0 -> 19719 bytes
-rw-r--r--doc/quanta/exec.pngbin0 -> 1113 bytes
-rw-r--r--doc/quanta/extending-quanta.docbook1789
-rw-r--r--doc/quanta/ftab.pngbin0 -> 816 bytes
-rw-r--r--doc/quanta/fundamentals.docbook429
-rw-r--r--doc/quanta/glossary.docbook53
-rw-r--r--doc/quanta/index.docbook183
-rw-r--r--doc/quanta/info_tab.pngbin0 -> 20403 bytes
-rw-r--r--doc/quanta/installation.docbook43
-rw-r--r--doc/quanta/introduction.docbook134
-rw-r--r--doc/quanta/kfr-icon.pngbin0 -> 1302 bytes
-rw-r--r--doc/quanta/kfr-new-dialog.pngbin0 -> 31281 bytes
-rw-r--r--doc/quanta/man-quanta.1.docbook95
-rw-r--r--doc/quanta/plugin-edit.pngbin0 -> 25571 bytes
-rw-r--r--doc/quanta/project-1.pngbin0 -> 91254 bytes
-rw-r--r--doc/quanta/project-properties.pngbin0 -> 47714 bytes
-rw-r--r--doc/quanta/project-tree-view-dir-rmb-menu.pngbin0 -> 13163 bytes
-rw-r--r--doc/quanta/project-tree-view-file-rmb-menu.pngbin0 -> 13876 bytes
-rw-r--r--doc/quanta/project-upload-dialog.pngbin0 -> 75208 bytes
-rw-r--r--doc/quanta/ptab.pngbin0 -> 1356 bytes
-rw-r--r--doc/quanta/q-and-a.docbook70
-rw-r--r--doc/quanta/quanta-menus.docbook2265
-rw-r--r--doc/quanta/quanta-projects.docbook792
-rw-r--r--doc/quanta/quantamdi-editor.pngbin0 -> 39143 bytes
-rw-r--r--doc/quanta/quantamdi-treeview.pngbin0 -> 9113 bytes
-rw-r--r--doc/quanta/quantamdi.pngbin0 -> 118267 bytes
-rw-r--r--doc/quanta/script-action.pngbin0 -> 18803 bytes
-rw-r--r--doc/quanta/tag-actions.pngbin0 -> 12920 bytes
-rw-r--r--doc/quanta/tag_misc.pngbin0 -> 224 bytes
-rw-r--r--doc/quanta/taginputex.pngbin0 -> 27811 bytes
-rw-r--r--doc/quanta/team-editing.pngbin0 -> 26760 bytes
-rw-r--r--doc/quanta/template-rmb.pngbin0 -> 31135 bytes
-rw-r--r--doc/quanta/text-action.pngbin0 -> 5043 bytes
-rw-r--r--doc/quanta/toolbars.pngbin0 -> 8055 bytes
-rw-r--r--doc/quanta/ttab.pngbin0 -> 1104 bytes
-rw-r--r--doc/quanta/view_sidetree.pngbin0 -> 667 bytes
-rw-r--r--doc/quanta/vplsourceview.pngbin0 -> 9903 bytes
-rw-r--r--doc/quanta/working-with-quanta.docbook650
-rw-r--r--doc/xsldbg/Makefile.am3
-rw-r--r--doc/xsldbg/commands.docbook801
-rw-r--r--doc/xsldbg/credits.docbook21
-rw-r--r--doc/xsldbg/index.docbook124
-rw-r--r--doc/xsldbg/introduction.docbook20
-rw-r--r--doc/xsldbg/usage.docbook147
-rw-r--r--doc/xsldbg/xsldbghelp.xml22
-rw-r--r--doc/xsldbg/xsldbghelp.xsl127
-rw-r--r--kdewebdev.lsm11
-rw-r--r--kfilereplace/ChangeLog211
-rw-r--r--kfilereplace/Makefile.am43
-rw-r--r--kfilereplace/commandengine.cpp213
-rw-r--r--kfilereplace/commandengine.h57
-rw-r--r--kfilereplace/configurationclasses.cpp188
-rw-r--r--kfilereplace/configurationclasses.h165
-rw-r--r--kfilereplace/configure.in.in12
-rw-r--r--kfilereplace/hi22-app-kfilereplace.pngbin0 -> 999 bytes
-rw-r--r--kfilereplace/hi32-app-kfilereplace.pngbin0 -> 1789 bytes
-rw-r--r--kfilereplace/hi48-app-kfilereplace.pngbin0 -> 2835 bytes
-rw-r--r--kfilereplace/kaddstringdlg.cpp273
-rw-r--r--kfilereplace/kaddstringdlg.h75
-rw-r--r--kfilereplace/kaddstringdlgs.ui426
-rw-r--r--kfilereplace/kfilereplace.cpp111
-rw-r--r--kfilereplace/kfilereplace.desktop55
-rw-r--r--kfilereplace/kfilereplace.h45
-rw-r--r--kfilereplace/kfilereplace.kdevelop190
-rw-r--r--kfilereplace/kfilereplaceiface.h30
-rw-r--r--kfilereplace/kfilereplacelib.cpp381
-rw-r--r--kfilereplace/kfilereplacelib.h65
-rw-r--r--kfilereplace/kfilereplacepart.cpp1679
-rw-r--r--kfilereplace/kfilereplacepart.desktop95
-rw-r--r--kfilereplace/kfilereplacepart.h159
-rw-r--r--kfilereplace/kfilereplacepartui.rc75
-rw-r--r--kfilereplace/kfilereplaceui.rc10
-rw-r--r--kfilereplace/kfilereplaceview.cpp672
-rw-r--r--kfilereplace/kfilereplaceview.h116
-rw-r--r--kfilereplace/kfilereplaceviewwdg.ui555
-rw-r--r--kfilereplace/knewprojectdlg.cpp531
-rw-r--r--kfilereplace/knewprojectdlg.h84
-rw-r--r--kfilereplace/knewprojectdlgs.ui898
-rw-r--r--kfilereplace/koptionsdlg.cpp236
-rw-r--r--kfilereplace/koptionsdlg.h58
-rw-r--r--kfilereplace/koptionsdlgs.ui347
-rw-r--r--kfilereplace/main.cpp77
-rw-r--r--kfilereplace/report.cpp282
-rw-r--r--kfilereplace/report.h58
-rw-r--r--kfilereplace/toolbar/Makefile.am3
-rw-r--r--kfilereplace/toolbar/cr22-action-back.pngbin0 -> 1348 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-backup_option.pngbin0 -> 979 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-casesensitive_option.pngbin0 -> 1177 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-command_option.pngbin0 -> 1132 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-editadd.pngbin0 -> 1226 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-editremove.pngbin0 -> 1179 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-filereplace.pngbin0 -> 1115 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-filesearch.pngbin0 -> 1163 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-filesimulate.pngbin0 -> 1113 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-informations.pngbin0 -> 1171 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-invert.pngbin0 -> 1218 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-next.pngbin0 -> 1311 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-projectopen.pngbin0 -> 808 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-recursive_option.pngbin0 -> 615 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-regularexpression_option.pngbin0 -> 959 bytes
-rw-r--r--kfilereplace/toolbar/cr22-action-unsortedList.pngbin0 -> 279 bytes
-rw-r--r--kfilereplace/tutorial.kwdbin0 -> 392373 bytes
-rw-r--r--kfilereplace/whatthis.h101
-rw-r--r--kimagemapeditor/AUTHORS1
-rw-r--r--kimagemapeditor/COPYING280
-rw-r--r--kimagemapeditor/ChangeLog105
-rw-r--r--kimagemapeditor/INSTALL167
-rw-r--r--kimagemapeditor/Makefile.am63
-rw-r--r--kimagemapeditor/NEWS13
-rw-r--r--kimagemapeditor/README12
-rw-r--r--kimagemapeditor/TODO5
-rw-r--r--kimagemapeditor/VERSION1
-rw-r--r--kimagemapeditor/areacreator.cpp44
-rw-r--r--kimagemapeditor/areacreator.h35
-rw-r--r--kimagemapeditor/arealistview.cpp67
-rw-r--r--kimagemapeditor/arealistview.h47
-rw-r--r--kimagemapeditor/configure.in.in6
-rw-r--r--kimagemapeditor/drawzone.cpp896
-rw-r--r--kimagemapeditor/drawzone.h122
-rw-r--r--kimagemapeditor/dummy.cpp0
-rw-r--r--kimagemapeditor/imagemap.cpp395
-rw-r--r--kimagemapeditor/imagemap.h77
-rw-r--r--kimagemapeditor/imageslistview.cpp157
-rw-r--r--kimagemapeditor/imageslistview.h111
-rw-r--r--kimagemapeditor/kimagemapeditor.cpp2819
-rw-r--r--kimagemapeditor/kimagemapeditor.desktop55
-rw-r--r--kimagemapeditor/kimagemapeditor.h460
-rw-r--r--kimagemapeditor/kimagemapeditorpart.desktop54
-rw-r--r--kimagemapeditor/kimagemapeditorpartui.rc150
-rw-r--r--kimagemapeditor/kimagemapeditorui.rc25
-rw-r--r--kimagemapeditor/kimearea.cpp1749
-rw-r--r--kimagemapeditor/kimearea.h392
-rw-r--r--kimagemapeditor/kimecommands.cpp384
-rw-r--r--kimagemapeditor/kimecommands.h198
-rw-r--r--kimagemapeditor/kimecommon.h52
-rw-r--r--kimagemapeditor/kimedialogs.cpp874
-rw-r--r--kimagemapeditor/kimedialogs.h207
-rw-r--r--kimagemapeditor/kimeshell.cpp296
-rw-r--r--kimagemapeditor/kimeshell.h81
-rw-r--r--kimagemapeditor/main.cpp91
-rw-r--r--kimagemapeditor/mapslistview.cpp174
-rw-r--r--kimagemapeditor/mapslistview.h126
-rw-r--r--kimagemapeditor/pics/Makefile.am8
-rw-r--r--kimagemapeditor/pics/addpointcursor.pngbin0 -> 328 bytes
-rw-r--r--kimagemapeditor/pics/freehandcursor.pngbin0 -> 301 bytes
-rw-r--r--kimagemapeditor/pics/hi16-app-kimagemapeditor.pngbin0 -> 774 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-addpoint.pngbin0 -> 628 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-arrow.pngbin0 -> 583 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-circle.pngbin0 -> 488 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-circle2.pngbin0 -> 492 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-freehand.pngbin0 -> 635 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-lower.pngbin0 -> 361 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-polygon.pngbin0 -> 432 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-raise.pngbin0 -> 366 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-rectangle.pngbin0 -> 436 bytes
-rw-r--r--kimagemapeditor/pics/hi22-action-removepoint.pngbin0 -> 588 bytes
-rw-r--r--kimagemapeditor/pics/hi32-app-kimagemapeditor.pngbin0 -> 2706 bytes
-rw-r--r--kimagemapeditor/pics/hi48-app-kimagemapeditor.pngbin0 -> 4504 bytes
-rw-r--r--kimagemapeditor/pics/lo16-app-kimagemapeditor.pngbin0 -> 377 bytes
-rw-r--r--kimagemapeditor/pics/lo32-app-kimagemapeditor.pngbin0 -> 576 bytes
-rw-r--r--kimagemapeditor/pics/polygoncursor.pngbin0 -> 271 bytes
-rw-r--r--kimagemapeditor/pics/removepointcursor.pngbin0 -> 315 bytes
-rw-r--r--kimagemapeditor/qextfileinfo.cpp347
-rw-r--r--kimagemapeditor/qextfileinfo.h75
-rw-r--r--klinkstatus/AUTHORS1
-rw-r--r--klinkstatus/COPYING340
-rw-r--r--klinkstatus/ChangeLog122
-rw-r--r--klinkstatus/FEATURES18
-rw-r--r--klinkstatus/INSTALL167
-rw-r--r--klinkstatus/Makefile.am1
-rw-r--r--klinkstatus/NEWS1
-rw-r--r--klinkstatus/README5
-rw-r--r--klinkstatus/TODO24
-rw-r--r--klinkstatus/configure.in.in6
-rw-r--r--klinkstatus/data/Makefile.am3
-rw-r--r--klinkstatus/data/icons/16x16/304.pngbin0 -> 662 bytes
-rw-r--r--klinkstatus/data/icons/16x16/Makefile.am4
-rw-r--r--klinkstatus/data/icons/16x16/cr16-action-bug.pngbin0 -> 1107 bytes
-rw-r--r--klinkstatus/data/icons/22x22/Makefile.am1
-rw-r--r--klinkstatus/data/icons/32x32/Makefile.am2
-rw-r--r--klinkstatus/data/icons/Makefile.am2
-rw-r--r--klinkstatus/data/icons/hi128-app-klinkstatus.pngbin0 -> 14750 bytes
-rw-r--r--klinkstatus/data/icons/hi16-app-klinkstatus.pngbin0 -> 667 bytes
-rw-r--r--klinkstatus/data/icons/hi22-app-klinkstatus.pngbin0 -> 1027 bytes
-rw-r--r--klinkstatus/data/icons/hi32-app-klinkstatus.pngbin0 -> 1849 bytes
-rw-r--r--klinkstatus/data/icons/hi48-app-klinkstatus.pngbin0 -> 3765 bytes
-rw-r--r--klinkstatus/data/icons/hi64-app-klinkstatus.pngbin0 -> 5522 bytes
-rw-r--r--klinkstatus/data/styles/Makefile.am6
-rw-r--r--klinkstatus/data/styles/results_stylesheet.xsl99
-rw-r--r--klinkstatus/klinkstatus.kdevelop267
-rw-r--r--klinkstatus/src/Makefile.am62
-rw-r--r--klinkstatus/src/actionmanager.cpp273
-rw-r--r--klinkstatus/src/actionmanager.h69
-rw-r--r--klinkstatus/src/cfg/Makefile.am6
-rw-r--r--klinkstatus/src/cfg/dummy.cpp0
-rw-r--r--klinkstatus/src/cfg/klinkstatus.kcfg91
-rw-r--r--klinkstatus/src/cfg/klsconfig.kcfgc7
-rw-r--r--klinkstatus/src/engine/Makefile.am9
-rw-r--r--klinkstatus/src/engine/linkchecker.cpp703
-rw-r--r--klinkstatus/src/engine/linkchecker.h128
-rw-r--r--klinkstatus/src/engine/linkfilter.cpp46
-rw-r--r--klinkstatus/src/engine/linkfilter.h49
-rw-r--r--klinkstatus/src/engine/linkstatus.cpp214
-rw-r--r--klinkstatus/src/engine/linkstatus.h187
-rw-r--r--klinkstatus/src/engine/linkstatus_impl.h417
-rw-r--r--klinkstatus/src/engine/searchmanager.cpp916
-rw-r--r--klinkstatus/src/engine/searchmanager.h193
-rw-r--r--klinkstatus/src/engine/searchmanager_impl.h158
-rw-r--r--klinkstatus/src/global.cpp205
-rw-r--r--klinkstatus/src/global.h60
-rw-r--r--klinkstatus/src/klinkstatus.cpp213
-rw-r--r--klinkstatus/src/klinkstatus.desktop54
-rw-r--r--klinkstatus/src/klinkstatus.h86
-rw-r--r--klinkstatus/src/klinkstatus.lsm16
-rw-r--r--klinkstatus/src/klinkstatus_part.cpp207
-rw-r--r--klinkstatus/src/klinkstatus_part.desktop17
-rw-r--r--klinkstatus/src/klinkstatus_part.h87
-rw-r--r--klinkstatus/src/klinkstatus_part.rc58
-rw-r--r--klinkstatus/src/klinkstatus_shell.rc28
-rw-r--r--klinkstatus/src/main.cpp98
-rw-r--r--klinkstatus/src/parser/Makefile.am6
-rw-r--r--klinkstatus/src/parser/htmlparser.cpp455
-rw-r--r--klinkstatus/src/parser/htmlparser.h124
-rw-r--r--klinkstatus/src/parser/http.cpp87
-rw-r--r--klinkstatus/src/parser/http.h79
-rw-r--r--klinkstatus/src/parser/mstring.cpp278
-rw-r--r--klinkstatus/src/parser/mstring.h174
-rw-r--r--klinkstatus/src/parser/node.cpp255
-rw-r--r--klinkstatus/src/parser/node.h279
-rw-r--r--klinkstatus/src/parser/node_impl.h412
-rw-r--r--klinkstatus/src/parser/url.cpp350
-rw-r--r--klinkstatus/src/parser/url.h57
-rw-r--r--klinkstatus/src/tests/data/entities/bull&bladder.jpgbin0 -> 9769 bytes
-rw-r--r--klinkstatus/src/tests/data/entities/bull_bladder.jpgbin0 -> 9769 bytes
-rw-r--r--klinkstatus/src/tests/data/entities/link_with_html_entities.html7
-rw-r--r--klinkstatus/src/ui/Makefile.am11
-rw-r--r--klinkstatus/src/ui/celltooltip.cpp54
-rw-r--r--klinkstatus/src/ui/celltooltip.h45
-rw-r--r--klinkstatus/src/ui/documentrootdialog.cpp89
-rw-r--r--klinkstatus/src/ui/documentrootdialog.h57
-rw-r--r--klinkstatus/src/ui/klshistorycombo.cpp198
-rw-r--r--klinkstatus/src/ui/klshistorycombo.h42
-rw-r--r--klinkstatus/src/ui/resultssearchbar.cpp236
-rw-r--r--klinkstatus/src/ui/resultssearchbar.h73
-rw-r--r--klinkstatus/src/ui/resultview.cpp184
-rw-r--r--klinkstatus/src/ui/resultview.h134
-rw-r--r--klinkstatus/src/ui/sessionwidget.cpp723
-rw-r--r--klinkstatus/src/ui/sessionwidget.h149
-rw-r--r--klinkstatus/src/ui/sessionwidgetbase.ui602
-rw-r--r--klinkstatus/src/ui/settings/Makefile.am7
-rw-r--r--klinkstatus/src/ui/settings/configidentificationdialog.cpp55
-rw-r--r--klinkstatus/src/ui/settings/configidentificationdialog.h40
-rw-r--r--klinkstatus/src/ui/settings/configidentificationdialogui.ui134
-rw-r--r--klinkstatus/src/ui/settings/configresultsdialog.ui72
-rw-r--r--klinkstatus/src/ui/settings/configsearchdialog.ui353
-rw-r--r--klinkstatus/src/ui/settings/dummy.cpp0
-rw-r--r--klinkstatus/src/ui/tablelinkstatus.cpp750
-rw-r--r--klinkstatus/src/ui/tablelinkstatus.h202
-rw-r--r--klinkstatus/src/ui/tabwidgetsession.cpp274
-rw-r--r--klinkstatus/src/ui/tabwidgetsession.h85
-rw-r--r--klinkstatus/src/ui/treeview.cpp609
-rw-r--r--klinkstatus/src/ui/treeview.h142
-rw-r--r--klinkstatus/src/utils/Makefile.am7
-rw-r--r--klinkstatus/src/utils/mvector.h45
-rw-r--r--klinkstatus/src/utils/utils.cpp204
-rw-r--r--klinkstatus/src/utils/utils.h64
-rw-r--r--klinkstatus/src/utils/xsl.cpp437
-rw-r--r--klinkstatus/src/utils/xsl.h111
-rw-r--r--kommander/AUTHORS5
-rw-r--r--kommander/COPYING339
-rw-r--r--kommander/ChangeLog611
-rw-r--r--kommander/INSTALL186
-rw-r--r--kommander/Kommander-TODO.kno313
-rw-r--r--kommander/Makefile.am15
-rw-r--r--kommander/NEWS1
-rw-r--r--kommander/README70
-rw-r--r--kommander/VERSION1
-rw-r--r--kommander/configure.in.in14
-rw-r--r--kommander/editor/Makefile.am53
-rw-r--r--kommander/editor/actiondnd.cpp1244
-rw-r--r--kommander/editor/actiondnd.h304
-rw-r--r--kommander/editor/actioneditor.ui201
-rw-r--r--kommander/editor/actioneditorimpl.cpp261
-rw-r--r--kommander/editor/actioneditorimpl.h64
-rw-r--r--kommander/editor/actionlistview.cpp111
-rw-r--r--kommander/editor/actionlistview.h75
-rw-r--r--kommander/editor/asciivalidator.cpp77
-rw-r--r--kommander/editor/asciivalidator.h46
-rw-r--r--kommander/editor/assistproc.cpp74
-rw-r--r--kommander/editor/assistproc.h47
-rw-r--r--kommander/editor/assoctexteditor.ui222
-rw-r--r--kommander/editor/assoctexteditorimpl.cpp506
-rw-r--r--kommander/editor/assoctexteditorimpl.h133
-rw-r--r--kommander/editor/choosewidget.ui150
-rw-r--r--kommander/editor/choosewidgetimpl.cpp128
-rw-r--r--kommander/editor/choosewidgetimpl.h45
-rw-r--r--kommander/editor/command.cpp1838
-rw-r--r--kommander/editor/command.h931
-rw-r--r--kommander/editor/connectioneditor.ui418
-rw-r--r--kommander/editor/connectioneditorimpl.cpp373
-rw-r--r--kommander/editor/connectioneditorimpl.h76
-rw-r--r--kommander/editor/createtemplate.ui222
-rw-r--r--kommander/editor/defs.cpp78
-rw-r--r--kommander/editor/defs.h35
-rw-r--r--kommander/editor/filechooser.cpp63
-rw-r--r--kommander/editor/filechooser.h42
-rw-r--r--kommander/editor/formfile.cpp302
-rw-r--r--kommander/editor/formfile.h74
-rw-r--r--kommander/editor/formsettings.ui338
-rw-r--r--kommander/editor/formsettingsimpl.cpp58
-rw-r--r--kommander/editor/formsettingsimpl.h43
-rw-r--r--kommander/editor/formwindow.cpp2609
-rw-r--r--kommander/editor/formwindow.h292
-rw-r--r--kommander/editor/functions.ui722
-rw-r--r--kommander/editor/functionsimpl.cpp392
-rw-r--r--kommander/editor/functionsimpl.h61
-rw-r--r--kommander/editor/globaldefs.h45
-rw-r--r--kommander/editor/hierarchyview.cpp724
-rw-r--r--kommander/editor/hierarchyview.h161
-rw-r--r--kommander/editor/iconvieweditor.ui450
-rw-r--r--kommander/editor/iconvieweditorimpl.cpp158
-rw-r--r--kommander/editor/iconvieweditorimpl.h52
-rw-r--r--kommander/editor/kmdr-editor.desktop129
-rw-r--r--kommander/editor/kommander-new.xml587
-rw-r--r--kommander/editor/kommander.xml998
-rw-r--r--kommander/editor/kommanderui.rc5
-rw-r--r--kommander/editor/layout.cpp956
-rw-r--r--kommander/editor/layout.h180
-rw-r--r--kommander/editor/listboxeditor.ui455
-rw-r--r--kommander/editor/listboxeditorimpl.cpp216
-rw-r--r--kommander/editor/listboxeditorimpl.h55
-rw-r--r--kommander/editor/listeditor.ui147
-rw-r--r--kommander/editor/listvieweditor.ui936
-rw-r--r--kommander/editor/listvieweditorimpl.cpp585
-rw-r--r--kommander/editor/listvieweditorimpl.h94
-rw-r--r--kommander/editor/main.cpp81
-rw-r--r--kommander/editor/mainwindow.cpp1903
-rw-r--r--kommander/editor/mainwindow.h317
-rw-r--r--kommander/editor/mainwindowactions.cpp1201
-rw-r--r--kommander/editor/messagelog.cpp149
-rw-r--r--kommander/editor/messagelog.h55
-rw-r--r--kommander/editor/metadatabase.cpp1219
-rw-r--r--kommander/editor/metadatabase.h222
-rw-r--r--kommander/editor/multilineeditor.ui225
-rw-r--r--kommander/editor/multilineeditorimpl.cpp98
-rw-r--r--kommander/editor/multilineeditorimpl.h61
-rw-r--r--kommander/editor/newform.ui210
-rw-r--r--kommander/editor/newformimpl.cpp202
-rw-r--r--kommander/editor/newformimpl.h73
-rw-r--r--kommander/editor/orderindicator.cpp107
-rw-r--r--kommander/editor/orderindicator.h52
-rw-r--r--kommander/editor/paletteeditor.ui518
-rw-r--r--kommander/editor/paletteeditoradvanced.ui766
-rw-r--r--kommander/editor/paletteeditoradvancedimpl.cpp638
-rw-r--r--kommander/editor/paletteeditoradvancedimpl.h90
-rw-r--r--kommander/editor/paletteeditorimpl.cpp299
-rw-r--r--kommander/editor/paletteeditorimpl.h70
-rw-r--r--kommander/editor/parser.cpp66
-rw-r--r--kommander/editor/parser.h33
-rw-r--r--kommander/editor/pics/Makefile.am5
-rw-r--r--kommander/editor/pics/arrow.xbm10
-rw-r--r--kommander/editor/pics/background.pngbin0 -> 15068 bytes
-rw-r--r--kommander/editor/pics/cross.xbm10
-rw-r--r--kommander/editor/pics/hand.xbm10
-rw-r--r--kommander/editor/pics/hsplit.xbm10
-rw-r--r--kommander/editor/pics/ibeam.xbm10
-rw-r--r--kommander/editor/pics/images.h10979
-rw-r--r--kommander/editor/pics/kfontcombo.pngbin0 -> 1194 bytes
-rw-r--r--kommander/editor/pics/kommandersplash.pngbin0 -> 242008 bytes
-rw-r--r--kommander/editor/pics/large/adjustsize.xpm187
-rw-r--r--kommander/editor/pics/large/buttongroup.xpm79
-rw-r--r--kommander/editor/pics/large/checkbox.xpm67
-rw-r--r--kommander/editor/pics/large/combobox.xpm192
-rw-r--r--kommander/editor/pics/large/connecttool.xpm187
-rw-r--r--kommander/editor/pics/large/customwidget.xpm41
-rw-r--r--kommander/editor/pics/large/datepicker.xpm121
-rw-r--r--kommander/editor/pics/large/dial.xpm51
-rw-r--r--kommander/editor/pics/large/disabled/adjustsize.xpm51
-rw-r--r--kommander/editor/pics/large/disabled/connecttool.xpm57
-rw-r--r--kommander/editor/pics/large/disabled/editbreaklayout.xpm54
-rw-r--r--kommander/editor/pics/large/disabled/editcopy.xpm69
-rw-r--r--kommander/editor/pics/large/disabled/editgrid.xpm49
-rw-r--r--kommander/editor/pics/large/disabled/editpaste.xpm69
-rw-r--r--kommander/editor/pics/large/disabled/editslots.xpm65
-rw-r--r--kommander/editor/pics/large/disabled/editvlayout.xpm55
-rw-r--r--kommander/editor/pics/large/disabled/layout.xpm52
-rw-r--r--kommander/editor/pics/large/disabled/left.xpm59
-rw-r--r--kommander/editor/pics/large/disabled/redo.xpm52
-rw-r--r--kommander/editor/pics/large/disabled/right.xpm57
-rw-r--r--kommander/editor/pics/large/disabled/undo.xpm52
-rw-r--r--kommander/editor/pics/large/editbreaklayout.xpm250
-rw-r--r--kommander/editor/pics/large/editcopy.xpm43
-rw-r--r--kommander/editor/pics/large/editcut.xpm42
-rw-r--r--kommander/editor/pics/large/editdelete.xpm226
-rw-r--r--kommander/editor/pics/large/editgrid.xpm206
-rw-r--r--kommander/editor/pics/large/edithlayout.xpm103
-rw-r--r--kommander/editor/pics/large/editlower.xpm144
-rw-r--r--kommander/editor/pics/large/editpaste.xpm46
-rw-r--r--kommander/editor/pics/large/editraise.xpm149
-rw-r--r--kommander/editor/pics/large/editslots.xpm264
-rw-r--r--kommander/editor/pics/large/editvlayout.xpm89
-rw-r--r--kommander/editor/pics/large/filenew.xpm42
-rw-r--r--kommander/editor/pics/large/fileopen.xpm44
-rw-r--r--kommander/editor/pics/large/filesave.xpm42
-rw-r--r--kommander/editor/pics/large/form.xpm91
-rw-r--r--kommander/editor/pics/large/frame.xpm58
-rw-r--r--kommander/editor/pics/large/groupbox.xpm60
-rw-r--r--kommander/editor/pics/large/help.xpm182
-rw-r--r--kommander/editor/pics/large/home.xpm250
-rw-r--r--kommander/editor/pics/large/iconview.xpm142
-rw-r--r--kommander/editor/pics/large/image.xpm267
-rw-r--r--kommander/editor/pics/large/label.xpm105
-rw-r--r--kommander/editor/pics/large/layout.xpm167
-rw-r--r--kommander/editor/pics/large/lcdnumber.xpm154
-rw-r--r--kommander/editor/pics/large/left.xpm181
-rw-r--r--kommander/editor/pics/large/line.xpm45
-rw-r--r--kommander/editor/pics/large/lineedit.xpm135
-rw-r--r--kommander/editor/pics/large/listbox.xpm121
-rw-r--r--kommander/editor/pics/large/listview.xpm148
-rw-r--r--kommander/editor/pics/large/multilineedit.xpm108
-rw-r--r--kommander/editor/pics/large/newform.xpm35
-rw-r--r--kommander/editor/pics/large/ordertool.xpm157
-rw-r--r--kommander/editor/pics/large/pixlabel.xpm204
-rw-r--r--kommander/editor/pics/large/pointer.xpm27
-rw-r--r--kommander/editor/pics/large/print.xpm155
-rw-r--r--kommander/editor/pics/large/progress.xpm145
-rw-r--r--kommander/editor/pics/large/project.xpm50
-rw-r--r--kommander/editor/pics/large/pushbutton.xpm72
-rw-r--r--kommander/editor/pics/large/radiobutton.xpm67
-rw-r--r--kommander/editor/pics/large/redo.xpm42
-rw-r--r--kommander/editor/pics/large/right.xpm181
-rw-r--r--kommander/editor/pics/large/slider.xpm133
-rw-r--r--kommander/editor/pics/large/spacer.xpm248
-rw-r--r--kommander/editor/pics/large/spinbox.xpm102
-rw-r--r--kommander/editor/pics/large/table.xpm69
-rw-r--r--kommander/editor/pics/large/tabwidget.xpm94
-rw-r--r--kommander/editor/pics/large/textbrowser.xpm196
-rw-r--r--kommander/editor/pics/large/textview.xpm103
-rw-r--r--kommander/editor/pics/large/toolbutton.xpm123
-rw-r--r--kommander/editor/pics/large/undo.xpm42
-rw-r--r--kommander/editor/pics/mini/down.xpm71
-rw-r--r--kommander/editor/pics/mini/form.xpm27
-rw-r--r--kommander/editor/pics/mini/image.xpm28
-rw-r--r--kommander/editor/pics/mini/left.xpm69
-rw-r--r--kommander/editor/pics/mini/resetproperty.xpm13
-rw-r--r--kommander/editor/pics/mini/right.xpm77
-rw-r--r--kommander/editor/pics/mini/up.xpm68
-rw-r--r--kommander/editor/pics/mkimages3
-rw-r--r--kommander/editor/pics/mkpics2
-rw-r--r--kommander/editor/pics/no.xbm10
-rw-r--r--kommander/editor/pics/qtlogo.pngbin0 -> 12615 bytes
-rw-r--r--kommander/editor/pics/sizeall.xbm10
-rw-r--r--kommander/editor/pics/sizeb.xbm10
-rw-r--r--kommander/editor/pics/sizef.xbm10
-rw-r--r--kommander/editor/pics/sizeh.xbm10
-rw-r--r--kommander/editor/pics/sizev.xbm10
-rw-r--r--kommander/editor/pics/small/adjustsize.pngbin0 -> 495 bytes
-rw-r--r--kommander/editor/pics/small/book.xpm32
-rw-r--r--kommander/editor/pics/small/buttongroup.pngbin0 -> 648 bytes
-rw-r--r--kommander/editor/pics/small/checkbox.pngbin0 -> 817 bytes
-rw-r--r--kommander/editor/pics/small/closebutton.pngbin0 -> 585 bytes
-rw-r--r--kommander/editor/pics/small/combobox.pngbin0 -> 549 bytes
-rw-r--r--kommander/editor/pics/small/connecttool.pngbin0 -> 553 bytes
-rw-r--r--kommander/editor/pics/small/customwidget.pngbin0 -> 1133 bytes
-rw-r--r--kommander/editor/pics/small/databrowser.xpm156
-rw-r--r--kommander/editor/pics/small/datatable.xpm156
-rw-r--r--kommander/editor/pics/small/dataview.xpm156
-rw-r--r--kommander/editor/pics/small/dateedit.pngbin0 -> 505 bytes
-rw-r--r--kommander/editor/pics/small/datepicker.pngbin0 -> 965 bytes
-rw-r--r--kommander/editor/pics/small/datetimeedit.pngbin0 -> 1074 bytes
-rw-r--r--kommander/editor/pics/small/dial.pngbin0 -> 1024 bytes
-rw-r--r--kommander/editor/pics/small/disabled/adjustsize.pngbin0 -> 659 bytes
-rw-r--r--kommander/editor/pics/small/disabled/connecttool.pngbin0 -> 836 bytes
-rw-r--r--kommander/editor/pics/small/disabled/editbreaklayout.pngbin0 -> 1126 bytes
-rw-r--r--kommander/editor/pics/small/disabled/editcopy.pngbin0 -> 931 bytes
-rw-r--r--kommander/editor/pics/small/disabled/editcut.xpm32
-rw-r--r--kommander/editor/pics/small/disabled/editgrid.pngbin0 -> 735 bytes
-rw-r--r--kommander/editor/pics/small/disabled/edithlayout.pngbin0 -> 601 bytes
-rw-r--r--kommander/editor/pics/small/disabled/edithlayoutsplit.pngbin0 -> 754 bytes
-rw-r--r--kommander/editor/pics/small/disabled/editpaste.pngbin0 -> 901 bytes
-rw-r--r--kommander/editor/pics/small/disabled/editslots.xpm44
-rw-r--r--kommander/editor/pics/small/disabled/editvlayout.pngbin0 -> 617 bytes
-rw-r--r--kommander/editor/pics/small/disabled/editvlayoutsplit.pngbin0 -> 752 bytes
-rw-r--r--kommander/editor/pics/small/disabled/filesave.pngbin0 -> 587 bytes
-rw-r--r--kommander/editor/pics/small/disabled/layout.xpm42
-rw-r--r--kommander/editor/pics/small/disabled/left.xpm32
-rw-r--r--kommander/editor/pics/small/disabled/redo.pngbin0 -> 531 bytes
-rw-r--r--kommander/editor/pics/small/disabled/right.xpm32
-rw-r--r--kommander/editor/pics/small/disabled/searchfind.pngbin0 -> 1013 bytes
-rw-r--r--kommander/editor/pics/small/disabled/undo.pngbin0 -> 541 bytes
-rw-r--r--kommander/editor/pics/small/editbreaklayout.pngbin0 -> 744 bytes
-rw-r--r--kommander/editor/pics/small/editcopy.pngbin0 -> 485 bytes
-rw-r--r--kommander/editor/pics/small/editcut.pngbin0 -> 649 bytes
-rw-r--r--kommander/editor/pics/small/editdelete.xpm226
-rw-r--r--kommander/editor/pics/small/editgrid.pngbin0 -> 520 bytes
-rw-r--r--kommander/editor/pics/small/edithlayout.pngbin0 -> 706 bytes
-rw-r--r--kommander/editor/pics/small/edithlayoutsplit.pngbin0 -> 809 bytes
-rw-r--r--kommander/editor/pics/small/editlower.xpm113
-rw-r--r--kommander/editor/pics/small/editpaste.pngbin0 -> 902 bytes
-rw-r--r--kommander/editor/pics/small/editraise.xpm110
-rw-r--r--kommander/editor/pics/small/editslots.pngbin0 -> 690 bytes
-rw-r--r--kommander/editor/pics/small/editvlayout.pngbin0 -> 289 bytes
-rw-r--r--kommander/editor/pics/small/editvlayoutsplit.pngbin0 -> 355 bytes
-rw-r--r--kommander/editor/pics/small/exec.pngbin0 -> 1408 bytes
-rw-r--r--kommander/editor/pics/small/filenew.pngbin0 -> 313 bytes
-rw-r--r--kommander/editor/pics/small/fileopen.pngbin0 -> 681 bytes
-rw-r--r--kommander/editor/pics/small/filesave.pngbin0 -> 328 bytes
-rw-r--r--kommander/editor/pics/small/form.xpm67
-rw-r--r--kommander/editor/pics/small/frame.pngbin0 -> 400 bytes
-rw-r--r--kommander/editor/pics/small/groupbox.pngbin0 -> 439 bytes
-rw-r--r--kommander/editor/pics/small/help.pngbin0 -> 837 bytes
-rw-r--r--kommander/editor/pics/small/home.xpm160
-rw-r--r--kommander/editor/pics/small/iconview.pngbin0 -> 613 bytes
-rw-r--r--kommander/editor/pics/small/image.xpm226
-rw-r--r--kommander/editor/pics/small/konsole.pngbin0 -> 1155 bytes
-rw-r--r--kommander/editor/pics/small/label.pngbin0 -> 953 bytes
-rw-r--r--kommander/editor/pics/small/layout.xpm121
-rw-r--r--kommander/editor/pics/small/lcdnumber.pngbin0 -> 558 bytes
-rw-r--r--kommander/editor/pics/small/left.xpm141
-rw-r--r--kommander/editor/pics/small/line.pngbin0 -> 287 bytes
-rw-r--r--kommander/editor/pics/small/lineedit.pngbin0 -> 461 bytes
-rw-r--r--kommander/editor/pics/small/listbox.pngbin0 -> 386 bytes
-rw-r--r--kommander/editor/pics/small/listview.pngbin0 -> 759 bytes
-rw-r--r--kommander/editor/pics/small/multilineedit.pngbin0 -> 454 bytes
-rw-r--r--kommander/editor/pics/small/newform.xpm35
-rw-r--r--kommander/editor/pics/small/ordertool.pngbin0 -> 587 bytes
-rw-r--r--kommander/editor/pics/small/pixlabel.pngbin0 -> 1229 bytes
-rw-r--r--kommander/editor/pics/small/pointer.pngbin0 -> 586 bytes
-rw-r--r--kommander/editor/pics/small/print.xpm117
-rw-r--r--kommander/editor/pics/small/progress.pngbin0 -> 609 bytes
-rw-r--r--kommander/editor/pics/small/pushbutton.pngbin0 -> 408 bytes
-rw-r--r--kommander/editor/pics/small/radiobutton.pngbin0 -> 586 bytes
-rw-r--r--kommander/editor/pics/small/redo.pngbin0 -> 592 bytes
-rw-r--r--kommander/editor/pics/small/richtextedit.pngbin0 -> 834 bytes
-rw-r--r--kommander/editor/pics/small/right.xpm141
-rw-r--r--kommander/editor/pics/small/scrollbar.pngbin0 -> 408 bytes
-rw-r--r--kommander/editor/pics/small/searchfind.pngbin0 -> 843 bytes
-rw-r--r--kommander/editor/pics/small/shellscript.pngbin0 -> 1053 bytes
-rw-r--r--kommander/editor/pics/small/slider.pngbin0 -> 729 bytes
-rw-r--r--kommander/editor/pics/small/spacer.pngbin0 -> 715 bytes
-rw-r--r--kommander/editor/pics/small/spinbox.pngbin0 -> 455 bytes
-rw-r--r--kommander/editor/pics/small/statusbar.pngbin0 -> 294 bytes
-rw-r--r--kommander/editor/pics/small/table.pngbin0 -> 483 bytes
-rw-r--r--kommander/editor/pics/small/tabwidget.pngbin0 -> 572 bytes
-rw-r--r--kommander/editor/pics/small/textbrowser.pngbin0 -> 514 bytes
-rw-r--r--kommander/editor/pics/small/textedit.pngbin0 -> 497 bytes
-rw-r--r--kommander/editor/pics/small/textview.pngbin0 -> 498 bytes
-rw-r--r--kommander/editor/pics/small/timeedit.pngbin0 -> 1520 bytes
-rw-r--r--kommander/editor/pics/small/timer.pngbin0 -> 1462 bytes
-rw-r--r--kommander/editor/pics/small/toolbutton.pngbin0 -> 1262 bytes
-rw-r--r--kommander/editor/pics/small/undo.pngbin0 -> 572 bytes
-rw-r--r--kommander/editor/pics/temp.tmp0
-rw-r--r--kommander/editor/pics/toolbox.pngbin0 -> 783 bytes
-rw-r--r--kommander/editor/pics/uparrow.xbm10
-rw-r--r--kommander/editor/pics/vsplit.xbm10
-rw-r--r--kommander/editor/pics/wait.xbm10
-rw-r--r--kommander/editor/pixmapchooser.cpp1105
-rw-r--r--kommander/editor/pixmapchooser.h86
-rw-r--r--kommander/editor/pixmapfunction.ui923
-rw-r--r--kommander/editor/preferences.ui669
-rw-r--r--kommander/editor/previewframe.cpp52
-rw-r--r--kommander/editor/previewframe.h53
-rw-r--r--kommander/editor/previewwidget.ui279
-rw-r--r--kommander/editor/previewwidgetimpl.cpp60
-rw-r--r--kommander/editor/previewwidgetimpl.h37
-rw-r--r--kommander/editor/propertyeditor.cpp3706
-rw-r--r--kommander/editor/propertyeditor.h670
-rw-r--r--kommander/editor/qcompletionedit.cpp185
-rw-r--r--kommander/editor/qcompletionedit.h53
-rw-r--r--kommander/editor/resource.cpp2858
-rw-r--r--kommander/editor/resource.h159
-rw-r--r--kommander/editor/sizehandle.cpp384
-rw-r--r--kommander/editor/sizehandle.h91
-rw-r--r--kommander/editor/styledbutton.cpp290
-rw-r--r--kommander/editor/styledbutton.h97
-rw-r--r--kommander/editor/tableeditor.ui813
-rw-r--r--kommander/editor/tableeditorimpl.cpp464
-rw-r--r--kommander/editor/tableeditorimpl.h56
-rw-r--r--kommander/editor/templates/Configuration_Dialog.ui156
-rw-r--r--kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui114
-rw-r--r--kommander/editor/templates/Dialog_with_Buttons_(Right).ui114
-rw-r--r--kommander/editor/templates/Makefile.am0
-rw-r--r--kommander/editor/templates/Tab_Dialog.ui138
-rw-r--r--kommander/editor/templates/cpp_template16
-rw-r--r--kommander/editor/templates/header_template16
-rw-r--r--kommander/editor/timestamp.cpp81
-rw-r--r--kommander/editor/timestamp.h57
-rw-r--r--kommander/editor/widgetdatabase.cpp1029
-rw-r--r--kommander/editor/widgetdatabase.h87
-rw-r--r--kommander/editor/widgetfactory.cpp1928
-rw-r--r--kommander/editor/widgetfactory.h473
-rw-r--r--kommander/editor/widgetinterface.h29
-rw-r--r--kommander/editor/wizardeditor.ui320
-rw-r--r--kommander/editor/wizardeditorimpl.cpp220
-rw-r--r--kommander/editor/wizardeditorimpl.h64
-rw-r--r--kommander/editor/workspace.cpp787
-rw-r--r--kommander/editor/workspace.h170
-rw-r--r--kommander/examples/Makefile.am1
-rw-r--r--kommander/examples/current/Makefile.am3
-rwxr-xr-xkommander/examples/current/a1.kmdr258
-rwxr-xr-xkommander/examples/current/b1.kmdr135
-rwxr-xr-xkommander/examples/current/editor-poc.kmdr1068
-rw-r--r--kommander/examples/current/keyvaluecombo.kmdr388
-rwxr-xr-xkommander/examples/current/kpartmwframe.kmdr618
-rwxr-xr-xkommander/examples/current/kpartpart.kmdr171
-rw-r--r--kommander/examples/current/passvariables.kmdr416
-rwxr-xr-xkommander/examples/current/tableselect.kmdr502
-rw-r--r--kommander/examples/old/Makefile.am7
-rw-r--r--kommander/examples/old/checkmail.kmdr44
-rw-r--r--kommander/examples/old/ex1.kmdr105
-rw-r--r--kommander/examples/old/execprogram.kmdr104
-rw-r--r--kommander/examples/old/firstform.kmdr.kmdr88
-rw-r--r--kommander/examples/old/form1.kmdr96
-rw-r--r--kommander/examples/old/form2.kmdr118
-rw-r--r--kommander/examples/old/form3.kmdr62
-rw-r--r--kommander/examples/old/form4.kmdr88
-rw-r--r--kommander/examples/old/form5.kmdr346
-rw-r--r--kommander/examples/old/newfile.kmdr934
-rw-r--r--kommander/examples/old/populate.kmdr111
-rw-r--r--kommander/examples/old/resize.kmdr217
-rw-r--r--kommander/examples/old/selectedwidgettext.kmdr105
-rw-r--r--kommander/examples/old/settings.kmdr264
-rw-r--r--kommander/examples/old/simplelist.kmdr214
-rw-r--r--kommander/examples/old/tar.kmdr479
-rw-r--r--kommander/examples/old/tidy.kmdr1159
-rw-r--r--kommander/examples/old/widgetgenerator.kmdr438
-rwxr-xr-xkommander/examples/old/wizard.kmdr301
-rw-r--r--kommander/examples/tutorial/Makefile.am10
-rw-r--r--kommander/examples/tutorial/README123
-rw-r--r--kommander/examples/tutorial/append.kmdr115
-rw-r--r--kommander/examples/tutorial/arrays.kmdr204
-rw-r--r--kommander/examples/tutorial/calc.kmdr271
-rw-r--r--kommander/examples/tutorial/cmdline.kmdr108
-rw-r--r--kommander/examples/tutorial/dcop.kmdr139
-rw-r--r--kommander/examples/tutorial/dialogs.kmdr198
-rw-r--r--kommander/examples/tutorial/globals.kmdr96
-rw-r--r--kommander/examples/tutorial/initialize.kmdr120
-rw-r--r--kommander/examples/tutorial/loop.kmdr114
-rw-r--r--kommander/examples/tutorial/picview.kmdr148
-rw-r--r--kommander/examples/tutorial/progressbar.kmdr192
-rw-r--r--kommander/examples/tutorial/settings.kmdr177
-rw-r--r--kommander/examples/tutorial/slots.kmdr200
-rw-r--r--kommander/examples/tutorial/statusbar.kmdr99
-rw-r--r--kommander/examples/tutorial/strings.kmdr206
-rw-r--r--kommander/examples/tutorial/table.kmdr258
-rw-r--r--kommander/examples/tutorial/tree.kmdr170
-rw-r--r--kommander/examples/tutorial/widgets.kmdr133
-rw-r--r--kommander/executor/Makefile.am25
-rw-r--r--kommander/executor/dcopkommanderif.h82
-rw-r--r--kommander/executor/instance.cpp683
-rw-r--r--kommander/executor/instance.h137
-rw-r--r--kommander/executor/kmdr-executor.desktop82
-rw-r--r--kommander/executor/main.cpp102
-rw-r--r--kommander/executor/register.cpp104
-rw-r--r--kommander/executor/templates/cpp_template16
-rw-r--r--kommander/executor/templates/header_template16
-rw-r--r--kommander/factory/Makefile.am16
-rw-r--r--kommander/factory/domtool.cpp412
-rw-r--r--kommander/factory/domtool.h45
-rw-r--r--kommander/factory/kommanderfactory.cpp1486
-rw-r--r--kommander/factory/kommanderfactory.h160
-rw-r--r--kommander/factory/kommanderversion.h7
-rw-r--r--kommander/icons/Makefile.am4
-rw-r--r--kommander/icons/cr128-app-kommander.pngbin0 -> 21090 bytes
-rw-r--r--kommander/icons/cr16-app-kommander.pngbin0 -> 934 bytes
-rw-r--r--kommander/icons/cr22-app-kommander.pngbin0 -> 1480 bytes
-rw-r--r--kommander/icons/cr32-app-kommander.pngbin0 -> 2605 bytes
-rw-r--r--kommander/icons/cr64-app-kommander.pngbin0 -> 7232 bytes
-rw-r--r--kommander/icons/hi22-action-arrow.pngbin0 -> 583 bytes
-rw-r--r--kommander/kmdrtools/Makefile.am3
-rwxr-xr-xkommander/kmdrtools/dcoptool-oldparser.kmdr2125
-rwxr-xr-xkommander/kmdrtools/examples.kmdr154
-rw-r--r--kommander/kommander-editor.kdevelop285
-rw-r--r--kommander/kommander.kdevelop279
-rw-r--r--kommander/part/Makefile.am8
-rw-r--r--kommander/part/kommander_part.cpp86
-rw-r--r--kommander/part/kommander_part.desktop15
-rw-r--r--kommander/part/kommander_part.h48
-rw-r--r--kommander/plugin/Makefile.am17
-rw-r--r--kommander/plugin/kommanderplugin.cpp82
-rw-r--r--kommander/plugin/kommanderplugin.h103
-rw-r--r--kommander/plugin/specialinformation.cpp623
-rw-r--r--kommander/plugin/specialinformation.h119
-rw-r--r--kommander/plugin/specials.h77
-rw-r--r--kommander/pluginmanager/Makefile.am18
-rw-r--r--kommander/pluginmanager/main.cpp101
-rw-r--r--kommander/pluginmanager/mainwindow.cpp106
-rw-r--r--kommander/pluginmanager/mainwindow.h56
-rw-r--r--kommander/pluginmanager/pluginmanager.cpp89
-rw-r--r--kommander/pluginmanager/pluginmanager.h53
-rw-r--r--kommander/widget/Makefile.am20
-rw-r--r--kommander/widget/expression.cpp332
-rw-r--r--kommander/widget/expression.h80
-rw-r--r--kommander/widget/function.cpp135
-rw-r--r--kommander/widget/function.h73
-rw-r--r--kommander/widget/functionlib.cpp1476
-rw-r--r--kommander/widget/invokeclass.cpp61
-rw-r--r--kommander/widget/invokeclass.h56
-rw-r--r--kommander/widget/kmdrmainwindow.cpp36
-rw-r--r--kommander/widget/kmdrmainwindow.h37
-rw-r--r--kommander/widget/kommander_export.h35
-rw-r--r--kommander/widget/kommanderfunctions.cpp349
-rw-r--r--kommander/widget/kommanderwidget.cpp745
-rw-r--r--kommander/widget/kommanderwidget.h162
-rw-r--r--kommander/widget/kommanderwindow.cpp35
-rw-r--r--kommander/widget/kommanderwindow.h37
-rw-r--r--kommander/widget/myprocess.cpp137
-rw-r--r--kommander/widget/myprocess.h58
-rw-r--r--kommander/widget/parsenode.cpp262
-rw-r--r--kommander/widget/parsenode.h129
-rw-r--r--kommander/widget/parser.cpp1243
-rw-r--r--kommander/widget/parser.h197
-rw-r--r--kommander/widget/parserdata.cpp134
-rw-r--r--kommander/widget/parserdata.h50
-rw-r--r--kommander/widgets/Makefile.am35
-rw-r--r--kommander/widgets/aboutdialog.cpp295
-rw-r--r--kommander/widgets/aboutdialog.h72
-rw-r--r--kommander/widgets/buttongroup.cpp159
-rw-r--r--kommander/widgets/buttongroup.h67
-rw-r--r--kommander/widgets/checkbox.cpp151
-rw-r--r--kommander/widgets/checkbox.h67
-rw-r--r--kommander/widgets/closebutton.cpp183
-rw-r--r--kommander/widgets/closebutton.h72
-rw-r--r--kommander/widgets/combobox.cpp210
-rw-r--r--kommander/widgets/combobox.h70
-rw-r--r--kommander/widgets/datepicker.cpp130
-rw-r--r--kommander/widgets/datepicker.h70
-rw-r--r--kommander/widgets/dialog.cpp226
-rw-r--r--kommander/widgets/dialog.h87
-rw-r--r--kommander/widgets/execbutton.cpp241
-rw-r--r--kommander/widgets/execbutton.h94
-rw-r--r--kommander/widgets/fileselector.cpp240
-rw-r--r--kommander/widgets/fileselector.h102
-rw-r--r--kommander/widgets/fontdialog.cpp158
-rw-r--r--kommander/widgets/fontdialog.h50
-rw-r--r--kommander/widgets/groupbox.cpp152
-rw-r--r--kommander/widgets/groupbox.h70
-rw-r--r--kommander/widgets/konsole.cpp153
-rw-r--r--kommander/widgets/konsole.h74
-rw-r--r--kommander/widgets/label.cpp127
-rw-r--r--kommander/widgets/label.h64
-rw-r--r--kommander/widgets/lineedit.cpp182
-rw-r--r--kommander/widgets/lineedit.h72
-rw-r--r--kommander/widgets/listbox.cpp225
-rw-r--r--kommander/widgets/listbox.h67
-rw-r--r--kommander/widgets/pixmaplabel.cpp132
-rw-r--r--kommander/widgets/pixmaplabel.h66
-rw-r--r--kommander/widgets/pixmaps/textbold.xpm27
-rw-r--r--kommander/widgets/pixmaps/textcenter.xpm27
-rw-r--r--kommander/widgets/pixmaps/textitalic.xpm27
-rw-r--r--kommander/widgets/pixmaps/textleft.xpm27
-rw-r--r--kommander/widgets/pixmaps/textright.xpm27
-rw-r--r--kommander/widgets/pixmaps/textunder.xpm27
-rw-r--r--kommander/widgets/plugin.cpp138
-rw-r--r--kommander/widgets/popupmenu.cpp246
-rw-r--r--kommander/widgets/popupmenu.h61
-rw-r--r--kommander/widgets/progressbar.cpp144
-rw-r--r--kommander/widgets/progressbar.h63
-rw-r--r--kommander/widgets/radiobutton.cpp144
-rw-r--r--kommander/widgets/radiobutton.h66
-rw-r--r--kommander/widgets/richtexteditor.cpp249
-rw-r--r--kommander/widgets/richtexteditor.h85
-rw-r--r--kommander/widgets/scriptobject.cpp191
-rw-r--r--kommander/widgets/scriptobject.h68
-rw-r--r--kommander/widgets/slider.cpp121
-rw-r--r--kommander/widgets/slider.h60
-rw-r--r--kommander/widgets/spinboxint.cpp140
-rw-r--r--kommander/widgets/spinboxint.h68
-rw-r--r--kommander/widgets/statusbar.cpp131
-rw-r--r--kommander/widgets/statusbar.h65
-rw-r--r--kommander/widgets/subdialog.cpp146
-rw-r--r--kommander/widgets/subdialog.h70
-rw-r--r--kommander/widgets/table.cpp373
-rw-r--r--kommander/widgets/table.h73
-rw-r--r--kommander/widgets/tabwidget.cpp194
-rw-r--r--kommander/widgets/tabwidget.h60
-rw-r--r--kommander/widgets/textbrowser.cpp139
-rw-r--r--kommander/widgets/textbrowser.h63
-rw-r--r--kommander/widgets/textedit.cpp229
-rw-r--r--kommander/widgets/textedit.h70
-rw-r--r--kommander/widgets/timer.cpp189
-rw-r--r--kommander/widgets/timer.h71
-rw-r--r--kommander/widgets/toolbox.cpp190
-rw-r--r--kommander/widgets/toolbox.h54
-rw-r--r--kommander/widgets/treewidget.cpp512
-rw-r--r--kommander/widgets/treewidget.h87
-rw-r--r--kommander/widgets/widgets.desktop36
-rw-r--r--kommander/widgets/wizard.cpp194
-rw-r--r--kommander/widgets/wizard.h82
-rw-r--r--kommander/working/Makefile.am4
-rwxr-xr-xkommander/working/extractkmdr112
-rwxr-xr-xkommander/working/kmdr2po11
-rw-r--r--kommander/working/plugintemplate/Makefile.am17
-rw-r--r--kommander/working/plugintemplate/README.dox55
-rw-r--r--kommander/working/plugintemplate/app.kdevelop116
-rw-r--r--kommander/working/plugintemplate/kommanderplugin.kdevtemplate66
-rw-r--r--kommander/working/plugintemplate/kommanderplugin.pngbin0 -> 7232 bytes
-rw-r--r--kommander/working/plugintemplate/plugin.cpp29
-rw-r--r--kommander/working/plugintemplate/src-Makefile.am19
-rw-r--r--kommander/working/plugintemplate/widget.cpp116
-rw-r--r--kommander/working/plugintemplate/widget.h46
-rw-r--r--kommander/x-kommander.desktop55
-rw-r--r--kxsldbg/Makefile.am66
-rw-r--r--kxsldbg/configure.in.in176
-rw-r--r--kxsldbg/data/Makefile.am16
-rw-r--r--kxsldbg/data/empty.xml12
-rw-r--r--kxsldbg/data/empty.xsl19
-rw-r--r--kxsldbg/data/test1.xml17
-rw-r--r--kxsldbg/data/test2.xml30
-rw-r--r--kxsldbg/data/test3.xml29
-rw-r--r--kxsldbg/data/test4.xml27
-rw-r--r--kxsldbg/data/test_import.xsl17
-rw-r--r--kxsldbg/data/test_include_bot.xsl17
-rw-r--r--kxsldbg/data/test_include_top.xsl17
-rw-r--r--kxsldbg/data/testdoc.dtd6
-rw-r--r--kxsldbg/data/testdoc.xml33
-rw-r--r--kxsldbg/data/testdoc.xsl141
-rw-r--r--kxsldbg/kxsldbg.cpp173
-rw-r--r--kxsldbg/kxsldbg.desktop53
-rw-r--r--kxsldbg/kxsldbg.h84
-rw-r--r--kxsldbg/kxsldbg_shell.rc29
-rw-r--r--kxsldbg/kxsldbgif.h17
-rw-r--r--kxsldbg/kxsldbgpart/Makefile.am31
-rw-r--r--kxsldbg/kxsldbgpart/dummy.cpp0
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-1downarrow.pngbin0 -> 865 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-configure.pngbin0 -> 1055 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-exit.pngbin0 -> 882 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-hash.pngbin0 -> 591 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-mark.pngbin0 -> 440 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-next.pngbin0 -> 835 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-run.pngbin0 -> 1114 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-step.pngbin0 -> 466 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_break.pngbin0 -> 661 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_data.pngbin0 -> 580 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_delete.pngbin0 -> 892 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_enable.pngbin0 -> 512 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_output.pngbin0 -> 936 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_refresh.pngbin0 -> 910 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_source.pngbin0 -> 576 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_stepdown.pngbin0 -> 260 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi16-action-xsldbg_stepup.pngbin0 -> 245 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-1downarrow.pngbin0 -> 1357 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-configure.pngbin0 -> 3797 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-exit.pngbin0 -> 1398 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-next.pngbin0 -> 1311 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-run.pngbin0 -> 1354 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-step.pngbin0 -> 473 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_break.pngbin0 -> 769 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_data.pngbin0 -> 268 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_delete.pngbin0 -> 951 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_enable.pngbin0 -> 246 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_output.pngbin0 -> 1471 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_refresh.pngbin0 -> 1420 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_source.pngbin0 -> 345 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_stepdown.pngbin0 -> 166 bytes
-rw-r--r--kxsldbg/kxsldbgpart/hi22-action-xsldbg_stepup.pngbin0 -> 165 bytes
-rw-r--r--kxsldbg/kxsldbgpart/kxsldbg_part.cpp875
-rw-r--r--kxsldbg/kxsldbgpart/kxsldbg_part.desktop15
-rw-r--r--kxsldbg/kxsldbgpart/kxsldbg_part.h170
-rw-r--r--kxsldbg/kxsldbgpart/kxsldbg_part.rc61
-rw-r--r--kxsldbg/kxsldbgpart/kxsldbg_partif.h14
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/Makefile.am8
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp62
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp93
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h147
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp857
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/xsldbgnotifier.cpp33
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/xsldbgthread.cpp360
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/Makefile.am12
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/allmoc.cpp2
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/arraylist.cpp240
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/arraylist.h291
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/breakpoint.cpp696
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/breakpoint.h633
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp1036
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/callstack.cpp509
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/callstack.h275
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/cmds.h197
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/debug.cpp235
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/debug.h101
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp2118
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/debugXSL.h1078
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp274
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/files.cpp1420
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/files.h981
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/files_unix.cpp225
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/help.h73
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp115
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/nodeview_cmds.cpp609
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/option_cmds.cpp299
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/options.cpp902
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/options.h476
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/options_unix.cpp118
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/os_cmds.cpp100
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp175
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/qtnotifier2.h38
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/search.cpp1584
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/search.h1087
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/search_cmds.cpp88
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp331
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/trace_cmds.cpp77
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/utils.cpp187
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/utils.h217
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/variable_cmds.cpp114
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp1367
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h188
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgconfig.h0
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h302
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgio.h41
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgmsg.cpp119
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgmsg.h210
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgnotifier.h48
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgthread.cpp184
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgthread.h90
-rw-r--r--kxsldbg/kxsldbgpart/qxsldbgdoc.cpp162
-rw-r--r--kxsldbg/kxsldbgpart/qxsldbgdoc.h56
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp46
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h51
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpoints.ui582
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp202
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h71
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgcallstack.ui157
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp71
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h53
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgconfig.ui817
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp499
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgconfigimpl.h151
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdebugger.cpp474
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdebugger.h176
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdialogbase.cpp39
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdialogbase.h46
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdoc.cpp61
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdoc.h28
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdocmap.h5
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgentities.ui161
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp79
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h53
-rw-r--r--kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp38
-rw-r--r--kxsldbg/kxsldbgpart/xsldbggloballistitem.h41
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgglobalvariables.ui272
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp77
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h55
-rw-r--r--kxsldbg/kxsldbgpart/xsldbginspector.cpp210
-rw-r--r--kxsldbg/kxsldbgpart/xsldbginspector.h67
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglistitem.cpp46
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglistitem.h45
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp59
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocallistitem.h51
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocalvariables.ui374
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp121
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h60
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgmsgdialog.ui175
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h30
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgoutputview.cpp156
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgoutputview.h51
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgsources.ui154
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp73
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h53
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp32
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h44
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplates.ui100
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp68
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h55
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgwalkspeed.ui239
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp49
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h45
-rw-r--r--kxsldbg/lo16-app-kxsldbg.pngbin0 -> 377 bytes
-rw-r--r--kxsldbg/lo32-app-kxsldbg.pngbin0 -> 576 bytes
-rw-r--r--kxsldbg/main.cpp38
-rw-r--r--kxsldbg/output.txt50
-rw-r--r--kxsldbg/simpleio.c144
-rw-r--r--kxsldbg/xsldbgmain.cpp256
-rw-r--r--lib/Makefile.am10
-rw-r--r--lib/compatibility/Makefile.am17
-rw-r--r--lib/compatibility/kmdi/Makefile.am21
-rw-r--r--lib/compatibility/kmdi/dummy.cpp1
-rw-r--r--lib/compatibility/kmdi/qextmdi/Makefile.am18
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdelibs_export.h87
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdemacros.h.in208
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget.cpp3273
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget.h1534
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_p.h89
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp631
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_private.h204
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp789
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildarea.h306
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp1409
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrm.h446
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp322
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h145
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildview.cpp773
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildview.h615
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidefines.h117
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp856
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h167
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp152
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h123
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp75
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdifocuslist.h42
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp320
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdiguiclient.h146
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdiiterator.h51
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdilistiterator.h61
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp2941
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdimainfrm.h872
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdinulliterator.h49
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp390
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditaskbar.h219
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp269
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h86
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h51
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp988
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar.h246
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h67
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabbar.cpp426
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabbar.h113
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabwidget.cpp523
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabwidget.h291
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/filenew.xpm27
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2_closebutton.xpm22
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2_maxbutton.xpm22
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2_minbutton.xpm22
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2_restorebutton.xpm22
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2_undockbutton.xpm22
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2laptop_closebutton.xpm18
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2laptop_closebutton_menu.xpm25
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2laptop_maxbutton.xpm18
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2laptop_minbutton.xpm18
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2laptop_restorebutton.xpm18
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde2laptop_undockbutton.xpm18
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde_closebutton.xpm30
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde_maxbutton.xpm30
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde_minbutton.xpm30
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde_restorebutton.xpm30
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/kde_undockbutton.xpm27
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/win_closebutton.xpm30
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/win_maxbutton.xpm30
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/win_minbutton.xpm30
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/win_restorebutton.xpm30
-rw-r--r--lib/compatibility/kmdi/qextmdi/res/win_undockbutton.xpm26
-rw-r--r--lib/compatibility/knewstuff/Makefile.am13
-rw-r--r--lib/compatibility/knewstuff/cr16-action-knewstuff.pngbin0 -> 710 bytes
-rw-r--r--lib/compatibility/knewstuff/cr32-action-knewstuff.pngbin0 -> 1459 bytes
-rw-r--r--lib/compatibility/knewstuff/cr64-action-knewstuff.pngbin0 -> 3144 bytes
-rw-r--r--lib/compatibility/knewstuff/downloaddialog.cpp628
-rw-r--r--lib/compatibility/knewstuff/downloaddialog.h237
-rw-r--r--lib/compatibility/knewstuff/engine.cpp420
-rw-r--r--lib/compatibility/knewstuff/engine.h189
-rw-r--r--lib/compatibility/knewstuff/entry.cpp294
-rw-r--r--lib/compatibility/knewstuff/entry.h257
-rw-r--r--lib/compatibility/knewstuff/knewstuff.cpp86
-rw-r--r--lib/compatibility/knewstuff/knewstuff.h161
-rw-r--r--lib/compatibility/knewstuff/knewstuffgeneric.cpp140
-rw-r--r--lib/compatibility/knewstuff/knewstuffgeneric.h86
-rw-r--r--lib/compatibility/knewstuff/knewstuffsecure.cpp240
-rw-r--r--lib/compatibility/knewstuff/knewstuffsecure.h101
-rw-r--r--lib/compatibility/knewstuff/provider.cpp223
-rw-r--r--lib/compatibility/knewstuff/provider.h206
-rw-r--r--lib/compatibility/knewstuff/providerdialog.cpp95
-rw-r--r--lib/compatibility/knewstuff/providerdialog.h76
-rw-r--r--lib/compatibility/knewstuff/security.cpp344
-rw-r--r--lib/compatibility/knewstuff/security.h141
-rw-r--r--lib/compatibility/knewstuff/uploaddialog.cpp176
-rw-r--r--lib/compatibility/knewstuff/uploaddialog.h92
-rw-r--r--lib/ksavealldialog.cpp189
-rw-r--r--lib/ksavealldialog.h83
-rw-r--r--lib/qextfileinfo.cpp619
-rw-r--r--lib/qextfileinfo.h119
-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
3044 files changed, 399707 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 00000000..b1e30751
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,38 @@
+Quanta Plus (quanta):
+ Current maintainers:
+ Eric Laffoon <sequitur@kde.org>
+ Andras Mantia <amantia@kde.org>
+ Original authors:
+ Dmitry Poplavsky <dima@kde.org>
+ Alexander Yakovlev <yshurik@kde.org>
+
+ CSS/Frame editor: Luciano Gulmini <e.gulmini@tiscali.it>
+ PHP Debugger: Linus McCabe <Linus@mccabe.nu>
+ VPL part:
+ Nicolas Deschildre <ndeschildre@kdewebdev.org>
+ Paulo Moura Guedes <moura@kdewebdev.org>
+
+ Home page: http://kdewebdev.org
+ Bug form: http://bugs.kde.org
+
+Kommander (kommander):
+ Authors:
+ Mark Britton <consume@optusnet.com.au>
+ Eric Laffoon <sequitur@easystreet.com>
+ Michal Rudolf <mrudolf@kdewebdev.org>
+
+KXSLDbg (kxsldbg):
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+
+KFileReplace:
+ Maintainer:
+ Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ Andras Mantia <amantia@kde.org>
+ Original author:
+ François Dupoux <fdupoux@dupoux.com>
+
+KImageMapEditor:
+ Author: Jan Schäfer <JanSchaefer@gmx.de>
+
+KLinkStatus:
+ Author: Paulo Moura Guedes <pmg@netcabo.pt> \ No newline at end of file
diff --git a/COPYING b/COPYING
new file mode 100644
index 00000000..ffe677b2
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff --git a/COPYING-DOCS b/COPYING-DOCS
new file mode 100644
index 00000000..4a0fe1c8
--- /dev/null
+++ b/COPYING-DOCS
@@ -0,0 +1,397 @@
+ GNU Free Documentation License
+ Version 1.2, November 2002
+
+
+ Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (Thus, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section Entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section to be Entitled "Endorsements"
+ or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications". You must delete all sections
+Entitled "Endorsements".
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 00000000..db65ad29
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,19 @@
+Global kdewebdev changelog. For detailed changes see each included
+application's own ChangeLog file.
+
+2008-02-13: kdewebdev 3.5.9
+2006-10-10: kdewebdev 3.5.5
+2006-08-02: kdewebdev 3.5.4
+2006-05-31: kdewebdev 3.5.3
+2006-03-21: kdewebdev 3.5.2
+2006-01-31: kdewebdev 3.5.1
+2005-11-29: kdewebdev 3.5.0
+2005-02-22: kdewebdev 3.4.0
+2005-02-09: kdewebdev 3.4 Beta2
+2005-01-07: kdewebdev 3.4 Beta1
+2004-12-06: kdewebdev 3.4 Alpha1
+2004-08-18: kdewebdev 3.3.0
+2004-08-04: kdewebdev 3.3 RC1
+2004-07-07: kdewebdev 3.3 Beta1
+2004-06-01: kdewebdev 3.3 Alpha1
+2004-05-06: First kdewebdev release - kdewebdev 3.3 Bleeding Edge 2 \ No newline at end of file
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 00000000..02a4a074
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,167 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes a while. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 4. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
diff --git a/INSTALL.docs b/INSTALL.docs
new file mode 100644
index 00000000..9469cfa7
--- /dev/null
+++ b/INSTALL.docs
@@ -0,0 +1,8 @@
+
+There are some docs ( at 11.04.2001 avaible docs for html, css, php, javascript )
+you need to download packages from http://quanta.sourceforge.net
+( html.tar.bz2, php.tar.bz2, css.tar.bz2 ) and uncompress them
+to $KDEDIR/share/apps/quanta/doc/
+or to ~/.kde/share/apps/quanta/doc/
+and restart quanta.
+
diff --git a/Makefile.am.in b/Makefile.am.in
new file mode 100644
index 00000000..c2adbb73
--- /dev/null
+++ b/Makefile.am.in
@@ -0,0 +1,30 @@
+COMPILE_FIRST = lib
+MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
+
+dist-hook:
+ cd $(top_distdir) && perl admin/am_edit -padmin
+ cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
+
+
+install-data-local:
+ @echo ""
+ @echo ""
+ @echo "*************** Important *************************"
+ @echo ""
+ @echo " Add "$(bindir)" to your PATH and"
+ @echo " add "$(prefix)" to your KDEDIRS!"
+ @echo ""
+ @echo " Please report bugs with our web form at"
+ @echo " http://bugs.kde.org"
+ @echo " Current maintainers are"
+ @echo " Eric Laffoon <sequitur@kde.org>"
+ @echo " Andras Mantia <amantia@kde.org>"
+ @echo ""
+ @echo " The KDE Web Dev developers hope you enjoy Quanta+,"
+ @echo " Kommander, KFileReplace, KXSL dbg, KImageMapEditor"
+ @echo " and KLinkStatus!"
+ @echo "****************************************************"
+ @echo ""
+
+include admin/deps.am
+
diff --git a/Makefile.cvs b/Makefile.cvs
new file mode 100644
index 00000000..030b1407
--- /dev/null
+++ b/Makefile.cvs
@@ -0,0 +1,15 @@
+
+all:
+ @echo "This Makefile is only for the CVS repository"
+ @echo "This will be deleted before making the distribution"
+ @echo ""
+ @if test ! -d admin; then \
+ echo "Please recheckout this module!" ;\
+ echo "for cvs: use checkout once and after that update again" ;\
+ echo "for cvsup: checkout kde-common from cvsup and" ;\
+ echo " link kde-common/admin to ./admin" ;\
+ exit 1 ;\
+ fi
+ $(MAKE) -f admin/Makefile.common cvs
+
+.SILENT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 00000000..c85b5a9b
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,2 @@
+ For the latest new features and bugfixes in Quanta+ and the other included
+applications take a look at the ChangeLog file in the subdirectories.
diff --git a/PACKAGING b/PACKAGING
new file mode 100644
index 00000000..b64226b4
--- /dev/null
+++ b/PACKAGING
@@ -0,0 +1,77 @@
+ Here there is some information about requirements for packagers. Please take
+care of the below compilation and runtime dependencies when packaging Quanta.
+
+Severity levels mean:
+- Required: Quanta will not run without it
+- Highly recommended: Quanta will run, but some important functionality will be missing
+- Recommended: some functionality will be missing
+- Optional: completes the functionalities in Quanta, making the development easier
+
+1. Compilation requirements:
+------------------------------
+- KDE 3.4 libraries or above
+ Severity: Required
+- cvsservice headers:
+ Description: cvsservice headers are used for the incorporated CVS actions. Without them
+ the CVS submenu from the file context menus will be missing.
+ Severity: Highly recommended
+ Location: kdesdk/cervisia
+
+2. Runtime dependencies:
+---------------------------
+- Kommander:
+ Description: Required to run some of the dialogs in Quanta+
+ Severity: Highly recommended
+ Location: kdewebdev module
+
+- KFileReplace:
+ Description: Used to search and replace in external files
+ Severity: Highly recommended
+ Location: kdewebdev module
+
+- KLinkStatus:
+ Description: Used to check the validity of the links
+ Severity: Highly recommended
+ Location: kdewebdev module
+
+- HTML Tidy:
+ Description: Used to check the validity of the HTML documents
+ Severity: Highly recommended
+ Location: http://tidy.sf.net
+
+- Gubed:
+ Description: the PHP Debugger used by Quanta
+ Severity: Highly recommended
+ Location: http://gubed.sf.net (only the server is required)
+
+- cvsservice:
+ Description: used by the *integrated* CVS commands.
+ Severity: Highly Recommended
+ Localtion: kdesdk module
+
+- Cervisia:
+ Description: Used to perform CVS operations
+ Severity: Recommended
+ Location: kdesdk module
+
+- KXSLDbg:
+ Description: XSLT debugger
+ Severity: Recommended
+ Location: kdewebdev module
+
+- KImageMapEditor:
+ Description: Helps creation and editing of HTML image-maps
+ Severity: Optional
+ Location: kdewebdev module
+
+- Kompare:
+ Description: compares two files by content. Used when a file was modified outside of Quanta.
+ Severity: Recommended
+ Localtion: kdesdk module
+
+- GPG (OpenPGP):
+ Description: digital signature tool. Makes possible the signature verification of downloaded
+ resources.
+ Severity: Highly Recommended
+ Location: http://www.gnupg.de
+ \ No newline at end of file
diff --git a/README b/README
new file mode 100644
index 00000000..4105a43d
--- /dev/null
+++ b/README
@@ -0,0 +1,24 @@
+KDE WebDev - WEB Development package for the K Desktop Environment.
+ Version: 3.5 line
+
+
+ The kdewebdev package contains Quanta Plus and other applications, which are useful
+for web development. They are runtime dependencies of Quanta Plus, and it is
+highly recommended that you install them.
+
+ The extra applications are:
+
+Kommander: a GUI script builder and executor tool. Needed for some Quanta functionality.
+KFileReplace: powerful search and replace in multiple files
+KXSLDbg: XSL debugger
+KImageMapEditor: image map editor
+KLinkStatus: link checker
+
+Be sure to read the README files in each application's directory!
+Packagers, please read the PACKAGING file for detailed information about compilation
+and runtime dependencies.
+
+
+Enjoy Quanta+!
+
+The Quanta team
diff --git a/TODO b/TODO
new file mode 100644
index 00000000..6aa9e6fb
--- /dev/null
+++ b/TODO
@@ -0,0 +1 @@
+Put here the global TODO list. \ No newline at end of file
diff --git a/VERSION b/VERSION
new file mode 100644
index 00000000..b3caaa9a
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+KDE WebDev 3.5.9
diff --git a/configure.in.bot b/configure.in.bot
new file mode 100644
index 00000000..7e99abfb
--- /dev/null
+++ b/configure.in.bot
@@ -0,0 +1,8 @@
+if test "$enable_editors" = "yes"; then
+ echo ""
+ echo "WARNING: You have enabled the editor chooser feature!"
+ echo "This feature is highly experimental, and officially only the"
+ echo "Kate part (Advanced Text Editor) is supported!"
+ echo "Some features are not accessible with other editors, and"
+ echo "Quanta may even crash with those!"
+fi
diff --git a/configure.in.in b/configure.in.in
new file mode 100644
index 00000000..4e58ca89
--- /dev/null
+++ b/configure.in.in
@@ -0,0 +1,264 @@
+#MIN_CONFIG(3.3)
+dnl If the quanta executable name and the data dirs are changed from the default "quanta",
+dnl the following changes are needed:
+dnl - change the quanta_datadir
+dnl - change the QUANTA_PACKAGE and QUANTA_VERSION in quanta/src/quanta.h
+dnl - change the KDE_ICON in quanta/data/icons/Makefile.am
+dnl - create a .desktop file and the corresponding icons
+dnl - make sure the .desktop file is installed in the quanta/src/Makefile.am
+dnl (kdelnk_DATA = quanta.desktop line)
+dnl - change the bin_PROGRAMS and the _SOURCES, _LDADD, _METASOURCES, _LDFLAGS
+dnl below it in the quanta/src/Makefile.am, so it reflects the new executable name
+
+AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@)
+KDE_ENABLE_HIDDEN_VISIBILITY
+
+quanta_datadir='${kde_datadir}/quanta'
+package="quanta"
+AC_SUBST(package)
+AC_SUBST(quanta_datadir)
+AM_CONDITIONAL(QUANTAUIRC_HOOK, test "x$package" != "xquanta")
+
+dnl These are common macros that you might or might not want to use
+
+dnl Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_TIME
+AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdlib.h paths.h sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h sys/param.h stdarg.h)
+AC_CHECK_FUNCS(usleep)
+AC_CHECK_FUNCS(statvfs)
+
+AC_DEFINE_UNQUOTED(PREFIX,"$prefix",[Define the PREFIX to be used later])
+
+dnl
+dnl The following new parameters were added to offer
+dnl the ability to specify the location of the libxml
+dnl library during linking and compilation.
+dnl Mathieu Lacage 30/03/2000
+dnl
+LIBXML_PREFIX=""
+AC_ARG_WITH(libxml-prefix,
+ [ --with-libxml-prefix=[PFX] Specify location of libxml],
+ LIBXML_PREFIX="$withval"
+)
+
+if test "x${LIBXML_PREFIX}" != "x"
+then
+ AC_MSG_RESULT(Using a libxml prefix of ${LIBXML_PREFIX})
+fi
+
+
+AC_SUBST(LIBXML_LIBS)
+
+dnl Test for libxml2 version
+XML_CONFIG="xml2-config"
+AC_MSG_CHECKING(for libxml libraries >= "2.6.0")
+XML_WARNING=""
+if test "x$LIBXML_PREFIX" != "x"
+then
+ if ${LIBXML_PREFIX}/bin/xml2-config --libs print > /dev/null 2>&1
+ then
+ XML_CONFIG=${LIBXML_PREFIX}/bin/xml2-config
+ else
+ XML_WARNING="1"
+ XML_CONFIG=xml2-config
+ fi
+fi
+
+AC_DEFUN([VERSION_TO_NUMBER],
+[`$1 | sed -e 's/libxml //' | $AWK 'BEGIN { FS = "."; } { printf "%d",
+ ([$]1* 1000 + [$]2) * 1000 + [$]3;}'`])
+
+dnl
+dnl test version and init our variables
+dnl
+if test "x$XML_CONFIG" != "x"
+then
+ vers=VERSION_TO_NUMBER($XML_CONFIG --version)
+ if test "$vers" -lt VERSION_TO_NUMBER(echo "2.6.0")
+ then
+ CXXFLAGS="$CXXFLAGS -DLIBXML_2_5"
+ AC_MSG_RESULT(not found - assuming 2.5.x)
+ else
+ AC_MSG_RESULT(found)
+ fi
+ LIBXML_LIBS="`$XML_CONFIG --libs`"
+ LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
+ LIBXML_PREFIX="$XML_CONFIG --prefix"
+else
+ AC_MSG_ERROR(Could not find libxml2 anywhere, check ftp://xmlsoft.org/.)
+fi
+
+if test "x${XML_WARNING}" != "x"
+then
+ AC_MSG_RESULT(
+!!Warning!! using xml2-config in default path
+)
+fi
+
+LIBXML_PREFIX_DIR="`$XML_CONFIG --prefix`"
+
+AC_SUBST(XML_CONFIG)
+AC_SUBST(LIBXML_PREFIX)
+AC_SUBST(LIBXML_LIBS)
+AC_SUBST(LIBXML_CFLAGS)
+
+LIBXSLT_PREFIX=""
+AC_ARG_WITH(libxslt-prefix,
+ [ --with-libxslt-prefix=[PFX] Specify location of libxslt],
+ LIBXSLT_PREFIX="$withval"
+)
+
+if test "x${LIBXSLT_PREFIX}" != "x"
+then
+ AC_MSG_RESULT(Using a libxslt prefix of ${LIBXSLT_PREFIX})
+fi
+
+dnl
+dnl find libxslt
+dnl
+XSLT_CONFIG="xslt-config"
+XSLT_WARNING=""
+AC_SUBST(LIBXSLT_REQUIRED_VERSION)
+AC_MSG_CHECKING(for libxslt libraries >= $LIBXSLT_REQUIRED_VERSION)
+if test "x$LIBXSLT_PREFIX" != "x"
+then
+ if ${LIBXSLT_PREFIX}/bin/xslt-config --libs print > /dev/null 2>&1
+ then
+ XSLT_CONFIG=${LIBXSLT_PREFIX}/bin/xslt-config
+ else
+ XSLT_WARNING="1"
+ XSLT_CONFIG=xslt-config
+ fi
+fi
+
+
+AC_DEFUN([VERSION_TO_NUMBER],
+[`$1 | sed -e 's/libxslt //' | $AWK 'BEGIN { FS = "."; } { printf "%d",
+ ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`])
+
+dnl
+dnl test version and init our variables
+dnl
+if test "x$XSLT_CONFIG" != "x"
+then
+ vers=VERSION_TO_NUMBER($XSLT_CONFIG --version)
+ if test "$vers" -ge VERSION_TO_NUMBER(echo $LIBXSLT_REQUIRED_VERSION)
+ then
+ LIBXSLT_LIBS="-lexslt `$XSLT_CONFIG --libs`"
+ LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
+ AC_MSG_RESULT(found)
+ if test "x$LIBXSLT_PREFIX" != "x"
+ then
+ AC_MSG_RESULT(
+Don't forget to make sure that ${LIBXSLT_PREFIX}/lib has been added
+ to your LD_LIBRARY_PATH environment variable)
+ else
+ LIBXSLT_PREFIX="$XSLT_CONFIG --prefix"
+ fi
+ else
+ AC_MSG_ERROR(You need at least libxslt $LIBXSLT_REQUIRED_VERSION for this
+ version of xsldbg)
+ fi
+else
+ AC_MSG_ERROR(Could not find libxslt anywhere, check
+ ftp://xmlsoft.org/XSLT/.)
+fi
+
+if test "x${XSLT_WARNING}" != "x"
+then
+ AC_MSG_RESULT(
+!!Warning!! using xslt-config in default path
+)
+fi
+
+AC_SUBST(XSLT_CONFIG)
+AC_SUBST(LIBXSLT_PREFIX)
+AC_SUBST(LIBXSLT_LIBS)
+AC_SUBST(LIBXSLT_CFLAGS)
+
+
+dnl **********
+dnl check whether we need the qextmdi lib
+dnl (Shamlesly stolen from gideon souorces and
+dnl modified for quanta by fredi)
+dnl **********
+
+AC_DEFUN([QUANTA_CHECK_MDI],
+[
+ AC_MSG_CHECKING(whether to use kmdi lib from kdelibs)
+ AC_CACHE_VAL(ac_cv_mdi_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) | (3<<8) | (92))
+ KDE_choke me
+ #endif
+ ],
+ ac_cv_mdi_setup=yes,
+ ac_cv_mdi_setup=no
+ )
+ CXXFLAGS="$save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ if test "$ac_cv_mdi_setup" = "yes"; then
+ LIB_KMDI="-lkmdi"
+ QEXTMDI_SUBDIR=""
+ KMDI_INCLUDES=""
+ AC_MSG_RESULT(yes)
+ else
+ LIB_KMDI='$(top_builddir)/lib/compatibility/kmdi/libquantakmdi.la'
+ QEXTMDI_SUBDIR="kmdi"
+ KMDI_INCLUDES='-I$(top_srcdir)/lib/compatibility/kmdi/qextmdi'
+ CXXFLAGS="$CXXFLAGS -DCOMPAT_KMDI"
+ AC_MSG_RESULT(no)
+ fi
+
+ AC_SUBST(LIB_KMDI)
+ AC_SUBST(KMDI_INCLUDES)
+ AC_SUBST(QEXTMDI_SUBDIR)
+ AM_CONDITIONAL(include_qextmdi, test -n "$QEXTMDI_SUBDIR")
+])
+
+dnl Check if kmdi is present, if not use giden's one
+QUANTA_CHECK_MDI
+
+KDE_CHECK_HEADER(cvsservice_stub.h, [cvsservice_stub_h="found"], [cvsservice_stub_h="none"])
+AM_CONDITIONAL(include_cvsservice, test "$cvsservice_stub_h" = "found")
+if test "$cvsservice_stub_h" = "found"; then
+ CXXFLAGS="$CXXFLAGS -DENABLE_CVSSERVICE"
+fi
+
+#check for KNewStuffSecure headers
+KNEWSTUFF_INCLUDES=""
+LIB_KNEWSTUFF="-lknewstuff"
+KDE_CHECK_HEADER(knewstuff/knewstuffsecure.h, [knewstuffsecure_h="found"], [knewstuffsecure_h="none"])
+AM_CONDITIONAL(include_knewstuff, test "$knewstuffsecure_h" != "found")
+if test "$knewstuffsecure_h" != "found"; then
+ KNEWSTUFF_INCLUDES='-I$(top_srcdir)/lib/compatibility'
+ LIB_KNEWSTUFF='$(top_builddir)/lib/compatibility/knewstuff/libknewstuff.la'
+fi
+AC_SUBST(KNEWSTUFF_INCLUDES)
+AC_SUBST(LIB_KNEWSTUFF)
+
+
+
+AC_ARG_ENABLE(editors, [ --enable-editors Enable selection of other editors aside of Kate],
+[enable_editors=$enableval], [enable_editors="no"])
+
+if test "$enable_editors" = "yes"; then
+ CXXFLAGS="$CXXFLAGS -DENABLE_EDITORS"
+fi
+AC_SUBST(enable_editors)
+
+AC_CHECK_PROGS(TAR, gnutar gtar tar, [AM_MISSING_PROG(tar)])
+AC_CHECK_PROG(GZIP_COMMAND, gzip, gzip)
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 00000000..85c6cdef
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,4 @@
+KDE_LANG = en
+KDE_DOCS = AUTO
+SUBDIRS = $(AUTODIRS)
+
diff --git a/doc/kfilereplace/Makefile.am b/doc/kfilereplace/Makefile.am
new file mode 100644
index 00000000..e97402c7
--- /dev/null
+++ b/doc/kfilereplace/Makefile.am
@@ -0,0 +1,2 @@
+KDE_DOCS = AUTO
+KDE_LANG = en
diff --git a/doc/kfilereplace/addstringsdialog_window.png b/doc/kfilereplace/addstringsdialog_window.png
new file mode 100644
index 00000000..7d6aeee7
--- /dev/null
+++ b/doc/kfilereplace/addstringsdialog_window.png
Binary files differ
diff --git a/doc/kfilereplace/backup_option.png b/doc/kfilereplace/backup_option.png
new file mode 100644
index 00000000..a0e1e02f
--- /dev/null
+++ b/doc/kfilereplace/backup_option.png
Binary files differ
diff --git a/doc/kfilereplace/casesensitive_option.png b/doc/kfilereplace/casesensitive_option.png
new file mode 100644
index 00000000..6302c0f2
--- /dev/null
+++ b/doc/kfilereplace/casesensitive_option.png
Binary files differ
diff --git a/doc/kfilereplace/command_option.png b/doc/kfilereplace/command_option.png
new file mode 100644
index 00000000..1da3688b
--- /dev/null
+++ b/doc/kfilereplace/command_option.png
Binary files differ
diff --git a/doc/kfilereplace/edit.png b/doc/kfilereplace/edit.png
new file mode 100644
index 00000000..ce8b2267
--- /dev/null
+++ b/doc/kfilereplace/edit.png
Binary files differ
diff --git a/doc/kfilereplace/edit_add.png b/doc/kfilereplace/edit_add.png
new file mode 100644
index 00000000..c46aed2b
--- /dev/null
+++ b/doc/kfilereplace/edit_add.png
Binary files differ
diff --git a/doc/kfilereplace/edit_remove.png b/doc/kfilereplace/edit_remove.png
new file mode 100644
index 00000000..1a2f87c5
--- /dev/null
+++ b/doc/kfilereplace/edit_remove.png
Binary files differ
diff --git a/doc/kfilereplace/eraser.png b/doc/kfilereplace/eraser.png
new file mode 100644
index 00000000..33775463
--- /dev/null
+++ b/doc/kfilereplace/eraser.png
Binary files differ
diff --git a/doc/kfilereplace/filereplace.png b/doc/kfilereplace/filereplace.png
new file mode 100644
index 00000000..c3692e11
--- /dev/null
+++ b/doc/kfilereplace/filereplace.png
Binary files differ
diff --git a/doc/kfilereplace/filesearch.png b/doc/kfilereplace/filesearch.png
new file mode 100644
index 00000000..1be59c49
--- /dev/null
+++ b/doc/kfilereplace/filesearch.png
Binary files differ
diff --git a/doc/kfilereplace/filesimulate.png b/doc/kfilereplace/filesimulate.png
new file mode 100644
index 00000000..7cc5b284
--- /dev/null
+++ b/doc/kfilereplace/filesimulate.png
Binary files differ
diff --git a/doc/kfilereplace/index.docbook b/doc/kfilereplace/index.docbook
new file mode 100644
index 00000000..b790a5e0
--- /dev/null
+++ b/doc/kfilereplace/index.docbook
@@ -0,0 +1,613 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+ <!ENTITY kfilereplace "<application>KFileReplace</application>">
+ <!ENTITY kappname "&kfilereplace;">
+ <!ENTITY package "kdewebdev">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ <!ENTITY kdewebdev "<application>kdewebdev</application>">
+ <!ENTITY bc "<application>bc</application>">
+]>
+
+<book lang="&language;">
+
+<bookinfo>
+<title>The &kfilereplace; Handbook</title>
+
+<authorgroup>
+<author>
+<firstname>Emiliano</firstname>
+<surname>Gulmini</surname>
+<affiliation>
+<address><email>emi_barbarossa&#64;yahoo&#46;it</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+
+<copyright>
+<year>2004</year>
+<holder>Emiliano Gulmini</holder>
+</copyright>
+
+<legalnotice>&FDLNotice;</legalnotice>
+
+<date>2004-08-09</date>
+<releaseinfo>1&#46;0&#46;0</releaseinfo>
+
+<!-- Abstract about this handbook -->
+
+<abstract>
+<para>
+&kfilereplace; is an utility to search and replace strings.
+</para>
+</abstract>
+
+<keywordset>
+<keyword>KDE</keyword>
+<keyword>KFileReplace</keyword>
+<keyword>replace</keyword>
+<keyword>search</keyword>
+<keyword>string</keyword>
+</keywordset>
+
+</bookinfo>
+
+<chapter id="introduction">
+ <title>Introduction</title>
+ <para>&kfilereplace; is an application used to search and replace a list of strings in a file tree. The strings may be literal or Qt-like regular expressions. There are also other options to tune your search.
+ </para>
+</chapter>
+
+<chapter id="using-kfilereplace">
+<title>Using &kfilereplace;</title>
+
+<para>
+ <screenshot>
+ <screeninfo>&kfilereplace; in its standalone incarnation</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="kfr_standalone_main_window_1.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>&kfilereplace; in its standalone incarnation</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+</para>
+
+
+<sect1 id="kfilereplace-the-toolbar">
+<title>The Toolbar</title>
+
+<para>The &kfilereplace; toolbar should looks like this:
+ <screenshot>
+ <screeninfo>&kfilereplace;'s toolbar</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="toolbar.png" format="PNG"/>
+ </imageobject>
+ <imageobject>
+ <imagedata fileref="toolbar.eps" format="EPS"/>
+ </imageobject>
+ <textobject>
+ <phrase>&kfilereplace;'s toolbar</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+</para>
+
+<para>The toolbar shows you the buttons of the main functionalities.
+ <variablelist>
+ <title>Toolbar Icons</title>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="project.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>New session</guiicon></term>
+ <listitem>
+ <para>This button shows a <link linkend="kfilereplace-the-project-dialog">session dialog</link> in which you can set several basic options; if &kfilereplace; run as standalone application you should click this button as first step.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="filesearch.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Search only</guiicon></term>
+ <listitem>
+ <para>This button starts a search loop.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="filereplace.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Replace</guiicon></term>
+ <listitem>
+ <para>This button starts a search&amp;replace loop. When a string has been found, &kfilereplace; replaces it with another string.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="filesimulate.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Simulated Replace</guiicon></term>
+ <listitem>
+ <para>This button starts a simulated search&amp;replace loop. Nothing really happens when you click this button.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="stop.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Stop</guiicon></term>
+ <listitem>
+ <para>This button stops an operation.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="edit_add.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Add Strings</guiicon></term>
+ <listitem>
+ <para>This button opens the <link linkend="kfilereplace-the-add-dialog">Add Strings</link> dialog in which you can edit your string list.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="edit_remove.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Delete Strings</guiicon></term>
+ <listitem>
+ <para>This button deletes the selected (or the current if there is no selection) string from the list.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="edit.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Edit Strings</guiicon></term>
+ <listitem>
+ <para>This button edits a selected string.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="eraser.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Delete List</guiicon></term>
+ <listitem>
+ <para>This button deletes all the strings in the list.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="invert.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Invert Strings</guiicon></term>
+ <listitem>
+ <para>This button swaps the search string with the replace string, so you can revert a search/replace operation.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="unsortedList.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Load String List</guiicon></term>
+ <listitem>
+ <para>This button loads a <link linkend="kfilereplace-the-kfr-file">string list</link> saved in a xml file with a <literal role="extension">kfr</literal> extension.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="recursive_option.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Search in Subfolders</guiicon></term>
+ <listitem>
+ <para>This button allows you to search/replace recursively in the subfolders of your base directory.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="backup_option.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Make Backup Files</guiicon></term>
+ <listitem>
+ <para>This button enables generation of <link linkend="kfilereplace-backup-file">backup</link> files.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="casesensitive_option.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Case-sensitive Search</guiicon></term>
+ <listitem>
+ <para>This button enables case-sensitive searching.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="command_option.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Commands</guiicon></term>
+ <listitem>
+ <para>This button enables commands capability. Commands are special strings. See <xref linkend="kfilereplace-commands"/>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="regularexpression_option.png" format="PNG"/>
+ </imageobject>
+ </inlinemediaobject><guiicon>Regular expressions</guiicon></term>
+ <listitem>
+ <para>This button enables <link linkend="kfilereplace-QT-regexp">Qt-like regular expressions</link>.</para>
+ </listitem>
+ </varlistentry>
+
+</variablelist>
+</para>
+
+</sect1>
+
+<sect1 id="kfilereplace-the-results-view">
+ <title>The Results List</title>
+ <screenshot>
+ <screeninfo>&kfilereplace;'s Results view</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="results_view.png" format="PNG"/>
+ </imageobject>
+ <imageobject>
+ <imagedata fileref="results_view.eps" format="EPS"/>
+ </imageobject>
+ <textobject>
+ <phrase>&kfilereplace;'s Results view</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ <para>The <guilabel>Results</guilabel> view shows the name of the files that contain the strings you have to retrieve (and replace), their path, their size, the number of strings found and the user id of the files. This view also provides the exact position of each match. You can also open a file by clicking with the &RMB; on an list entry that contains line and column position.</para>
+
+</sect1>
+
+<sect1 id="kfilereplace-the-strings-view">
+ <title>The String List</title>
+
+ <para>This is the <guilabel>Strings</guilabel> view:
+ <screenshot>
+ <screeninfo>&kfilereplace;'s Strings view</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="strings_view.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>&kfilereplace;'s Strings view</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+
+ <para>The <guilabel>Strings</guilabel> view visualizes the list of strings you want search/replace. Please note that in search mode the <guilabel>Results</guilabel> view and the <guilabel>Strings</guilabel> view have a different layout.</para>
+
+</sect1>
+
+<sect1 id="kfilereplace-the-project-dialog">
+ <title>The <guilabel>New Session</guilabel> Dialog</title>
+ <para>The <guilabel>New Session</guilabel> dialog is used to setup the basic parameters needed by &kfilereplace; to work. It consists of two tabs, <guilabel>General</guilabel> and <guilabel>Advanced</guilabel>.
+ </para>
+
+ <sect2 id="kfilereplace-the-project-dialog-general-page">
+ <title>The <guilabel>General</guilabel> Tab</title>
+ <screenshot>
+ <screeninfo>&kfilereplace; General tab</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="projectdialog_main_window_1.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>&kfilereplace; General tab</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ <para>When you want to begin a new session the first step is to click on the <link linkend="kfilereplace-the-toolbar"><guiicon>New Session</guiicon> button</link>. Then you must enter the base path and a sequence of shell-like wildcards to use as filter.</para>
+ <para>Then you could set some useful options, like searching in all the subfolders, doing a case-sensitive search, enabling commands and/or regular expressions<footnote id="performancewarning"><para>Please note that regular expressions and commands could slow down the speed performances.</para></footnote>, doing a backup copy of each file before replacing.</para>
+ <para>If you want to start searching, you can put a string in the search box and press <guibutton>Search Now</guibutton>, otherwise leave the search box empty and press <guibutton>Search Later</guibutton>.</para>
+ </sect2>
+
+ <sect2 id="kfilereplace-the-project-dialog-advanced-page">
+ <title>The <guilabel>Advanced</guilabel> Tab</title>
+ <screenshot>
+ <screeninfo>&kfilereplace; Advanced tab</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="projectdialog_main_window_2.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>&kfilereplace; Advanced tab</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ <para>The <guilabel>Advanced</guilabel> tab allows you to set up some useful options to restrict the search to a subset of your target file tree. If you want to run &kfilereplace; only over files that have a size in the range of 10KB - 100KB, then you could use the size options. There is also a date option that restricts the search in a temporal range, and a last option that allows you to only search for files owned (or not owned) by a particular user (this may be more useful to the system administrators).</para>
+ </sect2>
+</sect1>
+
+<sect1 id="kfilereplace-the-options-dialog">
+ <title>The <guilabel>Options</guilabel> Dialog</title>
+ <para>This dialog contains options that are in the toolbar and extra options that may come in handy in some situations. You can invoke it selecting <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure KFileReplace...</guimenuitem></menuchoice> in the main menu.
+ </para>
+ <sect2 id="kfilereplace-the-options-dialog-general-page">
+ <title>General options</title>
+ <para>These options have been presented in the <link linkend="kfilereplace-the-toolbar">Toolbar</link> section.
+ <screenshot>
+ <screeninfo>The General tab of the Options window</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="optionsdialog_main_window_1.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>The General tab of the Options window</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ </sect2>
+ <sect2 id="kfilereplace-the-options-dialog-advanced-page">
+ <title>Advanced options</title>
+ <para>
+ <screenshot>
+ <screeninfo>The Advanced tab of the Options window</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="optionsdialog_main_window_2.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>The Advanced tab of the Options window</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ <segmentedlist>
+ <segtitle>Do not show files if no strings are found or replaced</segtitle>
+ <segtitle>When searching, stop on first string found</segtitle>
+ <segtitle>Follow symbolic links</segtitle>
+ <segtitle>Ignore hidden files and directories</segtitle>
+ <seglistitem>
+ <seg>shows only the files that match some of your strings. This will speed up the search.</seg>
+ <seg>&kfilereplace; will stop when it finds a matching string, and will continue to search for other strings or, if you search for only one string, it will continue with the next file.</seg>
+ <seg>if a file is a link to another one, then search in the real file.</seg>
+ <seg>if hidden files or folders are encountered, ignore them.</seg>
+ </seglistitem>
+ </segmentedlist>
+ </para>
+ </sect2>
+</sect1>
+<sect1 id="kfilereplace-the-add-dialog">
+ <title>The <guilabel>Add Strings</guilabel> Dialog</title>
+ <screenshot>
+ <screeninfo>&kfilereplace;'s Add Strings dialog</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="addstringsdialog_window.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>&kfilereplace;'s Add Strings dialog</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ <para>This dialog is used to insert and edit a list of strings. You just have to insert either a search-only or a search-and-replace list, and then with the two mini-editors you will introduce your text. The arrow buttons allow you to add pairs of strings or delete them. When you finish, click <guibutton>OK</guibutton>.</para>
+</sect1>
+</chapter>
+
+<chapter id="kfilereplace-features">
+ <title>&kfilereplace; features</title>
+ <para>This chapter provides informations about some useful capabilities of &kfilereplace;.</para>
+ <sect1 id="kfilereplace-the-kfr-file">
+ <title>How to save your string list</title>
+ <para>When you want to reuse a list of strings you can save it in a <literal role="extension">xml</literal> file. To do this select from the menubar <menuchoice><guimenu>Search/Replace</guimenu><guisubmenu>Strings</guisubmenu><guimenuitem>Save Strings List to File</guimenuitem></menuchoice>. When you save a list, a simple <literal role="extension">xml</literal> file with extension <literal role="extension">kfr</literal> is created. To load a <literal role="extension">kfr</literal> file select from menubar <menuchoice><guimenu>Search/Replace</guimenu><guisubmenu>Strings</guisubmenu><guimenuitem>Load Strings List from File</guimenuitem></menuchoice>. The actual file looks like this:</para>
+ <screen>
+&lt;?xml version="1.0" ?>
+&lt;kfr>
+ &lt;mode search="false"/>
+ &lt;replacement>
+ &lt;oldstring>&lt;![CDATA[SEARCH_STRING_1]&#93; >&lt;/oldstring>
+ &lt;newstring>&lt;![CDATA[REPLACE_STRING_1]&#93;>&lt;/newstring>
+ &lt;/replacement>
+ &lt;replacement>
+ &lt;oldstring>&lt;![CDATA[SEARCH_STRING_2]&#93;>&lt;/oldstring>
+ &lt;newstring>&lt;![CDATA[REPLACE_STRING_2]&#93;>&lt;/newstring>
+ &lt;/replacement>
+
+
+ &lt;replacement>
+ &lt;oldstring>&lt;![CDATA[SEARCH_STRING_N]&#93;>&lt;/oldstring>
+ &lt;newstring>&lt;![CDATA[REPLACE_STRING_N]&#93;>&lt;/newstring>
+ &lt;/replacement>
+
+&lt;/kfr></screen>
+
+ <para>If you are using a previous format, you can update by hand your file by simply modifying it according to the above scheme. Alternatively, you can load the file written in the old format and save it again with &kfilereplace; in the way explained before.</para>
+</sect1>
+
+<sect1 id="kfilereplace-the-report-file">
+ <title>How to Create a Simple Report</title>
+ <para>You can create a report by choosing <menuchoice><guimenu>Search/Replace</guimenu><guisubmenu>Results</guisubmenu><guimenuitem>Create Report File</guimenuitem></menuchoice> from the main menu. A report is a folder containing an <literal role="extension">xml</literal> and a <literal role="extension">css</literal> file. Reports may be useful to maintain a simple log of your operations.
+ <screenshot>
+ <screeninfo>&kfilereplace;'s Report feature</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="report_example.png" format="PNG"/>
+ </imageobject>
+ <imageobject>
+ <imagedata fileref="report_example.eps" format="EPS"/>
+ </imageobject>
+ <textobject>
+ <phrase>&kfilereplace;'s Report feature</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+</sect1>
+
+<sect1 id="kfilereplace-QT-regexp">
+ <title>How to use Regular Expressions</title>
+ <para>
+ If you want search for every string that starts with <quote>x</quote>, <quote>ht</quote> or <quote>u</quote> and ends with <quote>ml</quote>, you can write a regular expression like this: <userinput>(x|ht|u)ml</userinput>. Insert this expression in the search editor, click <guibutton>OK</guibutton>, and enable regular expressions by toggling the <link linkend="kfilereplace-the-toolbar"><guibutton>Regular Expression</guibutton> button</link>. Please note that using regular expressions lets you to make very complicated searches, but the cost could be a performance degradation. Regular expression can be very tricky, and it is often the case that <quote>if you want to solve a problem with a regular expression, you have two problems</quote>.</para>
+</sect1>
+
+<sect1 id="kfilereplace-backup-file">
+ <title>How to Protect Original Files</title>
+ <para>If you do not want to lose your original files, you can make a copy of them before replacing the strings. After inserting your strings, and before starting the replacement process, you have just to toggle the <link linkend="kfilereplace-the-toolbar"><guiicon>Backup</guiicon> button</link>. If you want to customize the extension of the backup files open the <link linkend="kfilereplace-the-options-dialog"><guilabel>Options</guilabel> dialog</link>.
+ </para>
+</sect1>
+
+<sect1 id="kfilereplace-open-file">
+ <title>How to Open a File</title>
+ <para>If you want to open a file that matches some of your strings, you have to select a line in the result view and click on it with the &RMB;. A context menu will appear from which you can open the file. If you use &kfilereplace; embedded in &quantaplus;, you can open the file directly in it at the specified line and column.</para>
+</sect1>
+
+<sect1 id="kfilereplace-commands">
+ <title>Commands</title>
+ <para>Suppose you want replace the phrase <quote>Alice's adventures in Wonderland</quote> with the <ulink url="http://www.textlibrary.com/download/alice-wo.txt">entire file that contains Carroll's novel</ulink>. Probably you don't want to do this by hand, what you need is a command that will do it for you. Click the <link linkend="kfilereplace-the-toolbar"><guiicon>Add</guiicon></link> button, select <guilabel>Search and Replace Mode</guilabel> and insert the following strings: <userinput>Alice's adventure in Wonderland</userinput> in the search mini-editor and the string <userinput>[$loadfile:<replaceable>/the-path-to-my-folder/my-folder/my-file</replaceable>$]</userinput> in the replacement mini-editor. Click <guibutton>OK</guibutton>. When you come back to the &kfilereplace; main window, toggle the <link linkend="kfilereplace-the-toolbar">Command action</link> button that enables the commands, and start the replacement process. There are also other commands, see <xref linkend="available-commands"/> for a list of all of them.</para>
+</sect1>
+</chapter>
+
+<chapter id="credits">
+<title>Credits and License</title>
+
+<para>&kfilereplace;. Program copyright 1999 by François Dupoux <email>dupoux&#64;dupoux&#46;com</email>, 2003 Andras Mantia <email>amantia&#64;kde&#46;org</email>, 2004 Emiliano Gulmini <email>emi_barbarossa&#64;yahoo&#46;it</email>
+</para>
+
+<variablelist>
+ <title>The &kfilereplace; authors and maintainers:</title>
+ <varlistentry>
+ <term>François Dupoux <email>dupoux&#64;dupoux&#46;com</email></term>
+ <listitem><para>Original author</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Andras Mantia <email>amantia&#64;kde&#46;org</email></term>
+ <listitem><para>Shell autor, KPart creator, co-maintainer</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Emiliano Gulmini <email>emi_barbarossa&#64;yahoo&#46;it</email></term>
+ <listitem><para>Current maintainer, code cleaner &amp; rewriter</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+Documentation Copyright &copy; 2004 Emiliano Gulmini <email>emi_barbarossa&#64;yahoo&#46;it</email>
+</para>
+
+<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
+
+&underFDL; <!-- FDL: do not remove -->
+&underGPL; <!-- GPL License -->
+
+</chapter>
+
+<appendix id="installation">
+<title>Installation</title>
+
+<sect1 id="getting-kfilereplace">
+<title>How to install &kfilereplace;</title>
+<para>
+&kfilereplace; is currently part of &kdewebdev; package, so, in order to install it, you have to get a copy of &kdewebdev;. Note that if you are using a &kde; installation provided by your OS vendor, probably you already have &kdewebdev; installed; in this case, you can use &kfilereplace; either by opening &quantaplus; Web editor, or by calling it directly (unless you have an old &kde; version). Else you can download the &kdewebdev; package from the Internet: please refer to <ulink url="http://kdewebdev.org">&kdewebdev; home site</ulink> for more information.
+<!--&install.intro.documentation;-->
+</para>
+
+</sect1>
+
+<sect1 id="requirements">
+ <title>Requirements</title>
+ <para>In order to use the command <link linkend="available-commands">[$mathexp:<replaceable>some_math_expression</replaceable>$]</link> you should install the &bc; mathematical utility (version 1.06 or newer) written by Philip A. Nelson (<email>philnelson@acm.org</email>).</para>
+</sect1>
+
+</appendix>
+
+<appendix id="available-commands">
+ <title>&kfilereplace; commands</title>
+ <para>
+ <segmentedlist>
+ <segtitle>[$datetime:iso$]</segtitle>
+ <segtitle>[$datetime:local$]</segtitle>
+ <segtitle>[$user:uid$]</segtitle>
+ <segtitle>[$user:gid$]</segtitle>
+ <segtitle>[$user:loginname$]</segtitle>
+ <segtitle>[$user:fullname$]</segtitle>
+ <segtitle>[$user:homedir$]</segtitle>
+ <segtitle>[$user:shell$]</segtitle>
+ <segtitle>[$loadfile:<replaceable>/my-path/my-directory/my-file</replaceable>$]</segtitle>
+ <segtitle>[$empty:$]</segtitle>
+ <segtitle>[$random:<replaceable>AN_INTEGER_NUMBER</replaceable>$]</segtitle>
+ <segtitle>[$random:$]</segtitle>
+ <segtitle>[$mathexp:<replaceable>bc-expression</replaceable>$]</segtitle>
+ <seglistitem>
+ <seg>this command return the current date and time in Qt ISO format.</seg>
+ <seg>like above but in local format.</seg>
+ <seg>return the UID of the current user.</seg>
+ <seg>return the GID of the current user.</seg>
+ <seg>return the login name of the current user.</seg>
+ <seg>return the full name of the current user.</seg>
+ <seg>return the home directory of the current user.</seg>
+ <seg>return the shell of the current user.</seg>
+ <seg>return the content of the <emphasis>my-file</emphasis> file.</seg>
+ <seg>return the empty string.</seg>
+ <seg>return a random number string using <emphasis>AN_INTEGER_NUMBER</emphasis> as the initial seed.</seg>
+ <seg>like above, but without initial seed.</seg>
+ <seg>return the result of a &bc; v1.06 mathematical expression.</seg>
+ </seglistitem>
+ </segmentedlist>
+ </para>
+</appendix>
+
+&documentation.index;
+</book>
+
diff --git a/doc/kfilereplace/invert.png b/doc/kfilereplace/invert.png
new file mode 100644
index 00000000..f3ab8be6
--- /dev/null
+++ b/doc/kfilereplace/invert.png
Binary files differ
diff --git a/doc/kfilereplace/kfr_standalone_main_window_1.png b/doc/kfilereplace/kfr_standalone_main_window_1.png
new file mode 100644
index 00000000..3e4f85db
--- /dev/null
+++ b/doc/kfilereplace/kfr_standalone_main_window_1.png
Binary files differ
diff --git a/doc/kfilereplace/optionsdialog_main_window_1.png b/doc/kfilereplace/optionsdialog_main_window_1.png
new file mode 100644
index 00000000..959c3977
--- /dev/null
+++ b/doc/kfilereplace/optionsdialog_main_window_1.png
Binary files differ
diff --git a/doc/kfilereplace/optionsdialog_main_window_2.png b/doc/kfilereplace/optionsdialog_main_window_2.png
new file mode 100644
index 00000000..3213b6ff
--- /dev/null
+++ b/doc/kfilereplace/optionsdialog_main_window_2.png
Binary files differ
diff --git a/doc/kfilereplace/project.png b/doc/kfilereplace/project.png
new file mode 100644
index 00000000..607e6aa8
--- /dev/null
+++ b/doc/kfilereplace/project.png
Binary files differ
diff --git a/doc/kfilereplace/projectdialog_main_window_1.png b/doc/kfilereplace/projectdialog_main_window_1.png
new file mode 100644
index 00000000..58c622f0
--- /dev/null
+++ b/doc/kfilereplace/projectdialog_main_window_1.png
Binary files differ
diff --git a/doc/kfilereplace/projectdialog_main_window_2.png b/doc/kfilereplace/projectdialog_main_window_2.png
new file mode 100644
index 00000000..6fe2cb98
--- /dev/null
+++ b/doc/kfilereplace/projectdialog_main_window_2.png
Binary files differ
diff --git a/doc/kfilereplace/recursive_option.png b/doc/kfilereplace/recursive_option.png
new file mode 100644
index 00000000..bc98df90
--- /dev/null
+++ b/doc/kfilereplace/recursive_option.png
Binary files differ
diff --git a/doc/kfilereplace/regularexpression_option.png b/doc/kfilereplace/regularexpression_option.png
new file mode 100644
index 00000000..f74c7b56
--- /dev/null
+++ b/doc/kfilereplace/regularexpression_option.png
Binary files differ
diff --git a/doc/kfilereplace/report_example.png b/doc/kfilereplace/report_example.png
new file mode 100644
index 00000000..359de5ab
--- /dev/null
+++ b/doc/kfilereplace/report_example.png
Binary files differ
diff --git a/doc/kfilereplace/results_view.png b/doc/kfilereplace/results_view.png
new file mode 100644
index 00000000..8f91469d
--- /dev/null
+++ b/doc/kfilereplace/results_view.png
Binary files differ
diff --git a/doc/kfilereplace/stop.png b/doc/kfilereplace/stop.png
new file mode 100644
index 00000000..73b27d9f
--- /dev/null
+++ b/doc/kfilereplace/stop.png
Binary files differ
diff --git a/doc/kfilereplace/strings_view.png b/doc/kfilereplace/strings_view.png
new file mode 100644
index 00000000..7396e53c
--- /dev/null
+++ b/doc/kfilereplace/strings_view.png
Binary files differ
diff --git a/doc/kfilereplace/toolbar.png b/doc/kfilereplace/toolbar.png
new file mode 100644
index 00000000..84e699eb
--- /dev/null
+++ b/doc/kfilereplace/toolbar.png
Binary files differ
diff --git a/doc/kfilereplace/unsortedList.png b/doc/kfilereplace/unsortedList.png
new file mode 100644
index 00000000..bed281f1
--- /dev/null
+++ b/doc/kfilereplace/unsortedList.png
Binary files differ
diff --git a/doc/klinkstatus/Makefile.am b/doc/klinkstatus/Makefile.am
new file mode 100644
index 00000000..e97402c7
--- /dev/null
+++ b/doc/klinkstatus/Makefile.am
@@ -0,0 +1,2 @@
+KDE_DOCS = AUTO
+KDE_LANG = en
diff --git a/doc/klinkstatus/index.docbook b/doc/klinkstatus/index.docbook
new file mode 100644
index 00000000..33dbbd7d
--- /dev/null
+++ b/doc/klinkstatus/index.docbook
@@ -0,0 +1,498 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+ <!ENTITY klinkstatus "<application>KLinkStatus</application>">
+ <!ENTITY kappname "&klinkstatus;">
+ <!ENTITY package "kdewebdev">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE"><!-- change language only here -->
+]>
+<!-- kdoctemplate v0.8 October 1 1999
+ 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 -->
+
+
+<!--
+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. -->
+
+<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 &klinkstatus; Handbook</title>
+
+<authorgroup>
+<author>
+<firstname>Paulo</firstname>
+<surname>Moura Guedes</surname>
+<affiliation>
+<address><email>moura&#64;kdewebdev&#46;org</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+
+<copyright>
+<year>2004</year>
+<holder>Paulo Moura Guedes</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>2004-04-29</date>
+<releaseinfo>0&#46;1&#46;3</releaseinfo>
+
+<!-- Abstract about this handbook -->
+
+<abstract>
+<para>
+&klinkstatus; is a link checker for &kde;.
+</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>KLinkStatus</keyword>
+<keyword>link checker</keyword>
+<keyword>validation</keyword>
+</keywordset>
+
+</bookinfo>
+
+
+<chapter id="introduction">
+<title>Introduction</title>
+
+<para>&klinkstatus; is a link checker for &kde;.
+It allows you to search internal and external links in your entire web site,
+just a single page and choose the depth to search.
+You can also check local files, ftp, fish, &etc;, as &klinkstatus; uses KIO.
+For performance, links can be checked simultaneously.
+
+Please report any problems or feature requests to http://linkstatus.paradigma.co.pt/bugs/.
+</para>
+</chapter>
+
+<chapter id="using-klinkstatus">
+<title>Using &klinkstatus;</title>
+
+<para>
+
+<!-- Note that all graphics should be in .png format. Use no gifs because of
+patent issues. -->
+
+<screenshot>
+<screeninfo>Here's a screenshot of &klinkstatus;</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>
+
+</chapter>
+
+<chapter id="commands">
+<title>Command Reference</title>
+
+<sect1 id="klinkstatus-mainwindow">
+<title>The main &klinkstatus; 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 Link Check</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Creates a new session, if none is empty</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Open URL</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Opens a &URL;</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Close Tab</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Close the current tab.</action></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 -->
+<!-- &klinkstatus;, 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 &klinkstatus;</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>FILL_ME</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>FILL_ME
+</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 &klinkstatus;?</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 am I unable to 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>
+&klinkstatus;
+</para>
+<para>
+Program Copyright &copy; 2004 Paulo Moura Guedes <email>pmg&#64;netcabo&#46;pt</email>
+</para>
+<para>
+Documentation Copyright &copy; 2004 Paulo Moura Guedes <email>pmg&#64;netcabo&#46;pt</email>
+</para>
+
+<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
+
+&underFDL; <!-- FDL: do not remove -->
+&underGPL; <!-- GPL License -->
+
+</chapter>
+
+<appendix id="installation">
+<title>Installation</title>
+
+<sect1 id="getting-klinkstatus">
+<title>How to obtain &klinkstatus;</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;-->
+<para>http://kde-apps.org
+</para>
+
+</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 &klinkstatus;, you need &kde; 1.1. Foobar.lib is
+required in order to support the advanced &klinkstatus; features. &klinkstatus; 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 &klinkstatus; itself can be found
+on <ulink url="ftp://ftp.klinkstatus.org">The &klinkstatus; 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/klinkstatus">http://apps.kde.org/klinkstatus</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 &klinkstatus; won't work !</para>
+
+</sect1>
+-->
+</appendix>
+
+&documentation.index;
+</book>
+
+<!--
+Local Variables:
+mode: sgml
+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/doc/klinkstatus/screenshot.png b/doc/klinkstatus/screenshot.png
new file mode 100644
index 00000000..9c3c7bf0
--- /dev/null
+++ b/doc/klinkstatus/screenshot.png
Binary files differ
diff --git a/doc/kommander/Makefile.am b/doc/kommander/Makefile.am
new file mode 100644
index 00000000..41691557
--- /dev/null
+++ b/doc/kommander/Makefile.am
@@ -0,0 +1,3 @@
+KDE_LANG = en
+KDE_DOCS = AUTO
+
diff --git a/doc/kommander/basics.docbook b/doc/kommander/basics.docbook
new file mode 100644
index 00000000..5d7dc2cf
--- /dev/null
+++ b/doc/kommander/basics.docbook
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="kmdr-basics">
+<chapterinfo>
+<title>&kommander; Basics</title>
+<authorgroup>
+<author>
+<firstname>Tamara</firstname>
+<surname>King</surname>
+<affiliation><address>
+<email>tik@acm.org</email>
+</address></affiliation>
+</author>
+<author>
+<firstname>Eric</firstname>
+<surname>Laffoon</surname>
+<affiliation><address>
+<email>sequitur@kde.org</email>
+</address></affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>&kommander; Basics</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. -->
+
+<sect1 id="concepts">
+<title>Concepts</title>
+
+
+<para>
+&kommander; was originally designed around a simple concept that has proven somewhat revolutionairy among visual design tools. Typically these tools allow you to create dialogs and possibly mainwindow interfaces. Of course a mainwindow interface is the main program window which typically has menus, toolbars, statusbar and the application area. Dialogs are child windows which typically don't have menus and are so named because their purpose is to <quote>have a dialog</quote> or exchange information between you and the main application. The elements on a dialog are called <quote>widgets</quote> and you hook your program into these widgets. &kommander; is different because it is inherently nonprogrammatic here. It uses the concept of associating text with the widgets on the dialog. Initially this was called <quote>Associated Text</quote> but now it is called <quote>&kommander; Text</quote>. Widgets on &kommander; dialogs can include the content of other widgets by reference and a widget can reference its own content by use of a <quote>Special</quote> that looks like this, @widgetText. Specials are commands with special meaning in &kommander;. So if you created a dialog with two LineEdit widgets and named the first <quote>FirstName</quote> and the second <quote>LastName</quote> you could create a button and set its &kommander; Text to <quote>My name is @FirstName @LastName</quote>. You would need to set @widgetText in the first and last name widgets. Remember? We need to tell &kommander; to reference the text in them. You could run this from a <application>Konsole</application> and it would output the string for you. So it would reference the first name like so: @FirstName -> get the widget named FirstName(@FirstName) -> @widgetText -> get the contents of the LineEdit widget. So in this case @FirstName returns <quote>Eric</quote>: @FirstName -> @widgetText -> <quote>Eric</quote>.
+</para>
+
+<para>
+That is the simple core of &kommander;. What you can do with this is where it gets interesting. First of all it is worth noting that compared to the normal approach of a language based tool &kommander; does not need programming statements to define these operations. This makes &kommander; quick for developers. For end users it's much simpler than learning language constructs. For everyone it means you can focus on your task instead of having your reference material eternally at hand. Initially when people are exposed to a tool like &kommander; the first question is <quote>Where could I find a use for this cool tool?</quote> As it turns out, manipulating strings is used just about anywhere you look.
+</para>
+
+<para>
+So what can &kommander; do? Here is the list distilled to the base operations.
+&kommander; can:
+</para>
+
+<orderedlist>
+<listitem><para>Pass strings to the calling program via stdout.</para></listitem>
+<listitem><para>Call executable programs.</para></listitem>
+<listitem><para>Use &DCOP; to interact with &kde; programs</para></listitem>
+</orderedlist>
+
+<para>
+If you're not a programmer you may want that in laymans terms. In number one, if you launch &kommander; from a console then the console is the calling program. There is a parent child relationship there. Sending a message to console is done with the standard output (stdout) of the child program, so named because there is also error output. This is interesting because some programs, like &quantaplus;, use stdout to receive information from programs they launch. So &kommander; dialogs can output their text strings directly into &quantaplus;'s editor if they are called from &quantaplus;. This means &kommander; dialogs can be useful extentions to programs.
+</para>
+
+<para>
+The second case is calling an executable. Any program that runs on your system is an executable. Even a script program is run by the script's interpreter so technically it's executed too. &kommander; can run commands just like the console even if you run it from the menu. So for instance if you wanted it to open &GIMP; you would have a button derive the string <quote>gimp</quote> and put it in a special like so: @exec(gimp). Just like that you will see &GIMP; open when using this. You could also exec <quote>ls -l</quote> too but you would only see the output if you were running from a console.
+</para>
+
+<para>
+The third case is very interesting indeed. &DCOP; is short for &kde;'s <emphasis>D</emphasis>esktop <emphasis>CO</emphasis>mmunication <emphasis>P</emphasis>rotocol and it is very powerful. Go ahead and run the <application>kdcop</application> program and have a look around. You'll quickly see that any &kde; application that is built to standards has things happening in &DCOP; and the well designed ones have a lot going on. With &DCOP; you can query information of all sorts as well as set widget values and more. There is a section on using &DCOP; in this manual. &kommander; can send &DCOP; to any &kde; program as well as be controlled by &DCOP;. In fact you can send &DCOP; from the command line to any &kde; program. So what's the big deal? The deal is, if you want to do any volume of commands you begin to realized that command line &DCOP; is adequate for short commands, but it can cause delays for instance being called from a loop several hundred times. This is why &kommander; has a @dcop special, because this is roughly 1000 times faster. Because &kommander; can send and receive &DCOP;, &DCOP; can be used to script &kommander;. That is why we also have a local &DCOP; special, @ldcop, that allows you to type a lot less to issue a command.
+</para>
+
+<para>
+Is that all the core concepts in &kommander;? No, but it should help you to make sense of how it works so that what is covered does not look like a foreign language to you. There are a few more. Signals and slots are how &kommander; handles events. An event in a program basically means <quote>something happened</quote> like a widget was created or had its text changed. These changes <quote>emit signals</quote> and you can connect those signals to a receiving slot which will then do something when the event happens. One use of this in &kommander; is the sibling of &kommander; Text, <quote>Population Text</quote>. Population Text will populate a widget when called. Just like &kommander; Text, Population Text can contain text strings or scripts.
+</para>
+
+<para>
+That should give you the base concepts to begin using &kommander;. We try to keep the number of Specials low and we use &DCOP; a lot. The idea is that we want to keep the power of &kommander; as consistent and streamlined as possible. You will find that you can incorporate any scripting language into &kommander; where ever you need to and even multiple scripting languages in a dialog. The rest of the information in this document assumes you are familiar with the concepts and terms presented here. The examples and tutorials are also very useful to understanding what can be done with &kommander;.
+</para>
+</sect1>
+
+&editor;
+
+<sect1 id="executor">
+<title>The Executor</title>
+
+<para>
+The executor, called <application>kmdr-executor</application>, runs &kommander; scripts. It loads <literal role="extension">.kmdr</literal> files and dynamically produces a fully functional dialog.
+<warning><para>Starting with version 1.3, the executor warns if the script file is not executable. This is an extra security feature that tries to make the user think about the possible bad consequences of running a script from untrusted source. The user can confirm to run the dialog or if he trusts the source, can make the script executable and get rid of the warning completely.</para></warning>
+<note><para>Version 1.3 supports the <emphasis>#!/path/kmdr-executor</emphasis> shebang in the beginning of the .kmdr script files (replace path with path to the
+Such files if they are made executable can be run from command line just like any executable application, without the need to pass the script to kmdr-executor as argument.</para>
+<para>
+Remember, that once you add the shebang at the beginning of the file, the dialog cannot be run or edited with older versions of &kommander;.</para>
+<para>The recommended usage is
+<screen>
+#!/usr/bin/kommander
+</screen>
+and create a symlink from kmdr-executor to /usr/bin/kommander.</para>
+<para>The shebang can be added to a dialog directly from the editor, by modifying the <guilabel>useShebang</guilabel> and <guilabel>shebang</guilabel> properties for the main dialog.</para>
+
+</note>
+</para>
+
+<sect2 id="executor-for-programmers">
+<title>Executor for Programmers</title>
+
+<para>
+C++ developers can easily use the Instance class in their C++ programs so that the execution functionality is embedded in the their application obsoleting the need for running the external executor program. For standard dialog the dialog creation overhead is minimal but the creation of the &kde; application may delay the dialog for around a second.
+</para>
+<para>Another approach is to use the <emphasis>kommander_part</emphasis> KReadOnlyPart. This KPart can load and execute any &kommander; dialog inside another KDE application.</para>
+</sect2>
+
+</sect1>
+
+<sect1 id="create-dialog">
+<title>Creating a Dialog</title>
+<para>
+To learn about how to create a dialog, add widgets, use layouts, modify widgets properties, please consult the &Qt; Designer (version 3.x) manual. You can access it by running <command>designer</command> from the command line or from your desktop menu.
+</para>
+<para>
+The extra functionality that &kommander; offers is the <guilabel>Kommander Text</guilabel> associated with each widget. These texts are the executable (script) part of the dialog, written either in a script language (with the old &kommander; syntax) or using the internal &kommander; language, the so called new parser.
+</para>
+<para>To learn more about the language syntax, commands and how to use the text editor, consult the upcoming chapters and check the examples shipped with the &kommander; source.</para>
+</sect1>
+
+<sect1 id="exec-bit">
+<title>Executable bit - new in 1.3</title>
+<para>
+For security reasons we introduced the executable bit requirement in version 1.3. Some will applaud this as long overdue. Others will consider it a terrible annoyance or even too scarey to use. Unfortunately there is no perfect solution. The problem is that you can download a Kommander dialog from anywhere or get one in your email and click on it and run it by accident. Because Kommander can run shell scripts it is sort of in an odd place. While other applications don't nag you this way you actually had to install them so clearly you felt safe and intended to run them. A single line of shell scripting could permanently wipe out your home directory. Our intent is to eliminate an accidental click on an untrusted dialog. We aplogize for any inconvenience, but there is no way to do this to even the developer's satisfaction that it will not annoy you while keeping you safe.
+</para>
+<para>
+You are not prevented from running a dialog, just nagged. You can make it go away by using a file manager or the shell to set the executable bit. Right click on the dialog in Konqueror, select properties from the menu, choose the permissions tab and check the <quote>is executable</quote> checkbox. Now the nag will be gone from this dialog forever. Check our web site for a tool that searchesfor &kommander; dialogs and allows you to review them and choose whether any or all of them should have the bit set. To use the shell and make all the &kommander; dialogs in a directory executable use this command.
+</para>
+<screen>
+chmod u+x *.kmdr
+</screen>
+<warning><para>Do not set dialogs as executable if you are not confident of their origin.</para></warning>
+</sect1>
+
+</chapter>
diff --git a/doc/kommander/buttongroup.png b/doc/kommander/buttongroup.png
new file mode 100644
index 00000000..d89e28fd
--- /dev/null
+++ b/doc/kommander/buttongroup.png
Binary files differ
diff --git a/doc/kommander/checkbox.png b/doc/kommander/checkbox.png
new file mode 100644
index 00000000..ab6f53e0
--- /dev/null
+++ b/doc/kommander/checkbox.png
Binary files differ
diff --git a/doc/kommander/closebutton.png b/doc/kommander/closebutton.png
new file mode 100644
index 00000000..63903b30
--- /dev/null
+++ b/doc/kommander/closebutton.png
Binary files differ
diff --git a/doc/kommander/combobox.png b/doc/kommander/combobox.png
new file mode 100644
index 00000000..7d4890a7
--- /dev/null
+++ b/doc/kommander/combobox.png
Binary files differ
diff --git a/doc/kommander/commands.docbook b/doc/kommander/commands.docbook
new file mode 100644
index 00000000..87a6dc54
--- /dev/null
+++ b/doc/kommander/commands.docbook
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="commands">
+<chapterinfo>
+<title>Command Reference</title>
+</chapterinfo>
+
+<title>Reference</title>
+
+&widgets;
+&specials;
+&dcop-functions;
+
+</chapter>
diff --git a/doc/kommander/contents.png b/doc/kommander/contents.png
new file mode 100644
index 00000000..7596e67a
--- /dev/null
+++ b/doc/kommander/contents.png
Binary files differ
diff --git a/doc/kommander/credits.docbook b/doc/kommander/credits.docbook
new file mode 100644
index 00000000..95c38541
--- /dev/null
+++ b/doc/kommander/credits.docbook
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="credits">
+<chapterinfo>
+<title>Credits and License</title>
+<authorgroup>
+<author>
+<firstname>Tamara</firstname>
+<surname>King</surname>
+<affiliation><address>
+<email>tik@acm.org</email>
+</address></affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>Credits and License</title>
+
+<variablelist>
+<title>The &kommander; Development Team</title>
+<varlistentry>
+<term>Britton, Marc <email>consume@optusnet.com.au</email></term>
+<listitem><para>Developer and documentation</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>King, Tamara <email>tik@acm.org</email></term>
+<listitem><para>Documentation</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Laffoon, Eric <email>sequitur@kde.org</email></term>
+<listitem><para>Project manager and documentation</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Mantia, Andr&aacute;s <email>amantia@kde.org</email></term>
+<listitem><para>Developer</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Rudolf, Michal <email>mrudolf@kdewebdev.org</email></term>
+<listitem><para>Developer</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>
+&kommander; <trademark class="copyright" /> 2004 - 2008 &kommander; Development Team.
+</para>
+
+<para>
+&kommander; User Manual <trademark class="copyright" /> 2004 - 2008 &kommander; Development Team.
+</para>
+
+<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
+
+&underFDL;
+&underGPL;
+
+</chapter>
diff --git a/doc/kommander/datepicker.png b/doc/kommander/datepicker.png
new file mode 100644
index 00000000..4bcc6450
--- /dev/null
+++ b/doc/kommander/datepicker.png
Binary files differ
diff --git a/doc/kommander/dcop.docbook b/doc/kommander/dcop.docbook
new file mode 100644
index 00000000..2fbf70a1
--- /dev/null
+++ b/doc/kommander/dcop.docbook
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<sect1 id="dcop-interface">
+<sect1info>
+<title>&DCOP; Functions</title>
+</sect1info>
+
+<title>&DCOP; Functions</title>
+
+<para>
+&kommander; began accessing it's widgets internally with &DCOP;, which evolved to widget functions. &DCOP; is still available and can be used to share information between dialogs. It can also be used to extend and integrate nearly every existing KDE application.
+&DCOP; can be called in several ways in &kommander;. First is the console method. Open a &kommander; dialog and open a console and try this.
+</para>
+<note><para>This is largely focused on the old parser. If you are looking for internal widget functions please see the <link linkend="new_parserdocs">new parser</link>. This information is particularly relevent to communicating between dialogs and applications, or running other scripting languages inside Kommander as scripts.</para></note>
+<screen>
+dcop | grep kmdr
+dcop `dcop | grep kmdr`
+dcop `dcop | grep kmdr` KommanderIf
+</screen>
+<para>
+This will show you what dialogs are running and what interfaces are available, as well as what is available to call in the &kommander; special interface to internals. In the explanation of &DCOP; here remember that &DCOP; is used internally by KDE applications (replaced with DBUS in KDE4) and it is very useful. Have a look at <command>kdcop</command> by pressing Alt-F2 and typing it in a run dialog. Here you can explore everything running. Now back to &DCOP; in &kommander;.
+</para>
+<screen>
+dcop kmdr-executor-@pid KommanderIf setText myWidget <quote>new text</quote>
+</screen>
+<para>
+This assumes you are inside a &kommander; file and have access to the special @pid which contains the process ID. In fact it is simpler to replace <quote>kmdr-executor-@pid</quote> with @dcopid. However, you can use this syntax (obviously without the specials) from the command line or any external script to alter the &kommander; window.
+</para>
+<para>
+&kommander; evolved the much faster internal &DCOP; function. Using it from another application window (console &DCOP; is very slow) is more complicated because you must give lots of information, including a prototype of the call. The above call would become: (Note that @dcopid is actually internal to the dialog, but you could replace it with a valid process ID)
+</para>
+<screen>
+@dcop(@dcopid, KommanderIf, <quote>enableWidget(QString, bool)</quote>, Widget, true)
+</screen>
+<para>
+In the early &kommander; nesting &DCOP; calls inside script language structures (like <application>bash</application>) used console method calls. <emphasis>If you use internal &DCOP; all &kommander; specials will be executed first and then the script will be executed.</emphasis> Please read that again as it will cause you no end of grief with a <application>bash</application> loop using &kommander; specials.
+</para>
+<para>
+There is a new simplified way to use &DCOP; inside &kommander; using an object syntax. Let's say you want to change the text in a widget name @LineEdit1. It would look like this.
+</para>
+<screen>
+@LineEdit1.setText(New text)
+</screen>
+<para>
+As you can see the new syntax is very easy, as well as consistent visually with function groups. All the &DCOP; reference here will use the new object syntax listed above. <emphasis>Please note that if you are referencing a widget using &DCOP; from another window or another application the first parameter will always be the widget name. All functions are listed here starting with the second parameter.</emphasis>
+</para>
+
+<sect2 id="dcop-globals">
+<title>&DCOP; for Global Variables</title>
+<variablelist>
+<varlistentry>
+<term>global(QString variableName)</term>
+<listitem>
+<para>
+Returns the value of the specified global variable. When a script is run from within a &kommander; window any (non-global) variables set in that script will cease to exist after the script completes and therfore will not be available to other script processes or in a new instance of the calling process. The global <quote>scope</quote> means the variable will exist for any process of the window until that window is closed. You may change these variables at any time with a new call to <function>@setGlobal</function>.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>setGlobal(QString variableName, QString value)</term>
+<listitem>
+<para>
+Creates a variable that is global to the window process and assigns the value to it. This value can be retrieved with global(QString variableName) or set again.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="dcop-all">
+<title>&DCOP; for all Widgets</title>
+
+<para>
+The following list is old and left here for reference purposes only. For a complete and current reference to all widget functions please look at the <emphasis>Function Browser</emphasis> which is available from any &kommander; text editor window by pressing the lower left button. These are now widget functions, not &DCOP; functions but the &DCOP; functions are published in the <emphasis>KommanderIf</emphasis> &DCOP; interface as described above. Dialogs for listing and constructing calls for this functionality are available at our web site.
+</para>
+<variablelist>
+<varlistentry>
+<term>setText(QString text)</term>
+<listitem>
+<para>
+This removes the text displayed in the widget and replaces it with the text supplied.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>enableWidget(bool enable)</term>
+<listitem>
+<para>
+Enables or disables a widget.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>associatedText</term>
+<listitem>
+<para>
+Returns the text associated with the specified widget. This is not the same as the displayed text. It would be <quote>@widgetText</quote> or the text and/or scripting used to arrive at the displayed value.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>setAssociatedText(QString text)</term>
+<listitem>
+<para>
+This sets the &kommander; Text default string. This is typically set to <quote>@widgetText</quote> to display what is entered into the widget. It is unlikely you will have much need for this, but if you do it is there. Applies to all widgets that can contain data.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="dcop-box">
+<title>&DCOP; for ListBox and ComboBox Widgets</title>
+<variablelist>
+<varlistentry>
+<term>addListItem(QString item, int index)</term>
+<listitem>
+<para>
+Adds an item to a ListBox widget at the specified index. List index starts at zero. To add to the end of the list use -1.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>addListItems(QStringList items, int index)</term>
+<listitem>
+<para>
+This adds a list of strings all at once. The list should be delimited by <acronym>EOL</acronym> (\n - newlines). This is handy as you can use bash to derive the list rather easily. For instance, using @exec(ls -l ~/projects | grep kmdr) for items will give you a directory listing of &kommander; files in your projects folder. List index starts at zero. Use -1 to add to the end of the list.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>addUniqueItem(QString item)</term>
+<listitem>
+<para>
+addUniqueItem will add an item to the end of the list only if it is unique.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>clearList</term>
+<listitem>
+<para>
+Removes all items.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>removeListItem(int index)</term>
+<listitem>
+<para>
+Removes the item at the specified index.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>item(int index)</term>
+<listitem>
+<para>
+Returns the text of the item at the specified index.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>setCurrentListItem(int index)</term>
+<listitem>
+<para>
+Set the current (or selected) item to the index specified. Applies to ListBox and ComboBox widgets.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="dcop-button">
+<title>&DCOP; for CheckBox and RadioButton Widgets</title>
+<variablelist>
+<varlistentry>
+<term>setChecked(QString widgetName, bool checked)</term>
+<listitem>
+<para>
+Checks/unchecks CheckBox or RadioButton widgets.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="dcop-tab">
+<title>&DCOP; for TabWidget Widgets</title>
+<variablelist>
+<varlistentry>
+<term>setCurrentTab(QString widgetName, int index)</term>
+<listitem>
+<para>
+Selected the tab by index for TabWidgets. Index starts at 0.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+
+</sect1>
diff --git a/doc/kommander/editor.docbook b/doc/kommander/editor.docbook
new file mode 100644
index 00000000..3b288e9c
--- /dev/null
+++ b/doc/kommander/editor.docbook
@@ -0,0 +1,642 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<sect1 id="editor">
+<sect1info>
+<title>The Editor</title>
+<authorgroup>
+<author>
+<firstname>Tamara</firstname>
+<surname>King</surname>
+<affiliation><address>
+<email>tik@acm.org</email>
+</address></affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</sect1info>
+
+<title>The Editor</title>
+
+<para>
+The editor is based on &designer;, a tool for designing and implementing user interfaces created by <ulink url="http://www.trolltech.com">Trolltech</ulink>. We have modified &designer; in the following ways:
+</para>
+<itemizedlist>
+<listitem><para>Its interface is much simpler</para></listitem>
+<listitem><para>Built in our own widgets</para></listitem>
+<listitem><para>Added the ability to setup &kommander; Text</para></listitem>
+<listitem><para>Various other superficial changes</para></listitem>
+</itemizedlist>
+<para>
+For those of you already familiar with using &designer;, using the &kmdr-editor; will be trivial.
+</para>
+
+<sect2 id="editor-gui">
+<title>Main Window</title>
+
+<mediaobject>
+<imageobject>
+<imagedata format="PNG" fileref="editor.png" />
+</imageobject>
+</mediaobject>
+
+<orderedlist>
+<listitem><para>Toolbars contain a number of buttons to provide quick access to number of functions.</para></listitem>
+<listitem><para>The File Overview displays all of the files. Use the search field to rapidly switch between files.</para></listitem>
+<listitem><para>The Object Explorer provides an overview of the relationships between the widgets in a form. It is useful for selecting widgets in a form with a complex layout.</para></listitem>
+<listitem><para>The Property Editor is where the behavior and appearance of a widget is changed.</para></listitem>
+<listitem><para>The Dialog Editor is where dialogs are created and edited.</para></listitem>
+</orderedlist>
+</sect2>
+
+<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 dialog</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Open</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Search the file system to open an existing dialog</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Open Recent</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Quick list of the last several files you've opened. This list will change each time you open a file that is not on it with the oldest being bumped off first.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Close</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Closes the active dialog</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 active dialog</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Save As</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Saves the active dialog with another name</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Save All</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Saves all open dialogs</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Exit</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Quits</action> &kommander;</para></listitem>
+</varlistentry>
+</variablelist>
+</para>
+
+</sect2>
+
+<sect2>
+<title>The Edit Menu</title>
+<para>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>Z</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Undo</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Undo the last action performed.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>Y</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Redo</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Redo the last action undone.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>X</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Cut</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Cut the current item and place it content on the clipboard.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>C</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Copy</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Copy the current item to the clipbard.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>V</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Paste</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Paste the contents of the clipboard at the current cursor position.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>Z</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Delete</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Delete the current item.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycap>Del</keycap>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Select All</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Select all of the items in the current dialog.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Alt;<keycap>R</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Check Accelerators</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Verifies that all the accelerators are used only once.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Edit</guimenu>
+<guimenuitem>Connectors</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Displays the view and edit connections dialog.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Edit</guimenu>
+<guimenuitem>Form Setting</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Displays the form setting dialog.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Edit</guimenu>
+<guimenuitem>Preferences</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Displays the preferences dialog.</action></para></listitem>
+</varlistentry>
+</variablelist>
+</para>
+</sect2>
+
+<sect2>
+<title>The Tools Menu</title>
+<para>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycap>F2</keycap>
+</shortcut>
+<guimenu>Tools</guimenu>
+<guimenuitem>Pointer</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycap>F3</keycap>
+</shortcut>
+<guimenu>Tools</guimenu>
+<guimenuitem>Connect Signal/Slots</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycap>F3</keycap>
+</shortcut>
+<guimenu>Tools</guimenu>
+<guimenuitem>Tab Order</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Tools</guimenu>
+<guisubmenu>&kommander;</guisubmenu>
+</menuchoice></term>
+<listitem>
+<para>Here there are listed all the &kommander; widgets. This widgets are guaranteed to be available on every system running the same (or higher) version of &kommander;.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Tools</guimenu>
+<guisubmenu>Custom</guisubmenu>
+</menuchoice></term>
+<listitem>
+<para>The widgets provided by the plugins will be listed under this menu entry. The dialogs using these widgets will run only if the plugin that provides them is installed and configured.</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+
+</para>
+
+</sect2>
+
+<sect2>
+<title>The Layout Menu</title>
+<para>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>J</keycap></keycombo>
+</shortcut>
+<guimenu>Layout</guimenu>
+<guimenuitem>Adjust Size</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>H</keycap></keycombo>
+</shortcut>
+<guimenu>Layout</guimenu>
+<guimenuitem>Lay Out Horizontally</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>L</keycap></keycombo>
+</shortcut>
+<guimenu>Layout</guimenu>
+<guimenuitem>Lay Out Vertically</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>G</keycap></keycombo>
+</shortcut>
+<guimenu>Layout</guimenu>
+<guimenuitem>Lay Out in a Grid</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Layout</guimenu>
+<guimenuitem>Lay Out Horizontally (in Splitter)</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Layout</guimenu>
+<guimenuitem>Lay Out Vertically (in Splitter)</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>B</keycap></keycombo>
+</shortcut>
+<guimenu>Layout</guimenu>
+<guimenuitem>Break Layout</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Layout</guimenu>
+<guimenuitem>Add Spacer</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+</variablelist>
+</para>
+</sect2>
+
+<sect2>
+<title>The Run Menu</title>
+<para>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo>
+</shortcut>
+<guimenu>Run</guimenu>
+<guimenuitem>Run Dialog</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Runs the current dialog.</action></para></listitem>
+</varlistentry>
+</variablelist>
+</para>
+</sect2>
+
+<sect2>
+<title>The Window Menu</title>
+<para>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>F4</keycap></keycombo>
+</shortcut>
+<guimenu>Window</guimenu>
+<guimenuitem>Close</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Closes current dialog.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Window</guimenu>
+<guimenuitem>Close All</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Closes all dialogs.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>F6</keycap></keycombo>
+</shortcut>
+<guimenu>Window</guimenu>
+<guimenuitem>Next</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>F6</keycap></keycombo>
+</shortcut>
+<guimenu>Window</guimenu>
+<guimenuitem>Previous</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Window</guimenu>
+<guimenuitem>Tile</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Window</guimenu>
+<guimenuitem>Cascade</guimenuitem>
+</menuchoice></term>
+<listitem><para><action></action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Views</guisubmenu>
+</menuchoice></term>
+<listitem>
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Views</guisubmenu>
+<guimenuitem>File Overview</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Views</guisubmenu>
+<guimenuitem>Object Explorer</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Views</guisubmenu>
+<guimenuitem>Property Editor/Signal Handlers</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Views</guisubmenu>
+<guimenuitem>Line Up</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+</menuchoice></term>
+<listitem>
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>File</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>Edit</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Layout</guisubmenu>
+<guimenuitem>File</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>Tools</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>&kommander;</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>Custom</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>Help</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Window</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>Line Up</guimenuitem>
+</menuchoice>
+</term>
+<listitem><para></para></listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</sect2>
+
+<sect2>
+<title>The Settings Menu</title>
+<para>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Shortcuts</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>See and modify the editor keyboard shortcuts.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Plugins</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Add or remove &kommander; plugins. The editor needs to be restarted after a new plugin is added.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Editor</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Configure the text editor used for modifying the Kommander text associated with widgets.</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure &kommander;</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Configure how the editor looks and works.</action></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 -->
+<!-- &kommander;, about KDE) then the documentation is already written. -->
+<!-- The following entity is valid anywhere that a variablelist is -->
+<!-- valid. -->
+
+&help.menu.documentation;
+
+</sect2>
+
+
+</sect1>
diff --git a/doc/kommander/editor.png b/doc/kommander/editor.png
new file mode 100644
index 00000000..6c0db299
--- /dev/null
+++ b/doc/kommander/editor.png
Binary files differ
diff --git a/doc/kommander/extending.docbook b/doc/kommander/extending.docbook
new file mode 100644
index 00000000..a5b38b05
--- /dev/null
+++ b/doc/kommander/extending.docbook
@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="extending">
+<chapterinfo>
+<authorgroup>
+<author>
+<firstname>Andras</firstname>
+<surname>Mantia</surname>
+<affiliation><address><email>amantia@kde.org</email></address></affiliation>
+</author>
+<author>
+<firstname>Michal</firstname>
+<surname>Rudolf</surname>
+<affiliation><address><email>mrudolf@kdewebdev.org</email></address></affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+<title>Extending &kommander;</title>
+
+<sect1 id="create-widgets">
+<title>Creating &kommander; Widgets</title>
+<para>
+With &kommander; you can create new widgets based on non-&kommander; widgets
+fairly easily.
+</para>
+<para>There are two ways of adding new widgets to &kommander;: by creating
+plugins or by adding it directly to the &kommander; source.
+</para>
+<sect2 id="create-class">
+<title>Create the widget class</title>
+<para>
+ The first step is to create the widget class. The approach is to derive your new &kommander; widget class from the
+&Qt;/&kde; widget which you wish to integrate with &kommander;, and then also from the
+KommanderWidget class. Overriding methods from this class gives the &kommander;
+widget its functionality.
+</para>
+<para>
+Most of the code of a &kommander; widget is just template code.
+Therefore, you can use the KDevelop &kommander; plugin template to generate
+most the &kommander; widget code for you. To do so run KDevelop (3.5 is recommended),
+select <guimenu>Project->New Project</guimenu>, tick the <guilabel>Show all project templates</guilabel> checkbox,
+select the <guilabel>C++/&kommander;/KommanderPlugin</guilabel> template. Give a name for your plugin and
+follow the instructions in the wizard.
+</para>
+<para>
+All you have to do is fill in the
+important parts relating to your widget like any state information, widget text
+etc.
+</para>
+<para>
+Let's say we want to create a new line edit widget for &kommander;,
+based on the KDE widget KLineEdit. Using the &kommander; widget generator
+dialog, we get something like this in the generated header file:
+</para>
+<screen>
+#include &lt;kommanderwidget.h&gt;
+
+class QShowEvent;
+class KomLineEdit : public KLineEdit, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ KomLineEdit(QWidget *a_parent, const char *a_name);
+ ~KomLineEdit();
+
+ virtual QString widgetText() const;
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&amp;);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&amp;);
+public slots:
+ virtual void setWidgetText(const QString &amp;);
+ virtual void populate();
+protected:
+ void showEvent( QShowEvent *e );
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString &amp;);
+};
+</screen>
+<para>Most of this is just template code that you don't need to worry about.
+The only two things you need to take notice of are that the kommanderwidget.h
+file is included at the top, and that the class is derived first from the
+widget we wish to integrate with &kommander;, and secondly from KommanderWidget.
+</para>
+<para>
+There are a few parts in the cpp file that are important to each particular widget.
+</para>
+<screen>
+KomLineEdit::KomLineEdit(QWidget *a_parent, const char *a_name)
+ : KLineEdit(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states &lt;&lt; "default";
+ setStates(states);
+ setDisplayStates(states);
+}
+</screen>
+<para>In the constructor, we set the states this widget may have.
+Our line edit doesn't have any kind of state, so we just
+give it one state <emphasis>default</emphasis>. If you were creating a widget
+that had different kinds of states, such as a check box, you might
+set three states <emphasis>unchecked</emphasis>, <emphasis>semichecked</emphasis> and <emphasis>checked</emphasis> here.
+</para>
+<screen>
+QString KomLineEdit::currentState() const
+{
+ return QString("default");
+}</screen>
+<para>We set the states in the constructor above, and this just
+returns the current state of the widget. For our widget
+it will always be <emphasis>default</emphasis>, but you should put code here
+that checks what state your widget is currently in and
+return the appropriate string here.
+</para>
+<screen>
+QString KomLineEdit::widgetText() const
+{
+ return KLineEdit::text();
+}
+
+void KomLineEdit::setWidgetText(const QString &amp;a_text)
+{
+ KLineEdit::setText(a_text);
+ emit widgetTextChanged(a_text);
+}
+</screen>
+<para>These are the two most important methods, where the bulk of the
+functional code goes.
+<emphasis>QString KomLineEdit::widgetText() const</emphasis> method returns the widget text of the
+widget (the text that the <emphasis>@widgetText</emphasis> special is expanded to in text
+associations). For our widget, the widget text is simply the text inside
+the line edit, so we just return that. Similarly when setting the widget text,
+we just set the text inside the line edit. We emit the <emphasis>widgetTextChanged()</emphasis>
+signal after setting the widget text so other widgets can recognize the fact
+that this widget was updated.
+</para>
+<para>
+In order to add functionality to the widget, you need to register some function and add code to handle them. Here is the code to be used to register, put it in the beginning of the cpp file, above the constructor:
+</para>
+<screen>
+#include &lt;klocale.h&gt; //for i18n
+
+#include "kommanderplugin.h"
+#include "specials.h"
+
+enum Functions {
+ FirstFunction = 1159,
+ Function1,
+ Function2,
+ LastFunction
+};
+KomLineEdit::KomLineEdit(QWidget *a_parent, const char *a_name)
+ : KLineEdit(a_parent, a_name), KommanderWidget(this)
+{
+ ... //code like described above
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(Function1, "function1(QString widget, QString arg1, int arg2)", i18n("Call function1 with two arguments, second is optional."), 2, 3);
+ KommanderPlugin::registerFunction(function2, "function2(QString widget)", i18n("Get a QString as a result of function2."), 1);
+}
+</screen>
+<para>This registers two functions: <emphasis>function1 and function2</emphasis>. The number assigned to the functions (here <emphasis>1160</emphasis> and <emphasis>1161</emphasis>) must be unique, not used in any other plugin or
+inside &kommander;. <emphasis>function1</emphasis> takes two arguments, one is optional, <emphasis>function2</emphasis> takes no argument and returns a string. The <emphasis>QString widget</emphasis> argument in the signatures notes that this functions work on a widget, like: <emphasis>KomLineEdit.function1("foo", 1)</emphasis>.
+</para>
+<para>To teach &kommander; that the widget supports these functions, add a method like this:
+</para>
+<screen>
+bool KomLineEdit::isFunctionSupported(int f)
+{
+ return (f > FirstFunction &amp;&amp; f &lt; LastFunction) || f == DCOP::text;
+}
+</screen>
+<para>This means that KomLineEdit supports the above functions and the standard <emphasis>text</emphasis>
+function.
+The function code should be handled inside the handleDCOP method:
+</para>
+<screen>
+QString KomLineEdit::handleDCOP(int function, const QStringList&amp; args)
+{
+ switch (function)
+ {
+ case function1:
+ handleFunction1(arg[0], arg[1].toInt()); //call your function1 handler
+ break;
+ case function2:
+ return handleFunction2(); //call function2
+ break;
+ case DCOP::text:
+ return text(); //call the standard KLineEdit::text() method
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString::null;
+}
+</screen>
+<para>There are cases when the widget should appear differently in the editor than in
+the executor, like the case of ScriptObjects, about dialog, etc. The usual solution is to show a QLabel instead of the widget. For this, your widget must
+derive from QLabel, and use this in the constructor:
+</para>
+<screen>
+ if (KommanderWidget::inEditor)
+ {
+ setPixmap(KGlobal::iconLoader()->loadIcon("iconname", KIcon::NoGroup, KIcon::SizeMedium));
+ setFrameStyle(QFrame::Box | QFrame::Plain);
+ setLineWidth(1);
+ setFixedSize(pixmap()->size());
+ }
+ else
+ setHidden(true);
+</screen>
+<para>You can create the widget itself (if you need a widget at all, maybe your
+"widget" provides only functionality to access e.g databases) in one of your
+functions, like in the <emphasis>execute</emphasis> function. Here is an example from the AboutDialog widget:
+</para>
+<screen>
+QString AboutDialog::handleDCOP(int function, const QStringList&amp; args)
+{
+ switch (function) {
+ ...
+ case DCOP::execute:
+ {
+ if (m_aboutData)
+ {
+ KAboutApplication dialog(m_aboutData, this);
+ dialog.exec();
+ }
+ break;
+ }
+ ...
+}
+</screen>
+<para>You now have a complete &kommander; widget. All that's left
+to do is make it available to the &kommander; system via plugins.
+</para>
+
+</sect2>
+
+<sect2 id="create-plugin">
+<title>Create the &kommander; plugin</title>
+<para>
+All of the widgets in &kommander; are provided by plugins.
+The standard widgets are loaded as widget plugins, but the &kommander; editor
+is also linked against this library because certain mechanisms in the editor
+are tied specifically to the standard widgets.
+</para>
+<para>
+A plugin in &kommander; is simply a shared library that has the symbol
+'kommander_plugin'. This symbol is a function returning a pointer
+to an instance of a KommanderPlugin class.
+</para>
+<para>
+&kommander; makes it easy to create a plugin for you widgets, so you don't
+need to worry about this low level stuff. The basic idea is to derive
+a new plugin class for your widgets from the KommanderPlugin base class
+and implement a few specific details. A template code is generated by the above described KDevelop project template.
+</para>
+<para>The following code continues on our example of creating a Kommander line edit
+widget.
+</para>
+<screen>
+#include &lt;kommanderplugin.h>
+
+/* WIDGET INCLUDES */
+#include "komlineedit.h"
+
+</screen>
+<para>
+First thing we do is include kommanderplugin.h. This contains the definition
+of the KommanderPlugin class. We also include all header files of the widgets
+this plugin provides - only komlineedit.h in this case.
+</para>
+<screen>
+class MyKomPlugin : public KommanderPlugin
+{
+public:
+ MyKomPlugin();
+ virtual QWidget *create( const QString &amp;className, QWidget *parent = 0, const char *name = 0 );
+};
+</screen>
+<para>
+We then create a KommanderPlugin sub-class called <emphasis>MyKomPlugin</emphasis>.
+This class simply has a constructor and an overridden create method.
+</para>
+<screen>
+MyKomPlugin::MyKomPlugin()
+{
+ addWidget( "KomLineEdit", "My Widget Group", i18n("A Kommander line edit widget") new QIconSet(KGlobal::iconLoader()->loadIcon("iconname", KIcon::NoGroup, KIcon::SizeMedium)));
+ //add my other widgets here
+}
+</screen>
+<para>In the constructor of the plugin, we call <emphasis>addWidget()</emphasis> for each widget we wish
+to provide in this plugin. <emphasis>addWidget()</emphasis> takes 6 arguments but only the first 4
+are required. In order, the arguments are the widget's class name, group,
+tool tip, an iconset for the icon used in the editor toolbar, what's this information, and a bool indicating whether the widget
+is a container for other widgets or not. This information is used
+by the editor when grouping your widget in menus, providing help information
+etc.
+</para>
+<para>
+Regarding the icon, the above example loads a medium sized icon called <emphasis>iconname</emphasis> from the standard &kde; icon location.
+</para>
+<screen>
+QWidget *MyKomPlugin::create( const QString &amp;className, QWidget *parent, const char *name )
+{
+ if( className == "KomLineEdit" )
+ return new KomLineEdit( parent, name );
+ //create my other widgets here
+ return 0;
+}
+</screen>
+<para>
+<emphasis>create()</emphasis> is where instances of our widgets actually get created.
+Whenever &kommander; wants an instance of one of the classes provided
+by our plugin, it will call <emphasis>create()</emphasis> with the name of the class it wants,
+and the parent and name that should be used.
+If the <emphasis>className</emphasis> matches any widget we know about, we return a new instance
+of that class but otherwise we return 0.
+</para>
+<para>
+Finally, we export our plugin. This just provides an entry point to our
+plugin so the &kommander; system can get access to it. Without this,
+&kommander; will not recognize your library as a &kommander; plugin.
+</para>
+<screen>
+KOMMANDER_EXPORT_PLUGIN(MyKomPlugin)
+</screen>
+<para>
+To compile your new &kommander; extension, you should compile all files
+as a shared library, linking against the kommanderplugin, kommanderwidget
+and any appropriate KDE libraries.
+With the line edit example, if we had komlineedit.h, komlineedit.cpp and
+mykomplugin.cpp, compiling and installing your plugin would involve
+something similar to the following commands:
+</para>
+<screen>
+libtool --mode=compile g++ -$KDEDIR/include -IQTDIR/include \
+ -I. -fPIC -c komlineedit.cpp
+libtool --mode=compile g++ -$KDEDIR/include -IQTDIR/include \
+ -I. -fPIC -c mykomplugin.cpp
+
+libtool --mode=link g++ -shared -L$KDEDIR/lib -lkdeui -lkommanderwidget \
+ -lkommanderplugin komlineedit.cppkomlineedit.o mykomplugin.o
+ -o libmykomplugin.so
+</screen>
+<para>
+If you want to install new plugin system-wide, root, use:
+</para>
+<screen>
+su -c "cp libmykomplugin.so $KDEDIR/lib"
+</screen>
+<note><para>If you use the KDevelop project generator, you will not need to do the above, but instead adapt the Makefile.am to link against extra libraries. By default, it will link to &Qt; and &kde; libraries and generate all the needed object files. Just run <command>make</command> to build, and <command>su -c make install</command> to install.</para></note>
+</sect2>
+<sect2 id="config-plugin">
+<title>Configure the installed plugins</title>
+<para>
+Now that the plugin is installed, run the <command>kmdr-plugins</command> program or choose <guimenu>Settings->Configure Plugins</guimenu> from the Editor. The list in this program displays the
+plugins that are currently loaded by &kommander;. Add the new plugin to the
+list by clicking the <guilabel>Add</guilabel> button in the toolbar and choosing your plugin.
+Closing the program saves changes.
+</para>
+<para>
+If you now restart the &kommander; editor, the widgets your new plugin
+provides should be available in the menus and toolbars. You can
+now use your new widgets in &kommander; dialogs.
+</para>
+</sect2>
+<sect2 id="add-widget">
+<title>Add the widget directly to &kommander;</title>
+<para>This section is for &kommander; developers and describes how to add a new widget directly to &kommander;.</para>
+<para>
+Ironically, this one is more complicated, especially if the widget needs
+extra editing methods.
+First you create the widget like above. After that you need to register the
+widget to the editor and the executor.
+To register it inside the editor, add it to <emphasis>editor/widgetdatabase.cpp</emphasis>:
+</para>
+<screen>
+...
+#include "mywidget.h"
+...
+void WidgetDatabase::setupDataBase( int id )
+{
+ ...
+ r = new WidgetDatabaseRecord;
+ r->name = "MyWidgetName";
+ r->iconName = "icon.png";
+ r->group = widgetGroup( "Kommander" );
+ r->toolTip = i18n("My new widget");
+ append(r);
+ ...
+}
+</screen>
+<para>
+You need to add to the <emphasis>editor/widgetfactory.cpp</emphasis> as well:
+</para>
+<screen>
+...
+#include "mywidget.h"
+...
+QWidget *WidgetFactory::createWidget( const QString &amp;className, QWidget *parent, const char *name, bool init,
+ const QRect *r, Qt::Orientation orient )
+{
+ ...
+ else if (className == "MyWidgetName")
+ return new MyWidget(parent, name);
+ ...
+}
+</screen>
+<para>
+To register to the executor (actually to the plugin system), add this to
+<emphasis>widgets/plugin.cpp</emphasis>:
+</para>
+<screen>
+KomStdPlugin::KomStdPlugin()
+{
+ ...
+ addWidget("MyWidgetName", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("iconname", KIcon::NoGroup, KIcon::SizeMedium)));
+ ...
+}
+</screen>
+<para>This is similar to how the widget is registered via the plugin system in the
+first case.
+</para>
+</sect2>
+</sect1>
+
+</chapter>
diff --git a/doc/kommander/frame.png b/doc/kommander/frame.png
new file mode 100644
index 00000000..e9fd684d
--- /dev/null
+++ b/doc/kommander/frame.png
Binary files differ
diff --git a/doc/kommander/glossary.docbook b/doc/kommander/glossary.docbook
new file mode 100644
index 00000000..b8434888
--- /dev/null
+++ b/doc/kommander/glossary.docbook
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<glossary id="glossary">
+
+<glossaryinfo>
+<authorgroup>
+<author>
+<firstname>Tamara</firstname>
+<surname>King</surname>
+<affiliation><address>
+<email>tik@acm.org</email>
+</address></affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</glossaryinfo>
+
+<glossdiv>
+<title>Keywords</title>
+<glossentry id="text-association-glosref">
+<glossterm>Text Association</glossterm>
+<glossdef>
+<para>
+A piece of text that is associated or bound to a widget's particular state.
+</para>
+</glossdef>
+</glossentry>
+<glossentry id="widget-text-glosref">
+<glossterm>Widget Text</glossterm>
+<glossdef>
+<para>
+Text associated to a widget. This is represented in &kommander; with the special @widgetText. The widget text varies depending on the widget.
+</para>
+</glossdef>
+</glossentry>
+</glossdiv>
+</glossary>
diff --git a/doc/kommander/groupbox.png b/doc/kommander/groupbox.png
new file mode 100644
index 00000000..4025b4dc
--- /dev/null
+++ b/doc/kommander/groupbox.png
Binary files differ
diff --git a/doc/kommander/index.docbook b/doc/kommander/index.docbook
new file mode 100644
index 00000000..71582056
--- /dev/null
+++ b/doc/kommander/index.docbook
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+ <!ENTITY kommander "<application>Kommander</application>">
+ <!ENTITY kappname "&kommander;">
+ <!ENTITY package "kdewebdev">
+ <!ENTITY basics SYSTEM "basics.docbook">
+ <!ENTITY commands SYSTEM "commands.docbook">
+ <!ENTITY parser SYSTEM "parser.docbook">
+ <!ENTITY credits SYSTEM "credits.docbook">
+ <!ENTITY dcop-functions SYSTEM "dcop.docbook">
+ <!ENTITY editor SYSTEM "editor.docbook">
+ <!ENTITY extending SYSTEM "extending.docbook">
+ <!ENTITY translating SYSTEM "translating.docbook">
+ <!ENTITY glossary SYSTEM "glossary.docbook">
+ <!ENTITY installation SYSTEM "installation.docbook">
+ <!ENTITY introduction SYSTEM "introduction.docbook">
+ <!ENTITY q-and-a SYSTEM "q-and-a.docbook">
+ <!ENTITY specials SYSTEM "specials.docbook">
+ <!ENTITY tutorials SYSTEM "tutorials.docbook">
+ <!ENTITY widgets SYSTEM "widgets.docbook">
+ <!ENTITY designer "<application>&Qt; Designer</application>">
+ <!ENTITY kmdr-editor "&kommander; Editor">
+ <!ENTITY kmdr-executor "&kommander; Executor">
+ <!ENTITY GIMP "<application>The GIMP</application>">
+ <!ENTITY IDE "<acronym>IDE</acronym>">
+ <!ENTITY PHP "<acronym>PHP</acronym>">
+ <!ENTITY PID "<acronym>PID</acronym>">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+]>
+
+<book lang="&language;">
+
+<bookinfo>
+<title>The &kommander; Handbook</title>
+
+<authorgroup>
+<author>
+<firstname>Marc</firstname>
+<surname>Britton</surname>
+<affiliation>
+<address><email>consume@optushome.com.au</email></address>
+</affiliation>
+</author>
+<author>
+<firstname>Tamara</firstname>
+<surname>King</surname>
+<affiliation>
+<address><email>tik@acm.org</email></address>
+</affiliation>
+</author>
+<author>
+<firstname>Eric</firstname>
+<surname>Laffoon</surname>
+<affiliation>
+<address><email>eric@kdewebdev.org</email></address>
+</affiliation>
+</author>
+<author>
+<firstname>András</firstname>
+<surname>Manţia</surname>
+<affiliation>
+<address><email>amantia@kde.org</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+
+<copyright>
+<year>2008</year>
+<holder>&kommander; Development Team</holder>
+</copyright>
+
+<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>2008-02-12</date>
+<releaseinfo>3.2.95</releaseinfo>
+
+<!-- Abstract about this handbook -->
+
+<abstract>
+<para>These docs have been partially complete for years, but not always available or easy to find. Since around 2002 little spurts of effort on &kommander; have produced dramtic results. &kommander; is a new approach to development and there have been modifications in approach and features. Consequently much of this documentation is out of date, however still useful due to legacy support. Please refer to our web site at <ulink url="http://kommander.kdewebdev.org">http://kommander.kdewebdev.org</ulink> for up to date information, news on KDE4 development, new tools, plugins, tips and tutorials.</para>
+<para>
+&kommander; is a set of tools that allow you to create dynamic &GUI; windows that has been used as a front end for command line programs, database front ends, simple program extentions and much more. The best part of it all? You aren't required to write a single line of code! Okay, that was old text... You can actually use the function browser and even with the new parser write almost none of the code. The inherent difference between &kommander; and other &GUI; scripting tools is that &kommander; doesn't care about how the window gets drawn. &kommander; was designed from the GUI down to the language elements and can embrace multiple languages. &kommander; does not use scripting to draw a window on the screen like other &GUI; scripting tools. As Kommander matures it will expose all it's internals to any scripting language people want to enable. We welcome anyone wishing to enhance support for any scripting language.
+</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>Kommander</keyword>
+<keyword>Quanta</keyword>
+</keywordset>
+
+</bookinfo>
+
+&introduction;
+&basics;
+&commands;
+&parser;
+&extending;
+&translating;
+&tutorials;
+&q-and-a;
+&credits;
+&installation;
+&glossary;
+
+</book> \ No newline at end of file
diff --git a/doc/kommander/installation.docbook b/doc/kommander/installation.docbook
new file mode 100644
index 00000000..707df7a0
--- /dev/null
+++ b/doc/kommander/installation.docbook
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<appendix id="installation">
+<title>Installation</title>
+
+<sect1 id="getting-kapp">
+<title>How to obtain &kommander;</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;
+
+<para>There is a dedicated homepage for &kommander; at <ulink url="http://kommander.kdewebdev.org">http://kommander.kdewebdev.org</ulink>.
+</para>
+</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>
+&kommander; requires the latest version of &kde; 3.x series, currently 3.5.9. It might work with previous 3.5.x versions, but this was not tested throughfully.
+<!-- For a list of updates, you may refer to the application web site
+or the ChangeLog file, or ... -->
+</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>
+
+</appendix>
diff --git a/doc/kommander/interface.png b/doc/kommander/interface.png
new file mode 100644
index 00000000..3cae0ef4
--- /dev/null
+++ b/doc/kommander/interface.png
Binary files differ
diff --git a/doc/kommander/introduction.docbook b/doc/kommander/introduction.docbook
new file mode 100644
index 00000000..7b40475a
--- /dev/null
+++ b/doc/kommander/introduction.docbook
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="introduction">
+<chapterinfo>
+<title>Introduction</title>
+<authorgroup>
+<author>
+<firstname>Eric</firstname>
+<surname>Laffoon</surname>
+<affiliation>
+<address><email>sequitur@kde.org</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>Introduction</title>
+
+<para>
+&kommander; is a visual dialog building tool which can be used to create
+full mainwindow applications, provided the window is initially created in Qt Designer
+or from a template in &kommander;. The primary objective is to create as much
+functionality as possible with the absolute minimum use of scripting. This is
+provided by the following features:
+</para>
+<note><para>Please note this document includes legacy documentation for compatibility reasons. In a nutshell &kommander; offers extremely rapid development and extensive abilities and capabilities. Following is a new list, followed by the legacy content.</para></note>
+
+<itemizedlist>
+<listitem>
+<para><emphasis>Capable internal scripting</emphasis> - &kommander; now offers nested logic structures, simple arrays and useful functions </para>
+</listitem>
+<listitem><para>
+<emphasis>Function Browsers</emphasis> - One never need know exact syntax for any function or command, just click the button and point and click your way to a functional program. Even the project lead finds it easier than typos much of the time.</para>
+</listitem>
+<listitem><para>
+<emphasis>Extensive widgets</emphasis> - &kommander; now has a tree/detail widget, spreadsheet like table widget, font dialog, color dialog, about dialog, timer, tab widgets, toolbox, popup menus, date picker and a lot more. </para>
+</listitem>
+<listitem>
+<para><emphasis>Plugins</emphasis> - &kommander; can run easy to create plugins. Plugins as of this writing are a database plugin offering a set of non visual tools, an HTTP plugin offering HTTPS and access to password protected areas and a KPart loader.
+</para></listitem>
+<listitem>
+<para><emphasis>Scripting language support</emphasis> - The ability to run multiple scripting language in &kommander; scripts, inside your dialog
+</para></listitem>
+<listitem>
+<para><emphasis>KPart creation</emphasis> - the ability to make your own plugins... and stranger yet you can even make a &kommander; window load a dialog as a KPart and directly access it with &kommander; functions!
+</para></listitem>
+</itemizedlist>
+<para>Look for documentation on tips and tricks like how to make &kommander; fake programming techniques like including a file, creating and using custom widgets, making collapsable panels in windows and other unexpected tricks. Below is our legacy list.</para>
+<itemizedlist>
+
+
+<listitem><para>Specials are prefaced with an <quote>@</quote> like @widgetText. The offer
+special features like the value of a widget, functions, aliases, global
+variables and such.</para></listitem>
+
+
+<listitem><para>&DCOP; integration allows &kommander; dialogs to control and be
+controlled in interactions with other &kde; applications. It is a very powerful
+feature!</para></listitem>
+
+<listitem><para>Signals and Slots is a little less intuitive to a new user. It is
+under review for how we process things in the first major release. These
+offer a limited event model for when a button is pushed or a widget is
+changed. Combined with <quote>Population Text</quote> it is rather powerful.</para></listitem>
+</itemizedlist>
+
+<para>
+The central key feature of &kommander; dialogs is that you can bind text
+(&kommander; Text) to a widget. So if you have @widget1 and @widget2 and
+they are line edits you can set &kommander; to show their contents by
+entering @widgetText in their &kommander; Text area. Then enter hello in
+@widget1 and world in @widget2. A button can have the string
+My first @widget1 @widget2 program in &kommander;
+If you run this dialog from a console it will output
+My first hello world program in &kommander;
+</para>
+
+<para>
+Hopefully you begin to see a small glimmering of the potential. &kommander;
+enables a much faster design model for simple applications because if allows
+you to stop thinking so much about language and revert to the more basic and
+natural conceptual model. In computers language is a means to define concepts
+and as such it is a layer between concept and implementation that can impede
+progress with minutia. &kommander; seeks to minimize that layer.
+</para>
+
+<para>
+&kommander; also seeks to build on standards. It is built on the &Qt; Designer
+framework and creates *.ui files which it renames to *.kmdr. It can easily
+import any &kde; widget and this can be done without having to rebuild
+&kommander;, by using plugins.
+</para>
+
+<para>
+&kommander;'s other significant factor is how it addresses the requirements of
+language. Computer languages can be wonderful things but they tend to have
+their own dogmas and zealots often seeking to provide an advance to &GUI;
+design in an integrated development environment. Ironically the acceptance
+of such &IDE;s is limited by the number of people willing to adopt a new new
+language to gain access to a desired feature. It is really not reasonable to
+expect people to need to change over to a dozen languages to access various
+feature sets. By being language neutral and allowing a &kommander; dialog to be
+extended by using any scripting language &kommander; positions itself in a
+unique position for wide spread adoption. Multiple script languages can be
+used in a single dialog and applications can be taken over by people using
+a different language than the original developer and gradually converting
+and extending it. New widgets and features can be instantly leveraged by all
+available languages.
+</para>
+
+<para>
+We hope that &kommander; begins to get the developer support and recognition
+required to achieve the potential it offers. Our end goal is to make &kommander;
+useful for novice users to extend and merge their applications. At the same
+time it should become a good prototyping tool. Also it opens the door to the
+promise of open source in a new way. We know that people can extend our GPL'd
+programs, but the fact remains very few have the skills. With &kommander; those
+numbers see a huge multiplier! Some applications may be most logical as a
+&kommander; application. We already use it in areas we want to allow
+extensibility in &quantaplus;.
+</para>
+
+<para>
+We hope you enjoy &kommander;. Please help us with bug reports and example
+dialogs, as well as any requests you may have. You can join our <ulink url="http://mail.kdewebdev.org/mailman/listinfo/kommander">user list</ulink>
+for help developing &kommander; applications.
+</para>
+
+<para>Best Regards from the &kommander; development team!</para>
+
+</chapter>
diff --git a/doc/kommander/kfontcombo.png b/doc/kommander/kfontcombo.png
new file mode 100644
index 00000000..87835d6c
--- /dev/null
+++ b/doc/kommander/kfontcombo.png
Binary files differ
diff --git a/doc/kommander/kommander.png b/doc/kommander/kommander.png
new file mode 100644
index 00000000..f14697d6
--- /dev/null
+++ b/doc/kommander/kommander.png
Binary files differ
diff --git a/doc/kommander/konsole.png b/doc/kommander/konsole.png
new file mode 100644
index 00000000..3e60f289
--- /dev/null
+++ b/doc/kommander/konsole.png
Binary files differ
diff --git a/doc/kommander/label.png b/doc/kommander/label.png
new file mode 100644
index 00000000..5d7d7b4c
--- /dev/null
+++ b/doc/kommander/label.png
Binary files differ
diff --git a/doc/kommander/lineedit.png b/doc/kommander/lineedit.png
new file mode 100644
index 00000000..dafdfdf3
--- /dev/null
+++ b/doc/kommander/lineedit.png
Binary files differ
diff --git a/doc/kommander/listbox.png b/doc/kommander/listbox.png
new file mode 100644
index 00000000..d467fc9f
--- /dev/null
+++ b/doc/kommander/listbox.png
Binary files differ
diff --git a/doc/kommander/listview.png b/doc/kommander/listview.png
new file mode 100644
index 00000000..d71cc1c9
--- /dev/null
+++ b/doc/kommander/listview.png
Binary files differ
diff --git a/doc/kommander/multilineedit.png b/doc/kommander/multilineedit.png
new file mode 100644
index 00000000..e7f6db94
--- /dev/null
+++ b/doc/kommander/multilineedit.png
Binary files differ
diff --git a/doc/kommander/parser.docbook b/doc/kommander/parser.docbook
new file mode 100644
index 00000000..a008c431
--- /dev/null
+++ b/doc/kommander/parser.docbook
@@ -0,0 +1,751 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="new_parserdocs">
+<chapterinfo>
+<title>&kommander; New Parser</title>
+<authorgroup>
+<author>
+<firstname>Michal</firstname>
+<othername></othername>
+<surname>Rudolf</surname>
+<affiliation>
+<address><email>mrudolf@kdewebdev.org</email></address>
+</affiliation>
+</author>
+<author>
+<firstname>Eric</firstname>
+<othername></othername>
+<surname>Laffoon</surname>
+<affiliation>
+<address><email>eric@kdewebdev.org</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+<copyright>
+<year>2005-2008</year>
+<holder>Michal Rudolf</holder>
+<holder>Eric Laffoon</holder>
+</copyright>
+<legalnotice>&FDLNotice;</legalnotice>
+</chapterinfo>
+
+<title>New Parser Documentation</title>
+<para>
+The new parser was introduced in &kommander; with version 1.2, released with
+KDE 3.4. This document was originally released to show all the features of new parser.
+As of &kommander; 1.3, released with KDE 3.5.9, the new parser is now the default, except for MainWindow applications created in &Qt; Designer. Because
+the new parser is so much richer in ability, overcomes the limitations of nesting in the
+old parser and adds so many new features we strongly recommend using it.
+</para>
+<para>
+&kommander; itself will not be described here. Please refer to other documents to
+see what is &kommander; for, how to create dialogs and how to manipulate widgets
+on runtime.
+</para>
+<!--
+</chapter>
+
+
+
+<chapter id="two_parsers">
+<title>New parser vs. old parser</title>
+-->
+<sect1 id="two_parsers">
+<title>Old parser</title>
+<para>
+Here we compare the two parsers. While we advocate the new one for most purposes the old one is still
+supported and useful, particularly when working with other scripting languages.
+</para>
+
+<sect2 id="old_parser">
+<title>Old parser</title>
+<para>
+The old parser was in fact macro parser. Only strings beginning with &#064; were
+recognized, locally parsed and expanded.
+<screen>
+@LineEdit1.setText(@ListBox.selection)
+</screen>
+</para>
+
+<para>
+All the underlying functionality (local variables, expressions, file manipulation)
+had to be done in another scripting language, such as Bash. While the intent with &kommander; is to support
+all other scripting languages, and this is presently possible to some degree, there
+was a need for a fast, native scripting language that was assured to be portable.
+The biggest problem with the old parser is that the &kommander; specials are evaluated <emphasis>before</emphasis> the code is passed to the scripting language, making them impossible to use in loops and conditions.</para>
+<para>
+The developers considered bash slow and not friendly to new users, and the old parser
+had been initially bash calling DCOP. The paradox for &kommander; being language neutral
+resulted in a need to do more than just functions natively.
+</para>
+</sect2>
+
+<sect2 id="new_parser">
+<title>New parser</title>
+<para>
+The new parser is a full parser. It parses the whole script, not just functions. As we were interested
+in GUI interaction, not the proliferation of scripting languages, we made compromises.
+As a result you should find &kommander;'s scripting to be capable for most basic tasks
+and natural and easy to use. There is also the <emphasis>Function Browser</emphasis>, which will help you
+assemble statements. The Function Browser is intended to make &kommander; accessible to complete novice
+programmers. It is similar to what you would find in KSpread to help you choose a function
+and fill in the parameters.
+<tip><para>If you want enhanced functionality found in other languages you can include
+them in &kommander; script objects headed with a shebang. While in these scripts the Function
+Browser will help you insert references to widgets. Just remember when using this functionality
+that the parser makes one pass for the old parser functions and one pass for your script. So if you
+try to change something in a widget and read it in the middle of a script you may not get what you expect.</para></tip>
+<screen>
+#!/usr/bin/php
+</screen>
+</para>
+<para>The following feature list is from version 1.2</para>
+<itemizedlist>
+<listitem><para>local and global variables and associative arrays</para></listitem>
+<listitem><para>numerical expressions</para></listitem>
+<listitem><para>string manipulation</para></listitem>
+<listitem><para>various structure commands: if, while, for, foreach</para></listitem>
+<listitem><para>most functions from old parser</para></listitem>
+<listitem><para>direct widget manipulation</para></listitem>
+<listitem><para>many additional functions</para></listitem>
+<listitem><para>decent execution speed</para></listitem>
+<listitem><para>receive parameters from signals in script slots</para></listitem>
+</itemizedlist>
+<para>This list is from version 1.3</para>
+<itemizedlist>
+<listitem><para>pass parameters and receive them with script execute calls</para></listitem>
+<listitem><para>return a value from a script</para></listitem>
+<listitem><para>create widgets on the fly</para></listitem>
+<listitem><para>connect signals and slots on the fly</para></listitem>
+<listitem><para>use a variable alias for a widget name</para></listitem>
+<listitem><para>simple indexed array functions</para></listitem>
+<listitem><para>directly access a widgets slots</para></listitem>
+</itemizedlist>
+</sect2>
+
+<sect2 id="invoking">
+<title>Invoking new parser</title>
+<para>
+To enable new parser, set <command>useInternalParser</command> property of the dialog to
+<command>true</command>. You can also enable new parser in a single script by putting
+<screen>
+#!kommander
+</screen>
+on the first line of the script. Also note if you are using another scripting language in
+a script with a shebang that &kommander; automatically enables the old parser for interacting
+with the dialog.
+<screen>
+#!/bin/bash
+echo @Self.item(0)
+# returns first parameter passed to script
+# echo $returnvalue passes back to calling script
+</screen>
+</para>
+</sect2>
+</sect1>
+<!--
+</chapter>
+<chapter id="features">
+-->
+<sect1 id="features">
+<title>New Parser Features</title>
+
+<sect2 id="types">
+<title>Types</title>
+<para>
+Each value is of one of three types: string, integer or double. Type conversion is
+automatic and chooses most appropriate type (for example, if you add double to integer,
+result will be double). If one of the values is string, result will be string too.
+</para>
+<para>Places you can get into trouble here are getting a numerical value from a widget
+and trying to perform a mathematical function on it. Since &kommander; uses <command>+</command>
+to concatonate two strings of text it can treat <command>LineEdit1.text + 2</command> as
+<command>22</command> instead of <command>2</command>. See the conversion functions in
+<link linkend="string_functions">String functions</link> to avoid problems.
+</para>
+</sect2>
+
+<sect2 id="expressions">
+<title>Expressions</title>
+<para>
+The following mathematical operators are supported: <command>+, -, *, mod, </command>. Standard brackets
+are of course supported as well.
+</para>
+
+<para>
+All kinds of comparisons are supported: <command>&lt;</command>, <command>&gt;</command>, <command>&lt;=</command>,
+<command>&gt;=</command>, <command>==</command>, <command>!=</command>. Instead of
+<command>!=</command> you can also use <command>&lt;&gt;</command>.
+Also, logical operators <command>and</command>, <command>or</command>, <command>not</command>
+are supported, as well as their C equivalents (<command>&amp;&amp;</command>, <command>||</command>, <command>!</command>).
+</para>
+
+<para>
+For strings you can use <command>+</command> operator for string concatenation.
+</para>
+
+<para>
+Some examples of valid expressions:
+<screen>
+2+3
+-5 * (2 - 13 mod 3)
+"This list has " + 12 + "items."
+</screen>
+</para>
+</sect2>
+
+<sect2 id="variables">
+<title>Variables</title>
+<para>
+Variables don't need to be declared. Once you use variable, it is considered declared.
+<link linkend="types">Type</link> of a variable is recognized automatically and can be changed later.
+</para>
+
+<para>
+Associative arrays are supported as well. They map string keys onto values of any type. To declare
+such array, you can just add some element to it, for example: <command>A["Quanta"] = "Web editor"</command>.
+Arrays are also handled by <link linkend="foreach">foreach </link> command and
+<link linkend="array_functions">array functions</link>.
+</para>
+
+<para>
+Local and global variables are supported. Global variables are marked by leading underscore.
+So, <command>myVar</command> is a local variable, but <command>_myVar</command> is global. The same applies
+to arrays.
+</para>
+
+<screen>
+a = 5
+b = 2 * 5 - (a + 1)
+c = "[Item " + b + "]"
+d["MyKey"] = "MyValue"
+d["MyKey2"] = 5
+</screen>
+
+<para>
+Using variables for widgets works much as you would expect. This is useful when looping widgets into a table.
+</para>
+
+<screen>
+for i=0 to 10 do
+ mycombo = "ComboTable"+i
+ createWidget(mycombo, "ComboBox", "Form1")
+end
+</screen>
+</sect2>
+
+<sect2 id="comments">
+<title>Comments</title>
+<para>
+You can use comments in &kommander; using the two traditional program language comment forms for line comments. For those users who are new to programming wondering <quote>what traditional form?</quote> see below. You can copy and paste the text below into a button or dialog initialization and see how comments behave in action.
+</para>
+<screen>
+// this is a comment for one line
+message_info("Hello World") //traditional first program
+// the above comment also ignored - the messagebox is not
+# this is also a comment
+message_info("This message will show")
+</screen>
+<para>
+Using the following multi-line comment will <emphasis>not</emphasis> work and will cause the rest of the widget execution to fail.
+</para>
+<screen>
+/*
+Hi, I was supposed to be a comment
+None of the script after this will execute
+DON'T USE THIS TYPE OF COMMENT IN KOMMANDER!
+*/
+</screen>
+</sect2>
+
+<sect2 id="globals">
+<title>Built in Globals</title>
+<para>
+&kommander; has some built in globals you may find handy.
+</para>
+<itemizedlist>
+<listitem>
+<para><command>_ARGS</command> - the argument string passed to the dialog on opening
+</para></listitem>
+<listitem>
+<para><command>_ARGCOUNT</command> - the count of arguments passed. These can be retrieved as <command>ARG1</command> to <command>ARGn</command> where n is the total number of args passed
+</para></listitem>
+<listitem>
+<para><command>_KDDIR</command> - the directory from which the dialog was run. &kommander; will default to your home directory, or a directory change if asked for it's current directory. This is useful for saving and reading files with the &kommander; file.
+</para></listitem>
+<listitem>
+<para><command>_NAME</command> - there is no reason to use this so don't
+</para></listitem>
+<listitem>
+<para><command>_PID</command> - the process id the current dialog is being run from - also available as just <emphasis>pid</emphasis> Avoid using this name for your variables!
+</para></listitem>
+<listitem>
+<para><command>_VERSION</command> - this is handy if you want to display the version of &kommander; that is running
+</para></listitem>
+</itemizedlist>
+</sect2>
+<sect2 id="passargs">
+<title>Passing arguments in &kommander;</title>
+<para>You can pass arguments via script parameters, signals and slots, command line parameters and DCOP. Let's look at scripts. Call your script like:
+<screen>result = ScriptObject1.execute("Hello World")
+debug(result)</screen>
+Inside your script you might have the following
+<screen>var = str_upper(Self.Item(0))
+return(var)</screen>
+Now you will get a return in your <emphasis>Stderr</emphasis> message log of <emphasis>HELLO WORLD</emphasis>
+</para>
+<para>Receiving a signal connected to a script slot works the same way. <emphasis>Self.Item(0)</emphasis> is parameter one and so on. You can retrieve the count of arguments passed with <emphasis>ScriptObject.count</emphasis>.
+</para>
+<para>Command line parameters allow for named or unnamed arguments. Unnamed look like
+<screen>kmdr-executor myprog.kmdr 100 red</screen>
+Where you will find _ARG1 = 100 and _ARG2 = red. One quirk is passing strings with spaces as an argument means they need to be quoted. Using the dialog command complicates matters as the entire argument string must pass as one string, meaning in quotes.
+<screen>dialog("mydialog.kmdr", 100+" \"Hello World\"")</screen>
+This returns <emphasis>_ARG1 = 100</emphasis> and <emphasis>_ARG2 = Hello World</emphasis>. Without the escaped quotes you would have <emphasis>_ARG2 = Hello</emphasis> and <emphasis>_ARG3 = World</emphasis>. Using Named Parameters is rather nice and potentially less confusing.
+<screen>dialog("mydialog.kmdr", "xcount=100 xquote=Hello world")</screen>
+And now you access those with <emphasis>_xcount</emphasis> and <emphasis>_xquote</emphasis> global variables.
+</para>
+<para>
+DCOP can be complex, which is why we recommend using the tools we develop to enable creating DCOP for remote &kommander; dialogs with something like a function browser. Here is an example DCOP call issued from a dialog opened from a parent &kommander; window. Since it knows who its parent is it can send information back while it is open and freely access all its parent's functionality with the exception of slots. Of course that can be done internally with a script which can be called externally, so in practice there is no limit to what can be done.
+<screen>dcop("kmdr-executor-"+parentPid, "KommanderIf", "setText(QString,QString)", "StatusBar8", "Hello")</screen>
+Let's look at this piece by piece. First of all we add <emphasis>parentPid</emphasis> to "kmdr-executor-" as we make no assumption a &kommander; window was the caller. You could use this with Quanta or KSpread or whatever. Next we are addressing <emphasis>KommanderIf</emphasis>, which is a <emphasis>nice</emphasis> interface for end users which has been cleaned up. We hope eventually as KDE moves from DCOP to DBUS on KDE4 that more applications adopt a nice interface for integration. The next parameter, <emphasis>"setText(QString,QString)"</emphasis> is important because it <emphasis>prototypes</emphasis> the parameters allowed. Otherwise &kommander; could not validate the call. So without a definition of the DCOP call being used you will get an error. The remaining parameters are of course what is being passed. We recommend you look at applications with <command>kdcop</command> to see how this works and practice dcop calls from the shell to get your syntax right.
+</para>
+</sect2>
+</sect1>
+<!--
+</chapter>
+-->
+<sect1 id="parser_commands">
+
+<title>Commands</title>
+<para>
+Various structure commands are supported. They can be freely nested.
+</para>
+
+<para>
+There are also three special commands: <command>exit</command>, <command>break</command> and <command>continue</command>.
+The first one ends script execution and returns. The second exits current block (<link linkend="while">while</link>,
+<link linkend="for">for</link> or <link linkend="foreach">foreach</link> and the third exits just a current step, restarting
+from the beginning of the loop.
+</para>
+
+
+<sect2 id="if">
+<title>if</title>
+<para>
+Command <command>if</command> has following syntax:
+</para>
+
+<para>
+<command>if</command> <emphasis>condition</emphasis> <command>then</command>
+<emphasis>code</emphasis> <command>elseif</command> <emphasis>condition</emphasis>
+<command>then</command> <emphasis>code</emphasis> <command>else</command>
+<emphasis>code</emphasis> <command>endif</command>
+</para>
+
+<para>
+Both <command>elseif</command> and <command>else</command> parts are optional. <emphasis>Condition</emphasis>
+is any expression. <emphasis>Code</emphasis> is executed if condition is true. That means:
+<itemizedlist>
+<listitem><para>non-zero for integers and double</para></listitem>
+<listitem><para>non-empty for strings</para></listitem>
+</itemizedlist>
+</para>
+
+<screen>
+if a * 2 &gt; 7 then
+ b = 1
+elseif a &lt; 0 then
+ b = 2
+elseif
+ b = 0
+endif
+</screen>
+</sect2>
+
+<sect2 id="while">
+<title>while</title>
+<para>
+<command>while</command> <emphasis>condition</emphasis> <command>do</command>
+<emphasis>code</emphasis> <command>end</command>
+</para>
+
+<para>
+<emphasis>Condition</emphasis> is recalculated each time loop is executed.
+<screen>
+while i &lt; 15 do
+ i = i + a
+end
+</screen>
+</para>
+
+
+</sect2>
+
+<sect2 id="for">
+<title>for</title>
+<para>
+Command <command>for</command> has following syntax:
+</para>
+
+<para>
+<command>for</command> <emphasis>variable</emphasis> <command>=</command>
+<emphasis>start value</emphasis> <command>to</command> <emphasis>end value</emphasis>
+<command>step</command> <emphasis>expression</emphasis> <command>do</command>
+<emphasis>code</emphasis> <command>end</command>
+</para>
+
+<para>
+Loop is executed starting from <emphasis>start value</emphasis> and it is ended when variable's value is
+bigger then <emphasis>end value</emphasis>. If <command>step</command> part is specified, on each step
+variable's value is increased by given value instead of <command>1</command>.
+<screen>
+foreach i = 1 to 20 step 5 do
+ a = a + 2 * i
+end
+</screen>
+</para>
+</sect2>
+
+<sect2 id="foreach">
+<title>foreach</title>
+<para>
+Command <command>foreach</command> has following syntax:
+</para>
+
+<para>
+<command>for</command> <emphasis>variable</emphasis> <command>in</command>
+<emphasis>array</emphasis> <command>do</command>
+<emphasis>code</emphasis> <command>end</command>
+</para>
+
+<para>
+Loop is executed for each key in given array. In each step variable is assigned the next key from the array.
+
+<screen>
+sum = 0
+foreach i in myArray do
+ sum = sum + myArray[i]
+end
+</screen>
+</para>
+</sect2>
+</sect1>
+<!--
+</chapter>
+-->
+<sect1 id="functions">
+
+<title>Functions</title>
+<para>
+Most old parser functions are supported by new parser. Also, some new functions were added.
+</para>
+
+
+<sect2 id="string_functions">
+<title>String functions</title>
+<para>String functions are the same as in old parser, the only difference is that their names
+are preceeded by <command>str_</command> instead of <command>@String.</command>
+
+<itemizedlist>
+<listitem>
+<para><command>str_length(<parameter>string</parameter>)</command> - returns length of <emphasis>string</emphasis>
+</para></listitem>
+<listitem>
+<para><command>str_contains(<parameter>string</parameter>, <parameter>text</parameter>)</command> - returns 1 if <emphasis>string</emphasis> contains <emphasis>text</emphasis>
+</para></listitem>
+<listitem>
+<para><command>str_find(<parameter>string</parameter>, <parameter>text</parameter>, <parameter>start</parameter>)</command> - returns position of the first occurrence of <emphasis>text</emphasis> in <emphasis>string</emphasis>; optional <emphasis>start</emphasis>
+ specifies start of the search
+</para></listitem>
+<listitem>
+<para><command>str_find(<parameter>string</parameter>, <parameter>text</parameter>, <parameter>start</parameter>)</command> - returns position of the last occurrence of <emphasis>text</emphasis> in <emphasis>string</emphasis>; optional <emphasis>start</emphasis>
+ specifies start of the search
+</para></listitem>
+<listitem>
+<para><command>str_left(<parameter>string</parameter>, <parameter>count</parameter>)</command> - returns first <emphasis>count</emphasis> characters of <emphasis>string</emphasis>
+</para></listitem>
+<listitem>
+<para><command>str_right(<parameter>string</parameter>, <parameter>count</parameter>)</command> - returns last <emphasis>count</emphasis> characters of <emphasis>string</emphasis>
+</para></listitem>
+<listitem>
+<para><command>str_right(<parameter>string</parameter>, <parameter>start</parameter>, <parameter>count</parameter>)</command> - returns substring of <emphasis>string</emphasis> starting from <emphasis>start</emphasis> and containing <emphasis>count</emphasis>
+characters (or everything to the end of the string if last parameter is not specified)
+</para></listitem>
+<listitem>
+<para><command>str_remove(<parameter>string</parameter>, <parameter>text</parameter>)</command> - returns <emphasis>string</emphasis> with all substrings equal to <emphasis>text</emphasis> removed
+</para></listitem>
+<listitem>
+<para><command>str_replace(<parameter>string</parameter>, <parameter>text</parameter>, <parameter>text2</parameter>)</command> - returns <emphasis>string</emphasis> with all substrings equal to <emphasis>text</emphasis> replaced with <emphasis>text2</emphasis>
+</para></listitem>
+<listitem>
+<para><command>str_lower(<parameter>string</parameter>)</command> - returns <emphasis>string</emphasis> converted to lowercase
+</para></listitem>
+<listitem>
+<para><command>str_upper(<parameter>string</parameter>)</command> - returns <emphasis>string</emphasis> converted to uppercase
+</para></listitem>
+<listitem>
+<para><command>str_section(<parameter>string</parameter>, <parameter>separator</parameter>, <parameter>start</parameter>,
+<parameter>end</parameter>)</command> - returns substring containing appropriate sections of <emphasis>string</emphasis> determined
+by <emphasis>separator</emphasis>; if no <emphasis>end</emphasis> is given, single <emphasis>start</emphasis> section is returned
+</para></listitem>
+<listitem>
+<para><command>str_args(<parameter>string</parameter>, <parameter>...</parameter>)</command> - returns <emphasis>string</emphasis> with <command>%1</command>, <command>%2</command>, <command>%3</command> replaced with following parameters.
+</para></listitem>
+<listitem>
+<para><command>str_isnumber(<parameter>string</parameter>)</command> - returns 1 if <emphasis>string</emphasis> is a valid number
+</para></listitem>
+<listitem>
+<para><command>str_isempty(<parameter>string</parameter>)</command> - returns 1 if <emphasis>string</emphasis> is empty
+</para></listitem>
+<listitem>
+<para><command>str_toint(<parameter>string</parameter>, <parameter>default</parameter>)</command> - returns <emphasis>string</emphasis> converted to integer; if conversion is not possible, optional <emphasis>default</emphasis> value is returned
+</para></listitem>
+<listitem>
+<para><command>str_todouble(<parameter>string</parameter>, <parameter>default</parameter>)</command> - returns <emphasis>string</emphasis> converted to double; if conversion is not possible, optional <emphasis>default</emphasis> value is returned
+</para></listitem>
+</itemizedlist></para>
+</sect2>
+
+<sect2 id="kommander_functions">
+<title>&kommander; functions</title>
+<para>
+Most &kommander; functions are supported; some (such as <command>expr</command>)
+were obsoleted by new parser and are not available.
+</para>
+
+<itemizedlist>
+<listitem>
+<para><command>debug(<parameter>string</parameter>, <parameter>...</parameter>)</command> - writes all parameters on stderr
+</para></listitem>
+<listitem>
+<para><command>echo(<parameter>string</parameter>, <parameter>...</parameter>)</command> - writes all parameters on stdout
+</para></listitem>
+<listitem>
+<para><command>dcop(<parameter>string</parameter>, <parameter>...</parameter>)</command> - calls DCOP function</para>
+</listitem>
+<listitem>
+<para><command>exec(<parameter>string</parameter>, <parameter>shell</parameter>)</command> - executes external program
+(using optional <emphasis>shell</emphasis>); block the execution of the current dialog until the program passed as the parameter exits; returns output of that program
+</para></listitem>
+<listitem>
+<para><command>i18n(<parameter>string</parameter>)</command> - marks <emphasis>string</emphasis> for future translation
+</para></listitem>
+<listitem>
+<para><command>env(<parameter>string</parameter>)</command> - returns a value of environmental variable
+</para></listitem>
+<listitem>
+<para><command>readSetting(<parameter>key</parameter>, <parameter>default</parameter>)</command> - returns a value stored in config
+file with given <emphasis>key</emphasis>; if there is no such value <emphasis>default</emphasis> is returned
+</para></listitem>
+<listitem><para>
+<command>writeSetting(<parameter>key</parameter>, <parameter>value</parameter>)</command> - writes pair
+<emphasis>key</emphasis> and <emphasis>value</emphasis> in config file
+</para></listitem>
+</itemizedlist>
+<para>New in &kommander; 1.3</para>
+<itemizedlist>
+<listitem>
+<para><command>execBackground(<parameter>string</parameter>, <parameter>shell</parameter>)</command> - executes external program
+(using optional <emphasis>shell</emphasis>) in the background, without blocking the current dialog; contrary to the above <command>exec</command> function, it will not return the output of the program.
+</para></listitem>
+<listitem>
+<para><command>return(<parameter>value</parameter>)</command> - returns a value to the calling object (script, button...)
+</para></listitem>
+<listitem>
+<para><command>createWidget(<parameter>widgetname</parameter>, <parameter>widgettype</parameter>, <parameter>parent</parameter>)</command> - creates a new widget. You can then place it in a table or toolbox, for example and use <command>mywidget.show(true)</command> to make it visible. If you are putting an new widget on the form you need to consider layout issues. &kommander; will not create layouts on the fly or edit pixel by pixel positioning (in most cases). This is confusing even in C++ development. We recommend you use a groupbox and do a layout in the dialog
+for best control.
+</para></listitem>
+<listitem>
+<para><command>connect(<parameter>sender</parameter>, <parameter>signal</parameter>, <parameter>receiver</parameter>, <parameter>slot</parameter>)</command> - connect a widget signal to a widget slot. See the connection dialog and select similar widgets for possibilities. If for instance a signal looks like looks like <command>execute(const QString&amp;)</command> that is exactly what must be in quotes there.
+</para></listitem>
+<listitem>
+<para><command>disconnect(<parameter>sender</parameter>, <parameter>signal</parameter>, <parameter>receiver</parameter>, <parameter>slot</parameter>)</command> - undo the connection as listed above. Again, exact syntax is essential.
+</para></listitem>
+<listitem>
+<para><command>widgetExists(<parameter>widgetname</parameter>)</command> - remember you can use a variable name to reference a widget now. Use this when accessing created widgets to insure they are there. Calling a non-existant widget obviously will throw an error.
+</para></listitem>
+</itemizedlist>
+</sect2>
+
+<sect2 id="array_functions">
+<title>Array functions</title>
+<para>
+Most array functions are supported; some (such as <command>value</command>)
+were obsoleted by new parser and are not available. The only difference is that their names
+are preceeded by <command>array_</command> instead of <command>@Array.</command>
+</para>
+
+<warning><para>Due to parser limitation, name of array has to be specified as string now; for example
+<command>array_count("MyArray")</command>.</para></warning>
+
+<itemizedlist>
+<listitem>
+<para><command>array_clear(<parameter>array</parameter>)</command> - removes all elements from <emphasis>array</emphasis>
+</para></listitem>
+<listitem>
+<para><command>array_count(<parameter>array</parameter>)</command> - returns number of elements in <emphasis>array</emphasis>
+</para></listitem>
+<listitem>
+<para><command>array_keys(<parameter>array</parameter>)</command> - returns string containing EOL-separated keys of <emphasis>array</emphasis> - note that if you had imported a scalar (keys without values, see below for an example) into an array with &kommander; you would not be able to access it with <command>array_values("myarray")</command> as you might think (since it seems to only have values) but would instead need to use <command>array_keys("myarray")</command>. You might find a better choice for this is to use the new <emphasis>indexed arrays</emphasis> described below.
+</para></listitem>
+<listitem>
+<para><command>array_values(<parameter>array</parameter>)</command> - returns string containing EOL-separated values of <emphasis>array</emphasis>
+</para></listitem>
+<listitem>
+<para><command>array_tostring(<parameter>array</parameter>)</command> - returns string containing whole <emphasis>array</emphasis>
+as EOL-separated pairs containing key and value separated with TAB character
+</para></listitem>
+<listitem>
+<para><command>array_fromstring(<parameter>array</parameter>, <parameter>string</parameter>)</command> - reads array from <emphasis>string</emphasis> (usually provided by <command>array_tostring</command> function)
+</para></listitem>
+<listitem>
+<para><command>array_remove(<parameter>array</parameter>, <parameter>key</parameter>)</command> - removes item with key
+<emphasis>key</emphasis> from <emphasis>array</emphasis>
+</para></listitem>
+</itemizedlist>
+<para>Here is an example for array manipulation:</para>
+<screen>
+array_fromstring("myArray", "1\tA\nsecond\tB\n3\tC")
+foreach key in myArray do
+ debug("myArray[" + key + "]= " + myArray[key])
+end
+</screen>
+<para>This will print out the following to the stderr. It is visible that there is no guarantee about the order of array elements, as well that the keys are strings, not numbers.</para>
+<screen>
+myArray[1]= A
+myArray[3]= C
+myArray[second]= B
+</screen>
+<para>Another example for keyless arrays:</para>
+<screen>
+array_fromstring("myArray", "A\nB\nC")
+foreach key in myArray do
+ debug(key)
+end
+debug("Array elements:\n" + array_keys("myArray"))
+</screen>
+<para>This results in:</para>
+<screen>
+A
+B
+C
+Array elements:
+A
+B
+C
+</screen>
+
+<para>New in &kommander; 1.3</para>
+<itemizedlist>
+<listitem>
+<para><command>array_indexedFromString(<parameter>array</parameter>, <parameter>string</parameter>, <parameter>separator</parameter>)</command> - this compensates for &kommander; not having indexed arrays. it creates an array with a zero based sequential index. Remember to use quotes on the array name and any strings not represented by a variable. The separator argument is optional and defaults to "\t" [TAB] which is used to separate fields reading and writing tables, arrays or detail widgets. <emphasis>Remember this array index does not enforce any rules on its self. It is just like you created it with a for loop, just more convenient.</emphasis>
+</para></listitem>
+<listitem>
+<para><command>array_indexedInsertElements(<parameter>array</parameter>, <parameter>key</parameter>, <parameter>string</parameter>, <parameter>separator</parameter>)</command> - this function is part of the indexed array suite and enables you to insert elements in your array while maintaining an index that is sequential, contiguous and unique. Set the index key to start at and the text string and how it is separated. The elements will be added shifting all the index numbers after by the number added.
+</para></listitem>
+<listitem>
+<para><command>array_indexedRemoveElements(<parameter>array</parameter>, <parameter>key start</parameter>, <parameter>number</parameter>)</command> - this enables you to remove elements from an indexed array and avoid gaps in your index. Specify the key to start at and optionally how many to remove. The default is one. You will end up with a re-indexed array less the removed elements.
+</para></listitem>
+<listitem>
+<para><command>array_indexedToString(<parameter>array</parameter>, <parameter>separator</parameter>)</command> - this enables you to convert your indexed array back into a string, particularly useful for detail widgets. For instance if you are displaying a database query result in TreeWidget1 and it has six columns you can use <command>TreeWidget1.selection</command> to get the selected row. it will be separated by tabs and you could look at a the fifth element by using <command>str_section(TreeWidget1.selection, "\t", 4)</command> (remember it is zero based). That's nice for reading a value, but if you want to change it you can see you have a lot more work to do. After you split that string you have to reassemble with <command>val1+"\t"+val2...</command> Using indexed arrays you could edit that fifth element like so...
+<screen>
+idx = TreeWidget1.currentItem
+array_indexedFromString("z", TreeWidget1.selection)
+z[4] = "new value"
+TreeWidget1.removeItem(idx)
+TreeWidget1.insertItem(array_indexedToString("z"), idx)
+</screen>
+Note that only two short lines were added to accomplish this! This was very welcome for database use.
+</para></listitem>
+</itemizedlist>
+</sect2>
+
+
+<sect2 id="file_functions">
+<title>File functions</title>
+<para>
+All file functions are supported, the only difference is that their names
+are preceeded by <command>file_</command> instead of <command>@File.</command>
+</para>
+
+<itemizedlist>
+<listitem>
+<para><command>file_read(<parameter>name</parameter>)</command> - returns content of file <emphasis>name</emphasis>
+</para></listitem>
+<listitem>
+<para><command>file_write(<parameter>name</parameter>, <parameter>...</parameter>)</command> - writes all arguments
+to file <emphasis>name</emphasis>
+</para></listitem>
+<listitem>
+<para><command>file_append(<parameter>name</parameter>, <parameter>...</parameter>)</command> - appends all arguments
+to file <emphasis>name</emphasis>
+</para></listitem>
+</itemizedlist>
+</sect2>
+
+
+<sect2 id="input_functions">
+<title>Input functions</title>
+<para>
+These functions show some dialog allowing user to enter some value. They are accessible in the old parser using <command>@Input.</command>. For most functions all parameters are optional, exception is
+<command>input_text</command> which requires 2 parameters and <command>input_value</command> which requires 5 parameters.
+</para>
+
+<itemizedlist>
+<listitem>
+<para><command>input_color(<parameter>caption</parameter>, <parameter>default</parameter>)</command> - returns color in #RRGGBB format
+</para></listitem>
+<listitem>
+<para><command>input_text(<parameter>caption</parameter>, <parameter>label</parameter>, <parameter>default</parameter>)</command> - returns text entered by user
+</para></listitem>
+<listitem>
+<para><command>input_value(<parameter>caption</parameter>, <parameter>label</parameter>, <parameter>default</parameter>,
+<parameter>min</parameter>, <parameter>max</parameter>, <parameter>step</parameter>)</command> - returns value entered by user
+</para></listitem>
+<listitem>
+<para><command>input_directory(<parameter>startdir</parameter>, <parameter>filter</parameter>, <parameter>caption</parameter>)</command> - returns directory selected by user
+</para></listitem>
+<listitem>
+<para><command>input_openfile(<parameter>caption</parameter>, <parameter>label</parameter>, <parameter>default</parameter>)</command> - returns existing file entered by user
+</para></listitem>
+<listitem>
+<para><command>input_savefile(<parameter>caption</parameter>, <parameter>label</parameter>, <parameter>default</parameter>)</command> - returns file entered by user (if file exists, confirmation will be required)
+</para></listitem>
+<listitem>
+<para><command>input_openfiles(<parameter>caption</parameter>, <parameter>label</parameter>, <parameter>default</parameter>)</command> - returns string of EOL-separated existing files entered by user
+</para></listitem>
+</itemizedlist>
+</sect2>
+
+
+<sect2 id="message_functions">
+<title>Message functions</title>
+<para>
+These functions show some message for user or ask user to confirm some action. In the old parser use <command>@Message.</command> instead.
+</para>
+
+<itemizedlist>
+<listitem>
+<para><command>message_info(<parameter>text</parameter>, <parameter>caption</parameter>)</command> - shows information text
+</para></listitem>
+<listitem>
+<para><command>message_error(<parameter>text</parameter>, <parameter>caption</parameter>)</command> - shows error text
+</para></listitem>
+<listitem>
+<para><command>message_warning(<parameter>text</parameter>, <parameter>caption</parameter>, <parameter>button1</parameter>,
+<parameter>button2</parameter>, <parameter>button3</parameter>)</command> - shows question with warning and up to three buttons; number
+of chosen button is returned; if no button names are specified, <command>Yes</command> and <command>No</command> will be displayed
+</para></listitem>
+<listitem>
+<para><command>message_question(<parameter>text</parameter>, <parameter>caption</parameter>, <parameter>button1</parameter>,
+<parameter>button2</parameter>, <parameter>button3</parameter>)</command> - shows question and up to three buttons; number
+of chosen button is returned; if no button names are specified, <command>Yes</command> and <command>No</command> will be displayed
+</para></listitem>
+</itemizedlist>
+</sect2>
+</sect1>
+</chapter>
+
+
+
diff --git a/doc/kommander/pixlabel.png b/doc/kommander/pixlabel.png
new file mode 100644
index 00000000..32b90d82
--- /dev/null
+++ b/doc/kommander/pixlabel.png
Binary files differ
diff --git a/doc/kommander/progress.png b/doc/kommander/progress.png
new file mode 100644
index 00000000..29416702
--- /dev/null
+++ b/doc/kommander/progress.png
Binary files differ
diff --git a/doc/kommander/pushbutton.png b/doc/kommander/pushbutton.png
new file mode 100644
index 00000000..61f779ce
--- /dev/null
+++ b/doc/kommander/pushbutton.png
Binary files differ
diff --git a/doc/kommander/q-and-a.docbook b/doc/kommander/q-and-a.docbook
new file mode 100644
index 00000000..2b76331c
--- /dev/null
+++ b/doc/kommander/q-and-a.docbook
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="faq">
+<chapterinfo>
+<title>Questions and Answers</title>
+</chapterinfo>
+
+<title>Questions and Answers</title>
+<para>The list of Frequently Asked Questions can be found on <ulink url="http://kommander.kdewebdev.org/faq.php">our home page</ulink>.
+</para>
+</chapter>
diff --git a/doc/kommander/radiobutton.png b/doc/kommander/radiobutton.png
new file mode 100644
index 00000000..10c1d8c3
--- /dev/null
+++ b/doc/kommander/radiobutton.png
Binary files differ
diff --git a/doc/kommander/richtextedit.png b/doc/kommander/richtextedit.png
new file mode 100644
index 00000000..73573a8a
--- /dev/null
+++ b/doc/kommander/richtextedit.png
Binary files differ
diff --git a/doc/kommander/shadow.png b/doc/kommander/shadow.png
new file mode 100644
index 00000000..37c44694
--- /dev/null
+++ b/doc/kommander/shadow.png
Binary files differ
diff --git a/doc/kommander/shellscript.png b/doc/kommander/shellscript.png
new file mode 100644
index 00000000..59de8cfe
--- /dev/null
+++ b/doc/kommander/shellscript.png
Binary files differ
diff --git a/doc/kommander/slider.png b/doc/kommander/slider.png
new file mode 100644
index 00000000..525bd1ca
--- /dev/null
+++ b/doc/kommander/slider.png
Binary files differ
diff --git a/doc/kommander/specials.docbook b/doc/kommander/specials.docbook
new file mode 100644
index 00000000..ddd3e3b6
--- /dev/null
+++ b/doc/kommander/specials.docbook
@@ -0,0 +1,371 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<sect1 id="specials">
+<sect1info>
+<title>Specials and Built-in Global Variables</title>
+</sect1info>
+
+<title>Specials and Built-in Global Variables</title>
+
+<para>
+Specials are functions that are processed by &kommander;. You should be aware that whe using the old style parser all &kommander; specials will be executed first and then the script will be executed. In most cases this is not a problem, but in a few (mostly in loops, conditions) it is.
+</para>
+<note><para>The below list might be slightly outdated. It is recommended to use the <guilabel>Function Browser</guilabel> to get help about the available functions.
+The <guilabel>Function Browser</guilabel> can be reached from inside the <guilabel>Kommander Text</guilabel> editor, by clicking the <guilabel>Function...</guilabel> button.
+</para>
+</note>
+
+<variablelist>
+<varlistentry>
+<term><function>@dcop(<parameter>appId</parameter>, <parameter>object</parameter>, <parameter>function</parameter>, <parameter>arguments</parameter>)</function></term>
+<listitem>
+<para>
+Make a &DCOP; call. @dcop(<quote>kmail</quote>, <quote>KMailIface</quote>, <quote>checkMail()</quote>, <quote></quote>)
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@dcopid</function></term>
+<listitem>
+<para>
+The &DCOP; id of the process. (kmdr-executor-@pid)
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@dialog(<parameter>dialog</parameter>[,<parameter>parameters</parameter>])</function></term>
+<listitem>
+<para>
+Launches the specified Kommander dialog. Dialog is sought in dialog directory and in current directory - in that order. This prepends the call to the executor and sets the default directory to the one the Kommander application is in. Parameters can be passed in the usual Unix way or you can pass named parameters like <quote>variable=value</quote>. You can then find passed parameters in the global pool. @global(variable) would return <quote>value</quote>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@env(<parameter>environmentVariable</parameter>)</function></term>
+<listitem>
+<para>
+Expands to the specified environment variable. @env(PWD) expands to $PWD. Remember that <quote>$</quote> is part of the shell and shouldn't be used.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@exec(<parameter>command</parameter >)</function></term>
+<listitem>
+<para>
+returns the output of executing the specified command. @exec(ls -l).
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@execBegin ... @execEnd</function ></term>
+<listitem>
+<para>
+same as <function>@exec</function>, but supports shebang and multiline scripts. This serves for various scripting languages either by decalring them or using a shebang.
+</para>
+<itemizedlist>
+<listitem><para><function>@execBegin(php)</function></para></listitem>
+<listitem><para><function>@execBegin</function>(#!/usr/bin/php)</para></listitem>
+</itemizedlist>
+<para>The first one uses the name of the <acronym>PHP</acronym> executable. &kommander; searches PATH for <application>php</application> and if it is not found looks to see if it is registered with &kommander; in a location outside of your path. If not it tells the user it cannot be found. The second examples uses the classic <quote>shebang</quote> which can have some benefits and also problems. If you have a beta copy of <acronym>PHP5</acronym>, for instance, in <filename>/usr/local/bin</filename> which would not be found because it would find on in <filename>/usr/bin</filename> this is useful. If, however, you distribute the dialog to someone who has <acronym>PHP</acronym> in <filename>/usr/local/bin</filename> only it will not be found with the shebang used. So using shebangs is cautioned and using the executable is recommenede if you are sharing files.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@global(<parameter>variable</parameter>)</function></term>
+<listitem>
+<para>expands to the value of the specified global variable.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@null</function></term>
+<listitem>
+<para>Returns null. Now that Kommander checks for empty widgetText on execution this will prevent erroneous errors in the case of an unset state on a widget.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@parentPid</function></term>
+<listitem>
+<para>
+The &PID; of the parent process.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@pid</function></term>
+<listitem>
+<para>
+The &PID; of the process.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@readSetting(<parameter>key</parameter >, <parameter>defaultValue</parameter >)</function></term>
+<listitem>
+<para>
+reads a value from <filename>kommanderrc</filename>. See also @writeSetting.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@selectedWidgetText</function ></term>
+<listitem>
+<para>
+the selected content in a widget that can show more than one value, like list widgets
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@setGlobal(<parameter>variable</parameter>, <parameter>value</parameter>)</function></term>
+<listitem>
+<para>
+Sets the global variable to the specified value.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@widgetText</function></term>
+<listitem>
+<para>
+the content of a widget
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@writeSetting(<parameter>key</parameter>, <parameter>value</parameter >)</function ></term>
+<listitem>
+<para>
+write value to <filename>kommanderrc</filename>. All &kommander; dialogs share the same kommanderc file, each one will have its own section inside it.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<sect2 id="arrays">
+<title>Array Function Group</title>
+
+<variablelist>
+<varlistentry>
+<term><function>@Array.values(<parameter>array</parameter>)</function></term>
+<listitem>
+<para>Returns an EOL-separated list of all values in the array. Can be used to walk through an array.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@Array.keys(<parameter>array</parameter>)</function></term>
+<listitem>
+<para>Returns an EOL-separated list of all keys in the array.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@Array.setValue(<parameter>array</parameter>, <parameter>key</parameter>, <parameter>value</parameter>)</function></term>
+<listitem>
+<para>Sets a key and value for an element of an array. If no array exists it is created.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@Array.clear(<parameter>array</parameter>)</function></term>
+<listitem>
+<para>Remove all elements from the array.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@Array.count(<parameter>array</parameter>)</function></term>
+<listitem>
+<para>Return number of elements in the array.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@Array.value(<parameter>array</parameter>,<parameter>key</parameter>)</function></term>
+<listitem>
+<para>Return the value associated with the given key.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@Array.remove(<parameter>array</parameter>,<parameter>key</parameter>)</function></term>
+<listitem>
+<para>Remove element with the given key from the array.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@Array.fromString(<parameter>array</parameter>,<parameter>string</parameter>)</function></term>
+<listitem>
+<para>Add all elements in the string to the array. String should have <emphasis>key\tvalue\n</emphasis> format."</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@Array.toString(<parameter>array</parameter>,<parameter>string</parameter>)</function></term>
+<listitem>
+<para>"Return all elements in the array in <emphasis>key\tvalue\n</emphasis> format."</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</sect2>
+
+<sect2 id="files">
+<title>File Function Group</title>
+<variablelist>
+
+<varlistentry>
+<term><function>@File.read(<parameter>file</parameter>)</function></term>
+<listitem>
+<para>Return content of the given file.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@File.write(<parameter>file</parameter><parameter>string</parameter>)</function></term>
+<listitem>
+<para>Write given string to a file.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@File.append(<parameter>file</parameter><parameter>string</parameter>)</function></term>
+<listitem>
+<para>Append given string to the end of a file.</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</sect2>
+
+<sect2 id="strings">
+<title>String Function Group</title>
+<variablelist>
+
+<varlistentry>
+<term><function>@String.length(<parameter>string</parameter>)</function></term>
+<listitem>
+<para>Return number of chars in the string.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.contains(<parameter>string</parameter>,<parameter>substring</parameter>)</function></term>
+<listitem>
+<para>Check if the string contains given substring.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.find(<parameter>string</parameter>)</function></term>
+<listitem>
+<para>Return position of a substring in the string, or -1 if it isn't found."</para>
+<note><para>This will have an optional integer start postion for find next uses in Alpha 6.</para></note>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.left(<parameter>string</parameter>, <parameter>int</parameter>)</function></term>
+<listitem>
+<para>Return first n chars of the string.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.right(<parameter>string</parameter>, <parameter>int</parameter>)</function></term>
+<listitem>
+<para>Return last n chars of the string.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.mid(<parameter>string</parameter>, <parameter>int start</parameter>, <parameter>int end</parameter>)</function></term>
+<listitem>
+<para>Return substring of the string, starting from given position.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.remove(<parameter>string</parameter>, <parameter>substring</parameter>)</function></term>
+<listitem>
+<para>Remove all occurences of a given substring.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.replace(<parameter>string</parameter>, <parameter>substring find</parameter>, <parameter>substring replace</parameter>)</function></term>
+<listitem>
+<para>Replace all occurences of a given substring with a given replacement.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.upper(<parameter>string</parameter>)</function></term>
+<listitem>
+<para>Convert the string to uppercase.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.lower(<parameter>string</parameter>)</function></term>
+<listitem>
+<para>Convert the string to lowercase.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.compare(<parameter>string</parameter>, <parameter>string</parameter>)</function></term>
+<listitem>
+<para>Compare two strings. Return 0 if they are equal, -1 if the first one is lower, 1 if the first one is higher</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.isEmpty(<parameter>string</parameter>)</function></term>
+<listitem>
+<para>Check if string is empty.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><function>@String.isNumber(<parameter>string</parameter>)</function></term>
+<listitem>
+<para>Check if string is a valid number.</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</sect2>
+
+<sect2 id="builtins">
+<title>Built-in Globals</title>
+<para>Built-in globals are accessed just like regular global variables with <function>@global</function>.</para>
+<variablelist>
+<varlistentry>
+<term><function>@global(_KDDIR)</function></term>
+<listitem>
+<para>The directory the current dialog is in.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><function>@global(_NAME)</function></term>
+<listitem><para>The name of the dialog</para></listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+</sect1>
diff --git a/doc/kommander/spinbox.png b/doc/kommander/spinbox.png
new file mode 100644
index 00000000..7ae20630
--- /dev/null
+++ b/doc/kommander/spinbox.png
Binary files differ
diff --git a/doc/kommander/statusbar.png b/doc/kommander/statusbar.png
new file mode 100644
index 00000000..ac08552d
--- /dev/null
+++ b/doc/kommander/statusbar.png
Binary files differ
diff --git a/doc/kommander/table.png b/doc/kommander/table.png
new file mode 100644
index 00000000..4bbd9c2d
--- /dev/null
+++ b/doc/kommander/table.png
Binary files differ
diff --git a/doc/kommander/tabwidget.png b/doc/kommander/tabwidget.png
new file mode 100644
index 00000000..1254bb63
--- /dev/null
+++ b/doc/kommander/tabwidget.png
Binary files differ
diff --git a/doc/kommander/textbrowser.png b/doc/kommander/textbrowser.png
new file mode 100644
index 00000000..090e2f84
--- /dev/null
+++ b/doc/kommander/textbrowser.png
Binary files differ
diff --git a/doc/kommander/textedit.png b/doc/kommander/textedit.png
new file mode 100644
index 00000000..823d0818
--- /dev/null
+++ b/doc/kommander/textedit.png
Binary files differ
diff --git a/doc/kommander/timer.png b/doc/kommander/timer.png
new file mode 100644
index 00000000..e2e17452
--- /dev/null
+++ b/doc/kommander/timer.png
Binary files differ
diff --git a/doc/kommander/toolbox.png b/doc/kommander/toolbox.png
new file mode 100644
index 00000000..2ab71dc7
--- /dev/null
+++ b/doc/kommander/toolbox.png
Binary files differ
diff --git a/doc/kommander/translating.docbook b/doc/kommander/translating.docbook
new file mode 100644
index 00000000..15db90bd
--- /dev/null
+++ b/doc/kommander/translating.docbook
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="translating">
+<chapterinfo>
+<authorgroup>
+<author>
+<firstname>András</firstname>
+<surname>Mantia</surname>
+<affiliation><address><email>amantia@kde.org</email></address></affiliation>
+</author>
+<author>
+<firstname>Michal</firstname>
+<surname>Rudolf</surname>
+<affiliation><address><email>mrudolf@kdewebdev.org</email></address></affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+<title>Translating &kommander; dialogs</title>
+
+<sect1 id="translation-howto">
+<title>Translating &kommander; dialogs</title>
+<para>
+&kommander; dialogs can be translated to different languages. The mechanism is similar to the translation of other &kde; applications. The dialog is written in English, the texts that are needed to be translated are specially marked. A tool extracts these strings, another tool can be used to translate them. The translation then can be compiled and installed and the dialog will automatically recognize and use it.
+</para>
+<para>
+Here is a short description about the needed steps to make a dialog translatable and translated it:
+<orderedlist>
+<listitem><para>How to prepare dialog to be translated?</para>
+<para>Always use <emphasis>@i18n("This is my text")</emphasis> when you use some English text. This marks "This is my text" as a text to be translated.</para>
+</listitem>
+
+<listitem><para>How to extract the messages and create the .po file?</para>
+<para>
+ Use the <command>kmdr2po</command> script to extract the strings. The script is inside the <emphasis>working</emphasis> directory of the source release tarball and should be installed to <command>$KDEDIR/share/apps/kommander/translating</command> as well.
+</para>
+<para>
+Just run:
+<screen>
+kmdr2po &lt;your-kommander-dialog.kmdr>
+</screen>
+An appropriate &lt;your-kommander-dialog.po> file will be created.
+</para>
+</listitem>
+
+<listitem>
+<para>How to translate it?</para>
+<para>Use <command>KBabel</command> to translate it. <command>Use msgfmt</command> to compile the translation. Look at <ulink url="http://i18n.kde.org">http://i18n.kde.org</ulink> for help on this subject.</para>
+</listitem>
+
+<listitem><para>How to install the translation?</para>
+<para>Put the compiled *.mo file either to</para>
+<para><command>$KDEDIR/share/locale/&lt;your language>/LC_MESSAGES/</command> (will be available globally for all users)</para>
+<para>or to </para>
+<para><command>$HOME/.kde/share/locale/&lt;your language>/LC_MESSAGES/</command> (will be available only for the current user)</para>
+<para>directory.</para>
+</listitem>
+</orderedlist>
+</para>
+
+<para>
+To open a different catalog (translation *.mo file) for a dialog, use the -c argument for kmdr-executor. The below example will take the translations from the Quanta translation file:
+<screen>
+kmdr-executor mydialog.kmdr -c quanta
+</screen>
+
+</para>
+</sect1>
+
+</chapter>
diff --git a/doc/kommander/tutorials.docbook b/doc/kommander/tutorials.docbook
new file mode 100644
index 00000000..095e9a28
--- /dev/null
+++ b/doc/kommander/tutorials.docbook
@@ -0,0 +1,380 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="tutorials">
+<chapterinfo>
+<title>Tips and Tutorials</title>
+<authorgroup>
+<author>
+<firstname>Eric</firstname>
+<surname>Laffoon</surname>
+<affiliation><address>
+<email>eric@kdewebdev.org</email>
+</address></affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>Tips on use &kommander;</title>
+<para>In this section we go beyond listing widgets to actually using &kommander;. If you want to have a good experience you will find this section very helpful.</para>
+
+<sect1 id="tutorial-editor">
+<title>Using the Editor</title>
+<para>
+At first glance the editor looks pretty obvious, and in many ways it is. Click on the icon to create a new form, then click a widget and click or click and drag on the form. There are the widget handles that will be familiar to anyone who ever put a picture in a word processing document. What is less obvious are the little things. One thing to mention up front is widget naming. Names must be unique and &kommander; employs a naming scheme of the formal widget name and a number unique to that widget type. You can rename a widget and &kommander; will not allow a duplicate name. However if you build a complex dialog and decide to start renaming you're going to have problems. Signals and slots will manage naming for you and any widget you change will be reflected in the signals and slots connections. Unfortunately we never got this feature in the widget functions. So ever call to that widget will be wrong. You could close the dialog and open it in a text editor like KWrite and do find and replace. A better solution is to start out with some idea what kind of descriptive names you want to give to key widgets. It may be a waste of time naming Labels, but scripts and container widgets for data quickly prove a real mistake not to name. You can also set icons for scripts making them even quicker to visually identify.
+</para>
+
+
+<sect2 id="tutorial-editor-tools">
+<title>Editor Tools</title>
+<para>
+The first thing you will notice is a properties window, generally docked on the left. Explore this! Here you will find many useful settings for forms and widgets. Some of them would be layout settings, icons, if something is active, text and more. For instance if you put a TreeWidget in a form you can change the default path separator, which is useful if you have data in there. It's easy for a slash to create a sub-item accidentally. Here you will also find selection modes, whether to highlight the whole row in multi column widgets and more. Before you assune something is just how &kommander; is check this.
+</para>
+<para>
+If you play with layouts and lose a widget behind another or off the form the object explorer will come in handy. It's also nice for seeing structure. The next very useful view is the log view which shows stdout and stderr. The error view is indispensable. This is where your debug() commands prints and where you get detailed information. For instance when using the database plugin this gives you additional information with data errors. It also shows you all shell calls and more. The Stdout view lets you see what would go to the shell or an application using this like Quanta. The dialog view is of little use unless you have a lot of dialogs open. The Action view is only active with MainWindow use and in that case it is the only way to add Actions, menu and toolbar items.
+</para>
+</sect2>
+
+<sect2 id="tututorial-add-tools">
+<title>Adding Custom Tools</title>
+<para>
+&kommander; makes it easy to add custom tools, which you can develop in &kommander;, to the editor. We will be shipping some with &kommander; as well as making some available for download. You can add your own easily. First have a look and see where they are. If they are installed they are on the tools menu below the splitter. The &kommander; menu offers access to widgets. The Custom menu offers access to installed plugins. The Editor menu is where your custom tools go. To manually add a tool first decide if you are going to make it available system wide or just to your desktop. System wide start from the directory KDE is installed in. For your desktop user start in the hidden KDE directory in your home directory, usually ~/kde. From either the path is/share/apps/kmdr-editor/editor/ If the dialog you add needs access to tools or files you can put them in a subdirectory. Whatever &kommander; dialogs you put there will be recognized and added to your menu on startup. Clicking the menu will load the dialog. You will note there is a templates directory there too and you can add templates for new dialogs.
+</para>
+</sect2>
+
+<sect2 id="included-tools">
+<title>Included custom tools</title>
+<para>
+Several tools are included with this release, already installed on the tools meu under editor. More tools are under development for project management, database front end development, code snippets and more. The most imporant and useful tool to look for is the examples dialog. As the editor is no longer under development for KDE3 it cannot insert a dialog in the current editor, but it will open any selected dialog in a new instance of the editor. There are old dialogs from the early days of &kommander;, tutorials from more recent development and the current section showing new features of this release. Looking at these should help. Keep an eye on our web site for more.
+</para>
+</sect2>
+
+<sect2 id="tutorial-layout">
+<title>Using Layout</title>
+<para>
+People love to share &kommander; dialogs. Almost without fail they don't know about laying them out. Make a dialog and then try resizing it and see what happens. Wouldn't it be nice if it behaved like it should instead of leaving your widgets the same? It gets worse when you share it and differences in fonts, monitor size and X pixel resolution conspire to make your masterpiece look like it was put together by a three year old using bubblegum and thumbtacks. Always, always always... Lay out your dialogs!
+</para>
+<para>
+Okay, you're sold you don't want a frustrated email from me asking you to please layout your dialog. How do you do it. There are layout buttons on the toolbar and the context menu. Since &kommander; is based on an older version of Qt Designer you can look at Qt Designer docs and tutorials here. I'm just going to mention a few basics and a few tips.
+</para>
+<itemizedlist>
+<listitem><para>Use the Grid. This will place everything in a <quote>best guess</quote> location</para></listitem>
+<listitem><para>Remember containers are separate. A TabWidget, GroupBox or layout group has it's own layout. So don't forget the window.</para></listitem>
+<listitem><para>Widgets that are not visible during execution can make layout seem more challenging. What to do with them? I recommend grouping them in their own layour next to or below your main layout. Your visible widgets will simply push these aside and give you a predictable result.</para></listitem>
+<listitem><para>Look at your properties were you can set a widget to expand or do other things as well as minimum and maximum size. A little experimentation will teach you a lot. You can also set a tighter spacing here,</para></listitem>
+</itemizedlist>
+<para>And now for a few tricks and tips.</para>
+<itemizedlist>
+<listitem><para>Along with basic layout you can use splitters. When your dialog is running you can drag the splitter up and down or right and left to get a better look at things. It may look like there is a limitation here or it doesn't work. It works and has no limitations. Just make sure to put multiple widgets into two layouts and make sure when you click or right click to get the layout and not just a child widget. You are free to create a maze of splitters as long as you adhere to the rules.</para></listitem>
+<listitem><para>Fake docs are possible! Create a GroupBox and drop widgets on it. Position it in your layout so that when it's invisible other widgets/layouts will expand to take it's place. Now toggle it's visibility with a button or menu. </para></listitem>
+<listitem><para>ToolBox tricks - The Toolbox has an editor bug where you can't add widget panels in the editor without it going nuts. As a result you need to add them at run time. However it looks for one widget and if you want something complex you should use a groupbox and lay it out. then layout your dialog with the groupbox at the outside, even if it goes off the edge of the window. Now load it on initialization into the ToolBox. Your window layout will snap into place.</para></listitem>
+<listitem><para>Layout glitches can occur where widgets set to something like Minimum/Expanding can end up obscured before you complete layout on the window. The layout system will honor your oddness and can be shrunk to obscure scrollbars and more. Make sure all is visible before finishing layout and consider not using minimum in that case.</para></listitem>
+</itemizedlist>
+<para>For more on this look up the Qt Designer docs for Qt 3.x.</para>
+</sect2>
+
+<sect2 id="signals-slots">
+<title>Signals and Slots</title>
+<para>
+One of the very useful features inherited from Qt Designer was signals and slots. Of course the interface has been redesigned in an attempt to make it friendly to &kommander;. Signals and slots are internal event control for Qt/KDE applications. We try to make it so you don't have to know the difference between C++ data types, but if you use the new function to create connections on the fly it is handy to be able to copy that information from the connection tool. Let's look at what all this means. Something happens in one of you widgets. It could be click on, double clicked, have it's value changed, something selected or a menu could be requested. That is just some of the possible events that would enable a signal to be sent. You may want to change the list in a ListBox if a new selection is made in a ComboBox. That's a useful feature in a sophisticated application and the only way to do it without having to press a button next is to have a signal connected to a slot. That slot could be in a script or button. When the slot receives the signal it goes about doing what it was told. There is a tool to edit these connections. Pay attention when do this as there are a good number of inherited signals and slots. Telling a script which is invisible when the dialog is run to adjust it's size by accident when you meant to execute will have you wondering what happened.
+</para>
+<para>
+To access the connection tool you can open it by right clicking anywhere on the dialog and selecting it. Click the menu and you will see a list of connections made at the bottom. Above that are two lists of signals and slots and above them the respective sender and receiver are selected. An easy way to make connections is visually. Look at the toolbar or the Tools menu. There are three items grouped there. A pointer, signals and slot connections and the tab order or widgets. Selecting this sets connection mode for the curios. Click on your widget to send the signal and drag it to your widget to receive it in a slot. As you do this you will see a line and drop indications on the widget under the mouse. The StatusBar on the Editor will tell you what is being connected.
+</para>
+<note><para>In version 1.3 there is a &kommander; function connect() which allows you to connect signals and slots on the fly. This is useful if you just used createWidget. Obviously you can't use the dialog for something &kommander; doesn't yet know exists. Unfortunately there are too many combinations to list so you have to type out signals and slots. <emphasis>These must be typed verbatim or they will fail.</emphasis> This is where the connection tool is handy again. Open it and select two widgets like the two you want to connect and read the connection information. if it says <command>execute(const QString&amp;)</command> that is exactly what you must type.</para></note>
+</sect2>
+
+<sect2 id="slot-functions">
+<title>Slot Functions</title>
+<para>
+As of version 1.3 &kommander; adds Slot functions. You can see this in the Function Browser, which is uncharacteristicly less than friendly with descriptions here. What &kommander; is doing is reading every slot registered for a given widget and making it available directly. This is very useful. For instance the Table widget doesn't have a default method to auto adjust column width. You may find this annoying, but if you look under slots there it is. The TextEdit is also lacking in built in functions for any real editing, but look under slots and there is anything you could wish for. You may have to reference some docs or just experiment. It is simply too difficult to document every slot available in builtin widgets and plugins. Most slots however are self explanatory.
+</para>
+</sect2>
+</sect1>
+
+<sect1 id="tutorial-basics">
+<title>Basic Tutorials</title>
+<para>
+Most of the information in this section is based on example dialogs some time ago, which unfortunately were not widely available as they were shipped with the source, but not installed. You should find them in your tools menu under examples in the <quote>tutorial</quote> section. Keep in mind most of these particular examples use the old parser. That is neither good nor bad. Most of the functionality in &kommander; is shared in both parsers. It's just each is particularly suited to do a better job with a given task. As &kommander; now defaults to the new parser you can set either one. Please see the <link linkend="new_parserdocs">New Parser docs</link> for more information on the two parsers.
+</para>
+<para>
+When examining example dialogs remember to look in the following places to see how things are done.
+</para>
+<itemizedlist>
+<listitem><para>Dialog Initialization - middle click on the dialog face or right click and select &kommander; Text. Here you see what is run when the dialog starts.</para></listitem>
+<listitem><para>Buttons - middle click the button, or right click. Scripts are typically here.</para></listitem>
+<listitem><para>Widgets - some widgets like Timers and Konsoles will hold instructions inside them.</para></listitem>
+<listitem><para><link linkend="signals-slots">Signals and Slots</link> - this is how Qt/KDE programs internally communicate. </para></listitem>
+</itemizedlist>
+<para>
+The following list of dialogs may be brief so as to focus on where more information is required to explain more complex tasks possible with &kommander;. They were copied from Michal's notes.
+</para>
+
+<sect2 id="tutorial-globals">
+<title>Globals</title>
+<para>Shows using global and setGlobal &DCOP; calls to provide global variables for script</para>
+<blockquote><para>
+Functions/concepts:
+- global
+- setGlobal
+- changeWidgetText
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-dcop">
+<title>&DCOP;</title>
+<para>Shows how to use both local and external &DCOP; calls to communicate with external application (here: KMail).</para>
+<blockquote><para>
+Functions/concepts:
+- external DCOP
+- addListItem
+- enableWidget
+- @selectedWidgetText
+- @widgetText
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorlal-slots">
+<title>Slots</title>
+<para>Shows how to us connections/slot to handle events. Both population and standard slots are used.</para>
+<note><para>Population text was originally developed before &kommander; DCOP, specials and scripting. Given that everything it does can be done in other ways and that it is easy to forget to look here for problems, along with the inherent difference of introducing an additional behavior to explain, this is a deprecated function. It is left in for illustration, however while &kommander; dialogs will be easy to port to KDE4 this feature is not assured to work in the future. <emphasis>Don't use it!</emphasis> </para></note>
+<blockquote><para>
+standard slots are used.
+- slots/connections
+- populate()
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-settings">
+<title>Settings</title>
+<para>Shows how to use @readSetting and @writeSetting functions to write/restore widget content. Also, show how to use populate() slot to initialize widget content.</para>
+<blockquote><para>
+Functions/concepts:
+- @readSetting
+- @writeSetting
+- populate()
+- slots/connections
+- destroy
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-append">
+<title>Append</title>
+<para>Shows how you can append text to TextEdit and how you can use it to display formatted text. See newer examples for how to use slots to edit rich text and new font and color dialogs too.</para>
+<blockquote><para>
+Functions/concepts:
+- changeWidetText
+- RichTextEdit
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-cmdline">
+<title>Command Line</title>
+<para>Shows how you can pass parameters to &kommander; dialog via command line. Also, shows how to change list content and button text. See the section on <link linkend="passargs">passing arguments</link> in the new parser for more on this.</para>
+<blockquote><para>
+Functions/concepts:
+- command-line arguments
+- global
+- changeWidgetText
+- addListItem
+- clearList
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-initialize">
+<title>Initialize</title>
+<para>
+Shows how you use 'initialization' to 'destroy' scripts of main dialog to initialize and store some settings.
+</para>
+<blockquote><para>
+Functions/concepts:
+- initialization
+- destroy
+- readSetting
+- writeSetting
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-array">
+<title>Array</title>
+<para>
+Shows how to use associative arrays to store and restore information
+associated with container items.</para>
+<blockquote><para>
+Functions/concepts:
+- @Array functions
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-strings">
+<title>Strings</title>
+<para>
+Shows how to use string-handling functions
+Functions/concepts:
+</para>
+<blockquote><para>
+- @String functions
+- rich text editor
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-tree">
+<title>Tree</title>
+<para>
+Shows how to use tree widget
+</para>
+<blockquote><para>
+- tree widget
+- FileSelector
+- initialization
+- env
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-widgets">
+<title>Widgets</title>
+<para>
+Shows how to get widget information
+</para>
+<blockquote><para>
+- type method
+- children method
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-statusbar">
+<title>StatusBar</title>
+<para>
+Shows how to use statusbar widget
+</para>
+<blockquote><para>
+- statusbar widget
+- populate
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-loop">
+<title>Loop</title>
+<para>
+Shows how to use internal loops
+</para>
+<blockquote><para>
+- for
+- forEach
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-calc">
+<title>Calc</title>
+<para>
+Shows how to use @expr function to do some calculations
+</para>
+<blockquote><para>
+- expr
+- String.replace
+</para></blockquote>
+<note><para>The @expr() function is no longer required in the new parser as expressions can be directly interpreted anywhere you would logically want to use them.</para></note>
+</sect2>
+
+<sect2 id="tutorial-picview">
+<title>Picview</title>
+<para>
+Shows how to use PixmapLabel widget using populate() function
+</para>
+<blockquote><para>
+- PixmapLabel
+- populate
+- FileSelector
+- slots/connections
+</para></blockquote>
+</sect2>
+
+<sect2 id="tutorial-table">
+<title>Table</title>
+<para>
+Shows how to use Table widget
+</para>
+<blockquote><para>
+- insertRow
+- insertColumn
+- currentRow
+- currentColumn
+- setColumnCaption
+- setRowCaption
+- removeRow
+- removeColumn
+</para></blockquote>
+</sect2>
+
+</sect1>
+
+<sect1 id="examples">
+<title>Current Examples</title>
+<para>
+These examples reflect the most recent development state of &kommander;. In its current state &kommander; has few limitations for developing small to medium applications. It certainly is not suitable for building a KWord clone, but for a simple editor, database frontend, GUI for commandline programs or any application in the spirit of Unix/Linux small applications it is a good choice. The examples presented here are intended to show the potential as well as how to work around limitations. There are some useful tricks included in these if you want to do a more capable small application with &kommander;. Remember &kommander; is not intended to do everything, but to do most things. For this concession you should be able to build something in &kommander; faster than other alternatives ad add GUI to scripting languages not otherwise supported in KDE.
+</para>
+<note><para>
+The examples are installed to <command>$KDEDIR/share/apps/kmdr-editor/editor</command>. In case you do not have them there, get from <ulink url="http://kommander.kdewebdev.org">our home page</ulink>, by downloading the latest release.
+</para>
+</note>
+
+<sect2 id="editor-poc">
+<title>editor-poc.kmdr</title>
+<para>
+The little dialog that grew into a Mainwindow. As &kommander; does not have a native MainWindow widget it has been assumed it only does dialogs. In fact only dialogs are officially supported... but you can run MainWindows in &kommander;. This is an example editor. If you want to create a MainWindow application in &kommander; just open Qt Designer and make one, save it and rename the *.ui file to a *.kmdr file. Now open it in &kommander; and do what you would do normally.
+</para>
+<note><para>As of this writing what is known not to work on the &kommander; side is the settings read and write. There is no Initialize or Destroy section as there is no &kommander; Text, however there are signals for this on the window, so the functionality is intact. On the MainWindow side it is not possible to talk to any actions via DCOP as these are QActions from Designer and KActions are not derived from QActions in KDE 3.x. This means a DCOP call to list actions or set states will not work. It is also not possible to talk to the Statusbar. Also submenus on the menubar and dropdown actions on the Toolbar will not work. Even though this is not a &kommander; widget, or officicially supported, it seems suitable for many small application uses.</para></note>
+<para>
+There is a quick help dialog this editor launches that discusses in depth what is happening inside.
+</para>
+</sect2>
+
+<sect2 id="example-key-value">
+<title>kevaluecombo.kmdr</title>
+<para>
+&kommander; can be used with databases and has an optional <ulink url="http://kommander.kdewebdev.org/releases.php#plugins">database plugin</ulink>. One shortcoming is not being able to store key/value pairs in the ComboBox. An ingenious trick was realized for this. It requires only that the content of the ComboBox not be changed unless it is done using the arrays that go with it. As this is commonly used with SQL in small data sets it's quite fast even to reload the whole Combobox. The inherent problem is that &kommander; does not have internally indexed arrays by default. This is compounded by the fact that to accommodate shell commands that return lines separated by newlines &kommander;'s array functions will load what is effectively an array of keys. Such an array can only be accessed with a foreach loop. This is the reason new indexed array functions were added. It is important to remember that these arrays are not self maintaining, but their insert and delete functions will help you.
+</para>
+<para>
+Getting back to the ComboBox, it will return selected text, but it also will return the current index. It does rigidly maintain a contiguous zero based array. That's the key. We loop through a data set with a zero based index counter and create two arrays, as &kommander; also cannot create arrays of arrays. It can however use an array value to represent a key just like any value could. .If you look at the included dialog the code actually managing this is in <quote>ScriptObject36</quote>. We will extract the key code here.
+</para>
+<screen>
+c = ListBox1.count-1
+for i = 0 to c do
+ array_indexedFromString("x", ListBox1.item(i))
+ _a[x[0]] = x[1]
+ _b[i] = x[0]
+ ComboBox10.insertItem(_a[_b[i]], i)
+end
+</screen>
+<para>
+There is more going on, like checking for duplicate keys, but this is the core. You can right click on the ListBox and try menu items. The net result is that it is using keyed index by proxy and returning both the key and the value. Use this code if you want to be 100% certain your key/value relationship is accurate.
+</para>
+</sect2>
+
+<sect2 id="kpart-demo">
+<title>Kpart demo</title>
+<para>
+As of Kommander 1.3 Kommander automatically makes KParts using the libkommander_part.la. In addition to this there is a KPart plugin which allows Kommander to load plugins. Being curious developers we tried loading a Kommander part into Kommander. Why do that? Why not? The results were interesting and are demonstrated here. One interesting thing is the parent part can directly access all of the child part. While this is handy it has a down side. Any child widget being called with the same name as a parent widget will cause a lock up! In addition to that the DCOP interface is generated all over again for the part which wipes out the parent interface and disables most of the old parser functionality as well as Kommander specific DCOP to the parent. This is too difficult to fix for the remaining life of the KDE3 version. Even with these limitations and cautions this can be useful, if used carefully. The example files to look at this are in the current examples as kpartmwframe.kmdr and kpartpart.kmdr. Remember you will need the KPart plugin to fully run this example.
+</para>
+<para>
+You can also load KMail, KOrganizer and many other KDE applications right into Kommander, of course without the problems. KHTML and KDE's file manager widgets seem not to have some functionality but there is a special KHTML plugin if you really want to incorporate a browser.
+</para>
+</sect2>
+<sect2 id="example-passed-params">
+<title>passvariables.kmdr</title>
+<para>
+As of &kommander; 1.3 you can pass and return variables with scripts. This dialog demonstrates that. Look carefully at the content of the buttons. You will see that neither button directly writes to any of the LineEdit boxes receiving text from the script. While one is written directly from the script another is written with the content passed from the button. The third is not written at all but passed back in a return() function where it is received by the button and written. This is also shown on the right side using PHP so you can see how this might work with Python, Ruby, Perl or even a less commonly used language like Rexx. Languages that Speak DCOP can do a lot more in &kommander; too. The point of this demo is the freedom provided. &kommander; does not have functions, yet it does. Create a script, declare some globals if you like, pass some parameters to another script and return a value. For an intentionally simplified GUI scripting tool that is capable behavior. This behavior is only in the new parser and is documented <link linkend="passargs">here</link>.
+</para>
+</sect2>
+
+<sect2 id="tableselect">
+<title>tableselect.kmdr</title>
+<para>
+This example demonstrates how to use the new select function in the table widget. It is now possible to get four coordinates to enable a block selection. This also shows how it would have had to be done prior to this function. and how to use the parameters passed to a script. In addition this demonstrates a simple block copy and paste function for a table as well as summation of a block.
+</para>
+</sect2>
+
+</sect1>
+</chapter>
diff --git a/doc/kommander/widgets.docbook b/doc/kommander/widgets.docbook
new file mode 100644
index 00000000..fa187cfc
--- /dev/null
+++ b/doc/kommander/widgets.docbook
@@ -0,0 +1,599 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<sect1 id="widgets">
+<sect1info>
+<title>Widgets</title>
+</sect1info>
+
+<title>Widgets</title>
+
+<para>
+The building blocks of a &kommander; dialog are the widgets. They are like any other widget in the &Qt; and &kde; libraries except they have some extra functionality that allows them to have a <quote>text association</quote>. Text is associated with a state of the widget or its populate slot. The number of states depends on the widget. If a widget only has one state, that state is called default.
+</para>
+
+<note>
+<para>The main dialog has two special states for &kommander; text. They are Initialization and Destroy. These are run when the dialog is initialized and when it is destroyed. These protect against what is know as <quote>race</quote> problems on open and mean that you do not require any special procedures on close to manage housekeeping.</para>
+<para>In case of using a MainWindow based application (created with &Qt; Designer), there are no Initialization and Destroy states, instead the <emphasis>initialize</emphasis> and <emphasis>destroy</emphasis> signals can be used to get information when is the application constructed or closed</para>
+</note>
+
+<para>
+Below are the standard &kommander; widgets. Each of them has numerous functions, you can learn about them by looking at the widget functions in the <guilabel>Function Browser</guilabel>. Many of them have signals and slots as well, documentation about these methods can be found in the &Qt; and &kde; API documentation. Each &kommander; widget has a note about its base widget.
+</para>
+
+<variablelist>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="label.png" format="PNG" />
+</imageobject></inlinemediaobject>
+Label
+</term>
+<listitem>
+<para>
+A simple widget that contains a piece of text. This widget lets you set a pixmap too.
+</para>
+<para>
+See the QLabel documentation to learn more about text labels in &Qt;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="pixlabel.png" format="PNG" />
+</imageobject></inlinemediaobject>
+PixmapLabel
+</term>
+<listitem>
+<para>
+A simple widget that contains an image or text label. The pixmap to display is set in the pixmap property. The text is set in the text property. Only one of these properties can be set at the same time (I think, I can't get the editor to set both at the same time). If scaledContents is set to true the image will be scaled to fit the size of the widget. The format of the text can be set with the textFormat property.
+</para>
+<para>
+See the QLabel documentation to learn more about text labels in &Qt;.
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="lineedit.png" format="PNG" />
+</imageobject></inlinemediaobject>
+LineEdit
+</term>
+<listitem>
+<para>
+A LineEdit widget is a one line text editor. It allows the user to enter and modify a single line of text. Initial text for the editor can be set in the text property. The widget can be set to read-only with the readOnly property. There are 3 modes for the widget, Normal, NoEcho, and Password. The mode is set with the echoMode property.
+</para>
+<para>
+LineEdit has one state, default.
+</para>
+<para>
+The widget text for LineEdit is the text contained in the editor.
+</para>
+<para>
+See the KLineEdit documentation to learn more about text labels in &kde;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="multilineedit.png" format="PNG" />
+</imageobject></inlinemediaobject>
+TextEdit
+</term>
+<listitem>
+<para>
+A simple multi-line text editor.
+</para>
+<para>
+See the KTextEdit documentation to learn more about multiline text edit in &kde;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="textbrowser.png" format="PNG" />
+</imageobject></inlinemediaobject>
+TextBrowser
+</term>
+<listitem>
+<para>
+A simple reach text browser with hyperlink navigation.
+</para>
+<para>
+See the KTextBrowser documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="listbox.png" format="PNG" />
+</imageobject></inlinemediaobject>
+ListBox
+</term>
+<listitem>
+<para>
+A ListBox widget provides a list of selectable items. Normally one or no items are selected. This behavior can be changed with the selectionMode property. Items are added to the ListBox using the edit window.
+</para>
+<para>
+A ListBox has only one state, default.
+</para>
+<para>
+The widget text for a ListBox is the items contained in the ListBox. @selectedWidgetText will return only the items that are currently selected.
+</para>
+<para>
+See the KListBox documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="combobox.png" format="PNG" />
+</imageobject></inlinemediaobject>
+ComboBox
+</term>
+<listitem>
+<para>
+ComboBox is a selection widget that combines a button and a pop-up menu. It shows the user's current choice from a list of options in minimal space. Items are added to the list using the edit window. If the editable property is set to true the user can enter arbitrary strings.
+</para>
+<para>
+ComboBox has one state, default.
+</para>
+<para>
+The widget text for a ComboBox is the text of the selected item.
+</para>
+<para>
+See the KComboBox documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="listview.png" format="PNG" />
+</imageobject></inlinemediaobject>
+TreeWidget
+</term>
+<listitem>
+<para>
+A widget that provides a list in the form of a tree structure. You can add child items and multi-column data. The current limitation is that you cannot modify columns. To add a child node use <quote>/</quote> as a separator. To add column data use the escaped tab <quote>\t</quote> character between columns.
+</para>
+<para>
+See the KListView documentation to learn more about it.
+</para>
+
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="table.png" format="PNG" />
+</imageobject></inlinemediaobject>
+Table
+</term>
+<listitem>
+<para>
+A table widget that support different widgets in its cells.
+</para>
+<para>
+See the QTable documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="pushbutton.png" format="PNG" />
+</imageobject></inlinemediaobject>
+ExecButton
+</term>
+<listitem>
+<para>
+A button that when clicked executes its text association. The label on the button is set with the text property. Output from the text association (how to say that) will be echoed to stdout if the writeStdout property is set to true. The button can be the default action for the dialog if the default property is set to true.
+</para>
+<para>
+ExecButton has one state, default.
+</para>
+<para>
+There isn't widget text associated with ExecButton.
+</para>
+<para>
+See the KPushButton documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="closebutton.png" format="PNG" />
+</imageobject></inlinemediaobject>
+CloseButton
+</term>
+<listitem>
+<para>
+A button that when clicked, executes its text association and then closes the dialog. The label on the button is set with the text property. Output from the text association (how to say that) will be echoed to stdout if the writeStdout property is set to true. The button can be the default action for the dialog if the default property is set to true.
+</para>
+<para>
+CloseButton has one state, default.
+</para>
+<para>
+There isn't any widget text associated with a CloseButton.
+</para>
+<para>
+See the KPushButton documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="konsole.png" format="PNG" />
+</imageobject></inlinemediaobject>
+Konsole
+</term>
+<listitem>
+<para>
+A widget that captures the output of scripts in a text browser. The default state is executed and the output of those commands (internal or external) are shown in the widget.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="lineedit.png" format="PNG" />
+</imageobject></inlinemediaobject>
+FileSelector
+</term>
+<listitem>
+<para>
+The FileSelector widget combines a LineEdit with a button when clicked will present the user with dialog for the selection of files/folders. The file/folder selected is stored in the LineEdit. The type of the FileSelector is set with the selectionType property. Available types are Open, Save, and Directory. Multiple files/folders can be selected if the selectionOpenMutliple property is set to true. A caption for the FileChooser can be set with the selectionCaption property. This is display as the window title of the dialog. If a caption isn't specified, the type of selection will be display in the title. The files displayed in the dialog can be limited using the selectionFilter property.
+</para>
+<para>
+FileSelector has one state, default.
+</para>
+<para>
+The widget text for a FileSelector is the text contained in the LineEdit (the file chosen by the user).
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="checkbox.png" format="PNG" />
+</imageobject></inlinemediaobject>
+CheckBox
+</term>
+<listitem>
+<para>
+A button that can be checked on and off. It can also be semi-checked if the tristate property is set to true. The label associated with the CheckBox is set in the text property. Setting the checked property will have the CheckBox initially checked.
+</para>
+<para>
+A CheckBox has 3 states, checked, semichecked, and unchecked.
+</para>
+<para>
+The widget text for a CheckBox is the value from the text property.
+</para>
+<para>
+See the KCheckBox documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="radiobutton.png" format="PNG" />
+</imageobject></inlinemediaobject>
+RadioButton
+</term>
+<listitem>
+<para>
+A button that can be checked or unchecked, usually used in the ButtonGroup to make an exclusive choice. A label associated with the button can be set in the text property. A button can be initialized to checked by setting the checked property to true. If all RadioButtons in a ButtonGroup have the checked property set to true, then the last button will be the one that is checked.
+</para>
+<para>
+RadioButton has 2 states checked and unchecked.
+</para>
+<para>
+There is no widget text associated with a RadioButton.
+</para>
+<para>
+See the KRadioButton documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="buttongroup.png" format="PNG" />
+</imageobject></inlinemediaobject>
+ButtonGroup
+</term>
+<listitem>
+<para>
+A container to organize buttons into a group. An optional title can be set using the title property. The frame can be adjusted with the lineWidth property. The button group can be set to exclusive by setting the exclusive property to true. This means when one toggle button is clicked all other toggle buttons will be set to off with the exception of radio buttons that are always mutual exclusive even if the group is non-exclusive. Radio buttons can be set to non-exclusive using the radioButtonExclusive property. (I am not so sure that this property actually works.)
+</para>
+<para>ButtonGroup has one state, default.</para>
+<para>
+The widget text for a ButtonGroup is the text associations for each of the buttons in the order they appear in the ButtonGroup.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="groupbox.png" format="PNG" />
+</imageobject></inlinemediaobject>
+GroupBox
+</term>
+<listitem>
+<para>
+A container widget that holds other widgets. The frame is adjusted with the lineWidth property. A title can be added by setting the title property.
+</para>
+<para>
+GroupBox has one state, default.
+</para>
+<para>
+The widget text for GroupBox is the text associations of each of the widgets it contains combined. They will be in the order they appear inside of the GroupBox.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="tabwidget.png" format="PNG" />
+</imageobject></inlinemediaobject>
+TabWidget
+</term>
+<listitem>
+<para>
+A widget that provides multiple tabs each may contain other widgets.
+</para>
+<para>
+See the KTabWidget documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="spinbox.png" format="PNG" />
+</imageobject></inlinemediaobject>
+SpinBoxInt
+</term>
+<listitem>
+<para>
+A widget that allows the user to change a integer value by either press up and down arrows or entering a value into the box. Minimum and maximum values for the widget can be set with the minValue and maxValue properties. The specialValueText property is used to set a text value that will be displayed instead of the minimum value.
+</para>
+<para>
+This widget has only one state, default.
+</para>
+<para>
+The widget text for a SpinBoxInt is the currently displayed integer.
+</para>
+<para>
+See the QSpinBox documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="slider.png" format="PNG" />
+</imageobject></inlinemediaobject>
+Slider
+</term>
+<listitem>
+<para>
+A widget that provides horizontal or vertical slider.
+</para>
+<para>
+See the QSlider documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="richtextedit.png" format="PNG" />
+</imageobject></inlinemediaobject>
+RichTextEditor
+</term>
+<listitem>
+<para>
+This widgets provides a text editor that allows for simple text formatting.
+</para>
+<para>
+RichTextEditor has one state, default.
+</para>
+<para>
+The widget text for RichTextEditor is the text contained in the editor in rich text format. Selected text can be returned with @selectedWidgetText.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="statusbar.png" format="PNG" />
+</imageobject></inlinemediaobject>
+StatusBar
+</term>
+<listitem>
+<para>
+A widget to display status information, usually used at the bottom of the dialogs.
+</para>
+<para>
+See the KStatusBar documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="progress.png" format="PNG" />
+</imageobject></inlinemediaobject>
+ProgressBar
+</term>
+<listitem>
+<para>
+A widget to display progress information.
+</para>
+<para>
+See the KProgress documentation to learn more about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="shellscript.png" format="PNG" />
+</imageobject></inlinemediaobject>
+ScriptObject
+</term>
+<listitem>
+<para>
+This is a pseudo-widget, it does not appear when the dialog is run. It can be though about as a function. A ScriptObject holds code that can be executed anytime from the dialog by calling its <emphasis>execute</emphasis> function. Arguments can be passed to the ScripObject with the above method and accessed inside the ScriptObject as <emphasis>@Self.item(0), @Self.item(1), etc.</emphasis> if using the old style parsing or <emphasis>Self.item(0, Self.item(1), etc.</emphasis> with the new parser.
+</para>
+<para>
+Signals can be connected to the <emphasis>execute</emphasis> function as well, as it acts also as a slot.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="timer.png" format="PNG" />
+</imageobject></inlinemediaobject>
+Timer
+</term>
+<listitem>
+<para>
+This is a pseudo-widget, it does not appear when the dialog is run. It can be used to perform an action after a specified time once, or regularly. Set the timeout <guilabel>interval</guilabel> in milliseconds, choose if it should run once (<guilabel>singleShot</guilabel>) or not. Connect its <emphasis>timeout</emphasis> signal to a slot, which will be executed once the specified time passes.
+</para>
+<para>
+The timer is not started by default, run the <emphasis>execute</emphasis> function to start it.
+</para>
+<para>
+See the QTimer documentation to learn more.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="datepicker.png" format="PNG" />
+</imageobject></inlinemediaobject>
+DatePicker
+</term>
+<listitem>
+<para>
+A widget used to select a date. The default date can be set in the <guilabel>date</guilabel> property or with the <emphasis>setText</emphasis> function in ISO format: <emphasis>YYYY-MM-DD</emphasis>.
+</para>
+<para>
+The widget text is the currently displayed date.
+</para>
+<para>
+See the KDatePicker documentation to learn more.
+</para>
+<note><para>New in Kommander 1.3.</para></note>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="kommander.png" format="PNG" />
+</imageobject></inlinemediaobject>
+AboutDialog
+</term>
+<listitem>
+<para>
+This is a pseudo-widget, it does not appear when the dialog is run. It stores information about the application, the authors, the license. Shows the about dialog
+when the <emphasis>execute</emphasis> function is called.
+<warning><para>The <emphasis>initialize</emphasis> function must be called before anything else, including the <emphasis>execute</emphasis> function.</para></warning>
+</para>
+<note><para>New in Kommander 1.3.</para></note>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="kfontcombo.png" format="PNG" />
+</imageobject></inlinemediaobject>
+FontDialog
+</term>
+<listitem>
+<para>
+A pseudo-widget, that can be used to get a font selection dialog. The default font can be set with the <emphasis>setFont</emphasis> function, and the selected font's properties retrieved with the <emphasis>family, pointSize, bold, italic</emphasis> functions. The dialog is shown when the <emphasis>execute</emphasis> function is called.
+</para>
+<note><para>New in Kommander 1.3.</para></note>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="contents.png" format="PNG" />
+</imageobject></inlinemediaobject>
+PopupMenu
+</term>
+<listitem>
+<para>
+A pseudo-widget, that can be used to display a menu. Use the <emphasis>insert...</emphasis> functions to add menu entries. Whenever the user clicks on a menu entry, the specified <emphasis>executeWidget</emphasis>'s <emphasis>execute</emphasis> function will be run. It is possible to connect the menu entries to the popupmenu's own <emphasis>execute</emphasis> function, in which case the text assigned to the <emphasis>default</emphasis> state is run. When adding menu items you can assign an index to them and handle the all the items on a menu in the menu widget as the request passes this index back. To see how this works look at the current example <link linkend="example-key-value">keyvaluecombo.kmdr</link> included with this release. To find it look on the tools menu of the editor for the examples dialog.
+</para>
+<para>To show the menu, use <emphasis>popup</emphasis> slot. Usually this is connected to another widget's <emphasis>contextMenuRequested</emphasis> signal.</para>
+<para>A menu can contain other PopupMenu submenus.</para>
+<note><para>New in Kommander 1.3.</para></note>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<inlinemediaobject><imageobject>
+<imagedata fileref="toolbox.png" format="PNG" />
+</imageobject></inlinemediaobject>
+ToolBox
+</term>
+<listitem>
+<para>
+A container widget, like TabWidget. It has several pages, each page can hold other widgets.
+</para>
+<warning><para>This widget has an editor bug that does not affect it's use in execution, but does affect it's use in the editor. If you try to add pages in the editor it will become unreadable. Don't do this. If you want to use the ToolBox please use fill the widget on the fly using the <command>addWidget</command> command. If there is time an example will be added to the 1.3 release, or check the web site.</para></warning>
+<para>See the QToolBox documentation to learn more about it.</para>
+<note><para>New in Kommander 1.3.</para></note>
+</listitem>
+</varlistentry>
+
+
+</variablelist>
+</sect1>
diff --git a/doc/kxsldbg/1downarrow.png b/doc/kxsldbg/1downarrow.png
new file mode 100644
index 00000000..b8a8b0ff
--- /dev/null
+++ b/doc/kxsldbg/1downarrow.png
Binary files differ
diff --git a/doc/kxsldbg/Makefile.am b/doc/kxsldbg/Makefile.am
new file mode 100644
index 00000000..41691557
--- /dev/null
+++ b/doc/kxsldbg/Makefile.am
@@ -0,0 +1,3 @@
+KDE_LANG = en
+KDE_DOCS = AUTO
+
diff --git a/doc/kxsldbg/breakpoints_window.png b/doc/kxsldbg/breakpoints_window.png
new file mode 100644
index 00000000..b4033935
--- /dev/null
+++ b/doc/kxsldbg/breakpoints_window.png
Binary files differ
diff --git a/doc/kxsldbg/callstack.docbook b/doc/kxsldbg/callstack.docbook
new file mode 100644
index 00000000..20c46fab
--- /dev/null
+++ b/doc/kxsldbg/callstack.docbook
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sect1 id="callstack">
+<sect1info>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</sect1info>
+
+<title>Working With the Callstack</title>
+
+<para>
+All call stack items found are listed here. The older the callstack entry
+the lower the frame number it will have. See below for an example.</para>
+
+<screenshot>
+<screeninfo>The Callstack Window</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="callstack_window.png" format="PNG" />
+</imageobject>
+<textobject><phrase>The Callstack Window</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+<para>
+Clicking on a callstack entry in the list shown will cause the cursor in
+the main window to move to the file and line number indicated.
+</para>
+</sect1>
+
diff --git a/doc/kxsldbg/callstack_window.png b/doc/kxsldbg/callstack_window.png
new file mode 100644
index 00000000..0bccd8e5
--- /dev/null
+++ b/doc/kxsldbg/callstack_window.png
Binary files differ
diff --git a/doc/kxsldbg/configure.png b/doc/kxsldbg/configure.png
new file mode 100644
index 00000000..37fd0bc6
--- /dev/null
+++ b/doc/kxsldbg/configure.png
Binary files differ
diff --git a/doc/kxsldbg/configure_window.png b/doc/kxsldbg/configure_window.png
new file mode 100644
index 00000000..3910c99f
--- /dev/null
+++ b/doc/kxsldbg/configure_window.png
Binary files differ
diff --git a/doc/kxsldbg/credits.docbook b/doc/kxsldbg/credits.docbook
new file mode 100644
index 00000000..0bd018d6
--- /dev/null
+++ b/doc/kxsldbg/credits.docbook
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<chapter id="credits-and-licenses">
+<chapterinfo>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</chapterinfo>
+<title>Credits and Licenses</title>
+
+<para>&kxsldbg; &copy; 2004 Keith Isdale</para>
+<para>Documentation &copy; 2004 Keith Isdale</para>
+
+
+<itemizedlist>
+<title>Thanks to:</title>
+<listitem>
+<para>
+The writers the <application>libxml</application> and
+<application>libxslt</application>.
+</para>
+</listitem>
+<listitem>
+<para>
+Robert Jacolin for feedback on earlier version of &kxsldbg;.
+</para>
+</listitem>
+<listitem>
+<para>
+Igor Zlatkovic for creating WIN32 binaries of
+<application>libxml/xslt</application> and &xsldbg;.
+</para>
+</listitem>
+</itemizedlist>
+&underFDL;
+&underGPL;
+
+</chapter>
diff --git a/doc/kxsldbg/entities.docbook b/doc/kxsldbg/entities.docbook
new file mode 100644
index 00000000..1f680971
--- /dev/null
+++ b/doc/kxsldbg/entities.docbook
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sect1 id="entities">
+<sect1info>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</sect1info>
+<title>Working With &XML; Data Files (Entities)</title>
+
+<para> If the inspector dialog is not showing use the <menuchoice>
+<guimenu>Tools</guimenu> <guimenuitem>Show inspectors</guimenuitem>
+</menuchoice> menu item. To work with entities click on the
+<guilabel>Entities</guilabel> tab of dialog shown. </para>
+
+<para> All external &XML; entities included via the DATA file or one
+of its siblings are listed here. For this example I have run &kxsldbg;
+on <filename>testdoc.xsl</filename> with
+<filename>testdoc.xml</filename> (found in the
+<filename role="directory">&lt;KDE PREFIX&gt;/share/apps/kxsldbg</filename> folder so that you can see some entities.</para>
+
+<screenshot>
+<screeninfo>The Entities Window</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="entities_window.png" format="PNG" />
+</imageobject>
+<textobject><phrase>The Entities Window</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+<para>
+Clicking on a entity entry in the list shown will cause the cursor in the
+main window to move to the start of the file indicated.
+</para>
+</sect1>
diff --git a/doc/kxsldbg/entities_window.png b/doc/kxsldbg/entities_window.png
new file mode 100644
index 00000000..29d57f6b
--- /dev/null
+++ b/doc/kxsldbg/entities_window.png
Binary files differ
diff --git a/doc/kxsldbg/exit.png b/doc/kxsldbg/exit.png
new file mode 100644
index 00000000..6ea935d1
--- /dev/null
+++ b/doc/kxsldbg/exit.png
Binary files differ
diff --git a/doc/kxsldbg/glossary.docbook b/doc/kxsldbg/glossary.docbook
new file mode 100644
index 00000000..4a980984
--- /dev/null
+++ b/doc/kxsldbg/glossary.docbook
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<glossary id="glossary">
+<glossaryinfo>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</glossaryinfo>
+
+<glossdiv>
+<title>Keywords</title>
+<glossentry id="xsldbg-glosref">
+<glossterm>&xsldbg;</glossterm>
+<glossdef>
+<para>
+See <ulink url="http://xsldbg.sourceforge.net"></ulink>.
+</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>XPath</glossterm>
+<glossdef>
+<para>
+A valid expression that defines what data is required. See
+<ulink url="http://www.w3.org">W3C web site</ulink>.
+</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>QName</glossterm>
+<glossdef>
+<para>
+A fully qualified name. For example, <emphasis>xsl:myvariable</emphasis>.
+See <ulink url="http://www.w3.org">W3C web site</ulink>
+</para>
+</glossdef>
+</glossentry>
+</glossdiv>
+</glossary>
diff --git a/doc/kxsldbg/index.docbook b/doc/kxsldbg/index.docbook
new file mode 100644
index 00000000..8b52c114
--- /dev/null
+++ b/doc/kxsldbg/index.docbook
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+ <!ENTITY kxsldbg "<application>KXSLDbg</application>">
+ <!ENTITY kappname "&kxsldbg;">
+ <!ENTITY package "quanta">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ <!ENTITY configure-section SYSTEM "kxsldbg_configure.docbook">
+ <!ENTITY mainwindow-section SYSTEM "kxsldbg_mainwindow.docbook">
+ <!ENTITY inspector-section SYSTEM "kxsldbg_inspector.docbook">
+ <!ENTITY tools-section SYSTEM "kxsldbg_tools.docbook">
+ <!ENTITY credits-chapter SYSTEM "credits.docbook">
+ <!ENTITY callstack SYSTEM "callstack.docbook">
+ <!ENTITY entities SYSTEM "entities.docbook">
+ <!ENTITY sources SYSTEM "sources.docbook">
+ <!ENTITY templates SYSTEM "templates.docbook">
+ <!ENTITY variables SYSTEM "variables.docbook">
+ <!ENTITY xsldbg "<application>xsldbg</application>">
+ <!ENTITY DTD "<acronym>DTD</acronym>">
+ <!ENTITY XSD "<acronym>XSD</acronym>">
+ <!ENTITY XSLT "<acronym>XSLT</acronym>">
+]>
+
+<book lang="&language;">
+
+<bookinfo>
+<title>The &kxsldbg; Handbook</title>
+
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+
+<copyright>
+<year>2002</year>
+<year>2003</year>
+<year>2004</year>
+<holder>Keith Isdale</holder>
+</copyright>
+
+<legalnotice>&FDLNotice;</legalnotice>
+<date>2004-11-18</date>
+<releaseinfo>0.5</releaseinfo>
+
+<abstract>
+<para>
+&kxsldbg; is a provides a graphic user interface front-end to
+&xsldbg;, which supports
+debugging of &XSLT; scripts.
+</para>
+</abstract>
+
+<keywordset>
+<keyword>KDE</keyword>
+<keyword>xsldbg</keyword>
+<keyword>libxslt</keyword>
+<keyword>debugger</keyword>
+</keywordset>
+</bookinfo>
+
+<chapter id="introduction">
+<title>Introduction</title>
+
+<sect1 id="features">
+<title>Features</title>
+
+<para>
+&kxsldbg; provides access to most of &xsldbg;'s commands to
+
+<itemizedlist>
+<listitem>
+<para>
+Set and modify breakpoints
+</para>
+</listitem>
+<listitem>
+<para>
+Display value of XPaths
+</para>
+</listitem>
+<listitem>
+<para>
+Display information about the templates, variables,
+callstack entries, stylesheets and entities present
+</para>
+</listitem>
+<listitem>
+<para>
+Set and modify breakpoints and variables
+</para>
+</listitem>
+<listitem>
+<para>
+Move around &XSL; source and &XML; document via XPaths
+</para>
+</listitem>
+<listitem>
+<para>
+Lookup PUBLIC and SYSTEM ID's in the current &XML; catalog
+</para>
+</listitem>
+</itemizedlist>
+</para>
+</sect1>
+
+<sect1 id="new-features">
+<title>Recently added features</title>
+<para>&kxsldbg; can now
+</para>
+<itemizedlist>
+<listitem>
+<para>
+Set and modify variables
+</para>
+</listitem>
+<listitem>
+<para>
+Renders the text in the main window using the &kate; libraries
+</para>
+</listitem>
+</itemizedlist>
+</sect1>
+
+
+</chapter>
+
+<chapter id="using-kxsldbg">
+<title>Using &kxsldbg;</title>
+&configure-section;
+&mainwindow-section;
+&inspector-section;
+&variables;
+&callstack;
+&templates;
+&sources;
+&entities;
+&tools-section;
+</chapter>
+
+&credits-chapter;
+
+</book>
diff --git a/doc/kxsldbg/kxsldbg_configure.docbook b/doc/kxsldbg/kxsldbg_configure.docbook
new file mode 100644
index 00000000..115cd4d3
--- /dev/null
+++ b/doc/kxsldbg/kxsldbg_configure.docbook
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sect1 id="configure">
+<sect1info>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</sect1info>
+
+<title>Configuring a &kxsldbg; Session</title>
+
+<para>
+You start configuration by clicking
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Configure</guimenuitem>
+</menuchoice> in the Menubar.
+</para>
+
+<screenshot>
+<screeninfo>The Configuration Dialog</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="configure_window.png" format="PNG" />
+</imageobject>
+<textobject><phrase>The Configuration Dialog</phrase></textobject>
+<caption><para>The Configuration Dialog.</para></caption>
+</mediaobject>
+</screenshot>
+
+<sect2>
+<title>Getting Started</title>
+
+<para>
+To be able to run a stylesheet you need to specify the:
+<itemizedlist mark="bullet">
+<listitem><para>&XSL; source</para></listitem>
+<listitem><para>&XML; data</para></listitem>
+<listitem><para>Output file</para></listitem>
+</itemizedlist>
+</para>
+
+<para> By using the <guibutton>...</guibutton> button to choose file
+desired. The <guilabel>&XSL; source</guilabel> and <guilabel>>&XML; data</guilabel> may refer
+to URI that contains a http://, ftp:// or file://. The <guilabel>Output file</guilabel>
+must refer to a writable local file.</para>
+<para>
+To follow along with the examples, select the following files in the
+example <filename role="directory">&lt;KDE PREFIX&gt;/share/apps/kxsldbg</filename> folder
+<itemizedlist mark="bullet">
+<listitem><para>&XSL; source: testdoc.xsl</para></listitem>
+<listitem><para>&XML; data: testdoc.xml</para></listitem>
+<listitem><para>Output file: /tmp/xsldbg_output.txt</para></listitem>
+</itemizedlist>
+</para>
+</sect2>
+
+<sect2>
+<title>Working With Options</title>
+
+<para>
+You can select zero or more options from the <guilabel>Options</guilabel> dialog. Each option has a tooltip with a hint on what effect it has.
+</para>
+</sect2>
+
+<sect2>
+<title>Working With Parameters</title>
+
+<para>
+You can add zero or more parameters via the <guilabel>LibXSLT Parameters</guilabel>
+section of dialog. This allows you to provide parameter values to the
+stylesheet.
+</para>
+
+<para>
+For example you could add a enter a <guilabel>Parameter name</guilabel> of <parameter>myparam</parameter>
+with a <guilabel>Parameter value</guilabel> of <parameter>'Hello World!'</parameter> and click the <guibutton>Add</guibutton> button.
+. To update the value of an existing
+parameter just use the navigate to the value you wish to change with the <guibutton>Prev</guibutton> or <guibutton>Next</guibutton> button, provide a new <guilabel>Parameter value</guilabel> then click the <guibutton>Apply</guibutton>.
+</para>
+</sect2>
+
+<sect2>
+<title>Apply Changes</title>
+
+<para>
+For the changes you have made to take effect press the <guibutton>Apply</guibutton>
+button. To ignore any changes press the <guibutton>Cancel</guibutton> button.
+</para>
+
+<para>
+You can close the dialog using the <guibutton>X</guibutton> provided at the top right of the window. If you need to change the configuration just re-open the
+configuration dialog as shown before.
+</para>
+</sect2>
+</sect1>
diff --git a/doc/kxsldbg/kxsldbg_inspector.docbook b/doc/kxsldbg/kxsldbg_inspector.docbook
new file mode 100644
index 00000000..ec9995bc
--- /dev/null
+++ b/doc/kxsldbg/kxsldbg_inspector.docbook
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sect1 id="breakpoints">
+<sect1info>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</sect1info>
+<title>Setting and Modifying Breakpoints</title>
+
+<para>
+The primary way to work with breakpoints is via the main window. See
+<xref linkend="mainwindow-section"/>
+</para>
+
+<para>
+Once you have started the style sheet, you can use the
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Show inspectors</guimenuitem>
+</menuchoice>
+menu item. Then click on the Breakpoints tab. See below for an example.
+</para>
+
+<screenshot>
+<screeninfo>Setting Breakpoints</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="breakpoints_window.png" format="PNG" />
+</imageobject>
+<textobject><phrase>Setting Breakpoints</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+<sect2>
+<title>Adding a Breakpoint</title>
+
+<para>
+You can add a breakpoint by supplying any of:</para>
+<orderedlist>
+<listitem><para>a file and line number</para>
+</listitem>
+<listitem><para>a template name</para>
+</listitem>
+<listitem><para>a template name and a mode name</para>
+</listitem>
+<listitem><para>a mode name</para>
+</listitem>
+</orderedlist>
+
+
+<para>
+And then pressing the <guibutton>Add</guibutton> button.
+</para>
+</sect2>
+
+<sect2>
+<title>Argument Details</title>
+
+<para>
+A file name may be absolute path to a local file. Or partial file (&eg;
+<filename>xsldoc.xsl</filename>).
+</para>
+
+<para>
+A template or mode name may is fully Qualified Name where the non-local
+part is optional &eg; <emphasis>xsl:mytemplate</emphasis> is matched by
+<emphasis>mytemplate</emphasis>
+</para>
+</sect2>
+
+<sect2>
+<title>Deleting a Breakpoint</title>
+
+<para>
+Firstly left mouse click the breakpoint you want to delete in the list of
+current breakpoints. Then click the <guibutton>Delete</guibutton> button.
+</para>
+</sect2>
+
+<sect2>
+<title>Deleting All Breakpoints</title>
+
+<para>
+Click the <guibutton>Delete All</guibutton> button.
+</para>
+</sect2>
+
+<sect2>
+<title>Enabling or Disabling a Breakpoint</title>
+
+<para>
+Firstly &LMB; click the breakpoint you want to delete in the list of
+current breakpoints. Then click the <guibutton>Enable</guibutton> button.
+</para>
+</sect2>
+</sect1>
diff --git a/doc/kxsldbg/kxsldbg_mainwindow.docbook b/doc/kxsldbg/kxsldbg_mainwindow.docbook
new file mode 100644
index 00000000..3dcd3a55
--- /dev/null
+++ b/doc/kxsldbg/kxsldbg_mainwindow.docbook
@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sect1 id="mainwindow-section">
+<sect1info>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</sect1info>
+<title>Using the Main Window</title>
+
+<screenshot>
+<screeninfo>The Main Window</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="main_window.png" format="PNG"/>
+</imageobject>
+<textobject><phrase>A text view of the current file being debugged</phrase></textobject>
+<caption><para>A text view of the current file being debugged.</para></caption>
+</mediaobject>
+</screenshot>
+
+<sect2>
+<title>Working With the Main Window</title>
+
+<para>
+The state of a given breakpoint is indicated via the relevant text with a different background color.
+You can choose the color desired: see the
+<menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure
+Editor</guimenuitem></menuchoice> dialog, on the
+<guilabel>Colors</guilabel> page.</para>
+
+
+<para>You can set, disable or delete a breakpoint using keys, the <guimenu>Debug</guimenu> menu or the buttons on the tool bar.</para>
+
+<para>You can move the cursor around the text using the following keys:</para>
+
+<simplelist>
+<member>Arrow keys: <keysym>Left Arrow</keysym>, <keysym>Right Arrow</keysym>, <keysym>Up Arrow</keysym> or <keysym>Down Arrow</keysym>.</member>
+<member>Page keys: <keycap>Page Up</keycap> or <keycap>Page Down</keycap></member>
+
+</simplelist>
+
+</sect2>
+
+<sect2>
+<title>Working With &kxsldbg; Output</title>
+
+<para>
+Most of the output from &kxsldbg; is captured and presented either in the
+inspectors dialog or the &kxsldbg; output window. The exceptions to this rule
+are:</para>
+<itemizedlist>
+<listitem>
+<para>An error message that comes from &kxsldbg; is displayed inside a message dialog.</para>
+</listitem>
+<listitem>
+<para>The result of evaluating an expression is displayed in a message dialog.</para>
+</listitem>
+<listitem>
+<para>The output of search is sent to the file indicated in the &kxsldbg; output window.</para>
+</listitem>
+</itemizedlist>
+
+</sect2>
+
+<!-- FIXME: There's way too many things wrong with this, for people to
+bother translating it just yet. We can fix post 3.2
+
+Specifically: Wrong icon images, all keybindings are incorrect, all
+keybindings in the app are unmodified and therefore will probably be
+changed, and this isn't the ideal place to put a toolbar ref anyway.
+
+Plan: Add a menu ref chapter, include an updated toolbar ref in it
+
+<sect2>
+<title>&kxsldbg; Toolbar</title>
+
+<variablelist>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="configure.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Configure</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Configuration for a session, <xref linkend="configure"/>
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="configure.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Inspect</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+To be written.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="run.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Run</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Restart execution applying current configuration.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="1downarrow.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Continue</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Continue execution stoping at next breakpoint. This will cause the
+debugger to stop at the start of the stylesheet if no further breakpoints
+are found.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="step.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Step</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Step to the next XSLT instruction found.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="next.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Next</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Proceed to the next instruction at the same call stack depth. This is
+useful for stepping over a <emphasis>xsl:apply-templates</emphasis> or
+<emphasis>xsl:call-template</emphasis>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_stepup.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>StepUp</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Proceed to the next instruction in a cooler stack frame. This is best
+used within a template at a greater depth than the root match template.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_stepdown.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>StepDown</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Proceed to the next instruction in a warmer stack frame.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_break.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Break</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Add a breakpoint at the current cursor location
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_delete.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Delete</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Delete a breakpoint at the current cursor location
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_enable.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Enable/Disable</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Enable or disable a breakpoint at the current cursor location
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_source.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Source</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Cause the current XSLT source file to be shown
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_data.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Data</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Cause the current &XML; data file to be shown
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_output.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Output</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Cause the current Output file to be shown
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guiicon>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="xsldbg_refresh.png" />
+</imageobject>
+</inlinemediaobject>
+</guiicon>
+<guimenu>Debug</guimenu>
+<guimenuitem>Reload</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Cause the displayed file to be reloaded from disk
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</sect2>
+-->
+
+</sect1>
diff --git a/doc/kxsldbg/kxsldbg_tools.docbook b/doc/kxsldbg/kxsldbg_tools.docbook
new file mode 100644
index 00000000..0fa7ae8a
--- /dev/null
+++ b/doc/kxsldbg/kxsldbg_tools.docbook
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sect1 id="tools-section">
+<sect1info>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</sect1info>
+
+<title>Miscellenous Tools</title>
+
+<para>
+Several tools are available via the tools menu the main tool is the
+inspector tool.
+</para>
+
+<sect2>
+<title>Inspector Tool</title>
+
+<para>
+The inspector tool is the contains all the individual dialogs for working
+with:</para>
+<itemizedlist>
+<listitem><para>Breakpoints</para></listitem>
+<listitem><para>Templates</para></listitem>
+<listitem><para>Variables</para></listitem>
+<listitem><para>Callstack entries</para></listitem>
+<listitem><para>&XSL; source files</para></listitem>
+<listitem><para>&XML; Enties</para></listitem>
+</itemizedlist>
+
+</sect2>
+
+<sect2>
+<title>Execute by Walking</title>
+
+<para>By clicking on <guimenuitem>Start execution with
+walking</guimenuitem> menu a dialog is shown to allow the walk speed
+to be chosen.</para>
+
+<screenshot>
+<screeninfo>The Walk Window</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="walk_window.png" format="PNG"/>
+</imageobject>
+<textobject><phrase>The Walk Window</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+<para>To stop walking either use the <keycap>W</keycap> key or select the
+<guimenuitem>Start execution with walking</guimenuitem> menu item.</para>
+</sect2>
+
+<sect2>
+<title>Lookup &XML; Entities</title>
+
+<para>To lookup a System ID in the current &XML; catalog
+use the <guimenuitem>Lookup System ID</guimenuitem> menu then enter the
+value to find the the dialog that displays.</para>
+
+<screenshot>
+<screeninfo>The System ID Window</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="systemid_window.png" format="PNG"/>
+</imageobject>
+<textobject><phrase>The System ID Window</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+<para>To lookup a PUBLIC ID use the <guimenuitem>Lookup Public
+ID</guimenuitem> menu entry then enter the value to find the the dialog that
+displays.</para>
+
+<screenshot>
+<screeninfo>The Public ID Window</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="publicid_window.png" format="PNG"/>
+</imageobject>
+<textobject><phrase>The Public ID Window</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+</sect2>
+</sect1>
diff --git a/doc/kxsldbg/main_window.png b/doc/kxsldbg/main_window.png
new file mode 100644
index 00000000..970459a5
--- /dev/null
+++ b/doc/kxsldbg/main_window.png
Binary files differ
diff --git a/doc/kxsldbg/next.png b/doc/kxsldbg/next.png
new file mode 100644
index 00000000..00d4fd9d
--- /dev/null
+++ b/doc/kxsldbg/next.png
Binary files differ
diff --git a/doc/kxsldbg/publicid_window.png b/doc/kxsldbg/publicid_window.png
new file mode 100644
index 00000000..01af4d04
--- /dev/null
+++ b/doc/kxsldbg/publicid_window.png
Binary files differ
diff --git a/doc/kxsldbg/run.png b/doc/kxsldbg/run.png
new file mode 100644
index 00000000..e9b35a28
--- /dev/null
+++ b/doc/kxsldbg/run.png
Binary files differ
diff --git a/doc/kxsldbg/sources.docbook b/doc/kxsldbg/sources.docbook
new file mode 100644
index 00000000..ecfb658e
--- /dev/null
+++ b/doc/kxsldbg/sources.docbook
@@ -0,0 +1,44 @@
+<sect1 id="sources-section">
+<sect1info>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</sect1info>
+<title>Working With &XSLT; Source Files (Sources)</title>
+
+<para>
+If the inspector dialog is not showing use the
+<menuchoice>
+<guimenu>Tools</guimenu>
+
+<guimenuitem>Show inspectors</guimenuitem>
+</menuchoice>
+menu item. To work with sources click on the sources tab of dialog shown.
+</para>
+
+<para>
+All &XSLT; source files that are included by the &XSLT; file or one of its
+siblings are listed here.</para>
+
+<screenshot>
+<screeninfo>The Sources Window</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="sources_window.png" format="PNG" />
+</imageobject>
+<textobject><phrase>The Sources Window</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+<para>
+Clicking on a source entry in the list shown will cause the cursor in the
+main window to move to the start of file indicated.
+</para>
+</sect1>
diff --git a/doc/kxsldbg/sources_window.png b/doc/kxsldbg/sources_window.png
new file mode 100644
index 00000000..14e9d3da
--- /dev/null
+++ b/doc/kxsldbg/sources_window.png
Binary files differ
diff --git a/doc/kxsldbg/step.png b/doc/kxsldbg/step.png
new file mode 100644
index 00000000..a0e64fc0
--- /dev/null
+++ b/doc/kxsldbg/step.png
Binary files differ
diff --git a/doc/kxsldbg/systemid_window.png b/doc/kxsldbg/systemid_window.png
new file mode 100644
index 00000000..04b7be70
--- /dev/null
+++ b/doc/kxsldbg/systemid_window.png
Binary files differ
diff --git a/doc/kxsldbg/templates.docbook b/doc/kxsldbg/templates.docbook
new file mode 100644
index 00000000..bdd0bdd2
--- /dev/null
+++ b/doc/kxsldbg/templates.docbook
@@ -0,0 +1,34 @@
+<sect1 id="templates">
+<title>Working With Templates</title>
+
+<para>
+If the inspector dialog is not showing use the
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Show inspectors</guimenuitem>
+</menuchoice>
+menu item. To work with templates click on the templates tab of dialog
+shown.
+</para>
+
+<para>
+All templates found are listed here. Please note that the export rules of
+&XSLT; apply. So only there may be more than one template with the same
+match and mode details.</para>
+
+<screenshot>
+<screeninfo>The Templates Window</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="templates_window.png" format="PNG"/>
+</imageobject>
+<textobject><phrase>The Templates Window</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+<para>
+Clicking on a template entry in the list shown will cause the cursor in
+the main window to move to the file and line number indicated.
+</para>
+</sect1>
+
diff --git a/doc/kxsldbg/templates_window.png b/doc/kxsldbg/templates_window.png
new file mode 100644
index 00000000..f20f798f
--- /dev/null
+++ b/doc/kxsldbg/templates_window.png
Binary files differ
diff --git a/doc/kxsldbg/variables.docbook b/doc/kxsldbg/variables.docbook
new file mode 100644
index 00000000..7cdd1cdf
--- /dev/null
+++ b/doc/kxsldbg/variables.docbook
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sect1 id="variables">
+<sect1info>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</sect1info>
+
+<title>Working With Variables</title>
+
+<para>
+If the inspector dialog is not showing use the
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Show inspectors</guimenuitem>
+</menuchoice>
+menu item.
+</para>
+
+<para>
+Local and global variables are show in a tab on the inspector dialog.
+The following example shows a XSLT code segment that declares a global and a local variable
+</para>
+<informalexample>
+<programlisting>
+ &lt;xsl:variable name="globalvariable" select="'foo'"/&gt;
+
+ &lt;xsl:template match="/"/&gt;
+ &lt;xsl:param name="localvariable" select="'bar'"/&gt;
+ &lt;/xsl:template match="/"/&gt;
+</programlisting>
+</informalexample>
+<para>
+Clicking with with mouse on a variable in the list will cause summary
+information to be displayed in the bottom of the dialog. If a variable has
+ a select expression, for example
+</para>
+<informalexample>
+<programlisting>
+ &lt;xsl:variable name="changeable" select="'oldValue'" /&gt;
+</programlisting>
+</informalexample>
+<para>
+then a new XPath an be choosen by entering a new value
+ for <guilabel>Variable expression</guilabel> then clicking the <guibutton>Set expression</guibutton> button.</para>
+
+<screenshot>
+<screeninfo>The Variables tab</screeninfo>
+<mediaobject>
+<imageobject>
+<imagedata fileref="variables_window.png" format="PNG" />
+</imageobject>
+<textobject><phrase>The Variables Tab</phrase></textobject>
+<caption><para>The Variables Tab</para></caption>
+</mediaobject>
+</screenshot>
+
+<para>
+Clicking on a variable entry in the list shown will cause the cursor in
+the main window to move to the file and line number indicated.
+</para>
+</sect1>
diff --git a/doc/kxsldbg/variables_window.png b/doc/kxsldbg/variables_window.png
new file mode 100644
index 00000000..d90cb92d
--- /dev/null
+++ b/doc/kxsldbg/variables_window.png
Binary files differ
diff --git a/doc/kxsldbg/walk_window.png b/doc/kxsldbg/walk_window.png
new file mode 100644
index 00000000..b30ce81b
--- /dev/null
+++ b/doc/kxsldbg/walk_window.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_break.png b/doc/kxsldbg/xsldbg_break.png
new file mode 100644
index 00000000..68657082
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_break.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_data.png b/doc/kxsldbg/xsldbg_data.png
new file mode 100644
index 00000000..8feb8c2e
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_data.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_delete.png b/doc/kxsldbg/xsldbg_delete.png
new file mode 100644
index 00000000..fbe766c2
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_delete.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_enable.png b/doc/kxsldbg/xsldbg_enable.png
new file mode 100644
index 00000000..56c5e5c8
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_enable.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_output.png b/doc/kxsldbg/xsldbg_output.png
new file mode 100644
index 00000000..5c8fdc53
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_output.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_refresh.png b/doc/kxsldbg/xsldbg_refresh.png
new file mode 100644
index 00000000..0297288e
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_refresh.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_source.png b/doc/kxsldbg/xsldbg_source.png
new file mode 100644
index 00000000..17618fe8
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_source.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_stepdown.png b/doc/kxsldbg/xsldbg_stepdown.png
new file mode 100644
index 00000000..3430b61e
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_stepdown.png
Binary files differ
diff --git a/doc/kxsldbg/xsldbg_stepup.png b/doc/kxsldbg/xsldbg_stepup.png
new file mode 100644
index 00000000..3170b14c
--- /dev/null
+++ b/doc/kxsldbg/xsldbg_stepup.png
Binary files differ
diff --git a/doc/quanta/Makefile.am b/doc/quanta/Makefile.am
new file mode 100644
index 00000000..febd406e
--- /dev/null
+++ b/doc/quanta/Makefile.am
@@ -0,0 +1,3 @@
+KDE_LANG = en
+KDE_DOCS = $(package)
+KDE_MANS = AUTO
diff --git a/doc/quanta/adv-quanta.docbook b/doc/quanta/adv-quanta.docbook
new file mode 100644
index 00000000..d3a142ac
--- /dev/null
+++ b/doc/quanta/adv-quanta.docbook
@@ -0,0 +1,623 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="advanced-quanta-3-2">
+<chapterinfo>
+<title>Advanced Features</title>
+<authorgroup>
+<author>
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>Advanced Features</title>
+
+<para>
+This chapter outlines the advanced features of &quantaplus; and how to use
+them.
+</para>
+
+<sect1 id="xml-tools-3-2">
+<title>&XML; Tools</title>
+
+<para>
+The 3.2 release of &quantaplus; brings with it many new &XML; tools and
+features. The tools are unique in their integration within &quantaplus;.
+All of these tools use <application>Kommander</application> as a front-end and
+<application>libxml2</application> and <application>libxslt</application>
+as a back-end. The combination of these makes for fast, efficient,
+productive, and complete tools.
+</para>
+
+<sect2 id="kde-db-3-2">
+<title>&kde; Documentation Tools</title>
+
+<para>
+&quantaplus; supports &kde;'s two main documentation tools:
+<command>meinproc</command> and <command>checkXML</command>.
+</para>
+
+<sect3 id="meinproc-3-2">
+<title><command>meinproc</command></title>
+
+<para>
+Anyone who has worked with &kde; documentation knows
+<command>meinproc</command> and how superb it is. Well, take it up a notch
+with a great graphical interface! No longer resort to a shell; just click
+the icon that resembles a processor and you are done!
+</para>
+
+<variablelist>
+<varlistentry>
+<term><guilabel>Current Working Folder</guilabel></term>
+<listitem>
+<para>
+This application expects an <filename>index.docbook</filename>
+file to be present in a folder. If <filename>index.docbook</filename>
+is in the current working folder, then simply leave <guilabel>Current Working
+Folder</guilabel> checked. If it is not, then uncheck <guilabel>Current Working Folder</guilabel>
+and enter the folder you wish to process in the <guilabel>Other Folder</guilabel> field.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<note>
+<para>
+Outputted files are placed in the same folder as the sources files.
+All &HTML; files are removed each time
+<command>meinproc</command> is ran.
+</para>
+</note>
+
+</sect3>
+
+<sect3 id="checkxml-3-2">
+<title><command>checkXML</command></title>
+
+<para>
+Again, anyone who has worked with &kde; documentation knows this
+helpful application. Again, &quantaplus; provides a great little graphical
+front-end to this one.
+</para>
+
+<variablelist>
+<varlistentry>
+<term><guilabel>Current Working Folder</guilabel></term>
+<listitem>
+<para>
+If the currently opened file is the <filename>index.docbook</filename>
+file, then simply leave <guilabel>Current Working Folder</guilabel> checked.
+If it is not, then uncheck <guilabel>Current Working Folder</guilabel> and
+enter the folder of where <filename>index.docbook</filename> can be found.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<note>
+<title>Output</title>
+<para>
+If there is output, then your file is invalid. Please correct the reported
+errors and try again.
+</para>
+</note>
+</sect3>
+</sect2>
+
+<sect2 id="xmlval-3-2">
+<title>&XML; Validation</title>
+
+<para>
+&quantaplus; has a great &XML; validation tool, which uses a
+<command>xmllint</command> back-end.
+</para>
+
+<variablelist>
+<varlistentry>
+<term><guilabel>Current File</guilabel></term>
+<listitem>
+<para>
+If the file to be validated is currently focused on in &quantaplus;, then
+simply leave <guilabel>Current File</guilabel> checked. If it is not, then
+uncheck <guilabel>Current File</guilabel> and select the file to be
+validated from the Other File file selector.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Well-formed Checking</guilabel></term>
+<listitem>
+<para>
+If you only wish to know only if the file is well-formed, click the
+<guilabel>Well-formed Checking Only</guilabel> check box.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Definition &URI;</guilabel></term>
+<listitem>
+<para>
+If you are using a &DTD; and it is specified within the &XML; file, then
+select &DTD; (Internal) (default), else select &DTD; (External) and locate
+the &DTD; with the Definition &URI; file selector. Both &W3C; &XML;
+Schema and RelaxNG validation are required to be
+externally defined via the <guilabel>Definition &URI;</guilabel> file selector.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="xsltproc-3-2">
+<title>&XSL; Processing</title>
+
+<para>
+Yep, &quantaplus; has a &XSL; processing tool, too! This uses the
+<command>xsltproc</command> tool provided with
+<application>libxml2</application>.
+</para>
+
+<variablelist>
+<varlistentry>
+<term><guilabel>Current File</guilabel></term>
+<listitem>
+<para>
+If the file to be processed is currently focused on in &quantaplus;, then
+simply leave <guilabel>Current File</guilabel> checked. If it is not,
+then uncheck <guilabel>Current File</guilabel> and select the file to be
+processed from the <guilabel>Other File</guilabel> selector.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Stylesheet</term>
+<listitem>
+<para>
+Select the &XSL; file that you wish to be used.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Output file name</guilabel></term>
+<listitem>
+<para>
+Enter the name of the file that you want the resulting file to be called.
+File is outputed to your home folder by default.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<note>
+<para>
+This application lacks flexibility. Sorry, we will do better next time.
+</para>
+</note>
+</sect2>
+
+</sect1>
+
+<!-- <sect1 id="kfilereplace-3-2">
+<title>KFileReplace</title>
+
+<para>
+KFileReplace is a terrific new addition to &quantaplus;. It allows one to
+quickly replace strings over multiple files in only a few clicks of the
+mouse. Imagine you have converted all your GIF images to PNG images
+(hasn't everyone done this already?), only the extension has changed, and
+you have the &lt;img /> tag scattered throughout 50 XHTML files. Are you
+going to do a Find &amp; Replace on every file? Surely not when you can do
+them all at the same time! This is only one of the many situations where
+you will find KFileReplace a seriously helpful tool. This section will show
+you how to use this wonderful feature.
+</para>
+
+<sect2 id="using-kfr-3-2">
+<title>Using KFileReplace</title>
+
+<para>
+With all these wonderful features KFileReplace has, surely you are
+incredibly interested in how to use it! Well, make sure your swim suit
+is on tight, because we are about to dive in!
+</para>
+
+<sect3 id="start-kfr-3-2">
+<title>Starting KFileReplace</title>
+
+<para>
+You will find KFileReplace in two places: &quantaplus;' main toolbar and the
+menubar (Plugins -> KFileReplace). It is represented by this icon:
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="kfr-icon.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>.
+By executing it from either location, you will be presented with the New
+Search &amp; Replace Project dialog.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="kfr-new-dialog.png" format="PNG" />
+</imageobject>
+<caption><para>KFileReplace's New Search &amp; Replace Project dialog.</para></caption>
+</mediaobject>
+
+</sect3>
+
+<sect3 id="replace-string-kfr-3-2">
+<title>Replacing Strings in Files Over Multiple Folders</title>
+
+
+<para>
+Your boss just gave word that:
+
+<orderedlist numeration="arabic">
+<listitem>
+<para>all image formats will be PNG from now on;</para>
+</listitem>
+<listitem>
+<para>all current images must be converted to PNG;</para>
+</listitem>
+<listitem>
+<para>and it all needs to be done in one hour.</para>
+</listitem>
+</orderedlist>
+
+<quote>One hour!?!?</quote> you think to yourself. <quote>It'll take at
+least 45 minutes to convert the images!</quote> Calm down. Convert
+the images, load up your project, and fire up KFileReplace. Filter for
+only the file types you want to change. Press the <inlinemediaobject>
+<imageobject><imagedata format="PNG" fileref="" /></imageobject>
+</inlinemediaobject> and for, say GIF images, .gif for the string to
+replace and .png for the replacement string.
+</para>
+
+</sect3>
+</sect2>
+</sect1> -->
+
+<sect1 id="kparts-3-2">
+<sect1info>
+<title>Using Plugins</title>
+<authorgroup>
+<author>
+<firstname>Mathieu</firstname>
+<surname>Kooiman</surname>
+<affiliation>
+<address><email>quanta@map-is.nl</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</sect1info>
+
+<title>Using Plugins</title>
+
+<sect2 id="what-is-a-plugin-3-2">
+<title>What is a Plugin?</title>
+
+<para>
+&quantaplus; is able to load plugins, which are KParts. The
+KPart framework is another very powerfull framework of &kde;. A KPart is a
+relatively small, reusable container of functionality. It allows &kde;
+developers to easily build on the work of other programmers. One
+example of this is &quantaplus; itself. The editor &quantaplus; uses is
+the &kate; KPart. The &kate; KPart already had a bunch of functionality that
+&quantaplus; needed, like syntax highlighting. Integrating it into
+&quantaplus; allowed the &quantaplus; developers to focus on what
+&quantaplus; should be able to do, rather than facing the many problems
+that developing a new editor KPart/component from scratch would bring.
+</para>
+
+<para>
+The plugins &quantaplus; loads might have nothing to do with &quantaplus;
+itself. This makes it a very powerful plugin system. You can benefit from
+extra functionality and need not to wait until someone integrates it into
+&quantaplus;! The plugins can be loaded into a number of &GUI; elements.
+More on this below.
+</para>
+
+</sect2>
+
+<sect2 id="plugin-dialog-3-2">
+<title>Understanding the Edit Plugin Dialog</title>
+
+<para>To install a Plugin or KPart we will work from the
+<menuchoice>
+<guimenu>Plugins</guimenu>
+<guimenuitem>Edit</guimenuitem>
+</menuchoice> menu. This will bring up the following dialog:
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata format="PNG" fileref="plugin-edit.png" />
+</imageobject>
+<caption><para>The Edit Plugin dialog.</para></caption>
+</mediaobject>
+
+<para>
+This dialog lets you manage all defined plugins and lets you add new ones.
+We will describe each &GUI; element in here:
+
+<variablelist>
+<varlistentry>
+<term><guilabel>Search paths</guilabel></term>
+<listitem>
+<para>
+Here you can fill in a search path. When adding a plugin without a
+<guilabel>Location</guilabel>, &quantaplus; will search these paths to
+find the plugin.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Add</guilabel></term>
+<listitem>
+<para>
+This will bring up a dialog which allows you to add a new plugin.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Configure</guilabel></term>
+<listitem>
+<para>
+This will allow you to change the settings of a particular plugin.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Remove</guilabel></term>
+<listitem>
+<para>
+Removes the currently selected plugin.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Refresh</guilabel></term>
+<listitem>
+<para>
+Refreshes the dialog's contents.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+<para>Read <xref linkend="configure-plugins" /> to learn more about plugins.</para>
+</sect2>
+</sect1>
+<sect1 id="team-members">
+ <title>Team Development</title>
+ <para>Often a project has more than one people working on it and there is some kind of hierarchical relationsship between them. &quantaplus; supports the notion of team members and they are configurable in the
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Shift;<keycap>F7</keycap></keycombo>
+</shortcut>
+<guimenu>Project</guimenu>
+<guimenuitem>Project Properties</guimenuitem>
+</menuchoice> dialog.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata format="PNG" fileref="team-editing.png" />
+ </imageobject>
+ <caption><para>The team member editor dialog</para></caption>
+ </mediaobject>
+ <para>
+ The <guilabel>Name</guilabel>, <guilabel>Email</guilabel> entries are self explaining. <guilabel>Nickname</guilabel> is the nick of the user and acts as an unique identifier.
+ </para>
+ <para><guilabel>Role</guilabel> specifies the role of the member in the project and can be one of the following:
+<itemizedlist>
+<listitem><para>
+<guilabel>Team leader</guilabel>
+</para></listitem>
+<listitem><para>
+<guilabel>Subproject Leader</guilabel>
+</para></listitem>
+<listitem><para>
+<guilabel>Task Leader</guilabel>
+</para></listitem>
+<listitem><para>
+<guilabel>Simple Member</guilabel>
+</para></listitem>
+</itemizedlist>
+</para>
+<para><guilabel>Task</guilabel> is a description of the task assigned to this member.</para>
+<para><guilabel>Subproject</guilabel>: you can select a list of subproject. Subprojects can be configured and created by pressing the <guilabel>Edit subprojects</guilabel> button. Each subproject has a user visible name and a location entry, the later specifying a relative path to a directory under the project tree. This means that a subproject is a directory under the main project. For example the main project can be the website of your company, while a subproject can be the website for the intranet, located under the <filename path="intranet">intranet</filename> folder in the project.</para>
+<para>One member can have more than one role in the project, like both team leader and subproject leader.</para>
+<para>The user should select who is himself from the list of the team members. This is possible by selecting a team member from the list and pressing the <guilabel>Set to Yourself</guilabel> button. The currently selected member (your identity) appears in bold after the <guilabel>You are:</guilabel> text.</para>
+<para>Nicknames and setting yourself is important regarding messaging and annotations. See <xref linkend="annotations"/> to learn more about annotations.</para>
+<para>Aside of keeping track of your team, there is one more benefit of setting up the team members: you can configure an event to inform the team leaders when some action happens. See <xref linkend="event-actions"/> about how to do it.</para>
+</sect1>
+<sect1 id="event-actions">
+ <title>Event Actions</title>
+ <para>Event actions are actions executed when some event happens in the project. An example would be logging when the project was opened and closed, so it can be later reviewed how much one worked on it, or sending a mail when a file is saved, or adding the file to the CVS with the help of a script when the file is added to the project and the list could continue.</para>
+ <para>On the <guilabel>Event Configuration</guilabel> page of the
+ <menuchoice>
+ <shortcut>
+ <keycombo action="simul">&Shift;<keycap>F7</keycap></keycombo>
+ </shortcut>
+ <guimenu>Project</guimenu>
+ <guimenuitem>Project Properties</guimenuitem>
+ </menuchoice> dialog you can create, edit and delete the event actions.
+</para>
+<mediaobject>
+ <imageobject>
+ <imagedata format="PNG" fileref="event-editing.png" />
+ </imageobject>
+ <caption><para>The event editor dialog</para></caption>
+</mediaobject>
+<para>The entries in the dialog are:</para>
+<variablelist>
+<varlistentry>
+<term><guilabel>Event</guilabel></term>
+<listitem><para>the action is executed when the event selected from the list happens. The event names are self explanatory.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Action</guilabel></term>
+<listitem><para>
+the type of the executed action. The possible choices are
+</para>
+<variablelist>
+<varlistentry>
+<term><guilabel>Non-script action</guilabel></term>
+<listitem><para>an action that is not a user defined script action. See <xref linkend="user-actions" /> for user action.
+</para>
+<para><guilabel>Action name</guilabel> specifies the action to be executed when the event happens.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+ <term><guilabel>Send email</guilabel></term>
+ <listitem><para>an email is sent when the action happens to the recipient selected in the <guilabel>Receiver</guilabel> list. The recipient can be a team or subproject leader. See <xref linkend="team-members" /> for defining such leaders.
+ </para>
+ </listitem>
+</varlistentry>
+<varlistentry>
+ <term><guilabel>Log event</guilabel></term>
+ <listitem><para>the event is logged in a file. The arguments for this action are:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><guilabel>Log file</guilabel></term>
+ <listitem><para>the filename with full path</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Detail</term>
+ <listitem><para>How much information will the log contain</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><guilabel>Behavior</guilabel></term>
+ <listitem><para>Whether to create/overwrite the existing log file or append the new logged event to it.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </listitem>
+</varlistentry
+ >
+<varlistentry>
+<term><guilabel>Script action</guilabel></term>
+<listitem><para>an user defined script action. See <xref linkend="user-actions" /> for user action.
+ </para>
+ <para><guilabel>Action name</guilabel> specifies the action to be executed when the event happens.</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</listitem>
+</varlistentry>
+</variablelist>
+<para>The other entries depend on the <guilabel>Action</guilabel> type as they were described.
+</para>
+</sect1>
+
+<sect1 id="annotations">
+<title>Annotations</title>
+<para>Annotations are special comments in the documents. They differ from regular comments by the following things:
+<itemizedlist>
+<listitem><para>
+the information is collected by Quanta and shown in the <guilabel>Annotations</guilabel> toolview.
+</para></listitem>
+<listitem><para>
+the information can be addressed to a team member
+</para></listitem>
+</itemizedlist>
+</para>
+<para>Entering annotations is simple. You can either use the <guilabel>Annotate</guilabel> entry from the editor context menu or enter the <emphasis>@annotation</emphasis> keyword in a comment area followed by the annotation text.
+<example><title>Annotation example in XML</title><screen>
+&lt;!-- @annotation It is possible that this code is wrong. --&gt;</screen>
+<screen>
+&lt;!-- @annotation
+ Multiline
+ annotation.
+--&gt;</screen></example>
+<example><title>Annotation example in PHP</title><screen>
+/* @annotation
+Use PHP comments when annotating a PHP area
+*/</screen>
+
+</example>
+</para>
+<para>Annotations can be addressed for a specific member of your team. The syntax in this case is <emphasis>@annotation(nickname)</emphasis> or <emphasis>@annotation(role)</emphasis>, where <emphasis>nickname</emphasis> is the nickname of a team member, while <emphasis>role</emphasis> is a project role from the following items:
+<itemizedlist>
+<listitem><para>
+team leader
+</para></listitem>
+<listitem><para>
+task leader
+</para></listitem>
+<listitem><para>
+subproject leader
+</para></listitem>
+</itemizedlist>
+The task and subproject leaders should be followed by the corresponding task and subproject name, like it is shown in the below examples.
+</para>
+<para>
+<example><title>Make a note to a team member with the nickname <emphasis>eric</emphasis></title>
+<screen>&lt;-- @annotation(eric) Eric, please look at this. Andras --&gt;</screen>
+</example>
+<example><title>Inform the team leader</title>
+<screen>&lt;-- @annotation(team leader) This is very important for the team --&gt;</screen>
+</example>
+<example><title>Inform the <emphasis>PHP</emphasis> subproject leader</title>
+<screen>// @annotation(subproject leader:PHP) What do you think about it?</screen>
+</example>
+</para>
+<para>Nicknames and role names are case insensitive, but spaces around brackets and the <emphasis>:</emphasis> make the annotation invalid.</para>
+<para>More about team members, roles and nicknames can be found in <xref linkend="team-members"/>.</para>
+<para>
+The annotations found in the project can be inspected in the <guilabel>Annotations</guilabel> view. It consists of tree tabs:
+<variablelist>
+<varlistentry>
+<term><guilabel>Current File</guilabel></term>
+<listitem><para>
+The annotation found in the current file.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>For You</guilabel></term>
+<listitem><para>
+Annotations in the project addressed for you. The entries are groupped per file.
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>All Files</guilabel></term>
+<listitem><para>
+The annotations found in all the project files, groupe dy files
+</para></listitem>
+</varlistentry>
+</variablelist>
+The annotations are scanned on project and file load for external modifications. This way even is somebody adds an annotation outside of &quantaplus;, it will be recognized. As scanning can take some time, the information dialog about new annotations addressed for you might appear after some seconds of the project loading.
+</para>
+</sect1>
+<!--<sect1 id="cvs-3-2">
+<title>Using CVS</title>
+
+<para>
+&quantaplus; uses Cervisia for CVS. Explain its usage within &quantaplus;.
+</para>
+</sect1> -->
+
+&debugging-quanta;
+</chapter>
diff --git a/doc/quanta/attribute_tree.png b/doc/quanta/attribute_tree.png
new file mode 100644
index 00000000..a823dc6c
--- /dev/null
+++ b/doc/quanta/attribute_tree.png
Binary files differ
diff --git a/doc/quanta/config-quanta.docbook b/doc/quanta/config-quanta.docbook
new file mode 100644
index 00000000..4f8c9a1f
--- /dev/null
+++ b/doc/quanta/config-quanta.docbook
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="quanta-configuring">
+ <chapterinfo>
+ <title>Configuring &quantaplus;</title>
+ <authorgroup>
+ <author>
+ <firstname>Andr&#225;s</firstname>
+ <surname>Mantia</surname>
+ <affiliation>
+ <address><email>amantia@kde.org</email></address>
+ </affiliation>
+ </author>
+
+ <!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+ </authorgroup>
+ </chapterinfo>
+
+ <title>Configuring &quantaplus;</title>
+
+ <para>
+ This chapter describes how you can control the behavior of &quantaplus;.
+ </para>
+ <para>
+ The configuration dialogs are accessible from the <guilabel>Settings</guilabel> menu. Here we will discuss only few of them, the rest are not &quantaplus; specific and a short description can be found at <xref linkend="settings-menu-3-2" />.
+ </para>
+
+ <sect1 id="configure-quanta">
+ <title>Configuring Quanta</title>
+ <para>The configuration dialog can be invoked by using <menuchoice><guimenu>Settings</guimenu><guimenu>Configure Quanta...</guimenu></menuchoice>. The dialog has several pages, we will discuss them one by one.
+ </para>
+<variablelist>
+<varlistentry>
+<term><guilabel>Tag Style</guilabel></term>
+<listitem><para>You can change the behavior of &quantaplus; related to tags, including autocompletion. The entries are:
+<itemizedlist>
+<listitem><para><guilabel>Tag case:</guilabel> the case of the automatically inserted tags. <guilabel>Default Case</guilabel> means the tags will be inserted as they are described in the <link linkend="tagxml-3-2">tagXML</link> files.</para></listitem>
+<listitem><para><guilabel>Attribute case:</guilabel> the case of the automatically inserted attributes. <guilabel>Default Case</guilabel> means the attributes will be inserted as they are described in the <link linkend="tagxml-3-2">tagXML</link> files.</para></listitem>
+<listitem><para><guilabel>Attribute quotation:</guilabel> how to quote attributes inserted by &quantaplus;.</para></listitem>
+<listitem><para><guilabel>Auto-close optional tags:</guilabel> if checked, tags for which closing tag is option will be automatically closed once the tag closing &gt; is entered.</para></listitem>
+<listitem><para><guilabel>Auto-close non-single and non-optional tags:</guilabel> same as before for the rest of tags, exception being the single tags.</para></listitem>
+<listitem><para><guilabel>Use auto-completion:</guilabel> turn on/off the autocompletion of tags, attributes, functions, etc.
+</para></listitem>
+<listitem><para><guilabel>Update opening/closing tag automatically:</guilabel> if enabled, whenever you change the opening tag, the corresponding closing tag will be changed as well and vice-versa.</para></listitem>
+<listitem><para><guilabel>Automatic replacement of the accented characters:</guilabel> if enabled the accented characters will be replaced with their codes as you type.</para></listitem>
+</itemizedlist>
+</para>
+</listitem>
+
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Environment</guilabel></term>
+<listitem><para>A page to control the environment and some default settings.
+</para>
+<itemizedlist>
+<listitem><para><guilabel>Mimetypes:</guilabel> mimetypes used to recognize different kind of files. Use the <guilabel>Reset to Default</guilabel> button to fill in the entries with the default settings.</para></listitem>
+<listitem><para><guilabel>Default character encoding:</guilabel> the encoding of the newly created files, or files loaded in other way than <menuchoice><guimenu>File</guimenu><guimenuitem>Open</guimenuitem></menuchoice> (where you can override the encoding). This setting is overridden by the same setting in the <guilabel>Project Properties</guilabel> if a project is loaded.</para></listitem>
+<listitem><para><guilabel>Default DTD:</guilabel> the DTD used for newly created files, or files whose DTD was not recognized. This setting is overridden by the same setting in the <guilabel>Project Properties</guilabel> if a project is loaded.</para></listitem>
+<listitem><para><guilabel>Create backups:</guilabel> &quantaplus; will create backup files periodically, so in case of power failure or crash, on the next startup the document can be restored from this backup. This is not the same as the backup created on file save. Even for not-yet saved documents there is a backup created.</para></listitem>
+<listitem><para><guilabel>Startup Options:</guilabel> self explanatory setting which control what will happen on startup.</para></listitem>
+
+</itemizedlist>
+
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>User Interface</guilabel></term>
+<listitem><para>Here you can control the look and feel of &quantaplus;.
+</para>
+<para>The preview and the documentation can appear in the editor area or in a separate toolview, in which case it's possible to look at the documentation/preview and the source as well.</para>
+<para>It's also possible to configure the look of the toolview and document tabs.</para>
+<para><guilabel>Reset window layout to the default on the next startup</guilabel> is useful when you have messed up the user interface by changing the MDI modes and docking/undocking the toolviews. It is the same as the <command>--resetlayout</command> command line switch.</para>
+<para>This is the place also to control the behavior of the file trees.</para>
+<para>The <guilabel>Warning Messages</guilabel> section is useful to enable or disable the warning messages that can be dismissed by checking the <guilabel>Do not show again</guilabel> box in them.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>VPL View</guilabel></term>
+<listitem><para>The place to change the &VPL; behavior. You can enable the showing of an icon in place of scripts as well as configure the synchronization of the VPL and source view when the splitted mode is activated. See <xref linkend="view-menu-3-2"/> to learn how to activate the different modes.
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Parser</guilabel></term>
+<listitem><para>Here you can fine-tune the parser and the structure tree, which is the visual representation of the parser nodes in the document.</para>
+<para>In the <guilabel>Clicks on Structure Tree Items</guilabel> it is possible to change the actions assigned to mouse buttons when you click on the structure tree.</para>
+<para>In the <guilabel>Structure Tree Look &amp; Feel</guilabel> it is possible to configure what kind of nodes are visible in the tree, how often is the tree updated while editing and on an update how deeply should be the structure tree automatically opened. Empty nodes are the white-space text nodes, while empty groups are groups for whom there was no element found in the current document.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Abbreviations</guilabel></term>
+<listitem><para>
+The place to define abbreviations (some kind of templates), that can be expanded to bigger text while editing. Abbreviations are organized in groups, each group can be valid for more than one &DTEP;. This means you can have a group valid for PHP where the "ifclause" abbreviation template means something else than in a group valid for JavaScript.</para></listitem>
+</varlistentry>
+
+</variablelist>
+
+ </sect1>
+
+<sect1 id="configure-actions">
+<title>Configuring Actions</title>
+<para>User defineable action creation and editing is described in <xref linkend="user-actions"/>.</para>
+</sect1>
+
+<sect1 id="configure-plugins">
+ <title>Configuring Plugins</title>
+ <para>Here you can manage your plugins. Plugins are KPart applications written by third parties that can be reused in any KPart aware application, the most known being &konqueror;. When creating a plugin you must specify the:
+ <itemizedlist>
+ <listitem><para><guilabel>Name:</guilabel> the user visible name</para></listitem>
+ <listitem><para><guilabel>Output window:</guilabel> plugins can appear in a tab of the editor area or in a separate toolview at the bottom</para></listitem>
+ <listitem><para><guilabel>Location:</guilabel> the path to the plugin, if it is not located in the standard locations, like <filename class="directory">$<envar>KDEDIR</envar>/lib</filename> .</para></listitem>
+ <listitem><para><guilabel>File name:</guilabel> the relative path and the filename to the plugin's libtool file, like <filename class="libraryfile">kde3/libcervisiapart.la</filename></para></listitem>
+ <listitem><para><guilabel>Input:</guilabel> the plugin will get this information on startup, so it can open the <guilabel>Current File</guilabel>, the folder of the current file (<guilabel>Current File Path</guilabel>) or the <guilabel>Project Folder</guilabel>.</para></listitem>
+ <listitem><para><guilabel>Read only part:</guilabel> check if the plugin refuses to load. Read-only KParts usually refuse to load without this option checked.</para></listitem>
+ <listitem><para><guilabel>Validate plugin:</guilabel> if checked, &quantaplus; will test if the entered information is correct or not. Uncheck if the plugin is not yet available, but you will install later, so you can close the dialog.</para></listitem>
+</itemizedlist>
+ </para>
+ <para>See <xref linkend="plugins-menu-3-2" /> and <xref linkend="kparts-3-2" /> for information about using the plugins.</para>
+</sect1>
+</chapter>
diff --git a/doc/quanta/contents2.png b/doc/quanta/contents2.png
new file mode 100644
index 00000000..e2a44eca
--- /dev/null
+++ b/doc/quanta/contents2.png
Binary files differ
diff --git a/doc/quanta/credits-license.docbook b/doc/quanta/credits-license.docbook
new file mode 100644
index 00000000..65f44e5a
--- /dev/null
+++ b/doc/quanta/credits-license.docbook
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="credits-license-3-2">
+<chapterinfo>
+<title>Credits and License</title>
+<authorgroup>
+<author>
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>Credits and License</title>
+
+<note>
+<para>
+Sorry to anyone I missed or if I mis-spelt your name!
+</para>
+</note>
+
+<para>
+Much thanks to everyone who has spent the time to contribute!
+</para>
+
+<variablelist>
+<title>The &quantaplus; Development Team:</title>
+
+<varlistentry>
+<term>Bergia, Andrea</term>
+<listitem><para>Original &CSS; editor.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Britton, Marc</term>
+<listitem><para><application>Kommander</application>, various features, and bug fixes.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Colton, Matthew</term>
+<listitem><para>Splash screen for many versions</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Deschildre, Nicolas</term>
+<listitem><para><application>Visual Page Layout</application> &amp; undo/redo system</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Dmitrienko, Dmitri</term>
+<listitem><para>&PHP;4 debugger</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Gulmini, Luciano</term>
+<listitem><para><application>Frame Wizard</application></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Hanley, Jason P.</term>
+<listitem><para>Various fixes, foundational code for &DTD; parsing, and other &DTD; related work</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Hindsgaul, Claus</term>
+<listitem><para>Danish translation</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Hornbaker, Christopher</term>
+<listitem><para>The Anal &XML; Guy &amp; Documentation</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Isdale, Keith</term>
+<listitem><para>&XSL; 1.0 &DTEP;, <application>&kxsl;</application></para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Kooiman, Mathieu</term>
+<listitem><para>Documentation, bug fixes, and &PHP; debugger framework.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Laffoon, Eric</term>
+<listitem><para>Project Manager and web site admin.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Mantia, Andr&aacute;s</term>
+<listitem><para>Core Developer</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Moore, Richard</term>
+<listitem><para>Coding, original TagXML docs, and more</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Mous, Fabrice</term>
+<listitem><para>Documentation</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Nickel, Robert C.</term>
+<listitem><para>Documentation</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Pibil, Ted</term>
+<listitem><para>Addition and maintainence of &DTD;s</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Poplavsky, Dmitry</term>
+<listitem><para>ex-Core Developer &mdash; left for commercial version</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Vilches, George</term>
+<listitem><para>Tree-based upload dialog</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Yakovlev, Alexander</term>
+<listitem><para>ex-Core Developer &mdash; left for commercial version</para></listitem>
+</varlistentry>
+<!--
+<varlistentry>
+<term>Firstname Surname</term>
+<listitem><para>Function</para></listitem>
+</varlistentry>
+-->
+
+</variablelist>
+
+<variablelist>
+<title>Special Thanks To:</title>
+
+<varlistentry>
+<term>xmlsoft.org</term>
+<listitem><para>The writers of <application>libxml2</application> and <application>libxslt</application>.</para></listitem>
+</varlistentry>
+<!--
+<varlistentry>
+<term>Name</term>
+<listitem><para>Function</para></listitem>
+</varlistentry>
+-->
+
+</variablelist>
+
+<para>
+&quantaplus; <trademark class="copyright" /> 2000, 2001, 2002, 2003 &quantaplus; Development Team.
+</para>
+
+<para>
+&quantaplus; User Manual <trademark class="copyright" /> 2002, 2003 &quantaplus; Development Team.
+</para>
+
+&underFDL;
+&underGPL;
+</chapter>
diff --git a/doc/quanta/debugging-quanta.docbook b/doc/quanta/debugging-quanta.docbook
new file mode 100644
index 00000000..88ad9bc1
--- /dev/null
+++ b/doc/quanta/debugging-quanta.docbook
@@ -0,0 +1,400 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<sect1 id="debugging-3-2">
+<sect1info>
+<title>Debugging in &quantaplus;</title>
+<authorgroup>
+<author>
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+</author>
+
+<author>
+<firstname>Linus</firstname>
+<surname>McCabe</surname>
+<affiliation>
+<address><email>Linus@McCabe.nu</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</sect1info>
+
+<title>Debugging in &quantaplus;</title>
+
+<sect2 id="php-debugging-3-2">
+<title>Using the &PHP; Debugger</title>
+
+<para>
+With &quantaplus; version 3.3, the debugger handling was reimplemented.
+The support for the now obsolete &PHP; (3) builtin debugger and was dropped,
+as was the support for the dbg debugger. Instead, a general debug plugin system
+was developed, to allow different plugin implementations.
+</para>
+<para>
+Currently only one plugin is available which adds support to use &gubed; with
+&quantaplus;.
+</para>
+<para>
+To use a debugger for your project, open the project settings and chose a suitable
+debugger plugin. To alter debugger specific settings, press the 'Options' button
+next to the debugger plugin drop down.
+</para>
+
+<sect3 id="php-debuggin-3-2-general">
+<title>General usage</title>
+<para>
+Once a project has a debugger activated, a few additional items will appear in the
+&quantaplus; user interface:
+</para>
+
+<variablelist>
+<varlistentry>
+<term>Debugger menu</term>
+<listitem>
+<para>
+A new menu will appear where you can reach most of the debugger functionality.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Debugger toolbar</term>
+<listitem>
+<para>
+A toolbar with access to the most common debugging commands.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Variables toolview</term>
+<listitem>
+<para>
+A toolview where the contents of watched variables is showed. Appears in the left dock by default.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Breakpoints toolview</term>
+<listitem>
+<para>
+A toolview where all the breakpoints, line and conditional, are listed. Appears in the bottom dock by default.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Debug Output toolview</term>
+<listitem>
+<para>
+A toolview where the output (as in HTML) of the debugger is shown. Appears in the bottom dock by default.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+
+<para>
+Depending on what the debugger plugin supports, all or a subset of the following functionality will be available.
+</para>
+
+
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Session</guimenuitem>
+<guimenuitem>Start Session</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+This action is used to connect to the debugger if that is required, or tell the plugin to start listening for debug requests.
+This action is triggered by default when a project using a debugger is opened, so usually you don't need to care about it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Session</guimenuitem>
+<guimenuitem>End Session</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+The opposite of
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Session</guimenuitem>
+<guimenuitem>Start Session</guimenuitem>
+</menuchoice>. Closes a connection to the debugger or stops listening for requests.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Send HTTP Request</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Sends a HTTP request to the server to initiate a debug request. Using this action is equivalent to
+using a browser to look at the current document. The output of the request ends up in the Debug
+Output dock.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Pause</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Pauses a running script
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Run</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Tells the debugger to start executing the script and send information about watched variables and current
+line of execution as it goes along. If this is done while a script is paused, execution will proceed. If it's done
+before a debug request is initiated, the script will start running as soon as the request is initiated.
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Leap</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Tells the debugger to start executing the script without sending information about watched variables and current
+line of execution. If this is done while a script is paused, execution will proceed. If it's done
+before a debug request is initiated, the script will start leaping as soon as the request is initiated.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Step</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Tells the debugger to execute the next instruction in the script, without stepping into functions or inclusions.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Step Into</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Tells the debugger to execute the next instruction in the script, stepping into functions or inclusions if possible.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Step Out</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Tells the debugger to execute until it escapes the current function.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Skip</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Tells the debugger to skip the next instruction and proceed to the next one as if the current one didn't exist.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Execution</guimenuitem>
+<guimenuitem>Kill</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Tells the debugger to kill the currently running script.
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Breakpoints</guimenuitem>
+<guimenuitem>Break when...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Opens a dialog where you can specify conditional breakpoints.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Breakpoints</guimenuitem>
+<guimenuitem>Toggle breakpoint</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggles a line breakpoint at the line of the cursor in the current line
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Breakpoints</guimenuitem>
+<guimenuitem>Clear breakpoints</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Clears all the breakpoints.
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Variables</guimenuitem>
+<guimenuitem>Watch variable</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Opens a dialog where you can enter a variable or expression you wish to watch. The value of the watch will appear
+in the variables tool view.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Debug</guimenu>
+<guimenuitem>Variables</guimenuitem>
+<guimenuitem>Set value of variable</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Opens a dialog where you can enter a variable and a new value for it.
+</para>
+</listitem>
+</varlistentry>
+
+
+
+</variablelist>
+
+
+
+</sect3>
+</sect2>
+
+<sect2 id="kxsldbg-debugging-3-2">
+<title>Using &kxsl;, the &XSL; Debugger</title>
+
+<para>
+&kxsl; is the creation of Keith Isdale, as is this section of the
+documentation. &kxsl; is a &kde; front-end and a KPart to
+<command>xsldbg</command>, which you can find at
+http://xsldbg.sf.net along with many other works by
+Keith.
+</para>
+
+<para>
+To start &kxsl;, select
+<menuchoice>
+<guimenu>Plugins</guimenu>
+<guimenuitem>&kxsl;</guimenuitem>
+</menuchoice>.
+</para>
+
+<para>
+Please refer to the &kxsl; documentation for further information
+regarding its usage.
+</para>
+</sect2>
+</sect1>
diff --git a/doc/quanta/doc-view1.png b/doc/quanta/doc-view1.png
new file mode 100644
index 00000000..e6a405ff
--- /dev/null
+++ b/doc/quanta/doc-view1.png
Binary files differ
diff --git a/doc/quanta/dtd-conversion.png b/doc/quanta/dtd-conversion.png
new file mode 100644
index 00000000..c0213063
--- /dev/null
+++ b/doc/quanta/dtd-conversion.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img15.png b/doc/quanta/dtep_doc_img15.png
new file mode 100644
index 00000000..0f7e31a1
--- /dev/null
+++ b/doc/quanta/dtep_doc_img15.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img18.png b/doc/quanta/dtep_doc_img18.png
new file mode 100644
index 00000000..078801bd
--- /dev/null
+++ b/doc/quanta/dtep_doc_img18.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img21.png b/doc/quanta/dtep_doc_img21.png
new file mode 100644
index 00000000..f5d922bb
--- /dev/null
+++ b/doc/quanta/dtep_doc_img21.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img22.png b/doc/quanta/dtep_doc_img22.png
new file mode 100644
index 00000000..8871bdd8
--- /dev/null
+++ b/doc/quanta/dtep_doc_img22.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img23.png b/doc/quanta/dtep_doc_img23.png
new file mode 100644
index 00000000..62e965c1
--- /dev/null
+++ b/doc/quanta/dtep_doc_img23.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img24.png b/doc/quanta/dtep_doc_img24.png
new file mode 100644
index 00000000..1fc30841
--- /dev/null
+++ b/doc/quanta/dtep_doc_img24.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img25.png b/doc/quanta/dtep_doc_img25.png
new file mode 100644
index 00000000..bac85056
--- /dev/null
+++ b/doc/quanta/dtep_doc_img25.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img7.png b/doc/quanta/dtep_doc_img7.png
new file mode 100644
index 00000000..a47ea1dc
--- /dev/null
+++ b/doc/quanta/dtep_doc_img7.png
Binary files differ
diff --git a/doc/quanta/dtep_doc_img8.png b/doc/quanta/dtep_doc_img8.png
new file mode 100644
index 00000000..6ade4fe2
--- /dev/null
+++ b/doc/quanta/dtep_doc_img8.png
Binary files differ
diff --git a/doc/quanta/edit-upload-profile.png b/doc/quanta/edit-upload-profile.png
new file mode 100644
index 00000000..c9ea5c23
--- /dev/null
+++ b/doc/quanta/edit-upload-profile.png
Binary files differ
diff --git a/doc/quanta/event-editing.png b/doc/quanta/event-editing.png
new file mode 100644
index 00000000..2f0205dc
--- /dev/null
+++ b/doc/quanta/event-editing.png
Binary files differ
diff --git a/doc/quanta/exec.png b/doc/quanta/exec.png
new file mode 100644
index 00000000..c6c1c8c3
--- /dev/null
+++ b/doc/quanta/exec.png
Binary files differ
diff --git a/doc/quanta/extending-quanta.docbook b/doc/quanta/extending-quanta.docbook
new file mode 100644
index 00000000..6dd0629e
--- /dev/null
+++ b/doc/quanta/extending-quanta.docbook
@@ -0,0 +1,1789 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="extending-quanta-3-2">
+<chapterinfo>
+<title>Extending &quantaplus;</title>
+<authorgroup>
+<author>
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+</author>
+<author>
+<firstname>Andr&#225;s</firstname>
+<surname>Mantia</surname>
+<affiliation>
+<address><email>amantia@kde.org</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>Extending &quantaplus;</title>
+
+<para>
+This chapter describes how to customize &quantaplus; to your particular
+needs and how you can help &quantaplus; become better.
+</para>
+
+<!--<sect1 id="kommander-3-2">
+<title>Using Kommander With &quantaplus;</title>
+
+<para>
+Kommander, by Marc Britton.
+</para>
+</sect1> -->
+
+<sect1 id="dtep-intro-3-2">
+<title>Document Type Editing Package (&DTEP;)</title>
+
+<para>
+Document Type Editing Packages (&DTEP;s) are used in &quantaplus; to add
+support for markup, scripting languages, and &CSS;. They allow
+&quantaplus; to provide features like auto-completion and node trees.
+Their simplicity and flexibility are what make &quantaplus; a fast,
+developer friendly &IDE; for web developers. They are what make &quantaplus;
+an easy-to-use, productive environment.
+</para>
+
+<para>
+&DTEP;s come in two flavors, Family 1, which are markups, and Family 2,
+which are scripting and &CSS;. &DTEP;s are made up of two parts, the Tag
+Folder and the Toolbars. Tag Folders are composed of two types of files,
+the &descriptionrc; and TagXML files, which carry the extension .tag.
+Toolbars are the handy, icon-oriented tabs of buttons (above the editing
+window) which place text into a document faster than the user can type.
+</para>
+
+<para>
+ &DTEP;s can be created manually (see below), <link linkend="download-resources">downloaded</link> or automatically created from an existing DTD. See <xref linkend="converting-dtd" /> for details about the conversion.
+</para>
+
+<para>
+This document describes how to make TagXML files, the &descriptionrc;, and
+toolbars. In short, a &DTEP;.
+</para>
+
+<para>
+TagXML files (.tag) define both the attributes specific to a tag and the
+layout and contents of the properties dialog &quantaplus; shows for the tag.
+The &descriptionrc; file provides rules and information on the &DTEP;
+itself. Toolbars provide a quick means for adding tags into a document
+without worry of mis-spellings and such.
+</para>
+
+<sect2 id="dtep-packaging-3-2">
+<title>Packaging</title>
+
+<para>
+Tag Folders are just that, folders. They are composed only of the
+&descriptionrc; and TagXML files. Tag Folders carry the name of the mark-up
+language and version, if applicable. (For example, html-4.01-strict)
+</para>
+</sect2>
+
+<sect2 id="tagxml-3-2">
+<title>TagXML</title>
+
+<para>
+The table below lists the elements defined in TagXML and declares whether
+they are required or not. While not all are required, it is recommended
+that you use as many as you can so that other users can have a better
+experience and more information to work with.
+</para>
+
+<informaltable>
+<tgroup cols="3">
+<thead>
+<row>
+<entry>Element</entry>
+<entry>Default Usage</entry>
+<entry>Case Usage</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>TAGS</entry>
+<entry>required</entry>
+<entry>always</entry>
+</row>
+<row>
+<entry>tag</entry>
+<entry>required</entry>
+<entry>always</entry>
+</row>
+<row>
+<entry>label</entry>
+<entry>optional</entry>
+<entry>required to create a properties dialog</entry>
+</row>
+<row>
+<entry>attr</entry>
+<entry>optional</entry>
+<entry>required to define an attribute</entry>
+</row>
+<row>
+<entry>tooltip</entry>
+<entry>optional</entry>
+<entry>required to have the properties dialog display a tooltip</entry>
+</row>
+<row>
+<entry>whatsthis</entry>
+<entry>optional</entry>
+<entry>required to have the properties dialog display a <quote>What's This
+</quote></entry>
+</row>
+<row>
+<entry>list</entry>
+<entry>optional</entry>
+<entry>required when an attr is of the type <quote>list</quote></entry>
+</row>
+<row>
+<entry>item</entry>
+<entry>optional</entry>
+<entry>required when &lt;list> is used</entry>
+</row>
+<row>
+<entry>textlocation</entry>
+<entry>optional</entry>
+<entry>always</entry>
+</row>
+<row>
+<entry>location</entry>
+<entry>optional</entry>
+<entry>required when label is used</entry>
+</row>
+<row>
+<entry>text</entry>
+<entry>optional</entry>
+<entry>required when label is used</entry>
+</row>
+<row>
+<entry>children</entry>
+<entry>optional</entry>
+<entry>list of tags that can appear within the tag being defined</entry>
+</row>
+<row>
+<entry>child</entry>
+<entry>required</entry>
+<entry>a children entry</entry>
+</row>
+<row>
+<entry>stoppingtags</entry>
+<entry>optional</entry>
+<entry>list of tags that tell another tag to end</entry>
+</row>
+<row>
+<entry>stoppingtag</entry>
+<entry>required</entry>
+<entry>a stoppingtags entry</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+
+<sect3 id="dtep-element-descriptions-3-2">
+<title>TagXML Element Descriptions</title>
+
+<para>
+The following sections will describe, in detail, each element. Everything
+from where they can go to what goes in them is layed out in an
+easy-to-follow manner.
+</para>
+
+<sect4 id="TAGS-3-2">
+<title>TAGS</title>
+
+<para>
+This is the root element of a TagXML document. It may appear in a document
+only once. It can contain the definition of multiple tags. This is an
+element-only type element.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry><emphasis>NONE</emphasis></entry>
+<entry>tag</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="tag-3-2">
+<title>tag</title>
+
+<para>
+Wrapper for tag being defined. This is an element-only type element.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>TAGS</entry>
+<entry>label, attr, stoppingtags</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<informaltable>
+<tgroup cols="6">
+<thead>
+<row>
+<entry>Attribute</entry><entry>Type</entry><entry>Values</entry>
+<entry>Default</entry><entry>Use</entry><entry>Description</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>name</entry><entry>string</entry><entry></entry><entry></entry>
+<entry>required</entry><entry>Specifies the name of the tag being defined.</entry>
+</row>
+<row>
+<entry>single</entry><entry>boolean</entry><entry></entry><entry></entry>
+<entry>optional</entry><entry>Specifies whether or not the tag requires a
+closing tag &lt;/(tagname)>.</entry>
+</row>
+<row>
+<entry>type</entry><entry>string</entry><entry></entry><entry>xmltag</entry>
+<entry>optional</entry><entry>Specifies the type of tag being defined.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>xmltag</entry><entry></entry>
+<entry></entry><entry>Type of tag is XML-based. (Family 1 only.)</entry>
+</row>
+<row>
+ <entry></entry><entry></entry><entry>entity</entry><entry></entry>
+ <entry></entry><entry>The tag describes an entity. (Family 1 only.)</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>property</entry><entry></entry>
+<entry></entry><entry>Type of tag is &CSS; related. (Family 2 only.)</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>function</entry><entry></entry>
+<entry></entry><entry>Type of tag is a script function. When used,
+&lt;attr> becomes arguments of the function. (Family 2 only.)</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>class</entry><entry></entry>
+<entry></entry><entry>Type of tag is a script class. (Family 2 only.)</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>method</entry><entry></entry>
+<entry></entry><entry>Type of tag is a class method. (Family 2 only.)</entry>
+</row>
+<row>
+<entry>returnType</entry><entry>string</entry><entry></entry><entry>void
+</entry>
+<entry>optional</entry><entry>Specifies the return type of tag being
+defined. (Family 2 only.)</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>void</entry><entry></entry>
+<entry></entry><entry>Type of tag returns void.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>int</entry><entry></entry>
+<entry></entry><entry>Type of tag returns int.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>float</entry><entry></entry>
+<entry></entry><entry>Type of tag returns float.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>long</entry><entry></entry>
+<entry></entry><entry>Type of tag returns long.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>string</entry><entry></entry>
+<entry></entry><entry>Type of tag returns string.</entry>
+</row>
+<row>
+ <entry>version</entry><entry>string</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>Specifies the version of the language for which this tag is valid</entry>
+</row>
+<row>
+ <entry>extends</entry><entry>string</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>Valid only if the type of the tag is "class". The name of the base class for this class. (Family 2 only.)</entry>
+</row>
+<row>
+ <entry>class</entry><entry>string</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>Valid only if the type is "method". Specifies the name of the class to where this method belongs. (Family 2 only.)</entry>
+</row>
+<row>
+ <entry>common</entry><entry>boolean</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>if "yes", the tag specifies a common attribute group and the attributes inside this tag can be attached to any other tag. (Family 1 only.)</entry>
+</row>
+<row>
+ <entry>comment</entry><entry>string</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>the comment string appears near the tag name in the completion box</entry>
+</row></tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="label-3-2">
+<title>label</title>
+
+<para>
+Place a label in the dialog. The text is specified by the &lt;text> tag.
+This is an element-only type element.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>tag</entry>
+<entry>text, location</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="attr-3-2">
+<title>attr</title>
+
+<para>
+Defines an attribute of the tag. This element occurs once for each
+attribute. It defines the name and type of attribute. It also contains
+additional tags that specify how this attribute should be displayed, et cetera.
+This is an element-only type element.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>tag</entry>
+<entry>location, list, tooltip, whatsthis, textlocation</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<informaltable>
+<tgroup cols="6">
+<thead>
+<row>
+<entry>Attribute</entry><entry>Type</entry><entry>Values</entry>
+<entry>Default</entry><entry>Use</entry><entry>Description</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>name</entry><entry>string</entry><entry></entry><entry></entry>
+<entry>required</entry><entry>Specifies the name of the attribute being
+defined.</entry>
+</row>
+<row>
+<entry>type</entry><entry>string</entry><entry></entry><entry>input</entry>
+<entry>required</entry><entry>Specifies the type of the attribute being
+defined.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>input</entry><entry></entry>
+<entry></entry><entry>Field supports free text entries (text field).</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>check</entry><entry></entry>
+<entry></entry><entry>Field value is boolean (check box).</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>color</entry><entry></entry>
+<entry></entry><entry>Field value is a color.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>url</entry><entry></entry>
+<entry></entry><entry>Field value is a &URL;. (Local file to refer to.)</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>list</entry><entry></entry>
+<entry></entry><entry>Field value is an item from a specified list.</entry>
+</row>
+<row>
+<entry>status</entry><entry>string</entry><entry></entry><entry>optional</entry>
+<entry>required</entry><entry>Specifies whether or not the argument is
+required. (Family 2 only.)</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>optional</entry><entry></entry>
+<entry></entry><entry>Argument is optional.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>required</entry><entry></entry>
+<entry></entry><entry>Argument is required.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>implied</entry><entry></entry>
+<entry></entry><entry>Argument is implied.</entry>
+</row>
+<row>
+ <entry>source</entry><entry>string</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>Specifies the sources used to fill the entry for the attribute in the tag editor dialog and the attribute tree</entry>
+</row>
+<row>
+ <entry></entry><entry></entry><entry>selection</entry><entry></entry>
+ <entry></entry><entry>The selected text is used as source</entry>
+</row>
+<row>
+ <entry></entry><entry></entry><entry>dcop</entry><entry></entry>
+ <entry></entry><entry>The result of a dcop method is used as source</entry>
+</row>
+<row>
+ <entry>interface</entry><entry>string</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>Requires source="dcop". The dcop interface from inside &quantaplus; used to get the source data.</entry>
+</row>
+<row>
+ <entry>method</entry><entry>string</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>Requires source="dcop" and an interface name. The dcop method name from inside &quantaplus; used to get the source data.</entry>
+</row>
+<row>
+ <entry>arguments</entry><entry>string</entry><entry></entry><entry></entry>
+ <entry>optional</entry><entry>Requires source="dcop", an interface and a method name. The arguments passed to the method. It can be empty or "%tagname%", meaning the current tags name.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="tooltip-3-2">
+<title>tooltip</title>
+
+<para>
+Defines the tooltip for a field in the dialog. This element is text-only.
+</para>
+
+<note>
+<para>
+Currently only plain text is supported (you cannot use any markup).
+</para>
+</note>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>attr</entry>
+<entry><emphasis>NONE</emphasis></entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="whatsthis-3-2">
+<title>whatsthis</title>
+
+<para>
+Defines the 'What's This' help for a field in the dialog. This element is
+text-only.
+</para>
+
+<note>
+<para>
+Currently only plain text is supported (you cannot use any markup).
+</para>
+</note>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>attr</entry>
+<entry><emphasis>NONE</emphasis></entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="list-3-2">
+<title>list</title>
+
+<para>
+A container tag that groups together the items in a list. It may appear
+only once for each attribute description. This is an element-only type
+element.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>attr</entry>
+<entry>item</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="item-3-2">
+<title>item</title>
+
+<para>
+Defines an item in a list. This element is text-only.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>list</entry>
+<entry><emphasis>NONE</emphasis></entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="textlocation-3-2">
+<title>textlocation</title>
+
+<para>
+Specifies the position of a tag's attribute text within a dialog. This tag
+can only occur once for each attribute in the dialog (&ie; one for each
+&lt;attr> tag). This element is empty.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry>
+<entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>attr</entry>
+<entry><emphasis>NONE</emphasis></entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<informaltable>
+<tgroup cols="4">
+<thead>
+<row>
+<entry>Attribute</entry><entry>Type</entry>
+<entry>Use</entry><entry>Description</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>row</entry><entry>nonNegativeInteger</entry>
+<entry>required</entry><entry>Specifies the row in the dialog layout of a
+field or label.</entry>
+</row>
+<row>
+<entry>col</entry><entry>nonNegativeInteger</entry>
+<entry>required</entry><entry>Specifies the column in the dialog layout of
+a field or label.</entry>
+</row>
+<row>
+<entry>rowspan</entry><entry>nonNegativeInteger</entry>
+<entry>optional</entry><entry>Specifies the number of rows a field should
+span.</entry>
+</row>
+<row>
+<entry>colspan</entry><entry>nonNegativeInteger</entry>
+<entry>optional</entry><entry>Specifies the number of columns a field
+should span.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="location-3-2">
+<title>location</title>
+
+<para>
+Specifies the position and size of a field in the dialog. This tag should
+occur once for each field in the dialog (&ie; one for each &lt;attr> and
+&lt;label> tag). This element is empty.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry><entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>label, attr</entry><entry><emphasis>NONE</emphasis></entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<informaltable>
+<tgroup cols="4">
+<thead>
+<row>
+<entry>Attribute</entry><entry>Type</entry>
+<entry>Use</entry><entry>Description</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>row</entry><entry>nonNegativeInteger</entry>
+<entry>required</entry><entry>Specifies the row in the dialog layout of a
+field or label.</entry>
+</row>
+<row>
+<entry>col</entry><entry>nonNegativeInteger</entry>
+<entry>required</entry><entry>Specifies the column in the dialog layout of
+a field or label.</entry>
+</row>
+<row>
+<entry>rowspan</entry><entry>nonNegativeInteger</entry>
+<entry>optional</entry><entry>Specifies the number of rows a field should
+span.</entry>
+</row>
+<row>
+<entry>colspan</entry><entry>nonNegativeInteger</entry>
+<entry>optional</entry><entry>Specifies the number of columns a field
+should span.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="text-3-2">
+<title>text</title>
+
+<para>
+Define the text for a label or check box. This element is text-only.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry><entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>label, attr</entry><entry><emphasis>NONE</emphasis></entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="children-3-2">
+<title>children</title>
+
+<para>
+Defines a list of elements that can appear within the tag being specified.
+This element is an element-only type element.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry><entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>tag</entry><entry>child</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="child-3-2">
+<title>child</title>
+
+<para>
+Defines a child tag. This element is empty.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry><entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>children</entry><entry><emphasis>NONE</emphasis></entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<informaltable>
+<tgroup cols="4">
+<thead>
+<row>
+<entry>Attribute</entry><entry>Type</entry><entry>Values</entry>
+<entry>Use</entry><entry>Description</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>name</entry><entry>string</entry><entry></entry>
+<entry>required</entry><entry>Specifies a tag that can appear within the a
+certain tag.</entry>
+</row>
+<row>
+<entry>usage</entry><entry>string</entry><entry></entry>
+<entry>optional</entry><entry>Specifies the relation with the parent.</entry>
+</row>
+<row>
+<entry></entry><entry></entry><entry>required</entry>
+<entry></entry><entry>The parent must have at least one child with this name.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="stoppingtags-3-2">
+<title>stoppingtags</title>
+
+<para>
+Defines a list of elements that force a tag to end. This element is an
+element-only type element.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry><entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>tag</entry><entry>stoppingtag</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+
+<sect4 id="stoppingtag-3-2">
+<title>stoppingtag</title>
+
+<para>
+Defines a stopping tag. This element is empty.
+</para>
+
+<informaltable>
+<tgroup cols="2">
+<thead>
+<row>
+<entry>Parent(s)</entry><entry>Children</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>stoppingtags</entry><entry><emphasis>NONE</emphasis></entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<informaltable>
+<tgroup cols="4">
+<thead>
+<row>
+<entry>Attribute</entry><entry>Type</entry>
+<entry>Use</entry><entry>Description</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>name</entry><entry>string</entry>
+<entry>required</entry><entry>Specifies which tags force the ending of
+another tag.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect4>
+</sect3>
+
+<sect3 id="tagxml-usage-3-2">
+<title>TagXML Usage</title>
+
+<para>
+All TagXML files must begin with the &XML; declaration: &lt;?xml
+version="1.0" encoding="UTF-8"?> and must be properly nested and closed.
+</para>
+
+<important>
+<para>
+White space does not adversely affect anything, but watch out for &amp; and
+&lt; characters. These should likely be replaced with an &amp;amp; and
+&amp;lt;, respectively, in elements such as &lt;tooltip>, &lt;whatsthis>,
+and &lt;text>. Not doing so will not cause a crash, but you will have
+chunks of your work disappear if you do not.
+</para>
+</important>
+</sect3>
+
+<sect3 id="tagxml-validation-3-2">
+<title>TagXML Validation</title>
+
+<para>
+To validate your TagXML files, simply click the <quote>Tools</quote>
+pop-up dialog at the top of &quantaplus; and select <quote>Validate
+TagXML.</quote> A dialog will present itself and you need only to follow
+the simple directions.
+</para>
+
+<note>
+<para>
+This feature is currently not present. Currently validation occurs when
+the TagXML files are loaded into &quantaplus;.
+</para>
+</note>
+</sect3>
+
+<sect3 id="tagxml-examples-3-2">
+<title>TagXML Examples</title>
+
+<sect4 id="family-one-3-2">
+<title>Family 1</title>
+
+<para>
+The following will show you a valid Family 1 TagXML file. This file
+happens to describe &W3C; &XML; Schema's &lt;schema> element. The file name
+for this TagXML file would be schema.tag. Simple, eh?
+</para>
+
+<informalexample>
+<literallayout>
+<markup>
+&lt;?xml version="1.0" encoding="UTF-8"?>
+&lt;!DOCTYPE TAGS>
+&lt;TAGS>
+ &lt;tag name="schema">
+ &lt;label>
+ &lt;text>id&lt;/text>
+ &lt;location col="0" row="0"/>
+ &lt;/label>
+ &lt;attr name="id" type="input">
+ &lt;tooltip>A unique ID for the element.&lt;/tooltip>
+ &lt;whatsthis>A unique ID for the element.&lt;/whatsthis>
+ &lt;location col="1" row="0"/>
+ &lt;/attr>
+
+ &lt;label>
+ &lt;text>version&lt;/text>
+ &lt;location col="0" row="1"/>
+ &lt;/label>
+ &lt;attr name="version" type="input">
+ &lt;tooltip>Version of the schema.&lt;/tooltip>
+ &lt;whatsthis>Version of the schema.&lt;/whatsthis>
+ &lt;location col="1" row="1"/>
+ &lt;/attr>
+
+ &lt;label>
+ &lt;text>targetNamespace&lt;/text>
+ &lt;location col="0" row="2"/>
+ &lt;/label>
+ &lt;attr name="targetNamespace" type="input">
+ &lt;tooltip>&URI; reference of the namespace of this schema.&lt;/tooltip>
+ &lt;whatsthis>&URI; reference of the namespace of this schema.&lt;/whatsthis>
+ &lt;location col="1" row="2"/>
+ &lt;/attr>
+
+ &lt;label>
+ &lt;text>xmlns&lt;/text>
+ &lt;location col="0" row="3"/>
+ &lt;/label>
+ &lt;attr name="xmlns" type="input">
+ &lt;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.&lt;/tooltip>
+ &lt;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.&lt;/whatsthis>
+ &lt;location col="1" row="3"/>
+ &lt;/attr>
+
+ &lt;label>
+ &lt;text>attributeFormDefault&lt;/text>
+ &lt;location col="0" row="4"/>
+ &lt;/label>
+ &lt;attr name="attributeFormDefault" type="list">
+ &lt;items>
+ &lt;item>qualified&lt;/item>
+ &lt;item>unqualified&lt;/item>
+ &lt;/items>
+ &lt;tooltip>Default form for all attributes within this schema.&lt;/tooltip>
+ &lt;whatsthis>Default form for all attributes within this schema.&lt;/whatsthis>
+ &lt;location col="1" row="4"/>
+ &lt;/attr>
+
+ &lt;label>
+ &lt;text>elementFormDefault&lt;/text>
+ &lt;location col="0" row="5"/>
+ &lt;/label>
+ &lt;attr name="elementFormDefault" type="list">
+ &lt;items>
+ &lt;item>qualified&lt;/item>
+ &lt;item>unqualified&lt;/item>
+ &lt;/items>
+ &lt;tooltip>Default form for all elements within this schema.&lt;/tooltip>
+ &lt;whatsthis>Default form for all elements within this schema.&lt;/whatsthis>
+ &lt;location col="1" row="5"/>
+ &lt;/attr>
+
+ &lt;label>
+ &lt;text>blockDefault&lt;/text>
+ &lt;location col="0" row="6"/>
+ &lt;/label>
+ &lt;attr name="blockDefault" type="input">
+ &lt;location col="1" row="6"/>
+ &lt;/attr>
+
+ &lt;label>
+ &lt;text>finalDefault&lt;/text>
+ &lt;location col="0" row="7"/>
+ &lt;/label>
+ &lt;attr name="finalDefault" type="input">
+ &lt;location col="1" row="7"/>
+ &lt;/attr>
+ &lt;/tag>
+&lt;/TAGS>
+</markup>
+</literallayout>
+</informalexample>
+</sect4>
+
+<sect4 id="family-two-3-2">
+<title>Family 2</title>
+
+<para>
+The following will show you a valid Family 2 TagXML file. This file
+happens to describe &PHP;'s overload function. The file name for this
+TagXML file would be overload.tag.
+</para>
+
+<informalexample>
+<literallayout>
+<markup>
+&lt;?xml version="1.0" encoding="UTF-8"?>
+&lt;!DOCTYPE tags>
+&lt;tags>
+ &lt;tag name="overload" type="function" returnType="void">
+&lt;attr name="class_name" type="string" status="optional"/>
+ &lt;/tag>
+&lt;/tags>
+</markup>
+</literallayout>
+</informalexample>
+</sect4>
+</sect3>
+</sect2>
+
+<sect2 id="descriptionrc-3-2">
+<title>&descriptionrc;</title>
+
+<para>
+The &descriptionrc; file is, also, quite simple and there is an editor for it accessible from <menuchoice><guimenu>DTD</guimenu><guimenuitem>Edit DTD Settings</guimenuitem></menuchoice>. This will edit the &descriptionrc; for a &DTEP; you can select from a list. In order to
+edit the &descriptionrc; for a newly created &DTEP; you should create a simple &descriptionrc; with the following entries:
+</para>
+<para>
+ <informalexample>
+ <literallayout>
+ <markup>
+ [General]
+ Version = Use 1 for &quantaplus; version &lt;=3.1.2 and 2 for any version greater.
+ Name = DTD definition string. (-//&W3C;//DTD HTML 4.01 Transitional//EN)
+ NickName = The beautified name of the DTD. (HTML 4.01 Transitional). If not defined, Name is
+ used as NickName.
+ </markup>
+ </literallayout>
+ </informalexample>
+</para>
+<para>Once you have created it at put aside of the tag files, load the newly created &DTEP; with <menuchoice><guimenu>DTD</guimenu><guimenuitem>Load DTD Package (DTEP)</guimenuitem></menuchoice> and after it is loaded you can proceed with editing the settings of the &DTEP;. Check the tooltips and the whatsthis text of the entries in the editor dialog to understand the meaning of each entry. Alternatively you can read the <filename>quanta/data/dtep/dtd-description.txt</filename> from the source tarball containing a description about the format.
+</para>
+</sect2>
+</sect1>
+
+<sect1 id="user-actions">
+<title>User Defined Actions</title>
+<para>
+Actions are very common in every application. You meed them often when you use any application. Clicking on a toolbar icon, selecting a menu item or using a shortcut usually executes an action. In &quantaplus; actions are taken to the next level. Instead of hardcoded actions (that are created by the application
+programmer at the source code level) it is possible for the ordinary user to create and modify actions and by this way adding
+new functionality to &quantaplus;. These are the user defined actions, and many of the standard &quantaplus; actions are user defined (and user modifiable) actions as well.
+</para>
+<para>There are three types of user definable actions:
+<itemizedlist>
+<listitem><para><link linkend="text-actions">Text actions</link></para></listitem>
+<listitem><para><link linkend="tag-actions">Tag actions</link></para></listitem>
+<listitem><para><link linkend="script-actions">Script actions</link></para></listitem>
+</itemizedlist>
+</para>
+<sect2 id="creating-actions">
+<title>Creating actions</title>
+<para>
+ You can create an action by going to
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Actions</guimenuitem>
+</menuchoice>
+. Click on <guibutton>New Action</guibutton> and you will face a similar dialog:
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img7.png" format="PNG" />
+</imageobject>
+</mediaobject>
+<variablelist>
+<varlistentry>
+<term><guilabel>Type</guilabel></term>
+<listitem><para>Specifies the action's type (<link linkend="text-actions">Text</link>, <link linkend="tag-actions">Tag</link>, <link linkend="script-actions">Script</link>).</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Text</guilabel></term>
+<listitem><para>The user visible name of the action.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>The button near the <guilabel>Text</guilabel> label</term>
+<listitem><para>The icon assigned to this action. Click on it in order to change the current icon.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Tool tip</guilabel></term>
+<listitem><para>Short description of what the action does.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Shortcut</guilabel></term>
+<listitem><para>The shortcut assigned to this action. Click on <guilabel>Custom</guilabel> or the button near <guilabel>Custom</guilabel> to assign a shortcut; click on <guilabel>None</guilabel> to remove the currently assigned shortcut.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Container toolbars</guilabel></term>
+<listitem><para>The user defined toolbars where this action appears. See <xref linkend="creating-toolbars-3-2"/>.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Detailed Settings</guilabel></term>
+<listitem><para>Specific settings for the different type of actions. See below.
+</para></listitem>
+</varlistentry>
+</variablelist>
+</para>
+</sect2>
+<sect2 id="text-actions">
+<title>Text actions</title>
+<para>
+<mediaobject><imageobject>
+<imagedata fileref="text-action.png" format="PNG" />
+</imageobject></mediaobject>
+ The simplest actions. You can enter some text in the <guilabel>Detailed Settings</guilabel> area and whenever the action is executed this text will be inserted in your document
+ at the current cursor position. See the below example.
+</para>
+</sect2>
+<sect2 id="tag-actions">
+<title>Tag actions</title>
+<para>
+ Useful to insert XML tags, but of course you can use them for other purposes as well.
+<mediaobject><imageobject>
+<imagedata fileref="tag-actions.png" format="PNG" />
+</imageobject></mediaobject>
+<variablelist>
+<varlistentry>
+<term><guilabel>&lt;tag&gt;</guilabel></term>
+<listitem><para>The name of the tag.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>&lt;/tag&gt;</guilabel></term>
+<listitem><para>If checked when the action is executed this text will be inserted as a closing tag. If there is a selected area in the document before you execute the action, the &lt;tag&gt; will be inserted before the selected area and the &lt;/tag&gt; after.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Run "Edit tag" dialog if available</guilabel></term>
+<listitem><para>If checked and there is a tagXML file for this tag, a tag editing dialog will be shown prior of inserting the tag inside the document, so you can fine-tune the tag attributes.</para></listitem>
+</varlistentry>
+</variablelist>
+The &lt;tag&gt; and &lt;/tag&gt; will be inserted as you've typed there. The &lt;, &gt; or the / sign won't be automatically appended.
+</para>
+</sect2>
+<sect2 id="script-actions">
+<title>Script actions</title>
+<para>
+<mediaobject><imageobject>
+<imagedata fileref="script-action.png" format="PNG" />
+</imageobject></mediaobject>
+ The most powerful action type. With the help of this action you
+can run external applications (usually scripts, but it's
+not limited to scripts), which can alter your document or use your document (or part of your document) as input. Examples from &quantaplus; itself are the <guibutton>Quick Start</guibutton> dialog, the various <guilabel>View In...</guilabel> actions for the (X)HTML DTEPs.
+</para>
+<para>
+First you have to enter the name of your script with the interpreter as well. Example:
+<command>sh /home/myHome/myScript.sh</command>.
+</para>
+<para>
+Although you can use full paths, the recommended way is to use the <command>%scriptdir</command> variable in the command line, like <command>sh %scriptdir/myScript.sh</command>. This way &quantaplus; will try to locate your script in the following places:
+<itemizedlist>
+<listitem><para>global script folder: <filename><envar>$KDEDIR</envar>/share/apps/quanta/scripts</filename></para></listitem>
+<listitem><para>local script folder: <filename><envar>$KDEHOME</envar>/share/apps/quanta/scripts</filename></para></listitem>
+<listitem><para>your path: <envar>$PATH</envar></para></listitem>
+</itemizedlist>
+There are other special variables that you can use in the command line:
+<itemizedlist>
+<listitem><para><command>%f</command>: will be replaced with the URL of the current document. In case of local documents, file:/ will be stripped from the document.</para></listitem>
+<listitem><para><command>%input</command>: will be replaced with the selected input. See below.</para></listitem>
+<listitem><para><command>%projectbase</command>: will be replaced with the URL of the current project. It is empty if no project is loaded.</para></listitem>
+<listitem><para><command>%pid</command>: will be replaced with the PID of the running &quantaplus; process. If &quantaplus; is running in unique mode, the "unique " text will be prepended to the PID number. Useful when you use DCOP to control &quantaplus; from the external script.</para></listitem>
+<listitem><para><command>%userarguments</command>: useful in case of events. This entry will be replaced by the event properties in the following order: <variablelist>
+<varlistentry>
+<term>First argument</term>
+<listitem><para>The unique id of the script</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Second argument</term>
+<listitem><para>the event name</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>Third argument</term>
+<listitem><para>the parameters for the event, usually the file name of the current document or the path to the project file.</para></listitem>
+</varlistentry>
+</variablelist>
+ </para></listitem>
+</itemizedlist>
+</para>
+<para>
+Aside of the above methods the script can receive input from &quantaplus; on the standard input. In the <guilabel>Input</guilabel> combobox you can select what to send to the standard input. Choices are:
+<itemizedlist>
+<listitem><para><guilabel>None</guilabel>: nothing is sent to the script.</para></listitem>
+<listitem><para><guilabel>Current document</guilabel>: the whole document is sent to the script.</para></listitem>
+<listitem><para><guilabel>Selected text</guilabel>: the selected area of the document is sent to the script. Using the <command>%input</command> variable usually makes sense only when using this setting.</para></listitem>
+</itemizedlist>
+</para>
+<para>
+Similar to the <guilabel>Input</guilabel> you can catch the output of the executed application. There are two kind of outputs:
+<itemizedlist>
+<listitem><para>normal output, printed to the standard output;</para>
+</listitem>
+<listitem><para>error messages, printed to the standard error.</para>
+</listitem>
+</itemizedlist>
+You can specify what should happen with the text printed to the standard output. This can be done by modifying the value of the <guilabel>Output</guilabel> combobox:
+<itemizedlist>
+<listitem><para><guilabel>None</guilabel>: the output of the application is ignored.</para></listitem>
+<listitem><para><guilabel>Insert in cursor position</guilabel>: the output will be inserted in the current document and the cursor position.</para></listitem>
+<listitem><para><guilabel>Replace selection</guilabel>: the selected area of the document will be replaced with the output.</para></listitem>
+<listitem><para><guilabel>Replace selection</guilabel>: the selected area of the document will be replaced with the output.</para></listitem>
+<listitem><para><guilabel>Create a new document</guilabel>: a new document will be created and will contain all the output of the script.</para></listitem>
+<listitem><para><guilabel>Replace current document</guilabel>: the entire document will be replaced with the output.</para></listitem>
+<listitem><para><guilabel>Message window</guilabel>: the output will appear in the <guilabel>Messages</guilabel> toolview.</para></listitem>
+</itemizedlist>
+</para>
+<para>The choices for the standard error output (<guilabel>Error</guilabel>) are the same as for the normal output.</para>
+</sect2>
+</sect1>
+
+<sect1 id="creating-toolbars-3-2">
+<title>Creating Toolbars</title>
+
+<para>
+The following will show you how to create toolbars for a &DTEP;. Toolbars
+are graphical elements that are assigned to actions. Actions, in
+&quantaplus;, are the basis for nearly all the extensions that
+&quantaplus; has and will acquire in the future. The same mechanism that
+defines an action in &quantaplus; also enables auto-completion and tag
+dialogs. With actions, the limit of what you can do is virtually
+limitless. For means of an example, we will use <ulink
+url="http://tidy.sf.net">&HTML; tidy</ulink> on our web pages.
+</para>
+
+<sect2 id="from-scratch-to-complete-3-2">
+<title>From Scratch to Complete</title>
+
+<para>
+To begin, you will need to create a user toolbar. Select
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guimenuitem>Add User Toolbar</guimenuitem>
+</menuchoice>.
+</para>
+
+<para>
+If there are many tags for the markup language, it is recommended that you
+split up the tags into logical groups. You will need to create a new user
+toolbar for each group. In this case, there are not many, so we will be
+making one toolbar and naming it with the name of the markup.
+</para>
+
+<para>
+Once all your toolbars are created, you must add and configure the
+actions. To do this, select
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Actions</guimenuitem>
+</menuchoice>
+<emphasis>
+</emphasis>.
+</para>
+
+<para>
+The parts of this window are pretty straight forward. Press the
+<guibutton>New action</guibutton> button at the bottom of the window to
+enter the editing mode.
+</para>
+
+<para>
+Fill in all of the necessary fields and add the tag to the appropriate
+toolbar(s).
+</para>
+
+<para>
+Complete the rest and, if the tag has attributes and you always plan to
+use them, check the <guilabel>Run "Edit tag" dialog if available
+</guilabel> box so that you will be prompted every time the action is used.
+</para>
+
+<para>
+You should now have something much like the following.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img7.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Press the <guibutton>Apply</guibutton> button and you will see the action
+added to the toolbar(s) you have selected.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img8.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Egad! That's an awful icon. How will yourself and others remember that
+icon goes with that action? Let's replace it before trouble arises.
+</para>
+
+<para>
+To create an icon that more accurately describes that action, we will be
+using &kiconedit;. Select it from the &kmenu;, <menuchoice>
+<guisubmenu>Graphics</guisubmenu>
+<guisubmenu>More Programs</guisubmenu>
+</menuchoice> (or where ever your distribution placed it).
+</para>
+
+<para>
+&kiconedit; defaults to the size 32x32 pixels, but we need 22x22. To
+change this, select
+<menuchoice>
+<guimenu>Edit</guimenu>
+<guimenuitem>Resize</guimenuitem>
+</menuchoice>.
+</para>
+
+<para>
+Keep in mind that you are creating an icon that will assist in helping not
+only yourself to remember which action does what, but also other users of
+the &DTEP;.
+</para>
+
+<para>
+Since the tag I am creating the icon for is called <quote>start,</quote>
+I have decided to create a <quote>Start sign.</quote> Using the color green
+(green often interpreted as <quote>go,</quote> <quote>start,</quote> or
+<quote>proceed</quote>) will, or, at least, should, convey a message
+to the user that clicking this action will place the &lt;start&gt; tag in the
+current document.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img15.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Now that I am finished with the creation of the icon, I will save it.
+</para>
+
+<para>
+Once you are done with creating the icon(s), you must associate the icon
+with the action. To do this, open
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Actions</guimenuitem>
+</menuchoice> again (in &quantaplus;) and select the action you made
+the icon for. Beside the <guilabel>Text</guilabel> field, you will see a
+button, click it.
+</para>
+
+<para>
+Select <guilabel>Other Icons</guilabel> and then click the <guibutton>
+Browse</guibutton> button.
+</para>
+
+<para>
+Goto the folder in which you saved the icon, select the icon, and click
+<guibutton>OK</guibutton>.
+</para>
+
+<para>
+Press the <guibutton>Apply</guibutton> button and either continue to do the
+same with the other tags, if any, or click <guibutton>OK</guibutton> to
+finish.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img18.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Let us say you would like to add some common &quantaplus; functions to your
+toolbar or maybe you think the toolbar would be better off organized in a
+different manner with some separators to group the actions. Open the
+<guilabel>Configure Toolbars</guilabel> dialog by going
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Toolbars</guimenuitem>
+</menuchoice>. Make sure your toolbar is selected.
+</para>
+
+<para>
+I will be choosing the separator (top of the left column) for my toolbar.
+Once you have selected the item you wish to add to your toolbar, press the
+right arrow button. This will add it to your toolbar.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img21.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+I think I would like a quick way to access the <guilabel>Konqueror
+Preview</guilabel>. I will select it and add it to the toolbar.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img22.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Note how the separator helps in grouping. Someone new to my toolbar might
+have thought that the &konqueror; button was like or the opposite of the
+start button.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img23.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Apply your changes and, when you are done, press <guibutton>OK</guibutton>
+to finish.
+</para>
+
+<para>
+Ah, look at the fantastic new toolbar! Much more handy now.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img24.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Remember to test your toolbar, by clicking all the buttons, so that you
+know the output is correct.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="dtep_doc_img25.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Now to save the toolbar, we will select
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guisubmenu>Save Toolbars</guisubmenu>
+<guimenuitem>Save as Local Toolbar</guimenuitem>
+</menuchoice>.
+</para>
+
+<para>
+Save it to the correct folder. Since NeXML does not exist, I will just
+have it to the top-level folder, but your toolbar(s) should be saved to
+the correct folder. Make sure to adjust your &descriptionrc; to have it
+load your toolbar(s) when a new file of that type is created.
+</para>
+</sect2>
+</sect1>
+
+
+<sect1 id="creating-quanta-docs-3-2">
+<sect1info>
+<title>Creating Your Own Documentation</title>
+<authorgroup>
+<author>
+<firstname>Robert</firstname>
+<surname>Nickel</surname>
+<affiliation>
+<address><email>robert@artnickel.com</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</sect1info>
+
+<title>Creating Your Own Documentation</title>
+
+<para>
+Probably the most notable additions to &quantaplus; for the general user
+will be the addition of documentation for the markup or scripting language
+that you like best. To that end, this chapter will explain how I create
+the &PHP; documentation tree for my personal use.
+</para>
+
+<para>
+Before starting on creating your own documentation, you may wish to check
+out the <ulink url="http://quanta.sf.net/main1.php?contfile=resource">
+&quantaplus; repository</ulink> to see if someone else has already done
+this set.
+</para>
+
+<para>
+There are two parts to this process. First, you must obtain the existing
+documentation for the markup/scripting/&etc; language that you are after.
+Second, you have to create the <filename>docrc</filename> file. The first
+is up to you, the second is what we will cover here.
+</para>
+
+<para>
+The general form of the docrc file is as follows:
+</para>
+
+<informalexample>
+<literallayout>
+#KDE Config File
+[Tree]
+Doc dir=<replaceable>path, relative to this file, of the documentation html files</replaceable> &eg; php42/
+#top level elements
+Top Element=<replaceable>Your description for these documentation</replaceable> &eg; &PHP; 4.2 documentation
+
+Section 1=Section1.html
+Section 2=#Sec2.1,#Sec2.2,#Sec2.3
+Sec2.1=Sec2.1.html
+Sec2.2=Sec2.2.html
+Sec2.3=Sec2.3.html
+...
+
+[Context]
+ContextList=func1,func2,tag1,tag2,tag3
+func1=func1.html
+func2=func2.html
+tag1=tag1.html
+tag2=tag2.html
+tag3=tag3.html
+</literallayout>
+</informalexample>
+
+<para>
+The <filename>docrc</filename> is broken down into two sections: Tree and
+Context.
+</para>
+
+<para>
+The Tree section defines the presentation aspect of the documentation in
+the documentation tab. For example, you will see that in the &PHP;
+documentation you have something akin to this:
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="doc-view1.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+Relating this to the above, my &PHP; <filename>docrc</filename> looks like
+this:
+</para>
+
+<informalexample>
+<literallayout>
+#KDE Config File
+
+[Tree]
+
+Doc dir=php42/
+
+#top level elements
+Top Element=PHP 4.2 documentation
+
+PHP 4.2 documentation=Table of Contents,#Getting Started,#Language Reference
+
+Table of Contents=index.html
+
+Getting Started=Introduction, ...
+Introduction=introduction.html
+...
+
+Language Reference=Basic syntax, ...
+Basic syntax=language.basic-syntax.html
+...
+
+</literallayout>
+</informalexample>
+
+<para>
+Notice the <literal>#</literal> in front of <quote>Getting Started</quote>
+and <quote>Language Reference</quote>. This indicates that these are sub
+containers in the tree and have content of their own. I do not believe that
+there is a set limit to the depth here (other than that driven by sanity)
+&mdash; use your judgment.
+</para>
+
+<para>
+For the Table of Contents, you will notice that it is referenced directly to
+a file (and consequently shows up at the bottom of the tree view &mdash;
+folders first!).
+</para>
+
+<important>
+<para>
+Spaces do not adversely affect anything, but watch out for &amp; and &lt;
+characters. These should likely be replaced by &amp;amp; and &amp;lt;
+respectively in all of the &XML; based &quantaplus; resource files.
+</para>
+</important>
+
+<para>
+The Context section is the section of the docrc file that is used to
+facilitate context sensitive help. For example, you are writing a &PHP;
+script and you would like to see the documentation for the
+<function>mysql_fetch_array</function> function. You simply highlight the
+function and then press <keycombo action="simul">&Ctrl;<keycap>H</keycap>
+</keycombo> for context help. The documentation on
+<function>mysql_fetch_array</function> will immediately display. There are
+only two entry types here: the ContextList and the file association lines.
+</para>
+
+<variablelist>
+<varlistentry>
+<term>ContextList</term>
+<listitem>
+<para>
+Really simple, this is just a comma separated list of the context items
+you wish to have available (for &PHP;, these are the functions for &PHP;).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>File association lines</term>
+<listitem>
+<para>
+These are of the form context item=html doc page. &eg;
+acos=function.acos.html
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<para>
+A pared down version of my <filename>docrc</filename> Context section is
+as follows:
+</para>
+
+<informalexample>
+<literallayout>
+#Keywords for context help
+[Context]
+ContextList=abs,acos,acosh,addcslashes,addslashes,...
+
+abs=function.abs.html
+acos=function.acos.html
+acosh=function.acosh.html
+addcslashes=function.addcslashes.html
+addslashes=function.addslashes.html
+...
+</literallayout>
+</informalexample>
+
+<para>
+Now you can just save your <filename>docrc</filename> file, save it in
+<filename class="directory">$<envar>HOME</envar>/.kde/share/apps/quanta/doc</filename>
+or <filename
+class="directory">$<envar>KDEDIR</envar>/share/apps/quanta/doc</filename>
+for local or global use respectively. Then create a folder (the one
+specified in your <filename>docrc</filename> file) in the same folder
+as your <filename>docrc</filename> file and copy your &HTML; pages in
+there.
+</para>
+
+<para>
+You will need to restart &quantaplus; to see your documentation.
+</para>
+
+<para>
+Once you are sure that they are good and worth sharing, send the <filename>
+docrc</filename> file along with a description of any pertinent
+information on what documentation you used to the
+<ulink url="http://quanta.sf.net/main1.php?contfile=resource">&quantaplus;
+repository</ulink> for use by the &quantaplus; community. You will not get
+rich, but you will feel great knowing that you contributed to the best web
+development platform around.
+</para>
+
+</sect1>
+
+<sect1 id="sharing-resources">
+ <title>Sharing Resources</title>
+ <para>With &quantaplus; you are not alone. It is possible to share the various resources (DTEP packages, toolbars with actions, scripts, templates) with others. There are two ways to do it:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term>Sending in Email</term>
+ <listitem><para>The resources can be sent in email to your friends, partners or to whomever you want. You will see the <guilabel>Send in Email</guilabel> menu entries in various places, like <menuchoice><guimenu>DTD</guimenu><guimenuitem>Send DTD Package (DTEP) in Email</guimenuitem></menuchoice>, <menuchoice><guimenu>Toolbars</guimenu><guimenuitem>Send Toolbar in Email</guimenuitem></menuchoice>, in the context menu of the files and folders in the <guilabel>Templates</guilabel> and <guilabel>Scripts</guilabel> tree.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Uploading to the main server</term>
+ <listitem><para>The resources can be uploaded to our main repository, from where all other &quantaplus; users can download them. The submissions are reviewed and made available only if our team considers correct and useful will be published. In order to make a valid submission it is suggested to sign the resources, thus you need a GPG/PGP key. This information is used to verify the origin of the resources both by our team and by the downloaders.</para>
+ <para>About getting the resources from the main server see <xref linkend="download-resources" />.</para>
+ <para>When uploading you will be asked to enter the passphrase for your secret GPG key (the passphrase will not be stored), or in the case of having more secret keys, you will be able to pick up the one you want to use. In the <guilabel>Share Hot New Stuff</guilabel> dialog fill the input fields (the <guilabel>Preview URL</guilabel> may remain empty) and start the upload by clicking <guilabel>OK</guilabel>.</para>
+ <para>
+ The upload can be initiated from
+ <menuchoice><guimenu>DTD</guimenu><guimenuitem>Upload DTD Package (DTEP)</guimenuitem></menuchoice>, <menuchoice><guimenu>Toolbars</guimenu><guimenuitem>Upload Toolbar</guimenuitem></menuchoice>, in the context menu of the files and folders in the <guilabel>Templates</guilabel> and <guilabel>Scripts</guilabel> tree.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</sect1>
+<sect1 id="download-resources">
+<title>Getting Resources</title>
+<para>It is possible to upgrade your &quantaplus; without getting a new version, by getting new resources like DTEP packages, toolbars with actions, templates, scripts and documentation. One possibility is that you got the resources in email or have downloaded from a web server, in which cases you usually need to manually install them. In lucky case you also got an install script when you have downloaded the resources. But &quantaplus; has a dedicated server holding resources that were either not included in the main distribution because of their sizes or infrequent usage, or they were contributed later by users, and these resources are automatically installed. Do download such resources use the various <guilabel>Download</guilabel> menu entries. You can find them at <menuchoice><guimenu>DTD</guimenu><guimenuitem>Download DTD Package (DTEP)</guimenuitem></menuchoice>, <menuchoice><guimenu>Toolbars</guimenu><guimenuitem>Download Toolbar</guimenuitem></menuchoice>, in the context menu of an empty area or toplevel item in the <guilabel>Templates</guilabel>, <guilabel>Scripts</guilabel> and <guilabel>Documentation</guilabel> trees.
+</para>
+<para>
+After a resource was downloaded, but before it is installed, &quantaplus; verifies if the resource is valid, by checking the integrity and the signature. In case of problems it warns you and you can decide if you want to continue or not. Please read the warning dialogs carefully. In the case when the integrity is correct and the resource is correctly signed, you will still get an information dialog, so you can see who created the resource.
+</para>
+<para>
+ <caution><para>Be sure that you install resources, especially toolbars and scripts, only from trusted sources!</para></caution>
+</para>
+</sect1>
+
+<sect1 id="converting-dtd">
+ <title>Converting a DTD to a &DTEP;</title>
+ <para>It is possible to work on XML languages currently not supported by &quantaplus; by creating a DTEP package. But the creation can be time consuming, as you may need to write hundreds of tag files in <link linkend="tagxml-3-2">tagXML</link> format. Of course, there is a nicer way to go, by converting the DTD automatically into a DTEP package.
+ </para>
+ <para>The conversion can be started from the <menuchoice><guimenu>DTD</guimenu><guimenuitem>Load &amp; Convert DTD</guimenuitem></menuchoice> menu. Select the <filename>.dtd</filename> file which defines the DTD you want to use, and after that you will see the following dialog:
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="dtd-conversion.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </para>
+<para>The entries are:</para>
+<itemizedlist>
+ <listitem><para><guilabel>Target directory name:</guilabel>the newly created &DTEP; will go under this name to the <filename><envar>$KDEHOME</envar>/share/apps/quanta/dtep</filename> folder.
+ </para>
+ </listitem>
+ <listitem><para><guilabel>Name:</guilabel>the name (definition string) of the DTD</para></listitem>
+ <listitem><para><guilabel>Nickname:</guilabel> the user visible name of the &DTEP;</para></listitem>
+ <listitem><para><guilabel>!DOCTYPE definition line:</guilabel>
+ the string that should appear in the !DOCTYPE tag, like
+ HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"</para></listitem>
+ <listitem><para><guilabel>DTD URL:</guilabel> the URL pointing to the DTD file</para></listitem>
+ <listitem><para><guilabel>Default extension:</guilabel> the extension usually used for files that were written in this DTD</para></listitem>
+ <listitem><para><guilabel>Case-sensitive tags and attributes:</guilabel> self explaining, usually true for XML language variants</para></listitem>
+ <listitem><para><guilabel>Fine-tune the DTEP after conversion:</guilabel> if checked, after the conversion is done, &quantaplus; will bring up the &descriptionrc; editor, so you can fine tune the newly created &DTEP;. It is recommended to leave this options checked.</para></listitem>
+</itemizedlist>
+
+</sect1>
+</chapter>
diff --git a/doc/quanta/ftab.png b/doc/quanta/ftab.png
new file mode 100644
index 00000000..b179f808
--- /dev/null
+++ b/doc/quanta/ftab.png
Binary files differ
diff --git a/doc/quanta/fundamentals.docbook b/doc/quanta/fundamentals.docbook
new file mode 100644
index 00000000..ccd293d5
--- /dev/null
+++ b/doc/quanta/fundamentals.docbook
@@ -0,0 +1,429 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="fundamentals-3-2">
+<chapterinfo>
+<title>The Fundamentals of &quantaplus;</title>
+<authorgroup>
+<author>
+<firstname>Robert</firstname>
+<surname>Nickel</surname>
+<affiliation>
+<address><email>robert@artnickel.com</email></address>
+</affiliation>
+</author>
+
+<othercredit role="reviewer">
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<othercredit role="reviewer">
+<firstname>Fabrice</firstname>
+<surname>Mous</surname>
+<affiliation>
+<address><email>fabrice@kde.nl</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>The Fundamentals of &quantaplus;</title>
+
+<para>
+Within &quantaplus; there are several key concepts. To understand and
+take advantage of &quantaplus;, you must first learn these concepts, the
+fundamentals. This chapter will explain and show you these concepts, without
+which &quantaplus; would be primitive.
+</para>
+
+<sect1 id="quanta-workspaces-3-2">
+<title>The Workspace</title>
+
+<para>
+&quantaplus; divides the workspace into three scopes: Global, Local, and
+Project. These distinctions affect various components in &quantaplus;.
+</para>
+
+<variablelist>
+<varlistentry>
+<term>Global</term>
+<listitem>
+<para>
+Global items are available to anyone that uses &quantaplus;. From toolbars
+to actions, everything marked as global is stored in the common
+&quantaplus; folder structure. This has the effect of allowing a group
+of admins to save certain toolbars, actions, and templates in the global
+tree, which can then be used to keep a multi-user installation of
+&quantaplus; common to everyone on the system.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Local</term>
+<listitem>
+<para>
+Local items make up a single user's personal collection of web development
+resources. These items are made up of a user's templates and toolbars.
+Local items are stored in a user's home folder. This makes all of the
+user's Local items available for personal use at instance.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Project</term>
+<listitem>
+<para>
+Project items are are only available to a particular project. These can
+be anything from a &CSS; template to a toolbar with custom actions
+which perform a special task on a project's files. Simply put, this is
+the most limited scope. All of the items saved in the project workspace
+will be saved in the project's folder tree, allowing you to share your
+specialized tools and templates with whomever else you share your
+project with.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</sect1>
+
+<sect1 id="mdi-interface-3-2">
+<title>The Multi-Document Interface</title>
+
+<para><mediaobject>
+<imageobject>
+<imagedata fileref="quantamdi.png" format="PNG" />
+</imageobject>
+<caption><para>&quantaplus; editing the document you are now reading.</para></caption>
+</mediaobject>
+</para>
+
+
+<para>
+&quantaplus;' &MDI; is broken down into various parts: the editor window,
+the quick info trees, informational tabs and the toolbars. Please see <xref linkend="editor-3-2" />,
+<xref linkend="qit-3-2" />, <xref linkend="information-3-2" />, and <xref linkend="toolbars-3-2" /> for more
+information on these parts.
+</para>
+
+<sect2 id="editor-3-2">
+<title>The Editor Window</title>
+
+<para>
+<mediaobject>
+<imageobject>
+<imagedata fileref="quantamdi-editor.png" format="PNG" />
+</imageobject>
+<caption><para>&quantaplus;' editor window.</para></caption>
+</mediaobject>
+</para>
+
+<para>
+&quantaplus;' editor window allows for multiple files to be opened at the
+same time. When just one file is open, the document fills the entire
+editor window. As soon as a second document is opened, a small amount of
+space is taken from the bottom of the editor window to allow for tabs to
+be displayed with the filenames and a status icon. The above picture shows
+a <guiicon>floppy</guiicon> icon beside the filename, indicating that the
+file has been modified and should be saved.</para>
+<para>You can right click on the tabs with the mouse to get a context menu with entries related to the current document, like closing the current, other or all tabs; switching to other tabs; reloading, deleting or uploading the document; switching to a bookmarked line ; performing CVS operations on the current document.</para>
+<para>Right clicking in the editor area will give you another context menu related to the edited document content, like basic editing actions (cut/copy/paste), editing the tag under the cursor, selecting the area covered by the tag under the cursor, getting context help about the word under the cursor or open a file if the string under the cursor points to a file.</para>
+
+
+<para>
+At the top of the editor window is the editor toolbar set. Currently,
+&quantaplus; defaults to &HTML; 4.01 Transitional, which has a default set
+of toolbars that are loaded. As &quantaplus; progresses, the toolbars will
+be updated to meet the needs of users and to make use of newer features.
+</para>
+
+<para>
+Toolbar usage is pretty straight forward. If you want to insert a basic
+tag, like &lt;p&gt;, into your document, then you can click on the icon that
+represents the tag. Now you can insert your data for the tag you have just
+inserted. If you wish to insert a tag that requires certain attributes
+(like an anchor), then you will get a dialog box with the various fields for
+you to fill in.
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="taginputex.png" format="PNG" />
+</imageobject>
+<caption><para>The anchor (&lt;a&gt;) dialog.</para></caption>
+</mediaobject>
+</para>
+</sect2>
+
+<sect2 id="qit-3-2">
+<title>The Toolviews</title>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="quantamdi-treeview.png" format="PNG" />
+</imageobject>
+<caption><para>The Toolviews.</para></caption>
+</mediaobject>
+
+<para>
+The Toolviews or Quick Info Trees (&QIT;) allow you to navigate, open, and gather
+information in &quantaplus;. Its tabbed format presents you with the Files, Project,
+Templates, Document Structure, Scripts, Attribute, and Documentation Trees.
+</para>
+
+<variablelist id="qit-parts">
+<title>&QIT; Explained</title>
+
+<varlistentry>
+<term>
+Files Tree
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="ftab.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+This is where you can browse your entire file system. You are presented
+with two top-level roots of the file system. The first is your home folder
+and the second is the filesystem root folder - /. Use these to find existing
+files on your machine that you would like to edit or add to an active
+project. Right mouse button clicking on a file in this view gives you several
+options for managing the selected file and, also, allows you to insert the
+file into an active project, if any, or toggle the view between tree and list.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Project Tree
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="ptab.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+<link linkend="quanta-projects-3-2">Project management</link> is one of the
+many powerful tools that &quantaplus; offers. This tab displays all files
+within your project and allows you to manage the files within the project
+through the use of &RMB; clicking. Actions, such as add, remove, upload,
+or delete files entirely from the disk, can be performed through this menu.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Templates Tree
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="ttab.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+Another feature of &quantaplus; is templates. Templates can be anything
+you would like. Images, code snippets, an entire web page, et cetera. It
+is entirely up to you.
+</para>
+
+<para>
+Templates are sorted into three categories, which are based on their scope
+and the context they are being used. These scopes are carried over from
+&quantaplus;' workspace. Global templates are usable all times, local
+templates are usable to the current user, and project templates
+are usable only within their specified project. More on templates can be
+found in <xref linkend="templates-3-2" />.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Scripts Tree
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="exec.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+Here you will find information about the various scripts available for use
+by you. The Global, Local, and Project concept allows here as well. By
+&LMB; clicking the entries, you gain access to all the available
+information about the script. And &RMB; clicking allows you to perform a
+few actions, such as running the script, editing the script, and mailing
+the script, for example.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Document Structure Tree
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="view_sidetree.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+This tab displays the parser's internal representation of your document.
+By &LMB; clicking on an element, your cursor will taken to the element's
+position in the document. By &RMB; clicking on an element, you are
+presented with a number of actions that deal with navigating and updating
+the tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Attribute Tree
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="tag_misc.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+This tree appears below all the other &QIT;s. Within it you can quickly
+edit attributes and namespaces. The content-focused entry system
+allows you to modify all the available attributes with little more than a
+few clicks of the mouse.
+<mediaobject>
+<imageobject>
+<imagedata fileref="attribute_tree.png" format="PNG" />
+</imageobject>
+<caption><para>Attribute Tree</para></caption>
+</mediaobject>
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Documentation Tree
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="contents2.png" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+Here you can find complete documentation on web technologies to aid your
+development. You can download pre-packaged documentation for &quantaplus;
+at <ulink url="http://quanta.sourceforge.net/docs.html">&quantaplus;'
+documentation site</ulink>, you can <link
+linkend="creating-quanta-docs-3-2">create your own documentation</link>,
+and, by adding a folder named "doc" to a project, you can add, edit,
+and view project-specific documentation.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="information-3-2">
+<title>The Informational Tabs</title>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="info_tab.png" format="PNG" />
+</imageobject>
+<caption><para>&quantaplus;' Informational Tabs.</para></caption>
+</mediaobject>
+
+<para>
+By default &quantaplus; has two tabs located at the bottom of the window
+from which useful information can be obtained. These are the Messages
+window and the Problems window.
+</para>
+<variablelist>
+<varlistentry>
+<term>
+Messages Window Tab
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+This tab displays information from any scripts run in quanta.
+For example, the DTD being used for the current document
+and any changes to the DTD are displayed.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+Problems Tab
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="" format="PNG" />
+</imageobject>
+</inlinemediaobject>
+</term>
+<listitem>
+<para>
+This tab shows any errors in the markup of the current document.
+&quantaplus; scripts which are executed will also print error
+messages (if present) in this tab.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="toolbars-3-2">
+<title>The Toolbars</title>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="toolbars.png" format="PNG" />
+</imageobject>
+<caption><para>&quantaplus;' &HTML; toolbars.</para></caption>
+</mediaobject>
+
+<para>
+&quantaplus;' toolbars have been extended greatly and are easy to
+understand. You click on the button and you get an associated action from
+that button. The beautiful part about toolbars is that you can define your
+own actions graphically within &quantaplus;.
+</para>
+
+<para>
+Managing toolbars in &quantaplus; is easy. By selecting the <guimenu>
+Toolbars</guimenu> menu, you have the options to load, save, add, remove, and
+email toolbars. When you choose to load a toolbar, you may choose from one
+of the three <link linkend="quanta-workspaces-3-2">workspaces</link> in
+&quantaplus;. When saving a newly created toolbar, you can save it in the
+local scope or within a project's scope. If you would like to make a new
+toolbar available in the global scope, ask your admin to place it in
+&quantaplus;' global toolbar folder.
+</para>
+
+<para>
+Another feature of &quantaplus; is the ability to email your toolbars.
+&quantaplus; sends the toolbar as a gzipped tar archive through &kmail;.
+If you receive a toolbar in email, then you can save (and load) it into
+&quantaplus; like any other toolbar!
+</para>
+</sect2>
+</sect1>
+</chapter>
diff --git a/doc/quanta/glossary.docbook b/doc/quanta/glossary.docbook
new file mode 100644
index 00000000..30e83c3d
--- /dev/null
+++ b/doc/quanta/glossary.docbook
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<glossary id="quanta-glossary-3-2">
+
+<glossaryinfo>
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+
+<othercredit role="reviewer">
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</glossaryinfo>
+
+<glossdiv>
+<title>Keywords</title>
+<glossentry id="xsldbg-glosref">
+<glossterm>xsldbg</glossterm>
+<glossdef>
+<para>See <ulink url="http://xsldbg.sourceforge.net"></ulink></para>
+</glossdef>
+</glossentry>
+<glossentry>
+<glossterm>XPath</glossterm>
+<glossdef>
+<para>A valid expression that defines what data is required. See
+<ulink url="http://www.w3.org">&W3C; web site</ulink>
+</para>
+</glossdef>
+</glossentry>
+<glossentry>
+<glossterm>QName</glossterm>
+<glossdef>
+<para>A fully qualified name. For example <emphasis>xsl:myvariable</emphasis>. See <ulink url="http://www.w3.org">&W3C; web site</ulink>
+</para>
+</glossdef>
+</glossentry>
+</glossdiv>
+</glossary>
diff --git a/doc/quanta/index.docbook b/doc/quanta/index.docbook
new file mode 100644
index 00000000..32d92c53
--- /dev/null
+++ b/doc/quanta/index.docbook
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+ <!ENTITY package "kdewebdev">
+ <!ENTITY advanced-quanta SYSTEM "adv-quanta.docbook">
+ <!ENTITY config-quanta SYSTEM "config-quanta.docbook">
+ <!ENTITY credits-license SYSTEM "credits-license.docbook">
+ <!ENTITY debugging-quanta SYSTEM "debugging-quanta.docbook">
+ <!ENTITY extending-quanta SYSTEM "extending-quanta.docbook">
+ <!ENTITY fundamentals SYSTEM "fundamentals.docbook">
+ <!ENTITY glossary SYSTEM "glossary.docbook">
+ <!ENTITY installation SYSTEM "installation.docbook">
+ <!ENTITY introduction SYSTEM "introduction.docbook">
+ <!ENTITY q-and-a SYSTEM "q-and-a.docbook">
+ <!ENTITY quanta-menus SYSTEM "quanta-menus.docbook">
+ <!ENTITY quanta-projects SYSTEM "quanta-projects.docbook">
+ <!ENTITY working-with-quanta SYSTEM "working-with-quanta.docbook">
+ <!ENTITY CGI "<acronym>CGI</acronym>">
+ <!ENTITY DTD "<acronym>DTD</acronym>">
+ <!ENTITY DTEP "<acronym>DTEP</acronym>">
+ <!ENTITY HTML "<acronym>HTML</acronym>">
+ <!ENTITY IDE "<acronym>IDE</acronym>">
+ <!ENTITY PHP "<acronym>PHP</acronym>">
+ <!ENTITY PDF "<acronym>PDF</acronym>">
+ <!ENTITY SGML "<acronym>SGML</acronym>">
+ <!ENTITY XSD "<acronym>XSD</acronym>">
+ <!ENTITY W3C '<trademark class="registered">W3C</trademark>'>
+ <!ENTITY QIT "<acronym>QIT</acronym>">
+ <!ENTITY MDI "<acronym>MDI</acronym>">
+ <!ENTITY gubed "<application>Gubed PHP Debugger</application>">
+ <!ENTITY kxsl "<application>KXsldbg</application>">
+ <!ENTITY VPL "<acronym>VPL</acronym>">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ <!ENTITY descriptionrc '<link linkend="descriptionrc-3-2">description.rc</link>'>
+]>
+
+<book lang="&language;">
+<title>&quantaplus; User Manual</title>
+
+<bookinfo>
+
+<authorgroup>
+
+<author>
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+</author>
+
+<author>
+<firstname>Fabrice</firstname>
+<surname>Mous</surname>
+<affiliation>
+<address><email>fabrice@kde.nl</email></address>
+</affiliation>
+</author>
+
+<author>
+<firstname>Robert</firstname>
+<surname>Nickel</surname>
+<affiliation>
+<address><email>robert@artnickel.com</email></address>
+</affiliation>
+</author>
+
+<author>
+<firstname>Andr&aacute;s</firstname>
+<surname>Mantia</surname>
+<affiliation>
+<address><email>amantia@kde.org</email></address>
+</affiliation>
+</author>
+
+<othercredit role="developer">
+<firstname>Eric</firstname>
+<surname>Laffoon</surname>
+<affiliation>
+<address><email>sequitur@kde.org</email></address>
+</affiliation>
+<contrib>Developer</contrib>
+</othercredit>
+
+<othercredit role="developer">
+<firstname>Andr&aacute;s</firstname>
+<surname>Mantia</surname>
+<affiliation>
+<address><email>amantia@kde.org</email></address>
+</affiliation>
+<contrib>Developer</contrib>
+</othercredit>
+
+<othercredit role="developer">
+<firstname>Dmitry</firstname>
+<surname>Poplavsky</surname>
+<affiliation>
+<address><email>dima@kde.org</email></address>
+</affiliation>
+<contrib>Developer up to 2.0</contrib>
+</othercredit>
+
+<othercredit role="developer">
+<firstname>Alexander</firstname>
+<surname>Yackovlev</surname>
+<affiliation>
+<address><email>yshurik@kde.org</email></address>
+</affiliation>
+<contrib>Developer up to 2.0</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+
+<copyright>
+<year>2002</year><year>2003</year><year>2004</year><year>2005</year>
+<holder>&quantaplus; Development Team</holder>
+</copyright>
+
+<legalnotice>
+<para>
+&FDLNotice;
+</para>
+</legalnotice>
+
+<date>2005-08-24</date>
+<releaseinfo>3.4.90</releaseinfo>
+
+<abstract>
+<para>
+&quantaplus; is a Web &IDE; that strives to be neutral and
+transparent to all markup languages, while supporting popular
+web-based scripting languages, &CSS;, and other emerging &W3C;
+recommendations.
+</para>
+</abstract>
+
+<keywordset>
+<keyword>KDE</keyword>
+<keyword>Quanta</keyword>
+<keyword>text</keyword>
+<keyword>editor</keyword>
+<keyword>Web</keyword>
+<keyword>programmer</keyword>
+<keyword>programming</keyword>
+<keyword>development</keyword>
+<keyword>Kommander</keyword>
+<keyword>xsldbg</keyword>
+<keyword>libxslt</keyword>
+<keyword>debugger</keyword>
+<keyword>projects</keyword>
+<keyword>SGML</keyword>
+<keyword>JSS</keyword>
+<keyword>DTD</keyword>
+<keyword>XML</keyword>
+<keyword>XSD</keyword>
+<keyword>W3C</keyword>
+<keyword>CSS</keyword>
+<keyword>Schema</keyword>
+<keyword>DocBook</keyword>
+<keyword>HTML</keyword>
+<keyword>XHTML</keyword>
+<keyword>CGI</keyword>
+<keyword>PHP</keyword>
+<keyword>Java</keyword>
+<keyword>JavaScript</keyword>
+<keyword>ColdFusion</keyword>
+</keywordset>
+</bookinfo>
+&introduction;
+&fundamentals;
+&working-with-quanta;
+<!-- &config-quanta; -->
+&quanta-menus;
+&config-quanta;
+&advanced-quanta;
+&extending-quanta;
+&q-and-a;
+&credits-license;
+&installation;
+&glossary;
+</book>
diff --git a/doc/quanta/info_tab.png b/doc/quanta/info_tab.png
new file mode 100644
index 00000000..b1cdc3f2
--- /dev/null
+++ b/doc/quanta/info_tab.png
Binary files differ
diff --git a/doc/quanta/installation.docbook b/doc/quanta/installation.docbook
new file mode 100644
index 00000000..a89a6b2c
--- /dev/null
+++ b/doc/quanta/installation.docbook
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<appendix id="installation-3-2">
+<title>Installation</title>
+
+<sect1 id="acquiring-qunata-3-2">
+<title>Acquiring &quantaplus;</title>
+
+&install.intro.documentation;
+</sect1>
+
+<sect1 id="source-code-building-3-2">
+<title>Building the Source</title>
+
+&install.compile.documentation;
+
+<sect2 id="source-code-building-considerations-3-2">
+<title>Considerations When Building</title>
+
+<para>
+It is reasonable that you would want to customize the location of
+the &quantaplus; files on your system. To this end,
+<command>autoconf</command> has a number of options
+that can be passed to the <command>configure</command>
+script to control this setup. To get a complete listing of these
+options, type <command>./configure</command>
+<option> --help</option>. These are straight forward and will
+not be covered here.
+</para>
+
+<para>
+If you are having trouble with &quantaplus; running properly, you
+should check your path to ensure that the &kde; 3
+<filename class="directory">bin</filename> folder is in there.
+Also, be sure that you do not have any older versions of &kde; laying
+about that appear in <envar>PATH</envar> before your &kde; 3
+<filename class="directory">bin</filename> folder. The same
+holds true for &Qt;.
+</para>
+
+</sect2>
+</sect1>
+</appendix>
diff --git a/doc/quanta/introduction.docbook b/doc/quanta/introduction.docbook
new file mode 100644
index 00000000..b4be671c
--- /dev/null
+++ b/doc/quanta/introduction.docbook
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="introduction-3-2">
+<chapterinfo>
+<title>What is &quantaplus;?</title>
+<authorgroup>
+<author>
+<firstname>Eric</firstname>
+<surname>Laffoon</surname>
+<affiliation>
+<address><email>sequitur@kde.org</email></address>
+</affiliation>
+</author>
+
+<othercredit role="reviewer">
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<othercredit role="reviewer">
+<firstname>Fabrice</firstname>
+<surname>Mous</surname>
+<affiliation>
+<address><email>fabrice@kde.nl</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>What is &quantaplus;?</title>
+
+<blockquote>
+<attribution>
+Eric Laffoon at http://quanta.sourceforge.net
+</attribution>
+
+<para>
+&quantaplus; is a web development tool for the K Desktop Environment.
+&quantaplus; is designed for quick web development and is rapidly becoming
+a mature editor with a number of great features.
+</para>
+<para>
+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
+&quantaplus;. Then we will be asking you, the web developers, to contribute
+your feature enhancements. We will organize these so that &quantaplus; web
+developers can find just the resources, extensions and custom plug-ins
+they need to be the most kick butt developers ever.
+</para>
+</blockquote>
+
+<sect1 id="quanta-intro-3-2">
+<sect1info>
+<title>&quantaplus;: Where It Was And Where It Is Going</title>
+<authorgroup>
+<author>
+<firstname>Robert</firstname>
+<surname>Nickel</surname>
+<affiliation>
+<address><email>robert@artnickel.com</email></address>
+</affiliation>
+</author>
+
+<othercredit role="reviewer">
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<othercredit role="reviewer">
+<firstname>Fabrice</firstname>
+<surname>Mous</surname>
+<affiliation>
+<address><email>fabrice@kde.nl</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</sect1info>
+
+<title>&quantaplus;: Where It Was And Where It Is Going</title>
+
+<para>
+While striving to become the best &HTML; editor, the developers of
+&quantaplus; began to think about a rather intriguing idea: <quote>What if
+&quantaplus; was a generic, extensible, markup language editor?</quote>
+Well, that would only make it the greatest Web Development Environment
+for &kde;! So it was done.
+</para>
+
+<para>
+No longer bound to &HTML;, &quantaplus; is now well on its way to becoming
+an all-purpose Web Development Environment. Essentially, if you can define
+it in &XML;, then &quantaplus; should be able to serve as an &IDE; for it.
+</para>
+
+<para>
+Now, with the above said, it must be noted that &quantaplus; is an
+outgrowth of the outstanding efforts that have been put forth by the
+entire &kde; development community. &quantaplus;, in celebration of open
+source, uses the idea of <quote>Why write something somebody already
+wrote?</quote> Thanks to &kde;'s framework, not only is this possible, but
+it also allows users and developers to extend &quantaplus; to match their
+unique needs.
+</para>
+
+<para>
+&quantaplus; provides web developers with an intuitive and powerful
+multiple document interface (&MDI;). It can dramatically increase your
+productivity. Through the use of custom actions, scripting, and toolbars,
+you can automate almost any task. With the use of <application>
+Kommander</application>, you can extend &quantaplus; in a manner in which
+you never have to remember scripting command syntax again. (More about this
+can be found in <xref linkend="extending-quanta-3-2" />.)
+</para>
+</sect1>
+
+</chapter>
diff --git a/doc/quanta/kfr-icon.png b/doc/quanta/kfr-icon.png
new file mode 100644
index 00000000..4ba2dcdf
--- /dev/null
+++ b/doc/quanta/kfr-icon.png
Binary files differ
diff --git a/doc/quanta/kfr-new-dialog.png b/doc/quanta/kfr-new-dialog.png
new file mode 100644
index 00000000..8b483dcb
--- /dev/null
+++ b/doc/quanta/kfr-new-dialog.png
Binary files differ
diff --git a/doc/quanta/man-quanta.1.docbook b/doc/quanta/man-quanta.1.docbook
new file mode 100644
index 00000000..bb493fac
--- /dev/null
+++ b/doc/quanta/man-quanta.1.docbook
@@ -0,0 +1,95 @@
+<?xml version="1.0" ?>
+<!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+<!ENTITY % English "INCLUDE">
+]>
+
+<refentry lang="&language;">
+<refentryinfo>
+<author><personname><firstname>Ben</firstname><surname>Burton</surname></personname><email>bab@debian.org</email></author>
+<date>April 8, 2003</date>
+</refentryinfo>
+
+<refmeta>
+<refentrytitle><command>quanta</command></refentrytitle>
+<manvolnum>1</manvolnum>
+</refmeta>
+
+<refnamediv>
+<refname><command>quanta</command></refname>
+<refpurpose>A &kde; based web development environment</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<cmdsynopsis>
+<command>quanta</command>
+
+<group><option>--unique</option></group>
+<group><option>--nologo</option></group>
+<group><option>--resetlayout</option></group>
+<group><option><replaceable>filename</replaceable></option></group>
+<group><option>KDE Generic Options</option></group>
+<group><option>Qt Generic Options</option></group>
+
+</cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1>
+<title>Description</title>
+
+<para>&quanta; Plus is a web development environment for HTML and
+associate languages. It is designed for quick web development and is
+rapidly becoming a mature editor with a number of great
+features. &quanta; already has a good deal of PHP support in it
+including the ability to run a debugger.</para>
+
+<para>&quanta; Plus is not in any way affiliated with any commercial
+versions of &quanta;. The primary coders from the original team left
+the GPL'd version to produce a commercial product.</para>
+
+</refsect1>
+
+<refsect1>
+<title>Options</title>
+
+<variablelist>
+<title>Application Options</title>
+<varlistentry>
+<term><option>--unique</option></term>
+<listitem><para>Run as a one-instance application</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><option>--nologo</option></term>
+<listitem><para>Do not show the logo during startup</para></listitem>
+</varlistentry>
+
+<varlistentry>
+ <term><option>--resetlayout</option></term>
+ <listitem><para>Reset the layout of the user interface to the default</para></listitem>
+</varlistentry>
+</variablelist>
+
+</refsect1>
+
+<refsect1>
+<title>See Also</title>
+
+<para>More detailed user documentation is available from <ulink
+url="help:/quanta">help:/quanta</ulink> (either enter this
+<acronym>URL</acronym> into &konqueror;, or run
+<userinput><command>khelpcenter</command>
+<parameter>help:/quanta</parameter></userinput>).</para>
+
+<para>There is also further information available at <ulink url="http://sourceforge.net/projects/quanta/">http://sourceforge.net/projects/quanta/</ulink></para>
+</refsect1>
+
+<refsect1>
+<title>Authors</title>
+
+<para>&quanta; is currently written and maintained by Eric Laffoon <email>sequitur@kde.org</email> and Andras Mantia <email>amantia@kde.org</email>.</para>
+
+<para>This manual page was prepared by <personname><firstname>Ben</firstname><surname>Burton</surname></personname><email>bab@debian.org</email> </para>
+
+</refsect1>
+
+</refentry>
diff --git a/doc/quanta/plugin-edit.png b/doc/quanta/plugin-edit.png
new file mode 100644
index 00000000..1dc8824e
--- /dev/null
+++ b/doc/quanta/plugin-edit.png
Binary files differ
diff --git a/doc/quanta/project-1.png b/doc/quanta/project-1.png
new file mode 100644
index 00000000..8c86b8fb
--- /dev/null
+++ b/doc/quanta/project-1.png
Binary files differ
diff --git a/doc/quanta/project-properties.png b/doc/quanta/project-properties.png
new file mode 100644
index 00000000..241af897
--- /dev/null
+++ b/doc/quanta/project-properties.png
Binary files differ
diff --git a/doc/quanta/project-tree-view-dir-rmb-menu.png b/doc/quanta/project-tree-view-dir-rmb-menu.png
new file mode 100644
index 00000000..a89b43fc
--- /dev/null
+++ b/doc/quanta/project-tree-view-dir-rmb-menu.png
Binary files differ
diff --git a/doc/quanta/project-tree-view-file-rmb-menu.png b/doc/quanta/project-tree-view-file-rmb-menu.png
new file mode 100644
index 00000000..c587e02a
--- /dev/null
+++ b/doc/quanta/project-tree-view-file-rmb-menu.png
Binary files differ
diff --git a/doc/quanta/project-upload-dialog.png b/doc/quanta/project-upload-dialog.png
new file mode 100644
index 00000000..2c641d5a
--- /dev/null
+++ b/doc/quanta/project-upload-dialog.png
Binary files differ
diff --git a/doc/quanta/ptab.png b/doc/quanta/ptab.png
new file mode 100644
index 00000000..977f1dd9
--- /dev/null
+++ b/doc/quanta/ptab.png
Binary files differ
diff --git a/doc/quanta/q-and-a.docbook b/doc/quanta/q-and-a.docbook
new file mode 100644
index 00000000..020d4580
--- /dev/null
+++ b/doc/quanta/q-and-a.docbook
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="faq-3-2">
+<chapterinfo>
+<title>Questions and Answers</title>
+<authorgroup>
+<author>
+<firstname>Eric</firstname>
+<surname>Laffoon</surname>
+<affiliation>
+<address><email>sequitur@kde.org</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>Questions and Answers</title>
+
+<qandaset>
+<qandaentry>
+<question>
+<para>
+How can I help &quantaplus; development?
+</para>
+</question>
+<answer>
+<para>
+We would be remiss not to point out that &quantaplus; is being built by
+volunteers. 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. &quantaplus; has been developed in a
+manner that allows both non-programmers and programmers help extend
+&quantaplus;. There is also the issue of documentation. Software, be it
+proprietary or Free/open source, is only as good as its documentation.
+We are sure there is a place in &quantaplus; where your time will be most
+beneficial.
+</para>
+</answer>
+</qandaentry>
+
+<qandaentry>
+<question>
+<para>
+Where is &quantaplus; going from here?
+</para>
+</question>
+<answer>
+<para>
+We have released &quantaplus; 3.4 and are now in preparation for the next major
+release. The targeted 4.0 release is a partial rewrite of Quanta to use the
+features ofered by the KDevelop framework.
+Our objective remains to create the very best web development
+environment. We realize that we will need many more people actively developing
+&quantaplus; 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 &quantaplus;. Much of this has been
+accomplished with the 3.4 release. Soon will be asking you, the web
+developers, to contribute your feature enhancements. We will organize
+these so that &quantaplus; web developers can find just the resources,
+extensions, and custom plug-ins they need to be the most reliable,
+professional developers ever!
+</para>
+</answer>
+</qandaentry>
+
+</qandaset>
+</chapter>
diff --git a/doc/quanta/quanta-menus.docbook b/doc/quanta/quanta-menus.docbook
new file mode 100644
index 00000000..751f4591
--- /dev/null
+++ b/doc/quanta/quanta-menus.docbook
@@ -0,0 +1,2265 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="quantas-menus-3-2">
+<chapterinfo>
+<title>The Menubar</title>
+<authorgroup>
+<author>
+<firstname>Robert</firstname>
+<surname>Nickel</surname>
+<affiliation>
+<address><email>robert@artnickel.com</email></address>
+</affiliation>
+</author>
+<author>
+ <firstname>Andr&#225;s</firstname>
+ <surname>Mantia</surname>
+ <affiliation>
+ <address><email>amantia@kde.org</email></address>
+ </affiliation>
+</author>
+
+<othercredit role="reviewer">
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<othercredit role="reviewer">
+<firstname>Fabrice</firstname>
+<surname>Mous</surname>
+<affiliation>
+<address><email>fabrice@kde.nl</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>The Menubar</title>
+
+<para>
+This chapter explains all the various functions that can be found in the
+menubar.
+</para>
+
+<sect1 id="file-menu-3-2">
+<title>The <guimenu>File</guimenu> Menu</title>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>New</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Create a new, blank file.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Open...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Search the file system to open an existing file.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Open Recent</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Quick list of the last several files you've opened. This list will change
+each time you open a file that is not on it, with the oldest being bumped
+off first.
+</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>
+Save the active file's changes.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Save As...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Save the active file with another name.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>File</guimenu>
+<guisubmenu>Save as Template</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+This allows you to save code snippets and entire files as a template for
+later use. See the section on <link linkend="templates-3-2">templates</link>.
+If you try to save the selected text/file outside of the local/project
+template dir, then you will receive an error.
+</para>
+<variablelist>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>File</guimenu>
+<guisubmenu>Save as Template</guisubmenu>
+<guisubmenu>Save as Local Template...</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Allows you to save a file as a template within the local scope.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>File</guimenu>
+<guisubmenu>Save as Template</guisubmenu>
+<guisubmenu>Save as Project Template...</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Allows you to save a file as a template within the project scope.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>File</guimenu>
+<guisubmenu>Save as Template</guisubmenu>
+<guisubmenu>Save Selection to Local Template File...</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Allows you to save the selected text (&eg; a code snippet) in a local
+template file.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>File</guimenu>
+<guisubmenu>Save as Template</guisubmenu>
+<guisubmenu>Save Selection to Project Template File...</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Allows you to save the selected text (&eg; a code snippet) in a project
+template file.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>S</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Save All...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Save all modified files in the editor.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>F5</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Reload</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Reloads the current focused document.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>P</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Print...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+You can actually print out your documents. Uses the <application>kprinter
+</application> interface.
+</para>
+</listitem>
+</varlistentry>
+<!-- Not shown any more
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Close</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Close the currently displayed file.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Close All</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Close all open files. Prompts you to save if any files have been modified.
+</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>
+Exit &quantaplus;
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</sect1>
+
+<sect1 id="edit-menu-3-2">
+<title>The <guimenu>Edit</guimenu> Menu</title>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>Z</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Undo</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Undo the last action performed.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>Z</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Redo</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Redo the last action undone.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>X</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Cut</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Cut the current block of text and place its contents on the clipboard.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>C</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Copy</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Copy the current block of text to the clipboard.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>V</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Paste</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Paste the contents of the clipboard at the current cursor position.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Edit</guimenu>
+<guisubmenu>Paste Special</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Edit</guimenu>
+<guisubmenu>Paste Special</guisubmenu>
+<guimenuitem>Paste HTML Quoted</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Converts the clipboard text &HTML; special characters to &HTML; entities
+before pasting into the text body, so they show up properly when viewed
+and aren't picked up as tags by the client browser.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Edit</guimenu>
+<guisubmenu>Paste Special</guisubmenu>
+<guimenuitem>Paste &URL; Encoded</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Converts the clipboard text into &URL; encoding, which is the correct way
+to include special characters and spaces into &URL;s. Used primarily when
+pasting a &URL; into an anchor tag.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>A</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Select All</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Select all of the text in the current document.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>A</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Deselect</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Unselect all text in the current document.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>B</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Block Selection Mode</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Turn on/off block highlighting. Allows you to select text blocks with your
+keyboard without holding down the shift key.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycap>Insert</keycap>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Overwrite Mode</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Overrides the Insert key.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>F</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Find...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+String or regular expression pattern to find in the current document.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycap>F3</keycap>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Find Next</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Repeat the find downward in the document from the current location.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Shift;<keycap>F3</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Find Previous</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Repeat the find upward in the document from the current location.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Replace...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+String or regular expression replacement of text in the current file.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>G</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Go to Line...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Go directly to a specific line number. This is really helpful when your
+&PHP; script is breaking unexpectedly!
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Alt;&Ctrl;<keycap>F</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Find in Files...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Find a string or expression in files in the selected folder. Sort of a
+&GUI; <command>grep</command> or <command>sed</command> with some
+predefined pattern spaces to help you out.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>J</keycap></keycombo>
+</shortcut>
+<guimenu>Edit</guimenu>
+<guimenuitem>Expand Abbreviation</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+ Expands the abbreviations. Abbreviations can be defined in the <menuchoice>
+ <guimenu>Settings</guimenu>
+ <guimenuitem>Configure Quanta...</guimenuitem>
+ </menuchoice> dialog.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Edit</guimenu>
+<guimenuitem>Apply Source Indentation</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+ Reformats the source code accroding to the same rules as the &VPL; part inserts the tags.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+
+</sect1>
+
+<sect1 id="view-menu-3-2">
+<title>The <guimenu>View</guimenu> Menu</title>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu>
+<guisubmenu>Tool Views</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu>
+<guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Files</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the files tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu>
+<guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Project</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the project tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Templates</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the template tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Scripts</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the scripts tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Document Structure</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the document structure tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Attribute Editor</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the attribute tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Documentation</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the documentation tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>M</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Messages</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the message window. This is the window where you see the
+output of any scripting actions and the debugger.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Problems</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the <guilabel>Problem Reporter</guilabel> at the bottom
+of the main &quantaplus; window. The <guilabel>Problem Reporter</guilabel>
+activates when you switch to the <guilabel>Structure Tree</guilabel>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Annotations</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Shows the annotation view. Read the <xref linkend="annotations" /> for details.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
+<guimenuitem>Show Upload Profile:...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Shows the files on the server for an <link linkend="upload-profiles">upload profile</link>.
+</para>
+</listitem>
+</varlistentry>
+
+
+</variablelist>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Shift;<keycap>F9</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>Show Icon Border</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle display of the icon border to the left of the main editor window.
+This bar allows for click toggling of bookmarks.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycap>F11</keycap>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>Show Line Numbers</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggles the display of line numbers along the side of
+the main editor window.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycap>F10</keycap>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>Dynamic Word Wrap</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Toggle on and off reformatting of text to a specific
+width as you type.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Alt;<keycap>F9</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>Source Editor</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Switch to the source of a document to edit.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>F9</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>&VPL; Editor</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Switch to the <guilabel>&VPL; Editor</guilabel> to edit a document.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycap>F9</keycap>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>&VPL; &amp; Source Editors</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Switch to split screen mode to edit a document.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycap>F6</keycap>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>Preview</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Preview the current document.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Alt;<keycap>Left Arrow</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>Back</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Navigate back one step in the preview.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Alt;<keycap>Right Arrow</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>Forward</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Navigate forward one step in the preview after having gone back in the
+preview.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycap>F5</keycap>
+</shortcut>
+<guimenu>View</guimenu>
+<guimenuitem>Reload Preview</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Reload the preview from disk.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul"><keycap>F12</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu><guisubmenu>External Preview</guisubmenu>
+<guimenuitem>View with &konqueror;</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+View the current file with &konqueror;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>F12</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu><guisubmenu>External Preview</guisubmenu>
+<guimenuitem>View with Firefox;</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+View the current file with the Mozilla Firefox browser.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Shift;<keycap>F12</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu><guisubmenu>External Preview</guisubmenu>
+<guimenuitem>View with Mozilla</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+View the current file with <trademark class="registered">Mozilla</trademark>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Shift;<keycap>F6</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu><guisubmenu>External Preview</guisubmenu>
+<guimenuitem>View with &Netscape;</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+View the current file with &Netscape;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Alt;<keycap>F6</keycap></keycombo>
+</shortcut>
+<guimenu>View</guimenu><guisubmenu>External Preview</guisubmenu>
+<guimenuitem>View with Opera</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+View the current file with <application>Opera</application>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>View</guimenu><guisubmenu>External Preview</guisubmenu>
+<guimenuitem>View with Lynx</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+View the current file with <application>Lynx</application> (a text based
+browser).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect1>
+
+<sect1 id="bookmarks-menu-3-2">
+ <title>The <guimenu>Bookmarks</guimenu> Menu</title>
+
+ <variablelist>
+ <varlistentry>
+ <term>
+ <menuchoice>
+ <shortcut>
+ <keycombo action="simul">&Ctrl;<keycap>B</keycap></keycombo>
+ </shortcut>
+ <guimenu>Bookmarks</guimenu>
+ <guimenuitem>Set Bookmark</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Sets a bookmark at the current line location in the current file.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Bookmarks</guimenu>
+ <guimenuitem>Clear All Bookmarks</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Clears all set bookmarks in the current document.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>If you have bookmarks in the current file, they will appear in the menu together with a <guilabel>Previous</guilabel> or <guilabel>Next</guilabel> item, depending on the position of the cursor in the document.</para>
+ <para>If you have bookmarks in other opened documents, they will appear in the menu grouped by the file name of the other documents.</para>
+</sect1>
+
+
+<sect1 id="project-menu-3-2">
+<title>The <guimenu>Project</guimenu> Menu</title>
+
+<para>
+How to use projects in &quantaplus; is described in <xref
+linkend="quanta-projects-3-2"/>.
+</para>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>New Project...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Launch the project creation wizard.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Open Project...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Open an existing project file from disk. &quantaplus; projects are saved
+with the .webprj extension.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guisubmenu>Open Recent Project</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Gives you a list of your most recently used projects for quick access.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Close Project</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Close the current project.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Open Project View...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Open a <quote>View</quote>, a specific combination of open files that you
+have previously saved.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Save Project View</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Save the current set of open files as a <quote>View</quote>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Save Project View As...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Save the current set of open files as a <quote>View</quote> under another
+name.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Delete Project View</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Delete a <quote>View</quote>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Insert Files...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Presents a dialog that allows you to select files to add to your current
+project. These files will then be copied into the project folder for
+editing.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Insert Folder...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Insert a folder and all of its contents into the current project.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Rescan Project Folder...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Scan the project folder for any new files you may have there. This
+allows you to copy graphics into your project folder or a subfolder
+thereof and then add them to the project.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycap>F8</keycap>
+</shortcut>
+<guimenu>Project</guimenu>
+<guimenuitem>Upload Project...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Upload the files in your project to the hosting server. The list of
+available transports depends on the version of &kde; you are running and
+whether or not you've downloaded extra KIO slaves.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Shift;<keycap>F7</keycap></keycombo>
+</shortcut>
+<guimenu>Project</guimenu>
+<guimenuitem>Project Properties</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Settings affecting the way &quantaplus; manages your project. See the
+<link linkend="quanta-projects-3-2">&quantaplus; projects</link> section for
+details.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect1>
+
+<sect1 id="toolbars-menu-3-2">
+<title>The <guimenu>Toolbars</guimenu> Menu</title>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guisubmenu>Load Toolbars</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guisubmenu>Load Toolbars</guisubmenu>
+<guimenuitem>Load Global Toolbar...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Loads a globally defined toolbar. These are kept in <filename
+class="directory">$<envar>KDEDIR</envar>/share/apps/quanta/toolbars</filename>
+by default.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guisubmenu>Load Toolbars</guisubmenu>
+<guimenuitem>Load Local Toolbar...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>Loads a locally defined toolbar. These are kept in <filename
+class="directory">$<envar>HOME</envar>/.kde/share/apps/quanta/toolbars</filename>
+by default.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guisubmenu>Load Toolbars</guisubmenu>
+<guimenuitem>Load Project Toolbar</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>Loads a project toolbar. These are kept in <filename
+class="directory"><replaceable>ProjectDir</replaceable>/toolbars</filename>
+and are only available in this menu if they have been assigned to this
+project.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guisubmenu>Save Toolbars</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Dialog for saving your toolbars. Allows you to pick the type of toolbar;
+Local or Project.
+</para>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guisubmenu>Save Toolbars</guisubmenu>
+<guimenuitem>Save as Local Toolbar...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Save as a local toolbar to
+<filename class="directory">$<envar>HOME</envar>/.kde/share/apps/quanta/toolbars</filename>
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guisubmenu>Save Toolbars</guisubmenu>
+<guimenuitem>Save as Project Toolbar...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Save as a project toolbar in
+<filename class="directory"><replaceable>ProjectDir</replaceable>/toolbars</filename>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guimenuitem>Add User Toolbar...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Brings up a dialog to create a new toolbar. This only creates the name.
+Actions must be added from the
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Actions</guimenuitem>
+</menuchoice>
+menu item. Toolbars are saved via the
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guimenuitem>Save Toolbars</guimenuitem>
+</menuchoice>
+menu or on close unsaved toolbars will prompt for you to save.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guimenuitem>Remove User Toolbar...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Remove a toolbar from usage. This does not remove it from the disk. If
+you've not saved the toolbar you are removing, you will be prompted to
+save it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guimenuitem>Rename User Toolbar..</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Allows you to rename a toolbar.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guimenuitem>Send Toolbar in E-Mail...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+This is a hook to email your custom toolbar to someone (maybe the
+&quantaplus; team for inclusion in the next release!) for their use. It
+spawns an email window and attaches your toolbar file to it automatically.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Toolbars</guimenu>
+ <guimenuitem>Send Toolbar in Email...</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ This is allows you to upload a toolbar to the main resource server. See <xref linkend="sharing-resources" />.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guimenuitem>Upload Toolbar...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+ This is allows you to upload toolbars to the main server, from where others can download it.See <xref linkend="sharing-resources" />.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Toolbars</guimenu>
+<guimenuitem>Download Toolbar...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+ This is allows you to download toolbars from the Internet.See <xref linkend="download-resources" />.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</sect1>
+
+<sect1 id="DTD-menu-3-2">
+<sect1info>
+<title>The <guimenu>&DTD;</guimenu> Menu</title>
+<authorgroup>
+<author>
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+</author>
+</authorgroup>
+</sect1info>
+
+<title>The <guimenu>&DTD;</guimenu> Menu</title>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>&DTD;</guimenu>
+<guimenuitem>Change the &DTD;...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Pops up a dialog box that allows you to change the current documents &DTD;
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>&DTD;</guimenu>
+ <guimenuitem>Edit &DTD; Settings...</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Makes possible to change the &descriptionrc; configuration file for a &DTEP;.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>&DTD;</guimenu>
+<guimenuitem>Load &amp; Convert &DTD;...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Load a &DTD; that you or someone else made and convert it to &quantaplus;'
+native description format.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>&DTD;</guimenu>
+<guimenuitem>Load &DTD; Entities...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Load/update the entities from a &DTD;. It is useful if you want to update the entities in a &DTEP; without regenerating the whole &DTEP;.
+In case the &DTEP; is a global one and you do not have write permission to the global KDE directory, the entity loading will fail.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>&DTD;</guimenu>
+<guimenuitem>Load &DTD; Package (&DTEP;)...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Load a your own &DTEP;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>&DTD;</guimenu>
+<guimenuitem>Send &DTD; Package (&DTEP;) in E-Mail...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Send your &DTEP; to a friend via &kmail;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>&DTD;</guimenu>
+ <guimenuitem>Upload &DTD; Package (&DTEP;)...</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ This is allows you to upload a &DTEP;s. See <xref linkend="sharing-resources" />.
+ </para>
+ </listitem>
+</varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>&DTD;</guimenu>
+<guimenuitem>Download &DTD; Package (&DTEP;)...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+ This is allows you to download &DTEP;s from the Internet. See <xref linkend="download-resources" />.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect1>
+
+<sect1 id="tags-menu-3-2">
+<title>The <guimenu>Tags</guimenu> Menu</title>
+
+<para>
+This menu contains a list of the elements that are in the currently loaded
+toolbars. If you have the Standard (&HTML;) toolbar loaded, the <guimenu>
+Tags</guimenu> menu will contain a submenu <guisubmenu>Standard
+</guisubmenu> which will contain the list of tags/actions on that toolbar.
+</para>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>E</keycap></keycombo>
+</shortcut>
+<guimenu>Tags</guimenu>
+<guimenuitem>Edit Current Tag...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Allows you to access the current markup tag settings dialog if one exists.
+This entry is always present, followed by the &DTD; specific submenus.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Tags</guimenu>
+<guimenuitem>Select Current Tag Area</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+This highlights the current tag area. The tag area begins where the mouse
+cursor is placed.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Tags</guimenu>
+ <guimenuitem>Smart Tag Insertion</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Activates/deactivates the smart insertion of tags. Currently it works only in (X)HTML DTDs. Smart insertion means that &quantaplus; will refuse to insert a tag using the toolbar if the tag cannot be present in the current location.
+ </para>
+ </listitem>
+</varlistentry>
+</variablelist>
+</sect1>
+
+<sect1 id="plugins-menu-3-2">
+<title>The <guimenu>Plugins</guimenu> Menu</title>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Plugins</guimenu>
+<guimenuitem><replaceable>Plugin</replaceable></guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+The <menuchoice><guimenu>Plugins</guimenu></menuchoice> menu lists the
+available plugins under the above menu items. Clicking them will activate
+them. Clicking an activated plugin will deactivate it.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect1>
+
+
+<sect1 id="tools-menu-3-2">
+<title>The <guimenu>Tools</guimenu> Menu</title>
+
+<variablelist>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guisubmenu>Highlight Mode</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Choose the syntax highlighting mode for the current file. The list of
+available highlighting schemes varies depending on your version of &kate;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guisubmenu>End of Line</guisubmenu>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Select the end of line encoding type. Useful if you have folks using other
+&OS; platforms to develop on. Choose from
+<guimenuitem>Unix</guimenuitem>,
+<guimenuitem>Windows/DOS</guimenuitem> or
+<guimenuitem>Macintosh</guimenuitem>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>I</keycap></keycombo>
+</shortcut>
+<guimenu>Tools</guimenu>
+<guimenuitem>Indent</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Move the selected block of text one tab width to the right.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>I</keycap></keycombo>
+</shortcut>
+<guimenu>Tools</guimenu>
+<guimenuitem>Unindent</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Move the selected block of text one tab width to the left.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Clean Indentation</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Removes all indentation.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>D</keycap></keycombo>
+</shortcut>
+<guimenu>Tools</guimenu>
+<guimenuitem>Comment</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Comments selected text.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;&Shift;<keycap>D</keycap></keycombo>
+</shortcut>
+<guimenu>Tools</guimenu>
+<guimenuitem>Uncomment</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Uncomments selected text.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Word Wrap Document</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Wrap the text in the current window to a predefined width.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Spelling...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Check the spelling in the current document.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Document Properties</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Edit specific properties of a currently loaded document when using the
+<guilabel>&VPL; Editor</guilabel>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Convert Tag &amp; Attribute Case...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Convert all tags and/or attributes character cases to another.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Alt;&Ctrl;<keycap>T</keycap></keycombo>
+</shortcut>
+<guimenu>Tools</guimenu>
+<guimenuitem>HTML Tidy Syntax Checking</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Checks the syntax of the current document against the selected &DTD; using the external <filename>tidy</filename> application.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect1>
+
+<sect1 id="window-menu-3-2">
+ <title>The <guimenu>Window</guimenu> Menu</title>
+ <variablelist>
+ <varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Window</guimenu>
+ <guimenuitem>Close</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Closes the current tab (document, plugin, preview or documentation).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Window</guimenu>
+ <guimenuitem>Close All</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Closes all opened tabs.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Window</guimenu>
+ <guimenuitem>MDI Mode</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ On-the-fly switching between different UI modes. Due to some limitations in the KDE libraries, the switching might take time and cause ugly artifacts. The recommended modes to use
+ are <guilabel>IDEAl Mode</guilabel>, which is the default or
+ <guilabel>Tab Page Mode</guilabel>, which is the same mode that was present in &quantaplus; 3.2 and earlier versions.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>Furthermore this menu contains an entry for every opened tab. By selecting such an entry, that selected tab will become the active one.</para>
+</sect1>
+
+<sect1 id="settings-menu-3-2">
+<title>The <guimenu>Settings</guimenu> Menu</title>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Settings</guimenu>
+ <guimenuitem>Toolbars</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Show or hide the non-user toolbars.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Settings</guimenu>
+ <guimenuitem>Show/Hide DTD Toolbar</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Toggle on and off the display of the &DTD; specific toolbar.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Settings</guimenu>
+ <guimenuitem>Show/Hide Statusbar</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Toggle on and off the display of the status bar at the bottom of the main
+ &quantaplus; window.
+ </para>
+ </listitem>
+ </varlistentry>
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Quanta...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Setup the <link linkend="configure-quanta">behavior</link> of &quantaplus;.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+ <menuchoice>
+ <guimenu>Settings</guimenu>
+ <guimenuitem>Configure Preview...</guimenuitem>
+ </menuchoice>
+</term>
+<listitem>
+ <para>
+ Setup the behavior of the integrated preview. <important><para>The changes made in the dialog have effects on every application using the KHTML part, including the &konqueror; web browser.</para></important>
+ </para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Actions...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+ This is where you define the actions for use on toolbars. See <xref linkend="user-actions" />.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Settings</guimenu>
+ <guimenuitem>Configure Plugins...</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ This is where you can define and modify the plugins.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+ <term>
+ <menuchoice>
+ <guimenu>Settings</guimenu>
+ <guimenuitem>Configure Editor...</guimenuitem>
+ </menuchoice>
+ </term>
+ <listitem>
+ <para>
+ Setup the behavior of the editor window. See the documentation on &kate;
+ for details.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Toolbars...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Dialog that allows you to add/delete items to/from toolbars and change the
+order the icons appear in.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Shortcuts...</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+Allows you to configure the many editor shortcuts available to
+&quantaplus;.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</sect1>
+
+<sect1 id="help-menu-3-2">
+<title>The <guimenu>Help</guimenu> Menu</title>
+
+<para>
+&quantaplus; contains a standard &kde; <guimenu>Help</guimenu> menu with
+the addition of these items:
+</para>
+
+<variablelist>
+<varlistentry>
+<term>
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>H</keycap></keycombo>
+</shortcut>
+<guimenu>Help</guimenu>
+<guimenuitem>Context Help</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+This should produce help based on the current pointer context. At the time
+of this writing this feature is not implemented.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+<menuchoice>
+<guimenu>Help</guimenu>
+<guimenuitem>Make A Donation</guimenuitem>
+</menuchoice>
+</term>
+<listitem>
+<para>
+&quantaplus; is a high quality product that is freely available, and
+freely licensed, but like any open source project, its developers can
+always use help. If you would like to support &quantaplus; development in a
+financial manner, you can find out how to here.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+
+<para>
+The standard &kde; help menu items are as follows:
+</para>
+
+&help.menu.documentation;
+
+</sect1>
+</chapter>
diff --git a/doc/quanta/quanta-projects.docbook b/doc/quanta/quanta-projects.docbook
new file mode 100644
index 00000000..06814ebb
--- /dev/null
+++ b/doc/quanta/quanta-projects.docbook
@@ -0,0 +1,792 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<sect1 id="quanta-projects-3-2">
+<sect1info>
+<title>Projects</title>
+<authorgroup>
+<author>
+<firstname>Robert</firstname>
+<surname>Nickel</surname>
+<affiliation>
+<address><email>robert@artnickel.com</email></address>
+</affiliation>
+</author>
+<author>
+ <firstname>Andr&#225;s</firstname>
+ <surname>Mantia</surname>
+ <affiliation>
+ <address><email>amantia@kde.org</email></address>
+ </affiliation>
+</author>
+
+<othercredit role="reviewer">
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<othercredit role="reviewer">
+<firstname>Fabrice</firstname>
+<surname>Mous</surname>
+<affiliation>
+<address><email>fabrice@kde.nl</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</sect1info>
+
+<title>Projects</title>
+
+<sect2 id="create-new-project-3-2">
+<title>New Projects</title>
+
+<para>
+The &quantaplus; project wizard
+(<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>New Project...</guimenuitem>
+</menuchoice>) makes project creation an easy task.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata format="PNG" fileref="project-1.png" />
+</imageobject>
+<caption><para>The Project Wizard.</para></caption>
+</mediaobject>
+
+<para>
+The fields are pretty straight forward. It is best to fill them in from
+top to bottom. Filling in a project name will autocomplete all the
+folder structure for the rest of the project. All of the paths and
+author information fields can be configured later on clicking
+<menuchoice>
+<shortcut>
+<keycombo action="simul">&Shift;<keycap>F7</keycap></keycombo>
+</shortcut>
+<guimenu>Project</guimenu>
+<guimenuitem>Project Properties</guimenuitem>
+</menuchoice>.
+</para>
+
+<variablelist>
+<title>General Project Settings</title>
+<varlistentry>
+<term><guilabel>Name</guilabel></term>
+<listitem>
+<para>
+Here you fill in the name for your project. For example, we will call ours
+<quote><literal>foo</literal>.</quote> When you fill in
+<guilabel>Name</guilabel>, <guilabel>File</guilabel> is filled out for
+you automatically.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>File</guilabel></term>
+<listitem>
+<para>
+This is the name of the &quantaplus; project file. By default, it is the
+name of your project, but in lowercase letters and without spaces. It
+uses the extension <literal role="extension">webprj</literal> (&eg;
+<filename>foo.webprj</filename>). This file is stored in the root of the
+project's Main Folder.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<variablelist>
+<varlistentry>
+<term>Server Settings</term>
+<listitem>
+<variablelist>
+<varlistentry>
+<term><guilabel>Protocol</guilabel></term>
+<listitem>
+<para>
+Here you select the protocol you will be using to access you project. If
+your project is on the same machine that you are using Quanta Plus on,
+then leave the value at Local. The list of protocols shown here is
+dependant of your system setup. Available protocols include SSH, FTP, NFS,
+SMB, WebDAV, and others. The protocol list is powered by &kde;'s
+powerful KIOSlave architecture. This framework allows every &kde;
+application to easily access remote information as if it is local to the
+machine.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Host</guilabel></term>
+<listitem>
+<para>
+Here you fill in the server address of the machine you want to access,
+unless you are working through the Local protocol. Either a hostname
+(hostname.example.com) or an IP address (127.0.0.1) can go here.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>User</guilabel></term>
+<listitem>
+<para>
+User name for logging onto the remote machine. This is case-sensitive.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Password</guilabel></term>
+<listitem>
+<para>
+Password for logging onto the remote machine. This is case-sensitive.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Port</guilabel></term>
+<listitem>
+<para>
+Leave this field blank to use the default port for the protocol you are
+using. You may need to change this depending on your server's
+configuration.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+</variablelist>
+
+
+<variablelist>
+<varlistentry>
+<term>Directory Settings</term>
+<listitem>
+<variablelist>
+<varlistentry>
+<term><guilabel>Main directory</guilabel></term>
+<listitem>
+<para>
+This is the root folder where all of the project files and folders
+will be stored.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Templates directory</guilabel></term>
+<listitem>
+<para>
+This is where the templates for this project will be stored. It is a relative path to the project and by default,
+it points to
+<filename class="directory">templates</filename>.
+If you have a common set of files that you use for several
+projects, then it may be useful to point this field to it, instead of to
+the default.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Toolbars directory</guilabel></term>
+<listitem>
+<para>
+ This is where the toolbars for this project will be stored. It is a relative path to the project and by default,
+it points to <filename>toolbars</filename>.
+If you have a common set of toolbars
+that you use for several projects, it may be useful to point this there
+instead of the default.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+</variablelist>
+
+
+<variablelist>
+<varlistentry>
+<term>Project Sources</term>
+<listitem>
+<variablelist>
+<varlistentry>
+<term><guilabel>Add local or remote files</guilabel></term>
+<listitem>
+<para>
+This allows you to get files from the local file system. You can choose
+multiple files or entire folders.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Use wget to download files from site</guilabel></term>
+<listitem>
+<para>
+This option is great if you have static web content that you wish to
+download and modify. For server side scripting (&eg; &PHP;, Python,
+&etc;.) you will have to get the files another way.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<variablelist>
+<title>Insert Files in Project</title>
+<varlistentry>
+<term><guilabel>Insert file from</guilabel></term>
+<listitem>
+<para>
+Check this if you wish to include files found in the path of the Main
+Folder. Leave unchecked when starting a project from scratch.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>Filters</term>
+<listitem>
+<variablelist>
+<varlistentry>
+<term><guilabel>Insert only markup, script and image files</guilabel></term>
+<listitem>
+<para>
+Choosing this option will only insert markup, script, and image files into
+your project.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Insert files with the following mask</guilabel></term>
+<listitem>
+<para>
+Choosing this option will display all files and folders within the
+Main Folder and allow you to be more specific with your choices.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Included files</guilabel></term>
+<listitem>
+<para>
+This displays a list of the files in the Main Folder. You can choose
+the desired files for inclusion, by checking, or exclusion, by unchecking,
+in your project.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<variablelist>
+<title>More Project Settings</title>
+<varlistentry>
+<term><guilabel>Author</guilabel></term>
+<listitem>
+<para>
+Insert your name (or alias) here.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Email</guilabel></term>
+<listitem>
+<para>
+The address where you would like email regarding this project to go.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>Project Defaults</term>
+<listitem>
+<variablelist>
+<varlistentry>
+<term><guilabel>Default DTD</guilabel></term>
+<listitem>
+<para>
+Choose the markup language you will be working with the most within this
+project.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Default encoding</guilabel></term>
+<listitem>
+<para>
+Choose the character encoding you wish the files in your project to be
+opened and saved with.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Use preview prefix</guilabel></term>
+<listitem>
+<para>
+Check this to use a prefix for your previews. This allows you to set the
+path prefix to something other than your local file system. This is most
+useful for pages that contain dynamic content and are dependent on server
+processing (like &PHP;, <acronym>JSS</acronym>, Python, &etc;). Simply
+type in the first portion of the address as it exists on that server and
+the filepath at the end will be complete by &quantaplus;. For example, if
+you have the domain <literal>bar.com</literal> and you are editing the
+<filename>index.html</filename> page, you could edit it on your remote
+machine (<systemitem>foo.bar.com</systemitem>), upload it to the server
+and press <keycap>F6</keycap> to see the results from
+<systemitem>www.bar.com</systemitem> instead of your local file system.
+</para>
+<variablelist>
+<varlistentry>
+<term><guilabel>Prefix</guilabel></term>
+<listitem>
+<para>
+Enter the prefix you wish to use here.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Insert global templates</guilabel></term>
+<listitem>
+<para>
+This makes a copy of the global templates in your projects folder tree.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Insert local templates</guilabel></term>
+<listitem>
+<para>
+This makes a copy of the local templates in your projects folder tree.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+<para>
+The last screen of the new project wizard has 3 settings that can make
+your life easier. These settings are available for change from the
+<menuchoice>
+<guimenu>Project</guimenu>
+<guimenuitem>Project Properties</guimenuitem>
+</menuchoice>
+menu tree on the Upload Profiles Tab or with the keyboard shortcut
+<keycombo action="simul">&Shift;<keycap>F7</keycap></keycombo>.
+</para>
+
+</sect2>
+
+<sect2 id="configuring-projects-3-2">
+<title>Configuring Projects</title>
+<para>
+ The project properties dialog looks like:
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="project-properties.png" format="PNG" />
+ </imageobject>
+ <caption><para>The general options page</para></caption>
+ </mediaobject>
+</para>
+
+<para>
+ Some of the items are the same as in the project wizard and are described in <xref linkend="create-new-project-3-2" />. The extra items are described below.
+<variablelist>
+<title>General Project Settings</title>
+<varlistentry>
+<term><guilabel>Exclude from project</guilabel></term>
+<listitem>
+<para>
+ A list of file names (wildcards can be used) that will be ignored when you do project related operations like <guimenuitem>Rescan Project Folder</guimenuitem>.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+ <term><guilabel>Exclude files listed in .cvsignore</guilabel></term>
+ <listitem>
+ <para>
+ A complementary option to the above one, also files listed in the .cvsignore file will be excluded from the project.
+ </para>
+ </listitem>
+</varlistentry>
+<varlistentry>
+ <term><guilabel>Default view</guilabel></term>
+ <listitem>
+ <para>
+ The project view that will be loaded when the project is opened.
+ You can read more about project views in <xref linkend="project-views-3-2" />.
+ </para>
+ </listitem>
+</varlistentry>
+<varlistentry>
+ <term><guilabel>Debugger</guilabel></term>
+ <listitem>
+ <para>
+ Select the debugger you want to use. Currently only Gubed is support. You can find more information about Gubed at <ulink url="http://gubed.sourceforge.net"></ulink>.The debugger plugin can be configured with the <guilabel>Options</guilabel> button.
+ read <xref linkend="debugging-3-2" /> to learn more about debugging.
+ </para>
+ </listitem>
+</varlistentry>
+<varlistentry>
+ <term><guilabel>Default view</guilabel></term>
+ <listitem>
+ <para>
+ The project view that will be loaded when the project is opened.
+ You can read more about project views in <xref linkend="project-views-3-2" />.
+ </para>
+ </listitem>
+</varlistentry>
+</variablelist>
+</para>
+<para>On the <guilabel>Upload Profiles</guilabel> page you can configure the upload profiles (see <xref linkend="upload-profiles" />), as well as enable the showing of a treeview with the content of the server for each profile by checking the <guilabel>Show a treeview for each profile</guilabel> checkbox.
+</para>
+<para>
+ On the <guilabel>Team Configuration</guilabel> page you can add, edit and remove members of the project as well as define a mailing list. Read <xref linkend="team-members" /> for details.
+</para>
+<para>
+ On the <guilabel>Event Configuration</guilabel> page you can <guilabel>Enable the event actions</guilabel>, add, modify and remove these actions. Event actions are executed when some predefined event occurs, like saving a file. See <xref linkend="event-actions" /> for details.
+</para>
+</sect2>
+
+<sect2 id="using-projects-3-2">
+<title>Using Projects</title>
+
+<sect3 id="project-files-3-2">
+<title>Project Files</title>
+
+<para>
+By default &quantaplus; will open the last project accessed when launched.
+This behavior is not currently configurable.
+</para>
+
+<para>
+To open another project, select <guimenuitem>Open Project...</guimenuitem> from the
+<guimenu>Project</guimenu> menu or the <guiicon>Open Project</guiicon>
+icon on the toolbar. The open project dialog will pop up and allow you to
+choose the project you wish. Projects have a <literal
+role="extension">webprj</literal> extension.
+</para>
+
+<para>
+When closing &quantaplus;, your project file will be saved automatically.
+You will be asked to save any changes before exiting if &quantaplus;
+detects any changed files. This same behavior occurs if you load a new
+project.
+</para>
+
+</sect3>
+
+<sect3 id="project-tree-view-3-2">
+<title>The Project Tree View</title>
+
+<para>
+The project tree view gives you uncluttered access to the files in your
+project. This is where you manage the files in the current project.
+</para>
+
+<para>For files, a &RMB; click brings up the following menu:</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="project-tree-view-file-rmb-menu.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+These items are fairly self-explanatory and will be left to the reader
+for exploration.
+</para>
+
+<para>
+Folders are similar but do not contain the <guimenuitem>Open</guimenuitem>
+and <guimenuitem>Open With...</guimenuitem> &RMB; menu items:
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="project-tree-view-dir-rmb-menu.png" format="PNG" />
+</imageobject>
+</mediaobject>
+
+<para>
+These items are left to the reader for exploration as well.
+</para>
+
+</sect3>
+
+<sect3 id="upload-project-3-2">
+<title>Uploading Projects</title>
+
+<para>
+The Upload Project dialog:
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="project-upload-dialog.png" format="PNG" />
+</imageobject>
+<caption><para>The Upload Project dialog.</para></caption>
+</mediaobject>
+
+<variablelist>
+<varlistentry>
+<term><guilabel>Profile name</guilabel></term>
+<listitem>
+<para>
+This is where different <link linkend="upload-profiles">profiles</link> can be chosen. The profile contains
+information on where the uploaded files are to be placed. Read <xref linkend="upload-profiles" />.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guibutton>New</guibutton></term>
+<listitem>
+<para>
+This button allows you to create new upload profiles.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Edit</guibutton></term>
+<listitem>
+<para>
+This allows you to edit the currently selected upload profile.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Remove</guibutton></term>
+<listitem>
+<para>
+This allows you to remove the current profile. If only
+one profile is available the button is grayed out to prevent its
+removal.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Keep passwords in memory</guilabel></term>
+<listitem>
+<para>
+The password is stored in memory and is lost as soon as the program is closed.
+This option is useful if frequent uploading of files is necessary and you do
+not want to use the more insecure <quote>Store password on disc</quote> option.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>All</guibutton></term>
+<listitem>
+<para>
+Select all files in your project for upload.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Modified</guibutton></term>
+<listitem>
+<para>
+Select all modified files for upload.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>None</guibutton></term>
+<listitem>
+<para>
+Unselects all files in the list.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Invert</guibutton></term>
+<listitem>
+<para>
+Selects/Unselects all files in the list.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Expand All</guibutton></term>
+<listitem>
+<para>
+Expands all folders.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Collapse All</guibutton></term>
+<listitem>
+<para>
+Collaspes all folders.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Update All</guibutton></term>
+<listitem>
+<para>
+Refreshes list.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Proceed</guibutton></term>
+<listitem>
+<para>
+Start the upload
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guibutton>Cancel</guibutton></term>
+<listitem>
+<para>
+This will abort your transfer in progress or just exit out of the dialog
+if you change your mind before starting the upload.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</sect3>
+
+<sect3 id="upload-profiles">
+<title>Upload profiles</title>
+<para>
+With &quantaplus; you can define multiple upload profiles and, in this
+way, upload your project (or parts of your project) to different servers.
+When you edit or create a profile you will face the following dialog:
+<mediaobject>
+<imageobject>
+<imagedata fileref="edit-upload-profile.png" format="PNG" />
+</imageobject>
+</mediaobject>
+</para>
+<variablelist>
+<varlistentry>
+<term><guilabel>Profile name</guilabel></term>
+<listitem>
+<para>Enter the name you wish to give your profile here.</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Host</guilabel></term>
+<listitem>
+<para>
+This is the hostname of the server you are copying the files to. Either a
+fully qualified domain name, or an IP address is needed.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Protocol</guilabel></term>
+<listitem>
+<para>
+Transfer protocol to use for this upload. Depending on your version of
+&kde; this list will vary. At the very least you should be able to choose
+from &FTP;, file (&ie; local) and <acronym>NFS</acronym>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Port</guilabel></term>
+<listitem>
+<para>
+Port for the transfer. Usually this will not need to be changed unless your
+network administrator is hosting a service on a port other than its well
+known port.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>User</guilabel></term>
+<listitem>
+<para>
+Username to use for authentication.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Password</guilabel></term>
+<listitem>
+<para>
+Password to use for authentication.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Store password on disc</guilabel></term>
+<listitem>
+<para>
+Depending on your level of paranoia, this is a time saving feature, or a
+danger. Use it at your discretion. The password is kept on disk as text in an obscured form, so it's not simple to read it, but anyone with programming knowledge can easily un-obscure it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Path</guilabel></term>
+<listitem>
+<para>
+This is the base path on the remote host that you will be copying files
+to.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Use as default profile</guilabel></term>
+<listitem>
+<para>
+Allows you to mark the profile currently being viewed as the default.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect3>
+</sect2>
+
+<sect2 id="project-views-3-2">
+ <title>Project Views</title>
+ <para>
+ A project view is just a set of files and toolbars. You can have multiple views in a project, meaning that by simply changing the view you can load several files and toolbars which will replace the currently opened files and toolbars.
+ </para>
+ <para>
+ Views can be saved, opened, deleted using the <guimenu>Project</guimenu> menu or the <guilabel>Project Toolbar</guilabel>, accessible via <menuchoice><guimenu>Settings</guimenu><guisubmenu>Toolbars</guisubmenu><guimenuitem>Project Toolbar</guimenuitem></menuchoice>.
+ </para>
+ <para>
+ You can have a default view (loaded when the project is opened). See <xref linkend="configuring-projects-3-2" />.
+ </para>
+</sect2>
+</sect1>
diff --git a/doc/quanta/quantamdi-editor.png b/doc/quanta/quantamdi-editor.png
new file mode 100644
index 00000000..c20e92b0
--- /dev/null
+++ b/doc/quanta/quantamdi-editor.png
Binary files differ
diff --git a/doc/quanta/quantamdi-treeview.png b/doc/quanta/quantamdi-treeview.png
new file mode 100644
index 00000000..69f0a5c6
--- /dev/null
+++ b/doc/quanta/quantamdi-treeview.png
Binary files differ
diff --git a/doc/quanta/quantamdi.png b/doc/quanta/quantamdi.png
new file mode 100644
index 00000000..8c85833f
--- /dev/null
+++ b/doc/quanta/quantamdi.png
Binary files differ
diff --git a/doc/quanta/script-action.png b/doc/quanta/script-action.png
new file mode 100644
index 00000000..6eaf85a6
--- /dev/null
+++ b/doc/quanta/script-action.png
Binary files differ
diff --git a/doc/quanta/tag-actions.png b/doc/quanta/tag-actions.png
new file mode 100644
index 00000000..3f5acd2a
--- /dev/null
+++ b/doc/quanta/tag-actions.png
Binary files differ
diff --git a/doc/quanta/tag_misc.png b/doc/quanta/tag_misc.png
new file mode 100644
index 00000000..7ae77650
--- /dev/null
+++ b/doc/quanta/tag_misc.png
Binary files differ
diff --git a/doc/quanta/taginputex.png b/doc/quanta/taginputex.png
new file mode 100644
index 00000000..f2f8f87e
--- /dev/null
+++ b/doc/quanta/taginputex.png
Binary files differ
diff --git a/doc/quanta/team-editing.png b/doc/quanta/team-editing.png
new file mode 100644
index 00000000..a81d2041
--- /dev/null
+++ b/doc/quanta/team-editing.png
Binary files differ
diff --git a/doc/quanta/template-rmb.png b/doc/quanta/template-rmb.png
new file mode 100644
index 00000000..ffa3b05f
--- /dev/null
+++ b/doc/quanta/template-rmb.png
Binary files differ
diff --git a/doc/quanta/text-action.png b/doc/quanta/text-action.png
new file mode 100644
index 00000000..9372b95a
--- /dev/null
+++ b/doc/quanta/text-action.png
Binary files differ
diff --git a/doc/quanta/toolbars.png b/doc/quanta/toolbars.png
new file mode 100644
index 00000000..0027e0fa
--- /dev/null
+++ b/doc/quanta/toolbars.png
Binary files differ
diff --git a/doc/quanta/ttab.png b/doc/quanta/ttab.png
new file mode 100644
index 00000000..f6d5c08b
--- /dev/null
+++ b/doc/quanta/ttab.png
Binary files differ
diff --git a/doc/quanta/view_sidetree.png b/doc/quanta/view_sidetree.png
new file mode 100644
index 00000000..ddf73f5f
--- /dev/null
+++ b/doc/quanta/view_sidetree.png
Binary files differ
diff --git a/doc/quanta/vplsourceview.png b/doc/quanta/vplsourceview.png
new file mode 100644
index 00000000..ba6e3472
--- /dev/null
+++ b/doc/quanta/vplsourceview.png
Binary files differ
diff --git a/doc/quanta/working-with-quanta.docbook b/doc/quanta/working-with-quanta.docbook
new file mode 100644
index 00000000..4a0ca0b1
--- /dev/null
+++ b/doc/quanta/working-with-quanta.docbook
@@ -0,0 +1,650 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<chapter id="using-quanta-3-2">
+<chapterinfo>
+<title>Working With...</title>
+<authorgroup>
+<author>
+<firstname>Robert</firstname>
+<surname>Nickel</surname>
+<affiliation>
+<address><email>robert@artnickel.com</email></address>
+</affiliation>
+</author>
+<author>
+ <firstname>Andr&aacute;s</firstname>
+ <surname>Mantia</surname>
+ <affiliation>
+ <address><email>amantia@kde.org</email></address>
+ </affiliation>
+</author>
+
+<othercredit role="reviewer">
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<othercredit role="reviewer">
+<firstname>Fabrice</firstname>
+<surname>Mous</surname>
+<affiliation>
+<address><email>fabrice@kde.nl</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</chapterinfo>
+
+<title>Working With...</title>
+
+<para>
+This chapter describes the parts of &quantaplus; that you will be
+interacting with mostly. These not only make your more productive, but
+they also allow you to customize &quantaplus; to your work-flow.
+</para>
+
+<sect1 id="toolbars-howto-3-2">
+<title>Toolbars</title>
+
+<para>
+As previously mentioned, toolbars in &quantaplus; are primarily managed
+through the <guimenu>Toolbars</guimenu> menu. Usage and creation are
+somewhat different. The creation of toolbars is discussed in a later
+section entitled <quote><link linkend="creating-toolbars-3-2">Creating
+Toolbars</link>.</quote>
+</para>
+
+<para>
+Using toolbars is quite simple. When you click on an icon for a desired
+element or action, one of three possibilities occur: the element is
+inserted (optionally with a closing element); an element dialog is
+activated, allowing you to fill in the attributes in a dialog box; or,
+lastly, an action is activated and does something nifty for your current
+file or project. If you find yourself doing tedious and redundant typing
+for a particular element, that is not in &quantaplus;, then you can add it.
+See <xref linkend="dtep-intro-3-2" /> for more information.
+</para>
+
+<para>
+Configuring the toolbars and the elements on it can be done either by
+using the context menu (right click on a toolbar), where you can
+create a <guilabel>New Action</guilabel>, a <guilabel>New Toolbar</guilabel>, you can perform other actions like <guilabel>Remove Toolbar</guilabel>, <guilabel>Rename Toolbar</guilabel> or <guilabel>Configure Toolbars</guilabel>, which will get you the dialog where you can specify which actions should be visible on this or other toolbars.
+</para>
+<para>
+ By invoking the context menu on an action (icon) placed to a toolbar, aside of the above actions you will see the <guilabel>Remove Action</guilabel> and <guilabel>Edit Action</guilabel> entries, which speak for themselves.
+</para>
+<para>
+ The toolbars and the actions on them can be configured by using the <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure Toolbars...</guimenuitem></menuchoice> and <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure Actions..</guimenuitem></menuchoice> menu entries.
+</para>
+<para>
+ About the user definable actions you can read in <xref linkend="user-actions" />.
+</para>
+
+<para>
+A tag dialog looks just like the following:
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="taginputex.png" format="PNG" />
+</imageobject>
+<caption><para>An example of a tag dialog.</para></caption>
+</mediaobject>
+</para>
+
+<para>
+The above image is the dialog for the anchor tag. If you know &HTML;/&XHTML;,
+then you should have noticed that all the attributes that you can use, in
+an anchor element, are available. Notice the tabs above for
+<guilabel>Main</guilabel>, <guilabel>Core and i18n</guilabel>,
+<guilabel>Events</guilabel>, and <guilabel>Focus</guilabel>, they hold
+all of the other attributes, according to their purpose, available to the
+anchor element. All you need do is: fill in the blanks for the attributes
+you want in your anchor, omit the attributes you do not want, and click OK.
+You now have a well formed anchor set down at the current cursor position.
+</para>
+</sect1>
+
+&quanta-projects;
+
+<sect1 id="templates-3-2">
+<title>Templates</title>
+
+<para>
+Templates are basically skeleton documents, code snippets and files to
+link to. &quantaplus; 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 &quantaplus; templates as having roughly the limitations to your
+imagination that your file system has.
+</para>
+
+<para>
+Templates exist in nested folders. There is no limit to how deep you
+can nest them, however, within any given folder &quantaplus; expects a
+consistent action for the base template type described below. Additionally
+templates allow for pre and post text to be concatenated to non document
+type templates. This facilitates tag creation. The next update after the
+introduction is scheduled to add the ability to pass variables to the text
+such as image size information to assist in tag creation.
+</para>
+
+<para>
+Our goal with templates is to extend them to include multi file
+<quote>concept</quote> 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, check out our
+<ulink url="http://quanta.sourceforge.net/main1.php?contfile=needs">help
+wanted</ulink> page.
+</para>
+
+<important>
+<para>
+Some of the templates that ship with &quantaplus; have conditions for
+their usage. Please read carefully the usage statement of conditions at
+the top of each template before you use it.
+</para>
+</important>
+
+<sect2 id="template-types-3-2">
+<title>Template Types</title>
+
+<para>
+There are various template types supported by &quantaplus;.
+These are:
+</para>
+<para>
+<simplelist>
+<member>Binary templates</member>
+<member>Document templates</member>
+<member>Text snippets</member>
+<member>Site templates</member>
+</simplelist>
+
+Examples for these types are provided with &quantaplus;.
+</para>
+<variablelist>
+<varlistentry>
+<term>Binary templates</term>
+<listitem>
+<para>
+Binaries are anything not identified purely in text. They can be any file,
+except text, including images, &PDF;s, flash files, etc. Binary templates
+are usually included in your document via links (&ie; images as
+an <sgmltag class="starttag">img src=/src/url</sgmltag>).
+Some examples can be found in the Templates tree under Global Templates.
+Please see <xref linkend="qit-3-2" /> for more information on the
+<guilabel>Templates</guilabel> tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Document templates</term>
+<listitem>
+<para>
+Documents can be any type of text document. You can create new documents
+based on these templates. Generally you would want to nest
+more specific or diverse documents in subfolders. 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. Some examples
+can be found in the Templates tree under Global Templates.
+Please see <xref linkend="qit-3-2" /> for more information on the
+<guilabel>Templates</guilabel> tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Text snippets</term>
+<listitem>
+<para>
+This type of template is useful when you don't want to create a new
+document based on a template, but want to insert the same text area
+over and over in your documents. They can contain anything, starting
+with a comment and ending with a complete menu handling JavaScript
+method or perl script. Some examples can be found in the Templates
+tree under Global Templates.
+Please see <xref linkend="qit-3-2" /> for more information on the
+<guilabel>Templates</guilabel> tree.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>Site templates</term>
+<listitem>
+<para>
+As the name says these templates are useful to build a whole site
+from a template. They are a collection of various documents which
+can be organized in a directory structure, everything gathered in
+a compressed tar archive. As of writing there are no example site
+templates in &quantaplus;.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</sect2>
+
+<sect2 id="template-scope-3-2">
+<title>Template Scopes</title>
+
+<para>
+Templates are accessible based upon their established
+<link linkend="quanta-workspaces-3-2">workspace</link> in &quantaplus;
+</para>
+
+</sect2>
+
+<sect2 id="creating-templates-3-2">
+<title>Creating Templates</title>
+
+<sect3 id="creating-document-templates">
+<title>Creating document templates</title>
+<para>
+Create a document structure that you love (&XML;, &HTML;, DocBook, &etc;.)
+and click on
+<menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Save as Template</guimenuitem>
+<guimenuitem>Save as Local/Project Template</guimenuitem>
+</menuchoice>.
+</para>
+
+<para>
+Once this is done, you will notice that (even if it is saved as a Project
+template) the template does <emphasis>not</emphasis> show in the project
+tab view. Look into the templates view to find your template under the
+Project templates tab.
+</para>
+</sect3>
+<sect3 id="creating-text-templayes">
+<title>Creating text snippets</title>
+<para>Select some text in your document and click on
+<menuchoice>
+<guimenu>File</guimenu>
+<guimenuitem>Save as Template</guimenuitem>
+<guimenuitem>Save Selection to Local/Project Template file</guimenuitem>
+</menuchoice>.
+Alternatively you can just use drag and drop to drag the selection to the <guilabel>Templates</guilabel> treeview.
+</para>
+</sect3>
+<sect3 id="creating-binary-templates">
+<title>Creating binary templates</title>
+<para>Creation of a binary template is simple: just copy the file
+into a template folder. You can use standard file management
+functions to do it, like drag and drop or copy and paste from
+Konqueror or the <guilabel>Files Tree</guilabel>.
+</para>
+</sect3>
+<sect3 id="creating-site-templates">
+<title>Creating site templates</title>
+<para>
+In the <guilabel>Files Tree</guilabel> or the <guilabel>Project Files</guilabel>
+treeviews right click on a folder and select <guilabel>Create Site Template</guilabel>,
+pick up a name for the template and save it. By default it will try
+to save to the project template folder, but of course you can choose
+to save it as a local or global template as well.
+</para>
+</sect3>
+</sect2>
+
+<sect2 id="using-templates-with-projects-3-2">
+<title>Using Templates With Projects</title>
+
+<para>
+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.
+</para>
+
+<para>
+When creating a project you can opt to copy to your local project, all the
+existing global and user templates. Legacy project get default templating
+abilities so nothing is lost You can choose where to locate your template
+files so they can be in your server root and easy to upload or you can
+make them secure to link to below server root which is a very cool trick.
+When linking to a file not in the project templates you will be prompted
+to copy the file to the project templates prior to linking. This will prevent
+broken links on upload. You always have control where you place your
+templates so you can choose to move them. However &quantaplus; does not
+track this so you will need to change links.
+</para>
+
+</sect2>
+
+<sect2 id="managing-templates-3-2">
+<title>Managing Templates</title>
+
+<para>
+Template structure on the template tab is based on the files found in
+<filename class="directory">
+$<envar>KDEDIR</envar>/share/apps/quanta/templates</filename> and
+<filename class="directory">
+$<envar>HOME</envar>/.kde/share/apps/quanta/templates</filename>. Each of
+these folders is specified as one of four types of container as explained <link linkend="template-types-3-2">above</link>.
+</para>
+
+<para>
+To set the behavior of each folder, &RMB; click in the template view on
+the folder and choose <guimenuitem>Properties</guimenuitem>. The
+following dialog will come up:
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="template-rmb.png" format="PNG" />
+</imageobject>
+<caption><para>Properties dialog.</para></caption>
+</mediaobject>
+</para>
+
+<variablelist>
+<varlistentry>
+<term><guilabel>Type</guilabel></term>
+
+<listitem>
+<para>
+Drop down box with the three types discussed previously; files, text,
+template. This box will be grayed out if you have the <guilabel>Inherit
+parent attribute box</guilabel> checked.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><guilabel>Inherit parent attribute</guilabel> (<sgmltag
+class="starttag">foo</sgmltag>)</term>
+<listitem>
+<para>
+This is checked by default and is fine for all but the top level
+folders in your templates tree. If the top level folder has this
+checked, it will basically deactivate templates for that folder and all
+that aren't explicitly set below it. If this is not a top level folder,
+then the <sgmltag class="starttag">blah</sgmltag> will say something like
+<literal>Text snippet</literal>. If it says nothing, then chances are that
+you are on a top level folder.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Use pre/post text</guilabel></term>
+<listitem>
+<para>
+Enables pre and post text for templates in this folder. This could be a
+common header/footer for all of your templates for a given project and
+then you copy content templates into that folder and have a complete
+page with the custom header/footer as a starting point.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Pre-text</guilabel></term>
+<listitem>
+<para>
+The actual text to insert before your templates content.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Post-text</guilabel></term>
+<listitem>
+<para>
+The actual text to insert after your templates content.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+<!--<para>
+The properties for a template file looks a bit different:
+<mediaobject>
+<imageobject>
+<imagedata fileref="template-file-rmb.png" format="PNG" />
+</imageobject>
+<caption><para>Properties dialog.</para></caption>
+</mediaobject>
+
+</para>-->
+<para>
+Additionally if you look at your options with the &RMB; you will see
+complete file management tools for creating folders or copying and
+pasting templates from one location to another.
+</para>
+</sect2>
+</sect1>
+
+<sect1 id="vpl-3-2">
+<sect1info>
+<title><application>Visual Page Layout</application></title>
+<authorgroup>
+<author>
+<firstname>Nicolas</firstname>
+<surname>Deschildre</surname>
+<affiliation>
+<address><email>nicolasdchd@ifrance.com</email></address>
+</affiliation>
+</author>
+
+<othercredit role="reviewer">
+<firstname>Christopher</firstname>
+<surname>Hornbaker</surname>
+<affiliation>
+<address><email>chrishornbaker@earthlink.net</email></address>
+</affiliation>
+<contrib>Reviewer</contrib>
+</othercredit>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+</sect1info>
+
+<title><application>Visual Page Layout</application></title>
+
+<sect2 id="vpl-views-3-2">
+<title>&VPL; Modes</title>
+
+<para>
+The <application>Visual Page Layout</application> (&VPL;) editor (also known
+as <acronym>WYSIWYG</acronym> (What You See Is What You Get)) allows you
+to edit a &HTML; or &XHTML; document while seeing the changes on-the-fly.
+Just like your favorite wordprocessor, you can click on your document and
+a cursor will appear, thus enabling you to enter text, insert images,
+apply text decorations, &etc;. &VPL;'s aim is to allow you to create great,
+valid web pages without any knowledge of Internet markup languages.
+</para>
+
+<para>
+&quantaplus; offers two modes: <guilabel>&VPL; Editor</guilabel> and
+<guilabel>&VPL; &amp; Source Editors</guilabel>, which are accessible from
+the <guimenu>View</guimenu> menu. The first replaces the <guilabel>Source
+Editor</guilabel> with the <guilabel>&VPL; Editor</guilabel>, and the
+second splits the editor window into two parts: the <guilabel>Source
+Editor</guilabel> and the <guilabel>&VPL; Editor</guilabel>.
+</para>
+
+<para>
+The <guilabel>&VPL; Editor</guilabel> works like so: It loads a document
+like a normal &HTML; or &XHTML; page and a cursor appears. Then you can
+edit it, and switching back to <guilabel>Source Editor</guilabel>, you see
+that the changes you made on the <guilabel>&VPL; Editor</guilabel> have
+been merged in the <guilabel>Source Editor</guilabel>.
+</para>
+
+<note>
+<para>
+When working in the <guilabel>&VPL; Editor</guilabel> with a document that
+contains &PHP;, you will see a small green icon representing the &PHP;
+code. You cannot directly edit it with the <guilabel>&VPL;
+Editor</guilabel>. To edit &PHP;, you will still need to use the
+<guilabel>Source Editor</guilabel>. There are no plans to change this
+functionality.
+</para>
+</note>
+
+<para>
+The second mode behaves exactly like the first, except that you instantly
+see the impact that your changes have made, either in the <guilabel>Source
+Editor</guilabel> or in the <guilabel>&VPL; Editor</guilabel>, and the
+cursors of the source editor and of the <guilabel>&VPL; Editor</guilabel>
+are synchronized. Pressing <keycap>F9</keycap> loads this mode, but, if
+it is already loaded, it will move the focus from one view to the other,
+while keeping you at the same location of the document.
+</para>
+
+<para>
+The refresh intervals between the <guilabel>&VPL; Editor</guilabel> and
+the <guilabel>Source Editor</guilabel> are configurable. Go to
+<menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Quanta...</guimenuitem>
+</menuchoice>. Select the <guimenu>&VPL; View</guimenu> tab. You can
+choose whether you want to refresh a view only when you click on it or
+automatically. If you choose automatically, then you can choose a refresh
+interval. The general recommendation is: A smaller number for fast
+computers and a bigger number for slower ones.
+</para>
+
+<mediaobject>
+<imageobject>
+<imagedata fileref="vplsourceview.png" format="PNG" />
+</imageobject>
+<caption><para>The <guilabel>&VPL; &amp; Source Editors</guilabel> mode.</para></caption>
+</mediaobject>
+</sect2>
+
+<sect2 id="vpl-editing-3-2">
+<title>&VPL; Editing</title>
+
+<sect3 id="doc-prop-dia-3-2">
+<title>The <guilabel>Document Properties</guilabel> Dialog</title>
+
+<para>
+Now, let's say you want to edit the title of your web page. How do you do
+it? Simply launch
+<menuchoice>
+<guimenu>Tools</guimenu>
+<guimenuitem>Document Properties</guimenuitem>
+</menuchoice>. This tool allows editing of <quote>invisible</quote>
+tags when using the <guilabel>&VPL; Editor</guilabel>. The
+<guilabel>Document Properties</guilabel> dialog is also launched when you
+create a new document while in the <guilabel>&VPL; Editor</guilabel>. This
+is in order to lessen the amount of hand coding you need to perform. With
+it, you can edit:
+</para>
+
+<variablelist>
+<varlistentry>
+<term><guilabel>Title</guilabel></term>
+<listitem>
+<para>
+The title of the document.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Meta items</guilabel></term>
+<listitem>
+<para>
+Meta tags allow you to store information about the document itself
+&eg; keywords for the Internet search engines. You can add or remove
+<guilabel>Meta items</guilabel> by pressing the two buttons below,
+and edit them by clicking on the list &eg; put <quote>keywords</quote> on
+the <quote>name</quote> column and <quote>keyword1 keyword2</quote> on the
+<quote>content</quote> column.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>CSS Rules</guilabel></term>
+<listitem>
+<para>
+<guilabel>CSS Rules</guilabel> are the new way to tell your web browser
+how to present the page. You can add or delete the <guilabel>CSS
+Rules</guilabel> by pressing the buttons below. You can also fill the
+fields like the <guilabel>Meta items</guilabel>. The editing of
+<guilabel>CSS Rules</guilabel> is not yet supported.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><guilabel>Link CSS Stylesheet</guilabel></term>
+<listitem>
+<para>
+You can also link an external CSS stylesheet. Simply click on the
+<guilabel>Browse</guilabel> button and select your file.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</sect3>
+
+<sect3 id="vpl-editor-3-2">
+<title>The <guilabel>&VPL; Editor</guilabel></title>
+
+<para>
+You can use your cursor like you do in a wordprocessor, moving with the
+arrows. There may come a time when the cursor does not want to go where you
+want it to go (a pesky bug). Selection also works as usual. You can insert
+text by typing and remove text by pressing the &Backspace; or Delete key.
+</para>
+
+<para>
+Now we come to tag insertion. You can insert images, applets, text
+decorations such as bold and so on by using the same toolbars you use in
+the source editor. Note that the insertion of tags does not remove previous
+identical tags &eg; if you insert an anchor tag around some text, then you
+must remove any other anchor tag around it.
+</para>
+
+<note>
+<para>
+Some toolbar items will be disabled, such as the <guilabel>Table
+Wizard</guilabel> or <guilabel>Quick List Wizard</guilabel>. They will
+work later in &VPL;, but, for this release, you should use the
+<guilabel>Tables</guilabel> or <guilabel>Lists</guilabel> toolbars.
+</para>
+</note>
+
+<para>
+To edit a tag (be it an image, an applet, or whatever), switch to the
+<guilabel>Attribute Tree</guilabel>, accessible via
+<menuchoice>
+<guimenu>View</guimenu>
+<guisubmenu>Tool views</guisubmenu>
+</menuchoice>. Click on the tag you wish to edit, or, if you cannot access
+it, click on an object contained by it. The <guilabel>Attribute
+Tree</guilabel> will show the current tag name as well as a list of all its
+parents and attributes. Currently &VPL; does not support, say,
+&XHTML;+<acronym>MathML</acronym>, but you will see that you can edit
+namespaces via this view. You can simply click on the
+<guilabel>Value</guilabel> field and modify whatever you want. If you want
+to access a parent of the current tag, then select it and the
+<guilabel>Attribute Tree</guilabel> will load it.
+</para>
+
+<para>
+To delete a tag, we will use the <guilabel>Attribute Tree</guilabel>. Have
+you noticed the two little red crosses at the top-right corner? The first one
+deletes only the currently selected tag and, if the &HTML;/&XHTML;
+specification does not allow some children of the deleted tag to be children of
+the parent tag of the tag set to be deleted, then they are also deleted,
+and so on. The second cross will delete the selected tag as well as all of
+its children, so be careful!
+</para>
+
+</sect3>
+</sect2>
+</sect1>
+</chapter>
diff --git a/doc/xsldbg/Makefile.am b/doc/xsldbg/Makefile.am
new file mode 100644
index 00000000..41691557
--- /dev/null
+++ b/doc/xsldbg/Makefile.am
@@ -0,0 +1,3 @@
+KDE_LANG = en
+KDE_DOCS = AUTO
+
diff --git a/doc/xsldbg/commands.docbook b/doc/xsldbg/commands.docbook
new file mode 100644
index 00000000..0c1e6735
--- /dev/null
+++ b/doc/xsldbg/commands.docbook
@@ -0,0 +1,801 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<chapter id="commands">
+<title>Command Reference</title>
+
+<sect1 id="addparam_cmd"><title id="addparam_cmd.title">Addparam</title>
+<para>Add a libxslt parameter ; equivalent to providing --param &lt;QNAME&gt;:&lt;XPATH&gt; via command line.
+</para>
+<para></para>
+<table><title>Addparam usage</title>
+<tgroup cols="1"><tbody>
+<row><entry>addparam &lt;QNAME&gt; &lt;XPATH&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(The &lt;XPATH&gt; must not contain any spaces nor double quotation marks.) </emphasis></entry></row>
+<row><entry>addparam &lt;QNAME&gt; "&lt;XPATH&gt;"&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Must not contain double quotation marks in &lt;XPATH&gt;)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="addwatch_cmd"><title id="addwatch_cmd.title">Addwatch</title>
+<para>Add an expression to be watched. See showwatch for display watch values</para>
+<para>Shortcut name: watch</para>
+<table><title>Addwatch usage</title>
+<tgroup cols="1"><tbody>
+<row><entry>addwatch &lt;XPATH&gt;</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="base_cmd"><title id="base_cmd.title">Base</title>
+<para>Print the base for this node</para>
+<table><title>Base usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>base</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="break_cmd"><title id="break_cmd.title">Break</title>
+<para>Break at a template, at a location in a stylesheet or xml file loaded by xsldbg, or at the current node.
+New for xsldbg 3.1.4: When in gdb compatabilty mode orpaned breakpoints can be
+set at a specific file and line number and be resolved to an active later on. </para>
+<para>Shortcut name: b</para><para>xsldbg will try to guess the complete URL given a
+<informaltable>
+<tgroup cols="1"><tbody>
+<row><entry>file name without a path specified.</entry></row>
+<row><entry>a file name in the same directory as the "top" stylesheet loaded</entry></row>
+<row><entry>a file name relative to the current working directory of xsldbg</entry></row>
+</tbody></tgroup>
+</informaltable>
+Ie if you have loaded a stylesheet file of ../en/xsldoc.xsl you can do this
+</para><para> break -l xsldoc.xsl 26
+</para><para>This command will match a partial or complete QNAME template and or mode name provided. Eg "template" will ma/tch any QNAME with a local part of "template"
+</para><para>Any name spaces in the provided QNAME will be expanded as specified
+by the names spaces defined in the XSL SOURCE file. eg "xsl:test1" will be expanded to "http://www.w3.org/199/XSL/Transform:test1"
+</para><para>A requested breakpoint may need to be resolved to its associated URL and line number. This is done automaticly after
+the first template has been seen by xsldbg. Breakpoints are re-validated shortly after the start of each run.
+</para><para>Automatic breakpoint validation is used when gdb mode is enabled - the default behaviour of xsldbg</para>
+<table><title>Break usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>break -l &lt;FILENAME&gt; &lt;LINENO&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To set breakpoint at specified file, line number)</emphasis></entry></row>
+<row><entry>break -l &lt;URI&gt; &lt;LINENO&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To set breakpoint at specified URI, line number)</emphasis></entry></row>
+<row><entry>break &lt;TEMPLATE_NAME&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To break at named or matched template.)</emphasis></entry></row>
+<row><entry>break &lt;TEMPLATE_NAME&gt; &lt;MODE_NAME&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To break at named template with given mode.)></emphasis></entry></row>
+<row><entry>break "" &lt;MODE_NAME&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To break at any template that has a given mode name)</emphasis></entry></row>
+<row><entry>break *&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To break at any template found.)</emphasis></entry></row>
+<row><entry>break \*&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To break at the "*" template. Other name that include '*' will not be treated specialy.)</emphasis></entry></row>
+<row><entry>break &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To break point at current node. Yes that includes xml data nodes!)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="bye_cmd"><title id="bye_cmd.title">Bye</title>
+<para>Exit processing stylesheet as soon as possible.</para>
+<table><title>Bye usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>bye</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="cat_cmd"><title id="cat_cmd.title">Cat</title>
+<para>Print the result of a xpath expression on relative current node.</para>
+<table><title>Cat usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>Usage : cat &lt;XPATH&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To view a variable or parameter)</emphasis></entry></row>
+<row><entry>Usage : cat $&lt;QNAME&gt;</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="cd_cmd"><title id="cd_cmd.title">Cd</title>
+<para>Change to the path specified by a xpath.</para>
+<table><title>Cd usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>&lt;&lt; = preceding-sibling::node()</entry></row>
+<row><entry>&gt;&gt; = following-sibling::node()</entry></row>
+<row><entry>&lt;- = ancestor::node()</entry></row>
+<row><entry>-&gt; = decendant::node()</entry></row>
+</tbody></tgroup>
+</table>
+</sect1>
+
+<sect1 id="chdir_cmd"><title id="chdir_cmd.title">Chdir</title>
+<para>Change the working directory</para>
+<table><title>Chdir usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>chdir &lt;PATH&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(A relative or absolute path for operating system)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="continue_cmd"><title id="continue_cmd.title">Continue</title>
+<para>Continue running stylesheet, stopping at any break points found.</para>
+<para>Shortcut name: c</para>
+<table><title>Contine usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>continue</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="data_cmd"><title id="data_cmd.title">Data</title>
+<para>Switch to displaying the current node in xml data. Or change xml data used</para>
+<table><title>Data usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>data&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Switch to the current document node.)</emphasis></entry></row>
+<row><entry>data &lt;DATA&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To change to a new xml data file. A leading "~" is replaced by the $HOME environment variable value. Will need to use "run" command to process it)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="delete_cmd"><title id="delete_cmd.title">Delete</title>
+<para>Delete a template breakpoint</para>
+<para>Shortcut name: d</para>
+<table><title>Delete usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>delete&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To delete breakpoint at current node)</emphasis></entry></row>
+<row><entry>delete &lt;BREAKPOINT_ID&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To delete breakpoint at specified break point number)</emphasis></entry></row>
+<row><entry>delete -l &lt;FILENAME&gt; &lt;LINENO&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Delete at specifed file, line number)</emphasis></entry></row>
+<row><entry>delete -l &lt;URI&gt; &lt;LINENO&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Delete at specifed URI, line number)</emphasis></entry></row>
+<row><entry>delete &lt;TEMMPLATENAME&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To delete break point at named template.)</emphasis></entry></row>
+<row><entry>delete *&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To delete all break points.)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="delparam_cmd"><title id="delparam_cmd.title">Delparam</title>
+<para>Delete a libxslt parameter</para>
+<table><title>Delparam usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>delparam&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Delete all parameters present)</emphasis></entry></row>
+<row><entry>delparam &lt;PARAM_ID&gt;</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="delwatch_cmd"><title id="delwatch_cmd.title">Delwatch</title>
+<para>Delete a watch expression or remove all watch expressions as displayed by "showwatch." command</para>
+<table><title>Delwatch usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>delwatch &lt;WATCHID&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Delete a watch expression with given ID)</emphasis></entry></row>
+<row><entry>delwatch *&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Delete all watch expressions)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="dir_cmd"><title id="dir_cmd.title">Dir</title>
+<para>Print list of nodes in a similary way to the dir shell command.</para>
+<para/>
+<table><title>Dir usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>dir</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="disable_cmd"><title id="disable_cmd.title">Disable</title>
+<para>Disable a breakpoint</para>
+<table><title>Disable usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>disable&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To disable breakpoint at current node)</emphasis></entry></row>
+<row><entry>disable &lt;BREAKPOINT_ID&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To disable breakpoint at specified break point number</emphasis></entry></row>
+<row><entry>disable -l &lt;FILENAME&gt; &lt;LINENO&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Disable breakpoint at specifed file, line number)</emphasis></entry></row>
+<row><entry>disable -l &lt;URI&gt; &lt;LINENO&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Disable breakpoint at specifed URI, line number)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="du_cmd"><title id="du_cmd.title">Du</title>
+<para>Print a summary of child nodes in a tree format.</para>
+<table><title>Du usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>du</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="dump_cmd"><title id="dump_cmd.title">Dump</title>
+<para>Dump the gory details of this node</para>
+<table><title>Dump usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>dump</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="enable_cmd"><title id="enable_cmd.title">Enable</title>
+<para>Enable or disable a breakpoint (Toggle enable/disable/)</para>
+<para>Shortcut name: e</para>
+<table><title>Enable usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>enable&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To enable/disable breakpoint at current node)</emphasis></entry></row>
+<row><entry>enable &lt;BREAKPOINT_ID&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To enable/disable breakpoint at specified break point number</emphasis></entry></row>
+<row><entry>enable -l &lt;FILENAME&gt; &lt;LINENO&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Enable/disable breakpoint at specifed file, line number)</emphasis></entry></row>
+<row><entry>enable -l &lt;URI&gt; &lt;LINENO&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Enable/disable breakpoint at specifed URI, line number)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="entities_cmd"><title id="entities_cmd.title">Entities</title>
+<para>Print list of external General Parsed entities used data file (document)</para>
+<para>Shortcut name : ent</para>
+<table><title>Entities usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>entities</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="exit_cmd"><title id="exit_cmd.title">Exit</title>
+<para>Exit processing stylesheet as soon as possible.</para>
+<table><title>Exit usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>exit</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="frame_cmd"><title id="frame_cmd.title">Frame</title>
+<para>Print the stack frame at a given depth</para>
+<para>Shortcut name: f</para>
+<table><title>Frame usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>frame &lt;FRAME_DEPTH&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Depth is a number from 0 to the current depth of call stack)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="free_cmd"><title id="free_cmd.title">Free</title>
+<para>Free stylesheet and data (Disabled see run)</para>
+<table><title>Free usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>free</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="globals_cmd"><title id="globals_cmd.title">Globals</title>
+<para>Print a list of global stylesheet variables or parameters. Print the value of a global variable</para>
+<table><title>Globals usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>globals&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Print list of all globaly available variables)</emphasis></entry></row>
+<row><entry>globals -f&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Print list of all globaly available variables and thier values)</emphasis></entry></row>
+<row><entry>globals &lt;QNAME&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Print the value of variable specified)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="help_cmd"><title id="help_cmd.title">Help</title>
+<para>Display help on command or overiew</para>
+<para>Shortcut name: h</para>
+<table><title>Help usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>help &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Show overview of product)</emphasis></entry></row>
+<row><entry>help &lt;COMMAND&gt; &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Show help about a command)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="load_cmd"><title id="load_cmd.title">Load</title>
+<para>Load the xsldbg's options and user preferences from disk</para>
+<table><title>Load usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>load</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="locals_cmd"><title id="locals_cmd.title">Locals</title>
+<para>Print a list of local stylesheet variables or parameters. Print the value of a local variable</para>
+<table><title>Locals usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>locals&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Print list of all locally available variables)</emphasis></entry></row>
+<row><entry>locals -f&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Print list of all locally available variables and thier values)</emphasis></entry></row>
+<row><entry>locals &lt;QNAME&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Print the value of variable specified)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="ls_cmd"><title id="ls_cmd.title">Ls</title>
+<para>List nodes in a brief format</para>
+<table><title>Ls usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>ls</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="next_cmd"><title id="next_cmd.title">Next</title>
+<para>Skip over an xsl:call-template or xsl:apply-templates.
+This command has the same effect of entering the commands "step" and then "up"</para>
+<para>Shortcut name: n</para>
+<table><title>Next usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>next&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(proceed to next sibling instruction)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="options_cmd"><title id="options_cmd.title">Options</title>
+<para>Print the values for xsldbg's option</para>
+<table><title>Options usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>options</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="output_cmd"><title id="output_cmd.title">Output</title>
+<para>Specify a local, writable file to be used for output of results</para>
+<para>Shortcut name : o</para>
+<table><title>Output usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>output &lt;FILENAME&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(A local writable file name. Which can have a "~" prefix on *nix and CYGWIN platforms. Or environment variables under RISC OS)</emphasis></entry></row>
+<row><entry>output &lt;URI&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(The &lt;URI&gt; must only use the "file://" protocol. This is then converted to a file name suitable for the operating system)</emphasis></entry></row>
+<row><entry>output -&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>( Send to standard output. Must only be used when using xsldbg's command line prompt )</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="public_cmd"><title id="public_cmd.title">Public</title>
+<para>Print the value that a public ID maps via the current catalog</para>
+<para>Shortcut name : pub</para>
+<table><title>Public usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>public "&lt;PublicID&gt;"</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="pwd_cmd"><title id="pwd_cmd.title">Pwd</title>
+<para>Print the current working directory.</para>
+<table><title>Pwd usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>pwd</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="quit_cmd"><title id="quit_cmd.title">Quit</title>
+<para>Exit processing stylesheet as soon as possible.</para>
+<para>Shortcut name: q</para>
+<table><title>Quit usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>quit</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="run_cmd"><title id="run_cmd.title">Run</title>
+<para>Restart the stylesheet.</para>
+<para>Shortcut name: r</para>
+<table><title>Run usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>run</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="save_cmd"><title id="save_cmd.title">Save</title>
+<para>Save the xsldbg's options and user preferences to disk</para>
+<table><title>Save usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>save</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="search_cmd"><title id="search_cmd.title">Search</title>
+<para>Search a dataBase of all information gathered from stylesheets loaded</para>
+<para>All output files are stored in, value of the "searchresultspath" option if set, or the same directory as the provided stylesheet. searchresults.xml is normally transformed by search.xsl, but will be transformed using searchhtml.xsl if the "prefrehtml" option is set.
+</para><para>When the search command is issued a xml file (searchresults.xml) will be created. You can then process this file with your own stylesheet to present data in a other ways. If "preferhtml" option is not set
+then searchresult.txt is printed to display.
+</para><para>Depending on the amount of data collected it might take a while to complete this command.
+</para>
+<table><title>Search usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>search &lt;XPATH&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(See what xpath can be used see search.dtd. The deafault &lt;XPATH&gt; is '//search/*' )</emphasis></entry></row>
+<row><entry>search -sort &lt;XPATH&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Tell search.xsl to sort the result before outputing it)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="set_cmd"><title id="set_cmd.title">Set</title>
+<para>Set the value of a variable</para>
+<table><title>Set usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>set &lt;VARIABLE_NAME&gt; &lt;XPATH&gt;</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="setoption_cmd"><title id="setoption_cmd.title">Setoption</title>
+<para>Set an option for execution of stylesheet</para>
+<para>You will need to use run command to active changes</para>
+<table><title>Setoption usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>setoption &lt;OPTION_NAME&gt; &lt;INTEGER_VALUE&gt;</entry></row>
+<row><entry>Where &lt;OPTION_NAME&gt; can be either</entry></row>
+<row><entry>
+ <para>
+ <informaltable>
+ <tgroup cols="1"><tbody>
+ <row><entry>debug&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true dump the tree of the result instead)</emphasis></entry></row>
+ <row><entry>catalogs&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true use the catalogs from $SGML_CATALOG_FILES or SGML$CatalogFiles for risc operating system)</emphasis></entry></row>
+ <row><entry>html&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true the input document is an HTML file)</emphasis></entry></row>
+ <row><entry>docbook&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true and docbook is still supported by libxml the input document is SGML docbook)</emphasis></entry></row>
+ <row><entry>xinclude&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true do XInclude processing on document intput)</emphasis></entry></row>
+ <row><entry>preferhtml&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true the prefer html output for search results. : See search command)</emphasis></entry></row>
+ <row><entry>autoencode&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true try to use the encoding from the stylesheet)</emphasis></entry></row>
+ <row><entry>utf8input&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true All input from user is in UTF-8.This is normaly used when xsldbg is running as a thread)</emphasis></entry></row>
+ <row><entry>&nbsp;&nbsp;&nbsp;&nbsp;<emphasis></emphasis></entry></row>
+ <row><entry>gdb&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Run in gdb compatability mode)</emphasis>
+ <para>
+ <informaltable>
+ <tgroup cols="1"><tbody>
+ <row><entry>For a value of 1 this means
+ <para>
+ <informaltable>
+ <tgroup cols="1"><tbody>
+ <row><entry>Print lots more messages. Increase the frequency of printing "Breapoint at ..."</entry></row>
+ <row><entry>At most GDB_LINES_TO_PRINT lines will be printed when evalating expressions, followed by a "...". See options.h to change this value, the default is three lines of text</entry></row>
+ <row><entry>Both local and globals will be printed when the "locals" command is issued </entry></row>
+ <row><entry>When printing expresssions with cat/print. The evaluated value will be prefixed by "= " &lt; EXPRESSION &gt;</entry></row>
+ </tbody></tgroup>
+ </informaltable>
+ </para>
+ </entry></row>
+ <row><entry/></row>
+ <row><entry>For a value of 2 this means
+ <para>
+ <informaltable>
+ <tgroup cols="1"><tbody>
+ <row><entry>Print messages needed by KDbg as well as the output state above (when value is 1) </entry></row>
+ </tbody></tgroup>
+ </informaltable>
+ </para>
+ </entry></row>
+ </tbody></tgroup>
+ </informaltable>
+ </para>
+ </entry></row>
+ <row><entry>nonet&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true refuse to fetch DTDs or entities over network)</emphasis></entry></row>
+ <row><entry>novalid&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true skip the DTD loading phase)</emphasis></entry></row>
+ <row><entry>repeat&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true run the transformation 20 times)</emphasis></entry></row>
+ <row><entry>profile&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true dump profiling informations)</emphasis></entry></row>
+ <row><entry>timing&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true display the time used)</emphasis></entry></row>
+ <row><entry>noout&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(If &lt;INTEGER_VALUE&gt; is true do not dump the result)</emphasis></entry></row>
+ </tbody></tgroup>
+ </informaltable>
+ </para>
+</entry></row>
+<row><entry>Where value is true if it is NOT equal to zero</entry></row>
+<row><entry>Where value is false if it IS equal to zero</entry></row>
+<row><entry>stdout&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>Print all error messages to stdout. Normally error messages go to stderr.</emphasis></entry></row>
+<row><entry>setoption &lt;OPTION_NAME&gt; "&lt;STRING_VALUE&gt;"&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Must not contain double quotation marks in &lt;STRING_VALUE&gt;)</emphasis></entry></row>
+<row><entry>setoption &lt;OPTION_NAME&gt; &lt;STRING_VALUE&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Must not contain any spaces, nor double quotation marks in &lt;STRING_VALUE&gt;)</emphasis></entry></row>
+<row><entry>Where &lt;OPTION_NAME&gt; can be either</entry></row>
+<row><entry>
+ <para>
+ <informaltable>
+ <tgroup cols="1"><tbody>
+ <row><entry>data&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Data file's URI)</emphasis></entry></row>
+ <row><entry>source&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Source file's URI)</emphasis></entry></row>
+ <row><entry>output&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Output file's SystemID )</emphasis></entry></row>
+ <row><entry>docspath&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Path to use when looking for documentation)</emphasis></entry></row>
+ <row><entry>catalognames&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(The names of the catalogs to use when the catalogs option is set. Value will be lost if set before setting catalogs option)</emphasis></entry></row>
+ <row><entry>encoding&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(What encoding to use for standard output)</emphasis></entry></row>
+ <row><entry>searchresultspath&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>What path is to be used when storing the results of searching. If this is not set then xsldbg will use the path of the stylesheet</emphasis></entry></row>
+ </tbody></tgroup>
+ </informaltable>
+ </para>
+</entry></row></tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="shell_cmd"><title id="shell_cmd.title">Shell</title>
+<para>Execute shell command</para>
+<table><title>Shell usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>shell &lt;TEXT&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(&lt;TEXT&gt; is the text to be passed to operating system for execution)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="showbreak_cmd"><title id="showbreak_cmd.title">Showbreak</title>
+<para>To display list of template break points.</para>
+<para>Shortcut name: show</para><para>If a mode exists on a template breakpoint then it will
+ be appended to the end of template name for breakpoint. An example of the output is :
+<informaltable>
+<tgroup cols="1"><tbody>
+<row><entry> Breakpoint 3 enabled for template :"*" in file test1.xsl : line 105</entry></row>
+<row><entry> Breakpoint 2 enabled for template :"* testMode" in file test1.xsl : line 109</entry></row>
+<row><entry> Breakpoint 1 enabled for template :"* http://www.w3.org/1999/XSL/Transform:testMode" in file test1.xsl : line 113</entry></row>
+<row><entry/></row>
+<row><entry> Total of 3 breakpoints present</entry></row>
+</tbody></tgroup></informaltable></para>
+<table><title>Showbreak usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>showbreak</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="showparam_cmd"><title id="showparam_cmd.title">Showparam</title>
+<para>Print the libxslt parameters present</para>
+<table><title>Showparam usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>showparam</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="showwatch_cmd"><title id="showwatch_cmd.title">Showwatch</title>
+<para>Show the current expression being watched</para>
+<para>Shortcut name: watches</para>
+<table><title>Showwatch usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>showwatch&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Show the currently selected watches and thier values)</emphasis></entry></row>
+<row><entry>showwatch 1&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Enable the automatic printing of watch expressions. This is used by default.)</emphasis></entry></row>
+<row><entry>showwatch 0&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Disable the automatic printing of watch expressions.)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="source_cmd"><title id="source_cmd.title">Source</title>
+<para>Switch to displaying the current node in stylesheet. Or change stylesheet used</para>
+<table><title>Source usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>source&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Switch to the current node in stylesheet.)</emphasis></entry></row>
+<row><entry>source &lt;SOURCE&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(To change to a new source file. A leading "~" is replaced by the $HOME environment variable value. Will need to use "run" command to execute it)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="step_cmd"><title id="step_cmd.title">Step</title>
+<para>Step until next stylesheet instruction.</para>
+<para>Shortcut name: s</para>
+<table><title>Step usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>step</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="stepdown_cmd"><title id="stepdown_cmd.title">Stepdown</title>
+<para>Step down to a newer "call frame". </para>
+<para>Shortcut name: down</para>
+<table><title>Stepdown usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>stepdown &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(step down one frame)</emphasis></entry></row>
+<row><entry>stepdown &lt;NUMBER_OF_FRAMES&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(step down specified number of frames)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="stepup_cmd"><title id="stepup_cmd.title">Stepup</title>
+<para>Step up to a older "call frame". </para>
+<para>Shortcut name: up</para><para>This is not an accurate command, xsldbg will stop as close as it can. </para>
+<table><title>Stepup usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>stepup &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(step up one frame)</emphasis></entry></row>
+<row><entry>stepup &lt;NUMBER_OF_FRAMES&gt; &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(step up specified number of frames)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="stylesheets_cmd"><title id="stylesheets_cmd.title">Stylesheets</title>
+<para>Print out a list of stylesheets loaded</para>
+<para>Shortcut name: style</para>
+<table><title>Stylesheets usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>stylesheets</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+
+<sect1 id="system_cmd"><title id="system_cmd.title">System</title>
+<para>Print the value that a system file maps via the current catalog</para>
+<para>Shortcut name : sys</para>
+<table><title>System usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>system "&lt;SystemID&gt;"</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="templates_cmd"><title id="templates_cmd.title">Templates</title>
+<para>Print a list of available templates. Search for a template</para>
+<para>Shortcut name: t</para>
+<table><title>Templates usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>templates</entry></row>
+<row><entry>templates &lt;TEMPLATE&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Print details of template named &lt;TEMPLATE&gt; if it can be found)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="trace_cmd"><title id="trace_cmd.title">Trace</title>
+<para>Trace one execution of the stylesheet printing the file and lines of
+intermediate steps</para>
+<table><title>Trace usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>trace</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="tty_cmd"><title id="tty_cmd.title">Tty</title>
+<para>Open a terminal. Set the level of tty redirection.</para>
+<table><title>Tty usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>tty &lt;DEVICE_PATH&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Where &lt;DEVICE_PATH&gt; is a valid terminal on the operating system. Just tries to open the terminal</emphasis></entry></row>
+<row><entry>tty &lt;TTY_LEVEL&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Set the level of tty redirection, where &lt;TTY_LEVEL&gt; is a valid level of input/output to use)</emphasis>
+<para>
+ <informaltable>
+ <tgroup cols="1"><tbody>
+ <row><entry>Where level is </entry></row>
+ <row><entry>0 = Default input/output </entry></row>
+ <row><entry>1 = Terminal output of results of transformation, tracing and walking &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Default state when tty device has been opened. Not fully implemented yet.)</emphasis></entry></row>
+ <row><entry>2 = Full redirection to terminal&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Not implemented yet.)</emphasis></entry></row>
+ <row><entry>All other integer values are assumed to mean level 0
+ </entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+</entry></row></tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="validate_cmd"><title id="validate_cmd.title">Validate</title>
+<para>Validate the output file generated by stylesheet (Disabled)</para>
+<table><title>Validate usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>validate</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="walk_cmd"><title id="walk_cmd.title">Walk</title>
+<para>Walk through code using a range of speeds</para>
+<table><title>Walk usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>walk &lt;SPEED&gt;&nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Use Ctrl-c to stop
+execution, &lt;SPEED&gt; is a value between 0 and 9. Where 0 means stop, 1 is
+very fast, 9 is very slow)</emphasis></entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="where_cmd"><title id="where_cmd.title">Where</title>
+<para>Print a trace of templates calls (frame stack) and print the working directory.</para>
+<para>Shortcut name: w</para>
+<table><title>Where usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>where</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+<sect1 id="write_cmd"><title id="write_cmd.title">Write</title>
+<para>To be completed</para>
+<table><title>Write usage</title>
+<tgroup cols="1">
+<tbody>
+<row><entry>write</entry></row>
+</tbody>
+</tgroup>
+</table>
+</sect1>
+
+
+
+
+
+</chapter>
diff --git a/doc/xsldbg/credits.docbook b/doc/xsldbg/credits.docbook
new file mode 100644
index 00000000..89bdadc4
--- /dev/null
+++ b/doc/xsldbg/credits.docbook
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<chapter id="credits">
+<title>Credits and License</title>
+
+<para>
+&xsldbg;
+</para>
+<para>
+Program copyright 2004 Keith Isdale <email>k_isdale tpg com au</email>
+</para>
+
+<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
+&underFDL;
+&underGPL;
+
+<sect1 id="thanks">
+<title>Thanks to </title>
+<para> The writers the libxml and libxsl.</para>
+<para><ulink url="http://members.nextra.at/johsixt/">Johannes Sixt</ulink> for helping with adding xsldbg support to KDbg</para></sect1>
+
+</chapter>
diff --git a/doc/xsldbg/index.docbook b/doc/xsldbg/index.docbook
new file mode 100644
index 00000000..4c211c10
--- /dev/null
+++ b/doc/xsldbg/index.docbook
@@ -0,0 +1,124 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+ <!ENTITY xsldbg "<application>xsldbg</application>">
+ <!ENTITY kappname "&xsldbg;">
+ <!ENTITY package "kdewebdev">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ <!ENTITY introduction-chapter SYSTEM "introduction.docbook">
+ <!ENTITY usage-chapter SYSTEM "usage.docbook">
+ <!ENTITY commands-chapter SYSTEM "commands.docbook">
+ <!ENTITY credits-chapter SYSTEM "credits.docbook">
+]>
+
+<!-- More content formatting is in need of being done asking for help on kde-i18n-doc@kde.org : remove these two lines when done -->
+<!-- NO TRANSLATION -->
+
+<!-- ................................................................ -->
+<!-- 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;">
+
+<bookinfo>
+<title>The &xsldbg; Handbook</title>
+
+<authorgroup>
+<author>
+<firstname>Keith</firstname>
+<surname>Isdale</surname>
+<affiliation>
+<address><email>k_isdale@tpg.com.au</email></address>
+</affiliation>
+</author>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+</authorgroup>
+
+<copyright>
+<year>2002</year>
+<year>2003</year>
+<holder>Keith Isdale</holder>
+</copyright>
+
+<legalnotice>&FDLNotice;</legalnotice>
+<date>2004-09-26</date>
+<releaseinfo>1.01.00</releaseinfo>
+
+
+<abstract>
+<para>
+&xsldbg; is a tool intended to help understand stylesheets.
+What makes it different to other stylesheet debuggers is the ability
+to search for items of interest and trace stylesheet execution.
+</para>
+</abstract>
+
+<keywordset>
+<keyword>KDE</keyword>
+<keyword>kdeutils</keyword>
+<keyword>xsldbg</keyword>
+<keyword>xsl</keyword>
+<keyword>XML</keyword>
+</keywordset>
+
+</bookinfo>
+
+&introduction-chapter;
+&usage-chapter;
+&commands-chapter;
+&credits-chapter;
+
+
+<appendix id="installation">
+<title>Installation</title>
+
+<sect1 id="getting-xsldbg">
+<title>How to obtain &xsldbg;</title>
+
+<para>
+See the kxsldbg component of the kdewebdev module in &kde; SVN.
+</para>
+
+&install.intro.documentation;
+
+</sect1>
+
+<sect1 id="requirements">
+<title>Requirements</title>
+
+<para>
+In order to successfully use &xsldbg;, you need &kde; libxslt, libexslt and
+libxml installed which are available on a typical &kde; installation.
+</para>
+</sect1>
+
+<sect1 id="compilation">
+<title>Compilation and Installation</title>
+<para>&xsldbg; is usually compiled as part of the kxsldbg component in the kdewebdev module</para>
+</sect1>
+
+<sect1 id="configuration">
+<title>Configuration</title>
+
+<para>&xsldbg; is configured using arguments passed via the command line and its <link linkend="setoption_cmd" endterm="setoption_cmd.title">setoption</link> command</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/doc/xsldbg/introduction.docbook b/doc/xsldbg/introduction.docbook
new file mode 100644
index 00000000..65879ce0
--- /dev/null
+++ b/doc/xsldbg/introduction.docbook
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<chapter id="introduction">
+<title>Introduction</title>
+
+<para>
+&xsldbg; is a text based tool to debug stylesheets (the eXtensible
+Stylesheet Language) and has commands similar to the Unix/Linux debugger
+gdb. It has three major modes of execution of stylesheets.
+</para>
+<para>
+<informaltable>
+ <tgroup cols="1"><tbody>
+ <row><entry>Run the whole stylesheet</entry></row>
+ <row><entry>Step to next xsl instruction</entry></row>
+ <row><entry>Continue until next break point is found, or stylesheet has restarted</entry></row>
+ </tbody></tgroup>
+</informaltable>
+</para>
+
+</chapter>
diff --git a/doc/xsldbg/usage.docbook b/doc/xsldbg/usage.docbook
new file mode 100644
index 00000000..5fe2fdc2
--- /dev/null
+++ b/doc/xsldbg/usage.docbook
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<chapter id="using-xsldbg">
+<title>Using &xsldbg;</title>
+<para></para>
+<sect1><title>xsldbg command arguments</title>
+<para>
+On systems with readline library available you can use the back/forward
+keys to navigate the history of entered commands.
+On all systems the last entered command can be repeated by just pressing
+the &lt;ENTER&gt; key.
+</para>
+<para>If your operating system supports it file names will be expanded.</para>
+<para>
+Several commands take more that one argument. Quotes may be used to lead to
+complex expressions being treated as one arument. eg break &quot;* | @&quot; would allow you to se a breakpoint on the
+ template with the name &quot;* | @&quot;
+</para>
+</sect1>
+
+<sect1 id="legend"><title>Legend of terms</title>
+<para>The following table describes the terms used in the subsiquent command guide</para>
+<informaltable>
+<tgroup cols="1"><tbody>
+ <row><entry>
+ TEMPLATE_NAME : A valid template name contains only ASCI
+ character codes 0x00 to 0x7F. And can be a fully qualified name ie
+ "xsl:templateName". </entry></row>
+ <row><entry>
+ FILENAME : A valid file name local to the system of the
+ user. It can have a "~" prefix on *nix and CYGWIN platforms. Or
+ environment variables under RISC OS
+ </entry></row>
+ <row><entry>URI : A Uniform Resource Identifiers as defined by RFC 2396</entry></row>
+ <row><entry>MODE_NAME The mode of template which can be fully qualified name ie "xsl:modeName".</entry></row>
+ <row><entry>QNAME : A fully qualified name ie "xsl:localPart"</entry></row>
+ <row><entry>LINENO : A valid line number in associated &lt;FILENAME&gt;</entry></row>
+ <row><entry>NUMBER_OF_FRAMES : A valid line number frames to change position by</entry></row>
+ <row><entry>BREAKPOINT_ID : A valid break point number</entry></row>
+ <row><entry>WATCH_ID : A valid watch expression number as indicated by showwatch command</entry></row>
+ <row><entry>SPEED: speed to walk through code at, between 0 to 9</entry></row>
+ <row><entry>
+ &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(Comment)</emphasis>: a
+ comment about command meaning or usage
+ </entry></row>
+ <row><entry>{ opt1 | opt2 | opt2 .. etc} : Choose one of the opt's</entry></row>
+ <row><entry>XPATH : a xpath selection of node(s)</entry></row>
+ <row><entry>PARAM_ID : a valid parameter number as indicated by showparam command</entry></row>
+ <row><entry>
+ PATH : A path to change working directory to On some operating systems a
+ "~" prefix will be replaced by your home directory path
+ </entry></row>
+ <row><entry>
+ TEXT : Free form text &nbsp;&nbsp;&nbsp;&nbsp;<emphasis>(no
+ restrictions)</emphasis>
+ </entry></row>
+ <row><entry>COMMAND : A valid command for the xsdbg</entry></row>
+ <row><entry>QNAME : A valid variable/parameter name</entry></row>
+ <row><entry>SOURCE : The stylesheet being/to be executed. See &lt;FILENAME&gt; and &lt;URI&gt;</entry></row>
+ <row><entry>
+ DATA : The xml data(document) being/to be processed by the
+ stylesheet. See &lt;FILENAME&gt;
+ and &lt;URI&gt;
+ </entry></row>
+ <row><entry>DEVICE_PATH : Is a valid terminal on the operating system</entry></row>
+ <row><entry>TTY_LEVEL : Is a valid level of input/output to use</entry></row>
+</tbody></tgroup></informaltable>
+<para></para>
+</sect1>
+
+<sect1 id="command_summary"><title>Overview of available commands</title>
+<informaltable>
+<tgroup cols="1"><tbody>
+<row><entry>Help related :<link linkend="help_cmd" endterm="help_cmd.title">help</link></entry></row>
+<row><entry>
+ Running related : {<link linkend="bye_cmd" endterm="bye_cmd.title">bye</link>|<link linkend="exit_cmd" endterm="exit_cmd.title">exit</link>|
+ <link linkend="quit_cmd" endterm="quit_cmd.title">quit</link>}, <link linkend="step_cmd" endterm="step_cmd.title">step</link>,
+ <link linkend="stepup_cmd" endterm="stepup_cmd.title">stepup</link>, <link linkend="stepdown_cmd" endterm="stepdown_cmd.title">stepdown</link>,
+ <link linkend="next_cmd" endterm="next_cmd.title">next</link>,
+ <link linkend="continue_cmd" endterm="continue_cmd.title">continue</link>,
+ <link linkend="run_cmd" endterm="run_cmd.title">run</link>,
+<link linkend="trace_cmd" endterm="trace_cmd.title">trace</link>, <link linkend="setoption_cmd" endterm="setoption_cmd.title">setoption</link>,
+ <link linkend="options_cmd" endterm="options_cmd.title">options</link>
+</entry></row>
+<row><entry>
+ Libxslt parameter related : <link linkend="addparam_cmd" endterm="addparam_cmd.title">addparam</link>,
+ <link linkend="delparam_cmd" endterm="delparam_cmd.title">delparam</link>, <link linkend="showparam_cmd" endterm="showparam_cmd.title">showparam</link>,
+ <link linkend="output_cmd" endterm="output_cmd.title">output</link>, <link linkend="setoption_cmd" endterm="setoption_cmd.title">setoption</link>,
+ <link linkend="options_cmd" endterm="options_cmd.title">options</link>
+</entry></row>
+<row><entry>
+ Template related : <link linkend="templates_cmd" endterm="templates_cmd.title">templates</link>,
+ <link linkend="where_cmd" endterm="where_cmd.title">where</link>, <link
+ linkend="frame_cmd" endterm="frame_cmd.title">frame</link>
+</entry></row>
+<row><entry>
+ Break point related : <link linkend="break_cmd" endterm="break_cmd.title">break</link>,
+ <link linkend="showbreak_cmd"
+ endterm="showbreak_cmd.title">showbreak</link>, <link linkend="delete_cmd" endterm="delete_cmd.title">delete</link>,
+ <link linkend="enable_cmd" endterm="enable_cmd.title">enable</link>
+</entry></row>
+<row><entry>
+ Expression viewing(xpath) : <link linkend="cat_cmd"
+ endterm="cat_cmd.title">cat</link>
+</entry></row>
+<row><entry>
+ Node viewing : <link linkend="ls_cmd" endterm="ls_cmd.title">ls</link>, <link linkend="dir_cmd" endterm="dir_cmd.title">dir</link>,
+ <link linkend="du_cmd" endterm="du_cmd.title">du</link>, <link
+ linkend="cat_cmd" endterm="cat_cmd.title">cat</link>, <link
+ linkend="pwd_cmd" endterm="pwd_cmd.title">pwd</link>
+</entry></row>
+<row><entry>
+ Variable viewing : <link linkend="globals_cmd" endterm="globals_cmd.title">globals</link>,
+ <link linkend="locals_cmd" endterm="locals_cmd.title">locals</link>,
+ <link linkend="cat_cmd" endterm="cat_cmd.title">cat</link>,
+ <link linkend="addwatch_cmd" endterm="addwatch_cmd.title">addwatch</link>
+</entry></row>
+<row><entry>
+ Variable setting: <link linkend="set_cmd"
+ endterm="set_cmd.title">set</link>
+</entry></row>
+<row><entry>
+ Node selection : <link linkend="source_cmd" endterm="source_cmd.title">source</link>,
+ <link linkend="data_cmd" endterm="data_cmd.title">data</link>, <link
+ linkend="cd_cmd" endterm="cd_cmd.title">cd</link>
+</entry></row>
+<row><entry>
+ Searching :<link linkend="search_cmd"
+ endterm="search_cmd.title">search</link>
+</entry></row>
+<row><entry>
+ Operating system related :<link linkend="chdir_cmd" endterm="chdir_cmd.title">chdir</link>,
+ <link linkend="shell_cmd" endterm="shell_cmd.title">shell</link>, <link linkend="tty_cmd" endterm="tty_cmd.title">tty</link></entry></row>
+<row><entry>File related : <link linkend="output_cmd" endterm="output_cmd.title">output</link>,
+ <link linkend="entities_cmd" endterm="entities_cmd.title">entities</link>, <link linkend="system_cmd" endterm="system_cmd.title">system</link>,
+ <link linkend="public_cmd" endterm="public_cmd.title">public</link>
+</entry></row>
+<row><entry>
+ Disabled file commands: <link linkend="validate_cmd" endterm="validate_cmd.title">validate</link>,
+ <link linkend="load_cmd" endterm="load_cmd.title">load</link>, <link linkend="save_cmd" endterm="save_cmd.title">save</link>,
+ <link linkend="write_cmd" endterm="write_cmd.title">write</link>, <link
+ linkend="free_cmd" endterm="free_cmd.title">free</link>
+</entry></row>
+</tbody></tgroup></informaltable>
+</sect1>
+
+</chapter>
+
diff --git a/doc/xsldbg/xsldbghelp.xml b/doc/xsldbg/xsldbghelp.xml
new file mode 100644
index 00000000..64d9b81b
--- /dev/null
+++ b/doc/xsldbg/xsldbghelp.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE helpbook [
+ <!ENTITY nbsp " ">
+ <!ENTITY introduction-chapter SYSTEM "introduction.docbook">
+ <!ENTITY usage-chapter SYSTEM "usage.docbook">
+ <!ENTITY commands-chapter SYSTEM "commands.docbook">
+ <!ENTITY xsldbg "xsldbg">
+]>
+
+
+<!--
+ Note: xsldbg's index.docbook file is not used because it is much slower to process.
+ Translations required are passed as command line arguments to xsldbg
+ -->
+
+
+
+<helpbook>
+&introduction-chapter;
+&usage-chapter;
+&commands-chapter;
+</helpbook>
diff --git a/doc/xsldbg/xsldbghelp.xsl b/doc/xsldbg/xsldbghelp.xsl
new file mode 100644
index 00000000..50e45ebd
--- /dev/null
+++ b/doc/xsldbg/xsldbghelp.xsl
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ File : xsldoc.xsl
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: Stylesheet to process xsldoc.xml and generate help text
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+ <xsl:output method="text"/>
+ <xsl:strip-space elements="text"/>
+ <!-- The selected nodes to be printed for overview -->
+ <xsl:variable name="overview_node" select="//chapter[@id='introduction']"/>
+ <!-- The selected nodes to be printed for usage overview -->
+ <xsl:variable name="usage_node" select="//chapter[@id='using-xsldbg']"/>
+ <!-- The list of valid xsldbg commands -->
+ <xsl:variable name="command_nodes" select="//chapter[@id='commands']"/>
+ <!-- The list of i18n paras -->
+ <xsl:variable name="i18n_para" select="//i18n"/>
+ <!-- What version is this document-->
+ <xsl:variable name="doc_version" select="'3.3.0-1'"/>
+ <!-- The default version of xsldbg -->
+ <xsl:param name="xsldbg_version" select="'3.3.0'"/>
+ <!-- We want 'help' to point to a invalid command if stylesheet
+ user has not provided a value for 'help' param-->
+ <xsl:param name="help" select="'_#_'"/>
+ <xsl:variable name="help_id" select="concat($help,'_cmd')"/>
+ <!-- Do we printout all documentation '1' if so '0' otherwise -->
+ <xsl:param name="alldocs" select="0"/>
+ <!-- The documentation we can find for 'help' user requires -->
+ <xsl:variable name="help_cmd" select="$command_nodes/sect1[@id=$help_id or @shortcut=$help_id]"/>
+
+ <!-- Our translatables -->
+ <xsl:param name="xsldbgVerTxt" select="'xsldbg version'"/>
+ <xsl:param name="helpDocVerTxt" select="'Help document version'"/>
+ <xsl:param name="helpErrorTxt" select="'Help not found for command'"/>
+
+
+
+ <!-- Main template-->
+ <xsl:template match="/">
+<xsl:text> </xsl:text><xsl:value-of select="$xsldbgVerTxt"/><xsl:text> </xsl:text><xsl:value-of select="$xsldbg_version"/>
+<xsl:text>
+</xsl:text>
+<xsl:text> ====================</xsl:text><xsl:text>
+</xsl:text>
+ <xsl:choose>
+ <xsl:when test="count($help_cmd) > 0" >
+ <xsl:apply-templates select="$help_cmd" />
+ <xsl:value-of select="$helpDocVerTxt"/><xsl:text> </xsl:text><xsl:value-of select="$doc_version"/><xsl:text>
+</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$help !='_#_'">
+ <xsl:value-of select="$helpErrorTxt"/><xsl:text> </xsl:text>
+ <xsl:value-of select="$help"/>
+ </xsl:if>
+ <xsl:if test="$help ='_#_'">
+ <xsl:apply-templates select="$overview_node"/>
+ <xsl:text>
+</xsl:text>
+ <xsl:apply-templates select="$usage_node"/>
+ <xsl:value-of select="$helpDocVerTxt"/><xsl:text> </xsl:text><xsl:value-of select="$doc_version"/><xsl:text>
+</xsl:text>
+ </xsl:if>
+<xsl:text>
+</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+<xsl:text>
+</xsl:text>
+ </xsl:template>
+
+
+ <!-- Convert title into something useful -->
+ <xsl:template match="title">
+<xsl:for-each select="ancestor::node()"><xsl:text> </xsl:text></xsl:for-each><xsl:value-of select="."/>
+<xsl:text>
+</xsl:text><xsl:for-each select="ancestor::node()"><xsl:text> </xsl:text></xsl:for-each>
+<xsl:value-of
+ select="substring('____________________________________________________________',
+ 1, string-length())" />
+<xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="text()">
+ <xsl:value-of select="normalize-space()"/>
+ </xsl:template>
+
+ <xsl:template match="row">
+ <xsl:value-of select="$indentgroup/indent[@level=$indentcount]" />
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="para">
+ <xsl:text>
+</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="informaltable|table">
+ <xsl:text>
+</xsl:text>
+ <xsl:apply-templates select="title"/>
+ <xsl:for-each select="tgroup/tbody/row/entry|tbody/row/entry">
+ <xsl:for-each select="ancestor::node()"><xsl:text> </xsl:text></xsl:for-each><xsl:apply-templates/>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+
+<!-- initialization code for xemacs -->
+<!--
+Local Variables:
+mode: xsl
+sgml-minimize-attributes:nil
+sgml-general-insert-case:lower
+sgml-indent-step:2
+sgml-indent-data:nil
+End:
+-->
diff --git a/kdewebdev.lsm b/kdewebdev.lsm
new file mode 100644
index 00000000..b8ceb975
--- /dev/null
+++ b/kdewebdev.lsm
@@ -0,0 +1,11 @@
+Begin4
+Title: kdewebdev
+Version: 3.5.10
+Entered-date: 2008-08-26
+Description: Web Development Applications for the K Desktop Environment (KDE)
+Keywords: KDE X11 desktop Qt
+Author: http://bugs.kde.org/ (KDE Bugtracking System)
+Primary-site: http://www.kde.org/download/
+Platforms: Unix, Qt
+Copying-policy: GPL, Artistic
+End
diff --git a/kfilereplace/ChangeLog b/kfilereplace/ChangeLog
new file mode 100644
index 00000000..9a9c507e
--- /dev/null
+++ b/kfilereplace/ChangeLog
@@ -0,0 +1,211 @@
+2005-02-20: Andras Mantia <amantia@kde.org>
+ * Added the possibility to select the encoding of the files and a warning about
+ the possible damaged result if the wrong encoding is chosen
+
+2005-02-16: Andras Mantia <amantia@kde.org>
+ * Accept paths as command line arguments
+
+2005-01-29 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Cleaning up.
+
+2005-01-23 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Some clean up.
+ * Now the text 'captured text "blabla" at line...' etc. is substituted with
+ 'Line:xyz, Col:abc "blabla"'
+ * Fixed a bug in the string view, that cause KFR to crash if the string list is empty
+ and the user click on it with the mouse.
+
+2005-01-17 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Now it should be possible to handle other characters encoding, like japanese.
+ * Added, but still buggy, a "replace confirmation" option.
+ * Now when open KFilereplace as standalone application it uses
+ this "*.c*;*.h*;*.sh;*.txt*;*.p*;*.java;*.log" string as default filter.
+
+2005-01-14 Andras Mantia <amantia@kde.org>
+ * Don't show the cannot open file dialogs for directories
+ * Don't create a backup for every scanned file, only for those that were modified
+ * Don't update the timestap for every scanned file
+ * Fix installation of the icons (they go to the part's data dir now)
+
+2005-01-13 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I added some other infos to the docbook manual, I hope to complete it as soon as possible.
+ * I added a new command: [$mathexp:some_expression$]. It uses the bc calculator to
+ compute the result of an expression.
+
+2005-01-11 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Fixed a bug in KAddStringDlg: now when we want edit a string the search-only mode and search-replace mode
+ don't merge.
+ * Modified KFR file format: I added the tag '<mode search=""/>' just after the root <kfr> to allows
+ kfilereplace to recognize if the list to load is a list of only search strings. I added some lines of code
+ to permit users to load files that don't have this new tag.
+ * I'm writing docbook manual.
+
+2005-01-10 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * The KFilereplaceView widget has been modified. Now it change the layout of kfilereplace depending of the
+ value of m_option->m_searchOnlyMode.
+ * I fixed a bug in the backup file option.
+
+2004-12-13 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I modified the way we can open files in quanta. Now we can select one or more entries
+ in the QListView that store the results, and open several files, at the same time.
+ For selecting more than one file, we must press CTRL button while clicking with mouse
+ on the entry we want open.
+
+2004-11-10 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I added a graphical file counter.
+ * I added a semaphore to notify user about the state of the search.
+ * I improved a little the speed.
+ * I made some cleanup.
+
+2004-09-27 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I fixed a bug that affect some strings in case of translation.
+ * I fixed a bug that affect "Create backup" option, I think that now this feature should work
+ properly.
+
+2004-09-26 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I did some cleanup.
+
+2004-09-11 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I added the class ResultViewEntry in configurationclasses.(h,cpp) to make the replace algorithm more clean.
+ * I make multiline text searching more useable.
+ * Now the file entries in the result view are shown with descriptive icons.
+ * I'm trying to write some documentation, in the meanwhile a tutorial is present.
+
+2004-08-13 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I added CommandEngine class and Report class.
+ In fact I moved the code that do the report document and the
+ code that do commands feature from KFileREplaceLib to these two classes.
+
+2004-08-09 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I fixed a bug that affected the method "void KFileReplaceView::slotStringsClear()" in kfilereplaceview.cpp file.
+ This bug caused the list of strings not to be correctly erased.
+
+2004-08-07 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I modified the save-results system(thanks Luciano for the idea of using xml/css tecnology).
+ Now KFR creates a directory with name "NAME" that contains a xml file "NAME.xml"
+ and a css file "NAME.css". These two files are the new "report document"
+ that substitutes the xhtml file. To try it choose "Search/Replace|Results|Create Report File" menu option.
+ * I fixed a bug that causes Quanta to crash when we push Cancel button in new project
+ dialog.
+ * I finished the tutorial.
+
+2004-08-01 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * The line "if(::access(directory.local8Bit(), R_OK | X_OK) == -1)" has been removed,
+ and subtitued with "QFileInfo dirInfo(directory); "
+ "if(not(dirInfo.isReadable() and dirInfo.isExecutable())"
+ " or "
+ " not(dirInfo.isWritable())) "
+ in kfilereplacepart.cpp
+
+2004-07-30 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * The icons have been fixed!!! What a miracle!!!
+
+2004-07-24 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I added a little feature. When KFR matches a string, it shows the row and the column
+ where that match is, by using a message like this:
+ /my/path/file
+ |
+ |__ string "xyz" found at line:40, column:2
+ |__ string "xyz" found at line:18, column:57
+ |__.............
+ Now if you use "Edit with Quanta" popup menu option, say, on the line:
+ "string "xyz" found at line:40, column:2"
+ of the result view, Quanta will open the file /my/path/file at row 40, column 2.
+
+2004-07-20 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I fixed a bug that affects the generation of extension of
+ the backup files.
+
+2004-07-17 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I fixed the bug that causes quanta to crash when KFR is active.
+ * I fixed (I hope!) the simulation feature.
+ * I reorganize the KOptionsDlg UI.
+ * I Added some tool tips.
+ * I' m tired and I go on bed ;-)
+
+2004-07-16 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * The KNewProjectDlg was modified, adding quick search/replace line edit objects
+ * A option in KOptionDlg was added, so that the files that don't
+ contain the strings we are searching for, will not be shown.
+ * Some code clean-up
+ * A bug with KAddStringDlg was fixed.
+ * I found a bug that makes quanta to crash when we close quanta with the x button...
+ I'm trying to fix it.
+
+2004-05-30 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Well, KFR has been entirely (more or less :-)) rewrote.
+ the files:
+ apistruct.h
+ kernel.(cpp,h)
+ kexpression.(cpp,h)
+ kfilereplacedoc.(cpp,h)
+ kfilereplacepref.(cpp,h)
+
+ were removed and these files are added:
+
+ configurationclasses.h
+
+ . the internal architecture was redesigned, to use QT/KDE tecnologies in particular:
+ . C-like code were removed (where possible).
+ . some system dependent functions were substituted with more portable code.
+ . the apistructs.h file were substituted with one class in configurationclasses.h.
+ . the UIs were modified in particular:
+ . new "add string" dialog were added.
+ . project dialog were modified.
+ . some new features were added in particular:
+ . the variable replace mechanism were modified.
+ . the result view shows the line and column where the string has been found.
+ . now the mechanism of search/replace with wildcards inherits from QT regular expression engine.
+
+ * I wrote a little tutorial(TUTOR.txt), but a more exhaustive tutorial will be released soon.
+ Note: there some bugs to fix and some feature to implement, in particular:
+ . Simulation is not yet implemented.
+ . Some options are presents but disabled.
+ . I want to add more KFR variable commands.
+
+
+2004-03-26 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Added a feature. Now we can open a file from the result view of KFR in Quanta(thanks Andras).
+
+2004-03-14 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Replaced two QLineEdit with two QSpinbox in knewprojectdlg.ui
+ * Fixed a bug in the new kfr (XML-based) file format.
+
+2004-03-12 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Removed KresultView(.h,.cpp). Now KFileReplaceView is a QWidget that contains results and
+ strings view.
+ * Added whatthis.h that contains the "what's this" strings.
+ * Fixed a bug that generate a wrong XHTML result file.
+
+2004-03-06 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * Added kconfirmdlgs.ui.
+ * Fixed a bug in KOptionDlg, now when we select a option, the selection is shown correctly.
+ * Fixed a bug KNewProjectDlg.
+
+2004-02-26 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * I added a method 'editStrings' that fixes tha behaviour when a user
+ chooses edit string option instead of add string option.
+ * I modified the property textFormat of the QTextEdit widgets of
+ KAddstringDlg, from the value 'AutoText' to the value 'PlainText',
+ so the QTextEdit widgets will not try to render a string containing
+ html code.
+
+2004-02-24 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * kfilereplacepref.(h,cpp) were removed.
+ * kernel.(h,cpp) now are a singleton class.
+ * Some macros in kernel.h were replaced with integer constants.
+ * Methods in kernel.h file were renamed.
+ * Some superflous #include lines were removed.
+ * The filelib.(h,cpp) were subtituted with KFilereplaceLib singleton class.
+ * Now kfilereplace logo and icons in the result view appear.
+
+2004-02-18 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ * The icons in toolbar directory were redrawn.
+ * Deleted the KFRHeader struct from apistruct.h.
+ * The mechanism of saving the string rules has been modified: now we can save the rules in a
+ file like this "a_file_name.kfr" that is an XML file.
+ * The file containing the results of the operations is now a XHTML file.
+ * Two new files UI added: now KOptionDlg inherits from KOptionDlgS and KAddstringDlg inherits
+ from KAddstringDlgS.
+ * The klistviewstring.(h,cpp) were removed.
+ * A lot of clean up has been made in all files.
diff --git a/kfilereplace/Makefile.am b/kfilereplace/Makefile.am
new file mode 100644
index 00000000..528a791e
--- /dev/null
+++ b/kfilereplace/Makefile.am
@@ -0,0 +1,43 @@
+## Makefile.am for kfilereplace
+
+# set the include path for X, qt and KDE
+INCLUDES = $(all_includes)
+
+# this has all of the subdirectories that make will recurse into. if
+# there are none, comment this out
+SUBDIRS = toolbar
+
+# these are the headers for your project
+noinst_HEADERS = kaddstringdlg.h kfilereplaceiface.h kfilereplacelib.h \
+ knewprojectdlg.h kfilereplaceview.h koptionsdlg.h report.h commandengine.h \
+ configurationclasses.h kfilereplace.h
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+
+kde_module_LTLIBRARIES = libkfilereplacepart.la
+libkfilereplacepart_la_SOURCES = kfilereplacepart.cpp kfilereplaceview.cpp \
+ kfilereplaceviewwdg.ui kaddstringdlg.cpp kaddstringdlgs.ui knewprojectdlg.cpp \
+ knewprojectdlgs.ui koptionsdlg.cpp koptionsdlgs.ui kfilereplacelib.cpp report.cpp \
+ commandengine.cpp configurationclasses.cpp
+
+libkfilereplacepart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+libkfilereplacepart_la_LIBADD = $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML)
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp *.h -o $(podir)/kfilereplace.pot
+
+KDE_ICON = AUTO
+kde_services_DATA = kfilereplacepart.desktop
+xdg_apps_DATA = kfilereplace.desktop
+
+# this is where the XML-GUI resource file goes
+partrcdir = $(kde_datadir)/kfilereplacepart
+partrc_DATA = kfilereplacepartui.rc
+
+shellrcdir = $(kde_datadir)/kfilereplace
+shellrc_DATA = kfilereplaceui.rc
+bin_PROGRAMS = kfilereplace
+kfilereplace_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+kfilereplace_LDADD = $(LIB_KPARTS)
+kfilereplace_SOURCES = kfilereplace.cpp main.cpp
diff --git a/kfilereplace/commandengine.cpp b/kfilereplace/commandengine.cpp
new file mode 100644
index 00000000..56cc50b1
--- /dev/null
+++ b/kfilereplace/commandengine.cpp
@@ -0,0 +1,213 @@
+/***************************************************************************
+ commandengine.cpp - kfr commands feature class
+ -------------------
+ begin : fri aug 13 15:29:46 CEST 2004
+
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+// QT
+#include <qdatetime.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qdom.h>
+
+// KDE
+#include <kuser.h>
+#include <krandomsequence.h>
+#include <kprocess.h>
+
+// local
+#include "commandengine.h"
+
+QString CommandEngine::datetime(const QString& opt, const QString& arg)
+{
+ Q_UNUSED(arg);
+ if(opt == "iso")
+ return QDateTime::currentDateTime(Qt::LocalTime).toString(Qt::ISODate);
+ if(opt == "local")
+ return QDateTime::currentDateTime(Qt::LocalTime).toString(Qt::LocalDate);
+ return QString::null;
+}
+
+QString CommandEngine::user(const QString& opt, const QString& arg)
+{
+ Q_UNUSED(arg);
+ KUser u;
+ if(opt == "uid")
+ return QString::number(u.uid(),10);
+ if(opt == "gid")
+ return QString::number(u.gid(),10);
+ if(opt == "loginname")
+ return u.loginName();
+ if(opt == "fullname")
+ return u.fullName();
+ if(opt == "homedir")
+ return u.homeDir();
+ if(opt == "shell")
+ return u.shell();
+ return QString::null;
+}
+
+QString CommandEngine::loadfile(const QString& opt, const QString& arg)
+{
+ Q_UNUSED(arg);
+
+ QFile f(opt);
+ if(!f.open(IO_ReadOnly)) return QString::null;
+
+ QTextStream t(&f);
+
+ QString s = t.read();
+
+ f.close();
+
+ return s;
+}
+
+QString CommandEngine::empty(const QString& opt, const QString& arg)
+{
+ Q_UNUSED(opt);
+ Q_UNUSED(arg);
+ return "";
+}
+
+QString CommandEngine::mathexp(const QString& opt, const QString& arg)
+{
+ /* We will use bc 1.06 by Philip A. Nelson <philnelson@acm.org> */
+ //Q_UNUSED(opt);
+ Q_UNUSED(arg);
+
+ QString tempOpt = opt;
+ tempOpt.replace("ln","l");
+ tempOpt.replace("sin","s");
+ tempOpt.replace("cos","c");
+ tempOpt.replace("arctan","a");
+ tempOpt.replace("exp","e");
+
+ QString program = "var=("+tempOpt+");print var";
+ QString script = "echo '"+program+"' | bc -l;";
+
+ KProcess* proc = new KProcess();
+
+ proc->setUseShell(true);
+
+ *(proc) << script;
+
+ 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*)));
+
+ //Through slotGetScriptOutput, m_processOutput contains the result of the KProcess call
+ if(!proc->start(KProcess::Block, KProcess::All))
+ {
+ return QString::null;
+ }
+ else
+ {
+ proc->wait();
+ }
+ if(proc)
+ delete proc;
+
+ QString tempbuf = m_processOutput;
+ m_processOutput = QString::null;
+
+ return tempbuf;
+
+}
+
+QString CommandEngine::random(const QString& opt, const QString& arg)
+{
+ Q_UNUSED(arg);
+ long seed;
+ if(opt.isEmpty())
+ {
+ QDateTime dt;
+ seed = dt.toTime_t();
+ }
+ else
+ seed = opt.toLong();
+
+ KRandomSequence seq(seed);
+ return QString::number(seq.getLong(1000000),10);
+}
+
+QString CommandEngine::stringmanip(const QString& opt, const QString& arg)
+{
+ Q_UNUSED(opt);
+ Q_UNUSED(arg);
+ return "";
+}
+
+QString CommandEngine::variableValue(const QString &variable)
+{
+ QString s = variable;
+
+ s.remove("[$").remove("$]").remove(" ");
+
+ if(s.contains(":") == 0)
+ return variable;
+ else
+ {
+ QString leftValue = s.section(":",0,0),
+ midValue = s.section(":",1,1),
+ rightValue = s.section(":",2,2);
+
+ QString opt = midValue;
+ QString arg = rightValue;
+
+ if(leftValue == "stringmanip")
+ return stringmanip(opt, arg);
+ if(leftValue == "datetime")
+ return datetime(opt, arg);
+ if(leftValue == "user")
+ return user(opt, arg);
+ if(leftValue == "loadfile")
+ return loadfile(opt, arg);
+ if(leftValue == "empty")
+ return empty(opt, arg);
+ if(leftValue == "mathexp")
+ return mathexp(opt, arg);
+ if(leftValue == "random")
+ return random(opt, arg);
+
+ return variable;
+ }
+}
+
+//SLOTS
+void CommandEngine::slotGetScriptError(KProcess* proc, char* s, int i)
+{
+ Q_UNUSED(proc);
+ Q_UNUSED(proc);
+ QCString temp(s,i+1);
+ if(temp.isEmpty() || temp == "\n") return;
+}
+
+void CommandEngine::slotGetScriptOutput(KProcess* proc, char* s, int i)
+{
+ Q_UNUSED(proc);
+ QCString temp(s,i+1);
+
+ if(temp.isEmpty() || temp == "\n") return;
+
+ m_processOutput += QString::fromLocal8Bit(temp);
+}
+
+void CommandEngine::slotProcessExited(KProcess* proc)
+{
+ Q_UNUSED(proc);
+}
+
+#include "commandengine.moc"
diff --git a/kfilereplace/commandengine.h b/kfilereplace/commandengine.h
new file mode 100644
index 00000000..cff15b29
--- /dev/null
+++ b/kfilereplace/commandengine.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+ commandengine.h - kfr commands feature class
+ -------------------
+ begin : fri aug 13 15:29:46 CEST 2004
+
+ copyright : (C) 2004 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 COMMANDENGINE_H
+#define COMMANDENGINE_H
+
+// QT
+class QString;
+#include <qobject.h>
+
+//KDE
+class KProcess;
+
+class CommandEngine : public QObject
+{
+ Q_OBJECT
+ private:
+ QString m_processOutput;
+ public:
+ CommandEngine() {}
+
+ public:
+
+ /**
+ These functions implement the KFR commands
+ */
+ QString datetime(const QString& opt, const QString& arg);
+ QString user(const QString& opt, const QString& arg);
+ QString loadfile(const QString& opt, const QString& arg);
+ QString empty(const QString& opt, const QString& arg);
+ QString mathexp(const QString& opt, const QString& arg);
+ QString random(const QString& opt, const QString& arg);
+ QString stringmanip(const QString& opt, const QString& arg);
+ QString variableValue(const QString &variable);
+
+ private slots:
+ void slotGetScriptOutput(KProcess*,char*,int);
+ void slotGetScriptError(KProcess*,char*,int);
+ void slotProcessExited(KProcess*);
+};
+
+#endif // COMMANDENGINE_H
diff --git a/kfilereplace/configurationclasses.cpp b/kfilereplace/configurationclasses.cpp
new file mode 100644
index 00000000..848eafdc
--- /dev/null
+++ b/kfilereplace/configurationclasses.cpp
@@ -0,0 +1,188 @@
+/***************************************************************************
+ configurationclasses.cpp - description
+ -------------------
+ begin : Sat Sep 11 2004
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+// QT
+
+// KDE
+
+// local
+#include "configurationclasses.h"
+#include "whatthis.h"
+
+using namespace whatthisNameSpace;
+
+//RCOptions Class
+RCOptions::RCOptions()
+{
+ m_searchingOnlyMode = false;
+}
+
+RCOptions& RCOptions::operator=(const RCOptions& ci)
+{
+ //m_callResetActions = ci.m_callResetActions;
+
+ m_directories = ci.m_directories;
+ m_filters = ci.m_filters;
+ m_currentDirectory = ci.m_currentDirectory;
+ m_minSize = ci.m_minSize;
+ m_maxSize = ci.m_maxSize;
+
+ m_dateAccess = ci.m_dateAccess;
+ m_minDate = ci.m_minDate;
+ m_maxDate = ci.m_maxDate;
+
+ m_caseSensitive = ci.m_caseSensitive;
+ m_recursive = ci.m_recursive;
+ m_followSymLinks = ci.m_followSymLinks;
+ m_allStringsMustBeFound = ci.m_allStringsMustBeFound;
+ m_backup = ci.m_backup;
+ m_backupExtension = ci.m_backupExtension;
+ m_ignoreFiles = ci.m_ignoreFiles;
+ m_regularExpressions = ci.m_regularExpressions;
+
+ m_variables = ci.m_variables;
+ m_haltOnFirstOccur = ci.m_haltOnFirstOccur;
+ m_ignoreHidden = ci.m_ignoreHidden;
+ m_simulation = ci.m_simulation;
+ m_searchingOnlyMode = ci.m_searchingOnlyMode;
+
+ m_ownerUserIsChecked = ci.m_ownerUserIsChecked;
+ m_ownerGroupIsChecked = ci.m_ownerGroupIsChecked;
+
+ m_ownerUserBool = ci.m_ownerUserBool;
+ m_ownerGroupBool = ci.m_ownerGroupBool;
+
+ m_ownerUserType = ci.m_ownerUserType;
+ m_ownerGroupType = ci.m_ownerGroupType;
+
+ m_ownerUserValue = ci.m_ownerUserValue;
+ m_ownerGroupValue = ci.m_ownerGroupValue;
+
+ m_mapStringsView = ci.m_mapStringsView;
+
+ m_quickSearchString = ci.m_quickSearchString;
+ m_quickReplaceString = ci.m_quickReplaceString;
+
+ m_recentStringFileList = ci.m_recentStringFileList;
+
+ m_notifyOnErrors = ci.m_notifyOnErrors;
+
+ return (*this);
+}
+
+//ResultViewEntry Class
+ResultViewEntry::ResultViewEntry(QString nkey, QString ndata, bool regexp, bool caseSensitive)
+{
+ m_caseSensitive = caseSensitive;
+ m_regexp = regexp;
+
+ if(regexp)
+ {
+ m_rxKey = QRegExp("("+nkey+")", caseSensitive, false);
+ }
+ else
+ {
+ m_key = nkey;
+ }
+ m_data = ndata;
+ m_matchedStringsOccurrence = 0;
+ m_pos = 0;
+}
+
+int ResultViewEntry::lineNumber(const QString& line) const
+{
+ return line.mid(0,m_pos).contains('\n')+1;
+}
+
+int ResultViewEntry::columnNumber(const QString& line) const
+{
+ return(m_pos - line.findRev('\n',m_pos));
+}
+
+void ResultViewEntry::incOccurrences()
+{
+ m_matchedStringsOccurrence++;
+}
+
+int ResultViewEntry::occurrences() const
+{
+ return m_matchedStringsOccurrence;
+}
+
+bool ResultViewEntry::regexp()const
+{
+ return m_regexp;
+}
+
+int ResultViewEntry::pos(const QString& line)
+{
+ if(m_regexp)
+ m_pos = m_rxKey.search(line,m_pos);
+ else
+ m_pos = line.find(m_key, m_pos, m_caseSensitive);
+
+ return m_pos;
+}
+
+void ResultViewEntry::incPos()
+{
+ int kl = keyLength(),
+ dl = dataLength();
+
+ if(kl < dl)
+ m_pos += kl;
+ else
+ m_pos += dl;
+
+}
+
+QString ResultViewEntry::capturedText(const QString& line)
+{
+ QString cap;
+
+ if(m_regexp)
+ cap = m_rxKey.cap(1);
+ else
+ cap =line.mid(m_pos,m_key.length());
+
+ return cap;
+}
+
+QString ResultViewEntry::message(const QString& capturedText, int x, int y) const
+{
+ QString data = m_data;
+ //return i18n(" captured text \"%1\" replaced with \"%2\" at line: %3, column: %4 ").arg(capturedText).arg(data).arg(QString::number(x,10)).arg(QString::number(y,10));
+ return i18n(" Line:%3,Col:%4 - \"%1\" -> \"%2\"").arg(capturedText).arg(data).arg(QString::number(x,10)).arg(QString::number(y,10));
+}
+
+int ResultViewEntry::keyLength() const
+{
+ if(m_regexp)
+ return m_rxKey.matchedLength();
+ else
+ return m_key.length();
+}
+
+int ResultViewEntry::dataLength() const
+{
+ return m_data.length();
+}
+
+void ResultViewEntry::updateLine(QString& line)
+{
+ line.insert(m_pos, m_data);
+ line.remove(m_pos + dataLength(), keyLength());
+}
diff --git a/kfilereplace/configurationclasses.h b/kfilereplace/configurationclasses.h
new file mode 100644
index 00000000..82bff991
--- /dev/null
+++ b/kfilereplace/configurationclasses.h
@@ -0,0 +1,165 @@
+/***************************************************************************
+ configurationclasses.h - description
+ -------------------
+ begin : Sat Apr 17 2004
+ copyright : (C) 2004 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 CONFIGURATIONCLASSES_H
+#define CONFIGURATIONCLASSES_H
+
+// QT
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qdatetime.h>
+#include <qmap.h>
+#include <qregexp.h>
+
+typedef QMap<QString,QString> KeyValueMap;
+// entry strings in the kfilereplacerc file
+const QString rcDirectoriesList = "Directories list";
+const QString rcFiltersList = "Filters list";
+const QString rcRecentFiles = "Recent files";
+const QString rcAllStringsMustBeFound = "All strings must be found";
+const QString rcEncoding = "Encoding";
+const QString rcCaseSensitive = "Case sensitive";
+const QString rcConfirmStrings = "Confirm strings";
+const QString rcConfirmFiles = "Confirm files";
+const QString rcConfirmDirs = "Confirm directories";
+const QString rcFollowSymLinks = "Follow symbolic links";
+const QString rcHaltOnFirstOccur = "Halt on first occurrence";
+const QString rcIgnoreHidden = "Ignore hidden files";
+const QString rcRecursive = "Search/replace in sub folders";
+const QString rcVariables = "Enable variables";
+const QString rcRegularExpressions = "Enable regular expressions";
+const QString rcMinFileSize = "Minimum file size";
+const QString rcMaxFileSize = "Maximum file size";
+const QString rcValidAccessDate = "Access mode";
+const QString rcMinDate = "Minimum access date";
+const QString rcMaxDate = "Maximum access date";
+const QString rcOwnerUser = "Owner user filters";
+const QString rcOwnerGroup = "Owner group filters";
+const QString rcSearchMode = "Search only mode";
+const QString rcBackupExtension = "Backup file extension";
+const QString rcIgnoreFiles = "Ignore files if there is no match";
+const QString rcNotifyOnErrors = "NotifyOnErrors";
+const QString rcAskConfirmReplace = "Ask confirmation on replace";
+const QString rcDontAskAgain = "Dont ask again";
+// Default configuration options
+const QString EncodingOption = "utf8";
+const bool RecursiveOption = true;
+const bool CaseSensitiveOption = false;
+const bool FollowSymbolicLinksOption = false;
+const bool RegularExpressionsOption = false;
+const bool VariablesOption = false;
+const bool StopWhenFirstOccurenceOption = false;
+const bool IgnoreHiddenOption = false;
+const int FileSizeOption = -1;
+const QString AccessDateOption="unknown";
+const QString ValidAccessDateOption="unknown";
+const QString OwnerOption="false,Name,Equals To";
+const bool SearchModeOption=true;
+const QString BackupExtensionOption="false,~";
+const bool IgnoreFilesOption = true;
+const bool NotifyOnErrorsOption = false;
+const bool AskConfirmReplaceOption = false;
+
+// This class store configuration informations
+class RCOptions
+{
+ public:
+ bool m_callResetActions;
+
+ bool m_askConfirmReplace,
+ m_dontAskAgain;
+
+ QStringList m_directories;
+ QStringList m_filters;
+ QString m_currentDirectory;
+
+ int m_minSize,
+ m_maxSize;
+
+ QString m_dateAccess,
+ m_minDate,
+ m_maxDate;
+
+ QString m_encoding;
+
+ bool m_caseSensitive,
+ m_recursive,
+ m_followSymLinks,
+ m_allStringsMustBeFound,
+ m_backup,
+ m_regularExpressions;
+
+ bool m_variables,
+ m_haltOnFirstOccur,
+ m_ignoreHidden,
+ m_simulation,
+ m_searchingOnlyMode;
+
+ bool m_ownerUserIsChecked,
+ m_ownerGroupIsChecked;
+
+ QString m_ownerUserType,
+ m_ownerGroupType,
+ m_ownerUserValue,
+ m_ownerGroupValue,
+ m_ownerUserBool,
+ m_ownerGroupBool;
+
+ QString m_backupExtension;
+
+ bool m_ignoreFiles;
+
+ KeyValueMap m_mapStringsView;
+
+ QString m_quickSearchString,
+ m_quickReplaceString;
+
+ QStringList m_recentStringFileList;
+
+ bool m_notifyOnErrors;
+
+ public:
+ RCOptions();
+ RCOptions& operator=(const RCOptions& ci);
+};
+
+class ResultViewEntry
+{
+ private:
+ QString m_key;
+ QString m_data;
+ QRegExp m_rxKey;
+ bool m_regexp;
+ bool m_caseSensitive;
+ int m_pos;
+ int m_matchedStringsOccurrence;
+
+ public:
+ ResultViewEntry(QString nkey, QString ndata, bool regexp, bool caseSensitive);
+ int lineNumber(const QString& line) const ;
+ int columnNumber(const QString& line) const ;
+ void incOccurrences();
+ int occurrences() const ;
+ bool regexp()const ;
+ int pos(const QString& line) ;
+ void incPos();
+ QString capturedText(const QString& line) ;
+ QString message(const QString& capturedText, int x, int y) const;
+ int keyLength() const;
+ int dataLength() const;
+ void updateLine(QString& line);
+};
+#endif
diff --git a/kfilereplace/configure.in.in b/kfilereplace/configure.in.in
new file mode 100644
index 00000000..a7f9ec22
--- /dev/null
+++ b/kfilereplace/configure.in.in
@@ -0,0 +1,12 @@
+#MIN_CONFIG
+
+AM_INIT_AUTOMAKE(kfilereplace, 0.8.0)
+
+dnl These are common macros that you might or might not want to use
+
+dnl Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_TIME
+AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdlib.h paths.h)
+AC_CHECK_FUNCS(usleep)
diff --git a/kfilereplace/hi22-app-kfilereplace.png b/kfilereplace/hi22-app-kfilereplace.png
new file mode 100644
index 00000000..429a3984
--- /dev/null
+++ b/kfilereplace/hi22-app-kfilereplace.png
Binary files differ
diff --git a/kfilereplace/hi32-app-kfilereplace.png b/kfilereplace/hi32-app-kfilereplace.png
new file mode 100644
index 00000000..8dff2abb
--- /dev/null
+++ b/kfilereplace/hi32-app-kfilereplace.png
Binary files differ
diff --git a/kfilereplace/hi48-app-kfilereplace.png b/kfilereplace/hi48-app-kfilereplace.png
new file mode 100644
index 00000000..c11f34ba
--- /dev/null
+++ b/kfilereplace/hi48-app-kfilereplace.png
Binary files differ
diff --git a/kfilereplace/kaddstringdlg.cpp b/kfilereplace/kaddstringdlg.cpp
new file mode 100644
index 00000000..44b51f30
--- /dev/null
+++ b/kfilereplace/kaddstringdlg.cpp
@@ -0,0 +1,273 @@
+/***************************************************************************
+ KAddStringDlg.cpp - description
+ -------------------
+ begin : Sat Oct 16 1999
+ copyright : (C) 1999 by François Dupoux
+ (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ email : dupoux@dupoux.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. *
+ * *
+ ***************************************************************************/
+// QT
+#include <qtextedit.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qlistview.h>
+#include <qwhatsthis.h>
+#include <qwidgetstack.h>
+
+// KDE
+#include <kmessagebox.h>
+#include <kiconloader.h>
+#include <kdebug.h>
+#include <kconfig.h>
+#include <kapplication.h>
+
+// local
+#include "kaddstringdlg.h"
+#include "whatthis.h"
+
+using namespace whatthisNameSpace;
+
+KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent, const char *name) : KAddStringDlgS(parent,name,true)
+{
+ m_option = info;
+ m_wantEdit = wantEdit;
+ m_currentMap = m_option->m_mapStringsView;
+
+ initGUI();
+
+ connect(m_pbOK, SIGNAL(clicked()), this, SLOT(slotOK()));
+ connect(m_rbSearchOnly, SIGNAL(pressed()), this, SLOT(slotSearchOnly()));
+ connect(m_rbSearchReplace, SIGNAL(pressed()), this, SLOT(slotSearchReplace()));
+ connect(m_pbAdd, SIGNAL(clicked()), this, SLOT(slotAddStringToView()));
+ connect(m_pbDel, SIGNAL(clicked()), this, SLOT(slotDeleteStringFromView()));
+ connect(m_pbHelp, SIGNAL(clicked()), this ,SLOT(slotHelp()));
+
+ whatsThis();
+}
+
+//PRIVATE
+void KAddStringDlg::initGUI()
+{
+ m_pbAdd->setIconSet(SmallIconSet(QString::fromLatin1("forward")));
+ m_pbDel->setIconSet(SmallIconSet(QString::fromLatin1("back")));
+
+ m_stack->addWidget(m_stringView);
+ m_stack->addWidget(m_stringView_2);
+
+
+ if(m_option->m_searchingOnlyMode)
+ {
+ if(m_wantEdit)
+ m_rbSearchReplace->setEnabled(false);
+ m_rbSearchOnly->setChecked(true);
+ m_edSearch->setEnabled(true);
+ m_edReplace->setEnabled(false);
+ m_tlSearch->setEnabled(true);
+ m_tlReplace->setEnabled(false);
+ }
+ else
+ {
+ if(m_wantEdit)
+ m_rbSearchOnly->setEnabled(false);
+ m_rbSearchReplace->setChecked(true);
+ m_edSearch->setEnabled(true);
+ m_edReplace->setEnabled(true);
+ m_tlSearch->setEnabled(true);
+ m_tlReplace->setEnabled(true);
+ }
+
+ raiseView();
+
+ if(m_wantEdit)
+ loadMapIntoView();
+}
+
+void KAddStringDlg::eraseViewItems()
+{
+ QListViewItem* item = m_sv->firstChild();
+ if(item == 0)
+ return;
+ else
+ {
+ while(item)
+ {
+ QListViewItem* tempItem = item;
+ item = item->nextSibling();
+ delete tempItem;
+ }
+ }
+}
+
+void KAddStringDlg::raiseView()
+{
+ if(m_option->m_searchingOnlyMode)
+ m_sv = m_stringView_2;
+ else
+ m_sv = m_stringView;
+
+ m_stack->raiseWidget(m_sv);
+}
+
+bool KAddStringDlg::columnContains(QListView* lv,const QString& s, int column)
+{
+ QListViewItem* i = lv->firstChild();
+ while (i != 0)
+ {
+ if(i->text(column) == s)
+ return true;
+ i = i->nextSibling();
+ }
+ return false;
+}
+
+void KAddStringDlg::saveViewContentIntoMap()
+{
+ QListViewItem* i = m_sv->firstChild();
+ while(i != 0)
+ {
+ if(m_option->m_searchingOnlyMode)
+ m_currentMap[i->text(0)] = QString::null;
+ else
+ m_currentMap[i->text(0)] = i->text(1);
+ i = i->nextSibling();
+ }
+}
+
+void KAddStringDlg::loadMapIntoView()
+{
+ KeyValueMap::Iterator itMap;
+
+ for (itMap = m_currentMap.begin(); itMap != m_currentMap.end(); ++itMap)
+ {
+ QListViewItem* temp = new QListViewItem(m_sv);
+ temp->setText(0,itMap.key());
+ if(!m_option->m_searchingOnlyMode)
+ temp->setText(1,itMap.data());
+ }
+}
+
+void KAddStringDlg::whatsThis()
+{
+ QWhatsThis::add(m_rbSearchOnly, rbSearchOnlyWhatthis);
+ QWhatsThis::add(m_rbSearchReplace, rbSearchReplaceWhatthis);
+ QWhatsThis::add(m_edSearch, edSearchWhatthis);
+ QWhatsThis::add(m_edReplace, edReplaceWhatthis);
+}
+
+//PRIVATE SLOTS
+void KAddStringDlg::slotOK()
+{
+ m_option->m_mapStringsView = m_currentMap;
+
+ accept();
+}
+
+void KAddStringDlg::slotSearchOnly()
+{
+ m_option->m_searchingOnlyMode = true;
+
+ m_rbSearchOnly->setChecked(true);
+ m_edSearch->setEnabled(true);
+ m_edReplace->setEnabled(false);
+ m_tlSearch->setEnabled(true);
+ m_tlReplace->setEnabled(false);
+
+ //sets the right view appearance
+ raiseView();
+ //empties the view content
+ eraseViewItems();
+}
+
+void KAddStringDlg::slotSearchReplace()
+{
+ m_option->m_searchingOnlyMode = false;
+
+ m_rbSearchReplace->setChecked(true);
+ m_edSearch->setEnabled(true);
+ m_edReplace->setEnabled(true);
+ m_tlSearch->setEnabled(true);
+ m_tlReplace->setEnabled(true);
+
+ //sets the right view appearance
+ raiseView();
+ //empties the view content
+ eraseViewItems();
+}
+
+void KAddStringDlg::slotAddStringToView()
+{
+ if(m_option->m_searchingOnlyMode)
+ {
+ QString text = m_edSearch->text();
+ if(!(text.isEmpty() || columnContains(m_sv, text, 0)))
+ {
+ QListViewItem* lvi = new QListViewItem(m_sv);
+ lvi->setMultiLinesEnabled(true);
+ lvi->setText(0,text);
+ m_currentMap[text] = QString::null;
+ m_edSearch->clear();
+ }
+ }
+ else
+ {
+ QString searchText = m_edSearch->text(),
+ replaceText = m_edReplace->text();
+
+ if(!(searchText.isEmpty() || replaceText.isEmpty() || columnContains(m_sv,searchText,0) || columnContains(m_sv,replaceText,1)))
+ {
+ QListViewItem* lvi = new QListViewItem(m_sv);
+ lvi->setMultiLinesEnabled(true);
+ lvi->setText(0,searchText);
+ m_edSearch->clear();
+ lvi->setText(1,replaceText);
+ m_currentMap[searchText] = replaceText;
+ m_edReplace->clear();
+ }
+ }
+}
+
+void KAddStringDlg::slotDeleteStringFromView()
+{
+ // Choose current item or selected item
+ QListViewItem* currentItem = m_sv->currentItem();
+
+ // Do nothing if list is empty
+ if(currentItem == 0)
+ return;
+
+ m_currentMap.remove(currentItem->text(0));
+
+ if(m_option->m_searchingOnlyMode)
+ {
+ m_edSearch->setText(currentItem->text(0));
+ m_edReplace->clear();
+ //currentItem->setText(1,m_edReplace->text());
+ }
+ else
+ {
+ m_edSearch->setText(currentItem->text(0));
+ m_edReplace->setText(currentItem->text(1));
+ }
+
+ delete currentItem;
+
+ currentItem = 0;
+}
+
+void KAddStringDlg::slotHelp()
+{
+ kapp->invokeHelp(QString::null, "kfilereplace");
+}
+
+#include "kaddstringdlg.moc"
+
diff --git a/kfilereplace/kaddstringdlg.h b/kfilereplace/kaddstringdlg.h
new file mode 100644
index 00000000..f51e7f77
--- /dev/null
+++ b/kfilereplace/kaddstringdlg.h
@@ -0,0 +1,75 @@
+/***************************************************************************
+ KAddStringDlg.h - description
+ -------------------
+ begin : Sat Oct 16 1999
+ copyright : (C) 1999 by François Dupoux
+ (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ email : dupoux@dupoux.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 KADDSTRINGDLG_H
+#define KADDSTRINGDLG_H
+
+// local
+#include "kaddstringdlgs.h"
+#include "configurationclasses.h"
+/**
+ * This is the dialog used to add a list of searching/replacing strings
+ */
+class KAddStringDlg : public KAddStringDlgS
+{
+ Q_OBJECT
+ private:
+ RCOptions* m_option;
+ QListView* m_sv;
+ KeyValueMap m_currentMap;
+ bool m_wantEdit;
+
+ public: //Constructors
+ KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent=0, const char *name=0);
+
+ private slots:
+ void slotOK();
+ void slotSearchOnly();
+ void slotSearchReplace();
+ void slotAddStringToView();
+ void slotDeleteStringFromView();
+ void slotHelp();
+
+ private:
+ /**
+ * inits... the GUI :-)
+ */
+ void initGUI();
+ /**
+ * Deletes all the items of the view
+ */
+ void eraseViewItems();
+ /**
+ * Deletes all the items of the map
+ */
+ void clearMap() { KeyValueMap m; m_option->m_mapStringsView = m; }
+ /**
+ * The view is actually a stack widget that contains two different views widget
+ */
+ void raiseView();
+ /**
+ * Verifies whether 'lv' contains 's'
+ */
+ bool columnContains(QListView* lv,const QString& s, int column);
+ void saveViewContentIntoMap();
+ void loadMapIntoView();
+ void whatsThis();
+};
+
+#endif // KADDSTRINGDLG_H
+
diff --git a/kfilereplace/kaddstringdlgs.ui b/kfilereplace/kaddstringdlgs.ui
new file mode 100644
index 00000000..6685e92f
--- /dev/null
+++ b/kfilereplace/kaddstringdlgs.ui
@@ -0,0 +1,426 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>KAddStringDlgS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>KAddStringDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>586</width>
+ <height>347</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Insert Searching/Replacing Strings</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>layout14</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>bgChoose</cstring>
+ </property>
+ <property name="title">
+ <string>Choose String Adding Mode</string>
+ </property>
+ <property name="exclusive">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>m_rbSearchReplace</cstring>
+ </property>
+ <property name="text">
+ <string>Search and replace mode</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>m_rbSearchOnly</cstring>
+ </property>
+ <property name="text">
+ <string>Search only mode</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QFrame">
+ <property name="name">
+ <cstring>frame4</cstring>
+ </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="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout13</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>m_tlSearch</cstring>
+ </property>
+ <property name="text">
+ <string>Search for:</string>
+ </property>
+ </widget>
+ <widget class="QTextEdit">
+ <property name="name">
+ <cstring>m_edSearch</cstring>
+ </property>
+ <property name="textFormat">
+ <enum>PlainText</enum>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout14</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>m_tlReplace</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Replace with:</string>
+ </property>
+ </widget>
+ <widget class="QTextEdit">
+ <property name="name">
+ <cstring>m_edReplace</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="textFormat">
+ <enum>PlainText</enum>
+ </property>
+ <property name="autoFormatting">
+ <set>AutoAll</set>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>layout16</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <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>20</width>
+ <height>90</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout15</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_pbDel</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_pbAdd</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </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>20</width>
+ <height>90</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QWidgetStack" row="0" column="2">
+ <property name="name">
+ <cstring>m_stack</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </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>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Search For</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_stringView_2</cstring>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>false</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </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>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Search For</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Replace With</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_stringView</cstring>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>false</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+ </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>m_pbHelp</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </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>90</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_pbOK</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_pbCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>m_pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>KAddStringDlgS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kfilereplace/kfilereplace.cpp b/kfilereplace/kfilereplace.cpp
new file mode 100644
index 00000000..a6ade0fe
--- /dev/null
+++ b/kfilereplace/kfilereplace.cpp
@@ -0,0 +1,111 @@
+/***************************************************************************
+ kfilereplace.cpp - KFileReplace shell implementation
+ -------------------
+ begin : Thu Sep 16 14:14:09 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. *
+ * *
+ ***************************************************************************/
+
+//kde includes
+#include <kedittoolbar.h>
+#include <klibloader.h>
+#include <klocale.h>
+#include <kkeydialog.h>
+#include <kmessagebox.h>
+
+//app includes
+#include "kfilereplace.h"
+
+KFileReplace::KFileReplace()
+ : KParts::MainWindow(0L, "KFileReplace")
+{
+ KLibFactory *factory = KLibLoader::self()->factory("libkfilereplacepart");
+ if (factory)
+ {
+ m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(this,
+ "kfilereplace_part", "KParts::ReadOnlyPart" ));
+
+ if (m_part)
+ {
+ setCentralWidget(m_part->widget());
+ KStdAction::quit(this, SLOT(close()), actionCollection());
+ KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), actionCollection());
+ setStandardToolBarMenuEnabled(true);
+ createGUI(m_part);
+ removeDuplicatedActions();
+ }
+ }
+ else
+ {
+ KMessageBox::error(this, i18n("Could not find the KFileReplace part."));
+ close();
+ return;
+ }
+}
+
+
+KFileReplace::~KFileReplace()
+{
+}
+
+void KFileReplace::openURL(const KURL &url)
+{
+ m_part->openURL(url);
+}
+
+void KFileReplace::slotConfigureKeys()
+{
+ KKeyDialog dlg( false, this );
+ QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( QPtrListIterator<KXMLGUIClient> it( clients );
+ it.current(); ++it )
+ {
+ dlg.insert( (*it)->actionCollection() );
+ }
+ dlg.configure();
+}
+
+void KFileReplace::slotConfigureToolbars()
+{
+ saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ KEditToolbar dlg(factory());
+ connect(&dlg, SIGNAL(newToolbarConfig()),
+ this, SLOT(applyNewToolbarConfig()));
+ dlg.exec();
+}
+
+void KFileReplace::applyNewToolbarConfig()
+{
+ applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+}
+
+
+void KFileReplace::removeDuplicatedActions()
+{
+ KActionCollection* part_action_collection = m_part->actionCollection();
+ KAction* part_about_action = part_action_collection->action("help_about_kfilereplace");
+ KAction* part_report_action = part_action_collection->action("report_bug");
+ KAction* part_help_action= part_action_collection->action("help_kfilereplace");
+
+ if (!part_about_action || !part_report_action || !part_help_action || !part_action_collection)
+ return;
+
+ QWidget* container = part_about_action->container(0);
+ part_about_action->unplug(container);
+ part_report_action->unplug(container);
+ part_help_action->unplug(container);
+ part_action_collection->remove(part_about_action);
+ part_action_collection->remove(part_report_action);
+ part_action_collection->remove(part_help_action);
+}
+
+#include "kfilereplace.moc"
diff --git a/kfilereplace/kfilereplace.desktop b/kfilereplace/kfilereplace.desktop
new file mode 100644
index 00000000..0e01c478
--- /dev/null
+++ b/kfilereplace/kfilereplace.desktop
@@ -0,0 +1,55 @@
+[Desktop Entry]
+Name=KFileReplace
+Name[hi]=के-फ़ाइल-रिपà¥à¤²à¥‡à¤¸
+Name[ne]=बदलà¥à¤¨à¥‡ केडीई फाइल
+Name[pa]=ਕੇ-ਫਾਇਲ-ਬਦਲੋ
+Name[sk]=KFile zameniť
+Name[sv]=Kfilereplace
+Name[ta]=Kகோபà¯à®ªà¯ இடமாறà¯à®±à¯
+Name[tg]=KФайлро ҷойгузор кардан
+Name[tr]=K Dosya DeÄŸiÅŸtirme
+Exec=kfilereplace %i %m -caption "%c"
+Icon=kfilereplace
+Type=Application
+DocPath=kfilereplace/index.html
+Terminal=false
+GenericName=Search & Replace Tool
+GenericName[bg]=ТърÑене и замÑна
+GenericName[br]=Ostilh klask hag erlec'hiañ
+GenericName[ca]=Eina cerca i substitueix
+GenericName[cs]=Nástroj pro vyhledání a nahrazení
+GenericName[da]=Søg og erstat-værktøj
+GenericName[de]=Suchen & Ersetzen Werkzeug
+GenericName[el]=ΕÏγαλείο αναζήτησης & αντικατάστασης
+GenericName[es]=Herramienta de búsqueda y reemplazo
+GenericName[et]=Otsimise ja asendamise tööriist
+GenericName[eu]=Bilaketa eta ordezkapen tresna
+GenericName[fa]=ابزار جستجو و جایگزینی
+GenericName[fi]=Etsi & korvaa työkalu
+GenericName[fr]=Outil de recherche et de remplacement
+GenericName[gl]=Ferramenta de busca e reemprazo
+GenericName[hu]=Fájlkereső
+GenericName[is]=Tól til að leita að texta og skipta út
+GenericName[it]=Strumento di ricerca e sostituzione
+GenericName[ja]=検索ãŠã‚ˆã³ç½®æ›ãƒ„ール
+GenericName[ka]=ძიების დრჩáƒáƒœáƒáƒªáƒ•áƒšáƒ”ბის ხელსáƒáƒ¬áƒ§áƒ
+GenericName[lt]=Paieškos ir keitimo įrankis
+GenericName[ms]=Alatan Cari & Ganti
+GenericName[nds]=Söök- un Utwesselwarktüüch
+GenericName[ne]=खोजी गरà¥à¤¨à¥‡ र बदलà¥à¤¨à¥‡ उपरकरण
+GenericName[nl]=Gereedschap voor zoeken en vervangen
+GenericName[pa]=ਖੋਜ ਅਤੇ ਤਬਦੀਲ ਸੰਦ
+GenericName[pl]=Narzędzie do wyszukiwania i zamiany
+GenericName[pt]=Ferramenta de Procura e Substituição
+GenericName[pt_BR]=Ferramenta de Procura & Substituição
+GenericName[ru]=ПоиÑк и замена
+GenericName[sk]=Nájsť a zameniť
+GenericName[sl]=Orodje za iskanje in zamenjavo
+GenericName[sr]=Ðлат за претрагу и замену
+GenericName[sr@Latn]=Alat za pretragu i zamenu
+GenericName[sv]=Sök- och ersättningsverktyg
+GenericName[uk]=ЗаÑіб пошуку та заміни
+GenericName[zh_CN]=æœç´¢æ›¿æ¢å·¥å…·
+GenericName[zh_HK]=æœå°‹åŠå–代工具
+GenericName[zh_TW]=æœå°‹åŠå–代工具
+Categories=Qt;KDE;Utility;X-KDE-Utilities-File;
diff --git a/kfilereplace/kfilereplace.h b/kfilereplace/kfilereplace.h
new file mode 100644
index 00000000..2d65d0ed
--- /dev/null
+++ b/kfilereplace/kfilereplace.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ kfilereplace.h - KFileReplace header
+ -------------------
+ begin : Thu Sep 16 14:14:09 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. *
+ * *
+ ***************************************************************************/
+#ifndef KFILEREPLACE_H
+#define KFILEREPLACE_H
+
+#include <kparts/mainwindow.h>
+
+/**
+Shell application for the KFileReplace part.
+
+@author Andras Mantia
+*/
+class KFileReplace : public KParts::MainWindow
+{
+ Q_OBJECT
+public:
+ KFileReplace();
+ ~KFileReplace();
+ void openURL(const KURL &url);
+
+private slots:
+ void slotConfigureKeys();
+ void slotConfigureToolbars();
+ void applyNewToolbarConfig();
+
+private:
+ void removeDuplicatedActions();
+
+ KParts::ReadOnlyPart *m_part;
+};
+
+#endif
diff --git a/kfilereplace/kfilereplace.kdevelop b/kfilereplace/kfilereplace.kdevelop
new file mode 100644
index 00000000..96834aae
--- /dev/null
+++ b/kfilereplace/kfilereplace.kdevelop
@@ -0,0 +1,190 @@
+<?xml version = '1.0'?>
+<kdevelop>
+ <general>
+ <author/>
+ <email/>
+ <version>$VERSION$</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ </keywords>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <description/>
+ <ignoreparts/>
+ <secondaryLanguages/>
+ <versioncontrol>kdevcvsservice</versioncontrol>
+ </general>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <showvcsfields>false</showvcsfields>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ </tree>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>stl</toc>
+ <toc>sw</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>w3c-svg</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>libtool</dbgshell>
+ <programargs/>
+ <gdbpath/>
+ <configGdbScript/>
+ <runShellScript/>
+ <runGdbScript/>
+ <breakonloadinglibs>true</breakonloadinglibs>
+ <separatetty>false</separatetty>
+ <floatingtoolbar>false</floatingtoolbar>
+ </general>
+ <display>
+ <staticmembers>false</staticmembers>
+ <demanglenames>true</demanglenames>
+ <outputradix>10</outputradix>
+ </display>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevautoproject>
+ <make>
+ <envvars>
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </envvars>
+ <abortonerror>true</abortonerror>
+ <numberofjobs>1</numberofjobs>
+ <dontact>false</dontact>
+ <makebin/>
+ <prio>0</prio>
+ </make>
+ <run>
+ <directoryradio>build</directoryradio>
+ <customdirectory>/</customdirectory>
+ <mainprogram>kfilereplace/kfilereplace</mainprogram>
+ <programargs/>
+ <terminal>false</terminal>
+ <autocompile>true</autocompile>
+ <envvars/>
+ </run>
+ <general>
+ <useconfiguration>default</useconfiguration>
+ <activetarget>kfilereplace</activetarget>
+ </general>
+ <configurations>
+ <default>
+ <envvars>
+ <envvar value="kommander klinkstatus kxsldbg kimagemapeditor quanta" name="DO_NOT_COMPILE" />
+ </envvars>
+ <configargs>--enable-debug=full --prefix=/opt/kde3 --enable-editors</configargs>
+ <builddir>/home/andris/development/build/kde-head/kdewebdev</builddir>
+ <topsourcedir>/home/andris/development/sources/kde-head/kdewebdev</topsourcedir>
+ <cppflags>-DKDE_NO_COMPAT -DQT_NO_COMPAT -DDEBUG_PARSER</cppflags>
+ <ldflags/>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <cxxflags/>
+ <f77flags/>
+ </default>
+ </configurations>
+ </kdevautoproject>
+ <cppsupportpart>
+ <filetemplates>
+ <interfacesuffix>.h</interfacesuffix>
+ <implementationsuffix>.cpp</implementationsuffix>
+ </filetemplates>
+ </cppsupportpart>
+ <kdevcppsupport>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>false</includeTypedefs>
+ <automaticCodeCompletion>true</automaticCodeCompletion>
+ <automaticArgumentsHint>true</automaticArgumentsHint>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <headerCompletionDelay>250</headerCompletionDelay>
+ </codecompletion>
+ <references/>
+ <creategettersetter>
+ <prefixGet/>
+ <prefixSet>set</prefixSet>
+ <prefixVariable>m_,_</prefixVariable>
+ <parameterName>theValue</parameterName>
+ <inlineGet>true</inlineGet>
+ <inlineSet>true</inlineSet>
+ </creategettersetter>
+ </kdevcppsupport>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem/>
+ <docurl/>
+ <usermanualurl/>
+ </projectdoc>
+ </kdevdocumentation>
+ <kdevcvsservice>
+ <recursivewhenupdate>true</recursivewhenupdate>
+ <prunedirswhenupdate>true</prunedirswhenupdate>
+ <createdirswhenupdate>true</createdirswhenupdate>
+ <recursivewhencommitremove>true</recursivewhencommitremove>
+ <revertoptions>-C</revertoptions>
+ </kdevcvsservice>
+</kdevelop>
diff --git a/kfilereplace/kfilereplaceiface.h b/kfilereplace/kfilereplaceiface.h
new file mode 100644
index 00000000..ab7348d2
--- /dev/null
+++ b/kfilereplace/kfilereplaceiface.h
@@ -0,0 +1,30 @@
+/***************************************************************************
+ kfilereplaceif.h - description
+ -------------------
+ copyright : (C) 1999 by François Dupoux
+ (C) 2003 Andras Mantia
+ email : dupoux@dupoux.com, 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 KFILEREPLACEIFACE_H
+#define KFILEREPLACEIFACE_H
+
+#include <dcopobject.h>
+
+class KFileReplaceIface : virtual public DCOPObject
+{
+ K_DCOP
+
+k_dcop:
+ virtual void openURL(const QString& url) = 0;
+};
+
+#endif // KFILEREPLACEIFACE_H
diff --git a/kfilereplace/kfilereplacelib.cpp b/kfilereplace/kfilereplacelib.cpp
new file mode 100644
index 00000000..e57a3a84
--- /dev/null
+++ b/kfilereplace/kfilereplacelib.cpp
@@ -0,0 +1,381 @@
+/***************************************************************************
+ kfilereplacelib.cpp - File library
+ -------------------
+ begin : lun mai 3 20:19:52 CEST 1999
+
+ copyright : (C) 1999 by François Dupoux
+ (C) 2003 Andras Mantia <amantia@kde.org>
+ (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ email : dupoux@dupoux.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. *
+ * *
+ ***************************************************************************/
+
+//QT
+#include <qstringlist.h>
+#include <qwidget.h>
+#include <qlistview.h>
+#include <qfileinfo.h>
+
+//KDE
+#include <kdebug.h>
+#include <kmessagebox.h>
+#include <klistview.h>
+#include <kiconloader.h>
+
+//needed for malloc/free
+#include <stdlib.h>
+
+// local
+#include "kfilereplacelib.h"
+
+const double kilo = 1024.0;
+const double mega = 1048576.0;//1024^2
+const double giga = 1073741824.0;//1024^3
+const double tera = 1099511627776.0;//1024^4
+
+/**
+ Format a path, from a path and a filename, or another sub-path (avoid double '/' risks)
+ Parameters::.....* basePath: fist path (can be "/" if root, or "/usr/bin/" or "/usr/bin" for example)
+ .................* fileName: second path (can be "/doc/html/", or "doc/html/" or "doc/html/index.html" for example)
+ Return values:...* Full valid path (without double "/")
+*/
+QString KFileReplaceLib::formatFullPath(const QString& basePath, const QString &fileName)
+{
+ QString fullPath = basePath;
+ QString fname = fileName;
+
+ if (fname.startsWith("/")) // skip beginning '/'
+ fname = fname.remove(0,1);
+
+ if (fullPath.endsWith("/"))
+ fullPath.append(fname);
+ else
+ fullPath.append("/"+fname);
+
+ return fullPath;
+}
+
+/**
+ Add an extension to a filename, or a filepath
+ Parameters::.....* fileName: filename or filepath (it can have already the extension)
+ .................* extension: extension to add without "." (ex: "html", "kfr")
+ Return values:...* Filename / Filepath with the extension
+*/
+QString KFileReplaceLib::addExtension(const QString& fileName, const QString& extension)
+{
+ QString fullExtension = ".";
+ QString fname = fileName;
+
+ fullExtension.append(extension);
+
+ // filename cannot contain ".ext" ==> Add it
+ if(fname.length() <= fullExtension.length())
+ fname.append(fullExtension);
+ else // filename can contain ".ext"
+ {
+ if (fname.right(fullExtension.length()) != fullExtension)
+ fname.append(fullExtension);
+ }
+
+ return fname;
+}
+
+QString KFileReplaceLib::formatFileSize(double size)
+{
+ QString stringSize;
+
+ if(size < kilo)
+ {
+ const int asInt = (int) size;
+ stringSize = i18n("1 byte", "%n bytes", asInt);
+ }
+ else
+ if(size >= kilo && size < mega)
+ {
+ double d = size / kilo;
+ stringSize = i18n("%1 KB").arg(QString::number(d,'f',2));
+ }
+ else
+ if(size >= mega && size < giga)
+ {
+ double d = size / mega;
+ stringSize = i18n("%1 MB").arg(QString::number(d,'f',2));
+ }
+ else
+ if(size >= giga)
+ {
+ double d = size / giga;
+ stringSize = i18n("%1 GB").arg(QString::number(d,'f',2));
+ }
+ return stringSize;
+}
+
+void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListView* stringView)
+{
+ //this method convert old format in new XML-based format
+ typedef struct
+ {
+ char pgm[13]; // Must be "KFileReplace" : like MZ for EXE files
+ int stringNumber; // Number of strings in file
+ char reserved[64]; // Reserved for future use
+ } KFRHeader;
+
+ KFRHeader head;
+
+ FILE* f = fopen(fileName.ascii(),"rb");
+ int err = fread(&head, sizeof(KFRHeader), 1, f);
+ QString pgm(head.pgm);
+
+ if(!f || (err != 1) || (pgm != "KFileReplace"))
+ {
+ KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b> and load the string list. This file seems not to be a valid old kfr file or it is broken.</qt>").arg(fileName));
+ return ;
+ }
+
+ stringView->clear();
+
+ int oldTextSize,
+ newTextSize,
+ errors = 0,
+ stringSize;
+ QStringList l;
+
+ int i ;
+ for (i=0; i < head.stringNumber; i++)
+ {
+ errors += (fread(&oldTextSize, sizeof(int), 1, f)) != 1;
+ errors += (fread(&newTextSize, sizeof(int), 1, f)) != 1;
+ if(errors > 0)
+ KMessageBox::error(0, i18n("Cannot read data."));
+ else
+ {
+ stringSize = ((oldTextSize > newTextSize) ? oldTextSize : newTextSize) + 2;
+ char* oldString = (char*) malloc(stringSize+10),
+ * newString = (char*) malloc(stringSize+10);
+ memset(oldString, 0, stringSize);
+ memset(newString,0, stringSize);
+ if (oldString == 0 || newString == 0)
+ KMessageBox::error(0, i18n("Out of memory."));
+ else
+ {
+ if (fread(oldString, oldTextSize, 1, f) != 1)
+ KMessageBox::error(0, i18n("Cannot read data."));
+ else
+ {
+ if (newTextSize > 0) // If there is a Replace text
+ {
+ if (fread(newString, newTextSize, 1, f) != 1)
+ KMessageBox::error(0, i18n("Cannot read data."));
+ else
+ {
+ QListViewItem* lvi = new QListViewItem(stringView);
+ lvi->setText(0,oldString);
+ lvi->setText(1,newString);
+
+ if(newString)
+ free(newString);
+ if(oldString)
+ free(oldString);
+ }
+ }
+ }
+ }
+ }
+ }
+ fclose(f);
+ return ;
+ }
+
+bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString& fileName, RCOptions* info)
+{
+ QString bkExt = info->m_backupExtension;
+ if(fileName == ".." || fileName == "." || (!bkExt.isEmpty() && fileName.right(bkExt.length()) == bkExt))
+ return false;
+
+ QFileInfo fi;
+ if(filePath.isEmpty())
+ fi.setFile(fileName);
+ else
+ fi.setFile(filePath+"/"+fileName);
+
+ if(fi.isDir())
+ return true;
+
+ int minSize = info->m_minSize,
+ maxSize = info->m_maxSize;
+ QString minDate = info->m_minDate,
+ maxDate = info->m_maxDate,
+ dateAccess = info->m_dateAccess;
+
+ // Avoid files that not match access date requirements
+ QString last = "unknown";
+ if(dateAccess == "Last Writing Access")
+ last = fi.lastModified().toString(Qt::ISODate);
+ if(dateAccess == "Last Reading Access")
+ last = fi.lastRead().toString(Qt::ISODate);
+
+ if(last != "unknown")
+ {
+ if(minDate != "unknown" && maxDate != "unknown")
+ { //If out of range then exit
+ if((minDate > last) || (maxDate < last))
+ return false;
+ }
+ else
+ {
+ if(minDate != "unknown")
+ { //If out of range then exit
+ if(minDate > last)
+ return false;
+ }
+ else
+ {
+ if(maxDate != "unknown")
+ //If out of range then exit
+ if(maxDate < last)
+ return false;
+ }
+ }
+ }
+ // Avoid files that not match size requirements
+ int size = fi.size();
+ if(maxSize != FileSizeOption && minSize != FileSizeOption)
+ if(size > (maxSize*1024) || size < (minSize*1024))
+ return false;
+
+ // Avoid files that not match ownership requirements
+ if(info->m_ownerUserIsChecked)
+ {
+ QString fileOwnerUser;
+ if(info->m_ownerUserType == "Name")
+ fileOwnerUser = fi.owner();
+ else
+ fileOwnerUser = QString::number(fi.ownerId(),10);
+
+ if(info->m_ownerUserBool == "Equals To")
+ {
+ if(info->m_ownerUserValue != fileOwnerUser)
+ return false;
+ }
+ else
+ {
+ if(info->m_ownerUserValue == fileOwnerUser)
+ return false;
+ }
+ }
+
+ if(info->m_ownerGroupIsChecked)
+ {
+ QString fileOwnerGroup;
+ if(info->m_ownerGroupType == "Name")
+ fileOwnerGroup = fi.group();
+ else
+ fileOwnerGroup = QString::number(fi.groupId(),10);
+ if(info->m_ownerGroupBool == "Equals To")
+ {
+ if(info->m_ownerGroupValue != fileOwnerGroup)
+ return false;
+ }
+ else
+ {
+ if(info->m_ownerGroupValue == fileOwnerGroup)
+ return false;
+ }
+ }
+
+ //If we are here then all requirements have been verified
+ return true;
+}
+
+void KFileReplaceLib::setIconForFileEntry(QListViewItem* item, QString path)
+{
+ QFileInfo fi(path);
+ QString extension = fi.extension(),
+ baseName = fi.baseName();
+
+ KeyValueMap extensionMap;
+
+ extensionMap["a"] = "binary";
+ extensionMap["am"] = "shellscript";
+ extensionMap["bz"] = "zip";
+ extensionMap["bz2"] = "zip";
+ extensionMap["c"] = "source_c";
+ extensionMap["cc"] = "source_cpp";
+ extensionMap["cpp"] = "source_cpp";
+ extensionMap["eml"] = "message";
+ extensionMap["exe"] = "exec_wine";
+ extensionMap["gz"] = "zip";
+ extensionMap["h"] = "source_h";
+ extensionMap["htm"] = "html";
+ extensionMap["html"] = "html";
+ extensionMap["in"] = "shellscript";
+ extensionMap["java"] = "source_java";
+ extensionMap["jpg"] = "image";
+ extensionMap["kfr"] = "html";
+ extensionMap["kmdr"] = "widget_doc";
+ extensionMap["kwd"] = "kword_kwd";
+ extensionMap["log"] = "log";
+ extensionMap["moc"] = "source_moc";
+ extensionMap["mp3"] = "sound";
+ extensionMap["o"] = "source_o";
+ extensionMap["pdf"] = "pdf";
+ extensionMap["php"] = "source_php";
+ extensionMap["py"] = "source_py";
+ extensionMap["pl"] = "source_pl";
+ extensionMap["p"] = "source_p";
+ extensionMap["ps"] = "postscript";
+ extensionMap["png"] = "image";
+ extensionMap["sa"] = "binary";
+ extensionMap["sh"] = "shellscript";
+ extensionMap["so"] = "binary";
+ extensionMap["tar"] = "tar";
+ extensionMap["tex"] = "tex";
+ extensionMap["tgz"] = "tgz";
+ extensionMap["txt"] = "txt";
+ extensionMap["ui"] = "widget_doc";
+ extensionMap["uml"] = "umbrellofile";
+ extensionMap["wav"] = "sound";
+ extensionMap["xml"] = "html";
+ extensionMap["xpm"] = "image";
+
+ KeyValueMap::Iterator itExtensionMap;
+
+ for(itExtensionMap = extensionMap.begin(); itExtensionMap != extensionMap.end(); ++itExtensionMap)
+ {
+ if(extension == itExtensionMap.key())
+ {
+ item->setPixmap(0,SmallIcon(itExtensionMap.data()));
+ return;
+ }
+ }
+
+ KeyValueMap baseNameMap;
+
+ baseNameMap["configure"] = "shellscript";
+ baseNameMap["core"] = "core";
+ baseNameMap["makefile"] = "make";
+ baseNameMap["readme"] = "readme";
+ baseNameMap["README"] = "readme";
+ baseNameMap["Readme"] = "readme";
+ baseNameMap["TODO"] = "txt";
+
+ KeyValueMap::Iterator itBaseNameMap;
+
+ for(itBaseNameMap = baseNameMap.begin(); itBaseNameMap != baseNameMap.end(); ++itBaseNameMap)
+ {
+ if(baseName == itBaseNameMap.key())
+ {
+ item->setPixmap(0,SmallIcon(itBaseNameMap.data()));
+ return;
+ }
+ }
+}
diff --git a/kfilereplace/kfilereplacelib.h b/kfilereplace/kfilereplacelib.h
new file mode 100644
index 00000000..e5c14c72
--- /dev/null
+++ b/kfilereplace/kfilereplacelib.h
@@ -0,0 +1,65 @@
+/***************************************************************************
+ kfilereplacelib.h - File library, derived from filelib.h
+ -------------------
+ begin : lun mai 3 20:19:52 CEST 1999
+
+ copyright : (C) 1999 by François Dupoux
+ (C) 2003 Andras Mantia <amantia@kde.org>
+ (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ email : dupoux@dupoux.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 KFILEREPLACELIB_H
+#define KFILEREPLACELIB_H
+
+// KDE
+#include <klocale.h>
+class KlistView;
+
+// local
+#include "configurationclasses.h"
+
+class KFileReplaceLib
+{
+ public:
+
+ /**
+ Format a path, from a path and a filename, or another sub-path (avoid double '/' risks)
+ Parameters::.....* basePath: fist path (can be "/" if root, or "/usr/bin/" or "/usr/bin" for example)
+ .................* filename: second path (can be "/doc/html/", or "doc/html/" or "doc/html/index.html" for example)
+ Return values:...* Full valid path (without double "/")
+ */
+ static QString formatFullPath(const QString& basePath, const QString& fileName);
+
+ /**
+ Add an extension to a filename, or a filepath
+ Parameters::.....* filename: filename or filepath (it can have already the extension)
+ .................* extension: extension to add without "." (ex: "html", "kfr")
+ Return values:...* Filename / Filepath with the extension
+ */
+ static QString addExtension(const QString& fileName, const QString& extension);
+
+ static QString formatFileSize(double size);
+
+ /**
+ converts the old kfr format file in the new xml-based format.
+ */
+ static void convertOldToNewKFRFormat(const QString& fileName, KListView* stringView);
+ /**
+ Verifies that files, which we are scanning, respect some
+ conditions
+ */
+ static bool isAnAccessibleFile(const QString& filePath, const QString& fileName, RCOptions* info);
+
+ static void setIconForFileEntry(QListViewItem* item, QString path);
+};
+#endif // KFILEREPLACEFILELIB_H
diff --git a/kfilereplace/kfilereplacepart.cpp b/kfilereplace/kfilereplacepart.cpp
new file mode 100644
index 00000000..9e0be192
--- /dev/null
+++ b/kfilereplace/kfilereplacepart.cpp
@@ -0,0 +1,1679 @@
+//
+//
+// C++ Implementation: kfilereplacepart
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kde.org>, (C) 2003
+// Maintainer: Emiliano Gulmini <emi_barbarossa@yahoo.it>, (C) 2004
+//
+// Copyright: GPL v2. See COPYING file that comes with this distribution
+//
+//
+
+// QT
+#include <qdir.h>
+#include <qdatastream.h>
+#include <qregexp.h>
+#include <qimage.h>
+#include <qtextcodec.h>
+
+// KDE
+#include <dcopclient.h>
+#include <dcopref.h>
+#include <kaboutapplication.h>
+#include <kapplication.h>
+#include <kaction.h>
+#include <kbugreport.h>
+#include <kconfig.h>
+#include <kfiledialog.h>
+#include <kinstance.h>
+#include <kio/netaccess.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kparts/genericfactory.h>
+#include <kstandarddirs.h>
+#include <kiconloader.h>
+#include <kglobal.h>
+#include <kiconeffect.h>
+#include <klistview.h>
+#include <kuser.h>
+#include <kcombobox.h>
+#include <kguiitem.h>
+
+// local
+#include "kfilereplacelib.h"
+#include "kfilereplacepart.h"
+#include "kfilereplaceview.h"
+#include "koptionsdlg.h"
+#include "knewprojectdlg.h"
+#include "report.h"
+#include "commandengine.h"
+#include "whatthis.h"
+
+using namespace whatthisNameSpace;
+
+//PUBLIC CONSTRUCTORS
+// Factory code for KDE 3
+typedef KParts::GenericFactory<KFileReplacePart> FileReplaceFactory;
+
+K_EXPORT_COMPONENT_FACTORY( libkfilereplacepart, FileReplaceFactory )
+
+KFileReplacePart::KFileReplacePart(QWidget* parentWidget, const char* , QObject* parent, const char* name, const QStringList & ) : KParts::ReadOnlyPart(parent,name)
+{
+ setInstance(FileReplaceFactory::instance());
+ KGlobal::locale()->insertCatalogue("kfilereplace");
+ m_parentWidget = parentWidget;
+ m_config = new KConfig("kfilereplacerc");
+ m_aboutDlg = 0;
+ m_stop = false;
+ m_optionMask = QDir::Files;
+ m_w = widget();
+ m_option = 0;
+
+ loadOptionsFromRC();
+ initView();
+ initGUI();
+
+ whatsThis();
+}
+
+KFileReplacePart::~KFileReplacePart()
+{
+ m_view = 0; //it's already deleted, so set it to NULL
+
+ saveOptionsToRC();
+
+ delete m_aboutDlg;
+ m_aboutDlg = 0;
+ delete m_config;
+ m_config = 0;
+ delete m_w;
+ m_w = 0;
+ delete m_option;
+}
+
+//PRIVATE SLOTS
+void KFileReplacePart::slotSetNewParameters()
+{
+ launchNewProjectDialog(KURL());
+ m_view->changeView(m_option->m_searchingOnlyMode);
+ emit setStatusBarText(i18n("Ready."));
+}
+
+void KFileReplacePart::slotSearchingOperation()
+{
+ if(!checkBeforeOperation())
+ return;
+
+ KListView* rv = m_view->getResultsView();
+
+ rv->clear();
+
+ rv->setSorting(-1);
+
+ // show wait cursor
+ QApplication::setOverrideCursor( Qt::waitCursor );
+
+ freezeActions();
+
+ setOptionMask();
+
+ QString currentDirectory = m_option->m_directories[0],
+ currentFilter = m_option->m_filters[0];
+
+ //m_currentDir = currentDirectory;
+
+ m_view->showSemaphore("red");
+
+ uint filesNumber = 0;
+
+ if(m_option->m_recursive)
+ recursiveFileSearch(currentDirectory, currentFilter, filesNumber);
+ else
+ fileSearch(currentDirectory, currentFilter);
+
+ m_view->showSemaphore("yellow");
+
+ kapp->processEvents();
+
+ //disabling and enabling sorting... don't ask me why, but it works!
+ rv->setSorting(0);
+ rv->sort();
+ rv->setSorting(-1);
+
+ // restore false status for stop button
+ m_stop = false;
+
+ QApplication::restoreOverrideCursor();
+
+ emit setStatusBarText(i18n("Search completed."));
+
+ m_option->m_searchingOnlyMode = true;
+
+ resetActions();
+
+ m_searchingOperation = true;
+
+ m_view->showSemaphore("green");
+}
+
+void KFileReplacePart::slotReplacingOperation()
+{
+ if (KMessageBox::warningContinueCancel(m_w, i18n("<qt>You have selected <b>%1</b> as the encoding of the files.<br>Selecting the correct encoding is very important as if you have files that have some other encoding than the selected one, after a replace you may damage those files.<br><br>In case you do not know the encoding of your files, select <i>utf8</i> and <b>enable</b> the creation of backup files. This setting will autodetect <i>utf8</i> and <i>utf16</i> files, but the changed files will be converted to <i>utf8</i>.</qt>").arg(m_option->m_encoding), i18n("File Encoding Warning"), KStdGuiItem::cont(), "ShowEncodingWarning") == KMessageBox::Cancel)
+ return;
+ if(!checkBeforeOperation())
+ return;
+
+ KListView* rv = m_view->getResultsView();
+
+ if(m_option->m_simulation)
+ {
+ emit setStatusBarText(i18n("Replacing files (simulation)..."));
+ rv->setColumnText(4,i18n("Replaced strings (simulation)"));
+ }
+ else
+ {
+ emit setStatusBarText(i18n("Replacing files..."));
+ rv->setColumnText(4,i18n("Replaced strings"));
+ }
+ // show wait cursor
+ QApplication::setOverrideCursor( Qt::waitCursor );
+
+ freezeActions();
+
+ setOptionMask();
+
+ rv->setSorting(-1);
+
+ m_view->showSemaphore("green");
+
+ QString currentDirectory = m_option->m_directories[0];
+
+ m_view->showSemaphore("red");
+
+ if(m_option->m_recursive)
+ {
+ int filesNumber = 0;
+ recursiveFileReplace(currentDirectory, filesNumber);
+ }
+ else
+ {
+ fileReplace();
+ }
+
+ rv->setSorting(0);
+ rv->sort();
+ rv->setSorting(-1);
+
+ // restore false status for stop button
+ m_stop = false;
+
+ QApplication::restoreOverrideCursor();
+
+ m_option->m_searchingOnlyMode = false;
+
+ resetActions();
+
+ m_searchingOperation = false;
+
+ m_view->showSemaphore("green");
+}
+
+void KFileReplacePart::slotSimulatingOperation()
+{
+ m_option->m_simulation = true;
+ slotReplacingOperation();
+ m_option->m_simulation = false;
+}
+
+void KFileReplacePart::slotStop()
+{
+ emit setStatusBarText(i18n("Stopping..."));
+ m_stop = true;
+ QApplication::restoreOverrideCursor();
+ resetActions();
+}
+
+void KFileReplacePart::slotCreateReport()
+{
+ // Check there are results
+ KListView* rv = m_view->getResultsView(),
+ * sv = m_view->getStringsView();
+
+ if(rv->firstChild() == 0)
+ {
+ KMessageBox::error(m_w, i18n("There are no results to save: the result list is empty."));
+ return ;
+ }
+ // Select the file where results will be saved
+ QString documentName = KFileDialog::getSaveFileName(QString::null, "*.xml|XML " + i18n("Files") + " (*.xml)", m_w, i18n("Save Report"));
+ if (documentName.isEmpty())
+ return ;
+
+ // delete a spourious extension
+ documentName.truncate(documentName.length()-4);
+
+ QFileInfo fileInfo(documentName);
+ if(fileInfo.exists())
+ {
+ KMessageBox::error(m_w, i18n("<qt>A folder or a file named <b>%1</b> already exists.</qt>").arg(documentName));
+ return ;
+ }
+
+ QDir directoryName;
+
+ if(!directoryName.mkdir(documentName, true))
+ {
+ KMessageBox::error(m_w, i18n("<qt>Cannot create the <b>%1</b> folder.</qt>").arg(documentName));
+ return ;
+ }
+
+ directoryName.cd(documentName);
+
+ QString documentPath = documentName+"/"+directoryName.dirName();
+
+ Report report(m_option, rv, sv);
+ report.createDocument(documentPath);
+
+ //resetActions();
+}
+
+void KFileReplacePart::slotStringsAdd()
+{
+ m_view->slotStringsAdd();
+ resetActions();
+}
+
+void KFileReplacePart::slotQuickStringsAdd()
+{
+ //this slot handles a pair of strings that come from project dialog,
+ //if the control character 'N' is found at the position 0 of the two strings,
+ //then we start the search now.
+ QString qs = m_option->m_quickSearchString;
+ QStringList map;
+
+ map.append(qs.left(1));
+ map.append(qs.right(qs.length()-1));
+ //in this case there is no string to search for, so return
+ if(map[1].isEmpty())
+ return;
+
+ //in this one instead, we must search for a string
+ qs = m_option->m_quickReplaceString;
+ map.append(qs.left(1));
+ map.append(qs.right(qs.length()-1));
+
+ m_view->updateOptions(m_option);
+
+ m_view->slotQuickStringsAdd(map[1],map[3]);
+
+ //if search-only mode == true and search-now mode == true then
+ //search string
+ if(map[0] == "N")
+ if(m_option->m_searchingOnlyMode)
+ slotSearchingOperation();
+ else
+ slotReplacingOperation();
+}
+
+void KFileReplacePart::slotStringsDeleteItem()
+{
+ m_view->slotStringsDeleteItem();
+ resetActions();
+}
+
+void KFileReplacePart::slotStringsEmpty()
+{
+ m_view->slotStringsEmpty();
+ resetActions();
+}
+
+void KFileReplacePart::slotStringsEdit()
+{
+ m_view->slotStringsEdit();
+ resetActions();
+}
+
+void KFileReplacePart::slotStringsSave()
+{
+ m_view->slotStringsSave();
+}
+
+void KFileReplacePart::slotStringsLoad()
+{
+ // Selects the file to load from
+ QString menu = "*.kfr|" + i18n("KFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)";
+ QString fileName = KFileDialog::getOpenFileName(QString::null, menu, m_w, i18n("Load Strings From File"));
+
+ if(!fileName.isEmpty())
+ loadRulesFile(fileName);
+
+ resetActions();
+}
+
+void KFileReplacePart::slotStringsInvertCur()
+{
+ m_view->stringsInvert(false);
+ resetActions();
+}
+
+void KFileReplacePart::slotStringsInvertAll()
+{
+ m_view->stringsInvert(true);
+ resetActions();
+}
+
+void KFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile)
+{
+ QString fileName;
+
+ // Downloads file if need (if url is "http://...")
+ if (!(KIO::NetAccess::download(urlFile, fileName, 0)))
+ return;
+
+ // Checks it's not a directory
+ QFileInfo fileInfo;
+ fileInfo.setFile(fileName);
+ if(fileInfo.isDir())
+ {
+ KMessageBox::error(m_w, i18n("Cannot open folders."));
+ return;
+ }
+
+ loadRulesFile(fileName);
+ resetActions();
+}
+
+void KFileReplacePart::slotOptionRecursive()
+{
+ m_option->m_recursive = !m_option->m_recursive;
+ resetActions();
+}
+
+void KFileReplacePart::slotOptionBackup()
+{
+ m_option->m_backup = !m_option->m_backup;
+ resetActions();
+}
+
+void KFileReplacePart::slotOptionCaseSensitive()
+{
+ m_option->m_caseSensitive = !m_option->m_caseSensitive;
+ resetActions();
+}
+
+void KFileReplacePart::slotOptionVariables()
+{
+ m_option->m_variables = !m_option->m_variables;
+ resetActions();
+}
+
+void KFileReplacePart::slotOptionRegularExpressions()
+{
+ m_option->m_regularExpressions = !m_option->m_regularExpressions;
+ resetActions();
+}
+
+void KFileReplacePart::slotOptionPreferences()
+{
+ KOptionsDlg dlg(m_option, m_w, 0);
+
+ if(!dlg.exec())
+ return;
+
+ //updating m_view
+ m_view->updateOptions(m_option);
+
+ resetActions();
+}
+
+void KFileReplacePart::showAboutApplication()
+{
+ m_aboutDlg = new KAboutApplication(createAboutData(), (QWidget *)0, (const char *)0, false);
+ if(m_aboutDlg == 0)
+ return;
+
+ if(!m_aboutDlg->isVisible())
+ m_aboutDlg->show();
+ else
+ m_aboutDlg->raise();
+}
+
+void KFileReplacePart::appHelpActivated()
+{
+ kapp->invokeHelp(QString::null, "kfilereplace");
+}
+
+void KFileReplacePart::reportBug()
+{
+ KBugReport dlg(m_w, true, createAboutData());
+ dlg.exec();
+}
+
+void KFileReplacePart::resetActions()
+{
+ KListView* rv = m_view->getResultsView(),
+ * sv = m_view->getStringsView();
+
+ bool hasItems = (sv->firstChild() != 0),
+ searchOnlyMode = m_option->m_searchingOnlyMode;
+
+ // File
+ actionCollection()->action("new_project")->setEnabled(true);
+ actionCollection()->action("search")->setEnabled(hasItems && searchOnlyMode);
+ actionCollection()->action("file_simulate")->setEnabled(hasItems && !searchOnlyMode);
+ actionCollection()->action("replace")->setEnabled(hasItems && !searchOnlyMode);
+ actionCollection()->action("save_results")->setEnabled(hasItems);
+ actionCollection()->action("stop")->setEnabled(false);
+
+ // Strings
+ actionCollection()->action("strings_add")->setEnabled(true);
+ actionCollection()->action("strings_del")->setEnabled(hasItems);
+ actionCollection()->action("strings_empty")->setEnabled(hasItems);
+ actionCollection()->action("strings_edit")->setEnabled(hasItems);
+ actionCollection()->action("strings_save")->setEnabled(hasItems);
+ actionCollection()->action("strings_load")->setEnabled(true);
+ actionCollection()->action("strings_invert")->setEnabled(hasItems && !searchOnlyMode);
+ actionCollection()->action("strings_invert_all")->setEnabled(hasItems && !searchOnlyMode);
+
+ // Options
+ actionCollection()->action("options_recursive")->setEnabled(true);
+ actionCollection()->action("options_backup")->setEnabled(!searchOnlyMode);
+ actionCollection()->action("options_case")->setEnabled(true);
+ actionCollection()->action("options_var")->setEnabled(!searchOnlyMode);
+ actionCollection()->action("options_regularexpressions")->setEnabled(true);
+ actionCollection()->action("configure_kfilereplace")->setEnabled(true);
+
+ hasItems = (rv->firstChild() != 0);
+
+ // Results
+ actionCollection()->action("results_infos")->setEnabled(hasItems);
+ actionCollection()->action("results_openfile")->setEnabled(hasItems);
+ if (actionCollection()->action("results_editfile"))
+ actionCollection()->action("results_editfile")->setEnabled(hasItems);
+ actionCollection()->action("results_opendir")->setEnabled(hasItems);
+ actionCollection()->action("results_delete")->setEnabled(hasItems);
+ actionCollection()->action("results_treeexpand")->setEnabled(hasItems);
+ actionCollection()->action("results_treereduce")->setEnabled(hasItems);
+
+ // Updates menus and toolbar
+ ((KToggleAction* ) actionCollection()->action("options_recursive"))->setChecked(m_option->m_recursive);
+ ((KToggleAction* ) actionCollection()->action("options_backup"))->setChecked(m_option->m_backup && !searchOnlyMode);
+ ((KToggleAction* ) actionCollection()->action("options_case"))->setChecked(m_option->m_caseSensitive);
+ ((KToggleAction* ) actionCollection()->action("options_var"))->setChecked(m_option->m_variables && !searchOnlyMode);
+ ((KToggleAction* ) actionCollection()->action("options_regularexpressions"))->setChecked(m_option->m_regularExpressions);
+}
+
+//PUBLIC METHODS
+KAboutData* KFileReplacePart::createAboutData()
+{
+ KAboutData * aboutData = new KAboutData("kfilereplacepart",
+ I18N_NOOP("KFileReplacePart"),
+ KFR_VERSION,
+ I18N_NOOP( "Batch search and replace tool."),
+ KAboutData::License_GPL_V2,
+ "(C) 1999-2002 Fran�is Dupoux\n(C) 2003-2004 Andras Mantia\n(C) 2004 Emiliano Gulmini", I18N_NOOP("Part of the KDEWebDev module."), "http://www.kdewebdev.org");
+ aboutData->addAuthor("Fran�is Dupoux",
+ I18N_NOOP("Original author of the KFileReplace tool"),
+ "dupoux@dupoux.com");
+ aboutData->addAuthor("Emiliano Gulmini",
+ I18N_NOOP("Current maintainer, code cleaner and rewriter"),
+ "emi_barbarossa@yahoo.it");
+ aboutData->addAuthor("Andras Mantia",
+ I18N_NOOP("Co-maintainer, KPart creator"),
+ "amantia@kde.org");
+ aboutData->addCredit("Heiko Goller",
+ I18N_NOOP("Original german translator"),
+ "heiko.goller@tuebingen.mpg.de");
+ return aboutData;
+}
+
+//PROTECTED METHODS
+bool KFileReplacePart::openURL(const KURL &url)
+{
+ if(!url.isEmpty() && (url.protocol() != "file"))
+ {
+ KMessageBox::sorry(m_w, i18n("Sorry, currently the KFileReplace part works only for local files."), i18n("Non Local File"));
+ emit canceled("");
+ return false;
+ }
+ if(!url.isEmpty())
+ return launchNewProjectDialog(url);
+ else
+ {
+ resetActions();
+ return true;
+ }
+}
+
+//PRIVATE METHODS
+void KFileReplacePart::initGUI()
+{
+ setXMLFile("kfilereplacepartui.rc");
+
+ actionCollection()->setHighlightingEnabled(true);
+
+ DCOPClient *client = kapp->dcopClient();
+ QCStringList appList = client->registeredApplications();
+ bool quantaFound = false;
+ for(QCStringList::Iterator it = appList.begin(); it != appList.end(); ++it)
+ {
+ if((*it).left(6) == "quanta")
+ {
+ quantaFound = true;
+ break;
+ }
+ }
+ // File
+ (void)new KAction(i18n("Customize Search/Replace Session..."), "projectopen", 0, this, SLOT(slotSetNewParameters()), actionCollection(), "new_project");
+ (void)new KAction(i18n("&Search"), "filesearch", 0, this, SLOT(slotSearchingOperation()), actionCollection(), "search");
+ (void)new KAction(i18n("S&imulate"), "filesimulate", 0, this, SLOT(slotSimulatingOperation()), actionCollection(), "file_simulate");
+ (void)new KAction(i18n("&Replace"), "filereplace", 0, this, SLOT(slotReplacingOperation()), actionCollection(), "replace");
+ (void)new KAction(i18n("Sto&p"), "stop", 0, this, SLOT(slotStop()), actionCollection(), "stop");
+ (void)new KAction(i18n("Cre&ate Report File..."), "filesaveas", 0, this, SLOT(slotCreateReport()), actionCollection(), "save_results");
+
+ // Strings
+ (void)new KAction(i18n("&Add String..."), "editadd", 0, this, SLOT(slotStringsAdd()), actionCollection(), "strings_add");
+
+ (void)new KAction(i18n("&Delete String"), "editremove", 0, this, SLOT(slotStringsDeleteItem()), actionCollection(), "strings_del");
+ (void)new KAction(i18n("&Empty Strings List"), "editdelete", 0, this, SLOT(slotStringsEmpty()), actionCollection(), "strings_empty");
+ (void)new KAction(i18n("Edit Selected String..."), "edit", 0, this, SLOT(slotStringsEdit()), actionCollection(), "strings_edit");
+ (void)new KAction(i18n("&Save Strings List to File..."), "filesaveas", 0, this, SLOT(slotStringsSave()), actionCollection(), "strings_save");
+ (void)new KAction(i18n("&Load Strings List From File..."), "unsortedList", 0, this, SLOT(slotStringsLoad()), actionCollection(), "strings_load");
+ (void)new KRecentFilesAction(i18n("&Load Recent Strings Files"), "fileopen", 0, this, SLOT(slotOpenRecentStringFile(const KURL&)), actionCollection(),"strings_load_recent");
+ (void)new KAction(i18n("&Invert Current String (search <--> replace)"), "invert", 0, this, SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert");
+ (void)new KAction(i18n("&Invert All Strings (search <--> replace)"), "invert", 0, this, SLOT(slotStringsInvertAll()), actionCollection(), "strings_invert_all");
+
+ // Options
+ (void)new KToggleAction(i18n("&Include Sub-Folders"), "recursive_option", 0, this, SLOT(slotOptionRecursive()), actionCollection(), "options_recursive");
+ (void)new KToggleAction(i18n("Create &Backup Files"), "backup_option", 0, this, SLOT(slotOptionBackup()), actionCollection(), "options_backup");
+ (void)new KToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, this, SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case");
+ (void)new KToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, this, SLOT(slotOptionVariables()), actionCollection(), "options_var");
+ (void)new KToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, this, SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions");
+ (void)new KAction(i18n("Configure &KFileReplace..."), "configure", 0, this, SLOT(slotOptionPreferences()), actionCollection(), "configure_kfilereplace");
+
+ // Results
+ (void)new KAction(i18n("&Properties"), "informations", 0, m_view, SLOT(slotResultProperties()), actionCollection(), "results_infos");
+ (void)new KAction(i18n("&Open"), "filenew", 0, m_view, SLOT(slotResultOpen()), actionCollection(), "results_openfile");
+
+ if(quantaFound)
+ {
+ (void)new KAction(i18n("&Edit in Quanta"), "quanta", 0, m_view, SLOT(slotResultEdit()), actionCollection(), "results_editfile");
+ }
+ (void)new KAction(i18n("Open Parent &Folder"), "fileopen", 0, m_view, SLOT(slotResultDirOpen()), actionCollection(), "results_opendir");
+ (void)new KAction(i18n("&Delete"), "editdelete", 0, m_view, SLOT(slotResultDelete()), actionCollection(), "results_delete");
+ (void)new KAction(i18n("E&xpand Tree"), 0, m_view, SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand");
+ (void)new KAction(i18n("&Reduce Tree"), 0, m_view, SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce");
+ (void)new KAction(i18n("&About KFileReplace"), "kfilereplace", 0, this, SLOT(showAboutApplication()), actionCollection(), "help_about_kfilereplace");
+ (void)new KAction(i18n("KFileReplace &Handbook"), "help", 0, this, SLOT(appHelpActivated()), actionCollection(), "help_kfilereplace");
+ (void)new KAction(i18n("&Report Bug"), 0, 0, this, SLOT(reportBug()), actionCollection(), "report_bug");
+
+}
+
+void KFileReplacePart::initView()
+{
+ m_view = new KFileReplaceView(m_option, m_parentWidget, "view");
+
+ setWidget(m_view);
+
+ m_view->setAcceptDrops(false);
+
+ m_view->showSemaphore("green");
+}
+
+void KFileReplacePart::freezeActions()
+{
+ //Disables actions during search/replace operation
+ actionCollection()->action("new_project")->setEnabled(false);
+ actionCollection()->action("stop")->setEnabled(true);
+
+ actionCollection()->action("file_simulate")->setEnabled(false);
+ actionCollection()->action("replace")->setEnabled(false);
+ actionCollection()->action("search")->setEnabled(false);
+ actionCollection()->action("strings_add")->setEnabled(false);
+ actionCollection()->action("strings_del")->setEnabled(false);
+ actionCollection()->action("strings_empty")->setEnabled(false);
+ actionCollection()->action("strings_edit")->setEnabled(false);
+ actionCollection()->action("strings_save")->setEnabled(false);
+ actionCollection()->action("strings_load")->setEnabled(false);
+ actionCollection()->action("strings_invert")->setEnabled(false);
+ actionCollection()->action("strings_invert_all")->setEnabled(false);
+ actionCollection()->action("options_recursive")->setEnabled(false);
+ actionCollection()->action("options_backup")->setEnabled(false);
+ actionCollection()->action("options_case")->setEnabled(false);
+ actionCollection()->action("options_var")->setEnabled(false);
+ actionCollection()->action("options_regularexpressions")->setEnabled(false);
+ actionCollection()->action("configure_kfilereplace")->setEnabled(false);
+ actionCollection()->action("results_infos")->setEnabled(false);
+ actionCollection()->action("results_openfile")->setEnabled(false);
+ if (actionCollection()->action("results_editfile"))
+ actionCollection()->action("results_editfile")->setEnabled(false);
+ actionCollection()->action("results_opendir")->setEnabled(false);
+ actionCollection()->action("results_delete")->setEnabled(false);
+ actionCollection()->action("results_treeexpand")->setEnabled(false);
+ actionCollection()->action("results_treereduce")->setEnabled(false);
+ ((KToggleAction* ) actionCollection()->action("options_recursive"))->setChecked(false);
+ ((KToggleAction* ) actionCollection()->action("options_backup"))->setChecked(false);
+ ((KToggleAction* ) actionCollection()->action("options_case"))->setChecked(false);
+ ((KToggleAction* ) actionCollection()->action("options_var"))->setChecked(false);
+ ((KToggleAction* ) actionCollection()->action("options_regularexpressions"))->setChecked(false);
+}
+
+void KFileReplacePart::loadOptionsFromRC()
+{
+ m_option = new RCOptions();
+
+ loadOptions();
+ loadFileSizeOptions();
+ loadDateAccessOptions();
+ loadOwnerOptions();
+ loadLocationsList();
+ loadFiltersList();
+ loadBackupExtensionOptions();
+}
+
+void KFileReplacePart::loadOptions()
+{
+ m_config->setGroup("General Options");
+
+ m_option->m_recentStringFileList = m_config->readListEntry(rcRecentFiles);
+
+ m_option->m_searchingOnlyMode = m_config->readBoolEntry(rcSearchMode,SearchModeOption);
+
+ m_config->setGroup("Options");
+
+ m_option->m_encoding = m_config->readEntry(rcEncoding, EncodingOption);
+ m_option->m_recursive = m_config->readBoolEntry(rcRecursive, RecursiveOption);
+
+ m_option->m_caseSensitive = m_config->readBoolEntry(rcCaseSensitive, CaseSensitiveOption);
+ m_option->m_variables = m_config->readBoolEntry(rcVariables, VariablesOption);
+ m_option->m_regularExpressions = m_config->readBoolEntry(rcRegularExpressions, RegularExpressionsOption);
+ m_option->m_followSymLinks = m_config->readBoolEntry(rcFollowSymLinks, FollowSymbolicLinksOption);
+
+ m_option->m_haltOnFirstOccur = m_config->readBoolEntry(rcHaltOnFirstOccur, StopWhenFirstOccurenceOption);
+
+ m_option->m_ignoreHidden = m_config->readBoolEntry(rcIgnoreHidden, IgnoreHiddenOption);
+ m_option->m_ignoreFiles = m_config->readBoolEntry(rcIgnoreFiles, IgnoreFilesOption);
+
+ m_config->setGroup("Notification Messages");
+
+ m_option->m_notifyOnErrors = m_config->readBoolEntry(rcNotifyOnErrors, true);
+
+ m_option->m_askConfirmReplace = m_config->readBoolEntry(rcAskConfirmReplace, AskConfirmReplaceOption);
+
+ QString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no");
+
+ if(dontAskAgain == "yes")
+ m_option->m_askConfirmReplace = false;
+}
+
+void KFileReplacePart::loadFileSizeOptions()
+{
+ m_config->setGroup("Size options");
+
+ m_option->m_minSize = m_config->readNumEntry(rcMinFileSize, FileSizeOption);
+ m_option->m_maxSize = m_config->readNumEntry(rcMaxFileSize, FileSizeOption);
+}
+
+void KFileReplacePart::loadDateAccessOptions()
+{
+ m_config->setGroup("Access options");
+
+ m_option->m_dateAccess = m_config->readEntry(rcValidAccessDate, ValidAccessDateOption);
+ m_option->m_minDate = m_config->readEntry(rcMinDate, AccessDateOption);
+ m_option->m_maxDate = m_config->readEntry(rcMaxDate, AccessDateOption);
+}
+
+void KFileReplacePart::loadOwnerOptions()
+{
+ m_config->setGroup("Owner options");
+
+ QStringList ownerList = QStringList::split(',',m_config->readEntry(rcOwnerUser, OwnerOption),true);
+ if(ownerList[0] == "true")
+ m_option->m_ownerUserIsChecked = true;
+ else
+ m_option->m_ownerUserIsChecked = false;
+
+ m_option->m_ownerUserType = ownerList[1];
+ m_option->m_ownerUserBool = ownerList[2];
+ m_option->m_ownerUserValue = ownerList[3];
+
+ ownerList = QStringList::split(',',m_config->readEntry(rcOwnerGroup, OwnerOption),true);
+
+ if(ownerList[0] == "true")
+ m_option->m_ownerGroupIsChecked = true;
+ else
+ m_option->m_ownerGroupIsChecked = false;
+
+ m_option->m_ownerGroupType = ownerList[1];
+ m_option->m_ownerGroupBool = ownerList[2];
+ m_option->m_ownerGroupValue = ownerList[3];
+}
+
+void KFileReplacePart::loadLocationsList()
+{
+ m_config->setGroup("Directories");
+ QStringList locationsEntryList;
+ #if KDE_IS_VERSION(3,1,3)
+ locationsEntryList = m_config->readPathListEntry(rcDirectoriesList);
+ #else
+ locationsEntryList = m_config->readListEntry(rcDirectoriesList);
+ #endif
+
+ if(locationsEntryList.isEmpty())
+ locationsEntryList.append(QDir::current().path());
+
+ m_option->m_directories = locationsEntryList;
+}
+
+void KFileReplacePart::loadFiltersList()
+{
+ QStringList filtersEntryList;
+
+ m_config->setGroup("Filters");
+ #if KDE_IS_VERSION(3,1,3)
+ filtersEntryList = m_config->readPathListEntry(rcFiltersList);
+ #else
+ filtersEntryList = m_config->readListEntry(rcFiltersList);
+ #endif
+
+ if(filtersEntryList.isEmpty())
+ filtersEntryList.append("*.htm;*.html;*.xml;*.xhtml;*.css;*.js;*.php");
+
+ m_option->m_filters = filtersEntryList;
+}
+
+void KFileReplacePart::loadBackupExtensionOptions()
+{
+ m_config->setGroup("Options");
+ QStringList bkList = QStringList::split(',',
+ m_config->readEntry(rcBackupExtension, BackupExtensionOption),
+ true);
+ if(bkList[0] == "true")
+ m_option->m_backup = true;
+ else
+ m_option->m_backup = false;
+
+ m_option->m_backupExtension = bkList[1];
+}
+
+void KFileReplacePart::saveOptionsToRC()
+{
+ saveOptions();
+ saveFileSizeOptions();
+ saveDateAccessOptions();
+ saveOwnerOptions();
+ saveLocationsList();
+ saveFiltersList();
+ saveBackupExtensionOptions();
+}
+
+void KFileReplacePart::saveOptions()
+{
+ m_config->setGroup("General Options");
+
+ m_config->writeEntry(rcRecentFiles, m_option->m_recentStringFileList);
+ m_config->writeEntry(rcSearchMode,m_option->m_searchingOnlyMode);
+
+ m_config->setGroup("Options");
+
+ m_config->writeEntry(rcEncoding, m_option->m_encoding);
+ m_config->writeEntry(rcRecursive, m_option->m_recursive);
+ m_config->writeEntry(rcCaseSensitive, m_option->m_caseSensitive);
+ m_config->writeEntry(rcVariables, m_option->m_variables);
+ m_config->writeEntry(rcRegularExpressions, m_option->m_regularExpressions);
+
+ m_config->writeEntry(rcFollowSymLinks, m_option->m_followSymLinks);
+ m_config->writeEntry(rcHaltOnFirstOccur, m_option->m_haltOnFirstOccur);
+
+ m_config->writeEntry(rcIgnoreHidden, m_option->m_ignoreHidden);
+ m_config->writeEntry(rcIgnoreFiles, m_option->m_ignoreFiles);
+
+ m_config->setGroup("Notification Messages");
+ m_config->writeEntry(rcNotifyOnErrors, m_option->m_notifyOnErrors);
+ if(m_config->readEntry(rcDontAskAgain,"no") == "yes")
+ m_config->writeEntry(rcAskConfirmReplace, false);
+ else
+ m_config->writeEntry(rcAskConfirmReplace, m_option->m_askConfirmReplace);
+
+ m_config->sync();
+}
+
+void KFileReplacePart::saveFileSizeOptions()
+{
+ m_config->setGroup("Size options");
+
+ m_config->writeEntry(rcMaxFileSize, m_option->m_maxSize);
+ m_config->writeEntry(rcMinFileSize, m_option->m_minSize);
+
+ m_config->sync();
+}
+
+void KFileReplacePart::saveDateAccessOptions()
+{
+ m_config->setGroup("Access options");
+
+ m_config->writeEntry(rcValidAccessDate, m_option->m_dateAccess);
+ m_config->writeEntry(rcMinDate, m_option->m_minDate);
+ m_config->writeEntry(rcMaxDate, m_option->m_maxDate);
+
+ m_config->sync();
+}
+
+void KFileReplacePart::saveOwnerOptions()
+{
+ m_config->setGroup("Owner options");
+
+ QString list;
+ if(m_option->m_ownerUserIsChecked)
+ list = "true,";
+ else
+ list = "false,";
+
+ list += m_option->m_ownerUserType +
+ "," +
+ m_option->m_ownerUserBool;
+ if(!m_option->m_ownerUserValue.isEmpty())
+ list += "," + m_option->m_ownerUserValue;
+
+ m_config->writeEntry(rcOwnerUser,list);
+
+ if(m_option->m_ownerGroupIsChecked)
+ list = "true,";
+ else
+ list = "false,";
+
+ list += m_option->m_ownerGroupType +
+ "," +
+ m_option->m_ownerGroupBool;
+ if(!m_option->m_ownerGroupValue.isEmpty())
+ list += "," + m_option->m_ownerGroupValue;
+
+ m_config->writeEntry(rcOwnerGroup,list);
+ m_config->sync();
+}
+
+void KFileReplacePart::saveLocationsList()
+{
+ m_config->setGroup("Directories");
+ #if KDE_IS_VERSION(3,1,3)
+ m_config->writePathEntry(rcDirectoriesList, m_option->m_directories);
+ #else
+ m_config->writeEntry(rcDirectoriesList, m_option->m_directories);
+ #endif
+ m_config->sync();
+}
+
+void KFileReplacePart::saveFiltersList()
+{
+ m_config->setGroup("Filters");
+ m_config->writeEntry(rcFiltersList, m_option->m_filters);
+ m_config->sync();
+}
+
+void KFileReplacePart::saveBackupExtensionOptions()
+{
+ m_config->setGroup("Options");
+ QString bkOptions;
+ if(m_option->m_backup)
+ bkOptions = "true," + m_option->m_backupExtension;
+ else
+ bkOptions = "false," + m_option->m_backupExtension;
+
+ m_config->writeEntry(rcBackupExtension, bkOptions);
+ m_config->sync();
+}
+
+void KFileReplacePart::fileReplace()
+{
+ QString directoryName = m_option->m_directories[0];
+ QDir d(directoryName);
+ d.setMatchAllDirs(true);
+ d.setFilter(m_optionMask);
+
+ QString currentFilter = m_option->m_filters[0];
+ QStringList filesList = d.entryList(currentFilter);
+ QStringList::iterator filesIt;
+ int filesNumber = 0;
+
+ m_view->displayScannedFiles(filesNumber);
+
+ for (filesIt = filesList.begin(); filesIt != filesList.end() ; ++filesIt)
+ {
+ QString fileName = (*filesIt);
+
+ // m_stop == true means that we pushed the stop button
+ if(m_stop)
+ break;
+
+ // Avoids files that not match requirements
+ if(!KFileReplaceLib::isAnAccessibleFile(d.canonicalPath(), fileName, m_option))
+ continue;
+ kapp->processEvents();
+ if(m_option->m_backup)
+ replaceAndBackup(d.canonicalPath(), fileName);
+ else
+ replaceAndOverwrite(d.canonicalPath(), fileName);
+
+ filesNumber++;
+ m_view->displayScannedFiles(filesNumber);
+ }
+}
+
+void KFileReplacePart::recursiveFileReplace(const QString& directoryName, int& filesNumber)
+{
+ //if m_stop == true then interrupts recursion
+ if(m_stop)
+ return;
+ else
+ {
+ QDir d(directoryName);
+
+ d.setMatchAllDirs(true);
+ d.setFilter(m_optionMask);
+
+ QString currentFilter = m_option->m_filters[0];
+ QStringList filesList = d.entryList(currentFilter);
+ QStringList::iterator filesIt;
+
+ for(filesIt = filesList.begin(); filesIt != filesList.end(); ++filesIt)
+ {
+ //if m_stop == true then end for-loop
+ if(m_stop)
+ break;
+
+ QString fileName = (*filesIt);
+
+ // Avoids files that not match requirements
+ if(!KFileReplaceLib::isAnAccessibleFile(d.canonicalPath(),fileName, m_option))
+ continue;
+
+ QString filePath = d.canonicalPath()+"/"+fileName;
+
+ QFileInfo qi(filePath);
+
+ m_view->displayScannedFiles(filesNumber);
+
+ //if filePath is a directory then recursion
+ if(qi.isDir())
+ recursiveFileReplace(filePath, filesNumber);
+ else
+ {
+ kapp->processEvents();
+ if(m_option->m_backup)
+ replaceAndBackup(d.canonicalPath(), fileName);
+ else
+ replaceAndOverwrite(d.canonicalPath(), fileName);
+
+ filesNumber++;
+ m_view->displayScannedFiles(filesNumber);
+ }
+ }
+ }
+}
+
+void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString& oldFileName)
+{
+ //Creates a path string
+ QString oldPathString = currentDir+"/"+oldFileName;
+
+ QFile currentFile(oldPathString);
+ if(!currentFile.open(IO_ReadOnly))
+ {
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFileName),QString::null, rcNotifyOnErrors);
+ return ;
+ }
+ QTextStream currentStream(&currentFile);
+ if (m_option->m_encoding == "utf8")
+ currentStream.setEncoding(QTextStream::UnicodeUTF8);
+ else
+ currentStream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
+ QString line = currentStream.read(),
+ backupLine = line;
+
+ QString backupSize = KFileReplaceLib::formatFileSize(currentFile.size());
+
+ currentFile.close();
+
+ QString backupExtension = m_option->m_backupExtension;
+
+ bool atLeastOneStringFound = false;
+ KListViewItem *item = 0;
+ int occurrence = 0;
+
+ replacingLoop(line, &item, atLeastOneStringFound, occurrence, m_option->m_regularExpressions, m_option->m_askConfirmReplace);
+
+ //If we are not performing a simulation creates a backup file
+ if(!m_option->m_simulation)
+ {
+ if(atLeastOneStringFound)
+ {
+ KIO::NetAccess::file_copy(KURL::fromPathOrURL(oldPathString), KURL::fromPathOrURL(oldPathString + backupExtension), -1, true);
+ }
+ }
+
+ if(!m_option->m_simulation)
+ {
+ if(atLeastOneStringFound)
+ {
+ QFile newFile(oldPathString);
+ if(!newFile.open(IO_WriteOnly))
+ {
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(oldFileName),QString::null, rcNotifyOnErrors);
+ return ;
+ }
+ QTextStream newStream(&newFile);
+ if (m_option->m_encoding == "utf8")
+ newStream.setEncoding(QTextStream::UnicodeUTF8);
+ else
+ newStream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
+ newStream << line;
+ newFile.close();
+ }
+ }
+
+ if(!m_option->m_ignoreFiles)
+ atLeastOneStringFound = true;
+
+ QFileInfo oldFileInfo(oldPathString);
+
+ if(atLeastOneStringFound && item/* && atLeastOneStringConfirmed*/)
+ {
+ KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName);
+ item->setText(0,oldFileName);
+ item->setText(1,currentDir);
+ QString newSize = KFileReplaceLib::formatFileSize(oldFileInfo.size());
+ if(!m_option->m_simulation)
+ {
+ item->setText(2, backupSize);
+ item->setText(3, newSize);
+ }
+ else
+ {
+ item->setText(2, backupSize);
+ item->setText(3, "-");
+ }
+
+ item->setText(4,QString::number(occurrence,10));
+ item->setText(5,QString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId()));
+ item->setText(6,QString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId()));
+ }
+}
+
+void KFileReplacePart::replaceAndOverwrite(const QString& currentDir, const QString& oldFileName)
+{
+ QString oldPathString = currentDir+"/"+oldFileName;
+ QFile oldFile(oldPathString);
+ QFileInfo oldFileInfo(oldPathString);
+
+ if (!oldFile.open(IO_ReadOnly))
+ {
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFile.name()),QString::null, rcNotifyOnErrors);
+ return ;
+ }
+
+ QString fileSizeBeforeReplacing = KFileReplaceLib::formatFileSize(oldFileInfo.size());
+ KListViewItem *item = 0;
+
+ QTextStream oldStream( &oldFile );
+ if (m_option->m_encoding == "utf8")
+ oldStream.setEncoding(QTextStream::UnicodeUTF8);
+ else
+ oldStream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
+ QString line = oldStream.read();
+
+ oldFile.close();
+
+ bool atLeastOneStringFound = false;
+ int occurrence = 0;
+
+ replacingLoop(line, &item, atLeastOneStringFound, occurrence, m_option->m_regularExpressions, m_option->m_askConfirmReplace);
+
+
+ if(!m_option->m_simulation)
+ {
+ if(atLeastOneStringFound)
+ {
+ QFile newFile(oldPathString);
+ if(!newFile.open(IO_WriteOnly))
+ {
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(newFile.name()),QString::null, rcNotifyOnErrors);
+ return ;
+ }
+ QTextStream newStream( &newFile );
+ if (m_option->m_encoding == "utf8")
+ newStream.setEncoding(QTextStream::UnicodeUTF8);
+ else
+ newStream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
+ newStream << line;
+ newFile.close();
+ }
+ }
+
+ QFileInfo nf(oldPathString);
+ QString fileSizeAfterReplacing = KFileReplaceLib::formatFileSize(nf.size());
+
+ //if ignoreFiles == false then every files must be show
+ if(!m_option->m_ignoreFiles)
+ atLeastOneStringFound = true;
+
+ if(atLeastOneStringFound && item/*&& atLeastOneStringConfirmed*/)
+ {
+ KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName);
+ item->setText(0,oldFileName);
+ item->setText(1,currentDir);
+ item->setText(2,fileSizeBeforeReplacing);
+ if(!m_option->m_simulation)
+ item->setText(3,fileSizeAfterReplacing);
+ else
+ item->setText(3,"-");
+
+ item->setText(4,QString::number(occurrence,10));
+ item->setText(5,QString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId()));
+ item->setText(6,QString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId()));
+ }
+}
+
+void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace)
+{
+ KeyValueMap tempMap = m_replacementMap;
+ KeyValueMap::Iterator it;
+ KListView* rv = m_view->getResultsView();
+
+ for(it = tempMap.begin(); it != tempMap.end(); ++it)
+ {
+ if(m_stop)
+ break;
+
+ ResultViewEntry entry(it.key(), it.data(), regularExpression, m_option->m_caseSensitive);
+ while(entry.pos(line) != -1)
+ {
+ if(m_stop)
+ break;
+
+ if(askConfirmReplace)
+ {
+ int answer = KMessageBox::questionYesNo(0,
+ i18n("<qt>Do you want to replace the string <b>%1</b> with the string <b>%2</b>?</qt>").arg(it.key()).arg(it.data()),
+ i18n("Confirm Replace"),
+ i18n("Replace"),
+ i18n("Do Not Replace"),
+ rcDontAskAgain);
+ if(answer == KMessageBox::Yes)
+ {
+ atLeastOneStringFound = true;
+ QString msg = entry.message(entry.capturedText(line),
+ entry.lineNumber(line),
+ entry.columnNumber(line));
+
+ if(!*item)
+ *item = new KListViewItem(rv);
+ KListViewItem* tempItem = new KListViewItem(*item);
+ tempItem->setMultiLinesEnabled(true);
+ tempItem->setText(0,msg);
+ occur ++;
+ entry.updateLine(line);
+ entry.incPos();
+ }
+ else
+ {
+ entry.incPos();
+ }
+ if(dontAskAgain()) askConfirmReplace = false;
+ }
+ else
+ {
+ atLeastOneStringFound = true;
+ QString msg = entry.message(entry.capturedText(line),
+ entry.lineNumber(line),
+ entry.columnNumber(line));
+
+ if(!*item)
+ *item = new KListViewItem(rv);
+ KListViewItem* tempItem = new KListViewItem(*item);
+ tempItem->setMultiLinesEnabled(true);
+ tempItem->setText(0,msg);
+ occur ++;
+ entry.updateLine(line);
+ entry.incPos();
+ }
+
+ }
+ }
+}
+
+void KFileReplacePart::fileSearch(const QString& directoryName, const QString& filters)
+{
+ QDir d(directoryName);
+
+ d.setMatchAllDirs(true);
+ d.setFilter(m_optionMask);
+
+ QStringList filesList = d.entryList(filters);
+ QString filePath = d.canonicalPath();
+ QStringList::iterator filesIt;
+ uint filesNumber = 0;
+
+ m_view->displayScannedFiles(filesNumber);
+
+ for (filesIt = filesList.begin(); filesIt != filesList.end() ; ++filesIt)
+ {
+ // We pushed stop button
+ if(m_stop)
+ break;
+
+ QString fileName = (*filesIt);
+
+ // Avoids files that not match
+ if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option))
+ continue;
+
+ QFileInfo fileInfo(filePath+"/"+fileName);
+ if(fileInfo.isDir())
+ continue;
+ kapp->processEvents();
+ search(filePath, fileName);
+ filesNumber++;
+ m_view->displayScannedFiles(filesNumber);
+ }
+}
+
+void KFileReplacePart::recursiveFileSearch(const QString& directoryName, const QString& filters, uint& filesNumber)
+{
+ // if m_stop == true then interrupt recursion
+ if(m_stop)
+ return;
+ else
+ {
+ QDir d(directoryName);
+
+ d.setMatchAllDirs(true);
+ d.setFilter(m_optionMask);
+
+ QStringList filesList = d.entryList(filters);
+ QString filePath = d.canonicalPath();
+ QStringList::iterator filesIt;
+
+ for(filesIt = filesList.begin(); filesIt != filesList.end(); ++filesIt)
+ {
+ // stop polling
+ if(m_stop)
+ break;
+
+ QString fileName = (*filesIt);
+ // Avoids files that not match
+ if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option))
+ continue;
+
+ // Composes file path string
+ QFileInfo fileInfo(filePath+"/"+fileName);
+
+ m_view->displayScannedFiles(filesNumber);
+
+ // Searchs recursively if "filePath" is a directory
+ if(fileInfo.isDir())
+ recursiveFileSearch(filePath+"/"+fileName, filters, filesNumber);
+ else
+ {
+ kapp->processEvents();
+ search(filePath, fileName);
+ filesNumber++;
+ m_view->displayScannedFiles(filesNumber);
+ }
+ }
+ }
+}
+
+void KFileReplacePart::search(const QString& currentDir, const QString& fileName)
+{
+ QFile file(currentDir+"/"+fileName);
+
+ if(!file.open(IO_ReadOnly))
+ {
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(fileName), QString::null, rcNotifyOnErrors);
+ return ;
+ }
+ // Creates a stream with the file
+ QTextStream stream( &file );
+ if (m_option->m_encoding == "utf8")
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ else
+ stream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
+ QString line = stream.read();
+ file.close();
+
+ QFileInfo fileInfo(currentDir+"/"+fileName);
+
+ KListViewItem *item = 0;
+
+ //Counts occurrences
+ int occurrence = 0;
+
+ //This map contains strings to search
+ KeyValueMap tempMap = m_replacementMap;
+ //If no strings has been found, then no lines will be added to the result view
+ bool atLeastOneStringFound = false;
+
+ KeyValueMap::Iterator it = tempMap.begin();
+
+ KListView* rv = m_view->getResultsView();
+
+ while(it != tempMap.end())
+ {
+ //stop polling
+ if(m_stop)
+ break;
+
+ QString key = it.key();
+ QString strKey;
+ QRegExp rxKey;
+
+ if(m_option->m_regularExpressions)
+ rxKey = QRegExp("("+key+")", m_option->m_caseSensitive, false);
+ else
+ strKey = key;
+ /* If this option is true then for any string in
+ * the map we search for the first match*/
+ if(m_option->m_haltOnFirstOccur)
+ {
+ int pos;
+
+ if(m_option->m_regularExpressions)
+ pos = line.find(rxKey);
+ else
+ pos = line.find(strKey, 0 ,m_option->m_caseSensitive);
+
+ if(pos != -1)
+ {
+ atLeastOneStringFound = true;
+ int lineNumber = line.mid(0,pos).contains('\n')+1;
+ int columnNumber = pos - line.findRev('\n',pos);
+
+ if (!item)
+ item = new KListViewItem(rv);
+
+ KListViewItem* tempItem= new KListViewItem(item);
+ QString msg,
+ capturedText;
+
+ if(m_option->m_regularExpressions)
+ capturedText = rxKey.cap(1);
+ else
+ capturedText = line.mid(pos,strKey.length());
+
+ msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(QString::number(lineNumber,10)).arg(QString::number(columnNumber,10));
+ tempItem->setMultiLinesEnabled(true);
+ tempItem->setText(0,msg);
+ occurrence = 1;
+ }
+ }// ends m_option->m_haltOnFirstOccur if-block
+ else
+ {
+ /* This point of the code is reached when we must search for all
+ * occurrences of all the strings*/
+
+ int pos = 0;
+ if(m_option->m_regularExpressions)
+ pos = rxKey.search(line,pos);
+ else
+ pos = line.find(strKey, pos ,m_option->m_caseSensitive);
+
+ while(pos != -1)
+ {
+ //stop polling
+ if(m_stop)
+ break;
+
+ atLeastOneStringFound = true;
+ QString msg,
+ capturedText;
+ int lineNumber = line.mid(0,pos).contains('\n')+1;
+ int columnNumber = pos - line.findRev('\n',pos);
+
+ if(m_option->m_regularExpressions)
+ {
+ capturedText = rxKey.cap(1);
+ pos = rxKey.search(line, pos+rxKey.matchedLength());
+ }
+ else
+ {
+ capturedText = line.mid(pos,strKey.length());
+ pos = line.find(strKey,pos+strKey.length());
+ }
+
+ msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(QString::number(lineNumber,10)).arg(QString::number(columnNumber,10));
+
+ if(!item)
+ item = new KListViewItem(rv);
+ KListViewItem* tempItem = new KListViewItem(item);
+ tempItem->setMultiLinesEnabled(true);
+ tempItem->setText(0,msg);
+ occurrence++;
+ //we push stop button
+ if(m_stop)
+ break;
+ }
+ }
+ //Advances of one position in the strings map
+ ++it;
+
+ //we push stop button
+ if(m_stop)
+ break;
+ }
+
+ //if ignoreFiles == false then every files must be show
+ if(!m_option->m_ignoreFiles)
+ atLeastOneStringFound = true;
+
+ if(atLeastOneStringFound && item)
+ {
+ KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+fileName);
+ item->setText(0,fileName);
+ item->setText(1,currentDir);
+ item->setText(2,KFileReplaceLib::formatFileSize(fileInfo.size()));
+ item->setText(3,QString::number(occurrence,10));
+ item->setText(4,QString("%1[%2]").arg(fileInfo.owner()).arg(fileInfo.ownerId()));
+ item->setText(5,QString("%1[%2]").arg(fileInfo.group()).arg(fileInfo.groupId()));
+ }
+}
+
+void KFileReplacePart::loadViewContent()
+{
+ /* Maps the content of the strings view to a QMap */
+ KeyValueMap tempMap;
+ CommandEngine command;
+
+ QListViewItemIterator itlv(m_view->getStringsView());
+ while(itlv.current())
+ {
+ QListViewItem *item = itlv.current();
+ if(m_option->m_variables)
+ tempMap[item->text(0)] = command.variableValue(item->text(1));
+ else
+ tempMap[item->text(0)] = item->text(1);
+ ++itlv;
+ }
+ m_replacementMap = tempMap;
+}
+
+void KFileReplacePart::loadRulesFile(const QString& fileName)
+{
+ /* Loads a file with kfr extension.
+ * creates a xml document and browses it*/
+ QDomDocument doc("mydocument");
+ QFile file(fileName);
+ KListView* sv = m_view->getStringsView();
+
+ if(!file.open(IO_ReadOnly))
+ {
+ KMessageBox::error(m_w, i18n("<qt>Cannot open the file <b>%1</b> and load the string list.</qt>").arg(fileName));
+ return ;
+ }
+
+ if(!doc.setContent(&file))
+ {
+ file.close();
+
+ KMessageBox::information(m_w, i18n("<qt>File <b>%1</b> seems not to be written in new kfr format. Remember that the old kfr format will be soon abandoned. You can convert your old rules files by simply saving them with kfilereplace.</qt>").arg(fileName),i18n("Warning"));
+
+ KFileReplaceLib::convertOldToNewKFRFormat(fileName, sv);
+
+ return;
+ }
+ else
+ file.close();
+
+ //clears view
+ sv->clear();
+
+ QDomElement docElem = doc.documentElement();
+ QDomNode n = docElem.firstChild();
+ QString searchAttribute = n.toElement().attribute("search").latin1();
+
+ KeyValueMap docMap;
+
+ if(searchAttribute.isNull() || searchAttribute.isEmpty())
+ {
+ int answer = KMessageBox::warningYesNo(m_w, i18n("<qt>The format of kfr files has been changed; attempting to load <b>%1</b>. Please see the KFilereplace manual for details. Do you want to load a search-and-replace list of strings?</qt>").arg(fileName),i18n("Warning"),i18n("Load"),i18n("Do Not Load"));
+
+ if(answer == KMessageBox::Yes)
+ searchAttribute = "false";
+ else
+ searchAttribute = "true";
+ }
+ //Verifies the search mode
+ if(searchAttribute == "true")
+ m_option->m_searchingOnlyMode = true;
+ else
+ m_option->m_searchingOnlyMode = false;
+
+ //Refreshes the view appearances
+ m_view->changeView(m_option->m_searchingOnlyMode);
+ //Goes to next tag
+ n = n.nextSibling();
+ //Reads the string list
+ while(!n.isNull())
+ {
+ QDomElement e = n.toElement(); // tries to convert the node to an element.
+ if(!e.isNull())
+ {
+ QString oldString = e.firstChild().toElement().text(),
+ newString = e.lastChild().toElement().text();
+ docMap[oldString] = newString;
+ }
+ n = n.nextSibling();
+ }
+
+ // Adds file to "load strings form file" menu
+ QStringList fileList = m_option->m_recentStringFileList;
+ if(!fileList.contains(fileName))
+ {
+ fileList.append(fileName);
+ ((KRecentFilesAction* ) actionCollection()->action("strings_load_recent"))->setItems(fileList);
+ m_option->m_recentStringFileList = fileList;
+ }
+
+ m_view->changeView(m_option->m_searchingOnlyMode);
+
+ m_view->loadMap(docMap);
+
+ //resetActions();
+}
+
+bool KFileReplacePart::launchNewProjectDialog(const KURL & startURL)
+{
+ if(!startURL.isEmpty())
+ m_option->m_directories.prepend(startURL.path());
+
+ /* This dlg reads options from m_option, then execs, finally returns options.*/
+ KNewProjectDlg dlg(m_option);
+
+ if(!dlg.exec())
+ return false;
+
+ dlg.saveRCOptions();
+
+ m_config->sync();
+
+ slotQuickStringsAdd();
+
+ m_view->updateOptions(m_option);
+
+ resetActions();
+
+ return true;
+}
+
+void KFileReplacePart::setOptionMask()
+{
+ m_optionMask |= QDir::Dirs;
+
+ if(!m_option->m_ignoreHidden)
+ m_optionMask |= QDir::Hidden;
+
+ if(!m_option->m_followSymLinks)
+ m_optionMask |= QDir::NoSymLinks;
+}
+
+bool KFileReplacePart::checkBeforeOperation()
+{
+ loadViewContent();
+ KListView* sv = m_view->getStringsView();
+
+ // Checks if there are strings to replace (not need in search operation)
+ if (sv->childCount() == 0)
+ {
+ KMessageBox::error(m_w, i18n("There are no strings to search and replace."));
+ return false;
+ }
+
+ // Checks if the main directory can be accessed
+ QString currentDirectory = m_option->m_directories[0];
+ QDir dir;
+
+ dir.setPath(currentDirectory);
+ QString directory = dir.absPath();
+
+ if(!dir.exists())
+ {
+ KMessageBox::error(m_w, i18n("<qt>The main folder of the project <b>%1</b> does not exist.</qt>").arg(directory));
+ return false;
+ }
+
+ QFileInfo dirInfo(directory);
+ if(!(dirInfo.isReadable() && dirInfo.isExecutable())
+ || (!m_option->m_searchingOnlyMode && !m_option->m_simulation && !(dirInfo.isWritable())))
+ {
+ KMessageBox::error(m_w, i18n("<qt>Access denied in the main folder of the project:<br><b>%1</b></qt>").arg(directory));
+ return false;
+ }
+
+ // Clears the list view
+ m_view->getResultsView()->clear();
+
+ return true;
+}
+
+bool KFileReplacePart::dontAskAgain()
+{
+ m_config->setGroup("Notification Messages");
+ QString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no");
+ if(dontAskAgain == "yes")
+ return true;
+ else
+ return false;
+}
+
+void KFileReplacePart::whatsThis()
+{
+ actionCollection()->action("options_backup")->setWhatsThis(optionsBackupWhatthis);
+ actionCollection()->action("options_case")->setWhatsThis(optionsCaseWhatthis);
+ actionCollection()->action("options_var")->setWhatsThis(optionsVarWhatthis);
+ actionCollection()->action("options_recursive")->setWhatsThis(optionsRecursiveWhatthis);
+ actionCollection()->action("options_regularexpressions")->setWhatsThis(optionsRegularExpressionsWhatthis);
+}
+
+#include "kfilereplacepart.moc"
diff --git a/kfilereplace/kfilereplacepart.desktop b/kfilereplace/kfilereplacepart.desktop
new file mode 100644
index 00000000..388f6579
--- /dev/null
+++ b/kfilereplace/kfilereplacepart.desktop
@@ -0,0 +1,95 @@
+[Desktop Entry]
+Type=Service
+MimeType=inode/directory
+Icon=kfilereplace.png
+ServiceTypes=KParts/ReadOnlyPart
+X-KDE-Library=libkfilereplacepart
+Comment=A batch search and replace tool
+Comment[bg]=ТърÑене и замÑна във фонов режим
+Comment[ca]=Una eina per a la cerca i substitució per lots
+Comment[cs]=Dávkový nástroj pro hledání a nahrazování
+Comment[da]=Søg- og erstat-gruppekørselsværktøj
+Comment[de]=Ein Werkzeug zum Suchen und Ersetzen im Stapelbetrieb
+Comment[el]= ΕÏγαλείο πολλαπλής αναζήτησης και αντικατάστασης
+Comment[es]=Una herramienta de búsqueda y reemplazo por lotes
+Comment[et]=Otsimise ja asendamise tööriist
+Comment[eu]=Bilaketa eta ordezkapen tresna
+Comment[fa]=ابزار جستجو و جایگزینی دسته‌ای
+Comment[fi]=Batchien etsintä- ja korvaustyökalu
+Comment[fr]=Un outil de recherche et de remplacement de texte en série.
+Comment[gl]=Unha utilidade de busca e reemprazo por lotes
+Comment[hi]=à¤à¤• खोज तथा बदल उपकरण
+Comment[hu]=Sok fájl kezelésére alkalmas kereső- és cserélőprogram
+Comment[is]=Tól til að leita að texta og skipta út
+Comment[it]=Uno strumento per la ricerca e la sostituzione in sequenza
+Comment[ja]=ãƒãƒƒãƒæ¤œç´¢ãŠã‚ˆã³ç½®æ›ãƒ„ール
+Comment[ka]=ჯგუფური ძიების დრჩáƒáƒœáƒáƒªáƒ•áƒšáƒ”ბის ხელსáƒáƒ¬áƒ§áƒ
+Comment[lt]=Paketinis paieškos ir keitimo įrankis
+Comment[ms]=Gugusan alatan cari dan ganti
+Comment[nds]=En Söök- un Utwesselwarktüüch för Stapelbedrief
+Comment[ne]=à¤à¤‰à¤Ÿà¤¾ समूह खोजी गरà¥à¤¨à¥‡ र बदलà¥à¤¨à¥‡ उपकरण
+Comment[nl]=Een gereedschap voor zoeken en vervangen
+Comment[pl]=Narzędzie do wyszukiwania i zamiany
+Comment[pt]=Uma ferramenta de procura e substituição por atacado
+Comment[pt_BR]=Uma ferramenta de substituição e pesquisa batch
+Comment[ru]=Пакетный поиÑк и замена
+Comment[sk]=Dávkovací nástroj pre nájsť a zameniť
+Comment[sl]=Orodje serijskega iskanja in zamenjevanja
+Comment[sr]=Ðлат за пакетну претрагу и замену
+Comment[sr@Latn]=Alat za paketnu pretragu i zamenu
+Comment[sv]=Ett sök- och ersättningsverktyg
+Comment[ta]=தொகà¯à®¤à®¿ தேடல௠மறà¯à®±à¯à®®à¯ கரà¯à®µà®¿ இடமாறà¯à®±à®²à¯
+Comment[tg]=ҶуÑтуҷӯи пакет ва ивази аÑбоб
+Comment[tr]=Bir toplu arama ve değiştirme aracı
+Comment[uk]=ЗаÑіб пакетного пошуку та заміни
+Comment[zh_CN]=批é‡æœç´¢æ›¿æ¢å·¥å…·
+Comment[zh_HK]=批次æœå°‹åŠå–代工具
+Comment[zh_TW]=批次æœå°‹åŠå–代工具
+Name=KFileReplace
+Name[hi]=के-फ़ाइल-रिपà¥à¤²à¥‡à¤¸
+Name[ne]=बदलà¥à¤¨à¥‡ केडीई फाइल
+Name[pa]=ਕੇ-ਫਾਇਲ-ਬਦਲੋ
+Name[sk]=KFile zameniť
+Name[sv]=Kfilereplace
+Name[ta]=Kகோபà¯à®ªà¯ இடமாறà¯à®±à¯
+Name[tg]=KФайлро ҷойгузор кардан
+Name[tr]=K Dosya DeÄŸiÅŸtirme
+GenericName=File Replace View
+GenericName[bg]=Преглед на файловете за замÑна
+GenericName[ca]=Vista per a substituir fitxers
+GenericName[cs]=Nahrazení souborů
+GenericName[da]=Filerstatningsvisning
+GenericName[de]=KFileReplace
+GenericName[el]=ΠÏοβολή αντικατάστασης αÏχείου
+GenericName[es]=Vista de reemplazo de archivo
+GenericName[et]=Failide asendamise vaade
+GenericName[eu]=Fitxategi ordezkapen ikuspegia
+GenericName[fa]=نمای جایگزینی پرونده
+GenericName[fi]=Tiedoston korvausnäyttö
+GenericName[fr]=Remplacement de fichiers
+GenericName[gl]=Vista de reemprazo de ficheiro
+GenericName[hu]=Fájlcserélő nézet
+GenericName[is]=Texta útskiptingarsýn
+GenericName[it]=Vista di sostituzione file
+GenericName[ja]=ファイル置æ›ãƒ“ュー
+GenericName[ka]=ფáƒáƒ˜áƒšáƒ˜áƒ¡ ჩáƒáƒœáƒáƒªáƒ•áƒšáƒ”ბის ხედი
+GenericName[lt]=Keitimų bylose vaizdas
+GenericName[ms]=Paparan Ganti Fail
+GenericName[nds]=Datei-Utwesselansicht
+GenericName[ne]=फाइल बदलà¥à¤¨à¥‡ दृशà¥à¤¯
+GenericName[nl]=Weergave van bestanden vervangen
+GenericName[pa]=ਫਾਇਲ ਤਬਦੀਲ à¨à¨²à¨•
+GenericName[pl]=Widok zamiany w plikach
+GenericName[pt]=Vista de Substituição de Ficheiros
+GenericName[pt_BR]=Visão de Substituição de Arquivos
+GenericName[ru]=СредÑтво поиÑка и замены в файлах
+GenericName[sk]=Pohľad zámeny súboru
+GenericName[sl]=Prikaz zamenjave datotek
+GenericName[sr]=Приказ замена у фајловима
+GenericName[sr@Latn]=Prikaz zamena u fajlovima
+GenericName[sv]=Filersättningsvy
+GenericName[ta]=கோபà¯à®ªà¯ இடமாறà¯à®±à¯ காடà¯à®šà®¿
+GenericName[uk]=ПереглÑд заміни в файлах
+GenericName[zh_CN]=文件替æ¢è§†å›¾
+GenericName[zh_HK]=檔案å–代檢視模å¼
+GenericName[zh_TW]=檔案å–代檢視
diff --git a/kfilereplace/kfilereplacepart.h b/kfilereplace/kfilereplacepart.h
new file mode 100644
index 00000000..1c133cb5
--- /dev/null
+++ b/kfilereplace/kfilereplacepart.h
@@ -0,0 +1,159 @@
+//
+//
+// C++ Interface: kfilereplacepart
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kde.org>, (C) 2003
+// Maintainer: Emiliano Gulmini <emi_barbarossa@yahoo.it>, (C) 2004
+//
+// Copyright: GPL v2. See COPYING file that comes with this distribution
+//
+//
+
+#ifndef KFILEREPLACEPART_H
+#define KFILEREPLACEPART_H
+
+// QT
+
+// KDE
+#include <kparts/part.h>
+class KAboutApplication;
+class KAboutData;
+class KConfig;
+
+// local
+#include "configurationclasses.h"
+class KFileReplaceView;
+
+#define KFR_VERSION "0.8.1"
+
+class KFileReplacePart: public KParts::ReadOnlyPart
+{
+ Q_OBJECT
+
+ private: //MEMBERS
+ KFileReplaceView* m_view;
+ QWidget* m_parentWidget,
+ * m_w;
+ KConfig* m_config;
+ KAboutApplication* m_aboutDlg;
+ KeyValueMap m_replacementMap;
+ RCOptions* m_option;
+ bool m_stop,
+ m_searchingOperation;
+ int m_optionMask;
+
+ public://Constructors
+ KFileReplacePart(QWidget *parentWidget,
+ const char *widgetName,
+ QObject *parent,
+ const char *name,
+ const QStringList &args);
+ ~KFileReplacePart();
+
+ //SLOTS
+ private slots:
+ void slotSetNewParameters();
+ void slotSearchingOperation();
+ void slotReplacingOperation();
+ void slotSimulatingOperation();
+ void slotStop();
+ void slotCreateReport();
+ void slotStringsAdd();
+ void slotQuickStringsAdd();
+ void slotStringsDeleteItem();
+ void slotStringsEmpty();
+ void slotStringsEdit();
+ void slotStringsSave();
+ void slotStringsLoad();
+ void slotStringsInvertCur();
+ void slotStringsInvertAll();
+ void slotOpenRecentStringFile(const KURL& urlFile);
+ void slotOptionRecursive();
+ void slotOptionBackup();
+ void slotOptionCaseSensitive();
+ void slotOptionVariables();
+ void slotOptionRegularExpressions();
+ void slotOptionPreferences();
+ void showAboutApplication(void);
+ void appHelpActivated();
+ void reportBug();
+ void resetActions();
+ void slotSearchMode(bool b){ m_option->m_searchingOnlyMode = b; }
+
+ //METHODS
+ public:
+ static KAboutData* createAboutData();
+ KConfig *config(){ return m_config; }
+
+ protected:
+ virtual bool openFile() { return false; }
+ virtual bool openURL (const KURL &url);
+
+ private:
+ /**
+ * Initialization methods
+ */
+ void initGUI();
+ void initView();
+
+ /**
+ * This method freezes the GUI of kfilereplace during searching
+ */
+ void freezeActions();
+
+ /**
+ * These methods load the resources from kfilereplacerc
+ */
+ void loadOptionsFromRC();
+ void loadOptions();
+ void loadFileSizeOptions();
+ void loadDateAccessOptions();
+ void loadOwnerOptions();
+ void loadLocationsList();
+ void loadFiltersList();
+ void loadBackupExtensionOptions();
+
+ /**
+ * These methods save the resources to kfilereplacerc
+ */
+ void saveOptionsToRC();
+ void saveOptions();
+ void saveFileSizeOptions();
+ void saveDateAccessOptions();
+ void saveOwnerOptions();
+ void saveLocationsList();
+ void saveFiltersList();
+ void saveBackupExtensionOptions();
+
+ /**
+ * Replacing methods
+ */
+ void fileReplace();
+ void recursiveFileReplace(const QString& dirName, int& filesNumber);
+ void replaceAndBackup(const QString& currentDir, const QString& oldFileName);
+ void replaceAndOverwrite(const QString& currentDir, const QString& oldFileName);
+ void replacingLoop(QString& line, KListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace);
+
+ /**
+ * Searching methods
+ */
+ void fileSearch(const QString& dirName, const QString& filters);
+ void recursiveFileSearch(const QString& dirName, const QString& filters, uint& filesNumber);
+ void search(const QString& currentDir, const QString& fileName);
+
+ /**
+ * Others methods
+ */
+ void loadViewContent();
+ void loadRulesFile(const QString& fileName);
+ bool launchNewProjectDialog(const KURL& startURL);
+ void setOptionMask();
+ bool checkBeforeOperation();
+ bool dontAskAgain();
+ void whatsThis();
+};
+
+#endif// KFileReplacePart
diff --git a/kfilereplace/kfilereplacepartui.rc b/kfilereplace/kfilereplacepartui.rc
new file mode 100644
index 00000000..66946878
--- /dev/null
+++ b/kfilereplace/kfilereplacepartui.rc
@@ -0,0 +1,75 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="kfilereplace" version="6">
+<MenuBar>
+ <Menu name="kfilerepace"><text>Search/&amp;Replace</text>
+ <Action name="new_project"/>
+ <Action name="search"/>
+ <Action name="file_simulate"/>
+ <Action name="replace"/>
+ <Action name="stop"/>
+ <Separator/>
+ <Menu name="strings"><text>&amp;Strings</text>
+ <Action name="strings_add"/>
+ <Action name="strings_del"/>
+ <Action name="strings_empty"/>
+ <Action name="strings_edit"/>
+ <Separator/>
+ <Action name="strings_save"/>
+ <Action name="strings_load"/>
+ <Action name="strings_load_recent"/>
+ <Separator/>
+ <Action name="strings_invert"/>
+ <Action name="strings_invert_all"/>
+ </Menu>
+ <Menu name="results"><text>&amp;Results</text>
+ <Action name="results_openfile"/>
+ <Action name="results_opendir"/>
+ <Action name="results_editfile"/>
+ <Action name="results_delete"/>
+ <Action name="results_infos"/>
+ <Separator/>
+ <Action name="save_results"/>
+ <Separator/>
+ <Action name="results_treeexpand"/>
+ <Action name="results_treereduce"/>
+ </Menu>
+ <Menu name="options"><text>&amp;Options</text>
+ <Action name="options_recursive"/>
+ <Action name="options_backup"/>
+ <Action name="options_case"/>
+ <Action name="options_var"/>
+ <Action name="options_regularexpressions"/>
+ </Menu>
+ </Menu>
+ <Menu name="settings"><text>&amp;Settings</text>
+ <Action name="configure_kfilereplace"/>
+ </Menu>
+ <Menu name="help"><text>&amp;Help</text>
+ <Separator/>
+ <Action name="help_kfilereplace" />
+ <Action name="report_bug" />
+ <Action name="help_about_kfilereplace" />
+ </Menu>
+</MenuBar>
+<ToolBar noMerge="1" name="mainToolBar">
+<text>KFileReplace Main Toolbar</text>
+ <Action name="new_project" />
+ <Action name="search"/>
+ <Action name="file_simulate"/>
+ <Action name="replace"/>
+ <Action name="stop"/>
+ <Separator/>
+ <Action name="strings_add"/>
+ <Action name="strings_del"/>
+ <Action name="strings_edit"/>
+ <Action name="strings_empty"/>
+ <Action name="strings_invert"/>
+ <Action name="strings_load"/>
+ <Separator/>
+ <Action name="options_recursive"/>
+ <Action name="options_backup"/>
+ <Action name="options_case"/>
+ <Action name="options_var"/>
+ <Action name="options_regularexpressions"/>
+</ToolBar>
+</kpartgui>
diff --git a/kfilereplace/kfilereplaceui.rc b/kfilereplace/kfilereplaceui.rc
new file mode 100644
index 00000000..2f645413
--- /dev/null
+++ b/kfilereplace/kfilereplaceui.rc
@@ -0,0 +1,10 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="kfilereplace" version="1">
+<MenuBar>
+ <Menu noMerge="1" name="file"><text>&amp;File</text>
+ <Action name="file_quit"/>
+ </Menu>
+ <Menu name="kfilerepace"><text>Search/&amp;Replace</text>
+ </Menu>
+</MenuBar>
+</kpartgui>
diff --git a/kfilereplace/kfilereplaceview.cpp b/kfilereplace/kfilereplaceview.cpp
new file mode 100644
index 00000000..16ca82da
--- /dev/null
+++ b/kfilereplace/kfilereplaceview.cpp
@@ -0,0 +1,672 @@
+/*****************************************************************************
+ kfilereplaceview.cpp - description
+ -------------------
+ begin : sam oct 16 15:28:00 CEST 1999
+ copyright : (C) 1999 by Fran�is Dupoux <dupoux@dupoux.com>
+ (C) 2004 Emiliano Gulmini <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. *
+ * *
+ *****************************************************************************/
+
+// Qt
+#include <qwhatsthis.h>
+#include <qmap.h>
+#include <qfileinfo.h>
+
+// KDE
+#include <klistview.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kpopupmenu.h>
+#include <krun.h>
+#include <kpropertiesdialog.h>
+#include <kapplication.h>
+#include <dcopclient.h>
+#include <dcopref.h>
+//#include <kdebug.h>
+#include <kiconloader.h>
+#include <kled.h>
+#include <kfiledialog.h>
+
+// local
+#include "kfilereplaceview.h"
+#include "kfilereplacelib.h"
+#include "kaddstringdlg.h"
+#include "whatthis.h"
+
+using namespace whatthisNameSpace;
+
+KFileReplaceView::KFileReplaceView(RCOptions* info, QWidget *parent,const char *name):KFileReplaceViewWdg(parent,name)
+{
+ m_option = info;
+
+ initGUI();
+
+ // connect events
+ connect(m_lvResults, SIGNAL(mouseButtonClicked(int, QListViewItem *, const QPoint &, int)), this, SLOT(slotMouseButtonClicked(int, QListViewItem *, const QPoint &)));
+ connect(m_lvResults_2, SIGNAL(mouseButtonClicked(int, QListViewItem *, const QPoint &, int)), this, SLOT(slotMouseButtonClicked(int, QListViewItem *, const QPoint &)));
+ connect(m_lvStrings, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(slotStringsEdit()));
+ connect(m_lvStrings_2, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(slotStringsEdit()));
+
+ whatsThis();
+}
+
+QString KFileReplaceView::currentPath()
+{
+ QListViewItem *lvi;
+
+ if(! m_lviCurrent) lvi = m_rv->currentItem();
+ else lvi = (QListViewItem*) m_lviCurrent;
+
+ while (lvi->parent())
+ lvi = lvi->parent();
+
+ return QString(lvi->text(1)+"/"+lvi->text(0));
+}
+
+void KFileReplaceView::showSemaphore(QString s)
+{
+ if(s == "green")
+ {
+ m_ledGo->setState(KLed::On);
+ m_ledWait->setState(KLed::Off);
+ m_ledStop->setState(KLed::Off);
+ }
+ else
+ if(s == "yellow")
+ {
+ m_ledGo->setState(KLed::Off);
+ m_ledWait->setState(KLed::On);
+ m_ledStop->setState(KLed::Off);
+ }
+ else
+ if(s == "red")
+ {
+ m_ledGo->setState(KLed::Off);
+ m_ledWait->setState(KLed::Off);
+ m_ledStop->setState(KLed::On);
+ }
+}
+
+void KFileReplaceView::stringsInvert(bool invertAll)
+{
+ QListViewItem* lviCurItem,
+ * lviFirst;
+ KListView* sv = getStringsView();
+
+ if(invertAll)
+ lviCurItem = lviFirst = sv->firstChild();
+ else
+ lviCurItem = lviFirst = sv->currentItem();
+
+ if(lviCurItem == 0)
+ return ;
+
+ do
+ {
+ QString searchText = lviCurItem->text(0),
+ replaceText = lviCurItem->text(1);
+
+ // Cannot invert the string when search string is empty
+ if (replaceText.isEmpty())
+ {
+ KMessageBox::error(0, i18n("<qt>Cannot invert string <b>%1</b>, because the search string would be empty.</qt>").arg(searchText));
+ return;
+ }
+
+ lviCurItem->setText(0, replaceText);
+ lviCurItem->setText(1, searchText);
+
+ lviCurItem = lviCurItem->nextSibling();
+ if(!invertAll)
+ break;
+ } while(lviCurItem && lviCurItem != lviFirst);
+ setCurrentStringsViewMap();
+}
+
+void KFileReplaceView::changeView(bool searchingOnlyMode)
+{
+ if(searchingOnlyMode)
+ {
+ m_stackResults->raiseWidget(m_lvResults_2);
+ m_stackStrings->raiseWidget(m_lvStrings_2);
+ m_rv = m_lvResults_2;
+ m_sv = m_lvStrings_2;
+ }
+ else
+ {
+ m_stackResults->raiseWidget(m_lvResults);
+ m_stackStrings->raiseWidget(m_lvStrings);
+ m_rv = m_lvResults;
+ m_sv = m_lvStrings;
+ }
+}
+
+KListView* KFileReplaceView::getResultsView()
+{
+ if(m_option->m_searchingOnlyMode)
+ m_rv = m_lvResults_2;
+ else
+ m_rv = m_lvResults;
+
+ return m_rv;
+}
+
+KListView* KFileReplaceView::getStringsView()
+{
+ if(m_option->m_searchingOnlyMode)
+ m_sv = m_lvStrings_2;
+ else
+ m_sv = m_lvStrings;
+ return m_sv;
+}
+
+//PUBLIC SLOTS
+void KFileReplaceView::slotMouseButtonClicked (int button, QListViewItem *lvi, const QPoint &pos)
+{
+ if (lvi == 0) // No item selected
+ return;
+
+ // RIGHT BUTTON
+ if (button == QMouseEvent::RightButton)
+ {
+ m_lviCurrent = static_cast<KListViewItem*>(lvi);
+ m_menuResult->popup(pos);
+ }
+}
+
+void KFileReplaceView::slotResultProperties()
+{
+ QString currItem = currentPath();
+ if(! currItem.isEmpty())
+ {
+ KURL url(currItem);
+ (void) new KPropertiesDialog(url);
+ m_lviCurrent = 0;
+ }
+}
+
+void KFileReplaceView::slotResultOpen()
+{
+ QString currItem = currentPath();
+ if(!currItem.isEmpty())
+ {
+ (void) new KRun(KURL(currItem), 0, true, true);
+ m_lviCurrent = 0;
+ }
+}
+
+void KFileReplaceView::slotResultOpenWith()
+{
+ QString currItem = currentPath();
+ if(!currItem.isEmpty())
+ {
+ KURL::List kurls;
+ kurls.append(KURL(currItem));
+ KRun::displayOpenWithDialog(kurls);
+ m_lviCurrent = 0;
+ }
+}
+
+void KFileReplaceView::slotResultDirOpen()
+{
+ QString currItem = currentPath();
+ if(!currItem.isEmpty())
+ {
+ QFileInfo fi;
+ fi.setFile(currItem);
+ (void) new KRun (KURL::fromPathOrURL(fi.dirPath()), 0, true, true);
+ m_lviCurrent = 0;
+ }
+}
+
+void KFileReplaceView::slotResultEdit()
+{
+ QListViewItem *lvi = m_rv->firstChild();
+
+ while (lvi)
+ {
+ DCOPClient *client = kapp->dcopClient();
+ DCOPRef quanta(client->appId(),"WindowManagerIf");
+ QString path = QString(lvi->text(1)+"/"+lvi->text(0));
+ QListViewItem *lviChild = lvi;
+
+ while(lviChild)
+ {
+ if(lviChild->isSelected())
+ {
+ coord c;
+ if(lviChild == lvi)
+ {
+ c.line = 0;
+ c.column = 0;
+ }
+ else
+ {
+ c= extractWordCoordinates(lviChild);
+ }
+ bool success = quanta.send("openFile", path, c.line, c.column);
+
+ if(!success)
+ {
+ QString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(path);
+ KMessageBox::error(parentWidget(), message);
+ }
+ }
+ if (lviChild == lvi)
+ lviChild = lviChild->firstChild();
+ else
+ lviChild = lviChild->nextSibling();
+ }
+
+ lvi = lvi->nextSibling();
+ }
+
+ m_lviCurrent = 0;
+}
+
+void KFileReplaceView::slotResultDelete()
+{
+ QString currItem = currentPath();
+ if (!currItem.isEmpty())
+ {
+ QFile fi;
+ int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete %1?").arg(currItem),
+ QString::null,KStdGuiItem::del());
+
+ if(answer == KMessageBox::Continue)
+ {
+ fi.setName(currItem);
+ fi.remove();
+
+ delete m_lviCurrent;
+ m_lviCurrent = 0;
+ }
+ }
+}
+
+void KFileReplaceView::slotResultTreeExpand()
+{
+ QListViewItem *lviRoot = getResultsView()->firstChild();
+
+ if(lviRoot)
+ expand(lviRoot, true);
+}
+
+void KFileReplaceView::slotResultTreeReduce()
+{
+ QListViewItem *lviRoot = getResultsView()->firstChild();
+
+ if(lviRoot)
+ expand(lviRoot, false);
+}
+
+void KFileReplaceView::slotStringsAdd()
+{
+ KeyValueMap oldMap(m_option->m_mapStringsView);
+
+ KAddStringDlg addStringDlg(m_option, false);
+
+ if(!addStringDlg.exec())
+ return;
+
+ KeyValueMap addedStringsMap(m_option->m_mapStringsView);
+ KeyValueMap::Iterator itMap;
+
+ for(itMap = oldMap.begin(); itMap != oldMap.end(); ++itMap)
+ addedStringsMap.insert(itMap.key(),itMap.data());
+
+ m_option->m_mapStringsView = addedStringsMap;
+
+ raiseResultsView();
+ raiseStringsView();
+
+ loadMapIntoView(addedStringsMap);
+}
+
+void KFileReplaceView::slotQuickStringsAdd(const QString& quickSearch, const QString& quickReplace)
+{
+ if(!quickSearch.isEmpty())
+ {
+ KeyValueMap map;
+ if(quickReplace.isEmpty())
+ {
+ map[quickSearch] = QString::null;
+ m_option->m_searchingOnlyMode = true;
+ }
+ else
+ {
+ map[quickSearch] = quickReplace;
+ m_option->m_searchingOnlyMode = false;
+ }
+
+ m_option->m_mapStringsView = map;
+
+ raiseResultsView();
+ raiseStringsView();
+
+ loadMapIntoView(map);
+ }
+}
+
+void KFileReplaceView::slotStringsEdit()
+{
+ KeyValueMap oldMap(m_option->m_mapStringsView);
+ if(oldMap.isEmpty()) return;
+ bool oldSearchFlagValue = m_option->m_searchingOnlyMode;
+
+ oldMap.remove(m_sv->currentItem()->text(0));
+
+ m_option->m_mapStringsView.clear();
+
+ m_option->m_mapStringsView.insert(m_sv->currentItem()->text(0), m_sv->currentItem()->text(1));
+
+ KAddStringDlg addStringDlg(m_option, true);
+
+ if(!addStringDlg.exec())
+ return;
+
+ KeyValueMap newMap(m_option->m_mapStringsView);
+ if(oldSearchFlagValue == m_option->m_searchingOnlyMode)
+ {
+ KeyValueMap::Iterator itMap;
+
+ //merges the two maps
+ for(itMap = oldMap.begin(); itMap != oldMap.end(); ++itMap)
+ newMap.insert(itMap.key(),itMap.data());
+ }
+
+ m_option->m_mapStringsView = newMap;
+
+ raiseResultsView();
+ raiseStringsView();
+
+ loadMapIntoView(newMap);
+}
+
+void KFileReplaceView::slotStringsSave()
+{
+ // Check there are strings in the list
+ KListView* sv = getStringsView();
+
+ if (sv->firstChild() == 0)
+ {
+ KMessageBox::error(0, i18n("No strings to save as the list is empty."));
+ return ;
+ }
+
+ QString header("<?xml version=\"1.0\" ?>\n<kfr>"),
+ footer("\n</kfr>"),
+ body;
+ if(m_option->m_searchingOnlyMode)
+ header += "\n\t<mode search=\"true\"/>";
+ else
+ header += "\n\t<mode search=\"false\"/>";
+
+ QListViewItem* lvi = sv->firstChild();
+
+ while( lvi )
+ {
+ body += QString("\n\t<replacement>"
+ "\n\t\t<oldstring><![CDATA[%1]]></oldstring>"
+ "\n\t\t<newstring><![CDATA[%2]]></newstring>"
+ "\n\t</replacement>").arg(lvi->text(0)).arg(lvi->text(1));
+ lvi = lvi->nextSibling();
+ }
+
+ // Selects the file where strings will be saved
+ QString menu = "*.kfr|" + i18n("KFileReplace Strings") + " (*.kfr)\n*|" + i18n("All Files") + " (*)";
+ QString fileName = KFileDialog::getSaveFileName(QString::null, menu, 0, i18n("Save Strings to File"));
+ if (fileName.isEmpty())
+ return;
+
+ // Forces the extension to be "kfr" == KFileReplace extension
+
+ fileName = KFileReplaceLib::addExtension(fileName, "kfr");
+
+ QFile file( fileName );
+ if(!file.open( IO_WriteOnly ))
+ {
+ KMessageBox::error(0, i18n("File %1 cannot be saved.").arg(fileName));
+ return ;
+ }
+ QTextStream oTStream( &file );
+ oTStream.setEncoding(QTextStream::UnicodeUTF8);
+ oTStream << header
+ << body
+ << footer;
+ file.close();
+}
+
+void KFileReplaceView::slotStringsDeleteItem()
+{
+ QListViewItem* item = m_sv->currentItem();
+ if(item != 0)
+ {
+ KeyValueMap m = m_option->m_mapStringsView;
+ m.remove(item->text(0));
+ m_option->m_mapStringsView = m;
+ delete item;
+ }
+}
+
+void KFileReplaceView::slotStringsEmpty()
+{
+ QListViewItem * myChild = m_sv->firstChild();
+ while( myChild )
+ {
+ QListViewItem* item = myChild;
+ myChild = myChild->nextSibling();
+ delete item;
+ }
+ KeyValueMap m;
+ m_option->m_mapStringsView = m;
+}
+
+//PRIVATE
+void KFileReplaceView::initGUI()
+{
+ m_option->m_searchingOnlyMode = true;
+
+ m_stackResults->addWidget(m_lvResults);
+ m_stackResults->addWidget(m_lvResults_2);
+ m_stackStrings->addWidget(m_lvStrings);
+ m_stackStrings->addWidget(m_lvStrings_2);
+
+ DCOPClient *client = kapp->dcopClient();
+ QCStringList appList = client->registeredApplications();
+ bool quantaFound = false;
+
+
+ for(QCStringList::Iterator it = appList.begin(); it != appList.end(); ++it)
+ {
+ if((*it).left(6) == "quanta")
+ {
+ quantaFound = true;
+ break;
+ }
+ }
+
+ m_menuResult = new KPopupMenu(this, "ResultPopup");
+
+
+
+ m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("fileopen")),
+ i18n("&Open"),
+ this,
+ SLOT(slotResultOpen()));
+ if(!quantaFound)
+ {
+ m_menuResult->insertItem(i18n("Open &With..."),
+ this,
+ SLOT(slotResultOpenWith()));
+ }
+
+ if(quantaFound)
+ {
+ m_menuResult->insertItem(SmallIconSet("quanta"),
+ i18n("&Edit in Quanta"),
+ this,
+ SLOT(slotResultEdit()));
+ }
+
+ m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("up")),
+ i18n("Open Parent &Folder"),
+ this,
+ SLOT(slotResultDirOpen()));
+ m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("editdelete")),
+ i18n("&Delete"),
+ this,
+ SLOT(slotResultDelete()));
+ m_menuResult->insertSeparator();
+ m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("info")),
+ i18n("&Properties"),
+ this,
+ SLOT(slotResultProperties()));
+ raiseResultsView();
+ raiseStringsView();
+}
+
+void KFileReplaceView::raiseStringsView()
+{
+ if(m_option->m_searchingOnlyMode)
+ m_sv = m_lvStrings_2;
+ else
+ m_sv = m_lvStrings;
+
+ m_stackStrings->raiseWidget(m_sv);
+}
+
+void KFileReplaceView::raiseResultsView()
+{
+ if(m_option->m_searchingOnlyMode)
+ m_rv = m_lvResults_2;
+ else
+ m_rv = m_lvResults;
+
+ m_stackResults->raiseWidget(m_rv);
+}
+
+coord KFileReplaceView::extractWordCoordinates(QListViewItem* lvi)
+{
+ //get coordinates of the first string of the current selected file
+ coord c;
+ c.line = 0;
+ c.column = 0;
+ QString s = lvi->text(0);
+ //qWarning("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW=%s",s.latin1());
+ /* if(lvi->parent()) s = lvi->text(0);
+ else return c;*/
+
+ QString temp;
+ int i = 0;
+
+ //extracts line and column from lvi->text(0)
+ //FIXME: Don't get the line and column number from the text as it's translated and it will
+ //fail for non-English languages!
+
+ //EMILIANO: This is not a good fixing but for now it should reduce the problems
+ while(true)
+ {
+ if(s[i] < '0' || s[i] > '9')
+ i++;
+ else
+ break;
+ }
+ while(true)
+ {
+ if(s[i] >= '0' && s[i] <= '9')
+ {
+ temp += s[i];
+ i++;
+ }
+ else
+ break;
+ }
+ c.line = temp.toInt();
+ temp = QString::null;
+
+ while(true)
+ {
+ if(s[i] < '0' || s[i] > '9')
+ i++;
+ else
+ break;
+ }
+ while(true)
+ {
+ if(s[i] >= '0' && s[i] <= '9')
+ {
+ temp += s[i];
+ i++;
+ }
+ else
+ break;
+ }
+ c.column = temp.toInt();
+
+ if(c.line > 0) c.line--;
+ if(c.column > 0) c.column--;
+
+ return c;
+}
+
+void KFileReplaceView::expand(QListViewItem *lviCurrent, bool b)
+{
+ // current item
+ lviCurrent->setOpen(b);
+
+ // recursivity
+ while((lviCurrent = lviCurrent->nextSibling()) != 0)
+ {
+ lviCurrent->setOpen(b);
+
+ if (lviCurrent->firstChild())
+ expand(lviCurrent->firstChild(), b);
+ }
+}
+
+void KFileReplaceView::setMap()
+{
+ KeyValueMap map;
+ QListViewItem* i = m_sv->firstChild();
+ while(i != 0)
+ {
+ if(m_option->m_searchingOnlyMode)
+ map[i->text(0)] = QString::null;
+ else
+ map[i->text(0)] = i->text(1);
+ i = i->nextSibling();
+ }
+ m_option->m_mapStringsView = map;
+}
+
+void KFileReplaceView::loadMapIntoView(KeyValueMap map)
+{
+ m_sv->clear();
+ KeyValueMap::Iterator itMap;
+
+ for(itMap = map.begin(); itMap != map.end(); ++itMap)
+ {
+ QListViewItem* lvi = new QListViewItem(m_sv);
+ lvi->setMultiLinesEnabled(true);
+ lvi->setText(0,itMap.key());
+ if(!m_option->m_searchingOnlyMode)
+ lvi->setText(1,itMap.data());
+ }
+
+}
+
+void KFileReplaceView::whatsThis()
+{
+ QWhatsThis::add(getResultsView(), lvResultWhatthis);
+ QWhatsThis::add(getStringsView(), lvStringsWhatthis);
+}
+#include "kfilereplaceview.moc"
diff --git a/kfilereplace/kfilereplaceview.h b/kfilereplace/kfilereplaceview.h
new file mode 100644
index 00000000..21ac6a29
--- /dev/null
+++ b/kfilereplace/kfilereplaceview.h
@@ -0,0 +1,116 @@
+/***************************************************************************
+ kfilereplaceview.h - description
+ -------------------
+ begin : sam oct 16 15:28:00 CEST 1999
+ copyright : (C) 1999 by François Dupoux <dupoux@dupoux.com>
+ (C) 2004 Emiliano Gulmini <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 KFILEREPLACEVIEW_H
+#define KFILEREPLACEVIEW_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+//QT
+#include <qlcdnumber.h>
+#include <qwidgetstack.h>
+class QPixMap;
+
+//KDE
+class KPopupMenu;
+class KListView;
+
+//local
+#include "kfilereplaceviewwdg.h"
+#include "configurationclasses.h"
+
+class coord
+{
+ public:
+ int line,
+ column;
+ public:
+ coord(){ line = 1;
+ column = 1;}
+ coord(const coord& c) { line = c.line;
+ column = c.column;}
+ coord operator=(const coord& c) { line = c.line;
+ column = c.column;
+ return (*this);}
+};
+
+
+/**
+ * The view of KFilereplace.
+ */
+class KFileReplaceView : public KFileReplaceViewWdg
+{
+ Q_OBJECT
+ private:
+ KPopupMenu* m_menuResult;
+ RCOptions* m_option;
+ KListViewItem* m_lviCurrent;
+ KListView* m_rv,
+ * m_sv;
+
+ public://Constructors
+ KFileReplaceView(RCOptions* info, QWidget *parent,const char *name);
+
+ public:
+ QString currentPath();
+ void showSemaphore(QString s);
+ void displayScannedFiles(int filesNumber) { m_lcdFilesNumber->display(QString::number(filesNumber,10)); }
+ void stringsInvert(bool invertAll);
+ void changeView(bool searchingOnlyMode);
+ KListView* getResultsView();
+ KListView* getStringsView();
+ void updateOptions(RCOptions* info) { m_option = info; }
+ void loadMap(KeyValueMap extMap){ loadMapIntoView(extMap); }
+ KeyValueMap getStringsViewMap()const { return m_option->m_mapStringsView;}
+ void setCurrentStringsViewMap(){ setMap(); }
+ //void emitSearchingOnlyMode(bool b) { emit searchingOnlyMode(b); }
+
+ public slots:
+ void slotMouseButtonClicked (int button, QListViewItem *lvi, const QPoint &pos);
+ void slotResultProperties();
+ void slotResultOpen();
+ void slotResultOpenWith();
+ void slotResultDirOpen();
+ void slotResultEdit();
+ void slotResultDelete();
+ void slotResultTreeExpand();
+ void slotResultTreeReduce();
+ void slotStringsAdd();
+ void slotQuickStringsAdd(const QString& quickSearch, const QString& quickReplace);
+ void slotStringsDeleteItem();
+ void slotStringsEmpty();
+ void slotStringsEdit();
+ void slotStringsSave();
+
+ private:
+ void initGUI();
+ void raiseStringsView();
+ void raiseResultsView();
+ coord extractWordCoordinates(QListViewItem* lvi);
+ void expand(QListViewItem *lviCurrent, bool b);
+ void setMap();
+ void loadMapIntoView(KeyValueMap map);
+ void whatsThis();
+
+ /*signals:
+ void resetActions();
+ void searchingOnlyMode(bool);*/
+};
+
+#endif // KFILEREPLACEVIEW_H
diff --git a/kfilereplace/kfilereplaceviewwdg.ui b/kfilereplace/kfilereplaceviewwdg.ui
new file mode 100644
index 00000000..17be7441
--- /dev/null
+++ b/kfilereplace/kfilereplaceviewwdg.ui
@@ -0,0 +1,555 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>KFileReplaceViewWdg</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KFileReplaceViewWdg</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>635</width>
+ <height>370</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QSplitter" row="0" column="0">
+ <property name="name">
+ <cstring>splitter3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <widget class="QWidgetStack">
+ <property name="name">
+ <cstring>m_stackResults</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </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>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="KListView" row="0" column="0">
+ <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>Folder</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Old Size</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>New Size</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Replaced Strings</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Owner User</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Owner Group</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_lvResults</cstring>
+ </property>
+ <property name="selectionMode" stdset="0">
+ <enum>Extended</enum>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="rootIsDecorated">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ <property name="itemsMovable">
+ <bool>false</bool>
+ </property>
+ <property name="alternateBackground">
+ <color>
+ <red>238</red>
+ <green>246</green>
+ <blue>255</blue>
+ </color>
+ </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>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="KListView" row="0" column="0">
+ <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>Folder</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Size</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Found Strings</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Owner User</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Owner Group</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_lvResults_2</cstring>
+ </property>
+ <property name="selectionMode" stdset="0">
+ <enum>Extended</enum>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="rootIsDecorated">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ <property name="itemsMovable">
+ <bool>false</bool>
+ </property>
+ <property name="alternateBackground">
+ <color>
+ <red>238</red>
+ <green>246</green>
+ <blue>255</blue>
+ </color>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <widget class="QWidgetStack">
+ <property name="name">
+ <cstring>m_stackStrings</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </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>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="KListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Search For</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Replace With</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_lvStrings</cstring>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="rootIsDecorated">
+ <bool>false</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ <property name="itemsMovable">
+ <bool>false</bool>
+ </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>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="KListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Search For</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_lvStrings_2</cstring>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="rootIsDecorated">
+ <bool>false</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ <property name="itemsMovable">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KLed">
+ <property name="name">
+ <cstring>m_ledGo</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="state">
+ <enum>On</enum>
+ </property>
+ <property name="color">
+ <color>
+ <red>170</red>
+ <green>255</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Green means ready</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Ready</string>
+ </property>
+ </widget>
+ <widget class="KLed">
+ <property name="name">
+ <cstring>m_ledWait</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="state">
+ <enum>On</enum>
+ </property>
+ <property name="color">
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Yellow means wait while sorting list</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Please wait while sorting list</string>
+ </property>
+ </widget>
+ <widget class="KLed">
+ <property name="name">
+ <cstring>m_ledStop</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="color">
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Red means scanning files</string>
+ </property>
+ </widget>
+ </hbox>
+ </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>354</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <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>m_tlFilesNumber</cstring>
+ </property>
+ <property name="text">
+ <string>Scanned files:</string>
+ </property>
+ </widget>
+ <widget class="QLCDNumber">
+ <property name="name">
+ <cstring>m_lcdFilesNumber</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>LineEditPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="numDigits">
+ <number>7</number>
+ </property>
+ <property name="mode">
+ <enum>Dec</enum>
+ </property>
+ <property name="segmentStyle">
+ <enum>Flat</enum>
+ </property>
+ <property name="intValue" stdset="0">
+ <number>0</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistview.h</includehint>
+ <includehint>klistview.h</includehint>
+ <includehint>klistview.h</includehint>
+ <includehint>klistview.h</includehint>
+ <includehint>kled.h</includehint>
+ <includehint>kled.h</includehint>
+ <includehint>kled.h</includehint>
+</includehints>
+</UI>
diff --git a/kfilereplace/knewprojectdlg.cpp b/kfilereplace/knewprojectdlg.cpp
new file mode 100644
index 00000000..5428473b
--- /dev/null
+++ b/kfilereplace/knewprojectdlg.cpp
@@ -0,0 +1,531 @@
+/***************************************************************************
+ knewprojectdlg.cpp - description
+ -------------------
+ begin : Tue Dec 28 1999
+ copyright : (C) 1999 by Fran�is Dupoux
+ (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ email : dupoux@dupoux.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. *
+ * *
+ ***************************************************************************/
+
+
+//QT
+#include <qwhatsthis.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qdatetimeedit.h>
+#include <qlabel.h>
+#include <qradiobutton.h>
+#include <qtextedit.h>
+#include <qlistview.h>
+
+//KDE
+#include <kseparator.h>
+#include <kmessagebox.h>
+#include <kcharsets.h>
+#include <kcombobox.h>
+#include <kconfig.h>
+#include <kfiledialog.h>
+#include <klineedit.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kpushbutton.h>
+#include <kstandarddirs.h>
+#include <kdeversion.h>
+#include <kiconloader.h>
+#include <kdebug.h>
+#include <kapplication.h>
+
+// local
+#include "knewprojectdlg.h"
+#include "whatthis.h"
+
+using namespace whatthisNameSpace;
+
+
+KNewProjectDlg::KNewProjectDlg(RCOptions* info, QWidget *parent, const char *name) : KNewProjectDlgS(parent, name)
+{
+ m_searchNowFlag = "";
+ m_option = info;
+
+ initGUI();
+
+ connect(m_pbLocation, SIGNAL(clicked()), this, SLOT(slotDir()));
+ connect(m_pbCancel, SIGNAL(clicked()), this, SLOT(slotReject()));
+ connect(m_pbSearchNow, SIGNAL(clicked()), this, SLOT(slotSearchNow()));
+ connect(m_pbSearchLater, SIGNAL(clicked()), this, SLOT(slotSearchLater()));
+ connect(m_leSearch, SIGNAL(textChanged(const QString&)), this, SLOT(slotSearchLineEdit(const QString&)));
+ connect(m_chbSizeMin, SIGNAL(toggled(bool)), this, SLOT(slotEnableSpinboxSizeMin(bool)));
+ connect(m_chbSizeMax, SIGNAL(toggled(bool)), this, SLOT(slotEnableSpinboxSizeMax(bool)));
+ connect(m_chbDateMin, SIGNAL(toggled(bool)), m_dedDateMin, SLOT(setEnabled(bool)));
+ connect(m_chbDateMax, SIGNAL(toggled(bool)), m_dedDateMax, SLOT(setEnabled(bool)));
+ connect(m_chbDateMin,SIGNAL(toggled(bool)),this, SLOT(slotEnableCbValidDate(bool)));
+ connect(m_chbDateMax,SIGNAL(toggled(bool)),this, SLOT(slotEnableCbValidDate(bool)));
+ connect(m_chbOwnerUser, SIGNAL(toggled(bool)), this, SLOT(slotEnableChbUser(bool)));
+ connect(m_chbOwnerGroup, SIGNAL(toggled(bool)), this, SLOT(slotEnableChbGroup(bool)));
+ connect(m_chbBackup, SIGNAL(toggled(bool)), this, SLOT(slotEnableChbBackup(bool)));
+ connect(m_pbHelp, SIGNAL(clicked()), this, SLOT(slotHelp()));
+
+ whatsThis();
+}
+
+KNewProjectDlg::~KNewProjectDlg()
+{
+}
+
+void KNewProjectDlg::saveRCOptions()
+{
+ saveOptions();
+ saveFileSizeOptions();
+ saveDateAccessOptions();
+ saveOwnerOptions();
+ saveLocationsList();
+ saveFiltersList();
+ saveBackupExtensionOptions();
+}
+
+void KNewProjectDlg::slotDir()
+{
+ QString directoryString = KFileDialog::getExistingDirectory(QString::null, this, i18n("Project Directory"));
+ if(!directoryString.isEmpty())
+ m_cbLocation->setEditText(directoryString);
+}
+
+void KNewProjectDlg::slotOK()
+{
+ // Check that Search text and Filter are not empty
+ m_option->m_directories = m_cbLocation->currentText();
+ m_option->m_filters = m_cbFilter->currentText();
+ if(!m_leSearch->text().isEmpty())
+ {
+ if(m_leReplace->text().isEmpty())
+ m_option->m_searchingOnlyMode = true;
+ else
+ m_option->m_searchingOnlyMode = false;
+ }
+ m_option->m_quickSearchString = m_searchNowFlag + m_leSearch->text();
+ m_option->m_quickReplaceString = m_searchNowFlag + m_leReplace->text();
+
+ if (m_option->m_directories.isEmpty() || m_option->m_filters.isEmpty())
+ {
+ KMessageBox::error(this, i18n("You must fill the combo boxes (location and filter) before continuing."));
+ return;
+ }
+
+ // OWNER OPTIONS
+ if ((m_chbOwnerUser->isChecked() && m_edOwnerUser->text().isEmpty()) ||
+ (m_chbOwnerGroup->isChecked() && m_edOwnerGroup->text().isEmpty()))
+ {
+ KMessageBox::error(this, i18n("Some edit boxes are empty in the <b>Owner</b> page."));
+ return ;
+ }
+
+ // Check option "Size Min/Max": check MinSize is not greater than MaxSize
+ int minSize = m_spbSizeMin->value(),
+ maxSize = m_spbSizeMax->value();
+ if ((minSize != FileSizeOption) && (maxSize != FileSizeOption))
+ if (minSize > maxSize)
+ {
+ KMessageBox::error(this, i18n("The minimum size is greater than the maximum size."));
+ return ;
+ }
+
+ accept();
+}
+
+void KNewProjectDlg::slotReject()
+{
+ m_option->m_quickSearchString = m_searchNowFlag;
+ m_option->m_quickReplaceString = m_searchNowFlag;
+
+ reject();
+}
+
+void KNewProjectDlg::slotSearchNow()
+{ //Add a 'N' to represent the status search-now
+ m_searchNowFlag = "N";
+ slotOK();
+}
+
+void KNewProjectDlg::slotSearchLater()
+{ //Add a 'L' to represent the status search-later
+ m_searchNowFlag = "L";
+ slotOK();
+}
+
+void KNewProjectDlg::slotSearchLineEdit(const QString& t)
+{
+ m_pbSearchNow->setEnabled(!t.isEmpty());
+}
+
+void KNewProjectDlg::slotEnableSpinboxSizeMin(bool b)
+{
+ m_spbSizeMin->setEnabled(b);
+}
+
+void KNewProjectDlg::slotEnableSpinboxSizeMax(bool b)
+{
+ m_spbSizeMax->setEnabled(b);
+}
+
+void KNewProjectDlg::slotEnableCbValidDate(bool b)
+{
+ Q_UNUSED(b);
+ m_cbDateValid->setEnabled(m_chbDateMax->isChecked() || m_chbDateMin->isChecked());
+}
+
+void KNewProjectDlg::slotEnableChbUser(bool b)
+{
+ m_cbOwnerUserType->setEnabled(b);
+ m_cbOwnerUserBool->setEnabled(b);
+ m_edOwnerUser->setEnabled(b);
+}
+
+void KNewProjectDlg::slotEnableChbGroup(bool b)
+{
+ m_cbOwnerGroupType->setEnabled(b);
+ m_cbOwnerGroupBool->setEnabled(b);
+ m_edOwnerGroup->setEnabled(b);
+}
+
+void KNewProjectDlg::slotEnableChbBackup(bool b)
+{
+ m_leBackup->setEnabled(b);
+ m_tlBackup->setEnabled(b);
+}
+
+//PRIVATE
+void KNewProjectDlg::initGUI()
+{
+ QIconSet iconSet = SmallIconSet("fileopen");
+ QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+
+ m_pbLocation->setIconSet(iconSet);
+ m_pbLocation->setFixedSize(pixMap.width() + 8, pixMap.height() + 8);
+
+ m_pbSearchNow->setEnabled(false);
+
+ loadOptions();
+ loadFileSizeOptions();
+ loadDateAccessOptions();
+ loadOwnerOptions();
+ loadBackupExtensionOptions();
+ loadLocationsList();
+ loadFiltersList();
+}
+
+void KNewProjectDlg::loadOptions()
+{
+ QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ m_cbEncoding->insertStringList(availableEncodingNames);
+ int idx = -1;
+ int utf8Idx = -1;
+ for (uint i = 0; i < availableEncodingNames.count(); i++)
+ {
+ if (availableEncodingNames[i] == m_option->m_encoding)
+ {
+ idx = i;
+ break;
+ }
+ if (availableEncodingNames[i] == "utf8")
+ {
+ utf8Idx = i;
+ }
+ }
+ if (idx != -1)
+ m_cbEncoding->setCurrentItem(idx);
+ else
+ m_cbEncoding->setCurrentItem(utf8Idx);
+
+ m_chbIncludeSubfolders->setChecked(m_option->m_recursive);
+ m_chbCaseSensitive->setChecked(m_option->m_caseSensitive);
+ m_chbEnableVariables->setChecked(m_option->m_variables);
+ m_chbRegularExpressions->setChecked(m_option->m_regularExpressions);
+}
+
+void KNewProjectDlg::loadFileSizeOptions()
+{
+ int size = m_option->m_minSize;
+ if(size == FileSizeOption)
+ {
+ m_chbSizeMin->setChecked(false);
+ m_spbSizeMin->setEnabled(false);
+ m_spbSizeMin->setValue(0);
+ }
+ else
+ {
+ m_chbSizeMin->setChecked(true);
+ m_spbSizeMin->setEnabled(true);
+ m_spbSizeMin->setValue(size);
+ }
+
+ size = m_option->m_maxSize;
+ if(size == FileSizeOption)
+ {
+ m_chbSizeMax->setChecked(false);
+ m_spbSizeMax->setEnabled(false);
+ m_spbSizeMax->setValue(0);
+ }
+ else
+ {
+ m_chbSizeMax->setChecked(true);
+ m_spbSizeMax->setEnabled(true);
+ m_spbSizeMax->setValue(size);
+ }
+}
+
+void KNewProjectDlg::loadDateAccessOptions()
+{
+ // ================== DATE OPTIONS ========================
+
+ QString date = m_option->m_minDate;
+ if(date == AccessDateOption)
+ {
+ m_chbDateMin->setChecked(false);
+ m_dedDateMin->setDate(m_dedDateMin->minValue());
+ m_dedDateMin->setEnabled(false);
+ }
+ else
+ {
+ m_chbDateMin->setChecked(true);
+ m_dedDateMin->setDate(QDate::fromString(date,Qt::ISODate));
+ m_dedDateMin->setEnabled(true);
+ }
+
+ date = m_option->m_maxDate;
+ if(date == AccessDateOption)
+ {
+ m_chbDateMax->setChecked(false);
+ m_dedDateMax->setDate(m_dedDateMax->maxValue());
+ m_dedDateMax->setEnabled(false);
+ }
+ else
+ {
+ m_chbDateMax->setChecked(true);
+ m_dedDateMax->setDate(QDate::fromString(date,Qt::ISODate));
+ m_dedDateMax->setEnabled(true);
+ }
+
+ m_cbDateValid->setEnabled(m_chbDateMax->isChecked() || m_chbDateMin->isChecked());
+
+}
+
+void KNewProjectDlg::loadOwnerOptions()
+{
+ bool enableOwner = m_option->m_ownerUserIsChecked;
+
+ m_chbOwnerUser->setChecked(enableOwner);
+ m_cbOwnerUserType->setEnabled(enableOwner);
+ m_cbOwnerUserBool->setEnabled(enableOwner);
+ m_edOwnerUser->setEnabled(enableOwner);
+
+ m_cbOwnerUserType->setCurrentText(m_option->m_ownerUserType);
+ m_cbOwnerUserBool->setCurrentText(m_option->m_ownerUserBool);
+
+ m_edOwnerUser->setText(m_option->m_ownerUserValue);
+
+ enableOwner = m_option->m_ownerGroupIsChecked;
+
+ m_chbOwnerGroup->setChecked(enableOwner);
+ m_cbOwnerGroupType->setEnabled(enableOwner);
+ m_cbOwnerGroupBool->setEnabled(enableOwner);
+ m_edOwnerGroup->setEnabled(enableOwner);
+
+ m_cbOwnerGroupType->setCurrentText(m_option->m_ownerGroupType);
+ m_cbOwnerGroupBool->setCurrentText(m_option->m_ownerGroupBool);
+ m_edOwnerGroup->setText(m_option->m_ownerGroupValue);
+}
+
+void KNewProjectDlg::loadLocationsList()
+{
+ m_cbLocation->insertStringList(m_option->m_directories);
+}
+
+void KNewProjectDlg::loadFiltersList()
+{
+ m_cbFilter->insertStringList(m_option->m_filters);
+}
+
+void KNewProjectDlg::loadBackupExtensionOptions()
+{
+ bool enableBackup = m_option->m_backup;
+
+ m_chbBackup->setChecked(enableBackup);
+ m_leBackup->setEnabled(enableBackup);
+ m_tlBackup->setEnabled(enableBackup);
+ m_leBackup->setText(m_option->m_backupExtension);
+}
+
+void KNewProjectDlg::saveOptions()
+{
+ m_option->m_encoding = m_cbEncoding->currentText();
+ m_option->m_recursive = m_chbIncludeSubfolders->isChecked();
+ m_option->m_caseSensitive = m_chbCaseSensitive->isChecked();
+ m_option->m_variables = m_chbEnableVariables->isChecked();
+ m_option->m_regularExpressions = m_chbRegularExpressions->isChecked();
+}
+
+void KNewProjectDlg::saveFileSizeOptions()
+{
+ if(m_chbSizeMax->isChecked())
+ m_option->m_maxSize = m_spbSizeMax->value();
+ else
+ m_option->m_maxSize = FileSizeOption;
+
+ if(m_chbSizeMin->isChecked())
+ m_option->m_minSize = m_spbSizeMin->value();
+ else
+ m_option->m_minSize = FileSizeOption;
+}
+
+void KNewProjectDlg::saveDateAccessOptions()
+{
+ if(m_chbDateMin->isChecked() || m_chbDateMax->isChecked())
+ m_option->m_dateAccess = m_cbDateValid->currentText();
+ else
+ m_option->m_dateAccess = ValidAccessDateOption;
+
+ if(m_chbDateMin->isChecked())
+ {
+ QString date = m_dedDateMin->date().toString(Qt::ISODate);
+ m_option->m_minDate = date;
+ }
+ else
+ m_option->m_minDate = AccessDateOption;
+
+ if(m_chbDateMax->isChecked())
+ {
+ QString date = m_dedDateMax->date().toString(Qt::ISODate);
+ m_option->m_maxDate = date;
+ }
+ else
+ m_option->m_maxDate = AccessDateOption;
+}
+
+void KNewProjectDlg::saveOwnerOptions()
+{
+ bool isChecked = m_chbOwnerUser->isChecked();
+ if(isChecked)
+ {
+ m_option->m_ownerUserIsChecked = true;
+ m_option->m_ownerUserType = m_cbOwnerUserType->currentText();
+ m_option->m_ownerUserBool = m_cbOwnerUserBool->currentText();
+ m_option->m_ownerUserValue = m_edOwnerUser->text();
+ }
+ else
+ {
+ m_option->m_ownerUserIsChecked = false;
+ m_option->m_ownerUserType = "Name";
+ m_option->m_ownerUserBool = "Equals To";
+ m_option->m_ownerUserValue = "";
+ }
+
+ isChecked = m_chbOwnerGroup->isChecked();
+ if(isChecked)
+ {
+ m_option->m_ownerGroupIsChecked = true;
+ m_option->m_ownerGroupType = m_cbOwnerGroupType->currentText();
+ m_option->m_ownerGroupBool = m_cbOwnerGroupBool->currentText();
+ m_option->m_ownerGroupValue = m_edOwnerGroup->text();
+ }
+ else
+ {
+ m_option->m_ownerGroupIsChecked = false;
+ m_option->m_ownerGroupType = "Name";
+ m_option->m_ownerGroupBool = "Equals To";
+ m_option->m_ownerGroupValue = "";
+ }
+}
+
+void KNewProjectDlg::saveLocationsList()
+{
+ QString current = m_cbLocation->currentText();
+ QStringList list = current;
+
+ int count = m_cbLocation->listBox()->count(),
+ i;
+ for(i = 0; i < count; i++)
+ {
+ QString text = m_cbLocation->listBox()->item(i)->text();
+ if(text != current)
+ list.append(text);
+ }
+ m_option->m_directories = list;
+}
+
+void KNewProjectDlg::saveFiltersList()
+{
+ QString current = m_cbFilter->currentText();
+ QStringList list = current;
+
+ int count = m_cbFilter->listBox()->count(),
+ i;
+ for(i = 0; i < count; i++)
+ {
+ QString text = m_cbFilter->listBox()->item(i)->text();
+ if(text != current)
+ list.append(text);
+ }
+ m_option->m_filters = list;
+}
+
+void KNewProjectDlg::saveBackupExtensionOptions()
+{
+ QString backupExt = m_leBackup->text();
+ m_option->m_backup = (m_chbBackup->isChecked() && !backupExt.isEmpty());
+ m_option->m_backupExtension = backupExt;
+}
+
+void KNewProjectDlg::setDatas(const QString& directoryString, const QString& filterString)
+{
+ if (!directoryString.isEmpty())
+ m_cbLocation->setEditText(directoryString);
+
+ if (!filterString.isEmpty())
+ m_cbFilter->setEditText(filterString);
+}
+
+bool KNewProjectDlg::contains(QListView* lv,const QString& s, int column)
+{
+ QListViewItem* i = lv->firstChild();
+ while (i != 0)
+ {
+ if(i->text(column) == s)
+ return true;
+ i = i->nextSibling();
+ }
+ return false;
+}
+
+void KNewProjectDlg::whatsThis()
+{
+ QWhatsThis::add(m_cbLocation, cbLocationWhatthis);
+ QWhatsThis::add(m_cbFilter, cbFilterWhatthis);
+
+ QWhatsThis::add(m_spbSizeMin, edSizeMinWhatthis);
+ QWhatsThis::add(m_spbSizeMax, edSizeMaxWhatthis);
+
+ QWhatsThis::add(m_cbDateValid, cbDateValidWhatthis);
+ QWhatsThis::add(m_chbDateMin, chbDateMinWhatthis);
+ QWhatsThis::add(m_chbDateMax, chbDateMaxWhatthis);
+
+ QWhatsThis::add(m_chbIncludeSubfolders, chbRecursiveWhatthis);
+ QWhatsThis::add(m_chbRegularExpressions, chbRegularExpressionsWhatthis);
+ QWhatsThis::add(m_chbEnableVariables, chbVariablesWhatthis);
+ QWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis);
+ QWhatsThis::add(m_chbBackup, chbBackupWhatthis);
+ QWhatsThis::add(m_leBackup, chbBackupWhatthis);
+ QWhatsThis::add(m_leSearch, leSearchWhatthis);
+ QWhatsThis::add(m_leReplace, leReplaceWhatthis);
+}
+
+#include "knewprojectdlg.moc"
+
diff --git a/kfilereplace/knewprojectdlg.h b/kfilereplace/knewprojectdlg.h
new file mode 100644
index 00000000..e4852cb8
--- /dev/null
+++ b/kfilereplace/knewprojectdlg.h
@@ -0,0 +1,84 @@
+/***************************************************************************
+ knewprojectdlg.h - description
+ -------------------
+ begin : Tue Dec 28 1999
+ copyright : (C) 1999 by François Dupoux
+ (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ email : dupoux@dupoux.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 KNEWPROJECTDLG_H
+#define KNEWPROJECTDLG_H
+
+//KDE
+class KConfig;
+
+//local
+#include "knewprojectdlgs.h"
+#include "configurationclasses.h"
+
+class KNewProjectDlg : public KNewProjectDlgS
+{
+ Q_OBJECT
+
+ private:
+ QString m_searchNowFlag;
+ RCOptions* m_option;
+
+ public:
+ KNewProjectDlg(RCOptions* info, QWidget *parent=0, const char *name=0);
+ ~KNewProjectDlg();
+
+ public:
+ //void updateOptions(const RCOptions& info);
+ void saveRCOptions();
+
+ protected slots:
+ void slotDir();
+ void slotOK();
+ void slotReject();
+ void slotSearchNow();
+ void slotSearchLater();
+ void slotSearchLineEdit(const QString& t);
+ void slotEnableSpinboxSizeMin(bool b);
+ void slotEnableSpinboxSizeMax(bool b);
+ void slotEnableCbValidDate(bool b);
+ void slotEnableChbUser(bool b);
+ void slotEnableChbGroup(bool b);
+ void slotEnableChbBackup(bool b);
+ void slotHelp(){ kapp->invokeHelp(QString::null, "kfilereplace"); }
+
+ private:
+ void initGUI();
+
+ void loadOptions();
+ void loadFileSizeOptions();
+ void loadDateAccessOptions();
+ void loadOwnerOptions();
+ void loadLocationsList();
+ void loadFiltersList();
+ void loadBackupExtensionOptions();
+
+ void saveOptions();
+ void saveFileSizeOptions();
+ void saveDateAccessOptions();
+ void saveOwnerOptions();
+ void saveLocationsList();
+ void saveFiltersList();
+ void saveBackupExtensionOptions();
+
+ bool contains(QListView* lv,const QString& s, int column);
+ void setDatas(const QString& directoryString, const QString& filterString);
+ void whatsThis();
+};
+
+#endif // KNewProjectDlg
diff --git a/kfilereplace/knewprojectdlgs.ui b/kfilereplace/knewprojectdlgs.ui
new file mode 100644
index 00000000..238a003f
--- /dev/null
+++ b/kfilereplace/knewprojectdlgs.ui
@@ -0,0 +1,898 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KNewProjectDlgS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>KNewProjectDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>568</width>
+ <height>609</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Search &amp; Replace in Files</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="modal">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout28</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>m_pbHelp</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</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="maximumSize">
+ <size>
+ <width>70</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ </widget>
+ <spacer>
+ <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>150</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_pbSearchNow</cstring>
+ </property>
+ <property name="text">
+ <string>Search Now</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_pbSearchLater</cstring>
+ </property>
+ <property name="text">
+ <string>Search Later</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>m_pbCancel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>70</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QTabWidget" row="0" column="0">
+ <property name="name">
+ <cstring>tabWidget2</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="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox5</cstring>
+ </property>
+ <property name="title">
+ <string>Startup Folder Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>m_tlFilter</cstring>
+ </property>
+ <property name="text">
+ <string>Filter:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>cbFilter</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>m_tlLocation</cstring>
+ </property>
+ <property name="text">
+ <string>Location:</string>
+ </property>
+ <property name="textFormat">
+ <enum>AutoText</enum>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>cbLocation</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>m_cbLocation</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="sizeLimit">
+ <number>20</number>
+ </property>
+ <property name="maxCount">
+ <number>10</number>
+ </property>
+ <property name="insertionPolicy">
+ <enum>AtTop</enum>
+ </property>
+ <property name="duplicatesEnabled">
+ <bool>false</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Insert a search path here. You can use the search path button.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>m_pbLocation</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>m_cbFilter</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="sizeLimit">
+ <number>20</number>
+ </property>
+ <property name="maxCount">
+ <number>10</number>
+ </property>
+ <property name="insertionPolicy">
+ <enum>AtTop</enum>
+ </property>
+ <property name="duplicatesEnabled">
+ <bool>false</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbIncludeSubfolders</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Include subfolders</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox6</cstring>
+ </property>
+ <property name="title">
+ <string>Search/Replace Strings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>m_leSearch</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>m_leReplace</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>m_tlSearch</cstring>
+ </property>
+ <property name="text">
+ <string>Search:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>m_tlReplace</cstring>
+ </property>
+ <property name="text">
+ <string>Replace:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>groupBox4</cstring>
+ </property>
+ <property name="title">
+ <string>General Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbRegularExpressions</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Enable &amp;regular expressions</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbBackup</cstring>
+ </property>
+ <property name="text">
+ <string>Do &amp;backup copy instead of overwrite</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbCaseSensitive</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Case sensitive</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbEnableVariables</cstring>
+ </property>
+ <property name="text">
+ <string>Enable co&amp;mmands in the replace string</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>m_tlBackup</cstring>
+ </property>
+ <property name="text">
+ <string>Backup copy suffix:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="5" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>m_leBackup</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="2">
+ <property name="name">
+ <cstring>m_cbEncoding</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="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Encoding of the files:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Advanced</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>gbOwnership</cstring>
+ </property>
+ <property name="title">
+ <string>Ownership Filtering</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>m_chbOwnerUser</cstring>
+ </property>
+ <property name="text">
+ <string>User: </string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ID (Number)</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>m_cbOwnerUserType</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizeLimit">
+ <number>2</number>
+ </property>
+ <property name="maxCount">
+ <number>2</number>
+ </property>
+ <property name="duplicatesEnabled">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="2">
+ <item>
+ <property name="text">
+ <string>Equals To</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Is Not</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>m_cbOwnerUserBool</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizeLimit">
+ <number>2</number>
+ </property>
+ <property name="maxCount">
+ <number>2</number>
+ </property>
+ <property name="duplicatesEnabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="2">
+ <item>
+ <property name="text">
+ <string>Equals To</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Is Not</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>m_cbOwnerGroupBool</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizeLimit">
+ <number>2</number>
+ </property>
+ <property name="maxCount">
+ <number>2</number>
+ </property>
+ <property name="duplicatesEnabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ID (Number)</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>m_cbOwnerGroupType</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizeLimit">
+ <number>2</number>
+ </property>
+ <property name="maxCount">
+ <number>2</number>
+ </property>
+ <property name="duplicatesEnabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>m_chbOwnerGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Group:</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="3">
+ <property name="name">
+ <cstring>m_edOwnerUser</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="3">
+ <property name="name">
+ <cstring>m_edOwnerGroup</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>gbAccessDate</cstring>
+ </property>
+ <property name="title">
+ <string>Access Date Filtering</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout8</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout18</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>m_tlDateValid</cstring>
+ </property>
+ <property name="text">
+ <string>Dates valid for:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_chbDateMin</cstring>
+ </property>
+ <property name="text">
+ <string>Accessed after:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_chbDateMax</cstring>
+ </property>
+ <property name="text">
+ <string>Accessed before: </string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout19</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KComboBox">
+ <item>
+ <property name="text">
+ <string>Last Writing Access</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Last Reading Access</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>m_cbDateValid</cstring>
+ </property>
+ <property name="sizeLimit">
+ <number>2</number>
+ </property>
+ <property name="maxCount">
+ <number>2</number>
+ </property>
+ <property name="duplicatesEnabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QDateEdit">
+ <property name="name">
+ <cstring>m_dedDateMin</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="date">
+ <date>
+ <year>2000</year>
+ <month>1</month>
+ <day>1</day>
+ </date>
+ </property>
+ <property name="autoAdvance">
+ <bool>true</bool>
+ </property>
+ <property name="maxValue">
+ <date>
+ <year>2100</year>
+ <month>12</month>
+ <day>31</day>
+ </date>
+ </property>
+ <property name="minValue">
+ <date>
+ <year>1900</year>
+ <month>12</month>
+ <day>31</day>
+ </date>
+ </property>
+ </widget>
+ <widget class="QDateEdit">
+ <property name="name">
+ <cstring>m_dedDateMax</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="date">
+ <date>
+ <year>2000</year>
+ <month>1</month>
+ <day>1</day>
+ </date>
+ </property>
+ <property name="autoAdvance">
+ <bool>true</bool>
+ </property>
+ <property name="maxValue">
+ <date>
+ <year>2100</year>
+ <month>12</month>
+ <day>31</day>
+ </date>
+ </property>
+ <property name="minValue">
+ <date>
+ <year>1900</year>
+ <month>9</month>
+ <day>14</day>
+ </date>
+ </property>
+ </widget>
+ </vbox>
+ </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>190</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>gbSize</cstring>
+ </property>
+ <property name="title">
+ <string>Size Filtering</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout32</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout31</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_chbSizeMin</cstring>
+ </property>
+ <property name="text">
+ <string>Minimum si&amp;ze:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_chbSizeMax</cstring>
+ </property>
+ <property name="text">
+ <string>Maximum size:</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout30</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>m_spbSizeMin</cstring>
+ </property>
+ <property name="maxValue">
+ <number>4000000</number>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>m_spbSizeMax</cstring>
+ </property>
+ <property name="maxValue">
+ <number>4000000</number>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout31</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>m_tlSizeMin</cstring>
+ </property>
+ <property name="text">
+ <string>KB</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>m_tlSizeMax</cstring>
+ </property>
+ <property name="text">
+ <string>KB</string>
+ </property>
+ </widget>
+ </vbox>
+ </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>330</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>tabWidget2</tabstop>
+ <tabstop>m_leSearch</tabstop>
+ <tabstop>m_leReplace</tabstop>
+ <tabstop>m_cbLocation</tabstop>
+ <tabstop>m_pbLocation</tabstop>
+ <tabstop>m_cbFilter</tabstop>
+ <tabstop>m_chbIncludeSubfolders</tabstop>
+ <tabstop>m_cbEncoding</tabstop>
+ <tabstop>m_chbCaseSensitive</tabstop>
+ <tabstop>m_chbRegularExpressions</tabstop>
+ <tabstop>m_chbEnableVariables</tabstop>
+ <tabstop>m_chbBackup</tabstop>
+ <tabstop>m_leBackup</tabstop>
+ <tabstop>m_pbSearchNow</tabstop>
+ <tabstop>m_pbSearchLater</tabstop>
+ <tabstop>m_pbCancel</tabstop>
+ <tabstop>m_pbHelp</tabstop>
+ <tabstop>m_chbSizeMin</tabstop>
+ <tabstop>m_spbSizeMin</tabstop>
+ <tabstop>m_chbSizeMax</tabstop>
+ <tabstop>m_spbSizeMax</tabstop>
+ <tabstop>m_cbDateValid</tabstop>
+ <tabstop>m_chbDateMin</tabstop>
+ <tabstop>m_chbDateMax</tabstop>
+ <tabstop>m_chbOwnerUser</tabstop>
+ <tabstop>m_cbOwnerUserType</tabstop>
+ <tabstop>m_cbOwnerUserBool</tabstop>
+ <tabstop>m_edOwnerUser</tabstop>
+ <tabstop>m_chbOwnerGroup</tabstop>
+ <tabstop>m_cbOwnerGroupType</tabstop>
+ <tabstop>m_cbOwnerGroupBool</tabstop>
+ <tabstop>m_edOwnerGroup</tabstop>
+ <tabstop>m_dedDateMin</tabstop>
+ <tabstop>m_dedDateMax</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kfilereplace/koptionsdlg.cpp b/kfilereplace/koptionsdlg.cpp
new file mode 100644
index 00000000..3980a7a6
--- /dev/null
+++ b/kfilereplace/koptionsdlg.cpp
@@ -0,0 +1,236 @@
+/***************************************************************************
+ koptionsdlg.cpp - description
+ -------------------
+ begin : Tue Dec 28 1999
+ copyright : (C) 1999 by Fran�is Dupoux
+ (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ email : dupoux@dupoux.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. *
+ * *
+ ***************************************************************************/
+
+// QT
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qwhatsthis.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+
+// KDE
+#include <kcharsets.h>
+#include <kcombobox.h>
+#include <kconfig.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+#include <kapplication.h>
+//#include <kdebug.h>
+
+// local
+#include "whatthis.h"
+#include "koptionsdlg.h"
+
+
+using namespace whatthisNameSpace;
+
+
+KOptionsDlg::KOptionsDlg(RCOptions* info, QWidget *parent, const char *name) : KOptionsDlgS(parent,name,true)
+{
+ m_config = new KConfig("kfilereplacerc");
+ m_option = info;
+
+ initGUI();
+
+ connect(m_pbOK, SIGNAL(clicked()), this, SLOT(slotOK()));
+ connect(m_pbDefault, SIGNAL(clicked()),this,SLOT(slotDefaults()));
+ connect(m_chbBackup, SIGNAL(toggled(bool)), this, SLOT(slotChbBackup(bool)));
+ connect(m_pbHelp, SIGNAL(clicked()), this, SLOT(slotHelp()));
+ connect(m_chbConfirmStrings, SIGNAL(toggled(bool)), this, SLOT(slotChbConfirmStrings(bool)));
+ connect(m_chbShowConfirmDialog, SIGNAL(toggled(bool)), this, SLOT(slotChbShowConfirmDialog(bool)));
+
+ whatsThis();
+}
+
+KOptionsDlg::~KOptionsDlg()
+{
+}
+
+//PRIVATE SLOTS
+void KOptionsDlg::slotOK()
+{
+ saveRCOptions();
+ accept();
+}
+
+/** Set defaults values for all options of the dialog */
+void KOptionsDlg::slotDefaults()
+{
+ m_chbCaseSensitive->setChecked(CaseSensitiveOption);
+ m_chbRecursive->setChecked(RecursiveOption);
+ m_chbHaltOnFirstOccurrence->setChecked(StopWhenFirstOccurenceOption);
+
+ m_chbFollowSymLinks->setChecked(FollowSymbolicLinksOption);
+ m_chbIgnoreHidden->setChecked(IgnoreHiddenOption);
+ m_chbRegularExpressions->setChecked(RegularExpressionsOption);
+ m_chbIgnoreFiles->setChecked(IgnoreFilesOption);
+ m_chbConfirmStrings->setChecked(AskConfirmReplaceOption);
+
+ QStringList bkList = QStringList::split(",",BackupExtensionOption,true);
+
+ bool enableBackup = (bkList[0] == "true" ? true : false);
+
+ m_chbBackup->setChecked(enableBackup);
+ m_leBackup->setEnabled(enableBackup);
+ m_tlBackup->setEnabled(enableBackup);
+
+ m_leBackup->setText(bkList[1]);
+
+ m_chbVariables->setChecked(VariablesOption);
+
+ m_chbNotifyOnErrors->setChecked(NotifyOnErrorsOption);
+}
+
+void KOptionsDlg::slotChbBackup(bool b)
+{
+ m_leBackup->setEnabled(b);
+ m_tlBackup->setEnabled(b);
+}
+
+void KOptionsDlg::slotChbConfirmStrings(bool b)
+{
+ if(b)
+ {
+ m_chbShowConfirmDialog->setEnabled(true);
+ m_chbShowConfirmDialog->setChecked(true);
+ m_config->setGroup("Notification Messages");
+ m_config->writeEntry(rcDontAskAgain,"no");
+ }
+ else
+ {
+ m_chbShowConfirmDialog->setEnabled(false);
+ m_chbShowConfirmDialog->setChecked(false);
+ m_config->setGroup("Notification Messages");
+ m_config->writeEntry(rcDontAskAgain,"yes");
+ }
+}
+
+void KOptionsDlg::slotChbShowConfirmDialog(bool b)
+{
+ m_config->setGroup("Notification Messages");
+ if(b)
+ {
+ m_config->writeEntry(rcDontAskAgain,"no");
+ }
+ else
+ {
+ m_config->writeEntry(rcDontAskAgain,"yes");
+ }
+}
+
+//PRIVATE
+void KOptionsDlg::initGUI()
+{
+ m_config->sync();
+ m_config->setGroup("Notification Messages");
+ m_option->m_notifyOnErrors = m_config->readBoolEntry(rcNotifyOnErrors, true);
+
+ QString dontAskAgain = m_config->readEntry(rcDontAskAgain,"no");
+
+ m_chbConfirmStrings->setChecked(m_option->m_askConfirmReplace);
+
+ if(m_chbConfirmStrings->isChecked())
+ {
+ if(dontAskAgain == "yes")
+ m_chbShowConfirmDialog->setChecked(false);
+ else
+ m_chbShowConfirmDialog->setChecked(true);
+ }
+
+ QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ m_cbEncoding->insertStringList( availableEncodingNames );
+ int idx = -1;
+ int utf8Idx = -1;
+ for (uint i = 0; i < availableEncodingNames.count(); i++)
+ {
+ if (availableEncodingNames[i] == m_option->m_encoding)
+ {
+ idx = i;
+ break;
+ }
+ if (availableEncodingNames[i] == "utf8")
+ {
+ utf8Idx = i;
+ }
+ }
+ if (idx != -1)
+ m_cbEncoding->setCurrentItem(idx);
+ else
+ m_cbEncoding->setCurrentItem(utf8Idx);
+
+ m_chbCaseSensitive->setChecked(m_option->m_caseSensitive);
+ m_chbRecursive->setChecked(m_option->m_recursive);
+
+ bool enableBackup = m_option->m_backup;
+
+ m_chbBackup->setChecked(enableBackup);
+ m_leBackup->setEnabled(enableBackup);
+ m_tlBackup->setEnabled(enableBackup);
+
+ m_leBackup->setText(m_option->m_backupExtension);
+
+ m_chbVariables->setChecked(m_option->m_variables);
+ m_chbRegularExpressions->setChecked(m_option->m_regularExpressions);
+ m_chbHaltOnFirstOccurrence->setChecked(m_option->m_haltOnFirstOccur);
+ m_chbFollowSymLinks->setChecked(m_option->m_followSymLinks);
+ m_chbIgnoreHidden->setChecked(m_option->m_ignoreHidden);
+ m_chbIgnoreFiles->setChecked(m_option->m_ignoreFiles);
+
+ m_chbNotifyOnErrors->setChecked(m_option->m_notifyOnErrors);
+}
+
+void KOptionsDlg::saveRCOptions()
+{
+ m_option->m_encoding = m_cbEncoding->currentText();
+ m_option->m_caseSensitive = m_chbCaseSensitive->isChecked();
+ m_option->m_recursive = m_chbRecursive->isChecked();
+ QString backupExt = m_leBackup->text();
+ m_option->m_backup = (m_chbBackup->isChecked() && !backupExt.isEmpty());
+ m_option->m_backupExtension = backupExt;
+ m_option->m_variables = m_chbVariables->isChecked();
+ m_option->m_regularExpressions = m_chbRegularExpressions->isChecked();
+ m_option->m_haltOnFirstOccur = m_chbHaltOnFirstOccurrence->isChecked();
+ m_option->m_followSymLinks = m_chbFollowSymLinks->isChecked();
+ m_option->m_ignoreHidden = m_chbIgnoreHidden->isChecked();
+ m_option->m_ignoreFiles = m_chbIgnoreFiles->isChecked();
+ m_option->m_askConfirmReplace = m_chbConfirmStrings->isChecked();
+ m_option->m_notifyOnErrors = m_chbNotifyOnErrors->isChecked();
+
+ m_config->setGroup("Notification Messages");
+ m_config->writeEntry(rcNotifyOnErrors, m_option->m_notifyOnErrors);
+
+ m_config->sync();
+}
+
+void KOptionsDlg::whatsThis()
+{
+ // Create help QWhatsThis
+ QWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis);
+ QWhatsThis::add(m_chbRecursive, chbRecursiveWhatthis);
+ QWhatsThis::add(m_chbHaltOnFirstOccurrence, chbHaltOnFirstOccurrenceWhatthis);
+ QWhatsThis::add(m_chbFollowSymLinks, chbFollowSymLinksWhatthis);
+ QWhatsThis::add(m_chbIgnoreHidden, chbIgnoreHiddenWhatthis);
+ QWhatsThis::add(m_chbIgnoreFiles, chbIgnoreFilesWhatthis);
+ QWhatsThis::add(m_chbRegularExpressions, chbRegularExpressionsWhatthis);
+ QWhatsThis::add(m_chbVariables, chbVariablesWhatthis);
+ QWhatsThis::add(m_chbBackup, chbBackupWhatthis);
+ QWhatsThis::add(m_chbConfirmStrings, chbConfirmStringsWhatthis);
+}
+
+#include "koptionsdlg.moc"
diff --git a/kfilereplace/koptionsdlg.h b/kfilereplace/koptionsdlg.h
new file mode 100644
index 00000000..993f2c7d
--- /dev/null
+++ b/kfilereplace/koptionsdlg.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ koptionsdlg.h - description
+ -------------------
+ begin : Tue Dec 28 1999
+ copyright : (C) 1999 by François Dupoux
+ (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
+ email : dupoux@dupoux.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 KOPTIONSDLG_H
+#define KOPTIONSDLG_H
+
+// KDE
+class KConfig;
+
+//local
+#include "configurationclasses.h"
+#include "koptionsdlgs.h"
+
+/**
+ *@author François Dupoux
+ */
+
+class KOptionsDlg : public KOptionsDlgS
+{
+ Q_OBJECT
+ public:
+ KOptionsDlg(RCOptions* info, QWidget *parent, const char *name);
+ ~KOptionsDlg();
+
+ private:
+ RCOptions* m_option;
+ KConfig *m_config;
+
+ private slots:
+ void slotOK();
+ void slotDefaults();
+ void slotChbBackup(bool b);
+ void slotChbConfirmStrings(bool b);
+ void slotChbShowConfirmDialog(bool b);
+ void slotHelp(){ kapp->invokeHelp(QString::null, "kfilereplace"); }
+
+ private:
+ void initGUI();
+ void saveRCOptions();
+ void whatsThis();
+};
+
+#endif // KOPTIONSDLG_H
diff --git a/kfilereplace/koptionsdlgs.ui b/kfilereplace/koptionsdlgs.ui
new file mode 100644
index 00000000..88f0d8f8
--- /dev/null
+++ b/kfilereplace/koptionsdlgs.ui
@@ -0,0 +1,347 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KOptionsDlgS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>KOptionsDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>572</width>
+ <height>420</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Options</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>tabWidget2</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab1</cstring>
+ </property>
+ <attribute name="title">
+ <string>General</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox7</cstring>
+ </property>
+ <property name="title">
+ <string>General Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbVariables</cstring>
+ </property>
+ <property name="text">
+ <string>Enable commands in replace strings</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="7" column="0">
+ <property name="name">
+ <cstring>m_tlBackup</cstring>
+ </property>
+ <property name="text">
+ <string>Backup copy suffix:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="7" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>m_leBackup</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbNotifyOnErrors</cstring>
+ </property>
+ <property name="text">
+ <string>Notif&amp;y on errors</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbCaseSensitive</cstring>
+ </property>
+ <property name="text">
+ <string>Case sensitive</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbRecursive</cstring>
+ </property>
+ <property name="text">
+ <string>Recursive (search/replace in all sub folders)</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbRegularExpressions</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Enable regular e&amp;xpressions</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_chbBackup</cstring>
+ </property>
+ <property name="text">
+ <string>Do &amp;backup copy</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>Encoding of the files:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="2">
+ <property name="name">
+ <cstring>m_cbEncoding</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Tab3</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Advanced</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>gbxConfirm</cstring>
+ </property>
+ <property name="title">
+ <string>Advanced Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>m_chbIgnoreHidden</cstring>
+ </property>
+ <property name="text">
+ <string>Ignore hidden files and folders</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>m_chbFollowSymLinks</cstring>
+ </property>
+ <property name="text">
+ <string>Follow s&amp;ymbolic links</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>m_chbHaltOnFirstOccurrence</cstring>
+ </property>
+ <property name="text">
+ <string>When searching, stop on first string found (faster but no details)</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>m_chbIgnoreFiles</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Do not show file if no strings are found or replaced</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout9</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <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="QCheckBox">
+ <property name="name">
+ <cstring>m_chbShowConfirmDialog</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Show confirmation dialog</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>m_chbConfirmStrings</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Confirm before replace each string</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>m_pbHelp</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ </widget>
+ <spacer row="1" 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>202</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>m_pbDefault</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Default Values</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>m_pbOK</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="4">
+ <property name="name">
+ <cstring>m_pbCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>m_pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>KOptionsDlgS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>tabWidget2</tabstop>
+ <tabstop>m_cbEncoding</tabstop>
+ <tabstop>m_chbCaseSensitive</tabstop>
+ <tabstop>m_chbRecursive</tabstop>
+ <tabstop>m_chbRegularExpressions</tabstop>
+ <tabstop>m_chbVariables</tabstop>
+ <tabstop>m_chbNotifyOnErrors</tabstop>
+ <tabstop>m_chbBackup</tabstop>
+ <tabstop>m_leBackup</tabstop>
+ <tabstop>m_pbDefault</tabstop>
+ <tabstop>m_pbOK</tabstop>
+ <tabstop>m_pbCancel</tabstop>
+ <tabstop>m_pbHelp</tabstop>
+ <tabstop>m_chbConfirmStrings</tabstop>
+ <tabstop>m_chbShowConfirmDialog</tabstop>
+ <tabstop>m_chbIgnoreFiles</tabstop>
+ <tabstop>m_chbHaltOnFirstOccurrence</tabstop>
+ <tabstop>m_chbFollowSymLinks</tabstop>
+ <tabstop>m_chbIgnoreHidden</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kfilereplace/main.cpp b/kfilereplace/main.cpp
new file mode 100644
index 00000000..4ce9b742
--- /dev/null
+++ b/kfilereplace/main.cpp
@@ -0,0 +1,77 @@
+/***************************************************************************
+ main.cpp - Main file for the KFileReplace shell
+ -------------------
+ begin : Thu Sep 16 14:14:09 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 "kfilereplace.h"
+
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+
+static const char description[] =
+ I18N_NOOP("Batch search and replace tool");
+
+static const char version[] = "0.1";
+
+static KCmdLineOptions options[] =
+ {
+ { "+[PATH]", I18N_NOOP( "Starting folder" ), 0 },
+ KCmdLineLastOption
+ };
+
+int main(int argc, char *argv[])
+{
+ KAboutData about("kfilereplace", I18N_NOOP("KFileReplace"), version, description,
+ KAboutData::License_GPL_V2, "(C) 2004-2005 Andras Mantia\n(C) 2004-2005 Emiliano Gulmini\n(C) 1999-2002 Francois Dupoux", I18N_NOOP("Part of the KDEWebDev module."),
+ "http://www.kdewebdev.org");
+
+ about.addAuthor("Andras Mantia", I18N_NOOP("Shell author, KPart creator, co-maintainer"), "amantia@kde.org");
+ about.addAuthor("Emiliano Gulmini", I18N_NOOP("Current maintainer, code cleaner and rewriter"),"emi_barbarossa@yahoo.it");
+ about.addAuthor("Francois Dupou",
+ I18N_NOOP("Original author of the KFileReplace tool"),
+ "dupoux@dupoux.com");
+
+ KCmdLineArgs::init(argc, argv, &about);
+ KCmdLineArgs::addCmdLineOptions( options );
+
+ KApplication app;
+
+ // see if we are starting with session management
+ if (app.isRestored())
+ {
+ RESTORE(KFileReplace);
+ }
+ else
+ {
+ // no session.. just start up normally
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ KFileReplace *kfr = new KFileReplace;
+ kfr->show();
+
+ if (args->count() == 0)
+ {
+ kfr->openURL(KURL());
+ }
+ else
+ {
+ kfr->openURL(args->url(0));
+ }
+ args->clear();
+ }
+
+ return app.exec();
+}
diff --git a/kfilereplace/report.cpp b/kfilereplace/report.cpp
new file mode 100644
index 00000000..cae0dfe4
--- /dev/null
+++ b/kfilereplace/report.cpp
@@ -0,0 +1,282 @@
+/***************************************************************************
+ report.cpp - Report document class
+ -------------------
+ begin : fri aug 13 15:29:46 CEST 2004
+
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+// QT
+#include <qstring.h>
+#include <qfile.h>
+
+// KDE
+#include <klistview.h>
+#include <kmessagebox.h>
+#include <kuser.h>
+
+// local
+#include "report.h"
+#include "configurationclasses.h"
+
+void Report::createReportFile()
+{
+ QString xmlFileName = m_docPath + ".xml",
+ cssFileName = m_docPath + ".css";
+
+ // Generates a report file
+ // a) Open the file
+ QFile report(xmlFileName);
+ if (!report.open( IO_WriteOnly ))
+ {
+ KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b>.</qt>").arg(xmlFileName));
+ return ;
+ }
+
+ // b) Write the header of the XML file
+
+ QDateTime datetime = QDateTime::currentDateTime(Qt::LocalTime);
+ QString dateString = datetime.toString(Qt::LocalDate);
+ KUser user;
+ QString columnTextFour,
+ columnReplaceWith;
+ if(!m_isSearchFlag)
+ {
+ columnTextFour = i18n("Replaced Strings");
+ columnReplaceWith = i18n("Replace with");
+ }
+ else
+ {
+ columnTextFour = i18n("Total number occurrences");
+ columnReplaceWith = i18n("-");
+ }
+
+ QString css = cssFileName.mid(cssFileName.findRev("/")+1,cssFileName.length()-(cssFileName.findRev("/")+1));
+ QTextStream oTStream( &report );
+ oTStream << "<?xml version=\"1.0\"?>\n"
+ "<?xml-stylesheet href=\""+css+"\" type=\"text/css\"?>"
+ "<report>\n"
+ " <title> "+i18n("KFileReplace Report")+" </title>\n"
+ " <createdby>"+user.fullName()+"("+user.loginName()+")"+"</createdby>\n"
+ " <date>"+dateString+"</date>\n"
+ "<hr/>\n"
+ " <table>\n"
+ " <tablecaption> "+i18n("Searching/Replacing Strings Table")+" </tablecaption>\n"
+ " <header>\n"
+ " <row>\n"
+ " <searchfor class=\"header\">"+i18n("Search for")+"</searchfor>\n";
+
+ if(!m_isSearchFlag)
+ oTStream<< " <replacewith class=\"header\" >"+columnReplaceWith+"</replacewith>\n";
+
+ oTStream<< " </row>\n"
+ " </header>\n";
+ // c) Write the strings list
+ QListViewItem *lviCurItem,
+ *lviFirst;
+
+ lviCurItem = lviFirst = m_stringsView->firstChild();
+
+ if(lviCurItem == 0)
+ return ;
+
+ QString rowType="a1";
+
+ do
+ { QString rowTag = "<row >\n"
+ " <searchfor class=\""+rowType+"\"><![CDATA["+lviCurItem->text(0)+"]]></searchfor>\n"
+ " <replacewith class=\""+rowType+"\"><![CDATA["+lviCurItem->text(1)+"]]></replacewith>\n"
+ "</row>\n";
+
+ oTStream << rowTag;
+
+ rowType = ((rowType == "a1") ? "a2" : "a1");
+
+ lviCurItem = lviCurItem->nextSibling();
+ } while(lviCurItem && lviCurItem != lviFirst);
+
+ oTStream<< "</table>\n";
+
+ oTStream<< "<whiteline/>\n"
+ " <table>\n"
+ " <tablecaption> "+i18n("Results Table")+ " </tablecaption>"
+ " <header>\n"
+ " <row>\n"
+ " <name class=\"header\">"+i18n("Name")+"</name>\n"
+ " <folder class=\"header\">"+i18n("Folder")+"</folder>\n";
+ if(m_isSearchFlag)
+ {
+ oTStream<< " <oldsize class=\"header\">"+i18n("Size")+"</oldsize>\n";
+ }
+ else
+ {
+ oTStream<< " <oldsize class=\"header\">"+i18n("Old Size")+"</oldsize>\n"
+ " <newsize class=\"header\">"+i18n("New Size")+"</newsize>\n";
+ }
+ oTStream<< " <replacedstrings class=\"header\" >"+columnTextFour+"</replacedstrings>\n"
+ " <owneruser class=\"header\">"+i18n("Owner User")+"</owneruser>\n"
+ " <ownergroup class=\"header\">"+i18n("Owner Group")+"</ownergroup>\n"
+ " </row>\n"
+ " </header>\n";
+
+ // d) Write the result list
+
+ lviCurItem = lviFirst = m_resultsView->firstChild();
+
+ if(lviCurItem == 0)
+ return ;
+
+ unsigned int totalOccurrences = 0;
+
+ rowType="a1";
+
+ do
+ { QString rowTag = " <row >\n"
+ " <name class=\""+rowType+"\"><![CDATA["+lviCurItem->text(0)+"]]></name>\n"
+ " <folder class=\""+rowType+"\"><![CDATA["+lviCurItem->text(1)+"]]></folder>\n";
+ if(m_isSearchFlag)
+ {
+ rowTag += " <oldsize class=\""+rowType+"\"><![CDATA["+lviCurItem->text(2)+"]]></oldsize>\n"
+ " <replacedstrings class=\""+rowType+"\"><![CDATA["+lviCurItem->text(3)+"]]></replacedstrings>\n"
+ " <owneruser class=\""+rowType+"\"><![CDATA["+lviCurItem->text(4)+"]]></owneruser>\n"
+ " <ownergroup class=\""+rowType+"\"><![CDATA["+lviCurItem->text(5)+"]]></ownergroup>\n"
+ " </row>\n";
+ }
+ else
+ {
+ rowTag += " <oldsize class=\""+rowType+"\"><![CDATA["+lviCurItem->text(2)+"]]></oldsize>\n"
+ " <newsize class=\""+rowType+"\"><![CDATA["+lviCurItem->text(3)+"]]></newsize>\n"
+ " <replacedstrings class=\""+rowType+"\"><![CDATA["+lviCurItem->text(4)+"]]></replacedstrings>\n"
+ " <owneruser class=\""+rowType+"\"><![CDATA["+lviCurItem->text(5)+"]]></owneruser>\n"
+ " <ownergroup class=\""+rowType+"\"><![CDATA["+lviCurItem->text(6)+"]]></ownergroup>\n"
+ " </row>\n";
+ }
+
+ oTStream << rowTag;
+
+ rowType = ((rowType == "a1") ? "a2" : "a1");
+
+ if(m_isSearchFlag)
+ totalOccurrences += lviCurItem->text(3).toInt();
+ else
+ totalOccurrences += lviCurItem->text(4).toInt();
+
+ lviCurItem = lviCurItem->nextSibling();
+ } while(lviCurItem && lviCurItem != lviFirst);
+
+
+ // e) Write the end of the file
+
+ oTStream<< " </table>\n"
+ "<totaloccurrences>"
+ << totalOccurrences
+ << "</totaloccurrences>\n"
+ "</report>\n";
+
+ report.close();
+}
+
+void Report::createStyleSheet()
+{
+ QString cssFileName = m_docPath +".css";
+ QFile styleSheet(cssFileName);
+ if (!styleSheet.open( IO_WriteOnly ))
+ {
+ KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b>.</qt>").arg(cssFileName));
+ return ;
+ }
+
+ QTextStream oTStream( &styleSheet );
+
+ QString css = "title { display:block;font:40px bold sans-serif; }\n\n"
+ "createdby:before { content :\""+i18n("Created by")+": \"; }\n"
+ "createdby { display:inline; }\n\n"
+ "date:before { content :\"-"+i18n("date")+": \"; }\n"
+ "date { display:inline; }\n\n"
+ "totaloccurrences:before { content :\""+i18n("Total occurrences")+": \"; }\n"
+ "totaloccurrences { display:block;text-align:right; font-weight:bold;margin-top:5px;margin-right:5px;}\n"
+ "tablecaption {display:table-caption;font:20px bold sans-serif;}\n\n"
+ "hr {display:block;background:black;height:1px;margin:5px 0px 5px;}\n"
+ "whiteline {display:block;height:16px;}\n\n"
+ "searchfor {\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0; }\n\n";
+
+ if(!m_isSearchFlag)
+ {
+ css += "replacewith {\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0; }\n\n";
+ }
+
+ css += "folder {\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0; }\n\n"
+ "header { display: table-header-group; }\n\n"
+ "name {\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0; }\n\n"
+ "newsize {\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0;\n"
+ " text-align:right; }\n\n"
+ "oldsize {\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0;\n"
+ " text-align:right; }\n\n"
+ "ownergroup {\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0; }\n\n"
+ "owneruser {\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0; }\n\n"
+ "replacedstrings {\n"
+ " text-align:right;\n"
+ " display:table-cell;\n"
+ " border:1px solid black;\n"
+ " padding:0 7px 0; }\n\n"
+ "*[class~=header] {\n"
+ " background : lightgray;\n"
+ " text-align : center; }\n\n"
+ "row { display : table-row; }\n\n"
+ "table {\n"
+ " display:table;\n"
+ " border-collapse: collapse; }\n\n"
+ "*[class~=a1] {\n"
+ " background-color:aliceblue;\n"
+ " font-weight : bold;font-size:15px; }\n\n"
+ "*[class~=a2] {\n"
+ " background-color:khaki;\n"
+ " font-weight : bold;\n"
+ " font-size:15px; }\n\n";
+
+ oTStream << css;
+
+ styleSheet.close();
+}
+
+void Report::createDocument(const QString& docPath)
+{
+ m_docPath = docPath;
+
+ createStyleSheet();
+ createReportFile();
+}
+
diff --git a/kfilereplace/report.h b/kfilereplace/report.h
new file mode 100644
index 00000000..98996f92
--- /dev/null
+++ b/kfilereplace/report.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ report.h - Report document class
+ -------------------
+ begin : fri aug 13 15:29:46 CEST 2004
+
+ copyright : (C) 2004 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 REPORT_H
+#define REPORT_H
+
+// QT
+class QString;
+
+// KDE
+#include <klocale.h>
+#include "configurationclasses.h"
+class KListView;
+
+/** Report class is used to create a pair of files (a xml and a css file) which are
+ * a short statistical report of the operations.
+ */
+
+class Report
+{
+ private:
+ KListView* m_stringsView,
+ * m_resultsView;
+ QString m_docPath;
+ bool m_isSearchFlag;
+ RCOptions* m_option;
+
+ public:
+ Report(RCOptions* info, KListView* rv, KListView* sv) { m_option = info;
+ m_resultsView = rv;
+ m_stringsView = sv;
+ m_isSearchFlag = m_option->m_searchingOnlyMode;
+ }
+ ~Report() { m_option = 0; }
+ private:
+ void createReportFile();
+ void createStyleSheet();
+
+ public:
+ void createDocument(const QString& docPath);
+};
+
+#endif // REPORT_H
diff --git a/kfilereplace/toolbar/Makefile.am b/kfilereplace/toolbar/Makefile.am
new file mode 100644
index 00000000..1b5627ad
--- /dev/null
+++ b/kfilereplace/toolbar/Makefile.am
@@ -0,0 +1,3 @@
+appdir = $(kde_datadir)/kfilereplacepart/icons
+app_ICON = AUTO
+
diff --git a/kfilereplace/toolbar/cr22-action-back.png b/kfilereplace/toolbar/cr22-action-back.png
new file mode 100644
index 00000000..3e8f12fe
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-back.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-backup_option.png b/kfilereplace/toolbar/cr22-action-backup_option.png
new file mode 100644
index 00000000..a0e1e02f
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-backup_option.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-casesensitive_option.png b/kfilereplace/toolbar/cr22-action-casesensitive_option.png
new file mode 100644
index 00000000..6302c0f2
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-casesensitive_option.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-command_option.png b/kfilereplace/toolbar/cr22-action-command_option.png
new file mode 100644
index 00000000..1da3688b
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-command_option.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-editadd.png b/kfilereplace/toolbar/cr22-action-editadd.png
new file mode 100644
index 00000000..5eb6f503
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-editadd.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-editremove.png b/kfilereplace/toolbar/cr22-action-editremove.png
new file mode 100644
index 00000000..50117f6d
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-editremove.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-filereplace.png b/kfilereplace/toolbar/cr22-action-filereplace.png
new file mode 100644
index 00000000..c3692e11
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-filereplace.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-filesearch.png b/kfilereplace/toolbar/cr22-action-filesearch.png
new file mode 100644
index 00000000..1be59c49
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-filesearch.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-filesimulate.png b/kfilereplace/toolbar/cr22-action-filesimulate.png
new file mode 100644
index 00000000..7cc5b284
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-filesimulate.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-informations.png b/kfilereplace/toolbar/cr22-action-informations.png
new file mode 100644
index 00000000..daeb5b80
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-informations.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-invert.png b/kfilereplace/toolbar/cr22-action-invert.png
new file mode 100644
index 00000000..f3ab8be6
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-invert.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-next.png b/kfilereplace/toolbar/cr22-action-next.png
new file mode 100644
index 00000000..cfab7cfb
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-next.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-projectopen.png b/kfilereplace/toolbar/cr22-action-projectopen.png
new file mode 100644
index 00000000..607e6aa8
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-projectopen.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-recursive_option.png b/kfilereplace/toolbar/cr22-action-recursive_option.png
new file mode 100644
index 00000000..bc98df90
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-recursive_option.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-regularexpression_option.png b/kfilereplace/toolbar/cr22-action-regularexpression_option.png
new file mode 100644
index 00000000..f74c7b56
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-regularexpression_option.png
Binary files differ
diff --git a/kfilereplace/toolbar/cr22-action-unsortedList.png b/kfilereplace/toolbar/cr22-action-unsortedList.png
new file mode 100644
index 00000000..bed281f1
--- /dev/null
+++ b/kfilereplace/toolbar/cr22-action-unsortedList.png
Binary files differ
diff --git a/kfilereplace/tutorial.kwd b/kfilereplace/tutorial.kwd
new file mode 100644
index 00000000..2183e53b
--- /dev/null
+++ b/kfilereplace/tutorial.kwd
Binary files differ
diff --git a/kfilereplace/whatthis.h b/kfilereplace/whatthis.h
new file mode 100644
index 00000000..c91356dd
--- /dev/null
+++ b/kfilereplace/whatthis.h
@@ -0,0 +1,101 @@
+/***************************************************************************
+ whatthis.h - description
+ -------------------
+ begin : fri 12 march CEST 2004
+ copyright : (C) 2004 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 WHATTHIS_H
+#define WHATTHIS_H
+
+// QT
+#include <qstring.h>
+
+// KDE
+#include <klocale.h>
+
+namespace whatthisNameSpace
+{
+ //KFileReplaceView messages
+ const QString lvResultWhatthis = i18n("Shows the statistics of your operations. Note that the columns content changes depending on what kind of operation you are performing.");
+
+ const QString lvStringsWhatthis = i18n("Shows a list of strings to search for (and if you specified it, a list of strings to replace with). Use the \"add strings\" dialog to edit your string list or double click on a string.");
+
+ //KNewProjectDlg messages
+ const QString cbLocationWhatthis = i18n("Base folder for operations of search/replace. Insert path string here by hand or use the search button.");
+
+ const QString cbFilterWhatthis = i18n("Shell-like wildcards. Example: \"*.html;*.txt;*.xml\".");
+
+ const QString edSizeMinWhatthis = i18n("Insert the minimum file size you want to search, or leave it unchecked if you don't want minimum size limit.");
+
+ const QString edSizeMaxWhatthis = i18n("Insert the maximum file size you want to search, or leave it unchecked if you don't want maximum size limit.");
+
+ const QString edDateMinWhatthis = i18n("Insert the minimum value for file access date that you want to search, or leave it unchecked if you don't a minimum limit.");
+
+ const QString edDateMaxWhatthis = i18n("Insert the maximum value for file access date that you want to search, or leave it unchecked if you don't a maximum limit.");
+
+ const QString cbDateValidWhatthis = i18n("Select \"writing\" if you want to use the date of the last modification, or \"reading\" to use the the date of the last access.");
+
+ const QString chbDateMinWhatthis = i18n("Minimum value for access date.");
+
+ const QString chbDateMaxWhatthis = i18n("Maximum value for access date.");
+
+ const QString leSearchWhatthis = i18n("Insert here the string to search for.");
+
+ const QString leReplaceWhatthis = i18n("Insert here the string to replace with.");
+
+ //KOptionsDlg messages
+ const QString chbCaseSensitiveWhatthis = i18n("Enable this option if your search is case sensitive.");
+
+ const QString chbRecursiveWhatthis = i18n("Enable this option to search in sub folders too.");
+
+ const QString chbHaltOnFirstOccurrenceWhatthis = i18n("Enable this option when you are searching for a string and you are only interested to know if the string is present or not in the current file.");
+
+ const QString chbIgnoreWhitespacesWhatthis ="";
+
+ const QString chbFollowSymLinksWhatthis = i18n("If kfilereplace encounters a symbolic link treats it like a normal folder or file.");
+
+ const QString chbIgnoreHiddenWhatthis = i18n("Enable this option to ignore hidden files or folders.");
+
+ const QString chbIgnoreFilesWhatthis = i18n("If this option is enabled, KFR will show even the names of the files in which no string has been found or replaced.");
+
+ const QString chbRegularExpressionsWhatthis = i18n("Allows you to apply QT-like regular expressions on the search string. Note that a complex regular expression could affect speed performance");
+
+ const QString chbVariablesWhatthis = i18n("Enable \"commands\". For example: if search string is \"user\" and replace string is the command \"[$user:uid$]\", KFR will substitute \"user\" with the uid of the user.");
+
+ const QString chbBackupWhatthis = i18n("Enable this option if you want leave original files untouched.");
+
+ const QString chbConfirmStringsWhatthis = i18n("Enable this option if you want to be asked for single string replacement confirmation.");
+
+ //KFileReplacePart
+ const QString fileSimulateWhatthis = i18n("Enable this option to perform replacing as a simulation, i.e. without make any changes in files.");
+
+ const QString optionsRegularExpressionsWhatthis = chbRegularExpressionsWhatthis;
+
+ const QString optionsBackupWhatthis = chbBackupWhatthis;
+
+ const QString optionsCaseWhatthis = chbCaseSensitiveWhatthis;
+
+ const QString optionsVarWhatthis = chbVariablesWhatthis;
+
+ const QString optionsRecursiveWhatthis = chbRecursiveWhatthis;
+
+ //KAddStringDlg
+ const QString rbSearchOnlyWhatthis = i18n("Select search-only mode.");
+
+ const QString rbSearchReplaceWhatthis = i18n("Select search-and-replace mode.");
+
+ const QString edSearchWhatthis = i18n("Insert here a string you want search for.");
+
+ const QString edReplaceWhatthis = i18n("Insert here the string that KFR will use to replace the search string.");
+}
+#endif
diff --git a/kimagemapeditor/AUTHORS b/kimagemapeditor/AUTHORS
new file mode 100644
index 00000000..7aee7c48
--- /dev/null
+++ b/kimagemapeditor/AUTHORS
@@ -0,0 +1 @@
+Jan Schäfer <janschaefer@users.sourceforge.net>
diff --git a/kimagemapeditor/COPYING b/kimagemapeditor/COPYING
new file mode 100644
index 00000000..c7aea189
--- /dev/null
+++ b/kimagemapeditor/COPYING
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff --git a/kimagemapeditor/ChangeLog b/kimagemapeditor/ChangeLog
new file mode 100644
index 00000000..55983873
--- /dev/null
+++ b/kimagemapeditor/ChangeLog
@@ -0,0 +1,105 @@
+1.0 :
+- New features :
+ * French translation - Thanks to Germain Chazot
+ - KImageMapEditor is now translated to 4 languages :
+ German, spanish, french and dutch
+ * Improved session management
+ * Made it possible to start with the last opened document
+ * The ImageMapChoosDialog is only shown, if there are more then one map to choose.
+- Bug fixes :
+ * Fixed the bug that prevents from dropping html or image files
+ * Fixed another Mandrake compilation problem
+ * The area preview image size can now be changed by the properties dialog
+ * The highlight and show alt tag settings are now saved when used within Quanta.
+ * Completed spanish translation - Thanks to Antonio Crevillén
+
+1.0b3 :
+- New features :
+ * Added dutch translation - Thanks to Fabrice Mous
+- Bug fixes :
+ * added namespace to cout : std::cout to solve the compilation problem under Mandrake
+ * saveAs works now
+ * made the KPart readwrite only to work within Quanta correctly
+
+1.0b2 :
+- Bug fixes :
+ * Opening of an image over the toolbar or the menu entry file->open add
+ the image now correctly to the image list.
+ * The command line option --stdout works again.
+
+1.0b :
+- Note : Because of various internal modifications, this is intended to be a beta
+ release. So it's possible that KImageMapEditor may crash and/or
+ the content of the currently editing html file could be corrupted
+ or be lost at all.
+ KImageMapEditor therefore creates a backup file everytime you
+ save an html file. It ends with a ~.
+ Please only delete this file if you are sure that the original file
+ isn't corrupted.
+- New features :
+ * Converted the program to the KPart architecture, it can now be used as a
+ imagemap viewer plugin in Konqueror or as an edit plugin in Quanta.
+ * It's now possible to really edit a html file instead of creating always
+ a new one with only one imagemap.
+ * Added a listview of all imagemaps of the current editing html files.
+ It's now possible to switch between the different maps, to delete maps and
+ to add new maps to the html file.
+ * Added a listview of all images that are contained in the current html file.
+ It's now possible to switch between these images.
+ * Spanish translation - Thanks to Antonio Crevillén
+- Bug fixes :
+ * When KImageMapEditor was not properly installed with make install and
+ the required image files couldn't be found, KImageMapEditor now shows
+ an error message and exit(1), instead of crashing.
+
+0.9.5 :
+- New features :
+ * Tool for adding and removing points to/from a polygon with the mouse
+ * Freehand tool for drawing polygons
+ * German translation
+ * More zoom modes
+- Bug fixes :
+ * Some undo bugs which results in a crash -> fixed
+ * When switching from non-highlight mode to highlight mode the areas
+ weren't highlighted correctly -> fixed
+ * Crash when moving an area outside the drawing zone -> fixed
+
+0.9.4 :
+- New features :
+ * Areas can be highlighted
+ * Alt. text can be shown
+ * PHP-files can be read
+ * Property dialog extended
+ * New action : close file
+
+0.9.3 :
+- New features :
+ * Multiselection
+ * Keyboard can be used better
+ * New mouse cursors
+ * New Action : delete
+ * other new Actions
+
+0.9.2 :
+- New features :
+ * Undo / Redo for almost all actions
+ * Middle mouse click opens the properties dialog
+ * Possiblity of enable / disable the default area
+
+- Bug fixes :
+ * It's now possible to save to a file without an *.html,*.htm extension
+ * Creating a rectangle with a negative size ( and a following crash ) is no longer possible.
+
+0.9.1 :
+- New features :
+ * Better way of editing the area coordinates manually
+ - Possibility of adding and removing points to a polygon
+ * Cursor shape changes to indicate moving or resizing
+ * Circle drawing is now perfekt
+ * Possibility of changing the order of the areas
+
+- Bug fixes :
+ * When saving to an HTML file the ending </html> tag is no longer missing.
+ * When adding an area and pressing cancel the area will not be added.
+ * Restoring the window size works now
+
diff --git a/kimagemapeditor/INSTALL b/kimagemapeditor/INSTALL
new file mode 100644
index 00000000..02a4a074
--- /dev/null
+++ b/kimagemapeditor/INSTALL
@@ -0,0 +1,167 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes a while. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 4. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
diff --git a/kimagemapeditor/Makefile.am b/kimagemapeditor/Makefile.am
new file mode 100644
index 00000000..3f2ed486
--- /dev/null
+++ b/kimagemapeditor/Makefile.am
@@ -0,0 +1,63 @@
+SUBDIRS = pics
+
+bin_PROGRAMS = kimagemapeditor
+kde_module_LTLIBRARIES = libkimagemapeditor.la
+
+METASOURCES = AUTO
+
+noinst_LTLIBRARIES = libkimagemapeditorcommon.la
+
+libkimagemapeditorcommon_la_SOURCES = \
+ qextfileinfo.cpp \
+ areacreator.cpp \
+ kimearea.cpp \
+ kimecommands.cpp \
+ kimedialogs.cpp \
+ kimagemapeditor.cpp \
+ drawzone.cpp \
+ arealistview.cpp \
+ imageslistview.cpp \
+ mapslistview.cpp
+
+libkimagemapeditor_la_SOURCES = \
+ dummy.cpp
+
+kimagemapeditor_SOURCES = \
+ main.cpp \
+ kimeshell.cpp
+
+
+noinst_HEADERS = \
+ qextfileinfo.h \
+ areacreator.h \
+ kimearea.h \
+ kimecommands.h \
+ kimedialogs.h \
+ kimagemapeditor.h \
+ drawzone.h \
+ kimeshell.h
+
+
+libkimagemapeditor_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+libkimagemapeditor_la_LIBADD = libkimagemapeditorcommon.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML)
+
+kimagemapeditor_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kimagemapeditor_LDADD = libkimagemapeditorcommon.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML)
+
+# set the include path for X, qt and KDE
+INCLUDES= $(all_includes)
+
+xdg_apps_DATA = kimagemapeditor.desktop
+
+rcdir = $(kde_datadir)/kimagemapeditor
+rc_DATA = kimagemapeditorui.rc \
+ kimagemapeditorpartui.rc
+
+kde_services_DATA = kimagemapeditorpart.desktop
+
+messages: rc.cpp
+ LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
+ if test -n "$$LIST"; then \
+ $(XGETTEXT) $$LIST -o $(podir)/kimagemapeditor.pot; \
+ fi
+
diff --git a/kimagemapeditor/NEWS b/kimagemapeditor/NEWS
new file mode 100644
index 00000000..3957e33d
--- /dev/null
+++ b/kimagemapeditor/NEWS
@@ -0,0 +1,13 @@
+1.0 :
+- New features :
+ * French translation - Thanks to Germain Chazot
+ - KImageMapEditor is now translated to 4 languages :
+ German, spanish, french and dutch
+ * Session management
+ * Made it possible to start with the last opened document
+- Bug fixes :
+ * Fixed the bug that prevents from dropping html or image files
+ * Fixed another Mandrake compilation problem
+ * The area preview image size can now be changed by the properties dialog
+ * The highlight and show alt tag settings are now saved when used within Quanta.
+ * Completed spanish translation - Thanks to Antonio Crevillén
diff --git a/kimagemapeditor/README b/kimagemapeditor/README
new file mode 100644
index 00000000..b04c6794
--- /dev/null
+++ b/kimagemapeditor/README
@@ -0,0 +1,12 @@
+
+ ---------------------------------
+
+ KImageMapEditor
+
+ An HTML image map editor
+
+ Jan Schäfer
+
+ janschaefer@users.sourceforge.net
+
+ ---------------------------------
diff --git a/kimagemapeditor/TODO b/kimagemapeditor/TODO
new file mode 100644
index 00000000..c629ca1d
--- /dev/null
+++ b/kimagemapeditor/TODO
@@ -0,0 +1,5 @@
+- Create a handbook
+- Add Tip Of The Day
+- Translate to more languages ( help would be really appreciated )
+- Have fun with it ;-)
+
diff --git a/kimagemapeditor/VERSION b/kimagemapeditor/VERSION
new file mode 100644
index 00000000..51164aba
--- /dev/null
+++ b/kimagemapeditor/VERSION
@@ -0,0 +1 @@
+KImageMapEditor v1.0.1
diff --git a/kimagemapeditor/areacreator.cpp b/kimagemapeditor/areacreator.cpp
new file mode 100644
index 00000000..739409fc
--- /dev/null
+++ b/kimagemapeditor/areacreator.cpp
@@ -0,0 +1,44 @@
+/***************************************************************************
+ areacreator.cpp - description
+ -------------------
+ begin : Wed Apr 3 2002
+ copyright : (C) 2002 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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. *
+ * *
+ ***************************************************************************/
+
+#include "areacreator.h"
+
+
+
+Area* AreaCreator::create( Area::ShapeType type)
+{
+ switch ( type ) {
+ case Area::Rectangle : return new RectArea();
+ case Area::Circle : return new CircleArea();
+ case Area::Polygon : return new PolyArea();
+ case Area::Default : return new DefaultArea();
+ case Area::Selection : return new AreaSelection();
+ default : return new Area();
+ }
+}
+
+
+Area* AreaCreator::create( KImageMapEditor::ToolType type)
+{
+ switch ( type ) {
+ case KImageMapEditor::Rectangle : return new RectArea();
+ case KImageMapEditor::Circle : return new CircleArea();
+ case KImageMapEditor::Polygon : return new PolyArea();
+ case KImageMapEditor::Freehand : return new PolyArea();
+ default : return new Area();
+ }
+}
diff --git a/kimagemapeditor/areacreator.h b/kimagemapeditor/areacreator.h
new file mode 100644
index 00000000..c232d4f3
--- /dev/null
+++ b/kimagemapeditor/areacreator.h
@@ -0,0 +1,35 @@
+/***************************************************************************
+ areacreator.h - description
+ -------------------
+ begin : Wed Apr 3 2002
+ copyright : (C) 2002 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 AREACREATOR_H
+#define AREACREATOR_H
+
+
+#include "kimagemapeditor.h"
+
+/**
+ * A small creator class which follows the
+ * factory method pattern
+ */
+class AreaCreator
+{
+ public :
+ static Area* create( Area::ShapeType );
+ static Area* create( KImageMapEditor::ToolType);
+};
+
+#endif
diff --git a/kimagemapeditor/arealistview.cpp b/kimagemapeditor/arealistview.cpp
new file mode 100644
index 00000000..80cd3265
--- /dev/null
+++ b/kimagemapeditor/arealistview.cpp
@@ -0,0 +1,67 @@
+/***************************************************************************
+ arealistview.cpp - description
+ -------------------
+ begin : Weg Feb 26 2003
+ copyright : (C) 2003 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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. *
+ * *
+ ***************************************************************************/
+
+// QT
+#include <klistview.h>
+#include <qpushbutton.h>
+#include <qhbox.h>
+#include <qwhatsthis.h>
+#include <qtooltip.h>
+
+// KDE
+#include <kiconloader.h>
+#include <klocale.h>
+
+// local
+#include "kimearea.h"
+#include "arealistview.h"
+
+
+AreaListView::AreaListView(QWidget *parent, const char *name)
+ : QVBox(parent, name)
+{
+ listView = new KListView(this);
+ listView->addColumn(i18n("Areas"));
+ listView->addColumn(i18n("Preview"));
+
+ listView->setMultiSelection(true);
+ listView->setSelectionMode( QListView::Extended );
+ listView->setSorting(-1); // The user can't sort by clicking on the header
+ listView->setFullWidth(true);
+
+
+ QWhatsThis::add( listView, i18n("<h3>Area List</h3>The area list shows you all areas of the map.<br>"
+ "The left column shows the link associated with the area; the right "
+ "column shows the part of the image that is covered by the area.<br>"
+ "The maximum size of the preview images can be configured."));
+ QToolTip::add( listView, i18n("A list of all areas"));
+
+ QHBox *hbox= new QHBox(this);
+ upBtn= new QPushButton("",hbox);
+ upBtn->setIconSet(SmallIconSet("up"));
+
+ downBtn= new QPushButton("",hbox);
+ downBtn->setIconSet(SmallIconSet("down"));
+
+}
+
+
+AreaListView::~AreaListView()
+{
+}
+
+#include "arealistview.moc"
diff --git a/kimagemapeditor/arealistview.h b/kimagemapeditor/arealistview.h
new file mode 100644
index 00000000..6037f5ee
--- /dev/null
+++ b/kimagemapeditor/arealistview.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ arealistview.h - description
+ -------------------
+ begin : Weg Feb 26 2003
+ copyright : (C) 2003 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 _AREALISTVIEW_H_
+#define _AREALISTVIEW_H_
+
+#include <qwidget.h>
+#include <qvbox.h>
+
+class KListView;
+class QPushButton;
+class Area;
+
+/**
+ * This class consists of a ListView and two arrow buttons on the bottom.
+ * It shows all Areas of the current map.
+ * Jan Schaefer
+ **/
+class AreaListView : public QVBox
+{
+ Q_OBJECT
+
+public:
+ AreaListView(QWidget *parent, const char *name);
+ ~AreaListView();
+
+ KListView* listView;
+ QPushButton *upBtn;
+ QPushButton *downBtn;
+
+};
+
+#endif
diff --git a/kimagemapeditor/configure.in.in b/kimagemapeditor/configure.in.in
new file mode 100644
index 00000000..f9c208de
--- /dev/null
+++ b/kimagemapeditor/configure.in.in
@@ -0,0 +1,6 @@
+#MIN_CONFIG
+
+AM_INIT_AUTOMAKE(kimagemapeditor, 1.0)
+AC_C_BIGENDIAN
+AC_CHECK_KDEMAXPATHLEN
+
diff --git a/kimagemapeditor/drawzone.cpp b/kimagemapeditor/drawzone.cpp
new file mode 100644
index 00000000..a5bf5612
--- /dev/null
+++ b/kimagemapeditor/drawzone.cpp
@@ -0,0 +1,896 @@
+/***************************************************************************
+ drawzone.cpp - description
+ -------------------
+ begin : Wed Apr 4 2001
+ copyright : (C) 2001 by Jan Sch�er
+ email : j_schaef@informatik.uni-kl.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
+#include <qbitmap.h>
+#include <qpainter.h>
+#include <qdragobject.h>
+#include <qpixmap.h>
+
+// KDE
+#include <kdebug.h>
+#include <kurldrag.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+#include <kapplication.h>
+#include <kmimetype.h>
+
+// Local
+#include "drawzone.h"
+#include "kimagemapeditor.h"
+#include "kimecommands.h"
+#include "areacreator.h"
+
+#include "kimecommon.h"
+
+DrawZone::DrawZone(QWidget *parent,KImageMapEditor* _imageMapEditor)
+ : QScrollView(parent)
+{
+ imageMapEditor=_imageMapEditor;
+// setPicture(QImage());
+ currentAction=None;
+ currentArea=0L;
+ oldArea=0L;
+ _zoom=1;
+ if (imageMapEditor->isReadWrite()) {
+ viewport()->setMouseTracking(true);
+ viewport()->setAcceptDrops(true);
+ this->setAcceptDrops(true);
+ }
+ else
+ viewport()->setMouseTracking(false);
+
+ setDragAutoScroll(true);
+
+ // The cross rectangle cursor
+ QBitmap b(32,32,true);
+ QBitmap b2(32,32,true);
+ QPainter p(&b);
+ // the cross
+ p.drawLine(0,8,6,8);
+ p.drawLine(10,8,16,8);
+ p.drawLine(8,0,8,6);
+ p.drawLine(8,10,8,16);
+ // the rectangle
+ p.drawRect(17,17,8,6);
+
+ p.end();
+
+ p.begin(&b2);
+ // the cross black lines
+ p.drawLine(0,8,6,8);
+ p.drawLine(10,8,16,8);
+ p.drawLine(8,0,8,6);
+ p.drawLine(8,10,8,16);
+
+ // the cross white lines
+ p.drawLine(0,7,6,7);
+ p.drawLine(10,7,16,7);
+ p.drawLine(7,0,7,6);
+ p.drawLine(7,10,7,16);
+
+ // the cross white lines
+ p.drawLine(0,9,6,9);
+ p.drawLine(10,9,16,9);
+ p.drawLine(9,0,9,6);
+ p.drawLine(9,10,9,16);
+
+ // the rectangles
+ p.drawRect(17,17,8,6); // black
+ p.drawRect(18,18,6,4); // white
+ p.drawRect(16,16,10,8); // white
+
+ p.end();
+
+ RectangleCursor = QCursor(b,b2,8,8);
+
+
+ // The cross circle cursor
+ b = QBitmap(32,32,true);
+ b2 = QBitmap(32,32,true);
+ p.begin(&b);
+ // the cross
+ p.drawLine(0,8,6,8);
+ p.drawLine(10,8,16,8);
+ p.drawLine(8,0,8,6);
+ p.drawLine(8,10,8,16);
+ // the circle
+ p.drawEllipse(17,17,8,8);
+
+ p.end();
+
+ p.begin(&b2);
+ // the cross black lines
+ p.drawLine(0,8,6,8);
+ p.drawLine(10,8,16,8);
+ p.drawLine(8,0,8,6);
+ p.drawLine(8,10,8,16);
+
+ // the cross white lines
+ p.drawLine(0,7,6,7);
+ p.drawLine(10,7,16,7);
+ p.drawLine(7,0,7,6);
+ p.drawLine(7,10,7,16);
+
+ // the cross white lines
+ p.drawLine(0,9,6,9);
+ p.drawLine(10,9,16,9);
+ p.drawLine(9,0,9,6);
+ p.drawLine(9,10,9,16);
+
+ // the circles
+ p.drawEllipse(17,17,8,8); // black
+ p.drawEllipse(16,16,10,10); // white
+ p.drawEllipse(18,18,6,6); // white
+
+ p.end();
+
+ CircleCursor = QCursor(b,b2,8,8);
+
+ QString path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/polygoncursor.png" ) + "kimagemapeditor/polygoncursor.png";
+ PolygonCursor = QCursor(QPixmap(path),8,8);
+
+ path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/freehandcursor.png" ) + "kimagemapeditor/freehandcursor.png";
+ FreehandCursor = QCursor(QPixmap(path),8,8);
+
+ path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/addpointcursor.png" ) + "kimagemapeditor/addpointcursor.png";
+ AddPointCursor = QCursor(QPixmap(path),8,8);
+
+ path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/removepointcursor.png" ) + "kimagemapeditor/removepointcursor.png";
+ RemovePointCursor = QCursor(QPixmap(path),8,8);
+}
+
+DrawZone::~DrawZone(){
+}
+
+void DrawZone::setPicture(const QImage &_image) {
+ image=_image;
+//- zoomedImage.convertFromImage(image);
+ setZoom(_zoom);
+}
+
+void DrawZone::setZoom(double z)
+{
+ _zoom=z;
+ imageRect.setHeight(myround(image.height()*_zoom));
+ imageRect.setWidth(myround(image.width()*_zoom));
+ zoomedImage=QPixmap(imageRect.width(),imageRect.height());
+ QPainter p(&zoomedImage);
+ p.scale(z,z);
+ QPixmap pix;
+ pix.convertFromImage(image);
+ // if the picture has transparent areas,
+ // fill them with Gimp like background
+ if (pix.mask()) {
+ QPixmap backPix(32,32);
+ QPainter p2(&backPix);
+ p2.fillRect(0,0,32,32,QColor(156,149,156));
+ p2.fillRect(0,16,16,16,QColor(98,105,98));
+ p2.fillRect(16,0,16,16,QColor(98,105,98));
+ p2.flush();
+ p.setPen(QPen());
+ p.fillRect(imageRect.left(),imageRect.top(),imageRect.width(),imageRect.height(),QBrush(QColor("black"),backPix));
+ }
+ p.drawPixmap(imageRect.left(),imageRect.top(),pix);
+ p.flush();
+ resizeContents(visibleWidth()>imageRect.width() ? visibleWidth() : imageRect.width(),
+ visibleHeight()>imageRect.height() ? visibleHeight() : imageRect.height());
+ repaintContents(0,0,contentsWidth(),contentsHeight(),true);
+}
+
+QPoint DrawZone::translateFromZoom(const QPoint & p) const {
+ return QPoint((int)(p.x()/_zoom),(int)(p.y()/_zoom));
+}
+
+QRect DrawZone::translateFromZoom(const QRect & p) const {
+ return QRect((int)(p.x()/_zoom),(int) (p.y()/_zoom),
+ (int)(p.width()/_zoom),(int)(p.height()/_zoom));
+}
+
+QPoint DrawZone::translateToZoom(const QPoint & p) const {
+ return QPoint(myround(p.x()*_zoom),myround(p.y()*_zoom));
+}
+
+QRect DrawZone::translateToZoom(const QRect & r) const {
+// return QRect(round(r.x()*_zoom),round(r.y()*_zoom),
+// round(r.width()*_zoom),round(r.height()*_zoom));
+ return QRect((int)(r.x()*_zoom),(int)(r.y()*_zoom),
+ (int)(r.width()*_zoom+2),(int)(r.height()*_zoom+2));
+}
+
+void DrawZone::contentsMouseDoubleClickEvent(QMouseEvent* e) {
+ if ( ! imageMapEditor->isReadWrite())
+ return;
+
+ QPoint point=e->pos();
+ point-=imageRect.topLeft();
+ point=translateFromZoom(point);
+ if ( currentAction==None &&
+ (currentArea=imageMapEditor->onArea(point)))
+ {
+ imageMapEditor->deselectAll();
+ imageMapEditor->select(currentArea);
+ currentArea=imageMapEditor->selected();
+ imageMapEditor->showTagEditor(imageMapEditor->selected());
+ }
+
+}
+
+void DrawZone::contentsMousePressEvent(QMouseEvent* e)
+{
+ if ( ! imageMapEditor->isReadWrite())
+ return;
+
+ drawStart=e->pos();
+ // Check if it's on picture if not
+ // move it to the picture's border
+ if (!imageRect.contains(drawStart)) {
+ if (drawStart.x()>imageRect.right())
+ drawStart.setX(imageRect.right());
+ if (drawStart.x()<imageRect.left())
+ drawStart.setX(imageRect.left());
+ if (drawStart.y()>imageRect.bottom())
+ drawStart.setY(imageRect.bottom());
+ if (drawStart.y()<imageRect.top())
+ drawStart.setY(imageRect.top());
+ }
+
+ // Translate it to picture coordinates
+ drawStart-=imageRect.topLeft();
+ QPoint zoomedPoint = drawStart;
+ drawStart=translateFromZoom(drawStart);
+ delete oldArea;
+ oldArea=0L;
+
+ if (currentArea)
+ {
+ oldArea=currentArea->clone();
+ }
+
+ if ( currentAction==None ) {
+ if (e->button()==RightButton)
+ {
+ if ( (currentArea=imageMapEditor->onArea(drawStart)) )
+ {
+ if ( ! currentArea->isSelected())
+ {
+ imageMapEditor->deselectAll();
+ imageMapEditor->select(currentArea);
+ }
+ currentArea=imageMapEditor->selected();
+ }
+
+ imageMapEditor->slotShowMainPopupMenu(e->globalPos());
+
+ }
+ else
+ if (e->button()==MidButton) {
+ contentsMouseDoubleClickEvent(e);
+ }
+ else // LeftClick on selectionpoint
+ if ((currentArea=imageMapEditor->selected()) &&
+ (currentSelectionPoint=currentArea->onSelectionPoint(zoomedPoint,_zoom)))
+ {
+ oldArea=currentArea->clone();
+
+ if ( (imageMapEditor->currentToolType() == KImageMapEditor::RemovePoint) &&
+ (imageMapEditor->selected()->selectionPoints()->count()>3) )
+ {
+ currentAction=RemovePoint;
+ }
+ else
+ {
+ currentAction=MoveSelectionPoint;
+ currentArea->setMoving(true);
+ }
+
+ } else // leftclick not on selectionpoint but on area
+ if ((currentArea=imageMapEditor->onArea(drawStart)))
+ {
+ if ( imageMapEditor->currentToolType() == KImageMapEditor::AddPoint )
+ {
+ currentAction=AddPoint;
+ viewport()->setCursor(AddPointCursor);
+ oldArea=currentArea->clone();
+ }
+ else
+ {
+ currentAction=MoveArea;
+ viewport()->setCursor(sizeAllCursor);
+
+ if ( currentArea->isSelected() ) {
+ if ( (e->state() & ControlButton) )
+ imageMapEditor->deselect(currentArea);
+ } else
+ {
+ if ( (e->state() & ControlButton) )
+ imageMapEditor->select( currentArea );
+ else {
+ imageMapEditor->deselectAll();
+ imageMapEditor->select( currentArea );
+ }
+ }
+
+ currentArea = imageMapEditor->selected();
+ currentArea->setMoving(true);
+
+ oldArea=currentArea->clone();
+ }
+ }
+ else // leftclick on the background
+ if ( (imageMapEditor->currentToolType()==KImageMapEditor::Rectangle) ||
+ (imageMapEditor->currentToolType()==KImageMapEditor::Circle) ||
+ (imageMapEditor->currentToolType()==KImageMapEditor::Polygon) ||
+ (imageMapEditor->currentToolType()==KImageMapEditor::Freehand))
+ {
+ currentArea=AreaCreator::create(imageMapEditor->currentToolType());
+
+ currentArea->setRect(QRect(drawStart,drawStart));
+ currentArea->setSelected(false);
+ imageMapEditor->deselectAll();
+
+ switch (imageMapEditor->currentToolType()) {
+ case KImageMapEditor::Rectangle : currentAction=DrawRectangle; break;
+ case KImageMapEditor::Circle : currentAction=DrawCircle; break;
+ case KImageMapEditor::Polygon :
+ currentAction=DrawPolygon;
+ currentArea->addCoord(drawStart);
+ currentSelectionPoint=currentArea->selectionPoints()->last();
+ break;
+ case KImageMapEditor::Freehand :
+ currentAction=DrawFreehand;
+ //currentArea->addCoord(drawStart);
+ currentArea->setFinished(false);
+ break;
+ default: break;
+ }
+ }
+ else
+ // leftclicked with the arrow at an areafree position
+ if (imageMapEditor->currentToolType()==KImageMapEditor::Selection)
+ {
+ currentArea=0L;
+ imageMapEditor->deselectAll();
+ // Start drawing a selection rectangle
+ currentAction=DoSelect;
+ oldSelectionRect = imageRect;
+ }
+ } else
+ if ( currentAction==DrawPolygon) {
+
+ }
+
+ QRect r;
+ if (oldArea)
+ r=oldArea->selectionRect();
+ if (currentArea) {
+ r= r | currentArea->selectionRect();
+ repaintContents(translateToZoom(r),false);
+ }
+
+
+}
+
+void DrawZone::contentsMouseReleaseEvent(QMouseEvent *e) {
+ if ( ! imageMapEditor->isReadWrite())
+ return;
+
+ QPoint drawEnd=e->pos();
+
+ // Check if it's on picture if not
+ // move it to the picture's border
+ if (!imageRect.contains(drawEnd)) {
+ if (drawEnd.x()>imageRect.right())
+ drawEnd.setX(imageRect.right());
+ if (drawEnd.x()<imageRect.left())
+ drawEnd.setX(imageRect.left());
+ if (drawEnd.y()>imageRect.bottom())
+ drawEnd.setY(imageRect.bottom());
+ if (drawEnd.y()<imageRect.top())
+ drawEnd.setY(imageRect.top());
+ }
+ // Translate it to picture coordinates
+ drawEnd-=imageRect.topLeft();
+ QPoint zoomedPoint=drawEnd;
+
+ drawEnd=translateFromZoom(drawEnd);
+
+ if (currentAction==DrawCircle || currentAction==DrawRectangle) {
+ currentAction=None;
+ imageMapEditor->commandHistory()->addCommand(
+ new CreateCommand( imageMapEditor, currentArea ), true);
+ } else
+ if (currentAction==DrawPolygon) {
+ // If the number of Polygonpoints is more than 2
+ // and clicked on the first PolygonPoint or
+ // the right Button was pressed the Polygon is finished
+ if ((currentArea->selectionPoints()->count()>2)
+ && (currentArea->selectionPoints()->first()->contains(drawEnd)
+ || (e->button()==RightButton)))
+ {
+ currentArea->setFinished(true);
+ currentAction=None;
+ imageMapEditor->commandHistory()->addCommand(
+ new CreateCommand( imageMapEditor, currentArea ), true);
+ } else
+ {
+ currentArea->insertCoord(currentArea->countSelectionPoints()-1, drawEnd);
+ currentSelectionPoint=currentArea->selectionPoints()->last();
+ }
+ } else
+ if (currentAction==DrawFreehand)
+ {
+ currentArea->setFinished(true);
+ currentArea->simplifyCoords();
+ currentAction=None;
+ imageMapEditor->commandHistory()->addCommand(
+ new CreateCommand( imageMapEditor, currentArea ), true);
+ } else
+ if (currentAction==MoveArea) {
+ QPoint p1 = oldArea->rect().topLeft();
+ QPoint p2 = imageMapEditor->selected()->rect().topLeft();
+
+ if (p1 != p2)
+ {
+ imageMapEditor->commandHistory()->addCommand(
+ new MoveCommand( imageMapEditor, imageMapEditor->selected(), oldArea->rect().topLeft()),true);
+ imageMapEditor->slotAreaChanged(currentArea);
+ } else
+ imageMapEditor->updateSelection();
+
+ currentAction=None;
+ } else
+ if (currentAction==MoveSelectionPoint) {
+ imageMapEditor->commandHistory()->addCommand(
+ new ResizeCommand( imageMapEditor, imageMapEditor->selected(), oldArea),true);
+ imageMapEditor->slotAreaChanged(currentArea);
+ currentAction=None;
+ } else
+ if (currentAction==RemovePoint) {
+ if (currentSelectionPoint==currentArea->onSelectionPoint(zoomedPoint,_zoom))
+ {
+ currentArea->removeSelectionPoint(currentSelectionPoint);
+
+ imageMapEditor->commandHistory()->addCommand(
+ new RemovePointCommand( imageMapEditor, imageMapEditor->selected(), oldArea),true);
+ imageMapEditor->slotAreaChanged(currentArea);
+ }
+ currentAction=None;
+ } else
+ if (currentAction==AddPoint)
+ {
+ if (currentArea==imageMapEditor->onArea(drawEnd))
+ {
+ imageMapEditor->commandHistory()->addCommand(
+ new AddPointCommand( imageMapEditor, imageMapEditor->selected(), drawEnd),true);
+ imageMapEditor->slotAreaChanged(currentArea);
+ }
+ currentAction=None;
+ } else
+ if (currentAction==DoSelect) {
+ currentAction=None;
+
+ QRect r(drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y());
+ r = r.normalize();
+
+ AreaListIterator it=imageMapEditor->areaList();
+ for ( ; it.current() != 0L ; ++it ) {
+ if ( it.current()->rect().intersects(r) )
+ {
+ if (!it.current()->isSelected() )
+ imageMapEditor->selectWithoutUpdate( it.current() );
+ }
+ else
+ if (it.current()->isSelected())
+ imageMapEditor->deselectWithoutUpdate( it.current() );
+ }
+
+ imageMapEditor->updateActionAccess();
+ imageMapEditor->updateSelection();
+ repaintContents(imageRect,false);
+ } else {
+ currentAction=None;
+ }
+ imageMapEditor->slotChangeStatusCoords(drawEnd.x(),drawEnd.y());
+ if (currentArea)
+ {
+ currentArea->setMoving(false);
+ repaintArea(*currentArea);
+ }
+ delete oldArea;
+ oldArea=0L;
+// repaintContents(0,0,contentsWidth(),contentsHeight(),false);
+ imageMapEditor->slotUpdateSelectionCoords();
+}
+
+
+void DrawZone::contentsMouseMoveEvent(QMouseEvent *e)
+{
+ if ( ! imageMapEditor->isReadWrite())
+ return;
+
+
+ drawCurrent=e->pos();
+
+ // If outside the image
+ // set it to the border
+ if (!imageRect.contains(drawCurrent)) {
+ if (drawCurrent.x()>imageRect.right())
+ drawCurrent.setX(imageRect.right());
+ if (drawCurrent.x()<imageRect.left())
+ drawCurrent.setX(imageRect.left());
+ if (drawCurrent.y()>imageRect.bottom())
+ drawCurrent.setY(imageRect.bottom());
+ if (drawCurrent.y()<imageRect.top())
+ drawCurrent.setY(imageRect.top());
+ }
+
+ // Translate to image coordinates
+ drawCurrent-=imageRect.topLeft();
+ QPoint zoomedPoint=drawCurrent;
+ drawCurrent=translateFromZoom(drawCurrent);
+
+ if (currentAction==DrawRectangle) {
+ // To avoid flicker, only repaint the minimum rect
+ QRect oldRect=translateToZoom(currentArea->rect());
+ currentArea->setRect(QRect(drawStart,drawCurrent).normalize());
+ QRect newRect=translateToZoom(currentArea->selectionRect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ imageMapEditor->slotUpdateSelectionCoords( currentArea->rect() );
+ } else
+ if (currentAction==DrawCircle) {
+ QRect oldRect=translateToZoom(currentArea->rect());
+
+ // We don't want ellipses
+ int maxDistance=myabs(drawStart.x()-drawCurrent.x()) >
+ myabs(drawStart.y()-drawCurrent.y()) ?
+ myabs(drawStart.x()-drawCurrent.x()) :
+ myabs(drawStart.y()-drawCurrent.y()) ;
+
+ int xDiff=maxDistance;
+ int yDiff=maxDistance;
+
+ if ( drawStart.x()-drawCurrent.x() > 0)
+ xDiff=-xDiff;
+
+ if ( drawStart.y()-drawCurrent.y() > 0)
+ yDiff=-yDiff;
+
+ QPoint endPoint( drawStart.x()+xDiff, drawStart.y()+yDiff);
+
+ currentArea->setRect(QRect(drawStart,endPoint).normalize());
+ QRect newRect=translateToZoom(currentArea->rect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ imageMapEditor->slotUpdateSelectionCoords( currentArea->rect() );
+ } else
+ if ( currentAction==DrawPolygon ) {
+ QRect oldRect=translateToZoom(currentArea->rect());
+ currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent);
+ QRect newRect=translateToZoom(currentArea->rect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ } else
+ if ( currentAction==DrawFreehand) {
+ QRect oldRect=translateToZoom(currentArea->rect());
+ currentArea->insertCoord(currentArea->countSelectionPoints(), drawCurrent);
+ QRect newRect=translateToZoom(currentArea->rect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ } else
+ if ( currentAction==MoveArea ) {
+ QRect oldRect=translateToZoom(currentArea->selectionRect());
+ currentArea->moveBy((drawCurrent-drawStart).x(),(drawCurrent-drawStart).y());
+ QRect newRect=translateToZoom(currentArea->selectionRect());
+ QRect r=oldRect | newRect;
+ currentArea->setMoving(true);
+ repaintContents(r,false);
+ drawStart=drawCurrent;
+ imageMapEditor->slotUpdateSelectionCoords();
+ } else
+ if ( currentAction==MoveSelectionPoint ) {
+ QRect oldRect=translateToZoom(currentArea->selectionRect());
+ currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent);
+ QRect newRect=translateToZoom(currentArea->selectionRect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ imageMapEditor->slotUpdateSelectionCoords();
+ } else
+ if (currentAction==DoSelect) {
+
+ QRect r(drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y());
+ r = r.normalize();
+// r = translateFromZoom(r);
+/*
+ AreaListIterator it=imageMapEditor->areaList();
+ for ( ; it.current() != 0L ; ++it ) {
+ if ( it.current()->rect().intersects(r) )
+ {
+ if (!it.current()->isSelected() )
+ imageMapEditor->selectWithoutUpdate( it.current() );
+ }
+ else
+ if (it.current()->isSelected())
+ imageMapEditor->deselectWithoutUpdate( it.current() );
+ }
+*/
+ // We don't have to repaint the hole selection rectangle
+ // only the borders have to be repainted.
+ // So we have to create 4 rectangles for every rectangle
+ // which represent the borders and then repaint them.
+
+ QRect lb,rb,tb,bb;
+ createBorderRectangles(translateToZoom(r),lb,rb,tb,bb);
+ repaintContents(lb,false);
+ repaintContents(rb,false);
+ repaintContents(tb,false);
+ repaintContents(bb,false);
+
+ createBorderRectangles(translateToZoom(oldSelectionRect),lb,rb,tb,bb);
+ repaintContents(lb,false);
+ repaintContents(rb,false);
+ repaintContents(tb,false);
+ repaintContents(bb,false);
+
+// repaintContents(oldSelectionRect | r,false);
+ oldSelectionRect = r;
+// repaintContents(translateToZoom(r),false);
+//+ imageMapEditor->updateSelection();
+
+
+// QRect r(drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y());
+// r = r.normalize();
+// QRect r2(drawStart.x(),drawStart.y(),drawOld.x()-drawStart.x(),drawOld.y()-drawStart.y());
+// r2 = r2.normalize();
+// r = translateToZoom(r | r2);
+// repaintContents(r,false);
+ } else
+ if ( currentAction==None )
+ {
+ if ( imageMapEditor->selected() &&
+ imageMapEditor->selected()->onSelectionPoint(zoomedPoint,_zoom ))
+ {
+ if (imageMapEditor->selected()->type()==Area::Polygon)
+ {
+ if ((imageMapEditor->currentToolType()==KImageMapEditor::RemovePoint) &&
+ (imageMapEditor->selected()->selectionPoints()->count()>3) )
+ {
+ viewport()->setCursor(RemovePointCursor);
+ }
+ else
+ {
+ viewport()->setCursor(pointingHandCursor);
+ }
+ }
+ else
+ {
+ QPoint center=imageMapEditor->selected()->rect().center();
+ if (drawCurrent.x() < center.x()) {
+ if (drawCurrent.y() < center.y())
+ viewport()->setCursor(sizeFDiagCursor);
+ else
+ viewport()->setCursor(sizeBDiagCursor);
+ }
+ else {
+ if (drawCurrent.y() < center.y())
+ viewport()->setCursor(sizeBDiagCursor);
+ else
+ viewport()->setCursor(sizeFDiagCursor);
+ }
+ }
+ } else
+ if ( imageMapEditor->onArea(drawCurrent) )
+ {
+ if (imageMapEditor->currentToolType()==KImageMapEditor::AddPoint)
+ {
+ viewport()->setCursor(AddPointCursor);
+ }
+ else
+ {
+ viewport()->setCursor(sizeAllCursor);
+ }
+ }
+ else
+ if (imageMapEditor->currentToolType()==KImageMapEditor::Rectangle) {
+ viewport()->setCursor(RectangleCursor);
+// kdDebug() << "KImageMapEditor::DrawZone: viewport()->setCursor to Rectangle" << endl;
+ }
+ else
+ if (imageMapEditor->currentToolType()==KImageMapEditor::Circle)
+ viewport()->setCursor(CircleCursor);
+ else
+ if (imageMapEditor->currentToolType()==KImageMapEditor::Polygon)
+ viewport()->setCursor(PolygonCursor);
+ else
+ if (imageMapEditor->currentToolType()==KImageMapEditor::Freehand)
+ viewport()->setCursor(FreehandCursor);
+ else
+ viewport()->setCursor(arrowCursor);
+
+ }
+ imageMapEditor->slotChangeStatusCoords(drawCurrent.x(),drawCurrent.y());
+}
+
+void DrawZone::createBorderRectangles(const QRect & r,QRect & rb,QRect & lb,QRect & tb,QRect & bb)
+{
+ int bw;
+ bw = (int) (2+2*_zoom); // Border width
+
+ rb.setX(r.x()+r.width()-bw);
+ rb.setY(r.y());
+ rb.setWidth(bw+1);
+ rb.setHeight(r.height());
+
+ lb.setX(r.x());
+ lb.setY(r.y());
+ lb.setWidth(bw);
+ lb.setHeight(r.height());
+
+ tb.setX(r.x());
+ tb.setY(r.y());
+ tb.setWidth(r.width());
+ tb.setHeight(bw);
+
+ bb.setX(r.x());
+ bb.setY(r.y()+r.height()-bw);
+ bb.setWidth(r.width());
+ bb.setHeight(bw+1);
+}
+
+
+void DrawZone::resizeEvent(QResizeEvent* e) {
+ QScrollView::resizeEvent(e);
+ int width=(int) (image.width()*_zoom);
+ int height=(int) (image.height()*_zoom);
+ if (visibleWidth()>width)
+ width=visibleWidth();
+ if (visibleHeight()>height)
+ height=visibleHeight();
+
+ resizeContents(width,height);
+
+ imageRect.setLeft(0);
+ imageRect.setTop(0);
+ imageRect.setHeight((int)(image.height()*_zoom));
+ imageRect.setWidth((int)(image.width()*_zoom));
+
+}
+
+void DrawZone::cancelDrawing()
+{
+ if ( (currentAction == DrawPolygon )
+ || (currentAction == DrawRectangle )
+ || (currentAction == DrawCircle )
+ )
+ {
+ currentAction = None;
+ QRect r = translateToZoom(currentArea->selectionRect());
+ delete currentArea;
+ currentArea = 0L;
+ repaintContents(r,false);
+ imageMapEditor->slotUpdateSelectionCoords();
+ }
+}
+
+void DrawZone::repaintArea(const Area & a) {
+ repaintContents(translateToZoom(a.selectionRect()),false);
+}
+
+void DrawZone::repaintRect(const QRect & r) {
+ repaintContents(translateToZoom(r),false);
+}
+
+void DrawZone::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph)
+{
+
+// Erase background without flicker
+ QRect updateRect(clipx,clipy,clipw,cliph);
+
+ // Pixmap for double-buffering
+ QPixmap doubleBuffer(updateRect.size());
+ if (doubleBuffer.isNull())
+ return;
+
+ QPainter p2(&doubleBuffer);
+ p2.drawPixmap(0,0,zoomedImage,clipx,clipy,clipw,cliph);
+ p2.setBackgroundColor(p->backgroundColor());
+
+ if (zoomedImage.width() < (clipw+clipx) ) {
+ int eraseWidth = clipw+clipx - zoomedImage.width();
+ p2.eraseRect( QRect(clipw-eraseWidth,0,eraseWidth,cliph) );
+ }
+
+ if (zoomedImage.height() < (cliph+clipy) ) {
+ int eraseHeight = cliph+clipy - zoomedImage.height();
+ p2.eraseRect( QRect(0,cliph-eraseHeight,clipw,eraseHeight) );
+ }
+
+ p2.translate(-clipx, -clipy);
+ p2.scale(_zoom,_zoom);
+
+ QRect areaUpdateRect;
+ areaUpdateRect.setX(myround(clipx/_zoom)-1);
+ areaUpdateRect.setY(myround(clipy/_zoom)-1);
+ areaUpdateRect.setWidth(myround(clipw/_zoom)+2);
+ areaUpdateRect.setHeight(myround(cliph/_zoom)+2);
+
+ AreaListIterator it=imageMapEditor->areaList();
+ for ( it.toLast();it.current() != 0L; --it)
+ {
+ if (it.current()->rect().intersects(areaUpdateRect))
+ it.current()->draw(p2);
+ }
+
+ // Draw the current drawing Area
+ if (currentAction != MoveArea &&
+ currentAction != MoveSelectionPoint &&
+ currentAction != None &&
+ currentAction != DoSelect)
+ {
+ currentArea->draw(p2);
+ }
+
+ if (currentAction == DoSelect )
+ {
+ QPen pen = QPen(QColor("white"),1);
+ p2.setRasterOp(Qt::XorROP);
+ pen.setStyle(Qt::DotLine);
+ p2.setPen(pen);
+
+ QRect r( drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y());
+ r = r.normalize();
+ p2.drawRect(r);
+ }
+
+
+
+ p2.end();
+
+ // Copy the double buffer into the widget
+ p->drawPixmap(clipx,clipy,doubleBuffer);
+
+
+}
+
+void DrawZone::contentsDragEnterEvent(QDragEnterEvent*e) {
+ if (!KURLDrag::canDecode(e))
+ return;
+
+// bool accept = false;
+ KURL::List uris;
+ KURLDrag::decode(e,uris);
+ KMimeType::Ptr ptr = KMimeType::findByURL(uris.first());
+// kdDebug() << "***** " << ptr.data()->name() << endl;
+ if ((ptr.data()->name() == "text/html")
+ || (ptr.data()->name().left(6) == "image/"))
+ e->accept();
+}
+
+void DrawZone::contentsDropEvent( QDropEvent* e) {
+ viewportDropEvent(e);
+}
+
+
+
+void DrawZone::viewportDropEvent( QDropEvent* e) {
+ KURL::List urlList;
+ // A file from konqueror was dropped
+ if (KURLDrag::decode(e,urlList)) {
+ imageMapEditor->openFile(urlList.first());
+ }
+}
diff --git a/kimagemapeditor/drawzone.h b/kimagemapeditor/drawzone.h
new file mode 100644
index 00000000..764e6951
--- /dev/null
+++ b/kimagemapeditor/drawzone.h
@@ -0,0 +1,122 @@
+/***************************************************************************
+ imagemap.h - description
+ -------------------
+ begin : Wed Apr 4 2001
+ copyright : (C) 2001 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 IMAGEMAP_H
+#define IMAGEMAP_H
+
+#include <qscrollview.h>
+#include <qimage.h>
+#include <qpoint.h>
+#include <qrect.h>
+#include <qcursor.h>
+
+#include "kdeversion.h"
+
+class KImageMapEditor;
+class Area;
+
+/**
+ *@short Draws the image and areas and handle the draw actions
+ *@author Jan Sch&auml;fer
+ *@internal
+ *@see Area
+ */
+class DrawZone : public QScrollView {
+public:
+
+ DrawZone(QWidget *parent,KImageMapEditor* _imageMapEditor);
+ ~DrawZone();
+
+ QImage picture() const;
+ void repaintArea(const Area & a);
+ void repaintRect(const QRect & r);
+ void cancelDrawing();
+
+ void setPicture(const QImage &_image);
+ void setZoom(double z);
+
+ QPoint translateFromZoom(const QPoint & p) const;
+ QRect translateFromZoom(const QRect & p) const;
+ QPoint translateToZoom(const QPoint & p) const;
+ QRect translateToZoom(const QRect & p) const;
+
+ QRect getImageRect() const { return image.rect(); }
+
+
+protected:
+
+ virtual void contentsMouseDoubleClickEvent(QMouseEvent*);
+ virtual void contentsMousePressEvent(QMouseEvent*);
+ virtual void contentsMouseReleaseEvent(QMouseEvent*);
+ virtual void contentsMouseMoveEvent(QMouseEvent*);
+ virtual void resizeEvent(QResizeEvent*);
+ virtual void drawContents(QPainter*,int,int,int,int);
+ virtual void viewportDropEvent(QDropEvent*);
+ virtual void contentsDragEnterEvent(QDragEnterEvent*);
+ virtual void contentsDropEvent(QDropEvent*);
+
+ /**
+ * Represents whats currently going on
+ * @li None : Nothing
+ * @li DrawCircle : The user is drawing a circle
+ * @li DrawRectangle : The user is drawing a rectangle
+ * @li MoveSelectionPoint : The user is resizing an @ref Area or moving a polygon point
+ * @li MoveArea : The user is moving an @ref Area
+ * @li DoSelect : The user makes a selection rectangle
+ */
+ enum DrawAction { None, DrawCircle, DrawRectangle, DrawPolygon, DrawFreehand, MoveSelectionPoint, MoveArea, DoSelect, RemovePoint, AddPoint };
+
+ void createBorderRectangles(const QRect & r,QRect & rb,QRect & lb,QRect & tb,QRect & bb);
+
+private:
+
+ DrawAction currentAction;
+ // The currently drawing area
+ Area *currentArea;
+ // Needed when moving selectionpoints
+ QRect *currentSelectionPoint;
+ // The point where the user clicked the mouse
+ QPoint drawStart;
+ QPoint drawCurrent;
+ // The original image
+ QImage image;
+ KImageMapEditor *imageMapEditor;
+ // Only the rect of the zoomed image, perhaps redundant
+ QRect imageRect;
+ // Only for repaint issues
+ Area *oldArea;
+
+ QRect oldSelectionRect;
+ // Holds the zoomed image for efficiency reasons
+ QPixmap zoomedImage;
+ // The current zoom-factor
+ double _zoom;
+
+ QCursor RectangleCursor;
+ QCursor CircleCursor;
+ QCursor PolygonCursor;
+ QCursor FreehandCursor;
+ QCursor AddPointCursor;
+ QCursor RemovePointCursor;
+};
+
+inline QImage DrawZone::picture() const {
+ return image;
+}
+
+
+#endif
diff --git a/kimagemapeditor/dummy.cpp b/kimagemapeditor/dummy.cpp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kimagemapeditor/dummy.cpp
diff --git a/kimagemapeditor/imagemap.cpp b/kimagemapeditor/imagemap.cpp
new file mode 100644
index 00000000..665ef000
--- /dev/null
+++ b/kimagemapeditor/imagemap.cpp
@@ -0,0 +1,395 @@
+/***************************************************************************
+ imagemap.cpp - description
+ -------------------
+ begin : Wed Apr 4 2001
+ copyright : (C) 2001 by Jan Schäfer
+ email : j_schaef@informatik.uni-kl.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. *
+ * *
+ ***************************************************************************/
+
+#include "imagemap.h"
+#include "kimagemapeditor.h"
+#include "qpainter.h"
+#include "kdebug.h"
+#include <qbitmap.h>
+
+int round(double d) {
+ if ( (d-((int) d)) < 0.5 )
+ return (int) d;
+ else
+ return ((int) d)+1;
+}
+
+ImageMap::ImageMap(QWidget *parent,KImageMapEditor* _imageMapEditor)
+ : QScrollView(parent)
+{
+ imageMapEditor=_imageMapEditor;
+// setPicture(QImage());
+ currentAction=None;
+ currentArea=0L;
+ eraseOldArea=false;
+ oldArea=0L;
+ _zoom=1;
+ viewport()->setMouseTracking(true);
+
+
+}
+
+ImageMap::~ImageMap(){
+}
+
+void ImageMap::setPicture(const QImage &_image) {
+ image=_image;
+ zoomedImage.convertFromImage(image);
+ setZoom(_zoom);
+}
+
+void ImageMap::setZoom(double z) {
+ _zoom=z;
+ imageRect.setHeight(image.height()*_zoom);
+ imageRect.setWidth(image.width()*_zoom);
+ zoomedImage=QPixmap(imageRect.width(),imageRect.height());
+ QPainter p(&zoomedImage);
+ p.scale(z,z);
+ QPixmap pix;
+ pix.convertFromImage(image);
+ // if the picture has transparent areas,
+ // fill them with Gimp like background
+ if (pix.mask()) {
+ QPixmap backPix(32,32);
+ QPainter p2(&backPix);
+ p2.fillRect(0,0,32,32,QColor(156,149,156));
+ p2.fillRect(0,16,16,16,QColor(98,105,98));
+ p2.fillRect(16,0,16,16,QColor(98,105,98));
+ p2.flush();
+ p.setPen(QPen());
+ p.fillRect(imageRect.left(),imageRect.top(),imageRect.width(),imageRect.height(),QBrush(QColor("black"),backPix));
+ }
+ p.drawPixmap(imageRect.left(),imageRect.top(),pix);
+ p.flush();
+ resizeContents(visibleWidth()>imageRect.width() ? visibleWidth() : imageRect.width(),
+ visibleHeight()>imageRect.height() ? visibleHeight() : imageRect.height());
+ repaintContents(0,0,contentsWidth(),contentsHeight(),true);
+}
+
+QPoint ImageMap::translateFromZoom(const QPoint & p) const {
+ return QPoint(p.x()/_zoom,p.y()/_zoom);
+}
+
+QPoint ImageMap::translateToZoom(const QPoint & p) const {
+ return QPoint(round(p.x()*_zoom),round(p.y()*_zoom));
+}
+
+QRect ImageMap::translateToZoom(const QRect & r) const {
+ return QRect(round(r.x()*_zoom),round(r.y()*_zoom),
+ round(r.width()*_zoom),round(r.height()*_zoom));
+}
+
+void ImageMap::contentsMouseDoubleClickEvent(QMouseEvent* e) {
+ QPoint point=e->pos();
+ point-=imageRect.topLeft();
+ point=translateFromZoom(point);
+ if ( currentAction==None &&
+ (currentArea=imageMapEditor->onArea(point)))
+ imageMapEditor->showTagEditor(currentArea);
+
+}
+
+void ImageMap::contentsMousePressEvent(QMouseEvent* e) {
+ drawStart=e->pos();
+ // Check if it's on picture if not
+ // move it to the picture's border
+ if (!imageRect.contains(drawStart)) {
+ if (drawStart.x()>imageRect.right())
+ drawStart.setX(imageRect.right());
+ if (drawStart.x()<imageRect.left())
+ drawStart.setX(imageRect.left());
+ if (drawStart.y()>imageRect.bottom())
+ drawStart.setY(imageRect.bottom());
+ if (drawStart.y()<imageRect.top())
+ drawStart.setY(imageRect.top());
+ }
+
+ // Translate it to picture coordinates
+ drawStart-=imageRect.topLeft();
+ drawStart=translateFromZoom(drawStart);
+ if (currentArea)
+ oldArea=new Area(*currentArea);
+
+ if ( currentAction==None ) {
+ if (e->button()==RightButton) {
+ currentArea=imageMapEditor->onArea(drawStart);
+ imageMapEditor->select(currentArea);
+ imageMapEditor->slotShowPopupMenu(e->globalPos());
+ } else
+ if ((currentArea=imageMapEditor->selected()) &&
+ (currentSelectionPoint=currentArea->onSelectionPoint(drawStart)))
+ {
+ currentAction=MoveSelectionPoint;
+ } else
+ if ((currentArea=imageMapEditor->onArea(drawStart))) {
+ currentAction=MoveArea;
+ imageMapEditor->select(currentArea);
+ } else
+ if (imageMapEditor->currentShapeType()!=Area::None) {
+ currentArea=new Area(imageMapEditor->currentShapeType());
+ currentArea->setRect(QRect(drawStart,drawStart));
+ currentArea->setSelected(false);
+ if (imageMapEditor->selected())
+ imageMapEditor->selected()->setSelected(false);
+ switch (currentArea->type()) {
+ case Area::Rectangle : currentAction=DrawRectangle; break;
+ case Area::Circle : currentAction=DrawCircle; break;
+ case Area::Polygon :
+ currentAction=DrawPolygon;
+ currentArea->addCoord(drawStart);
+ currentSelectionPoint=currentArea->selectionPoints()->last();
+
+ break;
+ default: break;
+ }
+ }
+ // Clicked with the arrow at an areafree position
+ else {
+ currentArea=0L;
+ imageMapEditor->deselectAll();
+ }
+ } else
+ if ( currentAction==DrawPolygon) {
+
+ }
+
+ QRect r;
+ if (oldArea)
+ r=oldArea->selectionRect();
+ if (currentArea) {
+ r= r | currentArea->selectionRect();
+ repaintContents(translateToZoom(r),false);
+ }
+
+}
+
+void ImageMap::contentsMouseReleaseEvent(QMouseEvent *e) {
+ drawEnd=e->pos();
+
+ // Check if it's on picture if not
+ // move it to the picture's border
+ if (!imageRect.contains(drawEnd)) {
+ if (drawEnd.x()>imageRect.right())
+ drawEnd.setX(imageRect.right());
+ if (drawEnd.x()<imageRect.left())
+ drawEnd.setX(imageRect.left());
+ if (drawEnd.y()>imageRect.bottom())
+ drawEnd.setY(imageRect.bottom());
+ if (drawEnd.y()<imageRect.top())
+ drawEnd.setY(imageRect.top());
+ }
+ // Translate it to picture coordinates
+ drawEnd-=imageRect.topLeft();
+ drawEnd=translateFromZoom(drawEnd);
+
+ if (currentAction==DrawCircle || currentAction==DrawRectangle) {
+ imageMapEditor->addArea(currentArea);
+ imageMapEditor->select(currentArea);
+ //imageMapEditor->slotAreaChanged(currentArea);
+ currentAction=None;
+ } else
+ if (currentAction==DrawPolygon) {
+ // If the number of Polygonpoints is more than 2
+ // and clicked on the first PolygonPoint or
+ // the right Button was pressed the Polygon is finished
+ if ((currentArea->selectionPoints()->count()>2)
+ && (currentArea->selectionPoints()->first()->contains(drawEnd)
+ || (e->button()==RightButton)))
+ {
+ currentArea->setFinished(true);
+ imageMapEditor->addArea(currentArea);
+ currentAction=None;
+ } else
+ {
+ currentArea->addCoord(drawEnd);
+ currentSelectionPoint=currentArea->selectionPoints()->last();
+ }
+
+// currentArea->addCoord(drawEnd);
+// currentSelectionPoint=currentArea->selectionPoints()->last();
+ } else
+ if (currentAction==MoveArea || currentAction==MoveSelectionPoint) {
+ imageMapEditor->slotAreaChanged(currentArea);
+ currentAction=None;
+ }
+ else {
+ currentAction=None;
+ }
+ imageMapEditor->slotChangeStatusCoords(drawEnd.x(),drawEnd.y());
+ imageMapEditor->slotUpdateSelectionCoords();
+
+ if (currentArea)
+ repaintArea(*currentArea);
+// repaintContents(0,0,contentsWidth(),contentsHeight(),false);
+}
+
+
+void ImageMap::contentsMouseMoveEvent(QMouseEvent *e) {
+ drawCurrent=e->pos();
+
+ // If outside the image
+ // set it to the border
+ if (!imageRect.contains(drawCurrent)) {
+ if (drawCurrent.x()>imageRect.right())
+ drawCurrent.setX(imageRect.right());
+ if (drawCurrent.x()<imageRect.left())
+ drawCurrent.setX(imageRect.left());
+ if (drawCurrent.y()>imageRect.bottom())
+ drawCurrent.setY(imageRect.bottom());
+ if (drawCurrent.y()<imageRect.top())
+ drawCurrent.setY(imageRect.top());
+ }
+
+ // Translate to image coordinates
+ drawCurrent-=imageRect.topLeft();
+ drawCurrent=translateFromZoom(drawCurrent);
+
+ if (currentAction==DrawRectangle) {
+ // To avoid flicker, only repaint the minimum rect
+ QRect oldRect=translateToZoom(currentArea->rect());
+ currentArea->setRect(QRect(drawStart,drawCurrent).normalize());
+ QRect newRect=translateToZoom(currentArea->rect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ imageMapEditor->slotUpdateSelectionCoords(currentArea->rect());
+ } else
+ if (currentAction==DrawCircle) {
+ QRect oldRect=translateToZoom(currentArea->rect());
+ currentArea->setRect(QRect(drawStart,drawCurrent).normalize());
+ QRect newRect=translateToZoom(currentArea->rect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ imageMapEditor->slotUpdateSelectionCoords(currentArea->rect());
+ } else
+ if ( currentAction==DrawPolygon ) {
+ QRect oldRect=translateToZoom(currentArea->rect());
+ currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent);
+ QRect newRect=translateToZoom(currentArea->rect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ imageMapEditor->slotUpdateSelectionCoords(currentArea->rect());
+ } else
+ if ( currentAction==MoveArea ) {
+ QRect oldRect=translateToZoom(currentArea->selectionRect());
+ currentArea->moveBy((drawCurrent-drawStart).x(),(drawCurrent-drawStart).y());
+ QRect newRect=translateToZoom(currentArea->selectionRect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ drawStart=drawCurrent;
+ imageMapEditor->slotUpdateSelectionCoords();
+ } else
+ if ( currentAction==MoveSelectionPoint ) {
+ QRect oldRect=translateToZoom(currentArea->selectionRect());
+ currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent);
+ QRect newRect=translateToZoom(currentArea->selectionRect());
+ QRect r=oldRect | newRect;
+ repaintContents(r,false);
+ imageMapEditor->slotUpdateSelectionCoords();
+ }
+ imageMapEditor->slotChangeStatusCoords(drawCurrent.x(),drawCurrent.y());
+}
+
+void ImageMap::resizeEvent(QResizeEvent* e) {
+ QScrollView::resizeEvent(e);
+ int width=(int) (image.width()*_zoom);
+ int height=(int) (image.height()*_zoom);
+ if (visibleWidth()>width)
+ width=visibleWidth();
+ if (visibleHeight()>height)
+ height=visibleHeight();
+
+ resizeContents(width,height);
+
+ imageRect.setLeft(0);
+ imageRect.setTop(0);
+ imageRect.setHeight(image.height()*_zoom);
+ imageRect.setWidth(image.width()*_zoom);
+
+}
+
+void ImageMap::repaintArea(const Area & a) {
+ repaintContents(translateToZoom(a.selectionRect()),false);
+}
+
+void ImageMap::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph) {
+// kdDebug() << "drawing\n" << endl;
+// p.scale(rect.width()*2,rect.height()*2);
+// if (e->rect()!=rect()) {
+// p.setClipping(true);
+// p.setClipRect(e->rect());
+// } else
+/* if (currentAction==DrawRectangle) {
+ p->setClipping(true);
+ QRect r(currentArea->rect());
+ r.moveBy(imageRect.left()-5,imageRect.top()-5);
+ r.setSize(r.size()+QSize(10,10));
+ p->setClipRegion(r);
+ }
+*/
+
+ QRect updateRect(clipx,clipy,clipw,cliph);
+ QPixmap doubleBuffer(updateRect.size()); // Pixmap for double-buffering
+ QPainter p2(&doubleBuffer);
+ p2.drawPixmap(0,0,zoomedImage,clipx,clipy,clipw,cliph);
+ p2.translate(-updateRect.x(), -updateRect.y());
+ p2.scale(_zoom,_zoom);
+
+ AreaList *list=imageMapEditor->areaList();
+ for (Area* s=list->first();s != 0L; s=list->next())
+ s->draw(p2);
+
+ // Draw the current drawing Area
+ if (currentAction != MoveArea &&
+ currentAction != MoveSelectionPoint &&
+ currentAction != None)
+ {
+ currentArea->draw(p2);
+ }
+
+ p2.end();
+
+ // Copy the double buffer into the widget
+ p->drawPixmap(clipx,clipy,doubleBuffer);
+ // Erase background without flicker
+ QRegion region(contentsX(),contentsY(),visibleWidth(),visibleHeight());
+ region=region.subtract(QRegion(imageRect));
+ for (int i=0;i<region.rects().count();i++) {
+ p->eraseRect(region.rects()[i]);
+ }
+
+
+ // Draw our picture
+// p->drawPixmap(imageRect.left(),imageRect.top(),zoomedImage);
+//
+//
+// p->scale(_zoom,_zoom);
+// p->translate(imageRect.left(),imageRect.top());
+//
+// AreaList *list=imageMapEditor->areaList();
+// for (Area* s=list->first();s != 0L; s=list->next())
+// s->draw(*p);
+//
+// // Draw the current drawing Area
+// if (currentAction != MoveArea &&
+// currentAction != MoveSelectionPoint &&
+// currentAction != None)
+// {
+// currentArea->draw(*p);
+// }
+
+
+}
diff --git a/kimagemapeditor/imagemap.h b/kimagemapeditor/imagemap.h
new file mode 100644
index 00000000..7576baa0
--- /dev/null
+++ b/kimagemapeditor/imagemap.h
@@ -0,0 +1,77 @@
+/***************************************************************************
+ imagemap.h - description
+ -------------------
+ begin : Wed Apr 4 2001
+ copyright : (C) 2001 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 IMAGEMAP_H
+#define IMAGEMAP_H
+
+#include <qscrollview.h>
+#include <qimage.h>
+#include <qpoint.h>
+#include <qrect.h>
+
+#include "kdeversion.h"
+
+/**
+ *@author Jan Schäfer
+ */
+class KImageMapEditor;
+class Area;
+
+class ImageMap : public QScrollView {
+public:
+ enum DrawAction { None, DrawCircle, DrawRectangle, DrawPolygon, MoveSelectionPoint, MoveArea };
+private:
+ QRect imageRect;
+ QPoint drawStart;
+ QPoint drawCurrent;
+ QPoint drawEnd;
+ bool eraseOldArea;
+ Area *oldArea;
+ // Holds the original image
+ QImage image;
+ // Holds the zoomed image for efficiency reasons
+ QPixmap zoomedImage;
+ Area *currentArea;
+ DrawAction currentAction;
+ QRect *currentSelectionPoint;
+ KImageMapEditor *imageMapEditor;
+ double _zoom;
+public:
+ ImageMap(QWidget *parent,KImageMapEditor* _imageMapEditor);
+ ~ImageMap();
+ void setZoom(double z);
+ void setPicture(const QImage &_image);
+ void repaintArea(const Area & a);
+ QImage picture() const;
+ QPoint translateFromZoom(const QPoint & p) const;
+ QPoint translateToZoom(const QPoint & p) const;
+ QRect translateToZoom(const QRect & p) const;
+protected:
+ virtual void contentsMousePressEvent(QMouseEvent* e);
+ virtual void contentsMouseDoubleClickEvent(QMouseEvent* e);
+ virtual void contentsMouseReleaseEvent(QMouseEvent *e);
+ virtual void contentsMouseMoveEvent(QMouseEvent *e);
+ virtual void resizeEvent(QResizeEvent* e);
+ virtual void drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph);
+};
+
+inline QImage ImageMap::picture() const {
+ return image;
+}
+
+
+#endif
diff --git a/kimagemapeditor/imageslistview.cpp b/kimagemapeditor/imageslistview.cpp
new file mode 100644
index 00000000..55992101
--- /dev/null
+++ b/kimagemapeditor/imageslistview.cpp
@@ -0,0 +1,157 @@
+/***************************************************************************
+ imageslistview.cpp - description
+ -------------------
+ begin : Weg Feb 26 2003
+ copyright : (C) 2003 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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. *
+ * *
+ ***************************************************************************/
+
+// QT
+#include <qptrlist.h>
+
+
+// KDE
+#include <klocale.h>
+#include <kdebug.h>
+
+// locale
+#include "imageslistview.h"
+
+ImagesListViewItem::ImagesListViewItem(ImagesListView* parent, ImageTag* tag)
+ : QListViewItem(parent)
+{
+ _imageTag = tag;
+ update();
+}
+
+
+void ImagesListViewItem::update() {
+ QString src="";
+ QString usemap="";
+ if (_imageTag->find("src"))
+ src=*_imageTag->find("src");
+ if (_imageTag->find("usemap"))
+ usemap=*_imageTag->find("usemap");
+
+ setText(0,src);
+ setText(1,usemap);
+}
+
+ImageTag* ImagesListViewItem::imageTag() {
+ return _imageTag;
+}
+
+
+ImagesListView::ImagesListView(QWidget *parent, const char *name)
+ : KListView(parent, name)
+{
+ addColumn(i18n("Images"));
+ addColumn(i18n("Usemap"));
+ //addColumn(i18n("Preview"));
+ setFullWidth(true);
+
+
+ connect( this, SIGNAL( selectionChanged(QListViewItem*)),
+ this, SLOT( slotSelectionChanged(QListViewItem*)));
+}
+
+
+ImagesListView::~ImagesListView()
+{
+}
+
+void ImagesListView::addImage(ImageTag* tag)
+{
+ if (!tag) {
+ kdDebug() << "ImageListView::addImage: Parameter is null !" << endl;
+ return;
+ }
+
+ new ImagesListViewItem(this, tag);
+}
+
+void ImagesListView::addImages(QPtrList<ImageTag> * images)
+{
+ for (ImageTag *tag = images->first(); tag!=0L; tag=images->next()) {
+ addImage(tag);
+ }
+}
+
+void ImagesListView::clear() {
+ QListView::clear();
+}
+
+void ImagesListView::removeImage(ImageTag* tag) {
+ ImagesListViewItem *item = findListViewItem(tag);
+ if (item) {
+ takeItem(item);
+ setSelected(currentItem(),true);
+ }
+ else {
+ kdDebug() << "ImageListView::removeImage: ListViewItem was not found !" << endl;
+ }
+}
+
+void ImagesListView::updateImage(ImageTag* tag) {
+ ImagesListViewItem *item = findListViewItem(tag);
+ if (item)
+ item->update();
+ else {
+ kdDebug() << "ImageListView::updateImage: ListViewItem was not found !" << endl;
+ }
+}
+
+ImagesListViewItem* ImagesListView::findListViewItem(ImageTag* tag) {
+
+ kdDebug() << "ImageListView::findListViewItem: start searching ... " << endl;
+
+ for (QListViewItem* item = firstChild(); item ; item = item->nextSibling()) {
+ ImagesListViewItem *imageItem = static_cast<ImagesListViewItem*>(item);
+ if (imageItem->imageTag() == tag) {
+ kdDebug() << "ImageListView::findListViewItem: found it " << endl;
+
+ return imageItem;
+ }
+ }
+
+ kdDebug() << "ImageListView::findListViewItem: found nothing " << endl;
+ return 0L;
+
+}
+
+void ImagesListView::slotSelectionChanged(QListViewItem* item) {
+ QString src = item->text(0);
+
+ emit imageSelected(KURL(_baseUrl,src));
+}
+
+ImageTag* ImagesListView::selectedImage() {
+ ImagesListViewItem* item = static_cast<ImagesListViewItem*>(selectedItem());
+ if ( ! item) {
+ kdDebug() << "ImagesListView::selectedImage: No Image is selected !" << endl;
+ return 0L;
+ }
+
+ return item->imageTag();
+
+
+}
+
+void ImagesListView::selectImage(ImageTag* tag) {
+ ImagesListViewItem* item = findListViewItem(tag);
+ if (item) {
+ setSelected(item, true);
+ }
+}
+
+#include "imageslistview.moc"
+
diff --git a/kimagemapeditor/imageslistview.h b/kimagemapeditor/imageslistview.h
new file mode 100644
index 00000000..55680405
--- /dev/null
+++ b/kimagemapeditor/imageslistview.h
@@ -0,0 +1,111 @@
+/***************************************************************************
+ imageslistview.h - description
+ -------------------
+ begin : Weg Feb 26 2003
+ copyright : (C) 2003 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 _IMAGESLISTVIEW_H_
+#define _IMAGESLISTVIEW_H_
+
+#include <klistview.h>
+#include <kurl.h>
+
+#include "kimagemapeditor.h"
+
+class ImagesListView;
+
+class ImagesListViewItem : public QListViewItem
+{
+ public:
+ ImagesListViewItem(ImagesListView*, ImageTag*);
+ ImageTag* imageTag();
+
+ /**
+ * Re-reads the contents of the ImageTag and updates
+ * itself accordingly
+ */
+ void update();
+ protected:
+ ImageTag* _imageTag;
+};
+
+/**
+ * Simple class that shows a list of imagenames with a preview
+ * Jan Schaefer
+ **/
+class ImagesListView : public KListView
+{
+ Q_OBJECT
+
+public:
+ ImagesListView(QWidget *parent, const char *name);
+ virtual ~ImagesListView();
+
+ /**
+ * Adds an image
+ */
+ void addImage(ImageTag*);
+
+ /**
+ * Adds images
+ */
+ void addImages(QPtrList<ImageTag> *);
+
+ /**
+ * Removes the given image from the list
+ */
+ void removeImage(ImageTag*);
+
+ /**
+ * Updates the listview item with the given ImageTag
+ */
+ void updateImage(ImageTag*);
+
+ /**
+ * Removes all images
+ */
+ void clear();
+
+ /**
+ * Returns the filename of the current selected Image
+ */
+ ImageTag* selectedImage();
+
+ /**
+ * Selects the given image
+ */
+ void selectImage(ImageTag*);
+
+ /**
+ * Sets the base URL of all images
+ */
+ void setBaseUrl(const KURL & url) { _baseUrl = url; };
+
+protected slots:
+ void slotSelectionChanged(QListViewItem*);
+
+signals:
+ void imageSelected(const KURL &);
+
+protected:
+ KURL _baseUrl;
+
+ /**
+ * Finds the first ImageListViewItem with the given ImageTag
+ * Returns 0L if no item was found
+ */
+ ImagesListViewItem* findListViewItem(ImageTag*);
+};
+
+#endif
diff --git a/kimagemapeditor/kimagemapeditor.cpp b/kimagemapeditor/kimagemapeditor.cpp
new file mode 100644
index 00000000..ebfb0c7f
--- /dev/null
+++ b/kimagemapeditor/kimagemapeditor.cpp
@@ -0,0 +1,2819 @@
+/***************************************************************************
+ imagemapeditor.cpp - description
+ -------------------
+ begin : Wed Apr 4 2001
+ copyright : (C) 2001 by Jan Sch�er
+ email : j_schaef@informatik.uni-kl.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. *
+* *
+***************************************************************************/
+
+#include <iostream>
+#include <assert.h>
+
+// QT
+#include <qlayout.h>
+#include <qlistview.h>
+#include <qpushbutton.h>
+#include <qvbox.h>
+#include <qpixmap.h>
+#include <qcombobox.h>
+#include <qsplitter.h>
+#include <qfileinfo.h>
+#include <qmultilineedit.h>
+#include <qtextstream.h>
+#include <qpopupmenu.h>
+#include <qdict.h>
+#include <qwhatsthis.h>
+#include <qtooltip.h>
+#include <qpainter.h>
+#include <qtabwidget.h>
+#include <qfontdatabase.h>
+#include <qfile.h>
+
+// KDE
+#include <kcommand.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kaction.h>
+#include <kaccel.h>
+#include <kstdaction.h>
+#include <kiconloader.h>
+#include <kfiledialog.h>
+#include <kmessagebox.h>
+#include <kapplication.h>
+#include <kkeydialog.h>
+#include <kedittoolbar.h>
+#include <klineeditdlg.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+#include <kstatusbar.h>
+#include <kxmlguifactory.h>
+#include <kdockwidget.h>
+#include <kio/job.h>
+#if KDE_IS_VERSION(3,1,90)
+#include <kinputdialog.h>
+#else
+#include <qinputdialog.h>
+#endif
+
+// local
+#include "kimagemapeditor.h"
+#include "kimagemapeditor.moc"
+#include "drawzone.h"
+#include "kimedialogs.h"
+#include "kimecommands.h"
+#include "qextfileinfo.h"
+#include "areacreator.h"
+#include "arealistview.h"
+#include "imageslistview.h"
+#include "mapslistview.h"
+#include "kimecommon.h"
+
+#include <kparts/genericfactory.h>
+#include <kinstance.h>
+
+// Factory code for KDE 3
+typedef KParts::GenericFactory<KImageMapEditor> KimeFactory;
+K_EXPORT_COMPONENT_FACTORY( libkimagemapeditor , KimeFactory )
+
+KImageMapEditor::KImageMapEditor(QWidget *parentWidget, const char *,
+ QObject *parent, const char *name, const QStringList & )
+ : KParts::ReadWritePart(parent,name)
+{
+ setInstance( KimeFactory::instance() );
+
+// KDockMainWindow* mainWidget;
+
+ // Test if the MainWindow can handle DockWindows, if so create DockWidgets
+ // instead of a Splitter
+ mainDock = dynamic_cast<KDockMainWindow*>(parent) ;
+ QSplitter * splitter = 0L;
+ tabWidget = 0L;
+
+ if (mainDock) {
+// kdDebug() << "KImageMapEditor: We got a KDockMainWindow !" << endl;
+
+ KDockWidget* parentDock = mainDock->getMainDockWidget();
+ areaDock = mainDock->createDockWidget( "Areas", 0L, 0L, i18n("Areas"), i18n("Areas"));
+ mapsDock = mainDock->createDockWidget( "Maps", 0L, 0L, i18n("Maps"), i18n("Maps"));
+ imagesDock = mainDock->createDockWidget( "Images", 0L, 0L, i18n("Images"), i18n("Images"));
+
+ areaListView = new AreaListView(areaDock,"AreaListView");
+ mapsListView = new MapsListView(mapsDock, "MapsListView");
+ imagesListView = new ImagesListView(imagesDock, "ImagesListView");
+
+ areaDock->setWidget(areaListView);
+ mapsDock->setWidget(mapsListView);
+ imagesDock->setWidget(imagesListView);
+
+ areaDock->manualDock( (KDockWidget*) parentDock, KDockWidget::DockLeft, 30);
+ mapsDock->manualDock( (KDockWidget*) areaDock, KDockWidget::DockCenter);
+ imagesDock->manualDock( (KDockWidget*) mapsDock, KDockWidget::DockCenter);
+
+ connect( mainDock->manager(), SIGNAL(change()), this, SLOT(dockingStateChanged()));
+ }
+ else
+ {
+ areaDock = 0L;
+ mapsDock = 0L;
+ imagesDock = 0L;
+ splitter = new QSplitter(parentWidget);
+ tabWidget = new QTabWidget(splitter);
+ areaListView = new AreaListView(tabWidget,"AreaListView");
+ mapsListView = new MapsListView(tabWidget, "MapsListView");
+ imagesListView = new ImagesListView(tabWidget, "ImagesListView");
+
+ tabWidget->addTab(areaListView,i18n("Areas"));
+ tabWidget->addTab(mapsListView,i18n("Maps"));
+ tabWidget->addTab(imagesListView,i18n("Images"));
+ }
+
+
+ connect( areaListView->listView, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect( areaListView->listView, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(showTagEditor(QListViewItem*)));
+ connect( areaListView->listView, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint &,int)), this,
+ SLOT(slotShowPopupMenu(QListViewItem*,const QPoint &)));
+
+ connect( mapsListView, SIGNAL( mapSelected(const QString &)),
+ this, SLOT( setMap(const QString &)));
+
+ connect( mapsListView, SIGNAL( mapRenamed(const QString &)),
+ this, SLOT( setMapName(const QString &)));
+
+ connect( mapsListView->listView(), SIGNAL(rightButtonPressed(QListViewItem*,const QPoint &,int)), this,
+ SLOT(slotShowMapPopupMenu(QListViewItem*,const QPoint &)));
+
+ connect( imagesListView, SIGNAL( imageSelected(const KURL &)),
+ this, SLOT( setPicture(const KURL &)));
+
+ connect( imagesListView, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint &,int)), this,
+ SLOT(slotShowImagePopupMenu(QListViewItem*,const QPoint &)));
+
+ // Shows the text:
+ // "Drop an image or html file"
+/* QString path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/dropimage.png" ) + "kimagemapeditor/dropimage.png";
+ if ( ! QFileInfo(path).exists() ) {
+ kdError() << "Couldn't find needed dropimage.png file in "
+ "the data directory of KImageMapEditor.\n"
+ "Perhaps you have forgotten to do a make install !" << endl;
+ exit(1);
+ }
+*/
+
+ if (splitter) {
+ drawZone = new DrawZone(splitter,this);
+ splitter->setResizeMode(drawZone,QSplitter::Stretch);
+ splitter->setResizeMode(tabWidget,QSplitter::KeepSize);
+ setWidget(splitter);
+ } else {
+ drawZone = new DrawZone(parentWidget,this);
+ setWidget(drawZone);
+ }
+
+
+ areas = new AreaList();
+ currentSelected= new AreaSelection();
+ _currentToolType=KImageMapEditor::Selection;
+ copyArea=0L;
+ defaultArea=0L;
+ currentMapElement = 0L;
+
+ setupActions();
+ setupStatusBar();
+
+ setXMLFile("kimagemapeditorpartui.rc");
+
+ setPicture(getBackgroundImage());
+ _htmlContent.setAutoDelete(true);
+
+ init();
+ readConfig();
+}
+
+KImageMapEditor::~KImageMapEditor() {
+ writeConfig();
+
+ #if KDE_VERSION < 300
+ delete accel;
+ #endif
+ delete areas;
+
+ delete currentSelected;
+ delete copyArea;
+ delete defaultArea;
+
+ // Delete our DockWidgets
+ if (areaDock) {
+ areaDock->hide();
+ mapsDock->hide();
+ imagesDock->hide();
+
+ delete areaDock;
+ delete mapsDock;
+ delete imagesDock;
+ }
+
+}
+
+MapTag::MapTag() {
+ modified = false;
+ name = QString::null;
+}
+
+void KImageMapEditor::init()
+{
+ _htmlContent.clear();
+ _imageUrl = QString::null;
+ m_url = QString::null;
+ HtmlElement* el = new HtmlElement("<html>\n");
+ _htmlContent.append(el);
+ el = new HtmlElement("<head>\n");
+ _htmlContent.append(el);
+ el = new HtmlElement("</head>\n");
+ _htmlContent.append(el);
+ el = new HtmlElement("<body>\n");
+ _htmlContent.append(el);
+
+ addMap(i18n("unnamed"));
+
+ el = new HtmlElement("</body>\n");
+ _htmlContent.append(el);
+ el = new HtmlElement("</html>\n");
+ _htmlContent.append(el);
+
+ setImageActionsEnabled(false);
+}
+
+KAboutData* KImageMapEditor::createAboutData()
+{
+ KAboutData* aboutData =
+ new KAboutData( "kimagemapeditor", I18N_NOOP("KImageMapEditor"),
+ "1.0", I18N_NOOP( "An HTML imagemap editor" ),
+ KAboutData::License_GPL,
+ "(c) 2001-2003 Jan Sch&auml;fer <janschaefer@users.sourceforge.net>");
+ return aboutData;
+}
+
+
+void KImageMapEditor::setReadWrite(bool)
+{
+
+ // For now it doesn't matter if its readwrite or readonly
+ // it is always readwrite, because Quanta only supports ReadOnlyParts
+ // at this moment and in that case it should be readwrite, too.
+ ReadWritePart::setReadWrite(true);
+ /*
+ if (rw)
+ ;
+ else
+ {
+ actionCollection()->remove(arrowAction);
+ actionCollection()->remove(circleAction);
+ actionCollection()->remove(rectangleAction);
+ actionCollection()->remove(polygonAction);
+ actionCollection()->remove(freehandAction);
+ actionCollection()->remove(addPointAction);
+ actionCollection()->remove(removePointAction);
+
+ actionCollection()->remove(cutAction);
+ actionCollection()->remove(deleteAction);
+ actionCollection()->remove(copyAction);
+ actionCollection()->remove(pasteAction);
+
+ actionCollection()->remove(mapNewAction);
+ actionCollection()->remove(mapDeleteAction);
+ actionCollection()->remove(mapNameAction);
+ actionCollection()->remove(mapDefaultAreaAction);
+
+ actionCollection()->remove(areaPropertiesAction);
+
+ actionCollection()->remove(moveLeftAction);
+ actionCollection()->remove(moveRightAction);
+ actionCollection()->remove(moveUpAction);
+ actionCollection()->remove(moveDownAction);
+
+ actionCollection()->remove(increaseWidthAction);
+ actionCollection()->remove(decreaseWidthAction);
+ actionCollection()->remove(increaseHeightAction);
+ actionCollection()->remove(decreaseHeightAction);
+
+ actionCollection()->remove(toFrontAction);
+ actionCollection()->remove(toBackAction);
+ actionCollection()->remove(forwardOneAction);
+ actionCollection()->remove(backOneAction);
+
+ actionCollection()->remove(imageRemoveAction);
+ actionCollection()->remove(imageAddAction);
+ actionCollection()->remove(imageUsemapAction);
+
+ }
+ */
+
+}
+
+void KImageMapEditor::setModified(bool modified)
+{
+ // get a handle on our Save action and make sure it is valid
+ KAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save));
+ if (!save)
+ return;
+
+ // if so, we either enable or disable it based on the current
+ // state
+ if (modified)
+ save->setEnabled(true);
+ else
+ save->setEnabled(false);
+
+ // in any event, we want our parent to do it's thing
+ ReadWritePart::setModified(modified);
+}
+
+
+KConfig *KImageMapEditor::config()
+{
+ return KimeFactory::instance()->config();
+}
+
+void KImageMapEditor::readConfig(KConfig* config) {
+ recentFilesAction->loadEntries(config,"Data");
+}
+
+void KImageMapEditor::writeConfig(KConfig* config) {
+ config->writeEntry("highlightareas",highlightAreasAction->isChecked());
+ config->writeEntry("showalt",showAltAction->isChecked());
+ recentFilesAction->saveEntries(config,"Data");
+ saveLastURL(config);
+
+}
+
+void KImageMapEditor::readConfig() {
+ config()->setGroup("General Options");
+ readConfig(config());
+ slotConfigChanged();
+}
+
+void KImageMapEditor::writeConfig() {
+ config()->setGroup("General Options");
+ writeConfig(config());
+ config()->sync();
+}
+
+
+void KImageMapEditor::saveProperties(KConfig *config)
+{
+ saveLastURL(config);
+}
+
+void KImageMapEditor::readProperties(KConfig * config)
+{
+ openLastURL(config);
+}
+
+void KImageMapEditor::slotConfigChanged()
+{
+ config()->setGroup("Appearance");
+ int newHeight=config()->readNumEntry("maximum-preview-height",50);
+ config()->setGroup("General Options");
+ _commandHistory->setUndoLimit(config()->readNumEntry("undo-level",20));
+ _commandHistory->setRedoLimit(config()->readNumEntry("redo-level",20));
+ Area::highlightArea = config()->readBoolEntry("highlightareas",true);
+ highlightAreasAction->setChecked(Area::highlightArea);
+ Area::showAlt = config()->readBoolEntry("showalt",true);
+ showAltAction->setChecked(Area::showAlt);
+
+ // if the image preview size changed update all images
+ if (maxAreaPreviewHeight!=newHeight) {
+ maxAreaPreviewHeight=newHeight;
+ }
+
+ updateAllAreas();
+ drawZone->viewport()->repaint();
+}
+
+void KImageMapEditor::openLastURL(KConfig* config) {
+ KURL lastURL ( config->readPathEntry("lastopenurl") );
+ QString lastMap = config->readEntry("lastactivemap");
+ QString lastImage = config->readPathEntry("lastactiveimage");
+
+
+// kdDebug() << "loading from group : " << config->group() << endl;
+
+// kdDebug() << "loading entry lastopenurl : " << lastURL.path() << endl;
+// KMessageBox::information(0L, config->group()+" "+lastURL.path());
+ if (!lastURL.isEmpty()) {
+// kdDebug() << "opening HTML file with map " << lastMap << " and image " << lastImage << endl;
+ if ( openHTMLFile(lastURL, lastMap, lastImage) )
+ m_url = lastURL;
+ else
+ m_url = QString::null;
+ }
+}
+
+void KImageMapEditor::saveLastURL(KConfig* config) {
+ config->writePathEntry("lastopenurl",url().path());
+ config->writeEntry("lastactivemap",mapName());
+ config->writePathEntry("lastactiveimage",_imageUrl.path());
+// kdDebug() << "writing entry lastopenurl : " << url().path() << endl;
+// kdDebug() << "writing entry lastactivemap : " << mapName() << endl;
+// kdDebug() << "writing entry lastactiveimage : " << _imageUrl.path() << endl;
+ //KMessageBox::information(0L, QString("Group: %1 Saving ... %2").arg(config->group()).arg(url().path()));
+}
+
+void KImageMapEditor::setupActions()
+{
+ // File Open
+ KAction *temp=KStdAction::open(this, SLOT(fileOpen()), actionCollection());
+ QMimeSourceFactory::defaultFactory()->setPixmap( "openimage", SmallIcon("fileopen") );
+ temp->setWhatsThis(i18n("<h3>Open File</h3>Click this to <em>open</em> a new picture or HTML file."));
+ temp->setToolTip(i18n("Open new picture or HTML file"));
+
+ // File Open Recent
+ recentFilesAction = KStdAction::openRecent(this, SLOT(openURL(const KURL&)),
+ actionCollection());
+ // File Save
+ temp =KStdAction::save(this, SLOT(fileSave()), actionCollection());
+ QMimeSourceFactory::defaultFactory()->setPixmap( "saveimage", SmallIcon("filesave") );
+ temp->setWhatsThis(i18n("<h3>Save File</h3>Click this to <em>save</em> the changes to the HTML file."));
+ temp->setToolTip(i18n("Save HTML file"));
+
+
+ // File Save As
+ (void)KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
+
+ // File Close
+ temp=KStdAction::close(this, SLOT(fileClose()), actionCollection());
+ QMimeSourceFactory::defaultFactory()->setPixmap( "closeimage", SmallIcon("fileclose") );
+ temp->setWhatsThis(i18n("<h3>Close File</h3>Click this to <em>close</em> the currently open HTML file."));
+ temp->setToolTip(i18n("Close HTML file"));
+
+ // Edit Copy
+ copyAction=KStdAction::copy(this, SLOT(slotCopy()), actionCollection());
+ QMimeSourceFactory::defaultFactory()->setPixmap( "editcopyimage", SmallIcon("editcopy") );
+ copyAction->setWhatsThis(i18n("<h3>Copy</h3>"
+ "Click this to <em>copy</em> the selected area."));
+ copyAction->setEnabled(false);
+
+ // Edit Cut
+ cutAction=KStdAction::cut(this, SLOT(slotCut()), actionCollection());
+ QMimeSourceFactory::defaultFactory()->setPixmap( "editcutimage", SmallIcon("editcut") );
+ cutAction->setWhatsThis(i18n("<h3>Cut</h3>"
+ "Click this to <em>cut</em> the selected area."));
+ cutAction->setEnabled(false);
+
+ // Edit Paste
+ pasteAction=KStdAction::paste(this, SLOT(slotPaste()), actionCollection());
+ QMimeSourceFactory::defaultFactory()->setPixmap( "editpasteimage", SmallIcon("editpaste") );
+ pasteAction->setWhatsThis(i18n("<h3>Paste</h3>"
+ "Click this to <em>paste</em> the copied area."));
+ pasteAction->setEnabled(false);
+
+
+ // Edit Delete
+ deleteAction=new KAction(i18n("&Delete"), "editdelete",
+ Key_Delete,this,SLOT (slotDelete()),actionCollection(), "edit_delete");
+ QMimeSourceFactory::defaultFactory()->setPixmap( "editdeleteimage", SmallIcon("editdelete") );
+ deleteAction->setWhatsThis(i18n("<h3>Delete</h3>"
+ "Click this to <em>delete</em> the selected area."));
+ deleteAction->setEnabled(false);
+
+ // Edit Undo/Redo
+ _commandHistory = new KCommandHistory( actionCollection(), true);
+
+ // Edit Properties
+ areaPropertiesAction= new KAction(i18n("Pr&operties"),0,this,SLOT(showTagEditor()),
+ actionCollection(), "edit_properties");
+ areaPropertiesAction->setEnabled(false);
+
+ // View Zoom In
+ zoomInAction=KStdAction::zoomIn(this, SLOT(slotZoomIn()), actionCollection());
+ // View Zoom Out
+ zoomOutAction=KStdAction::zoomOut(this, SLOT(slotZoomOut()), actionCollection());
+
+ // View Zoom
+ zoomAction=new KSelectAction(i18n("Zoom"), 0,this,SLOT (slotZoom()),
+ actionCollection(), "view_zoom");
+ zoomAction->setWhatsThis(i18n("<h3>Zoom</h3>"
+ "Choose the desired zoom level."));
+ zoomAction->setItems(QStringList()
+ << i18n("25%")
+ << i18n("50%")
+ << i18n("100%")
+ << i18n("150%")
+ << i18n("200%")
+ << i18n("250%")
+ << i18n("300%")
+ << i18n("500%")
+ << i18n("750%")
+ << i18n("1000%"));
+
+ zoomAction->setCurrentItem(2);
+
+ highlightAreasAction = new KToggleAction(i18n("Highlight Areas"),0, this, SLOT (slotHightlightAreas()),
+ actionCollection(), "view_highlightareas");
+
+ showAltAction = new KToggleAction(i18n("Show Alt Tag"),0, this, SLOT (slotShowAltTag()),
+ actionCollection(), "view_showalt");
+#if KDE_IS_VERSION(3,2,90)
+ showAltAction->setCheckedState(i18n("Hide Alt Tag"));
+#endif
+
+ mapNameAction= new KAction(i18n("Map &Name..."),0,this,SLOT(mapEditName()),
+ actionCollection(), "map_name");
+
+ mapNewAction = new KAction(i18n("Ne&w Map..."),0,this,SLOT(mapNew()),
+ actionCollection(), "map_new");
+ mapNewAction->setToolTip(i18n("Create a new map"));
+
+ mapDeleteAction = new KAction(i18n("D&elete Map"),0,this,SLOT(mapDelete()),
+ actionCollection(), "map_delete");
+ mapDeleteAction->setToolTip(i18n("Delete the current active map"));
+
+ mapDefaultAreaAction = new KAction(i18n("Edit &Default Area..."),0,this,SLOT(mapDefaultArea()),
+ actionCollection(), "map_defaultarea");
+ mapDefaultAreaAction->setToolTip(i18n("Edit the default area of the current active map"));
+
+ temp = new KAction(i18n("&Preview"),0,this,SLOT(mapPreview()),
+ actionCollection(), "map_preview");
+ temp->setToolTip(i18n("Show a preview"));
+
+ // IMAGE
+ i18n("&Image");
+
+ imageAddAction = new KAction(i18n("Add Image..."),0,this,SLOT(imageAdd()),
+ actionCollection(), "image_add");
+ imageAddAction->setToolTip(i18n("Add a new image"));
+
+ imageRemoveAction = new KAction(i18n("Remove Image"),0,this,SLOT(imageRemove()),
+ actionCollection(), "image_remove");
+ imageRemoveAction->setToolTip(i18n("Remove the current visible image"));
+
+ imageUsemapAction = new KAction(i18n("Edit Usemap..."),0,this,SLOT(imageUsemap()),
+ actionCollection(), "image_usemap");
+ imageUsemapAction->setToolTip(i18n("Edit the usemap tag of the current visible image"));
+
+ temp= new KAction(i18n("Show &HTML"),0,this,SLOT(mapShowHTML()),
+ actionCollection(), "map_showhtml");
+
+
+ // Selection Tool
+ arrowAction=new KRadioAction(i18n("&Selection"), "arrow",
+ 0,this,SLOT (slotDrawArrow()),
+ actionCollection(), "tool_arrow");
+ QMimeSourceFactory::defaultFactory()->setPixmap( "arrowimage", SmallIcon("arrow") );
+ arrowAction->setWhatsThis(i18n("<h3>Selection</h3>"
+ "Click this to select areas."));
+ arrowAction->setExclusiveGroup("drawing");
+ arrowAction->setChecked(true);
+
+ // Circle
+ circleAction=new KRadioAction(i18n("&Circle"), "circle",
+ 0,this,SLOT (slotDrawCircle()),
+ actionCollection(), "tool_circle");
+ QMimeSourceFactory::defaultFactory()->setPixmap( "circleimage", SmallIcon("drawcircle") );
+ circleAction->setWhatsThis(i18n("<h3>Circle</h3>"
+ "Click this to start drawing a circle."));
+ circleAction->setExclusiveGroup("drawing");
+
+ // Rectangle
+ rectangleAction=new KRadioAction(i18n("&Rectangle"), "rectangle",
+ 0,this,SLOT (slotDrawRectangle()),
+ actionCollection(), "tool_rectangle");
+ QMimeSourceFactory::defaultFactory()->setPixmap( "rectangleimage", SmallIcon("drawrectangle") );
+ rectangleAction->setWhatsThis(i18n("<h3>Rectangle</h3>"
+ "Click this to start drawing a rectangle."));
+ rectangleAction->setExclusiveGroup("drawing");
+
+ // Polygon
+ polygonAction=new KRadioAction(i18n("&Polygon"), "polygon",
+ 0,this,SLOT (slotDrawPolygon()),
+ actionCollection(), "tool_polygon");
+ QMimeSourceFactory::defaultFactory()->setPixmap( "polygonimage", SmallIcon("drawpolygon") );
+ polygonAction->setWhatsThis(i18n("<h3>Polygon</h3>"
+ "Click this to start drawing a polygon."));
+ polygonAction->setExclusiveGroup("drawing");
+
+ // Freehand
+ freehandAction=new KRadioAction(i18n("&Freehand Polygon"), "freehand",
+ 0,this,SLOT (slotDrawFreehand()),
+ actionCollection(), "tool_freehand");
+ QMimeSourceFactory::defaultFactory()->setPixmap( "freehandimage", SmallIcon("freehand") );
+ freehandAction->setWhatsThis(i18n("<h3>Freehandpolygon</h3>"
+ "Click this to start drawing a freehand polygon."));
+ freehandAction->setExclusiveGroup("drawing");
+
+ // Add Point
+ addPointAction=new KRadioAction(i18n("&Add Point"), "addpoint",
+ 0,this,SLOT (slotDrawAddPoint()),
+ actionCollection(), "tool_addpoint");
+ QMimeSourceFactory::defaultFactory()->setPixmap( "addpointimage", SmallIcon("addpoint") );
+ addPointAction->setWhatsThis(i18n("<h3>Add Point</h3>"
+ "Click this to add points to a polygon."));
+ addPointAction->setExclusiveGroup("drawing");
+
+ // Remove Point
+ removePointAction=new KRadioAction(i18n("&Remove Point"), "removepoint",
+ 0,this,SLOT (slotDrawRemovePoint()),
+ actionCollection(), "tool_removepoint");
+ QMimeSourceFactory::defaultFactory()->setPixmap( "removepointimage", SmallIcon("removepoint") );
+ removePointAction->setWhatsThis(i18n("<h3>Remove Point</h3>"
+ "Click this to remove points from a polygon."));
+ removePointAction->setExclusiveGroup("drawing");
+
+#if KDE_VERSION < 300
+ KAction *cancelAction =
+#endif
+ new KAction(i18n("Cancel Drawing"), Key_Escape, this, SLOT( slotCancelDrawing() ),
+ actionCollection(), "canceldrawing" );
+
+ moveLeftAction = new KAction(i18n("Move Left"), Key_Left, this, SLOT( slotMoveLeft() ),
+ actionCollection() , "moveleft" );
+
+ moveRightAction = new KAction(i18n("Move Right"), Key_Right, this, SLOT( slotMoveRight() ),
+ actionCollection() , "moveright" );
+
+ moveUpAction = new KAction(i18n("Move Up"), Key_Up, this, SLOT( slotMoveUp() ),
+ actionCollection() , "moveup" );
+
+ moveDownAction = new KAction(i18n("Move Down"), Key_Down, this, SLOT( slotMoveDown() ),
+ actionCollection() , "movedown" );
+
+ increaseWidthAction = new KAction(i18n("Increase Width"), Key_Right + SHIFT, this, SLOT( slotIncreaseWidth() ),
+ actionCollection() , "increasewidth" );
+
+ decreaseWidthAction = new KAction(i18n("Decrease Width"), Key_Left + SHIFT, this, SLOT( slotDecreaseWidth() ),
+ actionCollection() , "decreasewidth" );
+
+ increaseHeightAction = new KAction(i18n("Increase Height"), Key_Up + SHIFT, this, SLOT( slotIncreaseHeight() ),
+ actionCollection() , "increaseheight" );
+
+ decreaseHeightAction = new KAction(i18n("Decrease Height"), Key_Down + SHIFT, this, SLOT( slotDecreaseHeight() ),
+ actionCollection() , "decreaseheight" );
+#if KDE_VERSION < 300
+ accel = new KAccel(widget());
+ cancelAction->plugAccel(accel, true);
+ moveLeftAction->plugAccel(accel, true);
+ moveRightAction->plugAccel(accel, true);
+ moveUpAction->plugAccel(accel, true);
+ moveDownAction->plugAccel(accel, true);
+ increaseWidthAction->plugAccel(accel, true);
+ decreaseWidthAction->plugAccel(accel, true);
+ increaseHeightAction->plugAccel(accel, true);
+ decreaseHeightAction->plugAccel(accel, true);
+#endif
+
+ toFrontAction = new KAction(i18n("Bring to Front"), 0 , this, SLOT( slotToFront() ),
+ actionCollection() , "tofront" );
+
+ toBackAction = new KAction(i18n("Send to Back"), 0 , this, SLOT( slotToBack() ),
+ actionCollection() , "toback" );
+
+ forwardOneAction = new KAction(i18n("Bring Forward One"), "raise" ,0, this, SLOT( slotForwardOne() ),
+ actionCollection() , "forwardone" );
+ backOneAction = new KAction(i18n("Send Back One"), "lower" ,0, this, SLOT( slotBackOne() ),
+ actionCollection() , "backone" );
+
+ forwardOneAction->plug(areaListView->upBtn);
+ backOneAction->plug(areaListView->downBtn);
+
+ connect( areaListView->upBtn, SIGNAL(pressed()), forwardOneAction, SLOT(activate()));
+ connect( areaListView->downBtn, SIGNAL(pressed()), backOneAction, SLOT(activate()));
+
+ new KAction( i18n("Configure KImageMapEditor..."), "configure", 0,
+ this, SLOT(slotShowPreferences()),
+ actionCollection(), "configure_kimagemapeditor" );
+
+ if (areaDock) {
+ configureShowAreaListAction = new KToggleAction( i18n("Show Area List"), 0L, 0,
+ this, SLOT(configureShowAreaList()),
+ actionCollection(), "configure_show_arealist" );
+
+ configureShowMapListAction = new KToggleAction( i18n("Show Map List"), 0L, 0,
+ this, SLOT(configureShowMapList()),
+ actionCollection(), "configure_show_maplist" );
+
+ configureShowImageListAction = new KToggleAction( i18n("Show Image List"), 0L, 0,
+ this, SLOT(configureShowImageList()),
+ actionCollection(), "configure_show_imagelist" );
+#if KDE_IS_VERSION(3,2,90)
+ configureShowAreaListAction->setCheckedState(i18n("Hide Area List"));
+ configureShowMapListAction->setCheckedState(i18n("Hide Map List"));
+ configureShowImageListAction->setCheckedState(i18n("Hide Image List"));
+#endif
+ }
+
+ updateActionAccess();
+}
+
+void KImageMapEditor::setupStatusBar()
+{
+
+// We can't do this with a KPart !
+// widget()->statusBar()->insertItem(i18n(" Cursor")+" : x: 0 ,y: 0",STATUS_CURSOR);
+// widget()->statusBar()->insertItem(i18n(" Selection")+" : - ",STATUS_SELECTION);
+ emit setStatusBarText( i18n(" Selection: - Cursor: x: 0, y: 0 "));
+}
+
+void KImageMapEditor::slotShowPreferences()
+{
+ PreferencesDialog *dialog = new PreferencesDialog(widget(),config());
+ connect(dialog, SIGNAL(applyClicked()), this, SLOT(slotConfigChanged()));
+ dialog->exec();
+ delete dialog;
+}
+
+
+void KImageMapEditor::showPopupMenu(const QPoint & pos, const QString & name)
+{
+ QPopupMenu* pop = static_cast<QPopupMenu *>(factory()->container(name, this));
+
+ if (!pop) {
+ kdWarning() << QString("KImageMapEditorPart: Missing XML definition for %1\n").arg(name) << endl;
+ return;
+ }
+
+ pop->popup(pos);
+}
+
+void KImageMapEditor::slotShowMainPopupMenu(const QPoint & pos)
+{
+ showPopupMenu(pos,"popup_main");
+}
+
+void KImageMapEditor::slotShowMapPopupMenu(QListViewItem* item,const QPoint & pos)
+{
+ if (isReadWrite()) {
+ mapDeleteAction->setEnabled(item);
+ mapNameAction->setEnabled(item);
+ mapDefaultAreaAction->setEnabled(item);
+ }
+
+ if (item)
+ mapsListView->selectMap(item);
+
+ showPopupMenu(pos,"popup_map");
+}
+
+void KImageMapEditor::slotShowImagePopupMenu(QListViewItem* item,const QPoint & pos)
+{
+ imageRemoveAction->setEnabled(item);
+ imageUsemapAction->setEnabled(item);
+
+ if (item)
+ imagesListView->setSelected(item,true);
+
+ showPopupMenu(pos,"popup_image");
+}
+
+void KImageMapEditor::slotShowPopupMenu(QListViewItem* item,const QPoint & p)
+{
+ if (!item)
+ return;
+
+ if (!item->isSelected())
+ {
+ deselectAll();
+ select(item);
+ }
+
+ slotShowMainPopupMenu(p);
+}
+
+void KImageMapEditor::updateStatusBar()
+{
+ emit setStatusBarText(selectionStatusText+" "+cursorStatusText);
+}
+
+void KImageMapEditor::slotChangeStatusCoords(int x,int y)
+{
+// statusBar()->changeItem(QString(" Cursor : x: %1 ,y: %2 ").arg(x).arg(y),STATUS_CURSOR);
+ cursorStatusText = i18n(" Cursor: x: %1, y: %2 ").arg(x).arg(y);
+ updateStatusBar();
+}
+
+void KImageMapEditor::slotUpdateSelectionCoords() {
+ if (selected()->count()>0) {
+ QRect r=selected()->rect();
+// statusBar()->changeItem(
+ selectionStatusText = i18n(" Selection: x: %1, y: %2, w: %3, h: %4 ").arg(r.left()).arg(r.top()).arg(r.width()).arg(r.height());
+
+// ,STATUS_SELECTION);
+ kapp->processEvents();
+ } else
+ selectionStatusText = i18n(" Selection: - ");
+ //statusBar()->changeItem(" Selection : - ",STATUS_SELECTION);
+
+ updateStatusBar();
+}
+
+void KImageMapEditor::slotUpdateSelectionCoords( const QRect & r )
+{
+ selectionStatusText = i18n(" Selection: x: %1, y: %2, w: %3, h: %4 ").arg(r.left()).arg(r.top()).arg(r.width()).arg(r.height());
+ updateStatusBar();
+ kapp->processEvents();
+}
+
+KApplication* KImageMapEditor::app() const
+{
+ return kapp;
+}
+
+
+void KImageMapEditor::drawToCenter(QPainter* p, const QString & str, int y, int width) {
+ int xmid = width / 2;
+
+ QFontMetrics fm = p->fontMetrics();
+ QRect strBounds = fm.boundingRect(str);
+
+ p->drawText(xmid-(strBounds.width()/2),y,str);
+}
+
+
+QImage KImageMapEditor::getBackgroundImage() {
+
+ // Lazy initialisation
+ if ( _backgroundImage.isNull() ) {
+
+
+// QString filename = QString("dropimage_")+KGlobal::locale()->language()+".png";
+// QString path = QString::null; //KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/"+filename ) + "kimagemapeditor/"+filename;
+// kdDebug() << "getBackgroundPic : loaded image : " << path << endl;
+
+// if ( ! QFileInfo(path).exists() ) {
+ int width = 400;
+ int height = 400;
+ int border = 20;
+ int fontSize = 58;
+
+ QPixmap pix(width,height);
+ pix.fill(QColor(74,76,74));
+ QPainter p(&pix);
+
+ QFont font;
+ font.setFamily("Sans");
+ font.setPixelSize(fontSize);
+ font.setBold(true);
+ p.setFont( font );
+
+ p.setRasterOp(Qt::CopyROP);
+ p.setPen(QPen(QColor(112,114,112),1));
+
+ // The translated string must be divided into
+ // parts with about the same size that fit to the image
+ QString str = i18n("Drop an image or HTML file");
+ QStringList strList = QStringList::split(" ",str);
+
+ // Get the string parts
+ QString tmp;
+ QStringList outputStrList;
+ QFontMetrics fm = p.fontMetrics();
+
+ for ( QStringList::Iterator it = strList.begin(); it != strList.end(); ++it ) {
+ QString tmp2 = tmp + *it;
+
+ if (fm.boundingRect(tmp2).width() > width-border) {
+ outputStrList.append(tmp);
+ tmp = *it + " ";
+ }
+ else
+ tmp = tmp2 + " ";
+ }
+
+ // Last one was forgotten so add it.
+ outputStrList.append(tmp);
+
+ // Try to adjust the text vertically centered
+ int step = myround(float(height) / (outputStrList.size()+1));
+ int y = step;
+
+ for ( QStringList::Iterator it = outputStrList.begin(); it != outputStrList.end(); ++it ) {
+ drawToCenter(&p, *it, y, pix.width());
+ y += step;
+ }
+
+ p.end();
+
+ _backgroundImage = pix.convertToImage();
+ }
+
+
+ return _backgroundImage;
+
+/*
+ QFontDatabase fdb;
+ QStringList families = fdb.families();
+ for ( QStringList::Iterator f = families.begin(); f != families.end(); ++f ) {
+ QString family = *f;
+ qDebug( family );
+ QStringList styles = fdb.styles( family );
+ for ( QStringList::Iterator s = styles.begin(); s != styles.end(); ++s ) {
+ QString style = *s;
+ QString dstyle = "\t" + style + " (";
+ QValueList<int> smoothies = fdb.smoothSizes( family, style );
+ for ( QValueList<int>::Iterator points = smoothies.begin();
+ points != smoothies.end(); ++points ) {
+ dstyle += QString::number( *points ) + " ";
+ }
+ dstyle = dstyle.left( dstyle.length() - 1 ) + ")";
+ qDebug( dstyle );
+ }
+ }
+
+
+ path = KGlobal::dirs()->saveLocation( "data", "kimagemapeditor/" ) +filename;
+ kdDebug() << "getBackgroundPic : save new image to : " << path << endl;
+ pix.save(path,"PNG",100);
+ }
+
+ if ( ! QFileInfo(path).exists() ) {
+ kdError() << "Couldn't find needed " << filename << " file in "
+ "the data directory of KImageMapEditor.\n"
+ "Perhaps you have forgotten to do a make install !" << endl;
+ exit(1);
+ }
+*/
+}
+
+
+void KImageMapEditor::addArea(Area* area) {
+ if (!area) return;
+
+ // Perhaps we've got a selection of areas
+ // so test it and add all areas of the selection
+ // nested selections are possible but doesn't exist
+ AreaSelection *selection=0L;
+ if ( (selection = dynamic_cast <AreaSelection*> ( area ) ) )
+ {
+ AreaList list = selection->getAreaList();
+
+ for (Area* a = list.first(); a != 0L; a = list.next() )
+ {
+ areas->prepend(a);
+ a->setListViewItem(new QListViewItem(areaListView->listView,a->attribute("href")));
+ a->listViewItem()->setPixmap(1,makeListViewPix(*a));
+ }
+ }
+ else
+ {
+ areas->prepend(area);
+ area->setListViewItem(new QListViewItem(areaListView->listView,area->attribute("href")));
+ area->listViewItem()->setPixmap(1,makeListViewPix(*area));
+ }
+
+ setModified(true);
+
+}
+
+void KImageMapEditor::addAreaAndEdit(Area* s)
+{
+ areas->prepend(s);
+ s->setListViewItem(new QListViewItem(areaListView->listView,s->attribute("href")));
+ s->listViewItem()->setPixmap(1,makeListViewPix(*s));
+ deselectAll();
+ select(s);
+ if (!showTagEditor(selected())) {
+ // If the user has pressed cancel
+ // he undos the creation
+ commandHistory()->undo();
+ }
+}
+
+void KImageMapEditor::deleteArea( Area * area )
+{
+ if (!area) return;
+
+ // only for repaint reasons
+ QRect redrawRect = area->selectionRect();
+
+ // Perhaps we've got a selection of areas
+ // so test it and delete the whole selection
+ // nested selections are possible but doesn't exist
+ AreaSelection *selection=0L;
+ if ( (selection = dynamic_cast <AreaSelection*> ( area ) ) )
+ {
+ AreaList list = selection->getAreaList();
+
+ for (Area* a = list.first(); a != 0L; a = list.next() )
+ {
+ currentSelected->remove(a);
+ areas->remove( a );
+ a->deleteListViewItem();
+ }
+ }
+ else
+ {
+ deselect( area );
+ areas->remove( area );
+ area->deleteListViewItem();
+ }
+
+ drawZone->repaintRect(redrawRect);
+
+
+ // Only to disable cut and copy actions
+ if (areas->count()==0)
+ deselectAll();
+
+ setModified(true);
+}
+
+void KImageMapEditor::deleteSelected() {
+
+ Area *a;
+ AreaList list=currentSelected->getAreaList();
+
+ for ( a=list.first(); a != 0; a=list.next() ) {
+ currentSelected->remove( a );
+ areas->remove( a );
+ delete a->listViewItem();
+ }
+
+
+ drawZone->repaintArea( *currentSelected );
+ // Only to disable cut and copy actions
+ if (areas->count()==0)
+ deselectAll();
+
+ setModified(true);
+}
+
+void KImageMapEditor::deleteAllAreas()
+{
+ for (Area* a=areas->first();a!=0L;)
+ {
+ deselect( a );
+ areas->remove( a );
+ a->deleteListViewItem();
+ a=areas->first(); // because the current is deleted
+ }
+
+ drawZone->viewport()->repaint();
+
+}
+
+void KImageMapEditor::updateAllAreas()
+{
+// kdDebug() << "KImageMapEditor::updateAllAreas" << endl;
+ for (Area* a=areas->first();a!=0L;a=areas->next()) {
+ a->listViewItem()->setPixmap(1,makeListViewPix(*a));
+ }
+ drawZone->viewport()->repaint();
+}
+
+void KImageMapEditor::updateSelection() const {
+ areaListView->listView->triggerUpdate();
+}
+
+AreaSelection* KImageMapEditor::selected() const {
+ return currentSelected;
+}
+
+void KImageMapEditor::select(Area* a)
+{
+ if (!a) return;
+
+ currentSelected->add(a);
+ updateActionAccess();
+ slotUpdateSelectionCoords();
+// drawZone->repaintArea( *a);
+
+}
+
+void KImageMapEditor::selectWithoutUpdate(Area* a)
+{
+ if (!a) return;
+ currentSelected->add(a);
+}
+
+void KImageMapEditor::slotSelectionChanged()
+{
+ AreaListIterator it = areaList();
+ AreaList list = currentSelected->getAreaList();
+
+ for ( ; it.current() != 0L; ++it)
+ {
+ if ( it.current()->listViewItem()->isSelected() != (list.containsRef(it.current()) > 0) )
+ {
+ it.current()->listViewItem()->isSelected()
+ ? select( it.current() )
+ : deselect( it.current() );
+
+ drawZone->repaintArea( *it.current());
+ }
+ }
+
+}
+
+void KImageMapEditor::select( QListViewItem* item)
+{
+
+ AreaListIterator it = areaList();
+
+ for ( ; it.current() != 0L; ++it)
+ {
+ if (it.current()->listViewItem() == item )
+ {
+ select( it.current() );
+ drawZone->repaintArea( *it.current());
+ }
+ }
+
+
+}
+
+AreaListIterator KImageMapEditor::areaList() const {
+ AreaListIterator it(*areas);
+ return it;
+}
+
+
+void KImageMapEditor::slotAreaChanged(Area *area)
+{
+ if (!area)
+ return;
+
+ setModified(true);
+
+ AreaSelection *selection=0L;
+ if ( (selection = dynamic_cast <AreaSelection*> ( area ) ) )
+ {
+ AreaListIterator it = selection->getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ {
+ if (it.current()->listViewItem()) {
+ it.current()->listViewItem()->setText(0,it.current()->attribute("href"));
+ it.current()->listViewItem()->setPixmap(1,makeListViewPix(*it.current()));
+ }
+ }
+
+ }
+ else
+ if (area->listViewItem()) {
+ area->listViewItem()->setText(0,area->attribute("href"));
+ area->listViewItem()->setPixmap(1,makeListViewPix(*area));
+ }
+
+ drawZone->repaintArea(*area);
+
+}
+
+void KImageMapEditor::deselect(Area* a)
+{
+ if (a) {
+ currentSelected->remove(a);
+// drawZone->repaintArea(*a);
+ updateActionAccess();
+ slotUpdateSelectionCoords();
+ }
+}
+
+void KImageMapEditor::deselectWithoutUpdate(Area* a)
+{
+ if (a) {
+ currentSelected->remove(a);
+ }
+}
+
+
+/**
+* Makes sure, that the actions cut, copy, delete and
+* show properties
+* can only be executed if sth. is selected.
+**/
+void KImageMapEditor::updateActionAccess()
+{
+ if (!isReadWrite())
+ return;
+
+ if ( 0 < selected()->count())
+ {
+ areaPropertiesAction->setEnabled(true);
+ deleteAction->setEnabled(true);
+ copyAction->setEnabled(true);
+ cutAction->setEnabled(true);
+ moveLeftAction->setEnabled(true);
+ moveRightAction->setEnabled(true);
+ moveUpAction->setEnabled(true);
+ moveDownAction->setEnabled(true);
+ toFrontAction->setEnabled(true);
+ toBackAction->setEnabled(true);
+
+ if ( (selected()->count() == 1) )
+ {
+ if (selected()->type()==Area::Polygon)
+ {
+ increaseWidthAction->setEnabled(false);
+ decreaseWidthAction->setEnabled(false);
+ increaseHeightAction->setEnabled(false);
+ decreaseHeightAction->setEnabled(false);
+ addPointAction->setEnabled(true);
+ removePointAction->setEnabled(true);
+ }
+ else
+ {
+ increaseWidthAction->setEnabled(true);
+ decreaseWidthAction->setEnabled(true);
+ increaseHeightAction->setEnabled(true);
+ decreaseHeightAction->setEnabled(true);
+ addPointAction->setEnabled(false);
+ removePointAction->setEnabled(false);
+ }
+
+ }
+ else
+ {
+ increaseWidthAction->setEnabled(false);
+ decreaseWidthAction->setEnabled(false);
+ increaseHeightAction->setEnabled(false);
+ decreaseHeightAction->setEnabled(false);
+ addPointAction->setEnabled(false);
+ removePointAction->setEnabled(false);
+ }
+
+ }
+ else
+ {
+ areaPropertiesAction->setEnabled(false);
+ deleteAction->setEnabled(false);
+ copyAction->setEnabled(false);
+ cutAction->setEnabled(false);
+ moveLeftAction->setEnabled(false);
+ moveRightAction->setEnabled(false);
+ moveUpAction->setEnabled(false);
+ moveDownAction->setEnabled(false);
+ increaseWidthAction->setEnabled(false);
+ decreaseWidthAction->setEnabled(false);
+ increaseHeightAction->setEnabled(false);
+ decreaseHeightAction->setEnabled(false);
+ toFrontAction->setEnabled(false);
+ toBackAction->setEnabled(false);
+ addPointAction->setEnabled(false);
+ removePointAction->setEnabled(false);
+
+ }
+
+ updateUpDownBtn();
+}
+
+void KImageMapEditor::updateUpDownBtn()
+{
+ if (!isReadWrite())
+ return;
+
+ AreaList list = currentSelected->getAreaList();
+
+ if (list.isEmpty() || (areas->count() < 2))
+ {
+ forwardOneAction->setEnabled(false);
+ areaListView->upBtn->setEnabled(false);
+ backOneAction->setEnabled(false);
+ areaListView->downBtn->setEnabled(false);
+ return;
+ }
+ // if the first Area is in the selection can't move up
+ if (list.find( areas->getFirst() ) == -1)
+ {
+ forwardOneAction->setEnabled(true);
+ areaListView->upBtn->setEnabled(true);
+ }
+ else {
+ forwardOneAction->setEnabled(false);
+ areaListView->upBtn->setEnabled(false);
+ }
+
+ drawZone->repaintArea(*currentSelected);
+
+ // if the last Area is in the selection can't move down
+ if (list.find( areas->getLast() ) == -1)
+ {
+ backOneAction->setEnabled(true);
+ areaListView->downBtn->setEnabled(true);
+ }
+ else {
+ backOneAction->setEnabled(false);
+ areaListView->downBtn->setEnabled(false);
+ }
+
+}
+
+void KImageMapEditor::deselectAll()
+{
+ QRect redrawRect= currentSelected->selectionRect();
+ currentSelected->reset();
+ drawZone->repaintRect(redrawRect);
+ updateActionAccess();
+}
+
+Area* KImageMapEditor::onArea(const QPoint & p) const {
+ for (Area* s=areas->first();s!=0L;s=areas->next()) {
+ if (s->contains(p))
+ return s;
+ }
+ return 0L;
+}
+
+
+int KImageMapEditor::showTagEditor(Area *a) {
+ if (!a) return 0;
+ drawZone->repaintArea(*a);
+
+ AreaDialog *dialog= new AreaDialog(this,a);
+ connect (dialog, SIGNAL(areaChanged(Area*)), this, SLOT(slotAreaChanged(Area*)));
+
+ int result = dialog->exec();
+
+ return result;
+
+
+}
+
+int KImageMapEditor::showTagEditor(QListViewItem *item) {
+ if (!item) return 0;
+ for (Area* a=areas->first();a!=0L;a=areas->next()) {
+ if (a->listViewItem()==item) {
+ return showTagEditor(a);
+ }
+ }
+ return 0;
+}
+
+int KImageMapEditor::showTagEditor() {
+ return showTagEditor(selected());
+}
+
+
+QString KImageMapEditor::getHTMLImageMap() const {
+ QString retStr;
+ retStr+="<map "+QString("name=\"")+_mapName+"\">\n";
+
+ for (Area* a=areas->first();a!=0L;a=areas->next()) {
+ retStr+=" "+a->getHTMLCode()+"\n";
+ }
+
+ if (defaultArea && defaultArea->finished())
+ retStr+=" "+defaultArea->getHTMLCode()+"\n";
+
+ retStr+="</map>";
+ return retStr;
+}
+
+QPixmap KImageMapEditor::makeListViewPix(Area & a)
+{
+ QPixmap pix=a.cutOut(drawZone->picture());
+
+ double shrinkFactor=1;
+
+ // picture fits into max row height ?
+ if (maxAreaPreviewHeight < pix.height())
+ shrinkFactor = ( (double) maxAreaPreviewHeight / pix.height() );
+
+ QPixmap pix2((int)(pix.width()*shrinkFactor), (int)(pix.height()*shrinkFactor));
+
+ // Give all pixels a defined color
+ pix2.fill(Qt::white);
+
+ QPainter p(&pix2);
+
+ p.scale(shrinkFactor,shrinkFactor);
+ p.drawPixmap(0,0,pix);
+
+ return pix2;
+}
+
+void KImageMapEditor::setMapName(const QString & s) {
+ mapsListView->changeMapName(_mapName, s);
+ _mapName=s;
+ currentMapElement->mapTag->name = s;
+}
+
+
+void KImageMapEditor::setPicture(const KURL & url) {
+ _imageUrl=url;
+ if (QFileInfo(url.path()).exists()) {
+ QImage img(url.path());
+
+ if (!img.isNull()) {
+ setPicture(img);
+ imageRemoveAction->setEnabled(true);
+ imageUsemapAction->setEnabled(true);
+ }
+ else
+ kdError() << QString("The image %1 could not be opened.").arg(url.path()) << endl;
+ }
+ else
+ kdError() << QString("The image %1 does not exist.").arg(url.path()) << endl;
+}
+
+void KImageMapEditor::setPicture(const QImage & pix) {
+ drawZone->setPicture(pix);
+ updateAllAreas();
+}
+
+
+void KImageMapEditor::slotDrawArrow() {
+ _currentToolType=KImageMapEditor::Selection;
+
+}
+
+void KImageMapEditor::slotDrawCircle() {
+ _currentToolType=KImageMapEditor::Circle;
+
+}
+
+void KImageMapEditor::slotDrawRectangle() {
+ _currentToolType=KImageMapEditor::Rectangle;
+
+}
+
+void KImageMapEditor::slotDrawPolygon() {
+ _currentToolType=KImageMapEditor::Polygon;
+}
+
+void KImageMapEditor::slotDrawFreehand() {
+ _currentToolType=KImageMapEditor::Freehand;
+}
+
+void KImageMapEditor::slotDrawAddPoint() {
+ _currentToolType=KImageMapEditor::AddPoint;
+}
+
+void KImageMapEditor::slotDrawRemovePoint() {
+ _currentToolType=KImageMapEditor::RemovePoint;
+}
+
+
+void KImageMapEditor::slotZoom() {
+
+ int i=zoomAction->currentItem();
+ switch (i) {
+ case 0 : drawZone->setZoom(0.25);break;
+ case 1 : drawZone->setZoom(0.5);break;
+ case 2 : drawZone->setZoom(1);break;
+ case 3 : drawZone->setZoom(1.5);break;
+ case 4 : drawZone->setZoom(2.0);break;
+ case 5 : drawZone->setZoom(2.5);break;
+ case 6 : drawZone->setZoom(3);break;
+ case 7 : drawZone->setZoom(5);break;
+ case 8 : drawZone->setZoom(7.5);break;
+ case 9 : drawZone->setZoom(10);break;
+ }
+ if (i<10)
+ zoomInAction->setEnabled(true);
+ else
+ zoomInAction->setEnabled(false);
+
+ if (i>0)
+ zoomOutAction->setEnabled(true);
+ else
+ zoomOutAction->setEnabled(false);
+}
+
+void KImageMapEditor::slotZoomIn() {
+ if (zoomAction->currentItem()==(int)(zoomAction->items().count()-1))
+ return;
+
+ zoomAction->setCurrentItem(zoomAction->currentItem()+1);
+ slotZoom();
+}
+
+void KImageMapEditor::slotZoomOut() {
+ if (zoomAction->currentItem()==0)
+ return;
+
+ zoomAction->setCurrentItem(zoomAction->currentItem()-1);
+ slotZoom();
+}
+
+void KImageMapEditor::mapDefaultArea()
+{
+ if (defaultArea)
+ showTagEditor(defaultArea);
+ else {
+ defaultArea= new DefaultArea();
+ showTagEditor(defaultArea);
+ }
+
+}
+
+void KImageMapEditor::mapEditName()
+{
+ bool ok=false;
+#if KDE_IS_VERSION(3, 1, 90)
+ QString input = KInputDialog::getText(i18n("Enter Map Name"),
+ i18n("Enter the name of the map:"),
+ _mapName,&ok,widget());
+#else
+ QString input = KLineEditDlg::getText(i18n("Enter Map Name"),
+ i18n("Enter the name of the map:"),
+ _mapName,&ok,widget());
+#endif
+ if (ok) {
+ if (input != _mapName) {
+ if (mapsListView->nameAlreadyExists(input))
+ KMessageBox::sorry(this->widget(), i18n("The name <em>%1</em> already exists.").arg(input));
+ else {
+ setMapName(input);
+ }
+ }
+ }
+}
+
+void KImageMapEditor::mapShowHTML()
+{
+ KDialogBase *dialog= new KDialogBase(widget(),QString::null,true,i18n("HTML Code of Map"),KDialogBase::Ok);
+ QMultiLineEdit *edit = new QMultiLineEdit(dialog);
+
+ edit->setText(getHtmlCode());
+ edit->setReadOnly(true);
+ edit->setWordWrap(QTextEdit::NoWrap);
+ dialog->setMainWidget(edit);
+// dialog->resize(dialog->calculateSize(edit->maxLineWidth(),edit->numLines()*));
+// dialog->adjustSize();
+ dialog->resize(600,400);
+ dialog->exec();
+}
+
+void KImageMapEditor::openFile(const KURL & url) {
+ if ( ! url.isEmpty()) {
+ QString ext=QFileInfo(url.path()).extension().lower();
+
+ if (ext=="png" || ext=="jpg" || ext=="jpeg" || ext=="gif" ||
+ ext=="bmp" || ext=="xbm" || ext=="xpm" || ext=="mng" || ext=="pnm")
+ addImage(url);
+ else
+ openURL(url);
+ }
+}
+
+bool KImageMapEditor::openURL(const KURL & url) {
+ // If a local file does not exist
+ // we start with an empty file, so
+ // that we can return true here.
+ // For non local files, we cannot check
+ // the existance
+ if (url.isLocalFile() &&
+ ! QFile::exists(url.path()))
+ return true;
+ return KParts::ReadOnlyPart::openURL(url);
+}
+
+void KImageMapEditor::fileOpen() {
+
+ QString fileName = KFileDialog::getOpenFileName(QString::null,
+ i18n("*.png *.jpg *.jpeg *.gif *.htm *.html|Web File\n"
+ "*.png *.jpg *.jpeg *.gif *.bmp *.xbm *.xpm *.pnm *.mng|Images\n"
+ "*.htm *.html|HTML Files\n"
+ "*.png|PNG Images\n*.jpg *.jpeg|JPEG Images\n*.gif|GIF-Images\n*|All Files"),
+ widget(),i18n("Choose File to Open"));
+
+ openFile(KURL( fileName ));
+}
+
+
+
+void KImageMapEditor::fileClose()
+{
+ if (! closeURL())
+ return;
+
+
+ setPicture(getBackgroundImage());
+ recentFilesAction->setCurrentItem(-1);
+ setModified(false);
+}
+
+void KImageMapEditor::fileSave()
+{
+ // if we aren't read-write, return immediately
+ if ( ! isReadWrite() )
+ return;
+
+ if (url().isEmpty()) {
+ fileSaveAs();
+ }
+ else {
+ saveFile();
+ setModified(false);
+ }
+
+
+}
+
+void KImageMapEditor::fileSaveAs() {
+
+ KURL url = KFileDialog::getSaveURL(0L,"*.htm *.html|" + i18n( "HTML File" ) +
+ "\n*.txt|" + i18n( "Text File" ) + "\n*|" + i18n( "All Files" ),widget());
+ if (url.isEmpty() || !url.isValid()) {
+ return;
+ }
+
+
+ QFileInfo fileInfo(url.path());
+
+ if ( fileInfo.exists() )
+ {
+ if (KMessageBox::warningContinueCancel(widget(),
+ i18n("<qt>The file <em>%1</em> already exists.<br>Do you want to overwrite it?</qt>").arg(fileInfo.fileName()),
+ i18n("Overwrite File?"), i18n("Overwrite"))==KMessageBox::Cancel)
+ return;
+
+ if(!fileInfo.isWritable()) {
+ KMessageBox::sorry(widget(), i18n("<qt>You do not have write permission for the file <em>%1</em>.</qt>").arg(fileInfo.fileName()));
+ return;
+ }
+ }
+
+
+ saveAs(url);
+ recentFilesAction->addURL(url);
+
+}
+
+
+bool KImageMapEditor::openFile()
+{
+ QFileInfo fileInfo(url().path());
+
+ if ( !fileInfo.exists() )
+ {
+ KMessageBox::information(widget(),
+ i18n("<qt>The file <b>%1</b> does not exist.</qt>").arg(fileInfo.fileName()),
+ i18n("File Does Not Exist"));
+ return false;
+ }
+
+ openHTMLFile(url());
+
+ drawZone->viewport()->repaint();
+ recentFilesAction->addURL(url());
+ setModified(false);
+ backupFileCreated = false;
+ return true;
+}
+
+/**
+ * This methods supposes that the given QTextStream s has just read
+ * the &lt; of a tag. It now reads all attributes of the tag until a &gt;
+ * The tagname itself is also read and stored as a <em>tagname</em>
+ * attribute. After parsing the whole tag it returns a QDict<QString>
+ * with all attributes and their values. It stores the whole read text in the
+ * parameter readText.
+ */
+QDict<QString> KImageMapEditor::getTagAttributes(QTextStream & s, QString & readText)
+{
+ QDict<QString> dict(17,false);
+ // the "<" is already read
+ QChar w;
+ QString attr,value;
+
+ readText = QString::null;
+
+ // get the tagname
+ while (!s.atEnd() && w!=" ") {
+ s >> w;
+ readText.append(w);
+ if (w==" " || w==">") {
+ dict.insert("tagname",new QString(value));
+ break;
+ }
+ value+=w;
+ }
+
+
+ // do we have a comment ?
+ // read the comment and return
+ if (value.right(3)=="-->")
+ return dict;
+
+ if (value.startsWith("!--")) {
+ while (!s.atEnd()) {
+ s >> w;
+ readText.append(w);
+
+ if (w=="-") {
+ s >> w;
+ readText.append(w);
+ if (w=="-") {
+ s >> w;
+ readText.append(w);
+ if (w==">")
+ return dict;
+ }
+ }
+ }
+ }
+
+ bool attrRead=true; // currently reading an attribute ?
+ bool equalSign=false; // an equalsign was read?
+ bool valueRead=false; // currently reading a value ?
+ QChar quotation='\0'; // currently reading a value with quotation marks ?
+ bool php=false; // currently reading a php script
+ attr=QString::null;
+ value=QString::null;
+
+ //get the other attributes
+ while (!s.atEnd() && w!=">")
+ {
+ s >> w;
+ readText.append(w);
+
+ // End of PHP Script ?
+ if (php && (w=="?") )
+ {
+ s >> w;
+ readText.append(w);
+
+ if (valueRead)
+ value+=w;
+
+ if (w==">")
+ {
+ php = false;
+ s >> w;
+ readText.append(w);
+ }
+ }
+
+ // Wrong syntax or PHP-Skript !
+ if (!php && (w=="<"))
+ {
+ if (valueRead)
+ value+=w;
+ s >> w;
+ readText.append(w);
+ if (valueRead)
+ value+=w;
+
+ if (w=="?")
+ {
+ php = true;
+ }
+ } else
+ // finished ?
+ if (w==">") {
+ if (valueRead)
+ dict.insert(attr,new QString(value));
+ return dict;
+ } else
+ // currently reading an attribute ?
+ if (attrRead) {
+ // if there is a whitespace the attributename has finished
+ // possibly there isn't any value e.g. noshade
+ if (w==" ")
+ attrRead=false;
+ else
+ // an equal sign signals that the value follows
+ if (w=="=") {
+ attrRead=false;
+ equalSign=true;
+ } else
+ attr+=w;
+ } else
+ // an equal sign was read ? delete every whitespace
+ if (equalSign) {
+ if (w!=" ") {
+ equalSign=false;
+ valueRead=true;
+ if (w=="\"" || w=="'")
+ quotation=w;
+ }
+ } else
+ // currently reading the value
+ if (valueRead) {
+ // if php, read without regarding anything
+ if (php)
+ value+=w;
+ // if value within quotation marks is read
+ // only stop when another quotationmark is found
+ else
+ if (quotation != '\0') {
+ if (quotation!=w) {
+ value+=w;
+ } else {
+ quotation='\0';
+ valueRead=false;
+ dict.insert(attr,new QString(value));
+ attr = value = QString::null;
+
+ }
+ } else
+ // a whitespace indicates that the value has finished
+ if (w==" ") {
+ valueRead=false;
+ dict.insert(attr,new QString(value));
+ attr = value = QString::null;
+ }
+ } else {
+ if (w!=" ") {
+ attrRead=true;
+ attr+=w;
+ }
+ }
+ }
+
+ return dict;
+
+}
+
+
+bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, const QString & imagePath)
+{
+ QFile f(url.path());
+ if ( !f.exists () )
+ return false;
+ f.open(IO_ReadOnly);
+ QTextStream s(&f);
+ QString str;
+ QChar w;
+ QDict<QString> *attr=0L;
+ QPtrList<ImageTag> *images= new QPtrList<ImageTag>;
+ MapTag *map=0L;
+ QPtrList<MapTag> *maps = new QPtrList<MapTag>;
+
+ _htmlContent.clear();
+ currentMapElement = 0L;
+
+ QString temp;
+ QString origcode;
+
+ bool readMap=false;
+
+ while (!s.atEnd()) {
+
+ s >> w;
+ if (w=="<")
+ {
+ if (!readMap && !origcode.isEmpty()) {
+ _htmlContent.append( new HtmlElement(origcode));
+ origcode = QString::null;
+ }
+
+ origcode.append("<");
+ attr=new QDict<QString>(getTagAttributes(s,temp));
+ origcode.append(temp);
+
+ if (attr->find("tagname")) {
+
+ if (attr->find("tagname")->lower()=="img") {
+ HtmlImgElement *el = new HtmlImgElement(origcode);
+ el->imgTag = static_cast<ImageTag*>(attr);
+ images->append(el->imgTag);
+ _htmlContent.append(el);
+
+ origcode = QString::null;
+ } else
+ if (attr->find("tagname")->lower()=="map") {
+ map = new MapTag();
+ map->name=(*attr->find("name"));
+ readMap=true;
+ } else
+ if (attr->find("tagname")->lower()=="/map") {
+ readMap=false;
+ maps->append(map);
+ HtmlMapElement *el = new HtmlMapElement(origcode);
+ el->mapTag = map;
+ _htmlContent.append(el);
+
+ origcode = QString::null;
+ } else
+ if (readMap) {
+ if (attr->find("tagname")->lower()=="area") {
+ map->prepend(attr);
+ }
+ } else {
+ _htmlContent.append(new HtmlElement(origcode));
+ origcode = QString::null;
+ }
+
+ }
+ } // w != "<"
+ else {
+ origcode.append(w);
+ }
+ }
+
+ if (!origcode.isEmpty()) {
+ _htmlContent.append(new HtmlElement(origcode));
+ }
+
+ f.close();
+
+ KURL imageUrl;
+ map = 0L;
+
+
+
+ // If there is a preselection of map and image
+ // don't let the user choose something
+ if (imagePath.isNull() || mapName.isNull()) {
+ // If we have more than on map or more than one image
+ // Let the user choose, otherwise take the only ones
+ if (maps->count() == 1) {
+ map = maps->first();
+ }
+
+ if (images->count() == 1) {
+ if (images->first()) {
+ ImageTag* imgTag = images->first();
+ QString *src = imgTag->find("src");
+ if (src)
+ imageUrl = KURL(url,*src);
+ }
+ }
+
+ // If there is only one map and more than one image
+ // try to find out the image with the according usemap tag
+ if (maps->count() == 1 && images->count() > 1) {
+ ImageTag* imageTag;
+ for ( imageTag = images->first(); imageTag; imageTag = images->next() )
+ {
+ QString *usemap = imageTag->find("usemap");
+ if (usemap) {
+ // Remove the #
+ QString usemapName = usemap->right(usemap->length()-1);
+ if (usemapName == map->name) {
+ QString *src = imageTag->find("src");
+ if (src)
+ imageUrl = KURL(url,*src);
+ }
+ }
+ }
+ }
+
+
+ // If there are more than one map or there wasn't
+ // found a fitting image and there is something to choose
+ // let the user choose
+ if (maps->count() >1 || (imageUrl.isEmpty() && images->count() > 1))
+ {
+ ImageMapChooseDialog dialog(widget(),maps,images,url);
+ dialog.exec();
+ map=dialog.currentMap;
+ imageUrl=dialog.pixUrl;
+ }
+ }
+ else
+ imageUrl = imagePath;
+
+ imagesListView->clear();
+ imagesListView->setBaseUrl(url);
+ imagesListView->addImages(images);
+
+ mapsListView->clear();
+ mapsListView->addMaps(maps);
+
+
+ setMapActionsEnabled(false);
+
+ if (map) {
+ mapsListView->selectMap(map->name);
+ }
+ else if ( ! mapName.isNull()) {
+ mapsListView->selectMap(mapName);
+ } else {
+ if (tabWidget)
+ tabWidget->showPage(mapsListView);
+ }
+
+ if (!imageUrl.isEmpty()) {
+ setPicture(imageUrl);
+ } else {
+ setPicture(getBackgroundImage());
+ if (tabWidget)
+ tabWidget->showPage(imagesListView);
+ }
+
+
+ emit setWindowCaption(url.fileName());
+ setModified(false);
+ return true;
+}
+
+/**
+ * Finds the first html element which contains the given text.
+ * Returns the first matching element.
+ * Returns 0L if no element was found.
+ */
+HtmlElement* KImageMapEditor::findHtmlElement(const QString & containingText) {
+ for (HtmlElement * el = _htmlContent.first(); el; el = _htmlContent.next() ) {
+ if (el->htmlCode.contains(containingText,false)) {
+ return el;
+ }
+ }
+ return 0L;
+}
+
+/**
+ * Finds the first html element which contains the given ImageTag.
+ * Returns the first matching element.
+ * Returns 0L if no element was found.
+ */
+HtmlImgElement* KImageMapEditor::findHtmlImgElement(ImageTag* tag) {
+ for (HtmlElement * el = _htmlContent.first(); el; el = _htmlContent.next() ) {
+ HtmlImgElement* imgEl = dynamic_cast<HtmlImgElement*>(el);
+
+ if (imgEl && imgEl->imgTag == tag)
+ return imgEl;
+ }
+ return 0L;
+}
+
+void KImageMapEditor::addMap(const QString & name = QString::null) {
+ HtmlMapElement* el = new HtmlMapElement("\n<map></map>");
+ MapTag* map = new MapTag();
+ map->name = name;
+ el->mapTag = map;
+
+ // Try to find the body tag
+ HtmlElement* bodyTag = findHtmlElement("<body");
+
+ // if we found one add the new map right after the body tag
+ if (bodyTag) {
+ uint index = _htmlContent.find(bodyTag);
+
+ // Add a newline before the map
+ _htmlContent.insert(index+1, new HtmlElement("\n"));
+
+ _htmlContent.insert(index+2, el);
+ } // if there is no body tag we add the map to the end of the file
+ else {
+ // Add a newline before the map
+ _htmlContent.append(new HtmlElement("\n"));
+
+ _htmlContent.append(el);
+ kdDebug() << "KImageMapEditor::addMap : No <body found ! Appending new map to the end." << endl;
+ }
+
+ mapsListView->addMap(name);
+ mapsListView->selectMap(name);
+}
+
+/**
+ * Finds the HtmlMapElement in the HtmlContent, that corresponds
+ * to the given map name.<br>
+ * Returns 0L if there exists no map with the given name
+ */
+HtmlMapElement* KImageMapEditor::findHtmlMapElement(const QString & mapName) {
+ for (HtmlElement * el = _htmlContent.first(); el; el = _htmlContent.next() ) {
+ if (dynamic_cast<HtmlMapElement*>(el)) {
+ HtmlMapElement *tagEl = static_cast<HtmlMapElement*>(el);
+ if (tagEl->mapTag->name == mapName) {
+ return tagEl;
+ }
+ }
+ }
+
+ kdWarning() << "KImageMapEditor::findHtmlMapElement: couldn't find map '" << mapName << "'" << endl;
+ return 0L;
+}
+
+/**
+ * Calls setMap with the HtmlMapElement with the given map name
+ */
+void KImageMapEditor::setMap(const QString & mapName) {
+ HtmlMapElement* el = findHtmlMapElement(mapName);
+ if (!el) {
+ kdWarning() << "KImageMapEditor::setMap : Couldn't set map '" << mapName << "', because it wasn't found !" << endl;
+ return;
+ }
+
+ setMap(el);
+
+}
+
+void KImageMapEditor::setMap(MapTag* map) {
+ for (HtmlElement * el = _htmlContent.first(); el; el = _htmlContent.next() ) {
+ HtmlMapElement *tagEl = dynamic_cast<HtmlMapElement*>(el);
+ if (tagEl) {
+ if (tagEl->mapTag == map) {
+ setMap(tagEl);
+ break;
+ }
+ }
+ }
+
+}
+
+void KImageMapEditor::saveAreasToMapTag(MapTag* map) {
+ map->clear();
+ for (Area* a=areas->first();a!=0L;a=areas->next()) {
+ QDict<QString> *dict = new QDict<QString>(17,false);
+ QString *shapeStr = 0L;
+
+ switch (a->type()) {
+ case Area::Rectangle : shapeStr = new QString("rect");break;
+ case Area::Circle : shapeStr = new QString("circle");break;
+ case Area::Polygon : shapeStr = new QString("poly");break;
+ default : continue;
+ }
+
+ dict->insert("shape",shapeStr);
+
+ for (AttributeIterator it = a->firstAttribute();it!=a->lastAttribute();++it) {
+ dict->insert(it.key(),new QString(it.data()));
+ }
+
+ dict->insert("coords",new QString(a->coordsToString()));
+
+ map->append(dict);
+
+ }
+
+ if (defaultArea && defaultArea->finished()) {
+ QDict<QString> *dict = new QDict<QString>(17,false);
+ dict->insert("shape",new QString("default"));
+
+ for (AttributeIterator it = defaultArea->firstAttribute();it!=defaultArea->lastAttribute();++it) {
+ dict->insert(it.key(),new QString(it.data()));
+ }
+
+ map->append(dict);
+ }
+
+}
+
+void KImageMapEditor::setMap(HtmlMapElement* mapElement) {
+ if (currentMapElement) {
+ currentMapElement->mapTag->modified=true;
+ currentMapElement->htmlCode = getHTMLImageMap();
+ saveAreasToMapTag(currentMapElement->mapTag);
+ }
+
+ currentMapElement = mapElement;
+ MapTag* map = currentMapElement->mapTag;
+
+ // Remove old areas only if a new map is loaded
+ deleteAllAreas();
+ delete defaultArea;
+ defaultArea = 0L;
+// kdDebug() << "KImageMapEditor::setMap : Setting new map : " << map->name << endl;
+ _mapName = map->name;
+ for (AreaTag *tag=map->first();tag!=0L;tag=map->next())
+ {
+ QString shape="rect";
+ if (tag->find("shape"))
+ shape=*tag->find("shape");
+
+ Area::ShapeType type=Area::Rectangle;
+ if (shape=="circle")
+ type=Area::Circle;
+ else if (shape=="poly")
+ type=Area::Polygon;
+ else if (shape=="default")
+ type=Area::Default;
+
+ Area* a=AreaCreator::create(type);
+
+ if (tag->find("href"))
+ a->setAttribute("href",*tag->find("href"));
+
+ if (tag->find("alt"))
+ a->setAttribute("alt",*tag->find("alt"));
+
+ if (tag->find("target"))
+ a->setAttribute("target",*tag->find("target"));
+
+ if (tag->find("title"))
+ a->setAttribute("title",*tag->find("title"));
+
+ if (tag->find("onclick"))
+ a->setAttribute("onclick",*tag->find("onclick"));
+
+ if (tag->find("onmousedown"))
+ a->setAttribute("onmousedown",*tag->find("onmousedown"));
+
+ if (tag->find("onmouseup"))
+ a->setAttribute("onmouseup",*tag->find("onmouseup"));
+
+ if (tag->find("onmouseover"))
+ a->setAttribute("onmouseover",*tag->find("onmouseover"));
+
+ if (tag->find("onmousemove"))
+ a->setAttribute("onmousemove",*tag->find("onmousemove"));
+
+ if (tag->find("onmouseout"))
+ a->setAttribute("onmouseout",*tag->find("onmouseout"));
+
+
+
+ if (type==Area::Default) {
+ defaultArea=a;
+ defaultArea->setFinished(true);
+ continue;
+ }
+
+ if (tag->find("coords"))
+ a->setCoords(*tag->find("coords"));
+
+ a->setMoving(false);
+ addArea(a);
+ }
+
+ updateAllAreas();
+
+ setMapActionsEnabled(true);
+}
+
+/**
+ * Sets wether actions that depend on an selected map
+ * are enabled
+ */
+void KImageMapEditor::setMapActionsEnabled(bool b) {
+ mapDeleteAction->setEnabled(b);
+ mapDefaultAreaAction->setEnabled(b);
+ mapNameAction->setEnabled(b);
+
+ arrowAction->setChecked(true);
+ slotDrawArrow();
+
+ arrowAction->setEnabled(b);
+ circleAction->setEnabled(b);
+ rectangleAction->setEnabled(b);
+ polygonAction->setEnabled(b);
+ freehandAction->setEnabled(b);
+ addPointAction->setEnabled(b);
+ removePointAction->setEnabled(b);
+
+}
+
+QString KImageMapEditor::getHtmlCode() {
+ if (currentMapElement) {
+ currentMapElement->htmlCode = getHTMLImageMap();
+ }
+
+ QString result;
+
+ HtmlElement *el;
+ for ( el = _htmlContent.first(); el; el = _htmlContent.next() ) {
+ result += el->htmlCode;
+ //kdDebug() << "KImageMapEditor::getHtmlCode : Writing : " << el->htmlCode << endl;
+
+ }
+ return result;
+}
+
+void KImageMapEditor::saveImageMap(const KURL & url)
+{
+ QFileInfo fileInfo(url.path());
+
+ if (!QFileInfo(url.directory()).isWritable()) {
+ KMessageBox::error(widget(),
+ i18n("<qt>The file <i>%1</i> could not be saved, because you do not have the required write permissions.</qt>").arg(url.path()));
+ return;
+ }
+
+ if (!backupFileCreated) {
+ QString backupFile = url.path()+"~";
+ KIO::file_copy(url, KURL::fromPathOrURL( backupFile ), -1, true, false, false);
+ backupFileCreated = true;
+ }
+
+ setModified(false);
+
+ if (mapName().isEmpty()) {
+ mapEditName();
+ }
+ QFile file(url.path());
+ file.open(IO_WriteOnly);
+
+ QTextStream t(&file);
+
+ if (_htmlContent.isEmpty()) {
+ t << "<html>\n"
+ << "<head>\n"
+ << " <title></title>\n"
+ << "</head>\n"
+ << "<body>\n"
+ << " " << getHTMLImageMap()
+ << "\n"
+ << " <img src=\"" << QExtFileInfo::toRelative(_imageUrl,KURL( url.directory() )).path() << "\""
+ << " usemap=\"#" << _mapName << "\""
+ << " width=\"" << drawZone->picture().width() << "\""
+ << " height=\"" << drawZone->picture().height() << "\">\n"
+ << "</body>\n"
+ << "</html>";
+ } else
+ {
+ t << getHtmlCode();
+ }
+
+ file.close();
+
+}
+
+
+void KImageMapEditor::slotCut()
+{
+ if ( 0 == currentSelected->count() )
+ return;
+ delete copyArea;
+
+ copyArea= static_cast< AreaSelection* > (currentSelected->clone());
+ pasteAction->setEnabled(true);
+ KCommand *command= new CutCommand(this,*currentSelected);
+ commandHistory()->addCommand( command ,true);
+}
+
+
+void KImageMapEditor::slotDelete()
+{
+ if ( 0 == currentSelected->count() )
+ return;
+
+ KCommand *command= new DeleteCommand(this,*currentSelected);
+ commandHistory()->addCommand( command ,true);
+}
+
+void KImageMapEditor::slotCopy()
+{
+ delete copyArea;
+
+ copyArea = static_cast< AreaSelection* > (currentSelected->clone());
+ pasteAction->setEnabled(true);
+}
+
+void KImageMapEditor::slotPaste()
+{
+ if (!copyArea)
+ return;
+
+ copyArea->moveBy(5,5);
+ if (copyArea->rect().x()>= drawZone->getImageRect().width() ||
+ copyArea->rect().y()>= drawZone->getImageRect().height())
+ copyArea->moveTo(0,0);
+
+ if (copyArea->rect().width()>drawZone->getImageRect().width() ||
+ copyArea->rect().height()>drawZone->getImageRect().height())
+ return;
+
+ AreaSelection *a=static_cast< AreaSelection* > (copyArea->clone());
+ commandHistory()->addCommand( new PasteCommand(this,*a),true);
+ delete a;
+// addAreaAndEdit(a);
+}
+
+
+
+void KImageMapEditor::slotBackOne()
+{
+ if (currentSelected->isEmpty())
+ return;
+
+ AreaList list = currentSelected->getAreaList();
+
+
+ Area *a = 0L;
+ // move every selected Area one step lower
+ for (int i=areas->count()-2; i > -1; i--)
+ {
+ if (list.find( areas->at(i) ) > -1 )
+ {
+ a = areas->at(i);
+ areas->remove(a);
+ areas->insert((uint)i+1,a);
+ a->listViewItem()->moveItem( areas->at(i)->listViewItem() );
+ }
+ }
+ // to update the up and down buttons
+ updateUpDownBtn();
+
+}
+
+void KImageMapEditor::slotForwardOne()
+{
+ if (currentSelected->isEmpty())
+ return;
+
+ AreaList list = currentSelected->getAreaList();
+
+ Area *a = 0L;
+ // move every selected Area one step higher
+ for (int i=1; i < (int)areas->count(); i++)
+ {
+ if (list.find( areas->at(i) ) > -1 )
+ {
+ a = areas->at(i);
+ areas->remove(a);
+ areas->insert((uint)i-1,a);
+ areas->at(i)->listViewItem()->moveItem( a->listViewItem() );
+ }
+ }
+ // to update the up and down buttons
+ updateUpDownBtn();
+}
+
+void KImageMapEditor::slotToBack()
+{
+ if (currentSelected->isEmpty())
+ return;
+
+ while (backOneAction->isEnabled())
+ slotBackOne();
+}
+
+void KImageMapEditor::slotToFront()
+{
+ if (currentSelected->isEmpty())
+ return;
+
+ while (forwardOneAction->isEnabled())
+ slotForwardOne();
+}
+
+
+void KImageMapEditor::slotMoveUp()
+{
+ QRect r=selected()->rect();
+ selected()->setMoving(true);
+ selected()->moveBy(0,-1);
+
+ commandHistory()->addCommand(
+ new MoveCommand( this, selected(), r.topLeft() ) ,true );
+ selected()->setMoving(false);
+ slotAreaChanged(selected());
+ slotUpdateSelectionCoords();
+}
+
+void KImageMapEditor::slotMoveDown()
+{
+ QRect r=selected()->rect();
+ selected()->setMoving(true);
+ selected()->moveBy(0,1);
+
+ commandHistory()->addCommand(
+ new MoveCommand( this, selected(), r.topLeft() ) ,true );
+ selected()->setMoving(false);
+ slotAreaChanged(selected());
+ slotUpdateSelectionCoords();
+}
+
+void KImageMapEditor::slotMoveLeft()
+{
+ QRect r=selected()->rect();
+ selected()->setMoving(true);
+ selected()->moveBy(-1,0);
+
+ commandHistory()->addCommand(
+ new MoveCommand( this, selected(), r.topLeft() ) ,true );
+ selected()->setMoving(false);
+ slotAreaChanged(selected());
+ slotUpdateSelectionCoords();
+}
+
+void KImageMapEditor::slotMoveRight()
+{
+ QRect r=selected()->rect();
+ selected()->setMoving(true);
+ selected()->moveBy(1,0);
+
+ commandHistory()->addCommand(
+ new MoveCommand( this, selected(), r.topLeft() ) ,true );
+ selected()->setMoving(false);
+ slotAreaChanged(selected());
+ slotUpdateSelectionCoords();
+}
+
+void KImageMapEditor::slotCancelDrawing()
+{
+ drawZone->cancelDrawing();
+}
+
+void KImageMapEditor::slotIncreaseHeight()
+{
+ Area *oldArea=selected()->clone();
+
+ QRect r = selected()->rect();
+ r.setHeight( r.height()+1 );
+ r.moveBy(0,-1);
+
+ selected()->setRect(r);
+
+ commandHistory()->addCommand(
+ new ResizeCommand( this, selected(), oldArea ) ,true );
+ slotAreaChanged(selected());
+ slotUpdateSelectionCoords();
+}
+
+void KImageMapEditor::slotDecreaseHeight()
+{
+ Area *oldArea=selected()->clone();
+
+ QRect r = selected()->rect();
+ r.setHeight( r.height()-1 );
+ r.moveBy(0,1);
+
+ selected()->setRect(r);
+
+ commandHistory()->addCommand(
+ new ResizeCommand( this, selected(), oldArea ) ,true );
+ slotAreaChanged(selected());
+ slotUpdateSelectionCoords();
+}
+
+void KImageMapEditor::slotIncreaseWidth()
+{
+ Area *oldArea=selected()->clone();
+
+ QRect r = selected()->rect();
+ r.setWidth( r.width()+1 );
+
+ selected()->setRect(r);
+
+ commandHistory()->addCommand(
+ new ResizeCommand( this, selected(), oldArea ) ,true );
+ slotAreaChanged(selected());
+ slotUpdateSelectionCoords();
+}
+
+void KImageMapEditor::slotDecreaseWidth()
+{
+ Area *oldArea=selected()->clone();
+
+ QRect r = selected()->rect();
+ r.setWidth( r.width()-1 );
+
+ selected()->setRect(r);
+
+ commandHistory()->addCommand(
+ new ResizeCommand( this, selected(), oldArea ) ,true );
+ slotAreaChanged(selected());
+ slotUpdateSelectionCoords();
+}
+
+void KImageMapEditor::slotHightlightAreas()
+{
+ bool b = highlightAreasAction->isChecked();
+
+// highlightAreasAction->setChecked(b);
+ Area::highlightArea = b;
+ updateAllAreas();
+ drawZone->viewport()->repaint();
+}
+
+void KImageMapEditor::slotShowAltTag()
+{
+ bool b = showAltAction->isChecked();
+// showAltAction->setChecked(b);
+ Area::showAlt = b;
+ drawZone->viewport()->repaint();
+}
+
+void KImageMapEditor::mapNew()
+{
+ QString mapName = mapsListView->getUnusedMapName();
+ addMap(mapName);
+ mapEditName();
+}
+
+void KImageMapEditor::mapDelete()
+{
+ if (mapsListView->count() == 0)
+ return;
+
+ QString selectedMap = mapsListView->selectedMap();
+
+ int result = KMessageBox::warningContinueCancel(widget(),
+ i18n("<qt>Are you sure you want to delete the map <i>%1</i>?"
+ " <br><b>There is no way to undo this.</b></qt>").arg(selectedMap),
+ i18n("Delete Map?"),KGuiItem(i18n("&Delete"),"editdelete"));
+
+ if (result == KMessageBox::No)
+ return;
+
+
+
+ mapsListView->removeMap(selectedMap);
+ HtmlMapElement* mapEl = findHtmlMapElement(selectedMap);
+ _htmlContent.remove(mapEl);
+ if (mapsListView->count() == 0) {
+
+ currentMapElement = 0L;
+ deleteAllAreas();
+ setMapActionsEnabled(false);
+ }
+ else {
+ // The old one was deleted, so the new one got selected
+ setMap(mapsListView->selectedMap());
+ }
+}
+
+void KImageMapEditor::mapPreview() {
+ HTMLPreviewDialog dialog(widget(), url(), getHtmlCode());
+ dialog.exec();
+}
+
+void KImageMapEditor::deleteAllMaps()
+{
+ deleteAllAreas();
+ mapsListView->clear();
+ if (isReadWrite()) {
+ mapDeleteAction->setEnabled(false);
+ mapDefaultAreaAction->setEnabled(false);
+ mapNameAction->setEnabled(false);
+ }
+}
+
+/**
+ * Doesn't call the closeURL method, because
+ * we need the URL for the session management
+ */
+bool KImageMapEditor::queryClose() {
+ if ( ! isModified() )
+ return true;
+
+ switch ( KMessageBox::warningYesNoCancel( widget(),
+ i18n("<qt>The file <i>%1</i> has been modified.<br>Do you want to save it?</qt>").arg(url().fileName()), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) ) {
+ case KMessageBox::Yes :
+ saveFile();
+ return true;
+ case KMessageBox::No :
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool KImageMapEditor::closeURL()
+{
+ bool result = KParts::ReadWritePart::closeURL();
+ if (!result)
+ return false;
+
+ _htmlContent.clear();
+ deleteAllMaps();
+ imagesListView->clear();
+
+ delete copyArea;
+ copyArea=0L;
+
+ delete defaultArea;
+ defaultArea=0L;
+
+ currentMapElement = 0L;
+
+ init();
+ emit setWindowCaption("");
+
+ return true;
+
+}
+
+void KImageMapEditor::addImage(const KURL & imgUrl) {
+ if (imgUrl.isEmpty())
+ return;
+
+ QString relativePath ( QExtFileInfo::toRelative(imgUrl, KURL( url().directory() )).path() );
+
+ QString imgHtml = QString("<img src=\"")+relativePath+QString("\">");
+ ImageTag *imgTag = new ImageTag();
+ imgTag->insert("tagname",new QString("img"));
+ imgTag->insert("src", new QString(relativePath));
+
+ HtmlImgElement *imgEl = new HtmlImgElement(imgHtml);
+ imgEl->imgTag = imgTag;
+
+ HtmlElement *bodyEl = findHtmlElement("<body");
+ if (bodyEl) {
+ int bodyIndex = _htmlContent.find(bodyEl);
+ _htmlContent.insert(bodyIndex+1, new HtmlElement("\n"));
+ _htmlContent.insert(bodyIndex+2, imgEl);
+ }
+ else {
+ _htmlContent.append(new HtmlElement("\n"));
+ _htmlContent.append(imgEl);
+ }
+
+ imagesListView->addImage(imgTag);
+ imagesListView->selectImage(imgTag);
+ setImageActionsEnabled(true);
+
+ setModified(true);
+}
+
+/**
+ * Sets whether the image actions that depend on an
+ * selected image are enabled
+ */
+void KImageMapEditor::setImageActionsEnabled(bool b) {
+ imageRemoveAction->setEnabled(b);
+ imageUsemapAction->setEnabled(b);
+}
+
+
+void KImageMapEditor::imageAdd() {
+ KURL imgUrl = KFileDialog::getImageOpenURL();
+ addImage(imgUrl);
+}
+
+void KImageMapEditor::imageRemove() {
+ ImageTag* imgTag = imagesListView->selectedImage();
+ HtmlImgElement* imgEl = findHtmlImgElement(imgTag);
+ imagesListView->removeImage(imgTag);
+ _htmlContent.remove(imgEl);
+
+ if (imagesListView->childCount() == 0) {
+ setPicture(getBackgroundImage());
+ setImageActionsEnabled(false);
+ }
+ else {
+ ImageTag* selected = imagesListView->selectedImage();
+ if (selected) {
+ QString *url = selected->find("src");
+ if (url) {
+ setPicture(KURL(*url));
+ }
+ }
+ }
+
+ setModified(true);
+}
+
+void KImageMapEditor::imageUsemap() {
+
+ bool ok=false;
+ ImageTag* imageTag = imagesListView->selectedImage();
+ if ( ! imageTag)
+ return;
+
+ QString usemap;
+
+ if (imageTag->find("usemap"))
+ usemap=*imageTag->find("usemap");
+
+ QStringList maps = mapsListView->getMaps();
+ int index = maps.findIndex(usemap);
+ if (index == -1) {
+ maps.prepend("");
+ index = 0;
+ }
+
+#if KDE_IS_VERSION(3, 1, 90)
+ QString input = KInputDialog::getItem(i18n("Enter Usemap"),
+#else
+ QString input = QInputDialog::getItem(i18n("Enter Usemap"),
+#endif
+ i18n("Enter the usemap value:"),
+ maps,index,true,&ok,widget());
+ if (ok) {
+ imageTag->replace("usemap", new QString(input));
+ imagesListView->updateImage(imageTag);
+ setModified(true);
+
+ // Update the htmlCode of the HtmlElement
+ HtmlImgElement* imgEl = findHtmlImgElement(imageTag);
+
+ imgEl->htmlCode = "<";
+ QString *tagName = imgEl->imgTag->find("tagname");
+ imgEl->htmlCode += QString(*tagName);
+
+ QDictIterator<QString> it( *imgEl->imgTag );
+ for( ; it.current(); ++it ) {
+ if (it.currentKey() != "tagname") {
+ imgEl->htmlCode += " " + it.currentKey() + "=\"";
+ imgEl->htmlCode += *it.current();
+ imgEl->htmlCode += "\"";
+ }
+ }
+
+ imgEl->htmlCode += ">";
+
+ }
+}
+
+void KImageMapEditor::configureShowAreaList() {
+ if (configureShowAreaListAction->isChecked())
+ mainDock->makeDockVisible(areaDock);
+ else
+ mainDock->makeDockInvisible(areaDock);
+}
+
+void KImageMapEditor::configureShowMapList() {
+ if (configureShowMapListAction->isChecked())
+ mainDock->makeDockVisible(mapsDock);
+ else
+ mainDock->makeDockInvisible(mapsDock);
+}
+
+void KImageMapEditor::configureShowImageList() {
+ if (configureShowImageListAction->isChecked())
+ mainDock->makeDockVisible(imagesDock);
+ else
+ mainDock->makeDockInvisible(imagesDock);
+}
+
+void KImageMapEditor::dockingStateChanged() {
+ if (areaDock) {
+ configureShowImageListAction->setChecked( imagesDock->isVisible() );
+ configureShowAreaListAction->setChecked( areaDock->isVisible() );
+ configureShowMapListAction->setChecked( mapsDock->isVisible() );
+ }
+}
diff --git a/kimagemapeditor/kimagemapeditor.desktop b/kimagemapeditor/kimagemapeditor.desktop
new file mode 100644
index 00000000..263c7536
--- /dev/null
+++ b/kimagemapeditor/kimagemapeditor.desktop
@@ -0,0 +1,55 @@
+[Desktop Entry]
+Type=Application
+MimeType=text/html;
+Exec=kimagemapeditor -caption "%c" %i %m
+Icon=kimagemapeditor
+Terminal=false
+Name=KImageMapEditor
+Name[ne]=केडीई छवि मानचितà¥à¤° समà¥à¤ªà¤¾à¤¦à¤•
+Name[pt_BR]=KEditor de Mapeamento de Imagem
+Name[sk]=KImage editor mapy
+Name[sv]=Kimagemapeditor
+Name[ta]=Kவடிவம௠வரைபà¯à®ªà®Ÿà®®à¯ திரà¯à®¤à¯à®¤à®¿
+Name[tg]=KМуҳаррири таÑвири ҳарита
+Name[tr]=K Resim Haritası Düzenleyicisi
+GenericName=HTML Image Map Editor
+GenericName[bg]=Редактор на Ð¼Ð°Ñ€ÐºÐ¸Ñ€Ð°Ð½Ð¸Ñ Ð½Ð° Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð·Ð° HTML
+GenericName[ca]=Un editor de mapes d'imatge HTML
+GenericName[cs]=Editor HTML map
+GenericName[da]=HTML editor af kortbilleder
+GenericName[de]=Editor für HTML-Bildkarten (Imagemaps)
+GenericName[el]=HTML επεξεÏγαστής εικόνων
+GenericName[es]=Editor de mapas de imágenes HTML
+GenericName[et]=Hüperpildiredaktor
+GenericName[eu]=HTML irudi-mapa editorea
+GenericName[fa]=ویرایشگر نگاشت تصویر زنگام
+GenericName[fi]=HTML-kuvaeditori
+GenericName[fr]=Éditeur d'hyperimages HTML
+GenericName[gl]=Editor de mapas de imaxes HTML
+GenericName[hu]=HTML-térképszerkesztő
+GenericName[is]=HTML myndakortsritill
+GenericName[it]=Editor per le mappe di immagini HTML
+GenericName[ja]=HTML イメージマップエディタ
+GenericName[ka]=HTML გáƒáƒ›áƒáƒ¡áƒáƒ®áƒ£áƒšáƒ”ბის რუქის რედáƒáƒ¥áƒ¢áƒáƒ áƒ˜
+GenericName[lt]=HTML paveikslėlių žemėlapių rengyklė
+GenericName[ms]=Penyunting Peta Imej HTML
+GenericName[nds]=Editor för HTML-Bildkoorten
+GenericName[ne]=à¤à¤šà¤Ÿà¥€à¤à¤®à¤à¤² छवि मानचितà¥à¤° समà¥à¤ªà¤¾à¤¦à¤•
+GenericName[nl]=HTML imagemap editor
+GenericName[pa]=HTML ਚਿੱਤਰ ਨਕਸ਼ਾ ਸੰਪਾਦਕ
+GenericName[pl]=Edytor map obrazków HTML
+GenericName[pt]=Editor de Mapas de Imagem HTML
+GenericName[pt_BR]=Editor de Mapeamento de Imagem HTML
+GenericName[sk]=Editor HTML mapy obrázkov
+GenericName[sl]=Urejevalnik slikovnih zemljevidov v HTML
+GenericName[sr]=Уређивач HTML Ñликовне мапе
+GenericName[sr@Latn]=UreÄ‘ivaÄ HTML slikovne mape
+GenericName[sv]=Redigering av HTML-bildkartor
+GenericName[ta]=HTML வடிவம௠வரைபà¯à®ªà®Ÿà®®à¯ திரà¯à®¤à¯à®¤à®¿
+GenericName[tg]=Муҳаррири таÑвири ҳаритаи HTML
+GenericName[tr]=HTML Resim Haritası Düzenleyicisi
+GenericName[uk]=Редактор карт зображень HTML
+GenericName[zh_CN]=HTML 图åƒæ˜ å°„编辑器
+GenericName[zh_HK]=HTML å½±åƒåœ°åœ–編輯器
+GenericName[zh_TW]=HTML å½±åƒåœ°åœ–編輯器
+Categories=Qt;KDE;Development;WebDevelopment;
diff --git a/kimagemapeditor/kimagemapeditor.h b/kimagemapeditor/kimagemapeditor.h
new file mode 100644
index 00000000..bf76349e
--- /dev/null
+++ b/kimagemapeditor/kimagemapeditor.h
@@ -0,0 +1,460 @@
+/***************************************************************************
+ imagemapeditor.h - description
+ -------------------
+ begin : Wed Apr 4 2001
+ copyright : (C) 2001 by Jan SchÃ?fer
+ email : janschaefer@users.sourceforge.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 KIMAGEMAPDIALOG_H
+#define KIMAGEMAPDIALOG_H
+
+#include <qptrlist.h>
+#include <qobjectlist.h>
+#include <qdict.h>
+#include <qimage.h>
+#include <kurl.h>
+#include <kparts/part.h>
+#include <kparts/browserextension.h>
+#include <kparts/factory.h>
+
+#include <kdeversion.h>
+
+#include "kimearea.h"
+
+/**
+ *@author Jan Schaefer
+ */
+
+
+class QListView;
+class QPushButton;
+class DrawZone;
+class QComboBox;
+class QListViewItem;
+class KToggleAction;
+
+
+
+
+/**
+ * Stores an area tag and all its attributes
+ */
+typedef QDict<QString> AreaTag;
+
+/**
+ * Stores an image tag and all its attributes
+ * the origcode attribute hold the original htmlcode
+ * of this tag
+ */
+typedef QDict<QString> ImageTag;
+
+/**
+ * Only a small class to give a list of AreaTags a name
+ */
+class MapTag : public QPtrList<AreaTag> {
+public:
+ MapTag();
+ QString name;
+ bool modified;
+};
+
+
+class HtmlElement {
+public:
+ HtmlElement(const QString & s) {
+ htmlCode = s;
+ };
+ virtual ~HtmlElement() {}
+ ;
+ QString htmlCode;
+};
+
+class HtmlMapElement : public HtmlElement {
+public:
+ HtmlMapElement(const QString & s) : HtmlElement(s) {
+ mapTag = 0L;
+ };
+
+ virtual ~HtmlMapElement() {};
+
+ MapTag *mapTag;
+};
+
+class HtmlImgElement : public HtmlElement {
+public:
+HtmlImgElement(const QString & s) : HtmlElement(s) {
+ imgTag = 0L;
+ };
+ virtual ~HtmlImgElement() {}
+ ;
+ ImageTag *imgTag;
+};
+
+/**
+ * Stores the hole HTML content in a List.
+ */
+class HtmlContent : public QPtrList<HtmlElement> {}
+;
+
+
+class KSelectAction;
+class KRadioAction;
+class KRecentFilesAction;
+class KAction;
+#if KDE_VERSION < 300
+ class KAccel;
+#endif
+///class QListViewItem;
+class KCommandHistory;
+class KApplication;
+class QTabWidget;
+class AreaListView;
+class ImagesListView;
+class MapsListView;
+class KDockWidget;
+class KDockMainWindow;
+
+// needed by the statusbar
+#define STATUS_CURSOR 1000
+#define STATUS_SELECTION 1001
+
+class KImageMapEditor : public KParts::ReadWritePart {
+ Q_OBJECT
+public :
+ enum ToolType { Selection, Rectangle, Circle, Polygon, Freehand, AddPoint, RemovePoint };
+
+ KImageMapEditor(QWidget *parentWidget, const char *,
+ QObject *parent, const char *name, const QStringList & args = QStringList());
+ virtual ~KImageMapEditor();
+
+ static KAboutData *createAboutData();
+ static KConfig *config();
+
+ /**
+ * Makes sure, that the actions cut, copy, delete and
+ * show properties
+ * can only be executed if sth. is selected.
+ **/
+ void updateActionAccess();
+
+ DrawZone* getDrawZone() {
+ return drawZone;
+ };
+
+ void addAreaAndEdit(Area*);
+ void addArea(Area*);
+ AreaListIterator areaList() const;
+ KImageMapEditor::ToolType currentToolType() const;
+ void deleteSelected();
+ void deleteArea( Area * area);
+ void deleteAllAreas();
+ void deselectAll();
+ void deselect(Area* s);
+ void deselectWithoutUpdate(Area*);
+ QString getHTMLImageMap() const;
+ Area* onArea(const QPoint & p) const;
+ QPixmap makeListViewPix(Area &) ;
+ QString mapName() const;
+ void select(Area*);
+ void selectWithoutUpdate(Area*);
+ void select(QListViewItem*);
+ AreaSelection* selected() const;
+ void setPicture(const QImage & pix);
+ int showTagEditor(Area *);
+ KCommandHistory *commandHistory() const;
+
+ KApplication* app() const;
+
+ // Only refreshes the listView
+ void updateSelection() const;
+
+ void readConfig();
+ void writeConfig();
+
+ virtual void readProperties(KConfig *);
+ virtual void saveProperties(KConfig *);
+ virtual bool closeURL();
+ bool queryClose();
+ virtual void setReadWrite(bool);
+ QString getHtmlCode();
+
+ /**
+ * Reimplemented to disable and enable Save action
+ */
+ virtual void setModified(bool);
+
+ /**
+ * Opens the given file.
+ * If it's an HTML file openURL is called
+ * If it's an Image, the image is added to the image list
+ */
+ void openFile(const KURL &);
+
+ /**
+ * Opens the last URL the user worked with.
+ * Sets also, the last map and the last image
+ */
+ void openLastURL(KConfig*);
+
+ void readConfig(KConfig*);
+ void writeConfig(KConfig*);
+
+ virtual bool openURL(const KURL & url);
+
+protected:
+ void init();
+ bool openHTMLFile(const KURL &, const QString & mapName = QString::null, const QString & imagePath = QString::null);
+ void saveImageMap(const KURL &);
+
+ /**
+ * Returns a language dependend background picture, with
+ * the text : Drop an image or html file
+ */
+ QImage getBackgroundImage();
+
+
+ /**
+ * Saves information to restore the last working state
+ */
+ void saveLastURL(KConfig*);
+
+
+private:
+ // Stores the hole html file in a List
+ // The entries are either a MapTag an ImageTag or a QString
+ HtmlContent _htmlContent;
+
+ // the url of the working image;
+ KURL _imageUrl;
+ QString _mapName;
+ QImage _backgroundImage;
+
+ bool backupFileCreated;
+
+ KImageMapEditor::ToolType _currentToolType;
+ AreaList *areas;
+ AreaSelection *currentSelected;
+ AreaSelection *copyArea;
+ Area *defaultArea;
+ DrawZone* drawZone;
+ QTabWidget* tabWidget;
+ AreaListView *areaListView;
+ ImagesListView* imagesListView;
+ MapsListView* mapsListView;
+ HtmlMapElement* currentMapElement;
+
+ //
+ // Actions
+ //
+ KSelectAction* zoomAction;
+ KRadioAction *arrowAction;
+ KRadioAction *circleAction;
+ KRadioAction *rectangleAction;
+ KRadioAction *polygonAction;
+ KRadioAction *freehandAction;
+ KRadioAction *addPointAction;
+ KRadioAction *removePointAction;
+
+ KAction *cutAction;
+ KAction *deleteAction;
+ KAction *copyAction;
+ KAction *pasteAction;
+ KAction *zoomInAction;
+ KAction *zoomOutAction;
+
+ KAction *mapNewAction;
+ KAction *mapDeleteAction;
+ KAction *mapNameAction;
+ KAction *mapDefaultAreaAction;
+
+ KAction *imageAddAction;
+ KAction *imageRemoveAction;
+ KAction *imageUsemapAction;
+
+ KToggleAction *highlightAreasAction;
+ KToggleAction *showAltAction;
+
+ KAction *areaPropertiesAction;
+
+ KAction *moveLeftAction;
+ KAction *moveRightAction;
+ KAction *moveUpAction;
+ KAction *moveDownAction;
+
+ KAction *increaseWidthAction;
+ KAction *decreaseWidthAction;
+ KAction *increaseHeightAction;
+ KAction *decreaseHeightAction;
+
+ KAction *toFrontAction;
+ KAction *toBackAction;
+ KAction *forwardOneAction;
+ KAction *backOneAction;
+
+ KToggleAction* configureShowAreaListAction;
+ KToggleAction* configureShowMapListAction;
+ KToggleAction* configureShowImageListAction;
+
+
+ KRecentFilesAction* recentFilesAction;
+
+ #if KDE_VERSION < 300
+ KAccel *accel;
+ #endif
+
+ KDockMainWindow *mainDock;
+ KDockWidget* areaDock;
+ KDockWidget* mapsDock;
+ KDockWidget* imagesDock;
+
+ KCommandHistory *_commandHistory;
+ int maxAreaPreviewHeight;
+
+ QString cursorStatusText;
+ QString selectionStatusText;
+
+ void setupActions();
+ void setupStatusBar();
+ void updateStatusBar();
+ /* refreshes all Areas, only used by preferences dialog
+ * updates only the preview pictures*/
+ void updateAllAreas();
+ void updateUpDownBtn();
+
+ QDict<QString> getTagAttributes(QTextStream & s,QString &);
+
+ void setMap(HtmlMapElement*);
+ void setMap(MapTag*);
+ void addMap(const QString &);
+
+ // Returns the entire html file as a String
+ HtmlElement* findHtmlElement(const QString &);
+ HtmlImgElement* findHtmlImgElement(ImageTag*);
+ HtmlMapElement* findHtmlMapElement(const QString &);
+ void deleteAllMaps();
+ void addImage(const KURL &);
+ void setImageActionsEnabled(bool);
+ void setMapActionsEnabled(bool);
+
+ void saveAreasToMapTag(MapTag*);
+ void showPopupMenu(const QPoint &, const QString &);
+ void drawToCenter(QPainter* p, const QString & str, int y, int width);
+
+public slots:
+ void slotChangeStatusCoords(int x,int y);
+ void slotUpdateSelectionCoords();
+ void slotUpdateSelectionCoords( const QRect &);
+ void slotAreaChanged(Area *);
+ void slotShowMainPopupMenu(const QPoint &);
+ void slotShowMapPopupMenu(QListViewItem *, const QPoint &);
+ void slotShowImagePopupMenu(QListViewItem *, const QPoint &);
+ void slotConfigChanged();
+ void setPicture(const KURL & url);
+ void setMap(const QString &);
+ void setMapName(const QString & s);
+
+
+protected slots:
+ // overriden from KReadWritePart
+ virtual bool openFile();
+
+ virtual bool saveFile() {
+ saveImageMap( url() );
+// setModified(false);
+ return true;
+ }
+
+ void fileOpen();
+ void fileSaveAs();
+ void fileSave();
+ void fileClose();
+
+ void slotShowPopupMenu(QListViewItem*,const QPoint &);
+ void slotShowPreferences();
+ void slotHightlightAreas();
+ void slotShowAltTag();
+ void slotSelectionChanged();
+
+ int showTagEditor(QListViewItem *item);
+ int showTagEditor();
+
+ void slotZoom();
+ void slotZoomIn();
+ void slotZoomOut();
+
+ void slotCut();
+ void slotCopy();
+ void slotPaste();
+ void slotDelete();
+
+ void slotDrawArrow();
+ void slotDrawCircle();
+ void slotDrawRectangle();
+ void slotDrawPolygon();
+ void slotDrawFreehand();
+ void slotDrawAddPoint();
+ void slotDrawRemovePoint();
+
+ void mapDefaultArea();
+ void mapNew();
+ void mapDelete();
+ void mapEditName();
+ void mapShowHTML();
+ void mapPreview();
+
+ void slotBackOne();
+ void slotForwardOne();
+ void slotToBack();
+ void slotToFront();
+
+ void slotMoveUp();
+ void slotMoveDown();
+ void slotMoveLeft();
+ void slotMoveRight();
+
+ void slotIncreaseHeight();
+ void slotDecreaseHeight();
+ void slotIncreaseWidth();
+ void slotDecreaseWidth();
+
+ void slotCancelDrawing();
+
+ void configureShowAreaList();
+ void configureShowMapList();
+ void configureShowImageList();
+
+
+ // void slotPreferences();
+ void imageAdd();
+ void imageRemove();
+ void imageUsemap();
+
+ void dockingStateChanged();
+
+};
+
+
+inline KImageMapEditor::ToolType KImageMapEditor::currentToolType() const {
+ return _currentToolType;
+}
+
+inline QString KImageMapEditor::mapName() const {
+ return _mapName;
+}
+
+inline KCommandHistory* KImageMapEditor::commandHistory() const {
+ return _commandHistory;
+}
+
+
+#endif
diff --git a/kimagemapeditor/kimagemapeditorpart.desktop b/kimagemapeditor/kimagemapeditorpart.desktop
new file mode 100644
index 00000000..758b510a
--- /dev/null
+++ b/kimagemapeditor/kimagemapeditorpart.desktop
@@ -0,0 +1,54 @@
+[Desktop Entry]
+Type=Service
+MimeType=text/html
+Icon=kimagemapeditor
+ServiceTypes=KParts/ReadWritePart
+X-KDE-Library=libkimagemapeditor
+Comment=An HTML imagemap editor
+Comment[bg]=Редактор на Ð¼Ð°Ñ€ÐºÐ¸Ñ€Ð°Ð½Ð¸Ñ Ð½Ð° Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð·Ð° HTML
+Comment[ca]=Un editor de mapes d'imatge HTML
+Comment[cs]=Editor HTML map
+Comment[da]=En HTML-editor af kortbilleder
+Comment[de]=Ein Editor für HTML-Bildkarten (Imagemaps)
+Comment[el]=HTML επεξεÏγαστής εικόνων
+Comment[es]=Un editor de mapas de imágenes HTML
+Comment[et]=Hüperpildiredaktor
+Comment[eu]=HTML irudi-mapa editore bat
+Comment[fa]=یک ویرایشگر نگاشت تصویر زنگام
+Comment[fi]=HTML-imagemap -editori
+Comment[fr]=Éditeur d'hyperimages HTML
+Comment[gl]=Un editor de mapas de imaxes HTML
+Comment[hu]=HTML-térképszerkesztő
+Comment[is]=HTML myndakortsritill
+Comment[it]=Un editor per le mappe di immagini HTML
+Comment[ja]=HTML イメージマップエディタ
+Comment[ka]=HTML გáƒáƒ›áƒáƒ¡áƒáƒ®áƒ£áƒšáƒ”ბის რუქის რედáƒáƒ¥áƒ¢áƒáƒ áƒ˜
+Comment[lt]=HTML paveikslėlių žemėlapių rengyklė
+Comment[ms]=Penyunting Peta Imej HTML
+Comment[nds]=En Editor för HTML-Bildkoorten
+Comment[ne]=à¤à¤‰à¤Ÿà¤¾ à¤à¤šà¤Ÿà¥€à¤à¤®à¤à¤² छवि मानचितà¥à¤° समà¥à¤ªà¤¾à¤¦à¤•à¤¸
+Comment[nl]=Een hulpmiddel om HTML imagemaps te maken
+Comment[pl]=Edytor map obrazków HTML
+Comment[pt]=Editor de Mapas de Imagem HTML
+Comment[pt_BR]=Um editor de mapeamento de imagem HTML
+Comment[ru]=Редактор HTML imagemap
+Comment[sk]=Editor HTML mapy obrázkov
+Comment[sl]=Urejevalnik slikovnih zemljevidov v HTML
+Comment[sr]=Уређивач HTML Ñликовне мапе
+Comment[sr@Latn]=UreÄ‘ivaÄ HTML slikovne mape
+Comment[sv]=En editor för HTML-bildkartor
+Comment[ta]=An HTML வடிவம௠வரைபà¯à®ªà®Ÿà®®à¯ திரà¯à®¤à¯à®¤à®¿
+Comment[tg]=Муҳаррири таÑвири ҳаритаи HTML
+Comment[tr]=Bir HTML resim_haritası düzenleyicisi
+Comment[uk]=Редактор imagemap HTML
+Comment[zh_CN]=HTML 图åƒæ˜ å°„编辑器
+Comment[zh_HK]=一個 HTML å½±åƒåœ°åœ–的編輯器
+Comment[zh_TW]=一個 HTML å½±åƒåœ°åœ–的編輯器
+Name=KImageMapEditor
+Name[ne]=केडीई छवि मानचितà¥à¤° समà¥à¤ªà¤¾à¤¦à¤•
+Name[pt_BR]=KEditor de Mapeamento de Imagem
+Name[sk]=KImage editor mapy
+Name[sv]=Kimagemapeditor
+Name[ta]=Kவடிவம௠வரைபà¯à®ªà®Ÿà®®à¯ திரà¯à®¤à¯à®¤à®¿
+Name[tg]=KМуҳаррири таÑвири ҳарита
+Name[tr]=K Resim Haritası Düzenleyicisi
diff --git a/kimagemapeditor/kimagemapeditorpartui.rc b/kimagemapeditor/kimagemapeditorpartui.rc
new file mode 100644
index 00000000..6f6df968
--- /dev/null
+++ b/kimagemapeditor/kimagemapeditorpartui.rc
@@ -0,0 +1,150 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="kimagemapeditorpart" version="20">
+ <MenuBar>
+ <Menu name="file">
+ <Action name="file_open"/>
+ <Action name="file_open_recent"/>
+ <Separator/>
+ <Action name="file_save"/>
+ <Action name="file_save_as"/>
+ <Separator/>
+ <Action name="file_close"/>
+ </Menu>
+ <Menu name="edit" noMerge="1">
+ <text>&amp;Edit</text>
+ <Action name="edit_undo" />
+ <Action name="edit_redo" />
+ <Separator/>
+ <Action name="edit_cut" />
+ <Action name="edit_copy" />
+ <Action name="edit_paste" />
+ <Action name="edit_delete" />
+ <Separator/>
+ <Action name="tofront" />
+ <Action name="toback" />
+ <Action name="forwardone" />
+ <Action name="backone" />
+ <Separator/>
+ <Action name="edit_properties" />
+ </Menu>
+ <Menu name="view" >
+ <text>&amp;View</text>
+ <Action name="view_zoom_in"/>
+ <Action name="view_zoom_out"/>
+ <Action name="view_zoom"/>
+ <Separator/>
+ <Action name="view_highlightareas"/>
+ <Action name="view_showalt"/>
+ </Menu>
+ <Menu name="tools" >
+ <text>&amp;Tools</text>
+ <Action name="tool_arrow" />
+ <Action name="tool_circle" />
+ <Action name="tool_rectangle" />
+ <Action name="tool_polygon" />
+ <Action name="tool_freehand" />
+ <Action name="tool_addpoint" />
+ <Action name="tool_removepoint" />
+ </Menu>
+ <Menu name="map" >
+ <text>&amp;Map</text>
+ <Action name="map_name" />
+ <Action name="map_new" />
+ <Action name="map_delete" />
+ <Separator/>
+ <Action name="map_defaultarea" />
+ <Separator/>
+ <Action name="map_showhtml" />
+ <Action name="map_preview" />
+ </Menu>
+ <Menu name="images" >
+ <text>&amp;Image</text>
+ <Action name="image_usemap" />
+ <Action name="image_remove" />
+ <Action name="image_add" />
+ </Menu>
+ <Menu name="settings"><text>&amp;Settings</text>
+ <Separator/>
+ <Action name="configure_show_arealist" group="settings_show"/>
+ <Action name="configure_show_maplist" group="settings_show"/>
+ <Action name="configure_show_imagelist" group="settings_show"/>
+ <Separator/>
+ <Action name="configure_kimagemapeditor" group="settings_configure"/>
+ </Menu>
+ </MenuBar>
+ <StatusBar/>
+ <ToolBar name="mainToolBar">
+ <text>KImageMapEditor Main Toolbar</text>
+ <Action name="file_open"/>
+ <Action name="file_save"/>
+ <Action name="file_save_as"/>
+ <Separator/>
+ <Action name="edit_undo" />
+ <Action name="edit_redo" />
+ <Separator/>
+ <Action name="edit_cut" />
+ <Action name="edit_copy" />
+ <Action name="edit_paste" />
+ <Action name="edit_delete" />
+ <Separator/>
+ <Action name="view_zoom_in"/>
+ <Action name="view_zoom_out"/>
+ <Action name="view_zoom"/>
+ <Separator/>
+ </ToolBar>
+ <ToolBar noMerge="1" name="kImageMapEditorPartDrawToolBar">
+ <text>KImageMapEditor Draw Toolbar</text>
+ <Action name="tool_arrow" />
+ <Action name="tool_circle" />
+ <Action name="tool_rectangle" />
+ <Action name="tool_polygon" />
+ <Action name="tool_freehand" />
+ <Action name="tool_addpoint" />
+ <Action name="tool_removepoint" />
+ </ToolBar>
+ <Menu name="popup_main">
+ <Action name="edit_properties" />
+ <Separator/>
+ <Action name="edit_cut" />
+ <Action name="edit_copy" />
+ <Action name="edit_paste" />
+ <Action name="edit_delete" />
+ <Separator/>
+ <Action name="tofront" />
+ <Action name="toback" />
+ <Action name="forwardone" />
+ <Action name="backone" />
+ </Menu>
+ <Menu name="popup_map">
+ <Action name="map_name" />
+ <Action name="map_new" />
+ <Action name="map_delete" />
+ <Action name="map_defaultarea" />
+ </Menu>
+ <Menu name="popup_image">
+ <Action name="image_usemap" />
+ <Action name="image_remove" />
+ <Action name="image_add" />
+ </Menu>
+
+
+ <ActionProperties>
+ <Action shortcut="Left" name="moveleft" />
+ <Action shortcut="Right" name="moveright" />
+ <Action shortcut="Down" name="movedown" />
+ <Action shortcut="Up" name="moveup" />
+ <Action shortcut="Shift+Left" name="decreasewidth" />
+ <Action shortcut="Shift+Right" name="increasewidth" />
+ <Action shortcut="Shift+Down" name="decreaseheight" />
+ <Action shortcut="Shift+Up" name="increaseheight" />
+ <Action shortcut="Escape" name="canceldrawing" />
+
+ </ActionProperties>
+</kpartgui>
+
+
+
+
+
+
+
diff --git a/kimagemapeditor/kimagemapeditorui.rc b/kimagemapeditor/kimagemapeditorui.rc
new file mode 100644
index 00000000..68bb713a
--- /dev/null
+++ b/kimagemapeditor/kimagemapeditorui.rc
@@ -0,0 +1,25 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="kimagemapeditor" version="16">
+ <MenuBar>
+ <Menu name="file"><text>&amp;File</text>
+ <Merge/>
+ </Menu>
+ <Menu name="settings">
+ <DefineGroup name="settings_show" append="show_merge"/>
+ <DefineGroup name="settings_configure" append="configure_merge"/>
+ </Menu>
+ <Merge/>
+ </MenuBar>
+ <StatusBar/>
+ <ToolBar noMerge="1" name="mainToolBar">
+ <text>KImageMapEditor Main Toolbar</text>
+ <Action name="file_new" />
+ </ToolBar>
+</kpartgui>
+
+
+
+
+
+
+
diff --git a/kimagemapeditor/kimearea.cpp b/kimagemapeditor/kimearea.cpp
new file mode 100644
index 00000000..cb873564
--- /dev/null
+++ b/kimagemapeditor/kimearea.cpp
@@ -0,0 +1,1749 @@
+/***************************************************************************
+ kimearea.cpp - description
+ -------------------
+ begin : Thu Jun 14 2001
+ copyright : (C) 2001 by Jan Schaefer
+ email : janschaefer@users.sourceforge.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. *
+ * *
+ ***************************************************************************/
+
+#include <qbitmap.h>
+#include <qpointarray.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qimage.h>
+#include <qpen.h>
+#include <qbrush.h>
+#include <qpalette.h>
+#include <qcolor.h>
+#include <qlistview.h>
+
+#include <kdebug.h>
+
+#include "kimearea.h"
+#include "kimecommon.h"
+
+
+#define SELSIZE 7
+
+
+bool Area::highlightArea;
+bool Area::showAlt;
+
+
+Area::Area()
+{
+ _coords=new QPointArray();
+ _selectionPoints= new SelectionPointList();
+ _selectionPoints->setAutoDelete(true);
+ _finished=false;
+ _isSelected=false;
+ _name=i18n("noname");
+ _listViewItem=0L;
+ currentHighlighted=-1;
+ _type=Area::None;
+ _highlightedPixmap=0L;
+
+}
+
+Area* Area::clone() const
+{
+ Area* areaClone = new Area();
+ areaClone->setArea( *this );
+ return areaClone;
+}
+
+QPointArray* Area::coords() const {
+ return _coords;
+}
+
+QString Area::getHTMLAttributes() const
+{
+ QString retStr="";
+
+ for (AttributeIterator it = firstAttribute();it!=lastAttribute();++it)
+ {
+ retStr+=it.key()+"=\""+it.data()+"\" ";
+ }
+
+ return retStr;
+}
+
+
+Area::~Area() {
+ delete _coords;
+ delete _selectionPoints;
+ delete _highlightedPixmap;
+
+}
+
+bool Area::contains(const QPoint &) const {
+ return false;
+}
+
+QString Area::getHTMLCode() const {
+ return "";
+}
+
+QString Area::attribute(const QString & name) const
+{
+ return _attributes[name.lower()];
+}
+
+void Area::setAttribute(const QString & name, const QString & value)
+{
+ _attributes.replace(name.lower(),value);
+ if (value.isEmpty())
+ _attributes.remove(name.lower());
+}
+
+AttributeIterator Area::firstAttribute() const
+{
+ return _attributes.begin();
+}
+
+AttributeIterator Area::lastAttribute() const
+{
+ return _attributes.end();
+}
+
+
+bool Area::setCoords(const QString &) {
+ return true;
+}
+
+void Area::moveSelectionPoint(QRect*, const QPoint &)
+{}
+
+
+ // Default implementation; is specified by subclasses
+QString Area::coordsToString() const
+{
+ return "";
+}
+
+
+Area::ShapeType Area::type() const {
+ return _type;
+}
+
+void Area::setArea(const Area & copy)
+{
+ delete _coords;
+ delete _selectionPoints;
+ _coords=new QPointArray(copy.coords()->copy());
+ _selectionPoints= new SelectionPointList();
+ currentHighlighted=-1;
+
+ // Need a deep copy of the list
+ for (QRect *r=copy.selectionPoints()->first();r!=0L;r=copy.selectionPoints()->next())
+ _selectionPoints->append(new QRect( r->topLeft(),r->bottomRight() ) );
+
+ _finished=copy.finished();
+ _isSelected=copy.isSelected();
+ _rect = copy.rect();
+
+ for (AttributeIterator it = copy.firstAttribute();it!=copy.lastAttribute();++it)
+ {
+ setAttribute(it.key(),it.data());
+ }
+
+ setMoving(copy.isMoving());
+
+// _listViewItem=0L;
+
+}
+
+void Area::setListViewItem(QListViewItem* item) {
+ _listViewItem=item;
+}
+
+void Area::deleteListViewItem()
+{
+ delete _listViewItem;
+ _listViewItem = 0L;
+}
+
+
+void Area::setRect(const QRect & r)
+{
+ _rect=r;
+ updateSelectionPoints();
+}
+
+QRect Area::rect() const {
+ return _rect;
+}
+
+void Area::setMoving(bool b) {
+ _isMoving=b;
+}
+
+
+void Area::moveBy(int dx, int dy) {
+ _rect.moveBy(dx,dy);
+ for (uint i=0;i<_coords->size();i++) {
+ int newX=_coords->point(i).x()+dx;
+ int newY=_coords->point(i).y()+dy;
+ _coords->setPoint(i,newX,newY);
+ }
+
+ for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) {
+ r->moveBy(dx,dy);
+ }
+}
+
+
+void Area::moveTo(int x, int y) {
+ int dx=x-rect().left();
+ int dy=y-rect().top();
+ moveBy(dx,dy);
+}
+
+uint Area::countSelectionPoints() const
+{
+ return (uint) selectionPoints()->count();
+}
+
+int Area::addCoord(const QPoint & p)
+{
+ _coords->resize(_coords->size()+1);
+ _coords->setPoint(_coords->size()-1,p);
+
+ QRect *r= new QRect(0,0,SELSIZE,SELSIZE);
+ r->moveCenter(p);
+ _selectionPoints->append(r);
+ setRect(_coords->boundingRect());
+
+ return _coords->size()-1;
+}
+
+void Area::insertCoord(int pos, const QPoint & p)
+{
+
+/*
+ kdDebug() << p.x() << "," << p.y() << endl;
+
+ if ( _coords->size()>0 )
+ {
+ for (int i=0; i<_coords->size(); i++)
+ {
+ if (p==_coords->point(i))
+ {
+ kdDebug() << "same Point already exists" << endl;
+ return;
+ }
+
+ }
+ }
+*/
+ _coords->resize(_coords->size()+1);
+
+
+ for (int i=_coords->size()-1;i>pos;i--) {
+ _coords->setPoint(i,_coords->point(i-1));
+ }
+ _coords->setPoint(pos, p);
+
+ QRect *r= new QRect(0,0,SELSIZE,SELSIZE);
+ r->moveCenter(p);
+ _selectionPoints->insert(pos,r);
+ setRect(_coords->boundingRect());
+}
+
+void Area::removeCoord(int pos) {
+
+ int count=_coords->size();
+
+ if (count<4)
+ {
+ kdDebug() << "Danger : trying to remove coordinate from Area with less then 4 coordinates !" << endl;
+ return;
+ }
+
+ for (int i=pos;i<(count-1);i++)
+ _coords->setPoint(i, _coords->point(i+1));
+
+ _coords->resize(count-1);
+ _selectionPoints->remove(pos);
+ setRect(_coords->boundingRect());
+}
+
+bool Area::removeSelectionPoint(QRect * r)
+{
+ if (_selectionPoints->contains(r))
+ {
+ removeCoord(_selectionPoints->find(r));
+ return true;
+ }
+
+ return false;
+}
+
+
+void Area::moveCoord(int pos, const QPoint & p) {
+ _coords->setPoint(pos,p);
+ _selectionPoints->at(pos)->moveCenter(p);
+ setRect(_coords->boundingRect());
+}
+
+void Area::setSelected(bool b)
+{
+ _isSelected=b;
+ if (_listViewItem) {
+ _listViewItem->setSelected(b);
+ }
+}
+
+void Area::highlightSelectionPoint(int number){
+ currentHighlighted=number;
+}
+
+QRect Area::selectionRect() const {
+ QRect r = rect();
+ r.moveBy(-SELSIZE*2,-SELSIZE*2);
+ r.setSize(r.size()+QSize(SELSIZE*4,SELSIZE*4));
+
+ return r;
+}
+
+void Area::drawHighlighting(QPainter & p)
+{
+ if (Area::highlightArea && !isMoving() && _highlightedPixmap)
+ {
+ p.setRasterOp(Qt::CopyROP);
+
+ QPoint point = QPoint(rect().x(),rect().y());
+ if (point.x()<0)
+ point.setX(0);
+ if (point.y()<0)
+ point.setY(0);
+
+ p.drawPixmap( point, *_highlightedPixmap);
+
+ }
+}
+
+void Area::drawAlt(QPainter & p)
+{
+ double x,y;
+
+ double scalex = p.worldMatrix().m11();
+// double scaley = p.worldMatrix().m12();
+
+ QWMatrix oldMatrix = p.worldMatrix();
+
+ p.setWorldMatrix(QWMatrix(1,oldMatrix.m12(), oldMatrix.m21(), 1, oldMatrix.dx(), oldMatrix.dy() ));
+
+ x = (rect().x()+rect().width()/2)*scalex;
+ y = (rect().y()+rect().height()/2)*scalex;
+
+ QFontMetrics metrics = p.fontMetrics();
+
+ int w = metrics.width(attribute("alt"));
+ x -= w/2;
+ y += metrics.height()/4;
+
+
+
+ if (highlightArea)
+ {
+ p.setRasterOp(Qt::CopyROP);
+ p.setPen(Qt::black);
+ }
+ else
+ {
+ p.setRasterOp(Qt::XorROP);
+ p.setPen(QPen(QColor("white"),1));
+ }
+
+ p.drawText(myround(x),myround(y),attribute("alt"));
+
+ p.setWorldMatrix(oldMatrix);
+}
+
+void Area::draw(QPainter & p)
+{
+
+ // Only draw the selection points at base class
+ // the rest is done in the derived classes
+ if (_isSelected)
+ {
+ int i=0;
+
+ double scalex = p.worldMatrix().m11();
+// double scaley = p.worldMatrix().m12();
+
+ QWMatrix oldMatrix = p.worldMatrix();
+
+ p.setWorldMatrix(QWMatrix(1,oldMatrix.m12(), oldMatrix.m21(), 1, oldMatrix.dx(), oldMatrix.dy() ));
+
+ for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) {
+
+ // Draw a green circle around the selected point ( only when editing a polygon )
+ if (i==currentHighlighted) {
+ QRect r2(0,0,15,15);
+ r2.moveCenter(r->center()*scalex);
+ p.setRasterOp(Qt::CopyROP);
+ p.setPen(QPen(QColor("lightgreen"),2));
+ p.drawEllipse(r2);
+ p.setRasterOp(Qt::XorROP);
+ p.setPen(QPen(QColor("white"),1));
+ }
+
+ // Draw the selection point
+ p.setRasterOp(Qt::XorROP);
+
+ QRect r3(*r);
+ int d = 1;
+ if (scalex > 2) d=0;
+
+ r3.moveCenter( QPoint((int)(r3.center().x()*scalex),(int)(r3.center().y()*scalex)) );
+
+ p.fillRect(r3,QBrush("white"));
+/*
+ QRect r3(*r);
+ r3.moveTopLeft( QPoint(r3.left()*scalex+2*(scalex-1), r3.top()*scalex+2*(scalex-1)) );
+
+ r3.setSize(r3.size()+QSize(2,2));
+//+ r3.moveBy(-1,-1);
+ p.setRasterOp(Qt::CopyROP);
+ p.setPen(QPen(QColor("lightgreen"),1));
+ p.setBrush(QColor("lightgreen"));
+ p.drawPie(r3,0,5760);
+ p.setPen(QPen(QColor("black"),1));
+ r3.setSize(r3.size()+QSize(2,2));
+ r3.moveBy(-1,-1);
+ p.drawEllipse(r3);
+*/
+ i++;
+ }
+ p.setWorldMatrix(oldMatrix);
+
+
+ }
+
+ if (showAlt)
+ {
+ drawAlt(p);
+ }
+ p.setRasterOp(Qt::XorROP);
+
+}
+
+QRect* Area::onSelectionPoint(const QPoint & p, double zoom) const
+{
+ for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next())
+ {
+ QRect r2(r->topLeft(),r->bottomRight());
+
+ r2.moveCenter(r2.center()*zoom);
+
+ if (r2.contains(p))
+ {
+
+ return r;
+ }
+ }
+
+ return 0L;
+}
+
+
+
+
+/**
+ * returns only the part of the image which is
+ * covered by the area
+ */
+QPixmap Area::cutOut(const QImage & image)
+{
+ if ( 0>=rect().width() ||
+ 0>=rect().height() ||
+ !rect().intersects(image.rect()) )
+ {
+ QPixmap dummyPix(10,10);
+ dummyPix.fill();
+ delete _highlightedPixmap;
+ _highlightedPixmap = 0L;
+ return dummyPix;
+ }
+
+ // Get the mask from the subclasses
+ QBitmap mask=getMask();
+
+ // The rectangle which is part of the image
+ QRect partOfImage=rect();
+ QRect partOfMask(0,0,mask.width(),mask.height());
+
+
+ // If the area is outside of the image make the
+ // preview smaller
+ if ( (rect().x()+rect().width()) > image.width() ) {
+ partOfImage.setWidth( image.width()-rect().x() );
+ partOfMask.setWidth( image.width()-rect().x() );
+ }
+
+ if ( (rect().x() < 0) ) {
+ partOfImage.setX(0);
+ partOfMask.setX(myabs(rect().x()));
+ }
+
+ if ( (rect().y()+rect().height()) > image.height() ) {
+ partOfImage.setHeight( image.height()-rect().y() );
+ partOfMask.setHeight ( image.height()-rect().y() );
+ }
+
+ if ( (rect().y() < 0) ) {
+ partOfImage.setY(0);
+ partOfMask.setY(myabs(rect().y()));
+ }
+
+ QImage tempImage=mask.convertToImage().copy(partOfMask);
+ mask.convertFromImage(tempImage);
+
+// partOfImage = partOfImage.normalize();
+ QImage cut=image.copy(partOfImage);
+
+ QPixmap pix;
+
+// partOfMask = partOfMask.normalize();
+ if (!partOfMask.isValid())
+ kdDebug() << "PartofMask not valid : " << partOfMask.x() << "," << partOfMask.y() << ","
+ << partOfMask.width() << "," << partOfMask.height() << "," << endl;
+
+/*
+ QBitmap mask2(partOfMask.width(), partOfMask.height());
+ QPainter p4(&mask2);
+ p4.drawPixmap( QPoint(0,0) ,mask,partOfMask);
+ p4.flush();
+ p4.end();
+*/
+
+ pix.convertFromImage(cut);
+
+ setHighlightedPixmap(cut, mask);
+
+ QPixmap retPix(pix.width(),pix.height());
+ QPainter p3(&retPix);
+
+ // if transparent image fill the background
+ // with gimp-like rectangles
+ if (pix.mask()) {
+ QPixmap backPix(32,32);
+
+ // Gimp like transparent rectangle
+ QPainter p2(&backPix);
+ p2.fillRect(0,0,32,32,QColor(156,149,156));
+ p2.fillRect(0,16,16,16,QColor(98,105,98));
+ p2.fillRect(16,0,16,16,QColor(98,105,98));
+ p2.flush();
+
+ p3.setPen(QPen());
+ p3.fillRect(0,0,pix.width(),pix.height(),QBrush(QColor("black"),backPix));
+ }
+
+
+ p3.drawPixmap(QPoint(0,0),pix);
+ p3.flush();
+ p3.end();
+ retPix.setMask(mask);
+
+ return retPix;
+}
+
+QBitmap Area::getMask() const
+{
+ QBitmap b;
+ return b;
+}
+
+void Area::setHighlightedPixmap( QImage & im, QBitmap & mask )
+{
+ if (!Area::highlightArea)
+ return;
+
+ delete _highlightedPixmap;
+
+ QImage image = im.convertDepth( 32 );
+ QSize size = image.size();
+ QColor pixel;
+ double r,g,b;
+
+
+ // highlight every pixel
+ for (int y=0; y < size.height(); y++)
+ {
+ for (int x=0; x < size.width(); x++)
+ {
+ r = qRed(image.pixel(x,y));
+ g = qGreen(image.pixel(x,y));
+ b = qBlue(image.pixel(x,y));
+ r = (r *123 / 255)+132;
+ g = (g *123 / 255)+132;
+ b = (b *123 / 255)+132;
+
+ pixel.setRgb( (int) r, (int) g, (int) b);
+ image.setPixel(x,y, pixel.rgb());
+ }
+ }
+
+ _highlightedPixmap = new QPixmap();
+ _highlightedPixmap->convertFromImage( image );
+ _highlightedPixmap->setMask( mask );
+
+ if (_highlightedPixmap->isNull())
+ kdDebug() << "HighlightedPixmap is null" << endl;
+
+}
+
+/********************************************************************
+ * RECTANGLE
+ *******************************************************************/
+
+
+RectArea::RectArea()
+ : Area()
+{
+ QRect *p = new QRect(0,0,SELSIZE,SELSIZE);
+ _selectionPoints->append(p);
+ p = new QRect(0,0,SELSIZE,SELSIZE);
+ _selectionPoints->append(p);
+ p = new QRect(0,0,SELSIZE,SELSIZE);
+ _selectionPoints->append(p);
+ p = new QRect(0,0,SELSIZE,SELSIZE);
+ _selectionPoints->append(p);
+ _type=Area::Rectangle;
+
+}
+
+RectArea::~RectArea() {
+}
+
+Area* RectArea::clone() const
+{
+ Area* areaClone = new RectArea();
+ areaClone->setArea( *this );
+ return areaClone;
+}
+
+void RectArea::draw(QPainter & p)
+{
+
+ drawHighlighting(p);
+// p.setRasterOp(Qt::CopyROP);
+// p.setRasterOp(Qt:: OrROP);
+// QBrush b(QBrush::SolidPattern);
+// QBrush b(QBrush::Dense4Pattern);
+// QBrush b(QBrush::BDiagPattern);
+// b.setColor(QColor(32,32,32));
+// p.fillRect(rect(), b);
+
+ p.setRasterOp(Qt::XorROP);
+ p.setPen(QPen(QColor("white"),1));
+ QRect r(rect());
+ r.setWidth(r.width()+1);
+ r.setHeight(r.height()+1);
+ p.drawRect(r);
+
+ Area::draw(p);
+}
+
+QBitmap RectArea::getMask() const
+{
+ QBitmap mask(rect().width(),rect().height());
+
+ mask.fill(Qt::color0);
+ QPainter p(&mask);
+ p.setBackgroundColor(Qt::color0);
+ p.setPen(Qt::color1);
+ p.setBrush(Qt::color1);
+ mask.fill(Qt::color1);
+ p.end();
+
+ return mask;
+}
+
+QString RectArea::coordsToString() const
+{
+ QString retStr=QString("%1,%2,%3,%4")
+ .arg(rect().left())
+ .arg(rect().top())
+ .arg(rect().right())
+ .arg(rect().bottom());
+
+ return retStr;
+}
+
+bool RectArea::contains(const QPoint & p) const{
+ return rect().contains(p);
+}
+
+void RectArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p)
+{
+ selectionPoint->moveCenter(p);
+ int i=0;
+ for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) {
+ if (r==selectionPoint)
+ break;
+ i++;
+ }
+ QRect r2(_rect);
+ switch (i) {
+ case 0 : _rect.setLeft(p.x());
+ _rect.setTop(p.y());
+ break;
+ case 1 : _rect.setRight(p.x());
+ _rect.setTop(p.y());
+ break;
+ case 2 : _rect.setLeft(p.x());
+ _rect.setBottom(p.y());
+ break;
+ case 3 : _rect.setRight(p.x());
+ _rect.setBottom(p.y());
+ break;
+ }
+ if ( ! _rect.isValid())
+ _rect=r2;
+
+ updateSelectionPoints();
+}
+
+void RectArea::updateSelectionPoints()
+{
+ _selectionPoints->first()->moveCenter(_rect.topLeft());
+ _selectionPoints->next()->moveCenter(_rect.topRight()+QPoint(1,0));
+ _selectionPoints->next()->moveCenter(_rect.bottomLeft()+QPoint(0,1));
+ _selectionPoints->next()->moveCenter(_rect.bottomRight()+QPoint(1,1));
+}
+
+bool RectArea::setCoords(const QString & s)
+{
+ _finished=true;
+
+ QStringList list=QStringList::split(",",s);
+ QRect r;
+ bool ok=true;
+ QStringList::Iterator it = list.begin();
+ r.setLeft((*it).toInt(&ok,10));it++;
+ r.setTop((*it).toInt(&ok,10));it++;
+ r.setRight((*it).toInt(&ok,10));it++;
+ r.setBottom((*it).toInt(&ok,10));
+ if (ok) {
+ setRect(r);
+ return true;
+ } else
+ return false;
+}
+
+QString RectArea::getHTMLCode() const {
+ QString retStr;
+ retStr+="<area ";
+ retStr+="shape=\"rect\" ";
+
+ retStr+=getHTMLAttributes();
+
+ retStr+="coords=\""+coordsToString()+"\" ";
+ retStr+="/>";
+ return retStr;
+
+}
+
+/********************************************************************
+ * CIRCLE
+ *******************************************************************/
+
+
+CircleArea::CircleArea()
+ : Area()
+{
+ _type=Area::Circle;
+ QRect *p = new QRect(0,0,SELSIZE,SELSIZE);
+ _selectionPoints->append(p);
+ p = new QRect(0,0,SELSIZE,SELSIZE);
+ _selectionPoints->append(p);
+ p = new QRect(0,0,SELSIZE,SELSIZE);
+ _selectionPoints->append(p);
+ p = new QRect(0,0,SELSIZE,SELSIZE);
+ _selectionPoints->append(p);
+}
+
+CircleArea::~CircleArea() {
+}
+
+Area* CircleArea::clone() const
+{
+ Area* areaClone = new CircleArea();
+ areaClone->setArea( *this );
+ return areaClone;
+}
+
+void CircleArea::draw(QPainter & p)
+{
+ drawHighlighting(p);
+
+/*
+ p.setRasterOp(Qt::CopyROP);
+ QBrush bold = p.brush();
+ QBrush b(QBrush::Dense5Pattern);
+ b.setColor(QColor("green"));
+ p.setBrush(b);
+ QRect r = _rect;
+ r.moveBy(1,1);
+ r.setSize( r.size()-QSize(2,2) );
+ p.drawChord(r,0,5760);
+ p.setBrush(bold);
+*/
+ p.setRasterOp(Qt::XorROP);
+ p.setPen(QPen(QColor("white"),1));
+
+ QRect r(_rect);
+ r.setWidth(r.width()+1);
+ r.setHeight(r.height()+1);
+ p.drawEllipse(r);
+
+ Area::draw(p);
+}
+
+QBitmap CircleArea::getMask() const
+{
+ QBitmap mask(_rect.width(),_rect.height());
+
+ mask.fill(Qt::color0);
+ QPainter p(&mask);
+ p.setBackgroundColor(Qt::color0);
+ p.setPen(Qt::color1);
+ p.setBrush(Qt::color1);
+ p.drawPie(QRect(0,0,_rect.width(),_rect.height()),0,5760);
+ p.flush();
+ p.end();
+
+
+ return mask;
+
+}
+
+QString CircleArea::coordsToString() const
+{
+ QString retStr=QString("%1,%2,%3")
+ .arg(_rect.center().x())
+ .arg(_rect.center().y())
+ .arg(_rect.width()/2);
+
+ return retStr;
+}
+
+bool CircleArea::contains(const QPoint & p) const
+{
+ QRegion r(_rect,QRegion::Ellipse);
+ return r.contains(p);
+}
+
+void CircleArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p)
+{
+ selectionPoint->moveCenter(p);
+
+ int i=0;
+ for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) {
+ if (r==selectionPoint)
+ break;
+ i++;
+ }
+
+ // The code below really sucks, but I have no better idea.
+ // it only makes sure that the circle is perfektly round
+ QPoint newPoint;
+ int diff=myabs(p.x()-_rect.center().x());
+ if (myabs(p.y()-_rect.center().y())>diff)
+ diff=myabs(p.y()-_rect.center().y());
+
+ newPoint.setX( p.x()-_rect.center().x()<0
+ ? _rect.center().x()-diff
+ : _rect.center().x()+diff);
+
+ newPoint.setY( p.y()-_rect.center().y()<0
+ ? _rect.center().y()-diff
+ : _rect.center().y()+diff);
+
+ switch (i) {
+ case 0 : if (newPoint.x() < _rect.center().x() &&
+ newPoint.y() < _rect.center().y())
+ {
+ _rect.setLeft(newPoint.x());
+ _rect.setTop(newPoint.y());
+ }
+ break;
+ case 1 : if (newPoint.x() > _rect.center().x() &&
+ newPoint.y() < _rect.center().y())
+ {
+ _rect.setRight(newPoint.x());
+ _rect.setTop(newPoint.y());
+ }
+ break;
+ case 2 : if (newPoint.x() < _rect.center().x() &&
+ newPoint.y() > _rect.center().y())
+ {
+ _rect.setLeft(newPoint.x());
+ _rect.setBottom(newPoint.y());
+ }
+ break;
+ case 3 : if (newPoint.x() > _rect.center().x() &&
+ newPoint.y() > _rect.center().y())
+ {
+ _rect.setRight(newPoint.x());
+ _rect.setBottom(newPoint.y());
+ }
+ break;
+ }
+
+
+
+ updateSelectionPoints();
+
+}
+
+void CircleArea::setRect(const QRect & r)
+{
+ QRect r2 = r;
+ if ( r2.height() != r2.width() )
+ r2.setHeight( r2.width() );
+
+ Area::setRect(r2);
+}
+
+
+void CircleArea::updateSelectionPoints()
+{
+ _selectionPoints->first()->moveCenter(_rect.topLeft());
+ _selectionPoints->next()->moveCenter(_rect.topRight());
+ _selectionPoints->next()->moveCenter(_rect.bottomLeft());
+ _selectionPoints->next()->moveCenter(_rect.bottomRight());
+}
+
+bool CircleArea::setCoords(const QString & s)
+{
+ _finished=true;
+ QStringList list=QStringList::split(",",s);
+ bool ok=true;
+ QStringList::Iterator it = list.begin();
+ int x=(*it).toInt(&ok,10);it++;
+ int y=(*it).toInt(&ok,10);it++;
+ int rad=(*it).toInt(&ok,10);
+ if (!ok) return false;
+ QRect r;
+ r.setWidth(rad*2);
+ r.setHeight(rad*2);
+ r.moveCenter(QPoint(x,y));
+ setRect(r);
+ return true;
+}
+
+QString CircleArea::getHTMLCode() const {
+ QString retStr;
+ retStr+="<area ";
+ retStr+="shape=\"circle\" ";
+
+ retStr+=getHTMLAttributes();
+
+ retStr+="coords=\""+coordsToString()+"\" ";
+ retStr+="/>";
+ return retStr;
+
+}
+
+
+/********************************************************************
+ * POLYGON
+ *******************************************************************/
+
+
+PolyArea::PolyArea()
+ : Area()
+{
+ _type=Area::Polygon;
+}
+
+PolyArea::~PolyArea() {
+}
+
+Area* PolyArea::clone() const
+{
+ Area* areaClone = new PolyArea();
+ areaClone->setArea( *this );
+ return areaClone;
+}
+
+void PolyArea::draw(QPainter & p)
+{
+ drawHighlighting(p);
+
+ p.setRasterOp(Qt::XorROP);
+ p.setPen(QPen(QColor("white"),1));
+ if (_coords->count()==0) return;
+
+
+
+ if (_finished)
+ p.drawPolygon ( *_coords,false,0,_coords->count());
+ else
+ p.drawPolyline ( *_coords,0,_coords->count());
+
+/*
+ p.moveTo(_coords->point(0));
+ for (int i=1;i<_coords->count();i++)
+ p.lineTo(_coords->point(i));
+
+ if (_finished)
+ p.lineTo(_coords->point(0));
+*/
+ Area::draw(p);
+}
+
+QBitmap PolyArea::getMask() const
+{
+ QBitmap mask(_rect.width(),_rect.height());
+
+ mask.fill(Qt::color0);
+ QPainter p(&mask);
+ p.setBackgroundColor(Qt::color0);
+ p.setPen(Qt::color1);
+ p.setBrush(Qt::color1);
+ p.setClipping(true);
+ QRegion r(*_coords);
+ r.translate(-_rect.left(),-_rect.top());
+ p.setClipRegion(r);
+ p.fillRect(QRect(0,0,_rect.width(),_rect.height()),Qt::color1);
+ p.flush();
+ p.end();
+
+ return mask;
+}
+
+QString PolyArea::coordsToString() const
+{
+ QString retStr;
+
+ for (uint i=0;i<_coords->count();i++) {
+ retStr.append(QString("%1,%2,")
+ .arg(_coords->point(i).x())
+ .arg(_coords->point(i).y()));
+ }
+
+ retStr.remove(retStr.length()-1,1);
+
+ return retStr;
+}
+
+int PolyArea::distance(const QPoint &p1, const QPoint &p2)
+{
+ QPoint temp = p1-p2;
+ return temp.manhattanLength();
+}
+
+bool PolyArea::isBetween(const QPoint &p, const QPoint &p1, const QPoint &p2)
+{
+ int dist = distance(p,p1)+distance(p,p2)-distance(p1,p2);
+
+ if (myabs(dist)<1)
+ return true;
+ else
+ return false;
+}
+
+void PolyArea::simplifyCoords()
+{
+ if (_coords->size()<4)
+ return;
+
+ QPoint p = _coords->point(0) - _coords->point(1);
+
+ uint i = 1;
+
+
+ while( (i<_coords->size()) && (_coords->size() > 3) )
+ {
+ p = _coords->point(i-1) - _coords->point(i);
+
+ if (p.manhattanLength() < 3)
+ removeCoord(i);
+ else
+ i++;
+ }
+
+ p = _coords->point(0) - _coords->point(1);
+
+ double angle2;
+ double angle1;
+
+ if (p.y()==0)
+ angle1 = 1000000000;
+ else
+ angle1 = (double) p.x() / (double) p.y();
+
+ i=2;
+
+ while( (i<_coords->size()) && (_coords->size() > 3) )
+ {
+ p = _coords->point(i-1) - _coords->point(i);
+
+ if (p.y()==0)
+ angle2 = 1000000000;
+ else
+ angle2 = (double) p.x() / (double) p.y();
+
+ if ( angle2==angle1 )
+ {
+ kdDebug() << "removing " << i-1 << endl;
+ removeCoord(i-1);
+ }
+ else
+ {
+ i++;
+ kdDebug() << "skipping " << i-1 << " cause " << angle1 << "!= " << angle2 << endl;
+ angle1 = angle2;
+
+ }
+
+ }
+
+
+
+}
+
+
+int PolyArea::addCoord(const QPoint & p)
+{
+ if (_coords->size()<3)
+ {
+ return Area::addCoord(p);
+ }
+
+ if (_coords->point(_coords->size()-1) == p)
+ {
+ kdDebug() << "equal Point added" << endl;
+ return -1;
+
+ }
+
+ int n=_coords->size();
+
+// QPoint temp = p-_coords->point(0);
+ int nearest = 0;
+ int olddist = distance(p,_coords->point(0));
+ int mindiff = 999999999;
+
+ // find the two points, which are the nearest one to the new point
+ for (int i=1; i <= n; i++)
+ {
+ int dist = distance(p,_coords->point(i%n));
+ int dist2 = distance(_coords->point(i-1),_coords->point(i%n));
+ int diff = myabs(dist+olddist-dist2);
+ if ( diff<mindiff )
+ {
+ mindiff = diff;
+ nearest = i%n;
+ }
+ olddist=dist;
+ }
+
+ insertCoord(nearest, p);
+
+ return nearest;
+
+}
+
+bool PolyArea::contains(const QPoint & p) const
+{
+ // A line can't contain a point
+ if (_coords->count() >2 ) {
+ QRegion r(*_coords);
+ return r.contains(p);
+ }
+ else
+ return false;
+}
+
+void PolyArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p)
+{
+ selectionPoint->moveCenter(p);
+
+ int i=0;
+ for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) {
+ if (r==selectionPoint)
+ break;
+ i++;
+ }
+ _coords->setPoint(i,p);
+ _rect=_coords->boundingRect();
+}
+
+void PolyArea::updateSelectionPoints()
+{
+ QRect *r;
+ r=_selectionPoints->first();
+
+ for (uint i=0;i<_coords->size();i++)
+ {
+ r->moveCenter(_coords->point(i));
+ r=_selectionPoints->next();
+ }
+
+}
+
+bool PolyArea::setCoords(const QString & s)
+{
+ _finished=true;
+ QStringList list=QStringList::split(",",s);
+ _coords=new QPointArray();
+ _selectionPoints= new SelectionPointList();
+
+ for (QStringList::Iterator it = list.begin(); it !=list.end(); ++it)
+ {
+ bool ok=true;
+ int newXCoord=(*it).toInt(&ok,10);
+ if (!ok) return false;
+ it++;
+ if (it==list.end()) break;
+ int newYCoord=(*it).toInt(&ok,10);
+ if (!ok) return false;
+ insertCoord(_coords->size(), QPoint(newXCoord,newYCoord));
+ }
+
+ return true;
+
+}
+
+QString PolyArea::getHTMLCode() const {
+ QString retStr;
+ retStr+="<area ";
+ retStr+="shape=\"poly\" ";
+
+ retStr+=getHTMLAttributes();
+
+ retStr+="coords=\""+coordsToString()+"\" ";
+ retStr+="/>";
+ return retStr;
+
+}
+
+void PolyArea::setFinished(bool b)
+{
+ // The last Point is the same as the first
+ // so delete it
+ _coords->resize(_coords->size()-1);
+ _selectionPoints->removeLast();
+ _finished=b;
+}
+
+QRect PolyArea::selectionRect() const
+{
+ QRect r = _rect;
+
+ r.moveBy(-10,-10);
+ r.setSize(r.size()+QSize(21,21));
+
+ return r;
+}
+
+
+
+/********************************************************************
+ * DEFAULT
+ *******************************************************************/
+
+
+DefaultArea::DefaultArea()
+ : Area()
+{
+ _type=Area::Default;
+}
+
+DefaultArea::~DefaultArea() {
+}
+
+Area* DefaultArea::clone() const
+{
+ Area* areaClone = new DefaultArea();
+ areaClone->setArea( *this );
+ return areaClone;
+}
+
+void DefaultArea::draw(QPainter &)
+{}
+
+
+QString DefaultArea::getHTMLCode() const {
+ QString retStr;
+ retStr+="<area ";
+ retStr+="shape=\"default\" ";
+
+ retStr+=getHTMLAttributes();
+
+ retStr+="/>";
+ return retStr;
+
+}
+
+
+/********************************************************************
+ * AreaSelection
+ *******************************************************************/
+
+AreaSelection::AreaSelection()
+ : Area()
+{
+ _areas = new AreaList();
+ _name = "Selection";
+ invalidate();
+}
+
+AreaSelection::~AreaSelection() {
+ delete _areas;
+}
+
+Area* AreaSelection::clone() const
+{
+ AreaSelection* areaClone = new AreaSelection();
+
+ // we want a deep copy of the Areas
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ {
+ areaClone->add( it.current()->clone() );
+ }
+
+// areaClone->setArea( *this );
+
+ return areaClone;
+}
+
+
+void AreaSelection::add(Area *a)
+{
+
+ // if a selection of areas was added get the areas of it
+ AreaSelection *selection=0L;
+ if ( (selection = dynamic_cast <AreaSelection*> ( a ) ) )
+ {
+ AreaList list = selection->getAreaList();
+
+ for (Area* area = list.first(); area != 0L; area = list.next() )
+ {
+ if ( _areas->find( area ) == -1 ) {
+ _areas->append( area ); // Must come before area->setSelected
+ area->setSelected( true );
+ }
+ }
+ }
+ else
+ {
+ if ( _areas->find( a ) == -1 ) {
+ _areas->append( a ); // Must come before a->setSelected
+ a->setSelected( true );
+ }
+ }
+
+ invalidate();
+}
+
+void AreaSelection::remove(Area *a)
+{
+ if (_areas->find(a) == -1)
+ return;
+
+ a->setSelected( false );
+ _areas->remove( a );
+ invalidate();
+}
+
+void AreaSelection::reset()
+{
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ {
+ it.current()->setSelected( false );
+ }
+
+ _areas->clear();
+ invalidate();
+}
+
+bool AreaSelection::contains(const QPoint & p) const
+{
+ bool b=false;
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ {
+ if ( it.current()->contains( p ) )
+ {
+ b=true;
+ break;
+ }
+ }
+
+ return b;
+}
+
+QRect* AreaSelection::onSelectionPoint(const QPoint & p, double zoom) const
+{
+ AreaListIterator it=getAreaListIterator();
+
+ if (it.count() != 1)
+ return 0L;
+
+ QRect* retRect=0L;
+
+ for ( ; it.current() != 0L; ++it )
+ {
+ if ( (retRect = it.current()->onSelectionPoint( p , zoom) ) )
+ {
+ break;
+ }
+ }
+
+ return retRect;
+}
+
+void AreaSelection::moveSelectionPoint(QRect* selectionPoint, const QPoint & p)
+{
+ // It's only possible to move a SelectionPoint if only one Area is selected
+ if (_areas->count() != 1)
+ return;
+
+ _areas->getFirst()->moveSelectionPoint(selectionPoint,p);
+
+ invalidate();
+}
+
+
+void AreaSelection::moveBy(int dx, int dy)
+{
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ it.current()->moveBy(dx,dy);
+
+ Area::moveBy( dx, dy );
+
+ invalidate();
+}
+
+QString AreaSelection::typeString() const
+{
+ // if there is only one Area selected
+ // show the name of that Area
+ if ( _areas->count()==0 )
+ return "";
+ else if ( _areas->count()==1 )
+ return _areas->getFirst()->typeString();
+ else
+ return i18n("Number of Areas");
+
+}
+
+Area::ShapeType AreaSelection::type() const
+{
+ // if there is only one Area selected
+ // take the type of that Area
+ if ( _areas->count()==0 )
+ return Area::None;
+ else if ( _areas->count()==1 )
+ return _areas->getFirst()->type();
+ else
+ return Area::Selection;
+}
+
+void AreaSelection::updateSelectionPoints()
+{
+
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ {
+ it.current()->updateSelectionPoints();
+ }
+
+ invalidate();
+
+}
+
+
+
+QRect AreaSelection::selectionRect() const
+{
+ if (!_selectionCacheValid)
+ {
+ _selectionCacheValid=true;
+ QRect r;
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ r = r | it.current()->selectionRect();
+
+ _cachedSelectionRect=r;
+ }
+
+ return _cachedSelectionRect;
+}
+
+uint AreaSelection::count() const {
+ return _areas->count();
+}
+
+bool AreaSelection::isEmpty() const
+{
+ return _areas->isEmpty();
+}
+
+
+AreaList AreaSelection::getAreaList() const {
+ AreaList list(*_areas);
+ return list;
+}
+
+AreaListIterator AreaSelection::getAreaListIterator() const {
+ AreaListIterator it(*_areas);
+ return it;
+}
+
+void AreaSelection::setArea(const Area & copy)
+{
+ Area *area = copy.clone();
+ AreaSelection *selection = dynamic_cast<AreaSelection*>(area);
+ if (selection)
+ setAreaSelection(*selection);
+ else {
+ Area::setArea(copy);
+ invalidate();
+ }
+}
+
+void AreaSelection::setAreaSelection(const AreaSelection & copy)
+{
+ AreaListIterator it=getAreaListIterator();
+ AreaListIterator it2=copy.getAreaListIterator();
+
+ if (it.count() != it2.count())
+ return;
+
+ for ( ; it.current() != 0L; ++it, ++it2 )
+ it.current()->setArea(*it2.current());
+
+ Area::setArea(copy);
+ invalidate();
+}
+
+void AreaSelection::setAreaList( const AreaList & areas )
+{
+ delete _areas;
+ _areas = new AreaList(areas);
+ invalidate();
+}
+
+void AreaSelection::setRect(const QRect & r)
+{
+ if ( _areas->count()==1 )
+ {
+ _areas->getFirst()->setRect(r);
+ }
+
+ invalidate();
+ _rect=rect();
+ updateSelectionPoints();
+}
+
+QRect AreaSelection::rect() const
+{
+ if (!_rectCacheValid)
+ {
+ _rectCacheValid=true;
+ QRect r;
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ r = r | it.current()->rect();
+
+ _cachedRect=r;
+ }
+
+ return _cachedRect;
+}
+
+
+int AreaSelection::addCoord(const QPoint & p)
+{
+ if ( _areas->count()==1 )
+ {
+ return _areas->getFirst()->addCoord(p);
+ invalidate();
+ }
+
+ return 0;
+}
+
+void AreaSelection::insertCoord(int pos, const QPoint & p)
+{
+ if ( _areas->count()==1 )
+ {
+ _areas->getFirst()->insertCoord(pos, p);
+ invalidate();
+ }
+}
+
+void AreaSelection::removeCoord(int pos)
+{
+ if ( _areas->count()==1 )
+ {
+ _areas->getFirst()->removeCoord(pos);
+ invalidate();
+ }
+}
+
+bool AreaSelection::removeSelectionPoint(QRect * r)
+{
+ bool result=false;
+
+ if ( _areas->count()==1 )
+ {
+ result = _areas->getFirst()->removeSelectionPoint(r);
+ invalidate();
+ }
+
+ return result;
+}
+
+SelectionPointList* AreaSelection::selectionPoints() const
+{
+ if ( _areas->count()==1 )
+ {
+ return _areas->getFirst()->selectionPoints();
+ }
+
+ return _selectionPoints;
+}
+
+
+void AreaSelection::moveCoord(int pos,const QPoint & p)
+{
+ if ( _areas->count()==1 )
+ {
+ _areas->getFirst()->moveCoord(pos,p);
+ invalidate();
+ }
+}
+
+void AreaSelection::highlightSelectionPoint(int i)
+{
+ if ( _areas->count()==1 )
+ {
+ _areas->getFirst()->highlightSelectionPoint(i);
+ invalidate();
+ }
+}
+
+
+QPointArray* AreaSelection::coords() const
+{
+ if ( _areas->count()==1 )
+ {
+ return _areas->getFirst()->coords();
+ }
+
+ return Area::coords();
+}
+
+QString AreaSelection::attribute(const QString & name) const
+{
+ if ( _areas->count()==1 )
+ {
+ return _areas->getFirst()->attribute(name);
+ }
+
+ return Area::attribute(name);
+}
+
+void AreaSelection::setAttribute(const QString & name, const QString & value)
+{
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ it.current()->setAttribute(name,value);
+
+ Area::setAttribute(name,value);
+}
+
+AttributeIterator AreaSelection::firstAttribute() const
+{
+ if ( _areas->count()==1 )
+ {
+ return _areas->getFirst()->firstAttribute();
+ }
+
+ return _attributes.begin();
+}
+
+AttributeIterator AreaSelection::lastAttribute() const
+{
+ if ( _areas->count()==1 )
+ {
+ return _areas->getFirst()->lastAttribute();
+ }
+
+ return _attributes.end();
+}
+
+void AreaSelection::setMoving(bool b)
+{
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ it.current()->setMoving(b);
+
+ Area::setMoving(b);
+}
+
+bool AreaSelection::isMoving() const
+{
+ if ( _areas->count()==1 )
+ {
+ return _areas->getFirst()->isMoving();
+ }
+
+ return Area::isMoving();
+}
+
+
+/**
+ * Checks if an area is outside the rectangle parameter
+ * returns false if an area has no pixel in common with the rectangle parameter
+ **/
+bool AreaSelection::allAreasWithin(const QRect & r) const
+{
+ if ( ! r.contains(rect()) )
+ {
+ AreaListIterator it=getAreaListIterator();
+
+ for ( ; it.current() != 0L; ++it )
+ if (!it.current()->rect().intersects(r))
+ return false;
+ }
+
+ return true;
+}
+
+
+void AreaSelection::draw(QPainter &)
+{}
+
+
diff --git a/kimagemapeditor/kimearea.h b/kimagemapeditor/kimearea.h
new file mode 100644
index 00000000..581bba94
--- /dev/null
+++ b/kimagemapeditor/kimearea.h
@@ -0,0 +1,392 @@
+/***************************************************************************
+ kimearea.h - description
+ -------------------
+ begin : Thu Jun 14 2001
+ copyright : (C) 2001 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 KIMEAREA_H
+#define KIMEAREA_H
+
+#include <qrect.h>
+#include <qpoint.h>
+#include <qptrlist.h>
+#include <klocale.h>
+#include <qmap.h>
+
+#include "kdeversion.h"
+
+class QPainter;
+class QPointArray;
+class QListViewItem;
+class QBitmap;
+
+typedef QPtrList<QRect> SelectionPointList;
+
+typedef QMap<QString,QString> AttributeMap;
+typedef QMapConstIterator<QString,QString> AttributeIterator;
+
+
+
+class Area
+{
+public:
+ enum ShapeType { None, Rectangle, Circle, Polygon, Default, Selection };
+ static bool highlightArea;
+ static bool showAlt;
+
+protected:
+ QRect _rect;
+ ShapeType _type;
+ QString _name;
+ QString _href;
+ QString _alt;
+ QString _target;
+ AttributeMap _attributes;
+ bool _isSelected;
+ bool _finished;
+ bool _isMoving;
+ int currentHighlighted;
+ QListViewItem* _listViewItem;
+ // Only used for Polygons
+ QPointArray *_coords;
+ SelectionPointList *_selectionPoints;
+ QPixmap *_highlightedPixmap;
+
+ void drawHighlighting(QPainter & p);
+ void drawAlt(QPainter & p);
+ QString getHTMLAttributes() const;
+
+public:
+ Area();
+ virtual ~Area();
+
+ virtual Area* clone() const;
+ // Default implementation; is specified by subclasses
+ virtual bool contains(const QPoint &) const;
+ // Default implementation; is specified by subclasses
+ virtual QString coordsToString() const;
+ virtual void draw(QPainter &);
+
+ virtual QBitmap getMask() const;
+ virtual QString getHTMLCode() const;
+
+ virtual void setHighlightedPixmap( QImage &, QBitmap &);
+
+ virtual void moveBy(int, int);
+ virtual void moveTo(int, int);
+ virtual void moveSelectionPoint(QRect*, const QPoint &);
+
+ virtual QRect* onSelectionPoint(const QPoint &,double zoom) const;
+ virtual bool removeSelectionPoint(QRect * r);
+ virtual SelectionPointList* selectionPoints() const { return _selectionPoints; }
+
+ virtual QRect rect() const;
+
+ virtual QRect selectionRect() const;
+ virtual void setArea(const Area &);
+ virtual bool setCoords(const QString &);
+ /** finished drawing only important for polygon */
+ virtual void setFinished(bool b) { _finished=b; }
+ virtual void setRect(const QRect &);
+ virtual void setMoving(bool b);
+ virtual bool isMoving() const;
+ // Default implementation; is specified by subclasses
+ virtual QString typeString() const { return ""; }
+ virtual ShapeType type() const;
+
+ virtual void updateSelectionPoints() {};
+
+ // Only interesting for Polygons
+ virtual void simplifyCoords() {};
+ virtual int addCoord(const QPoint &);
+ virtual void insertCoord(int, const QPoint &);
+ virtual void removeCoord(int);
+ virtual void moveCoord(int,const QPoint &);
+ virtual QPointArray* coords() const;
+ virtual void highlightSelectionPoint(int);
+
+ virtual QString attribute(const QString &) const;
+ virtual void setAttribute(const QString &, const QString &);
+ virtual AttributeIterator firstAttribute() const;
+ virtual AttributeIterator lastAttribute() const;
+
+ QPixmap cutOut(const QImage &) ;
+ void setListViewItem(QListViewItem*);
+ void deleteListViewItem();
+ QListViewItem* listViewItem() const;
+ void setName(const QString &);
+ QString name() const;
+ void setSelected(bool b);
+ bool isSelected() const;
+ bool finished() const;
+ uint countSelectionPoints() const;
+
+};
+
+
+
+inline QListViewItem* Area::listViewItem() const {
+ return _listViewItem;
+}
+
+inline void Area::setName(const QString & name) {
+ _name=name;
+}
+
+inline QString Area::name() const {
+ return _name;
+}
+
+inline bool Area::isMoving() const {
+ return _isMoving;
+}
+
+
+inline bool Area::isSelected() const {
+ return _isSelected;
+}
+
+
+inline bool Area::finished() const {
+ return _finished;
+}
+
+/**
+ * Represents a Rectangle Area
+ **/
+class RectArea : public Area
+{
+ public:
+ RectArea();
+ virtual ~RectArea();
+
+ virtual Area* clone() const;
+ virtual bool contains(const QPoint & p) const;
+ virtual QString coordsToString() const;
+ virtual void draw(QPainter & p);
+ virtual void moveSelectionPoint(QRect* selectionPoint, const QPoint & p);
+ virtual bool setCoords(const QString & s);
+ virtual QString typeString() const { return i18n("Rectangle"); }
+ virtual QBitmap getMask() const;
+ virtual QString getHTMLCode() const;
+ virtual void updateSelectionPoints();
+};
+
+
+/**
+ * Represents a Circle Area
+ **/
+class CircleArea : public Area
+{
+ public:
+ CircleArea();
+ virtual ~CircleArea();
+
+ virtual Area* clone() const;
+ virtual bool contains(const QPoint & p) const;
+ virtual QString coordsToString() const;
+ virtual void draw(QPainter & p);
+ virtual void moveSelectionPoint(QRect* selectionPoint, const QPoint & p);
+ virtual bool setCoords(const QString & s);
+ virtual void setRect(const QRect & r);
+ virtual QString typeString() const { return i18n("Circle"); }
+ virtual QBitmap getMask() const;
+ virtual QString getHTMLCode() const;
+ virtual void updateSelectionPoints();
+
+};
+
+/**
+ * Represents a Rectangle Area
+ **/
+class PolyArea :public Area
+{
+ public:
+ PolyArea();
+ virtual ~PolyArea();
+
+ virtual Area* clone() const;
+ virtual bool contains(const QPoint & p) const;
+ virtual QString coordsToString() const;
+ virtual void draw(QPainter & p);
+ virtual void moveSelectionPoint(QRect* selectionPoint, const QPoint & p);
+ virtual void simplifyCoords();
+ virtual int addCoord(const QPoint & p);
+ virtual bool setCoords(const QString & s);
+ virtual QRect selectionRect() const;
+ virtual void setFinished(bool b);
+ virtual QString typeString() const { return i18n("Polygon"); }
+ virtual QBitmap getMask() const;
+ virtual QString getHTMLCode() const;
+ virtual void updateSelectionPoints();
+
+ private:
+ static int distance(const QPoint &p1, const QPoint &p2);
+ static bool isBetween(const QPoint &p, const QPoint &p1, const QPoint &p2);
+
+};
+
+/**
+ * Represents the default Area
+ **/
+class DefaultArea :public Area
+{
+ public:
+ DefaultArea();
+ virtual ~DefaultArea();
+
+ virtual Area* clone() const;
+ // the default area isn't drawn
+ virtual void draw(QPainter & p);
+ virtual QString typeString() const { return i18n("Default"); }
+ virtual QString getHTMLCode() const;
+
+};
+
+
+typedef QPtrList<Area> AreaList;
+typedef QPtrListIterator<Area> AreaListIterator;
+
+/**
+ * This class represents a selection of areas
+ * all operations performed on this class
+ * will be performed on the selected Areas
+ * the only actions that can be used is the
+ * move action
+ **/
+class AreaSelection : public Area {
+ public :
+ AreaSelection();
+ virtual ~AreaSelection();
+
+ /**
+ * New Methods
+ */
+
+ // Adding automatically selects the area
+ void add(Area *a);
+
+ // Removing automatically deselects the area
+ void remove(Area *a);
+
+ // Removes all areas from the list and deselects them
+ void reset();
+
+ uint count() const;
+
+ AreaList getAreaList() const;
+ AreaListIterator getAreaListIterator() const;
+ void setAreaList( const AreaList & areas );
+
+ bool isEmpty() const;
+
+ /**
+ * Overiden Methods of the Area class
+ */
+ virtual bool contains(const QPoint & p) const;
+
+ /**
+ *
+ **/
+ virtual QRect* onSelectionPoint(const QPoint & p, double zoom) const;
+
+ /**
+ * Only if one Area is selected the moveSelectionPoint method
+ * of that Area will be called
+ **/
+ virtual void moveSelectionPoint(QRect* selectionPoint, const QPoint & p);
+
+ virtual SelectionPointList* selectionPoints() const;
+
+ /**
+ * All Areas will be moved by dx and dy
+ **/
+ virtual void moveBy(int dx, int dy);
+
+ /**
+ * Calls for every selected Area the setArea with the
+ * corresponding Area in the copy Selection.
+ * IMPORTANT : works only if the copy Area is an AreaSelection
+ * and have the same number of Areas
+ **/
+ virtual void setArea(const Area & copy);
+ virtual void setAreaSelection(const AreaSelection & copy);
+
+ /**
+ * If only one Area is selected the setRect method of that Area
+ * will be called
+ **/
+ virtual void setRect(const QRect & r);
+ virtual QRect rect() const;
+
+
+ virtual QString typeString() const;
+ virtual ShapeType type() const;
+
+ // The selection is only a container
+ // so it is never drawn
+ virtual void draw(QPainter & p);
+
+
+ /**
+ * A deep copy of the Areas
+ **/
+ virtual Area* clone() const;
+
+ virtual void updateSelectionPoints();
+ virtual int addCoord(const QPoint & p);
+ virtual void insertCoord(int pos, const QPoint & p);
+ virtual void removeCoord(int pos);
+ virtual bool removeSelectionPoint(QRect * r);
+ virtual void moveCoord(int pos,const QPoint & p);
+ virtual QPointArray* coords() const;
+ virtual void highlightSelectionPoint(int);
+
+ virtual QRect selectionRect() const;
+
+ virtual QString attribute(const QString & name) const;
+ virtual void setAttribute(const QString & name, const QString & value);
+ virtual AttributeIterator firstAttribute() const;
+ virtual AttributeIterator lastAttribute() const;
+
+ virtual void setMoving(bool b);
+ virtual bool isMoving() const;
+
+
+ bool allAreasWithin(const QRect & r) const;
+
+ // makes the cache invalid
+ void invalidate();
+ private :
+
+ AreaList *_areas;
+
+ // The selectionRect and the rect are cached
+ // so even in const functions they must be changeable
+ mutable QRect _cachedSelectionRect;
+ mutable QRect _cachedRect;
+ mutable bool _selectionCacheValid;
+ mutable bool _rectCacheValid;
+
+};
+
+
+inline void AreaSelection::invalidate() {
+ _selectionCacheValid=false;
+ _rectCacheValid=false;
+}
+
+#endif
+
+
diff --git a/kimagemapeditor/kimecommands.cpp b/kimagemapeditor/kimecommands.cpp
new file mode 100644
index 00000000..e061a463
--- /dev/null
+++ b/kimagemapeditor/kimecommands.cpp
@@ -0,0 +1,384 @@
+/***************************************************************************
+ kimecommands.cpp - description
+ -------------------
+ begin : Fri May 25 2001
+ copyright : (C) 2001 by Jan Schäfer
+ email : j_schaef@informatik.uni-kl.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. *
+ * *
+ ***************************************************************************/
+#include <qstring.h>
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "kimagemapeditor.h"
+#include "kimecommands.h"
+#include "drawzone.h"
+
+CutCommand::CutCommand(KImageMapEditor * document, const AreaSelection & a)
+ :
+
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+ (i18n( "Cut %1" ).arg( a.typeString() ))
+{
+ _document=document;
+ _cutAreaSelection=new AreaSelection();
+ _cutAreaSelection->setAreaList( a.getAreaList() );
+ _cutted=true;
+}
+
+
+CutCommand::~CutCommand()
+{
+ if (_cutted)
+ {
+ AreaList list = _cutAreaSelection->getAreaList();
+ for ( Area *a=list.first(); a != 0; a=list.next() ) {
+ delete a;
+ }
+ }
+
+ delete _cutAreaSelection;
+}
+
+void CutCommand::execute()
+{
+ // The Area won't be really delete
+ // it only gets removed from the AreaList
+ _document->deleteArea(_cutAreaSelection );
+ _document->updateActionAccess();
+ _cutted=true;
+}
+
+void CutCommand::unexecute()
+{
+ if (_document) {
+ _document->addArea( _cutAreaSelection );
+ _document->select( _cutAreaSelection );
+ _document->slotAreaChanged( _cutAreaSelection );
+ _cutted=false;
+ }
+}
+
+DeleteCommand::DeleteCommand(KImageMapEditor * document, const AreaSelection & a)
+ : CutCommand(document,a)
+{
+ setName(i18n( "Delete %1" ).arg( a.typeString() ));
+}
+
+PasteCommand::PasteCommand(KImageMapEditor *document, const AreaSelection & a)
+ :
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+ (i18n( "Paste %1" ).arg( a.typeString() ))
+{
+ _document=document;
+ _pasteAreaSelection=new AreaSelection();
+ _pasteAreaSelection->setAreaList( a.getAreaList() );
+ _pasted=true;
+ _wasUndoed=false;
+}
+
+PasteCommand::~PasteCommand ()
+{
+ if ( ! _pasted ) {
+ AreaList list=_pasteAreaSelection->getAreaList();
+ for (Area* a=list.first(); a != 0; a=list.next() ) {
+ delete a;
+ }
+ }
+
+ delete _pasteAreaSelection;
+}
+
+void PasteCommand::execute()
+{
+ _document->deselectAll();
+ _document->addArea( _pasteAreaSelection );
+ _document->select( _pasteAreaSelection );
+ _document->slotAreaChanged( _pasteAreaSelection );
+ _pasted=true;
+}
+
+void PasteCommand::unexecute()
+{
+ _document->deleteArea(_pasteAreaSelection );
+ _pasted=false;
+ _wasUndoed=true;
+}
+
+
+MoveCommand::MoveCommand (KImageMapEditor *document, AreaSelection * a, const QPoint & oldPoint)
+ :
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+(i18n( "Move %1" ).arg( a->typeString() ))
+{
+ _document=document;
+ _areaSelection=new AreaSelection();
+ _areaSelection->setAreaList( a->getAreaList() );
+ _oldPoint.setX(oldPoint.x());
+ _oldPoint.setY(oldPoint.y());
+
+ _newPoint.setX(a->rect().left());
+ _newPoint.setY(a->rect().top());
+}
+
+MoveCommand::~MoveCommand () {
+ delete _areaSelection;
+}
+
+void MoveCommand::execute()
+{
+ // only for repainting reasons
+ Area* tempArea = _areaSelection->clone();
+
+ _areaSelection->moveTo( _newPoint.x(), _newPoint.y() );
+
+ if (!_areaSelection->allAreasWithin(_document->getDrawZone()->getImageRect()))
+ _areaSelection->moveTo( _oldPoint.x(), _oldPoint.y() );
+
+ _document->selected()->invalidate();
+
+
+ _document->slotAreaChanged( tempArea );
+ _document->slotAreaChanged( _areaSelection );
+
+ delete tempArea;
+
+}
+
+void MoveCommand::unexecute()
+{
+ // only to erase the old Area
+ Area* tempArea = _areaSelection->clone();
+
+ _areaSelection->setMoving(true);
+ _areaSelection->moveTo( _oldPoint.x(), _oldPoint.y() );
+ _areaSelection->setMoving(false);
+
+ _document->selected()->invalidate();
+
+ _document->slotAreaChanged( tempArea );
+ _document->slotAreaChanged( _areaSelection );
+
+ delete tempArea;
+
+}
+
+
+ResizeCommand::ResizeCommand (KImageMapEditor *document, AreaSelection *a, Area *oldArea)
+ :
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+(i18n( "Resize %1" ).arg( a->typeString() ))
+{
+ _areaSelection=new AreaSelection();
+ _areaSelection->setAreaList( a->getAreaList() );
+
+ _newArea = a->clone();
+ _oldArea = oldArea->clone();
+ _document=document;
+}
+
+ResizeCommand::~ResizeCommand ()
+{
+ delete _newArea;
+ delete _oldArea;
+ delete _areaSelection;
+}
+
+void ResizeCommand::execute()
+{
+ _areaSelection->setArea ( *_newArea);
+ _areaSelection->setMoving(false);
+
+ _document->slotAreaChanged( _areaSelection );
+ _document->slotAreaChanged( _oldArea );
+
+
+}
+
+void ResizeCommand::unexecute()
+{
+ _areaSelection->setArea ( *_oldArea);
+ _areaSelection->setMoving(false);
+
+ _document->slotAreaChanged( _areaSelection );
+ _document->slotAreaChanged( _newArea );
+
+}
+
+
+
+AddPointCommand::AddPointCommand (KImageMapEditor *document, AreaSelection *a, const QPoint & p)
+ :
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+(i18n( "Add point to %1" ).arg( a->typeString() ))
+{
+ if (a->type()!=Area::Polygon)
+ {
+ kdDebug() << "trying to add a point to a " << a->typeString() << endl;
+ return;
+ }
+
+ _areaSelection=new AreaSelection();
+ _areaSelection->setAreaList( a->getAreaList() );
+
+ _point = p;
+ _document=document;
+}
+
+AddPointCommand::~AddPointCommand ()
+{
+ delete _areaSelection;
+}
+
+void AddPointCommand::execute()
+{
+ _coordpos = _areaSelection->addCoord(_point);
+ _areaSelection->setMoving(false);
+
+ _document->slotAreaChanged( _areaSelection );
+}
+
+void AddPointCommand::unexecute()
+{
+// QRect *selectionPoint = _areaSelection->onSelectionPoint(_point);
+ Area* repaintArea = _areaSelection->clone();
+
+ _areaSelection->removeCoord(_coordpos);
+ _areaSelection->setMoving(false);
+
+ _document->slotAreaChanged( _areaSelection );
+ _document->slotAreaChanged( repaintArea );
+
+ delete repaintArea;
+}
+
+RemovePointCommand::RemovePointCommand (KImageMapEditor *document, AreaSelection *a, Area *oldArea)
+ :
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+(i18n( "Remove point from %1" ).arg( a->typeString() ))
+{
+ if (a->type()!=Area::Polygon)
+ {
+ kdDebug() << "trying to remove a point to a " << a->typeString() << endl;
+ return;
+ }
+
+ _areaSelection=new AreaSelection();
+ _areaSelection->setAreaList( a->getAreaList() );
+
+ _newArea = a->clone();
+ _oldArea = oldArea->clone();
+ _document=document;
+}
+
+RemovePointCommand::~RemovePointCommand ()
+{
+ delete _newArea;
+ delete _oldArea;
+ delete _areaSelection;
+}
+
+void RemovePointCommand::execute()
+{
+ _areaSelection->setArea ( *_newArea);
+ _areaSelection->setMoving(false);
+
+ _document->slotAreaChanged( _areaSelection );
+ _document->slotAreaChanged( _oldArea );
+
+
+}
+
+void RemovePointCommand::unexecute()
+{
+ _areaSelection->setArea ( *_oldArea);
+ _areaSelection->setMoving(false);
+
+ _document->slotAreaChanged( _areaSelection );
+ _document->slotAreaChanged( _newArea );
+
+}
+
+
+
+CreateCommand::CreateCommand (KImageMapEditor *document, Area *area)
+ :
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+(i18n( "Create %1" ).arg( area->typeString() ))
+{
+ _document=document;
+ _area=area;
+ _created=true;
+ _wasUndoed=false;
+
+}
+
+CreateCommand::~CreateCommand ()
+{
+ if ( ! _created)
+ delete _area;
+}
+
+void CreateCommand::execute()
+{
+ if (_document) {
+
+ if ( _wasUndoed ) {
+ _document->addArea( _area );
+ _document->deselectAll();
+ _document->select( _area );
+ _document->slotAreaChanged( _area );
+ }
+ else
+ _document->addAreaAndEdit( _area );
+
+ _created=true;
+ }
+
+}
+
+void CreateCommand::unexecute()
+{
+ if (_document) {
+ _document->deleteArea( _area );
+ _created=false;
+ _wasUndoed=true;
+ }
+
+}
diff --git a/kimagemapeditor/kimecommands.h b/kimagemapeditor/kimecommands.h
new file mode 100644
index 00000000..946c09b4
--- /dev/null
+++ b/kimagemapeditor/kimecommands.h
@@ -0,0 +1,198 @@
+/***************************************************************************
+ kimecommands.h - description
+ -------------------
+ begin : Fri May 25 2001
+ copyright : (C) 2001 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 KIMECOMMANDS_H
+#define KIMECOMMANDS_H
+
+
+#include <kcommand.h>
+
+#include <kdeversion.h>
+
+class KImageMapEditor;
+class AreaSelection;
+
+
+
+class CutCommand : public
+
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+
+{
+ public:
+ CutCommand (KImageMapEditor * document, const AreaSelection & selection);
+ virtual ~CutCommand();
+
+ virtual void execute();
+ virtual void unexecute();
+
+ protected:
+ AreaSelection *_cutAreaSelection;
+ KImageMapEditor* _document;
+ bool _cutted;
+};
+
+/**
+ * Does the same like the cut command
+ * only have a different name in the Undo-History
+ **/
+class DeleteCommand : public CutCommand
+{
+ public :
+ DeleteCommand (KImageMapEditor * document, const AreaSelection & selection);
+};
+
+class PasteCommand : public
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+{
+ public:
+ PasteCommand (KImageMapEditor * document, const AreaSelection & selection);
+ ~PasteCommand ();
+
+ virtual void execute();
+ virtual void unexecute();
+
+ protected:
+ AreaSelection *_pasteAreaSelection;
+ KImageMapEditor* _document;
+ bool _pasted;
+ bool _wasUndoed;
+
+};
+
+class MoveCommand : public
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+{
+ public:
+ MoveCommand (KImageMapEditor *document, AreaSelection *a,const QPoint & oldPoint);
+ ~MoveCommand ();
+
+ virtual void execute();
+ virtual void unexecute();
+
+ protected:
+ QPoint _newPoint;
+ QPoint _oldPoint;
+
+ KImageMapEditor* _document;
+ AreaSelection *_areaSelection;
+//- Area *_oldArea;
+};
+
+class ResizeCommand : public
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+{
+ public:
+ ResizeCommand (KImageMapEditor *document, AreaSelection *a, Area *oldArea);
+ ~ResizeCommand ();
+
+ virtual void execute();
+ virtual void unexecute();
+
+ protected:
+
+ KImageMapEditor* _document;
+ AreaSelection *_areaSelection;
+ Area *_oldArea;
+ Area *_newArea;
+};
+
+class AddPointCommand : public
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+{
+ public:
+ AddPointCommand (KImageMapEditor *document, AreaSelection *a, const QPoint & p);
+ ~AddPointCommand ();
+
+ virtual void execute();
+ virtual void unexecute();
+
+ protected:
+
+ KImageMapEditor* _document;
+ AreaSelection *_areaSelection;
+ QPoint _point;
+ int _coordpos;
+};
+
+class RemovePointCommand : public
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+{
+ public:
+ RemovePointCommand (KImageMapEditor *document, AreaSelection *a, Area *oldArea);
+ ~RemovePointCommand ();
+
+ virtual void execute();
+ virtual void unexecute();
+
+ protected:
+
+ KImageMapEditor* _document;
+ AreaSelection *_areaSelection;
+ Area *_oldArea;
+ Area *_newArea;
+};
+
+
+class CreateCommand : public
+#if KDE_VERSION < 300
+KCommand
+#else
+KNamedCommand
+#endif
+{
+ public:
+ CreateCommand (KImageMapEditor *document, Area *area);
+ ~CreateCommand ();
+
+ virtual void execute();
+ virtual void unexecute();
+
+ protected:
+
+ KImageMapEditor* _document;
+ Area *_area;
+ bool _created;
+ bool _wasUndoed;
+};
+
+
+#endif
diff --git a/kimagemapeditor/kimecommon.h b/kimagemapeditor/kimecommon.h
new file mode 100644
index 00000000..4cc2d59f
--- /dev/null
+++ b/kimagemapeditor/kimecommon.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ kimecommon.h - description
+ -------------------
+ begin : Thu Apr 23 2002
+ copyright : (C) 2002 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 __KIMECOMMON_H__
+#define __KIMECOMMON_H__
+
+inline int myabs(int i) {
+ if (i < 0)
+ return -i;
+ else
+ return i;
+}
+
+inline double myabs(double i) {
+ if (i < 0)
+ return -i;
+ else
+ return i;
+}
+
+inline int myround(double d) {
+ if ( (d-((int) d)) < 0.5 )
+ return (int) d;
+ else
+ return ((int) d)+1;
+}
+
+inline int roundUp(double d)
+{
+ if ( (d-((int) d)) == 0)
+ return (int) d;
+ else
+ return ((int) d)+1;
+}
+
+
+#endif
diff --git a/kimagemapeditor/kimedialogs.cpp b/kimagemapeditor/kimedialogs.cpp
new file mode 100644
index 00000000..27f104cb
--- /dev/null
+++ b/kimagemapeditor/kimedialogs.cpp
@@ -0,0 +1,874 @@
+/***************************************************************************
+ kimedialogs.cpp - description
+ -------------------
+ begin : Tue Apr 17 2001
+ copyright : (C) 2001 by Jan Sch�er
+ email : j_schaef@informatik.uni-kl.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
+//#include <qstring.h>
+#include <qcheckbox.h>
+#include <qmultilineedit.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qlineedit.h>
+#include <qlistbox.h>
+#include <qtable.h>
+#include <qgroupbox.h>
+#include <qspinbox.h>
+#include <qtabwidget.h>
+#include <qpointarray.h>
+#include <qimage.h>
+//#include <qwidget.h>
+// KDE
+#include <kiconloader.h>
+#include <kfiledialog.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kapplication.h>
+#include <khtmlview.h>
+#include <khtml_part.h>
+#include <ktempfile.h>
+#include <kpushbutton.h>
+#include <kstdguiitem.h>
+
+// LOCAL
+#include "kimedialogs.h"
+
+CoordsEdit::CoordsEdit(QWidget *parent, Area* a)
+ : QWidget(parent)
+{
+ area=a;
+}
+
+void CoordsEdit::applyChanges() {
+ return;
+}
+
+void CoordsEdit::slotTriggerUpdate() {
+ applyChanges();
+ emit update();
+}
+
+CoordsEdit::~CoordsEdit()
+{
+}
+
+RectCoordsEdit::RectCoordsEdit(QWidget *parent, Area* a)
+ : CoordsEdit(parent,a)
+{
+ QGridLayout *layout= new QGridLayout(this,5,2,5,5);
+
+ topXSpin = new QSpinBox(this);
+ topXSpin->setMaxValue(INT_MAX);
+ topXSpin->setMinValue(0);
+ topXSpin->setValue(a->rect().left());
+ layout->addWidget(topXSpin,0,1);
+ connect( topXSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+ QLabel *lbl= new QLabel(i18n("Top &X:"),this);
+ lbl->setBuddy(topXSpin);
+ layout->addWidget(lbl,0,0);
+
+ topYSpin = new QSpinBox(this);
+ topYSpin->setMaxValue(INT_MAX);
+ topYSpin->setMinValue(0);
+ topYSpin->setValue(a->rect().top());
+ layout->addWidget(topYSpin,1,1);
+ connect( topYSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+ lbl= new QLabel(i18n("Top &Y:"),this);
+ lbl->setBuddy(topYSpin);
+ layout->addWidget(lbl,1,0);
+
+ widthSpin = new QSpinBox(this);
+ widthSpin->setMaxValue(INT_MAX);
+ widthSpin->setMinValue(0);
+ widthSpin->setValue(a->rect().width());
+ layout->addWidget(widthSpin,2,1);
+ connect( widthSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+ lbl= new QLabel(i18n("&Width:"),this);
+ lbl->setBuddy(widthSpin);
+ layout->addWidget(lbl,2,0);
+
+ heightSpin = new QSpinBox(this);
+ heightSpin->setMaxValue(INT_MAX);
+ heightSpin->setMinValue(0);
+ heightSpin->setValue(a->rect().height());
+ layout->addWidget(heightSpin,3,1);
+ connect( heightSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+ lbl= new QLabel(i18n("Hei&ght:"),this);
+ lbl->setBuddy(heightSpin);
+ layout->addWidget(lbl,3,0);
+
+ layout->setRowStretch(4,10);
+}
+
+void RectCoordsEdit::applyChanges() {
+ QRect r;
+ r.setLeft(topXSpin->text().toInt());
+ r.setTop(topYSpin->text().toInt());
+ r.setWidth(widthSpin->text().toInt());
+ r.setHeight(heightSpin->text().toInt());
+ area->setRect(r);
+}
+
+CircleCoordsEdit::CircleCoordsEdit(QWidget *parent, Area* a)
+ : CoordsEdit(parent,a)
+{
+ QGridLayout *layout= new QGridLayout(this,4,2,5,5);
+
+ centerXSpin = new QSpinBox(this);
+ centerXSpin->setMaxValue(INT_MAX);
+ centerXSpin->setMinValue(0);
+ centerXSpin->setValue(a->rect().center().x());
+ layout->addWidget(centerXSpin,0,1);
+ connect( centerXSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+ QLabel *lbl= new QLabel(i18n("Center &X:"),this);
+ lbl->setBuddy(centerXSpin);
+ layout->addWidget(lbl,0,0);
+
+ centerYSpin = new QSpinBox(this);
+ centerYSpin->setMaxValue(INT_MAX);
+ centerYSpin->setMinValue(0);
+ centerYSpin->setValue(a->rect().center().y());
+ layout->addWidget(centerYSpin,1,1);
+ connect( centerYSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+
+ lbl= new QLabel(i18n("Center &Y:"),this);
+ lbl->setBuddy(centerYSpin);
+ layout->addWidget(lbl,1,0);
+
+ radiusSpin = new QSpinBox(this);
+ radiusSpin->setMaxValue(INT_MAX);
+ radiusSpin->setMinValue(0);
+ radiusSpin->setValue(a->rect().width()/2);
+ layout->addWidget(radiusSpin,2,1);
+ connect( radiusSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+
+ lbl= new QLabel(i18n("&Radius:"),this);
+ lbl->setBuddy(radiusSpin);
+ layout->addWidget(lbl,2,0);
+
+ layout->setRowStretch(3,10);
+
+}
+
+void CircleCoordsEdit::applyChanges() {
+ QRect r;
+ r.setWidth(radiusSpin->text().toInt()*2);
+ r.setHeight(radiusSpin->text().toInt()*2);
+ r.moveCenter(QPoint(centerXSpin->text().toInt(),
+ centerYSpin->text().toInt()));
+ area->setRect(r);
+}
+
+PolyCoordsEdit::PolyCoordsEdit(QWidget *parent, Area* a)
+ : CoordsEdit(parent,a)
+{
+ if (!a) return;
+ QVBoxLayout *layout= new QVBoxLayout(this);
+ int numPoints=a->coords()->count();
+ coordsTable= new QTable(numPoints,2,this);
+ coordsTable->horizontalHeader()->setLabel(0,"X");
+ coordsTable->horizontalHeader()->setLabel(1,"Y");
+ coordsTable->verticalHeader()->hide();
+ coordsTable->setLeftMargin(0);
+ coordsTable->setSelectionMode( QTable::Single );
+
+
+ for (int i=0;i<numPoints;i++) {
+ coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) );
+ coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) );
+ }
+
+ connect( coordsTable, SIGNAL(currentChanged(int,int)), this, SLOT(slotHighlightPoint(int)));
+
+// coordsTable->setMinimumHeight(50);
+// coordsTable->setMaximumHeight(400);
+// coordsTable->resizeContents(100,100);
+ coordsTable->resize(coordsTable->width(),100);
+ layout->addWidget(coordsTable);
+ layout->setStretchFactor(coordsTable,-1);
+ QHBox *hbox= new QHBox(this);
+ QPushButton *addBtn=new QPushButton(i18n("Add"),hbox);
+ connect( addBtn, SIGNAL(pressed()), this, SLOT(slotAddPoint()));
+ QPushButton *removeBtn=new QPushButton(i18n("Remove"),hbox);
+ connect( removeBtn, SIGNAL(pressed()), this, SLOT(slotRemovePoint()));
+
+ layout->addWidget(hbox);
+ slotHighlightPoint(1);
+}
+
+PolyCoordsEdit::~PolyCoordsEdit() {
+ if (area)
+ area->highlightSelectionPoint(-1);
+}
+
+void PolyCoordsEdit::slotHighlightPoint(int row) {
+ if (!area) return;
+ area->highlightSelectionPoint(row);
+ emit update();
+}
+
+
+void PolyCoordsEdit::slotAddPoint() {
+ int newPos= coordsTable->currentRow();
+ QPoint currentPoint=area->coords()->point(newPos);
+ area->insertCoord(newPos,currentPoint);
+
+ int count=area->coords()->size();
+
+ coordsTable->setNumRows(count);
+
+ for (int i=0;i<count;i++) {
+ coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) );
+ coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) );
+ }
+
+ emit update();
+}
+
+void PolyCoordsEdit::slotRemovePoint() {
+ int currentPos= coordsTable->currentRow();
+
+ area->removeCoord(currentPos);
+
+ int count=area->coords()->size();
+
+ coordsTable->setNumRows(count);
+
+ for (int i=0;i<count;i++) {
+ coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) );
+ coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) );
+ }
+
+ emit update();
+}
+
+void PolyCoordsEdit::applyChanges() {
+ int count=coordsTable->numRows();
+
+ for (int i=0;i<count;i++) {
+ QPoint newPoint( coordsTable->text(i,0).toInt(),
+ coordsTable->text(i,1).toInt());
+
+ area->moveCoord(i,newPoint);
+ }
+}
+
+SelectionCoordsEdit::SelectionCoordsEdit(QWidget *parent, Area* a)
+ : CoordsEdit(parent,a)
+{
+ QGridLayout *layout= new QGridLayout(this,2,2);
+
+ topXSpin = new QSpinBox(this);
+ topXSpin->setMaxValue(INT_MAX);
+ topXSpin->setMinValue(0);
+ topXSpin->setValue(a->rect().left());
+ layout->addWidget(topXSpin,0,1);
+ connect( topXSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+ QLabel *lbl= new QLabel(i18n("Top &X"),this);
+ lbl->setBuddy(topXSpin);
+ layout->addWidget(lbl,0,0);
+
+ topYSpin = new QSpinBox(this);
+ topYSpin->setMaxValue(INT_MAX);
+ topYSpin->setMinValue(0);
+ topYSpin->setValue(a->rect().top());
+ layout->addWidget(topYSpin,1,1);
+ connect( topYSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate()));
+
+ lbl= new QLabel(i18n("Top &Y"),this);
+ lbl->setBuddy(topYSpin);
+ layout->addWidget(lbl,1,0);
+}
+
+void SelectionCoordsEdit::applyChanges() {
+ area->moveTo(topXSpin->text().toInt(), topYSpin->text().toInt());
+}
+
+
+
+QLineEdit* AreaDialog::createLineEdit(QWidget* parent, QGridLayout *layout, int y, const QString & value, const QString & name)
+{
+ QLineEdit* edit=new QLineEdit(value,parent);
+ layout->addWidget(edit,y,2);
+ QLabel* lbl=new QLabel(name,parent);
+ lbl->setBuddy(edit);
+ layout->addWidget(lbl,y,1);
+
+ return edit;
+}
+
+QWidget* AreaDialog::createGeneralPage()
+{
+ QFrame* page = new QFrame(this);
+ QGridLayout* layout = new QGridLayout(page,5,2,5,5);
+
+
+ QHBox *hbox= new QHBox(page);
+ hrefEdit = new QLineEdit(area->attribute("href"),hbox);
+ QPushButton *btn = new QPushButton("",hbox);
+ btn->setPixmap(SmallIcon("fileopen"));
+ connect( btn, SIGNAL(pressed()), this, SLOT(slotChooseHref()));
+ hbox->setMinimumHeight(hbox->height());
+
+ layout->addWidget(hbox,0,2);
+ QLabel *lbl=new QLabel(i18n( "&HREF:" ),page);
+ lbl->setBuddy(hrefEdit);
+ layout->addWidget(lbl,0,1);
+
+ altEdit = createLineEdit(page,layout,1,area->attribute("alt"),i18n("Alt. &Text:"));
+ targetEdit = createLineEdit(page,layout,2,area->attribute("target"),i18n("Tar&get:"));
+ titleEdit = createLineEdit(page,layout,3,area->attribute("title"),i18n("Tit&le:"));
+
+ if (area->type()==Area::Default)
+ {
+ defaultAreaChk = new QCheckBox(i18n("Enable default map"),page);
+ if (area->finished())
+ defaultAreaChk->setChecked(true);
+ layout->addWidget(defaultAreaChk,3,2);
+ }
+
+
+ layout->setRowStretch(4,10);
+
+ return page;
+}
+
+QWidget* AreaDialog::createCoordsPage()
+{
+ QFrame* page = new QFrame(this);
+ QVBoxLayout *layout = new QVBoxLayout(page);
+ layout->setMargin(5);
+
+ coordsEdit = createCoordsEdit(page,area);
+ layout->addWidget(coordsEdit);
+ connect( coordsEdit, SIGNAL(update()), this, SLOT(slotUpdateArea()));
+
+ return page;
+}
+
+QWidget* AreaDialog::createJavascriptPage()
+{
+ QFrame* page = new QFrame(this);
+ QGridLayout* layout = new QGridLayout(page,8,2,5,5);
+
+ onClickEdit = createLineEdit(page,layout,0,area->attribute("onClick"),i18n("OnClick:"));
+ onDblClickEdit = createLineEdit(page,layout,1,area->attribute("onDblClick"),i18n("OnDblClick:"));
+ onMouseDownEdit = createLineEdit(page,layout,2,area->attribute("onMouseDown"),i18n("OnMouseDown:"));
+ onMouseUpEdit = createLineEdit(page,layout,3,area->attribute("onMouseUp"),i18n("OnMouseUp:"));
+ onMouseOverEdit = createLineEdit(page,layout,4,area->attribute("onMouseOver"),i18n("OnMouseOver:"));
+ onMouseMoveEdit = createLineEdit(page,layout,5,area->attribute("onMouseMove"),i18n("OnMouseMove:"));
+ onMouseOutEdit = createLineEdit(page,layout,6,area->attribute("onMouseOut"),i18n("OnMouseOut:"));
+
+ layout->setRowStretch(7,10);
+
+
+ return page;
+}
+
+QWidget* AreaDialog::createButtonBar()
+{
+ QHBox *box = new QHBox(this);
+ QWidget *spacer = new QWidget(box);
+ QPushButton *okBtn = new KPushButton(KStdGuiItem::ok(),box);
+ QPushButton *applyBtn = new KPushButton(KStdGuiItem::apply(),box);
+ QPushButton *cancelBtn = new KPushButton(KStdGuiItem::cancel(),box);
+
+ connect(okBtn, SIGNAL(clicked()), this, SLOT(slotOk()));
+ connect(applyBtn, SIGNAL(clicked()), this, SLOT(slotApply()));
+ connect(cancelBtn, SIGNAL(clicked()), this, SLOT(slotCancel()));
+
+ box->setSpacing(5);
+ box->setStretchFactor(spacer,10);
+
+ okBtn->setDefault(true);
+
+ return box;
+
+}
+
+AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a)
+ : KDialog(parent->widget(),"",true)
+// : KDialogBase(Tabbed,i18n("Area Tag Editor"),Ok|Apply|Cancel,Ok,parent,"")
+// : KDialogBase(parent,"",true,"Area Tag Editor",Ok|Apply|Cancel,Ok,true)
+{
+ if (!a) {
+ slotCancel();
+ return;
+ }
+
+ _document=parent;
+
+ setCaption(i18n("Area Tag Editor"));
+
+ area=a;
+ QString shape="Default";
+ areaCopy= a->clone();
+ oldArea= new Area();
+ oldArea->setRect( a->rect() );
+
+ switch (a->type()) {
+ case Area::Rectangle : shape=i18n("Rectangle");break;
+ case Area::Circle : shape=i18n("Circle");break;
+ case Area::Polygon : shape=i18n("Polygon");break;
+ case Area::Selection : shape=i18n("Selection");break;
+ default : break;
+ }
+
+
+ // To get a margin around everything
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+
+ layout->setMargin(5);
+
+ QLabel *lbl = new QLabel("<b>"+shape+"</b>",this);
+ lbl->setTextFormat(Qt::RichText);
+ layout->addWidget(lbl);
+
+ QFrame *line = new QFrame(this);
+ line->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ line->setFixedHeight(10);
+ layout->addWidget(line);
+
+ QTabWidget *tab = new QTabWidget(this);
+
+ layout->addWidget(tab);
+
+ tab->addTab(createGeneralPage(),i18n("&General"));
+
+ if (a->type()==Area::Default)
+ {
+ shape=i18n("Default");
+ }
+ else
+ tab->addTab(createCoordsPage(),i18n("Coor&dinates"));
+
+ tab->addTab(createJavascriptPage(),i18n("&JavaScript"));
+
+ line = new QFrame(this);
+ line->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ line->setFixedHeight(10);
+ layout->addWidget(line);
+
+ layout->addWidget(createButtonBar());
+
+ setMinimumHeight(360);
+ setMinimumWidth(327);
+
+ resize(327,360);
+}
+
+AreaDialog::~AreaDialog() {
+ delete areaCopy;
+ delete oldArea;
+}
+
+CoordsEdit* AreaDialog::createCoordsEdit(QWidget *parent, Area *a) {
+ if (!a) return 0;
+ switch (a->type()) {
+ case Area::Rectangle :
+ return new RectCoordsEdit(parent,a);
+ break;
+ case Area::Circle :
+ return new CircleCoordsEdit(parent,a);
+ break;
+ case Area::Polygon :
+ return new PolyCoordsEdit(parent,a);
+ break;
+ case Area::Selection :
+ return new SelectionCoordsEdit(parent,a);
+ break;
+ case Area::Default : return new CoordsEdit(parent,a); break;
+ default : return new CoordsEdit(parent,a);break;
+ }
+}
+
+void AreaDialog::slotChooseHref() {
+ KURL url=KFileDialog::getOpenURL(QString::null, "*|" + i18n( "All Files" ), this, i18n("Choose File"));
+ if (!url.isEmpty()) {
+ hrefEdit->setText(url.url());
+ }
+}
+
+void AreaDialog::slotOk() {
+ if (area)
+ {
+ area->highlightSelectionPoint(-1);
+ if (area->type()==Area::Default)
+ area->setFinished(defaultAreaChk->isChecked());
+ }
+ slotApply();
+ accept();
+
+}
+
+void AreaDialog::slotApply() {
+ if (area) {
+ if (area->type()!=Area::Default)
+ coordsEdit->applyChanges();
+
+ area->setAttribute("href",hrefEdit->text());
+ area->setAttribute("alt",altEdit->text());
+ area->setAttribute("target",targetEdit->text());
+ area->setAttribute("title",titleEdit->text());
+ area->setAttribute("onclick",onClickEdit->text());
+ area->setAttribute("ondblclick",onDblClickEdit->text());
+ area->setAttribute("onmousedown",onMouseDownEdit->text());
+ area->setAttribute("onmouseup",onMouseUpEdit->text());
+ area->setAttribute("onmousemove",onMouseMoveEdit->text());
+ area->setAttribute("onmouseover",onMouseOverEdit->text());
+ area->setAttribute("onmouseout",onMouseOutEdit->text());
+
+ // redraw old area to get rid of it
+ emit areaChanged(oldArea);
+ // draw new area
+ emit areaChanged(area);
+ oldArea->setRect(area->rect());
+ }
+}
+
+void AreaDialog::slotCancel() {
+ if (area) {
+ AreaSelection *selection=0L;
+ if ( (selection=dynamic_cast<AreaSelection*>(areaCopy)) )
+ area->setArea(*selection);
+ else
+ area->setArea(*areaCopy);
+ area->highlightSelectionPoint(-1);
+ emit areaChanged(oldArea);
+ emit areaChanged(area);
+ }
+ reject();
+}
+
+void AreaDialog::slotUpdateArea() {
+ emit areaChanged(oldArea);
+ // draw new area
+ emit areaChanged(area);
+ oldArea->setRect(area->rect());
+}
+
+ImageMapChooseDialog::ImageMapChooseDialog(QWidget* parent,QPtrList<MapTag> *_maps,QPtrList<ImageTag> *_images,const KURL & _baseUrl)
+ : KDialogBase(parent,"",true,i18n( "Choose Map & Image to Edit" ),Ok,Ok,true)
+{
+ baseUrl=_baseUrl;
+ maps=_maps;
+ images=_images;
+ currentMap=0L;
+ QWidget *page=new QWidget(this);
+ setMainWidget(page);
+ setCaption(baseUrl.fileName());
+ QVBoxLayout *layout = new QVBoxLayout(page,5,5);
+
+ QLabel *lbl= new QLabel(i18n("Select an image and/or a map that you want to edit"),page);
+ lbl->setFont(QFont("Sans Serif",12, QFont::Bold));
+ layout->addWidget(lbl);
+ QFrame *line= new QFrame(page);
+ line->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ line->setFixedHeight(10);
+ layout->addWidget(line,0);
+
+ QGridLayout *gridLayout= new QGridLayout(layout,2,3,5);
+ gridLayout->setRowStretch(0,0);
+ gridLayout->setRowStretch(1,100);
+ lbl=new QLabel(i18n("&Maps"),page);
+ mapListBox= new QListBox(page);
+ lbl->setBuddy(mapListBox);
+ gridLayout->addWidget(lbl,0,0);
+ gridLayout->addWidget(mapListBox,1,0);
+
+ line= new QFrame(page);
+ line->setFrameStyle(QFrame::VLine | QFrame::Sunken);
+ line->setFixedWidth(10);
+// line->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding));
+ gridLayout->addWidget(line,1,1);
+
+ lbl=new QLabel(i18n("Image Preview"),page);
+ gridLayout->addWidget(lbl,0,2);
+
+ imagePreview= new QLabel(page);
+ imagePreview->setFixedSize(310,210);
+ imagePreview->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding));
+ imagePreview->setFrameStyle(QLabel::Panel | QLabel::Sunken);
+ imagePreview->setIndent(5);
+ imagePreview->setBackgroundColor(QColor("white"));
+// imagePreview->setLineWidth(2);
+// imagePreview->setScaledContents(true);
+// lbl= new QLabel(i18n("&Maps"),page);
+// lbl->setBuddy(mapListBox);
+ gridLayout->addWidget(imagePreview,1,2);
+// layout->addLayout(gridLayout,1);
+
+ line= new QFrame(page);
+ line->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ line->setFixedHeight(10);
+ layout->addWidget(line,0);
+
+
+ if (maps->isEmpty()) {
+ mapListBox->insertItem(i18n("No maps found"));
+ mapListBox->setEnabled(false);
+ }
+ else {
+ for (MapTag *tag = maps->first(); tag!=0L; tag=maps->next()) {
+ mapListBox->insertItem(tag->name);
+ }
+ connect (mapListBox, SIGNAL(highlighted(int)), this, SLOT(slotMapChanged(int)));
+ }
+
+ initImageListTable(page);
+
+ if (! maps->isEmpty()) {
+ mapListBox->setCurrentItem(0);
+ slotMapChanged(0);
+ }
+
+ resize(510,460);
+}
+
+void ImageMapChooseDialog::initImageListTable(QWidget* parent) {
+
+
+ if (images->isEmpty()) {
+ imageListTable= new QTable(1,1,parent);
+ imageListTable->setText(0,0,i18n("No images found"));
+ imageListTable->setEnabled(false);
+ imageListTable->horizontalHeader()->hide();
+ imageListTable->setTopMargin(0);
+ imageListTable->setColumnStretchable(0,true);
+ } else {
+ imageListTable= new QTable(images->count(),2,parent);
+ imageListTable->setColumnStretchable(0,true);
+ }
+
+ imageListTable->verticalHeader()->hide();
+ imageListTable->setLeftMargin(0);
+
+ QLabel *lbl= new QLabel(i18n("&Images"),parent);
+ lbl->setBuddy(imageListTable);
+
+ parent->layout()->add(lbl);
+ parent->layout()->add(imageListTable);
+
+ if (images->isEmpty())
+ return;
+
+ imageListTable->horizontalHeader()->setLabel(0,i18n("Path"));
+ imageListTable->horizontalHeader()->setLabel(1,"usemap");
+
+ imageListTable->setSelectionMode(QTable::SingleRow);
+ imageListTable->setFocusStyle(QTable::FollowStyle);
+ imageListTable->clearSelection(true);
+
+
+ int row=0;
+ for (ImageTag *tag = images->first(); tag!=0L; tag=images->next()) {
+ QString src="";
+ QString usemap="";
+ if (tag->find("src"))
+ src=*tag->find("src");
+ if (tag->find("usemap"))
+ usemap=*tag->find("usemap");
+
+ imageListTable->setText(row,0,src);
+ imageListTable->setText(row,1,usemap);
+ row++;
+ }
+ connect (imageListTable, SIGNAL(selectionChanged()), this, SLOT(slotImageChanged()));
+
+ imageListTable->selectRow(0);
+ slotImageChanged();
+
+
+}
+
+ImageMapChooseDialog::~ImageMapChooseDialog() {
+}
+
+void ImageMapChooseDialog::slotImageChanged()
+{
+ int i=imageListTable->currentRow();
+ QImage pix;
+ if (images->at(i)->find("src")) {
+ QString str=*images->at(i)->find("src");
+ // relative url
+ pixUrl=KURL(baseUrl,str);
+ pix=QImage(pixUrl.path());
+ double zoom1=1;
+ double zoom2=1;
+ if (pix.width()>300)
+ zoom1=(double) 300/pix.width();
+ if (pix.height()>200)
+ zoom2=(double) 200/pix.height();
+
+
+ zoom1= zoom1 < zoom2 ? zoom1 : zoom2;
+ pix=pix.smoothScale((int)(pix.width()*zoom1),int(pix.height()*zoom1));
+ }
+ QPixmap pix2;
+ pix2.convertFromImage(pix);
+ imagePreview->setPixmap(pix2);
+
+// imagePreview->repaint();
+}
+
+void ImageMapChooseDialog::selectImageWithUsemap(const QString & usemap) {
+ for (int i=0; i<imageListTable->numRows(); i++) {
+ if (imageListTable->text(i,1)==usemap) {
+ imageListTable->selectRow(i);
+ slotImageChanged();
+ return;
+ }
+ }
+}
+
+void ImageMapChooseDialog::slotMapChanged(int i) {
+ currentMap=maps->at(i);
+ selectImageWithUsemap(currentMap->name);
+}
+
+PreferencesDialog::PreferencesDialog(QWidget *parent, KConfig* conf)
+ : KDialogBase(parent,"",true,i18n("Preferences"),Ok|Apply|Cancel,Ok,true)
+{
+ config = conf;
+ QVBox *page=new QVBox(this);
+ page->setSpacing(6);
+ setMainWidget(page);
+
+ QHBox *hbox= new QHBox(page);
+
+ QLabel *lbl = new QLabel(i18n("&Maximum image preview height:")+" ",hbox);
+ rowHeightSpinBox = new QSpinBox(hbox);
+ lbl->setBuddy(rowHeightSpinBox);
+
+ config->setGroup("Appearance");
+ rowHeightSpinBox->setMaxValue(1000);
+ rowHeightSpinBox->setMinValue(15);
+ rowHeightSpinBox->setFixedWidth(60);
+ rowHeightSpinBox->setValue(config->readNumEntry("maximum-preview-height",50));
+
+ config->setGroup("General");
+
+ hbox= new QHBox(page);
+ lbl = new QLabel(i18n("&Undo limit:")+" ",hbox);
+ undoSpinBox = new QSpinBox(hbox);
+ undoSpinBox->setFixedWidth(60);
+ lbl->setBuddy(undoSpinBox);
+
+ undoSpinBox->setMaxValue(100);
+ undoSpinBox->setMinValue(1);
+ undoSpinBox->setValue(config->readNumEntry("undo-level",20));
+
+ hbox= new QHBox(page);
+ lbl = new QLabel(i18n("&Redo limit:")+" ",hbox);
+
+ redoSpinBox = new QSpinBox(hbox);
+ redoSpinBox->setFixedWidth(60);
+ redoSpinBox->setMaxValue(100);
+ redoSpinBox->setMinValue(1);
+ redoSpinBox->setValue(config->readNumEntry("redo-level",20));
+ lbl->setBuddy(redoSpinBox);
+
+ startWithCheck = new QCheckBox(i18n("&Start with last used document"),page);
+ startWithCheck->setChecked(config->readBoolEntry("start-with-last-used-document",true));
+
+/*
+ hbox= new QHBox(page);
+ (void)new QLabel(i18n("Highlight Areas")+" ",hbox);
+
+ colorizeAreaChk = new QCheckBox(hbox);
+ colorizeAreaChk->setFixedWidth(60);
+ colorizeAreaChk->setChecked(kapp->config()->readBoolEntry("highlightareas",true));
+
+ hbox= new QHBox(page);
+ (void)new QLabel(i18n("Show alternative text")+" ",hbox);
+
+ showAltChk = new QCheckBox(hbox);
+ showAltChk->setFixedWidth(60);
+ showAltChk->setChecked(kapp->config()->readBoolEntry("showalt",true));
+*/
+}
+
+PreferencesDialog::~PreferencesDialog() {
+}
+
+void PreferencesDialog::slotDefault( void ) {
+ rowHeightSpinBox->setValue(50);
+}
+
+void PreferencesDialog::slotOk( void ) {
+ slotApply();
+ accept();
+}
+
+void PreferencesDialog::slotApply( void ) {
+ config->setGroup("Appearance");
+ config->writeEntry("maximum-preview-height",rowHeightSpinBox->cleanText().toInt());
+
+ config->setGroup("General Options");
+ config->writeEntry("undo-level",undoSpinBox->cleanText().toInt());
+ config->writeEntry("redo-level",redoSpinBox->cleanText().toInt());
+ config->writeEntry("start-with-last-used-document", startWithCheck->isChecked());
+
+ config->sync();
+ emit applyClicked();
+}
+
+HTMLPreviewDialog::HTMLPreviewDialog(QWidget* parent, KURL url, const QString & htmlCode)
+ : KDialogBase(parent, "", true, i18n("Preview"), KDialogBase::Ok)
+{
+ tempFile = new KTempFile(url.directory(false), ".html");
+ tempFile->setAutoDelete(true);
+ (*tempFile->textStream()) << htmlCode;
+ kdDebug() << "HTMLPreviewDialog: TempFile : " << tempFile->name() << endl;
+ tempFile->close();
+
+ QVBox *page = makeVBoxMainWidget();
+
+ htmlPart = new KHTMLPart(page,"htmlpart");
+// htmlView = new KHTMLView(htmlPart, page);
+// htmlView->setVScrollBarMode(QScrollView::Auto);
+// htmlView->setHScrollBarMode(QScrollView::Auto);
+// dialog->resize(dialog->calculateSize(edit->maxLineWidth(),edit->numLines()*));
+// dialog->adjustSize();
+ QLabel* lbl = new QLabel(page,"urllabel");
+
+ connect( htmlPart, SIGNAL( onURL(const QString&)), lbl, SLOT( setText(const QString&)));
+}
+
+HTMLPreviewDialog::~HTMLPreviewDialog() {
+ delete tempFile;
+ delete htmlPart;
+}
+
+void HTMLPreviewDialog::show() {
+ KDialogBase::show();
+ htmlPart->openURL(KURL( tempFile->name() ));
+// htmlView->layout();
+// htmlView->repaint();
+ resize(800,600);
+}
+
+#include "kimedialogs.moc"
diff --git a/kimagemapeditor/kimedialogs.h b/kimagemapeditor/kimedialogs.h
new file mode 100644
index 00000000..c87f8dfe
--- /dev/null
+++ b/kimagemapeditor/kimedialogs.h
@@ -0,0 +1,207 @@
+/***************************************************************************
+ kimedialogs.h - description
+ -------------------
+ begin : Tue Apr 17 2001
+ copyright : (C) 2001 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 KIMEDIALOGS_H
+#define KIMEDIALOGS_H
+
+#include <kdialog.h>
+#include <kdialogbase.h>
+
+#include <kurl.h>
+#include "kimagemapeditor.h"
+
+#include "kdeversion.h"
+
+class QLineEdit;
+class QMultiLineEdit;
+class QSpinBox;
+
+
+class CoordsEdit : public QWidget {
+Q_OBJECT
+ public :
+ CoordsEdit(QWidget *parent, Area* a);
+ virtual ~CoordsEdit();
+ virtual void applyChanges();
+ protected:
+ Area *area; // The working area
+ protected slots:
+ void slotTriggerUpdate();
+ signals:
+ void update();
+};
+
+class RectCoordsEdit : public CoordsEdit {
+ public:
+ RectCoordsEdit(QWidget *parent, Area* a);
+ virtual void applyChanges();
+ private:
+ QSpinBox *topXSpin;
+ QSpinBox *topYSpin;
+ QSpinBox *widthSpin;
+ QSpinBox *heightSpin;
+};
+
+class CircleCoordsEdit : public CoordsEdit {
+ public:
+ CircleCoordsEdit(QWidget *parent, Area* a);
+ virtual void applyChanges();
+ private:
+ QSpinBox *centerXSpin;
+ QSpinBox *centerYSpin;
+ QSpinBox *radiusSpin;
+};
+
+class QTable;
+
+class PolyCoordsEdit : public CoordsEdit {
+Q_OBJECT
+ public:
+ PolyCoordsEdit(QWidget *parent, Area* a);
+ ~PolyCoordsEdit();
+ virtual void applyChanges();
+ private:
+ QTable *coordsTable;
+ protected slots:
+ void slotAddPoint();
+ void slotRemovePoint();
+ void slotHighlightPoint(int);
+
+};
+
+class SelectionCoordsEdit : public CoordsEdit {
+Q_OBJECT
+ public:
+ SelectionCoordsEdit(QWidget *parent, Area* a);
+ virtual void applyChanges();
+ private:
+ QSpinBox *topXSpin;
+ QSpinBox *topYSpin;
+
+};
+
+
+class QCheckBox;
+class QGridLayout;
+
+class AreaDialog : public KDialog {
+Q_OBJECT
+ private:
+ Area *area;
+ Area *oldArea; // Only for drawing reasons
+ Area *areaCopy; // A copy for restoring the original area if user press cancel
+ QLineEdit *hrefEdit;
+ QLineEdit *altEdit;
+ QLineEdit *targetEdit;
+ QLineEdit *titleEdit;
+
+ QLineEdit *onClickEdit;
+ QLineEdit *onDblClickEdit;
+ QLineEdit *onMouseDownEdit;
+ QLineEdit *onMouseUpEdit;
+ QLineEdit *onMouseOverEdit;
+ QLineEdit *onMouseMoveEdit;
+ QLineEdit *onMouseOutEdit;
+
+ CoordsEdit *coordsEdit;
+ CoordsEdit* createCoordsEdit(QWidget *parent, Area *a);
+ QCheckBox *defaultAreaChk;
+ KImageMapEditor *_document;
+
+
+ public:
+ AreaDialog(KImageMapEditor* parent,Area * a);
+ ~AreaDialog();
+ protected slots:
+ virtual void slotOk();
+ virtual void slotApply();
+ virtual void slotCancel();
+ void slotChooseHref();
+ void slotUpdateArea();
+
+ QLineEdit* createLineEdit(QWidget* parent, QGridLayout *layout, int y, const QString & value, const QString & name);
+ QWidget* createGeneralPage();
+ QWidget* createCoordsPage();
+ QWidget* createJavascriptPage();
+ QWidget* createButtonBar();
+ signals:
+ void areaChanged(Area* a);
+};
+
+class QLineEdit;
+class QListBox;
+class QLabel;
+
+
+class ImageMapChooseDialog : public KDialogBase {
+Q_OBJECT
+ private:
+ QTable *imageListTable;
+ QLabel *imagePreview;
+ QListBox *mapListBox;
+ QLineEdit *mapNameEdit;
+ QPtrList<MapTag> *maps;
+ QPtrList<ImageTag> *images;
+ KURL baseUrl;
+ void initImageListTable(QWidget*);
+ public:
+ ImageMapChooseDialog(QWidget* parent,QPtrList<MapTag> *_maps,QPtrList<ImageTag> *_images, const KURL & _baseUrl);
+ ~ImageMapChooseDialog();
+ KURL pixUrl;
+ MapTag* currentMap;
+ protected slots:
+ void slotImageChanged();
+ void slotMapChanged(int i);
+ void selectImageWithUsemap(const QString & usemap);
+
+};
+
+class KConfig;
+
+class PreferencesDialog : public KDialogBase {
+Q_OBJECT
+ public:
+ PreferencesDialog(QWidget *parent,KConfig*);
+ ~PreferencesDialog();
+ protected slots:
+ virtual void slotDefault( void );
+ virtual void slotOk( void );
+ virtual void slotApply( void );
+ private:
+ QSpinBox *rowHeightSpinBox;
+ QSpinBox *undoSpinBox;
+ QSpinBox *redoSpinBox;
+// QCheckBox *colorizeAreaChk;
+// QCheckBox *showAltChk;
+ QCheckBox *startWithCheck;
+ KConfig *config;
+};
+
+class KHTMLPart;
+class KTempFile;
+
+class HTMLPreviewDialog : public KDialogBase {
+ public:
+ HTMLPreviewDialog(QWidget *, KURL, const QString &);
+ ~HTMLPreviewDialog();
+ virtual void show();
+ private:
+ KHTMLPart* htmlPart;
+ KTempFile* tempFile;
+};
+
+#endif
diff --git a/kimagemapeditor/kimeshell.cpp b/kimagemapeditor/kimeshell.cpp
new file mode 100644
index 00000000..d919d2b7
--- /dev/null
+++ b/kimagemapeditor/kimeshell.cpp
@@ -0,0 +1,296 @@
+/***************************************************************************
+ kimepart.cpp - description
+ -------------------
+ begin : Mon Aug 5 2002
+ copyright : (C) 2002 by Jan Sch�er
+ email : janschaefer@users.sourceforge.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. *
+ * *
+ ***************************************************************************/
+
+
+#include <iostream>
+
+#include <kaction.h>
+#include <kiconloader.h>
+#include <kstandarddirs.h>
+#include <kfiledialog.h>
+#include <kmessagebox.h>
+#include <kkeydialog.h>
+#include <kedittoolbar.h>
+#include <kstatusbar.h>
+#include <kapplication.h>
+#include <kdebug.h>
+
+#include <qhbox.h>
+
+#include "drawzone.h"
+#include "kimagemapeditor.h" // the KPart
+#include "kimeshell.h"
+#include "kimeshell.moc"
+
+KimeShell::KimeShell(const char *name )
+ : KParts::DockMainWindow( 0L, name )
+{
+ setXMLFile("kimagemapeditorui.rc");
+
+
+ KDockWidget* mainDock;
+ mainDock = createDockWidget( "MainDockWidget", 0L, 0L, "main_dock_widget");
+ QWidget *w = new QHBox( mainDock );
+// QLayout* layout = new QGridLayout( mainDock );
+
+ mainDock->setWidget( w );
+ // allow others to dock to the 4 sides
+ mainDock->setDockSite(KDockWidget::DockCorner);
+ // forbit docking abilities of mainDock itself
+ mainDock->setEnableDocking(KDockWidget::DockNone);
+ setView( mainDock); // central widget in a KDE mainwindow
+ setMainDockWidget( mainDock); // master dockwidget
+ m_part = new KImageMapEditor( w, "kimagemapeditor", this, "kimagemapeditor");
+
+
+// setCentralWidget( part->widget() );
+
+ setupActions();
+
+ _stdout=false;
+
+// createGUI( part );
+ createShellGUI( true );
+ guiFactory()->addClient( m_part );
+ KParts::GUIActivateEvent ev( true );
+ QApplication::sendEvent( m_part, &ev );
+ //setCentralWidget(part->widget());
+
+ if (!initialGeometrySet())
+ resize( QSize(725, 525).expandedTo(minimumSizeHint()));
+
+ connect( m_part, SIGNAL(setStatusBarText(const QString &)),
+ this, SLOT(slotSetStatusBarText ( const QString & )));
+
+ connect( m_part, SIGNAL(setWindowCaption(const QString &)),
+ this, SLOT(setCaption( const QString &)));
+
+ setAutoSaveSettings( "General Options" );
+
+}
+
+KimeShell::~KimeShell()
+{
+// delete part;
+}
+
+bool KimeShell::queryClose()
+{
+ if (_stdout) {
+ std::cout << m_part->getHtmlCode() << std::endl;
+ }
+
+ return m_part->queryClose();
+}
+
+
+bool KimeShell::queryExit()
+{
+// writeConfig();
+ saveProperties(kapp->config());
+
+ return true;
+}
+
+
+void KimeShell::setupActions()
+{
+ (void)KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
+
+ // File Quit
+ (void)KStdAction::quit(this, SLOT(close()),actionCollection());
+
+
+ (void)KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
+ (void)KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
+ (void)KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+ (void)KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
+
+
+}
+
+void KimeShell::fileNew()
+{
+ // this slot is called whenever the File->New menu is selected,
+ // the New shortcut is pressed (usually CTRL+N) or the New toolbar
+ // button is clicked
+
+ // About this function, the style guide (
+ // http://developer.kde.org/documentation/standards/kde/style/basics/index.html )
+ // says that it should open a new window if the document is _not_
+ // in its initial state. This is what we do here..
+ if ( ! m_part->url().isEmpty() || m_part->isModified() )
+ {
+ KimeShell * newShell = new KimeShell();
+
+ newShell->show();
+ newShell->readConfig();
+ };
+}
+
+void KimeShell::openFile(const KURL & url)
+{
+ m_part->openFile(url);
+}
+
+void KimeShell::openLastFile()
+{
+ if (m_part->config()->readBoolEntry("start-with-last-used-document",true))
+ m_part->openLastURL(m_part->config());
+}
+
+void KimeShell::fileOpen()
+{
+ KURL url=KFileDialog::getOpenURL(QString::null,
+ "*.png *.jpg *.jpeg *.gif *.htm *.html|" + i18n( "Web Files" ) + "\n"
+ "*.png *.jpg *.jpeg *.gif *.bmp *.xbm *.xpm *.pnm *.mng|" + i18n( "Images" ) + "\n"
+ "*.htm *.html|" + i18n( "HTML Files" ) + "\n"
+ "*.png|" + i18n( "PNG Images" ) + "\n*.jpg *.jpeg|" + i18n( "JPEG Images" ) + "\n*.gif|" + i18n( "GIF Images" ) + "\n*|" + i18n( "All Files" )
+ ,this,i18n("Choose Picture to Open"));
+
+ if (!url.isEmpty()) {
+ // About this function, the style guide (
+ // http://developer.kde.org/documentation/standards/kde/style/basics/index.html )
+ // says that it should open a new window if the document is _not_
+ // in its initial state. This is what we do here..
+ if ( m_part->url().isEmpty() && ! m_part->isModified() )
+ {
+ // we open the file in this window...
+ m_part->openURL(url);
+ }
+ else
+ {
+ // we open the file in a new window...
+ KimeShell* newWin = new KimeShell;
+ newWin->openFile( url );
+ newWin->show();
+ }
+ }
+}
+
+
+
+void KimeShell::readConfig() {
+ KConfig *config;
+
+ config = kapp->config();
+
+ config->setGroup("General Options");
+ readConfig(config);
+
+}
+
+void KimeShell::readConfig(KConfig* config) {
+// applyMainWindowSettings(config);
+// restoreWindowSize(config);
+ readDockConfig(config);
+}
+
+void KimeShell::writeConfig() {
+ KConfig *config;
+
+ config = kapp->config();
+
+ config->setGroup("General Options");
+ writeConfig(config);
+}
+
+void KimeShell::writeConfig(KConfig* config) {
+ saveMainWindowSettings(config);
+ saveWindowSize(config);
+ writeDockConfig(config);
+ config->sync();
+
+}
+
+
+void KimeShell::saveProperties(KConfig *config)
+{
+ //writeConfig(config);
+ m_part->saveProperties(config);
+ writeConfig();
+
+}
+
+void KimeShell::readProperties(KConfig *config)
+{
+ readConfig();
+ m_part->readProperties(config);
+
+
+}
+
+
+void KimeShell::optionsConfigureKeys() {
+// KKeyDialog::configureKeys(actionCollection(), "testprog_shell.rc");
+
+ KKeyDialog dlg;
+ dlg.insert(actionCollection());
+ dlg.insert(m_part->actionCollection());
+ dlg.configure();
+}
+
+void KimeShell::optionsConfigureToolbars()
+{
+#if defined(KDE_MAKE_VERSION)
+# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
+ saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+# else
+ saveMainWindowSettings(KGlobal::config() );
+# endif
+#else
+ saveMainWindowSettings(KGlobal::config() );
+#endif
+
+ // use the standard toolbar editor
+ KEditToolbar dlg(factory());
+ connect(&dlg, SIGNAL(newToolbarConfig()),
+ this, SLOT(applyNewToolbarConfig()));
+ dlg.exec();
+}
+
+void KimeShell::applyNewToolbarConfig()
+{
+#if defined(KDE_MAKE_VERSION)
+# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
+ applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+# else
+ applyMainWindowSettings(KGlobal::config());
+# endif
+#else
+ applyMainWindowSettings(KGlobal::config());
+#endif
+}
+
+
+void KimeShell::optionsShowToolbar()
+{
+ if (toolBar()->isVisible())
+ toolBar()->hide();
+ else
+ toolBar()->show();
+}
+
+void KimeShell::optionsShowStatusbar()
+{
+ if (statusBar()->isVisible())
+ statusBar()->hide();
+ else
+ statusBar()->show();
+}
+
+
diff --git a/kimagemapeditor/kimeshell.h b/kimagemapeditor/kimeshell.h
new file mode 100644
index 00000000..28026524
--- /dev/null
+++ b/kimagemapeditor/kimeshell.h
@@ -0,0 +1,81 @@
+/***************************************************************************
+ kimeshell.h - description
+ -------------------
+ begin : Mon Aug 5 2002
+ copyright : (C) 2002 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 KIMESHELL_H
+#define KIMESHELL_H
+
+#include <kparts/dockmainwindow.h>
+
+class KImageMapEditor;
+
+class KimeShell : public KParts::DockMainWindow
+{
+ Q_OBJECT
+
+public:
+ KimeShell( const char *name=0 );
+ virtual ~KimeShell();
+
+ void setStdout(bool b);
+ void openFile(const KURL & url);
+
+ /**
+ * Opens the last open file, if the
+ * user has configured to open the last
+ * file. Otherwise does nothing
+ */
+ void openLastFile();
+ void readConfig();
+ void writeConfig();
+
+protected:
+ void setupActions();
+ void readConfig(KConfig*);
+ void writeConfig(KConfig*);
+
+// virtual bool queryClose();
+ virtual void readProperties(KConfig *config);
+ virtual void saveProperties(KConfig *config);
+
+ virtual bool queryClose();
+ virtual bool queryExit();
+
+
+private slots:
+ void fileNew();
+ void fileOpen();
+ void optionsShowToolbar();
+ void optionsShowStatusbar();
+ void optionsConfigureKeys();
+ void optionsConfigureToolbars();
+
+ void applyNewToolbarConfig();
+private:
+ KImageMapEditor *m_part;
+
+ bool _stdout; // write HTML-Code to stdout on exit ?
+
+
+
+};
+
+inline void KimeShell::setStdout(bool b) {
+ _stdout=b;
+}
+
+
+#endif
diff --git a/kimagemapeditor/main.cpp b/kimagemapeditor/main.cpp
new file mode 100644
index 00000000..626a6e44
--- /dev/null
+++ b/kimagemapeditor/main.cpp
@@ -0,0 +1,91 @@
+/***************************************************************************
+ main.cpp - description
+ -------------------
+ begin : Die Apr 10 19:46:49 CEST 2001
+ copyright : (C) 2001 by Jan Sch�er
+ email : j_schaef@informatik.uni-kl.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. *
+* *
+***************************************************************************/
+
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+#include <klocale.h>
+#include <kapplication.h>
+#include <dcopclient.h>
+
+#include "kimeshell.h"
+#include <config.h>
+
+static const char *description =
+ I18N_NOOP("An HTML imagemap editor");
+
+
+static KCmdLineOptions options[] =
+{
+ { "c", 0, 0 },
+ { "stdout", I18N_NOOP("Write HTML-Code to stdout on exit"), 0 },
+ { "+[File]", I18N_NOOP("File to open"), 0 },
+ { 0, 0, 0 }
+ // INSERT YOUR COMMANDLINE OPTIONS HERE
+};
+
+int main(int argc, char *argv[])
+{
+
+ KAboutData aboutData( "kimagemapeditor", I18N_NOOP("KImageMapEditor"),
+ VERSION, description, KAboutData::License_GPL,
+ "(C) 2001-2008 Jan Schaefer", 0, "http://www.nongnu.org/kimagemap/", "janschaefer@users.sourceforge.net");
+ aboutData.addAuthor("Jan Schaefer",0, "janschaefer@users.sourceforge.net");
+ aboutData.addCredit("Joerg Jaspert",I18N_NOOP("For helping me with the Makefiles, and creating the Debian package"));
+ aboutData.addCredit("Aaron Seigo and Michael",I18N_NOOP("For helping me fixing --enable-final mode"));
+ aboutData.addCredit("Antonio Crevillen",I18N_NOOP("For the Spanish translation"));
+ aboutData.addCredit("Fabrice Mous",I18N_NOOP("For the Dutch translation"));
+ aboutData.addCredit("Germain Chazot",I18N_NOOP("For the French translation"));
+ KCmdLineArgs::init( argc, argv, &aboutData );
+ KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
+
+ KApplication a;
+ a.dcopClient()->registerAs(a.name());
+
+
+
+ if (a.isRestored())
+ {
+ RESTORE(KimeShell);
+ }
+ else
+ {
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ if ( args->count() == 0 )
+ {
+ KimeShell *kimeShell = new KimeShell();
+ kimeShell->setStdout(args->isSet("stdout"));
+ kimeShell->readConfig();
+ kimeShell->show();
+ kimeShell->openLastFile();
+ }
+ else
+ {
+ int i = 0;
+ for (; i < args->count(); i++ )
+ {
+ KimeShell *kimeShell = new KimeShell();
+ kimeShell->setStdout(args->isSet("stdout"));
+ kimeShell->readConfig();
+ kimeShell->show();
+ kimeShell->openFile(args->url(i));
+ }
+ }
+ args->clear();
+ }
+
+ return a.exec();
+}
diff --git a/kimagemapeditor/mapslistview.cpp b/kimagemapeditor/mapslistview.cpp
new file mode 100644
index 00000000..ec89ae4a
--- /dev/null
+++ b/kimagemapeditor/mapslistview.cpp
@@ -0,0 +1,174 @@
+/***************************************************************************
+ mapslistview.cpp - description
+ -------------------
+ begin : Weg Feb 26 2003
+ copyright : (C) 2003 by Jan SchÃ?fer
+ email : janschaefer@users.sourceforge.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. *
+ * *
+ ***************************************************************************/
+// KDE
+#include <klistview.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+// locale
+#include "mapslistview.h"
+
+
+MapsListView::MapsListView(QWidget *parent, const char *name)
+: QVBox(parent, name) {
+ _listView = new KListView(this);
+ _listView->addColumn(i18n("Maps"));
+ _listView->setFullWidth(true);
+ _listView->setSelectionMode(QListView::Single);
+ _listView->setItemsRenameable(true);
+
+ connect( _listView, SIGNAL( selectionChanged(QListViewItem*)),
+ this, SLOT( slotSelectionChanged(QListViewItem*)));
+
+ connect( _listView, SIGNAL( itemRenamed(QListViewItem*)),
+ this, SLOT( slotItemRenamed(QListViewItem*)));
+}
+
+
+MapsListView::~MapsListView() {
+}
+
+void MapsListView::addMap(const QString & name = QString::null) {
+ new QListViewItem(_listView,name);
+ //kdDebug() << "MapsListView::addMap : Added map '" << name << "'" << endl;
+
+}
+
+void MapsListView::addMaps(QPtrList<MapTag> * maps) {
+
+ for (MapTag *tag = maps->first(); tag!=0L; tag=maps->next()) {
+ addMap(tag->name);
+ }
+}
+
+void MapsListView::selectMap(const QString & name) {
+ QListViewItem* item = _listView->findItem(name,0);
+ if (item) {
+ selectMap(item);
+ } else
+ kdWarning() << "MapsListView::selectMap : Couldn't found map '" << name << "'" << endl;
+
+}
+
+void MapsListView::selectMap(QListViewItem* item) {
+ if (item)
+ _listView->setSelected(item,true);
+}
+
+
+QString MapsListView::selectedMap() {
+ QString result;
+
+ QListViewItem* item = _listView->selectedItem();
+ if (item)
+ result = item->text(0);
+ else
+ kdWarning() << "MapsListView::selectedMap : No map selected !" << endl;
+
+ return result;
+}
+
+void MapsListView::removeMap(const QString & name) {
+ QListViewItem* item = _listView->findItem(name,0);
+ if (item) {
+ _listView->takeItem(item);
+ _listView->setSelected(_listView->currentItem(),true);
+// kdDebug() << "MapsListView::removeMap : Removed map '" << name << "'" << endl;
+ } else
+ kdWarning() << "MapsListView::removeMap : Couldn't found map '" << name << "'" << endl;
+}
+
+void MapsListView::clear() {
+ _listView->clear();
+}
+
+void MapsListView::slotSelectionChanged(QListViewItem* item) {
+ QString name = item->text(0);
+ emit mapSelected(name);
+}
+
+void MapsListView::slotItemRenamed(QListViewItem* item) {
+ QString name = item->text(0);
+ emit mapRenamed(name);
+}
+
+void MapsListView::changeMapName(const QString & oldName, const QString & newName) {
+// kdDebug() << "MapsListView::changeMapName : " << oldName << " to " << newName << endl;
+ QListViewItem* item = _listView->findItem(oldName,0);
+ if (item) {
+ item->setText(0,newName);
+// kdDebug() << "MapsListView::changeMapName : successful" << endl;
+ }
+ else {
+ kdWarning() << "MapsListView::changeMapName : Chouldn't find map with name '" << oldName << "'" << endl;
+ }
+
+}
+
+
+bool MapsListView::nameAlreadyExists(const QString & name) {
+// kdDebug() << "MapsListView::nameAlreadyExists : " << name << " ? " << endl;
+ bool result = false;
+ QListViewItem* item = 0L;
+ for(item = _listView->firstChild(); item; item = item->nextSibling()) {
+ QString otherMap = item->text(0);
+ if(name == otherMap) {
+ result = true;
+ break;
+ }
+ }
+
+// kdDebug() << "MapsListView::nameAlreadyExists : " << name << " : " << result << endl;
+
+ return result;
+}
+
+QStringList MapsListView::getMaps() {
+ QStringList result;
+
+ QListViewItem* item = 0L;
+ for(item = _listView->firstChild(); item; item = item->nextSibling()) {
+ QString map = item->text(0);
+ result << map;
+ }
+
+ return result;
+}
+
+QString MapsListView::getUnusedMapName() {
+ QString result;
+ QString attempt;
+ int i=0;
+ while(result.isEmpty()) {
+ i++;
+ attempt = i18n("unnamed");
+ attempt += QString::number(i);
+ if (nameAlreadyExists(attempt))
+ continue;
+
+ result = attempt;
+ }
+
+// kdDebug() << "MapsListView::getUnusedMapName : Found an unused name : '" << result << "'" << endl;
+ return result;
+}
+
+uint MapsListView::count() {
+ return _listView->childCount();
+}
+
+#include "mapslistview.moc"
diff --git a/kimagemapeditor/mapslistview.h b/kimagemapeditor/mapslistview.h
new file mode 100644
index 00000000..559725a2
--- /dev/null
+++ b/kimagemapeditor/mapslistview.h
@@ -0,0 +1,126 @@
+/***************************************************************************
+ mapslistview.h - description
+ -------------------
+ begin : Weg Feb 26 2003
+ copyright : (C) 2003 by Jan Schäfer
+ email : janschaefer@users.sourceforge.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 _MAPSLISTVIEW_H_
+#define _MAPSLISTVIEW_H_
+
+#include <qvbox.h>
+
+#include "kimagemapeditor.h"
+class KListView;
+
+/**
+ * Simple class that shows all map tags of the current open html file in a ListView
+ *
+ * Jan Schaefer
+ **/
+class MapsListView : public QVBox
+{
+Q_OBJECT
+public:
+ MapsListView(QWidget *parent, const char *name);
+ ~MapsListView();
+
+ /**
+ * Adds the given map to the ListView
+ */
+ void addMap(const QString &);
+
+ /**
+ * Adds all maps of the given QList to the ListView
+ */
+ void addMaps(QPtrList<MapTag> *);
+
+ /**
+ * Removes the given map from the ListView
+ */
+ void removeMap(const QString &);
+
+ /**
+ * Set the the given map selected in the ListView.
+ * it does not emit mapSelected afterwards.
+ */
+ void selectMap(const QString &);
+
+ /**
+ * Selects the given ListViewItem and deselects the current selected item
+ */
+ void selectMap(QListViewItem* item);
+
+ /**
+ * Changes the name of the map with the @p oldName to @p newName
+ */
+ void changeMapName(const QString & oldName, const QString & newName);
+
+ /**
+ * Returns the current selected map
+ */
+ QString selectedMap();
+
+
+ /**
+ * Removes all maps from the ListView
+ */
+ void clear();
+
+ /**
+ * Returns a name for a map which is not used yet.
+ * Returns for example Unnamed1
+ */
+ QString getUnusedMapName();
+
+ /**
+ * Wether or not the given map name already exists
+ */
+ bool nameAlreadyExists(const QString &);
+
+ /**
+ * Returns a QStringList of all maps
+ */
+ QStringList getMaps();
+
+ /**
+ * Returns the number of maps
+ */
+ uint count();
+
+ KListView* listView() { return _listView; }
+protected:
+ KListView* _listView;
+
+protected slots:
+ void slotSelectionChanged(QListViewItem*);
+ void slotItemRenamed(QListViewItem*);
+
+signals:
+
+ /**
+ * Gets emitted when the user selects a map in
+ * the ListView
+ */
+ void mapSelected(const QString &);
+
+
+ /**
+ * Emitted when the user has renamed a map in the ListView
+ */
+ void mapRenamed(const QString & newName);
+
+
+};
+
+#endif
diff --git a/kimagemapeditor/pics/Makefile.am b/kimagemapeditor/pics/Makefile.am
new file mode 100644
index 00000000..4d7ead61
--- /dev/null
+++ b/kimagemapeditor/pics/Makefile.am
@@ -0,0 +1,8 @@
+KDE_ICON = kimagemapeditor
+
+appicondir = $(kde_datadir)/kimagemapeditor/icons
+appicon_ICON = addpoint arrow circle circle2 freehand lower polygon raise rectangle removepoint
+
+picturesdir = $(kde_datadir)/kimagemapeditor
+pictures_DATA = addpointcursor.png freehandcursor.png polygoncursor.png removepointcursor.png
+
diff --git a/kimagemapeditor/pics/addpointcursor.png b/kimagemapeditor/pics/addpointcursor.png
new file mode 100644
index 00000000..0fe9f853
--- /dev/null
+++ b/kimagemapeditor/pics/addpointcursor.png
Binary files differ
diff --git a/kimagemapeditor/pics/freehandcursor.png b/kimagemapeditor/pics/freehandcursor.png
new file mode 100644
index 00000000..2f7f1163
--- /dev/null
+++ b/kimagemapeditor/pics/freehandcursor.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi16-app-kimagemapeditor.png b/kimagemapeditor/pics/hi16-app-kimagemapeditor.png
new file mode 100644
index 00000000..cfdea0a0
--- /dev/null
+++ b/kimagemapeditor/pics/hi16-app-kimagemapeditor.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-addpoint.png b/kimagemapeditor/pics/hi22-action-addpoint.png
new file mode 100644
index 00000000..51114fdf
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-addpoint.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-arrow.png b/kimagemapeditor/pics/hi22-action-arrow.png
new file mode 100644
index 00000000..dfbeabaa
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-arrow.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-circle.png b/kimagemapeditor/pics/hi22-action-circle.png
new file mode 100644
index 00000000..e0e616ce
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-circle.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-circle2.png b/kimagemapeditor/pics/hi22-action-circle2.png
new file mode 100644
index 00000000..45394d3b
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-circle2.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-freehand.png b/kimagemapeditor/pics/hi22-action-freehand.png
new file mode 100644
index 00000000..7ff9ce46
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-freehand.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-lower.png b/kimagemapeditor/pics/hi22-action-lower.png
new file mode 100644
index 00000000..18742bf0
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-lower.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-polygon.png b/kimagemapeditor/pics/hi22-action-polygon.png
new file mode 100644
index 00000000..66786d16
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-polygon.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-raise.png b/kimagemapeditor/pics/hi22-action-raise.png
new file mode 100644
index 00000000..3e2e1287
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-raise.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-rectangle.png b/kimagemapeditor/pics/hi22-action-rectangle.png
new file mode 100644
index 00000000..8ff0b2b7
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-rectangle.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi22-action-removepoint.png b/kimagemapeditor/pics/hi22-action-removepoint.png
new file mode 100644
index 00000000..065912bf
--- /dev/null
+++ b/kimagemapeditor/pics/hi22-action-removepoint.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi32-app-kimagemapeditor.png b/kimagemapeditor/pics/hi32-app-kimagemapeditor.png
new file mode 100644
index 00000000..cb7558c2
--- /dev/null
+++ b/kimagemapeditor/pics/hi32-app-kimagemapeditor.png
Binary files differ
diff --git a/kimagemapeditor/pics/hi48-app-kimagemapeditor.png b/kimagemapeditor/pics/hi48-app-kimagemapeditor.png
new file mode 100644
index 00000000..c95bd08c
--- /dev/null
+++ b/kimagemapeditor/pics/hi48-app-kimagemapeditor.png
Binary files differ
diff --git a/kimagemapeditor/pics/lo16-app-kimagemapeditor.png b/kimagemapeditor/pics/lo16-app-kimagemapeditor.png
new file mode 100644
index 00000000..0985586b
--- /dev/null
+++ b/kimagemapeditor/pics/lo16-app-kimagemapeditor.png
Binary files differ
diff --git a/kimagemapeditor/pics/lo32-app-kimagemapeditor.png b/kimagemapeditor/pics/lo32-app-kimagemapeditor.png
new file mode 100644
index 00000000..12542c8a
--- /dev/null
+++ b/kimagemapeditor/pics/lo32-app-kimagemapeditor.png
Binary files differ
diff --git a/kimagemapeditor/pics/polygoncursor.png b/kimagemapeditor/pics/polygoncursor.png
new file mode 100644
index 00000000..e315aa51
--- /dev/null
+++ b/kimagemapeditor/pics/polygoncursor.png
Binary files differ
diff --git a/kimagemapeditor/pics/removepointcursor.png b/kimagemapeditor/pics/removepointcursor.png
new file mode 100644
index 00000000..91187d1d
--- /dev/null
+++ b/kimagemapeditor/pics/removepointcursor.png
Binary files differ
diff --git a/kimagemapeditor/qextfileinfo.cpp b/kimagemapeditor/qextfileinfo.cpp
new file mode 100644
index 00000000..c52c48b5
--- /dev/null
+++ b/kimagemapeditor/qextfileinfo.cpp
@@ -0,0 +1,347 @@
+/*
+ From WebMaker - KDE HTML Editor
+ Copyright (C) 1998, 1999 Alexei Dets <dets@services.ru>
+
+ Rewritten for Quanta Plus: (C) 2002 Andras Mantia <amantia@freemail.hu>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the 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 <qapplication.h>
+#include <qptrlist.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+#include <qtimer.h>
+
+//kde includes
+#include <kurl.h>
+#include <kio/job.h>
+#include <kio/netaccess.h>
+#include <kio/scheduler.h>
+#include <kdirlister.h>
+#include <kfileitem.h>
+#include <kglobal.h>
+#include <kdebug.h>
+
+//app includes
+#include "qextfileinfo.h"
+
+QString QExtFileInfo::lastErrorMsg = "";
+
+/** create a relative short url based in baseURL*/
+KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
+{
+ KURL resultURL = urlToConvert;
+ if (urlToConvert.protocol() == baseURL.protocol())
+ {
+ QString path = urlToConvert.path();
+ QString basePath = baseURL.path(1);
+ if (path.startsWith("/"))
+ {
+ path.remove(0, 1);
+ basePath.remove(0, 1);
+ if ( basePath.right(1) != "/" ) basePath.append("/");
+
+ int pos=0;
+ int pos1=0;
+ for (;;)
+ {
+ pos=path.find("/");
+ pos1=basePath.find("/");
+ if ( pos<0 || pos1<0 ) break;
+ if ( path.left(pos+1 ) == basePath.left(pos1+1) )
+ {
+ path.remove(0, pos+1);
+ basePath.remove(0, pos1+1);
+ }
+ else
+ break;
+ };
+
+ if ( basePath == "/" ) basePath="";
+ int level = basePath.contains("/");
+ for (int i=0; i<level; i++)
+ {
+ path="../"+path;
+ };
+ }
+
+ resultURL.setPath(QDir::cleanDirPath(path));
+ }
+
+ if (urlToConvert.path().endsWith("/")) resultURL.adjustPath(1);
+ return resultURL;
+}
+/** convert relative filename to absolute */
+KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
+{
+ KURL resultURL = urlToConvert;
+ if (urlToConvert.protocol() == baseURL.protocol() && !urlToConvert.path().startsWith("/"))
+ {
+ int pos;
+ QString cutname = urlToConvert.path();
+ QString cutdir = baseURL.path(1);
+ while ( (pos = cutname.find("../")) >=0 )
+ {
+ cutname.remove( 0, pos+3 );
+ cutdir.remove( cutdir.length()-1, 1 );
+ cutdir.remove( cutdir.findRev('/')+1 , 1000);
+ }
+ resultURL.setPath(QDir::cleanDirPath(cutdir+cutname));
+ }
+
+ if (urlToConvert.path().endsWith("/")) resultURL.adjustPath(1);
+ return resultURL;
+}
+
+/** All files in a dir.
+ The return will also contain the name of the subdirectories.
+ This is needed for empty directory adding/handling. (Andras)
+ Currently works only for local directories
+*/
+KURL::List QExtFileInfo::allFiles( const KURL& path, const QString& mask)
+{
+ QExtFileInfo internalFileInfo;
+ return internalFileInfo.allFilesInternal(path, mask);
+}
+
+KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const QString& mask)
+{
+ QExtFileInfo internalFileInfo;
+ KURL::List r = internalFileInfo.allFilesInternal( path, mask);
+
+ KURL::List::Iterator it;
+ for ( it = r.begin(); it != r.end(); ++it )
+ {
+ *it = QExtFileInfo::toRelative( *it, path );
+ }
+
+ return r;
+}
+
+bool QExtFileInfo::createDir( const KURL& path )
+{
+ int i=0;
+ bool result;
+ KURL dir1, dir2 = KURL();
+ while ( !exists(path) && dir2.path() != path.path() )
+ {
+ dir1 = path;
+ dir2 = path;
+
+ dir1=cdUp(dir1);
+ while ( !exists(dir1) && dir1.path() != "/" )
+ {
+ dir1=cdUp(dir1);
+ dir2=cdUp(dir2);
+ // debug(d1);
+ }
+ // dir2.setPath(dir2.path(-1));
+ result = KIO::NetAccess::mkdir(dir2, 0L, -1);
+ i++;
+ }
+ result = exists(path);
+ return result;
+}
+
+KURL QExtFileInfo::cdUp(const KURL &url)
+{
+ KURL u = url;
+ QString dir = u.path(-1);
+ while ( !dir.isEmpty() && dir.right(1) != "/" )
+ {
+ dir.remove( dir.length()-1,1);
+ }
+ u.setPath(dir);
+ return u;
+}
+
+QString QExtFileInfo::shortName(const QString &fname)
+{
+ return fname.section("/",-1);
+}
+
+KURL QExtFileInfo::path( const KURL &url )
+{
+ return KURL( url.directory(false,false) );
+}
+
+KURL QExtFileInfo::home()
+{
+ KURL url;
+ url.setPath(QDir::currentDirPath()+"/");
+ return url;
+}
+
+
+bool QExtFileInfo::exists(const KURL& a_url)
+{
+// Andras: Don't use it now, as it brings up an extra dialog and need manual
+// intervention when usign fish
+// return KIO::NetAccess::exists(a_url, false);
+
+// No dialog when stating.
+ if ( a_url.isLocalFile() )
+ {
+ return QFile::exists( a_url.path() );
+ } else
+ {
+ QExtFileInfo internalFileInfo;
+ return internalFileInfo.internalExists(a_url);
+ }
+}
+
+/* Synchronouse copy, like NetAccess::file_copy in KDE 3.2 */
+bool QExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window )
+{
+ QExtFileInfo internalFileInfo;
+ return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window );
+}
+
+/** No descriptions */
+KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const QString& mask)
+{
+ dirListItems.clear();
+ if (internalExists(startURL))
+ {
+ lstFilters.setAutoDelete(true);
+ lstFilters.clear();
+ // Split on white space
+ QStringList list = QStringList::split( ' ', mask );
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ lstFilters.append( new QRegExp(*it, false, true ) );
+
+ bJobOK = true;
+ KIO::ListJob *job = KIO::listRecursive(startURL, false, true);
+ connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList&)),
+ this, SLOT(slotNewEntries(KIO::Job *, const KIO::UDSEntryList&)));
+ connect( job, SIGNAL( result (KIO::Job *) ),
+ this, SLOT( slotResult (KIO::Job *) ) );
+
+ // kdDebug(24000) << "Now listing: " << startURL.url() << endl;
+ enter_loop();
+ lstFilters.clear();
+ if (!bJobOK)
+ {
+ // kdDebug(24000) << "Error while listing "<< startURL.url() << endl;
+ dirListItems.clear();
+ }
+ }
+ return dirListItems;
+}
+
+
+//Some hackery from KIO::NetAccess as they do not do exactly what we want
+/* return true if the url exists*/
+bool QExtFileInfo::internalExists(const KURL& url)
+{
+ bJobOK = true;
+ // kdDebug(24000)<<"QExtFileInfo::internalExists"<<endl;
+ KIO::StatJob * job = KIO::stat( url, false);
+ job->setDetails(0);
+ job->setSide(false); //check the url for writing
+ connect( job, SIGNAL( result (KIO::Job *) ),
+ this, SLOT( slotResult (KIO::Job *) ) );
+
+ //To avoid lock-ups, start a timer.
+ QTimer::singleShot(10*1000, this,SLOT(slotTimeout()));
+// kdDebug(24000)<<"QExtFileInfo::internalExists:before enter_loop"<<endl;
+ enter_loop();
+// kdDebug(24000)<<"QExtFileInfo::internalExists:after enter_loop"<<endl;
+ return bJobOK;
+}
+
+bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window)
+{
+ bJobOK = true; // success unless further error occurs
+
+ KIO::Scheduler::checkSlaveOnHold(true);
+ KIO::Job * job = KIO::file_copy( src, target, permissions, overwrite, resume );
+ job->setWindow (window);
+ connect( job, SIGNAL( result (KIO::Job *) ),
+ this, SLOT( slotResult (KIO::Job *) ) );
+
+ enter_loop();
+ return bJobOK;
+}
+
+
+void qt_enter_modal( QWidget *widget );
+void qt_leave_modal( QWidget *widget );
+
+void QExtFileInfo::enter_loop()
+{
+ QWidget dummy(0,0,WType_Dialog | WShowModal);
+ dummy.setFocusPolicy( QWidget::NoFocus );
+ qt_enter_modal(&dummy);
+// kdDebug(24000)<<"QExtFileInfo::enter_loop:before qApp->enter_loop()"<<endl;
+ qApp->enter_loop();
+// kdDebug(24000)<<"QExtFileInfo::enter_loop:after qApp->enter_loop()"<<endl;
+ qt_leave_modal(&dummy);
+}
+
+void QExtFileInfo::slotResult( KIO::Job * job )
+{
+ bJobOK = !job->error();
+ if ( !bJobOK )
+ {
+ if ( !lastErrorMsg )
+ lastErrorMsg = job->errorString();
+ }
+ if ( job->isA("KIO::StatJob") )
+ m_entry = static_cast<KIO::StatJob *>(job)->statResult();
+ qApp->exit_loop();
+}
+
+void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
+{
+ 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 = udsList.begin();
+ KIO::UDSEntryListConstIterator end = udsList.end();
+ KURL itemURL;
+ for ( ; it != end; ++it )
+ {
+ QString name;
+
+ // find out about the name
+ KIO::UDSEntry::ConstIterator entit = (*it).begin();
+ for( ; entit != (*it).end(); ++entit )
+ if ( (*entit).m_uds == KIO::UDS_NAME )
+ {
+ name = (*entit).m_str;
+ break;
+ }
+
+ if ( ! name.isEmpty() && name != dot && name != dotdot)
+ {
+ KFileItem* item = new KFileItem( *it, url, false, true );
+ itemURL = item->url();
+ if (item->isDir()) itemURL.adjustPath(1);
+ for ( QPtrListIterator<QRegExp> filterIt( lstFilters ); filterIt.current(); ++filterIt )
+ if ( filterIt.current()->exactMatch( item->text() ) )
+ dirListItems.append(itemURL);
+ delete item;
+ }
+ }
+}
+
+/** Timeout occured while waiting for some network function to return. */
+void QExtFileInfo::slotTimeout()
+{
+ bJobOK = false;
+ qApp->exit_loop();
+}
+#include "qextfileinfo.moc"
diff --git a/kimagemapeditor/qextfileinfo.h b/kimagemapeditor/qextfileinfo.h
new file mode 100644
index 00000000..20294bde
--- /dev/null
+++ b/kimagemapeditor/qextfileinfo.h
@@ -0,0 +1,75 @@
+/*
+ From WebMaker - KDE HTML Editor
+ Copyright (C) 1998, 1999 Alexei Dets <dets@services.ru>
+ Rewritten for Quanta Plus: (C) 2002 Andras Mantia <amantia@freemail.hu>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the 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 _QEXTFILEINFO_H_
+#define _QEXTFILEINFO_H_
+
+#include <kio/global.h>
+#include <kio/job.h>
+#include <kurl.h>
+#include <kfileitem.h>
+
+#include <qobject.h>
+#include <qptrlist.h>
+#include <qregexp.h>
+
+class QExtFileInfo:public QObject
+{
+ Q_OBJECT
+public:
+ QExtFileInfo() {};
+ ~QExtFileInfo() {};
+
+ /** create to ralative short name */
+ static KURL toRelative(const KURL& urlToConvert,const KURL& baseURL);
+ /** convert relative filename to absolute */
+ static KURL toAbsolute(const KURL& urlToConvert,const KURL& baseURL);
+ /** recurse function for all files in dir */
+ static KURL::List allFiles( const KURL& path, const QString &mask);
+ static KURL::List allFilesRelative( const KURL& path, const QString &mask);
+ /** create dir if don't exists */
+ static bool createDir(const KURL & path );
+ static KURL cdUp(const KURL &dir);
+ static QString shortName(const QString &fname );
+ static KURL path(const KURL &);
+ static KURL home();
+ static bool exists(const KURL& url);
+ static bool copy( const KURL& src, const KURL& dest, int permissions=-1,
+ bool overwrite=false, bool resume=false, QWidget* window = 0L );
+
+ void enter_loop();
+
+private:
+ bool internalExists(const KURL& url);
+ bool internalCopy(const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window);
+
+ bool bJobOK;
+ static QString lastErrorMsg;
+ KIO::UDSEntry m_entry;
+ KURL::List dirListItems;
+ QPtrList<QRegExp> lstFilters;
+
+ /** No descriptions */
+ KURL::List allFilesInternal(const KURL& startURL, const QString& mask);
+
+// friend class I_like_this_class;
+
+private slots:
+ void slotResult( KIO::Job * job );
+ void slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList);
+public slots: // Public slots
+ /** Timeout occured while waiting for some network function to return. */
+ void slotTimeout();
+};
+
+
+#endif
diff --git a/klinkstatus/AUTHORS b/klinkstatus/AUTHORS
new file mode 100644
index 00000000..9fc838ae
--- /dev/null
+++ b/klinkstatus/AUTHORS
@@ -0,0 +1 @@
+Paulo Moura Guedes <moura@kdewebdev.org>
diff --git a/klinkstatus/COPYING b/klinkstatus/COPYING
new file mode 100644
index 00000000..c13faf0d
--- /dev/null
+++ b/klinkstatus/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/klinkstatus/ChangeLog b/klinkstatus/ChangeLog
new file mode 100644
index 00000000..c278c40e
--- /dev/null
+++ b/klinkstatus/ChangeLog
@@ -0,0 +1,122 @@
+Changes for 0.3.1
+-----------------------------------------------------
+
+- Add the possibility to configure the User-Agent sent to the HTTP server.
+- Fix a problem with redirections different than 301 (moved permanently)
+- Don't require unsermake no more, in order to build the application
+- Added the possibility to set the document root for protocols different than HTTP
+ (to resolve URLs started with '/')
+- Improved behaviour in the layout of results columns
+- Context menu actions in results are more clear now
+- Fixed linkage order to build in IRIX
+- Added support for links in maps (area element)
+- Don't crash when checking anchors (bug #118495)
+- Properly disable close tab button
+- Other bug fixes and improvements
+
+
+Changes for 0.3.0
+-----------------------------------------------------
+
+- Results can be exported to HTML (BUG #85592).
+ Users are invited to improve the XSLT stylesheet and propose it to the author.
+
+- Improved interface
+ - ability to show/hide the search options
+ - option to control whether the list view should follow the last link checked
+ - option to reset the search options
+ - standard open/close tab widget tool buttons
+ - Replace the search buttons by toolbar actions
+ - ability to close the tabs on hover
+ - Revamped toolbars and usability in general
+
+- Search bar where one can filter links by text and status.
+- Fix a bug where the title of a URL was being set in the wrong page, if it wasn't the current.
+- Other bug fixes and improvements
+
+
+Changes for 0.2.3
+-----------------------------------------------------
+
+- Display correctly the page title with HTML entities (BUG #113560).
+- Find anchors identified with id attribute (BUG #112030).
+- Check anchors of all documents even if not searched yet (no more "URL ... not checked yet").
+- Remember port when resolving relative links (BUG 112249).
+- Display correctly link labels with HTML entities (BUG #111694).
+- Remember layout (order of columns, etc) of the result tree view.
+- Show the filename on the root link.
+- Add a folder button in the search field so one can easily set the URL to search.
+- Fixed the KIO problem in kdelibs that was causing random crashes.
+- New KLinkStatus logo from Alberto Gamez.
+
+
+Changes for 0.2.2
+-----------------------------------------------------
+
+- Compare domains in a case insensitive way (BUG #105415)
+- Fix crash when using File -> Quit (BUG #82617)
+
+
+Changes for 0.2.1
+-----------------------------------------------------
+
+- New feature: don't check URLs given a regular expression.
+- Fix current search settings being reseted when check button is pressed.
+
+
+Changes for 0.2.0
+-----------------------------------------------------
+
+- Added a tree view that reflects the structure of the website.
+It is possible to switch choose a tree view or a flat view in settings.
+- Other bugfixes and minor improvements.
+
+Changes for 0.1.3
+-----------------------------------------------------
+
+- Added some shortcuts and improve their configuration.
+- Improved settings update.
+- Use Quanta project preview prefix on the URL to check.
+- Improved 'Edit referrer with Quanta' action.
+- Other bugfixes and minor improvements.
+
+
+Changes for 0.1.2
+-----------------------------------------------------
+
+- Dialog for configuring settings added.
+- Tool button to clear the combo url.
+- Pause and resume feature.
+- View menu to display good, broken, etc, links.
+- Use title page for tab labels.
+- Validate URLs with reference (#)
+- Edit referrers in Quanta (can open all at a time).
+ Quanta needs to be run with --unique or embed KLinkStatus (for now...)
+- other minor improvements and bug fixes.
+
+
+Changes for 0.1.1
+-----------------------------------------------------
+
+- KConfigXT (no GUI yet)
+- File Dialog opens remote files now.
+- Fixed error status when URL is a directory
+- Combo url saves history and has autocompletion
+- Combo url navigation improved (like Konqueror)
+- Improved display of relative URLs
+- Show horizontal scroll when URL is too long
+- other improvements and bug fixes.
+
+
+Changes for 0.1.0
+-----------------------------------------------------
+- compilation fixes
+- fixed external links and parent directories judgment
+- different defaults for search
+- several other fixes and improvements that I can't remember
+
+
+Changes for 0.1-b1
+-----------------------------------------------------
+ Initial beta release
+
diff --git a/klinkstatus/FEATURES b/klinkstatus/FEATURES
new file mode 100644
index 00000000..33a328e4
--- /dev/null
+++ b/klinkstatus/FEATURES
@@ -0,0 +1,18 @@
+- Support several protocols (allowing fast checking of local documents): http, ftp, ssh (fish or sftp) and file.
+- Proxy support
+- Allows authentication when checking restricted documents
+- Supports the latest Web standards-- HTML 4.0, HTTP 1.1
+- Server-Side Includes (SSI, aka SHTML) are supported and checked
+- Regular expressions to restrict which URLs are searched
+- Show link results as they are checked
+- Tree like view (that reflects the file structure of the documents) or flat view
+- Limit the search depth
+- Fragment identifiers ("#" anchor links that point to a specific section in a document) are supported and checked
+- Find and respect the charset of the documents
+- Pause/Resume of checking session
+- History of checked URLs
+- Tabbed checking (allow multiple sessions at the same time)
+- Filter checked links (good, broken, malformed and undetermined)
+- Configurable number of simultaneous connections (performance tunning)
+- Other configurable options like "check external links", "check parent folders", "timeout"
+- Good integration with Quanta+ \ No newline at end of file
diff --git a/klinkstatus/INSTALL b/klinkstatus/INSTALL
new file mode 100644
index 00000000..02a4a074
--- /dev/null
+++ b/klinkstatus/INSTALL
@@ -0,0 +1,167 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes a while. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 4. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
diff --git a/klinkstatus/Makefile.am b/klinkstatus/Makefile.am
new file mode 100644
index 00000000..3da2d71a
--- /dev/null
+++ b/klinkstatus/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = data src
diff --git a/klinkstatus/NEWS b/klinkstatus/NEWS
new file mode 100644
index 00000000..0519ecba
--- /dev/null
+++ b/klinkstatus/NEWS
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/klinkstatus/README b/klinkstatus/README
new file mode 100644
index 00000000..eaf5b045
--- /dev/null
+++ b/klinkstatus/README
@@ -0,0 +1,5 @@
+KLinkStatus is a link checker for KDE, based in LinkStatus.
+
+You can report bugs at http://linkstatus.paradigma.co.pt/bugs/
+
+Contact: pmg@netcabo.pt
diff --git a/klinkstatus/TODO b/klinkstatus/TODO
new file mode 100644
index 00000000..36f28fb0
--- /dev/null
+++ b/klinkstatus/TODO
@@ -0,0 +1,24 @@
+Do list:
+
+- Option to skip already timed-out hosts
+
+- Ability to do edit actions after a search is finished,
+ like findind links, etc
+
+- GUI for search stats
+
+- GUI for info about a page/URL
+
+- Send email with broken links
+
+- Check the size for complete request on homepage
+
+- Use proper charset for the pages
+
+- Advanced search features like:
+ - check only files modified recently
+ - check only files matching given regular expression
+ - check only files in given path
+
+- Write better documentation
+
diff --git a/klinkstatus/configure.in.in b/klinkstatus/configure.in.in
new file mode 100644
index 00000000..3a2e3182
--- /dev/null
+++ b/klinkstatus/configure.in.in
@@ -0,0 +1,6 @@
+#MIN_CONFIG(3.2)
+
+AM_INIT_AUTOMAKE(klinkstatus, 0.1.0)
+AC_C_BIGENDIAN
+AC_CHECK_KDEMAXPATHLEN
+
diff --git a/klinkstatus/data/Makefile.am b/klinkstatus/data/Makefile.am
new file mode 100644
index 00000000..f8219dbf
--- /dev/null
+++ b/klinkstatus/data/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = icons styles
+
+klinkstatusicondir = $(kde_datadir)/klinkstatus/icons
diff --git a/klinkstatus/data/icons/16x16/304.png b/klinkstatus/data/icons/16x16/304.png
new file mode 100644
index 00000000..036bff9b
--- /dev/null
+++ b/klinkstatus/data/icons/16x16/304.png
Binary files differ
diff --git a/klinkstatus/data/icons/16x16/Makefile.am b/klinkstatus/data/icons/16x16/Makefile.am
new file mode 100644
index 00000000..1d19c3a3
--- /dev/null
+++ b/klinkstatus/data/icons/16x16/Makefile.am
@@ -0,0 +1,4 @@
+klinkstatusicondir = $(kde_datadir)/klinkstatuspart/pics
+
+klinkstatusicon_DATA = 304.png
+KDE_ICON = bug
diff --git a/klinkstatus/data/icons/16x16/cr16-action-bug.png b/klinkstatus/data/icons/16x16/cr16-action-bug.png
new file mode 100644
index 00000000..827d5f8e
--- /dev/null
+++ b/klinkstatus/data/icons/16x16/cr16-action-bug.png
Binary files differ
diff --git a/klinkstatus/data/icons/22x22/Makefile.am b/klinkstatus/data/icons/22x22/Makefile.am
new file mode 100644
index 00000000..bdcbfad2
--- /dev/null
+++ b/klinkstatus/data/icons/22x22/Makefile.am
@@ -0,0 +1 @@
+klinkstatusicondir = $(kde_datadir)/klinkstatuspart/pics
diff --git a/klinkstatus/data/icons/32x32/Makefile.am b/klinkstatus/data/icons/32x32/Makefile.am
new file mode 100644
index 00000000..5d234f12
--- /dev/null
+++ b/klinkstatus/data/icons/32x32/Makefile.am
@@ -0,0 +1,2 @@
+klinkstatusicondir = $(kde_datadir)/klinkstatuspart/pics
+
diff --git a/klinkstatus/data/icons/Makefile.am b/klinkstatus/data/icons/Makefile.am
new file mode 100644
index 00000000..14f1949a
--- /dev/null
+++ b/klinkstatus/data/icons/Makefile.am
@@ -0,0 +1,2 @@
+SUBDIRS = 32x32 22x22 16x16
+KDE_ICON = klinkstatus
diff --git a/klinkstatus/data/icons/hi128-app-klinkstatus.png b/klinkstatus/data/icons/hi128-app-klinkstatus.png
new file mode 100644
index 00000000..2aec7026
--- /dev/null
+++ b/klinkstatus/data/icons/hi128-app-klinkstatus.png
Binary files differ
diff --git a/klinkstatus/data/icons/hi16-app-klinkstatus.png b/klinkstatus/data/icons/hi16-app-klinkstatus.png
new file mode 100644
index 00000000..ea405926
--- /dev/null
+++ b/klinkstatus/data/icons/hi16-app-klinkstatus.png
Binary files differ
diff --git a/klinkstatus/data/icons/hi22-app-klinkstatus.png b/klinkstatus/data/icons/hi22-app-klinkstatus.png
new file mode 100644
index 00000000..6d359296
--- /dev/null
+++ b/klinkstatus/data/icons/hi22-app-klinkstatus.png
Binary files differ
diff --git a/klinkstatus/data/icons/hi32-app-klinkstatus.png b/klinkstatus/data/icons/hi32-app-klinkstatus.png
new file mode 100644
index 00000000..fc4b9eff
--- /dev/null
+++ b/klinkstatus/data/icons/hi32-app-klinkstatus.png
Binary files differ
diff --git a/klinkstatus/data/icons/hi48-app-klinkstatus.png b/klinkstatus/data/icons/hi48-app-klinkstatus.png
new file mode 100644
index 00000000..68e67f4a
--- /dev/null
+++ b/klinkstatus/data/icons/hi48-app-klinkstatus.png
Binary files differ
diff --git a/klinkstatus/data/icons/hi64-app-klinkstatus.png b/klinkstatus/data/icons/hi64-app-klinkstatus.png
new file mode 100644
index 00000000..47b4668f
--- /dev/null
+++ b/klinkstatus/data/icons/hi64-app-klinkstatus.png
Binary files differ
diff --git a/klinkstatus/data/styles/Makefile.am b/klinkstatus/data/styles/Makefile.am
new file mode 100644
index 00000000..7f17fbd9
--- /dev/null
+++ b/klinkstatus/data/styles/Makefile.am
@@ -0,0 +1,6 @@
+styles_DATA = \
+ results_stylesheet.xsl
+
+stylesdir = $(kde_datadir)/klinkstatus/styles
+EXTRA_DIST = $(styles_DATA)
+
diff --git a/klinkstatus/data/styles/results_stylesheet.xsl b/klinkstatus/data/styles/results_stylesheet.xsl
new file mode 100644
index 00000000..d0b0c10d
--- /dev/null
+++ b/klinkstatus/data/styles/results_stylesheet.xsl
@@ -0,0 +1,99 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:output method="html" />
+
+ <xsl:template match="/klinkstatus">
+ <html>
+ <body>
+
+ <strong>URL: </strong>
+ <xsl:value-of select="/klinkstatus/url"/>
+ <br/>
+ <strong>Depth: </strong>
+ <xsl:value-of select="/klinkstatus/depth"/>
+ <br/>
+ <strong>Check Parent Folders: </strong>
+ <xsl:value-of select="/klinkstatus/check_parent_folders"/>
+ <br/>
+ <strong>Check external links: </strong>
+ <xsl:value-of select="/klinkstatus/check_external_links"/>
+ <br/>
+ <xsl:if test="/klinkstatus/check_regular_expression[@check = 'true']">
+ <strong>Do not check links matching regular expression: </strong>
+ <xsl:value-of select="/klinkstatus/check_regular_expression"/>
+ <br/>
+ </xsl:if>
+ <br/>
+
+ <table border="1">
+ <thead>
+ <tr>
+ <th>URL</th>
+ <th>Status</th>
+ <th>Label</th>
+ <th>Referrers</th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="/klinkstatus/link_list/link">
+ <tr>
+ <td>
+ <xsl:apply-templates select="url"/>
+ </td>
+ <td>
+ <xsl:apply-templates select="status"/>
+ </td>
+ <td>
+ <xsl:apply-templates select="label"/>
+ </td>
+ <td>
+ <xsl:apply-templates select="referrers"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="url">
+ <xsl:variable name="isBroken">
+ <xsl:value-of select="../status/@broken"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$isBroken='true'">
+ <span style="color: red;">
+ <xsl:value-of select="."/>
+ </span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="status">
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:template>
+
+ <xsl:template match="label">
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:template>
+
+ <xsl:template match="referrers">
+ <xsl:for-each select="url">
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+ </xsl:template>
+
+
+ <xsl:template match="/klinkstatus/link_list/link/referrers/url">
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/klinkstatus/klinkstatus.kdevelop b/klinkstatus/klinkstatus.kdevelop
new file mode 100644
index 00000000..5abf4488
--- /dev/null
+++ b/klinkstatus/klinkstatus.kdevelop
@@ -0,0 +1,267 @@
+<?xml version = '1.0'?>
+<kdevelop>
+ <general>
+ <author>Paulo Moura Guedes</author>
+ <email>moura@kdewebdev.org</email>
+ <version>0.2.2</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ </keywords>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <description></description>
+ <ignoreparts/>
+ <secondaryLanguages/>
+ <versioncontrol/>
+ </general>
+ <kdevautoproject>
+ <general>
+ <activetarget>src/klinkstatus</activetarget>
+ <useconfiguration>default</useconfiguration>
+ </general>
+ <run>
+ <mainprogram>klinkstatus/src/klinkstatus</mainprogram>
+ <directoryradio>build</directoryradio>
+ <customdirectory>/</customdirectory>
+ <programargs/>
+ <terminal>false</terminal>
+ <autocompile>true</autocompile>
+ <envvars/>
+ </run>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>debug</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-DKDE_NO_COMPAT -DQT_NO_COMPAT -DQT_FATAL_ASSERT</cxxflags>
+ <topsourcedir>..</topsourcedir>
+ <cppflags/>
+ <ldflags/>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <f77flags/>
+ <envvars>
+ <envvar value="kfilereplace kommander kimagemapeditor kxsldbg quanta lib" name="DO_NOT_COMPILE" />
+ </envvars>
+ </debug>
+ <default>
+ <envvars>
+ <envvar value="kfilereplace kommander kimagemapeditor kxsldbg quanta lib" name="DO_NOT_COMPILE" />
+ </envvars>
+ <configargs>--enable-debug=full</configargs>
+ <builddir></builddir>
+ <topsourcedir>..</topsourcedir>
+ <cppflags></cppflags>
+ <ldflags></ldflags>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <ccompilerbinary></ccompilerbinary>
+ <cxxcompilerbinary></cxxcompilerbinary>
+ <f77compilerbinary></f77compilerbinary>
+ <cflags></cflags>
+ <cxxflags>-DQT_FATAL_ASSERT</cxxflags>
+ <f77flags></f77flags>
+ </default>
+ </configurations>
+ <make>
+ <envvars>
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </envvars>
+ <abortonerror>false</abortonerror>
+ <numberofjobs>1</numberofjobs>
+ <dontact>false</dontact>
+ <makebin/>
+ <prio>0</prio>
+ <runmultiplejobs>false</runmultiplejobs>
+ </make>
+ </kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h;*.H" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <hidenonprojectfiles>true</hidenonprojectfiles>
+ <showvcsfields>false</showvcsfields>
+ </tree>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ <projectdoc>
+ <userdocDir>html/</userdocDir>
+ <apidocDir>html/</apidocDir>
+ </projectdoc>
+ <ignoredoxygen/>
+ <ignorekdocs/>
+ <ignoredevhelp/>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>libtool</dbgshell>
+ <programargs></programargs>
+ <gdbpath></gdbpath>
+ <configGdbScript></configGdbScript>
+ <runShellScript></runShellScript>
+ <runGdbScript></runGdbScript>
+ <breakonloadinglibs>true</breakonloadinglibs>
+ <separatetty>false</separatetty>
+ <floatingtoolbar>false</floatingtoolbar>
+ </general>
+ <display>
+ <staticmembers>false</staticmembers>
+ <demanglenames>true</demanglenames>
+ <outputradix>10</outputradix>
+ </display>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <cppsupportpart>
+ <filetemplates>
+ <interfacesuffix>.h</interfacesuffix>
+ <implementationsuffix>.cpp</implementationsuffix>
+ </filetemplates>
+ </cppsupportpart>
+ <kdevcppsupport>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>true</includeTypedefs>
+ <automaticCodeCompletion>false</automaticCodeCompletion>
+ <automaticArgumentsHint>false</automaticArgumentsHint>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <headerCompletionDelay>250</headerCompletionDelay>
+ </codecompletion>
+ <references>
+ <pcs>Qt</pcs>
+ <pcs>KDElibs</pcs>
+ </references>
+ <qt>
+ <used>true</used>
+ <version>3</version>
+ <root>/usr/lib/qt-3.3</root>
+ </qt>
+ <creategettersetter>
+ <prefixGet></prefixGet>
+ <prefixSet>set</prefixSet>
+ <prefixVariable>m_,_</prefixVariable>
+ <parameterName>theValue</parameterName>
+ <inlineGet>true</inlineGet>
+ <inlineSet>true</inlineSet>
+ </creategettersetter>
+ </kdevcppsupport>
+ <dist>
+ <custom>false</custom>
+ <bzip>false</bzip>
+ <archname>%n-%v</archname>
+ <appname/>
+ <version>0.1.0</version>
+ <release/>
+ <vendor/>
+ <licence/>
+ <summary/>
+ <group/>
+ <packager/>
+ <description/>
+ <changelog/>
+ <devpackage>false</devpackage>
+ <docspackage>false</docspackage>
+ <appicon>false</appicon>
+ <arch>0</arch>
+ <genHTML>false</genHTML>
+ <useRPM>false</useRPM>
+ <ftpkde>false</ftpkde>
+ <appskde>false</appskde>
+ <url/>
+ </dist>
+ <kdevcvsservice>
+ <recursivewhenupdate>true</recursivewhenupdate>
+ <prunedirswhenupdate>true</prunedirswhenupdate>
+ <createdirswhenupdate>true</createdirswhenupdate>
+ <recursivewhencommitremove>true</recursivewhencommitremove>
+ <revertoptions>-C</revertoptions>
+ </kdevcvsservice>
+ <kdevcvs>
+ <cvsoptions>-f</cvsoptions>
+ <commitoptions/>
+ <addoptions/>
+ <logoptions/>
+ <updateoptions>-dP</updateoptions>
+ <removeoptions>-f</removeoptions>
+ <revertoptions>-C -d -P</revertoptions>
+ <diffoptions>-u3 -p</diffoptions>
+ <rshoptions/>
+ </kdevcvs>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem/>
+ <docurl/>
+ <usermanualurl/>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/klinkstatus/src/Makefile.am b/klinkstatus/src/Makefile.am
new file mode 100644
index 00000000..590957a2
--- /dev/null
+++ b/klinkstatus/src/Makefile.am
@@ -0,0 +1,62 @@
+# set the include path for X, qt and KDE
+INCLUDES = -I$(top_srcdir)/src/cfg -I./ui -I./ui/settings $(all_includes)
+
+# these are the headers for your project
+
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+
+# this Makefile creates both a KPart application and a KPart
+#########################################################################
+# APPLICATION SECTION
+#########################################################################
+# this is the program that gets installed. it's name is used for all
+# of the other Makefile.am variables
+bin_PROGRAMS = klinkstatus
+
+# the application source, library search path, and link libraries
+
+klinkstatus_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+klinkstatus_LDADD = $(LIB_KPARTS)
+
+xdg_apps_DATA = klinkstatus.desktop
+
+# this is where the shell's XML-GUI resource file goes
+shellrcdir = $(kde_datadir)/klinkstatus
+shellrc_DATA = klinkstatus_shell.rc
+
+
+#########################################################################
+# KPART SECTION
+#########################################################################
+kde_module_LTLIBRARIES = libklinkstatuspart.la
+
+# the Part's source, library search path, and link libraries
+
+libklinkstatuspart_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries)
+libklinkstatuspart_la_LIBADD = ui/settings/libsettings.la \
+ ui/libui.la engine/libengine.la \
+ parser/libparser.la utils/libutils.la $(LIB_KPARTS) $(LIB_KFILE)
+
+# this is where the desktop file will go
+partdesktopdir = $(kde_servicesdir)
+partdesktop_DATA = klinkstatus_part.desktop
+
+# this is where the part's XML-GUI resource file goes
+partrcdir = $(kde_datadir)/klinkstatuspart
+partrc_DATA = klinkstatus_part.rc
+noinst_HEADERS = klinkstatus.h klinkstatus_part.h global.h actionmanager.h
+klinkstatus_SOURCES = klinkstatus.cpp main.cpp
+libklinkstatuspart_la_SOURCES = klinkstatus_part.cpp global.cpp \
+ actionmanager.cpp
+SUBDIRS = cfg utils parser engine ui
+
+messages: rc.cpp
+ LIST=`find . -name \*.ui -o -name \*.kcfg -o -name \*.rc` ;\
+ if test -n "$$LIST"; then $(EXTRACTRC) $$LIST >> rc.cpp; fi
+ LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
+ if test -n "$$LIST"; then \
+ $(XGETTEXT) $$LIST -o $(podir)/klinkstatus.pot; \
+ fi
+
diff --git a/klinkstatus/src/actionmanager.cpp b/klinkstatus/src/actionmanager.cpp
new file mode 100644
index 00000000..9f60e7bf
--- /dev/null
+++ b/klinkstatus/src/actionmanager.cpp
@@ -0,0 +1,273 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "actionmanager.h"
+
+#include <kactioncollection.h>
+#include <kxmlguifactory.h>
+#include <klocale.h>
+#include <kaction.h>
+#include <kguiitem.h>
+
+#include <qbuttongroup.h>
+
+#include "klinkstatus_part.h"
+#include "ui/sessionwidget.h"
+#include "ui/tabwidgetsession.h"
+#include "cfg/klsconfig.h"
+
+
+ActionManager* ActionManager::m_self = 0;
+
+ActionManager* ActionManager::getInstance()
+{
+ Q_ASSERT(m_self);
+
+ return m_self;
+}
+
+void ActionManager::setInstance(ActionManager* manager)
+{
+ Q_ASSERT(manager);
+
+ m_self = manager;
+}
+
+class ActionManager::ActionManagerPrivate
+{
+public:
+ ActionManagerPrivate()
+ : part(0), tabWidgetSession(0), sessionWidget(0)
+ {}
+
+ KActionCollection* actionCollection;
+
+ KLinkStatusPart* part;
+ TabWidgetSession* tabWidgetSession;
+ SessionWidget* sessionWidget;
+};
+
+ActionManager::ActionManager(QObject *parent, const char *name)
+ : QObject(parent, name), d(new ActionManagerPrivate)
+{}
+
+ActionManager::~ActionManager()
+{
+ delete d;
+ d = 0;
+}
+
+void ActionManager::initPart(KLinkStatusPart* part)
+{
+ Q_ASSERT(part);
+
+ if(d->part)
+ return;
+
+ d->part = part;
+ d->actionCollection = part->actionCollection();
+
+ KAction* action = 0;
+
+ // *************** File menu *********************
+
+ new KAction(i18n("New Link Check"), "filenew",
+ 0,
+ d->part, SLOT(slotNewLinkCheck()),
+ d->actionCollection, "new_link_check");
+
+ new KAction(i18n("Open URL..."), "fileopen",
+ 0,
+ d->part, SLOT(slotOpenLink()),
+ d->actionCollection, "open_link");
+
+ action = new KAction(i18n("Close Tab"), "fileclose",
+ 0,
+ d->part, SLOT(slotClose()),
+ d->actionCollection, "close_tab");
+ action->setEnabled(false);
+
+ // *************** Settings menu *********************
+
+ (void) new KAction(i18n("Configure KLinkStatus..."), "configure",
+ 0, d->part, SLOT(slotConfigureKLinkStatus()),
+ d->actionCollection, "configure_klinkstatus");
+
+ // *************** Help menu *********************
+
+ (void) new KAction(i18n("About KLinkStatus"), "klinkstatus",
+ 0, d->part, SLOT(slotAbout()),
+ d->actionCollection, "about_klinkstatus");
+
+ (void) new KAction(i18n("&Report Bug..."), 0, 0, d->part,
+ SLOT(slotReportBug()), d->actionCollection, "report_bug");
+
+ // *************** View menu *********************
+}
+
+void ActionManager::initTabWidget(TabWidgetSession* tabWidgetSession)
+{
+ Q_ASSERT(tabWidgetSession);
+
+ if (d->tabWidgetSession)
+ return;
+
+ d->tabWidgetSession = tabWidgetSession;
+
+ // *************** File menu *********************
+
+ KAction* action = new KAction(i18n("E&xport Results as HTML..."), "filesave", 0,
+ d->tabWidgetSession, SLOT(slotExportAsHTML()),
+ d->actionCollection, "file_export_html");
+ action->setEnabled(false);
+
+ // *************** View menu *********************
+
+ // this action must be in the tabwidget because the slot can't be connected to a particular sessionWidget
+ KToggleAction* toggle_action = new KToggleAction(i18n("&Follow last Link checked"),
+ "make_kdevelop", "Ctrl+f",
+ d->tabWidgetSession, SLOT(slotFollowLastLinkChecked()),
+ d->actionCollection, "follow_last_link_checked");
+ toggle_action->setChecked(KLSConfig::followLastLinkChecked());
+
+ // this action must be in the tabwidget because the slot can't be connected to a particular sessionWidget
+ toggle_action = new KToggleAction(i18n("&Hide Search Panel"), "bottom", "Ctrl+h",
+ d->tabWidgetSession, SLOT(slotHideSearchPanel()),
+ d->actionCollection, "hide_search_bar");
+ KGuiItem item(i18n("&Show Search Panel"), "top", "Show Search Panel");
+ toggle_action->setCheckedState(item);
+
+ new KAction(i18n("&Reset Search Options"), "reload", "F5",
+ d->tabWidgetSession, SLOT(slotResetSearchOptions()),
+ d->actionCollection, "reset_search_bar");
+
+ // *************** Search menu *********************
+
+ toggle_action = new KToggleAction(i18n("&Start Search"),
+ "player_play", "Ctrl+s",
+ d->tabWidgetSession, SLOT(slotStartSearch()),
+ d->actionCollection, "start_search");
+ toggle_action->setEnabled(false);
+
+ toggle_action = new KToggleAction(i18n("&Pause Search"),
+ "player_pause", "Ctrl+p",
+ d->tabWidgetSession, SLOT(slotPauseSearch()),
+ d->actionCollection, "pause_search");
+ toggle_action->setEnabled(false);
+
+ action = new KAction(i18n("St&op Search"),
+ "player_stop", "Ctrl+c",
+ d->tabWidgetSession, SLOT(slotStopSearch()),
+ d->actionCollection, "stop_search");
+ action->setEnabled(false);
+}
+
+void ActionManager::initSessionWidget(SessionWidget* sessionWidget)
+{
+ Q_ASSERT(sessionWidget);
+
+ if (d->sessionWidget)
+ return;
+
+ d->sessionWidget = sessionWidget;
+
+}
+
+QWidget* ActionManager::container(const char* name)
+{
+ return d->part->factory()->container(name, d->part);
+}
+
+KActionCollection* ActionManager::actionCollection()
+{
+ return d->actionCollection;
+}
+
+KAction* ActionManager::action(const char* name, const char* classname)
+{
+ return d->actionCollection != 0 ? d->actionCollection->action(name, classname) : 0;
+}
+
+void ActionManager::slotUpdateSessionWidgetActions(SessionWidget* page)
+{
+ KToggleAction* start_search_action_ = static_cast<KToggleAction*> (action("start_search"));
+ KToggleAction* pause_search_action_ = static_cast<KToggleAction*> (action("pause_search"));
+ KAction* stop_search_action_ = action("stop_search");
+
+ if(page->inProgress())
+ {
+ Q_ASSERT(!page->stopped());
+
+ start_search_action_->setEnabled(true);
+ start_search_action_->setChecked(true);
+
+ pause_search_action_->setEnabled(true);
+
+ stop_search_action_->setEnabled(true);
+ }
+ if(page->paused())
+ {
+ Q_ASSERT(page->inProgress());
+ Q_ASSERT(!page->stopped());
+
+ start_search_action_->setEnabled(true);
+ start_search_action_->setChecked(true);
+
+ pause_search_action_->setEnabled(true);
+ pause_search_action_->setChecked(true);
+
+ stop_search_action_->setEnabled(true);
+ }
+ if(page->stopped())
+ {
+ Q_ASSERT(!page->inProgress());
+ Q_ASSERT(!page->paused());
+
+ start_search_action_->setEnabled(true);
+ start_search_action_->setChecked(false);
+
+ pause_search_action_->setEnabled(false);
+ pause_search_action_->setChecked(false);
+
+ stop_search_action_->setEnabled(false);
+ }
+
+// ____________________________________________________________________
+
+ KToggleAction* toggleAction = static_cast<KToggleAction*> (action("follow_last_link_checked"));
+
+ if(!toggleAction) // the first sessionWidget is created before initSessionWidget is called
+ {
+ initSessionWidget(page);
+ toggleAction = static_cast<KToggleAction*> (action("follow_last_link_checked"));
+ }
+ Q_ASSERT(toggleAction);
+ toggleAction->setChecked(page->followLastLinkChecked());
+
+ toggleAction = static_cast<KToggleAction*> (action("hide_search_bar"));
+ Q_ASSERT(toggleAction);
+ toggleAction->setChecked(page->buttongroup_search->isHidden());
+
+ // ____________________________________________________________________
+
+ action("file_export_html")->setEnabled(!page->isEmpty());
+}
+
+
+#include "actionmanager.moc"
diff --git a/klinkstatus/src/actionmanager.h b/klinkstatus/src/actionmanager.h
new file mode 100644
index 00000000..a33c37f4
--- /dev/null
+++ b/klinkstatus/src/actionmanager.h
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 ACTIONMANAGER_H
+#define ACTIONMANAGER_H
+
+#include <qobject.h>
+
+class KAction;
+class KActionCollection;
+
+class SessionWidget;
+class KLinkStatusPart;
+class TabWidgetSession;
+
+/**
+ @author Paulo Moura Guedes <moura@kdewebdev.org>
+
+ interface for accessing actions, popup menus etc. from widgets.
+*/
+class ActionManager : public QObject
+{
+ Q_OBJECT
+public:
+ ActionManager(QObject* parent=0, const char* name=0);
+ virtual ~ActionManager();
+
+ static ActionManager* getInstance();
+ static void setInstance(ActionManager* manager);
+
+ virtual KAction* action(const char* name, const char* classname=0);
+ virtual QWidget* container(const char* name);
+
+ void initPart(KLinkStatusPart* part);
+ void initSessionWidget(SessionWidget* sessionWidget);
+ void initTabWidget(TabWidgetSession* tabWidgetSession);
+
+public slots:
+ void slotUpdateSessionWidgetActions(SessionWidget*);
+
+protected:
+
+ KActionCollection* actionCollection();
+
+private:
+
+ static ActionManager* m_self;
+
+ class ActionManagerPrivate;
+ ActionManagerPrivate* d;
+};
+
+#endif
diff --git a/klinkstatus/src/cfg/Makefile.am b/klinkstatus/src/cfg/Makefile.am
new file mode 100644
index 00000000..2e74b2ad
--- /dev/null
+++ b/klinkstatus/src/cfg/Makefile.am
@@ -0,0 +1,6 @@
+kde_kcfg_DATA = klinkstatus.kcfg
+METASOURCES = AUTO
+libcfg_la_LDFLAGS = $(all_libraries)
+noinst_LTLIBRARIES = libcfg.la
+libcfg_la_SOURCES = dummy.cpp klsconfig.kcfgc
+AM_CPPFLAGS=$(all_includes) \ No newline at end of file
diff --git a/klinkstatus/src/cfg/dummy.cpp b/klinkstatus/src/cfg/dummy.cpp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/klinkstatus/src/cfg/dummy.cpp
diff --git a/klinkstatus/src/cfg/klinkstatus.kcfg b/klinkstatus/src/cfg/klinkstatus.kcfg
new file mode 100644
index 00000000..ae43c6b1
--- /dev/null
+++ b/klinkstatus/src/cfg/klinkstatus.kcfg
@@ -0,0 +1,91 @@
+<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
+<kcfg>
+ <kcfgfile name="klinkstatus_shell.rc" />
+
+ <group name="klinkstatus" >
+
+ <entry key="MaxCountComboUrl" type="Int" >
+ <label>Maximum number of entries in the combo url.</label>
+ <default>50</default>
+ </entry>
+
+ <entry key="MaxConnectionsNumber" type="Int" >
+ <label>Maximum number of simultaneous connections.</label>
+ <default>5</default>
+ </entry>
+
+ <entry key="TimeOut" type="Int" >
+ <label>Timeout on getting an URL.</label>
+ <default>35</default>
+ </entry>
+
+ <entry key="ComboUrlHistory" type="StringList" >
+ <label>History of combo url.</label>
+ </entry>
+
+ <entry key="RecursiveCheck" type="Bool" >
+ <label>Whether to do a recursive check.</label>
+ <default>true</default>
+ </entry>
+
+ <entry key="Depth" type="Int" >
+ <label>Maximum depth to check.</label>
+ <default>0</default>
+ </entry>
+
+ <entry key="CheckParentFolders" type="Bool" >
+ <label>Whether to check parent folders.</label>
+ <default>true</default>
+ </entry>
+
+ <entry key="CheckExternalLinks" type="Bool" >
+ <label>Whether to check external links.</label>
+ <default>true</default>
+ </entry>
+
+ <entry key="RememberCheckSettings" type="Bool" >
+ <label>Whether to remeber the check settings like depth, and so on, on exit.</label>
+ <default>false</default>
+ </entry>
+
+ <entry key="UseQuantaUrlPreviewPrefix" type="Bool" >
+ <label>Whether preview prefix in Quanta project is used to set the URL to check.</label>
+ <default>true</default>
+ </entry>
+
+ <entry key="DisplayTreeView" type="Bool" >
+ <label>Whether to display a tree view or a flat view in the results view.</label>
+ <default>true</default>
+ </entry>
+
+ <entry key="DisplayFlatView" type="Bool" >
+ <label>Whether to display a tree view or a flat view in the results view.</label>
+ <default>false</default>
+ </entry>
+
+ <entry key="AutoAdjustColumnWidth" type="Bool" >
+ <label>Whether to automatically adjust the width of the result columns (Not used).</label>
+ <default>false</default>
+ </entry>
+
+ <entry key="FollowLastLinkChecked" type="Bool" >
+ <label>Whether the viewport of the result view should follow the last link checked.</label>
+ <default>true</default>
+ </entry>
+
+ <entry key="ShowMarkupStatus" type="Bool" >
+ <label>Whether the user can see if the markup is valid by showing a column with an icon indicator.</label>
+ <default>false</default>
+ </entry>
+
+ <entry key="SendIdentification" type="Bool" >
+ <label>Whether to send an User-Agent in HTTP requests.</label>
+ <default>true</default>
+ </entry>
+
+ <entry name="UserAgent" type="String">
+ <label>Defines the HTTP User-Agent to send.</label>
+ </entry>
+
+ </group>
+</kcfg>
diff --git a/klinkstatus/src/cfg/klsconfig.kcfgc b/klinkstatus/src/cfg/klsconfig.kcfgc
new file mode 100644
index 00000000..089abab7
--- /dev/null
+++ b/klinkstatus/src/cfg/klsconfig.kcfgc
@@ -0,0 +1,7 @@
+# Code generation options for kconfig_compiler
+File=klinkstatus.kcfg
+#IncludeFiles=defines.h
+ClassName=KLSConfig
+Singleton=true
+#CustomAdditions=true
+Mutators=true
diff --git a/klinkstatus/src/engine/Makefile.am b/klinkstatus/src/engine/Makefile.am
new file mode 100644
index 00000000..1bd3ba88
--- /dev/null
+++ b/klinkstatus/src/engine/Makefile.am
@@ -0,0 +1,9 @@
+INCLUDES = -I$(top_srcdir)/src/ui $(all_includes)
+METASOURCES = AUTO
+noinst_HEADERS = linkchecker.h linkstatus.h linkstatus_impl.h searchmanager.h \
+ searchmanager_impl.h linkfilter.h
+libengine_la_LDFLAGS = $(all_libraries)
+noinst_LTLIBRARIES = libengine.la
+libengine_la_SOURCES = linkchecker.cpp linkstatus.cpp searchmanager.cpp \
+ linkfilter.cpp
+libengine_la_LIBADD = $(LIB_KHTML)
diff --git a/klinkstatus/src/engine/linkchecker.cpp b/klinkstatus/src/engine/linkchecker.cpp
new file mode 100644
index 00000000..bcc503ad
--- /dev/null
+++ b/klinkstatus/src/engine/linkchecker.cpp
@@ -0,0 +1,703 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Puto Moura *
+ * mojo@localhost.localdomain *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "linkchecker.h"
+#include "searchmanager.h"
+#include "../utils/utils.h"
+#include "../parser/htmlparser.h"
+
+#include <qstring.h>
+#include <qtimer.h>
+#include <qtextcodec.h>
+#include <qcstring.h>
+
+#include <kio/netaccess.h>
+#include <kio/global.h>
+#include <kio/job.h>
+#include <kio/scheduler.h>
+#include <kio/slave.h>
+#include <kmimetype.h>
+#include <kapplication.h>
+#include <klocale.h>
+#include <khtml_part.h>
+#include <dom/html_misc.h>
+#include <dom/dom_node.h>
+#include <dom/dom_string.h>
+
+
+int LinkChecker::count_ = 0;
+
+LinkChecker::LinkChecker(LinkStatus* linkstatus, int time_out,
+ QObject *parent, const char *name)
+ : QObject(parent, name), search_manager_(0),
+ linkstatus_(linkstatus), t_job_(0), time_out_(time_out), checker_(0), document_charset_(),
+ redirection_(false), header_checked_(false), finnished_(false),
+ parsing_(false), is_charset_checked_(false), has_defined_charset_(false)
+{
+ Q_ASSERT(linkstatus_);
+ Q_ASSERT(!linkstatus_->checked());
+
+ kdDebug(23100) << endl << ++count_ << ": " << "Checking " << linkstatus_->absoluteUrl().url() << endl;
+}
+
+LinkChecker::~LinkChecker()
+{}
+
+void LinkChecker::setSearchManager(SearchManager* search_manager)
+{
+ Q_ASSERT(search_manager);
+ search_manager_ = search_manager;
+}
+
+void LinkChecker::check()
+{
+ Q_ASSERT(!finnished_);
+
+ KURL url(linkStatus()->absoluteUrl());
+ Q_ASSERT(url.isValid());
+
+ if(url.hasRef()) {
+ KMimeType::Ptr mimeType = KMimeType::findByURL(url);
+ if(mimeType->is("text/html") || mimeType->is("application/xml")) {
+ checkRef();
+ return;
+ }
+ }
+
+ t_job_ = KIO::get(url, false, false);
+
+ t_job_->addMetaData("PropagateHttpHeader", "true"); // to have the http header
+
+ if (linkstatus_->parent()) {
+ t_job_->addMetaData("referrer", linkstatus_->parent()->absoluteUrl().prettyURL());
+ }
+
+ if(search_manager_->sendIdentification())
+ {
+ t_job_->addMetaData("SendUserAgent", "true");
+ t_job_->addMetaData("UserAgent", search_manager_->userAgent());
+ }
+ else
+ t_job_->addMetaData("SendUserAgent", "false");
+
+
+ QObject::connect(t_job_, SIGNAL(data(KIO::Job *, const QByteArray &)),
+ this, SLOT(slotData(KIO::Job *, const QByteArray &)));
+ QObject::connect(t_job_, SIGNAL(mimetype(KIO::Job *, const QString &)),
+ this, SLOT(slotMimetype(KIO::Job *, const QString &)));
+ QObject::connect(t_job_, SIGNAL(result(KIO::Job *)),
+ this, SLOT(slotResult(KIO::Job *)));
+ QObject::connect(t_job_, SIGNAL(redirection(KIO::Job *, const KURL &)),
+ this, SLOT(slotRedirection(KIO::Job *, const KURL &)));
+
+ QTimer::singleShot( time_out_ * 1000, this, SLOT(slotTimeOut()) );
+
+ t_job_->setInteractive(false);
+}
+
+void LinkChecker::slotTimeOut()
+{
+ if(!finnished_ && !parsing_)
+ {
+ kdDebug(23100) << "timeout: " << linkstatus_->absoluteUrl().url() << endl;
+ if(t_job_ && t_job_->slave())
+ kdDebug(23100) << " - " << t_job_->slave() << "/" << t_job_->slave()->slave_pid() << endl;
+ else
+ kdDebug(23100) << endl;
+
+
+// Q_ASSERT(t_job_); // can happen: e.g. bad result signal
+ if(t_job_->error() != KIO::ERR_USER_CANCELED)
+ {
+ linkstatus_->setErrorOccurred(true);
+ linkstatus_->setChecked(true);
+ linkstatus_->setError(i18n("Timeout"));
+ linkstatus_->setStatus(LinkStatus::TIMEOUT);
+
+ killJob();
+ finnish();
+ }
+ }
+}
+
+void LinkChecker::slotMimetype (KIO::Job* /*job*/, const QString &type)
+{
+ if(finnished_)
+ return;
+
+// kdDebug(23100) << "LinkChecker::slotMimetype:" << type << "-> " << linkstatus_->absoluteUrl().url()
+// << " - " << t_job_->slave() << "/" << t_job_->slave()->slave_pid() << endl;
+
+ Q_ASSERT(t_job_);
+
+ LinkStatus* ls = 0;
+/* if(redirection_)
+ ls = linkStatus()->redirection();
+ else*/
+ ls = linkstatus_;
+ Q_ASSERT(ls);
+
+ ls->setMimeType(type);
+ KURL url = ls->absoluteUrl();
+
+ // we doesn't do nothing if file is http or https because we need the header
+ // which is only available in the data response
+ if(!t_job_->error()) // if a error happened let result() handle that
+ {
+ if(ls->onlyCheckHeader())
+ {
+ //kdDebug(23100) << "only check header: " << ls->absoluteUrl().prettyURL() << endl;
+
+ // file is OK (http can have an error page though job->error() is false)
+ if(!url.protocol().startsWith("http"))
+ {
+ ls->setStatusText("OK");
+ ls->setStatus(LinkStatus::SUCCESSFULL);
+
+ killJob();
+ finnish();
+ }
+ }
+ else // !ls->onlyCheckHeader()
+ {
+ //kdDebug(23100) << "NOT only check header: " << ls->absoluteUrl().prettyURL() << endl;
+
+ // file is OK (http can have an error page though job->error() is false)
+ if(!url.protocol().startsWith("http")) // if not, it have to go trough slotData to get the http header
+ {
+ // it's not an html page, so we don't want the file content
+ if(type != "text/html"/* && type != "text/plain"*/)
+ {
+ //kdDebug(23100) << "mimetype: " << type << endl;
+ ls->setStatusText("OK");
+ ls->setStatus(LinkStatus::SUCCESSFULL);
+
+ killJob();
+ finnish();
+ }
+ }
+ }
+ }
+}
+
+void LinkChecker::slotData(KIO::Job* /*job*/, const QByteArray& data)
+{
+ if(finnished_)
+ return;
+
+ kdDebug(23100) << "LinkChecker::slotData -> " << linkstatus_->absoluteUrl().url()
+ << " - " << t_job_->slave() << "/" << t_job_->slave()->slave_pid() << endl;
+
+ Q_ASSERT(t_job_);
+
+ LinkStatus* ls = 0;
+/* if(redirection_)
+ ls = linkStatus()->redirection();
+ else*/
+ ls = linkstatus_;
+ Q_ASSERT(ls);
+
+ KURL url = ls->absoluteUrl();
+
+ if(!t_job_->error())
+ {
+ if(ls->onlyCheckHeader())
+ {
+ Q_ASSERT(header_checked_ == false);
+ // the job should have been killed in slotMimetype
+ Q_ASSERT(url.protocol() == "http" || url.protocol() == "https");
+
+ // get the header and quit
+ if(url.protocol().startsWith("http"))
+ {
+ // get the header
+ ls->setHttpHeader(getHttpHeader(t_job_));
+
+ if(t_job_->isErrorPage())
+ ls->setIsErrorPage(true);
+
+ if(header_checked_)
+ {
+ killJob();
+ linkstatus_->setStatus(getHttpStatus());
+ linkstatus_->setChecked(true);
+ finnish();
+ return;
+ }
+ }
+ }
+ else
+ {
+ if(url.protocol().startsWith("http"))
+ {
+ if(!header_checked_)
+ {
+ ls->setHttpHeader(getHttpHeader(t_job_));
+ }
+ if(ls->mimeType() != "text/html" && header_checked_)
+ {
+ //kdDebug(23100) << "mimetype of " << ls->absoluteUrl().prettyURL() << ": " << ls->mimeType() << endl;
+ ls->setStatus(getHttpStatus());
+ killJob();
+ finnish(); // if finnish is called before kill what you get is a segfault, don't know why
+ return;
+ }
+ else if(t_job_->isErrorPage() && header_checked_)
+ {
+ //kdDebug(23100) << "ERROR PAGE" << endl;
+ ls->setIsErrorPage(true);
+ ls->setStatus(getHttpStatus());
+ killJob();
+ finnish();
+ return;
+ }
+ }
+ else
+ {
+ Q_ASSERT(ls->mimeType() == "text/html");
+ }
+ if(!is_charset_checked_)
+ findDocumentCharset(data);
+
+ QTextCodec* codec = 0;
+ if(has_defined_charset_)
+ codec = QTextCodec::codecForName(document_charset_);
+ if(!codec)
+ codec = QTextCodec::codecForName("iso8859-1"); // default
+
+ doc_html_ += codec->toUnicode(data);
+ }
+ }
+}
+
+void LinkChecker::findDocumentCharset(QString const& doc)
+{
+ Q_ASSERT(!is_charset_checked_);
+
+ is_charset_checked_ = true; // only check the first stream of data
+
+ if(header_checked_)
+ document_charset_ = linkstatus_->httpHeader().charset();
+
+ // try to look in the meta elements
+ if(document_charset_.isNull() || document_charset_.isEmpty())
+ document_charset_ = HtmlParser::findCharsetInMetaElement(doc);
+
+ if(!document_charset_.isNull() && !document_charset_.isEmpty())
+ has_defined_charset_ = true;
+}
+
+// only comes here if an error happened or in case of a clean html page
+// if onlyCheckHeader is false
+void LinkChecker::slotResult(KIO::Job* /*job*/)
+{
+ if(finnished_)
+ return;
+
+ kdDebug(23100) << "LinkChecker::slotResult -> " << linkstatus_->absoluteUrl().url() << endl;
+
+ Q_ASSERT(t_job_);
+ if(!t_job_)
+ return;
+
+ if(redirection_) {
+ if(!processRedirection(redirection_url_)) {
+ t_job_ = 0;
+ linkstatus_->setChecked(true);
+ finnish();
+ return;
+ }
+ }
+
+ KIO::TransferJob* job = t_job_;
+ t_job_ = 0;
+
+ emit jobFinnished(this);
+
+ if(job->error() == KIO::ERR_USER_CANCELED)
+ {
+ // FIXME This can happen! If the job is non interactive...
+ kdWarning(23100) << endl << "Job killed quietly, yet signal result was emited..." << endl;
+ kdDebug(23100) << linkstatus_->toString() << endl;
+ finnish();
+ return;
+ }
+
+ LinkStatus* ls = 0;
+ if(redirection_)
+ ls = linkStatus()->redirection();
+ else
+ ls = linkstatus_;
+ Q_ASSERT(ls);
+
+ if(!(!ls->onlyCheckHeader() ||
+ job->error() ||
+ !header_checked_))
+ kdWarning(23100) << ls->toString() << endl;
+
+ Q_ASSERT(!ls->onlyCheckHeader() || job->error() || !header_checked_);
+
+ if(ls->isErrorPage())
+ kdWarning(23100) << "\n\n" << ls->toString() << endl << endl;
+
+ Q_ASSERT(!job->isErrorPage());
+
+ if(job->error())
+ {
+ kdDebug(23100) << "Job error: " << job->errorString() << endl;
+ kdDebug(23100) << "Job error code: " << job->error() << endl;
+
+ if(job->error() == KIO::ERR_IS_DIRECTORY)
+ {
+ ls->setStatusText("OK");
+ ls->setStatus(LinkStatus::SUCCESSFULL);
+ }
+ else
+ {
+ ls->setErrorOccurred(true);
+ if(job->error() == KIO::ERR_SERVER_TIMEOUT)
+ ls->setStatus(LinkStatus::TIMEOUT);
+ else
+ ls->setStatus(LinkStatus::BROKEN);
+
+ if(job->errorString().isEmpty())
+ kdWarning(23100) << "\n\nError string is empty, error = " << job->error() << "\n\n\n";
+ if(job->error() != KIO::ERR_NO_CONTENT)
+ ls->setError(job->errorString());
+ else
+ ls->setError(i18n("No Content"));
+ }
+ }
+
+ else
+ {
+ if(!ls->absoluteUrl().protocol().startsWith("http")) {
+ ls->setStatusText("OK");
+ ls->setStatus(LinkStatus::SUCCESSFULL);
+ }
+ else
+ {
+ if(!header_checked_)
+ {
+ kdDebug(23100) << "\n\nheader not received... checking again...\n\n\n";
+ //check again
+ check();
+ return;
+ }
+ Q_ASSERT(header_checked_);
+
+ ls->setStatus(getHttpStatus());
+ }
+
+ if(!doc_html_.isNull() && !doc_html_.isEmpty())
+ {
+ ls->setDocHtml(doc_html_);
+
+ parsing_ = true;
+ HtmlParser parser(doc_html_);
+
+ if(parser.hasBaseUrl())
+ ls->setBaseURI(KURL(parser.baseUrl().url()));
+ if(parser.hasTitle())
+ ls->setHtmlDocTitle(parser.title().attributeTITLE());
+
+ ls->setChildrenNodes(parser.nodes());
+ parsing_ = false;
+ }
+ }
+ finnish();
+}
+
+
+void LinkChecker::slotRedirection (KIO::Job* /*job*/, const KURL &url)
+{
+ kdDebug(23100) << "LinkChecker::slotRedirection -> " <<
+ linkstatus_->absoluteUrl().url() << " -> " << url.url() << endl;
+// << " - " << t_job_->slave() << "/" << t_job_->slave()->slave_pid() << endl;
+
+ redirection_ = true;
+ redirection_url_ = url;
+}
+
+bool LinkChecker::processRedirection(KURL const& toUrl)
+{
+ if(finnished_)
+ return true;
+
+ kdDebug(23100) << "LinkChecker::processRedirection -> " << linkstatus_->absoluteUrl().url() << " -> " << toUrl.url() << endl;
+
+ Q_ASSERT(t_job_);
+ Q_ASSERT(linkstatus_->absoluteUrl().protocol().startsWith("http"));
+ Q_ASSERT(redirection_);
+
+ linkstatus_->setHttpHeader(getHttpHeader(t_job_, false));
+ linkstatus_->setIsRedirection(true);
+ linkstatus_->setStatusText("redirection");
+ linkstatus_->setStatus(LinkStatus::HTTP_REDIRECTION);
+ linkstatus_->setChecked(true);
+
+ LinkStatus* ls_red = new LinkStatus(*linkstatus_);
+ ls_red->setAbsoluteUrl(toUrl);
+ ls_red->setRootUrl(linkstatus_->rootUrl());
+
+ if(!linkstatus_->onlyCheckHeader())
+ ls_red->setOnlyCheckHeader(false);
+
+ linkstatus_->setRedirection(ls_red);
+ ls_red->setParent(linkstatus_);
+ ls_red->setOriginalUrl(toUrl.url());
+
+ Q_ASSERT(search_manager_);
+
+ if(search_manager_->localDomain(ls_red->absoluteUrl()))
+ ls_red->setExternalDomainDepth(-1);
+ else
+ {
+ if(search_manager_->localDomain(linkstatus_->absoluteUrl()))
+ ls_red->setExternalDomainDepth(linkstatus_->externalDomainDepth() + 1);
+ else
+ ls_red->setExternalDomainDepth(linkstatus_->externalDomainDepth());
+ }
+
+ if(!toUrl.isValid() || search_manager_->existUrl(toUrl, linkstatus_->absoluteUrl()))
+ {
+ ls_red->setChecked(false);
+ return false;
+ }
+ else
+ {
+ ls_red->setChecked(true);
+ return true;
+ }
+}
+
+void LinkChecker::finnish()
+{
+ Q_ASSERT(!t_job_);
+
+ if(!finnished_)
+ {
+ kdDebug(23100) << "LinkChecker::finnish -> " << linkstatus_->absoluteUrl().url() << endl;
+
+ finnished_ = true;
+
+ if(redirection_)
+ Q_ASSERT(linkstatus_->checked());
+ else
+ linkstatus_->setChecked(true);
+
+ emit transactionFinished(linkstatus_, this);
+ }
+}
+
+HttpResponseHeader LinkChecker::getHttpHeader(KIO::Job* /*job*/, bool remember_check)
+{
+ //kdDebug(23100) << "LinkChecker::getHttpHeader -> " << linkstatus_->absoluteUrl().url() << endl;
+
+ Q_ASSERT(!finnished_);
+ Q_ASSERT(t_job_);
+
+ QString header_string = t_job_->queryMetaData("HTTP-Headers");
+ // Q_ASSERT(!header_string.isNull() && !header_string.isEmpty());
+// kdDebug(23100) << "HTTP header: " << endl << header_string << endl;
+// kdDebug(23100) << "Keys: " << HttpResponseHeader(header_string).keys() << endl;
+// kdDebug(23100) << "Content-type: " << HttpResponseHeader(header_string).contentType() << endl;
+// kdDebug(23100) << "Content-type: " << HttpResponseHeader(header_string).value("content-type") << endl;
+
+ if(header_string.isNull() || header_string.isEmpty())
+ {
+ header_checked_ = false;
+ kdWarning(23100) << "header_string.isNull() || header_string.isEmpty(): "
+ << linkstatus_->toString() << endl;
+ }
+ else if(remember_check)
+ header_checked_ = true;
+
+ return HttpResponseHeader(header_string);
+}
+
+void LinkChecker::checkRef()
+{
+ KURL url(linkStatus()->absoluteUrl());
+ Q_ASSERT(url.hasRef());
+
+ QString ref = url.ref();
+ if(ref == "" || ref == "top") {
+ linkstatus_->setStatusText("OK");
+ linkstatus_->setStatus(LinkStatus::SUCCESSFULL);
+ finnish();
+ return;
+ }
+
+ QString url_base;
+ LinkStatus const* ls_parent = 0;
+ int i_ref = -1;
+
+ if(linkStatus()->originalUrl().startsWith("#"))
+ ls_parent = linkStatus()->parent();
+
+ else
+ {
+ i_ref = url.url().find("#");
+ url_base = url.url().left(i_ref);
+ //kdDebug(23100) << "url_base: " << url_base << endl;
+
+ Q_ASSERT(search_manager_);
+
+ ls_parent = search_manager_->linkStatus(url_base);
+ }
+
+ if(ls_parent)
+ checkRef(ls_parent);
+ else
+ {
+ url = KURL::fromPathOrURL(url.url().left(i_ref));
+ checkRef(url);
+ }
+}
+
+void LinkChecker::checkRef(KURL const& url)
+{
+ Q_ASSERT(search_manager_);
+
+ QString url_string = url.url();
+ KHTMLPart* html_part = search_manager_->htmlPart(url_string);
+ if(!html_part)
+ {
+ kdDebug() << "new KHTMLPart: " + url_string << endl;
+
+ html_part = new KHTMLPart();
+ html_part->setOnlyLocalReferences(true);
+
+ QString tmpFile;
+ if(KIO::NetAccess::download(url, tmpFile, 0))
+ {
+ QString doc_html = FileManager::read(tmpFile);
+ html_part->begin();
+ html_part->write(doc_html);
+ html_part->end();
+
+ KIO::NetAccess::removeTempFile(tmpFile);
+ }
+ else
+ {
+ kdDebug(23100) << KIO::NetAccess::lastErrorString() << endl;
+ }
+
+ search_manager_->addHtmlPart(url_string, html_part);
+ }
+
+ if(hasAnchor(html_part, linkStatus()->absoluteUrl().ref()))
+ {
+ linkstatus_->setStatusText("OK");
+ linkstatus_->setStatus(LinkStatus::SUCCESSFULL);
+ }
+ else
+ {
+ linkstatus_->setErrorOccurred(true);
+ linkstatus_->setError(i18n( "Link destination not found." ));
+ linkstatus_->setStatus(LinkStatus::BROKEN);
+ }
+
+ finnish();
+}
+
+void LinkChecker::checkRef(LinkStatus const* linkstatus_parent)
+{
+ Q_ASSERT(search_manager_);
+
+ QString url_string = linkstatus_parent->absoluteUrl().url();
+ KHTMLPart* html_part = search_manager_->htmlPart(url_string);
+ if(!html_part)
+ {
+ kdDebug() << "new KHTMLPart: " + url_string << endl;
+
+ html_part = new KHTMLPart();
+ html_part->setOnlyLocalReferences(true);
+
+ html_part->begin();
+ html_part->write(linkstatus_parent->docHtml());
+ html_part->end();
+
+ search_manager_->addHtmlPart(url_string, html_part);
+ }
+
+ if(hasAnchor(html_part, linkStatus()->absoluteUrl().ref()))
+ {
+ linkstatus_->setStatusText("OK");
+ linkstatus_->setStatus(LinkStatus::SUCCESSFULL);
+ }
+ else
+ {
+ linkstatus_->setErrorOccurred(true);
+ linkstatus_->setError(i18n( "Link destination not found." ));
+ linkstatus_->setStatus(LinkStatus::BROKEN);
+ }
+
+ finnish();
+}
+
+bool LinkChecker::hasAnchor(KHTMLPart* html_part, QString const& anchor)
+{
+ DOM::HTMLDocument htmlDocument = html_part->htmlDocument();
+ DOM::HTMLCollection anchors = htmlDocument.anchors();
+
+ DOM::DOMString name_ref(anchor);
+ Q_ASSERT(!name_ref.isNull());
+
+ DOM::Node node = anchors.namedItem(name_ref);
+ if(node.isNull())
+ {
+ node = htmlDocument.getElementById(name_ref);
+ }
+
+ if(!node.isNull())
+ return true;
+ else
+ return false;
+}
+
+void LinkChecker::killJob()
+{
+ if(!t_job_)
+ return;
+
+ KIO::TransferJob* aux = t_job_;
+ t_job_ = 0;
+ aux->disconnect(this);
+ aux->kill(true); // quietly
+}
+
+LinkStatus::Status LinkChecker::getHttpStatus() const
+{
+ QString status_code = QString::number(linkstatus_->httpHeader().statusCode());
+
+ if(status_code[0] == '2')
+ return LinkStatus::SUCCESSFULL;
+ else if(status_code[0] == '3')
+ return LinkStatus::HTTP_REDIRECTION;
+ else if(status_code[0] == '4')
+ return LinkStatus::HTTP_CLIENT_ERROR;
+ else if(status_code[0] == '5')
+ return LinkStatus::HTTP_SERVER_ERROR;
+ else
+ return LinkStatus::UNDETERMINED;
+}
+
+#include "linkchecker.moc"
diff --git a/klinkstatus/src/engine/linkchecker.h b/klinkstatus/src/engine/linkchecker.h
new file mode 100644
index 00000000..a992e5fd
--- /dev/null
+++ b/klinkstatus/src/engine/linkchecker.h
@@ -0,0 +1,128 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 LINKCHECKER_H
+#define LINKCHECKER_H
+
+#include <qobject.h>
+#include <qthread.h>
+#include <qstring.h>
+
+#include <kio/jobclasses.h>
+class KHTMLPart;
+
+#include "../parser/http.h"
+#include "linkstatus.h"
+class SearchManager;
+
+#include <iostream>
+using namespace std;
+
+/**
+@author Paulo Moura Guedes
+*/
+class LinkChecker : public QObject
+{
+ Q_OBJECT
+public:
+ LinkChecker(LinkStatus* linkstatus, int time_out = 50,
+ QObject *parent = 0, const char *name = 0);
+ ~LinkChecker();
+
+ //virtual void run();
+ void check();
+ void setSearchManager(SearchManager* search_manager);
+
+ LinkStatus const* linkStatus() const;
+
+ static bool hasAnchor(KHTMLPart* html_part, QString const& anchor);
+
+signals:
+
+ void transactionFinished(const LinkStatus * linkstatus,
+ LinkChecker * checker);
+ void jobFinnished(LinkChecker * checker);
+
+protected slots:
+
+ void slotData(KIO::Job *, const QByteArray &data);
+ void slotRedirection (KIO::Job *, const KURL &url);
+ void slotMimetype(KIO::Job *, const QString &type);
+ void slotResult(KIO::Job* job);
+ void slotTimeOut();
+
+protected:
+
+ void finnish();
+ HttpResponseHeader getHttpHeader(KIO::Job* job, bool remember_check = true);
+ void checkRef(); // #...
+
+private:
+
+ LinkStatus::Status getHttpStatus() const;
+ void checkRef(LinkStatus const* linkstatus_parent);
+ void checkRef(KURL const& url);
+ void killJob();
+ /**
+ * @param url
+ * @return false if the redirection was already checked by the search manager
+ */
+ bool processRedirection(KURL const& url);
+
+ void findDocumentCharset(QString const& data);
+
+private:
+
+ SearchManager* search_manager_;
+ LinkStatus* const linkstatus_;
+ KIO::TransferJob* t_job_;
+ int time_out_;
+ LinkChecker* checker_;
+ QString document_charset_;
+/* A redirection has appened, with the current URL. Several redirections
+ can happen until the final URL is reached.*/
+ bool redirection_;
+ KURL redirection_url_;
+ QString doc_html_;
+ bool header_checked_;
+ bool finnished_;
+ bool parsing_;
+
+ /**
+ * Whether the charset of the document is already checked.
+ * (e.g. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>)
+ */
+ bool is_charset_checked_;
+ /**
+ * Wheter the page define the enconding (latin1, utf8, etc).
+ * According to the spec (http://www.w3.org/TR/html4/charset.html),
+ * it first check the server response and then the info in the html meta element.
+ */
+ bool has_defined_charset_;
+
+ static int count_; // debug attribute that counts how many links were checked
+};
+
+inline LinkStatus const* LinkChecker::linkStatus() const
+{
+ return linkstatus_;
+}
+
+
+#endif
diff --git a/klinkstatus/src/engine/linkfilter.cpp b/klinkstatus/src/engine/linkfilter.cpp
new file mode 100644
index 00000000..4d15f2e6
--- /dev/null
+++ b/klinkstatus/src/engine/linkfilter.cpp
@@ -0,0 +1,46 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "linkfilter.h"
+
+#include "linkstatus.h"
+
+
+LinkMatcher::LinkMatcher(QString const& text, ResultView::Status status)
+ : m_text(text), m_status(status)
+{
+}
+
+LinkMatcher::~LinkMatcher()
+{
+}
+
+bool LinkMatcher::matches(LinkStatus const& link ) const
+{
+/* kdDebug() << link.absoluteUrl().url() << endl;
+ kdDebug() << link.label() << endl;
+ kdDebug() << link.absoluteUrl().url().contains(m_text) << endl;
+ kdDebug() << link.label().contains(m_text) << endl;
+ */
+ return (link.absoluteUrl().url().contains(m_text, false) || link.label().contains(m_text, false)) &&
+ ResultView::displayableWithStatus(&link, m_status);
+}
+
+
+
diff --git a/klinkstatus/src/engine/linkfilter.h b/klinkstatus/src/engine/linkfilter.h
new file mode 100644
index 00000000..84da16cb
--- /dev/null
+++ b/klinkstatus/src/engine/linkfilter.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 LINKFILTER_H
+#define LINKFILTER_H
+
+#include "../ui/resultview.h"
+
+/**
+ @author Paulo Moura Guedes <moura@kdewebdev.org>
+*/
+class LinkMatcher
+{
+public:
+ LinkMatcher(QString const& text, ResultView::Status status);
+ ~LinkMatcher();
+
+ bool matches(LinkStatus const& link) const;
+
+ void setText(const QString& text) { m_text = text; }
+ QString text() const { return m_text; }
+
+ void setStatus(ResultView::Status status) { m_status = status; }
+ ResultView::Status status() const { return m_status; }
+
+ bool nullFilter() const { return m_text.isEmpty() && m_status == ResultView::none; }
+
+private:
+ QString m_text;
+ ResultView::Status m_status;
+};
+
+#endif
diff --git a/klinkstatus/src/engine/linkstatus.cpp b/klinkstatus/src/engine/linkstatus.cpp
new file mode 100644
index 00000000..c8b359ed
--- /dev/null
+++ b/klinkstatus/src/engine/linkstatus.cpp
@@ -0,0 +1,214 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "linkstatus.h"
+#include "../parser/node.h"
+#include "../ui/treeview.h"
+
+#include <klocale.h>
+#include <kcharsets.h>
+
+#include <qdom.h>
+
+
+LinkStatus::~LinkStatus()
+{
+ //kdDebug(23100) << "|";
+
+ for(uint i = 0; i != children_nodes_.size(); ++i)
+ {
+ if(children_nodes_[i])
+ {
+ delete children_nodes_[i];
+ children_nodes_[i] = 0;
+ }
+ }
+
+ children_nodes_.clear();
+
+ if(isRedirection())
+ {
+ if(redirection_)
+ {
+ delete redirection_;
+ redirection_ = 0;
+ }
+ }
+}
+
+void LinkStatus::reset()
+{
+ depth_ = -1;
+ external_domain_depth_ = -1;
+ is_root_ = false;
+ error_occurred_ = false;
+ is_redirection_ = false;
+ checked_ = false;
+ only_check_header_ = true;
+ malformed_ = false;
+ Q_ASSERT(!node_);
+ has_base_URI_ = false;
+ label_ = "";
+ absolute_url_ = "";
+ doc_html_ = "";
+ http_header_ = HttpResponseHeader();
+ error_ = "";
+
+ for(uint i = 0; i != children_nodes_.size(); ++i)
+ {
+ if(children_nodes_[i])
+ {
+ delete children_nodes_[i];
+ children_nodes_[i] = 0;
+ }
+ }
+
+ children_nodes_.clear();
+
+ if(isRedirection())
+ {
+ if(redirection_)
+ {
+ delete redirection_;
+ redirection_ = 0;
+ }
+ }
+ Q_ASSERT(!parent_);
+ base_URI_ = "";
+}
+
+QString const LinkStatus::toString() const
+{
+ QString aux;
+
+ if(!is_root_)
+ {
+ Q_ASSERT(parent_);
+ aux += i18n( "Parent: %1" ).arg( parent()->absoluteUrl().prettyURL() ) + "\n";
+ }
+ Q_ASSERT(!original_url_.isNull());
+
+ aux += i18n( "URL: %1" ).arg( absoluteUrl().prettyURL() ) + "\n";
+ aux += i18n( "Original URL: %1" ).arg( originalUrl() ) + "\n";
+ if(node())
+ aux += i18n( "Node: %1" ).arg( node()->content() ) + "\n";
+
+ return aux;
+}
+
+
+LinkStatus* LinkStatus::lastRedirection(LinkStatus* ls)
+{
+ if(ls->isRedirection())
+ if(ls->redirection())
+ return lastRedirection(ls->redirection());
+ else
+ return ls;
+ else
+ return ls;
+}
+
+void LinkStatus::loadNode()
+{
+ Q_ASSERT(node_);
+
+ setOriginalUrl(node_->url());
+ setLabel(node_->linkLabel());
+
+ if(malformed())
+ {
+ setErrorOccurred(true);
+ setError(i18n( "Malformed" ));
+ setStatus(LinkStatus::MALFORMED);
+ kdDebug(23100) << "Malformed:" << endl;
+ kdDebug(23100) << "Node: " << node()->content() << endl;
+ //kdDebug(23100) << toString() << endl; // probable segfault
+ }
+}
+
+bool LinkStatus::malformed() const // don't inline please (#include "node.h")
+{
+ return (malformed_ || node_->malformed());
+}
+
+void LinkStatus::setChildrenNodes(vector<Node*> const& nodes) // don't inline please (#include "node.h")
+{
+ children_nodes_.reserve(nodes.size());
+ children_nodes_ = nodes;
+}
+
+void LinkStatus::setMalformed(bool flag)
+{
+ malformed_ = flag;
+ if(flag)
+ {
+ setErrorOccurred(true);
+ setError(i18n( "Malformed" ));
+ setStatus(LinkStatus::MALFORMED);
+ kdDebug(23100) << "Malformed!" << endl;
+ kdDebug(23100) << node()->content() << endl;
+ //kdDebug(23100) << toString() << endl; // probable segfault
+ }
+ else if(error() == i18n( "Malformed" ))
+ {
+ setErrorOccurred(false);
+ setError("");
+ setStatus(LinkStatus::UNDETERMINED);
+ }
+}
+
+void LinkStatus::save(QDomElement& element) const
+{
+ QDomElement child_element = element.ownerDocument().createElement("link");
+
+ // <url>
+ QDomElement tmp_1 = element.ownerDocument().createElement("url");
+ tmp_1.appendChild(element.ownerDocument().createTextNode(absoluteUrl().prettyURL()));
+ child_element.appendChild(tmp_1);
+
+ // <status>
+ tmp_1 = element.ownerDocument().createElement("status");
+ tmp_1.setAttribute("broken",
+ ResultView::displayableWithStatus(this, ResultView::bad) ?
+ "true" : "false");
+ tmp_1.appendChild(element.ownerDocument().createTextNode(statusText()));
+ child_element.appendChild(tmp_1);
+
+ // <label>
+ tmp_1 = element.ownerDocument().createElement("label");
+ tmp_1.appendChild(element.ownerDocument().createTextNode(KCharsets::resolveEntities(label())));
+ child_element.appendChild(tmp_1);
+
+ // <referers>
+ tmp_1 = element.ownerDocument().createElement("referrers");
+
+ for(QValueVector<KURL>::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it)
+ {
+ QDomElement tmp_2 = element.ownerDocument().createElement("url");
+ tmp_2.appendChild(element.ownerDocument().createTextNode(it->prettyURL()));
+
+ tmp_1.appendChild(tmp_2);
+ }
+ Q_ASSERT(!referrers_.isEmpty());
+ child_element.appendChild(tmp_1);
+
+ element.appendChild(child_element);
+}
+
diff --git a/klinkstatus/src/engine/linkstatus.h b/klinkstatus/src/engine/linkstatus.h
new file mode 100644
index 00000000..e7567460
--- /dev/null
+++ b/klinkstatus/src/engine/linkstatus.h
@@ -0,0 +1,187 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 LINKSTATUS_H
+#define LINKSTATUS_H
+
+#include "../parser/http.h"
+#include "../utils/mvector.h"
+
+#include <kurl.h>
+#include <klocale.h>
+#include <kdebug.h>
+class TreeView;
+class TreeViewItem;
+
+#include <qstring.h>
+#include <qobject.h>
+#include <qvaluevector.h>
+class QDomElement;
+
+#include <vector>
+#include <iostream>
+
+using namespace std;
+
+
+class Node;
+
+class LinkStatus
+{
+public:
+
+ enum Status {
+ UNDETERMINED,
+ SUCCESSFULL,
+ BROKEN,
+ HTTP_REDIRECTION,
+ HTTP_CLIENT_ERROR,
+ HTTP_SERVER_ERROR,
+ TIMEOUT,
+ NOT_SUPPORTED,
+ MALFORMED
+ };
+
+ LinkStatus();
+ LinkStatus(KURL const& absolute_url);
+ LinkStatus(Node* node, LinkStatus* parent);
+ ~LinkStatus();
+
+ void save(QDomElement& element) const;
+
+ void reset();
+ void setRootUrl(KURL const& url);
+ void setStatus(Status status);
+ void setDepth(uint depth);
+ void setParent(LinkStatus* parent);
+ void setOriginalUrl(QString const& url_original);
+ void setLabel(QString const& label);
+ void setAbsoluteUrl(KURL const& url_absoluto);
+ void setDocHtml(QString const& doc_html);
+ void setHttpHeader(HttpResponseHeader const& cabecalho_http);
+ void setStatusText(QString const& statusText); // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ void setError(QString const& error);
+ void setIsRoot(bool flag);
+ void setErrorOccurred(bool houve_error);
+ void setIsRedirection(bool e_redirection);
+ void setRedirection(LinkStatus* redirection);
+ void setNode(Node* node);
+ void setChildrenNodes(vector<Node*> const& nodes);
+ void addChildNode(Node* node);
+ void reserveMemoryForChildrenNodes(int n);
+ void setChecked(bool flag);
+ void setExternalDomainDepth(int p);
+ void setOnlyCheckHeader(bool flag);
+ void setMalformed(bool flag = true);
+ void setHasBaseURI(bool flag = true);
+ void setHasHtmlDocTitle(bool flag = true);
+ void setBaseURI(KURL const& base_url);
+ void setHtmlDocTitle(QString const& title);
+ void setIgnored(bool flag = true);
+ void setMimeType(QString const& mimetype);
+ void setIsErrorPage(bool flag);
+ void setIsLocalRestrict(bool flag);
+ void setTreeViewItem(TreeViewItem* tree_view_item);
+ void addReferrer(KURL const& url);
+
+ KURL const& rootUrl() const;
+ Status const& status() const;
+ uint depth() const;
+ bool local() const; // linkstatus.paradigma.co.pt == paradigma.co.pt
+ bool isLocalRestrict() const; // linkstatus.paradigma.co.pt != paradigma.co.pt
+ LinkStatus const* parent() const;
+ QString const& originalUrl() const;
+ QString const& label() const;
+ KURL const& absoluteUrl() const;
+ QString const& docHtml() const;
+ HttpResponseHeader const& httpHeader() const;
+ HttpResponseHeader& httpHeader();
+ QString statusText() const; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ QString const& error() const;
+ bool isRoot() const;
+ bool errorOccurred() const;
+ bool isRedirection() const;
+ LinkStatus* redirection() const;
+ Node* node() const;
+ vector<Node*> const& childrenNodes() const;
+ QString const toString() const;
+ bool checked() const;
+ int externalDomainDepth() const;
+ bool onlyCheckHeader() const;
+ bool malformed() const;
+ bool hasBaseURI() const;
+ bool hasHtmlDocTitle() const;
+ KURL const& baseURI() const;
+ QString const& htmlDocTitle() const;
+ bool ignored() const;
+ bool redirectionExists(KURL const& url) const; // to avoid cyclic links
+ QString mimeType() const;
+ bool isErrorPage() const;
+ TreeViewItem* treeViewItem() const;
+ QValueVector<KURL> const& referrers() const;
+
+ static LinkStatus* lastRedirection(LinkStatus* ls);
+
+private:
+
+ /**
+ Load some atributes in function of his parent node.
+ */
+ void loadNode();
+
+private:
+
+ KURL root_url_; // The URL which made the search start
+ Status status_;
+ int depth_;
+ int external_domain_depth_; // Para se poder escolher explorar domains diferentes ate n depth
+ QString original_url_;
+ QString label_;
+ KURL absolute_url_;
+ QString doc_html_;
+ HttpResponseHeader http_header_;
+ QString status_text_; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ QString error_;
+ bool is_root_;
+ bool error_occurred_;
+ bool is_redirection_;
+ vector<Node*> children_nodes_;
+ LinkStatus* parent_;
+ LinkStatus* redirection_;
+ bool checked_;
+ bool only_check_header_;
+ bool malformed_;
+ Node* node_;
+ bool has_base_URI_;
+ bool has_html_doc_title_;
+ KURL base_URI_;
+ QString html_doc_title_;
+ bool ignored_;
+ QString mimetype_;
+ bool is_error_page_;
+ bool is_local_restrict_;
+ TreeViewItem* tree_view_item_;
+ QValueVector<KURL> referrers_;
+};
+
+#include "../parser/url.h"
+#include "linkstatus_impl.h"
+
+#endif
diff --git a/klinkstatus/src/engine/linkstatus_impl.h b/klinkstatus/src/engine/linkstatus_impl.h
new file mode 100644
index 00000000..3359664c
--- /dev/null
+++ b/klinkstatus/src/engine/linkstatus_impl.h
@@ -0,0 +1,417 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+inline LinkStatus::LinkStatus()
+ : status_(LinkStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false),
+ error_occurred_(false), is_redirection_(false), parent_(0), redirection_(0), checked_(false),
+ only_check_header_(true), malformed_(false),
+ node_(0), has_base_URI_(false), has_html_doc_title_(false), ignored_(false),
+ mimetype_(""), is_error_page_(false), tree_view_item_(0)
+{}
+
+inline LinkStatus::LinkStatus(KURL const& absolute_url)
+ : status_(LinkStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false),
+ error_occurred_(false), is_redirection_(false), parent_(0), redirection_(0), checked_(false),
+ only_check_header_(true), malformed_(false),
+ node_(0), has_base_URI_(false), has_html_doc_title_(false), ignored_(false),
+ mimetype_(""), is_error_page_(false), tree_view_item_(0)
+{
+ setAbsoluteUrl(absolute_url);
+}
+
+inline LinkStatus::LinkStatus(Node* node, LinkStatus* parent)
+ : status_(LinkStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false),
+ error_occurred_(false), is_redirection_(false), parent_(0), redirection_(0), checked_(false),
+ only_check_header_(true), malformed_(false),
+ node_(node), has_base_URI_(false), has_html_doc_title_(false), ignored_(false),
+ mimetype_(""), is_error_page_(false), tree_view_item_(0)
+{
+ loadNode();
+
+ setDepth(parent->depth() + 1);
+ setParent(parent);
+ setRootUrl(parent->rootUrl());
+}
+
+inline void LinkStatus::setRootUrl(KURL const& url)
+{
+ root_url_ = url;
+}
+
+inline void LinkStatus::setStatus(Status status)
+{
+ status_ = status;
+}
+
+inline void LinkStatus::setDepth(uint depth)
+{
+ depth_ = depth;
+}
+
+inline void LinkStatus::setParent(LinkStatus* parent)
+{
+ Q_ASSERT(parent);
+
+ parent_ = parent;
+ addReferrer(parent->absoluteUrl());
+}
+
+inline void LinkStatus::setAbsoluteUrl(KURL const& url_absoluto)
+{
+ absolute_url_ = url_absoluto;
+}
+
+inline void LinkStatus::setOriginalUrl(QString const& url_original)
+{
+ original_url_ = url_original;
+}
+
+inline void LinkStatus::setLabel(QString const& label)
+{
+ label_ = label;
+}
+
+inline void LinkStatus::setDocHtml(QString const& doc_html)
+{
+ Q_ASSERT(!doc_html.isEmpty());
+ doc_html_ = doc_html;
+}
+
+inline void LinkStatus::setHttpHeader(HttpResponseHeader const& cabecalho_http)
+{
+ http_header_ = cabecalho_http;
+}
+
+inline void LinkStatus::setStatusText(QString const& status)
+{
+ Q_ASSERT(!status.isEmpty());
+ status_text_ = status;
+}
+
+inline void LinkStatus::setError(QString const& error)
+{
+ Q_ASSERT(!error.isEmpty());
+ error_ = error;
+}
+
+inline void LinkStatus::setErrorOccurred(bool houve_error)
+{
+ error_occurred_ = houve_error;
+}
+
+inline void LinkStatus::setIsRoot(bool flag)
+{
+ is_root_ = flag;
+ label_ = i18n("ROOT");
+}
+
+inline void LinkStatus::setRedirection(LinkStatus* redirection)
+{
+ Q_ASSERT(redirection != NULL);
+ Q_ASSERT(isRedirection());
+ redirection_ = redirection;
+}
+
+inline void LinkStatus::setIsRedirection(bool e_redirection)
+{
+ is_redirection_ = e_redirection;
+}
+
+inline void LinkStatus::addChildNode(Node* node)
+{
+ children_nodes_.push_back(node);
+}
+
+inline void LinkStatus::reserveMemoryForChildrenNodes(int n)
+{
+ Q_ASSERT(n > 0);
+ children_nodes_.reserve(n);
+}
+
+inline void LinkStatus::setChecked(bool flag)
+{
+ checked_ = flag;
+}
+
+inline void LinkStatus::setExternalDomainDepth(int p)
+{
+ Q_ASSERT(p >= -1);
+ external_domain_depth_ = p;
+}
+
+inline void LinkStatus::setOnlyCheckHeader(bool flag)
+{
+ only_check_header_= flag;
+}
+
+inline void LinkStatus::setHasBaseURI(bool flag)
+{
+ has_base_URI_ = flag;
+}
+
+inline void LinkStatus::setHasHtmlDocTitle(bool flag)
+{
+ has_html_doc_title_ = flag;
+}
+
+inline void LinkStatus::setBaseURI(KURL const& base_url)
+{
+ if(!base_url.isValid())
+ {
+ kdWarning(23100) << "base url not valid: " << endl
+ << "parent: " << parent()->absoluteUrl().prettyURL() << endl
+ << "url: " << absoluteUrl().prettyURL() << endl
+ << "base url resolved: " << base_url.prettyURL() << endl;
+ }
+
+ Q_ASSERT(base_url.isValid());
+ has_base_URI_ = true;
+ base_URI_ = base_url;
+}
+
+inline void LinkStatus::setHtmlDocTitle(QString const& title)
+{
+ if(title.isNull() || title.isEmpty())
+ {
+ kdError(23100) << "HTML doc title is null or empty!" << endl
+ << toString() << endl;
+ }
+ Q_ASSERT(!title.isNull() && !title.isEmpty());
+
+ has_html_doc_title_ = true;
+ html_doc_title_ = title;
+}
+
+inline void LinkStatus::setIgnored(bool flag)
+{
+ ignored_ = flag;
+}
+
+inline void LinkStatus::setMimeType(QString const& mimetype)
+{
+ Q_ASSERT(!mimetype.isNull() && !mimetype.isEmpty());
+ mimetype_ = mimetype;
+}
+
+inline void LinkStatus::setIsErrorPage(bool flag)
+{
+ is_error_page_ = flag;
+}
+
+inline void LinkStatus::setIsLocalRestrict(bool flag)
+{
+ is_local_restrict_ = flag;
+}
+
+inline void LinkStatus::setTreeViewItem(TreeViewItem* tree_view_item)
+{
+ Q_ASSERT(tree_view_item);
+ tree_view_item_ = tree_view_item;
+}
+
+inline void LinkStatus::addReferrer(KURL const& url)
+{
+ Q_ASSERT(url.isValid());
+
+ referrers_.push_back(url);
+}
+
+
+
+
+inline KURL const& LinkStatus::rootUrl() const
+{
+ return root_url_;
+}
+
+inline LinkStatus::Status const& LinkStatus::status() const
+{
+ return status_;
+}
+
+inline uint LinkStatus::depth() const
+{
+ return depth_;
+}
+
+inline bool LinkStatus::local() const
+{
+ return external_domain_depth_ == -1;
+}
+
+inline bool LinkStatus::isLocalRestrict() const
+{
+ return is_local_restrict_;
+}
+
+inline LinkStatus const* LinkStatus::parent() const
+{
+ return parent_;
+}
+
+inline QString const& LinkStatus::originalUrl() const
+{
+ return original_url_;
+}
+
+inline QString const& LinkStatus::label() const
+{
+ return label_;
+}
+
+inline KURL const& LinkStatus::absoluteUrl() const
+{
+ return absolute_url_;
+}
+
+inline QString const& LinkStatus::docHtml() const
+{
+ return doc_html_;
+}
+
+inline HttpResponseHeader const& LinkStatus::httpHeader() const
+{
+ return http_header_;
+}
+
+inline HttpResponseHeader& LinkStatus::httpHeader()
+{
+ return http_header_;
+}
+
+inline QString LinkStatus::statusText() const
+{
+ if(errorOccurred())
+ return error();
+ else if(!absoluteUrl().protocol().startsWith("http"))
+ return status_text_;
+ else
+ {
+ QString string_code = QString::number(httpHeader().statusCode());
+ if(absoluteUrl().hasRef()) // ref URL
+ return status_text_;
+ else if(string_code == "200"/* or string_code == "304"*/)
+ return "OK";
+ else
+ return string_code;
+ }
+}
+
+inline QString const& LinkStatus::error() const
+{
+ return error_;
+}
+
+inline bool LinkStatus::isRoot() const
+{
+ return is_root_;
+}
+
+inline bool LinkStatus::errorOccurred() const
+{
+ return error_occurred_;
+}
+
+inline bool LinkStatus::isRedirection() const
+{
+ return is_redirection_;
+}
+
+inline LinkStatus* LinkStatus::redirection() const
+{
+ Q_ASSERT(isRedirection());
+
+ return redirection_;
+}
+
+inline Node* LinkStatus::node() const
+{
+ //Q_ASSERT(node_);
+ return node_;
+}
+
+inline vector<Node*> const& LinkStatus::childrenNodes() const
+{
+ return children_nodes_;
+}
+
+inline bool LinkStatus::checked() const
+{
+ return checked_;
+}
+
+inline int LinkStatus::externalDomainDepth() const
+{
+ return external_domain_depth_;
+}
+
+inline bool LinkStatus::onlyCheckHeader() const
+{
+ return only_check_header_;
+}
+
+inline bool LinkStatus::hasBaseURI() const
+{
+ return has_base_URI_;
+}
+
+inline bool LinkStatus::hasHtmlDocTitle() const
+{
+ return has_html_doc_title_;
+}
+
+inline KURL const& LinkStatus::baseURI() const
+{
+ Q_ASSERT(hasBaseURI());
+ return base_URI_;
+}
+
+inline QString const& LinkStatus::htmlDocTitle() const
+{
+ Q_ASSERT(has_html_doc_title_);
+ return html_doc_title_;
+}
+
+inline bool LinkStatus::ignored() const
+{
+ return ignored_;
+}
+
+inline QString LinkStatus::mimeType() const
+{
+ Q_ASSERT(!mimetype_.isNull());
+ return mimetype_;
+}
+
+inline bool LinkStatus::isErrorPage() const
+{
+ return is_error_page_;
+}
+
+inline TreeViewItem* LinkStatus::treeViewItem() const
+{
+ return tree_view_item_;
+}
+
+inline QValueVector<KURL> const& LinkStatus::referrers() const
+{
+ return referrers_;
+}
+
diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp
new file mode 100644
index 00000000..81562a7a
--- /dev/null
+++ b/klinkstatus/src/engine/searchmanager.cpp
@@ -0,0 +1,916 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 <kapplication.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <khtml_part.h>
+#include <kprotocolmanager.h>
+
+#include <qstring.h>
+#include <qvaluevector.h>
+#include <qdom.h>
+
+#include <iostream>
+#include <unistd.h>
+
+#include "searchmanager.h"
+#include "../parser/mstring.h"
+#include "../cfg/klsconfig.h"
+
+
+SearchManager::SearchManager(int max_simultaneous_connections, int time_out,
+ QObject *parent, const char *name)
+ : QObject(parent, name),
+ max_simultaneous_connections_(max_simultaneous_connections), has_document_root_(false),
+ depth_(-1), current_depth_(0), external_domain_depth_(0),
+ current_node_(0), current_index_(0), links_being_checked_(0),
+ finished_connections_(max_simultaneous_connections_),
+ maximum_current_connections_(-1), general_domain_(false),
+ checked_general_domain_(false), time_out_(time_out), current_connections_(0),
+ send_identification_(true), canceled_(false), searching_(false), checked_links_(0), ignored_links_(0),
+ check_parent_dirs_(true), check_external_links_(true), check_regular_expressions_(false),
+ number_of_level_links_(0), number_of_links_to_check_(0)
+{
+ root_.setIsRoot(true);
+
+ if (KLSConfig::userAgent().isEmpty()) {
+ KLSConfig::setUserAgent(KProtocolManager::defaultUserAgent());
+ }
+ user_agent_ = KLSConfig::userAgent();
+}
+
+void SearchManager::reset()
+{
+ kdDebug(23100) << "SearchManager::reset()" << endl;
+
+ //Q_ASSERT(not links_being_checked_);
+
+ root_.reset();
+ cleanItems();
+ depth_ = -1;
+ current_depth_ = 0;
+ current_node_ = 0;
+ current_index_ = 0;
+ finished_connections_ = max_simultaneous_connections_;
+ domain_ = "";
+ maximum_current_connections_ = -1;
+ general_domain_ = false;
+ checked_general_domain_ = false;
+ check_regular_expressions_ = false;
+ current_connections_ = 0;
+ canceled_ = false;
+ searching_ = false;
+ checked_links_ = 0;
+ if(KLSConfig::userAgent().isEmpty()) {
+ KLSConfig::setUserAgent(KProtocolManager::defaultUserAgent());
+ }
+ user_agent_ = KLSConfig::userAgent();
+
+ removeHtmlParts();
+}
+
+SearchManager::~SearchManager()
+{
+ reset();
+}
+
+void SearchManager::cleanItems()
+{
+ for(uint i = 0; i != search_results_.size(); ++i)
+ {
+ for(uint j = 0; j != search_results_[i].size() ; ++j)
+ {
+ for(uint l = 0; l != (search_results_[i])[j].size(); ++l)
+ {
+ if(((search_results_[i])[j])[l] != 0)
+ {
+ delete ((search_results_[i])[j])[l];
+ ((search_results_[i])[j])[l] = 0;
+ }
+ else
+ kdDebug(23100) << "LinkStatus NULL!!" << endl;
+ }
+ search_results_[i][j].clear();
+ }
+ search_results_[i].clear();
+ }
+ search_results_.clear();
+ kdDebug(23100) << endl;
+}
+
+void SearchManager::startSearch(KURL const& root, SearchMode const& modo)
+{
+ canceled_ = false;
+
+ //time_.restart();
+ time_.start();
+
+ Q_ASSERT(root.isValid());
+ //Q_ASSERT(root.protocol() == "http" || root.protocol() == "https");
+
+ if(root.hasHost() && (domain_.isNull() || domain_.isEmpty()))
+ {
+ setDomain(root.host() + root.directory());
+ kdDebug(23100) << "Domain: " << domain_ << endl;
+ }
+ root_.setIsRoot(true);
+ root_.setDepth(0);
+ root_.setOriginalUrl(root.prettyURL());
+ root_.setAbsoluteUrl(root);
+ root_.setOnlyCheckHeader(false);
+ root_.setRootUrl(root);
+
+ search_mode_ = modo;
+ if(modo == depth)
+ Q_ASSERT(depth_ != -1);
+ else if(modo == domain)
+ Q_ASSERT(depth_ == -1);
+ else
+ Q_ASSERT(depth_ != -1);
+
+ searching_ = true;
+
+ //Q_ASSERT(domain_ != QString::null);
+ checkRoot();
+}
+
+void SearchManager::resume()
+{
+ searching_ = true;
+ canceled_ = false;
+ continueSearch();
+}
+
+void SearchManager::finnish()
+{
+ searching_ = false;
+ while(links_being_checked_)
+ {
+ kdDebug(23100) << "links_being_checked_: " << links_being_checked_ << endl;
+ sleep(1);
+ }
+ emit signalSearchFinished();
+}
+
+void SearchManager::pause()
+{
+ searching_ = false;
+ while(links_being_checked_)
+ {
+ kdDebug(23100) << "links_being_checked_: " << links_being_checked_ << endl;
+ sleep(1);
+ }
+ emit signalSearchPaused();
+}
+
+void SearchManager::cancelSearch()
+{
+ canceled_ = true;
+}
+
+void SearchManager::checkRoot()
+{
+ LinkChecker* checker = new LinkChecker(&root_, time_out_, this, "link_checker");
+ checker->setSearchManager(this);
+
+ connect(checker, SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)),
+ this, SLOT(slotRootChecked(const LinkStatus *, LinkChecker *)));
+ /*
+ connect(checker, SIGNAL(jobFinnished(LinkChecker *)),
+ this, SLOT(slotLinkCheckerFinnished(LinkChecker *)));
+ */
+ checker->check();
+}
+
+void SearchManager::slotRootChecked(const LinkStatus * link, LinkChecker * checker)
+{
+ kdDebug(23100) << "SearchManager::slotRootChecked:" << endl;
+ kdDebug(23100) << link->absoluteUrl().url() << " -> " <<
+ LinkStatus::lastRedirection(&root_)->absoluteUrl().url() << endl;
+
+ Q_ASSERT(checked_links_ == 0);
+ Q_ASSERT(search_results_.size() == 0);
+
+ ++checked_links_;
+ //kdDebug(23100) << "++checked_links_: SearchManager::slotRootChecked" << endl;
+ emit signalRootChecked(link, checker);
+
+ if(search_mode_ != depth || depth_ > 0)
+ {
+ current_depth_ = 1;
+
+ vector<LinkStatus*> no = children(LinkStatus::lastRedirection(&root_));
+
+ emit signalLinksToCheckTotalSteps(no.size());
+
+ vector< vector<LinkStatus*> > nivel;
+ nivel.push_back(no);
+
+ search_results_.push_back(nivel);
+
+ if(search_results_.size() != 1)
+ {
+ kdDebug(23100) << "search_results_.size() != 1:" << endl;
+ kdDebug(23100) << "size: " << search_results_.size() << endl;
+ }
+ Q_ASSERT(search_results_.size() == 1);
+
+ if(no.size() > 0)
+ {
+ startSearch();
+ }
+ else
+ {
+ kdDebug(23100) << "SearchManager::slotRootChecked#1" << endl;
+ finnish();
+ }
+ }
+
+ else
+ {
+ Q_ASSERT(search_results_.size() == 0);
+ kdDebug(23100) << "SearchManager::slotRootChecked#2" << endl;
+ finnish();
+ }
+
+ delete checker;
+ checker = 0;
+}
+
+vector<LinkStatus*> SearchManager::children(LinkStatus* link)
+{
+ vector<LinkStatus*> children;
+
+ if(!link || link->absoluteUrl().hasRef())
+ return children;
+
+ vector<Node*> const& nodes = link->childrenNodes();
+
+ int count = 0;
+ for(uint i = 0; i != nodes.size(); ++i)
+ {
+ ++count;
+
+ Node* node = nodes[i];
+ KURL url;
+ if(node->url().isEmpty())
+ url = "";
+ else
+ url = Url::normalizeUrl(node->url(), *link, documentRoot().path());
+
+ if( (node->isLink() &&
+ checkable(url, *link) &&
+ !Url::existUrl(url, children) &&
+ !node->url().isEmpty())
+ ||
+ node->malformed() )
+ {
+ LinkStatus* ls = new LinkStatus(node, link);
+ ls->setAbsoluteUrl(url);
+
+ if(localDomain(ls->absoluteUrl()))
+ ls->setExternalDomainDepth(-1);
+ else
+ ls->setExternalDomainDepth(link->externalDomainDepth() + 1);
+
+ //ls->setIsLocalRestrict(localDomain(url));
+ ls->setIsLocalRestrict(ls->local()); // @todo clean this nonsense
+
+ if(!validUrl(url)) {
+ ls->setMalformed(true);
+ ls->setErrorOccurred(true);
+ }
+
+ ls->setOnlyCheckHeader(onlyCheckHeader(ls));
+
+ if(link->externalDomainDepth() > external_domain_depth_)
+ {
+ kdDebug(23100) << "link->externalDomainDepth() > external_domain_depth_: "
+ << link->externalDomainDepth() << endl;
+ kdDebug(23100) << "link: " << endl << link->toString() << endl;
+ kdDebug(23100) << "child: " << endl << ls->toString() << endl;
+ }
+ Q_ASSERT(link->externalDomainDepth() <= external_domain_depth_);
+
+ children.push_back(ls);
+ }
+ if(count == 50)
+ {
+ kapp->processEvents();
+ count = 0;
+ }
+ }
+
+ return children;
+}
+
+bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const
+{
+ if(url.prettyURL().isEmpty() || root_.originalUrl() == url.prettyURL())
+ return true;
+
+ for(uint i = 0; i != search_results_.size(); ++i)
+ for(uint j = 0; j != search_results_[i].size(); ++j)
+ for(uint l = 0; l != (search_results_[i])[j].size(); ++l)
+ {
+ LinkStatus* tmp = search_results_[i][j][l];
+ Q_ASSERT(tmp);
+ if(tmp->absoluteUrl() == url)
+ { // URL exists
+ QValueVector<KURL> referrers(tmp->referrers());
+
+ // Add new referrer
+ for(uint i = 0; i != referrers.size(); ++i)
+ {
+ if(referrers[i] == url_parent)
+ return true;
+ }
+ tmp->addReferrer(url_parent);
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+LinkStatus const* SearchManager::linkStatus(QString const& s_url) const
+{
+ Q_ASSERT(!s_url.isEmpty());
+
+ if(root_.absoluteUrl().url() == s_url)
+ return &root_;
+
+ int count = 0;
+ for(uint i = 0; i != search_results_.size(); ++i)
+ for(uint j = 0; j != search_results_[i].size(); ++j)
+ for(uint l = 0; l != (search_results_[i])[j].size(); ++l)
+ {
+ ++count;
+
+ LinkStatus* ls = search_results_[i][j][l];
+ Q_ASSERT(ls);
+ if(ls->absoluteUrl().url() == s_url && ls->checked())
+ return ls;
+
+ if(count == 50)
+ {
+ count = 0;
+ kapp->processEvents();
+ }
+
+ }
+
+ return 0;
+}
+
+
+void SearchManager::startSearch()
+{
+ Q_ASSERT(current_depth_ == 1);
+ Q_ASSERT(search_results_[current_depth_ - 1].size() == 1);
+ Q_ASSERT(current_node_ == 0);
+
+ if( (int)current_depth_ <= depth_ || search_mode_ != depth )
+ checkVectorLinks(nodeToAnalize());
+ else
+ {
+ kdDebug(23100) << "Search Finished! (SearchManager::comecaPesquisa)" << endl;
+ finnish();
+ }
+}
+
+void SearchManager::continueSearch()
+{
+ Q_ASSERT(!links_being_checked_);
+
+ vector<LinkStatus*> const& no = nodeToAnalize();
+
+ if((uint)current_index_ < no.size())
+ checkVectorLinks(no);
+
+ else
+ {
+ current_index_ = 0;
+ kdDebug(23100) << "Next node_____________________\n\n";
+ ++current_node_;
+ if( (uint)current_node_ < (search_results_[current_depth_ - 1]).size() )
+ checkVectorLinks(nodeToAnalize());
+ else
+ {
+ kdDebug(23100) << "Next Level_____________________________________________________________________________________\n\n\n";
+ if(search_mode_ == SearchManager::domain ||
+ current_depth_ < depth_)
+ {
+ current_node_ = 0;
+ ++current_depth_;
+
+ addLevel();
+
+ if( (uint)current_depth_ == search_results_.size() )
+ checkVectorLinks(nodeToAnalize());
+ else
+ {
+ kdDebug(23100) << "Search Finished! (SearchManager::continueSearch#1)" << endl;
+ finnish();
+ }
+ }
+ else
+ {
+ kdDebug(23100) << "Search Finished! (SearchManager::continueSearch#2)" << endl;
+ finnish();
+ }
+ }
+ }
+}
+
+vector<LinkStatus*> const& SearchManager::nodeToAnalize() const
+{
+ Q_ASSERT( (uint)current_depth_ == search_results_.size() );
+ Q_ASSERT( (uint)current_node_ < (search_results_[current_depth_ - 1]).size() );
+
+ return (search_results_[current_depth_ - 1])[current_node_];
+}
+
+void SearchManager::checkVectorLinks(vector<LinkStatus*> const& links)
+{
+ checkLinksSimultaneously(chooseLinks(links));
+}
+
+vector<LinkStatus*> SearchManager::chooseLinks(vector<LinkStatus*> const& links)
+{
+ vector<LinkStatus*> escolha;
+ for(int i = 0; i != max_simultaneous_connections_; ++i)
+ {
+ if((uint)current_index_ < links.size())
+ escolha.push_back(links[current_index_++]);
+ }
+ return escolha;
+}
+
+void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links)
+{
+ Q_ASSERT(finished_connections_ <= max_simultaneous_connections_);
+ finished_connections_ = 0;
+ links_being_checked_ = 0;
+ maximum_current_connections_ = -1;
+
+ if(links.size() < (uint)max_simultaneous_connections_)
+ maximum_current_connections_ = links.size();
+ else
+ maximum_current_connections_ = max_simultaneous_connections_;
+
+ for(uint i = 0; i != links.size(); ++i)
+ {
+ LinkStatus* ls(links[i]);
+ Q_ASSERT(ls);
+
+ QString protocol = ls->absoluteUrl().protocol();
+
+ ++links_being_checked_;
+ Q_ASSERT(links_being_checked_ <= max_simultaneous_connections_);
+
+ if(ls->malformed())
+ {
+ Q_ASSERT(ls->errorOccurred());
+ Q_ASSERT(ls->status() == LinkStatus::MALFORMED);
+
+ ls->setChecked(true);
+ slotLinkChecked(ls, 0);
+ }
+
+ else if(ls->absoluteUrl().prettyURL().contains("javascript:", false))
+ {
+ ++ignored_links_;
+ ls->setIgnored(true);
+ ls->setErrorOccurred(true);
+ ls->setError(i18n( "Javascript not supported" ));
+ ls->setStatus(LinkStatus::NOT_SUPPORTED);
+ ls->setChecked(true);
+ slotLinkChecked(ls, 0);
+ }
+ /*
+ else if(!(protocol == "http" || protocol == "https"))
+ {
+ ++ignored_links_;
+ ls->setIgnored(true);
+ ls->setErrorOccurred(true);
+ ls->setError(i18n("Protocol %1 not supported").arg(protocol));
+ ls->setStatus(LinkStatus::MALFORMED);
+ ls->setChecked(true);
+ slotLinkChecked(ls, 0);
+ }
+ */
+ else
+ {
+ LinkChecker* checker = new LinkChecker(ls, time_out_, this, "link_checker");
+ checker->setSearchManager(this);
+
+ connect(checker, SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)),
+ this, SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *)));
+ /*
+ connect(checker, SIGNAL(jobFinnished(LinkChecker *)),
+ this, SLOT(slotLinkCheckerFinnished(LinkChecker *)));
+ */
+ checker->check();
+ }
+ }
+}
+
+void SearchManager::slotLinkChecked(const LinkStatus * link, LinkChecker * checker)
+{
+ kdDebug(23100) << "SearchManager::slotLinkChecked:" << endl;
+// kdDebug(23100) << link->absoluteUrl().url() << " -> " <<
+// LinkStatus::lastRedirection((const_cast<LinkStatus*> (link)))->absoluteUrl().url() << endl;
+
+ Q_ASSERT(link);
+ emit signalLinkChecked(link, checker);
+ ++checked_links_;
+ ++finished_connections_;
+ --links_being_checked_;
+
+ if(links_being_checked_ < 0)
+ kdDebug(23100) << link->toString() << endl;
+ Q_ASSERT(links_being_checked_ >= 0);
+
+ if(canceled_ && searching_ && !links_being_checked_)
+ {
+ pause();
+ }
+
+ else if(!canceled_ && finished_connections_ == maximumCurrentConnections() )
+ {
+ continueSearch();
+ return;
+ }
+ /*
+ delete checker;
+ checker = 0;
+ */
+}
+
+void SearchManager::addLevel()
+{
+ search_results_.push_back(vector< vector <LinkStatus*> >());
+ vector< vector <LinkStatus*> >& ultimo_nivel(search_results_[search_results_.size() - 2]);
+
+ number_of_level_links_ = 0;
+ number_of_links_to_check_ = 0;
+ uint end = ultimo_nivel.size();
+
+ for(uint i = 0; i != end; ++i) // nodes
+ {
+ uint end_sub1 = ultimo_nivel[i].size();
+ for(uint j = 0; j != end_sub1; ++j) // links
+ ++number_of_level_links_;
+ }
+
+ if(number_of_level_links_)
+ emit signalAddingLevelTotalSteps(number_of_level_links_);
+
+ for(uint i = 0; i != end; ++i) // nodes
+ {
+ uint end_sub1 = ultimo_nivel[i].size();
+ for(uint j = 0; j != end_sub1; ++j) // links
+ {
+ vector <LinkStatus*> f(children( LinkStatus::lastRedirection(((ultimo_nivel[i])[j])) ));
+ if(f.size() != 0)
+ {
+ search_results_[search_results_.size() - 1].push_back(f);
+ number_of_links_to_check_ += f.size();
+ }
+
+ emit signalAddingLevelProgress();
+// kapp->processEvents();
+ }
+ }
+ if( (search_results_[search_results_.size() - 1]).size() == 0 )
+ search_results_.pop_back();
+ else
+ emit signalLinksToCheckTotalSteps(number_of_links_to_check_);
+}
+
+bool SearchManager::checkable(KURL const& url, LinkStatus const& link_parent) const
+{
+ if(existUrl(url, link_parent.absoluteUrl()))
+ return false;
+
+ if(!checkableByDomain(url, link_parent))
+ return false;
+
+ if(!check_parent_dirs_)
+ {
+ if(Url::parentDir(root_.absoluteUrl(), url))
+ return false;
+ }
+ if(!check_external_links_)
+ {
+ if(Url::externalLink(root_.absoluteUrl(), url))
+ return false;
+ }
+ if(check_regular_expressions_)
+ {
+ Q_ASSERT(!reg_exp_.isEmpty());
+
+ if(reg_exp_.search(url.url()) != -1)
+ return false;
+ }
+
+ //kdDebug(23100) << "url " << url.url() << " is checkable!" << endl;
+ return true;
+}
+
+bool SearchManager::checkableByDomain(KURL const& url, LinkStatus const& link_parent) const
+{
+ bool result = false;
+ if(localDomain(url))
+ result = true;
+ else if( (link_parent.externalDomainDepth() + 1) < external_domain_depth_ )
+ result = true;
+ else
+ result = false;
+ /*
+ if(!result)
+ kdDebug(23100) << "\n\nURL " << url.url() << " is not checkable by domain\n\n" << endl;
+ */
+ return result;
+}
+/*
+bool SearchManager::localDomain(KURL const& url) const
+ {
+ KURL url_root = root_.absoluteUrl();
+
+ if(url_root.protocol() != url.protocol())
+ return false;
+
+ if(url_root.hasHost())
+ {
+ if(generalDomain())
+ {
+ return equalHost(domain_, url.host());
+ }
+ else
+ {
+ vector<QString> referencia = tokenizeWordsSeparatedBy(domain_, QChar('/'));
+ vector<QString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/'));
+
+ if(a_comparar.size() < referencia.size())
+ return false;
+ else
+ {
+ for(uint i = 0; i != referencia.size(); ++i)
+ {
+ if(i == 0)
+ { // host, deal with specific function
+ if(!equalHost(referencia[i], a_comparar[i], !check_parent_dirs_))
+ return false;
+ }
+ else if(referencia[i] != a_comparar[i])
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ else if(checkParentDirs())
+ return true;
+ else
+ return url_root.isParentOf(url);
+ }
+*/
+
+/**
+ The same as SearchManager::localDomain(), but only for http or https.
+ http://linkstatus.paradigma.co.pt != http://paradigma.co.pt
+*/
+/*
+bool SearchManager::isLocalRestrict(KURL const& url) const
+ {
+ Q_ASSERT(url.protocol() == "http" || url.protocol() == "https");
+
+ KURL url_root = root_.absoluteUrl();
+
+ if(url_root.protocol() != url.protocol())
+ return false;
+
+ if(url_root.hasHost())
+ {
+ vector<QString> referencia = tokenizeWordsSeparatedBy(domain_, QChar('/'));
+ vector<QString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/'));
+
+ if(a_comparar.size() < referencia.size())
+ return false;
+ else
+ {
+ for(uint i = 0; i != referencia.size(); ++i)
+ {
+ if(i == 0)
+ { // host, deal with specific function
+ if(!equalHost(referencia[i], a_comparar[i], true))
+ return false;
+ }
+ else if(referencia[i] != a_comparar[i])
+ return false;
+ }
+ }
+ return true;
+ }
+ else
+ return false;
+ }
+*/
+bool SearchManager::generalDomain() const
+{
+ if(checked_general_domain_)
+ return general_domain_;
+
+ else
+ {
+ Q_ASSERT(!domain_.isEmpty());
+
+ if(!check_parent_dirs_)
+ return false;
+
+ int barra = domain_.find('/');
+ if(barra != -1 && (uint)barra != domain_.length() - 1)
+ {
+ kdDebug(23100) << "Domain nao vago" << endl;
+ return false;
+ }
+ else
+ {
+ vector<QString> palavras = tokenizeWordsSeparatedByDots(domain_);
+ Q_ASSERT(palavras.size() >= 1); // host might be localhost
+
+ QString primeira_palavra = palavras[0];
+ if(primeira_palavra == "www")
+ {
+ Q_ASSERT(palavras.size() >= 3);
+ kdDebug(23100) << "Domain vago" << endl;
+ return true;
+ }
+ else if(palavras.size() == 2)
+ {
+ kdDebug(23100) << "Domain vago" << endl;
+ return true;
+ }
+ else
+ {
+ kdDebug(23100) << "Domain nao vago" << endl;
+ return false;
+ }
+ }
+ }
+}
+
+bool SearchManager::onlyCheckHeader(LinkStatus* ls) const
+{
+ if(search_mode_ == depth)
+ return current_depth_ == depth_;
+
+ else if(search_mode_ == domain)
+ return !ls->local() &&
+ ls->externalDomainDepth() == external_domain_depth_ - 1;
+
+ else
+ return
+ current_depth_ == depth_ ||
+ (!ls->local() &&
+ ls->externalDomainDepth() == external_domain_depth_ - 1);
+}
+
+void SearchManager::slotSearchFinished()
+{}
+
+void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker)
+{
+ kdDebug(23100) << "deleting linkchecker" << endl;
+
+ Q_ASSERT(checker);
+ //Q_ASSERT(checker->linkStatus()->checked());
+
+ delete checker;
+ checker = 0;
+}
+
+KHTMLPart* SearchManager::htmlPart(QString const& key_url) const
+{
+ if(!html_parts_.contains(key_url))
+ return 0;
+
+ return html_parts_[key_url];
+}
+
+void SearchManager::addHtmlPart(QString const& key_url, KHTMLPart* html_part)
+{
+ Q_ASSERT(!key_url.isEmpty());
+ Q_ASSERT(html_part);
+
+ // FIXME configurable
+ if(html_parts_.count() > 150)
+ removeHtmlParts();
+
+ html_parts_.insert(key_url, html_part);
+}
+
+void SearchManager::removeHtmlParts()
+{
+ KHTMLPartMap::Iterator it;
+ for(it = html_parts_.begin(); it != html_parts_.end(); ++it)
+ {
+ delete it.data();
+ it.data() = 0;
+ }
+
+ html_parts_.clear();
+}
+
+void SearchManager::save(QDomElement& element) const
+{
+ // <url>
+ QDomElement child_element = element.ownerDocument().createElement("url");
+ child_element.appendChild(element.ownerDocument().createTextNode(root_.absoluteUrl().prettyURL()));
+ element.appendChild(child_element);
+
+ // <recursively>
+ bool recursively = searchMode() == domain || depth_ > 0;
+ child_element = element.ownerDocument().createElement("recursively");
+ child_element.appendChild(element.ownerDocument().createTextNode(recursively ? "true" : "false"));
+ element.appendChild(child_element);
+
+ // <depth>
+ child_element = element.ownerDocument().createElement("depth");
+ child_element.appendChild(element.ownerDocument().
+ createTextNode(searchMode() == domain ? QString("Unlimited") : QString::number(depth_)));
+ element.appendChild(child_element);
+
+ // <check_parent_folders>
+ child_element = element.ownerDocument().createElement("check_parent_folders");
+ child_element.appendChild(element.ownerDocument().
+ createTextNode(checkParentDirs() ? "true" : "false"));
+ element.appendChild(child_element);
+
+ // <check_external_links>
+ child_element = element.ownerDocument().createElement("check_external_links");
+ child_element.appendChild(element.ownerDocument().
+ createTextNode(checkExternalLinks() ? "true" : "false"));
+ element.appendChild(child_element);
+
+ // <check_regular_expression>
+ child_element = element.ownerDocument().createElement("check_regular_expression");
+ child_element.setAttribute("check", checkRegularExpressions() ? "true" : "false");
+ if(checkRegularExpressions())
+ child_element.appendChild(element.ownerDocument().
+ createTextNode(reg_exp_.pattern()));
+ element.appendChild(child_element);
+
+ child_element = element.ownerDocument().createElement("link_list");
+ element.appendChild(child_element);
+
+ for(uint i = 0; i != search_results_.size(); ++i)
+ {
+ for(uint j = 0; j != search_results_[i].size() ; ++j)
+ {
+ for(uint l = 0; l != (search_results_[i])[j].size(); ++l)
+ {
+ LinkStatus* ls = ((search_results_[i])[j])[l];
+ if(ls->checked())
+ ls->save(child_element);
+ }
+ }
+ }
+}
+
+QString SearchManager::toXML() const
+{
+ QDomDocument doc;
+ doc.appendChild(doc.createProcessingInstruction( "xml",
+ "version=\"1.0\" encoding=\"UTF-8\""));
+
+ QDomElement root = doc.createElement("klinkstatus");
+ doc.appendChild(root);
+
+ save(root);
+
+ return doc.toString(4);
+}
+
+#include "searchmanager.moc"
diff --git a/klinkstatus/src/engine/searchmanager.h b/klinkstatus/src/engine/searchmanager.h
new file mode 100644
index 00000000..135d267a
--- /dev/null
+++ b/klinkstatus/src/engine/searchmanager.h
@@ -0,0 +1,193 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 GESTOR_PESQUISA_H
+#define GESTOR_PESQUISA_H
+
+#include <kurl.h>
+
+#include <qobject.h>
+#include <qstring.h>
+#include <qdatetime.h>
+#include <qregexp.h>
+#include <qmap.h>
+class QDomElement;
+
+#include <vector>
+
+#include "linkstatus.h"
+#include "linkchecker.h"
+#include "../parser/node.h"
+#include "../parser/url.h"
+
+using namespace std;
+
+typedef QMap<QString, KHTMLPart*> KHTMLPartMap;
+
+class SearchManager: public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum SearchMode {
+ depth,
+ domain,
+ depth_and_domain
+ };
+
+ SearchManager(int max_simultaneous_connections = 3, int time_out = 50,
+ QObject *parent = 0, const char *name = 0);
+ ~SearchManager();
+
+ QString toXML() const;
+ void save(QDomElement& element) const;
+
+ KHTMLPartMap const& htmlParts() const { return html_parts_; }
+
+ KHTMLPart* htmlPart(QString const& key_url) const;
+ void addHtmlPart(QString const& key_url, KHTMLPart* html_part);
+ void removeHtmlParts();
+
+ void startSearch(KURL const& root);
+ void startSearch(KURL const& root, SearchMode const& modo);
+ void resume();
+ void cancelSearch();
+
+ bool hasDocumentRoot() const;
+ KURL const& documentRoot() const;
+ void setDocumentRoot(KURL const& url);
+
+ void setSearchMode(SearchMode modo);
+ void setDepth(int depth);
+ void setExternalDomainDepth(int depth);
+ void setDomain(QString const& domain);
+ void setCheckParentDirs(bool flag);
+ void setCheckExternalLinks(bool flag);
+ void setCheckRegularExpressions(bool flag);
+ void setRegularExpression(QString const& reg_exp, bool case_sensitive);
+ void setTimeOut(int time_out);
+
+ void cleanItems();
+ void reset();
+
+ bool searching() const;
+ bool localDomain(KURL const& url, bool restrict = true) const;
+ //bool isLocalRestrict(KURL const& url) const;
+ SearchMode const& searchMode() const;
+ bool checkRegularExpressions() const { return check_regular_expressions_; }
+ bool existUrl(KURL const& url, KURL const& url_parent) const;
+ LinkStatus const* linkStatus(QString const& s_url) const;
+ int checkedLinks() const;
+ QTime timeElapsed() const;
+ bool checkParentDirs() const;
+ bool checkExternalLinks() const;
+ LinkStatus const* linkStatusRoot() const;
+ int maxSimultaneousConnections() const;
+ int timeOut() const;
+
+ bool sendIdentification() const { return send_identification_; }
+ QString const& userAgent() const { return user_agent_; }
+
+private:
+
+ void checkRoot();
+ void checkVectorLinks(vector<LinkStatus*> const& links); // corresponde a um no de um nivel de depth
+ vector<LinkStatus*> children(LinkStatus* link);
+ void startSearch();
+ void continueSearch();
+ void finnish();
+ void pause();
+ vector<LinkStatus*> const& nodeToAnalize() const;
+ vector<LinkStatus*> chooseLinks(vector<LinkStatus*> const& links);
+ void checkLinksSimultaneously(vector<LinkStatus*> const& links);
+ void addLevel();
+ bool checkableByDomain(KURL const& url, LinkStatus const& link_parent) const;
+ bool checkable(KURL const& url, LinkStatus const& link_parent) const;
+ int maximumCurrentConnections() const;
+ bool onlyCheckHeader(LinkStatus* ls) const;
+
+ /*
+ Entende-se por domain vago um domain do tipo www.google.pt ou google.pt, pelo que,
+ por exemplo, imagens.google.pt, e considerado estar no mesmo domain.
+ pwp.netcabo.pt ou www.google.pt/imagens nao sao considerados domains vagos.
+ */
+ bool generalDomain() const;
+ bool generalDomainChecked() const; // Para garantir que o procedimento generalDomain() so e chamado uma vez
+
+private slots:
+
+ void slotRootChecked(const LinkStatus * link, LinkChecker * checker);
+ void slotLinkChecked(const LinkStatus * link, LinkChecker * checker);
+ void slotSearchFinished();
+ void slotLinkCheckerFinnished(LinkChecker * checker);
+
+signals:
+
+ void signalRootChecked(const LinkStatus * link, LinkChecker * checker);
+ void signalLinkChecked(const LinkStatus * link, LinkChecker * checker);
+ void signalSearchFinished();
+ void signalSearchPaused();
+ void signalAddingLevelTotalSteps(uint number_of_links);
+ void signalAddingLevelProgress();
+ void signalLinksToCheckTotalSteps(uint links_to_check);
+ //void signalLinksToCheckProgress();
+
+private:
+
+ int max_simultaneous_connections_;
+ SearchMode search_mode_;
+ LinkStatus root_;
+ bool has_document_root_;
+ KURL document_root_url_; // in case of non http protocols the document root must be explicitly given
+ int depth_;
+ int current_depth_;
+ int external_domain_depth_;
+ int current_node_;
+ int current_index_;
+ int links_being_checked_;
+ int finished_connections_;
+ int maximum_current_connections_;
+ QRegExp reg_exp_;
+ QString domain_;
+ bool general_domain_;
+ bool checked_general_domain_;
+ int time_out_;
+ int current_connections_;
+ bool send_identification_; // user-agent
+ QString user_agent_;
+
+ bool canceled_;
+ bool searching_;
+ int checked_links_;
+ QTime time_;
+ int ignored_links_;
+ bool check_parent_dirs_;
+ bool check_external_links_;
+ bool check_regular_expressions_;
+ uint number_of_level_links_;
+ uint number_of_links_to_check_;
+ vector< vector< vector <LinkStatus*> > > search_results_;
+ KHTMLPartMap html_parts_;
+};
+
+#include "searchmanager_impl.h"
+
+#endif
diff --git a/klinkstatus/src/engine/searchmanager_impl.h b/klinkstatus/src/engine/searchmanager_impl.h
new file mode 100644
index 00000000..eaa5e572
--- /dev/null
+++ b/klinkstatus/src/engine/searchmanager_impl.h
@@ -0,0 +1,158 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+
+
+
+inline int SearchManager::maximumCurrentConnections() const
+{
+ Q_ASSERT(maximum_current_connections_ != -1);
+ return maximum_current_connections_;
+}
+
+inline SearchManager::SearchMode const& SearchManager::searchMode() const
+{
+ return search_mode_;
+}
+
+inline int SearchManager::checkedLinks() const
+{
+ Q_ASSERT(checked_links_ > 0);
+ return checked_links_;
+}
+
+inline QTime SearchManager::timeElapsed() const
+{
+ int ms = time_.elapsed();
+ //kdDebug(23100) << "Time elapsed (ms): " << ms << endl;
+ return QTime(0, 0).addMSecs(ms);
+}
+
+inline void SearchManager::startSearch(KURL const& root)
+{
+ startSearch(root, search_mode_);
+}
+
+inline void SearchManager::setSearchMode(SearchMode modo)
+{
+ search_mode_ = modo;
+}
+
+inline void SearchManager::setDepth(int depth)
+{
+ depth_ = depth;
+}
+
+inline void SearchManager::setExternalDomainDepth(int depth)
+{
+ external_domain_depth_ = depth;
+}
+
+inline void SearchManager::setDomain(QString const& domain)
+{
+ Q_ASSERT(domain.find("http://") == -1);
+ domain_ = domain;
+ general_domain_ = generalDomain();
+ checked_general_domain_ = true;
+}
+
+inline void SearchManager::setCheckParentDirs(bool flag)
+{
+ check_parent_dirs_ = flag;
+}
+
+inline void SearchManager::setCheckExternalLinks(bool flag)
+{
+ check_external_links_ = flag;
+}
+
+inline void SearchManager::setCheckRegularExpressions(bool flag)
+{
+ check_regular_expressions_ = flag;
+}
+
+inline void SearchManager::setRegularExpression(QString const& reg_exp, bool case_sensitive)
+{
+ reg_exp_ = QRegExp(reg_exp, case_sensitive);
+}
+
+inline void SearchManager::setTimeOut(int time_out)
+{
+ Q_ASSERT(time_out > 0);
+ time_out_ = time_out;
+}
+
+
+
+inline bool SearchManager::checkParentDirs() const
+{
+ return check_parent_dirs_;
+}
+
+inline bool SearchManager::checkExternalLinks() const
+{
+ return check_external_links_;
+}
+
+inline LinkStatus const* SearchManager::linkStatusRoot() const
+{
+ return &root_;
+}
+
+inline bool SearchManager::searching() const
+{
+ return searching_;
+}
+
+inline bool SearchManager::localDomain(KURL const& url, bool restrict) const
+{
+ return Url::localDomain(root_.absoluteUrl(), url, restrict);
+}
+
+inline int SearchManager::maxSimultaneousConnections() const
+{
+ return max_simultaneous_connections_;
+}
+
+inline int SearchManager::timeOut() const
+{
+ return time_out_;
+}
+
+inline bool SearchManager::hasDocumentRoot() const
+{
+ return has_document_root_;
+}
+
+inline KURL const& SearchManager::documentRoot() const
+{
+ return document_root_url_;
+}
+
+inline void SearchManager::setDocumentRoot(KURL const& url)
+{
+ Q_ASSERT(url.isValid()); // includes empty URLs
+ Q_ASSERT(!url.protocol().startsWith("http"));
+
+ document_root_url_ = url;
+ has_document_root_ = true;
+}
+
+
diff --git a/klinkstatus/src/global.cpp b/klinkstatus/src/global.cpp
new file mode 100644
index 00000000..10395f7b
--- /dev/null
+++ b/klinkstatus/src/global.cpp
@@ -0,0 +1,205 @@
+//
+// C++ Implementation: global
+//
+// Description:
+//
+//
+// Author: Paulo Moura Guedes <moura@kdewebdev.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "global.h"
+
+#include <qstring.h>
+#include <qtimer.h>
+
+#include <dcopclient.h>
+#include <dcopref.h>
+#include <kdebug.h>
+#include <kapplication.h>
+#include <kstaticdeleter.h>
+#include <kurl.h>
+#include <kprocess.h>
+
+#include <sys/types.h>
+#include <unistd.h>
+
+
+Global* Global::m_self_ = 0;
+static KStaticDeleter<Global> staticDeleter;
+
+
+Global* Global::self()
+{
+ if (!m_self_)
+ {
+ staticDeleter.setObject(m_self_, new Global());
+ }
+
+ return m_self_;
+}
+
+Global::Global(QObject *parent, const char *name)
+ : QObject(parent, name), loop_started_(false)
+{
+ m_self_ = this;
+ dcop_client_ = kapp->dcopClient();
+}
+
+Global::~Global()
+{
+ if(m_self_ == this)
+ staticDeleter.setObject(m_self_, 0, false);
+}
+
+bool Global::isKLinkStatusEmbeddedInQuanta()
+{
+ QCString app_id = "quanta-" + QCString().setNum(getpid());
+ return self()->dcop_client_->isApplicationRegistered(app_id);
+}
+
+bool Global::isQuantaRunningAsUnique()
+{
+ return self()->dcop_client_->isApplicationRegistered("quanta");
+}
+
+bool Global::isQuantaAvailableViaDCOP()
+{
+ if(isQuantaRunningAsUnique() || isKLinkStatusEmbeddedInQuanta())
+ return true;
+
+ else
+ {
+ self()->execCommand("ps h -o pid -C quanta -C quanta_be");
+ QStringList ps_list = QStringList::split("\n", self()->script_output_);
+
+ for(uint i = 0; i != ps_list.size(); ++i)
+ {
+ ps_list[i] = ps_list[i].stripWhiteSpace ();
+ if(self()->dcop_client_->isApplicationRegistered("quanta-" + ps_list[i].local8Bit()))
+ {
+ //kdDebug(23100) << "Application registered!" << endl;
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+QCString Global::quantaDCOPAppId()
+{
+ DCOPClient* client = kapp->dcopClient();
+ QCString app_id;
+
+ if(client->isApplicationRegistered("quanta")) // quanta is unnique application
+ app_id = "quanta";
+
+ else if(self()->isKLinkStatusEmbeddedInQuanta()) // klinkstatus is running as a part inside quanta
+ {
+ QCString app = "quanta-";
+ QCString pid = QCString().setNum(getpid());
+ app_id = app + pid;
+ }
+
+ else
+ {
+ self()->execCommand("ps h -o pid -C quanta -C quanta_be");
+ QStringList ps_list = QStringList::split("\n", self()->script_output_);
+
+ for(uint i = 0; i != ps_list.size(); ++i)
+ {
+ ps_list[i] = ps_list[i].stripWhiteSpace ();
+ if(self()->dcop_client_->isApplicationRegistered("quanta-" + ps_list[i].local8Bit()))
+ app_id = "quanta-" + ps_list[i];
+ }
+ }
+
+ if(self()->dcop_client_->isApplicationRegistered(app_id))
+ return app_id;
+ else
+ {
+ kdError(23100) << "You didn't check if Global::isQuantaAvailableViaDCOP!" << endl;
+ return "";
+ }
+}
+
+KURL Global::urlWithQuantaPreviewPrefix(KURL const& url)
+{
+ Q_ASSERT(isKLinkStatusEmbeddedInQuanta());
+
+ DCOPRef quanta(Global::quantaDCOPAppId(),"WindowManagerIf");
+ QString string_url_with_prefix = quanta.call("urlWithPreviewPrefix", url.url());
+ //kdDebug(23100) << "string_url_with_prefix: " << string_url_with_prefix << endl;
+
+ return KURL(string_url_with_prefix);
+}
+
+void Global::openQuanta(QStringList const& args)
+{
+ QString command(args.join(" "));
+ Global::execCommand("quanta " + command);
+}
+
+void Global::execCommand(QString const& command)
+{
+
+ //We create a KProcess that executes the "ps" *nix command to get the PIDs of the
+ //other instances of quanta actually running
+ self()->process_PS_ = new KProcess();
+ *(self()->process_PS_) << QStringList::split(" ",command);
+
+ connect( self()->process_PS_, SIGNAL(receivedStdout(KProcess*,char*,int)),
+ self(), SLOT(slotGetScriptOutput(KProcess*,char*,int)));
+ connect( self()->process_PS_, SIGNAL(receivedStderr(KProcess*,char*,int)),
+ self(), SLOT(slotGetScriptError(KProcess*,char*,int)));
+ connect( self()->process_PS_, SIGNAL(processExited(KProcess*)),
+ self(), SLOT(slotProcessExited(KProcess*)));
+
+ //if KProcess fails I think a message box is needed... I will fix it
+ if (!self()->process_PS_->start(KProcess::NotifyOnExit,KProcess::All))
+ kdError() << "Failed to query for running KLinkStatus instances!" << endl;
+ //TODO: Replace the above error with a real messagebox after the message freeze is over
+ else
+ {
+ //To avoid lock-ups, start a timer.
+ QTimer* timer = new QTimer(self());
+ connect(timer, SIGNAL(timeout()),
+ self(), SLOT(slotProcessTimeout()));
+ timer->start(120*1000, true);
+ self()->loop_started_ = true;
+ kapp->enter_loop();
+ delete timer;
+ }
+}
+
+void Global::slotGetScriptOutput(KProcess* /*process*/, char* buf, int buflen)
+{
+ QCString tmp( buf, buflen + 1 );
+ script_output_ = QString::null;
+ script_output_ = QString::fromLocal8Bit(tmp).remove(" ");
+}
+
+void Global::slotGetScriptError(KProcess*, char* buf, int buflen)
+{
+ //TODO: Implement some error handling?
+ Q_UNUSED(buf);
+ Q_UNUSED(buflen);
+}
+
+void Global::slotProcessExited(KProcess*)
+{
+ slotProcessTimeout();
+}
+
+void Global::slotProcessTimeout()
+{
+ if (loop_started_)
+ {
+ kapp->exit_loop();
+ loop_started_ = false;
+ }
+}
+
+
+#include "global.moc"
diff --git a/klinkstatus/src/global.h b/klinkstatus/src/global.h
new file mode 100644
index 00000000..2ee2f0c0
--- /dev/null
+++ b/klinkstatus/src/global.h
@@ -0,0 +1,60 @@
+//
+// C++ Interface: global
+//
+// Description:
+//
+//
+// Author: Paulo Moura Guedes <moura@kdewebdev.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <qobject.h>
+class QCString;
+
+class DCOPClient;
+class KURL;
+class KProcess;
+
+/**
+@author Paulo Moura Guedes
+*/
+class Global : public QObject
+{
+ Q_OBJECT
+public:
+ static Global* self();
+ ~Global();
+
+ static bool isKLinkStatusEmbeddedInQuanta();
+ static bool isQuantaRunningAsUnique();
+ static bool isQuantaAvailableViaDCOP();
+ static QCString quantaDCOPAppId();
+ static KURL urlWithQuantaPreviewPrefix(KURL const& url);
+
+ //static void setLoopStarted(bool flag);
+ static void openQuanta(QStringList const& args);
+
+private:
+ Global(QObject *parent = 0, const char *name = 0);
+ static void execCommand(QString const& command);
+
+private slots:
+ void slotGetScriptOutput(KProcess* process, char* buffer, int buflen);
+ void slotGetScriptError(KProcess* process, char* buffer, int buflen);
+ void slotProcessExited(KProcess* process);
+ void slotProcessTimeout();
+
+private:
+ static Global* m_self_;
+
+ DCOPClient* dcop_client_;
+ bool loop_started_;
+ QString script_output_;
+ KProcess* process_PS_;
+};
+
+#endif
diff --git a/klinkstatus/src/klinkstatus.cpp b/klinkstatus/src/klinkstatus.cpp
new file mode 100644
index 00000000..7d984f0f
--- /dev/null
+++ b/klinkstatus/src/klinkstatus.cpp
@@ -0,0 +1,213 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "klinkstatus.h"
+
+#include <kkeydialog.h>
+#include <kfiledialog.h>
+#include <kconfig.h>
+#include <kurl.h>
+#include <kedittoolbar.h>
+#include <kaction.h>
+#include <kstdaction.h>
+#include <klibloader.h>
+#include <kmessagebox.h>
+#include <kstatusbar.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kaccel.h>
+
+
+KLinkStatus::KLinkStatus()
+ : KParts::MainWindow( 0L, "KLinkStatus" )
+{
+ // set the shell's ui resource file
+ setXMLFile("klinkstatus_shell.rc");
+
+ setupActions();
+
+ // and a status bar
+ //statusBar()->show();
+
+ // this routine will find and load our Part. it finds the Part by
+ // name which is a bad idea usually.. but it's alright in this
+ // case since our Part is made for this Shell
+ KLibFactory *factory = KLibLoader::self()->factory("libklinkstatuspart");
+ if (factory)
+ {
+ // now that the Part is loaded, we cast it to a Part to get
+ // our hands on it
+ m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(this,
+ "klinkstatus_part", "KParts::ReadOnlyPart" ));
+
+ if (m_part)
+ {
+ // tell the KParts::MainWindow that this is indeed the main widget
+ setCentralWidget(m_part->widget());
+ setStandardToolBarMenuEnabled(true);
+
+ // and integrate the part's GUI with the shell's
+ createGUI(m_part);
+ removeDuplicatedActions();
+ }
+ }
+ else
+ {
+ // if we couldn't find our Part, we exit since the Shell by
+ // itself can't do anything useful
+ KMessageBox::error(this, i18n("Could not find the KLinkStatus part; did you configure with '--prefix=/$KDEDIR' and perform 'make install'?"));
+ kapp->quit();
+ // we return here, cause kapp->quit() only means "exit the
+ // next time we enter the event loop...
+ return;
+ }
+
+ // apply the saved mainwindow settings, if any, and ask the mainwindow
+ // to automatically save settings if changed: window size, toolbar
+ // position, icon size, etc.
+ setAutoSaveSettings();
+
+ setupPartActions();
+}
+
+KLinkStatus::~KLinkStatus()
+{}
+
+void KLinkStatus::load(const KURL& url)
+{
+ m_part->openURL( url );
+}
+
+void KLinkStatus::setupActions()
+{
+ // KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ // The above causes a segfault when using File->Quit.
+ // Here's Waldo's explanation:
+/* I had a look. The problem is due to the SessionWidget destructor calling
+ KLSConfig. If you use the window button, the window and the SessionWidget is
+ destructed first and then later the application is destructed.
+ If you use File->Quit it calls kapp->quit which destructs the application
+ without destructing the window first. The application first destructs all
+ static deleters and its administration, and then goes on to kill the
+ remaining windows that it owns. Therein lies the problem because by then the
+ static deleters aren't usable any longer, and calling KLSConfig from the
+ SessionWidget destructor crashes when it tries to recreate KLSConfig and
+ register it with staticKLSConfigDeleter due to the lack of static deleter
+ administration.
+ The easiest solution is to call close() on the mainwindow instead of
+ KApplication::quit()*/
+ KStdAction::quit(this, SLOT(close()), actionCollection());
+
+ //m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
+ //m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
+
+ KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+}
+
+void KLinkStatus::setupPartActions()
+{
+ Q_ASSERT(m_part);
+ KActionCollection* part_action_collection = m_part->actionCollection();
+ part_action_collection->action("new_link_check")->setShortcut(KStdAccel::shortcut(KStdAccel::New));
+ part_action_collection->action("open_link")->setShortcut(KStdAccel::shortcut(KStdAccel::Open));
+ part_action_collection->action("close_tab")->setShortcut(KStdAccel::shortcut(KStdAccel::Close));
+}
+
+void KLinkStatus::removeDuplicatedActions()
+{
+ KActionCollection* part_action_collection = m_part->actionCollection();
+ KAction* part_about_action = part_action_collection->action("about_klinkstatus");
+ KAction* part_report_action = part_action_collection->action("report_bug");
+
+ QWidget* container = part_about_action->container(0); // call this only once or segfault
+ part_about_action->unplug(container);
+ part_report_action->unplug(container);
+ part_action_collection->remove(part_about_action);
+ part_action_collection->remove(part_report_action);
+}
+
+void KLinkStatus::saveProperties(KConfig* /*config*/)
+{
+ // the 'config' object points to the session managed
+ // config file. anything you write here will be available
+ // later when this app is restored
+}
+
+void KLinkStatus::readProperties(KConfig* /*config*/)
+{
+ // the 'config' object points to the session managed
+ // config file. this function is automatically called whenever
+ // the app is being restored. read in here whatever you wrote
+ // in 'saveProperties'
+}
+
+void KLinkStatus::optionsShowToolbar()
+{
+ // this is all very cut and paste code for showing/hiding the
+ // toolbar
+ if (m_toolbarAction->isChecked())
+ toolBar()->show();
+ else
+ toolBar()->hide();
+}
+
+void KLinkStatus::optionsShowStatusbar()
+{
+ // this is all very cut and paste code for showing/hiding the
+ // statusbar
+ if (m_statusbarAction->isChecked())
+ statusBar()->show();
+ else
+ statusBar()->hide();
+}
+
+void KLinkStatus::optionsConfigureKeys()
+{
+ //KKeyDialog::configure(actionCollection());
+
+ KKeyDialog dlg( false, this );
+ QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( QPtrListIterator<KXMLGUIClient> it( clients );
+ it.current(); ++it )
+ {
+ dlg.insert( (*it)->actionCollection() );
+ }
+ dlg.configure();
+}
+
+void KLinkStatus::optionsConfigureToolbars()
+{
+ saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+
+ // use the standard toolbar editor
+ KEditToolbar dlg(factory());
+ connect(&dlg, SIGNAL(newToolbarConfig()),
+ this, SLOT(applyNewToolbarConfig()));
+ dlg.exec();
+}
+
+void KLinkStatus::applyNewToolbarConfig()
+{
+ applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+}
+
+
+#include "klinkstatus.moc"
diff --git a/klinkstatus/src/klinkstatus.desktop b/klinkstatus/src/klinkstatus.desktop
new file mode 100644
index 00000000..bb1cdbd0
--- /dev/null
+++ b/klinkstatus/src/klinkstatus.desktop
@@ -0,0 +1,54 @@
+[Desktop Entry]
+Name=KLinkStatus
+Name[ne]=केडीई लिङà¥à¤• सà¥à¤¥à¤¿à¤¤à¤¿
+Name[sk]=KLink status
+Name[sv]=Klinkstatus
+Name[ta]=Kதொகà¯à®¤à®¿ நிலைமை
+Name[tr]=K Köprü Durumu
+Exec=klinkstatus %i %m -caption "%c"
+Icon=klinkstatus
+Type=Application
+DocPath=klinkstatus/index.html
+Terminal=false
+GenericName=Link Checker
+GenericName[bg]=Проверка на препратки
+GenericName[ca]=Comprovador d'enllaços
+GenericName[cs]=Kontrola odkazů
+GenericName[da]=Link-tjekker
+GenericName[de]=Überprüfungswerkzeug für Verknüpfungen
+GenericName[el]=Ελεγκτής σÏνδεσης
+GenericName[es]=Comprobador de enlaces
+GenericName[et]=Viidakontrollija
+GenericName[eu]=Esteka egiaztatzailea
+GenericName[fa]=بررسی‌کنندۀ پیوند
+GenericName[fi]=Linkkien tarkistaja
+GenericName[fr]=Vérificateur de liens
+GenericName[gl]=Verificador de ligazóns
+GenericName[hu]=Linkellenőrző
+GenericName[is]=Yfirfer tengla
+GenericName[it]=Controllo dei collegamenti
+GenericName[ja]=リンクãƒã‚§ãƒƒã‚«ãƒ¼
+GenericName[ka]=ბმულების შემმáƒáƒ¬áƒ›áƒ”ბელი
+GenericName[lt]=Nuorody tikrintuvÄ—
+GenericName[ms]=Pemeriksa Pautan
+GenericName[nds]=Linkprööv
+GenericName[ne]=लिङà¥à¤• परीकà¥à¤·à¤•
+GenericName[nl]=Linkchecker
+GenericName[pl]=Program sprawdzający odnośniki
+GenericName[pt]=Verificação de Ligações
+GenericName[pt_BR]=Verificador de Links
+GenericName[ru]=Проверка ÑÑылок
+GenericName[sk]=Kontrole spojenia
+GenericName[sl]=Preverjalnik povezav
+GenericName[sr]=Провера везе
+GenericName[sr@Latn]=Provera veze
+GenericName[sv]=Länkkontroll
+GenericName[ta]=இணைபà¯à®ªà¯ சரிபாரà¯à®ªà¯à®ªà®¾à®©à¯
+GenericName[tg]=Тафтиши иÑтинод
+GenericName[tr]=Bağlantı Kontrolcüsü
+GenericName[uk]=Перевірка поÑилань
+GenericName[zh_CN]=链接检查器
+GenericName[zh_HK]=連çµæª¢æŸ¥ç¨‹å¼
+GenericName[zh_TW]=連çµæª¢æŸ¥ç¨‹å¼
+Categories=Qt;KDE;Development;WebDevelopment;
+
diff --git a/klinkstatus/src/klinkstatus.h b/klinkstatus/src/klinkstatus.h
new file mode 100644
index 00000000..14ba2934
--- /dev/null
+++ b/klinkstatus/src/klinkstatus.h
@@ -0,0 +1,86 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 _KLINKSTATUS_H_
+#define _KLINKSTATUS_H_
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <kapplication.h>
+#include <kparts/mainwindow.h>
+
+class KToggleAction;
+
+/**
+ * This is the application "Shell". It has a menubar, toolbar, and
+ * statusbar but relies on the "Part" to do all the real work.
+ *
+ * @short Application Shell
+ * @author Paulo Moura Guedes <moura@kdewebdev.org>
+ * @version 0.1.3
+ */
+class KLinkStatus : public KParts::MainWindow
+{
+ Q_OBJECT
+public:
+ KLinkStatus();
+ virtual ~KLinkStatus();
+
+ /** Use this method to load whatever file/URL you have */
+ void load(const KURL& url);
+
+protected:
+ /**
+ * This method is called when it is time for the app to save its
+ * properties for session management purposes.
+ */
+ void saveProperties(KConfig *);
+
+ /**
+ * This method is called when this app is restored. The KConfig
+ * object points to the session management config file that was saved
+ * with @ref saveProperties
+ */
+ void readProperties(KConfig *);
+
+private slots:
+ void optionsShowToolbar();
+ void optionsShowStatusbar();
+ void optionsConfigureKeys();
+ void optionsConfigureToolbars();
+
+ void applyNewToolbarConfig();
+
+private:
+ void setupAccel();
+ void setupActions();
+ void setupPartActions();
+ void removeDuplicatedActions();
+
+private:
+ KParts::ReadOnlyPart *m_part;
+
+ KToggleAction *m_toolbarAction;
+ KToggleAction *m_statusbarAction;
+};
+
+#endif // _KLINKSTATUS_H_
diff --git a/klinkstatus/src/klinkstatus.lsm b/klinkstatus/src/klinkstatus.lsm
new file mode 100644
index 00000000..94221faf
--- /dev/null
+++ b/klinkstatus/src/klinkstatus.lsm
@@ -0,0 +1,16 @@
+Begin3
+Title: KLinkStatus -- Some description
+Version: 0.2.1
+Entered-date:
+Description:
+Keywords: KDE Qt
+Author: Paulo Moura Guedes <pmg@netcabo.pt>
+Maintained-by: Paulo Moura Guedes <pmg@netcabo.pt>
+Home-page:
+Alternate-site:
+Primary-site: ftp://ftp.kde.org/pub/kde/unstable/apps/utils
+ xxxxxx klinkstatus-0.1.0.tar.gz
+ xxx klinkstatus-0.1.0.lsm
+Platform: Linux. Needs KDE
+Copying-policy: GPL
+End
diff --git a/klinkstatus/src/klinkstatus_part.cpp b/klinkstatus/src/klinkstatus_part.cpp
new file mode 100644
index 00000000..cf04df7a
--- /dev/null
+++ b/klinkstatus/src/klinkstatus_part.cpp
@@ -0,0 +1,207 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 <kaboutdata.h>
+#include <klocale.h>
+#include <kinstance.h>
+#include <kaction.h>
+#include <kstdaction.h>
+#include <kfiledialog.h>
+#include <kparts/genericfactory.h>
+#include <kparts/factory.h>
+#include <kstandarddirs.h>
+#include <kaboutapplication.h>
+#include <kbugreport.h>
+#include <kconfigdialog.h>
+#include <kglobalsettings.h>
+#include <kshortcut.h>
+#include <kaccel.h>
+#include <kkeydialog.h>
+
+#include <qbuttongroup.h>
+
+#include "global.h"
+#include "cfg/klsconfig.h"
+#include "klinkstatus_part.h"
+#include "ui/tabwidgetsession.h"
+#include "ui/sessionwidget.h"
+#include "ui/settings/configsearchdialog.h"
+#include "ui/settings/configresultsdialog.h"
+#include "ui/settings/configidentificationdialog.h"
+#include "actionmanager.h"
+
+
+const char KLinkStatusPart::description_[] = I18N_NOOP( "A Link Checker" );
+const char KLinkStatusPart::version_[] = "0.3.2";
+
+// Factory code for KDE 3
+typedef KParts::GenericFactory<KLinkStatusPart> KLinkStatusFactory;
+K_EXPORT_COMPONENT_FACTORY( libklinkstatuspart, KLinkStatusFactory )
+
+KLinkStatusPart::KLinkStatusPart(QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name,
+ const QStringList & /*string_list*/)
+ : KParts::ReadOnlyPart(parent, name), m_dlgAbout(0)
+{
+ setInstance(KLinkStatusFactory::instance());
+
+ action_manager_ = new ActionManager(this);
+ ActionManager::setInstance(action_manager_);
+ initGUI();
+
+ tabwidget_ = new TabWidgetSession(parentWidget, widgetName);
+ setWidget(tabwidget_);
+ action_manager_->initTabWidget(tabwidget_);
+
+ // we are not modified since we haven't done anything yet
+ setModified(false);
+
+ openURL("");
+}
+
+KLinkStatusPart::~KLinkStatusPart()
+{}
+
+void KLinkStatusPart::initGUI()
+{
+ setXMLFile("klinkstatus_part.rc", true);
+
+ // initialize the part actions
+ action_manager_->initPart(this);
+}
+
+void KLinkStatusPart::setModified(bool modified)
+{
+ // get a handle on our Save action and make sure it is valid
+ KAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save));
+ if (!save)
+ return;
+
+ // if so, we either enable or disable it based on the current
+ // state
+ if (modified)
+ save->setEnabled(true);
+ else
+ save->setEnabled(false);
+}
+
+bool KLinkStatusPart::openURL(KURL const& url)
+{
+ KURL url_aux = url;
+
+ if(KLSConfig::useQuantaUrlPreviewPrefix() && Global::isKLinkStatusEmbeddedInQuanta())
+ {
+ url_aux = Global::urlWithQuantaPreviewPrefix(url);
+ if(!url_aux.isValid() || url_aux.isEmpty())
+ url_aux = url;
+ }
+ else
+ url_aux = url;
+
+ tabwidget_->slotNewSession(url_aux);
+
+ return true;
+}
+
+bool KLinkStatusPart::openFile()
+{
+ return false;
+}
+
+void KLinkStatusPart::slotNewLinkCheck()
+{
+ openURL("");
+}
+
+void KLinkStatusPart::slotOpenLink()
+{
+ QString file_name = KFileDialog::getOpenURL().url();
+
+ if (file_name.isEmpty() == false)
+ {
+ openURL(file_name);
+ }
+}
+
+void KLinkStatusPart::slotClose()
+{
+ tabwidget_->closeSession();
+}
+
+void KLinkStatusPart::slotConfigureKLinkStatus()
+{
+ KConfigDialog *dialog = new KConfigDialog(tabwidget_, "klsconfig", KLSConfig::self());
+ dialog->addPage(new ConfigSearchDialog(0, "config_search_dialog"), i18n("Check"), "viewmag");
+ dialog->addPage(new ConfigResultsDialog(0, "config_results_dialog"), i18n("Results"), "player_playlist");
+ dialog->addPage(new ConfigIdentificationDialog(0), i18n("Identification"),
+ "agent", i18n("Configure the way KLinkstatus reports itself"));
+ dialog->show();
+ connect(dialog, SIGNAL(settingsChanged()), tabwidget_, SLOT(slotLoadSettings()));
+}
+
+void KLinkStatusPart::slotAbout()
+{
+ if(m_dlgAbout == 0)
+ {
+ m_dlgAbout = new KAboutApplication(createAboutData(), tabwidget_, "about_app");
+ if(m_dlgAbout == 0)
+ return;
+ }
+
+ if(!m_dlgAbout->isVisible())
+ {
+ m_dlgAbout->show();
+ }
+ else
+ {
+ m_dlgAbout->raise();
+ }
+}
+
+void KLinkStatusPart::slotReportBug()
+{
+ KAboutData aboutData("klinkstatus", I18N_NOOP("KLinkStatus"), version_);
+ KBugReport bugReportDlg(0, true, &aboutData);
+ bugReportDlg.exec();
+}
+
+KAboutData* KLinkStatusPart::createAboutData()
+{
+ KAboutData * about = new KAboutData("klinkstatuspart", I18N_NOOP("KLinkStatus Part"), version_,
+ description_, KAboutData::License_GPL_V2,
+ "(C) 2004 Paulo Moura Guedes", 0, 0, "moura@kdewebdev.org");
+
+ about->addAuthor("Paulo Moura Guedes", 0, "moura@kdewebdev.org");
+
+ about->addCredit("Manuel Menezes de Sequeira", 0, 0, "http://home.iscte.pt/~mms/");
+ about->addCredit("Gonçalo Silva", 0, "gngs@paradigma.co.pt");
+ about->addCredit("Nuno Monteiro", 0, 0, "http://www.itsari.org");
+ about->addCredit("Eric Laffoon", 0, "sequitur@kde.org");
+ about->addCredit("Andras Mantia", 0, "amantia@kde.org");
+ about->addCredit("Michal Rudolf", 0, "mrudolf@kdewebdev.org");
+ about->addCredit("Mathieu Kooiman", 0, " quanta@map-is.nl");
+ about->addCredit("Jens Herden", 0, "jens@kdewebdev.org");
+
+ KGlobal::dirs()->addResourceType("appicon", KStandardDirs::kde_default("data") + "klinkstatuspart/pics/");
+
+ return about;
+}
+
+#include "klinkstatus_part.moc"
diff --git a/klinkstatus/src/klinkstatus_part.desktop b/klinkstatus/src/klinkstatus_part.desktop
new file mode 100644
index 00000000..9515bbfa
--- /dev/null
+++ b/klinkstatus/src/klinkstatus_part.desktop
@@ -0,0 +1,17 @@
+[Desktop Entry]
+Name=KLinkStatusPart
+Name[de]=KLinkStatus-Komponente
+Name[fr]=Composant de KLinkStatus
+Name[nds]=KLinkStatus-Komponent
+Name[ne]=केडीई लिङà¥à¤• वसà¥à¤¤à¥à¤¸à¥à¤¥à¤¿à¤¤à¤¿ भाग
+Name[pt_BR]=Componente do KLinkStatus
+Name[ru]=Компонент KLinkStatus
+Name[sk]=KLink status Part
+Name[sv]=Klinkstatus-delprogram
+Name[ta]=Kதொகà¯à®¤à®¿ நிலைமை பகà¯à®¤à®¿
+Name[tg]=ҚиÑми KLinkStatus
+Icon=klinkstatus
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
+ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart
+X-KDE-Library=libklinkstatuspart
+Type=Service
diff --git a/klinkstatus/src/klinkstatus_part.h b/klinkstatus/src/klinkstatus_part.h
new file mode 100644
index 00000000..b32c8675
--- /dev/null
+++ b/klinkstatus/src/klinkstatus_part.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 _KLINKSTATUSPART_H_
+#define _KLINKSTATUSPART_H_
+
+#include <kparts/part.h>
+
+class TabWidgetSession;
+class ActionManager;
+
+class QWidget;
+class QPainter;
+
+class KURL;
+class KAboutData;
+class KAboutApplication;
+class KAction;
+
+class KLinkStatusPart: public KParts::ReadOnlyPart
+{
+ Q_OBJECT
+public:
+ KLinkStatusPart(QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name,
+ const QStringList& args);
+ virtual ~KLinkStatusPart();
+
+ /** Reimplemented to disable and enable Save action */
+ virtual void setModified(bool modified);
+
+ static KAboutData* createAboutData();
+
+protected:
+ /** This must be implemented by each part */
+ virtual bool openFile();
+ virtual bool openURL (const KURL &url);
+ // virtual bool saveFile(){};
+
+protected slots:
+ void slotNewLinkCheck();
+ void slotOpenLink();
+ void slotClose();
+ void slotConfigureKLinkStatus();
+/* void slotDisplayAllLinks();
+ void slotDisplayGoodLinks();
+ void slotDisplayBadLinks();
+ void slotDisplayMalformedLinks();
+ void slotDisplayUndeterminedLinks();*/
+ void slotAbout();
+ void slotReportBug();
+
+// private slots:
+// void slotEnableDisplayLinksActions();
+// void slotDisableDisplayLinksActions();
+
+private:
+ void initGUI();
+
+private:
+ static const char description_[];
+ static const char version_[];
+
+ ActionManager* action_manager_;
+
+ TabWidgetSession* tabwidget_;
+ KAboutApplication* m_dlgAbout;
+};
+
+#endif // _KLINKSTATUSPART_H_
diff --git a/klinkstatus/src/klinkstatus_part.rc b/klinkstatus/src/klinkstatus_part.rc
new file mode 100644
index 00000000..f2d580de
--- /dev/null
+++ b/klinkstatus/src/klinkstatus_part.rc
@@ -0,0 +1,58 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="klinkstatus_part" version="2">
+ <MenuBar>
+
+ <Menu name="file"><text>File</text>
+ <Action name="new_link_check"/>
+ <Action name="open_link"/>
+ <Action name="close_tab"/>
+ <Separator/>
+ <Action name="file_export_html"/>
+ <Separator/>
+ </Menu>
+
+ <Menu name="settings"><text>&amp;Settings</text>
+ <Separator/>
+ <Action name="configure_klinkstatus"/>
+ </Menu>
+
+ <Menu name="view"><text>&amp;View</text>
+ <Action name="hide_search_bar"/>
+ <Action name="reset_search_bar"/>
+ <Separator/>
+ <Action name="follow_last_link_checked"/>
+<!-- <Separator/>
+ <Action name="display_all_links"/>
+ <Action name="display_good_links"/>
+ <Action name="display_bad_links"/>
+ <Action name="display_malformed_links"/>
+ <Action name="display_undetermined_links"/>-->
+ </Menu>
+
+ <Menu name="search"><text>S&amp;earch</text>
+ <Action name="start_search"/>
+ <Action name="pause_search"/>
+ <Action name="stop_search"/>
+ <Separator/>
+ </Menu>
+
+ <Menu name="help"><text>&amp;Help</text>
+ <Separator/>
+ <Action name="about_klinkstatus"/>
+ <Action name="report_bug"/>
+ </Menu>
+ </MenuBar>
+
+ <ToolBar name="linksToolBar">
+ <Action name="start_search"/>
+ <Action name="pause_search"/>
+ <Action name="stop_search"/>
+ <Separator/>
+ <Action name="file_export_html"/>
+ <Separator/>
+ <Action name="hide_search_bar"/>
+ <Action name="reset_search_bar"/>
+ <Separator/>
+ <Action name="follow_last_link_checked"/>
+ </ToolBar>
+</kpartgui>
diff --git a/klinkstatus/src/klinkstatus_shell.rc b/klinkstatus/src/klinkstatus_shell.rc
new file mode 100644
index 00000000..04cbc329
--- /dev/null
+++ b/klinkstatus/src/klinkstatus_shell.rc
@@ -0,0 +1,28 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="klinkstatus_shell" version="1">
+<MenuBar>
+
+ <Menu noMerge="1" name="file"><text>&amp;File</text>
+ <Merge/>
+ <Separator/>
+ <Action name="file_quit"/>
+ </Menu>
+
+ <Menu noMerge="1" name="view"><text>&amp;View</text>
+ <Separator/>
+ </Menu>
+
+ <Menu noMerge="1" name="search"><text>S&amp;earch</text>
+ <Separator/>
+ </Menu>
+
+ <Menu noMerge="1" name="settings"><text>&amp;Settings</text>
+ <Action name="options_configure_keybinding"/>
+ <Action name="options_configure_toolbars"/>
+ <Merge name="configure_merge"/>
+ <Separator/>
+ <Merge/>
+ </Menu>
+</MenuBar>
+
+</kpartgui>
diff --git a/klinkstatus/src/main.cpp b/klinkstatus/src/main.cpp
new file mode 100644
index 00000000..8f5f1f95
--- /dev/null
+++ b/klinkstatus/src/main.cpp
@@ -0,0 +1,98 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "klinkstatus.h"
+
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+#include <iostream>
+using namespace std;
+
+
+static const char description[] =
+ I18N_NOOP("A Link Checker.\n\nKLinkStatus belongs to the kdewebdev module from KDE.");
+
+static const char version[] = "0.3.2";
+
+static KCmdLineOptions options[] =
+ {
+ { "+[URL]", I18N_NOOP( "Document to open" ), 0 },
+ KCmdLineLastOption
+ };
+
+int main(int argc, char *argv[])
+{
+ //____________________________________________________
+
+ KAboutData about("klinkstatus", I18N_NOOP("KLinkStatus"), version, description,
+ KAboutData::License_GPL_V2, "(C) 2004 Paulo Moura Guedes", 0,
+ "http://klinkstatus.kdewebdev.org");
+
+ about.addAuthor("Paulo Moura Guedes", 0, "moura@kdewebdev.org");
+
+ about.addCredit("Manuel Menezes de Sequeira", 0, 0, "http://home.iscte.pt/~mms/");
+ about.addCredit("Gonçalo Silva", 0, "gngs@paradigma.co.pt");
+ about.addCredit("Nuno Monteiro", 0, 0, "http://www.itsari.org");
+ about.addCredit("Eric Laffoon", 0, "sequitur@kde.org");
+ about.addCredit("Andras Mantia", 0, "amantia@kde.org");
+ about.addCredit("Michal Rudolf", 0, "mrudolf@kdewebdev.org");
+ about.addCredit("Mathieu Kooiman", 0, " quanta@map-is.nl");
+ about.addCredit("Jens Herden", 0, "jens@kdewebdev.org");
+ about.addCredit("Helge Hielscher", 0, "hhielscher@unternehmen.com");
+
+ KCmdLineArgs::init(argc, argv, &about);
+ KCmdLineArgs::addCmdLineOptions( options );
+
+ KApplication app;
+
+ // see if we are starting with session management
+ if (app.isRestored())
+ {
+ RESTORE(KLinkStatus);
+ }
+ else
+ {
+ // no session.. just start up normally
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ KLinkStatus *widget = new KLinkStatus;
+ widget->show();
+
+ if ( args->count() == 0 )
+ {
+ widget->load(KURL());
+ }
+ else
+ {
+ int i = 0;
+ for (; i < args->count(); i++ )
+ {
+ widget->load( args->url( i ) );
+ }
+ }
+ args->clear();
+ }
+
+ return app.exec();
+}
diff --git a/klinkstatus/src/parser/Makefile.am b/klinkstatus/src/parser/Makefile.am
new file mode 100644
index 00000000..b99146c1
--- /dev/null
+++ b/klinkstatus/src/parser/Makefile.am
@@ -0,0 +1,6 @@
+INCLUDES = $(all_includes)
+METASOURCES = AUTO
+noinst_HEADERS = htmlparser.h http.h mstring.h node.h node_impl.h url.h
+libparser_la_LDFLAGS = $(all_libraries)
+noinst_LTLIBRARIES = libparser.la
+libparser_la_SOURCES = htmlparser.cpp http.cpp mstring.cpp node.cpp url.cpp
diff --git a/klinkstatus/src/parser/htmlparser.cpp b/klinkstatus/src/parser/htmlparser.cpp
new file mode 100644
index 00000000..6bc93761
--- /dev/null
+++ b/klinkstatus/src/parser/htmlparser.cpp
@@ -0,0 +1,455 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "htmlparser.h"
+
+#include <kapplication.h>
+#include <kdebug.h>
+
+
+HtmlParser::HtmlParser(QString const& documento)
+ : is_content_type_set_(false), document_(documento)
+{
+ Q_ASSERT(!documento.isEmpty());
+
+ stripScriptContent();
+ stripComments(); // after removing the script because comments in scripts have diferent sintaxe
+
+ nodes_.reserve(estimativaLinks(documento.length() * 2)); // à confiança ;)
+
+ parseNodesOfTypeA();
+ parseNodesOfTypeAREA();
+ parseNodesOfTypeLINK();
+ parseNodesOfTypeMETA();
+ parseNodesOfTypeIMG();
+ parseNodesOfTypeFRAME();
+ parseNodesOfTypeIFRAME();
+ parseNodesOfTypeBASE();
+ parseNodesOfTypeTITLE();
+}
+
+bool HtmlParser::hasBaseUrl() const
+{
+ return (node_BASE_.element() == Node::BASE &&
+ !node_BASE_.url().isEmpty());
+}
+
+NodeBASE const& HtmlParser::baseUrl() const
+{
+ Q_ASSERT(hasBaseUrl());
+ return node_BASE_;
+}
+
+NodeMETA const& HtmlParser::contentTypeMetaNode() const
+{
+ Q_ASSERT(hasContentType());
+ return node_META_content_type_;
+}
+
+bool HtmlParser::hasTitle() const
+{
+ return (node_TITLE_.element() == Node::TITLE &&
+ !node_TITLE_.attributeTITLE().isEmpty());
+}
+
+NodeTITLE const& HtmlParser::title() const
+{
+ Q_ASSERT(hasTitle());
+ return node_TITLE_;
+}
+
+vector<QString> const& HtmlParser::parseNodesOfType(QString const& element)
+{
+ HtmlParser::parseNodesOfType(element, document_, aux_);
+ return aux_;
+}
+
+void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document, vector<QString>& nodes)
+{
+ QString node;
+ QString doc(document);
+ int inicio = 0, fim = 0;
+
+ nodes.clear();
+ if(upperCase(tipo) == "A")
+ nodes.reserve(estimativaLinks(doc.length() * 2));
+
+ while(true)
+ {
+ inicio = findSeparableWord(doc, "<" + tipo);
+ if(inicio == -1)
+ return;
+
+ //if( (doc[inicio] != ' ' && doc[inicio] != '\n' && doc[inicio] != '\r') )
+ if(!::isSpace(doc[inicio]))
+ {
+ doc.remove(0, QString("<" + tipo).length());
+ continue;
+ }
+
+ if(upperCase(tipo) == "A")
+ fim = findWord(doc, "</A>", inicio);
+ else
+ {
+ //fim = findChar(doc, '>', inicio + 1);
+ fim = endOfTag(doc, inicio, '>');
+ }
+
+ if(fim == -1)
+ {
+ doc.remove(0, 1);
+ continue;
+ }
+
+ int tag_begining_go_back = (tipo.length() + QString("<").length());
+ node = doc.mid(inicio - tag_begining_go_back,
+ fim - inicio + tag_begining_go_back);
+ nodes.push_back(node);
+ doc.remove(0, fim);
+ }
+}
+
+int HtmlParser::endOfTag(QString const& s, int index, QChar end_of_tag)
+{
+ if( (uint)index >= s.length() )
+ return -1;
+
+ int _end_of_tag = s.find(end_of_tag, index);
+ if(_end_of_tag == -1)
+ return _end_of_tag;
+
+ int open_aspas = s.find('"', index);
+ if(open_aspas == -1)
+ return _end_of_tag + 1;
+
+ else if(_end_of_tag < open_aspas)
+ return _end_of_tag + 1;
+
+ else if( ((uint)open_aspas + 1) >= s.length() - 1 )
+ return -1;
+
+ else
+ {
+ int close_aspas = s.find('"', open_aspas + 1);
+ if(close_aspas != -1)
+ return endOfTag(s, close_aspas + 1, end_of_tag);
+ else
+ {
+ kdDebug(23100) << "Mismatched quotes (\"): " << s.mid(index, _end_of_tag - index) << endl;
+ //return -1;
+ return _end_of_tag + 1;
+ }
+ }
+}
+
+vector<Node*> const& HtmlParser::nodes() const
+{
+ return nodes_;
+}
+
+
+void HtmlParser::parseNodesOfTypeA()
+{
+ vector<QString> const& aux = parseNodesOfType("A");
+
+ for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ {
+ nodes_.push_back( new NodeA(aux[i]) );
+ }
+}
+
+void HtmlParser::parseNodesOfTypeAREA()
+{
+ vector<QString> const& aux = parseNodesOfType("AREA");
+
+ for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ {
+ nodes_.push_back( new NodeAREA(aux[i]) );
+ }
+}
+
+void HtmlParser::parseNodesOfTypeLINK()
+{
+ vector<QString> const& aux = parseNodesOfType("LINK");
+
+ for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ nodes_.push_back( new NodeLINK(aux[i]) );
+}
+
+void HtmlParser::parseNodesOfTypeMETA()
+{
+ vector<QString> const& aux = parseNodesOfType("META");
+
+ for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ {
+ NodeMETA* node = new NodeMETA(aux[i]);
+ nodes_.push_back(node);
+
+ if(!is_content_type_set_ && node->atributoHTTP_EQUIV().lower() == QString("Content-Type").lower()) {
+ is_content_type_set_ = true;
+ node_META_content_type_.setNode(aux[i]);
+ }
+ }
+}
+
+QString HtmlParser::findCharsetInMetaElement(QString const& html)
+{
+ vector<QString> metaTags;
+ parseNodesOfType("META", html, metaTags);
+
+ for(vector<QString>::size_type i = 0; i != metaTags.size(); ++i)
+ {
+ NodeMETA node(metaTags[i]);
+
+ if(node.atributoHTTP_EQUIV().lower() == QString("Content-Type").lower()) {
+ return node.charset();
+ }
+ }
+ return QString();
+}
+
+void HtmlParser::parseNodesOfTypeIMG()
+{
+ vector<QString> const& aux = parseNodesOfType("IMG");
+
+ for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ nodes_.push_back( new NodeIMG(aux[i]) );
+}
+
+void HtmlParser::parseNodesOfTypeFRAME()
+{
+ vector<QString> const& aux = parseNodesOfType("FRAME");
+
+ for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ nodes_.push_back( new NodeFRAME(aux[i]) );
+}
+
+void HtmlParser::parseNodesOfTypeIFRAME()
+{
+ vector<QString> const& aux = parseNodesOfType("IFRAME");
+
+ for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ nodes_.push_back( new NodeFRAME(aux[i]) );
+}
+
+void HtmlParser::parseNodesOfTypeBASE()
+{
+ QString node;
+ QString doc = document_;
+ int inicio = 0, fim = 0;
+
+ inicio = findSeparableWord(doc, "<BASE");
+ if(inicio == -1 || !doc[inicio].isSpace())
+ return;
+
+ fim = doc.find(">", inicio);
+ if(fim == -1)
+ return;
+
+ node = doc.mid(inicio, fim-inicio);
+ node_BASE_.setNode(node);
+}
+
+void HtmlParser::parseNodesOfTypeTITLE()
+{
+ QString node;
+ QString doc = document_;
+ int inicio = 0, fim = 0;
+
+ inicio = findSeparableWord(doc, "<TITLE>");
+ if(inicio == -1)
+ return;
+
+ fim = findSeparableWord(doc, "</TITLE>", inicio);
+ if(fim == -1)
+ return;
+
+ node = doc.mid(inicio, fim-inicio);
+
+ node_TITLE_.setNode(node);
+}
+
+
+void HtmlParser::stripComments()
+{
+ QString begin_comment = "<!--";
+ QString end_comment = "-->";
+ uint const begin_comment_length = begin_comment.length();
+
+ int inicio = -1;
+ do
+ {
+ inicio = findWord(document_, begin_comment);
+ if(inicio != -1)
+ {
+ int fim = findWord(document_, end_comment, inicio);
+ if(fim == -1)
+ {
+ kdDebug(23100) << "End of comment is missing!" << endl;
+ document_.remove(inicio - begin_comment_length, begin_comment_length);
+ }
+ else
+ {
+ comments_ += "\n" + document_.mid(inicio - begin_comment_length,
+ fim - inicio + begin_comment_length);
+ document_.remove(inicio - begin_comment_length, fim - inicio + begin_comment_length);
+ }
+ }
+ }
+ while(inicio != -1);
+}
+
+void HtmlParser::stripScriptContent()
+{
+ int inicio = -1;
+ QString const begin_script = "<script";
+ QString const end_script = "</script>";
+ uint const begin_script_length = begin_script.length();
+
+ do
+ {
+ inicio = findWord(document_, begin_script);
+ if(inicio != -1)
+ {
+ int fim = findWord(document_, end_script, inicio);
+
+ if(fim == -1)
+ {
+ kdDebug(23100) << "Malformed script tag!" << endl;
+ document_.remove(inicio - begin_script_length, begin_script_length);
+ }
+ else
+ {
+ script_ += "\n" + document_.mid(inicio - begin_script_length,
+ fim - inicio + begin_script_length);
+
+ document_.remove(inicio - begin_script_length,
+ fim - inicio + begin_script_length);
+ }
+ }
+ }
+ while(inicio != -1);
+}
+
+
+
+
+#include <iostream>
+void HtmlParser::mostra() const
+{
+ kdDebug(23100) << "\nA:\n\n";
+ for(unsigned int i = 0; i != nodes_.size(); ++i)
+ {
+ if(nodes_[i]->element() == Node::A)
+ kdDebug(23100) << nodes_[i]->url() << "\t" << nodes_[i]->linkLabel() << endl;
+ }
+ kdDebug(23100) << "____________________________________________________________________" << endl;
+
+ kdDebug(23100) << "\nLINK:\n\n";
+ for(unsigned int i = 0; i != nodes_.size(); ++i)
+ {
+ if(nodes_[i]->element() == Node::LINK)
+ kdDebug(23100) << nodes_[i]->url() << "\t" << nodes_[i]->linkLabel() << endl;
+ }
+ kdDebug(23100) << "____________________________________________________________________" << endl;
+
+ kdDebug(23100) << "\nMETA:\n";
+ for(unsigned int i = 0; i != nodes_.size(); ++i)
+ {
+ if(nodes_[i]->element() == Node::META)
+ {
+#if defined Q_WS_WIN
+ NodeMETA* nm = (NodeMETA*)nodes_[i];
+#else
+
+ NodeMETA* nm = dynamic_cast<NodeMETA*>(nodes_[i]);
+#endif
+
+ kdDebug(23100) << nm->url() << endl
+ << nm->atributoHTTP_EQUIV() << endl
+ << nm->atributoNAME() << endl
+ << nm->atributoCONTENT() << endl;
+ }
+ }
+ kdDebug(23100) << "____________________________________________________________________" << endl;
+
+ kdDebug(23100) << "\nIMG:\n\n";
+ for(unsigned int i = 0; i != nodes_.size(); ++i)
+ {
+ if(nodes_[i]->element() == Node::IMG)
+ kdDebug(23100) << nodes_[i]->url() << "\t"
+ << nodes_[i]->linkLabel() << endl;
+ }
+ kdDebug(23100) << "____________________________________________________________________" << endl;
+
+ kdDebug(23100) << "\nFRAME:\n\n";
+ for(unsigned int i = 0; i != nodes_.size(); ++i)
+ {
+ if(nodes_[i]->element() == Node::FRAME)
+ kdDebug(23100) << nodes_[i]->url() << endl;
+ }
+ kdDebug(23100) << "____________________________________________________________________" << endl;
+
+ kdDebug(23100) << "\nBASE:\n\n";
+ kdDebug(23100) << node_BASE_.url() << endl;
+
+ kdDebug(23100) << "____________________________________________________________________" << endl;
+
+}
+
+#ifdef HTMLPARSER
+
+#include <fstream>
+
+int main()
+{
+ //ifstream stream("aterraprometida.html");
+ //ifstream stream("/var/www/html/STL/standard_library.html");
+ //ifstream stream("/var/www/html/qt-doc/functions.html");
+ ifstream stream("/var/www/html/index.html");
+
+ QString content;
+ while(stream)
+ {
+ char c;
+ stream.get(c);
+ content += c;
+ }
+ // kdDebug(23100) << content << endl;
+ kdDebug(23100) << "__________________________________________________________" << endl;
+ HtmlParser parser(content);
+ parser.mostra();
+ kdDebug(23100) << "__________________________________________________________\n\n\n" << endl;
+ vector<Node*> nods = parser.nodes();
+ for(int i = 0; i != nods.size(); ++i)
+ {
+ if(nods[i]->element() == Node::META)
+ {
+ NodeMETA* nod_meta = (NodeMETA*)(nods[i]);
+ //Node* nod_meta = nods[i];
+
+ kdDebug(23100) << nod_meta->atributoCONTENT() << endl;
+ }
+
+ }
+}
+
+
+#endif
diff --git a/klinkstatus/src/parser/htmlparser.h b/klinkstatus/src/parser/htmlparser.h
new file mode 100644
index 00000000..cf487ebf
--- /dev/null
+++ b/klinkstatus/src/parser/htmlparser.h
@@ -0,0 +1,124 @@
+ /***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 HTML_PARSER_H
+#define HTML_PARSER_H
+
+#include <qstring.h>
+
+#include <vector>
+
+
+#include "mstring.h"
+#include "node.h"
+
+#include <iostream>
+
+using namespace std;
+
+typedef unsigned int uint;
+
+
+
+class HtmlParser
+{
+public:
+
+ HtmlParser();
+ HtmlParser(QString const& documento);
+ ~HtmlParser();
+
+ vector<Node*> const& nodes() const;
+ bool hasBaseUrl() const;
+ bool hasTitle() const;
+ bool hasContentType() const;
+ NodeBASE const& baseUrl() const;
+ NodeTITLE const& title() const;
+ NodeMETA const& contentTypeMetaNode() const;
+
+ static uint estimativaLinks(uint doc_size);
+ /**
+ * Convenience function for performance as it only parse in order
+ * to get the charset.
+ */
+ static QString findCharsetInMetaElement(QString const& html);
+
+ // test:
+ void mostra() const;
+
+private:
+
+ vector<QString> const& parseNodesOfType(QString const& element);
+ /**
+ * Vector nodes passed for performance.
+ */
+ static void parseNodesOfType(QString const& element, QString const& doc, vector<QString>& nodes);
+
+ void parseNodesOfTypeA();
+ void parseNodesOfTypeAREA();
+ void parseNodesOfTypeLINK();
+ void parseNodesOfTypeMETA();
+ void parseNodesOfTypeIMG();
+ void parseNodesOfTypeFRAME();
+ void parseNodesOfTypeIFRAME();
+ void parseNodesOfTypeBASE();
+ void parseNodesOfTypeTITLE();
+
+ void stripComments();
+ void stripScriptContent();
+
+ /**
+ Return the index of the next character of the end of tag.
+ e.g.
+ endOfTag("<img src=\"bad > luck\">") => 22 (not 15)
+ */
+ static int endOfTag(QString const& s, int index = 0, QChar end_of_tag = '>');
+
+private:
+
+ vector<QString> aux_; // for what the hell is this? looks ugly... maybe I was drunk, can't remember
+ vector<Node*> nodes_;
+ NodeBASE node_BASE_;
+ NodeTITLE node_TITLE_;
+ NodeMETA node_META_content_type_;
+ bool is_content_type_set_;
+
+ QString document_;
+ QString script_; // Fica aqui guardado (JavaScript, etc)
+ QString comments_;
+};
+
+
+inline HtmlParser::~HtmlParser()
+{
+ //kdDebug(23100) << "*";
+}
+
+inline uint HtmlParser::estimativaLinks(uint doc_size)
+{
+ return doc_size / 100; // valor estimado...
+}
+
+inline bool HtmlParser::hasContentType() const
+{
+ return is_content_type_set_;
+}
+
+#endif
diff --git a/klinkstatus/src/parser/http.cpp b/klinkstatus/src/parser/http.cpp
new file mode 100644
index 00000000..1133c937
--- /dev/null
+++ b/klinkstatus/src/parser/http.cpp
@@ -0,0 +1,87 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "http.h"
+#include "mstring.h"
+
+#include <kdebug.h>
+
+#include <iostream>
+
+
+
+void HttpResponseHeader::parseLocation()
+{
+ QString cabecalho(toString());
+
+ int location = findWord(cabecalho, "Location: ");
+ Q_ASSERT(location != -1);
+
+ int fim_de_linha_1 = cabecalho.find('\n', location);
+ int fim_de_linha_2 = cabecalho.find('\r', location);
+
+ Q_ASSERT(fim_de_linha_1 != -1 || fim_de_linha_2 != -1);
+
+ int fim_de_linha;
+
+ if(fim_de_linha_1 == -1 && fim_de_linha_2 != -1)
+ fim_de_linha = fim_de_linha_2;
+
+ else if(fim_de_linha_2 == -1 && fim_de_linha_1 != -1)
+ fim_de_linha = fim_de_linha_1;
+
+ else if(fim_de_linha_1 < fim_de_linha_2)
+ fim_de_linha = fim_de_linha_1;
+
+ else fim_de_linha = fim_de_linha_2;
+
+ location_ = cabecalho.mid(location, fim_de_linha - location);
+}
+
+QString HttpResponseHeader::charset() const
+{
+ return HttpResponseHeader::charset(value("content-type"));
+}
+
+QString HttpResponseHeader::charset(QString const& contentTypeHttpHeaderLine)
+{
+ QString _charset;
+
+ if(contentTypeHttpHeaderLine.isEmpty())
+ return _charset;
+
+ int index = contentTypeHttpHeaderLine.find("charset=");
+ if(index != -1)
+ index += QString("charset=").length();
+ else {
+ index = contentTypeHttpHeaderLine.find("charset:");
+ if(index != -1)
+ index += QString("charset:").length();
+ }
+
+ if(index != -1) {
+ _charset = contentTypeHttpHeaderLine.mid(index);
+ _charset = _charset.stripWhiteSpace();
+ }
+
+// kdDebug(23100) << "Charset: |" << _charset << "|" << endl;
+ return _charset;
+
+}
diff --git a/klinkstatus/src/parser/http.h b/klinkstatus/src/parser/http.h
new file mode 100644
index 00000000..5878cfd1
--- /dev/null
+++ b/klinkstatus/src/parser/http.h
@@ -0,0 +1,79 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 HTTP_H
+#define HTTP_H
+
+#include <qhttp.h>
+#include <qstring.h>
+
+
+class HttpResponseHeader: public QHttpResponseHeader
+{
+public:
+
+ HttpResponseHeader();
+ HttpResponseHeader(const QHttpResponseHeader & header);
+ HttpResponseHeader(QString const& str);
+ virtual ~HttpResponseHeader();
+
+ void parseLocation();
+ QString const& location() const;
+ QString charset() const;
+
+ /**
+ * Parses the charset from this kind of server response:
+ * Content-Type: text/html; charset=EUC-JP
+ * Return an empty string in case it doesn't find nothing.
+ */
+ static QString charset(QString const& contentTypeHttpHeaderLine);
+
+private:
+
+ QString location_;
+};
+
+
+inline HttpResponseHeader::HttpResponseHeader()
+ : QHttpResponseHeader()
+{
+}
+
+inline HttpResponseHeader::HttpResponseHeader(const QHttpResponseHeader & /*header*/)
+ : QHttpResponseHeader()
+{
+}
+
+inline HttpResponseHeader::HttpResponseHeader(QString const& str)
+ : QHttpResponseHeader()
+{
+ parse(str);
+}
+
+inline HttpResponseHeader::~HttpResponseHeader()
+{
+}
+
+inline QString const& HttpResponseHeader::location() const
+{
+ return location_;
+}
+
+#endif
diff --git a/klinkstatus/src/parser/mstring.cpp b/klinkstatus/src/parser/mstring.cpp
new file mode 100644
index 00000000..114d6dc6
--- /dev/null
+++ b/klinkstatus/src/parser/mstring.cpp
@@ -0,0 +1,278 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "mstring.h"
+
+#include <iostream>
+
+
+using namespace std;
+
+
+int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice)
+{
+ int indice = s.find(palavra, a_partir_do_indice, false);
+
+ if(indice == -1)
+ return indice;
+ else
+ return (indice + palavra.length());
+}
+
+int findChar(QString const& s, QChar letra, uint a_partir_do_indice)
+{
+ int index = s.find(letra, a_partir_do_indice, false);
+ if(index == -1)
+ return index;
+ else
+ return index + 1;
+}
+
+/**
+ The string palavra, must not have any spaces.
+*/
+int findSeparableWord(QString const& s_, QString const& palavra, uint a_partir_do_indice)
+{
+ bool encontrou = true;
+ QString s(s_);
+ uint indice_palavra = 0;
+ int indice = a_partir_do_indice;
+
+ do
+ {
+ encontrou = true;
+ indice_palavra = 0;
+
+ indice = findChar(s, (palavra[indice_palavra++]), indice );
+
+ if(indice == -1)
+ {
+ return indice;
+ }
+ --indice;
+
+ while(encontrou && indice_palavra != palavra.length() && indice < (int)s.length())
+ {
+ indice = nextNonSpaceChar(s, indice);
+
+ if(indice == -1)
+ return indice;
+
+ // Nao se incrementa o indice porque isso j��feito com a fun�o nextNonSpaceChar
+ encontrou = encontrou && !(notEqual(s[indice], palavra[indice_palavra++]) );
+
+ }
+ }
+ while(!encontrou && indice < (int)s.length());
+
+ if(encontrou && indice < (int)s.length())
+ return ++indice;
+ else
+ return -1;
+}
+
+int nextNonSpaceChar(QString const& s, uint i)
+{
+ ++i;
+ // while( (s[i] == ' ' || s[i] == '\t' || s[i] == '\r' || s[i] == '\n')
+ while(isSpace(s[i])
+ && i < s.length() )
+ ++i;
+
+ if(i < s.length())
+ return i;
+ else
+ return -1;
+}
+
+
+/**
+ e.g.
+ nextSpaceChar("o biltre") => 1
+*/
+int nextSpaceChar(QString const& s, uint i)
+{
+ //while( (s[i] != ' ' && s[i] != '\r' && s[i] != '\n' && s[i] != '\t') &&
+ //i < s.size() )
+ while(!isSpace(s[i]) &&
+ i < s.length() )
+ ++i;
+
+ if(i < s.length())
+ return i;
+ else
+ return -1;
+}
+
+int nextCharDifferentThan(QChar c, QString const& s, uint i)
+{
+ while(i < s.length() && s[i] == c)
+ ++i;
+
+ if(i != s.length())
+ return i;
+ else
+ return -1;
+}
+
+vector<QString> tokenize(QString s)
+{
+ Q_ASSERT(!s.isEmpty());
+ vector<QString> v;
+
+ while(true)
+ {
+ int inicio = 0;
+ //if(s[0] == ' ' || s[0] == '\t' || s[0] == '\r' || s[0] == '\n')
+ if(isSpace(s[0]))
+ inicio = nextNonSpaceChar(s, 0);
+ if(inicio == -1)
+ return v;
+
+ int fim = nextSpaceChar(s, inicio);
+ if(fim == -1)
+ {
+ v.push_back(s.mid(inicio));
+ return v;
+ }
+ else
+ {
+ QString palavra = s.mid(inicio, fim - inicio);
+ v.push_back(palavra);
+ s.remove(0, fim);
+ }
+ }
+}
+
+vector<QString> tokenizeWordsSeparatedByDots(QString s)
+{
+ vector<QString> v;
+
+ while(true)
+ {
+ int inicio = 0;
+ if(s[0] == '.')
+ inicio = nextCharDifferentThan(QChar('.'), s, 0);
+ if(inicio == -1)
+ return v;
+
+ int fim = s.find('.', inicio);
+ if(fim == -1)
+ {
+ v.push_back(s.mid(inicio));
+ return v;
+ }
+ else
+ {
+ QString palavra = s.mid(inicio, fim - inicio);
+ v.push_back(palavra);
+ s.remove(0, fim);
+ }
+ }
+}
+
+vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria)
+{
+ vector<QString> v;
+
+ while(true)
+ {
+ int inicio = 0;
+ if(s[0] == criteria)
+ inicio = nextCharDifferentThan(criteria, s, 0);
+ if(inicio == -1)
+ return v;
+
+ int fim = s.find(criteria, inicio);
+ if(fim == -1)
+ {
+ v.push_back(s.mid(inicio));
+ return v;
+ }
+ else
+ {
+ QString palavra = s.mid(inicio, fim - inicio);
+ v.push_back(palavra);
+ s.remove(0, fim);
+ }
+ }
+}
+
+
+
+#ifdef STRING
+//c++ -g -o teste_string mstring.cpp -DSTRING
+#include <fstream>
+
+int main(int argc, char* argv[])
+{
+ string s;
+ s = "S";
+ s = "Afazer";
+ s = "O MeU S sdadsadd ";
+ s = "www.trolltech.com/search/qt-interest/bla bla%20Bla";
+ s = "...http://w.ww..go.o.gle.p.t.......";
+
+ /*
+ ifstream stream("testeparser.html");
+ string content;
+ while(stream) {
+ char c;
+ stream.get(c);
+ content += c;
+ }
+ */
+ // kdDebug(23100) << simplifyWhiteSpace(content) << endl;
+ kdDebug(23100) << simplifyWhiteSpace(s) << endl;
+
+ /*
+ vector<string> v(tokenize(s));
+ for(int i = 0; i != v.size(); ++i)
+ kdDebug(23100) << v[i] << endl;
+ */
+
+ /*
+ int i = nextSpaceChar(s, 0);
+ i = nextNonSpaceChar(s, i);
+ kdDebug(23100) << s.substr(i) << endl;
+ */
+
+
+ vector<string> v(tokenizeWordsSeparatedByDots(s));
+ for(int i = 0; i != v.size(); ++i)
+ kdDebug(23100) << v[i] << endl;
+
+ removeLastCharIfExists(s, '/');
+ kdDebug(23100) << s << endl;
+
+ /*
+ kdDebug(23100) << findChar(s, 'T') << endl;
+ kdDebug(23100) << findWord(s, "trolltech") << endl;
+ kdDebug(23100) << findWord(s, "TROLLTECH") << endl;
+ kdDebug(23100) << findWord(s, "TROLLTECH", 2) << endl;
+ */
+ /*
+ stripWhiteSpace(s);
+ kdDebug(23100) << s << endl;
+ */
+}
+
+
+#endif
diff --git a/klinkstatus/src/parser/mstring.h b/klinkstatus/src/parser/mstring.h
new file mode 100644
index 00000000..cd359c7d
--- /dev/null
+++ b/klinkstatus/src/parser/mstring.h
@@ -0,0 +1,174 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 STRING_H
+#define STRING_H
+
+#include <qstring.h>
+
+#include <vector>
+#include <cctype>
+
+class QString;
+
+typedef unsigned int uint;
+
+
+/* Similar to std::string::find but return the next index of the last char
+ of the first word it finds.
+ Case insensitive.
+ e.g.
+ findWord("Biltre larvado", "biltre") => 6
+*/
+int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice = 0);
+
+/**
+ Similar to std::string::find but return the next index of the first char
+ it finds.
+ Case insensitive.
+*/
+int findChar(QString const& s, QChar letra, uint a_partir_do_indice = 0);
+
+/**
+ Same as findWord but non space chars are eliminated.
+ e.g.
+ findWord("<a href=""></a>", "<a") => 2
+ findSeparableWord("<a href=""></a>", "<a") => 2
+
+ findWord("<\na href=""></a>", "<a") => -1
+ findSeparableWord("<\na href=""></a>", "<a") => 3
+*/
+int findSeparableWord(QString const& s, QString const& palavra, uint a_partir_do_indice = 0);
+
+/**
+ Space means Unicode characters with decimal values
+ 9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR), and 32 (Space).
+*/
+bool isSpace(QChar c);
+
+/**
+ Return -1 if unsuccessful.
+*/
+int nextNonSpaceChar(QString const& s, uint i);
+int nextNonSpaceCharReverse(QString const& s, uint i);
+int nextSpaceChar(QString const& s, uint i);
+
+int nextCharDifferentThan(QChar c, QString const& s, uint i);
+
+/** Return a vector with the words */
+std::vector<QString> tokenize(QString s);
+std::vector<QString> tokenizeWordsSeparatedByDots(QString s);
+std::vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria);
+
+/**
+ Returns a string that has whitespace removed from the start and the end,
+ and which has each sequence of internal whitespace replaced with a single space.
+*/
+QString simplifyWhiteSpace(QString const& s);
+
+/**
+ If char 'caractere' is the last in the string 's' it is removed
+*/
+void removeLastCharIfExists(QString& s, QChar caractere);
+
+QString upperCase(QString const& s);
+QString lowerCase(QString const& s);
+
+/**
+ Remove whitespaces from the end of the string
+*/
+void stripWhiteSpaceFromTheEnd(QString& s);
+
+/**
+ Returns a string that has whitespace removed from the start and the end.
+*/
+void stripWhiteSpace(QString& s);
+
+/**
+ Case insensitive comparisons
+*/
+bool equal(QString const& s1, QString const& s2);
+bool notEqual(QString const& s1, QString const& s2);
+
+bool equal(QChar c1, QChar c2);
+bool notEqual(QChar c1, QChar c2);
+
+
+//_________________________________________________________________________
+
+inline bool isSpace(QChar c)
+{
+ return c.isSpace();
+}
+
+inline bool equal(QString const& s1, QString const& s2)
+{
+ if(s1 == s2)
+ return true;
+ else
+ return s1.lower() == s2.lower();
+}
+
+inline bool notEqual(QString const& s1, QString const& s2)
+{
+ return !(equal(s1, s2));
+}
+
+inline bool equal(QChar c1, QChar c2)
+{
+ return c1.lower() == c2.lower();
+}
+
+inline bool notEqual(QChar c1, QChar c2)
+{
+ return !(equal(c1, c2));
+}
+
+inline QString upperCase(QString const& s)
+{
+ return s.upper();
+}
+
+inline QString lowerCase(QString const& s)
+{
+ return s.lower();
+}
+
+inline QString simplifyWhiteSpace(QString const& s)
+{
+ return s.simplifyWhiteSpace();
+}
+
+inline void removeLastCharIfExists(QString& s, QChar caractere)
+{
+ int index = s.length() - 1;
+ if(s[index] == caractere)
+ s.remove(index);
+}
+
+inline void stripWhiteSpace(QString& s)
+{
+ s = s.stripWhiteSpace();
+}
+
+
+
+
+#endif
diff --git a/klinkstatus/src/parser/node.cpp b/klinkstatus/src/parser/node.cpp
new file mode 100644
index 00000000..068184ae
--- /dev/null
+++ b/klinkstatus/src/parser/node.cpp
@@ -0,0 +1,255 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "node.h"
+#include "mstring.h"
+#include "url.h"
+#include "../utils/utils.h"
+
+
+/*
+ Node________________________________________________________________________
+*/
+
+QString Node::getAttribute(QString const& atributo)
+{
+ QString attribute_;
+ int fim = - 1;
+ bool tem_aspas_ou_plicas = false;
+
+ int inicio = findWord(content_, atributo);
+ if(inicio != -1)
+ {
+ if(content_[inicio] == '"')
+ {
+ fim = content_.find("\"", inicio + 1);
+ tem_aspas_ou_plicas = true;
+ }
+ else if(content_[inicio] == '\'')
+ {
+ fim = content_.find("'", inicio + 1);
+ tem_aspas_ou_plicas = true;
+ }
+ else
+ {
+ int fim_bloco = nextSpaceChar(content_, inicio + 1);
+ int fim_tag = content_.find(">", inicio + 1);
+ int fim_aspas = content_.find("\"", inicio + 1);
+
+ if(fim_bloco == -1 && fim_tag == -1 && fim_aspas == -1)
+ {
+ attribute_ = content_;
+ malformed_ = true;
+ return attribute_;
+ }
+
+ if(smallerUnsigned(fim_bloco, fim_tag) == -1 &&
+ smallerUnsigned(fim_bloco, fim_aspas) == -1)
+ fim = fim_bloco;
+
+ else if(smallerUnsigned(fim_tag, fim_aspas) == -1)
+ fim = fim_tag;
+
+ else
+ fim = fim_aspas;
+ }
+
+ if(fim == -1)
+ {
+ attribute_ = content_;
+ malformed_ = true;
+ return attribute_;
+ }
+
+ attribute_ = content_.mid(inicio, fim-inicio);
+
+ if(tem_aspas_ou_plicas)
+ {
+ attribute_ = attribute_.mid(1, attribute_.length() - 1);
+ }
+ else
+ {
+ ::stripWhiteSpace(attribute_);
+ }
+ }
+
+ else
+ {
+ attribute_ = "";
+ }
+ ::decode(attribute_);
+
+ return attribute_;
+}
+
+
+/*
+ NodeLink________________________________________________________________________
+*/
+
+void NodeLink::parseAttributeHREF()
+{
+ if(findWord(content(), "HREF") == -1 &&
+ findWord(content(), "NAME") == -1 &&
+ findWord(content(), "TARGET") == -1)
+ {
+ kdDebug(23100) << "MALFORMED: " << endl
+ << "NodeLink::parseAttributeHREF: " << content() << endl;
+ setMalformed(true);
+ return;
+ }
+
+ else if(findWord(content(), "HREF") != -1)
+ {
+ attribute_href_ = getAttribute("HREF=");
+
+ if( !(malformed() || attribute_href_.isEmpty()) )
+ {
+ // Definnishr o tipo de link
+ linktype_ = Url::resolveLinkType(attribute_href_);
+
+ parseLinkLabel();
+ }
+ }
+}
+
+void NodeLink::parseLinkLabel()
+{
+ int fim_tag = 0;
+ char proximo_caractere = ' ';
+
+ do
+ {
+ fim_tag = content_.find(">", fim_tag);
+
+ if(fim_tag != -1)
+ proximo_caractere = QChar(content_[++fim_tag]);
+
+ }
+ while(fim_tag != -1 && proximo_caractere == '<'/*If the label starts by <*/);
+
+ if(fim_tag != -1)
+ {
+ int fim_label = content_.find("<", fim_tag);
+
+ if(fim_label != -1)
+ {
+ link_label_ =
+ ::simplifyWhiteSpace(content_.mid(fim_tag,
+ fim_label - fim_tag));
+ }
+ }
+}
+
+
+/*
+ NodeMETA________________________________________________________________________
+*/
+
+void NodeMETA::parseAttributeURL()
+{
+ if(attribute_http_equiv_.isEmpty())
+ parseAttributeHTTP_EQUIV();
+
+ if(upperCase(attribute_http_equiv_) == "REFRESH")
+ {
+ is_redirection_ = true;
+
+ if(findWord(content(), "URL") == -1)
+ {
+ //setMalformed(true);
+ return;
+ }
+
+ attribute_url_ = getAttribute("URL=");
+
+ int aspas = -1;
+ do
+ {
+ aspas = attribute_url_.find("\"");
+ if(aspas != -1)
+ attribute_url_.remove(aspas, 1);
+ }
+ while(aspas != -1);
+
+ if(attribute_url_.isEmpty())
+ kdDebug(23100) << "void NodeMeta::parseAttributeURL(): Assertion `!attribute_url_.isEmpty()' failed.\n"
+ << content_ << endl << attribute_http_equiv_ << endl << attribute_url_ << endl;
+ Q_ASSERT(!attribute_url_.isEmpty());
+
+ linktype_ = Url::resolveLinkType(attribute_url_);
+ }
+}
+
+QString NodeMETA::charset() const
+{
+ QString charset;
+ QString content(atributoCONTENT());
+
+ if(content.isEmpty())
+ return charset;
+
+ int index = content.find("charset=");
+ if(index != -1)
+ {
+ index += QString("charset=").length();
+ charset = content.mid(index, content.length() - index);
+ charset = charset.stripWhiteSpace();
+ }
+
+// kdDebug(23100) << "Charset: |" << charset << "|" << endl;
+ return charset;
+}
+
+/*
+ NodeIMG________________________________________________________________________
+*/
+
+void NodeIMG::parseAttributeSRC()
+{
+ if(findWord(content(), "SRC") == -1)
+ {
+ kdDebug(23100) << "MALFORMED_____________________________________________________________" << endl;
+ kdDebug(23100) << "Conteudo: " << content() << endl;
+ setMalformed(true);
+ return;
+ }
+
+ attribute_src_ = getAttribute("SRC=");
+ linktype_ = Url::resolveLinkType(attribute_src_);
+}
+
+
+/*
+ NodeFRAME________________________________________________________________________
+*/
+
+void NodeFRAME::parseAttributeSRC()
+{
+ if(findWord(content(), "SRC") == -1)
+ {
+ //setMalformed(true);
+ return;
+ }
+
+ attribute_src_ = getAttribute("SRC=");
+ linktype_ = Url::resolveLinkType(attribute_src_);
+}
+
diff --git a/klinkstatus/src/parser/node.h b/klinkstatus/src/parser/node.h
new file mode 100644
index 00000000..1d0b1fc3
--- /dev/null
+++ b/klinkstatus/src/parser/node.h
@@ -0,0 +1,279 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 NODULO_H
+#define NODULO_H
+
+#include "mstring.h"
+
+#include <qstring.h>
+
+#include <kdebug.h>
+#include <kcharsets.h>
+
+using namespace std;
+
+typedef unsigned int uint;
+
+
+class Node
+{
+public:
+
+ enum Element {
+ A,
+ AREA,
+ LINK,
+ META,
+ IMG,
+ FRAME,
+ BASE,
+ TITLE
+ };
+ enum LinkType {
+ href,
+ file_href,
+ mailto,
+ relative
+ };
+
+ Node();
+ Node(QString const& content);
+ virtual ~Node();
+
+ QString getAttribute(QString const& atributo);
+ virtual QString const& url() const = 0;
+ virtual QString const& linkLabel() const = 0; // URL label
+ virtual void setNode(QString const& content);
+ virtual void parse() = 0;
+ void setMalformed(bool flag = true);
+ virtual void setLinkType(LinkType const& lt);
+
+ QString const& content() const;
+ bool malformed() const;
+ LinkType linkType() const;
+ Element element() const;
+ virtual bool isLink() const = 0;
+
+ bool isRedirection() const;
+
+protected:
+
+ Element element_;
+ LinkType linktype_;
+ QString link_label_;
+ QString content_;
+ bool is_redirection_;
+ bool malformed_;
+};
+
+
+class NodeLink: public Node
+{
+public:
+ NodeLink();
+ NodeLink(QString const& content);
+ ~NodeLink()
+ {}
+ ;
+
+ virtual void parse();
+
+ virtual QString const& url() const;
+ virtual QString const& linkLabel() const; // URL label
+ virtual QString mailto() const;
+ virtual bool isLink() const;
+
+private:
+ virtual void parseAttributeHREF();
+ void parseLinkLabel();
+
+private:
+ QString attribute_href_;
+};
+
+class NodeA: public NodeLink
+{
+public:
+ NodeA(QString const& content);
+ ~NodeA()
+ {}
+ ;
+ QString const& attributeNAME() const;
+
+ virtual void parse();
+
+private:
+ void parseAttributeNAME();
+
+private:
+ QString attribute_name_;
+};
+
+class NodeAREA: public NodeLink
+{
+public:
+ NodeAREA(QString const& content);
+ ~NodeAREA() {};
+
+ QString const& attributeTITLE() const;
+
+ virtual void parse();
+
+private:
+ void parseAttributeTITLE();
+
+private:
+ QString attribute_title_;
+};
+
+
+class NodeLINK: public NodeLink
+{
+public:
+ NodeLINK(QString const& content);
+ ~NodeLINK()
+ {}
+ ;
+};
+
+class NodeMETA: public Node
+{
+public:
+ NodeMETA();
+ NodeMETA(QString const& content);
+ ~NodeMETA()
+ {}
+ ;
+
+ virtual QString const& url() const;
+ virtual const QString& linkLabel() const;
+ virtual bool isLink() const;
+ QString const& atributoHTTP_EQUIV() const;
+ QString const& atributoNAME() const;
+ QString const& atributoCONTENT() const;
+ QString charset() const;
+ bool isRedirection() const;
+
+ virtual void parse();
+
+private:
+ /**
+ Procura se existem os atributos HTTP-EQUIV=Refresh e URL=...
+ Se existir considera o content do atributo URL como um link.
+ ex: <META HTTP-EQUIV=Refresh CONTENT="10; URL=http://www.htmlhelp.com/">
+ */
+ void parseAttributeURL();
+
+ void parseAttributeHTTP_EQUIV();
+ void parseAttributeNAME();
+ void parseAttributeCONTENT();
+
+private:
+ QString attribute_http_equiv_;
+ QString attribute_url_;
+ QString attribute_name_;
+ QString attribute_content_;
+};
+
+class NodeIMG: public Node
+{
+public:
+ NodeIMG(QString const& content);
+ ~NodeIMG()
+ {}
+ ;
+
+ virtual void parse();
+
+ virtual QString const& url() const;
+ virtual QString const& linkLabel() const; // Image label
+ virtual bool isLink() const;
+
+private:
+ void parseAttributeSRC();
+ void parseAttributeTITLE();
+ void parseAttributeALT();
+
+private:
+ QString attribute_src_;
+ QString attribute_title_;
+ QString attribute_alt_;
+};
+
+class NodeFRAME: public Node
+{
+public:
+ NodeFRAME(QString const& content);
+ ~NodeFRAME()
+ {}
+ ;
+
+ virtual void parse();
+ virtual QString const& url() const;
+ virtual QString const& linkLabel() const;
+ virtual bool isLink() const;
+
+private:
+ void parseAttributeSRC();
+
+private:
+ QString attribute_src_;
+};
+
+class NodeBASE: public NodeLink
+{
+public:
+ NodeBASE();
+ NodeBASE(QString const& content);
+ ~NodeBASE()
+ {}
+ ;
+
+ virtual bool isLink() const;
+};
+
+class NodeTITLE: public Node
+{
+public:
+ NodeTITLE();
+ NodeTITLE(QString const& content);
+ ~NodeTITLE()
+ {}
+ ;
+
+ virtual QString const& url() const;
+ virtual QString const& linkLabel() const;
+ virtual void parse();
+ virtual bool isLink() const;
+
+ QString const& attributeTITLE() const;
+
+private:
+ void parseAttributeTITLE();
+
+private:
+ QString attribute_title_;
+};
+
+
+#include "node_impl.h"
+
+#endif
diff --git a/klinkstatus/src/parser/node_impl.h b/klinkstatus/src/parser/node_impl.h
new file mode 100644
index 00000000..51249075
--- /dev/null
+++ b/klinkstatus/src/parser/node_impl.h
@@ -0,0 +1,412 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+inline Node::Node()
+ : is_redirection_(false), malformed_(false)
+{}
+
+inline Node::~Node()
+{
+ //kdDebug(23100) << "/";
+}
+
+inline Node::Node(QString const& content)
+ : content_(content), is_redirection_(false), malformed_(false)
+{}
+
+inline void Node::setNode(QString const& content)
+{
+ content_ = content;
+ parse();
+}
+
+inline QString const& Node::content() const
+{
+ return content_;
+}
+
+inline bool Node::malformed() const
+{
+ return malformed_;
+}
+
+inline void Node::setMalformed(bool flag)
+{
+ malformed_ = flag;
+}
+
+inline Node::LinkType Node::linkType() const
+{
+ return linktype_;
+}
+
+inline Node::Element Node::element() const
+{
+ return element_;
+}
+
+inline void Node::setLinkType(Node::LinkType const& lt)
+{
+ linktype_ = lt;
+}
+
+inline bool Node::isRedirection() const
+{
+ return is_redirection_;
+}
+
+// class NodeLink_______________________________________________________
+
+inline NodeLink::NodeLink()
+ : Node()
+{}
+
+inline NodeLink::NodeLink(QString const& content)
+ : Node(content)
+{
+ parse();
+}
+
+inline void NodeLink::parse()
+{
+ parseAttributeHREF();
+}
+
+inline QString const& NodeLink::url() const
+{
+ return attribute_href_;
+}
+
+inline QString const& NodeLink::linkLabel() const
+{
+ return link_label_;
+}
+
+inline QString NodeLink::mailto() const
+{
+ Q_ASSERT(linktype_ == Node::mailto);
+
+ QString href = KCharsets::resolveEntities(attribute_href_);
+
+ int inicio = findWord(href, "MAILTO:");
+ Q_ASSERT(inicio != -1);
+
+ return href.mid(inicio);
+}
+
+inline bool NodeLink::isLink() const
+{
+ if(Node::linkType() != Node::mailto && !url().isEmpty())
+ return true;
+ else
+ return false;
+}
+
+// class NodeA_______________________________________________________
+
+inline NodeA::NodeA(QString const& content)
+ : NodeLink(content)
+{
+ element_ = A;
+ parse();
+}
+
+inline QString const& NodeA::attributeNAME() const
+{
+ return attribute_name_;
+}
+
+inline void NodeA::parse()
+{
+ parseAttributeNAME();
+}
+
+inline void NodeA::parseAttributeNAME()
+{
+ attribute_name_ = getAttribute("NAME=");
+ //kdDebug(23100) << "NodeA::parseAttributeNAME: " << attribute_name_ << endl;
+}
+
+// class NodeAREA_______________________________________________________
+
+inline NodeAREA::NodeAREA(QString const& content)
+ : NodeLink(content)
+{
+ element_ = AREA;
+ parse();
+}
+
+inline QString const& NodeAREA::attributeTITLE() const
+{
+ return attribute_title_;
+}
+
+inline void NodeAREA::parse()
+{
+ parseAttributeTITLE();
+}
+
+inline void NodeAREA::parseAttributeTITLE()
+{
+ attribute_title_ = getAttribute("TITLE=");
+//kdDebug(23100) << "NodeAREA::parseAttributeTITLE: " << attribute_title_ << endl;
+}
+
+// class NodeLINK________________________________________
+
+inline NodeLINK::NodeLINK(QString const& content)
+ : NodeLink(content)
+{
+ element_ = LINK;
+}
+
+// class NodeMeta________________________________________
+
+inline NodeMETA::NodeMETA()
+ : Node()
+{
+ element_ = META;
+}
+
+inline NodeMETA::NodeMETA(QString const& content)
+ : Node(content)
+{
+ element_ = META;
+ parse();
+}
+
+inline QString const& NodeMETA::url() const
+{
+ return attribute_url_;
+}
+
+inline const QString& NodeMETA::linkLabel() const
+{
+ return link_label_;
+}
+
+inline bool NodeMETA::isLink() const
+{
+ if(upperCase(attribute_http_equiv_) == "REFRESH" &&
+ findWord(content(), "URL") != -1)
+ {
+ // Q_ASSERT(findWord(content(), "URL") != -1); // not necessarily
+ return true;
+ }
+ else
+ return false;
+}
+
+inline QString const& NodeMETA::atributoHTTP_EQUIV() const
+{
+ return attribute_http_equiv_;
+}
+
+inline QString const& NodeMETA::atributoNAME() const
+{
+ return attribute_name_;
+}
+
+inline QString const& NodeMETA::atributoCONTENT() const
+{
+ return attribute_content_;
+}
+
+inline bool NodeMETA::isRedirection() const
+{
+ return
+ upperCase(attribute_http_equiv_) == "REFRESH";
+}
+
+inline void NodeMETA::parse()
+{
+ parseAttributeHTTP_EQUIV();
+ parseAttributeNAME();
+ parseAttributeCONTENT();
+
+ parseAttributeURL();
+}
+
+inline void NodeMETA::parseAttributeHTTP_EQUIV()
+{
+ attribute_http_equiv_ = getAttribute("HTTP-EQUIV=");
+}
+
+inline void NodeMETA::parseAttributeNAME()
+{
+ attribute_name_ = getAttribute("NAME=");
+}
+
+inline void NodeMETA::parseAttributeCONTENT()
+{
+ attribute_content_ = getAttribute("CONTENT=");
+// kdDebug(23100) << "CONTENT: " << attribute_content_ << endl;
+}
+
+
+// class NodeIMG________________________________________
+
+inline NodeIMG::NodeIMG(QString const& content)
+ : Node(content)
+{
+ element_ = IMG;
+ parse();
+}
+
+inline void NodeIMG::parse()
+{
+ parseAttributeSRC();
+ parseAttributeTITLE();
+ parseAttributeALT();
+}
+
+inline QString const& NodeIMG::url() const
+{
+ return attribute_src_;
+}
+
+inline QString const& NodeIMG::linkLabel() const
+{
+ if(!attribute_title_.isEmpty())
+ return attribute_title_;
+ else
+ return attribute_alt_;
+}
+
+inline bool NodeIMG::isLink() const
+{
+ if(!url().isEmpty())
+ return true;
+ else
+ return false;
+}
+
+inline void NodeIMG::parseAttributeTITLE()
+{
+ attribute_title_ = getAttribute("TITLE=");
+}
+
+inline void NodeIMG::parseAttributeALT()
+{
+ attribute_alt_ = getAttribute("ALT=");
+}
+
+
+// class NodeFRAME________________________________________
+
+inline NodeFRAME::NodeFRAME(QString const& content)
+ : Node(content)
+{
+ element_ = FRAME;
+ parse();
+}
+
+inline void NodeFRAME::parse()
+{
+ parseAttributeSRC();
+}
+
+inline QString const& NodeFRAME::url() const
+{
+ return attribute_src_;
+}
+
+inline QString const& NodeFRAME::linkLabel() const
+{
+ return link_label_;
+}
+
+inline bool NodeFRAME::isLink() const
+{
+ if(!url().isEmpty())
+ return true;
+ else
+ return false;
+}
+
+// class NodeBASE________________________________________
+
+inline NodeBASE::NodeBASE()
+ : NodeLink()
+{
+ element_ = BASE;
+}
+
+inline NodeBASE::NodeBASE(QString const& content)
+ : NodeLink(content)
+{
+ element_ = BASE;
+}
+
+inline bool NodeBASE::isLink() const
+{
+ return false;
+}
+
+// class NodeTITLE________________________________________
+
+inline NodeTITLE::NodeTITLE()
+ : Node()
+{
+ element_ = TITLE;
+ parse();
+}
+
+inline NodeTITLE::NodeTITLE(QString const& content)
+ : Node(content)
+{
+ element_ = TITLE;
+ parse();
+}
+
+inline QString const& NodeTITLE::url() const
+{
+ return QString::null;
+}
+
+inline QString const& NodeTITLE::linkLabel() const
+{
+ return QString::null;
+}
+
+inline void NodeTITLE::parse()
+{
+ parseAttributeTITLE();
+}
+
+inline bool NodeTITLE::isLink() const
+{
+ return false;
+}
+
+inline QString const& NodeTITLE::attributeTITLE() const
+{
+ return attribute_title_;
+}
+
+inline void NodeTITLE::parseAttributeTITLE()
+{
+ attribute_title_ = content_;
+ attribute_title_.replace("<TITLE>", "", false);
+ attribute_title_.replace("</TITLE>", "", false);
+ attribute_title_.stripWhiteSpace();
+
+ //kdDebug(23100) << "TITLE: " << attribute_title_ << endl;
+}
diff --git a/klinkstatus/src/parser/url.cpp b/klinkstatus/src/parser/url.cpp
new file mode 100644
index 00000000..f7f1f6f8
--- /dev/null
+++ b/klinkstatus/src/parser/url.cpp
@@ -0,0 +1,350 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 <kresolver.h>
+
+#include "url.h"
+#include "mstring.h"
+#include "../utils/utils.h"
+
+#include <kcharsets.h>
+
+
+Node::LinkType Url::resolveLinkType(QString const& url)
+{
+ QString aux(url);
+ aux = KURL::decode_string(aux);
+
+ if(aux.isNull())
+ return Node::relative;
+
+ if(findWord(url, "FILE:") != -1)
+ return Node::file_href;
+ else if(findWord(KCharsets::resolveEntities(url), "MAILTO:") != -1)
+ return Node::mailto;
+ else if( (int)url.find(":/") != -1)
+ return Node::href;
+ else
+ return Node::relative;
+}
+
+KURL Url::normalizeUrl(QString const& string_url, LinkStatus const& link_parent, QString const& document_root)
+{
+ QString _string_url = string_url.stripWhiteSpace();
+
+ QString s_url;
+ KURL base_url;
+
+ // resolve base url
+ if(link_parent.hasBaseURI())
+ base_url = link_parent.baseURI();
+ else
+ base_url = link_parent.absoluteUrl();
+
+ // resolve relative url
+ if(_string_url.isEmpty())
+ return base_url;
+ else if(Url::hasProtocol(_string_url))
+ return KURL(_string_url);
+ else
+ {
+ s_url.prepend(base_url.protocol() + "://" + base_url.host());
+
+ if(_string_url[0] == '/') {
+ if(!base_url.protocol().startsWith("http")) {
+ s_url.append(document_root);
+ }
+ }
+ else {
+ s_url.append(base_url.directory(true, false) + "/");
+ }
+
+ if( (_string_url[0] == ';' || // parameters
+ _string_url[0] == '?' || // query
+ _string_url[0] == '#') ) // fragment or reference
+ {
+ s_url.append(base_url.fileName(false));
+ }
+
+ s_url.append(_string_url);
+ KURL url(s_url);
+ if(base_url.hasUser())
+ url.setUser(base_url.user());
+ if(base_url.hasPass())
+ url.setPass(base_url.pass());
+
+ url.setPort(base_url.port());
+
+ url.cleanPath();
+
+// kdDebug(23100) << "Normalized URL: "
+// << KCharsets::resolveEntities(KURL::decode_string(url.url())) << endl;
+
+ return KURL(KCharsets::resolveEntities(KURL::decode_string(url.url())));
+ }
+}
+
+KURL Url::normalizeUrl(QString const& string_url)
+{
+ QString qs_url(KCharsets::resolveEntities(string_url.stripWhiteSpace()));
+
+ if(qs_url[0] == '/')
+ {
+ KURL url;
+ url.setPath(qs_url);
+ url.cleanPath();
+ return url;
+ }
+
+ else
+ {
+ if(!Url::hasProtocol(qs_url))
+ qs_url.prepend("http://");
+
+ KURL url(qs_url);
+ url.cleanPath();
+ return url;
+ }
+}
+
+bool Url::existUrl(KURL const& url, vector<LinkStatus*> const& v)
+{
+ if(url.prettyURL().isEmpty())
+ return true;
+
+ for(uint i = 0; i != v.size(); ++i)
+ if(v[i]->absoluteUrl() == url)
+ return true;
+
+ return false;
+}
+
+/**
+ www.iscte.pt, iscte.pt => true;
+ iscte.pt, www.iscte.pt => true;
+ www.iscte.pt, alunos.iscte.pt => true; (if restrict = false)
+ www.iscte.pt, alunos.iscte.pt => false; (if restrict = true)
+ alunos.iscte.pt, www.iscte.pt => false;
+ alunos.iscte.pt, iscte.pt => false.
+*/
+// FIXME - Rename this function to sameDomain
+bool Url::equalHost(QString const& host1, QString const& host2, bool restrict)
+{
+ //Q_ASSERT(!host1.isEmpty());
+ //Q_ASSERT(!host2.isEmpty()); // this fails if href="javascript:......."
+ //if(host2.isEmpty())
+ //return false;
+
+ if(host1 == host2)
+ return true;
+
+ QString host1_(KNetwork::KResolver::normalizeDomain(host1));
+ QString host2_(KNetwork::KResolver::normalizeDomain(host2));
+ removeLastCharIfExists(host1_, '/');
+ removeLastCharIfExists(host2_, '/');
+
+ vector<QString> v1 = tokenizeWordsSeparatedByDots(host1_);
+ vector<QString> v2 = tokenizeWordsSeparatedByDots(host2_);
+ uint const size1 = v1.size();
+ uint const size2 = v2.size();
+
+ if( !(size1 >= 1 && size2 >= 1) && // localhost would have size = 1
+ !(host1_[0].isNumber() || host2_[0].isNumber()) ) // not (host == IP)
+ {
+ kdDebug(23100) << "Invalid host: " << host2 << endl;
+ return false;
+ }
+
+ vector<QString>::size_type aux = 0;
+ vector<QString>::size_type aux2 = 0;
+ if(v1[0] == "www")
+ aux = 1;
+ if(v2[0] == "www")
+ aux2 = 1;
+
+ if((size2 - aux2 < size1 - aux) && restrict) // e.g. paradigma.co.pt < linkstatus.paradigma.co.pt
+ return false;
+
+ if(restrict && (size2 - aux2 > size1 - aux)) // e.g. linkstatus.paradigma.co.pt > paradigma.co.pt
+ return false;
+
+ int i = 1;
+ while( ((int)(size1 - i) >= (int)aux) && ((int)(size2 - i) >= (int)aux) )
+ {
+ if( !(v1[size1 - i] == v2[size2 - i]) )
+ return false;
+
+ ++i;
+ }
+
+ return true;
+}
+
+/* This should be done by parsing but I wan't to know when some new scheme comes along :) */
+bool Url::hasProtocol(QString const& url)
+{
+ QString s_url(url);
+ s_url.stripWhiteSpace();
+
+ if(s_url[0] == '/')
+ return false;
+
+ else
+ {
+ KURL url = KURL::fromPathOrURL(s_url);
+ if(!url.protocol().isEmpty())
+ return true;
+ /*
+ if(s_url.startsWith("http:") ||
+ s_url.startsWith("https:") ||
+ s_url.startsWith("ftp:") ||
+ s_url.startsWith("sftp:") ||
+ s_url.startsWith("webdav:") ||
+ s_url.startsWith("webdavs:") ||
+ s_url.startsWith("finger:") ||
+ s_url.startsWith("fish:") ||
+ s_url.startsWith("imap:") ||
+ s_url.startsWith("imaps:") ||
+ s_url.startsWith("lan:") ||
+ s_url.startsWith("ldap:") ||
+ s_url.startsWith("pop3:") ||
+ s_url.startsWith("pop3s:") ||
+ s_url.startsWith("smtp:") ||
+ s_url.startsWith("smtps:") ||
+ s_url.startsWith("file:") ||
+ s_url.startsWith("news:") ||
+ s_url.startsWith("gopher:") ||
+ s_url.startsWith("mailto:") ||
+ s_url.startsWith("telnet:") ||
+ s_url.startsWith("prospero:") ||
+ s_url.startsWith("wais:") ||
+ s_url.startsWith("nntp:") )
+ {
+ return true;
+ }
+ */
+ else
+ return false;
+ }
+}
+
+/**
+ http://linkstatus.paradigma.co.pt/en/index.html&bix=bix -> /en/index.html&bix=bix
+*/
+QString Url::convertToLocal(LinkStatus const* ls)
+{
+ KURL url = ls->absoluteUrl();
+ KURL base_url = ls->rootUrl();
+
+ if(base_url == url)
+ return "./" + url.fileName();
+ else
+ return KURL::relativeURL(base_url, url);
+}
+
+/**
+ If url2 has the same domain has url1 returns true.
+ If restrict, sourceforge.net != quanta.sourceforge.net.
+ Else is equal.
+*/
+bool Url::localDomain(KURL const& url1, KURL const& url2, bool restrict)
+{
+ if(url1.protocol() != url2.protocol())
+ {
+ //kdDebug(23100) << "NOT localDomain" << endl;
+ return false;
+ }
+ else if(!url1.hasHost())
+ {
+ //kdDebug(23100) << "localDomain" << endl;
+ return true;
+ }
+ else
+ {
+ //return ::equalHost(url1.host(), url2.host(), restrict);
+ if(Url::equalHost(url1.host(), url2.host(), restrict))
+ {
+ //kdDebug(23100) << "localDomain" << endl;
+ return true;
+ }
+ else
+ {
+ //kdDebug(23100) << "NOT localDomain" << endl;
+ return false;
+ }
+
+ }
+}
+
+/**
+ Returns true if url2 is a parent of url1.
+*/
+bool Url::parentDir(KURL const& url1, KURL const& url2)
+{
+ if(url1.protocol() != url2.protocol())
+ return false;
+
+ else if(!url1.hasHost())
+ return url2.isParentOf(url1);
+
+ else
+ {
+ if(!equalHost(url1.host(), url2.host()))
+ return false;
+
+ vector<QString> tokens_1 = tokenizeWordsSeparatedBy(url1.directory(true, false), QChar('/'));
+ vector<QString> tokens_2 = tokenizeWordsSeparatedBy(url2.directory(true, false), QChar('/'));
+
+ if(tokens_1.size() == 0)
+ return false;
+
+ //if(tokens_2.size() > tokens_1.size() or tokens_2.size() == 0)
+ //return true;
+ vector<QString>::size_type size = 0;
+ if(tokens_1.size() < tokens_2.size())
+ size = tokens_1.size();
+ else
+ size = tokens_2.size();
+
+ for(vector<QString>::size_type i = 0; i != size; ++i)
+ {
+ if(tokens_2[i] != tokens_1[i])
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool Url::externalLink(KURL const& url1, KURL const& url2, bool restrict)
+{
+ if(url1.protocol() != url2.protocol())
+ {
+ kdDebug(23100) << "externalLink" << endl;
+ return true;
+ }
+ else if(!url1.hasHost() && !url2.hasHost())
+ {
+ kdDebug(23100) << "NOT externalLink" << endl;
+ return false;
+ }
+ else
+ return !Url::equalHost(url1.host(), url2.host(), restrict);
+}
diff --git a/klinkstatus/src/parser/url.h b/klinkstatus/src/parser/url.h
new file mode 100644
index 00000000..6f22743d
--- /dev/null
+++ b/klinkstatus/src/parser/url.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 URL_H
+#define URL_H
+
+#include "../engine/linkstatus.h"
+#include "node.h"
+
+#include <kurl.h>
+#include <qstring.h>
+
+#include <vector>
+
+using namespace std;
+
+
+class LinkStatus;
+
+namespace Url
+{
+Node::LinkType resolveLinkType(QString const& url);
+KURL normalizeUrl(QString const& string_url, LinkStatus const& link_parent, QString const& document_root);
+KURL normalizeUrl(QString const& string_url);
+bool validUrl(KURL const& url);
+bool existUrl(KURL const& url, vector<LinkStatus*> const& v);
+bool equalHost(QString const& host1, QString const& host2, bool restrict = false);
+bool hasProtocol(QString const& url);
+QString convertToLocal(LinkStatus const* ls);
+bool localDomain(KURL const& url1, KURL const& url2, bool restrict = true);
+bool parentDir(KURL const& url1, KURL const& url2);
+bool externalLink(KURL const& url1, KURL const& url2, bool restrict = true);
+}
+
+inline bool validUrl(KURL const& url)
+{
+ return (url.isValid() /*&& url.hasHost()*/);
+}
+
+#endif
diff --git a/klinkstatus/src/tests/data/entities/bull&bladder.jpg b/klinkstatus/src/tests/data/entities/bull&bladder.jpg
new file mode 100644
index 00000000..f83f6c72
--- /dev/null
+++ b/klinkstatus/src/tests/data/entities/bull&bladder.jpg
Binary files differ
diff --git a/klinkstatus/src/tests/data/entities/bull_bladder.jpg b/klinkstatus/src/tests/data/entities/bull_bladder.jpg
new file mode 100644
index 00000000..f83f6c72
--- /dev/null
+++ b/klinkstatus/src/tests/data/entities/bull_bladder.jpg
Binary files differ
diff --git a/klinkstatus/src/tests/data/entities/link_with_html_entities.html b/klinkstatus/src/tests/data/entities/link_with_html_entities.html
new file mode 100644
index 00000000..e4d919c2
--- /dev/null
+++ b/klinkstatus/src/tests/data/entities/link_with_html_entities.html
@@ -0,0 +1,7 @@
+<!--
+ - Both links should not be broken.
+ - The visible text should be bull&bladder.jpg.
+-->
+<img src="bull_bladder.jpg">
+<br/><br/>
+<img src="bull&amp;bladder.jpg"/>
diff --git a/klinkstatus/src/ui/Makefile.am b/klinkstatus/src/ui/Makefile.am
new file mode 100644
index 00000000..7f687d39
--- /dev/null
+++ b/klinkstatus/src/ui/Makefile.am
@@ -0,0 +1,11 @@
+INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/klinkstatus/src/cfg \
+ -I$(top_builddir)/klinkstatus/src $(all_includes)
+METASOURCES = AUTO
+noinst_HEADERS = sessionwidget.h tabwidgetsession.h klshistorycombo.h \
+ resultview.h resultssearchbar.h
+libui_la_LDFLAGS = $(all_libraries)
+libui_la_LIBADD = $(top_builddir)/klinkstatus/src/cfg/libcfg.la
+noinst_LTLIBRARIES = libui.la
+libui_la_SOURCES = sessionwidgetbase.ui sessionwidget.cpp tabwidgetsession.cpp \
+ klshistorycombo.cpp resultview.cpp treeview.cpp resultssearchbar.cpp documentrootdialog.cpp
+SUBDIRS = settings
diff --git a/klinkstatus/src/ui/celltooltip.cpp b/klinkstatus/src/ui/celltooltip.cpp
new file mode 100644
index 00000000..b449cbce
--- /dev/null
+++ b/klinkstatus/src/ui/celltooltip.cpp
@@ -0,0 +1,54 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "celltooltip.h"
+#include "tablelinkstatus.h"
+
+#include <qscrollview.h>
+
+#include <iostream>
+using namespace std;
+
+
+CellToolTip::CellToolTip ( TableLinkstatus * table, QToolTipGroup * group)
+ : QToolTip(table->viewport(), group), table_(table)
+{}
+
+void CellToolTip::maybeTip ( const QPoint & p )
+{
+ QPoint cp = table_->viewportToContents(p);
+
+ int row = table_->rowAt(cp.y());
+ int col = table_->columnAt(cp.x());
+
+ if( row != -1 && col != -1)
+ {
+ if(col == 0 || !table_->textFitsInCell(row, col))
+ {
+ TableItem* item = table_->myItem(row, col);
+ QString tip_string = item->toolTip();
+
+ QRect cr = table_->cellGeometry( row, col );
+ cr.moveTopLeft( table_->contentsToViewport( cr.topLeft() ) );
+
+ tip(cr, tip_string);
+ }
+ }
+}
diff --git a/klinkstatus/src/ui/celltooltip.h b/klinkstatus/src/ui/celltooltip.h
new file mode 100644
index 00000000..33136ceb
--- /dev/null
+++ b/klinkstatus/src/ui/celltooltip.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 CELLTOOLTIP_H
+#define CELLTOOLTIP_H
+
+#include <qtooltip.h>
+
+
+class TableLinkstatus;
+
+class CellToolTip: public QToolTip
+{
+public:
+
+ CellToolTip ( TableLinkstatus * table, QToolTipGroup * group = 0 );
+
+protected:
+
+ virtual void maybeTip ( const QPoint & p );
+
+private:
+
+ TableLinkstatus * table_;
+};
+
+
+#endif
diff --git a/klinkstatus/src/ui/documentrootdialog.cpp b/klinkstatus/src/ui/documentrootdialog.cpp
new file mode 100644
index 00000000..c2ed3e7d
--- /dev/null
+++ b/klinkstatus/src/ui/documentrootdialog.cpp
@@ -0,0 +1,89 @@
+/***************************************************************************
+ * Copyright (C) 2006 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "documentrootdialog.h"
+
+#include <kurlrequester.h>
+#include <klocale.h>
+#include <kurl.h>
+
+#include <qstring.h>
+#include <qlayout.h>
+#include <qlabel.h>
+
+
+DocumentRootDialog::DocumentRootDialog(QWidget *parent, QString const& url)
+ : KDialogBase(parent, "DocumentRootDialog", true, "Choose a Document Root",
+ KDialogBase::Ok, KDialogBase::Ok, true),
+ m_url(url)
+{
+ QWidget* page = new QWidget(this);
+ setMainWidget(page);
+ QVBoxLayout* topLayout = new QVBoxLayout(page, 0, spacingHint());
+
+ QLabel* label = new QLabel(i18n("As you are using a protocol different than HTTP, \nthere is no way to guess where the document root is, \nin order to resolve relative URLs like the ones started with \"/\".\n\nPlease specify one:"), page);
+ topLayout->addWidget(label);
+
+ m_urlRequester = new KURLRequester(page);
+ m_urlRequester->setURL(url);
+ m_urlRequester->setMinimumWidth(fontMetrics().maxWidth()*20);
+ m_urlRequester->setFocus();
+ topLayout->addWidget(m_urlRequester);
+
+ topLayout->addStretch(10);
+
+ // setInitialSize(configDialogSize("klinkstatus"));
+
+ m_urlRequester->setMode(KFile::Directory);
+// enableButtonOK(false);
+
+ connect(m_urlRequester, SIGNAL(textChanged (const QString &)),
+ this, SLOT(slotTextChanged (const QString &)));
+ connect(m_urlRequester, SIGNAL(returnPressed (const QString &)),
+ this, SLOT(slotReturnPressed (const QString &)));
+ connect(m_urlRequester, SIGNAL(urlSelected (const QString &)),
+ this, SLOT(slotTextChanged (const QString &)));
+}
+
+DocumentRootDialog::~DocumentRootDialog()
+{
+ saveDialogSize("klinkstatus", true);
+}
+
+void DocumentRootDialog::slotReturnPressed( const QString & )
+{
+ slotOk();
+}
+
+void DocumentRootDialog::slotTextChanged( const QString & s)
+{
+ KURL url(s);
+ enableButtonOK(!s.isEmpty() && url.isValid());
+}
+
+void DocumentRootDialog::slotOk( )
+{
+ m_url = m_urlRequester->url();
+
+ KDialogBase::slotOk();
+}
+
+
+
+#include "documentrootdialog.moc"
diff --git a/klinkstatus/src/ui/documentrootdialog.h b/klinkstatus/src/ui/documentrootdialog.h
new file mode 100644
index 00000000..52696727
--- /dev/null
+++ b/klinkstatus/src/ui/documentrootdialog.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+ * Copyright (C) 2006 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 DOCUMENTROOTDIALOG_H
+#define DOCUMENTROOTDIALOG_H
+
+#include <kdialogbase.h>
+
+class KURLRequester;
+
+/**
+ @author Paulo Moura Guedes <moura@kdewebdev.org>
+*/
+class DocumentRootDialog : public KDialogBase
+{
+Q_OBJECT
+public:
+ DocumentRootDialog(QWidget *parent, QString const& url);
+ ~DocumentRootDialog();
+
+ void setUrl(const QString& theValue) { m_url = theValue; }
+ QString url() const { return m_url; }
+
+
+protected:
+ virtual void closeEvent (QCloseEvent*) {}
+
+protected slots:
+ virtual void reject() {}
+ virtual void slotOk();
+
+private slots:
+ void slotTextChanged(const QString &);
+ void slotReturnPressed(const QString &);
+
+private:
+ KURLRequester* m_urlRequester;
+ QString m_url;
+};
+
+#endif
diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp
new file mode 100644
index 00000000..36deb385
--- /dev/null
+++ b/klinkstatus/src/ui/klshistorycombo.cpp
@@ -0,0 +1,198 @@
+//
+// C++ Implementation: klshistorycombo
+//
+// Description:
+//
+//
+// Author: Paulo Moura Guedes <moura@kdewebdev.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "klshistorycombo.h"
+#include "klsconfig.h"
+
+#include <kapplication.h>
+#include <kconfig.h>
+#include <kcompletionbox.h>
+#include <kdebug.h>
+#include <kstdaccel.h>
+#include <kurldrag.h>
+#include <kglobalsettings.h>
+
+
+bool KLSHistoryCombo::items_saved_ = false;
+
+
+KLSHistoryCombo::KLSHistoryCombo(QWidget *parent, const char *name)
+ : KHistoryCombo(parent, name)
+{
+ setMaxCount(KLSConfig::maxCountComboUrl());
+
+ setDuplicatesEnabled(false);
+ setAutoCompletion(false);
+
+ connect(this, SIGNAL(activated(const QString& )),
+ this, SLOT(addToHistory(const QString& )));
+}
+
+KLSHistoryCombo::~KLSHistoryCombo()
+{}
+
+void KLSHistoryCombo::init()
+{
+ loadItems();
+}
+
+void KLSHistoryCombo::saveItems()
+{
+ if(items_saved_)
+ return;
+
+ QStringList items = historyItems();
+
+ KLSConfig::setComboUrlHistory(items);
+ KLSConfig::writeConfig();
+
+ items_saved_ = true;
+}
+
+void KLSHistoryCombo::loadItems()
+{
+ clear();
+
+ QStringList items = KLSConfig::comboUrlHistory();
+
+ bool block = signalsBlocked();
+ blockSignals( true );
+
+ setHistoryItems(items);
+ blockSignals(block);
+
+ completionObject()->setItems(items);
+
+ setCompletionMode(KGlobalSettings::completionMode());
+}
+
+bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev )
+{
+ // Handle Ctrl+Del/Backspace etc better than the Qt widget, which always
+ // jumps to the next whitespace.
+ QLineEdit *edit = lineEdit();
+ if ( o == edit )
+ {
+ int type = ev->type();
+ if ( type == QEvent::KeyPress )
+ {
+ QKeyEvent *e = static_cast<QKeyEvent *>( ev );
+
+ if ( e->key() == Key_Return || e->key() == Key_Enter )
+ {
+ //m_modifier = e->state();
+ return false;
+ }
+
+ int delete_word_back = KStdAccel::deleteWordBack().keyCodeQt();
+ int delete_word_forward = KStdAccel::deleteWordForward().keyCodeQt();
+
+ if ( KKey( e ) == KKey(delete_word_back) ||
+ KKey( e ) == KKey(delete_word_forward) ||
+ ((e->state() & ControlButton) &&
+ (e->key() == Key_Left || e->key() == Key_Right) ) )
+ {
+ selectWord(e);
+ e->accept();
+ return true;
+ }
+ }
+
+ else if ( type == QEvent::MouseButtonDblClick )
+ {
+ edit->selectAll();
+ return true;
+ }
+ }
+ return KComboBox::eventFilter( o, ev );
+}
+
+/*
+ Handle Ctrl+Cursor etc better than the Qt widget, which always
+ jumps to the next whitespace. This code additionally jumps to
+ the next [/#?:], which makes more sense for URLs. The list of
+ chars that will stop the cursor are '/', '.', '?', '#', ':'.
+*/
+void KLSHistoryCombo::selectWord(QKeyEvent *e)
+{
+ QLineEdit* edit = lineEdit();
+ QString text = edit->text();
+ int pos = edit->cursorPosition();
+ int pos_old = pos;
+ int count = 0;
+
+ // TODO: make these a parameter when in kdelibs/kdeui...
+ QValueList<QChar> chars;
+ chars << QChar('/') << QChar('.') << QChar('?') << QChar('#') << QChar(':');
+ bool allow_space_break = true;
+
+ if( e->key() == Key_Left || e->key() == Key_Backspace )
+ {
+ do
+ {
+ pos--;
+ count++;
+ if( allow_space_break && text[pos].isSpace() && count > 1 )
+ break;
+ }
+ while( pos >= 0 && (chars.findIndex(text[pos]) == -1 || count <= 1) );
+
+ if( e->state() & ShiftButton )
+ {
+ edit->cursorForward(true, 1-count);
+ }
+ else if( e->key() == Key_Backspace )
+ {
+ edit->cursorForward(false, 1-count);
+ QString text = edit->text();
+ int pos_to_right = edit->text().length() - pos_old;
+ QString cut = text.left(edit->cursorPosition()) + text.right(pos_to_right);
+ edit->setText(cut);
+ edit->setCursorPosition(pos_old-count+1);
+ }
+ else
+ {
+ edit->cursorForward(false, 1-count);
+ }
+ }
+ else if( e->key() == Key_Right || e->key() == Key_Delete )
+ {
+ do
+ {
+ pos++;
+ count++;
+ if( allow_space_break && text[pos].isSpace() )
+ break;
+ }
+ while( pos < (int) text.length() && chars.findIndex(text[pos]) == -1 );
+
+ if( e->state() & ShiftButton )
+ {
+ edit->cursorForward(true, count+1);
+ }
+ else if( e->key() == Key_Delete )
+ {
+ edit->cursorForward(false, -count-1);
+ QString text = edit->text();
+ int pos_to_right = text.length() - pos - 1;
+ QString cut = text.left(pos_old) +
+ (pos_to_right > 0 ? text.right(pos_to_right) : QString() );
+ edit->setText(cut);
+ edit->setCursorPosition(pos_old);
+ }
+ else
+ {
+ edit->cursorForward(false, count+1);
+ }
+ }
+}
+
+#include "klshistorycombo.moc"
diff --git a/klinkstatus/src/ui/klshistorycombo.h b/klinkstatus/src/ui/klshistorycombo.h
new file mode 100644
index 00000000..ab990a1e
--- /dev/null
+++ b/klinkstatus/src/ui/klshistorycombo.h
@@ -0,0 +1,42 @@
+//
+// C++ Interface: klshistorycombo
+//
+// Description:
+//
+//
+// Author: Paulo Moura Guedes <moura@kdewebdev.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef KLSHISTORYCOMBO_H
+#define KLSHISTORYCOMBO_H
+
+#include <kcombobox.h>
+class KConfig;
+
+/**
+@author Paulo Moura Guedes
+Based on KonqCombo
+*/
+class KLSHistoryCombo : public KHistoryCombo
+{
+ Q_OBJECT
+
+public:
+ KLSHistoryCombo(QWidget* parent, const char* name);
+ ~KLSHistoryCombo();
+
+ void init();
+ void loadItems();
+ void saveItems();
+
+protected:
+ virtual bool eventFilter(QObject* o, QEvent* ev);
+ void selectWord(QKeyEvent* e);
+
+private:
+ static bool items_saved_;
+};
+
+#endif
diff --git a/klinkstatus/src/ui/resultssearchbar.cpp b/klinkstatus/src/ui/resultssearchbar.cpp
new file mode 100644
index 00000000..7f772b54
--- /dev/null
+++ b/klinkstatus/src/ui/resultssearchbar.cpp
@@ -0,0 +1,236 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "resultssearchbar.h"
+
+#include <kcombobox.h>
+#include <kiconloader.h>
+#include <klineedit.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <kdebug.h>
+
+#include <qapplication.h>
+#include <qhbox.h>
+#include <qlabel.h>
+#include <qpixmap.h>
+#include <qstring.h>
+#include <qtimer.h>
+#include <qtoolbutton.h>
+#include <qtooltip.h>
+#include <qlayout.h>
+
+
+class ResultsSearchBar::ResultsSearchBarPrivate
+{
+public:
+ ResultsSearchBarPrivate()
+ : layout(0), searchLine(0), searchCombo(0), delay(400), m_lastComboIndex(0)
+ {}
+
+ QString searchText;
+ QTimer timer;
+ QHBoxLayout* layout;
+ KLineEdit* searchLine;
+ KComboBox* searchCombo;
+ int delay;
+ int m_lastComboIndex;
+};
+
+ResultsSearchBar::ResultsSearchBar(QWidget* parent, const char* name)
+ : QWidget(parent, name), d(new ResultsSearchBar::ResultsSearchBarPrivate)
+{
+ setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
+
+ d->layout = new QHBoxLayout(this);
+ d->layout->setMargin(2);
+ d->layout->setSpacing(5);
+
+ QToolButton* clearButton = new QToolButton(this);
+ clearButton->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
+ clearButton->setAutoRaise(true);
+ d->layout->addWidget(clearButton);
+
+ QLabel* searchLabel = new QLabel(this);
+ searchLabel->setText(i18n("S&earch:"));
+ d->layout->addWidget(searchLabel);
+
+ d->searchLine = new KLineEdit(this, "searchline");
+ connect(d->searchLine, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotSearchStringChanged(const QString &)));
+
+ searchLabel->setBuddy(d->searchLine);
+ d->layout->addWidget(d->searchLine);
+
+ QLabel* statusLabel = new QLabel(this);
+ statusLabel->setText( i18n("Status:") );
+ d->layout->addWidget(statusLabel);
+
+ d->searchCombo = new KComboBox(this, "searchcombo");
+ QPixmap iconAll = KGlobal::iconLoader()->loadIcon("exec", KIcon::Small);
+ QPixmap iconGood = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ QPixmap iconBroken = KGlobal::iconLoader()->loadIcon("no", KIcon::Small);
+ QPixmap iconMalformed = KGlobal::iconLoader()->loadIcon("bug", KIcon::Small);
+ QPixmap iconUndetermined = KGlobal::iconLoader()->loadIcon("help", KIcon::Small);
+
+ d->searchCombo->insertItem(iconAll, i18n("All Links"));
+ d->searchCombo->insertItem(iconGood, i18n("Good Links"));
+ d->searchCombo->insertItem(iconBroken, i18n("Broken Links"));
+ d->searchCombo->insertItem(iconMalformed, i18n("Malformed Links"));
+ d->searchCombo->insertItem(iconUndetermined, i18n("Undetermined Links"));
+ d->layout->addWidget(d->searchCombo);
+
+ QToolTip::add(clearButton, i18n("Clear filter"));
+ QToolTip::add( d->searchLine, i18n("Enter the terms to filter the result link list"));
+ QToolTip::add( d->searchCombo, i18n("Choose what kind of link status to show in result list"));
+
+ connect(clearButton, SIGNAL( clicked() ),
+ this, SLOT(slotClearSearch()) );
+
+ connect(d->searchCombo, SIGNAL(activated(int)),
+ this, SLOT(slotSearchComboChanged(int)));
+
+ connect(&(d->timer), SIGNAL(timeout()), this, SLOT(slotActivateSearch()));
+}
+
+ResultsSearchBar::~ResultsSearchBar()
+{
+ delete d;
+ d = 0;
+}
+
+QString const& ResultsSearchBar::text() const
+{
+ return d->searchText;
+}
+
+int ResultsSearchBar::status() const
+{
+ return d->searchCombo->currentItem();
+}
+
+void ResultsSearchBar::setDelay(int ms)
+{
+ d->delay = ms;
+}
+
+int ResultsSearchBar::delay() const
+{
+ return d->delay;
+}
+
+void ResultsSearchBar::slotClearSearch()
+{
+ if(status() != 0 || !d->searchLine->text().isEmpty())
+ {
+ d->searchLine->clear();
+ d->searchCombo->setCurrentItem(0);
+ d->timer.stop();
+ slotActivateSearch();
+ }
+}
+
+void ResultsSearchBar::slotSetStatus(int status)
+{
+ d->searchCombo->setCurrentItem(status);
+}
+
+void ResultsSearchBar::slotSetText(const QString& text)
+{
+ d->searchLine->setText(text);
+}
+
+void ResultsSearchBar::slotSearchComboChanged(int index)
+{
+ if(d->timer.isActive())
+ d->timer.stop();
+
+ if(d->m_lastComboIndex == index)
+ return;
+
+ d->m_lastComboIndex = index;
+
+ d->timer.start(200, true);
+}
+
+void ResultsSearchBar::slotSearchStringChanged(const QString& search)
+{
+ if(d->timer.isActive())
+ d->timer.stop();
+
+ if(d->searchText == search)
+ return;
+
+ d->searchText = search;
+
+ d->timer.start(200, true);
+}
+
+void ResultsSearchBar::slotActivateSearch()
+{
+ kdDebug(23100) << "ResultsSearchBar::slotActivateSearch" << endl;
+
+ ResultView::Status status = selectedStatus();
+
+ emit signalSearch(LinkMatcher(d->searchLine->text(), status));
+}
+
+LinkMatcher ResultsSearchBar::currentLinkMatcher() const
+{
+ return LinkMatcher(d->searchLine->text(), selectedStatus());
+}
+
+ResultView::Status ResultsSearchBar::selectedStatus() const
+{
+ ResultView::Status status = ResultView::none;
+
+ if(d->searchCombo->currentItem())
+ {
+ switch(d->searchCombo->currentItem())
+ {
+ case 1: // Good
+ {
+ status = ResultView::good;
+ break;
+ }
+ case 2: // Broken
+ {
+ status = ResultView::bad;
+ break;
+ }
+ case 3: // Malformed
+ {
+ status = ResultView::malformed;
+ break;
+ }
+ case 4: // Undetermined
+ {
+ status = ResultView::undetermined;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ return status;
+}
+
+
+#include "resultssearchbar.moc"
diff --git a/klinkstatus/src/ui/resultssearchbar.h b/klinkstatus/src/ui/resultssearchbar.h
new file mode 100644
index 00000000..67d30a99
--- /dev/null
+++ b/klinkstatus/src/ui/resultssearchbar.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 RESULTSSEARCHBAR_H
+#define RESULTSSEARCHBAR_H
+
+#include <qstring.h>
+
+#include "resultview.h"
+#include "../engine/linkfilter.h"
+
+/**
+ @author Paulo Moura Guedes <moura@kdewebdev.org>
+ Based on Akregator code. Kudos ;)
+*/
+class ResultsSearchBar : public QWidget
+{
+ Q_OBJECT
+public:
+ ResultsSearchBar(QWidget *parent = 0, const char *name = 0);
+ ~ResultsSearchBar();
+
+ QString const& text() const;
+ int status() const;
+
+ void setDelay(int ms);
+ int delay() const;
+
+ LinkMatcher currentLinkMatcher() const;
+
+signals:
+ /** emitted when the text and status filters were updated. Params are textfilter, statusfilter */
+ void signalSearch(LinkMatcher);
+
+public slots:
+ void slotClearSearch();
+ void slotSetStatus(int status);
+ void slotSetText(const QString& text);
+
+private slots:
+
+ void slotSearchStringChanged(const QString& search);
+ void slotSearchComboChanged(int index);
+ void slotActivateSearch();
+
+private:
+
+ ResultView::Status selectedStatus() const;
+
+private:
+
+ class ResultsSearchBarPrivate;
+ ResultsSearchBarPrivate* d;
+};
+
+#endif
diff --git a/klinkstatus/src/ui/resultview.cpp b/klinkstatus/src/ui/resultview.cpp
new file mode 100644
index 00000000..4078bfca
--- /dev/null
+++ b/klinkstatus/src/ui/resultview.cpp
@@ -0,0 +1,184 @@
+//
+// C++ Implementation: resultlinkview
+//
+// Description:
+//
+//
+// Author: Paulo Moura Guedes <moura@kdewebdev.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "resultview.h"
+#include "../engine/linkstatus.h"
+
+#include <qpainter.h>
+#include <qcolor.h>
+
+#include <klocale.h>
+#include <kurl.h>
+#include <kiconloader.h>
+
+const QString ResultView::URL_LABEL = "URL";
+const QString ResultView::STATUS_LABEL = "Status";
+const QString ResultView::MARKUP_LABEL = "Markup";
+const QString ResultView::LINK_LABEL_LABEL = "Label";
+
+
+// ******************************* ResultView ********************************
+
+ResultView::ResultView()
+ : col_status_(-1),
+ col_label_(-1),
+ col_url_(-1),
+ col_markup_(-1),
+ sub_menu_(0),
+ cell_tip_(0)
+{}
+
+
+ResultView::~ResultView()
+{}
+
+void ResultView::setColumns(QStringList const& columns)
+{
+ Q_ASSERT(columns.size() != 0);
+
+ columns_.clear();
+ for(uint i = 0; i != columns.size(); ++i)
+ {
+ if(columns[i] == ResultView::URL_LABEL)
+ {
+ col_url_ = i + 1;
+ }
+ else if(columns[i] == ResultView::STATUS_LABEL)
+ {
+ col_status_ = i + 1;
+ }
+ else if(columns[i] == ResultView::MARKUP_LABEL)
+ {
+ col_markup_ = i + 1;
+ }
+ else if(columns[i] == ResultView::LINK_LABEL_LABEL)
+ {
+ col_label_ = i + 1;
+ }
+
+ columns_.push_back(columns[i]);
+ }
+ number_of_columns_ = columns.size();
+}
+
+bool ResultView::displayableWithStatus(LinkStatus const* ls, Status const& status)
+{
+ if(status == ResultView::good)
+ {
+ return
+ ls->status() == LinkStatus::SUCCESSFULL ||
+ ls->status() == LinkStatus::HTTP_REDIRECTION;
+ }
+ else if(status == ResultView::bad)
+ {
+ return
+ ls->status() == LinkStatus::BROKEN ||
+ ls->status() == LinkStatus::HTTP_CLIENT_ERROR ||
+ ls->status() == LinkStatus::HTTP_SERVER_ERROR;
+ }
+ else if(status == ResultView::malformed)
+ {
+ return ls->status() == LinkStatus::MALFORMED;
+ }
+ else if(status == ResultView::undetermined)
+ {
+ return
+ ls->status() == LinkStatus::UNDETERMINED ||
+ ls->status() == LinkStatus::TIMEOUT ||
+ ls->status() == LinkStatus::NOT_SUPPORTED;
+ }
+ else
+ return true;
+}
+
+
+// ******************************* ResultViewItem *****************************
+
+ResultViewItem::ResultViewItem(LinkStatus const* linkstatus, int column_index)
+ : ls_((LinkStatus*)linkstatus), column_index_(column_index)
+{
+ Q_ASSERT(ls_);
+ Q_ASSERT(column_index_ > 0);
+}
+
+ResultViewItem::~ResultViewItem()
+{}
+
+void ResultViewItem::setColumnIndex(int i)
+{
+ Q_ASSERT(i > 0);
+ column_index_ = i;
+}
+
+int ResultViewItem::columnIndex() const
+{
+ return column_index_;
+}
+
+LinkStatus const* ResultViewItem::linkStatus() const
+{
+ Q_ASSERT(ls_);
+ return ls_;
+}
+
+QColor const& ResultViewItem::textStatusColor() const
+{
+ if(linkStatus()->errorOccurred())
+ {
+ //kdDebug(23100) << "ERROR: " << linkStatus()->error() << ": " << linkStatus()->absoluteUrl().prettyURL() << endl;
+ if(linkStatus()->error() == i18n( "Javascript not supported" ))
+ return Qt::lightGray;
+ else
+ return Qt::red;
+ }
+
+ else if(linkStatus()->absoluteUrl().hasRef())
+ return Qt::blue;
+
+ else if(!linkStatus()->absoluteUrl().protocol().startsWith("http"))
+ return Qt::darkGreen;
+
+ else
+ {
+ QString status_code(QString::number(linkStatus()->httpHeader().statusCode()));
+
+ if(status_code[0] == '0')
+ {
+ kdWarning(23100) << "status code == 0: " << endl;
+ kdWarning(23100) << linkStatus()->toString() << endl;
+ kdWarning(23100) << linkStatus()->httpHeader().toString() << endl;
+ }
+ //Q_ASSERT(status_code[0] != '0');
+
+ if(status_code[0] == '5')
+ return Qt::darkMagenta;
+
+ else if(status_code[0] == '4')
+ return Qt::red;
+
+ else if(status_code[0] == '3')
+ return Qt::blue;
+
+ else if(status_code[0] == '2')
+ return Qt::darkGreen;
+
+ else
+ return Qt::red;
+ }
+}
+
+
+
+
+
+
+
+
diff --git a/klinkstatus/src/ui/resultview.h b/klinkstatus/src/ui/resultview.h
new file mode 100644
index 00000000..e6d3e789
--- /dev/null
+++ b/klinkstatus/src/ui/resultview.h
@@ -0,0 +1,134 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 RESULTVIEW_H
+#define RESULTVIEW_H
+
+#include <qvaluevector.h>
+#include <qpopupmenu.h>
+#include <qstringlist.h>
+
+class KURL;
+
+class LinkStatus;
+class CellToolTip;
+
+
+/**
+@author Paulo Moura Guedes
+*/
+class ResultView
+{
+public:
+
+ static const QString URL_LABEL;
+ static const QString STATUS_LABEL;
+ static const QString MARKUP_LABEL;
+ static const QString LINK_LABEL_LABEL;
+
+ enum Status {
+ none = 0,
+ good,
+ bad,
+ malformed,
+ undetermined // timeouts and refs
+ };
+
+ ResultView();
+ virtual ~ResultView();
+
+ //virtual void insertResult(LinkStatus const* linkstatus) = 0;
+ virtual void clear() = 0;
+ virtual void show(Status const& status) = 0;
+ virtual void showAll() = 0;
+ //virtual void ensureCellVisible(int row, int col) = 0;
+
+ virtual void setColumns(QStringList const& columns);
+ static bool displayableWithStatus(LinkStatus const* ls, Status const& status);
+
+ int numberOfColumns() const { return number_of_columns_; }
+
+ int urlColumnIndex() const {return col_url_; }
+ int statusColumnIndex() const {return col_status_; }
+ int markupColumnIndex() const {return col_markup_; }
+ int labelColumnIndex() const {return col_label_; }
+
+protected:
+ //virtual bool textFitsInCell(int row, int col) const = 0;
+ virtual bool isEmpty() const = 0;
+ virtual void loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root = false) = 0;
+
+protected slots:
+
+ //virtual void slotPopupContextMenu(int row, int col, const QPoint& pos) = 0;
+ virtual void slotCopyUrlToClipboard() const = 0;
+ virtual void slotCopyParentUrlToClipboard() const = 0;
+ virtual void slotCopyCellTextToClipboard() const = 0;
+ virtual void slotEditReferrersWithQuanta() = 0;
+ virtual void slotEditReferrerWithQuanta(int id) = 0;
+ virtual void slotEditReferrerWithQuanta(KURL const& url) = 0;
+ virtual void slotViewUrlInBrowser() = 0;
+ virtual void slotViewParentUrlInBrowser() = 0;
+
+protected:
+ QStringList columns_;
+ int col_status_;
+ int col_label_;
+ int col_url_;
+ int col_markup_; // optional
+ QPopupMenu context_table_menu_;
+ QPopupMenu* sub_menu_;
+ CellToolTip* cell_tip_;
+
+private:
+ int number_of_columns_;
+};
+
+
+class ResultViewItem
+{
+public:
+ ResultViewItem(LinkStatus const* linkstatus,
+ int column_index);
+ virtual ~ResultViewItem();
+
+ virtual void setColumnIndex(int i);
+ virtual int columnIndex() const;
+
+ virtual QString toolTip() const = 0;
+ LinkStatus const* linkStatus() const;
+
+protected:
+
+ QColor const& textStatusColor() const;
+ virtual void paint( QPainter *p, const QColorGroup &cg,
+ const QRect &cr, bool selected ) = 0;
+ virtual void setText() = 0;
+ virtual void setPixmap() = 0;
+
+protected:
+
+ LinkStatus* ls_;
+ int column_index_;
+ int alignment_;
+};
+
+
+#endif
diff --git a/klinkstatus/src/ui/sessionwidget.cpp b/klinkstatus/src/ui/sessionwidget.cpp
new file mode 100644
index 00000000..da128070
--- /dev/null
+++ b/klinkstatus/src/ui/sessionwidget.cpp
@@ -0,0 +1,723 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 <kapplication.h>
+#include <kurl.h>
+#include <kcombobox.h>
+#include <ksqueezedtextlabel.h>
+#include <kprogress.h>
+#include <kmessagebox.h>
+#include <kconfig.h>
+#include <kiconloader.h>
+#include <kglobal.h>
+#include <kpushbutton.h>
+#include <kfiledialog.h>
+#include <kactionclasses.h>
+#include <ktempfile.h>
+#include <ksavefile.h>
+#include <kstandarddirs.h>
+#include <kio/netaccess.h>
+
+#include <qevent.h>
+#include <qlineedit.h>
+#include <qspinbox.h>
+#include <qcheckbox.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qlistbox.h>
+#include <qstringlist.h>
+#include <qbuttongroup.h>
+#include <qtoolbutton.h>
+#include <qregexp.h>
+
+#include "sessionwidget.h"
+#include "tablelinkstatus.h"
+#include "treeview.h"
+#include "documentrootdialog.h"
+#include "klshistorycombo.h"
+#include "klsconfig.h"
+#include "resultview.h"
+#include "../global.h"
+#include "../engine/linkstatus.h"
+#include "../engine/linkchecker.h"
+#include "../engine/searchmanager.h"
+#include "resultssearchbar.h"
+#include "../actionmanager.h"
+#include "../utils/utils.h"
+#include "../utils/xsl.h"
+
+
+SessionWidget::SessionWidget(int max_simultaneous_connections, int time_out,
+ QWidget* parent, const char* name, WFlags f)
+ : SessionWidgetBase(parent, name, f), search_manager_(0),
+ action_manager_(ActionManager::getInstance()),
+ ready_(true), to_start_(false), to_pause_(false), to_stop_(false),
+ in_progress_(false), paused_(false), stopped_(true),
+ bottom_status_timer_(this, "bottom_status_timer"),
+ max_simultaneous_connections_(max_simultaneous_connections),
+ time_out_(time_out), tree_display_(false), follow_last_link_checked_(KLSConfig::followLastLinkChecked()),
+ start_search_action_(0)
+{
+ newSearchManager();
+
+ init();
+ slotLoadSettings();
+
+ connect(combobox_url, SIGNAL( textChanged ( const QString & ) ),
+ this, SLOT( slotEnableCheckButton( const QString & ) ) );
+
+ connect(tree_view, SIGNAL( clicked ( QListViewItem * ) ),
+ this, SLOT( showBottomStatusLabel( QListViewItem * ) ) );
+
+ connect(&bottom_status_timer_, SIGNAL(timeout()), this, SLOT(clearBottomStatusLabel()) );
+}
+
+SessionWidget::~SessionWidget()
+{
+ //combobox_url->saveItems(); This is done every time a URL is checked
+
+ if(KLSConfig::rememberCheckSettings())
+ saveCurrentCheckSettings();
+}
+
+void SessionWidget::init()
+{
+ combobox_url->init();
+
+ toolButton_clear_combo->setIconSet(SmallIconSet("locationbar_erase"));
+
+ pushbutton_url->setIconSet(KGlobal::iconLoader()->loadIconSet("fileopen", KIcon::Small));
+ QPixmap pixMap = KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Small);
+ pushbutton_url->setFixedSize(pixMap.width() + 8, pixMap.height() + 8);
+ connect(pushbutton_url, SIGNAL(clicked()), this, SLOT(slotChooseUrlDialog()));
+
+ resultsSearchBar->hide();
+
+ start_search_action_ = static_cast<KToggleAction*> (action_manager_->action("start_search"));
+
+ connect(resultsSearchBar, SIGNAL(signalSearch(LinkMatcher)),
+ this, SLOT(slotApplyFilter(LinkMatcher)));
+}
+
+void SessionWidget::slotLoadSettings(bool modify_current_widget_settings)
+{
+ if(modify_current_widget_settings)
+ {
+ checkbox_recursively->setChecked(KLSConfig::recursiveCheck());
+ spinbox_depth->setValue(KLSConfig::depth());
+ checkbox_subdirs_only->setChecked(!KLSConfig::checkParentFolders());
+ checkbox_external_links->setChecked(KLSConfig::checkExternalLinks());
+ tree_display_ = KLSConfig::displayTreeView();
+ tree_view->setTreeDisplay(tree_display_);
+ }
+
+ search_manager_->setTimeOut(KLSConfig::timeOut());
+
+ //kdDebug(23100) << "tree_display_: " << tree_display_ << endl;
+}
+
+void SessionWidget::saveCurrentCheckSettings()
+{
+ KLSConfig::setRecursiveCheck(checkbox_recursively->isChecked());
+ KLSConfig::setDepth(spinbox_depth->value());
+ KLSConfig::setCheckParentFolders(!checkbox_subdirs_only->isChecked());
+ KLSConfig::setCheckExternalLinks(checkbox_external_links->isChecked());
+
+ KLSConfig::writeConfig();
+}
+
+void SessionWidget::newSearchManager()
+{
+ if(search_manager_)
+ delete search_manager_;
+
+ search_manager_ = new SearchManager(KLSConfig::maxConnectionsNumber(),
+ KLSConfig::timeOut(),
+ this, "search_manager");
+ Q_ASSERT(search_manager_);
+
+ connect(search_manager_, SIGNAL(signalRootChecked(const LinkStatus *, LinkChecker *)),
+ this, SLOT(slotRootChecked(const LinkStatus *, LinkChecker *)));
+ connect(search_manager_, SIGNAL(signalLinkChecked(const LinkStatus *, LinkChecker *)),
+ this, SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *)));
+ connect(search_manager_, SIGNAL(signalSearchFinished()),
+ this, SLOT(slotSearchFinished()));
+ connect(search_manager_, SIGNAL(signalSearchPaused()),
+ this, SLOT(slotSearchPaused()));
+ connect(search_manager_, SIGNAL(signalAddingLevelTotalSteps(uint)),
+ this, SLOT(slotAddingLevelTotalSteps(uint)));
+ connect(search_manager_, SIGNAL(signalAddingLevelProgress()),
+ this, SLOT(slotAddingLevelProgress()));
+ connect(search_manager_, SIGNAL(signalLinksToCheckTotalSteps(uint)),
+ this, SLOT(slotLinksToCheckTotalSteps(uint)));
+}
+
+void SessionWidget::setColumns(QStringList const& colunas)
+{
+ tree_view->setColumns(colunas);
+}
+
+void SessionWidget::setUrl(KURL const& url)
+{
+ combobox_url->setCurrentText(url.prettyURL());
+ combobox_url->setFocus();
+}
+
+bool SessionWidget::isEmpty() const
+{
+ Q_ASSERT(tree_view);
+ return tree_view->isEmpty();
+}
+
+SearchManager const* SessionWidget::getSearchManager() const
+{
+ return search_manager_;
+}
+
+void SessionWidget::slotEnableCheckButton(const QString & s)
+{
+ if(!(stopped_ && !pendingActions()))
+ return;
+
+ if(!s.isEmpty() && !search_manager_->searching())
+ {
+ start_search_action_->setEnabled(true);
+ }
+ else
+ {
+ start_search_action_->setEnabled(false);
+ }
+}
+
+void SessionWidget::slotCheck()
+{
+ Q_ASSERT(to_start_);
+ Q_ASSERT(!in_progress_);
+ Q_ASSERT(!paused_);
+ Q_ASSERT(stopped_);
+
+ ready_ = false;
+ if(!validFields())
+ {
+ ready_ = true;
+ KApplication::beep();
+ return;
+ }
+
+ emit signalSearchStarted();
+
+ in_progress_ = true;
+ paused_ = false;
+ stopped_ = false;
+
+ slotLoadSettings(false); // it seems that KConfigDialogManager is not trigering this slot
+
+ newSearchManager();
+
+ insertUrlAtCombobox(combobox_url->currentText());
+ combobox_url->saveItems();
+ progressbar_checker->reset();
+ progressbar_checker->setPercentageVisible(true);
+ progressbar_checker->setTotalSteps(1); // check root page
+ progressbar_checker->setProgress(0);
+ textlabel_progressbar->setText(i18n( "Checking..." ));
+
+ textlabel_elapsed_time->setEnabled(true);
+ //textlabel_elapsed_time_value->setText("");
+ textlabel_elapsed_time_value->setEnabled(true);
+
+ //table_linkstatus->clear();
+ tree_view->clear();
+
+ KURL url = Url::normalizeUrl(combobox_url->currentText());
+
+ if(!url.protocol().startsWith("http"))
+ {
+ QString documentRootHint = url.directory().isEmpty() ? "/" : url.directory();
+ DocumentRootDialog dialog(this, documentRootHint);
+ dialog.exec();
+ search_manager_->setDocumentRoot(KURL::fromPathOrURL(dialog.url()));
+ }
+
+ if(KLSConfig::useQuantaUrlPreviewPrefix() && Global::isKLinkStatusEmbeddedInQuanta())
+ {
+ KURL url_aux = Global::urlWithQuantaPreviewPrefix(url);
+ if(url_aux.isValid() && !url_aux.isEmpty())
+ url = url_aux;
+ }
+
+ if(!checkbox_recursively->isChecked())
+ {
+ search_manager_->setSearchMode(SearchManager::depth);
+ search_manager_->setDepth(0);
+ }
+
+ else if(checkbox_recursively->isChecked())
+ {
+ if(spinbox_depth->value() == 0)
+ {
+ search_manager_->setSearchMode(SearchManager::domain);
+ }
+ else
+ {
+ search_manager_->setSearchMode(SearchManager::depth_and_domain);
+ search_manager_->setDepth(spinbox_depth->value());
+ }
+
+ if(checkbox_subdirs_only->isChecked())
+ {
+ search_manager_->setCheckParentDirs(false);
+
+ if(url.hasHost())
+ search_manager_->setDomain(url.host() + url.directory(true, false));
+ }
+ else
+ {
+ search_manager_->setCheckParentDirs(true);
+
+ if(url.hasHost())
+ search_manager_->setDomain(url.host());
+ }
+ if(checkbox_external_links->isChecked())
+ {
+ search_manager_->setCheckExternalLinks(true);
+ search_manager_->setExternalDomainDepth(1);
+ }
+ else
+ {
+ search_manager_->setCheckExternalLinks(false);
+ search_manager_->setExternalDomainDepth(0);
+ }
+ }
+ if(!lineedit_reg_exp->text().isEmpty())
+ {
+ search_manager_->setCheckRegularExpressions(true);
+ search_manager_->setRegularExpression(lineedit_reg_exp->text(), false);
+ }
+
+ kdDebug(23100) << "URI: " << url.prettyURL() << endl;
+ combobox_url->setCurrentText(url.prettyURL());
+ search_manager_->startSearch(url);
+ slotSetTimeElapsed();
+}
+
+void SessionWidget::keyPressEvent ( QKeyEvent* e )
+{
+ if( e->key() == Qt::Key_Return &&
+ ( combobox_url->hasFocus() ||
+ //lineedit_domain->hasFocus() ||
+ //checkbox_depth->hasFocus() ||
+ spinbox_depth->hasFocus() ||
+ //checkbox_domain->hasFocus() ||
+ //spinbox_external_domain->hasFocus()
+ checkbox_recursively->hasFocus() ||
+ checkbox_external_links->hasFocus() ||
+ checkbox_subdirs_only->hasFocus() ) )
+ {
+ if(validFields())
+ {
+ slotStartSearch();
+ }
+ }
+
+ else if(e->key() == Qt::Key_F6)
+ {
+ combobox_url->lineEdit()->selectAll();
+ }
+}
+
+bool SessionWidget::validFields()
+{
+ if(combobox_url->currentText().isEmpty())
+ {
+ KMessageBox::sorry(this, i18n("Cowardly refusing to check an empty URL."));
+ return false;
+ }
+
+ else
+ return true;
+}
+
+void SessionWidget::slotRootChecked(LinkStatus const* linkstatus, LinkChecker * anal)
+{
+ slotSetTimeElapsed();
+ emit signalUpdateTabLabel(search_manager_->linkStatusRoot(), this);
+
+ Q_ASSERT(textlabel_progressbar->text() == i18n("Checking...") ||
+ textlabel_progressbar->text() == i18n("Stopped"));
+
+ progressbar_checker->setProgress(1);
+
+ //table_linkstatus->insertResult(linkstatus);
+ TreeViewItem* tree_view_item = new TreeViewItem(tree_view, tree_view->lastItem(), linkstatus);
+ LinkStatus* ls = const_cast<LinkStatus*> (linkstatus);
+ ls->setTreeViewItem(tree_view_item);
+
+ if(linkstatus->isRedirection() && linkstatus->redirection())
+ slotLinkChecked(linkstatus->redirection(), anal);
+
+ resultsSearchBar->show();
+ ActionManager::getInstance()->action("file_export_html")->setEnabled(!isEmpty());
+}
+
+void SessionWidget::slotLinkChecked(LinkStatus const* linkstatus, LinkChecker * anal)
+{
+ slotSetTimeElapsed();
+
+ kdDebug(23100) << textlabel_progressbar->text() << endl;
+
+ Q_ASSERT(textlabel_progressbar->text() == i18n("Checking...") ||
+ textlabel_progressbar->text() == i18n("Stopped"));
+
+ progressbar_checker->setProgress(progressbar_checker->progress() + 1);
+
+ if(linkstatus->checked())
+ {
+ TreeViewItem* tree_view_item = 0;
+ TreeViewItem* parent_item = linkstatus->parent()->treeViewItem();
+ bool match = resultsSearchBar->currentLinkMatcher().matches(*linkstatus);
+
+ if(tree_display_)
+ {
+ //kdDebug(23100) << "TREE!!!!!" << endl;
+ tree_view_item = new TreeViewItem(tree_view, parent_item, parent_item->lastChild(), linkstatus);
+
+ parent_item->setLastChild(tree_view_item);
+ if(follow_last_link_checked_)
+ tree_view->ensureRowVisible(tree_view_item, tree_display_);
+
+ tree_view_item->setEnabled(match);
+ }
+ else
+ {
+ //kdDebug(23100) << "FLAT!!!!!" << endl;
+ tree_view_item = new TreeViewItem(tree_view, tree_view->lastItem(), linkstatus);
+ if(follow_last_link_checked_)
+ tree_view->ensureRowVisible(tree_view_item, tree_display_);
+
+ tree_view_item->setVisible(match);
+ }
+
+ LinkStatus* ls = const_cast<LinkStatus*> (linkstatus);
+ ls->setTreeViewItem(tree_view_item);
+
+ if(linkstatus->isRedirection() && linkstatus->redirection())
+ slotLinkChecked(linkstatus->redirection(), anal);
+ }
+}
+
+void SessionWidget::slotSearchFinished()
+{
+ Q_ASSERT(in_progress_);
+ Q_ASSERT(!paused_);
+ Q_ASSERT(!stopped_);
+
+ KApplication::beep ();
+
+ textlabel_progressbar->setText(i18n( "Ready" ));
+ progressbar_checker->reset();
+ progressbar_checker->setPercentageVisible(false);
+ progressbar_checker->setTotalSteps(1);
+ progressbar_checker->setProgress(0);
+
+ ready_ = true;
+
+ textlabel_elapsed_time->setEnabled(true);
+ textlabel_elapsed_time_value->setEnabled(true);
+ textlabel_elapsed_time_value->setText(search_manager_->timeElapsed().toString("hh:mm:ss"));
+
+ in_progress_ = false;
+ paused_ = false;
+ stopped_ = true;
+ resetPendingActions();
+ action_manager_->slotUpdateSessionWidgetActions(this);
+
+ emit signalSearchFinnished();
+}
+
+void SessionWidget::slotSearchPaused()
+{
+ Q_ASSERT(pendingActions());
+ Q_ASSERT(in_progress_);
+
+ KApplication::beep();
+
+ textlabel_progressbar->setText(i18n("Stopped"));
+
+ ready_ = true;
+
+ if(to_stop_)
+ {
+ in_progress_ = false;
+ paused_ = false;
+ stopped_ = true;
+ }
+ else
+ {
+ Q_ASSERT(to_pause_);
+ Q_ASSERT(!stopped_);
+
+ paused_ = true;
+ }
+
+ textlabel_elapsed_time->setEnabled(true);
+ textlabel_elapsed_time_value->setEnabled(true);
+ textlabel_elapsed_time_value->setText(search_manager_->timeElapsed().toString("hh:mm:ss"));
+
+ resetPendingActions();
+ action_manager_->slotUpdateSessionWidgetActions(this);
+
+ emit signalSearchPaused();
+}
+
+void SessionWidget::insertUrlAtCombobox(QString const& url)
+{
+ combobox_url->addToHistory(url);
+}
+
+void SessionWidget::showBottomStatusLabel(QListViewItem* item)
+{
+ kdDebug(23100) << "SessionWidget::showBottomStatusLabel" << endl;
+
+ if(!item)
+ return;
+
+ TreeViewItem* _item = tree_view->myItem(item);
+ if(_item)
+ {
+ QString status = _item->linkStatus()->statusText();
+ textlabel_status->setText(status);
+
+ if(textlabel_status->sizeHint().width() > textlabel_status->maximumWidth())
+ QToolTip::add(textlabel_status, status);
+ else
+ QToolTip::remove(textlabel_status);
+
+ bottom_status_timer_.stop();
+ bottom_status_timer_.start(5 * 1000, true);
+ }
+}
+
+void SessionWidget::clearBottomStatusLabel()
+{
+ textlabel_status->clear();
+}
+
+void SessionWidget::slotSetTimeElapsed()
+{
+ textlabel_elapsed_time_value->setText(search_manager_->timeElapsed().toString("hh:mm:ss"));
+}
+
+void SessionWidget::slotAddingLevelTotalSteps(uint steps)
+{
+ textlabel_progressbar->setText(i18n( "Adding level..." ));
+ progressbar_checker->reset();
+ progressbar_checker->setTotalSteps(steps);
+ progressbar_checker->setProgress(0);
+}
+
+void SessionWidget::slotAddingLevelProgress()
+{
+ Q_ASSERT(textlabel_progressbar->text() == i18n( "Adding level..." ));
+ progressbar_checker->setProgress(progressbar_checker->progress() + 1);
+}
+
+void SessionWidget::slotLinksToCheckTotalSteps(uint steps)
+{
+ textlabel_progressbar->setText(i18n( "Checking..." ));
+ progressbar_checker->reset();
+ progressbar_checker->setTotalSteps(steps);
+ progressbar_checker->setProgress(0);
+}
+
+void SessionWidget::slotClearComboUrl()
+{
+ combobox_url->setCurrentText("");
+}
+
+void SessionWidget::slotChooseUrlDialog()
+{
+ setUrl(KFileDialog::getOpenURL());
+}
+
+void SessionWidget::slotHideSearchPanel()
+{
+ if(buttongroup_search->isHidden())
+ buttongroup_search->show();
+ else
+ buttongroup_search->hide();
+}
+
+void SessionWidget::setFollowLastLinkChecked(bool follow)
+{
+ kdDebug(23100) << "setFollowLastLinkChecked: " << follow << endl;
+ follow_last_link_checked_ = follow;
+}
+
+void SessionWidget::slotFollowLastLinkChecked()
+{
+ follow_last_link_checked_ = !follow_last_link_checked_;
+}
+
+void SessionWidget::slotResetSearchOptions()
+{
+ slotLoadSettings(true);
+
+ combobox_url->clear();
+ lineedit_reg_exp->clear();
+}
+
+void SessionWidget::slotStartSearch()
+{
+ if(in_progress_)
+ {
+ start_search_action_->setChecked(true); // do not toggle
+ Q_ASSERT(!stopped_);
+ KApplication::beep();
+ return;
+ }
+
+ to_start_ = true;
+ slotLoadSettings(false);
+ slotCheck();
+ resetPendingActions();
+
+ action_manager_->slotUpdateSessionWidgetActions(this);
+}
+
+void SessionWidget::slotPauseSearch()
+{
+ Q_ASSERT(in_progress_);
+ Q_ASSERT(!stopped_);
+
+ if(pendingActions())
+ return;
+
+ to_pause_ = true;
+
+ if(!paused_)
+ {
+ Q_ASSERT(!ready_);
+ Q_ASSERT(search_manager_->searching());
+
+ search_manager_->cancelSearch();
+ }
+ else
+ {
+ Q_ASSERT(ready_);
+
+ paused_ = false;
+
+ textlabel_progressbar->setText(i18n("Checking..."));
+ ready_ = false;
+ search_manager_->resume();
+
+ emit signalSearchStarted();
+ slotLoadSettings(isEmpty()); // it seems that KConfigDialogManager is not trigering this slot
+
+ resetPendingActions();
+ }
+}
+
+void SessionWidget::slotStopSearch()
+{
+ Q_ASSERT(in_progress_);
+ Q_ASSERT(!stopped_);
+
+ if(pendingActions())
+ return;
+
+ to_stop_ = true;
+
+ if(!paused_)
+ {
+ Q_ASSERT(!ready_);
+ Q_ASSERT(search_manager_->searching());
+
+ search_manager_->cancelSearch();
+ }
+ else
+ {
+ in_progress_ = false;
+ paused_ = false;
+ stopped_ = true;
+
+ action_manager_->slotUpdateSessionWidgetActions(this);
+ }
+}
+
+bool SessionWidget::pendingActions() const
+{
+ return (to_start_ || to_pause_ || to_stop_);
+}
+
+void SessionWidget::resetPendingActions()
+{
+ to_start_ = false;
+ to_pause_ = false;
+ to_stop_ = false;
+}
+
+void SessionWidget::slotApplyFilter(LinkMatcher link_matcher)
+{
+ tree_view->show(link_matcher);
+}
+
+void SessionWidget::slotExportAsHTML( )
+{
+ KURL url = KFileDialog::getSaveURL(QString::null,"text/html", 0, i18n("Export Results as HTML"));
+
+ if(url.isEmpty())
+ return;
+
+ QString filename;
+ KTempFile tmp; // ### only used for network export
+
+ if(url.isLocalFile())
+ filename = url.path();
+ else
+ filename = tmp.name();
+
+ KSaveFile *savefile = new KSaveFile(filename);
+ if(savefile->status() == 0) // ok
+ {
+ QTextStream *outputStream = savefile->textStream();
+ outputStream->setEncoding(QTextStream::UnicodeUTF8);
+
+ QString xslt_doc = FileManager::read(locate("appdata", "styles/results_stylesheet.xsl"));
+ XSLT xslt(xslt_doc);
+// kdDebug(23100) << search_manager_->toXML() << endl;
+ QString html_ouptut = xslt.transform(search_manager_->toXML());
+ (*outputStream) << html_ouptut << endl;
+
+ savefile->close();
+ }
+
+ delete savefile;
+
+ if (url.isLocalFile())
+ return;
+
+ KIO::NetAccess::upload(filename, url, 0);
+}
+
+
+#include "sessionwidget.moc"
diff --git a/klinkstatus/src/ui/sessionwidget.h b/klinkstatus/src/ui/sessionwidget.h
new file mode 100644
index 00000000..af525a08
--- /dev/null
+++ b/klinkstatus/src/ui/sessionwidget.h
@@ -0,0 +1,149 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 SESSION_WIDGET_H
+#define SESSION_WIDGET_H
+
+#include "sessionwidgetbase.h"
+#include "../engine/linkchecker.h"
+#include "../engine/linkstatus.h"
+class SearchManager;
+class TableItem;
+class ActionManager;
+class LinkMatcher;
+
+#include <qtimer.h>
+#include <qstring.h>
+class QStringList;
+class QListViewItem;
+
+class KURL;
+class KConfig;
+class KToggleAction;
+
+#include <vector>
+
+using namespace std;
+
+class SessionWidget: public SessionWidgetBase
+{
+ Q_OBJECT
+
+public:
+
+ SessionWidget(int max_simultaneous_connections = 3, int time_out = 50,
+ QWidget* parent = 0, const char* name = 0, WFlags f = 0);
+
+ ~SessionWidget();
+
+ void setColumns(QStringList const& colunas);
+ void setUrl(KURL const& url);
+
+ bool treeDisplay() const { return tree_display_; }
+
+ bool followLastLinkChecked() const { return follow_last_link_checked_; }
+ void setFollowLastLinkChecked(bool follow);
+
+ bool isEmpty() const;
+ SearchManager const* getSearchManager() const;
+
+ bool inProgress() const { return in_progress_; }
+ bool paused() const { return paused_; }
+ bool stopped() const { return stopped_; }
+
+signals:
+ void signalUpdateTabLabel(const LinkStatus *, SessionWidget*);
+ void signalSearchStarted();
+ void signalSearchPaused();
+ void signalSearchFinnished();
+
+public slots:
+
+ virtual void slotClearComboUrl();
+ void slotLoadSettings(bool modify_current_widget_settings = true);
+
+ void slotStartSearch();
+ void slotPauseSearch();
+ void slotStopSearch();
+
+ void slotHideSearchPanel();
+ void slotResetSearchOptions();
+ void slotFollowLastLinkChecked();
+
+ void slotExportAsHTML();
+
+private slots:
+
+ virtual void slotCheck();
+ virtual void slotCancel() {} // FIXME hack
+ //virtual void slotSuggestDomain(bool toogle);
+
+ void slotEnableCheckButton(const QString &);
+ void slotRootChecked(LinkStatus const* linkstatus, LinkChecker * anal);
+ void slotLinkChecked(LinkStatus const* linkstatus, LinkChecker * anal);
+ void slotSearchFinished();
+ void slotSearchPaused();
+ /** Shows the status of the clicked URL (row) for 5 seconds */
+ void showBottomStatusLabel(QListViewItem* item);
+ void clearBottomStatusLabel();
+ void slotSetTimeElapsed();
+ void newSearchManager();
+
+ void slotAddingLevelTotalSteps(uint steps);
+ void slotAddingLevelProgress();
+ void slotLinksToCheckTotalSteps(uint steps);
+
+ void slotChooseUrlDialog();
+
+ void slotApplyFilter(LinkMatcher);
+
+private:
+
+ virtual void keyPressEvent ( QKeyEvent* e );
+ bool validFields();
+ void insertUrlAtCombobox(QString const& url);
+ void init();
+ void saveCurrentCheckSettings();
+ bool pendingActions() const;
+ void resetPendingActions();
+
+private:
+ SearchManager* search_manager_;
+ ActionManager* action_manager_;
+
+ bool ready_;
+ bool to_start_;
+ bool to_pause_;
+ bool to_stop_;
+ bool in_progress_;
+ bool paused_;
+ bool stopped_;
+
+ QTimer bottom_status_timer_;
+ int max_simultaneous_connections_;
+ int time_out_;
+ bool tree_display_; // tree/flat result display
+ bool follow_last_link_checked_;
+ KToggleAction* start_search_action_;
+};
+
+
+
+#endif
diff --git a/klinkstatus/src/ui/sessionwidgetbase.ui b/klinkstatus/src/ui/sessionwidgetbase.ui
new file mode 100644
index 00000000..0d194143
--- /dev/null
+++ b/klinkstatus/src/ui/sessionwidgetbase.ui
@@ -0,0 +1,602 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>SessionWidgetBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>SessionWidgetBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>689</width>
+ <height>683</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>300</height>
+ </size>
+ </property>
+ <property name="baseSize">
+ <size>
+ <width>1000</width>
+ <height>500</height>
+ </size>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttongroup_search</cstring>
+ </property>
+ <property name="title">
+ <string>Search</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout15</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout14</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout13</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QToolButton">
+ <property name="name">
+ <cstring>toolButton_clear_combo</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>25</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>25</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textlabel_url</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>URL: </string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="KLSHistoryCombo">
+ <property name="name">
+ <cstring>combobox_url</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ <property name="acceptDrops">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>pushbutton_url</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Maximum</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkbox_recursively</cstring>
+ </property>
+ <property name="text">
+ <string>Recursivel&amp;y:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check pages recursively</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>spinbox_depth</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="specialValueText">
+ <string>Unlimited</string>
+ </property>
+ <property name="maxValue">
+ <number>15</number>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkbox_subdirs_only</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Do &amp;not check parent folders</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>160</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkbox_external_links</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Chec&amp;k external links</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>174</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Do not check regular expression:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>lineedit_reg_exp</cstring>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Maximum</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="ResultsSearchBar">
+ <property name="name">
+ <cstring>resultsSearchBar</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="TreeView">
+ <property name="name">
+ <cstring>tree_view</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>300</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textlabel_progressbar</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>94</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ready</string>
+ </property>
+ </widget>
+ <widget class="KProgress">
+ <property name="name">
+ <cstring>progressbar_checker</cstring>
+ </property>
+ <property name="totalSteps">
+ <number>1</number>
+ </property>
+ <property name="progress">
+ <number>0</number>
+ </property>
+ <property name="percentageVisible">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KSqueezedTextLabel">
+ <property name="name">
+ <cstring>textlabel_status</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>470</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5_2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout12_2</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textlabel_elapsed_time</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Elapsed time:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>hh:mm:ss.zzz</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>textlabel_elapsed_time_value</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>hh:mm:ss.zzz</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>KLSHistoryCombo</class>
+ <header location="global">klshistorycombo.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>
+ <customwidget>
+ <class>TreeView</class>
+ <header location="local">treeview.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>7</hordata>
+ <verdata>7</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+ <customwidget>
+ <class>ResultsSearchBar</class>
+ <header location="local">resultssearchbar.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>image1</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
+ </image>
+ <image name="image1">
+ <data format="PNG" length="824">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000002ff49444154388db59531681c4714863f992dde820cb370815b50600f54e8ca0ba43970712a8fb838438a3895634813d238a5ab80e314ae4d0a812060a4226017c27221c8a9da6b8c4fe0e00d28b0571cec82043b85611f78c12966efa4bb8bc085f29a6567df7cef9f7fdeccaec571cc2cbaddee47ae21e2385e5b9b815f1ebcfcd8de6a63ad25cb338af7c52741acb5a4a729a3d723a82ec6bd99d267bf3f23fc1c4cab2442d14a915986e792fdfa59569766573049417784f1b12e8267954dab24b78714450a28beaf941f847c2a14e70a0841035a2d45d641eb027213c210c69756320767794684d6508bef0befde1a860796e4c402333542b4256c0f0cdd1e50b97191458be6e0e27d81563a87c643d8fb2d7793d685d696413cc8a6cae46f65f7d79c7c62b87b4f2e15fd0fb0d302be0fefde4a0d557a5f35e90f84e0334014d590f855c9de4ecee17e4eb319d1ff3a00ec02f8c67299f283307c61e7d06fbf1782d082588a33e1cf1705fd81cf773f3601e1f9bec59e2f4b5c7ef5209f0ac95f16630cfd818067c103b586dd274a726229cee0fe8380d191cb4d1267d3d58aa1de7d258ceae5d7d0a78fdd269a86f0c52d414c49bbe3762c9b686de41560d7a72e41c4795a6486a78f95e4c4151481d686efbe7b3398ac58b1a23868b8c474aaa8068c8e714a8dd06c1af2a9e5d1c38c641c909dba6e08237f19b358a7ac5cf3479bc2e41f257e55d2ffc6a73833746f09e186cfa387904f2cbffc90a2aa9886d0e99464d3c5965b512cebd01f1800f67672e2a392fb0f023a3d883a053ffddcc2340dd65ab452b6074dc2cd15c1cbceb863daed413e353cdfcfd97d92333a12da6d0181ec3443cf753ef3cdd092de0e116ff1a02cdc157338ca9d7b8269461cfee1ba2139b9286e1a427f10110f2d561555b076d18a39383d4d99a4c0cd0b787f20747b214962c8266e3cdcf0e97c59126ec2f6edd089f40a92f115e0d1eb11ba238461dd6a15f32b53666de841965bb203575a3cc15a48c64a965fe57105e3635db8fa96dcffc431172b5d715d7103dc3fea7f015f373c8ee3b57f0135105a0fae7717960000000049454e44ae426082</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>checkbox_recursively</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>spinbox_depth</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkbox_recursively</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>checkbox_external_links</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkbox_recursively</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>checkbox_subdirs_only</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>toolButton_clear_combo</sender>
+ <signal>clicked()</signal>
+ <receiver>SessionWidgetBase</receiver>
+ <slot>slotClearComboUrl()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>combobox_url</tabstop>
+ <tabstop>checkbox_recursively</tabstop>
+ <tabstop>spinbox_depth</tabstop>
+ <tabstop>checkbox_subdirs_only</tabstop>
+ <tabstop>checkbox_external_links</tabstop>
+</tabstops>
+<slots>
+ <slot specifier="pure virtual">slotCheck()</slot>
+ <slot specifier="pure virtual">slotCancel()</slot>
+ <slot specifier="pure virtual">slotClearComboUrl()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klshistorycombo.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>resultssearchbar.h</includehint>
+ <includehint>treeview.h</includehint>
+ <includehint>kprogress.h</includehint>
+ <includehint>ksqueezedtextlabel.h</includehint>
+</includehints>
+</UI>
diff --git a/klinkstatus/src/ui/settings/Makefile.am b/klinkstatus/src/ui/settings/Makefile.am
new file mode 100644
index 00000000..777e9e5c
--- /dev/null
+++ b/klinkstatus/src/ui/settings/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I$(top_builddir)/klinkstatus/src/cfg -I$(top_builddir)/klinkstatus/src $(all_includes)
+METASOURCES = AUTO
+libsettings_la_LDFLAGS = $(all_libraries)
+noinst_LTLIBRARIES = libsettings.la
+libsettings_la_SOURCES = configsearchdialog.ui dummy.cpp configresultsdialog.ui \
+ configidentificationdialog.cpp configidentificationdialogui.ui
+noinst_HEADERS = configidentificationdialog.h
diff --git a/klinkstatus/src/ui/settings/configidentificationdialog.cpp b/klinkstatus/src/ui/settings/configidentificationdialog.cpp
new file mode 100644
index 00000000..3dcd1239
--- /dev/null
+++ b/klinkstatus/src/ui/settings/configidentificationdialog.cpp
@@ -0,0 +1,55 @@
+/***************************************************************************
+ * Copyright (C) 2006 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "configidentificationdialog.h"
+
+#include <kprotocolmanager.h>
+#include <kpushbutton.h>
+#include <klineedit.h>
+
+#include <qstring.h>
+
+#include "../cfg/klsconfig.h"
+
+
+ConfigIdentificationDialog::ConfigIdentificationDialog(QWidget *parent, const char *name)
+ : ConfigIdentificationDialogUi(parent, name)
+{
+ if(KLSConfig::userAgent().isEmpty())
+ {
+ slotDefaultUA();
+ }
+
+ connect(buttonDefault, SIGNAL(clicked()), this, SLOT(slotDefaultUA()));
+}
+
+
+ConfigIdentificationDialog::~ConfigIdentificationDialog()
+{
+}
+
+void ConfigIdentificationDialog::slotDefaultUA()
+{
+ KLSConfig::setUserAgent(KProtocolManager::defaultUserAgent());
+ kcfg_UserAgent->setText(KLSConfig::userAgent());
+}
+
+
+#include "configidentificationdialog.moc"
diff --git a/klinkstatus/src/ui/settings/configidentificationdialog.h b/klinkstatus/src/ui/settings/configidentificationdialog.h
new file mode 100644
index 00000000..e75a65a6
--- /dev/null
+++ b/klinkstatus/src/ui/settings/configidentificationdialog.h
@@ -0,0 +1,40 @@
+/***************************************************************************
+ * Copyright (C) 2006 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 CONFIGIDENTIFICATIONDIALOG_H
+#define CONFIGIDENTIFICATIONDIALOG_H
+
+#include "configidentificationdialogui.h"
+
+/**
+ @author Paulo Moura Guedes <moura@kdewebdev.org>
+*/
+class ConfigIdentificationDialog : public ConfigIdentificationDialogUi
+{
+Q_OBJECT
+public:
+ ConfigIdentificationDialog(QWidget *parent = 0, const char *name = 0);
+ ~ConfigIdentificationDialog();
+
+private slots:
+ void slotDefaultUA();
+};
+
+#endif
diff --git a/klinkstatus/src/ui/settings/configidentificationdialogui.ui b/klinkstatus/src/ui/settings/configidentificationdialogui.ui
new file mode 100644
index 00000000..29723358
--- /dev/null
+++ b/klinkstatus/src/ui/settings/configidentificationdialogui.ui
@@ -0,0 +1,134 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ConfigIdentificationDialogUi</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ConfigIdentificationDialogUi</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>570</width>
+ <height>113</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup4</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>0</bold>
+ </font>
+ </property>
+ <property name="title">
+ <string>Identification</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <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="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>User-Agent</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>kcfg_UserAgent</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>300</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>buttonDefault</cstring>
+ </property>
+ <property name="text">
+ <string>Default</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>kcfg_SendIdentification</cstring>
+ </property>
+ <property name="text">
+ <string>Send Identification</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>kcfg_SendIdentification</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>kcfg_SendIdentification</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>kcfg_UserAgent</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>kcfg_SendIdentification</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>buttonDefault</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>kcfg_SendIdentification</tabstop>
+ <tabstop>kcfg_UserAgent</tabstop>
+ <tabstop>buttonDefault</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/klinkstatus/src/ui/settings/configresultsdialog.ui b/klinkstatus/src/ui/settings/configresultsdialog.ui
new file mode 100644
index 00000000..544f3273
--- /dev/null
+++ b/klinkstatus/src/ui/settings/configresultsdialog.ui
@@ -0,0 +1,72 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ConfigResultsDialog</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ConfigResultsDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>233</width>
+ <height>183</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup13</cstring>
+ </property>
+ <property name="title">
+ <string>View</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>kcfg_DisplayTreeView</cstring>
+ </property>
+ <property name="text">
+ <string>Tree</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>kcfg_DisplayFlatView</cstring>
+ </property>
+ <property name="text">
+ <string>Flat</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup13_2</cstring>
+ </property>
+ <property name="title">
+ <string>Misc</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>kcfg_FollowLastLinkChecked</cstring>
+ </property>
+ <property name="text">
+ <string>Follow Last Link Checked</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/klinkstatus/src/ui/settings/configsearchdialog.ui b/klinkstatus/src/ui/settings/configsearchdialog.ui
new file mode 100644
index 00000000..604a431c
--- /dev/null
+++ b/klinkstatus/src/ui/settings/configsearchdialog.ui
@@ -0,0 +1,353 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ConfigSearchDialog</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ConfigSearchDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>459</width>
+ <height>365</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup13</cstring>
+ </property>
+ <property name="title">
+ <string>Network</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KIntSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>kcfg_MaxConnectionsNumber</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>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maxValue">
+ <number>1000</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1_2_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>Timeout in seconds:</string>
+ </property>
+ </widget>
+ <widget class="KIntSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>kcfg_TimeOut</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxValue">
+ <number>3600</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>40</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" 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>Number of simultaneous connections:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup8</cstring>
+ </property>
+ <property name="title">
+ <string>Input</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KIntSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>kcfg_MaxCountComboUrl</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxValue">
+ <number>1000</number>
+ </property>
+ <property name="minValue">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>50</number>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>kcfg_CheckParentFolders</cstring>
+ </property>
+ <property name="text">
+ <string>Check parent folders</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </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>Number of items in URL history:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>kcfg_CheckExternalLinks</cstring>
+ </property>
+ <property name="text">
+ <string>Check external links</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout21</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>kcfg_RecursiveCheck</cstring>
+ </property>
+ <property name="text">
+ <string>Recursive</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer25</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Maximum</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout20</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Depth:</string>
+ </property>
+ </widget>
+ <widget class="KIntSpinBox">
+ <property name="name">
+ <cstring>kcfg_Depth</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="specialValueText">
+ <string>Unlimited</string>
+ </property>
+ <property name="maxValue">
+ <number>15</number>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>1</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup3</cstring>
+ </property>
+ <property name="title">
+ <string>Quanta</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>kcfg_UseQuantaUrlPreviewPrefix</cstring>
+ </property>
+ <property name="text">
+ <string>Use preview prefix</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check this one if you want to use Quanta's project preview prefix in the URL to check</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>kcfg_RememberCheckSettings</cstring>
+ </property>
+ <property name="text">
+ <string>Remember settings when exit</string>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>kcfg_RecursiveCheck</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>kcfg_Depth</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>kcfg_RecursiveCheck</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel1_2_2_2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>kcfg_RecursiveCheck</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>kcfg_CheckParentFolders</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>kcfg_RecursiveCheck</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>kcfg_CheckExternalLinks</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>kcfg_MaxConnectionsNumber</tabstop>
+ <tabstop>kcfg_TimeOut</tabstop>
+ <tabstop>kcfg_MaxCountComboUrl</tabstop>
+ <tabstop>kcfg_RecursiveCheck</tabstop>
+ <tabstop>kcfg_Depth</tabstop>
+ <tabstop>kcfg_CheckParentFolders</tabstop>
+ <tabstop>kcfg_CheckExternalLinks</tabstop>
+ <tabstop>kcfg_RememberCheckSettings</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+</includehints>
+</UI>
diff --git a/klinkstatus/src/ui/settings/dummy.cpp b/klinkstatus/src/ui/settings/dummy.cpp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/klinkstatus/src/ui/settings/dummy.cpp
diff --git a/klinkstatus/src/ui/tablelinkstatus.cpp b/klinkstatus/src/ui/tablelinkstatus.cpp
new file mode 100644
index 00000000..695365a9
--- /dev/null
+++ b/klinkstatus/src/ui/tablelinkstatus.cpp
@@ -0,0 +1,750 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "tablelinkstatus.h"
+#include "../utils/utils.h"
+#include "../parser/url.h"
+#include "../global.h"
+
+#include <qmemarray.h>
+#include <qtooltip.h>
+#include <qpixmap.h>
+#include <qclipboard.h>
+#include <qpainter.h>
+#include <qprocess.h>
+
+#include <kapplication.h>
+#include <kstandarddirs.h>
+#include <krun.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <dcopclient.h>
+#include <dcopref.h>
+
+
+/*
+
+********************* TableLinkstatus ***************************
+
+*/
+
+TableLinkstatus::TableLinkstatus(QWidget * parent, const char * name,
+ int column_index_status,
+ int column_index_label,
+ int column_index_URL)
+ : QTable(parent, name),
+ ResultView(column_index_status, column_index_label, column_index_URL)
+ //context_table_menu_(this, "context_table_menu")
+{
+ setShowGrid(false);
+ setSorting(false);
+ setSelectionMode(QTable::NoSelection);
+ setFocusStyle(QTable::FollowStyle);
+ setReadOnly(true);
+
+ verticalHeader()->hide();
+ setLeftMargin(0);
+
+ cell_tip_ = new CellToolTip(this);
+
+ sub_menu_ = new QPopupMenu(this, "sub_menu_referrers");
+
+ connect(this, SIGNAL( contextMenuRequested ( int, int, const QPoint& )),
+ this, SLOT( slotPopupContextMenu( int, int, const QPoint&)) );
+}
+
+TableLinkstatus::~TableLinkstatus()
+{
+ delete cell_tip_;
+}
+
+void TableLinkstatus::setColumns(QStringList const& columns)
+{
+ ResultView::setColumns(columns);
+
+ removeColunas();
+ setNumCols(columns.size());
+
+ QHeader* horizontal_header = horizontalHeader();
+ for(uint i = 0; i != columns.size(); ++i)
+ {
+ if(i == 0)
+ {
+ Q_ASSERT(columns[i] == i18n("Status") && col_status_ == 1);
+ setColumnWidth(i, STATUS_COLUMN_WIDTH);
+ }
+ else if(i == 1)
+ {
+ Q_ASSERT(columns[i] == i18n("Label") && col_label_ == 2);
+ setColumnWidth(i, width() / 3);
+ }
+ else if(i == 2)
+ Q_ASSERT(columns[i] == i18n("URL") && col_url_ == 3);
+
+ horizontal_header->setLabel(i, i18n(columns[i]));
+ }
+
+ setColumnStretchable(col_url_ - 1, true);
+ horizontal_header->adjustHeaderSize();
+}
+
+void TableLinkstatus::insertResult(LinkStatus const* linkstatus)
+{
+ insereLinha(generateRowOfTableItems(linkstatus));
+}
+
+vector<TableItem*> TableLinkstatus::generateRowOfTableItems(LinkStatus const* linkstatus)
+{
+ vector<TableItem*> items;
+ int column = 1;
+
+ TableItem* item1 = new TableItemStatus(this, QTableItem::Never,
+ linkstatus, column++);
+ TableItem* item2 = new TableItemNome(this, QTableItem::Never,
+ linkstatus, column++);
+ TableItem* item3 = new TableItemURL(this, QTableItem::Never,
+ linkstatus, column++);
+ items.push_back(item1);
+ items.push_back(item2);
+ items.push_back(item3);
+
+ // If more columns are choosed in the settings, create and add the items here
+ // ...
+
+ return items;
+}
+
+void TableLinkstatus::insereLinha(vector<TableItem*> items)
+{
+ Q_ASSERT(items.size() == (uint)numCols());
+
+ setNumRows(numRows() + 1);
+ int row = numRows() - 1;
+
+ for(vector<TableItem*>::size_type i = 0; i != items.size(); ++i)
+ {
+ Q_ASSERT(items[i]);
+
+ int col = items[i]->columnIndex() - 1;
+ setItem(row, col, items[i]);
+ }
+
+ if(items[col_url_ - 1]->sizeHint().width() > columnWidth(col_url_ - 1))
+ {
+ setColumnStretchable(col_url_ - 1, false);
+ setColumnWidth(col_url_ - 1, items[col_url_ - 1]->sizeHint().width());
+ }
+
+ ensureCellVisible(row, 0);
+}
+
+void TableLinkstatus::clear()
+{
+ QMemArray<int> linhas(numRows());
+ for(uint i = 0; i != linhas.size(); ++i)
+ linhas[i] = i + 1;
+
+ removeRows(linhas);
+
+ Q_ASSERT(numRows() == 0);
+}
+
+void TableLinkstatus::removeColunas()
+{
+ QMemArray<int> columns(numCols());
+ for(uint i = 0; i != columns.size(); ++i)
+ columns[i] = i + 1;
+
+ removeColumns(columns);
+
+ Q_ASSERT(numCols() == 0);
+}
+
+void TableLinkstatus::show(ResultView::Status const& status)
+{
+ for(int i = 0; i != numRows(); ++i)
+ {
+ int row = i;
+ TableItem* _item = myItem(row, col_status_);
+
+ if(!ResultView::displayableWithStatus(_item->linkStatus(), status))
+ hideRow(row);
+ else
+ showRow(row);
+ }
+}
+
+void TableLinkstatus::showAll()
+{
+ for(int i = 0; i != numRows(); ++i)
+ showRow(i);
+}
+
+/*
+void TableLinkstatus::mostraPorStatusCode(int status_code)
+{
+ for(int i = 0; i != numRows(); ++i)
+ {
+ int row = i + 1;
+ QTableItem* _item = myItem(row, col_status_);
+
+ if(status_code != _item->text().toInt())
+ hideRow(row);
+ }
+}
+*/
+/**
+ Use this procedure when you insert a row at the bottom of the table,
+ and you only want the to scroll down if you were already at the bottom,
+ before inserting the row.
+ This allows you to see what's going on on other cells without having
+ the table always scrolling down when every row is inserted.
+*/
+void TableLinkstatus::ensureCellVisible(int row, int col)
+{
+ // table viewport is at the bottom
+ if(rowPos(row - 1) <= (contentsY() + visibleHeight()))
+ QTable::ensureCellVisible(row, col);
+}
+
+bool TableLinkstatus::textFitsInCell(int row, int col) const
+{
+ QTableItem* itm(myItem(row, col));
+ Q_ASSERT(itm);
+
+ QSize size_hint(itm->sizeHint());
+ int visible_width = 0;
+
+ if(col == numCols() - 1)
+ visible_width = contentsX() + visibleWidth();
+ else
+ visible_width = columnPos(col) + columnWidth(col);
+
+ if(columnPos(col) + size_hint.width() > visible_width)
+ return false;
+ else
+ return true;
+}
+
+bool TableLinkstatus::isEmpty() const
+{
+ return numRows() == 0;
+}
+
+TableItem* TableLinkstatus::myItem(int row, int col) const
+{
+ TableItem* _item = dynamic_cast<TableItem*> (QTable::item(row, col));
+ Q_ASSERT(_item);
+ return _item;
+}
+
+void TableLinkstatus::slotPopupContextMenu(int r, int w, const QPoint& pos)
+{
+ TableItem* table_item = myItem(r, w);
+ if(table_item)
+ {
+ QValueVector<KURL> referrers = table_item->linkStatus()->referrers();
+ loadContextTableMenu(referrers, table_item->linkStatus()->isRoot());
+ context_table_menu_.popup(pos);
+ }
+}
+
+void TableLinkstatus::loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root)
+{
+ context_table_menu_.clear();
+ sub_menu_->clear();
+
+ if(!is_root)
+ {
+ sub_menu_->insertItem(i18n("All"), this, SLOT(slotEditReferrersWithQuanta()));
+ sub_menu_->insertSeparator();
+
+ for(uint i = 0; i != referrers.size(); ++i)
+ {
+ sub_menu_->insertItem(referrers[i].prettyURL());
+ }
+ connect(sub_menu_, SIGNAL(activated(int)), this, SLOT(slotEditReferrerWithQuanta(int)));
+
+ context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Edit Referrer with Quanta"),
+ sub_menu_);
+ }
+ else
+ {
+ int id = context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Edit Referrer with Quanta"));
+ context_table_menu_.setItemEnabled(id, false);
+ }
+
+ context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open URL"),
+ this, SLOT(slotViewUrlInBrowser()));
+
+ context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open Referrer URL"),
+ this, SLOT(slotViewParentUrlInBrowser()));
+
+ context_table_menu_.insertSeparator();
+
+ context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy URL"),
+ this, SLOT(slotCopyUrlToClipboard()));
+
+ context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy Referrer URL"),
+ this, SLOT(slotCopyParentUrlToClipboard()));
+
+ context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy Cell Text"),
+ this, SLOT(slotCopyCellTextToClipboard()));
+}
+
+void TableLinkstatus::slotCopyUrlToClipboard() const
+{
+ TableItem* _item = myItem(currentRow(), currentColumn());
+ QString content(_item->linkStatus()->absoluteUrl().prettyURL());
+ QClipboard* cb = kapp->clipboard();
+ cb->setText(content);
+}
+
+void TableLinkstatus::slotCopyParentUrlToClipboard() const
+{
+ TableItem* _item = myItem(currentRow(), currentColumn());
+ QString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL());
+ QClipboard* cb = kapp->clipboard();
+ cb->setText(content);
+}
+
+void TableLinkstatus::slotCopyCellTextToClipboard() const
+{
+ QString cell_text(text(currentRow(), currentColumn()));
+ QClipboard* cb = kapp->clipboard();
+ cb->setText(cell_text);
+}
+
+void TableLinkstatus::slotEditReferrersWithQuanta()
+{
+ TableItem* _item = myItem(currentRow(), currentColumn());
+ QValueVector<KURL> referrers = _item->linkStatus()->referrers();
+
+ if(Global::isQuantaAvailableViaDCOP())
+ {
+ for(uint i = 0; i != referrers.size(); ++i)
+ slotEditReferrerWithQuanta(referrers[i]);
+ }
+ else
+ {
+ QStringList list_urls;
+
+ for(uint i = 0; i != referrers.size(); ++i)
+ list_urls.append(referrers[i].url());
+
+ Global::openQuanta(list_urls);
+ }
+}
+
+void TableLinkstatus::slotEditReferrerWithQuanta(int id)
+{
+ int index = sub_menu_->indexOf(id);
+
+ if(index == 0)
+ return;
+ Q_ASSERT(index != -1);
+ Q_ASSERT(index != 1); // separator
+
+ //kdDebug(23100) << "id: " << id << endl;
+ //kdDebug(23100) << "index: " << index << endl;
+
+ index -= 2; // The list of referrers starts on index = 2
+
+ TableItem* _item = myItem(currentRow(), currentColumn());
+ QValueVector<KURL> referrers = _item->linkStatus()->referrers();
+ Q_ASSERT(index >= 0 && (uint)index < referrers.size());
+
+ slotEditReferrerWithQuanta(referrers[index]);
+}
+
+void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url)
+{
+ QString filePath = url.url();
+
+ if(Global::isQuantaAvailableViaDCOP())
+ {
+ DCOPRef quanta(Global::quantaDCOPAppId(),"WindowManagerIf");
+ bool success = quanta.send("openFile", filePath, 0, 0);
+
+ if(!success)
+ {
+ QString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
+ KMessageBox::error(parentWidget(), message);
+ }
+ }
+ else
+ {
+ QStringList args(url.url());
+ Global::openQuanta(args);
+ }
+}
+
+void TableLinkstatus::slotViewUrlInBrowser()
+{
+ TableItem* _item = myItem(currentRow(), currentColumn());
+ KURL url = _item->linkStatus()->absoluteUrl();
+
+ if(url.isValid())
+ {
+ (void) new KRun (url, 0, url.isLocalFile(), true);
+ }
+ else
+ KMessageBox::sorry(this, i18n("Invalid URL."));
+}
+
+void TableLinkstatus::slotViewParentUrlInBrowser()
+{
+ TableItem* _item = myItem(currentRow(), currentColumn());
+
+ if(_item->linkStatus()->isRoot())
+ {
+ KMessageBox::sorry(this, i18n("ROOT URL."));
+ }
+ else
+ {
+ LinkStatus const* ls_parent = _item->linkStatus()->parent();
+ Q_ASSERT(ls_parent);
+
+ KURL url = ls_parent->absoluteUrl();
+
+ if(url.isValid())
+ (void) new KRun (url, 0, url.isLocalFile(), true);
+ else
+ KMessageBox::sorry(this, i18n("Invalid URL."));
+ }
+}
+
+/*
+
+********************* TableItem ***************************
+
+*/
+
+TableItem::TableItem(QTable* table, EditType et,
+ LinkStatus const* linkstatus,
+ int column_index, int alignment)
+ : QTableItem(table, et, ""), ResultViewItem(linkstatus, column_index),
+ /*ls_((LinkStatus*)linkstatus),
+ column_index_(column_index),*/ alignment_(alignment)
+{
+ //Q_ASSERT(ls_);
+ //Q_ASSERT(column_index_ > 0);
+}
+
+TableItem::~TableItem()
+{}
+
+void TableItem::setColumnIndex(int i)
+{
+ Q_ASSERT(i > 0 && i <= table()->numCols());
+
+ //column_index_ = i;
+ ResultViewItem::setColumnIndex(i);
+}
+
+int TableItem::columnIndex() const
+{
+ Q_ASSERT(column_index_ <= table()->numCols());
+
+ return ResultViewItem::columnIndex();
+}
+
+void TableItem::setAlignment(int aFlags)
+{
+ alignment_ = aFlags;
+}
+
+int TableItem::alignment() const
+{
+ return alignment_;
+}
+/*
+LinkStatus const* const TableItem::linkStatus() const
+{
+ Q_ASSERT(ls_);
+ return ls_;
+}
+
+QColor const& TableItem::textStatusColor() const
+{
+ if(linkStatus()->errorOccurred())
+ {
+ //kdDebug(23100) << "ERROR: " << linkStatus()->error() << ": " << linkStatus()->absoluteUrl().prettyURL() << endl;
+ if(linkStatus()->error() == i18n( "Javascript not supported" ))
+ return Qt::lightGray;
+ else
+ return Qt::red;
+ }
+
+ else if(linkStatus()->absoluteUrl().hasRef())
+ return Qt::blue;
+
+ else if(linkStatus()->absoluteUrl().protocol() != "http" &&
+ linkStatus()->absoluteUrl().protocol() != "https")
+ return Qt::darkGreen;
+
+ else
+ {
+ QString status_code(QString::number(linkStatus()->httpHeader().statusCode()));
+
+ if(status_code[0] == '0')
+ {
+ kdWarning(23100) << "status code == 0: " << endl;
+ kdWarning(23100) << linkStatus()->toString() << endl;
+ kdWarning(23100) << linkStatus()->httpHeader().toString() << endl;
+ }
+ //Q_ASSERT(status_code[0] != '0');
+
+ if(status_code[0] == '5')
+ return Qt::darkMagenta;
+
+ else if(status_code[0] == '4')
+ return Qt::red;
+
+ else if(status_code[0] == '3')
+ return Qt::blue;
+
+ else if(status_code[0] == '2')
+ return Qt::darkGreen;
+
+ else
+ return Qt::red;
+ }
+}
+*/
+
+/*
+
+********************* TableItemURL ***************************
+
+*/
+
+TableItemURL::TableItemURL(QTable* table, EditType et,
+ LinkStatus const* linkstatus, int column_index)
+ : TableItem(table, et, linkstatus, column_index)
+{
+ setText();
+}
+
+void TableItemURL::setText()
+{
+ if(linkStatus()->node() && linkStatus()->malformed())
+ {
+ if(linkStatus()->node()->url().isEmpty())
+ QTableItem::setText( linkStatus()->node()->content().simplifyWhiteSpace() );
+ else
+ QTableItem::setText( linkStatus()->node()->url() );
+ }
+ else
+ {
+ KURL url = linkStatus()->absoluteUrl();
+ QTableItem::setText(::convertToLocal(linkStatus()));
+ }
+}
+
+void TableItemURL::setPixmap()
+{}
+
+QString TableItemURL::toolTip() const
+{
+ return text(); // Pode parecer repeticao mas nao eh... Ver construtor
+}
+
+void TableItemURL::paint( QPainter *p, const QColorGroup &cg,
+ const QRect &cr, bool selected )
+{
+ // Get a color to draw the text
+ QColorGroup m_cg(cg);
+ QColor color(textStatusColor());
+ m_cg.setColor(QColorGroup::Text, color);
+
+ QTableItem::paint(p, m_cg, cr, selected);
+}
+
+QColor const& TableItemURL::textStatusColor() const
+{
+ // TODO clean this code
+
+ QString status_code(QString::number(linkStatus()->httpHeader().statusCode()));
+
+ if(linkStatus()->errorOccurred())
+ {
+ if(linkStatus()->error().contains(i18n( "Timeout" )))
+ return darkMagenta;
+ else if(linkStatus()->error().contains(i18n( "not supported" )))
+ return lightGray;
+ else
+ return red;
+ }
+ else if(linkStatus()->absoluteUrl().protocol() != "http" &&
+ linkStatus()->absoluteUrl().protocol() != "https")
+ return black;
+
+ else if(status_code[0] == '5')
+ return darkMagenta;
+
+ else if(status_code[0] == '4')
+ return red;
+
+ else
+ return black;
+}
+
+/*
+
+********************* TableItemStatus ***************************
+
+*/
+
+TableItemStatus::TableItemStatus(QTable* table, EditType et,
+ LinkStatus const* linkstatus, int column_index)
+ : TableItem(table, et, linkstatus, column_index)
+{
+ setAlignment(Qt::AlignHCenter /*| Qt :: AlignVCenter*/);
+ setText();
+ setPixmap();
+}
+
+void TableItemStatus::setText()
+{
+ if(linkStatus()->errorOccurred() ||
+ linkStatus()->status() == "OK" ||
+ linkStatus()->status() == "304")
+ {
+ QTableItem::setText("");
+ }
+ else
+ {
+ /*
+ if(linkStatus()->httpHeader().statusCode() == 0)
+ {
+ kdDebug(23100) << "TableItemStatus::setText : statusCode() == 0" << endl;
+ kdDebug(23100) << linkStatus()->toString() << endl;
+ kdDebug(23100) << linkStatus()->docHtml() << endl;
+ }
+ */
+ //Q_ASSERT(linkStatus()->httpHeader().statusCode() != 0); //<------------------------------------------------------------
+ //QTableItem::setText( QString::number(linkStatus()->httpHeader().statusCode()) );
+ QTableItem::setText( linkStatus()->status() );
+ }
+}
+
+void TableItemStatus::setPixmap()
+{
+ if(linkStatus()->errorOccurred())
+ {
+
+ if(linkStatus()->error().contains(i18n( "Timeout" )))
+ {
+ QTableItem::setPixmap(SmallIcon("kalarm"));
+ }
+ else if(linkStatus()->error() == i18n( "Malformed" ))
+ {
+ QTableItem::setPixmap(SmallIcon("bug"));
+ }
+ else
+ {
+ QTableItem::setPixmap(SmallIcon("no"));
+ }
+ }
+ else if(linkStatus()->status() == "304")
+ QTableItem::setPixmap(UserIcon("304"));
+
+ else if(linkStatus()->status() == "OK")
+ QTableItem::setPixmap(SmallIcon("ok"));
+}
+
+QString TableItemStatus::toolTip() const
+{
+ if(linkStatus()->errorOccurred() ||
+ linkStatus()->absoluteUrl().hasRef() ||
+ (linkStatus()->absoluteUrl().protocol() != "http" &&
+ linkStatus()->absoluteUrl().protocol() != "https"))
+ {
+ return i18n("%1").arg(linkStatus()->status());
+ }
+ else
+ return i18n("%1").arg(linkStatus()->httpHeader().reasonPhrase());
+}
+
+void TableItemStatus::paint( QPainter *p, const QColorGroup &cg,
+ const QRect &cr, bool selected )
+{
+ p->fillRect( 0, 0, cr.width(), cr.height(),
+ selected ? cg.brush( QColorGroup::Highlight )
+ : cg.brush( QColorGroup::Base ) );
+
+ int w = cr.width();
+ int h = cr.height();
+
+ int x = 0;
+ if ( !pixmap().isNull() )
+ {
+ p->drawPixmap( ( w - pixmap().width() ) / 2,
+ ( h - pixmap().height() ) / 2,
+ pixmap() );
+ x = pixmap().width() + 2;
+ }
+
+ // Get a color to draw the text
+ QColorGroup m_cg(cg);
+ QColor color(textStatusColor());
+ m_cg.setColor(QColorGroup::Text, color);
+
+ //QTableItem::paint(p, m_cg, cr, selected);
+
+ if ( selected )
+ p->setPen( m_cg.highlightedText() );
+ else
+ p->setPen( m_cg.text() );
+ p->drawText( x + 2, 0, w - x - 4, h,
+ wordWrap() ? (alignment() | WordBreak) : alignment(), text() );
+}
+
+/*
+
+********************* TableItemNome ***************************
+
+*/
+
+TableItemNome::TableItemNome(QTable* table, EditType et,
+ LinkStatus const* linkstatus, int column_index)
+ : TableItem(table, et, linkstatus, column_index)
+{
+ setText();
+}
+
+void TableItemNome::setText()
+{
+ QString label(linkStatus()->label());
+ if(!label.isNull())
+ QTableItem::setText(label.simplifyWhiteSpace());
+}
+
+void TableItemNome::setPixmap()
+{}
+
+QString TableItemNome::toolTip() const
+{
+ return text(); // Pode parecer repeticao mas nao eh... Ver construtor
+}
+
+#include "tablelinkstatus.moc"
diff --git a/klinkstatus/src/ui/tablelinkstatus.h b/klinkstatus/src/ui/tablelinkstatus.h
new file mode 100644
index 00000000..0b3f2cf2
--- /dev/null
+++ b/klinkstatus/src/ui/tablelinkstatus.h
@@ -0,0 +1,202 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 TABLE_LINKSTATUS_H
+#define TABLE_LINKSTATUS_H
+
+#include <qtable.h>
+#include <qstring.h>
+#include <qcolor.h>
+#include <qpopupmenu.h>
+#include <qvaluevector.h>
+class QStringList;
+
+class KURL;
+
+#include <vector>
+
+#include "../engine/linkstatus.h"
+#include "celltooltip.h"
+#include "resultview.h"
+
+using namespace std;
+
+
+int const STATUS_COLUMN_WIDTH = 50;
+
+class TableItem;
+
+class TableLinkstatus: public QTable, public ResultView
+{
+ Q_OBJECT
+public:
+
+ TableLinkstatus(QWidget * parent = 0, const char * name = 0,
+ int column_index_status = 1,
+ int column_index_label = 2,
+ int column_index_URL = 3);
+ ~TableLinkstatus();
+
+ virtual void setColumns(QStringList const& columns);
+
+ /* Insere uma nova entrada no fim da tabela */
+ virtual void insertResult(LinkStatus const* linkstatus);
+
+
+ virtual void clear();
+ void removeColunas();
+ virtual void show(ResultView::Status const& status);
+ virtual void showAll();
+
+
+ /* Specialization of QTable::ensureCellVisible */
+ virtual void ensureCellVisible(int row, int col);
+
+ virtual bool textFitsInCell(int row, int col) const;
+ virtual bool isEmpty() const;
+
+ TableItem* myItem(int row, int col) const;
+
+private slots:
+
+ virtual void slotPopupContextMenu(int row, int col, const QPoint& pos);
+ virtual void slotCopyUrlToClipboard() const;
+ virtual void slotCopyParentUrlToClipboard() const;
+ virtual void slotCopyCellTextToClipboard() const;
+ virtual void slotEditReferrersWithQuanta();
+ virtual void slotEditReferrerWithQuanta(int id);
+ virtual void slotEditReferrerWithQuanta(KURL const& url);
+ virtual void slotViewUrlInBrowser();
+ virtual void slotViewParentUrlInBrowser();
+ virtual void loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root = false);
+
+private:
+
+ vector<TableItem*> generateRowOfTableItems(LinkStatus const* linkstatus);
+ void insereLinha(vector<TableItem*> items);
+
+private:
+/*
+ int col_status_;
+ int col_label_;
+ int col_url_;
+ CellToolTip* cell_tip_;
+ QPopupMenu context_table_menu_;
+ QPopupMenu* sub_menu_;
+*/
+};
+
+
+class TableItem: public QTableItem, public ResultViewItem
+{
+public:
+
+ TableItem(QTable* table, EditType et,
+ LinkStatus const* linkstatus,
+ int column_index, int alignment = Qt::AlignLeft);
+ virtual ~TableItem();
+
+ virtual void setColumnIndex(int i);
+ virtual int columnIndex() const;
+
+ void setAlignment(int aFlags);
+ virtual int alignment() const;
+
+ virtual QString toolTip() const = 0;
+ //LinkStatus const* const linkStatus() const;
+
+protected:
+
+ //QColor const& textStatusColor() const;
+ virtual void paint( QPainter *p, const QColorGroup &cg,
+ const QRect &cr, bool selected );
+ virtual void setText() = 0;
+ virtual void setPixmap() = 0;
+
+private:
+
+ //LinkStatus* ls_;
+ //int column_index_;
+ int alignment_;
+};
+
+
+class TableItemURL: public TableItem
+{
+public:
+
+ TableItemURL(QTable* table, EditType et,
+ LinkStatus const* linkstatus, int column_index = 3);
+ //virtual ~TableItemURL(){};
+
+ virtual QString toolTip() const;
+
+protected:
+
+ virtual void setText();
+ virtual void setPixmap();
+ virtual void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
+ QColor const& textStatusColor() const;
+};
+
+
+class TableItemStatus: public TableItem
+{
+public:
+
+ TableItemStatus(QTable* table, EditType et,
+ LinkStatus const* linkstatus, int column_index = 1);
+ //virtual ~TableItemStatus(){};
+
+ virtual QString toolTip() const;
+
+protected:
+
+ virtual void setText();
+ virtual void setPixmap();
+ virtual void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
+};
+
+
+class TableItemNome: public TableItem
+{
+public:
+
+ TableItemNome(QTable* table, EditType et,
+ LinkStatus const* linkstatus, int column_index = 2);
+ //virtual ~TableItemNome(){};
+
+ virtual QString toolTip() const;
+
+protected:
+
+ virtual void setText();
+ virtual void setPixmap();
+ //virtual void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
+};
+
+
+inline void TableItem::paint( QPainter *p, const QColorGroup &cg,
+ const QRect &cr, bool selected )
+{
+ QTableItem::paint(p, cg, cr, selected);
+}
+
+#endif
diff --git a/klinkstatus/src/ui/tabwidgetsession.cpp b/klinkstatus/src/ui/tabwidgetsession.cpp
new file mode 100644
index 00000000..9d9033a7
--- /dev/null
+++ b/klinkstatus/src/ui/tabwidgetsession.cpp
@@ -0,0 +1,274 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "tabwidgetsession.h"
+#include "sessionwidget.h"
+#include "klsconfig.h"
+#include "treeview.h"
+#include "../engine/searchmanager.h"
+#include "../actionmanager.h"
+
+#include <qtoolbutton.h>
+#include <qcursor.h>
+#include <qtooltip.h>
+#include <qpushbutton.h>
+#include <qpixmap.h>
+#include <qiconset.h>
+#include <qstringlist.h>
+
+#include <kapplication.h>
+#include <kstandarddirs.h>
+#include <klocale.h>
+#include <kstringhandler.h>
+#include <kcharsets.h>
+#include <kmimetype.h>
+#include <kaction.h>
+#include <kiconloader.h>
+
+
+TabWidgetSession::TabWidgetSession(QWidget* parent, const char* name, WFlags f)
+ : KTabWidget(parent, name, f) // tabs_ is initialized with size 17
+{
+ setFocusPolicy(QTabWidget::NoFocus);
+ setMargin(0);
+ setTabReorderingEnabled(true);
+ setHoverCloseButton(true);
+ setHoverCloseButtonDelayed(true);
+
+ tabs_.setAutoDelete(false);
+
+ QToolButton* tabs_new = new QToolButton(this);
+ tabs_new->setAccel(QKeySequence("Ctrl+N"));
+ connect(tabs_new, SIGNAL(clicked()), this, SLOT(slotNewSession()));
+ tabs_new->setIconSet(SmallIconSet("tab_new_raised"));
+ tabs_new->adjustSize();
+ QToolTip::add(tabs_new, i18n("Open new tab"));
+ setCornerWidget(tabs_new, TopLeft);
+
+ tabs_close_ = new QToolButton(this);
+ tabs_close_->setAccel(QKeySequence("Ctrl+W"));
+ connect(tabs_close_, SIGNAL(clicked()), this, SLOT(closeSession()));
+ tabs_close_->setIconSet(SmallIconSet("tab_remove"));
+ tabs_close_->adjustSize();
+ QToolTip::add(tabs_close_, i18n("Close the current tab"));
+ setCornerWidget(tabs_close_, TopRight);
+
+ connect(this, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotCurrentChanged(QWidget*)));
+}
+
+TabWidgetSession::~TabWidgetSession()
+{}
+
+SessionWidget* TabWidgetSession::currentSession() const
+{
+ return tabs_[currentPageIndex()];
+}
+
+bool TabWidgetSession::emptySessionsExist() const
+{
+ if(count() == 0)
+ return true;
+
+ for(int i = 0; i != count(); ++i)
+ {
+ Q_ASSERT(tabs_[i]);
+ if(tabs_[i]->isEmpty() && !tabs_[i]->getSearchManager()->searching())
+ return true;
+ }
+ return false;
+}
+
+SessionWidget* TabWidgetSession::getEmptySession() const
+{
+ Q_ASSERT(emptySessionsExist());
+ Q_ASSERT(count() != 0);
+
+ for(uint i = 0; i != tabs_.count(); ++i)
+ {
+ if(tabs_[i]->isEmpty())
+ return tabs_[i];
+ }
+ return 0;
+}
+
+// Remember to use count() and not size()
+QIntDict<SessionWidget> const& TabWidgetSession::sessions() const
+{
+ return tabs_;
+}
+
+SessionWidget* TabWidgetSession::newSession()
+{
+ // TODO: settings: number of connections, timeout
+ SessionWidget* session_widget = newSessionWidget();
+ connect(session_widget, SIGNAL(signalUpdateTabLabel(const LinkStatus *, SessionWidget*)),
+ this, SLOT(updateTabLabel(const LinkStatus *, SessionWidget*)));
+
+ insertTab(session_widget, i18n("Session") + i18n(QString::number(count() + 1).ascii()));
+
+ tabs_.insert(count() - 1, session_widget);
+ Q_ASSERT(tabs_[count() - 1]);
+ setCurrentPage(count() - 1);
+
+ return session_widget;
+}
+
+SessionWidget* TabWidgetSession::newSession(KURL const& url)
+{
+ SessionWidget* sessionwidget = newSession();
+ currentSession()->setUrl(url);
+
+ return sessionwidget;
+}
+
+void TabWidgetSession::closeSession()
+{
+ if(count() > 1)
+ removePage(currentPage());
+
+ tabs_close_->setEnabled(count() > 1);
+ ActionManager::getInstance()->action("close_tab")->setEnabled(count() > 1);
+}
+
+SessionWidget* TabWidgetSession::newSessionWidget()
+{
+ SessionWidget* session_widget = new SessionWidget(KLSConfig::maxConnectionsNumber(),
+ KLSConfig::timeOut(), this, QString("session_widget-" + count()));
+
+ QStringList columns;
+
+ columns.push_back(TreeView::URL_LABEL);
+ columns.push_back(TreeView::STATUS_LABEL);
+ if(KLSConfig::showMarkupStatus())
+ columns.push_back(TreeView::MARKUP_LABEL);
+ columns.push_back(TreeView::LINK_LABEL_LABEL);
+
+ session_widget->setColumns(columns);
+
+ session_widget->tree_view->restoreLayout(KLSConfig::self()->config(), "klinkstatus");
+
+ return session_widget;
+}
+
+void TabWidgetSession::updateTabLabel(LinkStatus const* linkstatus, SessionWidget* page)
+{
+ QString label;
+ KURL url = linkstatus->absoluteUrl();
+
+ if(linkstatus->hasHtmlDocTitle())
+ {
+ label = linkstatus->htmlDocTitle();
+ label = KStringHandler::csqueeze(label, 30);
+ }
+ else
+ {
+ if(url.fileName(false).isEmpty())
+ label = url.prettyURL();
+ else
+ label = url.fileName(false);
+
+ label = KStringHandler::lsqueeze(label, 30);
+ }
+
+ changeTab(page, KCharsets::resolveEntities(label));
+ setTabIconSet(page, QIconSet(KMimeType::pixmapForURL(url)));
+}
+
+void TabWidgetSession::slotLoadSettings()
+{
+ for(uint i = 0; i != tabs_.count(); ++i)
+ {
+ if(tabs_[i]->isEmpty())
+ {
+ SessionWidget* session_widget = tabs_[i];
+ if(session_widget->isEmpty())
+ session_widget->slotLoadSettings(true);
+ else
+ session_widget->slotLoadSettings(false);
+ }
+ }
+}
+
+void TabWidgetSession::setUrl(KURL const& url)
+{
+ currentSession()->setUrl(url);
+}
+
+void TabWidgetSession::slotCurrentChanged(QWidget* /*page*/)
+{
+ tabs_close_->setEnabled(count() > 1);
+
+ SessionWidget* session_widget = currentSession();
+ ActionManager::getInstance()->slotUpdateSessionWidgetActions(session_widget);
+}
+
+void TabWidgetSession::slotHideSearchPanel()
+{
+ currentSession()->slotHideSearchPanel();
+}
+
+void TabWidgetSession::slotFollowLastLinkChecked()
+{
+ currentSession()->slotFollowLastLinkChecked();
+}
+
+void TabWidgetSession::slotResetSearchOptions()
+{
+ currentSession()->slotResetSearchOptions();
+}
+
+void TabWidgetSession::slotNewSession(KURL const& url)
+{
+ if(count() == 0 || !emptySessionsExist())
+ {
+ SessionWidget* sessionwidget = newSession(url);
+ ActionManager::getInstance()->initSessionWidget(sessionwidget);
+ }
+ else
+ {
+ SessionWidget* sessionwidget = getEmptySession();
+ sessionwidget->setUrl(url);
+ showPage(sessionwidget);
+ }
+
+ ActionManager::getInstance()->action("close_tab")->setEnabled(count() > 1);
+}
+
+void TabWidgetSession::slotStartSearch()
+{
+ currentSession()->slotStartSearch();
+}
+
+void TabWidgetSession::slotPauseSearch()
+{
+ currentSession()->slotPauseSearch();
+}
+
+void TabWidgetSession::slotStopSearch()
+{
+ currentSession()->slotStopSearch();
+}
+
+void TabWidgetSession::slotExportAsHTML()
+{
+ currentSession()->slotExportAsHTML();
+}
+
+
+#include "tabwidgetsession.moc"
diff --git a/klinkstatus/src/ui/tabwidgetsession.h b/klinkstatus/src/ui/tabwidgetsession.h
new file mode 100644
index 00000000..616c8173
--- /dev/null
+++ b/klinkstatus/src/ui/tabwidgetsession.h
@@ -0,0 +1,85 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 TABWIDGETSESSION_H
+#define TABWIDGETSESSION_H
+
+#include <ktabwidget.h>
+#include <kurl.h>
+
+#include <qintdict.h>
+class QToolButton;
+
+class SessionWidget;
+class LinkStatus;
+
+
+/**
+This class handles the creation and destruction of sessions, i.e, severals instances of searching tabs.
+
+@author Paulo Moura Guedes
+*/
+class TabWidgetSession : public KTabWidget
+{
+ Q_OBJECT
+
+public:
+ TabWidgetSession(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
+ ~TabWidgetSession();
+
+ /** Set the URL in the current session widget */
+ void setUrl(KURL const& url);
+
+ SessionWidget* currentSession() const;
+ bool emptySessionsExist() const;
+ /** Returns the first empty session it finds */
+ SessionWidget* getEmptySession() const;
+ QIntDict<SessionWidget> const& sessions() const;
+
+
+public slots:
+ void slotNewSession(KURL const& url = KURL());
+ SessionWidget* newSession();
+ SessionWidget* newSession(KURL const& url);
+ void closeSession();
+ void updateTabLabel(LinkStatus const* linkstatus, SessionWidget*);
+ void slotLoadSettings();
+
+ void slotHideSearchPanel();
+ void slotResetSearchOptions();
+ void slotFollowLastLinkChecked();
+
+ void slotStartSearch();
+ void slotPauseSearch();
+ void slotStopSearch();
+
+ void slotExportAsHTML();
+
+private slots:
+ void slotCurrentChanged(QWidget* page);
+
+private:
+ SessionWidget* newSessionWidget();
+
+private:
+ QIntDict<SessionWidget> tabs_;
+ QToolButton* tabs_close_;
+};
+
+#endif
diff --git a/klinkstatus/src/ui/treeview.cpp b/klinkstatus/src/ui/treeview.cpp
new file mode 100644
index 00000000..7ad92d8e
--- /dev/null
+++ b/klinkstatus/src/ui/treeview.cpp
@@ -0,0 +1,609 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 <klocale.h>
+#include <kiconloader.h>
+#include <kapplication.h>
+#include <kurl.h>
+#include <krun.h>
+#include <dcopref.h>
+#include <kmessagebox.h>
+#include <dcopclient.h>
+#include <kcharsets.h>
+
+#include <qvaluevector.h>
+#include <qheader.h>
+#include <qclipboard.h>
+
+#include "treeview.h"
+#include "../global.h"
+#include "../engine/linkstatus.h"
+#include "../engine/linkfilter.h"
+#include "../cfg/klsconfig.h"
+
+
+TreeView::TreeView(QWidget *parent, const char *name)
+ : KListView(parent, name),
+ ResultView(),
+ current_column_(0)
+{
+ setShowToolTips(true);
+ //setAllColumnsShowFocus(true);
+ setSorting(1000); // don't start sorting any column
+ setShowSortIndicator(true);
+ //setFocusPolicy( WheelFocus );
+ setRootIsDecorated(KLSConfig::displayTreeView());
+// setResizeMode(QListView::LastColumn);
+
+ sub_menu_ = new QPopupMenu(this, "sub_menu_referrers");
+
+ connect(this, SIGNAL( rightButtonClicked ( QListViewItem *, const QPoint &, int )),
+ this, SLOT( slotPopupContextMenu( QListViewItem *, const QPoint &, int )) );
+}
+
+
+TreeView::~TreeView()
+{
+ saveLayout(KLSConfig::self()->config(), "klinkstatus");
+}
+
+void TreeView::setColumns(QStringList const& columns)
+{
+ ResultView::setColumns(columns);
+ removeColunas();
+
+// resetColumns is called automatically
+ for(uint i = 0; i != columns.size(); ++i)
+ {
+ addColumn(i18n(columns[i]));
+ setColumnWidthMode(i, QListView::Manual);
+ }
+
+ setColumnAlignment(col_status_ - 1, Qt::AlignCenter);
+ if(KLSConfig::showMarkupStatus())
+ setColumnAlignment(col_markup_ - 1, Qt::AlignCenter);
+}
+
+void TreeView::resetColumns()
+{
+ setColumnWidth(col_url_ - 1, (int)(0.45 * width()));
+
+ setResizeMode(QListView::LastColumn); // fit to the window
+ // resize again
+ setColumnWidthMode(col_label_ - 1, QListView::Manual);
+ setResizeMode(QListView::NoColumn);
+}
+
+double TreeView::columnsWidth() const
+{
+ kdDebug(23100) << "columns: " << columns() << endl;
+
+ double width = 0.0;
+ for(int i = 0; i != columns(); ++i)
+ {
+ kdDebug(23100) << "column width: " << columnWidth(i) << endl;
+ width += columnWidth(i);
+ }
+ return width;
+}
+
+void TreeView::clear()
+{
+ KListView::clear();
+}
+
+void TreeView::removeColunas()
+{
+ clear();
+}
+
+void TreeView::show(ResultView::Status const& status)
+{
+ QListViewItemIterator it(static_cast<KListView*> (this));
+ while(it.current())
+ {
+ TreeViewItem* item = myItem(it.current());
+ if(!ResultView::displayableWithStatus(item->linkStatus(), status))
+ {
+ item->setVisible(false);
+ //kdDebug(23100) << "Hide: " << item->linkStatus()->absoluteUrl().url() << endl;
+ }
+ else
+ {
+ item->setVisible(true);
+ //item->setEnabled(true);
+ /*
+ if(KLSConfig::displayTreeView() && status != ResultView::good && item->parent())
+ {
+ TreeViewItem* parent = myItem(item->parent());
+ while(parent)
+ {
+ kdDebug(23100) << "Show: " << parent->linkStatus()->absoluteUrl().url() << endl;
+
+ parent->setVisible(true);
+ //parent->setEnabled(false);
+
+ if(parent->parent())
+ parent = myItem(parent->parent());
+ else
+ parent = 0;
+ }
+ }
+ */
+ }
+//
+ ++it;
+ }
+}
+
+void TreeView::show(LinkMatcher link_matcher)
+{
+ QListViewItemIterator it(this);
+ while(it.current())
+ {
+ TreeViewItem* item = myItem(it.current());
+ bool match = link_matcher.matches(*(item->linkStatus()));
+
+ if(tree_display_)
+ item->setEnabled(match);
+ else
+ item->setVisible(match);
+
+ ++it;
+ }
+}
+
+void TreeView::showAll()
+{
+ QListViewItemIterator it(this);
+ while(it.current())
+ {
+ it.current()->setVisible(true);
+ //it.current()->setEnabled(true);
+ ++it;
+ }
+}
+
+void TreeView::ensureRowVisible(const QListViewItem * i, bool tree_display)
+{
+ QScrollBar* vertical_scroll_bar = verticalScrollBar();
+
+ if(tree_display ||
+ vertical_scroll_bar->value() > (vertical_scroll_bar->maxValue() - vertical_scroll_bar->lineStep()))
+ ensureItemVisible(i);
+}
+
+bool TreeView::isEmpty() const
+{
+ return !childCount();
+}
+
+void TreeView::resizeEvent(QResizeEvent *e)
+{
+ KListView::resizeEvent(e);
+ resetColumns();
+ clipper()->repaint();
+}
+
+void TreeView::slotPopupContextMenu(QListViewItem* item, const QPoint& pos, int col)
+{
+ current_column_ = col;
+
+ TreeViewItem* tree_item = myItem(item);
+ if(tree_item)
+ {
+ QValueVector<KURL> referrers = tree_item->linkStatus()->referrers();
+ loadContextTableMenu(referrers, tree_item->linkStatus()->isRoot());
+ context_table_menu_.popup(pos);
+ }
+}
+
+void TreeView::slotCopyUrlToClipboard() const
+{
+ TreeViewItem* _item = myItem(currentItem());
+ QString content(_item->linkStatus()->absoluteUrl().prettyURL());
+ QClipboard* cb = kapp->clipboard();
+ cb->setText(content);
+}
+
+void TreeView::slotCopyParentUrlToClipboard() const
+{
+ TreeViewItem* _item = myItem(currentItem());
+ QString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL());
+ QClipboard* cb = kapp->clipboard();
+ cb->setText(content);
+}
+
+void TreeView::slotCopyCellTextToClipboard() const
+{
+ TreeViewItem* _item = myItem(currentItem());
+ QString cell_text(_item->text(current_column_));
+ QClipboard* cb = kapp->clipboard();
+ cb->setText(cell_text);
+}
+
+void TreeView::slotEditReferrersWithQuanta()
+{
+ TreeViewItem* _item = myItem(currentItem());
+ QValueVector<KURL> referrers = _item->linkStatus()->referrers();
+
+ if(Global::isQuantaAvailableViaDCOP())
+ {
+ for(uint i = 0; i != referrers.size(); ++i)
+ slotEditReferrerWithQuanta(referrers[i]);
+ }
+ else
+ {
+ QStringList list_urls;
+
+ for(uint i = 0; i != referrers.size(); ++i)
+ list_urls.append(referrers[i].url());
+
+ Global::openQuanta(list_urls);
+ }
+}
+
+void TreeView::slotEditReferrerWithQuanta(int id)
+{
+ int index = sub_menu_->indexOf(id);
+
+ if(index == 0)
+ return;
+ Q_ASSERT(index != -1);
+ Q_ASSERT(index != 1); // separator
+
+ //kdDebug(23100) << "id: " << id << endl;
+ //kdDebug(23100) << "index: " << index << endl;
+
+ index -= 2; // The list of referrers starts on index = 2
+
+ TreeViewItem* _item = myItem(currentItem());
+ QValueVector<KURL> referrers = _item->linkStatus()->referrers();
+ Q_ASSERT(index >= 0 && (uint)index < referrers.size());
+
+ slotEditReferrerWithQuanta(referrers[index]);
+}
+
+void TreeView::slotEditReferrerWithQuanta(KURL const& url)
+{
+ QString filePath = url.url();
+
+ if(Global::isQuantaAvailableViaDCOP())
+ {
+ DCOPRef quanta(Global::quantaDCOPAppId(),"WindowManagerIf");
+ bool success = quanta.send("openFile", filePath, 0, 0);
+
+ if(!success)
+ {
+ QString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
+ KMessageBox::error(parentWidget(), message);
+ }
+ }
+ else
+ {
+ QStringList args(url.url());
+ Global::openQuanta(args);
+ }
+}
+
+void TreeView::slotViewUrlInBrowser()
+{
+ TreeViewItem* _item = myItem(currentItem());
+ KURL url = _item->linkStatus()->absoluteUrl();
+
+ if(url.isValid())
+ {
+ (void) new KRun (url, 0, url.isLocalFile(), true);
+ }
+ else
+ KMessageBox::sorry(this, i18n("Invalid URL."));
+}
+
+void TreeView::slotViewParentUrlInBrowser()
+{
+ TreeViewItem* _item = myItem(currentItem());
+
+ if(_item->linkStatus()->isRoot())
+ {
+ KMessageBox::sorry(this, i18n("ROOT URL."));
+ }
+ else
+ {
+ LinkStatus const* ls_parent = _item->linkStatus()->parent();
+ Q_ASSERT(ls_parent);
+
+ KURL url = ls_parent->absoluteUrl();
+
+ if(url.isValid())
+ (void) new KRun (url, 0, url.isLocalFile(), true);
+ else
+ KMessageBox::sorry(this, i18n("Invalid URL."));
+ }
+}
+
+void TreeView::loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root)
+{
+ context_table_menu_.clear();
+ sub_menu_->clear();
+
+ if(!is_root)
+ {
+ sub_menu_->insertItem(i18n("All"), this, SLOT(slotEditReferrersWithQuanta()));
+ sub_menu_->insertSeparator();
+
+ for(uint i = 0; i != referrers.size(); ++i)
+ {
+ sub_menu_->insertItem(referrers[i].prettyURL());
+ }
+ connect(sub_menu_, SIGNAL(activated(int)), this, SLOT(slotEditReferrerWithQuanta(int)));
+
+ context_table_menu_.insertItem(SmallIconSet("edit"), i18n("Edit Referrer with Quanta"),
+ sub_menu_);
+ context_table_menu_.insertSeparator();
+ }
+ else
+ {
+ int id = context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Edit Referrer with Quanta"));
+ context_table_menu_.setItemEnabled(id, false);
+ }
+
+ context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open URL"),
+ this, SLOT(slotViewUrlInBrowser()));
+
+ context_table_menu_.insertItem(/*SmallIconSet("fileopen"), */i18n("Open Referrer URL"),
+ this, SLOT(slotViewParentUrlInBrowser()));
+
+ context_table_menu_.insertSeparator();
+
+ context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy URL"),
+ this, SLOT(slotCopyUrlToClipboard()));
+
+ context_table_menu_.insertItem(/*SmallIconSet("editcopy"), */i18n("Copy Referrer URL"),
+ this, SLOT(slotCopyParentUrlToClipboard()));
+
+ context_table_menu_.insertItem(/*SmallIconSet("editcopy"), */i18n("Copy Cell Text"),
+ this, SLOT(slotCopyCellTextToClipboard()));
+}
+
+TreeViewItem* TreeView::myItem(QListViewItem* item) const
+{
+ TreeViewItem* _item = dynamic_cast<TreeViewItem*> (item);
+ Q_ASSERT(_item);
+ return _item;
+}
+
+
+/* ******************************* TreeViewItem ******************************* */
+
+TreeViewItem::TreeViewItem(TreeView* parent, QListViewItem* after,
+ LinkStatus const* linkstatus)
+ : KListViewItem(parent, after),
+ last_child_(0), root_(parent)
+{
+ init(linkstatus);
+}
+
+TreeViewItem::TreeViewItem(TreeView* root, QListViewItem* listview_item, QListViewItem* after,
+ LinkStatus const* linkstatus)
+ : KListViewItem(listview_item, after),
+ last_child_(0), root_(root)
+
+{
+ init(linkstatus);
+}
+
+TreeViewItem::~TreeViewItem()
+{}
+
+void TreeViewItem::init(LinkStatus const* linkstatus)
+{
+ setOpen(true);
+
+ for(int i = 0; i != root_->numberOfColumns(); ++i)
+ {
+ TreeColumnViewItem item(root_, linkstatus, i + 1);
+ column_items_.push_back(item);
+
+ if(i + 1 == root_->urlColumnIndex()) {
+ setText(item.columnIndex() - 1, KURL::decode_string(
+ KCharsets::resolveEntities(item.text(i + 1))));
+ }
+ else {
+ setText(item.columnIndex() - 1, KCharsets::resolveEntities(item.text(i + 1)));
+ }
+
+ setPixmap(item.columnIndex() - 1, item.pixmap(i + 1));
+ }
+}
+
+void TreeViewItem::setLastChild(QListViewItem* last_child)
+{
+ Q_ASSERT(last_child);
+ last_child_ = last_child;
+}
+
+QListViewItem* TreeViewItem::lastChild() const
+{
+ return last_child_;
+}
+
+QString TreeViewItem::key(int column, bool) const
+{
+ // FIXME magic numbers
+ switch(column)
+ {
+ case 1: // status column
+ return linkStatus()->statusText();
+ }
+
+ return text(column);
+}
+
+LinkStatus const* TreeViewItem::linkStatus() const
+{
+ return column_items_[0].linkStatus();
+}
+
+void TreeViewItem::paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align)
+{
+ TreeColumnViewItem item = column_items_[column];
+
+ // Get a color to draw the text
+ QColorGroup m_cg(cg);
+ QColor color(item.textStatusColor());
+ m_cg.setColor(QColorGroup::Text, color);
+
+ KListViewItem::paintCell(p, m_cg, column, width, align);
+
+ setHeight(22);
+}
+
+
+/* ******************************* TreeColumnViewItem ******************************* */
+
+TreeColumnViewItem::TreeColumnViewItem(TreeView* root, LinkStatus const* linkstatus, int column_index)
+ : root_(root), ls_(linkstatus), column_index_(column_index)
+{
+ Q_ASSERT(ls_);
+// Q_ASSERT(column_index_ > 0);
+}
+
+TreeColumnViewItem::~TreeColumnViewItem()
+{}
+
+/*
+void TreeColumnViewItem::setColumnIndex(int i)
+{
+ Q_ASSERT(i > 0);
+ column_index_ = i;
+}
+*/
+
+int TreeColumnViewItem::columnIndex() const
+{
+ return column_index_;
+}
+
+LinkStatus const* TreeColumnViewItem::linkStatus() const
+{
+ Q_ASSERT(ls_);
+ return ls_;
+}
+
+QColor const& TreeColumnViewItem::textStatusColor() const
+{
+ if(columnIndex() == root_->urlColumnIndex() || columnIndex() == root_->statusColumnIndex())
+ {
+ if(linkStatus()->status() == LinkStatus::BROKEN)
+ return Qt::red;
+ else if(linkStatus()->status() == LinkStatus::HTTP_CLIENT_ERROR)
+ return Qt::red;
+ else if(linkStatus()->status() == LinkStatus::HTTP_REDIRECTION)
+ return Qt::black;
+ else if(linkStatus()->status() == LinkStatus::HTTP_SERVER_ERROR)
+ return Qt::darkMagenta;
+ else if(linkStatus()->status() == LinkStatus::MALFORMED)
+ return Qt::red;
+ else if(linkStatus()->status() == LinkStatus::NOT_SUPPORTED)
+ return Qt::lightGray;
+ else if(linkStatus()->status() == LinkStatus::SUCCESSFULL)
+ return Qt::black;
+ else if(linkStatus()->status() == LinkStatus::TIMEOUT)
+ return Qt::darkMagenta;
+ else if(linkStatus()->status() == LinkStatus::UNDETERMINED)
+ return Qt::blue;
+
+ return Qt::red;
+ }
+ else
+ return Qt::black;
+}
+
+
+QString TreeColumnViewItem::text(int column) const
+{
+ Q_ASSERT(column > 0);
+
+
+ if(column == root_->urlColumnIndex())
+ {
+ if(linkStatus()->node() && linkStatus()->malformed())
+ {
+ if(linkStatus()->node()->url().isEmpty())
+ return linkStatus()->node()->content().simplifyWhiteSpace();
+ else
+ return linkStatus()->node()->url();
+ }
+ else
+ {
+ KURL url = linkStatus()->absoluteUrl();
+ return Url::convertToLocal(linkStatus());
+ }
+ }
+ else if(column == root_->statusColumnIndex())
+ {
+ return QString();
+ }
+ else if(column == root_->labelColumnIndex())
+ {
+ QString label(linkStatus()->label());
+ if(!label.isNull())
+ return label.simplifyWhiteSpace();
+ }
+
+ return QString();
+}
+
+QPixmap TreeColumnViewItem::pixmap(int column) const
+{
+ Q_ASSERT(column > 0);
+
+ if(column == root_->statusColumnIndex())
+ {
+ if(linkStatus()->status() == LinkStatus::BROKEN)
+ return SmallIcon("no");
+ else if(linkStatus()->status() == LinkStatus::HTTP_CLIENT_ERROR)
+ return SmallIcon("no");
+ else if(linkStatus()->status() == LinkStatus::HTTP_REDIRECTION)
+ {
+ if(linkStatus()->statusText() == "304")
+ return UserIcon("304");
+ else
+ return SmallIcon("redo");
+ }
+ else if(linkStatus()->status() == LinkStatus::HTTP_SERVER_ERROR)
+ return SmallIcon("no");
+ else if(linkStatus()->status() == LinkStatus::MALFORMED)
+ return SmallIcon("editdelete");
+ else if(linkStatus()->status() == LinkStatus::NOT_SUPPORTED)
+ return SmallIcon("help");
+ else if(linkStatus()->status() == LinkStatus::SUCCESSFULL)
+ return SmallIcon("ok");
+ else if(linkStatus()->status() == LinkStatus::TIMEOUT)
+ return SmallIcon("history_clear");
+ else if(linkStatus()->status() == LinkStatus::UNDETERMINED)
+ return SmallIcon("help");
+ }
+
+ return QPixmap();
+}
+
+
+#include "treeview.moc"
diff --git a/klinkstatus/src/ui/treeview.h b/klinkstatus/src/ui/treeview.h
new file mode 100644
index 00000000..eef34ff8
--- /dev/null
+++ b/klinkstatus/src/ui/treeview.h
@@ -0,0 +1,142 @@
+//
+// C++ Interface: treeview
+//
+// Description:
+//
+//
+// Author: Paulo Moura Guedes <moura@kdewebdev.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef TREEVIEW_H
+#define TREEVIEW_H
+
+#include <klistview.h>
+
+#include "resultview.h"
+class TreeViewItem;
+class TreeColumnViewItem;
+class LinkMatcher;
+
+/**
+@author Paulo Moura Guedes
+TreeView and TreeViewItem and currently a little messes up in its API
+because of ResultView. ResultView class was to be the base interface to
+a QTable and a QListView, but the APIs are a little diferent... then I realize
+that a QTable view isn't needed at all so some day I will clean this up.
+*/
+class TreeView : public KListView, public ResultView
+{
+ Q_OBJECT
+public:
+
+ TreeView(QWidget *parent = 0, const char *name = 0);
+ ~TreeView();
+
+ virtual void setColumns(QStringList const& columns);
+ virtual void clear();
+ void removeColunas();
+ virtual void show(ResultView::Status const& status);
+ void show(LinkMatcher link_matcher);
+ virtual void showAll();
+
+ void setTreeDisplay(bool tree_display);
+
+ /**
+ If tree_display is false the view scrolls to follow the last link inserted,
+ except if the user scrolls the view up (like Konsole).
+ If tree_view, it follows always the last link inserted.
+ */
+ void ensureRowVisible(const QListViewItem * i, bool tree_display);
+ virtual bool isEmpty() const;
+
+ TreeViewItem* myItem(QListViewItem* item) const;
+
+protected:
+ virtual void resizeEvent(QResizeEvent *e);
+
+private slots:
+
+ void slotPopupContextMenu(QListViewItem *, const QPoint &, int);
+ virtual void slotCopyUrlToClipboard() const;
+ virtual void slotCopyParentUrlToClipboard() const;
+ virtual void slotCopyCellTextToClipboard() const;
+ virtual void slotEditReferrersWithQuanta();
+ virtual void slotEditReferrerWithQuanta(int id);
+ virtual void slotEditReferrerWithQuanta(KURL const& url);
+ virtual void slotViewUrlInBrowser();
+ virtual void slotViewParentUrlInBrowser();
+ virtual void loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root = false);
+
+private:
+ void resetColumns();
+ double columnsWidth() const;
+
+private:
+ int current_column_; // apparently it's impossible to know what is the current column
+ bool tree_display_;
+};
+
+inline void TreeView::setTreeDisplay(bool tree_display) {
+ tree_display_ = tree_display;
+ setRootIsDecorated(tree_display_);
+}
+
+
+/* ******************************* TreeViewItem ******************************* */
+
+class TreeViewItem: public KListViewItem
+{
+public:
+
+ TreeViewItem(TreeView* parent, QListViewItem* after,
+ LinkStatus const* linkstatus);
+ TreeViewItem(TreeView* root, QListViewItem* parent_item, QListViewItem* after,
+ LinkStatus const* linkstatus);
+ virtual ~TreeViewItem();
+
+ void setLastChild(QListViewItem* last_child);
+ QListViewItem* lastChild() const;
+
+ QString key(int column, bool) const;
+ LinkStatus const* linkStatus() const;
+
+protected:
+ virtual void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align);
+
+private:
+ void init(LinkStatus const* linkstatus);
+
+private:
+ QValueVector<TreeColumnViewItem> column_items_;
+ QListViewItem* last_child_;
+ TreeView* root_;
+};
+
+
+/* ******************************* TreeColumnViewItem ******************************* */
+
+class TreeColumnViewItem
+{
+public:
+ TreeColumnViewItem()
+ {}
+ ;
+ TreeColumnViewItem(TreeView* root, LinkStatus const* linkstatus, int column_index);
+ ~TreeColumnViewItem();
+
+ //void setColumnIndex(int i);
+ int columnIndex() const;
+ LinkStatus const* linkStatus() const;
+ QColor const& textStatusColor() const;
+ QString text(int column) const;
+ QPixmap pixmap(int column) const;
+
+private:
+ TreeView* root_;
+ LinkStatus const* ls_;
+ int column_index_;
+};
+
+#endif
diff --git a/klinkstatus/src/utils/Makefile.am b/klinkstatus/src/utils/Makefile.am
new file mode 100644
index 00000000..0d2ba5ba
--- /dev/null
+++ b/klinkstatus/src/utils/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = $(LIBXSLT_CFLAGS) $(all_includes)
+METASOURCES = AUTO
+libutils_la_LDFLAGS = $(all_libraries)
+noinst_LTLIBRARIES = libutils.la
+noinst_HEADERS = mvector.h utils.h xsl.h
+libutils_la_SOURCES = utils.cpp xsl.cpp
+libutils_la_LIBADD = $(LIBXSLT_LIBS) $(LIBXML_LIBS)
diff --git a/klinkstatus/src/utils/mvector.h b/klinkstatus/src/utils/mvector.h
new file mode 100644
index 00000000..e48cfda3
--- /dev/null
+++ b/klinkstatus/src/utils/mvector.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 VECTOR_H
+#define VECTOR_H
+
+#include <vector>
+
+using namespace std;
+
+typedef unsigned int uint;
+
+
+template<class T>
+void append(vector<T>* const v1, vector<T> const* const v2);
+
+
+template<class T>
+void append(vector<T>* const v1, vector<T> const* const v2)
+{
+ v1->reserve(v1->size() + v2->size());
+
+ for(uint i = 0; i != v2->size(); ++i)
+ v1->push_back( (*v2)[i]);
+}
+
+
+#endif
diff --git a/klinkstatus/src/utils/utils.cpp b/klinkstatus/src/utils/utils.cpp
new file mode 100644
index 00000000..6259f8d0
--- /dev/null
+++ b/klinkstatus/src/utils/utils.cpp
@@ -0,0 +1,204 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "utils.h"
+
+#include <qprocess.h>
+#include <qwidget.h>
+
+#include <kapplication.h>
+#include <kmessagebox.h>
+#include <kdebug.h>
+
+
+QString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = {
+
+ { "&euro;", "@" },
+ { "&#09;", "\t" },
+ { "&#10;", "\n" },
+ { "&#13;", "\r" },
+ { "&#32;", " " },
+ { "&#33;", "!" },
+ { "&#34;", "\"" },
+ { "&#35;", "#" },
+ { "&#36;", "$" },
+ { "&#37;", "%" },
+ { "&#38;", "&" },
+ { "&#39;", "'" },
+ { "&#40;", "(" },
+ { "&#41;", ")" },
+ { "&#42;", "*" },
+ { "&#43;", "+" },
+ { "&#44;", "," },
+ { "&#45;", "-" },
+ { "&#46;", "." },
+ { "&#47;", "/" },
+ // numbers....
+ { "&#58;", ":" },
+ { "&#59;", ";" },
+ { "&#60;", "<" },
+ { "&#61;", "=" },
+ { "&#62;", ">" },
+ { "&#63;", "?" },
+ { "&#64;", "@" },
+ // letters...
+ { "&#91;", "[" },
+ { "&#92;", "\\" },
+ { "&#93;", "]" },
+ { "&#94;", "^" },
+ { "&#95;", "_" },
+ { "&#96;", "`" },
+ //letters...
+ { "&#123;", "{" },
+ { "&#124;", "|" },
+ { "&#125;", "}" },
+ { "&#126;", "~" },
+ { "&#128;", "?" },
+ { "&#130;", "," },
+ { "&#131;", "?" },
+ { "&#132;", "\"" },
+ { "&#133;", "?" },
+ { "&#134;", "?" },
+ { "&#135;", "?" },
+ { "&#137;", "?" },
+ { "&#138;", "?" },
+ { "&#139;", "<" },
+ { "&#140;", "?" },
+ { "&#142;", "?" },
+ { "&#145;", "'" },
+ { "&#146;", "'" },
+ { "&#147;", "\"" },
+ { "&#148;", "\"" },
+ { "&#149;", "*" },
+ { "&#150;", "-" },
+ { "&#151;", "-" },
+ { "&#152;", "~" },
+ { "&#153;", "?" },
+ { "&#154;", "?" },
+ { "&#155;", ">" },
+ { "&#156;", "?" },
+ { "&#158;", "?" },
+ { "&#159;", "?" },
+ { "&#161;", "?" },
+ { "&#162;", "?" },
+ { "&#163;", "?" },
+ { "&#164;", "?" },
+ { "&#165;", "?" },
+ { "&#166;", "?" },
+ { "&#167;", "?" },
+ { "&#168;", "?" },
+ { "&#169;", "" },
+ { "&#170;", "?" },
+ { "&#171;", "?" },
+ { "&#172;", "?" },
+ { "&#174;", "?" },
+ { "&#175;", "?" },
+ { "&#176;", "" },
+ { "&#177;", "?" },
+ { "&#178;", "" },
+ { "&#179;", "?" },
+ { "&#180;", "?" },
+ { "&#181;", "?" },
+ { "&#182;", "?" },
+ { "&#183;", "" },
+ { "&#184;", "?" },
+ { "&#185;", "?" },
+ { "&#186;", "?" },
+ { "&#187;", "?" },
+ { "&#188;", "?" },
+ { "&#189;", "?" },
+ { "&#190;", "?" }
+
+};
+
+
+void decode(QString& url)
+{
+ if( (int)url.find('&') != -1)
+ {
+ for(int i = 0; i != NUMBER_OF_HTML_CODES; ++i)
+ {
+ int index = url.find(htmlDocCharset[i][0]);
+ if(index != - 1)
+ {
+ url.replace(htmlDocCharset[i][0], htmlDocCharset[i][1]);
+ }
+ }
+ }
+}
+/*
+void decode(string& url)
+{
+ if( (int)url.find('&') != -1)
+ {
+ for(int i = 0; i != NUMBER_OF_HTML_CODES; ++i)
+ {
+ int index = url.find(htmlDocCharset[i][0].latin1());
+ if(index != - 1)
+ {
+ int length = htmlDocCharset[i][0].length();
+ url.replace(index, length, htmlDocCharset[i][1].latin1());
+ }
+ }
+ }
+}
+*/
+int smallerUnsigned(int a, int b)
+{
+ if(a >= 0 && b >= 0)
+ {
+ if(a < b)
+ return -1;
+ else if(a > b)
+ return 1;
+ else
+ return 0;
+ }
+
+ else if(a < 0 && b < 0)
+ return 0;
+
+ else if(a < 0)
+ return 1;
+
+ else
+ return -1;
+}
+
+namespace FileManager
+{
+QString read(QString const& path)
+{
+ QFile file(path);
+
+ if(!file.open(IO_ReadOnly))
+ {
+ kdDebug() << "File " << path << " not found." << endl;
+ return QString();
+ }
+
+ QTextStream stream(&file);
+ QString fileString = stream.read();
+
+ file.close();
+
+ return fileString;
+}
+}
diff --git a/klinkstatus/src/utils/utils.h b/klinkstatus/src/utils/utils.h
new file mode 100644
index 00000000..97d81ea0
--- /dev/null
+++ b/klinkstatus/src/utils/utils.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 UTILS_H
+#define UTILS_H
+
+#include <kurl.h>
+#include <qstring.h>
+
+//#include <string>
+
+
+using namespace std;
+
+
+int const NUMBER_OF_HTML_CODES = 92;
+extern QString htmlDocCharset[NUMBER_OF_HTML_CODES][2];
+
+/**
+ Decode the html charset.
+ e.g.
+ decode("mail&#64;server&#46;org") => "mail@server.org"
+*/
+void decode(QString& url);
+//void decode(string& url);
+
+/**
+ Compares to integers and returns -1 if a is smaller than b,
+ 1 if b is smaller than a, and 0 if a and b are equal or both negative.
+ If one of the integers is negative and the other isn't, it is considered
+ that the positive is smaller.
+ e.g.:
+ a = 0, b = +1 => -1
+ a = +1, b = 0 => +1
+ a = -1, b = -1 => 0
+ a = +3, b = +3 => 0
+ a = +1, b = -1 => -1
+*/
+int smallerUnsigned(int a, int b);
+
+namespace FileManager
+{
+QString read(QString const& path);
+}
+
+
+#endif
diff --git a/klinkstatus/src/utils/xsl.cpp b/klinkstatus/src/utils/xsl.cpp
new file mode 100644
index 00000000..c3b13412
--- /dev/null
+++ b/klinkstatus/src/utils/xsl.cpp
@@ -0,0 +1,437 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 "xsl.h"
+
+#include <libxml/globals.h>
+#include <libxml/parser.h>
+
+// Don't try to sort the libxslt includes alphabetically!
+// transform.h _HAS_ to be after xsltInternals.h and xsltconfig.h _HAS_ to be
+// the first libxslt include or it will break the compilation on some
+// libxslt versions
+#include <libxslt/xsltconfig.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/transform.h>
+
+// stdlib.h is required to build on Solaris
+#include <stdlib.h>
+
+#include <qregexp.h>
+#include <qsignal.h>
+#include <qstylesheet.h>
+#include <qthread.h>
+#include <qevent.h>
+#include <qmutex.h>
+
+#include <kapplication.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+
+/**
+ * @author Jason Keirstead <jason@keirstead.org>
+ *
+ * The thread class that actually performs the XSL processing.
+ * Using a thread allows async operation.
+ */
+class KopeteXSLThread : public QObject, public QThread
+{
+public:
+ /**
+ * Thread constructor
+ *
+ * @param xmlString The XML to be transformed
+ * @param xslString The XSL stylesheet we will use to transform
+ * @param target Target object to connect to for async operation
+ * @param slotCompleted Slot to fire on completion in asnc operation
+ */
+ KopeteXSLThread( const QString &xmlString, xsltStylesheetPtr xslDoc, QObject *target = 0L, const char *slotCompleted = 0L );
+
+ /**
+ * Reimplemented from QThread. Does the processing.
+ */
+ virtual void run();
+
+ /**
+ * A user event is used to get back to the UI thread to emit the completed signal
+ */
+ bool event( QEvent *event );
+
+ static QString xsltTransform( const QString &xmlString, xsltStylesheetPtr xslDoc );
+
+ /**
+ * Returns the result string
+ */
+ const QString &result()
+ { return m_resultString; };
+
+private:
+ QString m_xml;
+ xsltStylesheetPtr m_xsl;
+ QString m_resultString;
+ QObject *m_target;
+ const char *m_slotCompleted;
+ QMutex dataMutex;
+};
+
+KopeteXSLThread::KopeteXSLThread( const QString &xmlString, xsltStylesheetPtr xslDoc, QObject *target, const char *slotCompleted )
+{
+ m_xml = xmlString;
+ m_xsl = xslDoc;
+
+ m_target = target;
+ m_slotCompleted = slotCompleted;
+}
+
+void KopeteXSLThread::run()
+{
+ dataMutex.lock();
+ m_resultString = xsltTransform( m_xml, m_xsl );
+ dataMutex.unlock();
+ // get back to the main thread
+ qApp->postEvent( this, new QEvent( QEvent::User ) );
+}
+
+bool KopeteXSLThread::event( QEvent *event )
+{
+ if ( event->type() == QEvent::User )
+ {
+ dataMutex.lock();
+ if( m_target && m_slotCompleted )
+ {
+ QSignal completeSignal( m_target );
+ completeSignal.connect( m_target, m_slotCompleted );
+ completeSignal.setValue( m_resultString );
+ completeSignal.activate();
+ }
+ dataMutex.unlock();
+ delete this;
+ return true;
+ }
+ return QObject::event( event );
+}
+
+QString KopeteXSLThread::xsltTransform( const QString &xmlString, xsltStylesheetPtr styleSheet )
+{
+ // Convert QString into a C string
+ QCString xmlCString = xmlString.utf8();
+
+ QString resultString;
+ QString errorMsg;
+
+ xmlDocPtr xmlDoc = xmlParseMemory( xmlCString, xmlCString.length() );
+ if ( xmlDoc )
+ {
+ if ( styleSheet )
+ {
+ static QCString appPath( QString::fromLatin1("\"%1\"").arg( KApplication::kApplication()->dirs()->findDirs("appdata", QString::fromLatin1("styles/data") ).front() ).utf8() );
+
+ static const char* params[3] = {
+ "appdata",
+ appPath,
+ NULL
+ };
+
+ xmlDocPtr resultDoc = xsltApplyStylesheet( styleSheet, xmlDoc, params );
+ if ( resultDoc )
+ {
+ // Save the result into the QString
+ xmlChar *mem;
+ int size;
+ xmlDocDumpMemory( resultDoc, &mem, &size );
+ resultString = QString::fromUtf8( QCString( ( char * )( mem ), size + 1 ) );
+ xmlFree( mem );
+ xmlFreeDoc( resultDoc );
+ }
+ else
+ {
+ errorMsg = i18n( "Message is null." );
+ }
+ }
+ else
+ {
+ errorMsg = i18n( "The selected stylesheet is invalid." );
+ }
+
+ xmlFreeDoc( xmlDoc );
+ }
+ else
+ {
+ errorMsg = i18n( "Message could not be parsed. This is likely due to an encoding problem." );
+ }
+
+ if ( resultString.isEmpty() )
+ {
+ resultString = i18n( "<div><b>KLinkStatus encountered the following error while parsing a message:</b><br />%1</div>" ).arg( errorMsg );
+ }
+
+ #ifdef RAWXSL
+ kdDebug(23100) << k_funcinfo << resultString << endl;
+ #endif
+ return resultString;
+}
+
+class XSLTPrivate
+{
+public:
+ xmlDocPtr xslDoc;
+ xsltStylesheetPtr styleSheet;
+ unsigned int flags;
+};
+
+XSLT::XSLT( const QString &document, QObject *parent )
+ : QObject( parent ), d(new XSLTPrivate)
+{
+ d->flags = 0;
+ d->xslDoc = 0;
+ d->styleSheet = 0;
+
+ // Init Stuff
+ xmlLoadExtDtdDefaultValue = 0;
+ xmlSubstituteEntitiesDefault( 1 );
+
+ setXSLT( document );
+}
+
+XSLT::~XSLT()
+{
+ xsltFreeStylesheet( d->styleSheet );
+
+ delete d;
+}
+
+void XSLT::setXSLT( const QString &_document )
+{
+ // Search for '<kopete-i18n>' elements and feed them through i18n().
+ // After that replace the %VAR% variables with their proper XSLT counterpart.
+ //
+ // FIXME: Preprocessing the document using the QString API is fast and simple,
+ // but also error-sensitive.
+ // In fact, there are a couple of known issues with this algorithm that
+ // depend on the strings in the current styles. If these strings change
+ // they may break the parsing here.
+ //
+ // The reason I'm doing it like this is because of issues with QDOM and
+ // namespaces in earlier Qt versions. When we drop Qt 3.1.x support we
+ // should probably convert this to more accurate DOM code. - Martijn
+ //
+ // Actually, since we need to parse into a libxml2 document anyway, this whole
+ // nonsense could be replaced with some simple XPath expressions - JK
+ //
+ QRegExp elementMatch( QString::fromLatin1( "<kopete-i18n>(.*)</kopete-i18n>" ) );
+ elementMatch.setMinimal( true );
+ QString document = _document;
+ int pos;
+ while ( ( pos = elementMatch.search( document ) ) != -1 )
+ {
+ QString orig = elementMatch.cap( 1 );
+ //kdDebug( 14010 ) << k_funcinfo << "Original text: " << orig << endl;
+
+ // Split on % and go over all parts
+ // WARNING: If you change the translator comment, also change it in the
+ // styles/extracti18n Perl script, because the strings have to be
+ // identical!
+ QStringList parts = QStringList::split( '%', i18n(
+ "Translators: The %FOO% placeholders are variables that are substituted "
+ "in the code, please leave them untranslated", orig.utf8() ), true );
+
+ // The first part is always text, as our variables are written like %FOO%
+ QStringList::Iterator it = parts.begin();
+ QString trans = *it;
+ bool prependPercent = true;
+ it = parts.remove( it );
+ for ( it = parts.begin(); it != parts.end(); ++it )
+ {
+ prependPercent = false;
+
+ if ( *it == QString::fromLatin1( "TIME" ) )
+ {
+ trans += QString::fromLatin1( "<xsl:value-of select=\"@time\"/>" );
+ }
+ else if ( *it == QString::fromLatin1( "TIMESTAMP" ) )
+ {
+ trans += QString::fromLatin1( "<xsl:value-of select=\"@timestamp\"/>" );
+ }
+ else if ( *it == QString::fromLatin1( "FORMATTEDTIMESTAMP" ) )
+ {
+ trans += QString::fromLatin1( "<xsl:value-of select=\"@formattedTimestamp\"/>" );
+ }
+ else if ( *it == QString::fromLatin1( "FROM_CONTACT_DISPLAYNAME" ) )
+ {
+ trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ "<xsl:choose>"
+ "<xsl:when test='from/contact/@contactId=from/contact/contactDisplayName/@text'>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/metaContactDisplayName/@text\"/>"
+ "</xsl:when>"
+ "<xsl:otherwise>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/metaContactDisplayName/@text\"/>&#160;"
+ "(<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/@contactId\"/>)"
+ "</xsl:otherwise>"
+ "</xsl:choose></xsl:attribute>"
+ "<xsl:attribute name=\"dir\">"
+ "<xsl:value-of select=\"from/contact/contactDisplayName/@dir\"/>"
+ "</xsl:attribute>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/contactDisplayName/@text\"/></span>" );
+ }
+ else if ( *it == QString::fromLatin1( "TO_CONTACT_DISPLAYNAME" ) )
+ {
+ trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ "<xsl:choose>"
+ "<xsl:when test='to/contact/@contactId=from/contact/contactDisplayName/@text'>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/metaContactDisplayName/@text\"/>"
+ "</xsl:when>"
+ "<xsl:otherwise>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/metaContactDisplayName/@text\"/>&#160;"
+ "(<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/@contactId\"/>)"
+ "</xsl:otherwise>"
+ "</xsl:choose></xsl:attribute>"
+ "<xsl:attribute name=\"dir\">"
+ "<xsl:value-of select=\"to/contact/contactDisplayName/@dir\"/>"
+ "</xsl:attribute>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/contactDisplayName/@text\"/></span>" );
+ }
+ else if ( *it == QString::fromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) )
+ {
+ trans += QString::fromLatin1( "<span>"
+ "<xsl:attribute name=\"dir\">"
+ "<xsl:value-of select=\"from/contact/metaContactDisplayName/@dir\"/>"
+ "</xsl:attribute>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/metaContactDisplayName/@text\"/></span>" );
+ }
+ else if ( *it == QString::fromLatin1( "TO_METACONTACT_DISPLAYNAME" ) )
+ {
+ trans += QString::fromLatin1( "<span>"
+ "<xsl:attribute name=\"dir\">"
+ "<xsl:value-of select=\"to/contact/metaContactDisplayName/@dir\"/>"
+ "</xsl:attribute>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/metaContactDisplayName/@text\"/></span>" );
+ }
+ else if ( *it == QString::fromLatin1( "FROM_CONTACT_ID" ) )
+ {
+ trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/contactDisplayName/@text\"/></xsl:attribute>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/@contactId\"/></span>" );
+ }
+ else if ( *it == QString::fromLatin1( "TO_CONTACT_ID" ) )
+ {
+ trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/contactDisplayName/@text\"/></xsl:attribute>"
+ "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/@contactId\"/></span>" );
+ }
+ else if ( *it == QString::fromLatin1( "BODY" ) )
+ {
+ trans += QString::fromLatin1( "<xsl:value-of disable-output-escaping=\"yes\" select=\"body\"/>" );
+ }
+ else
+ {
+ if ( prependPercent )
+ trans += '%';
+ trans += *it;
+ prependPercent = true;
+ }
+ }
+ //kdDebug( 14010 ) << k_funcinfo << "Translated text: " << trans << endl;
+ // Add "<kopete-i18n>" and "</kopete-i18n>" to length, hence the '+ 27'
+ document.replace( uint( pos ), orig.length() + 27, trans );
+ }
+
+ #ifdef RAWXSL
+ kdDebug(14000) << k_funcinfo << document.utf8() << endl;
+ #endif
+
+ //Freeing the stylesheet also frees the doc pointer;
+ xsltFreeStylesheet( d->styleSheet );
+ d->styleSheet = 0;
+ d->xslDoc = 0;
+ d->flags = 0;
+
+ QCString rawDocument = document.utf8();
+ d->xslDoc = xmlParseMemory( rawDocument, rawDocument.length() );
+
+ if( d->xslDoc )
+ {
+ d->styleSheet = xsltParseStylesheetDoc( d->xslDoc );
+ if( d->styleSheet )
+ {
+ // Check for flags
+ QStringList flags;
+ for( xmlNodePtr child = d->xslDoc->children; child != d->xslDoc->last; child = child->next )
+ {
+ if( child->type == XML_PI_NODE )
+ {
+ //We have a flag. Enable it;
+ QCString flagData( (const char*)child->content );
+
+ if( flagData.contains( "Flag:" ) )
+ {
+ flags += flagData.mid(5);
+ }
+ }
+ }
+
+ if( !flags.isEmpty() )
+ setProperty("flags", flags.join( QString::fromLatin1("|") ) );
+ }
+ else
+ {
+ kdWarning(14000) << "Invalid stylesheet provided" << endl;
+
+ //We don't have a stylesheet, so free the doc pointer
+ xmlFreeDoc( d->xslDoc );
+ d->styleSheet = 0;
+ d->xslDoc = 0;
+ }
+ }
+ else
+ {
+ kdWarning(14000) << "Invalid stylesheet provided" << endl;
+ d->xslDoc = 0;
+ }
+}
+
+QString XSLT::transform( const QString &xmlString )
+{
+ return KopeteXSLThread::xsltTransform( xmlString, d->styleSheet );
+}
+
+void XSLT::transformAsync( const QString &xmlString, QObject *target, const char *slotCompleted )
+{
+ ( new KopeteXSLThread( xmlString, d->styleSheet, target, slotCompleted ) )->start();
+}
+
+bool XSLT::isValid() const
+{
+ return d->styleSheet != NULL;
+}
+
+void XSLT::setFlags( unsigned int flags )
+{
+ d->flags = flags;
+}
+
+unsigned int XSLT::flags() const
+{
+ return d->flags;
+}
+
+#include "xsl.moc"
+
+// vim: set noet ts=4 sts=4 sw=4:
+
diff --git a/klinkstatus/src/utils/xsl.h b/klinkstatus/src/utils/xsl.h
new file mode 100644
index 00000000..9d12c1c1
--- /dev/null
+++ b/klinkstatus/src/utils/xsl.h
@@ -0,0 +1,111 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Paulo Moura Guedes *
+ * 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. *
+ * *
+ * 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 XSL_H
+#define XSL_H
+
+#include <qobject.h>
+
+class XSLTPrivate;
+
+/**
+ @author Paulo Moura Guedes <moura@kdewebdev.org>
+
+ Taken from kopetexsl. Kudos to the Kopete team.
+ *
+ * This class provides an easy to use interface to basic
+ * libxslt transformations.
+*/
+class XSLT : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY( Flags flags READ flags WRITE setFlags )
+ Q_PROPERTY( bool isValid READ isValid )
+
+ Q_SETS( Flags )
+
+public:
+ /**
+ * Special flags to be used during the transformation process. Passed
+ * into the engine as processing instructions.
+ */
+ enum Flags
+ {
+ TransformAllMessages = 1
+ };
+
+ /**
+ * Constructor.
+ *
+ * Constructs a new XSLT parser using the provided XSLT document
+ */
+ XSLT( const QString &xsltDocument, QObject *parent = 0L );
+
+ virtual ~XSLT();
+
+ /**
+ * Set the XSLT document
+ *
+ * @return an ORed set of @ref Flags, or 0 if none
+ */
+ void setXSLT( const QString &document );
+
+ /**
+ * Transforms the XML string using the XSLT document, synchronously
+ *
+ * @param xmlString The source XML
+ * @return The result of the transformation
+ */
+ QString transform( const QString &xmlString );
+
+ /**
+ * Transforms the XML string using the XSLT document, asynchronously
+ *
+ * @param xmlString The source XML
+ * @param target The QObject that contains the slot to be executed when processing is complete
+ * @param slotCompleted A slot that accepts a QVariant & paramater, that is the result
+ * of the transformation
+ */
+ void transformAsync( const QString &xmlString, QObject *target, const char *slotCompleted );
+
+ /**
+ * Check whether the XSLT document is valid
+ *
+ * @return Whether the document represents a valid XSLT stylesheet
+ */
+ bool isValid() const;
+
+ /**
+ * @return An ORed list of Flags that the current stylesheet provides via processing instructions
+ */
+ unsigned int flags() const;
+
+ /**
+ * Sets flags to be used for the transformation.
+ *
+ * @param flags An ORed list of flags
+ */
+ void setFlags( unsigned int flags );
+
+private:
+ XSLTPrivate *d;
+};
+
+#endif
diff --git a/kommander/AUTHORS b/kommander/AUTHORS
new file mode 100644
index 00000000..058f0f78
--- /dev/null
+++ b/kommander/AUTHORS
@@ -0,0 +1,5 @@
+Derived from Qt Designer by Trolltech
+Original author: Marc Britton <consume@optusnet.com.au>
+Design team leader: Eric Laffoon <sequitur@kde.org>
+Current maintainer: Michal Rudolf <mrudolf@kdewebdev.org>
+Contributor: Andras Mantia <amantia@kde.org> \ No newline at end of file
diff --git a/kommander/COPYING b/kommander/COPYING
new file mode 100644
index 00000000..0b84a43f
--- /dev/null
+++ b/kommander/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the 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.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/kommander/ChangeLog b/kommander/ChangeLog
new file mode 100644
index 00000000..dde3cebf
--- /dev/null
+++ b/kommander/ChangeLog
@@ -0,0 +1,611 @@
+2008-04-23 - Eric Laffoon <sequitur@kde.org>
+ o add a little color to tab widgets with icons
+2008-04-21 - Eric Laffoon <sequitur@kde.org>
+ o added the ability to set alignment in columns in Tree/list widget
+ o enhanced find to now use column and set additional parameters in TreeWidget
+ o renamed some new functions only released in special release recently as cleanup
+2008-04-17 - Eric Laffoon <sequitur@kde.org>
+ o added round function in strings to round number to x digits
+2008-04-14 - Eric Laffoon <sequitur@kde.org>
+ o added cut, copy and paste to editor popup menu
+ o added file exists function
+ 0 added geometry and hasFocus to primary data widgets
+2008-03-28 - Eric Laffoon <sequitur@kde.org>
+ o added test geometry function to buttons for popup use
+2008-03-23 - Eric Laffoon <sequitur@kde.org>
+ o it's about time scripts had a boolean execute slot!
+2008-03-23 - Eric Laffoon <sequitur@kde.org>
+ o Table - added keepCellVisible for my application - I will need to clean up the code if I want to release it as I want to rename some things and do other cleanup
+ o ComboBox - added popupList to bring up the list without using the mouse - faster data entry
+2008-03-22 - Eric Laffoon <sequitur@kde.org>
+ o LineEdit - added gotfocus event
+2008-03-20 - Eric Laffoon <sequitur@kde.org>
+ o made actions sort along with widgets in the connection dialog
+ o Tree/Detail (ListView) widget - enabled adding columns
+ o Tree/Detail (ListView) widget - enabled removing columns (copied from table widget)
+ o Tree/Detail (ListView) widget - return column count
+ o Tree/Detail (ListView) widget - return column caption for given index
+ o Tree/Detail (ListView) widget - set sort column and where ASC or DESC
+ o Tree/Detail (ListView) widget - set column width - serves as hide colum at 0 width
+ o Table widget - add column sort that does by whole rows - doesn't do well with float as strings :(
+ o TextEdit - added lostFocus event
+ o LineEdit - added gotFocus event
+ o fixed about dialog license to take text and files correctly
+2008-03-19 - Andras Mantia <amantia@kde.org>
+ o regression: add back the missing str_compare function.
+2008-03-18 - Eric Laffoon <sequitur@kde.org>
+ o raised the number of allowed paramaters for scripts
+2008-03-10 - Eric Laffoon <sequitur@kde.org>
+ o enable additional slots in dialog and restore slots for actions - you can now directly manipulate actions on a MainWindow via signals and slots from the dialog
+2008-01-20 - Eric Laffoon <sequitur@kde.org>
+ o set new functions only available to new parser such as createWidget to not be shown in the function browser if the old parser is run.
+
+January 2008 - Andras Mantia <amantia@kde.org>
+ o support executing of slots
+ o add "execute" method for PushButton
+ o possibility to pass parameters for ScriptObject added
+ o add "return" command to get back the result of a ScriptObject
+ o add createWidget function for on-the-fly widget creation
+ o add connect/disconnect function for on-the-fly signal/slot connection
+ o add widgetExists
+ o add execBackground
+ o add indexed array functions: array_indexedFromString, array_indexedToString, array_indexedRemoveElements, array_indexedInsertElements
+ o input_color and @Input.color accepts a default color argument
+ o fix "exit" command
+ o make a="Label1"; a.setText("foo") work
+ o make dcopid, pid, parentPid work in the new parser
+ o make TreeWidget.selection work in multi selection mode
+ o add TreeWidget.selectedIndexes
+ o make TreeWidget.setSelection show the selected item
+ o add setCellWidget/cellWidget for Table
+ o add setEditable(bool) for widgets that are editable
+ o add PopupMenu widget
+ o add ToolBox widget
+ o add AboutDialog widget
+ o optionally quote the strings inserted via function browser
+ o use combobox for booleans in the function browser
+ o use multiline insert box in function browser
+ o add highlighting for the new parser
+ o use the new parser by default for new dialogs
+ o make possible to open more associated editors at once
+ o fix problem with losing the parser type status in the editor when working with multiple dialogs
+ o @Array.fromString should append the new elements to the array, just like
+ it did before and how array_fromString does.
+ o fix @eval for addition/substraction and handle division by zero
+ o process code written in external script using the old parser
+ o make it possible to run external script in a ScriptObject
+ o "execute" DCOP call returns a string
+ o support shebang (#!/path_to/kmdr-executor) in the beginning of the .kmdr files.
+ Running .kmdr files is possible directly if you make them executable.
+ o store Kommander version in the VERSION/_VERSION global variable
+ o the editor does not save the dialog on running
+ o warn if a dialog file is not executable
+ o create backup files every 5 minutes
+ o add initialize/destroy signals to MainWindow
+ o add experimental Kommander KPart
+ o rework the plugin system
+ o bump version to 1.3
+
+Wed Jan 9 21:35:38 2008 - Andras Mantia <amantia@kde.org>
+ o add Table.selection to get back the selection coordinates
+
+Sun Dec 30 00:02:34 2007 - Andras Mantia <amantia@kde.org>
+ o don't do math operations in check only mode
+
+Thu Dec 22 00:38:31 2007 - Andras Mantia <amantia@kde.org>
+ o fix the for loop parsing if end < start
+
+Thu Dec 20 00:38:31 2007 - Andras Mantia <amantia@kde.org>
+ o insert the functions using the syntax of the new parser if #!kommander
+ is specified in the associated text
+ o add DatePicker widget
+
+Wed Dec 19 08:39:00 2007 - Eric Laffoon <eric@kdewebdev.org>
+ o fixed the bug in the input text dialog where entering a default value returned the caption.
+
+Sat Dec 15 23:58:45 2007 - Andras Mantia <amantia@kde.org>
+ o return the result of a division in floating form if the result is not an integer.
+ Changed the behavior in both the old and new parser.
+
+Wed Nov 28 13:21:34 2007 - Andras Mantia <amantia@kde.org>
+ o do not set array values when the assignment is in a code path which shouldn't be executed
+
+Tue Nov 20 20:03:34 2007 - Andras Mantia <amantia@kde.org>
+ o show the checked function for RadioButton widgets in the function browser
+
+Fri Oct 19 16:08:32 2007 - Andras Mantia <amantia@kde.org>
+ o make CheckBox.setChecked accept as argument false, "false", true, "true",
+ 0 (meaning false), everything else (meaning true)
+
+Sat Oct 6 17:53:47 2007 - Andras Mantia <amantia@kde.org>
+ o make multiplying work correctly for floating point values
+ o do not remove the whole text after undoing the changes in the editor [#147817]
+ o don't crash if opening a file the second time when the first try failed [#141110]
+ o don't close the dialogs with ESC (just like in real applications)
+ o fix ExecButton.setEnabled() [#113624]
+ o use icon instead of "..." in the file selector [#109985]
+ o make @echo really work [#138705]
+ o add DCOP method to get the winID [#111161]
+ o add DCOP method to change the cursor to the wait cursor and back [#109630]
+
+Thu Sep 14 20:01:18 2006 - Michal Rudolf <mrudolf@kdewebdev.org>
+(actually imported from a work branch on Sep 29, 2007 by Andras Mantia <amantia@kde.org>)
+ o function str_findrev works now
+ o fix crash when diving by zero
+ o make function names case insensitive
+ o fix dcop() function (external DCOP) in new parser
+ o add missing EOLs to array_values()
+ o don't open files with no filename given
+ o fix crash on incorrect syntax in new parser
+ o fix input_file() function
+ o add switch/case to new parser
+ o fix importing tables with empty cells
+ o Kommander 1.3.0 (development branch) released
+
+Thu Sep 7 20:01:18 2006 - Andras Mantia <amantia@kde.org>
+ o fix crash on exit in the editor
+
+Tue Sep 5 16:19:40 2006 - Andras Mantia <amantia@kde.org>
+ o use KTextEditor for the associated text editing
+
+Sun 16 sty 2005 00:44:39 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o add MessageLog to view output of dialogs run from Editor
+ o add @debug command
+
+Tue 11 sty 2005 23:00:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o update and unify version number
+ o Kommander 1.1dev3 released
+
+Sun 09 Jan 2005 15:22:05 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added support for Kommander dialog templates in Editor
+
+Tue 04 Jan 2004 14:30:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o implemented "Save All" files menu command
+ o implemented SingleShot option of Timer widget
+
+Thu 30 Dec 2004 14:00:32 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added setColumnCaption for TreeWidget
+
+Wed 29 Dec 2004 09:58:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added some new function for Table widget: removeRow,
+ removeColumn, setColumnCaption, setRowCaption
+ o fixed a bug with insertRow/insertColumn (incorrect number
+ of rows/columns inserted)
+ o added example of using Table widget to examples/tutorial
+
+Mon 20 Dec 2004 22:02:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added basic Table widget
+ o more Editor cleanup - remove obsolete code
+
+Sat 18 Dec 2004 22:17:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o remove obsolete include files and switch Editor to use
+ KMessageBox instead of QMessageBox
+
+Mon 13 Dec 2004 13:58:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o more flexible error handling: now you can continue, continue
+ ignoring next error, or stop application
+
+Fri 10 Dec 2004 19:00:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o compilation fix (solved problems with missing kmdrpligins link)
+
+Thu 09 Dec 2004 22:59:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fixed problems with hiding ActionEditor
+
+Thu 02 Dec 2004 21:54:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o bug fixed: accept 0 as false value.
+ o significant speedup of TreeWidget.setText/insertItem for large trees
+
+Sun 28 Nov 2004 19:48:00 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o remove obsolete CustomWidget code
+ o fixed a nasty bug in && evaluation
+
+Sun 21 Nov 2004 18:19:49 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o bug fixed: opening files from command-line
+ o granted addUniqueItem for Combos
+ o use KDE-based tools layout (KDockWidget) in Editor
+
+Fri 19 Nov 2004 13:48:45 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added signal finished(), emitted when Konsole process finishes
+ o remove obsolete signal from ScriptObject
+
+Tue 16 Nov 2004 23:28:16 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o Editor shortcuts can be configured and remembered
+ o Editor Recent files submenu is now KDE based
+ o Editor configuration file is a standard KDE config file
+ o Editor has now Settings menu
+ o some obsolete Editor options were removed
+
+Sun 14 Nov 2004 22:39:38 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o massive cleanup and KDE-ification of Editor
+ o most actions converted to KActions, some were standarized
+ o some obsolete dialogs removed
+ o About dialog changed to use KAboutDialog
+
+Wed 03 Nov 2004 14:28:39 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fix some problems detected by kdetestsscripts
+ o 1.1dev2 released
+
+Tue 02 Nov 2004 07:53:20 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o Signals and slots: disallow unmatched (signal, slot) connections.
+ Avoid duplicates in senders combo.
+
+Mon 01 Nov 2004 23:29:19 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o Signals and slots improved: slots that don't have any acceptable
+ signal in current sender are hidden now. For MainWindow dialogs,
+ actions are displayed together with widgets. Some rare crashes
+ were fixed. Connect/disconnect button should be properly
+ enabled/disabled now.
+ o Some tooltips for Function browser added.
+ o In Function Browser, don't add alone comma when optional
+ parameter is empty.
+ o Added missing %n in i18n() string in Function Browser.
+
+Sun 31 Oct 2004 22:14:13 CET - Michal Rudolf <mrudolf@kdewebdev.org>
+ o Complete rewrite of Signals & slots editor. All connections
+ are now displayed, it is possible to change both sender and
+ receiver without closing window. Both slots and signals
+ are sorted, more slots are filtered.
+
+Thu 28 Oct 2004 15:14:26 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added count() function for getting number of items in widget
+
+Wed 27 Oct 2004 23:58:56 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added <> and != for 'not equal to' condition in expressions
+
+Sun 24 Oct 2004 19:04:03 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added missing setMaximum for Slider
+
+Fri 22 Oct 2004 22:27:05 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added 'no-editor' FileSelector (only a button with configurable
+ caption)
+ o added warning for unmatched @if and @switch
+
+Tue 19 Oct 2004 23:23:28 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o Konsole now uses TextEdit widget
+ o improved EOL handling in Konsole
+ o compilation fixes
+
+Sat 16 Oct 2004 09:39:48 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fix: recognize floating-point numbers in @String.isNumber
+
+Thu 14 Oct 2004 12:06:05 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added Timer widget
+
+Wed 13 Oct 2004 12:29:13 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added missing 'checked' function for RadioButton
+ o added @String.findRev function for searching string backwards
+
+Tue 12 Oct 2004 14:00:03 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fix: don't add brackets to functions with no parameters
+
+Mon 11 Oct 2004 14:00:03 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o improved 'cancel'
+
+Sat 09 Oct 2004 16:54 PDT - Eric Laffoon <sequitur@kde.org>
+ o Edited specials text and added comment @# to function browser
+ o fixed function browser to support a fourth parameter
+
+Sat 09 Oct 2004 14:00:03 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fix: bug in @File.append
+ o In Function Browser show common widget functions for each widget
+ o scroll content when process output is longer; show hourglass
+ in Konsole widget when process is running
+ o added new command 'cancel' to cancel script running in Konsole
+
+Tue 05 Oct 2004 11:19:41 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fix: use "\n" as separator in multiselection mode of FileSelector
+ o preliminary version of Konsole widget
+
+Sat 02 Oct 2004 20:38:40 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added 'execute' command to ScriptObject widget
+ o fix: properly report failure when saving file and ask to
+ provide another file name
+
+Fri 01 Oct 2004 22:26:06 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fix: output was not sent to stdout by ExecButton
+
+Sat 28 Aug 2004 19:20:06 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fixed a crash in TreeWidget setText function
+ o added support for multiselection in ListBox (via selection
+ function)
+
+Tue 24 Aug 2004 11:00:16 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o Function Browser: don't show unnecessary 'widget' parameter
+ o Function Browser: make widget functions default
+ o Kommander Text Editor: focus on script text
+ o re-add new i18n descriptions for some new functions
+ o added new 'checked' function for checkboxes and buttonboxes
+ o bool values returned from DCOP calls are now supported
+
+Wed 18 Jul 2004 18:19:21 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o Kommander 1.0 released together with KDE 3.3
+
+Wed 04 Jul 2004 23:59:21 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added @switch..@case..@end statement
+ o added @if()...@endif statement
+
+Wed 04 Jul 2004 18:20:21 CEST - Eric Laffoon <eric@kdewebdev.org>
+ o fixed missing @ for Kommander functions in function browser
+
+Tue 03 Jul 2004 11:06:26 CEST - Eric Laffoon <eric@kdewebdev.org>
+ o added new background
+
+Mon 02 Aug 2004 23:58:01 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added DCOP-enabled Label and PixmapLabel widgets
+
+Sun 01 Aug 2004 17:32:11 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added support for string comparisons in @expr
+ o added support for floats in @expr
+
+Fri 30 Jul 2004 14:59:12 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added support for math expressions
+ o added @expr(string) function that parses and evaluates string
+
+Wed 28 Jul 2004 00:14:28 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fixed about.ui which caused problems due to some Designer
+ incompatibility
+ o fixed i18n: tab pages and wizard pages titles were not
+ translated
+ o added some missing i18n strings
+ o added option to specify i18n catalogue from command-line
+ (useful for application-related dialogs)
+
+Sat 24 Jul 2004 10:15:10 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o bug fixed: crash with non-existing item in ListBox
+ o bug fixed: blocking button with no script was not unblocked
+ o automatically set tree mode for Tree Widget when adding nestes items
+ o release 1.0beta1
+
+Fri 23 Jul 2004 19:54:26 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added hourclass cursor when invoking ExecButton script with blocked GUI
+ o added missing i18n strings for *.ui files
+ o changed editor to use included background
+
+Fri 23 Jul 2004 18:34:26 CEST - Eric Laffoon <eric@kdewebdev.org>
+ o added new background and splash
+
+Thu 22 Jul 2004 22:17:49 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o ExecButton now has three modes: no blocking, block only ExecButton,
+ block whole GUI
+
+Wed 22 Jul 2004 24:10:59 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o optimized Tree Widget
+ o bug fixed: some missing i18n strings
+
+Tue 20 Jul 2004 19:51:32 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o bug fixed: @dcop with more than 4 arguments
+ o bug fixed: in @forEach, @var_count has incorrect value
+ o in @forEach, @var_index has now 1-based index, not 0-based
+ o setMaximum for ProgressBar
+
+Mon 19 Jul 2004 11:47:58 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added ScriptObject - hidden script container
+
+Fri 16 Jul 2004 15:37:41 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added Slider widget
+ o removed some obsolete code from editor
+
+Thu 15 Jul 2004 23:22:33 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added TextBrowser widget for rich text viewing, with clickable
+ links
+ o in @forEach, not only @var, but @var_index and @var_count are
+ expanded (first to index of current item, second to item count)
+ o bug fixed: incorrect version number in Editor
+
+Wed 14 Jul 2004 12:22:33 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added @String.args (based on Qt QString("%1").arg()
+ o support parameters in function browser
+
+Tue 13 Jul 2004 22:33:19 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added support for internationalization of Kommander dialogs
+ o added @i18n special for marking strings for translation
+
+Tue 13 Jul 2004 13:33:00 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o function browser: support for nested functions
+ o function browser: properly prefix function groups with @
+ o function browser: add information about obligatory and optional
+ parameters.
+ o function browser: add clear button
+ o Kommander Text Editor: change buttons order
+
+Tue 13 Jul 2004 01:10:34 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added function browser for editor
+
+Sat 10 Jul 2004 15:51:07 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o forEach(variable, list) function for internal loops
+ o for(variable, start, end, [step]) function for internal loops
+ o Kommander 1.0alpha7 released
+
+Fri 09 Jul 2004 17:39:43 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o TreeWidget optimized - it should be much faster for big trees now
+ o bug fixed: TreeWidget findItem function
+
+Thu 09 Jul 2004 13:27:47 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o StatusBar widget added
+ o ProgressBar widget added
+ o widgets icons updated
+ o removed obsolete ListView widget
+
+Tue 06 Jul 2004 10:12:44 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o bug fixed: calling @dcop with parameterless functions
+ o bug fixed: ListBox.setCurrentItem didn't work
+ o added setCurrentItem for ComboBox
+ o added setCurrentItem/currentItem for TabWidget, remove obsolete
+ text and setText
+ o bug fixed: itemDepth and itemPath
+ o bug fixed: adding items to TreeWidget failed sometimes
+ o added @String.section(string, substring, index) function, returning
+ section of a string
+ o added third (optional) index parameter to @String.find
+
+Fri 02 Jul 2004 23:33:46 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o more TreeView methods: itemDepth(index) and itemPath(index)
+ o setText, text and populate work for TreeView
+ o parser cleanup and fixes
+ o setPixmap(iconName, index) method for ListBoxes and TreeViews;
+ use index = -1 to set pixmaps for all items
+ o Kommander 1.0alpha6 released
+
+Thu 01 Jul 2004 16:03:20 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o add children(QString widget) DCOP call, returning list of
+ widgets that are direct children of the widget (or all widgets
+ if widget is null)
+ o added type(QString widget) DCOP call returning class of widget
+ o bug fixed: main dialog wasn't supported in @Widget.method syntax
+ o QStringList is now supported as DCOP return value
+
+Wed 30 Jun 2004 15:01:23 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o TreeView DCOP methods: insertItem(), insertItems(), clear(),
+ item(), setCurrentItem(), selection(), setSelection(),
+ removeItem()
+ o TreeView tree support: use / to separate nodes (f. e.
+ insertItem("Root/Node/Subnode")
+ o TreeView multiple column support: use \t to separate columns
+ (f. e. insertItem("document.txt\t45kb\t2004-06-30")
+
+Tue 29 Jun 2004 00:44:39 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o all DCOP functions are handled in appropriate widgets
+ o DCOP and specials are now registered together in single class
+ o it is now possible to create new methods for new (plugin) widgets
+ o setVisible() DCOP method added (show/hide widgets)
+ o setText() alias for changeWidgetText
+ o insertItem() alias for addListItem
+ o insertItems() alias for addListItems
+ o setEnabled() alias for enableWidget
+ o setCurrentItem() for setting current item on index base
+ o selection() for getting selected text/text of selected item
+ o setSelection() for setting selected text/text of selected item
+ (alias for setCurrentListItem() for ListBoxes)
+ o text() DCOP method to get content of widget
+ (@SomeWidget.text is equivalent to @SomeWidget with default script
+ set to @widgetText)
+ o clear() DCOP method handles LineEdit, TextEdit and FileSelector now
+ o text()/setText() work for spinbox
+
+Mon 21 Jun 2004 13:36:52 CEST - Eric Laffoon <eric@kdewebdev.org>
+ o added documentation
+
+Sat 19 Jun 2004 00:47:42 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added changeWidgetText support for listboxes and combos
+ o security fix: warning when running from /tmp directory
+ o added @null special
+ o Kommander 1.0alpha5 released
+
+Thu 17 Jun 2004 23:13:18 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added @String.find
+ o added specials descriptions
+ o fix: crash when opening main-window dialog (created in Designer)
+ in executor
+
+Wed 16 Jun 2004 13:04:30 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added @Array.count
+ o added @Array.read/write
+
+Tue 15 Jun 2004 23:24:52 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added file functions (@File: read, write, append)
+ o added warning for empty @Widget text
+
+Mon 15 Jun 2004 18:32:01 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added string-handling functions (@String: left, right,
+ contains, left, right, mid, compare, isEmpty, isNumber,
+ remove, replace, lower, upper)
+
+Mon 14 Jun 2004 10:23:12 CEST - Eric Laffoon <eric@kdewebdev.org>
+ o fix: parentPid bug
+ o fix: execBegin bug
+
+Sat 12 Jun 2004 01:49:07 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added more array functions: @Array.values(), @Array.clear()
+ and @Array.remove()
+ o rebuild parser to made it more flexible
+ o fix: FileSelector now opens file dialog in current directory
+ o added two new DCOP functions for ListBoxes: findItem()
+ and addUniqueItem()
+ o ButtonGroup now has 'checked' and 'unchecked' states, it
+ also supports setChecked()
+ o Kommander 1.0alpha4 released
+
+Thu 10 Jun 2004 00:49:07 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added DCOP information database that translates function
+ name to function prototype
+ o enhanced parser to handle @<widget>.<DCOP function> syntax
+
+Mon 07 Jun 2004 14:45:53 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added assotiative arrays: @Array.value(), @Array.keys() and
+ @Array.setValue() specials
+
+Sun 06 Jun 2004 23:13:34 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fix compilation problems on Debian and Slackware
+ o @@ is now interpreted as @
+
+Sat 05 Jun 2004 10:12:05 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added @env(variable) special to get environment variable value
+ o added @dialog(dialog, params) that would call child dialog, setting
+ _PARENTPID and _PARENTDCOPID variables for it
+ o check for global variable _PARENTPID when getting @parentPid
+ o added _KMDIR and _NAME global variables that return
+ path/filename of current dialog
+ o @dialog now searches for a dialog in both dialog path
+ and current path
+ o parser fixes (improved handling of nested specials)
+ o Kommander 1.0alpha3 released
+
+Fri 04 Jun 2004 00:40:59 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o fixed: don't execute Initialization/Executor in Editor
+ o changed DCOP id of Editor to kmdr-editor
+ o version numbers unified
+
+Thu 02 Jun 2004 15:08:32 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o KDE widgets are now used for lists, buttons and combos
+ o added file completion to FileSelector
+
+Fri 28 May 2004 22:40:10 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o support for Kommander comments (in @# <comment> format)
+ o added two new specials: global(var) and setGlobal(var, value)
+ o removed obsolete Preview menu commands
+ o Kommander 1.0alpha2 released
+
+Wed 26 May 2004 23:22:46 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o changeWidgetText for FileSelector class is now handled
+ o added currentItem(QString) DCOP call for lists and combos
+ o added item(QString,int) DCOP call for lists and combos
+
+Wed 26 May 2004 01:10:01 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o parser of specials() rewritten
+ o added optional shebang argument for execBegin()
+ o handling of non-string @dcop() arguments fixed
+ o handling of multiple @dcop() arguments fixed
+ o Makefile.am dependencies for executor cleaned
+ o Kommander 1.0alpha1 released
+
+Thu Apr 27 2004 16:38:36 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added @parentPid evaluated to parent process pid
+ o install Kommander Editor and Executor desktop files
+
+Thu Apr 20 2004 16:38:36 CEST - Michal Rudolf <mrudolf@kdewebdev.org>
+ o added @pid evaluated to current process pid
+ o added @dcopid evaluated to current process DCOP id
+ o rebuilt Kommander Text editor
+ o added support for shebang (#!/bin/sh) for both ExecButton
+ script and @execBegin scripts
+ o added ChooseWidget dialog
+
+Thu Jan 29 13:48:49 2004 - Andras Mantia <amantia@kde.org>
+ o DCOP methods for modifying the widgets
+
+Sat Nov 1 17:00:03 AEST 2003
+ o New widget plugin system KommanderPlugin and KommanderFactory
+
+Sun 04 May 2003 07:38:42 PM EEST - Andras Mantia <amantia@kde.org>
+ o do not add the .kmdr extension to files ending with .kmdr
+ o remove some warning/error messages polluting the output
+ o flush the stdout buffer after writing to it
+
+Sat Sep 28 23:18:08 EST 2002 - Marc Britton <consume@optushome.com.au>
+ o Cleaned up and reworked file overview window
+ o Removed 'Source File' tab from hierarchy view
+ o Removed more disabled source files
+ o Now searches for templates in custom directory (default $KDEDIR/templates)
+
+Sun Sep 15 15:31:48 EST 2002 - Marc Britton <consume@optushome.com.au>
+ o Initial Creation
diff --git a/kommander/INSTALL b/kommander/INSTALL
new file mode 100644
index 00000000..e7c19dfc
--- /dev/null
+++ b/kommander/INSTALL
@@ -0,0 +1,186 @@
+2002-10-12 - Preview building instructions
+To build Kommander you need to created a link to the admin directory
+in the kommander directory. Then treat Kommander as a base direactory
+and run make -f Makefile.cvs and do your configure and amake.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
diff --git a/kommander/Kommander-TODO.kno b/kommander/Kommander-TODO.kno
new file mode 100644
index 00000000..ebbe5651
--- /dev/null
+++ b/kommander/Kommander-TODO.kno
@@ -0,0 +1,313 @@
+\NewEntry 0 GUI
+
+\NewEntry 1 Widgets
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Widgets available in Kommander</span></p>
+<ul type="disc"><div></div>
+<li>KJanusWidget</li>
+<li>Switch from using Qt widget to their KDE equivalents? - mostly done</li>
+<li>Menu</li>
+<li>KHistoryCombo<br /></li>
+<div></div></ul>
+<p></p>
+<ul type="disc"><div></div></ul>
+</body></html>
+
+\NewEntry 1 Editor
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Layout of Edit Kommander Text dialog<br /><br />Old ideas:</span></p>
+<ul type="disc"><li>better layout</li>
+<li>replace list of widgets with tree of widgets</li>
+<li>replace widget class with widget pixmap in combos</li>
+<li>redesign layout</li>
+<li>cleanup Connections, not it is unusable, may be obsolete</li>
+<li>find in scripts</li>
+<li>list of non-empty scripts for current dialog</li>
+<li>allow using custom Kommander dialog to generate code</li>
+<li>add DCOP per widget display</li>
+<li>DCOP editor (similar to Tag editor in Quanta)<br /></li></ul>
+<p></p>
+</body></html>
+
+\NewEntry 1 Usability
+\Link knowit://Source code
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Various GUI-related features (outdated, KDE3 version will not be changed)</span></p>
+<ul type="disc"><li>clean up popup menus, remove disabled items</li>
+<li>use KDE dialogs, not Qt ones if possible</li>
+<li>some widget information on mouseover</li>
+<li>review of event model</li>
+<li>add more layout-handling commands (center selected widgets horizontally/vertically, fit to window width/height)</li>
+<li>handle middle click</li>
+<li>carefully check defaults, choose most useful ones</li>
+<li>add wizards? (replace current New dialogs with Kommander-based ones?)</li>
+<li>better undo</li>
+<li>add WhatsThis for most items</li>
+<li>detect function name/widget name clash</li>
+<li>improve order of widget icons</li>
+<li>switch to KMDI (arghhhh!)</li></ul>
+</body></html>
+
+\NewEntry 1 Run/debug
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Running/testing inside Editor</span></p>
+<ul type="disc"><li>allow debugging</li>
+<div></div></ul>
+</body></html>
+
+\NewEntry 1 DCOP browser
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Georgia">
+<p><span style="font-weight:600">DCOP browser (preliminary ideas)</span></p>
+<ul type="disc"><li>DCOP browser for both local and external DCOP calls</li>
+<li>easy-to-use application DCOP browser</li>
+<li>use XML describing given application DCOP's</li>
+<li>two flags for a call: hiden and important</li>
+<li>three mode: important (only important calls), default (all except hidden), advanced (all calls)</li>
+<li>use some pattern matching to allow marking whole subtrees or function sets</li>
+<li>add purpose (for example all editor-related functions, all file-management-related functions)</li>
+<li>merge trees for given window (f. e. Editor#2, File#2, Structure#2 etc.)</li>
+<li>standalone application mode</li></ul>
+</body></html>
+
+\NewEntry 1 Other
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Other GUI-related issues</span></p>
+<ul type="disc"><li>cleanup slots/signals/connections interface</li>
+<li>find out why slots are shown only for current tab<br /></li></ul>
+<p><span style="font-weight:600">KDE4 ideas:<br /></span></p>
+<ul type="disc"><li>create a KDevelop plugin for the editor</li>
+<li>use KFormDesigner or the new Qt Designer</li></ul>
+</body></html>
+
+\NewEntry 0 Bugs
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Various bugs to be fixed</span></p>
+<ul type="disc"><li>Charset is sometimes incorrectly converted from/to local charset</li>
+<li>SubDialog crashes now</li>
+<li>Labels do not show up unless you edit their text</li>
+<li>toolbox editing is ugly after group layout is applied. Goes back to normal if the dialog is reloaded.</li>
+<div></div></ul>
+</body></html>
+
+\NewEntry 0 Help
+
+\NewEntry 1 Documentation
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Kommander tutorials, documentation etc.</span></p>
+<ul type="disc"><li>Update new parser docs</li>
+<li>Update docs, at least on website ?</li></ul>
+</body></html>
+
+\NewEntry 1 Examples
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Georgia">
+<p><span style="font-weight:600">Examples to be used with tutorial</span></p>
+<ul type="disc"><li>add a way to comment *.kmdr file</li>
+<li>create examples for tutorial</li>
+<li>clean up examples: reomve obsolete or unclear ones, add some more instructive ones</li></ul>
+</body></html>
+
+\NewEntry 1 Scripts
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Georgia">
+<p><span style="font-weight:600">Kommander scripts that can be useful</span></p>
+<ul type="disc"><li>improve script for Quick Start (Quanta): handle indentation with, quotation character and tag case</li>
+<li>create script for Quick List (Quanta)</li>
+<li>create scripts for common command-line programs to demonstrate power of Kommander (it would be nice if those could be documented somehow)</li>
+<li>create scripts for HTML templates</li></ul>
+<p></p>
+<p></p>
+</body></html>
+
+\NewEntry 0 Language
+
+\NewEntry 1 Syntax
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Georgia">
+<li type="disc"><span style="font-weight:600">Syntax-related problems</span></li>
+<ul type="disc"><li>better handling of lists</li>
+<li>better handling of other structures (trees, arrays etc.)</li>
+<li>add some way to define and use macros/aliases</li></ul>
+<p></p>
+<p></p>
+</body></html>
+
+\NewEntry 1 New functions
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">New functions that could be useful</span></p>
+<ul type="disc"><li>capitalize, substring string handling functions?</li>
+<li>@if (a, b, c)? - or is BASH enough?<br /><span style="font-style:italic">This will be solved by new parser.</span></li>
+<li>add @include and @includelocal commands - to include external script or local (project script); that should make code more readable</li>
+<li>add @call to call local script (no need for external @call, as it is equivalent to @exec<br /><span style="font-style:italic">Naming: use @execlocal for consistency?</span></li>
+<li>add @requireVersion(command, version) that would detect version of program (presumably script language, like perl), compare it to given minimum and fail if it is not matched</li>
+<li>add function for string conversion (@String.cvs2tab, @Stringcvs2eol ...)</li>
+<li>add @ldcop for calling local DCOP functions</li></ul>
+</body></html>
+
+\NewEntry 1 Script languages
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Using script languages other than Bash</span></p>
+<ul type="disc"><li>detect incorrect path at shebang, allow user to choose correct one and remeber that pair</li>
+<div></div>
+<div></div></ul>
+<p><span style="font-weight:600">If we keep the old parser.<br /><br /></span><br />Make it possible to use any language with Kommander. The idea is to replace Kommander specials with language specific code in a way that it will not break conditions and loops, like now. example:<br />#!/bin/bash<br />array=&quot;1 2 3 4 5&quot;<br />for i in $array do<br /> @Label.setText($i)<br />done<br /><br />This does not work now. The idea is to replace @Widget.method() with a language specific DCOP call.<br />If the language has DCOP bindings, use those bindings to execute the dcop call. If not, use the command line<br />DCOP application. This is slower, but always works. In the above case, Kommander would replace <br />@Label.setText($i) <br />with<br />dcop kmdr-executor-PID KommanderIf setText Label $i<br /><br />Kommander will have description files for each supported language about how to execute DCOP calls.<br />If the language has DCOP bindings, this description tells the syntax of the bindings. If it doesn't have, the description gives a way how to execute external applications. This should always exists, as all languages can execute external applications.<br /><br />In KDE4, of course use DBUS instead of DCOP.<br /><br /></p>
+</body></html>
+
+\NewEntry 1 Aliases
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Georgia">
+<p><span style="font-weight:600">Aliases - easier access to Kommander features</span></p>
+<ul type="disc"><li>add @String.&lt;function&gt;(&lt;args&gt;) as alias to string-handling function</li>
+<li>add @&lt;widgetName&gt;.&lt;function&gt;(&lt;args&gt;) as alias to dcop @dcopid KommanderIf &lt;widgetName&gt; &lt;args&gt;</li>
+<li>add aliases to various widgets properties, f. e. text, selectedText, state, items etc.; syntax: @&lt;widgetName&gt;.&lt;attribute&gt;</li></ul>
+</body></html>
+
+\NewEntry 1 Signals
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Georgia">
+<p><span style="font-weight:600">New signals for existing widgets</span></p>
+<ul type="disc"><li>add signals for D&amp;D<br /><span style="font-style:italic">Requires dragContent and dragType, perhaps dragSource to be set.</span></li>
+<li></li></ul>
+</body></html>
+
+\NewEntry 1 Parser
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Features of new parser</span></p>
+<ul type="disc"><li>add syntax checking</li>
+<li>add debugger</li>
+<li>add step-by-step running</li>
+<li>add code-completion</li>
+<li>add syntax hints</li>
+<li>share code betwen the two parsers (new methods are needed to be added only once)</li></ul>
+</body></html>
+
+\NewEntry 0 1.3 release prep 2008
+
+\NewEntry 1 To Do
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Kommander Release Do list</span></p>
+<ul type="disc"><li><span style="color:#00ff00">Add missing functions in FB</span></li>
+<li>KPart create to go with KPart load</li>
+<li><span style="color:#ff0000">executor version required field/command - enable someone sharing dialogs to have an executing window check if the executor is capable of fully supporting it - Not the self checking Michal suggested, but better than nothing by far</span></li>
+<li><span style="color:#ff0000">ability to identify calling table widget from signal in a script slot - ideally by row and column in table grid </span></li></ul>
+</body></html>
+
+\NewEntry 1 Eric's To Do
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<ul type="disc"><li>Look into project tools, currently ready for 0.7 update</li></ul>
+</body></html>
+
+\NewEntry 1 Supplemental
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<ul type="disc"><li>We need to look at how to emulate KStfuff using HTTP and a Kommander dialog... will require KStuff back end and some PHP scripts</li>
+<li>Samples go into the install for use</li>
+<li>Web site needs docs and tutorials updated</li></ul>
+</body></html>
+
+\NewEntry 1 investigate
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Things to look into</span></p>
+<ul type="disc"><li>Qt database connection?</li>
+<li><span style="color:#ffff00">Code completion? If easy to do, otherwise we recommend users try the Kate completion plugin</span></li>
+<li><span style="color:#ffff00">D&amp;D of text/selection data</span></li>
+<li>simple DCOP functions in editor to enable Kommander based tools to call the editor and open a dialog to edit - otherwise any interfaces can at least make use of D&amp;D from file manager (KPart) views</li>
+<li><span style="color:#ff0000">Additional XML fields in dialog for author name, version of Kommander required, etc... - not required as KAbout would be better</span></li></ul>
+</body></html>
+
+\NewEntry 1 Bugs to squish
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Version 1.3 FIXME list</span></p>
+<ul type="disc"><li>link handling in TextBrowser opens file manager in execute directory even if calling another Kommander dialog. First it opens the file, then konqeror.</li></ul>
+</body></html>
+
+
+\NewEntry 1 Done
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p>New widgets include the DatePicker, Popup Menu and Toolbox. New functions inlcude widget creation, hooking and unhooking signals and slots and full slot access as well as passing and returning parameters in scripts. WooHoo! Take that do list!<br /></p>
+<ul type="disc"><li>fixed dcop functions</li>
+<li>added indexed array functions</li>
+<li>made color slot work in TextEdit</li>
+<li>Enhnaced function browser for easier widget creation</li>
+<li>quote handling in function browser - made user selectable</li></ul>
+<p>See changlog for more complete list</p>
+</body></html>
+
+\NewEntry 1 Won't Do
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p>The Kommander editor is effectively dead for KDE3. Porting is senseless as it is an old Qt Designer hack. Since Designer for Qt 4x is actually designed this time to be easy to extend and modify the first generation of the editor will be scrapped.<br /><br />Other parts of Kommander like the parser should be much more portable.<br /><br /> - creating table widgets means if you need to know the calling widget you need create scripts on the fly for this.</p>
+</body></html>
+
+\CurrentEntry 0 KDE4 prep
+
+\NewEntry 0 Executor
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Executing Kommander scripts</span></p>
+<ul type="disc"><li>detect and handle missing plugin widgets</li>
+<li>cache @pid, @dcopid, @parentPid, perhaps calculate and cache @parentdcopid</li>
+<li>handle multiple dialogs: they could be packaged in single *.tgz file, unpacked and executed internally</li>
+<div></div>
+<div><br /></div></ul>
+</body></html>
+
+\NewEntry 0 Refactoring, other ideas
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
+<p><span style="font-weight:600">Kommander source code</span></p>
+<ul type="disc"><li>move all widgets into a library (mostly done)</li>
+<li>widgets should contain the code how they are displayed in the editor</li>
+<li>widgets should contain the functions they support. Share only very common functions, like show, execute, etc, otherwise soon it becomes confusing if insertItem expect and int, a string, or and int and a string. </li>
+<li>widgets and plugin should query the plugin manager for available method IDs (and register how many they need) OR on registering do not pass the ID, but get back. This makes sure you don't have plugins/widgets using the same function IDs. </li>
+<li>check if we can live without making specials.h public</li>
+<li>the icons used in the editor should be returned by the widgets itself (partly done)</li>
+<li>check if it is enough to have a public KommanderWidget instead of making KWidgetPlugin as well public</li>
+<li>get back a version number from plugins and from Kommander. This way both the plugins and the executor can decide if they are compatible or not.</li></ul>
+</body></html>
+
+\NewEntry 0 Last changes
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Georgia">
+<p><span style="font-weight:600">Last changes in TODO file</span></p>
+<ul type="disc"><li>remove done items</li></ul>
+<p><span style="color:#0000ff">2004-05-28, 17:35</span></p>
+<ul type="disc"><li>GUI/Widgets: Tree, History Combo, Picture Viewer, Table</li>
+<li>GUI/Other added</li>
+<li>Executor: handle multiple dialogs package</li>
+<li>Language/New functions: string conversion</li>
+<li>Language/Signals added</li></ul>
+<p><span style="color:#0000ff">2004-05-14, 12:44</span></p>
+<ul type="disc"><li>Bugs: added</li>
+<li>Language/New functions, Executor: added i18n</li></ul>
+<p><span style="color:#0000ff">2004-05-08, 23:00</span></p>
+<ul type="disc"><li>Widgets: Menu and popup menu</li>
+<li>added Language:Aliases</li>
+<li>Syntax: remove @dcop, moved aliases to new note, macros</li>
+<li>Editor: Connections</li>
+<li>New functions: @requireVersion</li>
+<li>Executor: detect loop, handle startup parameters, cache</li></ul>
+<p></p>
+</body></html>
+
+\NewEntry 0 Done
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Georgia">
+<li type="disc"><span style="font-weight:600">ChangeLog of Kommander</span></li>
+<li type="disc"><span style="font-style:italic">See ChangeLog file for details and dates</span></li>
+<ul type="disc"><li>added @parentPid evaluated to parent process pid</li>
+<li>added @pid evaluated to current process pid</li>
+<li>added @dcopid evaluated to current process DCOP id</li>
+<li>significantly improved Kommander Text editor usability</li>
+<li>added <span style="font-style:italic">initialization</span> and <span style="font-style:italic">destroy</span> scripts for main dialog</li>
+<li>global variables added (setGlobal and global DCOP calls)</li>
+<li>added support for shebang (#!/bin/sh) for both ExecButton script and @execBegin scripts</li>
+<li>added command-line parameters (<span style="font-style:italic">kmdr-executor dialog.kmdr VAR=VALUE ARG1 ARG2...)</span></li>
+<li>dialog setting are now stored with full path</li>
+<li>completely rebuilt @dcop() parser: check number of arguments, handle various types etc.</li>
+<li>support for @execBegin(&lt;program-name&gt;)</li>
+<li>avoid infinite loop when trying to run @&lt;widget&gt; inside &lt;widget&gt;:&lt;state&gt;</li>
+<li>handle other values for DCOP (not only <span style="font-style:italic">string</span> and <span style="font-style:italic">int</span>)</li>
+<li>add option to pass shebang as argument of @execBegin, f. e. @execBegin(/usr/bin/perl)</li>
+<li>add Run command to editor</li>
+<li>added global and setGlobal specials</li>
+<li>added warnings for missing specials</li>
+<div></div></ul>
+</body></html>
+
+\NewEntry 0 About this file
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:11pt;font-family:helvetica">
+<p>This file should document both what should be done in Kommander and what was done.</p>
+<p>All entries marked with a date without an author were made by Michal Rudolf</p>
+<p>When adding something important, please enter it in ChangeLog or Done and mark it with current date (in yyyy-MM-dd, hh:mm format) and your name.</p>
+</body></html>
+
diff --git a/kommander/Makefile.am b/kommander/Makefile.am
new file mode 100644
index 00000000..936bca9b
--- /dev/null
+++ b/kommander/Makefile.am
@@ -0,0 +1,15 @@
+SUBDIRS = icons plugin \
+ factory widget widgets \
+ pluginmanager editor executor part working examples kmdrtools
+
+mimetypedata_DATA = x-kommander.desktop
+mimetypedatadir = $(kde_mimedir)/application
+
+messages: rc.cpp
+ $(EXTRACTRC) `find . -name \*.ui` >> rc.cpp ; \
+ LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
+ if test -n "$$LIST"; then \
+ $(XGETTEXT) $$LIST -o $(podir)/kommander.pot; \
+ fi;
+
+
diff --git a/kommander/NEWS b/kommander/NEWS
new file mode 100644
index 00000000..6c2f9bb5
--- /dev/null
+++ b/kommander/NEWS
@@ -0,0 +1 @@
+No news is good news.
diff --git a/kommander/README b/kommander/README
new file mode 100644
index 00000000..7de24937
--- /dev/null
+++ b/kommander/README
@@ -0,0 +1,70 @@
+Kommander v1.0Alpha series
+Eric Laffoon <sequitur@kde.org>
+----------------------------------------------------------------------
+Kommander is a visual dialog building tool which may be expanded to create
+full mainwindow applications. The primary objective is to create as much
+functionality as possible without using any scripting language. This is
+provided by the following features:
+* Specials - these are prefaced with an "@" like @widgetText. The offer
+special features like the value of a widget, functions, aliases, global
+variables and such.
+* DCOP integration - this allows Kommander dialogs to control and be
+controled in interactions with other KDE applicatins. It is a very powerful
+feature!
+* Signals and Slots - this is a little less intuitive to a new user. It is
+under review for how we process things in the first major release. These
+offer a limited event model for when a button is pushed or a widget is
+changed. Combined with "Population Text" it is rather powerful.
+
+The central key feature of Kommander dialogs is that you can bind text
+(Kommander Text) to a widget. So if you have @widget1 and @widget2 and
+they are line edits you can set Kommander to show their contents by
+entering @widgetText in their Kommander Text area. Then enter hello in
+@widget1 and world in @widget2. A button can have the string
+My first @widget1 @widget2 program in Kommander
+If you run this dialog from a console it will output
+My first hello world program in Kommander
+
+Hopefully you begin to see a small glimmering of the potential. Kommander
+enables a much faster design model for simple applications because if allows
+you to stop thinking so much about language and revert to the more basic and
+natural conceptual model. In computers language is a means to define concepts
+and as such it is a layer between concept and implementation that can impede
+progress with minutia. Kommander seeks to minimize that layer.
+
+Kommander also seeks to build on standards. It is built on the Qt Designer
+framework and creates *.ui files which it renames to *.kmdr. It can easily
+import any KDE widget and this can be done without having to rebuild
+Kommander, by using plugins.
+
+Kommander's other significant factor is how it addresses the requirements of
+language. Computer languages can be wonderful things but they tend to have
+their own dogmas and zealots often seeking to provide an advance to GUI
+design in an integrated development environment. Ironically the accpetance
+of such IDEs is limited by the number of people willing to adopt a new new
+language to gain access to a desired feature. It is really not reasonable to
+expect people to need to change over to a dozen languages to access various
+feature sets. By being language neutral and allowing a Kommander dialog to be
+extended by using any scripting language Kommander positions it's self in a
+unique position for wide spread adoption. Multiple script languages can be
+used in a single dialog and applications can be taken over by people using
+a different language than the original developer and gradually converting
+and extending it. New widgets and featurs can be instantly leveraged by all
+available languages.
+
+We hope that Kommander begins to get the developer support and recognition
+required to achieve the potential it offers. Our end goal is to make Kommander
+useful for novice users to extend and merge their applications. At the same
+time it should become a good prototyping tool. Also it opens the door to the
+promise of open source in a new way. We know that people can extend our GPL'd
+prgrams, but the fact remains very few have the skills. With Kommander those
+numbers see a huge multiplier! Some applications may be most logical as a
+Kommander application. We already use it in areas we want to allow
+extensibility in Quanta Plus.
+
+We hope you enjoy Kommander. Please help us with bug reports and example
+dialogs, as well as any requests you may have. You can join our user list
+for help developing Kommander applications at
+http://mail.kdewebdev.org/mailman/listinfo/kommander
+
+Best Regards from the Kommander development team!
diff --git a/kommander/VERSION b/kommander/VERSION
new file mode 100644
index 00000000..fc89135a
--- /dev/null
+++ b/kommander/VERSION
@@ -0,0 +1 @@
+Kommander 1.2.2
diff --git a/kommander/configure.in.in b/kommander/configure.in.in
new file mode 100644
index 00000000..6d8c8d93
--- /dev/null
+++ b/kommander/configure.in.in
@@ -0,0 +1,14 @@
+CPPFLAGS="$CPPFLAGS -DKOMMANDER -DDESIGNER -DQT_NO_SQL -DHAVE_KDE"
+
+# Process user input to configure
+build_kommander="yes"
+AC_ARG_WITH(kommander,
+[ --without-kommander don't build Kommander],
+[if test "$withval" = "no" ; then
+ build_kommander="no"
+fi])
+
+if test "$build_kommander" = "no"; then
+ DO_NOT_COMPILE="$DO_NOT_COMPILE kommander"
+fi
+
diff --git a/kommander/editor/Makefile.am b/kommander/editor/Makefile.am
new file mode 100644
index 00000000..aad9e81d
--- /dev/null
+++ b/kommander/editor/Makefile.am
@@ -0,0 +1,53 @@
+SUBDIRS = pics
+# this is the program that gets installed. it's name is used for all
+# of the other Makefile.am variables
+bin_PROGRAMS = kmdr-editor
+
+# set the include path for X, qt and KDE
+AM_CPPFLAGS = -I$(top_srcdir)/kommander/widget -I$(top_srcdir)/kommander/widgets -I$(top_srcdir)/kommander/plugin -I$(top_srcdir)/kommander/factory -Ishared -Iinterfaces -Ipics $(all_includes)
+
+# the library search path.
+kmdr_editor_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+
+# the libraries to link against.
+kmdr_editor_LDADD = $(top_builddir)/kommander/factory/libkommanderfactory.la \
+ $(top_builddir)/kommander/widget/libkommanderwidget.la \
+ $(top_builddir)/kommander/widgets/libkommanderwidgets.la \
+ $(top_builddir)/kommander/plugin/libkommanderplugin.la -lktexteditor
+
+# which sources should be compiled for kmdr_editor
+kmdr_editor_SOURCES = actiondnd.cpp actioneditorimpl.cpp \
+ assoctexteditorimpl.cpp actionlistview.cpp asciivalidator.cpp assistproc.cpp command.cpp \
+ connectioneditorimpl.cpp defs.cpp filechooser.cpp formfile.cpp formsettingsimpl.cpp \
+ formwindow.cpp hierarchyview.cpp iconvieweditorimpl.cpp layout.cpp \
+ listboxeditorimpl.cpp listvieweditorimpl.cpp main.cpp mainwindow.cpp mainwindowactions.cpp \
+ metadatabase.cpp multilineeditorimpl.cpp newformimpl.cpp orderindicator.cpp \
+ paletteeditoradvancedimpl.cpp paletteeditorimpl.cpp parser.cpp pixmapchooser.cpp previewframe.cpp \
+ previewwidgetimpl.cpp propertyeditor.cpp qcompletionedit.cpp resource.cpp sizehandle.cpp \
+ styledbutton.cpp tableeditorimpl.cpp widgetdatabase.cpp widgetfactory.cpp \
+ wizardeditorimpl.cpp workspace.cpp actioneditor.ui assoctexteditor.ui connectioneditor.ui \
+ createtemplate.ui formsettings.ui iconvieweditor.ui listboxeditor.ui listeditor.ui \
+ listvieweditor.ui multilineeditor.ui newform.ui paletteeditor.ui paletteeditoradvanced.ui \
+ pixmapfunction.ui preferences.ui previewwidget.ui tableeditor.ui wizardeditor.ui \
+ choosewidget.ui choosewidgetimpl.cpp functions.ui functionsimpl.cpp messagelog.cpp
+
+# these are the headers for your project that won't be installed
+noinst_HEADERS = actiondnd.h actioneditorimpl.h actionlistview.h \
+ asciivalidator.h assistproc.h assoctexteditorimpl.h command.h connectioneditorimpl.h \
+ defs.h filechooser.h formfile.h formsettingsimpl.h formwindow.h globaldefs.h \
+ hierarchyview.h iconvieweditorimpl.h layout.h listboxeditorimpl.h listvieweditorimpl.h \
+ mainwindow.h metadatabase.h multilineeditorimpl.h newformimpl.h orderindicator.h \
+ paletteeditoradvancedimpl.h paletteeditorimpl.h parser.h pixmapchooser.h previewframe.h \
+ previewwidgetimpl.h propertyeditor.h qcompletionedit.h resource.h sizehandle.h \
+ styledbutton.h tableeditorimpl.h widgetdatabase.h widgetfactory.h widgetinterface.h \
+ wizardeditorimpl.h workspace.h choosewidgetimpl.h messagelog.h
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+
+xdg_apps_DATA = kmdr-editor.desktop
+
+syntaxkatedir = $(kde_datadir)/katepart/syntax
+syntaxkate_DATA = kommander.xml kommander-new.xml
+
+
diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp
new file mode 100644
index 00000000..0da7c650
--- /dev/null
+++ b/kommander/editor/actiondnd.cpp
@@ -0,0 +1,1244 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qaction.h>
+#include <qapplication.h>
+#include <qbitmap.h>
+#include <qdragobject.h>
+#include <kinputdialog.h>
+#include <qlayout.h>
+#include <qmainwindow.h>
+#include <qmenudata.h>
+#include <qmessagebox.h>
+#include <qobjectlist.h>
+#include <qpainter.h>
+#include <qstyle.h>
+#include <qtimer.h>
+
+#include "actiondnd.h"
+#include "command.h"
+#include "defs.h"
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "metadatabase.h"
+#include "widgetfactory.h"
+
+#include <klocale.h>
+
+bool QDesignerAction::addTo( QWidget *w )
+{
+ if ( !widgetToInsert )
+ return QAction::addTo( w );
+
+ if ( w->inherits( "QPopupMenu" ) )
+ return false;
+
+ widgetToInsert->reparent( w, QPoint( 0, 0 ), false );
+ addedTo( widgetToInsert, w );
+ return true;
+}
+
+bool QDesignerAction::removeFrom( QWidget *w )
+{
+ if ( !widgetToInsert )
+ return QAction::removeFrom( w );
+
+ remove();
+ return true;
+}
+
+void QDesignerAction::remove()
+{
+ if ( !widgetToInsert )
+ return;
+ MainWindow::self->formWindow()->selectWidget( widgetToInsert, false );
+ widgetToInsert->reparent( 0, QPoint( 0, 0 ), false );
+}
+
+QDesignerToolBarSeparator::QDesignerToolBarSeparator(Orientation o , QToolBar *parent,
+ const char* name )
+ : QWidget( parent, name )
+{
+ connect( parent, SIGNAL(orientationChanged(Orientation)),
+ this, SLOT(setOrientation(Orientation)) );
+ setOrientation( o );
+ setBackgroundMode( parent->backgroundMode() );
+ setBackgroundOrigin( ParentOrigin );
+ setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+}
+
+void QDesignerToolBarSeparator::setOrientation( Orientation o )
+{
+ orient = o;
+}
+
+void QDesignerToolBarSeparator::styleChange( QStyle& )
+{
+ setOrientation( orient );
+}
+
+QSize QDesignerToolBarSeparator::sizeHint() const
+{
+ int extent = style().pixelMetric( QStyle::PM_DockWindowSeparatorExtent,
+ this );
+ if ( orient == Horizontal )
+ return QSize( extent, 0 );
+ else
+ return QSize( 0, extent );
+}
+
+void QDesignerToolBarSeparator::paintEvent( QPaintEvent * )
+{
+ QPainter p( this );
+ QStyle::SFlags flags = QStyle::Style_Default;
+
+ if ( orientation() == Horizontal )
+ flags |= QStyle::Style_Horizontal;
+
+ style().drawPrimitive( QStyle::PE_DockWindowSeparator, &p, rect(),
+ colorGroup(), flags );
+}
+
+
+
+QSeparatorAction::QSeparatorAction( QObject *parent )
+ : QAction( parent, "qt_designer_separator" ), wid( 0 )
+{
+}
+
+bool QSeparatorAction::addTo( QWidget *w )
+{
+ if ( w->inherits( "QToolBar" ) ) {
+ QToolBar *tb = (QToolBar*)w;
+ wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
+ return true;
+ } else if ( w->inherits( "QPopupMenu" ) ) {
+ idx = ( (QPopupMenu*)w )->count();
+ ( (QPopupMenu*)w )->insertSeparator( idx );
+ return true;
+ }
+ return false;
+}
+
+bool QSeparatorAction::removeFrom( QWidget *w )
+{
+ if ( w->inherits( "QToolBar" ) ) {
+ delete wid;
+ return true;
+ } else if ( w->inherits( "QPopupMenu" ) ) {
+ ( (QPopupMenu*)w )->removeItemAt( idx );
+ return true;
+ }
+ return false;
+}
+
+QWidget *QSeparatorAction::widget() const
+{
+ return wid;
+}
+
+
+
+
+QDesignerToolBar::QDesignerToolBar( QMainWindow *mw )
+ : QToolBar( mw ), lastIndicatorPos( -1, -1 )
+{
+ insertAnchor = 0;
+ afterAnchor = true;
+ setAcceptDrops( true );
+ MetaDataBase::addEntry( this );
+ lastIndicatorPos = QPoint( -1, -1 );
+ indicator = new QDesignerIndicatorWidget( this );
+ indicator->hide();
+ installEventFilter( this );
+ widgetInserting = false;
+ findFormWindow();
+ mw->setDockEnabled( DockTornOff, false );
+}
+
+QDesignerToolBar::QDesignerToolBar( QMainWindow *mw, Dock dock )
+ : QToolBar( QString::null, mw, dock), lastIndicatorPos( -1, -1 )
+{
+ insertAnchor = 0;
+ afterAnchor = true;
+ setAcceptDrops( true );
+ indicator = new QDesignerIndicatorWidget( this );
+ indicator->hide();
+ MetaDataBase::addEntry( this );
+ installEventFilter( this );
+ widgetInserting = false;
+ findFormWindow();
+ mw->setDockEnabled( DockTornOff, false );
+}
+
+void QDesignerToolBar::findFormWindow()
+{
+ QWidget *w = this;
+ while ( w ) {
+ if ( w->inherits( "FormWindow" ) )
+ formWindow = (FormWindow*)w;
+ w = w->parentWidget();
+ }
+}
+
+void QDesignerToolBar::addAction( QAction *a )
+{
+ actionList.append( a );
+ connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) );
+ if ( a->inherits( "QActionGroup" ) ) {
+ ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
+ actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
+ } else if ( a->inherits( "QSeparatorAction" ) ) {
+ ( (QSeparatorAction*)a )->widget()->installEventFilter( this );
+ actionMap.insert( ( (QSeparatorAction*)a )->widget(), a );
+ } else {
+ ( (QDesignerAction*)a )->widget()->installEventFilter( this );
+ actionMap.insert( ( (QDesignerAction*)a )->widget(), a );
+ }
+}
+
+static void fixObject( QObject *&o )
+{
+ while ( o && o->parent() && !o->parent()->inherits( "QDesignerToolBar" ) )
+ o = o->parent();
+}
+
+bool QDesignerToolBar::eventFilter( QObject *o, QEvent *e )
+{
+ if ( !o || !e || o->inherits( "QDockWindowHandle" ) || o->inherits( "QDockWindowTitleBar" ) )
+ return QToolBar::eventFilter( o, e );
+
+ if ( o == this && e->type() == QEvent::MouseButtonPress &&
+ ( ( QMouseEvent*)e )->button() == LeftButton ) {
+ mousePressEvent( (QMouseEvent*)e );
+ return true;
+ }
+
+ if ( o == this )
+ return QToolBar::eventFilter( o, e );
+
+ if ( e->type() == QEvent::MouseButtonPress ) {
+ QMouseEvent *ke = (QMouseEvent*)e;
+ fixObject( o );
+ if ( !o )
+ return false;
+ buttonMousePressEvent( ke, o );
+ return true;
+ } else if(e->type() == QEvent::ContextMenu ) {
+ QContextMenuEvent *ce = (QContextMenuEvent*)e;
+ fixObject( o );
+ if( !o )
+ return false;
+ buttonContextMenuEvent( ce, o );
+ return true;
+ } else if ( e->type() == QEvent::MouseMove ) {
+ QMouseEvent *ke = (QMouseEvent*)e;
+ fixObject( o );
+ if ( !o )
+ return false;
+ buttonMouseMoveEvent( ke, o );
+ return true;
+ } else if ( e->type() == QEvent::MouseButtonRelease ) {
+ QMouseEvent *ke = (QMouseEvent*)e;
+ fixObject( o );
+ if ( !o )
+ return false;
+ buttonMouseReleaseEvent( ke, o );
+ return true;
+ } else if ( e->type() == QEvent::DragEnter ) {
+ QDragEnterEvent *de = (QDragEnterEvent*)e;
+ if ( de->provides( "application/x-designer-actions" ) ||
+ de->provides( "application/x-designer-actiongroup" ) ||
+ de->provides( "application/x-designer-separator" ) )
+ de->accept();
+ } else if ( e->type() == QEvent::DragMove ) {
+ QDragMoveEvent *de = (QDragMoveEvent*)e;
+ if ( de->provides( "application/x-designer-actions" ) ||
+ de->provides( "application/x-designer-actiongroup" ) ||
+ de->provides( "application/x-designer-separator" ) )
+ de->accept();
+ }
+
+ return QToolBar::eventFilter( o, e );
+}
+
+void QDesignerToolBar::paintEvent( QPaintEvent *e )
+{
+ QToolBar::paintEvent( e );
+ if ( e->rect() != rect() )
+ return;
+ lastIndicatorPos = QPoint( -1, -1 );
+}
+
+void QDesignerToolBar::contextMenuEvent( QContextMenuEvent *e )
+{
+ e->accept();
+ QPopupMenu menu( 0 );
+ menu.insertItem( i18n("Delete Toolbar" ), 1 );
+ int res = menu.exec( e->globalPos() );
+ if ( res != -1 ) {
+ RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).arg( name() ),
+ formWindow, 0, this );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ }
+}
+
+void QDesignerToolBar::mousePressEvent( QMouseEvent *e )
+{
+ widgetInserting = false;
+ if ( e->button() == LeftButton &&
+ MainWindow::self->currentTool() != POINTER_TOOL &&
+ MainWindow::self->currentTool() != ORDER_TOOL ) {
+
+ if ( MainWindow::self->currentTool() == CONNECT_TOOL ) {
+
+ } else {
+ widgetInserting = true;
+ }
+
+ return;
+ }
+}
+
+void QDesignerToolBar::mouseReleaseEvent( QMouseEvent *e )
+{
+ if ( widgetInserting )
+ doInsertWidget( mapFromGlobal( e->globalPos() ) );
+ widgetInserting = false;
+}
+
+void QDesignerToolBar::buttonMouseReleaseEvent( QMouseEvent *e, QObject *w )
+{
+ if ( widgetInserting )
+ doInsertWidget( mapFromGlobal( e->globalPos() ) );
+ else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) {
+ formWindow->clearSelection( false );
+ formWindow->selectWidget( w );
+ }
+ widgetInserting = false;
+}
+
+void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o )
+{
+ e->accept();
+ QPopupMenu menu( 0 );
+ const int ID_DELETE = 1;
+ const int ID_SEP = 2;
+ const int ID_DELTOOLBAR = 3;
+ QMap<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ if ( it != actionMap.end() && (*it)->inherits( "QSeparatorAction" ) )
+ menu.insertItem( i18n("Delete Separator" ), ID_DELETE );
+ else
+ menu.insertItem( i18n("Delete Item" ), ID_DELETE );
+ menu.insertItem( i18n("Insert Separator" ), ID_SEP );
+ menu.insertSeparator();
+ menu.insertItem( i18n("Delete Toolbar" ), ID_DELTOOLBAR );
+ int res = menu.exec( e->globalPos() );
+ if ( res == ID_DELETE ) {
+ QMap<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ if ( it == actionMap.end() )
+ return;
+ QAction *a = *it;
+ int index = actionList.find( a );
+ RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand(
+ i18n("Delete Action '%1' From Toolbar '%2'" ).
+ arg( a->name() ).arg( caption() ),
+ formWindow, a, this, index );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ } else if ( res == ID_SEP ) {
+ calcIndicatorPos( mapFromGlobal( e->globalPos() ) );
+ QAction *a = new QSeparatorAction( 0 );
+ int index = actionList.findRef( *actionMap.find( insertAnchor ) );
+ if ( index != -1 && afterAnchor )
+ ++index;
+ if ( !insertAnchor )
+ index = 0;
+
+ AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand(
+ i18n("Add Separator to Toolbar '%1'" ).
+ arg( a->name() ),
+ formWindow, a, this, index );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ } else if ( res == ID_DELTOOLBAR ) {
+ RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).arg( name() ),
+ formWindow, 0, this );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ }
+}
+
+void QDesignerToolBar::buttonMousePressEvent( QMouseEvent *e, QObject * )
+{
+ widgetInserting = false;
+
+ if ( e->button() == MidButton )
+ return;
+
+ if ( e->button() == LeftButton &&
+ MainWindow::self->currentTool() != POINTER_TOOL &&
+ MainWindow::self->currentTool() != ORDER_TOOL ) {
+
+ if ( MainWindow::self->currentTool() == CONNECT_TOOL ) {
+
+ } else {
+ widgetInserting = true;
+ }
+
+ return;
+ }
+
+
+ dragStartPos = e->pos();
+}
+
+void QDesignerToolBar::removeWidget( QWidget *w )
+{
+ QMap<QWidget*, QAction*>::Iterator it = actionMap.find( w );
+ if ( it == actionMap.end() )
+ return;
+ QAction *a = *it;
+ int index = actionList.find( a );
+ RemoveActionFromToolBarCommand *cmd =
+ new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ).
+ arg( a->name() ).arg( caption() ),
+ formWindow, a, this, index );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ QApplication::sendPostedEvents();
+ adjustSize();
+}
+
+void QDesignerToolBar::buttonMouseMoveEvent( QMouseEvent *e, QObject *o )
+{
+ if ( widgetInserting || ( e->state() & LeftButton ) == 0 )
+ return;
+ if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() )
+ return;
+ QMap<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ if ( it == actionMap.end() )
+ return;
+ QAction *a = *it;
+ if ( !a )
+ return;
+ int index = actionList.find( a );
+ RemoveActionFromToolBarCommand *cmd =
+ new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ).
+ arg( a->name() ).arg( caption() ),
+ formWindow, a, this, index );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ QApplication::sendPostedEvents();
+ adjustSize();
+
+ QString type = a->inherits( "QActionGroup" ) ? QString( "application/x-designer-actiongroup" ) :
+ a->inherits( "QSeparatorAction" ) ? QString( "application/x-designer-separator" ) : QString( "application/x-designer-actions" );
+ QStoredDrag *drag = new QStoredDrag( type, this );
+ QString s = QString::number( (long)a ); // #### huha, that is evil
+ drag->setEncodedData( QCString( s.latin1() ) );
+ drag->setPixmap( a->iconSet().pixmap() );
+ if ( a->inherits( "QDesignerAction" ) ) {
+ if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) )
+ formWindow->selectWidget( ( (QDesignerAction*)a )->widget(), false );
+ }
+ if ( !drag->drag() ) {
+ AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Action '%1' to Toolbar '%2'" ).
+ arg( a->name() ).arg( caption() ),
+ formWindow, a, this, index );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ }
+ lastIndicatorPos = QPoint( -1, -1 );
+ indicator->hide();
+}
+
+#ifndef QT_NO_DRAGANDDROP
+
+void QDesignerToolBar::dragEnterEvent( QDragEnterEvent *e )
+{
+ widgetInserting = false;
+ lastIndicatorPos = QPoint( -1, -1 );
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) )
+ e->accept();
+}
+
+void QDesignerToolBar::dragMoveEvent( QDragMoveEvent *e )
+{
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) )
+ e->accept();
+ else
+ return;
+ drawIndicator( calcIndicatorPos( e->pos() ) );
+}
+
+void QDesignerToolBar::dragLeaveEvent( QDragLeaveEvent * )
+{
+ indicator->hide();
+ insertAnchor = 0;
+ afterAnchor = true;
+}
+
+void QDesignerToolBar::dropEvent( QDropEvent *e )
+{
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) )
+ e->accept();
+ else
+ return;
+ QString s;
+ if ( e->provides( "application/x-designer-actiongroup" ) )
+ s = QString( e->encodedData( "application/x-designer-actiongroup" ) );
+ else if ( e->provides( "application/x-designer-separator" ) )
+ s = QString( e->encodedData( "application/x-designer-separator" ) );
+ else
+ s = QString( e->encodedData( "application/x-designer-actions" ) );
+
+ indicator->hide();
+ QAction *a = 0;
+ int index = actionList.findRef( *actionMap.find( insertAnchor ) );
+ if ( index != -1 && afterAnchor )
+ ++index;
+ if ( !insertAnchor )
+ index = 0;
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-separator" ) ) {
+ if ( e->provides( "application/x-designer-actions" ) )
+ a = (QDesignerAction*)s.toLong();
+ else
+ a = (QSeparatorAction*)s.toLong();
+ } else {
+ a = (QDesignerActionGroup*)s.toLong();
+ }
+
+ if ( actionList.findRef( a ) != -1 ) {
+ QMessageBox::warning( MainWindow::self, i18n("Insert/Move Action" ),
+ i18n("Action '%1' has already been added to this toolbar.\n"
+ "An Action may only occur once in a given toolbar." ).
+ arg( a->name() ) );
+ return;
+ }
+
+ AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Action '%1' to Toolbar '%2'" ).
+ arg( a->name() ).arg( caption() ),
+ formWindow, a, this, index );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+
+ lastIndicatorPos = QPoint( -1, -1 );
+}
+
+#endif
+
+void QDesignerToolBar::reInsert()
+{
+ QAction *a = 0;
+ actionMap.clear();
+ clear();
+ for ( a = actionList.first(); a; a = actionList.next() ) {
+ a->addTo( this );
+ if ( a->inherits( "QActionGroup" ) ) {
+ actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
+ if ( ( (QDesignerActionGroup*)a )->widget() )
+ ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
+ } else if ( a->inherits( "QDesignerAction" ) ) {
+ actionMap.insert( ( (QDesignerAction*)a )->widget(), a );
+ ( (QDesignerAction*)a )->widget()->installEventFilter( this );
+ } else if ( a->inherits( "QSeparatorAction" ) ) {
+ actionMap.insert( ( (QSeparatorAction*)a )->widget(), a );
+ ( (QSeparatorAction*)a )->widget()->installEventFilter( this );
+ }
+ }
+ QApplication::sendPostedEvents();
+ adjustSize();
+}
+
+void QDesignerToolBar::actionRemoved()
+{
+ actionList.removeRef( (QAction*)sender() );
+}
+
+QPoint QDesignerToolBar::calcIndicatorPos( const QPoint &pos )
+{
+ if ( orientation() == Horizontal ) {
+ QPoint pnt( width() - 2, 0 );
+ insertAnchor = 0;
+ afterAnchor = true;
+ if ( !children() )
+ return pnt;
+ pnt = QPoint( 13, 0 );
+ QObjectListIt it( *children() );
+ QObject * obj;
+ while( (obj=it.current()) != 0 ) {
+ ++it;
+ if ( obj->isWidgetType() &&
+ qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) {
+ QWidget *w = (QWidget*)obj;
+ if ( w->x() < pos.x() ) {
+ pnt.setX( w->x() + w->width() + 1 );
+ insertAnchor = w;
+ afterAnchor = true;
+ }
+ }
+ }
+ return pnt;
+ } else {
+ QPoint pnt( 0, height() - 2 );
+ insertAnchor = 0;
+ afterAnchor = true;
+ if ( !children() )
+ return pnt;
+ pnt = QPoint( 0, 13 );
+ QObjectListIt it( *children() );
+ QObject * obj;
+ while( (obj=it.current()) != 0 ) {
+ ++it;
+ if ( obj->isWidgetType() &&
+ qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) {
+ QWidget *w = (QWidget*)obj;
+ if ( w->y() < pos.y() ) {
+ pnt.setY( w->y() + w->height() + 1 );
+ insertAnchor = w;
+ afterAnchor = true;
+ }
+ }
+ }
+ return pnt;
+ }
+}
+
+void QDesignerToolBar::drawIndicator( const QPoint &pos )
+{
+ if ( lastIndicatorPos == pos )
+ return;
+ bool wasVsisible = indicator->isVisible();
+ if ( orientation() == Horizontal ) {
+ indicator->resize( 3, height() );
+ if ( pos != QPoint( -1, -1 ) )
+ indicator->move( pos.x() - 1, 0 );
+ indicator->show();
+ indicator->raise();
+ lastIndicatorPos = pos;
+ } else {
+ indicator->resize( width(), 3 );
+ if ( pos != QPoint( -1, -1 ) )
+ indicator->move( 0, pos.y() - 1 );
+ indicator->show();
+ indicator->raise();
+ lastIndicatorPos = pos;
+ }
+ if ( !wasVsisible )
+ QApplication::sendPostedEvents();
+}
+
+void QDesignerToolBar::doInsertWidget( const QPoint &p )
+{
+ if ( formWindow != MainWindow::self->formWindow() )
+ return;
+ calcIndicatorPos( p );
+ QWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true );
+ installEventFilters( w );
+ MainWindow::self->formWindow()->insertWidget( w, true );
+ QDesignerAction *a = new QDesignerAction( w, parent() );
+ int index = actionList.findRef( *actionMap.find( insertAnchor ) );
+ if ( index != -1 && afterAnchor )
+ ++index;
+ if ( !insertAnchor )
+ index = 0;
+ AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Widget '%1' to Toolbar '%2'" ).
+ arg( w->name() ).arg( caption() ),
+ formWindow, a, this, index );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ MainWindow::self->resetTool();
+}
+
+void QDesignerToolBar::clear()
+{
+ for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ if ( a->inherits( "QDesignerAction" ) )
+ ( (QDesignerAction*)a )->remove();
+ }
+ QToolBar::clear();
+}
+
+void QDesignerToolBar::installEventFilters( QWidget *w )
+{
+ if ( !w )
+ return;
+ QObjectList *l = w->queryList( "QWidget" );
+ for ( QObject *o = l->first(); o; o = l->next() )
+ o->installEventFilter( this );
+ delete l;
+}
+
+
+
+QDesignerMenuBar::QDesignerMenuBar( QWidget *mw )
+ : QMenuBar( mw, 0 )
+{
+ show();
+ setAcceptDrops( true );
+ MetaDataBase::addEntry( this );
+ itemNum = 0;
+ mousePressed = false;
+ lastIndicatorPos = QPoint( -1, -1 );
+ insertAt = -1;
+ indicator = new QDesignerIndicatorWidget( this );
+ indicator->hide();
+ findFormWindow();
+}
+
+void QDesignerMenuBar::findFormWindow()
+{
+ QWidget *w = this;
+ while ( w ) {
+ if ( w->inherits( "FormWindow" ) )
+ formWindow = (FormWindow*)w;
+ w = w->parentWidget();
+ }
+}
+
+void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e )
+{
+ e->accept();
+ int itm = itemAtPos( e->pos() );
+ if ( itm == -1 ) {
+ if ( formWindow )
+ formWindow->mainWindow()->popupFormWindowMenu( e->globalPos(), formWindow );
+ return;
+ }
+ QPopupMenu menu( this );
+ menu.insertItem( i18n("Delete Item" ), 1 );
+ menu.insertItem( i18n("Rename Item..." ), 2 );
+ int res = menu.exec( e->globalPos() );
+ if ( res == 1 ) {
+ QMenuItem *item = findItem( idAt( itm ) );
+ RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).arg( item->text() ),
+ formWindow,
+ (QMainWindow*)parentWidget(), this,
+ (QDesignerPopupMenu*)item->popup(),
+ idAt( itm ), itm, item->text() );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ // #### need to do a proper invalidate and re-layout
+ parentWidget()->layout()->invalidate();
+ parentWidget()->layout()->activate();
+ } else if ( res == 2 ) {
+ bool ok;
+ QString old = text( idAt( itm ) );
+ QString txt = KInputDialog::getText( i18n("Rename Menu Item" ), i18n("Menu text:" ),
+ text( idAt( itm ) ), &ok, 0 );
+ if ( ok ) {
+ RenameMenuCommand *cmd = new RenameMenuCommand(
+ i18n("Rename Menu '%1' to '%2'" ).arg( old ).arg( txt ),
+ formWindow, this, idAt( itm ), old, txt );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ }
+ }
+}
+
+void QDesignerMenuBar::mousePressEvent( QMouseEvent *e )
+{
+ lastIndicatorPos = QPoint( -1, -1 );
+ insertAt = -1;
+ mousePressed = true;
+ if ( e->button() == MidButton || e->button() == RightButton )
+ return;
+
+ dragStartPos = e->pos();
+ QMenuBar::mousePressEvent( e );
+}
+
+void QDesignerMenuBar::mouseMoveEvent( QMouseEvent *e )
+{
+ if ( !mousePressed || e->state() == NoButton ) {
+ QMenuBar::mouseMoveEvent( e );
+ return;
+ }
+ if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() )
+ return;
+ hidePopups();
+ activateItemAt( -1 );
+ int itm = itemAtPos( dragStartPos );
+ if ( itm == -1 )
+ return;
+ QPopupMenu *popup = findItem( idAt( itm ) )->popup();
+ QString txt = findItem( idAt( itm ) )->text();
+ removeItemAt( itm );
+
+ QStoredDrag *drag = new QStoredDrag( "application/x-designer-menuitem", this );
+ QString s = QString::number( (long)popup );
+ s += "/" + txt;
+ drag->setEncodedData( QCString( s.latin1() ) );
+ QSize sz( fontMetrics().boundingRect( txt ).size() );
+ QPixmap pix( sz.width() + 20, sz.height() * 2 );
+ pix.fill( white );
+ QPainter p( &pix, this );
+ p.drawText( 2, 0, pix.width(), pix.height(), 0, txt );
+ p.end();
+ pix.setMask( pix.createHeuristicMask() );
+ drag->setPixmap( pix );
+ oldPos = itm;
+ if ( !drag->drag() ) {
+ insertItem( txt, popup, -1, itm );
+ }
+ lastIndicatorPos = QPoint( -1, -1 );
+ indicator->hide();
+ mousePressed = false;
+}
+
+void QDesignerMenuBar::mouseReleaseEvent( QMouseEvent *e )
+{
+ QMenuBar::mouseReleaseEvent( e );
+ mousePressed = false;
+}
+
+#ifndef QT_NO_DRAGANDDROP
+
+void QDesignerMenuBar::dragEnterEvent( QDragEnterEvent *e )
+{
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) )
+ e->accept();
+ if ( e->provides( "application/x-designer-menuitem" ) )
+ e->accept();
+ lastIndicatorPos = QPoint( -1, -1 );
+ insertAt = -1;
+}
+
+void QDesignerMenuBar::dragMoveEvent( QDragMoveEvent *e )
+{
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-menuitem" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) )
+ e->accept();
+ else
+ return;
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) ) {
+ int item = itemAtPos( e->pos() );
+ bool uieffect = QApplication::isEffectEnabled( UI_AnimateMenu );
+ QApplication::setEffectEnabled( UI_AnimateMenu, false );
+ if ( !qApp->activePopupWidget() )
+ actItem = -1;
+ activateItemAt( item );
+ QApplication::setEffectEnabled( UI_AnimateMenu, uieffect );
+ if ( item == -1 )
+ hidePopups();
+ } else {
+ drawIndicator( calcIndicatorPos( e->pos() ) );
+ }
+}
+
+void QDesignerMenuBar::dragLeaveEvent( QDragLeaveEvent * )
+{
+ mousePressed = false;
+ lastIndicatorPos = QPoint( -1, -1 );
+ insertAt = -1;
+}
+
+void QDesignerMenuBar::dropEvent( QDropEvent *e )
+{
+ mousePressed = false;
+ if ( !e->provides( "application/x-designer-menuitem" ) )
+ return;
+ e->accept();
+ QString s( e->encodedData( "application/x-designer-menuitem" ) );
+ QString s1 = s.left( s.find( "/" ) );
+ QString s2 = s.mid( s.find( "/" ) + 1 );
+ QPopupMenu *popup = (QPopupMenu*)s1.toLong(); // #### huha, that is evil
+ QString txt = s2;
+ insertItem( txt, popup, -1, insertAt );
+
+ MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).arg( txt ), formWindow,
+ this, (QDesignerPopupMenu*)popup, oldPos, insertAt, txt );
+ // do not execute, we did the work already
+ formWindow->commandHistory()->addCommand( cmd );
+
+ indicator->hide();
+}
+
+#endif
+
+QPoint QDesignerMenuBar::calcIndicatorPos( const QPoint &pos )
+{
+ int w = frameWidth();
+ insertAt = count();
+ for ( int i = 0; i < (int)count(); ++i ) {
+ QRect r = itemRect( i );
+ if ( pos.x() < w + r.width() / 2 ) {
+ insertAt = i;
+ break;
+ }
+ w += r.width();
+ }
+
+ return QPoint( w, 0 );
+}
+
+void QDesignerMenuBar::drawIndicator( const QPoint &pos )
+{
+ if ( lastIndicatorPos == pos )
+ return;
+ bool wasVsisible = indicator->isVisible();
+ indicator->resize( 3, height() );
+ indicator->move( pos.x() - 1, 0 );
+ indicator->show();
+ indicator->raise();
+ lastIndicatorPos = pos;
+ if ( !wasVsisible )
+ QApplication::sendPostedEvents();
+}
+
+void QDesignerMenuBar::setItemNumber( int num )
+{
+ itemNum = num;
+}
+
+int QDesignerMenuBar::itemNumber() const
+{
+ return itemNum;
+}
+
+void QDesignerMenuBar::setItemText( const QString &s )
+{
+ if ( itemNum < 0 || itemNum >= (int)count() )
+ return;
+ changeItem( idAt( itemNum ), s );
+}
+
+QString QDesignerMenuBar::itemText() const
+{
+ if ( itemNum < 0 || (int)itemNum >= (int)count() )
+ return QString::null;
+ return text( idAt( itemNum ) );
+}
+
+void QDesignerMenuBar::setItemName( const QCString &s )
+{
+ if ( itemNum < 0 || itemNum >= (int)count() )
+ return;
+ findItem( idAt( itemNum ) )->popup()->setName( s );
+}
+
+QCString QDesignerMenuBar::itemName() const
+{
+ if ( itemNum < 0 || itemNum >= (int)count() )
+ return "";
+ return findItem( idAt( itemNum ) )->popup()->name();
+}
+
+
+
+QDesignerPopupMenu::QDesignerPopupMenu( QWidget *w )
+ : QPopupMenu( w, 0 ),
+ popupMenu( 0 )
+{
+ findFormWindow();
+ setAcceptDrops( true );
+ insertAt = -1;
+ mousePressed = false;
+ lastIndicatorPos = QPoint( -1, -1 );
+ indicator = new QDesignerIndicatorWidget( this );
+ indicator->hide();
+}
+
+void QDesignerPopupMenu::contextMenuEvent( QContextMenuEvent *e )
+{
+#if defined( Q_WS_MAC ) //the mac needs us to use context menu rather than right click
+ e->accept();
+ QMouseEvent me( QEvent::MouseButtonPress, e->pos(), e->globalPos(), RightButton, RightButton );
+ mousePressEvent(&me);
+#else
+ Q_UNUSED( e );
+#endif
+}
+
+void QDesignerPopupMenu::mousePressEvent( QMouseEvent *e )
+{
+ if ( e->button() == MidButton )
+ return;
+
+ if ( e->button() == RightButton ) {
+ // A popup for a popup, we only need one, so make sure that
+ // we don't create multiple. The timer keeps the event loop sane.
+ popupPos = e->globalPos();
+ popupLocalPos = e->pos();
+ if ( popupMenu ) {
+ popupMenu->close();
+ }
+ e->accept();
+ QTimer::singleShot( 0, this, SLOT(createPopupMenu()) );
+ return;
+ }
+ mousePressed = true;
+ dragStartPos = e->pos();
+ QPopupMenu::mousePressEvent( e );
+}
+
+void QDesignerPopupMenu::createPopupMenu()
+{
+ // actually creates our popup for the popupmenu.
+ QPopupMenu menu( 0 );
+ popupMenu = &menu;
+ int itm;
+ const int ID_DELETE = 1;
+ const int ID_SEP = 2;
+ itm = itemAtPos( popupLocalPos, false );
+ if ( itm == -1 )
+ return;
+ QAction *a = actionList.at( itm );
+ if ( a && a->inherits( "QSeparatorAction" ) )
+ menu.insertItem( i18n("Delete Separator" ), ID_DELETE );
+ else
+ menu.insertItem( i18n("Delete Item" ), ID_DELETE );
+ menu.insertItem( i18n("Insert Separator" ), ID_SEP );
+ int res = menu.exec( popupPos );
+ if ( res == ID_DELETE ) {
+ QAction *a = actionList.at( itm );
+ if ( !a )
+ return;
+ RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand(
+ i18n("Delete Action '%1' From Popup Menu '%2'" ).
+ arg( a->name() ).arg( caption() ),
+ formWindow, a, this, itm );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ } else if ( res == ID_SEP ) {
+ QPoint p( pos() );
+ calcIndicatorPos( mapFromGlobal( popupPos ) );
+ QAction *a = new QSeparatorAction( 0 );
+ AddActionToPopupCommand *cmd = new AddActionToPopupCommand(
+ i18n("Add Separator to Popup Menu '%1'" ).
+ arg( name() ),
+ formWindow, a, this, insertAt );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->hidePopups();
+ ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 );
+ popup( p );
+ }
+ // set this back to zero so we know a popup (will soon) not exist.
+ popupMenu = 0;
+}
+
+void QDesignerPopupMenu::mouseMoveEvent( QMouseEvent *e )
+{
+ if ( !mousePressed || e->state() == NoButton ) {
+ QPopupMenu::mouseMoveEvent( e );
+ return;
+ }
+ if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() ) {
+ QPopupMenu::mouseMoveEvent( e );
+ return;
+ }
+ int itm = itemAtPos( dragStartPos, false );
+ if ( itm == -1 )
+ return;
+ QAction *a = actionList.at( itm );
+ if ( !a )
+ return;
+ RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand( i18n("Delete Action '%1' From Popup Menu '%2'" ).
+ arg( a->name() ).arg( caption() ),
+ formWindow, a, this, itm );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+
+ QString type = a->inherits( "QActionGroup" ) ? QString( "application/x-designer-actiongroup" ) :
+ a->inherits( "QSeparatorAction" ) ? QString( "application/x-designer-separator" ) : QString( "application/x-designer-actions" );
+ QStoredDrag *drag = new QStoredDrag( type, this );
+ QString s = QString::number( (long)a ); // #### huha, that is evil
+ drag->setEncodedData( QCString( s.latin1() ) );
+ drag->setPixmap( a->iconSet().pixmap() );
+ if ( !drag->drag() ) {
+ AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Action '%1' to Popup Menu '%2'" ).
+ arg( a->name() ).arg( name() ),
+ formWindow, a, this, itm );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ }
+ indicator->hide();
+ lastIndicatorPos = QPoint( -1, -1 );
+ mousePressed = false;
+}
+
+void QDesignerPopupMenu::mouseReleaseEvent( QMouseEvent *e )
+{
+ mousePressed = false;
+ QPopupMenu::mouseReleaseEvent( e );
+}
+
+#ifndef QT_NO_DRAGANDDROP
+
+void QDesignerPopupMenu::dragEnterEvent( QDragEnterEvent *e )
+{
+ mousePressed = false;
+ lastIndicatorPos = QPoint( -1, -1 );
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) )
+ e->accept();
+}
+
+void QDesignerPopupMenu::dragMoveEvent( QDragMoveEvent *e )
+{
+ mousePressed = false;
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) )
+ e->accept();
+ else
+ return;
+ drawIndicator( calcIndicatorPos( e->pos() ) );
+}
+
+void QDesignerPopupMenu::dragLeaveEvent( QDragLeaveEvent * )
+{
+ mousePressed = false;
+ indicator->hide();
+ insertAt = -1;
+}
+
+void QDesignerPopupMenu::dropEvent( QDropEvent *e )
+{
+ mousePressed = false;
+ if ( e->provides( "application/x-designer-actions" ) ||
+ e->provides( "application/x-designer-actiongroup" ) ||
+ e->provides( "application/x-designer-separator" ) )
+ e->accept();
+ else
+ return;
+
+ QPoint p = pos();
+ QAction *a = 0;
+ if ( e->provides( "application/x-designer-actiongroup" ) ) {
+ QString s( e->encodedData( "application/x-designer-actiongroup" ) );
+ a = (QDesignerActionGroup*)s.toLong();
+ } else {
+ QString s;
+ if ( e->provides( "application/x-designer-separator" ) ) {
+ s = QString( e->encodedData( "application/x-designer-separator" ) );
+ a = (QSeparatorAction*)s.toLong();
+ } else {
+ s = QString( e->encodedData( "application/x-designer-actions" ) );
+ a = (QDesignerAction*)s.toLong();
+ }
+ }
+
+ if ( actionList.findRef( a ) != -1 ) {
+ QMessageBox::warning( MainWindow::self, i18n("Insert/Move Action" ),
+ i18n("Action '%1' has already been added to this menu.\n"
+ "An Action may only occur once in a given menu." ).
+ arg( a->name() ) );
+ return;
+ }
+
+ AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Action '%1' to Popup Menu '%2'" ).
+ arg( a->name() ).arg( name() ),
+ formWindow, a, this, insertAt );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+
+ ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->hidePopups();
+ ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 );
+ indicator->hide();
+ popup( p );
+}
+
+#endif
+
+void QDesignerPopupMenu::reInsert()
+{
+ clear();
+ for ( QAction *a = actionList.first(); a; a = actionList.next() )
+ a->addTo( this );
+}
+
+void QDesignerPopupMenu::drawIndicator( const QPoint &pos )
+{
+ if ( lastIndicatorPos == pos )
+ return;
+ bool wasVsisible = indicator->isVisible();
+ indicator->resize( width(), 3 );
+ indicator->move( 0, pos.y() - 1 );
+ indicator->show();
+ indicator->raise();
+ lastIndicatorPos = pos;
+ if ( !wasVsisible )
+ QApplication::sendPostedEvents();
+}
+
+QPoint QDesignerPopupMenu::calcIndicatorPos( const QPoint &pos )
+{
+ int h = frameWidth();
+ insertAt = count();
+ for ( int i = 0; i < (int)count(); ++i ) {
+ QRect r = itemGeometry( i );
+ if ( pos.y() < h + r.height() / 2 ) {
+ insertAt = i;
+ break;
+ }
+ h += r.height();
+ }
+
+ return QPoint( 0, h );
+}
+
+void QDesignerPopupMenu::addAction( QAction *a )
+{
+ actionList.append( a );
+ connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) );
+}
+
+void QDesignerPopupMenu::actionRemoved()
+{
+ actionList.removeRef( (QAction*)sender() );
+}
+
+void QDesignerPopupMenu::paintEvent( QPaintEvent *e )
+{
+ QPopupMenu::paintEvent( e );
+ if ( e->rect() != rect() )
+ return;
+ lastIndicatorPos = QPoint( -1, -1 );
+}
+
+void QDesignerPopupMenu::findFormWindow()
+{
+ QWidget *w = this;
+ while ( w ) {
+ if ( w->inherits( "FormWindow" ) )
+ formWindow = (FormWindow*)w;
+ w = w->parentWidget();
+ }
+}
+
+#include "actiondnd.moc"
diff --git a/kommander/editor/actiondnd.h b/kommander/editor/actiondnd.h
new file mode 100644
index 00000000..d99cc54c
--- /dev/null
+++ b/kommander/editor/actiondnd.h
@@ -0,0 +1,304 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef ACTIONDND_H
+#define ACTIONDND_H
+
+#include <qaction.h>
+#include <qmap.h>
+#include <qmenubar.h>
+#include <qpixmap.h>
+#include <qpopupmenu.h>
+#include <qptrlist.h>
+#include <qtoolbar.h>
+#include <qguardedptr.h>
+
+class QDesignerPopupMenu;
+class QDesignerIndicatorWidget;
+class FormWindow;
+
+class QDesignerActionGroup : public QActionGroup
+{
+ Q_OBJECT
+
+public:
+ QDesignerActionGroup( QObject *parent )
+ : QActionGroup( !parent || parent->inherits( "QActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ) {}
+
+ QWidget *widget() const { return wid; }
+ QWidget *widget( QAction *a ) const { return *widgets.find( a ); }
+ int index() const { return idx; }
+
+protected:
+ void addedTo( QWidget *w, QWidget * ) {
+ wid = w;
+ }
+ void addedTo( QWidget *w, QWidget *, QAction *a ) {
+ widgets.insert( a, w );
+ }
+ void addedTo( int index, QPopupMenu * ) {
+ idx = index;
+ }
+
+private:
+ QWidget *wid;
+ QMap<QAction *, QWidget *> widgets;
+ int idx;
+
+};
+
+class QDesignerAction : public QAction
+{
+ Q_OBJECT
+
+public:
+ QDesignerAction( QObject *parent )
+ : QAction( !parent || parent->inherits( "QActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {}
+ QDesignerAction( QWidget *w, QObject *parent )
+ : QAction( !parent || parent->inherits( "QActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {}
+
+ QWidget *widget() const { return wid; }
+ int index() const { return idx; }
+
+ bool addTo( QWidget *w );
+ bool removeFrom( QWidget *w );
+
+ void remove();
+ bool supportsMenu() const { return !widgetToInsert; }
+
+protected:
+ void addedTo( QWidget *w, QWidget * ) {
+ wid = w;
+ }
+ void addedTo( int index, QPopupMenu * ) {
+ idx = index;
+ }
+
+private:
+ QWidget *wid;
+ int idx;
+ QWidget *widgetToInsert;
+
+};
+
+class QDesignerToolBarSeparator : public QWidget
+{
+ Q_OBJECT
+
+public:
+ QDesignerToolBarSeparator( Orientation, QToolBar *parent, const char* name=0 );
+
+ QSize sizeHint() const;
+ Orientation orientation() const { return orient; }
+public slots:
+ void setOrientation( Orientation );
+protected:
+ void styleChange( QStyle& );
+ void paintEvent( QPaintEvent * );
+private:
+ Orientation orient;
+};
+
+
+class QSeparatorAction : public QAction
+{
+ Q_OBJECT
+
+public:
+ QSeparatorAction( QObject *parent );
+
+ bool addTo( QWidget *w );
+ bool removeFrom( QWidget *w );
+ QWidget *widget() const;
+ int index() const;
+
+private:
+ QWidget *wid;
+ int idx;
+
+};
+
+class QDesignerToolBar : public QToolBar
+{
+ Q_OBJECT
+
+public:
+ QDesignerToolBar( QMainWindow *mw );
+ QDesignerToolBar( QMainWindow *mw, Dock dock );
+ QPtrList<QAction> insertedActions() const { return actionList; }
+ void addAction( QAction *a );
+
+ void clear();
+ void installEventFilters( QWidget *w );
+ void insertAction( QWidget *w, QAction *a ) { actionMap.insert( w, a ); }
+ void insertAction( int index, QAction *a ) { actionList.insert( index, a ); }
+ void appendAction( QAction *a ) { actionList.append( a ); }
+ void removeAction( QAction *a ) { actionList.remove( a ); }
+ void reInsert();
+ void removeWidget( QWidget *w );
+
+protected:
+ bool eventFilter( QObject *, QEvent * );
+ void paintEvent( QPaintEvent * );
+#ifndef QT_NO_DRAGANDDROP
+ void dragEnterEvent( QDragEnterEvent * );
+ void dragMoveEvent( QDragMoveEvent * );
+ void dragLeaveEvent( QDragLeaveEvent * );
+ void dropEvent( QDropEvent * );
+#endif
+ void contextMenuEvent( QContextMenuEvent *e );
+ void mousePressEvent( QMouseEvent *e );
+ void mouseReleaseEvent( QMouseEvent *e );
+
+private slots:
+ void actionRemoved();
+
+private:
+ void drawIndicator( const QPoint &pos );
+ QPoint calcIndicatorPos( const QPoint &pos );
+ void buttonContextMenuEvent( QContextMenuEvent *e, QObject *o );
+ void buttonMousePressEvent( QMouseEvent *e, QObject *o );
+ void buttonMouseMoveEvent( QMouseEvent *e, QObject *o );
+ void buttonMouseReleaseEvent( QMouseEvent *e, QObject *o );
+ void doInsertWidget( const QPoint &p );
+ void findFormWindow();
+
+private:
+ QPoint lastIndicatorPos;
+ QWidget *insertAnchor;
+ bool afterAnchor;
+ QPtrList<QAction> actionList;
+ QMap<QWidget*, QAction*> actionMap;
+ QPoint dragStartPos;
+ QDesignerIndicatorWidget *indicator;
+ bool widgetInserting;
+ FormWindow *formWindow;
+
+};
+
+class QDesignerMenuBar : public QMenuBar
+{
+ Q_OBJECT
+ friend class QDesignerPopupMenu;
+
+ Q_PROPERTY( int itemNumber WRITE setItemNumber READ itemNumber )
+ Q_PROPERTY( QString itemText WRITE setItemText READ itemText )
+ Q_PROPERTY( QCString itemName WRITE setItemName READ itemName )
+
+public:
+ QDesignerMenuBar( QWidget *mw );
+
+ void setItemNumber( int num );
+ int itemNumber() const;
+ void setItemText( const QString &s );
+ QString itemText() const;
+ void setItemName( const QCString &s );
+ QCString itemName() const;
+
+protected:
+ void mousePressEvent( QMouseEvent *e );
+ void mouseMoveEvent( QMouseEvent *e );
+ void mouseReleaseEvent( QMouseEvent *e );
+ void contextMenuEvent( QContextMenuEvent *e );
+#ifndef QT_NO_DRAGANDDROP
+ void dragEnterEvent( QDragEnterEvent * );
+ void dragMoveEvent( QDragMoveEvent * );
+ void dragLeaveEvent( QDragLeaveEvent * );
+ void dropEvent( QDropEvent * );
+#endif
+
+private:
+ void drawIndicator( const QPoint &pos );
+ QPoint calcIndicatorPos( const QPoint &pos );
+ void findFormWindow();
+
+private:
+ int itemNum;
+ QPoint dragStartPos;
+ bool mousePressed;
+ QPoint lastIndicatorPos;
+ int insertAt;
+ QDesignerIndicatorWidget *indicator;
+ FormWindow *formWindow;
+ int oldPos;
+
+};
+
+class QDesignerPopupMenu : public QPopupMenu
+{
+ Q_OBJECT
+
+public:
+ QDesignerPopupMenu( QWidget *w );
+ QPtrList<QAction> insertedActions() const { return actionList; }
+ void addAction( QAction *a );
+ void reInsert();
+ void insertAction( int index, QAction *a ) { actionList.insert( index, a ); }
+ void removeAction( QAction *a ) { actionList.remove( a ); }
+
+protected:
+ void mousePressEvent( QMouseEvent *e );
+ void mouseMoveEvent( QMouseEvent *e );
+ void mouseReleaseEvent( QMouseEvent *e );
+ void contextMenuEvent( QContextMenuEvent *e );
+ void paintEvent( QPaintEvent * );
+#ifndef QT_NO_DRAGANDDROP
+ void dragEnterEvent( QDragEnterEvent * );
+ void dragMoveEvent( QDragMoveEvent * );
+ void dragLeaveEvent( QDragLeaveEvent * );
+ void dropEvent( QDropEvent * );
+#endif
+
+private slots:
+ void actionRemoved();
+ void createPopupMenu();
+
+private:
+ void drawIndicator( const QPoint &pos );
+ QPoint calcIndicatorPos( const QPoint &pos );
+ void findFormWindow();
+
+private:
+ QPoint lastIndicatorPos;
+ int insertAt;
+ QPtrList<QAction> actionList;
+ QPoint dragStartPos;
+ bool mousePressed;
+ QDesignerIndicatorWidget *indicator;
+ FormWindow *formWindow;
+ QGuardedPtr<QPopupMenu> popupMenu;
+ QPoint popupPos;
+ QPoint popupLocalPos;
+
+};
+
+class QDesignerIndicatorWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ QDesignerIndicatorWidget( QWidget *p )
+ : QWidget( p, "qt_dockwidget_internal" ) {
+ setBackgroundColor( red );
+ }
+
+};
+
+#endif
diff --git a/kommander/editor/actioneditor.ui b/kommander/editor/actioneditor.ui
new file mode 100644
index 00000000..733e5b29
--- /dev/null
+++ b/kommander/editor/actioneditor.ui
@@ -0,0 +1,201 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>ActionEditorBase</class>
+<include location="local" implDecl="in declaration">actioneditor.ui.h</include>
+<forward>class QListViewItem;</forward>
+<layoutdefaults spacing="6" margin="11"/>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ActionEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>206</width>
+ <height>227</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit Actions</string>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <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="QToolButton">
+ <property name="name">
+ <cstring>buttonNewAction</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Create new Action</string>
+ </property>
+ </widget>
+ <widget class="QToolButton">
+ <property name="name">
+ <cstring>buttonDeleteAction</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete current Action</string>
+ </property>
+ </widget>
+ <widget class="QToolButton">
+ <property name="name">
+ <cstring>buttonConnect</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Connect current Action</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="ActionListView">
+ <property name="name">
+ <cstring>listActions</cstring>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>ActionListView</class>
+ <header location="local">actionlistview.h</header>
+ <sizehint>
+ <width>200</width>
+ <height>200</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>7</hordata>
+ <verdata>7</verdata>
+ </sizepolicy>
+ <pixmap>image3</pixmap>
+ <signal>selectionChanged( QListViewItem * )</signal>
+ <signal>currentChanged( QListViewItem * )</signal>
+ <signal>clicked( QListViewItem * )</signal>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="721">789cedd2310ac23014c6f13da778245b11ab29c114f1088aa3200eaf2f151daaa07510f1eef64553ac696fe04787fcf90dc9d03481cd7a09492aae35d647023ae0051277abaafb76b77808a93534df0ca67224e4180856e753c967d59cd5c48fb3e0d4b9269d7312a741e30c723a4e9b596333ce92930c69329cc8b9f7f3b7f42e886a1709bea70a3524142812172892325024182892f681bff2f1bf74a5bb2f19fe0f7ae439172f13a0a94f</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="661">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232520022630543251d2e253d856405bffcbc54105b19c856360003103711c6b53006abc40a90649491482ac92863955146d6822ca387474619c9301419a03842825819245bd064129513b1cb242602512216994430d44bc4904984c8c1a5e032897a3019a8144c26518f800c92715864d0ec81ab4dc4701b924fb0850e8a4cad351700fe117ccc</data>
+ </image>
+ <image name="image2">
+ <data format="XPM.GZ" length="1142">789cbdd1cb6e82401480e1bd4f4174671a1c70504cd3055e60d5a6cb264d17330378451450b44ddfbd73ce19489abae8caa30bbefccc108641df7a7b7db6fa834e59896aad2cb51285d58f4f59767dff78faea745dd7d2ffa16739dd874ed7b694f592ef13b85ee8eb1e630e971c786898605d1baad803ee5a622d1a2623e0b125d619d165b4f6d212ebd990d3dab225d60ae93bbe2f8121d061ae923170451cf2340506868a18217d7d33be9104baba2a5cbb6d483767c0e1849b07a5c491437509f4c478423c0105673ef3815343c5187083544dfd34343501aad8610eb206c69ec3897364d25018ea03005e81c9a8a9b9a1a97b64a21f848c8169ca19c76fdd238e27637c4145149ec0c3b16fce5d4b4fd0d8b21d2aa2a770e2c496e91267b5a62228c46263cb2d955d4665af07b6cb753a1c8b6359ee2a2a34b9fe9d6c599cf5ac7f15985a2728977f96ab0e9fb62ccb1bbbc18a2028ffee564f9b709e5199d7347a850cce380b3a1d136a389d308cc2288aeefc7d6e97efc7ce0ff25f14ae</data>
+ </image>
+ <image name="image3">
+ <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
+ </image>
+</images>
+<connections>
+ <connection language="C++">
+ <sender>listActions</sender>
+ <signal>currentChanged( QListViewItem * )</signal>
+ <receiver>ActionEditorBase</receiver>
+ <slot>currentActionChanged(QListViewItem*)</slot>
+ </connection>
+ <connection language="C++">
+ <sender>listActions</sender>
+ <signal>clicked( QListViewItem * )</signal>
+ <receiver>ActionEditorBase</receiver>
+ <slot>currentActionChanged(QListViewItem*)</slot>
+ </connection>
+ <connection language="C++">
+ <sender>listActions</sender>
+ <signal>selectionChanged( QListViewItem * )</signal>
+ <receiver>ActionEditorBase</receiver>
+ <slot>currentActionChanged(QListViewItem*)</slot>
+ </connection>
+ <connection language="C++">
+ <sender>buttonNewAction</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionEditorBase</receiver>
+ <slot>newAction()</slot>
+ </connection>
+ <connection language="C++">
+ <sender>buttonConnect</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionEditorBase</receiver>
+ <slot>connectionsClicked()</slot>
+ </connection>
+ <connection language="C++">
+ <sender>buttonDeleteAction</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionEditorBase</receiver>
+ <slot>deleteAction()</slot>
+ </connection>
+ <slot access="protected" language="C++" returnType="void">init()</slot>
+ <slot access="protected" language="C++" returnType="void">destroy()</slot>
+ <slot access="protected" language="C++" returnType="void">connectionsClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">currentActionChanged( QListViewItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">deleteAction()</slot>
+ <slot access="protected" language="C++" returnType="void">newAction()</slot>
+</connections>
+</UI>
diff --git a/kommander/editor/actioneditorimpl.cpp b/kommander/editor/actioneditorimpl.cpp
new file mode 100644
index 00000000..0d694250
--- /dev/null
+++ b/kommander/editor/actioneditorimpl.cpp
@@ -0,0 +1,261 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "actioneditorimpl.h"
+#include "formwindow.h"
+#include "metadatabase.h"
+#include "actionlistview.h"
+#include "connectioneditorimpl.h"
+#include "mainwindow.h"
+
+#include <qaction.h>
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qtoolbutton.h>
+#include <qlistview.h>
+#include <qcheckbox.h>
+#include <qpushbutton.h>
+#include <qpopupmenu.h>
+#include <qobjectlist.h>
+
+#include <klocale.h>
+
+ActionEditor::ActionEditor( QWidget* parent, const char* name, WFlags fl )
+ : ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 )
+{
+ listActions->addColumn( i18n("Actions" ) );
+ setEnabled( false );
+ buttonConnect->setEnabled( false );
+
+ QPopupMenu *popup = new QPopupMenu( this );
+ popup->insertItem( i18n("New &Action" ), this, SLOT( newAction() ) );
+ popup->insertItem( i18n("New Action &Group" ), this, SLOT( newActionGroup() ) );
+ popup->insertItem( i18n("New &Dropdown Action Group" ), this, SLOT( newDropDownActionGroup() ) );
+ buttonNewAction->setPopup( popup );
+ buttonNewAction->setPopupDelay( 0 );
+
+ connect( listActions, SIGNAL( insertAction() ), this, SLOT( newAction() ) );
+ connect( listActions, SIGNAL( insertActionGroup() ), this, SLOT( newActionGroup() ) );
+ connect( listActions, SIGNAL( insertDropDownActionGroup() ), this, SLOT( newDropDownActionGroup() ) );
+ connect( listActions, SIGNAL( deleteAction() ), this, SLOT( deleteAction() ) );
+ connect( listActions, SIGNAL( connectAction() ), this, SLOT( connectionsClicked() ) );
+}
+
+void ActionEditor::closeEvent( QCloseEvent *e )
+{
+ emit hidden();
+ e->accept();
+}
+
+void ActionEditor::currentActionChanged( QListViewItem *i )
+{
+ buttonConnect->setEnabled( i != 0 );
+ if ( !i )
+ return;
+ currentAction = ( (ActionItem*)i )->action();
+ if ( !currentAction )
+ currentAction = ( (ActionItem*)i )->actionGroup();
+ if ( formWindow && currentAction )
+ formWindow->setActiveObject( currentAction );
+}
+
+void ActionEditor::deleteAction()
+{
+ if ( !currentAction )
+ return;
+
+ QListViewItemIterator it( listActions );
+ while ( it.current() ) {
+ if ( ( (ActionItem*)it.current() )->action() == currentAction ) {
+ formWindow->actionList().removeRef( currentAction );
+ delete currentAction;
+ QValueList<MetaDataBase::Connection> conns =
+ MetaDataBase::connections( formWindow, currentAction );
+ for ( QValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
+ it2 != conns.end(); ++it2 )
+ MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
+ (*it2).receiver, (*it2).slot );
+ delete it.current();
+ break;
+ } else if ( ( (ActionItem*)it.current() )->actionGroup() == currentAction ) {
+ formWindow->actionList().removeRef( currentAction );
+ delete currentAction;
+ QValueList<MetaDataBase::Connection> conns =
+ MetaDataBase::connections( formWindow, currentAction );
+ for ( QValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
+ it2 != conns.end(); ++it2 )
+ MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
+ (*it2).receiver, (*it2).slot );
+ delete it.current();
+ break;
+ }
+ ++it;
+ }
+
+ if ( formWindow )
+ formWindow->setActiveObject( formWindow->mainContainer() );
+}
+
+void ActionEditor::newAction()
+{
+ ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
+ if ( actionParent ) {
+ if ( !actionParent->actionGroup() ||
+ !actionParent->actionGroup()->inherits( "QActionGroup" ) )
+ actionParent = (ActionItem*)actionParent->parent();
+ }
+
+ ActionItem *i = 0;
+ if ( actionParent )
+ i = new ActionItem( actionParent );
+ else
+ i = new ActionItem( listActions, (bool)false );
+ MetaDataBase::addEntry( i->action() );
+ QString n = "Action";
+ formWindow->unify( i->action(), n, true );
+ i->setText( 0, n );
+ i->action()->setName( n );
+ i->action()->setText( i->action()->name() );
+ if ( actionParent && actionParent->actionGroup() &&
+ actionParent->actionGroup()->usesDropDown() ) {
+ i->action()->setToggleAction( true );
+ MetaDataBase::setPropertyChanged( i->action(), "toggleAction", true );
+ }
+ MetaDataBase::setPropertyChanged( i->action(), "text", true );
+ MetaDataBase::setPropertyChanged( i->action(), "name", true );
+ listActions->setCurrentItem( i );
+ if ( !actionParent )
+ formWindow->actionList().append( i->action() );
+}
+
+void ActionEditor::newActionGroup()
+{
+ ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
+ if ( actionParent ) {
+ if ( !actionParent->actionGroup() ||
+ !actionParent->actionGroup()->inherits( "QActionGroup" ) )
+ actionParent = (ActionItem*)actionParent->parent();
+ }
+
+ ActionItem *i = 0;
+ if ( actionParent )
+ i = new ActionItem( actionParent, true );
+ else
+ i = new ActionItem( listActions, true );
+
+ MetaDataBase::addEntry( i->actionGroup() );
+ MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", true );
+ QString n = "ActionGroup";
+ formWindow->unify( i->action(), n, true );
+ i->setText( 0, n );
+ i->actionGroup()->setName( n );
+ i->actionGroup()->setText( i->actionGroup()->name() );
+ MetaDataBase::setPropertyChanged( i->actionGroup(), "text", true );
+ MetaDataBase::setPropertyChanged( i->actionGroup(), "name", true );
+ listActions->setCurrentItem( i );
+ i->setOpen( true );
+ if ( !actionParent )
+ formWindow->actionList().append( i->actionGroup() );
+}
+
+void ActionEditor::newDropDownActionGroup()
+{
+ newActionGroup();
+ ( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( true );
+}
+
+void ActionEditor::setFormWindow( FormWindow *fw )
+{
+ listActions->clear();
+ formWindow = fw;
+ if ( !formWindow ||
+ !formWindow->mainContainer() ||
+ !formWindow->mainContainer()->inherits( "QMainWindow" ) ) {
+ setEnabled( false );
+ } else {
+ setEnabled( true );
+ for ( QAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
+ ActionItem *i = 0;
+ if ( a->parent() && a->parent()->inherits( "QAction" ) )
+ continue;
+ i = new ActionItem( listActions, a );
+ i->setText( 0, a->name() );
+ i->setPixmap( 0, a->iconSet().pixmap() );
+ if ( a->inherits( "QActionGroup" ) ) {
+ insertChildActions( i );
+ }
+ }
+ if ( listActions->firstChild() ) {
+ listActions->setCurrentItem( listActions->firstChild() );
+ listActions->setSelected( listActions->firstChild(), true );
+ }
+ }
+}
+
+void ActionEditor::insertChildActions( ActionItem *i )
+{
+ if ( !i->actionGroup() || !i->actionGroup()->children() )
+ return;
+ QObjectListIt it( *i->actionGroup()->children() );
+ while ( it.current() ) {
+ QObject *o = it.current();
+ ++it;
+ if ( !o->inherits( "QAction" ) )
+ continue;
+ QAction *a = (QAction*)o;
+ ActionItem *i2 = new ActionItem( (QListViewItem*)i, a );
+ i->setOpen( true );
+ i2->setText( 0, a->name() );
+ i2->setPixmap( 0, a->iconSet().pixmap() );
+ if ( a->inherits( "QActionGroup" ) )
+ insertChildActions( i2 );
+ }
+}
+
+void ActionEditor::updateActionName( QAction *a )
+{
+ QListViewItemIterator it( listActions );
+ while ( it.current() ) {
+ if ( ( (ActionItem*)it.current() )->action() == a )
+ ( (ActionItem*)it.current() )->setText( 0, a->name() );
+ else if ( ( (ActionItem*)it.current() )->actionGroup() == a )
+ ( (ActionItem*)it.current() )->setText( 0, a->name() );
+ ++it;
+ }
+}
+
+void ActionEditor::updateActionIcon( QAction *a )
+{
+ QListViewItemIterator it( listActions );
+ while ( it.current() ) {
+ if ( ( (ActionItem*)it.current() )->action() == a )
+ ( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() );
+ else if ( ( (ActionItem*)it.current() )->actionGroup() == a )
+ ( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() );
+ ++it;
+ }
+}
+
+void ActionEditor::connectionsClicked()
+{
+ ConnectionEditor editor( formWindow->mainWindow(), currentAction, formWindow, formWindow );
+ editor.exec();
+}
+#include "actioneditorimpl.moc"
diff --git a/kommander/editor/actioneditorimpl.h b/kommander/editor/actioneditorimpl.h
new file mode 100644
index 00000000..9ecfaaa5
--- /dev/null
+++ b/kommander/editor/actioneditorimpl.h
@@ -0,0 +1,64 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef ACTIONEDITOR_H
+#define ACTIONEDITOR_H
+
+#include "actioneditor.h"
+
+class QAction;
+class FormWindow;
+class ActionItem;
+
+class ActionEditor : public ActionEditorBase
+{
+ Q_OBJECT
+
+public:
+ ActionEditor( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ void setFormWindow( FormWindow *fw );
+ void updateActionName( QAction *a );
+ void updateActionIcon( QAction *a );
+ FormWindow *form() const { return formWindow; }
+
+protected:
+ void closeEvent( QCloseEvent *e );
+
+protected slots:
+ void currentActionChanged( QListViewItem * );
+ void deleteAction();
+ void newAction();
+ void newActionGroup();
+ void newDropDownActionGroup();
+ void connectionsClicked();
+
+signals:
+ void hidden();
+
+private:
+ void insertChildActions( ActionItem *i );
+
+private:
+ QAction *currentAction;
+ FormWindow *formWindow;
+
+};
+
+#endif // ACTIONEDITOR_H
diff --git a/kommander/editor/actionlistview.cpp b/kommander/editor/actionlistview.cpp
new file mode 100644
index 00000000..0db57f76
--- /dev/null
+++ b/kommander/editor/actionlistview.cpp
@@ -0,0 +1,111 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "actionlistview.h"
+#include <qdragobject.h>
+#include <qheader.h>
+
+#include <klocale.h>
+
+ActionListView::ActionListView( QWidget *parent, const char *name )
+ : QListView( parent, name )
+{
+ header()->setStretchEnabled( true );
+ setRootIsDecorated( true );
+ setSorting( -1 );
+ connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
+ this, SLOT( rmbMenu( QListViewItem *, const QPoint & ) ) );
+}
+
+ActionItem::ActionItem( QListView *lv, QAction *ac )
+ : QListViewItem( lv ), a( 0 ), g( 0 )
+{
+ if ( ac->inherits( "QActionGroup" ) )
+ g = (QDesignerActionGroup*)ac;
+ else
+ a = (QDesignerAction*)ac;
+ setDragEnabled( true );
+}
+
+ActionItem::ActionItem( QListViewItem *i, QAction *ac )
+ : QListViewItem( i ), a( 0 ), g( 0 )
+{
+ if ( ac->inherits( "QActionGroup" ) )
+ g = (QDesignerActionGroup*)ac;
+ else
+ a = (QDesignerAction*)ac;
+ setDragEnabled( true );
+ moveToEnd();
+}
+
+void ActionItem::moveToEnd()
+{
+ QListViewItem *i = this;
+ while ( i->nextSibling() )
+ i = i->nextSibling();
+ if ( i != this )
+ moveItem( i );
+}
+
+QDragObject *ActionListView::dragObject()
+{
+ ActionItem *i = (ActionItem*)currentItem();
+ if ( !i )
+ return 0;
+ QStoredDrag *drag = 0;
+ if ( i->action() ) {
+ drag = new QStoredDrag( "application/x-designer-actions", viewport() );
+ QString s = QString::number( (long)i->action() ); // #### huha, that is evil
+ drag->setEncodedData( QCString( s.latin1() ) );
+ drag->setPixmap( i->action()->iconSet().pixmap() );
+ } else {
+ drag = new QStoredDrag( "application/x-designer-actiongroup", viewport() );
+ QString s = QString::number( (long)i->actionGroup() ); // #### huha, that is evil
+ drag->setEncodedData( QCString( s.latin1() ) );
+ drag->setPixmap( i->actionGroup()->iconSet().pixmap() );
+ }
+ return drag;
+}
+
+void ActionListView::rmbMenu( QListViewItem *i, const QPoint &p )
+{
+ QPopupMenu *popup = new QPopupMenu( this );
+ popup->insertItem( i18n("New &Action" ), 0 );
+ popup->insertItem( i18n("New Action &Group" ), 1 );
+ popup->insertItem( i18n("New &Dropdown Action Group" ), 2 );
+ if ( i ) {
+ popup->insertSeparator();
+ popup->insertItem( i18n("&Connect Action..." ), 3 );
+ popup->insertSeparator();
+ popup->insertItem( i18n("Delete Action" ), 4 );
+ }
+ int res = popup->exec( p );
+ if ( res == 0 )
+ emit insertAction();
+ else if ( res == 1 )
+ emit insertActionGroup();
+ else if ( res == 2 )
+ emit insertDropDownActionGroup();
+ else if ( res == 3 )
+ emit connectAction();
+ else if ( res == 4 )
+ emit deleteAction();
+}
+#include "actionlistview.moc"
diff --git a/kommander/editor/actionlistview.h b/kommander/editor/actionlistview.h
new file mode 100644
index 00000000..33709068
--- /dev/null
+++ b/kommander/editor/actionlistview.h
@@ -0,0 +1,75 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef ACTIONLISTVIEW_H
+#define ACTIONLISTVIEW_H
+
+#include <qlistview.h>
+#include "actiondnd.h"
+
+class ActionItem : public QListViewItem
+{
+public:
+ ActionItem( QListView *lv, bool group )
+ : QListViewItem( lv ),
+ a( group ? 0 : new QDesignerAction( 0 ) ),
+ g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); }
+ ActionItem( QListView *lv, QAction *ac );
+ ActionItem( QListViewItem *i, QAction *ac );
+ ActionItem( ActionItem *parent, bool group = FALSE )
+ : QListViewItem( parent ),
+ a( group ? 0 : new QDesignerAction( parent->actionGroup() ) ),
+ g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); }
+
+ QDesignerAction *action() const { return a; }
+ QDesignerActionGroup *actionGroup() const { return g; }
+
+private:
+ void moveToEnd();
+
+private:
+ QDesignerAction *a;
+ QDesignerActionGroup *g;
+
+};
+
+class ActionListView : public QListView
+{
+ Q_OBJECT
+
+public:
+ ActionListView( QWidget *parent = 0, const char *name = 0 );
+
+protected:
+ QDragObject *dragObject();
+
+private slots:
+ void rmbMenu( QListViewItem *i, const QPoint &p );
+
+signals:
+ void insertAction();
+ void insertActionGroup();
+ void insertDropDownActionGroup();
+ void deleteAction();
+ void connectAction();
+
+};
+
+#endif
diff --git a/kommander/editor/asciivalidator.cpp b/kommander/editor/asciivalidator.cpp
new file mode 100644
index 00000000..776e6e9f
--- /dev/null
+++ b/kommander/editor/asciivalidator.cpp
@@ -0,0 +1,77 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "asciivalidator.h"
+
+#include <qstring.h>
+
+AsciiValidator::AsciiValidator( QObject * parent, const char *name )
+ : QValidator( parent, name ), functionName( false )
+{
+}
+
+AsciiValidator::AsciiValidator( bool funcName, QObject * parent, const char *name )
+ : QValidator( parent, name ), functionName( funcName )
+{
+}
+
+AsciiValidator::AsciiValidator( const QString &allow, QObject * parent, const char *name )
+ : QValidator( parent, name ), functionName( false ), allowedChars( allow )
+{
+}
+
+AsciiValidator::~AsciiValidator()
+{
+}
+
+QValidator::State AsciiValidator::validate( QString &s, int & ) const
+{
+ bool inParen = false;
+ if ( !s.isEmpty() && s[0].row() == 0 && s[0].cell() >= '0' && s[0].cell() <= '9' ) {
+ s[0] = '_';
+ }
+ for ( int i = 0; i < (int) s.length(); i++ ) {
+ uchar r = s[i].row();
+ uchar c = s[i].cell();
+ if ( functionName && inParen ) {
+ if ( c != ')' )
+ continue;
+ s.truncate( i + 1 );
+ return QValidator::Acceptable;
+ }
+ if ( r == 0 && ( ( c >= '0' && c <= '9' ) ||
+ ( c >= 'a' && c <= 'z' ) ||
+ ( c >= 'A' && c <= 'Z' ) ) )
+ continue;
+ if ( functionName ) {
+ if ( c == '(' ) {
+ inParen = true;
+ continue;
+ }
+ }
+
+ if ( allowedChars.find( s[ i ] ) != -1 )
+ continue;
+
+ s[i] = '_';
+ }
+ return QValidator::Acceptable;
+}
+#include "asciivalidator.moc"
diff --git a/kommander/editor/asciivalidator.h b/kommander/editor/asciivalidator.h
new file mode 100644
index 00000000..50d273c2
--- /dev/null
+++ b/kommander/editor/asciivalidator.h
@@ -0,0 +1,46 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef ASCIIVALIDATOR_H
+#define ASCIIVALIDATOR_H
+
+
+#include <qvalidator.h>
+
+
+class AsciiValidator: public QValidator
+{
+ Q_OBJECT
+public:
+ AsciiValidator( QObject * parent, const char *name = 0 );
+ AsciiValidator( bool funcName, QObject * parent, const char *name = 0 );
+ AsciiValidator( const QString &allow, QObject * parent, const char *name = 0 );
+ ~AsciiValidator();
+
+ QValidator::State validate( QString &, int & ) const;
+
+private:
+ bool functionName;
+ QString allowedChars;
+
+};
+
+
+#endif
diff --git a/kommander/editor/assistproc.cpp b/kommander/editor/assistproc.cpp
new file mode 100644
index 00000000..58ac4f78
--- /dev/null
+++ b/kommander/editor/assistproc.cpp
@@ -0,0 +1,74 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "assistproc.h"
+
+AssistProc::AssistProc( QObject *parent, const char *name, const QString &path )
+ : QProcess( parent, name )
+{
+ assistantPath = path;
+ connect( this, SIGNAL(readyReadStdout()), this, SLOT(processOutput()) );
+ connect( this, SIGNAL(readyReadStderr()), this, SLOT(processErrOutput()) );
+}
+
+AssistProc::~AssistProc()
+{
+ tryTerminate();
+ QTimer::singleShot( 5000, this, SLOT(kill())); // If busy, kill in 5 sec...
+}
+
+bool AssistProc::run( const QString &path )
+{
+ if ( !path.isEmpty() )
+ assistantPath = path;
+
+ clearArguments();
+ addArgument( assistantPath );
+ addArgument( "-stdin" );
+
+ if ( !start() ) {
+ qWarning( "Assistant [exe]: Couldn't start \'%s\', please check path.", assistantPath.latin1() );
+ return false;
+ }
+ return true;
+}
+
+bool AssistProc::sendRequest( const QString &data )
+{
+ if ( isRunning() ) {
+ writeToStdin( data );
+ } else {
+ if ( run() ) // If not running, try to start
+ writeToStdin( data ); // and display requested page.
+ else
+ return false;
+ }
+ return true;
+}
+
+void AssistProc::processOutput()
+{
+ qWarning( "Assistant [out]: %s", readStdout().data() );
+}
+
+void AssistProc::processErrOutput()
+{
+ qWarning( "Assistant [err]: %s", readStderr().data() );
+}
+#include "assistproc.moc"
diff --git a/kommander/editor/assistproc.h b/kommander/editor/assistproc.h
new file mode 100644
index 00000000..1f584daf
--- /dev/null
+++ b/kommander/editor/assistproc.h
@@ -0,0 +1,47 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef ASSISTPROC_H
+#define ASSISTPROC_H
+
+#include <qprocess.h>
+#include <qtimer.h>
+#include <qsocket.h>
+#include <qstring.h>
+
+class AssistProc : public QProcess
+{
+ Q_OBJECT
+public:
+ AssistProc( QObject *parent=0, const char * name = 0, const QString &path = QString::null );
+ ~AssistProc();
+ bool run( const QString &path = QString::null );
+
+public slots:
+ bool sendRequest( const QString &data );
+
+private slots:
+ void processOutput();
+ void processErrOutput();
+
+private:
+ QString assistantPath;
+};
+
+#endif // ASSISTPROC_H
diff --git a/kommander/editor/assoctexteditor.ui b/kommander/editor/assoctexteditor.ui
new file mode 100644
index 00000000..e3258b73
--- /dev/null
+++ b/kommander/editor/assoctexteditor.ui
@@ -0,0 +1,222 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>AssocTextEditorBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>AssocTextEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>627</width>
+ <height>457</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit Text</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Widget:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>widgetsComboBox</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <property name="name">
+ <cstring>widgetsComboBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>3</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>treeWidgetButton</cstring>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Text for:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>stateComboBox</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <property name="name">
+ <cstring>stateComboBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>2</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Insert</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>functionButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Function...</string>
+ </property>
+ </widget>
+ <spacer>
+ <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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Wi&amp;dget:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>widgetComboBox</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <property name="name">
+ <cstring>widgetComboBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>3</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ <spacer>
+ <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="QPushButton">
+ <property name="name">
+ <cstring>filePushButton</cstring>
+ </property>
+ <property name="text">
+ <string>Fi&amp;le...</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QFrame" row="1" column="0">
+ <property name="name">
+ <cstring>editorFrame</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>Box</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>AssocTextEditorBase</sender>
+ <signal>destroyed(QObject*)</signal>
+ <receiver>AssocTextEditorBase</receiver>
+ <slot>AssocTextEditorBase_destroyed(QObject*)</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>AssocTextEditorBase_destroyed(QObject*)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp
new file mode 100644
index 00000000..25ac7f30
--- /dev/null
+++ b/kommander/editor/assoctexteditorimpl.cpp
@@ -0,0 +1,506 @@
+/***************************************************************************
+ assoctexteditorimpl.cpp - Associated text editor implementation
+ -------------------
+ copyright : (C) 2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+ (C) 2006 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 <klocale.h>
+#include <kfiledialog.h>
+#include <kmessagebox.h>
+#include <kglobal.h>
+#include <kglobalsettings.h>
+#include <kiconloader.h>
+#include <kpushbutton.h>
+#include <ktextedit.h>
+#include <kdebug.h>
+#include <kpopupmenu.h>
+#include <kactioncollection.h>
+#include <kdebug.h>
+
+#include <ktexteditor/view.h>
+#include <ktexteditor/editorchooser.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <ktexteditor/highlightinginterface.h>
+#include <ktexteditor/popupmenuinterface.h>
+#include <ktexteditor/undointerface.h>
+
+#include <kparts/partmanager.h>
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qmetaobject.h>
+#include <qcombobox.h>
+#include <qstring.h>
+#include <qfile.h>
+#include <qobject.h>
+#include <qobjectlist.h>
+#include <qtimer.h>
+#include <qevent.h>
+#include <qvaluelist.h>
+
+/* OTHER INCLUDES */
+#include <cstdio>
+#include "assoctexteditorimpl.h"
+#include "kommanderwidget.h"
+#include "formwindow.h"
+#include "propertyeditor.h"
+#include "command.h"
+#include "metadatabase.h"
+#include "choosewidgetimpl.h"
+#include "functionsimpl.h"
+
+QValueList<QWidget *> openedWidgets;
+
+AssocTextEditor::AssocTextEditor(QWidget *a_widget, FormWindow* a_form,
+ PropertyEditor* a_property, KParts::PartManager *partManager, QWidget *a_parent, const char *a_name, bool a_modal)
+ : AssocTextEditorBase(a_parent, a_name, a_modal)
+{
+ // text editor
+/* associatedTextEdit->setFont(KGlobalSettings::fixedFont());
+ associatedTextEdit->setTabStopWidth(associatedTextEdit->fontMetrics().maxWidth() * 3);
+ associatedTextEdit->setTextFormat(Qt::PlainText);*/
+
+ // icon for non-empty scripts
+ scriptPixmap = KGlobal::iconLoader()->loadIcon("source", KIcon::Small);
+
+ // signals and slots connections
+ m_formWindow = a_form;
+ m_propertyEditor = a_property;
+ m_widget = a_widget;
+
+ // list of widgets that can be edited
+ buildWidgetList();
+ for (int i=0; i<widgetsComboBox->count(); i++)
+ if (widgetFromString(widgetsComboBox->text(i)) == m_widget)
+ {
+ widgetsComboBox->setCurrentItem(i);
+ break;
+ }
+
+ doc = KTextEditor::createDocument ("libkatepart", a_parent, "KTextEditor::Document");
+ QGridLayout *layout = new QGridLayout(editorFrame, 1, 1);
+ view = doc->createView(editorFrame);
+ layout->addWidget(view, 1,1);
+ partManager->addPart(doc, true);
+
+ //trick to import all the KatePart actions into the dialog
+ KPopupMenu *invisiblePopup = new KPopupMenu(this);
+ KActionCollection *ac = view->actionCollection();
+ uint count = ac->count();
+ for (uint i = 0; i < count; i++)
+ {
+ ac->action(i)->plug(invisiblePopup);
+ }
+
+ //add those KatePart actions to a popup menu that are important
+ KPopupMenu *popup = new KPopupMenu(this);
+ KAction *a = view->actionCollection()->action("edit_undo");
+ if (a)
+ a->plug(popup);
+ a = view->actionCollection()->action("edit_redo");
+ if (a)
+ a->plug(popup);
+ popup->insertSeparator();
+ a = view->actionCollection()->action("edit_find");
+ if (a)
+ a->plug(popup);
+ a = view->actionCollection()->action("edit_find_next");
+ if (a)
+ a->plug(popup);
+ a = view->actionCollection()->action("edit_find_prev");
+ if (a)
+ a->plug(popup);
+ a = view->actionCollection()->action("edit_replace");
+ if (a)
+ a->plug(popup);
+ popup->insertSeparator();
+ a = view->actionCollection()->action("edit_cut");
+ if (a)
+ a->plug(popup);
+ a = view->actionCollection()->action("edit_copy");
+ if (a)
+ a->plug(popup);
+ a = view->actionCollection()->action("edit_paste");
+ if (a)
+ a->plug(popup);
+ readOnlyAction = view->actionCollection()->action("tools_toggle_write_lock");
+ popup->insertSeparator();
+ highlightPopup = new KPopupMenu(popup);
+ connect(highlightPopup, SIGNAL(activated(int)), SLOT(slotHighlightingChanged(int)));
+
+ popup->insertItem(i18n("&Highlighting"), highlightPopup);
+
+ KTextEditor::PopupMenuInterface *popupIf = dynamic_cast<KTextEditor::PopupMenuInterface *>(view);
+ popupIf->installPopup(popup);
+
+ associatedTextEdit = dynamic_cast<KTextEditor::EditInterface*>(doc);
+ readOnly = true;
+ if (readOnlyAction)
+ readOnlyAction->activate();
+ setWidget(a_widget);
+
+ connect(doc, SIGNAL(textChanged()), SLOT(textEditChanged()));
+ connect(widgetsComboBox, SIGNAL(activated(int)), SLOT(widgetChanged(int)));
+ connect(stateComboBox, SIGNAL(activated(int)), SLOT(stateChanged(int)));
+ connect(filePushButton, SIGNAL(clicked()), SLOT(insertFile()));
+ connect(functionButton, SIGNAL(clicked()), SLOT(insertFunction()));
+ connect(widgetComboBox, SIGNAL(activated(int)), SLOT(insertWidgetName(int)));
+ connect(treeWidgetButton, SIGNAL(clicked()), SLOT(selectWidget()));
+
+ view->setFocus();
+}
+
+AssocTextEditor::~AssocTextEditor()
+{
+ save();
+ delete doc;
+ if (!readOnly)
+ openedWidgets.remove(m_widget);
+}
+
+void AssocTextEditor::setWidget(QWidget *a_widget)
+{
+ KommanderWidget *a_atw = dynamic_cast<KommanderWidget *>(a_widget);
+ if (!a_widget || !a_atw)
+ return;
+
+
+ if (!readOnly)
+ openedWidgets.remove(m_widget);
+ if (readOnly)
+ {
+ if (readOnlyAction)
+ readOnlyAction->activate();
+ readOnly = false;
+ setCaption(i18n("Edit text"));
+ }
+
+ m_widget = a_widget;
+ m_states = a_atw->states();
+ m_populationText = a_atw->populationText();
+
+ // list of states of current widget (plus population text)
+ stateComboBox->clear();
+ stateComboBox->insertStringList(a_atw->displayStates());
+ stateComboBox->insertItem("population");
+
+ // set states and population scripts
+ QStringList at = a_atw->associatedText();
+ m_atdict.clear();
+ QStringList::iterator at_it = at.begin();
+ for(QStringList::ConstIterator s_it = m_states.begin(); s_it != m_states.end(); ++s_it)
+ {
+ if(at_it != at.end())
+ {
+ m_atdict[(*s_it)] = (*at_it);
+ ++at_it;
+ }
+ else
+ m_atdict[(*s_it)] = QString::null;
+ }
+ m_populationText = a_atw->populationText();
+
+ // show pixmaps for nonempty scripts
+ int m_initialization = -1;
+ int p_population = stateComboBox->count()-1;
+ int active = -1;
+ for (int i = 0; i < p_population; i++)
+ {
+ if (!m_atdict[stateComboBox->text(i)].isEmpty())
+ {
+ stateComboBox->changeItem(scriptPixmap, stateComboBox->text(i), i);
+ if (active == -1) active = i;
+ }
+ if (stateComboBox->text(i) == "initialization")
+ m_initialization = i;
+ }
+ if (!m_populationText.isEmpty())
+ {
+ stateComboBox->changeItem(scriptPixmap, stateComboBox->text(p_population), p_population);
+ if (active == -1) active = p_population;
+ }
+ if (active == -1 && m_initialization != -1)
+ {
+ active = m_initialization;
+ }
+ if (active == -1) active = 0;
+
+ // initial text for initial state
+ stateComboBox->setCurrentItem(active);
+ m_currentState = stateComboBox->currentText();
+ stateChanged(active);
+
+ KTextEditor::UndoInterface *undoIf = dynamic_cast<KTextEditor::UndoInterface*>(doc);
+ undoIf->clearUndo();
+
+
+ if (openedWidgets.contains(m_widget))
+ {
+ if (readOnlyAction && !readOnly)
+ readOnlyAction->activate();
+ setCaption(i18n("Edit text - read only mode"));
+ readOnly = true;
+ }
+ else
+ {
+ openedWidgets.append(m_widget);
+ }
+
+}
+
+void AssocTextEditor::save() const
+{
+ KommanderWidget *atw = dynamic_cast<KommanderWidget *>(m_widget);
+ if (!atw)
+ return;
+
+ if (atw->associatedText() != associatedText())
+ {
+ QString text = i18n("Set the \'text association\' of \'%1\'").arg(m_widget->name());
+ SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow,
+ m_widget, m_propertyEditor, "associations", atw->associatedText(),
+ associatedText(), QString::null, QString::null, false);
+ cmd->execute();
+ m_formWindow->commandHistory()->addCommand(cmd);
+ MetaDataBase::setPropertyChanged(m_widget, "associations", true);
+ }
+ if (atw->populationText() != populationText())
+ {
+ QString text = i18n("Set the \'population text\' of \'%1\'").arg(m_widget->name());
+ SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow, m_widget,
+ m_propertyEditor, "populationText", atw->populationText(),
+ populationText(), QString::null, QString::null, false);
+ cmd->execute();
+ m_formWindow->commandHistory()->addCommand(cmd);
+ MetaDataBase::setPropertyChanged(m_widget, "populationText", true);
+ }
+}
+
+
+QStringList AssocTextEditor::associatedText() const
+{
+ QStringList at;
+ for(QStringList::ConstIterator it = m_states.begin(); it != m_states.end(); ++it)
+ at.append(m_atdict[(*it)]);
+ return at;
+}
+
+QString AssocTextEditor::populationText() const
+{
+ return m_populationText;
+}
+
+QStringList AssocTextEditor::buildWidgetList()
+{
+ QStringList widgetList;
+ QObject* thisObject = m_formWindow->mainContainer();
+ QObjectList *objectList = thisObject->queryList();
+ objectList->prepend(thisObject);
+
+ for (QObjectListIt it(*objectList); it.current(); ++it)
+ {
+ // There is a warning message with the property() function if it does not exist.
+ // Verify the property exists with the meta information first */
+ bool pExists = false;
+ QMetaObject *metaObj = it.current()->metaObject();
+ if(metaObj)
+ {
+ int id = metaObj->findProperty("KommanderWidget", true);
+ const QMetaProperty *metaProp = metaObj->property(id, true);
+ if(metaProp && metaProp->isValid())
+ pExists = true;
+ }
+ if(pExists)
+ {
+ QVariant flag = (it.current())->property("KommanderWidget");
+ if(flag.isValid() && !(QString(it.current()->name()).startsWith("qt_")))
+ {
+ widgetList.append( widgetToString( (QWidget*)it.current()) );
+ m_widgetList.insert(it.current()->name(), (QWidget*)it.current());
+ }
+ }
+ }
+ delete objectList;
+
+ widgetList.sort();
+ widgetComboBox->clear();
+ widgetComboBox->insertStringList(widgetList);
+ widgetsComboBox->clear();
+ widgetsComboBox->insertStringList(widgetList);
+ return widgetList;
+}
+
+void AssocTextEditor::stateChanged(int a_index)
+{
+ m_currentState = stateComboBox->text(a_index);
+ if (a_index == stateComboBox->count() - 1)
+ associatedTextEdit->setText(m_populationText);
+ else
+ associatedTextEdit->setText(m_atdict[m_currentState]);
+ KTextEditor::ViewCursorInterface *viewCursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>(view);
+ viewCursorIf->setCursorPositionReal(0, 0);
+ highlightPopup->clear();
+ QString hlType = "Kommander (old parser)";
+ if (useInternalParser())
+ hlType = "Kommander (new parser)";
+ KTextEditor::HighlightingInterface *hlIf = dynamic_cast<KTextEditor::HighlightingInterface*>(doc);
+ if (hlIf)
+ {
+ uint hlCount = hlIf->hlModeCount();
+ for (uint i = 0; i < hlCount; i++)
+ {
+ if (hlIf->hlModeSectionName(i) == "Scripts")
+ highlightPopup->insertItem(hlIf->hlModeName(i), i);
+ if (hlIf->hlModeName(i).contains(hlType, false) > 0)
+ {
+ hlIf->setHlMode(i);
+ highlightPopup->setItemChecked(i, true);
+ oldHlMode = i;
+ }
+ }
+ }
+
+}
+
+void AssocTextEditor::textEditChanged()
+{
+ if (m_currentState == "population")
+ m_populationText = associatedTextEdit->text();
+ m_atdict[m_currentState] = associatedTextEdit->text();
+ int index = stateComboBox->currentItem();
+ if (associatedTextEdit->text().isEmpty())
+ stateComboBox->changeItem(QPixmap(), stateComboBox->currentText(), index);
+ else if (!stateComboBox->pixmap(index) || stateComboBox->pixmap(index)->isNull())
+ stateComboBox->changeItem(scriptPixmap, stateComboBox->currentText(), index);
+}
+
+void AssocTextEditor::widgetChanged(int index)
+{
+ save();
+ setWidget( widgetFromString( widgetsComboBox->text(index)) ) ;
+}
+
+void AssocTextEditor::selectWidget()
+{
+ ChooseWidget cDialog(this);
+ cDialog.setWidget(m_formWindow->mainContainer());
+ if (cDialog.exec()) {
+ QString newWidget = cDialog.selection();
+ for (int i = 0; i<widgetsComboBox->count(); i++)
+ if (widgetsComboBox->text(i) == newWidget) {
+ widgetsComboBox->setCurrentItem(i);
+ widgetChanged(i);
+ break;
+ }
+ }
+}
+
+
+
+void AssocTextEditor::insertAssociatedText(const QString& a_text)
+{
+ uint line, col;
+ KTextEditor::ViewCursorInterface *viewCursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>(view);
+ viewCursorIf->cursorPositionReal(&line, &col);
+ associatedTextEdit->insertText(line, col, a_text);
+}
+
+void AssocTextEditor::insertFile()
+{
+ QString fileName = KFileDialog::getOpenFileName();
+
+ if(fileName.isEmpty())
+ return;
+
+ QFile insertFile(fileName);
+ if(!insertFile.open(IO_ReadOnly))
+ {
+ KMessageBox::error( this, i18n("<qt>Cannot open file<br><b>%1</b></qt").arg( fileName ) );
+ return;
+ }
+ QTextStream insertStream(&insertFile);
+ QString insertText = insertStream.read();
+ insertAssociatedText(insertText);
+ insertFile.close();
+}
+
+void AssocTextEditor::insertWidgetName(int index)
+{
+ QString prefix;
+ if (!useInternalParser())
+ prefix = QString(QChar(ESCCHAR));
+ insertAssociatedText(prefix + widgetToString(widgetFromString(widgetComboBox->text(index)), false));
+}
+
+void AssocTextEditor::insertFunction()
+{
+ FunctionsDialog pDialog(this, m_widgetList, useInternalParser(), 0);
+ if (pDialog.exec())
+ insertAssociatedText(pDialog.functionText());
+}
+
+QString AssocTextEditor::widgetToString(QWidget* widget, bool formatted)
+{
+ if (!widget)
+ return QString::null;
+ else if (formatted)
+ return QString("%1 (%2)").arg(widget->name()).arg(widget->className());
+ else
+ return widget->name();
+}
+
+QWidget* AssocTextEditor::widgetFromString(const QString& name)
+{
+ QString realname = name;
+ int i = realname.find(' ');
+ if (i != -1)
+ realname.truncate(i);
+ return m_widgetList[realname];
+}
+
+void AssocTextEditor::slotHighlightingChanged(int mode)
+{
+ highlightPopup->setItemChecked(oldHlMode, false);
+ KTextEditor::HighlightingInterface *hlIf = dynamic_cast<KTextEditor::HighlightingInterface*>(doc);
+ if (hlIf)
+ hlIf->setHlMode(mode);
+ highlightPopup->setItemChecked(mode, true);
+ oldHlMode = mode;
+}
+
+bool AssocTextEditor::useInternalParser()
+{
+ QString s = "";
+ int line = -1;
+ while (s.isEmpty() && line < (int)associatedTextEdit->numLines())
+ {
+ line++;
+ s = associatedTextEdit->textLine(line);
+ }
+ s = s.stripWhiteSpace();
+ if (s.startsWith("#!") && s != "#!kommander")
+ return false; //code is written in external script, old parser is used
+ if (KommanderWidget::useInternalParser || s == "#!kommander")
+ return true;
+ return false;
+}
+
+void AssocTextEditor::closeEvent ( QCloseEvent * e )
+{
+ deleteLater();
+ e->accept();
+}
+
+#include "assoctexteditorimpl.moc"
diff --git a/kommander/editor/assoctexteditorimpl.h b/kommander/editor/assoctexteditorimpl.h
new file mode 100644
index 00000000..65879cef
--- /dev/null
+++ b/kommander/editor/assoctexteditorimpl.h
@@ -0,0 +1,133 @@
+/***************************************************************************
+ assoctexteditorimpl.h - Associated text editor implementation
+ -------------------
+ copyright : (C) 2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+ (C) 2006 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 _HAVE_ASSOCTEXTEDITORIMPL_H_
+#define _HAVE_ASSOCTEXTEDITORIMPL_H_
+
+#include <qdict.h>
+#include <qstringlist.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qobject.h>
+#include <qmap.h>
+#include <qptrvector.h>
+#include <qpixmap.h>
+
+
+#include "assoctexteditor.h"
+#include <kommanderwidget.h>
+
+class FormWindow;
+class PropertyEditor;
+
+namespace KTextEditor {
+ class EditInterface;
+ class Document;
+ class View;
+}
+
+namespace KParts{
+ class PartManager;
+}
+
+class KAction;
+class KPopupMenu;
+
+class AssocTextEditor : public AssocTextEditorBase
+{
+ Q_OBJECT
+public:
+ AssocTextEditor(QWidget*, FormWindow*, PropertyEditor*, KParts::PartManager *partManager, QWidget*, const char* = 0, bool = true);
+ ~AssocTextEditor();
+ // Set interface for given widget.
+ void setWidget(QWidget *);
+ // Save changes for current widget
+ void save() const;
+ // Return population text for current widget
+ QString populationText() const;
+ // Return associated text for current widget
+ QStringList associatedText() const;
+
+public slots:
+ // Current script text has changed - save it in m_atdict
+ void textEditChanged();
+ // Current widget has changed - store script and update interface
+ void widgetChanged(int);
+ // Current script has changed - store script and show new script
+ void stateChanged(int);
+ // Select widget via widget tree dialog
+ void selectWidget();
+
+ // Functions for script editing:
+
+ // Insert given text at cursor position for current widget and state
+ void insertAssociatedText(const QString&);
+ // Select file and insert its content at cursor position
+ void insertFile();
+ // Open function browser and insert chosen function at cursor position
+ void insertFunction();
+ // Insert selected function at cursor position
+ void insertWidgetName(int);
+
+protected:
+ virtual void closeEvent(QCloseEvent * e);
+
+protected slots:
+
+ void slotHighlightingChanged(int mode);
+
+private:
+ bool useInternalParser();
+
+ // Current widget
+ QWidget *m_widget;
+ KommanderWidget* m_kommanderWidget;
+//FIXME: could it be done more cleanly?
+ // Current form and property editor
+ FormWindow* m_formWindow;
+ PropertyEditor* m_propertyEditor;
+ // Current state
+ QString m_currentState;
+ // List of states for current widget
+ QStringList m_states;
+ // Current widget list
+ QDict<QWidget> m_widgetList;
+ // Dictionary for current widget; contains pairs (state, script associated with current state)
+ QMap<QString, QString> m_atdict;
+ // Current population text
+ QString m_populationText;
+ // Non-enmpty script pixmap
+ QPixmap scriptPixmap;
+
+ // Create list of all widgets on the same dialog as current widget
+ // Set store to true, to update m_widgetList;
+ QStringList buildWidgetList();
+ // Convert widget to string displayed in combos
+ // If formatted, return formatted string, else just widget's name
+ QString widgetToString(QWidget* widget, bool formatted = true);
+ // Conver combo string to widget
+ QWidget* widgetFromString(const QString& name);
+
+ KTextEditor::EditInterface *associatedTextEdit;
+ KTextEditor::Document *doc;
+ KTextEditor::View *view;
+ KPopupMenu *highlightPopup;
+ int oldHlMode;
+ bool readOnly;
+ KAction *readOnlyAction;
+};
+
+#endif
diff --git a/kommander/editor/choosewidget.ui b/kommander/editor/choosewidget.ui
new file mode 100644
index 00000000..809f38ea
--- /dev/null
+++ b/kommander/editor/choosewidget.ui
@@ -0,0 +1,150 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ChooseWidgetBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>ChooseWidgetBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>431</width>
+ <height>390</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Choose Widget</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>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </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>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing2_2</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>
+ </hbox>
+ </widget>
+ <widget class="KListView" row="0" column="0">
+ <property name="name">
+ <cstring>widgetView</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" 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>Find:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>nameEdit</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>ChooseWidgetBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>ChooseWidgetBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistview.h</includehint>
+</includehints>
+</UI>
diff --git a/kommander/editor/choosewidgetimpl.cpp b/kommander/editor/choosewidgetimpl.cpp
new file mode 100644
index 00000000..53580a6e
--- /dev/null
+++ b/kommander/editor/choosewidgetimpl.cpp
@@ -0,0 +1,128 @@
+ /***************************************************************************
+ choosewidgetimpl.cpp - dialog to choose widget
+ -------------------
+ begin : Thu 13 Apr 2004
+ copyright : (C) 2000 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. *
+ * *
+ ***************************************************************************/
+
+ /** KDE INCLUDES */
+#include <klistview.h>
+#include <klocale.h>
+
+/** QT INCLUDES */
+#include <qptrstack.h>
+#include <qobject.h>
+#include <qobjectlist.h>
+#include <qlineedit.h>
+#include "qmetaobject.h"
+
+/** OTHER INCLUDES */
+#include "choosewidgetimpl.h"
+#include "choosewidgetimpl.moc"
+
+ChooseWidget::ChooseWidget(QWidget* a_parent, const char* a_name, bool a_modal)
+ : ChooseWidgetBase(a_parent, a_name, a_modal)
+{
+ connect( nameEdit, SIGNAL(textChanged(const QString&)), SLOT(textChanged(const QString&)) );
+ connect( widgetView, SIGNAL(executed(QListViewItem*)), SLOT(selectedItem(QListViewItem*)));
+ widgetView->setFullWidth(true);
+ widgetView->addColumn(i18n("Widgets"));
+ widgetView->setRootIsDecorated(true);
+ nameEdit->setFocus();
+}
+
+ChooseWidget::~ChooseWidget()
+{
+
+}
+
+void ChooseWidget::setWidget(QWidget* w)
+{
+ widgetView->clear();
+ if (!w)
+ return;
+
+ QListViewItem* item;
+ QPtrStack<QWidget> p_widgets;
+ QPtrStack<QListViewItem> p_items;
+
+ item = new QListViewItem(widgetView, QString("%1 (%2)").arg(w->name()).arg(w->className()));
+ item->setOpen(true);
+
+ p_widgets.push(w);
+ p_items.push(item);
+
+ while (!p_widgets.isEmpty()) {
+ w = p_widgets.pop();
+ item = p_items.pop();
+ QObjectList *objectList = w->queryList(0, 0, true, false);
+ for (QObjectListIt it(*objectList); it.current(); ++it) {
+ QListViewItem* newItem = item;
+ if (isKommanderWidget(*it))
+ newItem = new QListViewItem(item, QString("%1 (%2)").arg((*it)->name()).arg((*it)->className()));
+ if ((*it)->children()) {
+ p_widgets.push((QWidget*)(*it));
+ p_items.push(newItem);
+ }
+ }
+ delete objectList;
+ }
+ if (widgetView->childCount()) {
+ widgetView->setCurrentItem(widgetView->firstChild());
+ widgetView->firstChild()->setSelected(true);
+ }
+}
+
+
+QString ChooseWidget::selection()
+{
+ if (widgetView->currentItem())
+ return widgetView->currentItem()->text(0);
+ else
+ return QString::null;
+}
+
+void ChooseWidget::textChanged(const QString& text)
+{
+ QListViewItem* item = widgetView->findItem(text, 0, Qt::BeginsWith);
+ if (item) {
+ widgetView->setCurrentItem(item);
+ widgetView->ensureItemVisible(item);
+ }
+}
+
+bool ChooseWidget::isKommanderWidget(QObject* w)
+{
+ bool pExists = false;
+ QMetaObject *metaObj = w->metaObject();
+ if (metaObj)
+ {
+ int id = metaObj->findProperty("KommanderWidget", true);
+ const QMetaProperty *metaProp = metaObj->property(id, true);
+ if (metaProp && metaProp->isValid())
+ pExists = true;
+ }
+ if (pExists)
+ {
+ QVariant flag = (w)->property("KommanderWidget");
+ if(flag.isValid() && !(QString(w->name()).startsWith("qt_")))
+ return true;
+ }
+ return false;
+}
+
+void ChooseWidget::selectedItem(QListViewItem* item)
+{
+ if (item)
+ accept();
+}
+
diff --git a/kommander/editor/choosewidgetimpl.h b/kommander/editor/choosewidgetimpl.h
new file mode 100644
index 00000000..877bcd07
--- /dev/null
+++ b/kommander/editor/choosewidgetimpl.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ choosewidgetimpl.h - dialog to choose widget
+ -------------------
+ begin : Thu 13 Apr 2004
+ copyright : (C) 2000 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 _HAVE_CHOOSEWIDGETIMPL_H_
+#define _HAVE_CHOOSEWIDGETIMPL_H_
+
+#include "choosewidget.h"
+
+class ChooseWidget : public ChooseWidgetBase
+{
+ Q_OBJECT
+public:
+ ChooseWidget(QWidget*, const char* = 0, bool=true);
+ ~ChooseWidget();
+ // Put current widget and all of its children in a tree
+ void setWidget(QWidget *);
+ // Return current widget
+ QString selection();
+
+public slots:
+ // Filter text changed - find matching widget
+ void textChanged(const QString&);
+ // Double clicked on listviwew
+ void selectedItem(QListViewItem *);
+private:
+ // Check if given widget is a Kommander widget
+ bool isKommanderWidget(QObject* w);
+
+};
+
+#endif
+
diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp
new file mode 100644
index 00000000..b6bbe82c
--- /dev/null
+++ b/kommander/editor/command.cpp
@@ -0,0 +1,1838 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include <scriptobject.h>
+#include "command.h"
+#include "formwindow.h"
+#include "widgetfactory.h"
+#include "propertyeditor.h"
+#include "metadatabase.h"
+#include "widgetdatabase.h"
+#include "mainwindow.h"
+#include "hierarchyview.h"
+#include "workspace.h"
+#include "actioneditorimpl.h"
+#include "actiondnd.h"
+#include "formfile.h"
+
+#include <qmap.h>
+#include <qfeatures.h>
+#include <qwidget.h>
+#include <qmetaobject.h>
+#include <qapplication.h>
+#include <qlayout.h>
+#include <qmessagebox.h>
+#include <qlistbox.h>
+#include <qiconview.h>
+#include <qmultilineedit.h>
+#include <qptrstack.h>
+#include <qheader.h>
+#ifndef QT_NO_TABLE
+#include <qtable.h>
+#endif
+#include <qaction.h>
+
+#include <klocale.h>
+
+
+CommandHistory::CommandHistory( int s )
+ : current( -1 ), steps( s ), savedAt( -1 )
+{
+ history.setAutoDelete( true );
+ modified = false;
+ compressedCommand = 0;
+}
+
+void CommandHistory::addCommand( Command *cmd, bool tryCompress )
+{
+ if ( tryCompress ) {
+ if ( !compressedCommand ||
+ compressedCommand->type() != cmd->type() ||
+ !compressedCommand->canMerge( cmd ) ) {
+ checkCompressedCommand();
+ compressedCommand = 0;
+ }
+
+ if ( compressedCommand ) {
+ compressedCommand->merge( cmd );
+ modified = true;
+ modificationChanged( modified );
+ return;
+ }
+ compressedCommand = cmd;
+ } else {
+ checkCompressedCommand();
+ }
+
+ if ( current < (int)history.count() - 1 ) {
+ if ( current < savedAt )
+ savedAt = -2;
+
+ QPtrList<Command> commands;
+ commands.setAutoDelete( false );
+
+ for( int i = 0; i <= current; ++i ) {
+ commands.insert( i, history.at( 0 ) );
+ history.take( 0 );
+ }
+
+ commands.append( cmd );
+ history.clear();
+ history = commands;
+ history.setAutoDelete( true );
+ } else {
+ history.append( cmd );
+ }
+
+ if ( (int)history.count() > steps ) {
+ savedAt--;
+ history.removeFirst();
+ } else {
+ ++current;
+ }
+
+ emitUndoRedo();
+ modified = true;
+ modificationChanged( modified );
+}
+
+void CommandHistory::undo()
+{
+ checkCompressedCommand();
+ compressedCommand = 0;
+ if ( current > -1 ) {
+ history.at( current )->unexecute();
+ --current;
+ }
+ emitUndoRedo();
+ modified = savedAt != current;
+ modificationChanged( modified );
+}
+
+void CommandHistory::redo()
+{
+ checkCompressedCommand();
+ compressedCommand = 0;
+ if ( current > -1 ) {
+ if ( current < (int)history.count() - 1 ) {
+ ++current;
+ history.at( current )->execute();
+ }
+ } else {
+ if ( history.count() > 0 ) {
+ ++current;
+ history.at( current )->execute();
+ }
+ }
+ emitUndoRedo();
+ modified = savedAt != current;
+ modificationChanged( modified );
+}
+
+void CommandHistory::emitUndoRedo()
+{
+ Command *undoCmd = 0;
+ Command *redoCmd = 0;
+
+ if ( current >= 0 && current < (int)history.count() )
+ undoCmd = history.at( current );
+ if ( current + 1 >= 0 && current + 1 < (int)history.count() )
+ redoCmd = history.at( current + 1 );
+
+ bool ua = (undoCmd != 0);
+ QString uc;
+ if ( ua )
+ uc = undoCmd->name();
+ bool ra = (redoCmd != 0);
+ QString rc;
+ if ( ra )
+ rc = redoCmd->name();
+ emit undoRedoChanged( ua, ra, uc, rc );
+}
+
+void CommandHistory::setModified( bool m )
+{
+ modified = m;
+ if ( !modified )
+ savedAt = current;
+ modificationChanged( modified );
+}
+
+bool CommandHistory::isModified() const
+{
+ return modified;
+}
+
+void CommandHistory::checkCompressedCommand()
+{
+ if ( compressedCommand && compressedCommand->type() == Command::SetProperty ) {
+ Command *c = compressedCommand;
+ compressedCommand = 0;
+ if ( !( (SetPropertyCommand*)c )->checkProperty() ) {
+ history.remove( current );
+ --current;
+ emitUndoRedo();
+ }
+ }
+}
+
+// ------------------------------------------------------------
+
+Command::Command( const QString &n, FormWindow *fw )
+ : cmdName( n ), formWin( fw )
+{
+}
+
+Command::~Command()
+{
+}
+
+QString Command::name() const
+{
+ return cmdName;
+}
+
+FormWindow *Command::formWindow() const
+{
+ return formWin;
+}
+
+void Command::merge( Command * )
+{
+}
+
+bool Command::canMerge( Command * )
+{
+ return false;
+}
+
+
+// ------------------------------------------------------------
+
+ResizeCommand::ResizeCommand( const QString &n, FormWindow *fw,
+ QWidget *w, const QRect &oldr, const QRect &nr )
+ : Command( n, fw ), widget( w ), oldRect( oldr ), newRect( nr )
+{
+}
+
+void ResizeCommand::execute()
+{
+ widget->setGeometry( newRect );
+ formWindow()->updateSelection( widget );
+ formWindow()->emitUpdateProperties( widget );
+ if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
+ formWindow()->updateChildSelections( widget );
+}
+
+void ResizeCommand::unexecute()
+{
+ widget->setGeometry( oldRect );
+ formWindow()->updateSelection( widget );
+ formWindow()->emitUpdateProperties( widget );
+ if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
+ formWindow()->updateChildSelections( widget );
+}
+
+// ------------------------------------------------------------
+
+InsertCommand::InsertCommand( const QString &n, FormWindow *fw,
+ QWidget *w, const QRect &g )
+ : Command( n, fw ), widget( w ), geometry( g )
+{
+}
+
+void InsertCommand::execute()
+{
+ if ( geometry.size() == QSize( 0, 0 ) ) {
+ widget->move( geometry.topLeft() );
+ widget->adjustSize();
+ } else {
+ QSize s = geometry.size().expandedTo( widget->minimumSize() );
+ s = s.expandedTo( widget->minimumSizeHint() );
+ QRect r( geometry.topLeft(), s );
+ widget->setGeometry( r );
+ }
+ widget->show();
+ formWindow()->widgets()->insert( widget, widget );
+ formWindow()->clearSelection( false );
+ formWindow()->selectWidget( widget );
+ formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget );
+}
+
+void InsertCommand::unexecute()
+{
+ widget->hide();
+ formWindow()->selectWidget( widget, false );
+ formWindow()->widgets()->remove( widget );
+ formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget );
+ }
+
+// ------------------------------------------------------------
+
+MoveCommand::MoveCommand( const QString &n, FormWindow *fw,
+ const QWidgetList &w,
+ const QValueList<QPoint> op,
+ const QValueList<QPoint> np,
+ QWidget *opr, QWidget *npr )
+ : Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ),
+ oldParent( opr ), newParent( npr )
+{
+ widgets.setAutoDelete( false );
+}
+
+void MoveCommand::merge( Command *c )
+{
+ MoveCommand *cmd = (MoveCommand*)c;
+ newPos = cmd->newPos;
+}
+
+bool MoveCommand::canMerge( Command *c )
+{
+ MoveCommand *cmd = (MoveCommand*)c;
+ return widgets == cmd->widgets;
+}
+
+
+void MoveCommand::execute()
+{
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) {
+ if ( newParent && oldParent && newParent != oldParent ) {
+ QPoint pos = newParent->mapFromGlobal( w->mapToGlobal( QPoint( 0,0 ) ) );
+ w->reparent( newParent, pos, true );
+ formWindow()->raiseSelection( w );
+ formWindow()->raiseChildSelections( w );
+ formWindow()->widgetChanged( w );
+ formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
+ formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
+ }
+ w->move( newPos[ widgets.at() ] );
+ }
+ formWindow()->updateSelection( w );
+ formWindow()->updateChildSelections( w );
+ formWindow()->emitUpdateProperties( w );
+ }
+}
+
+void MoveCommand::unexecute()
+{
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) {
+ if ( newParent && oldParent && newParent != oldParent ) {
+ QPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( QPoint( 0,0 ) ) );
+ w->reparent( oldParent, pos, true );
+ formWindow()->raiseSelection( w );
+ formWindow()->raiseChildSelections( w );
+ formWindow()->widgetChanged( w );
+ formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
+ formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
+ }
+ w->move( oldPos[ widgets.at() ] );
+ }
+ formWindow()->updateSelection( w );
+ formWindow()->updateChildSelections( w );
+ formWindow()->emitUpdateProperties( w );
+ }
+}
+
+// ------------------------------------------------------------
+
+DeleteCommand::DeleteCommand( const QString &n, FormWindow *fw,
+ const QWidgetList &w )
+ : Command( n, fw ), widgets( w )
+{
+ widgets.setAutoDelete( false );
+}
+
+void DeleteCommand::execute()
+{
+ formWindow()->setPropertyShowingBlocked( true );
+ connections.clear();
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ w->hide();
+ QString s = w->name();
+ s.prepend( "qt_dead_widget_" );
+ w->setName( s );
+ formWindow()->selectWidget( w, false );
+ formWindow()->widgets()->remove( w );
+ QValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
+ connections.insert( w, conns );
+ QValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
+ for ( ; it != conns.end(); ++it ) {
+ MetaDataBase::removeConnection( formWindow(), (*it).sender,
+ (*it).signal, (*it).receiver, (*it).slot );
+ }
+ }
+ formWindow()->setPropertyShowingBlocked( false );
+ formWindow()->emitShowProperties();
+ formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets );
+
+}
+
+void DeleteCommand::unexecute()
+{
+ formWindow()->setPropertyShowingBlocked( true );
+ formWindow()->clearSelection( false );
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ w->show();
+ QString s = w->name();
+ s.remove( 0, QString( "qt_dead_widget_" ).length() );
+ w->setName( s );
+ formWindow()->widgets()->insert( w, w );
+ formWindow()->selectWidget( w );
+ QValueList<MetaDataBase::Connection> conns = *connections.find( w );
+ QValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
+ for ( ; it != conns.end(); ++it ) {
+ MetaDataBase::addConnection( formWindow(), (*it).sender,
+ (*it).signal, (*it).receiver, (*it).slot );
+ }
+ }
+ formWindow()->setPropertyShowingBlocked( false );
+ formWindow()->emitShowProperties();
+ formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets );
+}
+
+// ------------------------------------------------------------
+
+SetPropertyCommand::SetPropertyCommand( const QString &n, FormWindow *fw,
+ QObject *w, PropertyEditor *e,
+ const QString &pn, const QVariant &ov,
+ const QVariant &nv, const QString &ncut,
+ const QString &ocut, bool reset )
+ : Command( n, fw ), widget( w ), editor( e ), propName( pn ),
+ oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ),
+ wasChanged( true ), isResetCommand( reset )
+{
+ wasChanged = MetaDataBase::isPropertyChanged( w, propName );
+}
+
+
+void SetPropertyCommand::execute()
+{
+ if ( !wasChanged )
+ MetaDataBase::setPropertyChanged( widget, propName, true );
+ if ( isResetCommand ) {
+ MetaDataBase::setPropertyChanged( widget, propName, false );
+ if ( WidgetFactory::resetProperty( widget, propName ) ) {
+ if ( !formWindow()->isWidgetSelected( widget ) && widget != formWindow() )
+ formWindow()->selectWidget( widget );
+ if ( editor->widget() != widget )
+ editor->setWidget( widget, formWindow() );
+ editor->propertyList()->setCurrentProperty( propName );
+ PropertyItem *i = (PropertyItem*)editor->propertyList()->currentItem();
+ if ( !i )
+ return;
+ i->setValue( widget->property( propName ) );
+ i->setChanged( false );
+ editor->refetchData();
+ editor->emitWidgetChanged();
+ return;
+ }
+ }
+ setProperty( newValue, newCurrentItemText );
+}
+
+void SetPropertyCommand::unexecute()
+{
+ if ( !wasChanged )
+ MetaDataBase::setPropertyChanged( widget, propName, false );
+ if ( isResetCommand )
+ MetaDataBase::setPropertyChanged( widget, propName, true );
+ setProperty( oldValue, oldCurrentItemText );
+}
+
+bool SetPropertyCommand::canMerge( Command *c )
+{
+ SetPropertyCommand *cmd = (SetPropertyCommand*)c;
+ const QMetaProperty *p =
+ widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
+ if ( !p ) {
+ if ( propName == "toolTip" || propName == "whatsThis" )
+ return true;
+ if ( widget->inherits( "CustomWidget" ) ) {
+ MetaDataBase::CustomWidget *cw = ( (CustomWidget*)widget )->customWidget();
+ if ( !cw )
+ return false;
+ for ( QValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
+ if ( QString( (*it ).property ) == propName ) {
+ if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" )
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ QVariant::Type t = QVariant::nameToType( p->type() );
+ return ( cmd->propName == propName &&
+ t == QVariant::String || t == QVariant::CString || t == QVariant::Int || t == QVariant::UInt );
+}
+
+void SetPropertyCommand::merge( Command *c )
+{
+ SetPropertyCommand *cmd = (SetPropertyCommand*)c;
+ newValue = cmd->newValue;
+ newCurrentItemText = cmd->newCurrentItemText;
+}
+
+bool SetPropertyCommand::checkProperty()
+{
+ if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that
+ QString s = newValue.toString();
+ if ( !formWindow()->unify( widget, s, false ) ) {
+ QMessageBox::information( formWindow()->mainWindow(),
+ i18n("Set 'name' Property" ),
+ i18n("The name of a widget must be unique.\n"
+ "'%1' is already used in form '%2',\n"
+ "so the name has been reverted to '%3'." ).
+ arg( newValue.toString() ).
+ arg( formWindow()->name() ).
+ arg( oldValue.toString() ));
+ setProperty( oldValue, oldCurrentItemText, false );
+ return false;
+ }
+ if ( s.isEmpty() ) {
+ QMessageBox::information( formWindow()->mainWindow(),
+ i18n("Set 'name' Property" ),
+ i18n("The name of a widget must not be null.\n"
+ "The name has been reverted to '%1'." ).
+ arg( oldValue.toString() ));
+ setProperty( oldValue, oldCurrentItemText, false );
+ return false;
+ }
+
+ if ( widget->parent() && widget->parent()->inherits( "FormWindow" ) )
+ formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (QWidget*)widget )->parentWidget() );
+ }
+ return true;
+}
+
+void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentItemText, bool select )
+{
+ if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select )
+ formWindow()->selectWidget( widget );
+ if ( editor->widget() != widget && select )
+ editor->setWidget( widget, formWindow() );
+ if ( select )
+ editor->propertyList()->setCurrentProperty( propName );
+
+ const QMetaProperty *p =
+ widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
+ if ( !p ) {
+ if ( propName == "hAlign" ) {
+ p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true );
+ int align = widget->property( "alignment" ).toInt();
+ align &= ~( AlignHorizontal_Mask );
+ align |= p->keyToValue( currentItemText );
+ widget->setProperty( "alignment", QVariant( align ) );
+ } else if ( propName == "vAlign" ) {
+ p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true );
+ int align = widget->property( "alignment" ).toInt();
+ align &= ~( AlignVertical_Mask );
+ align |= p->keyToValue( currentItemText );
+ widget->setProperty( "alignment", QVariant( align ) );
+ } else if ( propName == "wordwrap" ) {
+ int align = widget->property( "alignment" ).toInt();
+ align &= ~WordBreak;
+ if ( v.toBool() )
+ align |= WordBreak;
+ widget->setProperty( "alignment", QVariant( align ) );
+ } else if ( propName == "layoutSpacing" ) {
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), v.toInt() );
+ } else if ( propName == "layoutMargin" ) {
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), v.toInt() );
+ } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
+ MetaDataBase::setFakeProperty( editor->widget(), propName, v );
+ } else if ( editor->widget()->inherits( "CustomWidget" ) ) {
+ MetaDataBase::CustomWidget *cw = ( (CustomWidget*)widget )->customWidget();
+ if ( cw ) {
+ MetaDataBase::setFakeProperty( editor->widget(), propName, v );
+ }
+ }
+ editor->refetchData();
+ editor->emitWidgetChanged();
+ ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) );
+#ifndef QT_NO_SQL
+ if ( propName == "database" )
+ formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (QWidget*)widget, MetaDataBase::fakeProperty( widget, "database" ).toStringList() );
+#endif
+ return;
+ }
+
+ if ( p->isSetType() ) {
+ ;
+ } else if ( p->isEnumType() ) {
+ widget->setProperty( propName, p->keyToValue( currentItemText ) );
+ } else {
+ QVariant ov;
+ if ( propName == "name" || propName == "itemName" )
+ ov = widget->property( propName );
+ int oldSerNum = -1;
+ if ( v.type() == QVariant::Pixmap )
+ oldSerNum = v.toPixmap().serialNumber();
+ widget->setProperty( propName, v );
+ if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() )
+ MetaDataBase::setPixmapKey( formWindow(),
+ widget->property( propName ).toPixmap().serialNumber(),
+ MetaDataBase::pixmapKey( formWindow(), oldSerNum ) );
+ if ( propName == "cursor" )
+ MetaDataBase::setCursor( (QWidget*)widget, v.toCursor() );
+ if ( propName == "name" && widget->isWidgetType() ) {
+ formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( (QWidget*)widget, ov );
+ if ( formWindow()->isMainContainer( widget ) )
+ formWindow()->setName( v.toCString() );
+ }
+ if ( propName == "name" && widget->inherits( "QAction" ) &&
+ formWindow()->mainContainer() &&
+ formWindow()->mainContainer()->inherits( "QMainWindow" ) ) {
+ formWindow()->mainWindow()->actioneditor()->updateActionName( (QAction*)widget );
+ }
+ if ( propName == "iconSet" && widget->inherits( "QAction" ) &&
+ formWindow()->mainContainer() &&
+ formWindow()->mainContainer()->inherits( "QMainWindow" ) ) {
+ formWindow()->mainWindow()->actioneditor()->updateActionIcon( (QAction*)widget );
+ }
+ if ( propName == "caption" ) {
+ if ( formWindow()->isMainContainer( widget ) )
+ formWindow()->setCaption( v.toString() );
+ }
+ if ( propName == "icon" ) {
+ if ( formWindow()->isMainContainer( widget ) )
+ formWindow()->setIcon( v.toPixmap() );
+ }
+ }
+ editor->refetchData();
+ if ( editor->propertyList()->currentItem() && select ) {
+ ( ( PropertyItem* )editor->propertyList()->currentItem() )->showEditor();
+ ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) );
+ }
+ editor->emitWidgetChanged();
+ formWindow()->killAccels( widget );
+}
+
+// ------------------------------------------------------------
+
+LayoutHorizontalCommand::LayoutHorizontalCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase )
+{
+}
+
+void LayoutHorizontalCommand::execute()
+{
+ formWindow()->clearSelection( false );
+ layout.doLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+void LayoutHorizontalCommand::unexecute()
+{
+ formWindow()->clearSelection( false );
+ layout.undoLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+// ------------------------------------------------------------
+
+LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true )
+{
+}
+
+void LayoutHorizontalSplitCommand::execute()
+{
+ formWindow()->clearSelection( false );
+ layout.doLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+void LayoutHorizontalSplitCommand::unexecute()
+{
+ formWindow()->clearSelection( false );
+ layout.undoLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+// ------------------------------------------------------------
+
+LayoutVerticalCommand::LayoutVerticalCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase )
+{
+}
+
+void LayoutVerticalCommand::execute()
+{
+ formWindow()->clearSelection( false );
+ layout.doLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+void LayoutVerticalCommand::unexecute()
+{
+ formWindow()->clearSelection( false );
+ layout.undoLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+// ------------------------------------------------------------
+
+LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true )
+{
+}
+
+void LayoutVerticalSplitCommand::execute()
+{
+ formWindow()->clearSelection( false );
+ layout.doLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+void LayoutVerticalSplitCommand::unexecute()
+{
+ formWindow()->clearSelection( false );
+ layout.undoLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+// ------------------------------------------------------------
+
+LayoutGridCommand::LayoutGridCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl, int xres, int yres )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase, QSize( QMAX(5,xres), QMAX(5,yres) ) )
+{
+}
+
+void LayoutGridCommand::execute()
+{
+ formWindow()->clearSelection( false );
+ layout.doLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+void LayoutGridCommand::unexecute()
+{
+ formWindow()->clearSelection( false );
+ layout.undoLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+}
+
+// ------------------------------------------------------------
+
+BreakLayoutCommand::BreakLayoutCommand( const QString &n, FormWindow *fw,
+ QWidget *layoutBase, const QWidgetList &wl )
+ : Command( n, fw ), lb( layoutBase ), widgets( wl )
+{
+ WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase );
+ spacing = MetaDataBase::spacing( layoutBase );
+ margin = MetaDataBase::margin( layoutBase );
+ layout = 0;
+ if ( lay == WidgetFactory::HBox )
+ layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "QSplitter" ) );
+ else if ( lay == WidgetFactory::VBox )
+ layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "QSplitter" ) );
+ else if ( lay == WidgetFactory::Grid )
+ layout = new GridLayout( wl, layoutBase, fw, layoutBase, QSize( QMAX( 5, fw->grid().x()), QMAX( 5, fw->grid().y()) ), false );
+}
+
+void BreakLayoutCommand::execute()
+{
+ if ( !layout )
+ return;
+ formWindow()->clearSelection( false );
+ layout->breakLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() )
+ w->resize( QMAX( 16, w->width() ), QMAX( 16, w->height() ) );
+}
+
+void BreakLayoutCommand::unexecute()
+{
+ if ( !layout )
+ return;
+ formWindow()->clearSelection( false );
+ layout->doLayout();
+ formWindow()->mainWindow()->objectHierarchy()->rebuild();
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( lb ), margin );
+}
+
+// ------------------------------------------------------------
+
+MacroCommand::MacroCommand( const QString &n, FormWindow *fw,
+ const QPtrList<Command> &cmds )
+ : Command( n, fw ), commands( cmds )
+{
+}
+
+void MacroCommand::execute()
+{
+ for ( Command *c = commands.first(); c; c = commands.next() )
+ c->execute();
+}
+
+void MacroCommand::unexecute()
+{
+ for ( Command *c = commands.last(); c; c = commands.prev() )
+ c->unexecute();
+}
+
+// ------------------------------------------------------------
+
+AddTabPageCommand::AddTabPageCommand( const QString &n, FormWindow *fw,
+ QTabWidget *tw, const QString &label )
+ : Command( n, fw ), tabWidget( tw ), tabLabel( label )
+{
+ tabPage = new QDesignerWidget( formWindow(), tabWidget, "tab" );
+ tabPage->hide();
+ index = -1;
+ MetaDataBase::addEntry( tabPage );
+}
+
+void AddTabPageCommand::execute()
+{
+ if ( index == -1 )
+ index = ( (QDesignerTabWidget*)tabWidget )->count();
+ tabWidget->insertTab( tabPage, tabLabel, index );
+ tabWidget->showPage( tabPage );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
+}
+
+void AddTabPageCommand::unexecute()
+{
+ tabWidget->removePage( tabPage );
+ tabPage->hide();
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
+}
+
+// ------------------------------------------------------------
+// ------------------------------------------------------------
+
+AddToolBoxPageCommand::AddToolBoxPageCommand( const QString &n, FormWindow *fw,
+ QToolBox *tw, const QString &_label )
+ : Command( n, fw ), toolBox( tw ), label( _label )
+{
+ page = new QDesignerWidget( formWindow(), toolBox, "tab" );
+ page->hide();
+ index = -1;
+ MetaDataBase::addEntry( page );
+}
+
+void AddToolBoxPageCommand::execute()
+{
+ if ( index == -1 )
+ index = ( (EditorToolBox*)toolBox)->count();
+ toolBox->insertItem(index, page, label);
+ toolBox->setCurrentItem( page );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
+}
+
+void AddToolBoxPageCommand::unexecute()
+{
+ toolBox->removeItem( page );
+ page->hide();
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
+}
+
+// ------------------------------------------------------------
+
+MoveTabPageCommand::MoveTabPageCommand( const QString &n, FormWindow *fw,
+ QTabWidget *tw, QWidget* page, const QString& label, int nIndex, int oIndex )
+ : Command( n, fw ), tabWidget( tw ), tabPage( page ), tabLabel( label )
+{
+ newIndex = nIndex;
+ oldIndex = oIndex;
+}
+
+void MoveTabPageCommand::execute()
+{
+ ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
+ ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
+ ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
+}
+
+void MoveTabPageCommand::unexecute()
+{
+ ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
+ ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
+ ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
+}
+
+// ------------------------------------------------------------
+
+DeleteTabPageCommand::DeleteTabPageCommand( const QString &n, FormWindow *fw,
+ QTabWidget *tw, QWidget *page )
+ : Command( n, fw ), tabWidget( tw ), tabPage( page )
+{
+ tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle();
+ index = ( (QDesignerTabWidget*)tabWidget )->currentPage();
+}
+
+void DeleteTabPageCommand::execute()
+{
+ tabWidget->removePage( tabPage );
+ tabPage->hide();
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
+}
+
+void DeleteTabPageCommand::unexecute()
+{
+ tabWidget->insertTab( tabPage, tabLabel, index );
+ tabWidget->showPage( tabPage );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
+}
+
+// ------------------------------------------------------------
+
+DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const QString &n, FormWindow *fw,
+ QToolBox *tw, QWidget *_page )
+ : Command( n, fw ), toolBox( tw ), page( _page )
+{
+ label = ( (EditorToolBox*)toolBox )->pageTitle();
+ index = ( (EditorToolBox*)toolBox )->currentPage();
+}
+
+void DeleteToolBoxPageCommand::execute()
+{
+ toolBox->removeItem( page );
+ page->hide();
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
+}
+
+void DeleteToolBoxPageCommand::unexecute()
+{
+ toolBox->insertItem(index, page, label);
+ toolBox->setCurrentItem( page );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
+}
+
+// ------------------------------------------------------------
+
+AddWizardPageCommand::AddWizardPageCommand( const QString &n, FormWindow *fw,
+ QWizard *w, const QString &label, int i, bool s )
+ : Command( n, fw ), wizard( w ), pageLabel( label )
+{
+ page = new QDesignerWidget( formWindow(), wizard, "page" );
+ page->hide();
+ index = i;
+ show = s;
+ MetaDataBase::addEntry( page );
+}
+
+void AddWizardPageCommand::execute()
+{
+ if ( index == -1 )
+ index = wizard->pageCount();
+ wizard->insertPage( page, pageLabel, index );
+ if ( show )
+ ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
+}
+
+void AddWizardPageCommand::unexecute()
+{
+ wizard->removePage( page );
+ page->hide();
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
+}
+
+// ------------------------------------------------------------
+
+DeleteWizardPageCommand::DeleteWizardPageCommand( const QString &n, FormWindow *fw,
+ QWizard *w, int i, bool s )
+ : Command( n, fw ), wizard( w ), index( i )
+{
+ show = s;
+}
+
+void DeleteWizardPageCommand::execute()
+{
+ page = wizard->page( index );
+ pageLabel = wizard->title( page );
+ wizard->removePage( page );
+ page->hide();
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
+}
+
+void DeleteWizardPageCommand::unexecute()
+{
+ wizard->insertPage( page, pageLabel, index );
+ if ( show )
+ ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
+}
+
+// ------------------------------------------------------------
+
+RenameWizardPageCommand::RenameWizardPageCommand( const QString &n, FormWindow *fw,
+ QWizard *w, int i, const QString& name )
+ : Command( n, fw ), wizard( w ), index( i ), label( name )
+{
+
+}
+
+void RenameWizardPageCommand::execute()
+{
+ page = wizard->page( index );
+ QString oldLabel = wizard->title( page );
+
+ wizard->setTitle( page, label );
+ label = oldLabel;
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+}
+
+void RenameWizardPageCommand::unexecute()
+{
+ execute();
+}
+
+// ------------------------------------------------------------
+
+SwapWizardPagesCommand::SwapWizardPagesCommand( const QString &n, FormWindow *fw, QWizard *w, int i1, int i2 )
+ : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 )
+{
+}
+
+void SwapWizardPagesCommand::execute()
+{
+ QWidget *page1 = wizard->page( index1 );
+ QWidget *page2 = wizard->page( index2 );
+ QString page1Label = wizard->title( page1 );
+ QString page2Label = wizard->title( page2 );
+ wizard->removePage( page1 );
+ wizard->removePage( page2 );
+ wizard->insertPage( page1, page1Label, index2 );
+ wizard->insertPage( page2, page2Label, index1 );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
+}
+
+void SwapWizardPagesCommand::unexecute()
+{
+ execute();
+}
+
+// ------------------------------------------------------------
+
+AddConnectionCommand::AddConnectionCommand( const QString &name, FormWindow *fw,
+ MetaDataBase::Connection c )
+ : Command( name, fw ), connection( c )
+{
+}
+
+void AddConnectionCommand::execute()
+{
+ MetaDataBase::addConnection( formWindow(), connection.sender,
+ connection.signal, connection.receiver, connection.slot );
+#ifndef KOMMANDER
+ if ( connection.receiver == formWindow()->mainContainer() )
+ {
+ // qDebug("AddConnectionCommand::execute(): Would have called EventList::setup()");
+ formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
+ }
+#endif
+}
+
+void AddConnectionCommand::unexecute()
+{
+ MetaDataBase::removeConnection( formWindow(), connection.sender,
+ connection.signal, connection.receiver, connection.slot );
+#ifndef KOMMANDER
+ if ( connection.receiver == formWindow()->mainContainer() )
+ {
+ // qDebug("AddConnectionCommand::unexecute(): Would have called EventList::setup()");
+ formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
+ }
+#endif
+}
+
+// ------------------------------------------------------------
+
+RemoveConnectionCommand::RemoveConnectionCommand( const QString &name, FormWindow *fw,
+ MetaDataBase::Connection c )
+ : Command( name, fw ), connection( c )
+{
+}
+
+void RemoveConnectionCommand::execute()
+{
+ MetaDataBase::removeConnection( formWindow(), connection.sender,
+ connection.signal, connection.receiver, connection.slot );
+#ifndef KOMMANDER
+ if ( connection.receiver == formWindow()->mainContainer() )
+ {
+ // qDebug("RemoveConnectionCommand::execute(): Would have called EventList::setup()");
+ formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
+ }
+#endif
+}
+
+void RemoveConnectionCommand::unexecute()
+{
+ MetaDataBase::addConnection( formWindow(), connection.sender,
+ connection.signal, connection.receiver, connection.slot );
+#ifndef KOMMANDER
+ if ( connection.receiver == formWindow()->mainContainer() )
+ {
+ // qDebug("RemoveConnectionCommand::unexecute(): Would have called EventList::setup()");
+ formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
+ }
+#endif
+}
+
+// ------------------------------------------------------------
+
+/* TODO : We don't need these commands. */
+AddSlotCommand::AddSlotCommand( const QString &name, FormWindow *fw, const QCString &s,
+ const QString& spec, const QString &a, const QString &l, const QString &rt )
+ : Command( name, fw ), slot( s ), specifier( spec ), access( a ), language( l ), returnType( rt )
+{
+ // qDebug("AddSlotCommand::AddSlotCommand()");
+}
+
+void AddSlotCommand::execute()
+{
+ MetaDataBase::addSlot( formWindow(), slot, specifier, access, language, returnType );
+#ifndef KOMMANDER
+ formWindow()->mainWindow()->slotsChanged();
+#endif
+ if ( formWindow()->formFile() )
+ formWindow()->formFile()->setModified( true );
+}
+
+void AddSlotCommand::unexecute()
+{
+ MetaDataBase::removeSlot( formWindow(), slot, specifier, access, language, returnType );
+#ifndef KOMMANDER
+ formWindow()->mainWindow()->slotsChanged();
+#endif
+ if ( formWindow()->formFile() )
+ formWindow()->formFile()->setModified( true );
+}
+
+// ------------------------------------------------------------
+
+RemoveSlotCommand::RemoveSlotCommand( const QString &name, FormWindow *fw, const QCString &s,
+ const QString& spec, const QString &a, const QString &l, const QString &rt )
+ : Command( name, fw ), slot( s ), specifier( spec ), access( a ), language( l ), returnType( rt )
+{
+ // qDebug("RemoveSlotCommand::RemoveSlotCommand()");
+}
+
+void RemoveSlotCommand::execute()
+{
+ MetaDataBase::removeSlot( formWindow(), slot, specifier, access, language, returnType );
+#ifndef KOMMANDER
+ formWindow()->mainWindow()->slotsChanged();
+#endif
+ if ( formWindow()->formFile() )
+ formWindow()->formFile()->setModified( true );
+}
+
+void RemoveSlotCommand::unexecute()
+{
+ MetaDataBase::addSlot( formWindow(), slot, specifier, access, language, returnType );
+#ifndef KOMMANDER
+ formWindow()->mainWindow()->slotsChanged();
+#endif
+ if ( formWindow()->formFile() )
+ formWindow()->formFile()->setModified( true );
+}
+
+// ------------------------------------------------------------
+
+LowerCommand::LowerCommand( const QString &name, FormWindow *fw, const QWidgetList &w )
+ : Command( name, fw ), widgets( w )
+{
+}
+
+void LowerCommand::execute()
+{
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ w->lower();
+ formWindow()->raiseSelection( w );
+ }
+
+}
+
+void LowerCommand::unexecute()
+{
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ w->raise();
+ formWindow()->raiseSelection( w );
+ }
+}
+
+// ------------------------------------------------------------
+
+RaiseCommand::RaiseCommand( const QString &name, FormWindow *fw, const QWidgetList &w )
+ : Command( name, fw ), widgets( w )
+{
+}
+
+void RaiseCommand::execute()
+{
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ w->raise();
+ formWindow()->raiseSelection( w );
+ }
+
+}
+
+void RaiseCommand::unexecute()
+{
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ w->lower();
+ formWindow()->raiseSelection( w );
+ }
+}
+
+// ------------------------------------------------------------
+
+PasteCommand::PasteCommand( const QString &n, FormWindow *fw,
+ const QWidgetList &w )
+ : Command( n, fw ), widgets( w )
+{
+}
+
+void PasteCommand::execute()
+{
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ w->show();
+ formWindow()->selectWidget( w );
+ formWindow()->widgets()->insert( w, w );
+ formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
+ }
+}
+
+void PasteCommand::unexecute()
+{
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ w->hide();
+ formWindow()->selectWidget( w, false );
+ formWindow()->widgets()->remove( w );
+ formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
+ }
+ }
+
+// ------------------------------------------------------------
+
+TabOrderCommand::TabOrderCommand( const QString &n, FormWindow *fw,
+ const QWidgetList &ol, const QWidgetList &nl )
+ : Command( n, fw ), oldOrder( ol ), newOrder( nl )
+{
+}
+
+void TabOrderCommand::merge( Command *c )
+{
+ TabOrderCommand *cmd = (TabOrderCommand*)c;
+ newOrder = cmd->newOrder;
+}
+
+bool TabOrderCommand::canMerge( Command * )
+{
+ return true;
+}
+
+void TabOrderCommand::execute()
+{
+ MetaDataBase::setTabOrder( formWindow(), newOrder );
+}
+
+void TabOrderCommand::unexecute()
+{
+ MetaDataBase::setTabOrder( formWindow(), oldOrder );
+}
+
+// ------------------------------------------------------------
+
+PopulateListBoxCommand::PopulateListBoxCommand( const QString &n, FormWindow *fw,
+ QListBox *lb, const QValueList<Item> &items )
+ : Command( n, fw ), newItems( items ), listbox( lb )
+{
+ QListBoxItem *i = 0;
+ for ( i = listbox->firstItem(); i; i = i->next() ) {
+ Item item;
+ if ( i->pixmap() )
+ item.pix = *i->pixmap();
+ item.text = i->text();
+ oldItems.append( item );
+ }
+}
+
+void PopulateListBoxCommand::execute()
+{
+ listbox->clear();
+ for ( QValueList<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
+ Item i = *it;
+ if ( !i.pix.isNull() )
+ (void)new QListBoxPixmap( listbox, i.pix, i.text );
+ else
+ (void)new QListBoxText( listbox, i.text );
+ }
+ formWindow()->mainWindow()->propertyeditor()->refetchData();
+}
+
+void PopulateListBoxCommand::unexecute()
+{
+ listbox->clear();
+ for ( QValueList<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
+ Item i = *it;
+ if ( !i.pix.isNull() )
+ (void)new QListBoxPixmap( listbox, i.pix, i.text );
+ else
+ (void)new QListBoxText( listbox, i.text );
+ }
+ formWindow()->mainWindow()->propertyeditor()->refetchData();
+}
+
+// ------------------------------------------------------------
+
+PopulateIconViewCommand::PopulateIconViewCommand( const QString &n, FormWindow *fw,
+ QIconView *iv, const QValueList<Item> &items )
+ : Command( n, fw ), newItems( items ), iconview( iv )
+{
+#ifndef QT_NO_ICONVIEW
+ QIconViewItem *i = 0;
+ for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
+ Item item;
+ if ( i->pixmap() )
+ item.pix = *i->pixmap();
+ item.text = i->text();
+ oldItems.append( item );
+ }
+#endif
+}
+
+void PopulateIconViewCommand::execute()
+{
+#ifndef QT_NO_ICONVIEW
+ iconview->clear();
+ for ( QValueList<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
+ Item i = *it;
+ (void)new QIconViewItem( iconview, i.text, i.pix );
+ }
+#endif
+}
+
+void PopulateIconViewCommand::unexecute()
+{
+#ifndef QT_NO_ICONVIEW
+ iconview->clear();
+ for ( QValueList<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
+ Item i = *it;
+ (void)new QIconViewItem( iconview, i.text, i.pix );
+ }
+#endif
+}
+
+// ------------------------------------------------------------
+
+PopulateListViewCommand::PopulateListViewCommand( const QString &n, FormWindow *fw,
+ QListView *lv, QListView *from )
+ : Command( n, fw ), listview( lv )
+{
+ newItems = new QListView();
+ newItems->hide();
+ transferItems( from, newItems );
+ oldItems = new QListView();
+ oldItems->hide();
+ transferItems( listview, oldItems );
+}
+
+void PopulateListViewCommand::execute()
+{
+ listview->clear();
+ transferItems( newItems, listview );
+}
+
+void PopulateListViewCommand::unexecute()
+{
+ listview->clear();
+ transferItems( oldItems, listview );
+}
+
+void PopulateListViewCommand::transferItems( QListView *from, QListView *to )
+{
+ QHeader *header = to->header();
+ while ( header->count() )
+ to->removeColumn( 0 );
+ QHeader *h2 = from->header();
+ for ( int i = 0; i < h2->count(); ++i ) {
+ to->addColumn( h2->label( i ) );
+ if ( h2->iconSet( i ) && !h2->iconSet( i )->pixmap().isNull() )
+ header->setLabel( i, *h2->iconSet( i ), h2->label( i ) );
+ header->setResizeEnabled( h2->isResizeEnabled( i ), i );
+ header->setClickEnabled( h2->isClickEnabled( i ), i );
+ }
+
+ QListViewItemIterator it( from );
+ QPtrStack<QListViewItem> fromParents, toParents;
+ fromParents.push( 0 );
+ toParents.push( 0 );
+ QPtrStack<QListViewItem> toLasts;
+ QListViewItem *fromLast = 0;
+ toLasts.push( 0 );
+ int cols = from->columns();
+ to->setSorting( -1 );
+ from->setSorting( -1 );
+ for ( ; it.current(); ++it ) {
+ QListViewItem *i = it.current();
+ if ( i->parent() == fromParents.top() ) {
+ QListViewItem *pi = toParents.top();
+ QListViewItem *ni = 0;
+ if ( pi )
+ ni = new QListViewItem( pi, toLasts.top() );
+ else
+ ni = new QListViewItem( to, toLasts.top() );
+ for ( int c = 0; c < cols; ++c ) {
+ ni->setText( c, i->text( c ) );
+ if ( i->pixmap( c ) )
+ ni->setPixmap( c, *i->pixmap( c ) );
+ }
+ toLasts.pop();
+ toLasts.push( ni );
+ if ( pi )
+ pi->setOpen( true );
+ } else {
+ if ( i->parent() == fromLast ) {
+ fromParents.push( fromLast );
+ toParents.push( toLasts.top() );
+ toLasts.push( 0 );
+ QListViewItem *pi = toParents.top();
+ QListViewItem *ni = 0;
+ if ( pi )
+ ni = new QListViewItem( pi );
+ else
+ ni = new QListViewItem( to );
+ for ( int c = 0; c < cols; ++c ) {
+ ni->setText( c, i->text( c ) );
+ if ( i->pixmap( c ) )
+ ni->setPixmap( c, *i->pixmap( c ) );
+ }
+ toLasts.pop();
+ toLasts.push( ni );
+ if ( pi )
+ pi->setOpen( true );
+ } else {
+ while ( fromParents.top() != i->parent() ) {
+ fromParents.pop();
+ toParents.pop();
+ toLasts.pop();
+ }
+
+ QListViewItem *pi = toParents.top();
+ QListViewItem *ni = 0;
+ if ( pi )
+ ni = new QListViewItem( pi, toLasts.top() );
+ else
+ ni = new QListViewItem( to, toLasts.top() );
+ for ( int c = 0; c < cols; ++c ) {
+ ni->setText( c, i->text( c ) );
+ if ( i->pixmap( c ) )
+ ni->setPixmap( c, *i->pixmap( c ) );
+ }
+ if ( pi )
+ pi->setOpen( true );
+ toLasts.pop();
+ toLasts.push( ni );
+ }
+ }
+ fromLast = i;
+ }
+}
+
+
+
+// ------------------------------------------------------------
+
+PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const QString &n, FormWindow *fw,
+ QMultiLineEdit *mle, const QString &txt )
+ : Command( n, fw ), newText( txt ), mlined( mle )
+{
+ oldText = mlined->text();
+ wasChanged = MetaDataBase::isPropertyChanged( mlined, "text" );
+}
+
+void PopulateMultiLineEditCommand::execute()
+{
+ mlined->setText( newText );
+ MetaDataBase::setPropertyChanged( mlined, "text", true );
+ formWindow()->emitUpdateProperties( mlined );
+}
+
+void PopulateMultiLineEditCommand::unexecute()
+{
+ mlined->setText( oldText );
+ MetaDataBase::setPropertyChanged( mlined, "text", wasChanged );
+ formWindow()->emitUpdateProperties( mlined );
+}
+
+// ------------------------------------------------------------
+
+PopulateTableCommand::PopulateTableCommand( const QString &n, FormWindow *fw, QTable *t,
+ const QValueList<Row> &rows,
+ const QValueList<Column> &columns )
+ : Command( n, fw ), newRows( rows ), newColumns( columns ), table( t )
+{
+#ifndef QT_NO_TABLE
+ int i = 0;
+ QMap<QString, QString> columnFields = MetaDataBase::columnFields( table );
+ for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
+ PopulateTableCommand::Column col;
+ col.text = table->horizontalHeader()->label( i );
+ if ( table->horizontalHeader()->iconSet( i ) )
+ col.pix = table->horizontalHeader()->iconSet( i )->pixmap();
+ col.field = *columnFields.find( col.text );
+ oldColumns.append( col );
+ }
+ for ( i = 0; i < table->verticalHeader()->count(); ++i ) {
+ PopulateTableCommand::Row row;
+ row.text = table->verticalHeader()->label( i );
+ if ( table->verticalHeader()->iconSet( i ) )
+ row.pix = table->verticalHeader()->iconSet( i )->pixmap();
+ oldRows.append( row );
+ }
+#endif
+}
+
+void PopulateTableCommand::execute()
+{
+#ifndef QT_NO_TABLE
+ QMap<QString, QString> columnFields;
+ table->setNumCols( newColumns.count() );
+ int i = 0;
+ for ( QValueList<Column>::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) {
+ table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text );
+ if ( !(*cit).field.isEmpty() )
+ columnFields.insert( (*cit).text, (*cit).field );
+ }
+ MetaDataBase::setColumnFields( table, columnFields );
+ table->setNumRows( newRows.count() );
+ i = 0;
+ for ( QValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i )
+ table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text );
+#endif
+}
+
+void PopulateTableCommand::unexecute()
+{
+#ifndef QT_NO_TABLE
+ QMap<QString, QString> columnFields;
+ table->setNumCols( oldColumns.count() );
+ int i = 0;
+ for ( QValueList<Column>::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) {
+ table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text );
+ if ( !(*cit).field.isEmpty() )
+ columnFields.insert( (*cit).text, (*cit).field );
+ }
+ MetaDataBase::setColumnFields( table, columnFields );
+ table->setNumRows( oldRows.count() );
+ i = 0;
+ for ( QValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
+ table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text );
+#endif
+}
+
+// ------------------------------------------------------------
+
+AddActionToToolBarCommand::AddActionToToolBarCommand( const QString &n, FormWindow *fw,
+ QAction *a, QDesignerToolBar *tb, int idx )
+ : Command( n, fw ), action( a ), toolBar( tb ), index( idx )
+{
+}
+
+void AddActionToToolBarCommand::execute()
+{
+ action->addTo( toolBar );
+
+ if ( action->inherits( "QDesignerAction" ) ) {
+ QString s = ( (QDesignerAction*)action )->widget()->name();
+ if ( s.startsWith( "qt_dead_widget_" ) ) {
+ s.remove( 0, QString( "qt_dead_widget_" ).length() );
+ ( (QDesignerAction*)action )->widget()->setName( s );
+ }
+ }
+
+ if ( action->inherits( "QDesignerAction" ) ) {
+ toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
+ ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar );
+ } else if ( action->inherits( "QDesignerActionGroup" ) ) {
+ if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
+ toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
+ ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
+ }
+ } else if ( action->inherits( "QSeparatorAction" ) ) {
+ toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
+ ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
+ }
+ if ( !action->inherits( "QActionGroup" ) || ( (QActionGroup*)action )->usesDropDown()) {
+ if ( index == -1 )
+ toolBar->appendAction( action );
+ else
+ toolBar->insertAction( index, action );
+ toolBar->reInsert();
+ QObject::connect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
+ } else {
+ QObjectListIt it( *action->children() );
+ if ( action->children() ) {
+ int i = 0;
+ while ( it.current() ) {
+ QObject *o = it.current();
+ ++it;
+ if ( !o->inherits( "QAction" ) )
+ continue;
+ // ### fix it for nested actiongroups
+ if ( o->inherits( "QDesignerAction" ) ) {
+ QDesignerAction *ac = (QDesignerAction*)o;
+ toolBar->insertAction( ac->widget(), ac );
+ ac->widget()->installEventFilter( toolBar );
+ if ( index == -1 )
+ toolBar->appendAction( ac );
+ else
+ toolBar->insertAction( index + (i++), ac );
+ }
+ }
+ }
+ toolBar->reInsert();
+ QObject::connect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
+ }
+}
+
+void AddActionToToolBarCommand::unexecute()
+{
+ if ( action->inherits( "QDesignerAction" ) ) {
+ QString s = ( (QDesignerAction*)action )->widget()->name();
+ s.prepend( "qt_dead_widget_" );
+ ( (QDesignerAction*)action )->widget()->setName( s );
+ }
+
+ toolBar->removeAction( action );
+ action->removeFrom( toolBar );
+ QObject::disconnect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
+ if ( !action->inherits( "QActionGroup" ) || ( (QActionGroup*)action )->usesDropDown()) {
+ action->removeEventFilter( toolBar );
+ } else {
+ if ( action->children() ) {
+ QObjectListIt it( *action->children() );
+ while ( it.current() ) {
+ QObject *o = it.current();
+ ++it;
+ if ( !o->inherits( "QAction" ) )
+ continue;
+ if ( o->inherits( "QDesignerAction" ) ) {
+ o->removeEventFilter( toolBar );
+ toolBar->removeAction( (QAction*)o );
+ }
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------
+
+AddActionToPopupCommand::AddActionToPopupCommand( const QString &n, FormWindow *fw,
+ QAction *a, QDesignerPopupMenu *p, int idx )
+ : Command( n, fw ), action( a ), popup( p ), index( idx )
+{
+}
+
+void AddActionToPopupCommand::execute()
+{
+ if ( action->inherits( "QActionGroup" ) ) {
+ if ( ( (QActionGroup*)action )->usesDropDown() ) {
+ action->addTo( popup );
+ popup->insertAction( index, action );
+ } else {
+ action->addTo( popup );
+ if ( action->children() ) {
+ QObjectListIt it( *action->children() );
+ int i = 0;
+ while ( it.current() ) {
+ QObject *o = it.current();
+ ++it;
+ if ( !o->inherits( "QAction" ) )
+ continue;
+ QDesignerAction *ac = (QDesignerAction*)o;
+ popup->insertAction( index + (i++), ac );
+ }
+ }
+ }
+ popup->reInsert();
+ QObject::connect( action, SIGNAL( destroyed() ), popup, SLOT( actionRemoved() ) );
+ } else {
+ if ( !action->inherits( "QDesignerAction" ) || ( (QDesignerAction*)action )->supportsMenu() ) {
+ action->addTo( popup );
+ popup->insertAction( index, action );
+ popup->reInsert();
+ QObject::connect( action, SIGNAL( destroyed() ), popup, SLOT( actionRemoved() ) );
+ }
+ }
+}
+
+void AddActionToPopupCommand::unexecute()
+{
+ action->removeFrom( popup );
+ popup->removeAction( action );
+ QObject::disconnect( action, SIGNAL( destroyed() ), popup, SLOT( actionRemoved() ) );
+ if ( !action->inherits( "QActionGroup" ) || ( (QActionGroup*)action )->usesDropDown()) {
+ action->removeEventFilter( popup );
+ } else {
+ if ( action->children() ) {
+ QObjectListIt it( *action->children() );
+ while ( it.current() ) {
+ QObject *o = it.current();
+ ++it;
+ if ( !o->inherits( "QAction" ) )
+ continue;
+ if ( o->inherits( "QDesignerAction" ) ) {
+ o->removeEventFilter( popup );
+ popup->removeAction( (QAction*)o );
+ }
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------
+
+AddMenuCommand::AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw )
+ : Command( n, fw ), menuBar( 0 ), popup( 0 ), mainWindow( mw ), id( -1 ), name( "Menu" )
+{
+}
+
+void AddMenuCommand::execute()
+{
+ if ( !popup ) {
+ QString n = "PopupMenu";
+ popup = new QDesignerPopupMenu( mainWindow );
+ formWindow()->unify( popup, n, true );
+ popup->setName( n );
+ }
+ if ( !mainWindow->child( 0, "QMenuBar" ) ) {
+ menuBar = new QDesignerMenuBar( (QWidget*)mainWindow );
+ menuBar->setName( "menubar" );
+ } else {
+ menuBar = (QDesignerMenuBar*)mainWindow->menuBar();
+ }
+ if ( id == -1 )
+ id = mainWindow->menuBar()->insertItem( name, popup );
+ else
+ id = mainWindow->menuBar()->insertItem( name, popup, id, index );
+ formWindow()->killAccels( formWindow() );
+}
+
+void AddMenuCommand::unexecute()
+{
+ if ( !popup || !menuBar )
+ return;
+ menuBar->removeItem( id );
+ formWindow()->killAccels( formWindow() );
+}
+
+// ------------------------------------------------------------
+
+RenameMenuCommand::RenameMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ int i, const QString &on, const QString &nn )
+ : Command( n, fw ), menuBar( mb ), id( i ), oldName( on ), newName( nn )
+{
+}
+
+void RenameMenuCommand::execute()
+{
+ menuBar->changeItem( id, newName );
+ formWindow()->killAccels( formWindow() );
+}
+
+void RenameMenuCommand::unexecute()
+{
+ menuBar->changeItem( id, oldName );
+ formWindow()->killAccels( formWindow() );
+}
+
+// ------------------------------------------------------------
+
+MoveMenuCommand::MoveMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ QDesignerPopupMenu *p, int fidx, int tidx, const QString &txt )
+ : Command( n, fw ), menuBar( mb ), popup( p ), fromIdx( fidx ), toIdx( tidx ), text( txt )
+{
+}
+
+void MoveMenuCommand::execute()
+{
+ menuBar->removeItem( menuBar->idAt( fromIdx ) );
+ menuBar->insertItem( text, popup, -1, toIdx );
+ formWindow()->killAccels( formWindow() );
+}
+
+void MoveMenuCommand::unexecute()
+{
+ menuBar->removeItem( menuBar->idAt( toIdx ) );
+ menuBar->insertItem( text, popup, -1, fromIdx );
+ formWindow()->killAccels( formWindow() );
+}
+
+// ------------------------------------------------------------
+
+AddToolBarCommand::AddToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw )
+ : Command( n, fw ), toolBar( 0 ), mainWindow( mw )
+{
+}
+
+void AddToolBarCommand::execute()
+{
+ if ( !toolBar ) {
+ toolBar = new QDesignerToolBar( mainWindow );
+ QString n = "Toolbar";
+ formWindow()->unify( toolBar, n, true );
+ toolBar->setName( n );
+ mainWindow->addToolBar( toolBar, n );
+ } else {
+ toolBar->show();
+ }
+}
+
+void AddToolBarCommand::unexecute()
+{
+ toolBar->hide();
+}
+#include "command.moc"
diff --git a/kommander/editor/command.h b/kommander/editor/command.h
new file mode 100644
index 00000000..80a3e569
--- /dev/null
+++ b/kommander/editor/command.h
@@ -0,0 +1,931 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef COMMAND_H
+#define COMMAND_H
+
+#include "metadatabase.h"
+#include "layout.h"
+
+#include <qstring.h>
+#include <qrect.h>
+#include <qvaluelist.h>
+#include <qvariant.h>
+#include <qobject.h>
+#include <qlistview.h>
+#include <qptrlist.h>
+#include <qmap.h>
+
+class QWizard;
+class QTabWidget;
+class Command;
+class QWidget;
+class FormWindow;
+class PropertyEditor;
+class QListBox;
+class QIconView;
+class QMultiLineEdit;
+class QTable;
+class QAction;
+class QDesignerToolBar;
+class QMainWindow;
+class QDesignerPopupMenu;
+class QDesignerMenuBar;
+class QToolBox;
+
+class Command : public Qt
+{
+public:
+ Command( const QString &n, FormWindow *fw );
+ virtual ~Command();
+
+ enum Type {
+ Resize,
+ Insert,
+ Move,
+ Delete,
+ SetProperty,
+ LayoutHorizontal,
+ LayoutVertical,
+ LayoutHorizontalSplitter,
+ LayoutVerticalSplitter,
+ LayoutGrid,
+ BreakLayout,
+ Macro,
+ AddTabPage,
+ DeleteTabPage,
+ MoveTabPage,
+ AddWizardPage,
+ DeleteWizardPage,
+ SwapWizardPages,
+ RenameWizardPage,
+ AddConnection,
+ RemoveConnection,
+ AddSlot,
+ RemoveSlot,
+ Lower,
+ Raise,
+ Paste,
+ TabOrder,
+ PopulateListBox,
+ PopulateIconView,
+ PopulateListView,
+ PopulateMultiLineEdit,
+ PopulateTable,
+ AddActionToToolBar,
+ RemoveActionFromToolBar,
+ AddActionToPopup,
+ RemoveActionFromPopup,
+ AddMenu,
+ RemoveMenu,
+ RenameMenu,
+ MoveMenu,
+ AddToolBar,
+ RemoveToolBar,
+ AddToolBoxPage,
+ DeleteToolBoxPage
+ };
+
+ QString name() const;
+
+ virtual void execute() = 0;
+ virtual void unexecute() = 0;
+ virtual Type type() const = 0;
+ virtual void merge( Command *c );
+ virtual bool canMerge( Command *c );
+
+ FormWindow *formWindow() const;
+
+private:
+ QString cmdName;
+ FormWindow *formWin;
+
+};
+
+
+class CommandHistory : public QObject
+{
+ Q_OBJECT
+
+public:
+ CommandHistory( int s );
+
+ void addCommand( Command *cmd, bool tryCompress = FALSE );
+ void undo();
+ void redo();
+
+ void emitUndoRedo();
+
+ void setModified( bool m );
+ bool isModified() const;
+
+public slots:
+ void checkCompressedCommand();
+
+signals:
+ void undoRedoChanged( bool undoAvailable, bool redoAvailable,
+ const QString &undoCmd, const QString &redoCmd );
+ void modificationChanged( bool m );
+
+private:
+ QPtrList<Command> history;
+ int current, steps;
+ bool modified;
+ int savedAt;
+ Command *compressedCommand;
+
+};
+
+class ResizeCommand : public Command
+{
+public:
+ ResizeCommand( const QString &n, FormWindow *fw,
+ QWidget *w, const QRect &oldr, const QRect &nr );
+
+ void execute();
+ void unexecute();
+ Type type() const { return Resize; }
+
+private:
+ QWidget *widget;
+ QRect oldRect, newRect;
+
+};
+
+class InsertCommand : public Command
+{
+public:
+ InsertCommand( const QString &n, FormWindow *fw, QWidget *w, const QRect &g );
+
+ void execute();
+ void unexecute();
+ Type type() const { return Insert; }
+
+private:
+ QWidget *widget;
+ QRect geometry;
+
+};
+
+class MoveCommand : public Command
+{
+public:
+ MoveCommand( const QString &n, FormWindow *fw,
+ const QWidgetList &w,
+ const QValueList<QPoint> op,
+ const QValueList<QPoint> np,
+ QWidget *opr, QWidget *npr );
+ void execute();
+ void unexecute();
+ Type type() const { return Move; }
+ void merge( Command *c );
+ bool canMerge( Command *c );
+
+private:
+ QWidgetList widgets;
+ QValueList<QPoint> oldPos, newPos;
+ QWidget *oldParent, *newParent;
+
+};
+
+class DeleteCommand : public Command
+{
+public:
+ DeleteCommand( const QString &n, FormWindow *fw,
+ const QWidgetList &w );
+ void execute();
+ void unexecute();
+ Type type() const { return Delete; }
+
+private:
+ QWidgetList widgets;
+ QMap< QWidget*, QValueList<MetaDataBase::Connection> > connections;
+
+};
+
+class SetPropertyCommand : public Command
+{
+public:
+ SetPropertyCommand( const QString &n, FormWindow *fw,
+ QObject *w, PropertyEditor *e,
+ const QString &pn, const QVariant &ov,
+ const QVariant &nv, const QString &ncut,
+ const QString &ocut,
+ bool reset = FALSE );
+
+ void execute();
+ void unexecute();
+ Type type() const { return SetProperty; }
+ void merge( Command *c );
+ bool canMerge( Command *c );
+ bool checkProperty();
+
+private:
+ void setProperty( const QVariant &v, const QString &currentItemText, bool select = TRUE );
+
+ QObject *widget;
+ PropertyEditor *editor;
+ QString propName;
+ QVariant oldValue, newValue;
+ QString oldCurrentItemText, newCurrentItemText;
+ bool wasChanged;
+ bool isResetCommand;
+
+};
+
+class LayoutHorizontalCommand : public Command
+{
+public:
+ LayoutHorizontalCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl );
+
+ void execute();
+ void unexecute();
+ Type type() const { return LayoutHorizontal; }
+
+private:
+ HorizontalLayout layout;
+
+};
+
+class LayoutHorizontalSplitCommand : public Command
+{
+public:
+ LayoutHorizontalSplitCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl );
+
+ void execute();
+ void unexecute();
+ Type type() const { return LayoutHorizontalSplitter; }
+
+private:
+ HorizontalLayout layout;
+
+};
+
+class LayoutVerticalCommand : public Command
+{
+public:
+ LayoutVerticalCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl );
+
+ void execute();
+ void unexecute();
+ Type type() const { return LayoutVertical; }
+
+private:
+ VerticalLayout layout;
+
+};
+
+class LayoutVerticalSplitCommand : public Command
+{
+public:
+ LayoutVerticalSplitCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl );
+
+ void execute();
+ void unexecute();
+ Type type() const { return LayoutVerticalSplitter; }
+
+private:
+ VerticalLayout layout;
+
+};
+
+class LayoutGridCommand : public Command
+{
+public:
+ LayoutGridCommand( const QString &n, FormWindow *fw,
+ QWidget *parent, QWidget *layoutBase,
+ const QWidgetList &wl, int xres, int yres );
+
+ void execute();
+ void unexecute();
+ Type type() const { return LayoutGrid; }
+
+private:
+ GridLayout layout;
+
+};
+
+class BreakLayoutCommand : public Command
+{
+public:
+ BreakLayoutCommand( const QString &n, FormWindow *fw,
+ QWidget *layoutBase, const QWidgetList &wl );
+
+ void execute();
+ void unexecute();
+ Type type() const { return BreakLayout; }
+
+private:
+ Layout *layout;
+ int spacing;
+ int margin;
+ QWidget *lb;
+ QWidgetList widgets;
+
+};
+
+class MacroCommand : public Command
+{
+public:
+ MacroCommand( const QString &n, FormWindow *fw,
+ const QPtrList<Command> &cmds );
+
+ void execute();
+ void unexecute();
+ Type type() const { return Macro; }
+
+private:
+ QPtrList<Command> commands;
+
+};
+
+class AddTabPageCommand : public Command
+{
+public:
+ AddTabPageCommand( const QString &n, FormWindow *fw,
+ QTabWidget *tw, const QString &label );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddTabPage; }
+
+private:
+ QTabWidget *tabWidget;
+ int index;
+ QWidget *tabPage;
+ QString tabLabel;
+
+};
+
+class DeleteTabPageCommand : public Command
+{
+public:
+ DeleteTabPageCommand( const QString &n, FormWindow *fw,
+ QTabWidget *tw, QWidget *page );
+
+ void execute();
+ void unexecute();
+ Type type() const { return DeleteTabPage; }
+
+private:
+ QTabWidget *tabWidget;
+ int index;
+ QWidget *tabPage;
+ QString tabLabel;
+
+};
+
+class AddToolBoxPageCommand : public Command
+{
+public:
+ AddToolBoxPageCommand( const QString &n, FormWindow *fw,
+ QToolBox *tw, const QString &label );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddToolBoxPage; }
+
+private:
+ QToolBox *toolBox;
+ int index;
+ QWidget *page;
+ QString label;
+
+};
+
+class DeleteToolBoxPageCommand : public Command
+{
+public:
+ DeleteToolBoxPageCommand( const QString &n, FormWindow *fw,
+ QToolBox *tw, QWidget *page );
+
+ void execute();
+ void unexecute();
+ Type type() const { return DeleteToolBoxPage; }
+
+private:
+ QToolBox *toolBox;
+ int index;
+ QWidget *page;
+ QString label;
+
+};
+class MoveTabPageCommand : public Command
+{
+public:
+ MoveTabPageCommand(const QString &n, FormWindow *fw,
+ QTabWidget *tw, QWidget *page, const QString& label, int nIndex, int oIndex );
+
+ void execute();
+ void unexecute();
+ Type type() const { return MoveTabPage; }
+
+private:
+ QTabWidget *tabWidget;
+ int newIndex, oldIndex;
+ QWidget *tabPage;
+ QString tabLabel;
+
+};
+
+class AddWizardPageCommand : public Command
+{
+public:
+ AddWizardPageCommand( const QString &n, FormWindow *fw,
+ QWizard *w, const QString &label, int index = -1, bool show = TRUE );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddWizardPage; }
+
+private:
+ QWizard *wizard;
+ int index;
+ bool show;
+ QWidget *page;
+ QString pageLabel;
+
+};
+
+class DeleteWizardPageCommand : public Command
+{
+public:
+ DeleteWizardPageCommand( const QString &n, FormWindow *fw,
+ QWizard *w, int index, bool show = TRUE );
+
+ void execute();
+ void unexecute();
+ Type type() const { return DeleteWizardPage; }
+
+private:
+ QWizard *wizard;
+ int index;
+ bool show;
+ QWidget *page;
+ QString pageLabel;
+
+};
+
+class RenameWizardPageCommand : public Command
+{
+public:
+ RenameWizardPageCommand( const QString &n, FormWindow *fw,
+ QWizard *w, int index, const QString& name );
+
+ void execute();
+ void unexecute();
+ Type type() const { return RenameWizardPage; }
+
+private:
+ QWizard *wizard;
+ int index;
+ QWidget *page;
+ QString label;
+
+};
+
+class SwapWizardPagesCommand : public Command
+{
+public:
+ SwapWizardPagesCommand( const QString &n, FormWindow *fw,
+ QWizard *w, int index1, int index2 );
+
+ void execute();
+ void unexecute();
+ Type type() const { return SwapWizardPages; }
+
+private:
+ QWizard *wizard;
+ int index1, index2;
+
+};
+
+class AddConnectionCommand : public Command
+{
+public:
+ AddConnectionCommand( const QString &name, FormWindow *fw,
+ MetaDataBase::Connection c );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddConnection; }
+
+private:
+ MetaDataBase::Connection connection;
+
+};
+
+class RemoveConnectionCommand : public Command
+{
+public:
+ RemoveConnectionCommand( const QString &name, FormWindow *fw,
+ MetaDataBase::Connection c );
+
+ void execute();
+ void unexecute();
+ Type type() const { return RemoveConnection; }
+
+private:
+ MetaDataBase::Connection connection;
+
+};
+
+class AddSlotCommand : public Command
+{
+public:
+ AddSlotCommand( const QString &name, FormWindow *fw, const QCString &s, const QString& spec,
+ const QString &a, const QString &l, const QString &rt );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddSlot; }
+
+private:
+ QCString slot;
+ QString specifier;
+ QString access;
+ QString language;
+ QString returnType;
+
+};
+
+class RemoveSlotCommand : public Command
+{
+public:
+ RemoveSlotCommand( const QString &name, FormWindow *fw, const QCString &s, const QString& spec,
+ const QString &a, const QString &l, const QString &rt );
+
+ void execute();
+ void unexecute();
+ Type type() const { return RemoveSlot; }
+
+private:
+ QCString slot;
+ QString specifier;
+ QString access;
+ QString language;
+ QString returnType;
+
+};
+
+class LowerCommand : public Command
+{
+public:
+ LowerCommand( const QString &name, FormWindow *fw, const QWidgetList &w );
+
+ void execute();
+ void unexecute();
+ Type type() const { return Lower; }
+
+private:
+ QWidgetList widgets;
+
+};
+
+class RaiseCommand : public Command
+{
+public:
+ RaiseCommand( const QString &name, FormWindow *fw, const QWidgetList &w );
+
+ void execute();
+ void unexecute();
+ Type type() const { return Raise; }
+
+private:
+ QWidgetList widgets;
+
+};
+
+class PasteCommand : public Command
+{
+public:
+ PasteCommand( const QString &n, FormWindow *fw, const QWidgetList &w );
+
+ void execute();
+ void unexecute();
+ Type type() const { return Paste; }
+
+private:
+ QWidgetList widgets;
+
+};
+
+class TabOrderCommand : public Command
+{
+public:
+ TabOrderCommand( const QString &n, FormWindow *fw, const QWidgetList &ol, const QWidgetList &nl );
+
+ void execute();
+ void unexecute();
+ Type type() const { return TabOrder; }
+ void merge( Command *c );
+ bool canMerge( Command *c );
+
+private:
+ QWidgetList oldOrder, newOrder;
+
+};
+
+class PopulateListBoxCommand : public Command
+{
+public:
+ struct Item
+ {
+ QString text;
+ QPixmap pix;
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+ bool operator==( const Item & ) const { return FALSE; }
+#endif
+ };
+
+ PopulateListBoxCommand( const QString &n, FormWindow *fw,
+ QListBox *lb, const QValueList<Item> &items );
+ void execute();
+ void unexecute();
+ Type type() const { return PopulateListBox; }
+
+ bool operator==( const PopulateListBoxCommand & ) const;
+
+private:
+ QValueList<Item> oldItems, newItems;
+ QListBox *listbox;
+
+};
+
+class PopulateIconViewCommand : public Command
+{
+public:
+ struct Item
+ {
+ QString text;
+ QPixmap pix;
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+ bool operator==( const Item & ) const { return FALSE; }
+#endif
+ };
+
+ PopulateIconViewCommand( const QString &n, FormWindow *fw,
+ QIconView *iv, const QValueList<Item> &items );
+ void execute();
+ void unexecute();
+ Type type() const { return PopulateIconView; }
+
+ bool operator==( const PopulateIconViewCommand & ) const;
+
+private:
+ QValueList<Item> oldItems, newItems;
+ QIconView *iconview;
+
+};
+
+class PopulateListViewCommand : public Command
+{
+public:
+ PopulateListViewCommand( const QString &n, FormWindow *fw,
+ QListView *lv, QListView *from );
+ void execute();
+ void unexecute();
+ Type type() const { return PopulateListView; }
+ static void transferItems( QListView *from, QListView *to );
+
+ bool operator==( const PopulateListViewCommand & ) const;
+
+private:
+ QListView *oldItems, *newItems;
+ QListView *listview;
+
+};
+
+class PopulateMultiLineEditCommand : public Command
+{
+public:
+ PopulateMultiLineEditCommand( const QString &n, FormWindow *fw,
+ QMultiLineEdit *mle, const QString &txt );
+ void execute();
+ void unexecute();
+ Type type() const { return PopulateMultiLineEdit; }
+
+private:
+ QString newText, oldText;
+ QMultiLineEdit *mlined;
+ bool wasChanged;
+
+};
+
+class PopulateTableCommand : public Command
+{
+public:
+ struct Row
+ {
+ QString text;
+ QPixmap pix;
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+ bool operator==( const Row& ) const { return FALSE; }
+#endif
+ };
+
+ struct Column
+ {
+ QString text;
+ QPixmap pix;
+ QString field;
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+ bool operator==( const Column& ) const { return FALSE; }
+#endif
+ };
+
+ PopulateTableCommand( const QString &n, FormWindow *fw, QTable *t,
+ const QValueList<Row> &rows,
+ const QValueList<Column> &columns );
+
+ void execute();
+ void unexecute();
+ Type type() const { return PopulateTable; }
+
+private:
+ QValueList<Row> oldRows, newRows;
+ QValueList<Column> oldColumns, newColumns;
+ QTable *table;
+
+};
+
+class AddActionToToolBarCommand : public Command
+{
+public:
+ AddActionToToolBarCommand( const QString &n, FormWindow *fw,
+ QAction *a, QDesignerToolBar *tb, int idx );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddActionToToolBar; }
+
+private:
+ QAction *action;
+ QDesignerToolBar *toolBar;
+ int index;
+
+};
+
+class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand
+{
+public:
+ RemoveActionFromToolBarCommand( const QString &n, FormWindow *fw,
+ QAction *a, QDesignerToolBar *tb, int idx )
+ : AddActionToToolBarCommand( n, fw, a, tb, idx ) {}
+
+ void execute() { AddActionToToolBarCommand::unexecute(); }
+ void unexecute() { AddActionToToolBarCommand::execute(); }
+ Type type() const { return RemoveActionFromToolBar; }
+
+};
+
+class AddActionToPopupCommand : public Command
+{
+public:
+ AddActionToPopupCommand( const QString &n, FormWindow *fw,
+ QAction *a, QDesignerPopupMenu *p, int idx );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddActionToPopup; }
+
+private:
+ QAction *action;
+ QDesignerPopupMenu *popup;
+ int index;
+
+};
+
+class RemoveActionFromPopupCommand : public AddActionToPopupCommand
+{
+public:
+ RemoveActionFromPopupCommand( const QString &n, FormWindow *fw,
+ QAction *a, QDesignerPopupMenu *p, int idx )
+ : AddActionToPopupCommand( n, fw, a, p, idx ) {}
+
+ void execute() { AddActionToPopupCommand::unexecute(); }
+ void unexecute() { AddActionToPopupCommand::execute(); }
+ Type type() const { return RemoveActionFromPopup; }
+
+};
+
+class AddMenuCommand : public Command
+{
+public:
+ AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddMenu; }
+
+protected:
+ QDesignerMenuBar *menuBar;
+ QDesignerPopupMenu *popup;
+ QMainWindow *mainWindow;
+ int id;
+ int index;
+ QString name;
+
+};
+
+class RemoveMenuCommand : public AddMenuCommand
+{
+public:
+ RemoveMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw,
+ QDesignerMenuBar *mb, QDesignerPopupMenu *p, int i, int idx, const QString &mn )
+ : AddMenuCommand( n, fw, mw ) { menuBar = mb; popup = p; id = i; index = idx, name = mn; }
+
+ void execute() { AddMenuCommand::unexecute(); }
+ void unexecute() { AddMenuCommand::execute(); }
+ Type type() const { return RemoveMenu; }
+
+};
+
+class RenameMenuCommand : public Command
+{
+public:
+ RenameMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ int i, const QString &on, const QString &nn );
+
+ void execute();
+ void unexecute();
+ Type type() const { return RenameMenu; }
+
+private:
+ QDesignerMenuBar *menuBar;
+ int id;
+ QString oldName, newName;
+
+};
+
+class MoveMenuCommand : public Command
+{
+public:
+ MoveMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ QDesignerPopupMenu *p, int fidx, int tidx, const QString &txt );
+
+ void execute();
+ void unexecute();
+ Type type() const { return MoveMenu; }
+
+private:
+ QDesignerMenuBar *menuBar;
+ QDesignerPopupMenu *popup;
+ int fromIdx, toIdx;
+ QString text;
+
+};
+
+class AddToolBarCommand : public Command
+{
+public:
+ AddToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw );
+
+ void execute();
+ void unexecute();
+ Type type() const { return AddToolBar; }
+
+protected:
+ QDesignerToolBar *toolBar;
+ QMainWindow *mainWindow;
+
+};
+
+class RemoveToolBarCommand : public AddToolBarCommand
+{
+public:
+ RemoveToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw, QDesignerToolBar *tb )
+ : AddToolBarCommand( n, fw, mw ) { toolBar = tb; }
+
+ void execute() { AddToolBarCommand::unexecute(); }
+ void unexecute() { AddToolBarCommand::execute(); }
+ Type type() const { return RemoveToolBar; }
+
+};
+
+#endif
diff --git a/kommander/editor/connectioneditor.ui b/kommander/editor/connectioneditor.ui
new file mode 100644
index 00000000..d9e5a161
--- /dev/null
+++ b/kommander/editor/connectioneditor.ui
@@ -0,0 +1,418 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ConnectionEditorBase</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>ConnectionEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>780</width>
+ <height>538</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit Connections</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Edit Connections&lt;/b&gt;&lt;p&gt;Add and remove connections in the current form .&lt;/p&gt;&lt;p&gt;Select a signal and a corresponding slot then press the &lt;b&gt;Connect&lt;/b&gt;-button to create a connection.&lt;/p&gt;&lt;p&gt;Select a connection from the list then press the &lt;b&gt;Disconnect&lt;/b&gt;-button to delete the connection.&lt;/p&gt;</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="KListView" row="3" column="0" rowspan="1" colspan="2">
+ <column>
+ <property name="text">
+ <string>Sender</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Signal</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Receiver</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Slot</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>connectionView</cstring>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="fullWidth">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Displays the connections between the sender and the receiver.</string>
+ </property>
+ </widget>
+ <widget class="KListBox" row="1" column="1">
+ <property name="name">
+ <cstring>slotBox</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;A list of slots for the receiver.&lt;/b&gt;&lt;p&gt;The slots that are displayed are only those which have arguments that correspond with the arguments of the signal that is currently selected in the Signal-list.&lt;/b&gt;</string>
+ </property>
+ </widget>
+ <widget class="KListBox" row="1" column="0">
+ <property name="name">
+ <cstring>signalBox</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Displays the list of signals that the widget emits.</string>
+ </property>
+ </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>labelSignal</cstring>
+ </property>
+ <property name="text">
+ <string>Si&amp;gnals:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>signalBox</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>comboSender</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <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>labelSlot</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Slots:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>slotBox</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>comboReceiver</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>disconnectButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Disconnect</string>
+ </property>
+ <property name="accel">
+ <string>Alt+D</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Remove the selected connection</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Remove the selected connection.</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>71</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>okButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="accel">
+ <string>Alt+O</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>cancelButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="accel">
+ <string>Alt+C</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</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>230</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout8</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Connec&amp;tions:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>connectionView</cstring>
+ </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>231</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>connectButton</cstring>
+ </property>
+ <property name="text">
+ <string>Co&amp;nnect</string>
+ </property>
+ <property name="accel">
+ <string>Alt+N</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Create connection</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Create a connection between a signal and a slot.</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>211</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>comboSender</tabstop>
+ <tabstop>signalBox</tabstop>
+ <tabstop>comboReceiver</tabstop>
+ <tabstop>slotBox</tabstop>
+ <tabstop>connectButton</tabstop>
+ <tabstop>connectionView</tabstop>
+ <tabstop>disconnectButton</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+</tabstops>
+<slots>
+ <slot access="protected">init()</slot>
+ <slot access="protected">destroy()</slot>
+ <slot>addSlotClicked()</slot>
+ <slot access="protected">connectClicked()</slot>
+ <slot access="protected">connectionsChanged()</slot>
+ <slot access="protected">disconnectClicked()</slot>
+ <slot access="protected">receiverChanged( const QString &amp; )</slot>
+ <slot access="protected">okClicked()</slot>
+ <slot access="protected">signalChanged()</slot>
+ <slot access="protected">slotsChanged()</slot>
+ <slot access="protected">cancelClicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistview.h</includehint>
+ <includehint>klistbox.h</includehint>
+ <includehint>klistbox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp
new file mode 100644
index 00000000..dafae5a7
--- /dev/null
+++ b/kommander/editor/connectioneditorimpl.cpp
@@ -0,0 +1,373 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#include "connectioneditorimpl.h"
+#include "metadatabase.h"
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "command.h"
+#include "widgetfactory.h"
+#include "pixmapchooser.h"
+#include <qmetaobject.h>
+#include <qlabel.h>
+#include <qregexp.h>
+
+#include <klistbox.h>
+#include <klistview.h>
+#include <kpushbutton.h>
+#include <kcombobox.h>
+#include <klocale.h>
+
+static const char *const ignore_slots[] = {
+ "destroyed()",
+ //"setCaption(const QString&)",
+ "setIcon(const QPixmap&)",
+ //"setIconText(const QString&)",
+ "setMouseTracking(bool)",
+ "clearFocus()",
+ "setUpdatesEnabled(bool)",
+ "update()",
+ "update(int,int,int,int)",
+ "update(const QRect&)",
+ "repaint()",
+ "repaint(bool)",
+ "repaint(int,int,int,int,bool)",
+ "repaint(const QRect&,bool)",
+ "repaint(const QRegion&,bool)",
+ "repaint(int,int,int,int)",
+ "repaint(const QRect&)",
+ "repaint(const QRegion&)",
+ //"show()",
+ //"hide()",
+ "iconify()",
+ "showMinimized()",
+ "showMaximized()",
+ "showFullScreen()",
+ "showNormal()",
+ "polish()",
+ "constPolish()",
+ //"raise()",
+ //"lower()",
+ "stackUnder(QWidget*)",
+ //"move(int,int)",
+ "move(const QPoint&)",
+ //"resize(int,int)",
+ "resize(const QSize&)",
+ //"setGeometry(int,int,int,int)",
+ "setGeometry(const QRect&)",
+ "focusProxyDestroyed()",
+ "showExtension(bool)",
+ "setUpLayout()",
+ //"showDockMenu(const QPoint&)",
+ "init()",
+ "destroy()",
+ "deleteLater()",
+ 0
+};
+
+static const char *const ignore_signals[] = {
+ "destroyed()",
+ "destroyed(QObject*)",
+ "accessibilityChanged(int)",
+ "accessibilityChanged(int,int)",
+ 0
+};
+
+
+ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr, FormWindow* fw)
+ : ConnectionEditorBase(parent, 0, true), m_formWindow(fw)
+{
+ if (!rcvr || rcvr == m_formWindow)
+ rcvr = m_formWindow->mainContainer();
+ if (!sndr || sndr == m_formWindow)
+ sndr = m_formWindow->mainContainer();
+ m_sender = sndr;
+ m_receiver = rcvr;
+
+ /* Create widget list */
+ QStringList lst;
+ lst << m_formWindow->name();
+ for (QPtrDictIterator<QWidget> it(*m_formWindow->widgets()); it.current(); ++it)
+ {
+ if (it.current()->isVisibleTo(this) &&
+ !it.current()->inherits("QLayoutWidget") &&
+ !it.current()->inherits("Spacer") &&
+ qstrcmp(it.current()->name(), "central widget") &&
+ !m_formWindow->isMainContainer(it.current()) &&
+ !lst.contains(it.current()->name()))
+ lst << it.current()->name();
+ }
+
+ // Fill receiver combos with widget list
+// fillWidgetList(comboReceiver, lst, m_receiver->name());
+
+ // Fill receiver combos with widget and action list
+ for (QPtrListIterator<QAction> it(m_formWindow->actionList()); it.current(); ++it)
+ lst << it.current()->name();
+ lst.sort();
+ fillWidgetList(comboReceiver, lst, m_receiver->name());
+ fillWidgetList(comboSender, lst, m_sender->name());
+ senderChanged(m_sender->name());
+ fillConnectionsList();
+ updateConnectButton();
+ updateDisconnectButton();
+
+ // Connections
+ connect(comboSender, SIGNAL(activated(const QString&)), SLOT(senderChanged(const QString&)));
+ connect(comboReceiver, SIGNAL(activated(const QString&)), SLOT(receiverChanged(const QString&)));
+ connect(signalBox, SIGNAL(selectionChanged()), SLOT(updateConnectButton()));
+ connect(slotBox, SIGNAL(selectionChanged()), SLOT(updateConnectButton()));
+ connect(connectButton, SIGNAL(clicked()), SLOT(connectClicked()));
+ connect(disconnectButton, SIGNAL(clicked()), SLOT(disconnectClicked()));
+ connect(okButton, SIGNAL(clicked()), SLOT(okClicked()));
+ connect(cancelButton, SIGNAL(clicked()), SLOT(cancelClicked()));
+ connect(signalBox, SIGNAL(doubleClicked(QListBoxItem*)), SLOT(connectClicked()));
+ connect(slotBox, SIGNAL(doubleClicked(QListBoxItem*)), SLOT(connectClicked()));
+}
+
+ConnectionEditor::~ConnectionEditor()
+{
+}
+
+bool ConnectionEditor::isSignalIgnored(const char *signal) const
+{
+ for (int i = 0; ignore_signals[i]; i++)
+ if (!qstrcmp(signal, ignore_signals[i]))
+ return true;
+ return false;
+}
+
+bool ConnectionEditor::isSlotIgnored(const QMetaData* md)
+{
+ if (md->access != QMetaData::Public && (md->access != QMetaData::Protected ||
+ !m_formWindow->isMainContainer((QWidget*)m_receiver)))
+ return true;
+ for (int i = 0; ignore_slots[i]; i++)
+ if (!qstrcmp(md->name, ignore_slots[i]))
+ return true;
+ if (!m_formWindow->isMainContainer((QWidget *)m_receiver) && !qstrcmp(md->name, "close()"))
+ return true;
+ if (!qstrcmp(md->name, "setFocus()") && m_receiver->isWidgetType() &&
+ ((QWidget*)m_receiver)->focusPolicy() == QWidget::NoFocus)
+ return true;
+ for (int i = 0; i<comboSender->count(); i++)
+ if (checkConnectArgs(MetaDataBase::normalizeSlot(signalBox->text(i)).latin1(), m_receiver, md->name))
+ return false;
+ return true;
+}
+
+QObject* ConnectionEditor::objectByName(const QString& s) const
+{
+ for (QPtrDictIterator <QWidget> it(*m_formWindow->widgets()); it.current(); ++it)
+ if (QString(it.current()->name()) == s)
+ return it.current();
+
+ for (QPtrListIterator<QAction> it(m_formWindow->actionList()); it.current(); ++it)
+ if (QString(it.current()->name()) == s)
+ return it.current();
+
+ return 0;
+}
+
+
+void ConnectionEditor::connectClicked()
+{
+ if (signalBox->currentItem() == -1 || slotBox->currentItem() == -1)
+ return;
+ if (hasConnection(m_sender->name(), signalBox->currentText(), m_receiver->name(),
+ slotBox->currentText()))
+ return;
+ MetaDataBase::Connection conn;
+ conn.sender = m_sender;
+ conn.signal = signalBox->currentText();
+ conn.slot = slotBox->currentText();
+ conn.receiver = m_receiver;
+ KListViewItem *i = new KListViewItem(connectionView, m_sender->name(), conn.signal, m_receiver->name(),
+ conn.slot);
+ i->setPixmap(0, PixmapChooser::loadPixmap("connecttool.xpm"));
+ connectionView->setCurrentItem(i);
+ connectionView->setSelected(i, true);
+ m_connections.insert(i, conn);
+ connectButton->setEnabled(false);
+ updateDisconnectButton();
+}
+
+void ConnectionEditor::disconnectClicked()
+{
+ QListViewItem *p_item = connectionView->currentItem();
+ if (!p_item)
+ return;
+
+ QMap <QListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.find(p_item);
+ if (it != m_connections.end())
+ m_connections.remove(it);
+ delete p_item;
+ if (connectionView->currentItem())
+ connectionView->setSelected(connectionView->currentItem(), true);
+ updateConnectButton();
+ updateDisconnectButton();
+}
+
+void ConnectionEditor::okClicked()
+{
+ MacroCommand* rmConn = 0, *addConn = 0;
+ QString n = i18n("Connect/Disconnect the signals and slots of '%1' and '%2'").arg(m_sender->name()).
+ arg(m_receiver->name());
+ QValueList <MetaDataBase::Connection>::Iterator cit;
+ if (!m_oldConnections.isEmpty())
+ {
+ QPtrList <Command> commands;
+ for (cit = m_oldConnections.begin(); cit != m_oldConnections.end(); ++cit)
+ commands.append(new RemoveConnectionCommand(i18n("Remove Connection"), m_formWindow, *cit));
+ rmConn = new MacroCommand(i18n("Remove Connections"), m_formWindow, commands);
+ }
+ if (!m_connections.isEmpty())
+ {
+ QMap<QListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.begin();
+ QPtrList<Command> commands;
+ for (; it != m_connections.end(); ++it)
+ {
+ MetaDataBase::Connection conn = *it;
+ commands.append(new AddConnectionCommand(i18n("Add Connection"), m_formWindow, conn));
+ }
+ addConn = new MacroCommand(i18n("Add Connections"), m_formWindow, commands);
+ }
+
+ if (rmConn || addConn)
+ {
+ QPtrList < Command > commands;
+ if (rmConn)
+ commands.append(rmConn);
+ if (addConn)
+ commands.append(addConn);
+ MacroCommand *cmd = new MacroCommand(n, m_formWindow, commands);
+ m_formWindow->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ }
+
+ accept();
+}
+
+void ConnectionEditor::cancelClicked()
+{
+ reject();
+}
+
+void ConnectionEditor::senderChanged(const QString& s)
+{
+ QObject* p_object = objectByName(s);
+ if (!p_object)
+ return;
+ m_sender = p_object;
+ QStrList p_sigs = m_sender->metaObject()->signalNames(true);
+ signalBox->clear();
+ for (QStrListIterator it(p_sigs); it.current(); ++it)
+ if (!isSignalIgnored(it.current()) && !signalBox->findItem(it.current(), Qt::ExactMatch))
+ signalBox->insertItem(it.current());
+ if (m_sender == m_formWindow->mainContainer())
+ signalBox->insertStringList(MetaDataBase::signalList(m_formWindow));
+ signalBox->sort();
+ signalBox->setCurrentItem(signalBox->firstItem());
+ // Update slots - some may (not) have their signal equivalents now.
+ receiverChanged(m_receiver->name());
+}
+
+void ConnectionEditor::receiverChanged(const QString& s)
+{
+ QObject* p_object = objectByName(s);
+ if (!p_object)
+ return;
+ m_receiver = p_object;
+ int n = m_receiver->metaObject()->numSlots(true);
+ slotBox->clear();
+ for (int i = 0; i < n; ++i)
+ {
+ const QMetaData* md = m_receiver->metaObject()->slot(i, true);
+ if (!isSlotIgnored(md) && !slotBox->findItem(md->name, Qt::ExactMatch))
+ slotBox->insertItem(md->name);
+ }
+ slotBox->sort();
+ slotBox->setCurrentItem(slotBox->firstItem());
+ updateConnectButton();
+}
+
+void ConnectionEditor::updateConnectButton()
+{
+ bool itemsSelected = signalBox->currentItem() != -1 && slotBox->currentItem() != -1;
+ bool notConnected = !itemsSelected || !hasConnection(m_sender->name(), signalBox->currentText(),
+ m_receiver->name(), slotBox->currentText());
+ bool connectionAllowed = notConnected && checkConnectArgs(MetaDataBase::normalizeSlot(signalBox->currentText()).latin1(),
+ m_receiver, MetaDataBase::normalizeSlot(slotBox->currentText()).latin1());
+ connectButton->setEnabled(itemsSelected && notConnected && connectionAllowed);
+}
+
+void ConnectionEditor::updateDisconnectButton()
+{
+ disconnectButton->setEnabled((connectionView->currentItem()));
+}
+
+bool ConnectionEditor::hasConnection(const QString& snder, const QString& signal,
+ const QString& rcvr, const QString& slot) const
+{
+ for (QListViewItemIterator it(connectionView); it.current(); ++it)
+ if (it.current()->text(0) == snder &&
+ it.current()->text(1) == signal &&
+ it.current()->text(2) == rcvr && it.current()->text(3) == slot)
+ return true;
+ return false;
+}
+
+void ConnectionEditor::fillConnectionsList()
+{
+ connectionView->clear();
+ m_connections.clear();
+ m_oldConnections = MetaDataBase::connections(m_formWindow);
+ if (!m_oldConnections.isEmpty())
+ {
+ QValueList <MetaDataBase::Connection>::Iterator it = m_oldConnections.begin();
+ for (; it != m_oldConnections.end(); ++it)
+ {
+ if (m_formWindow->isMainContainer((QWidget*)(*it).receiver) &&
+ !MetaDataBase::hasSlot(m_formWindow, MetaDataBase::normalizeSlot((*it).slot).latin1()))
+ continue;
+ MetaDataBase::Connection conn = *it;
+ KListViewItem *i = new KListViewItem(connectionView, conn.sender->name(), conn.signal,
+ conn.receiver->name(), conn.slot);
+ i->setPixmap(0, PixmapChooser::loadPixmap("connecttool.xpm"));
+ m_connections.insert(i, conn);
+ }
+ }
+ connectionView->setCurrentItem(connectionView->firstChild());
+ if (connectionView->currentItem())
+ connectionView->setSelected(connectionView->currentItem(), true);
+}
+
+void ConnectionEditor::fillWidgetList(KComboBox* a_combo, const QStringList& items, const QString& defaultWidget)
+{
+ a_combo->insertStringList(items);
+ for (int i = 0; i < a_combo->count(); ++i)
+ if (a_combo->text(i) == defaultWidget)
+ {
+ a_combo->setCurrentItem(i);
+ return;
+ }
+ if (a_combo->count())
+ a_combo->setCurrentItem(0);
+}
+
+#include "connectioneditorimpl.moc"
diff --git a/kommander/editor/connectioneditorimpl.h b/kommander/editor/connectioneditorimpl.h
new file mode 100644
index 00000000..95c6887b
--- /dev/null
+++ b/kommander/editor/connectioneditorimpl.h
@@ -0,0 +1,76 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef CONNECTIONEDITORIMPL_H
+#define CONNECTIONEDITORIMPL_H
+
+#include "connectioneditor.h"
+#include "metadatabase.h"
+
+#include <qmap.h>
+
+class QListViewItem;
+class FormWindow;
+
+class ConnectionEditor : public ConnectionEditorBase
+{
+Q_OBJECT public:
+ ConnectionEditor(QWidget* parent, QObject* sender, QObject* receiver, FormWindow* fw);
+ ~ConnectionEditor();
+
+protected slots:
+ // Add current pair <signal, slot> to the list
+ void connectClicked();
+ // Remove current pair <signal, slot> to the list
+ void disconnectClicked();
+ // Lists all connections defined in current dialog
+ void fillConnectionsList();
+ // Lists all widgets in sender or receiver combo
+ void fillWidgetList(KComboBox* a_combo, const QStringList& items, const QString& defaultWidget);
+ // Sender widget was changed - update signal list
+ void senderChanged(const QString & s);
+ // Receiver widget was changed - update slot list
+ void receiverChanged(const QString & s);
+ // Enable/disable 'Connect' button when pair <signal,slot> changes
+ void updateConnectButton();
+ // Enable/disable 'Disconnect' button when selection changes
+ void updateDisconnectButton();
+ // Accept and close button
+ void okClicked();
+ // Cancel and close button
+ void cancelClicked();
+
+private:
+ // Whether given signal should appear in the signal list
+ bool isSignalIgnored(const char*) const;
+ // Whether given slot should appear in the slot list
+ bool isSlotIgnored(const QMetaData* md);
+ // Finds widget by name
+ QObject* objectByName(const QString& s) const;
+ bool hasConnection(const QString & snder, const QString & signal,
+ const QString & rcvr, const QString & slot) const;
+ QMap <QListViewItem*, MetaDataBase::Connection> m_connections;
+ QValueList <MetaDataBase::Connection> m_oldConnections;
+ QObject* m_sender;
+ QObject* m_receiver;
+ FormWindow* m_formWindow;
+};
+
+#endif
diff --git a/kommander/editor/createtemplate.ui b/kommander/editor/createtemplate.ui
new file mode 100644
index 00000000..a6034d03
--- /dev/null
+++ b/kommander/editor/createtemplate.ui
@@ -0,0 +1,222 @@
+<!DOCTYPE UI><UI>
+<class>CreateTemplate</class><comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget>
+ <class>QDialog</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>CreateTemplate</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>347</width>
+ <height>248</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Create Template</string>
+ </property>
+ <property stdset="1">
+ <name>sizeGripEnabled</name>
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Template &amp;name:</string>
+ </property>
+ <property>
+ <name>buddy</name>
+ <cstring>editName</cstring>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>editName</cstring>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>Name of the new template</string>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Enter the name of the new template</string>
+ </property>
+ </widget>
+ <widget row="1" column="1" rowspan="2" colspan="1" >
+ <class>QListBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>listClass</cstring>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>Class of the new template</string>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Enter the name of the class which should be used as the template's base class</string>
+ </property>
+ </widget>
+ <widget row="3" column="0" rowspan="1" colspan="2" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer1</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>buttonCreate</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>C&amp;reate</string>
+ </property>
+ <property stdset="1">
+ <name>default</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Creates the new template</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>PushButton1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Cancel</string>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Closes the Dialog</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Baseclass for template:</string>
+ </property>
+ <property>
+ <name>buddy</name>
+ <cstring>listClass</cstring>
+ </property>
+ </widget>
+ <spacer row="2" column="0" >
+ <property>
+ <name>name</name>
+ <cstring>Spacer2</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonCreate</sender>
+ <signal>clicked()</signal>
+ <receiver>CreateTemplate</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton1</sender>
+ <signal>clicked()</signal>
+ <receiver>CreateTemplate</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+</UI>
diff --git a/kommander/editor/defs.cpp b/kommander/editor/defs.cpp
new file mode 100644
index 00000000..fdf06ce9
--- /dev/null
+++ b/kommander/editor/defs.cpp
@@ -0,0 +1,78 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "defs.h"
+
+int size_type_to_int( QSizePolicy::SizeType t )
+{
+ if ( t == QSizePolicy::Fixed )
+ return 0;
+ if ( t == QSizePolicy::Minimum )
+ return 1;
+ if ( t == QSizePolicy::Maximum )
+ return 2;
+ if ( t == QSizePolicy::Preferred )
+ return 3;
+ if ( t == QSizePolicy::MinimumExpanding )
+ return 4;
+ if ( t == QSizePolicy::Expanding )
+ return 5;
+ if ( t == QSizePolicy::Ignored )
+ return 6;
+ return 0;
+}
+
+QString size_type_to_string( QSizePolicy::SizeType t )
+{
+ if ( t == QSizePolicy::Fixed )
+ return "Fixed";
+ if ( t == QSizePolicy::Minimum )
+ return "Minimum";
+ if ( t == QSizePolicy::Maximum )
+ return "Maximum";
+ if ( t == QSizePolicy::Preferred )
+ return "Preferred";
+ if ( t == QSizePolicy::MinimumExpanding )
+ return "MinimumExpanding";
+ if ( t == QSizePolicy::Expanding )
+ return "Expanding";
+ if ( t == QSizePolicy::Ignored )
+ return "Ignored";
+ return 0;
+}
+
+QSizePolicy::SizeType int_to_size_type( int i )
+{
+ if ( i == 0 )
+ return QSizePolicy::Fixed;
+ if ( i == 1 )
+ return QSizePolicy::Minimum;
+ if ( i == 2 )
+ return QSizePolicy::Maximum;
+ if ( i == 3 )
+ return QSizePolicy::Preferred;
+ if ( i == 4 )
+ return QSizePolicy::MinimumExpanding;
+ if ( i == 5 )
+ return QSizePolicy::Expanding;
+ if ( i == 6 )
+ return QSizePolicy::Ignored;
+ return QSizePolicy::Preferred;
+}
diff --git a/kommander/editor/defs.h b/kommander/editor/defs.h
new file mode 100644
index 00000000..ade3fa4b
--- /dev/null
+++ b/kommander/editor/defs.h
@@ -0,0 +1,35 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef DEFS_H
+#define DEFS_H
+
+#include <qsizepolicy.h>
+#include <qstring.h>
+
+#define POINTER_TOOL 32000
+#define CONNECT_TOOL 32001
+#define ORDER_TOOL 32002
+
+int size_type_to_int( QSizePolicy::SizeType t );
+QString size_type_to_string( QSizePolicy::SizeType t );
+QSizePolicy::SizeType int_to_size_type( int i );
+
+#endif
diff --git a/kommander/editor/filechooser.cpp b/kommander/editor/filechooser.cpp
new file mode 100644
index 00000000..14bedb95
--- /dev/null
+++ b/kommander/editor/filechooser.cpp
@@ -0,0 +1,63 @@
+#include "filechooser.h"
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <kfiledialog.h>
+#include <qlayout.h>
+
+FileChooser::FileChooser( QWidget *parent, const char *name )
+ : QWidget( parent, name ), md( File )
+{
+ QHBoxLayout *layout = new QHBoxLayout( this );
+ layout->setMargin( 0 );
+
+ lineEdit = new QLineEdit( this, "filechooser_lineedit" );
+ layout->addWidget( lineEdit );
+
+ connect( lineEdit, SIGNAL( textChanged( const QString & ) ),
+ this, SIGNAL( fileNameChanged( const QString & ) ) );
+
+ button = new QPushButton( "...", this, "filechooser_button" );
+ button->setFixedWidth( button->fontMetrics().width( " ... " ) );
+ layout->addWidget( button );
+
+ connect( button, SIGNAL( clicked() ),
+ this, SLOT( chooseFile() ) );
+
+ setFocusProxy( lineEdit );
+}
+
+void FileChooser::setMode( Mode m )
+{
+ md = m;
+}
+
+FileChooser::Mode FileChooser::mode() const
+{
+ return md;
+}
+
+void FileChooser::setFileName( const QString &fn )
+{
+ lineEdit->setText( fn );
+}
+
+QString FileChooser::fileName() const
+{
+ return lineEdit->text();
+}
+
+void FileChooser::chooseFile()
+{
+ QString fn;
+ if ( mode() == File )
+ fn = KFileDialog::getOpenFileName( lineEdit->text(), QString::null, this );
+ else
+ fn = KFileDialog::getExistingDirectory( lineEdit->text(),this );
+
+ if ( !fn.isEmpty() ) {
+ lineEdit->setText( fn );
+ emit fileNameChanged( fn );
+ }
+}
+
+#include "filechooser.moc"
diff --git a/kommander/editor/filechooser.h b/kommander/editor/filechooser.h
new file mode 100644
index 00000000..e6bc98e3
--- /dev/null
+++ b/kommander/editor/filechooser.h
@@ -0,0 +1,42 @@
+#ifndef FILECHOOSER_H
+#define FILECHOOSER_H
+
+#include <qwidget.h>
+
+class QLineEdit;
+class QPushButton;
+
+class FileChooser : public QWidget
+{
+ Q_OBJECT
+
+ Q_ENUMS( Mode )
+ Q_PROPERTY( Mode mode READ mode WRITE setMode )
+ Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
+
+public:
+ FileChooser( QWidget *parent = 0, const char *name = 0);
+
+ enum Mode { File, Directory };
+
+ QString fileName() const;
+ Mode mode() const;
+
+public slots:
+ void setFileName( const QString &fn );
+ void setMode( Mode m );
+
+signals:
+ void fileNameChanged( const QString & );
+
+private slots:
+ void chooseFile();
+
+private:
+ QLineEdit *lineEdit;
+ QPushButton *button;
+ Mode md;
+
+};
+
+#endif
diff --git a/kommander/editor/formfile.cpp b/kommander/editor/formfile.cpp
new file mode 100644
index 00000000..645b04ef
--- /dev/null
+++ b/kommander/editor/formfile.cpp
@@ -0,0 +1,302 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+// Other includes
+#include "formfile.h"
+#include "timestamp.h"
+#include "formwindow.h"
+#include "command.h"
+#include "mainwindow.h"
+#include "resource.h"
+#include "workspace.h"
+
+// Qt includes
+#include <qfile.h>
+#include <qregexp.h>
+#include <qstatusbar.h>
+#include <qtimer.h>
+
+// KDE includes
+#include <kdebug.h>
+#include <kfiledialog.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstatusbar.h>
+#include <kstdguiitem.h>
+
+#include <sys/stat.h>
+
+FormFile::FormFile(const QString &fn, bool temp)
+ : filename(fn), fileNameTemp(temp), fw(0)
+{
+ QTimer::singleShot(0, this, SLOT(init()));
+}
+
+void FormFile::init()
+{
+ connect(this, SIGNAL(addedFormFile(FormFile *)), MainWindow::self->workspace(),
+ SLOT(formFileAdded(FormFile*)));
+ connect(this, SIGNAL(removedFormFile(FormFile *)), MainWindow::self->workspace(),
+ SLOT(formFileRemoved(FormFile*)));
+ emit addedFormFile(this);
+}
+
+FormFile::~FormFile()
+{
+ if (formWindow())
+ formWindow()->setFormFile(0);
+}
+
+void FormFile::setFormWindow(FormWindow *f)
+{
+ if (f == fw)
+ return;
+ if (fw)
+ fw->setFormFile(0);
+ fw = f;
+ if (fw)
+ fw->setFormFile(this);
+}
+
+void FormFile::setFileName(const QString &fn)
+{
+ if (fn == filename)
+ return;
+ if (fn.isEmpty()) {
+ fileNameTemp = true;
+ if (filename.find("unnamed"))
+ filename = createUnnamedFileName();
+ return;
+ }
+ filename = fn;
+}
+
+FormWindow *FormFile::formWindow() const
+{
+ return fw;
+}
+
+QString FormFile::fileName() const
+{
+ return filename;
+}
+
+QString FormFile::absFileName() const
+{
+ return filename;
+}
+
+
+bool FormFile::save(bool withMsgBox)
+{
+ if (!formWindow())
+ return true;
+ if (fileNameTemp)
+ return saveAs();
+ if (!isModified())
+ return true;
+ else if (withMsgBox && !formWindow()->checkCustomWidgets())
+ return false;
+
+ Resource resource(MainWindow::self);
+ resource.setWidget(formWindow());
+ if (!resource.save(filename, false))
+ {
+ if (KMessageBox::questionYesNo(MainWindow::self, i18n("Failed to save file '%1'.\n"
+ "Do you want to use another file name?").arg(filename), QString::null, i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
+ return saveAs();
+ else
+ return false;
+ }
+ MainWindow::self->statusBar()->message(i18n("'%1' saved.").arg(filename), 3000);
+ ::chmod(filename.local8Bit(), S_IRWXU);
+ setModified(false);
+ return true;
+}
+
+bool FormFile::saveAs()
+{
+ QString f = fileName();
+ if(fileNameTemp)
+ f = QString(formWindow()->name()).lower() + ".kmdr";
+ bool saved = false;
+ while (!saved) {
+ QString fn = KFileDialog::getSaveFileName(QString::null,
+ i18n("*.kmdr|Kommander Files"), MainWindow::self,
+ i18n("Save Form '%1' As").arg(formWindow()->name()));
+ if (fn.isEmpty())
+ return false;
+ QFileInfo fi(fn);
+ if (fi.extension() != "kmdr")
+ fn += ".kmdr";
+ fileNameTemp = false;
+ filename = fn;
+
+ QFileInfo relfi(filename);
+ if (relfi.exists()) {
+ if (KMessageBox::warningContinueCancel(MainWindow::self,
+ i18n("The file already exists. Do you wish to overwrite it?"),
+ i18n("Overwrite File?"), i18n("Overwrite")) == KMessageBox::Continue)
+ saved = true;
+ else
+ filename = f;
+ }
+ else
+ saved = true;
+ }
+ setModified(true);
+ return save();
+}
+
+bool FormFile::close()
+{
+ if (formWindow())
+ return formWindow()->close();
+ return true;
+}
+
+bool FormFile::closeEvent()
+{
+ if (!isModified())
+ {
+ emit removedFormFile(this);
+ QFile f(filename + ".backup");
+ f.remove();
+ return true;
+ }
+
+ switch (KMessageBox::warningYesNoCancel(MainWindow::self, i18n("Dialog '%1' was modified."
+ "Do you want to save it?").arg(filename), i18n("Save File?"), KStdGuiItem::save(), KStdGuiItem::discard())) {
+ case KMessageBox::Yes:
+ if (!save())
+ return false;
+ case KMessageBox::No: //fall through
+ MainWindow::self->workspace()->update();
+ break;
+ case KMessageBox::Cancel:
+ return false;
+ default:
+ break;
+ }
+
+ emit removedFormFile(this);
+ setModified(false);
+ QFile f(filename + ".backup");
+ f.remove();
+ return true;
+}
+
+void FormFile::setModified(bool m)
+{
+ setFormWindowModified(m);
+}
+
+bool FormFile::isModified()
+{
+ return isFormWindowModified();
+}
+
+bool FormFile::isFormWindowModified() const
+{
+ if (!formWindow() || !formWindow()->commandHistory())
+ return false;
+ return formWindow()->commandHistory()->isModified();
+}
+
+void FormFile::setFormWindowModified(bool m)
+{
+ if (m == isFormWindowModified() || !formWindow() || !formWindow()->commandHistory())
+ return;
+ formWindow()->commandHistory()->setModified(m);
+ emit somethingChanged(this);
+}
+
+void FormFile::showFormWindow()
+{
+ if (formWindow())
+ {
+ formWindow()->setFocus();
+ return;
+ }
+ MainWindow::self->openFormWindow(filename, true, this);
+}
+
+
+static int ui_counter = 0;
+QString FormFile::createUnnamedFileName()
+{
+ return i18n("unnamed") + QString::number(++ui_counter) + QString(".kmdr");
+}
+
+QString FormFile::formName() const
+{
+ FormFile* that = (FormFile*) this;
+ if (formWindow()) {
+ that->cachedFormName = formWindow()->name();
+ return cachedFormName;
+ }
+ if (!cachedFormName.isNull())
+ return cachedFormName;
+ QFile f(filename);
+ if (f.open(IO_ReadOnly))
+ {
+ QTextStream ts(&f);
+ QString line;
+ QString className;
+ while (!ts.eof())
+ {
+ line = ts.readLine();
+ if (!className.isEmpty())
+ {
+ int end = line.find("</class>");
+ if (end == -1)
+ className += line;
+ else
+ {
+ className += line.left(end);
+ break;
+ }
+ continue;
+ }
+ int start;
+ if ((start = line.find("<class>")) != -1)
+ {
+ int end = line.find("</class>");
+ if (end == -1)
+ className = line.mid(start + 7);
+ else
+ {
+ className = line.mid(start + 7, end - (start + 7));
+ break;
+ }
+ }
+ }
+ that->cachedFormName = className;
+ }
+ if (cachedFormName.isEmpty())
+ that->cachedFormName = filename;
+ return cachedFormName;
+}
+
+void FormFile::formWindowChangedSomehow()
+{
+ emit somethingChanged(this);
+}
+
+#include "formfile.moc"
diff --git a/kommander/editor/formfile.h b/kommander/editor/formfile.h
new file mode 100644
index 00000000..39fecc67
--- /dev/null
+++ b/kommander/editor/formfile.h
@@ -0,0 +1,74 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. �All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#ifndef FORMFILE_H
+#define FORMFILE_H
+
+#include <qobject.h>
+#include "timestamp.h"
+#include "metadatabase.h"
+
+class FormWindow;
+
+class FormFile : public QObject
+{
+ Q_OBJECT
+
+public:
+ FormFile(const QString &fn, bool temp);
+ ~FormFile();
+
+ void setFormWindow( FormWindow *f );
+ void setFileName( const QString &fn );
+ void setModified(bool m);
+ FormWindow *formWindow() const;
+ QString fileName() const;
+ QString absFileName() const;
+ bool save( bool withMsgBox = TRUE );
+ bool saveAs();
+ bool close();
+ bool closeEvent();
+ bool isModified();
+ void showFormWindow();
+ static QString createUnnamedFileName();
+ QString formName() const;
+ bool hasTempFileName() const {return fileNameTemp;}
+
+signals:
+ void addedFormFile(FormFile*);
+ void removedFormFile(FormFile*);
+ void somethingChanged(FormFile*);
+
+private slots:
+ void formWindowChangedSomehow();
+ void init();
+
+private:
+ bool isFormWindowModified() const;
+ void setFormWindowModified( bool m );
+
+private:
+ QString filename;
+ bool fileNameTemp;
+ FormWindow *fw;
+ QString cachedFormName;
+
+};
+
+#endif
diff --git a/kommander/editor/formsettings.ui b/kommander/editor/formsettings.ui
new file mode 100644
index 00000000..321de024
--- /dev/null
+++ b/kommander/editor/formsettings.ui
@@ -0,0 +1,338 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>FormSettingsBase</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>FormSettingsBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>497</width>
+ <height>490</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Form Settings</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Form Settings&lt;/b&gt;&lt;p&gt;Change settings for the form. Settings like &lt;b&gt;Comment&lt;/b&gt; and &lt;b&gt;Author&lt;/b&gt; are for your own use and are not required.&lt;/p&gt;</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="2" 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>
+ <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="KPushButton">
+ <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>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>GroupBox2</cstring>
+ </property>
+ <property name="title">
+ <string>La&amp;youts</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="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>spinMargin</cstring>
+ </property>
+ <property name="value">
+ <number>11</number>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>spinSpacing</cstring>
+ </property>
+ <property name="value">
+ <number>6</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Default mar&amp;gin:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>spinMargin</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>D&amp;efault spacing:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>spinSpacing</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>Box</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="title">
+ <string>&amp;Settings</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="QMultiLineEdit" row="3" column="1" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>editComment</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter a comment about the form.</string>
+ </property>
+ </widget>
+ <spacer row="4" 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>130</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Co&amp;mment:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>editComment</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;License:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>editAuthor</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>editLicense</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enter your name</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter your name.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2_3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Version:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>editAuthor</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>A&amp;uthor:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>editAuthor</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>editAuthor</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enter your name</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter your name.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>editVersion</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enter your name</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter your name.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>FormSettingsBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>FormSettingsBase</receiver>
+ <slot>okClicked()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>editAuthor</tabstop>
+ <tabstop>editVersion</tabstop>
+ <tabstop>editLicense</tabstop>
+ <tabstop>editComment</tabstop>
+ <tabstop>spinMargin</tabstop>
+ <tabstop>spinSpacing</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<slots>
+ <slot>okClicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klineedit.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>klineedit.h</includehint>
+</includehints>
+</UI>
diff --git a/kommander/editor/formsettingsimpl.cpp b/kommander/editor/formsettingsimpl.cpp
new file mode 100644
index 00000000..4daec8ba
--- /dev/null
+++ b/kommander/editor/formsettingsimpl.cpp
@@ -0,0 +1,58 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2005 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#include "formsettingsimpl.h"
+#include "formwindow.h"
+#include "metadatabase.h"
+#include "command.h"
+#include "asciivalidator.h"
+#include "mainwindow.h"
+
+#include <qmultilineedit.h>
+#include <klineedit.h>
+#include <qspinbox.h>
+
+FormSettings::FormSettings( QWidget *parent, FormWindow *fw )
+ : FormSettingsBase( parent, 0, true ), formwindow( fw )
+{
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(fw);
+ editAuthor->setText(info.author);
+ editVersion->setText(info.version);
+ editLicense->setText(info.license);
+ editComment->setText(info.comment);
+ spinSpacing->setValue(formwindow->layoutDefaultSpacing());
+ spinMargin->setValue(formwindow->layoutDefaultMargin());
+}
+
+void FormSettings::okClicked()
+{
+ MetaDataBase::MetaInfo info;
+ info.author = editAuthor->text();
+ info.version = editVersion->text();
+ info.license = editLicense->text();
+ info.comment = editComment->text();
+ MetaDataBase::setMetaInfo(formwindow, info);
+ formwindow->commandHistory()->setModified(true);
+
+ formwindow->setLayoutDefaultSpacing(spinSpacing->value());
+ formwindow->setLayoutDefaultMargin(spinMargin->value());
+ accept();
+}
+
+#include "formsettingsimpl.moc"
+
diff --git a/kommander/editor/formsettingsimpl.h b/kommander/editor/formsettingsimpl.h
new file mode 100644
index 00000000..f33c2194
--- /dev/null
+++ b/kommander/editor/formsettingsimpl.h
@@ -0,0 +1,43 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef FORMSETTINGSIMPL_H
+#define FORMSETTINGSIMPL_H
+
+#include "formsettings.h"
+
+class FormWindow;
+
+class FormSettings : public FormSettingsBase
+{
+ Q_OBJECT
+
+public:
+ FormSettings( QWidget *parent, FormWindow *fw );
+
+protected slots:
+ void okClicked();
+
+private:
+ FormWindow *formwindow;
+
+};
+
+#endif
diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp
new file mode 100644
index 00000000..0aa9b122
--- /dev/null
+++ b/kommander/editor/formwindow.cpp
@@ -0,0 +1,2609 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+// Qt includes
+#include <qaccel.h>
+#include <qapplication.h>
+#include <qbitmap.h>
+#include <qevent.h>
+#include <qfeatures.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qmap.h>
+#include <qmetaobject.h>
+#include <qobjectlist.h>
+#include <qpainter.h>
+#include <qpalette.h>
+#include <qpen.h>
+#include <qpixmapcache.h>
+#include <qpopupmenu.h>
+#include <qpushbutton.h>
+#include <qsizegrip.h>
+#include <qspinbox.h>
+#include <qstatusbar.h>
+#include <qtimer.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+// KDE includes
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstatusbar.h>
+
+// Other includes
+#include "formwindow.h"
+#include "defs.h"
+#include "mainwindow.h"
+#include "widgetfactory.h"
+#include "sizehandle.h"
+#include "metadatabase.h"
+#include "resource.h"
+#include "layout.h"
+#include "connectioneditorimpl.h"
+#include "widgetdatabase.h"
+#include "pixmapchooser.h"
+#include "orderindicator.h"
+#include "hierarchyview.h"
+
+#include "globaldefs.h"
+#include "formfile.h"
+
+#include <stdlib.h>
+
+
+static void setCursorToAll(const QCursor &c, QWidget *start)
+{
+ start->setCursor(c);
+ QObjectList *l = (QObjectList*)start->children();
+ if (l)
+ for (QObject *o = l->first(); o; o = l->next())
+ {
+ if (o->isWidgetType() && !o->inherits("SizeHandle"))
+ setCursorToAll(c, ((QWidget*)o));
+ }
+}
+
+static void restoreCursors(QWidget *start, FormWindow *fw)
+{
+ if (fw->widgets()->find(start))
+ start->setCursor(MetaDataBase::cursor(start));
+ else
+ start->setCursor(Qt::ArrowCursor);
+ QObjectList *l = (QObjectList*)start->children();
+ if (l)
+ for (QObject *o = l->first(); o; o = l->next())
+ {
+ if (o->isWidgetType() && !o->inherits("SizeHandle"))
+ restoreCursors(((QWidget*)o), fw);
+ }
+}
+
+
+/*
+ The FormWindow is the widget which is used as editor for forms. It
+ handles inserting, deleting, moving, resizing, etc. of widgets.
+
+ Normally multiple formwindows are used at the same time in the
+ Designer. So each formwindow has its own undo/redo buffer, etc.
+
+ Also the formwindow has some signals to inform e.g. about selection
+ changes which is interesting for the PropertyEditor.
+
+ For handling the events of the child widgets (moving, etc.) the
+ handleMousePress(), etc. functions are called from the application
+ event filter which is implemented in MainWindow::eventFilter().
+*/
+
+FormWindow::FormWindow(FormFile *f, MainWindow *mw, QWidget *parent, const char *name)
+ : QWidget(parent, name, WDestructiveClose), mainwindow(mw),
+ commands(100), pixInline(true)
+{
+ ff = f;
+ init();
+ initSlots();
+}
+
+FormWindow::FormWindow(FormFile *f, QWidget *parent, const char *name)
+ : QWidget(parent, name, WDestructiveClose), mainwindow(0),
+ commands(100), pixInline(true)
+{
+ ff = f;
+ init();
+}
+
+void FormWindow::init()
+{
+ MetaDataBase::addEntry(this);
+ ff->setFormWindow(this);
+ propertyWidget = 0;
+ toolFixed = false;
+ checkedSelectionsForMove = false;
+ mContainer = 0;
+ connectSender = connectReceiver = 0;
+ currTool = POINTER_TOOL;
+ unclippedPainter = 0;
+ widgetPressed = false;
+ drawRubber = false;
+ setFocusPolicy(ClickFocus);
+ sizePreviewLabel = 0;
+ checkSelectionsTimer = new QTimer(this, "checkSelectionsTimer");
+ connect(checkSelectionsTimer, SIGNAL(timeout()),
+ this, SLOT(invalidCheckedSelections()));
+ updatePropertiesTimer = new QTimer(this);
+ connect(updatePropertiesTimer, SIGNAL(timeout()),
+ this, SLOT(updatePropertiesTimerDone()));
+ showPropertiesTimer = new QTimer(this);
+ connect(showPropertiesTimer, SIGNAL(timeout()),
+ this, SLOT(showPropertiesTimerDone()));
+ selectionChangedTimer = new QTimer(this);
+ connect(selectionChangedTimer, SIGNAL(timeout()),
+ this, SLOT(selectionChangedTimerDone()));
+ insertParent = 0;
+ connect(&commands, SIGNAL(undoRedoChanged(bool, bool, const QString &, const QString &)),
+ this, SIGNAL(undoRedoChanged(bool, bool, const QString &, const QString &)));
+ propShowBlocked = false;
+
+ setIcon(PixmapChooser::loadPixmap("form.xpm", PixmapChooser::Mini));
+
+ connect(&commands, SIGNAL(modificationChanged(bool)),
+ this, SLOT(modificationChanged(bool)));
+ buffer = 0;
+
+ QWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("QFrame"), this);
+ setMainContainer(w);
+ propertyWidget = w;
+ targetContainer = 0;
+ hadOwnPalette = false;
+
+ defSpacing = BOXLAYOUT_DEFAULT_SPACING;
+ defMargin = BOXLAYOUT_DEFAULT_MARGIN;
+}
+
+void FormWindow::setMainWindow(MainWindow *w)
+{
+ mainwindow = w;
+ MetaDataBase::addEntry(this);
+ initSlots();
+}
+
+void FormWindow::initSlots()
+{
+}
+
+FormWindow::~FormWindow()
+{
+ if (MainWindow::self->objectHierarchy()->formWindow() == this)
+ MainWindow::self->objectHierarchy()->setFormWindow(0, 0);
+ MetaDataBase::clear(this);
+ if (ff)
+ ff->setFormWindow(0);
+}
+
+void FormWindow::closeEvent(QCloseEvent *e)
+{
+ if (ff->closeEvent() && mainwindow->unregisterClient(this))
+ e->accept();
+ else
+ e->ignore();
+}
+
+void FormWindow::paintGrid(QWidget *w, QPaintEvent *e)
+{
+ if (!mainWindow()->showGrid())
+ return;
+ QPixmap grid;
+ QString grid_name;
+ grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y());
+ if(!QPixmapCache::find(grid_name, grid)) {
+ grid = QPixmap(350 + (350 % mainWindow()->grid().x()), 350 + (350 % mainWindow()->grid().y()));
+ grid.fill(colorGroup().color(QColorGroup::Foreground));
+ QBitmap mask(grid.width(), grid.height());
+ mask.fill(color0);
+ QPainter p(&mask);
+ p.setPen(color1);
+ for (int y = 0; y < grid.width(); y += mainWindow()->grid().y())
+ for (int x = 0; x < grid.height(); x += mainWindow()->grid().x())
+ p.drawPoint(x, y);
+ grid.setMask(mask);
+ QPixmapCache::insert(grid_name, grid);
+ }
+ QPainter p(w);
+ p.setClipRegion(e->rect());
+ p.drawTiledPixmap(QRect(0, 0, width(), height()), grid);
+}
+
+
+/*For operations like drawing a rubber band or drawing the rect
+ when inserting a new widget, a unclipped painter (which draws also
+ on child widgets) is needed. This method does all the initialization.
+*/
+
+void FormWindow::beginUnclippedPainter(bool doNot)
+{
+ endUnclippedPainter();
+ bool unclipped = testWFlags(WPaintUnclipped);
+ setWFlags(WPaintUnclipped);
+ unclippedPainter = new QPainter;
+ unclippedPainter->begin(this);
+ if (!unclipped)
+ clearWFlags(WPaintUnclipped);
+ if (doNot)
+ {
+ unclippedPainter->setPen(QPen(color0, 2));
+ unclippedPainter->setRasterOp(NotROP);
+ }
+}
+
+void FormWindow::endUnclippedPainter()
+{
+ if (unclippedPainter)
+ unclippedPainter->end();
+ delete unclippedPainter;
+ unclippedPainter = 0;
+}
+
+QPoint FormWindow::gridPoint(const QPoint &p)
+{
+ return QPoint((p.x() / grid().x()) * grid().x(),
+ (p.y() / grid().y()) * grid().y());
+}
+
+void FormWindow::drawSizePreview(const QPoint &pos, const QString& text)
+{
+ unclippedPainter->save();
+ unclippedPainter->setPen(QPen(colorGroup().foreground(), 1 ));
+ unclippedPainter->setRasterOp(CopyROP);
+ if (!sizePreviewPixmap.isNull())
+ unclippedPainter->drawPixmap(sizePreviewPos, sizePreviewPixmap);
+ if (text.isNull()) {
+ sizePreviewPixmap = QPixmap(); // set null again
+ unclippedPainter->restore();
+ return;
+ }
+ QRect r = fontMetrics().boundingRect(0, 0, 0, 0, AlignCenter, text);
+ r = QRect(pos + QPoint(10, 10), r.size() + QSize(5, 5));
+
+ checkPreviewGeometry(r);
+
+ sizePreviewPos = r.topLeft();
+ sizePreviewPixmap = QPixmap::grabWindow(winId(), r.x(), r.y(), r.width(), r.height());
+ unclippedPainter->setBrush(QColor(255, 255, 128));
+ unclippedPainter->drawRect(r);
+ unclippedPainter->drawText(r, AlignCenter, text);
+ unclippedPainter->restore();
+}
+
+void FormWindow::insertWidget()
+{
+ if (!insertParent || currTool == POINTER_TOOL)
+ return;
+
+ bool useSizeHint = !oldRectValid || (currRect.width() < 2 && currRect.height() < 2);
+ Orientation orient = Horizontal;
+ QString n = WidgetDatabase::className(currTool);
+ if (useSizeHint && (n == "Spacer" || n == "QSlider" || n == "Line" || n == "QScrollBar")) {
+ QPopupMenu m(mainWindow());
+ m.insertItem(i18n("&Horizontal"));
+ int ver = m.insertItem(i18n("&Vertical"));
+ int r = m.exec(QCursor::pos());
+ if (r == ver)
+ orient = Vertical;
+ }
+
+ QWidget *w = WidgetFactory::create(currTool, insertParent, 0, true, &currRect, orient);
+ if (!w)
+ return;
+
+ if (!savePixmapInline() && currTool == WidgetDatabase::idFromClassName("PixmapLabel"))
+ ((QLabel*)w)->setPixmap(PixmapChooser::loadPixmap("image.xpm"));
+ int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w));
+ if (WidgetDatabase::isCustomWidget(id)) {
+ QWhatsThis::add(w, i18n("<b>A %1 (custom widget)</b> "
+ "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
+ "menu to add and change custom widgets. You can add "
+ "properties as well as signals and slots to integrate custom widgets into "
+ "<i>Qt Designer</i>, and provide a pixmap which will be used to represent "
+ "the widget on the form.</p>")
+ .arg(WidgetDatabase::toolTip(id)));
+ QToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id)));
+ }
+ else
+ {
+ QString tt = WidgetDatabase::toolTip(id);
+ QString wt = WidgetDatabase::whatsThis(id);
+ if (!wt.isEmpty() && !tt.isEmpty())
+ QWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
+ }
+
+ QString s = w->name();
+ unify(w, s, true);
+ w->setName(s);
+ insertWidget(w);
+ QRect r(currRect);
+ if (!oldRectValid || (currRect.width() < 2 && currRect.height() < 2))
+ r = QRect(rectAnchor, QSize(0, 0));
+
+ QPoint p = r.topLeft();
+ p = mapToGlobal(p);
+ p = insertParent->mapFromGlobal(p);
+ r = QRect(p, r.size());
+ if (useSizeHint)
+ {
+ r.setWidth(w->sizeHint().width());
+ r.setHeight(w->sizeHint().height());
+ }
+
+ if (r.width() < 2 * grid().x())
+ r.setWidth(2 * grid().x());
+ if (r.height() < 2 * grid().y())
+ r.setHeight(2 * grid().y());
+
+ const QObjectList *l = insertParent->children();
+ QObjectListIt it(*l);
+ QWidgetList lst;
+ if (WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))))
+ for (; it.current();) {
+ QObject *o = it.current();
+ ++it;
+ if (o->isWidgetType() && ((QWidget*)o)->isVisibleTo(this) &&
+ insertedWidgets.find((QWidget*)o) && o != w)
+ {
+ QRect r2(((QWidget*)o)->pos(), ((QWidget*)o)->size());
+ if (r.contains(r2))
+ lst.append((QWidget*)o);
+ }
+ }
+
+ if (!lst.isEmpty())
+ {
+ QWidget *pw = WidgetFactory::containerOfWidget(w);
+ QValueList<QPoint> op, np;
+ for (QWidget *i = lst.first(); i; i = lst.next())
+ {
+ op.append(i->pos());
+ QPoint pos = pw->mapFromGlobal(i->mapToGlobal(QPoint(0, 0)));
+ pos -= r.topLeft();
+ np.append(pos);
+ }
+ MoveCommand *mv = new MoveCommand(i18n("Reparent Widgets"), this, lst, op, np, insertParent, pw);
+ if (!toolFixed)
+ mainwindow->resetTool();
+ else
+ setCursorToAll(CrossCursor, w);
+
+ InsertCommand *cmd = new InsertCommand(i18n("Insert %1").arg(w->name()), this, w, r);
+
+ QPtrList<Command> commands;
+ commands.append(mv);
+ commands.append(cmd);
+
+ MacroCommand *mc = new MacroCommand(i18n("Insert %1").arg(w->name()), this, commands);
+ commandHistory()->addCommand(mc);
+ mc->execute();
+ }
+ else
+ {
+ if (!toolFixed)
+ mainwindow->resetTool();
+ else
+ setCursorToAll(CrossCursor, w);
+
+ InsertCommand *cmd = new InsertCommand(i18n("Insert %1").arg(w->name()), this, w, r);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+ }
+}
+
+void FormWindow::insertWidget(QWidget *w, bool checkName)
+{
+ if (checkName) {
+ QString s = w->name();
+ unify(w, s, true);
+ w->setName(s);
+ }
+
+ MetaDataBase::addEntry(w);
+ int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w));
+ if (WidgetDatabase::isCustomWidget(id))
+ {
+ QWhatsThis::add(w, i18n("<b>A %1 (custom widget)</b> "
+ "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
+ "menu to add and change custom widgets. You can add "
+ "properties as well as signals and slots to integrate custom widgets into "
+ "<i>Qt Designer</i>, and provide a pixmap which will be used to represent "
+ "the widget on the form.</p>")
+ .arg(WidgetDatabase::toolTip(id)));
+ QToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id)));
+ }
+ else
+ {
+ QString tt = WidgetDatabase::toolTip(id);
+ QString wt = WidgetDatabase::whatsThis(id);
+ if (!wt.isEmpty() && !tt.isEmpty())
+ QWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
+ }
+
+ restoreCursors(w, this);
+ widgets()->insert(w, w);
+ w->show();
+}
+
+void FormWindow::removeWidget(QWidget *w)
+{
+ MetaDataBase::removeEntry(w);
+ widgets()->take(w);
+}
+
+void FormWindow::handleContextMenu(QContextMenuEvent *e, QWidget *w)
+{
+ switch (currTool) {
+ case POINTER_TOOL:
+ if (!isMainContainer(w) && qstrcmp(w->name(), "central widget"))
+ { // press on a child widget
+ raiseChildSelections(w); // raise selections and select widget
+ selectWidget(w);
+ // if widget is laid out, find the first non-laid out super-widget
+ QWidget *realWidget = w; // but store the original one
+ while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) !=
+ WidgetFactory::NoLayout || !insertedWidgets.find(w)))
+ w = w->parentWidget();
+ if (mainContainer()->inherits("QMainWindow") &&
+ ((QMainWindow*)mainContainer())->centralWidget() == realWidget)
+ {
+ e->accept();
+ mainwindow->popupFormWindowMenu(e->globalPos(), this);
+ }
+ else
+ {
+ e->accept();
+ mainwindow->popupWidgetMenu(e->globalPos(), this, realWidget);
+ }
+ }
+ else
+ {
+ e->accept();
+ clearSelection();
+ mainwindow->popupFormWindowMenu(e->globalPos(), this);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w)
+{
+ checkedSelectionsForMove = false;
+ checkSelectionsTimer->stop();
+ if (!sizePreviewLabel) {
+ sizePreviewLabel = new QLabel(this);
+ sizePreviewLabel->hide();
+ sizePreviewLabel->setBackgroundColor(QColor(255, 255, 128));
+ sizePreviewLabel->setFrameStyle(QFrame::Plain | QFrame::Box);
+ }
+
+ switch (currTool) {
+ case POINTER_TOOL:
+ if (!isMainContainer(w) && qstrcmp(w->name(), "central widget") != 0)
+ { // press on a child widget
+ // if the clicked widget is not in a layout, raise it
+ if (!w->parentWidget() || WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout)
+ w->raise();
+ if ((e->state() & ControlButton))
+ { // with control pressed, always start rubber band selection
+ drawRubber = true;
+ currRect = QRect(0, 0, -1, -1);
+ startRectDraw(mapFromGlobal(e->globalPos()), e->globalPos(), this, Rubber);
+ break;
+ }
+
+ bool sel = isWidgetSelected(w);
+ if (!((e->state() & ControlButton) || (e->state() & ShiftButton)))
+ { // control not pressed...
+ if (!sel) // ...and widget no selectted: unselect all
+ clearSelection(false);
+ else
+ { // ...widget selected
+ // only if widget has a layout (it is a layout meta widget or a laid out container!),
+ // unselect its childs
+ if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout)
+ {
+ QObjectList *l = w->queryList("QWidget");
+ setPropertyShowingBlocked(true);
+ for (QObject *o = l->first(); o; o = l->next())
+ {
+ if (!o->isWidgetType())
+ continue;
+ if (insertedWidgets.find((QWidget*)o))
+ selectWidget((QWidget*)o, false);
+ }
+ setPropertyShowingBlocked(false);
+ delete l;
+ }
+ }
+ qApp->processEvents();
+ }
+ if (((e->state() & ControlButton) || (e->state() & ShiftButton)) &&
+ sel && e->button() == LeftButton)
+ { // control pressed and selected, unselect widget
+ selectWidget(w, false);
+ break;
+ }
+
+ raiseChildSelections(w); // raise selections and select widget
+ selectWidget(w);
+
+ // if widget is laid out, find the first non-laid out super-widget
+ while (w->parentWidget() &&
+ (WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout
+ || !insertedWidgets.find(w)))
+ w = w->parentWidget();
+
+ if (e->button() == LeftButton)
+ { // left button: store original geometry and more as the widget might start moving
+ widgetPressed = true;
+ widgetGeom = QRect(w->pos(), w->size());
+ oldPressPos = w->mapFromGlobal(e->globalPos());
+ origPressPos = oldPressPos;
+ checkedSelectionsForMove = false;
+ moving.clear();
+ if (w->parentWidget() && !isMainContainer(w->parentWidget()) &&
+ !isCentralWidget(w->parentWidget()))
+ {
+ targetContainer = w->parentWidget();
+ hadOwnPalette = w->parentWidget()->ownPalette();
+ restorePalette = w->parentWidget()->palette();
+ }
+ }
+ }
+ else
+ { // press was on the formwindow
+ if (e->button() == LeftButton)
+ { // left button: start rubber selection and show formwindow properties
+ drawRubber = true;
+ if (!((e->state() & ControlButton) || (e->state() & ShiftButton)))
+ {
+ clearSelection(false);
+ QObject *opw = propertyWidget;
+ propertyWidget = mainContainer();
+ if (opw->isWidgetType())
+ repaintSelection((QWidget*)opw);
+ }
+ currRect = QRect(0, 0, -1, -1);
+ startRectDraw(mapFromGlobal(e->globalPos()), e->globalPos(), this, Rubber);
+ }
+ }
+ break;
+ case CONNECT_TOOL:
+ if (e->button() != LeftButton)
+ break;
+ saveBackground();
+ mainWindow()->statusBar()->message(i18n("Connect '%1' with...").arg(w->name()));
+ connectStartPos = mapFromGlobal(e->globalPos());
+ currentConnectPos = mapFromGlobal(e->globalPos());
+ connectSender = designerWidget(w);
+ connectReceiver = connectableObject(designerWidget(w), connectReceiver);
+ beginUnclippedPainter(false);
+ drawConnectLine();
+ break;
+ case ORDER_TOOL:
+ if (!isMainContainer(w))
+ { // press on a child widget
+ orderedWidgets.removeRef(w);
+ orderedWidgets.append(w);
+ for (QWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev())
+ {
+ int i = stackedWidgets.findRef(wid);
+ if (i != -1)
+ {
+ stackedWidgets.removeRef(wid);
+ stackedWidgets.insert(0, wid);
+ }
+ }
+ QWidgetList oldl = MetaDataBase::tabOrder(this);
+ TabOrderCommand *cmd = new TabOrderCommand(i18n("Change Tab Order"), this,
+ oldl, stackedWidgets);
+ cmd->execute();
+ commandHistory()->addCommand(cmd, true);
+ updateOrderIndicators();
+ }
+ break;
+ default: // any insert widget tool
+ if (e->button() == LeftButton)
+ {
+ insertParent = WidgetFactory::containerOfWidget(mainContainer());
+ // default parent for new widget is the formwindow
+ if (!isMainContainer(w))
+ { // press was not on formwindow, check if we can find another parent
+ QWidget *wid = w;
+ for (;;)
+ {
+ int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(wid));
+ if ((WidgetDatabase::isContainer(id) || wid == mainContainer()) &&
+ !wid->inherits("QLayoutWidget") && !wid->inherits("QSplitter"))
+ {
+ insertParent = WidgetFactory::containerOfWidget(wid); // found another parent, store it
+ break;
+ }
+ else
+ {
+ wid = wid->parentWidget();
+ if (!wid)
+ break;
+ }
+ }
+ }
+ startRectDraw(w->mapFromGlobal(e->globalPos()), e->globalPos(), w, Insert);
+ }
+ break;
+ }
+}
+
+void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *w)
+{
+ switch (currTool) {
+ case ORDER_TOOL:
+ if (!isMainContainer(w))
+ { // press on a child widget
+ orderedWidgets.clear();
+ orderedWidgets.append(w);
+ for (QWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev())
+ {
+ int i = stackedWidgets.findRef(wid);
+ if (i != -1)
+ {
+ stackedWidgets.removeRef(wid);
+ stackedWidgets.insert(0, wid);
+ }
+ }
+ QWidgetList oldl = MetaDataBase::tabOrder(this);
+ TabOrderCommand *cmd = new TabOrderCommand(i18n("Change Tab Order"), this, oldl, stackedWidgets);
+ cmd->execute();
+ commandHistory()->addCommand(cmd, true);
+ updateOrderIndicators();
+ }
+ default:
+ break;
+ }
+}
+
+void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w)
+{
+ if ((e->state() & LeftButton) != LeftButton)
+ return;
+
+ QWidget *newReceiver = (QWidget*)connectReceiver, *oldReceiver = (QWidget*)connectReceiver, *wid;
+ bool drawRecRect;
+ switch (currTool) {
+ case POINTER_TOOL:
+ if (widgetPressed && allowMove(w))
+ { // we are prepated for a move
+ // if widget is laid out, find the first non-laid out super-widget
+ while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) !=
+ WidgetFactory::NoLayout || !insertedWidgets.find(w)))
+ w = w->parentWidget();
+ // calc correct position
+ QPoint pos = w->mapFromGlobal(e->globalPos());
+ // calc move distance and store it
+ QPoint d = oldPressPos - pos;
+ if (QABS(d.x()) < grid().x())
+ d.setX(0);
+ if (QABS(d.y()) < grid().y())
+ d.setY(0);
+ if (d.x() == 0)
+ pos.setX(oldPressPos.x());
+ if (d.y() == 0)
+ pos.setY(oldPressPos.y());
+ oldPressPos = pos;
+ // snap to grid
+ int x = widgetGeom.x() - d.x();
+ widgetGeom.setX(x);
+ x = (x / grid().x()) * grid().x();
+ int y = widgetGeom.y() - d.y();
+ widgetGeom.setY(y);
+ y = (y / grid().y()) * grid().y();
+ QPoint p = w->pos();
+
+ if (x - p.x() || y - p.y())
+ { // if we actually have to move
+ if (!checkedSelectionsForMove)
+ { // if not checked yet, check if the correct widget are selected...
+ if (!isWidgetSelected(w))
+ { // and unselect others. Only siblings can be moved at the same time
+ setPropertyShowingBlocked(true);
+ selectWidget(w);
+ setPropertyShowingBlocked(false);
+ }
+ checkSelectionsForMove(w);
+ }
+ // check whether we would have to reparent the selection and
+ // highlight the possible new parent container
+ QMapConstIterator<ulong, QPoint> it = moving.begin();
+ QWidget* wa = containerAt(e->globalPos(), ((QWidget*)it.key()));
+ if (wa && !isMainContainer(wa) && !isCentralWidget(wa))
+ {
+ wa = WidgetFactory::containerOfWidget(wa);
+ // ok, looks like we moved onto a container
+
+ if (wa != targetContainer)
+ {
+ if (targetContainer)
+ {
+ if (hadOwnPalette)
+ targetContainer->setPalette(restorePalette);
+ else
+ targetContainer->unsetPalette();
+ }
+ targetContainer = wa;
+ hadOwnPalette = wa->ownPalette();
+ restorePalette = wa->palette();
+ wa->setPaletteBackgroundColor(wa->colorGroup().midlight());
+ }
+ }
+ else if (targetContainer)
+ {
+ if(hadOwnPalette)
+ targetContainer->setPalette(restorePalette);
+ else
+ targetContainer->unsetPalette();
+ targetContainer = 0;
+ }
+
+ // finally move the selected widgets and show/update preview label
+ moveSelectedWidgets(x - p.x(), y - p.y());
+ sizePreviewLabel->setText(QString("%1/%2").arg(w->pos().x()).arg(w->pos().y()));
+ sizePreviewLabel->adjustSize();
+ QRect lg(mapFromGlobal(e->globalPos()) + QPoint(16, 16), sizePreviewLabel->size());
+ checkPreviewGeometry(lg);
+ sizePreviewLabel->setGeometry(lg);
+ sizePreviewLabel->raise();
+ sizePreviewLabel->show();
+ }
+ else
+ { // if we don't need to move, do some indication
+ QRect lg(mapFromGlobal(e->globalPos()) + QPoint(16, 16), sizePreviewLabel->size());
+ checkPreviewGeometry(lg);
+ sizePreviewLabel->move(lg.x(), lg.y());
+ }
+
+ oldPressPos += (p - w->pos());
+ }
+ else if (drawRubber)
+ // draw rubber if we are in rubber-selection mode
+ continueRectDraw(mapFromGlobal(e->globalPos()), e->globalPos(), this, Rubber);
+ break;
+ case CONNECT_TOOL:
+ restoreConnectionLine();
+ wid = qApp->widgetAt(e->globalPos(), true);
+ if (wid)
+ wid = designerWidget(wid);
+ if (wid && (isMainContainer(wid) || insertedWidgets.find(wid)) && wid->isVisibleTo(this))
+ newReceiver = wid;
+ if (newReceiver && (newReceiver->inherits("QLayoutWidget")
+ || newReceiver->inherits("Spacer")))
+ newReceiver = (QWidget*)connectReceiver;
+ drawRecRect = newReceiver != connectReceiver;
+ currentConnectPos = mapFromGlobal(e->globalPos());
+ if (newReceiver && (isMainContainer(newReceiver)
+ || insertedWidgets.find(newReceiver)) && !isCentralWidget(newReceiver))
+ connectReceiver = connectableObject(newReceiver, connectReceiver);
+ mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").arg(connectSender->name()).
+ arg(connectReceiver->name()));
+ qApp->processEvents();
+ if (drawRecRect)
+ restoreRect(QRect(mapToForm(((QWidget*)oldReceiver)->parentWidget(),
+ ((QWidget*)oldReceiver)->pos()), ((QWidget*)oldReceiver)->size()));
+ drawConnectLine();
+ break;
+ case ORDER_TOOL:
+ break;
+ default: // we are in an insert-widget tool
+ if (insertParent) // draw insert rect
+ continueRectDraw(w->mapFromGlobal(e->globalPos()), e->globalPos(), w, Insert);
+ break;
+ }
+}
+
+void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w)
+{
+ if (e->button() != LeftButton)
+ return;
+
+ switch (currTool)
+ {
+ case POINTER_TOOL:
+ if (widgetPressed && allowMove(w))
+ { // we moved the widget
+ sizePreviewLabel->hide();
+
+ if (moving.isEmpty() || w->pos() == *moving.find((ulong) w))
+ break;
+
+ // restore targetContainer
+ if (targetContainer)
+ {
+ if (hadOwnPalette)
+ targetContainer->setPalette(restorePalette);
+ else
+ targetContainer->unsetPalette();
+ }
+ // tell property editor to update
+ if (propertyWidget && propertyWidget->isWidgetType() && !isMainContainer(propertyWidget))
+ emitUpdateProperties(propertyWidget);
+
+ QMapConstIterator < ulong, QPoint > it = moving.begin();
+ QWidget *oldParent = ((QWidget *) it.key())->parentWidget();
+ QWidget *newParent = oldParent;
+ // check whether we have to reparent the selection
+ QWidget *wa = containerAt(e->globalPos(), ((QWidget *) it.key()));
+ if (wa)
+ {
+ wa = WidgetFactory::containerOfWidget(wa);
+ // ok, looks like we moved onto a container
+
+ // check whether we really have different parents.
+ if (wa == ((QWidget *) it.key())->parentWidget())
+ goto make_move_command;
+
+ // break layout if necessary
+ if (WidgetFactory::layoutType(wa) != WidgetFactory::NoLayout)
+ {
+ if (KMessageBox::questionYesNo(mainWindow(),
+ i18n("You tried to insert a widget into the "
+ "layout Container Widget '%1'.\n"
+ "This is not possible. "
+ "In order to insert the widget, the layout of '%1'\n"
+ "must first be broken.\n"
+ "Break the layout or cancel the operation?").
+ arg(wa->name()).arg(wa->name()), i18n("Inserting Widget"),
+ i18n("&Break Layout"), KStdGuiItem::cancel()) == KMessageBox::No)
+ goto make_move_command; // cancel
+ breakLayout(wa);
+ }
+ // doesn't need to be a command, the MoveCommand does reparenting too
+ bool emitSelChanged = false;
+ for (QMap < ulong, QPoint >::Iterator it = moving.begin(); it != moving.end(); ++it)
+ {
+ QWidget *i = (QWidget *) it.key();
+ if (!emitSelChanged && i->inherits("QButton"))
+ {
+ if (i->parentWidget() && i->parentWidget()->inherits("QButtonGroup") ||
+ wa->inherits("QButtonGroup"))
+ emitSelChanged = true;
+ if (!wa->inherits("QButtonGroup"))
+ {
+ MetaDataBase::setPropertyChanged(i, "buttonGroupId", false);
+ if (i->parentWidget() && i->parentWidget()->inherits("QButtonGroup"))
+ ((QButtonGroup *) i->parentWidget())->remove((QButton *) i);
+ }
+ }
+ QPoint pos = wa->mapFromGlobal(i->mapToGlobal(QPoint(0, 0)));
+ i->reparent(wa, pos, true);
+ raiseSelection(i);
+ raiseChildSelections(i);
+ widgetChanged(i);
+ mainWindow()->objectHierarchy()->widgetRemoved(i);
+ mainWindow()->objectHierarchy()->widgetInserted(i);
+ }
+ if (emitSelChanged)
+ {
+ emit showProperties(wa);
+ emit showProperties(propertyWidget);
+ }
+ newParent = wa;
+ }
+
+ make_move_command:
+ QWidgetList widgets; // collect the widgets and its old and new positions which have been moved
+ QValueList < QPoint > oldPos, newPos;
+ for (it = moving.begin(); it != moving.end(); ++it)
+ {
+ widgets.append((QWidget *) it.key());
+ oldPos.append(*it);
+ newPos.append(((QWidget *) it.key())->pos());
+ }
+ // add move command, don't execute it, this is just a summary of the operations we did during the move-event handling
+ commandHistory()->addCommand(new MoveCommand(i18n("Move"),
+ this, widgets, oldPos, newPos, oldParent, newParent));
+ } else if (drawRubber)
+ { // we were drawing a rubber selection
+ endRectDraw(); // get rid of the rectangle
+ blockSignals(true);
+ selectWidgets(); // select widgets which intersect the rect
+ blockSignals(false);
+ emitSelectionChanged(); // inform about selection changes
+ if (propertyWidget)
+ emitShowProperties(propertyWidget);
+ }
+ break;
+ case CONNECT_TOOL:
+ restoreConnectionLine();
+ if (connectSender)
+ restoreRect(QRect(mapToForm(((QWidget *) connectSender)->parentWidget(),
+ ((QWidget *) connectSender)->pos()), ((QWidget *) connectSender)->size()));
+ if (connectReceiver)
+ restoreRect(QRect(mapToForm(((QWidget *) connectReceiver)->parentWidget(),
+ ((QWidget *) connectReceiver)->pos()), ((QWidget *) connectReceiver)->size()));
+ endUnclippedPainter();
+ qApp->processEvents();
+ if (connectSender && connectReceiver)
+ editConnections();
+ break;
+ case ORDER_TOOL:
+ break;
+ default: // any insert widget tool is active
+ if (insertParent)
+ { // we should insert the new widget now
+ endRectDraw();
+ if (WidgetFactory::layoutType(insertParent) != WidgetFactory::NoLayout)
+ {
+ if (KMessageBox::questionYesNo(mainWindow(),
+ i18n("You tried to insert a widget into the "
+ "layout Container Widget '%1'.\n"
+ "This is not possible. "
+ "In order to insert the widget, the layout of '%1'\n"
+ "must first be broken.\n"
+ "Break the layout or cancel the operation?").
+ arg(insertParent->name()).
+ arg(insertParent->name()), i18n("Inserting Widget"),
+ i18n("&Break Layout"), KStdGuiItem::cancel()) == KMessageBox::Yes)
+ {
+ breakLayout(insertParent);
+ } else
+ {
+ if (!toolFixed)
+ mainWindow()->resetTool();
+ break;
+ }
+ }
+ insertWidget(); // so do it
+ }
+ break;
+ }
+ widgetPressed = false;
+ drawRubber = false;
+ insertParent = 0;
+ delete buffer;
+ buffer = 0;
+}
+
+void FormWindow::handleKeyPress(QKeyEvent * e, QWidget * w)
+{
+ e->ignore();
+ checkSelectionsTimer->stop();
+ if (!checkedSelectionsForMove &&
+ (e->key() == Key_Left ||
+ e->key() == Key_Right ||
+ e->key() == Key_Up || e->key() == Key_Down) && propertyWidget->isWidgetType())
+ checkSelectionsForMove((QWidget *) propertyWidget);
+ checkSelectionsTimer->start(1000, true);
+ if (e->key() == Key_Left || e->key() == Key_Right || e->key() == Key_Up || e->key() == Key_Down)
+ {
+ QWidgetList widgets;
+ QValueList < QPoint > oldPos, newPos;
+ for (WidgetSelection * s = selections.first(); s; s = selections.next())
+ {
+ if (s->isUsed())
+ {
+ int dx = 0, dy = 0;
+ bool control = e->state() & ControlButton;
+
+ switch (e->key())
+ {
+ case Key_Left:
+ {
+ e->accept();
+ if (control)
+ dx = -1;
+ else
+ dx = -grid().x();
+ }
+ break;
+ case Key_Right:
+ {
+ e->accept();
+ if (control)
+ dx = 1;
+ else
+ dx = grid().x();
+ }
+ break;
+ case Key_Up:
+ {
+ e->accept();
+ if (control)
+ dy = -1;
+ else
+ dy = -grid().y();
+ }
+ break;
+ case Key_Down:
+ {
+ e->accept();
+ if (control)
+ dy = 1;
+ else
+ dy = grid().y();
+ }
+ break;
+ default:
+ break;
+ }
+
+ widgets.append(s->widget());
+ oldPos.append(s->widget()->pos());
+ newPos.append(s->widget()->pos() + QPoint(dx, dy));
+ }
+ }
+ if (!widgets.isEmpty())
+ {
+ MoveCommand *cmd = new MoveCommand(i18n("Move"), this,
+ widgets, oldPos, newPos, 0, 0);
+ commandHistory()->addCommand(cmd, true);
+ cmd->execute();
+ }
+ }
+ if (!e->isAccepted())
+ {
+ QObjectList *l = queryList("QWidget");
+ if (!l)
+ return;
+ if (l->find(w) != -1)
+ e->accept();
+ delete l;
+ }
+
+}
+
+void FormWindow::handleKeyRelease(QKeyEvent * e, QWidget *)
+{
+ e->ignore();
+}
+
+void FormWindow::selectWidget(QObject * o, bool select)
+{
+ if (!o->isWidgetType())
+ {
+ // ########### do QObject stuff
+ return;
+ }
+
+ QWidget *w = (QWidget *) o;
+
+ if (isMainContainer(w))
+ {
+ QObject *opw = propertyWidget;
+ propertyWidget = mainContainer();
+ if (opw->isWidgetType())
+ repaintSelection((QWidget *) opw);
+ emitShowProperties(propertyWidget);
+ return;
+ }
+
+ if (mainContainer()->inherits("QMainWindow") &&
+ w == ((QMainWindow *) mainContainer())->centralWidget())
+ {
+ QObject *opw = propertyWidget;
+ propertyWidget = mainContainer();
+ if (opw->isWidgetType())
+ repaintSelection((QWidget *) opw);
+ emitShowProperties(propertyWidget);
+ return;
+ }
+
+ if (o->inherits("QDesignerToolBar") || o->inherits("QDesignerMenuBar"))
+ return;
+
+ if (select)
+ {
+ QObject *opw = propertyWidget;
+ propertyWidget = w;
+ if (opw->isWidgetType())
+ repaintSelection((QWidget *) opw);
+ if (!isPropertyShowingBlocked())
+ emitShowProperties(propertyWidget);
+ WidgetSelection *s = usedSelections.find(w);
+ if (s)
+ {
+ s->show();
+ return;
+ }
+
+ for (WidgetSelection * s2 = selections.first(); s2; s2 = selections.next())
+ {
+ if (!s2->isUsed())
+ {
+ s = s2;
+ }
+ }
+
+ if (!s)
+ {
+ s = new WidgetSelection(this, &usedSelections);
+ selections.append(s);
+ }
+
+ s->setWidget(w);
+ emitSelectionChanged();
+ } else
+ {
+ WidgetSelection *s = usedSelections.find(w);
+ if (s)
+ s->setWidget(0);
+ QObject *opw = propertyWidget;
+ if (!usedSelections.isEmpty())
+ propertyWidget = QPtrDictIterator < WidgetSelection > (usedSelections).current()->widget();
+ else
+ propertyWidget = mainContainer();
+ if (opw->isWidgetType())
+ repaintSelection((QWidget *) opw);
+ if (!isPropertyShowingBlocked())
+ emitShowProperties(propertyWidget);
+ emitSelectionChanged();
+ }
+}
+
+QPoint FormWindow::grid() const
+{
+ if (!mainWindow()->snapGrid())
+ return QPoint(1, 1);
+ return mainWindow()->grid();
+}
+
+void FormWindow::updateSelection(QWidget * w)
+{
+ WidgetSelection *s = usedSelections.find(w);
+ if (!w->isVisibleTo(this))
+ selectWidget(w, false);
+ else if (s)
+ s->updateGeometry();
+}
+
+void FormWindow::raiseSelection(QWidget * w)
+{
+ WidgetSelection *s = usedSelections.find(w);
+ if (s)
+ s->show();
+}
+
+void FormWindow::repaintSelection(QWidget * w)
+{
+ WidgetSelection *s = usedSelections.find(w);
+ if (s)
+ s->update();
+}
+
+void FormWindow::clearSelection(bool changePropertyDisplay)
+{
+ QPtrDictIterator < WidgetSelection > it(usedSelections);
+ for (; it.current(); ++it)
+ it.current()->setWidget(0, false);
+
+ usedSelections.clear();
+ if (changePropertyDisplay)
+ {
+ QObject *opw = propertyWidget;
+ propertyWidget = mainContainer();
+ if (opw->isWidgetType())
+ repaintSelection((QWidget *) opw);
+ emitShowProperties(propertyWidget);
+ }
+ emitSelectionChanged();
+}
+
+void FormWindow::startRectDraw(const QPoint & p, const QPoint & global, QWidget *, RectType t)
+{
+ QPoint pos(p);
+ pos = mapFromGlobal(global);
+ oldRectValid = false;
+ beginUnclippedPainter(true);
+ if (t == Rubber)
+ unclippedPainter->setPen(QPen(color0, 1));
+ if (t == Insert)
+ rectAnchor = gridPoint(pos);
+ else if (t == Rubber)
+ rectAnchor = pos;
+ currRect = QRect(rectAnchor, QPoint(0, 0));
+ if (t == Insert)
+ drawSizePreview(pos, i18n("Use Size Hint"));
+}
+
+void FormWindow::continueRectDraw(const QPoint & p, const QPoint & global, QWidget *, RectType t)
+{
+ QPoint pos = p;
+ pos = mapFromGlobal(global);
+ QPoint p2;
+ if (t == Insert)
+ p2 = gridPoint(pos);
+ else if (t == Rubber)
+ p2 = pos;
+ QRect r(rectAnchor, p2);
+ r = r.normalize();
+
+ if (currRect == r)
+ {
+ QString t("%1/%2");
+ t = t.arg(r.width() - 1).arg(r.height() - 1);
+ drawSizePreview(pos, t);
+ return;
+ }
+
+ if (oldRectValid)
+ unclippedPainter->drawRect(currRect);
+ if (r.width() > 1 || r.height() > 1)
+ {
+ oldRectValid = true;
+ currRect = r;
+ if (t == Insert)
+ {
+ QString t("%1/%2");
+ t = t.arg(r.width() - 1).arg(r.height() - 1);
+ drawSizePreview(pos, t);
+ }
+ unclippedPainter->setClipRegion(QRegion(rect()).subtract(QRect(sizePreviewPos,
+ sizePreviewPixmap.size())));
+ unclippedPainter->drawRect(currRect);
+ unclippedPainter->setClipping(false);
+ } else
+ {
+ oldRectValid = false;
+ if (t == Insert)
+ drawSizePreview(pos, i18n("Use Size Hint"));
+ }
+}
+
+void FormWindow::endRectDraw()
+{
+ if (!unclippedPainter)
+ return;
+
+ if (oldRectValid)
+ unclippedPainter->drawRect(currRect);
+ drawSizePreview(QPoint(-1, -1), QString::null);
+ endUnclippedPainter();
+}
+
+void FormWindow::selectWidgets()
+{
+ QObjectList *l = mainContainer()->queryList("QWidget");
+ if (l)
+ {
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
+ {
+ QPoint p = ((QWidget *) o)->mapToGlobal(QPoint(0, 0));
+ p = mapFromGlobal(p);
+ QRect r(p, ((QWidget *) o)->size());
+ if (r.intersects(currRect) && !r.contains(currRect))
+ selectWidget((QWidget *) o);
+ }
+ }
+ delete l;
+ }
+ emitSelectionChanged();
+}
+
+bool FormWindow::isWidgetSelected(QObject * w)
+{
+ if (w->isWidgetType())
+ return usedSelections.find((QWidget *) w) != 0;
+ return false; // #### do stuff for QObjects
+}
+
+void FormWindow::moveSelectedWidgets(int dx, int dy)
+{
+ QPtrDictIterator < WidgetSelection > it(usedSelections);
+ for (; it.current(); ++it)
+ {
+ WidgetSelection *s = it.current();
+ QWidget *w = s->widget();
+ if (w->parentWidget()
+ && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ continue;
+ w->move(w->x() + dx, w->y() + dy);
+ s->updateGeometry();
+ updateChildSelections(w);
+ }
+}
+
+CommandHistory *FormWindow::commandHistory()
+{
+ return &commands;
+}
+
+void FormWindow::undo()
+{
+ commandHistory()->undo();
+}
+
+void FormWindow::redo()
+{
+ commandHistory()->redo();
+}
+
+void FormWindow::raiseChildSelections(QWidget * w)
+{
+ QObjectList *l = w->queryList("QWidget");
+ if (!l || !l->first())
+ {
+ delete l;
+ return;
+ }
+
+ QPtrDictIterator < WidgetSelection > it(usedSelections);
+ for (; it.current(); ++it)
+ {
+ if (l->findRef(it.current()->widget()) != -1)
+ it.current()->show();
+ }
+ delete l;
+}
+
+void FormWindow::updateChildSelections(QWidget * w)
+{
+ QObjectList *l = w->queryList("QWidget");
+ if (l)
+ {
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ if (o->isWidgetType() && insertedWidgets.find((QWidget *) o))
+ updateSelection((QWidget *) o);
+ }
+ delete l;
+ }
+}
+
+void FormWindow::checkSelectionsForMove(QWidget * w)
+{
+ checkedSelectionsForMove = true;
+
+ QObjectList *l = w->parentWidget()->queryList("QWidget", 0, false, false);
+ moving.clear();
+ if (l)
+ {
+ QPtrDictIterator < WidgetSelection > it(usedSelections);
+ WidgetSelection *sel;
+ while ((sel = it.current()) != 0)
+ {
+ if (it.current()->widget() == mainContainer())
+ continue;
+ ++it;
+ if (l->find(sel->widget()) == -1)
+ {
+ if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout)
+ sel->setWidget(0);
+ } else
+ {
+ if (WidgetFactory::layoutType(sel->widget()->parentWidget()) == WidgetFactory::NoLayout)
+ {
+ moving.insert((ulong) sel->widget(), sel->widget()->pos());
+ sel->widget()->raise();
+ raiseChildSelections(sel->widget());
+ raiseSelection(sel->widget());
+ }
+ }
+ }
+ delete l;
+ }
+}
+
+void FormWindow::deleteWidgets()
+{
+ QWidgetList widgets;
+ QPtrDictIterator < WidgetSelection > it(usedSelections);
+ for (; it.current(); ++it)
+ {
+ QWidget *tb = 0;
+ if (!(tb = mainWindow()->isAToolBarChild(it.current()->widget())))
+ widgets.append(it.current()->widget());
+ else
+ ((QDesignerToolBar *) tb)->removeWidget(it.current()->widget());
+ }
+
+ if (widgets.isEmpty())
+ return;
+
+ DeleteCommand *cmd = new DeleteCommand(i18n("Delete"), this, widgets);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::editAdjustSize()
+{
+ QPtrList < Command > commands;
+ QWidgetList widgets = selectedWidgets();
+ if (widgets.isEmpty())
+ {
+ QRect oldr = geometry();
+ mainContainer()->adjustSize();
+ resize(mainContainer()->size());
+ // check whether our own size constraint hit us
+ if (size() != mainContainer()->size())
+ mainContainer()->resize(size());
+ QRect nr = geometry();
+ if (oldr != nr)
+ {
+ ResizeCommand *cmd = new ResizeCommand(i18n("Adjust Size"), this, this, oldr, nr);
+ commandHistory()->addCommand(cmd);
+ }
+ return;
+ }
+ for (QWidget * w = widgets.first(); w; w = widgets.next())
+ {
+ if (w->parentWidget()
+ && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ continue;
+ QRect oldr = w->geometry();
+ w->adjustSize();
+ QRect nr = w->geometry();
+ if (oldr != nr)
+ commands.append(new ResizeCommand(i18n("Adjust Size"), this, w, oldr, nr));
+ }
+
+ if (commands.isEmpty())
+ return;
+ for (WidgetSelection * s = selections.first(); s; s = selections.next())
+ s->updateGeometry();
+
+ MacroCommand *cmd = new MacroCommand(i18n("Adjust Size"), this, commands);
+ commandHistory()->addCommand(cmd);
+}
+
+
+QWidgetList FormWindow::selectedWidgets() const
+{
+ QWidgetList widgets;
+ for (QPtrDictIterator<WidgetSelection> it(usedSelections); it.current(); ++it)
+ widgets.append(it.current()->widget());
+ return widgets;
+}
+
+void FormWindow::widgetChanged(QObject *w)
+{
+ if (w->isWidgetType())
+ updateSelection((QWidget*)w);
+}
+
+QLabel *FormWindow::sizePreview() const
+{
+ if (!sizePreviewLabel)
+ {
+ ((FormWindow*)this)->sizePreviewLabel = new QLabel((FormWindow*)this);
+ ((FormWindow*)this)->sizePreviewLabel->hide();
+ ((FormWindow*)this)->sizePreviewLabel->setBackgroundColor(QColor(255, 255, 128));
+ ((FormWindow*)this)->sizePreviewLabel->setFrameStyle(QFrame::Plain | QFrame::Box);
+ }
+ return sizePreviewLabel;
+}
+
+void FormWindow::invalidCheckedSelections()
+{
+ checkedSelectionsForMove = false;
+}
+
+void FormWindow::checkPreviewGeometry(QRect & r)
+{
+ if (rect().contains(r))
+ return;
+ if (r.left() < rect().left())
+ r.moveTopLeft(QPoint(0, r.top()));
+ if (r.right() > rect().right())
+ r.moveBottomRight(QPoint(rect().right(), r.bottom()));
+ if (r.top() < rect().top())
+ r.moveTopLeft(QPoint(r.left(), rect().top()));
+ if (r.bottom() > rect().bottom())
+ r.moveBottomRight(QPoint(r.right(), rect().bottom()));
+}
+
+void FormWindow::focusInEvent(QFocusEvent *)
+{
+ if (mContainer)
+ {
+ QVariant prop = mContainer->property("useInternalParser");
+ KommanderWidget::useInternalParser = prop.toBool();
+
+ }
+}
+
+void FormWindow::focusOutEvent(QFocusEvent *)
+{
+ if (propertyWidget && !isMainContainer(propertyWidget) && !isWidgetSelected(propertyWidget))
+ {
+ QObject *opw = propertyWidget;
+ propertyWidget = mainContainer();
+ if (opw->isWidgetType())
+ repaintSelection((QWidget *) opw);
+ }
+}
+
+void FormWindow::resizeEvent(QResizeEvent * e)
+{
+ QWidget::resizeEvent(e);
+ if (currTool == ORDER_TOOL)
+ repositionOrderIndicators();
+ if (isVisible())
+ formFile()->setModified(true);
+}
+
+QPtrDict < QWidget > *FormWindow::widgets()
+{
+ return &insertedWidgets;
+}
+
+QWidget *FormWindow::designerWidget(QObject * o) const
+{
+ if (!o || !o->isWidgetType())
+ return 0;
+ QWidget *w = (QWidget *) o;
+ while (w && !isMainContainer(w) && !insertedWidgets[(void *) w] || isCentralWidget(w))
+ w = (QWidget *) w->parent();
+ return w;
+}
+
+void FormWindow::emitShowProperties(QObject * w)
+{
+ if (w)
+ {
+ QObject *opw = propertyWidget;
+ propertyWidget = w;
+ if (opw->isWidgetType())
+ repaintSelection((QWidget *) opw);
+ }
+ showPropertiesTimer->stop();
+ showPropertiesTimer->start(0, true);
+}
+
+void FormWindow::emitUpdateProperties(QObject * w)
+{
+ if (w == propertyWidget)
+ {
+ updatePropertiesTimer->stop();
+ updatePropertiesTimer->start(0, true);
+ }
+}
+
+void FormWindow::emitSelectionChanged()
+{
+ selectionChangedTimer->stop();
+ selectionChangedTimer->start(0, true);
+}
+
+void FormWindow::updatePropertiesTimerDone()
+{
+ if (propertyWidget && mainWindow()->formWindow() == this)
+ emit updateProperties(propertyWidget);
+}
+
+void FormWindow::showPropertiesTimerDone()
+{
+ if (propertyWidget && mainWindow()->formWindow() == this)
+ emit showProperties(propertyWidget);
+}
+
+void FormWindow::selectionChangedTimerDone()
+{
+ emit selectionChanged();
+}
+
+void FormWindow::currentToolChanged()
+{
+ toolFixed = false;
+ int t = mainwindow->currentTool();
+ if (currTool == t && t != ORDER_TOOL)
+ return;
+
+ // tool cleanup
+ switch (currTool)
+ {
+ case ORDER_TOOL:
+ hideOrderIndicators();
+ break;
+ case CONNECT_TOOL:
+ restoreConnectionLine();
+ if (connectSender)
+ restoreRect(QRect(mapToForm(((QWidget *) connectSender)->parentWidget(),
+ ((QWidget *) connectSender)->pos()), ((QWidget *) connectSender)->size()));
+ if (connectReceiver)
+ restoreRect(QRect(mapToForm(((QWidget *) connectReceiver)->parentWidget(),
+ ((QWidget *) connectReceiver)->pos()), ((QWidget *) connectReceiver)->size()));
+ endUnclippedPainter();
+ break;
+ case POINTER_TOOL:
+ break;
+ default:
+ if (insertParent)
+ endRectDraw();
+ break;
+ }
+
+ connectSender = connectReceiver = 0;
+ widgetPressed = false;
+ drawRubber = false;
+ insertParent = 0;
+ delete buffer;
+ buffer = 0;
+
+ currTool = t;
+
+ if (hasFocus())
+ clearSelection(false);
+
+ mainWindow()->statusBar()->clear();
+
+ // tool setup
+ switch (currTool)
+ {
+ case POINTER_TOOL:
+ if (propertyWidget && !isMainContainer(propertyWidget) && !isWidgetSelected(propertyWidget))
+ emitShowProperties(mainContainer());
+ restoreCursors(this, this);
+ break;
+ case ORDER_TOOL:
+ if (mainWindow()->formWindow() == this)
+ {
+ mainWindow()->statusBar()->message(i18n("Click widgets to change the tab order..."));
+ orderedWidgets.clear();
+ showOrderIndicators();
+ if (mainWindow()->formWindow() == this)
+ emitShowProperties(mainContainer());
+ setCursorToAll(ArrowCursor, this);
+ }
+ break;
+ case CONNECT_TOOL:
+ mainWindow()->statusBar()->message(i18n("Drag a line to create a connection..."));
+ setCursorToAll(CrossCursor, this);
+ if (mainWindow()->formWindow() == this)
+ emitShowProperties(mainContainer());
+ break;
+ default:
+ mainWindow()->statusBar()->message(i18n("Click on the form to insert a %1...").
+ arg(WidgetDatabase::toolTip(currTool).lower()));
+ setCursorToAll(CrossCursor, this);
+ if (mainWindow()->formWindow() == this)
+ emitShowProperties(mainContainer());
+ break;
+ }
+}
+
+void FormWindow::showOrderIndicators()
+{
+ hideOrderIndicators();
+ orderIndicators.setAutoDelete(true);
+ QObjectList *l = mainContainer()->queryList("QWidget");
+ stackedWidgets = MetaDataBase::tabOrder(this);
+ if (l)
+ {
+ int order = 1;
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ QWidget *w = (QWidget *) o;
+ if (w->isVisibleTo(w->parentWidget()) &&
+ insertedWidgets[(void *) w] && w->focusPolicy() != NoFocus)
+ {
+ OrderIndicator *ind = new OrderIndicator(order++, w, this);
+ orderIndicators.append(ind);
+ if (stackedWidgets.findRef(w) == -1)
+ stackedWidgets.append(w);
+ }
+ }
+ delete l;
+ }
+ updateOrderIndicators();
+}
+
+void FormWindow::hideOrderIndicators()
+{
+ orderIndicators.clear();
+}
+
+void FormWindow::updateOrderIndicators()
+{
+ int order = 1;
+ for (QWidget * w = stackedWidgets.first(); w; w = stackedWidgets.next())
+ {
+ for (OrderIndicator * i = orderIndicators.first(); i; i = orderIndicators.next())
+ i->setOrder(order, w);
+ order++;
+ }
+}
+
+void FormWindow::repositionOrderIndicators()
+{
+ for (OrderIndicator * i = orderIndicators.first(); i; i = orderIndicators.next())
+ i->reposition();
+}
+
+void FormWindow::updateUndoInfo()
+{
+ commandHistory()->emitUndoRedo();
+}
+
+bool FormWindow::checkCustomWidgets()
+{
+ QStringList missingCustomWidgets;
+ QPtrDictIterator < QWidget > it(insertedWidgets);
+ for (; it.current(); ++it)
+ {
+ if (it.current()->isA("CustomWidget"))
+ {
+ QString className = WidgetFactory::classNameOf(it.current());
+ if (!MetaDataBase::hasCustomWidget(className))
+ missingCustomWidgets << className;
+ }
+ }
+ return true;
+}
+
+void FormWindow::setPropertyShowingBlocked(bool b)
+{
+ propShowBlocked = b;
+}
+
+bool FormWindow::isPropertyShowingBlocked() const
+{
+ return propShowBlocked;
+}
+
+
+int FormWindow::numSelectedWidgets() const
+{
+ return usedSelections.count();
+}
+
+QString FormWindow::copy()
+{
+ Resource resource(mainWindow());
+ resource.setWidget(this);
+ return resource.copy();
+}
+
+void FormWindow::lowerWidgets()
+{
+ QWidgetList widgets;
+ QPtrDictIterator < WidgetSelection > it(usedSelections);
+ for (; it.current(); ++it)
+ widgets.append(it.current()->widget());
+
+ LowerCommand *cmd = new LowerCommand(i18n("Lower"), this, widgets);
+ cmd->execute();
+ commandHistory()->addCommand(cmd);
+}
+
+static void find_accel(const QString & txt, QMap < QChar, QWidgetList > &accels, QWidget * w)
+{
+ int i = txt.find("&");
+ if (i == -1)
+ return;
+ QChar c = txt[i + 1];
+ if (c.isNull() || c == '&')
+ return;
+ c = c.lower();
+ QMap < QChar, QWidgetList >::Iterator it = accels.find(c);
+ if (it == accels.end())
+ {
+ QWidgetList wl;
+ wl.append(w);
+ accels.insert(c, wl);
+ } else
+ {
+ QWidgetList *wl = &*it;
+ wl->append(w);
+ }
+}
+
+void FormWindow::checkAccels()
+{
+ QMap < QChar, QWidgetList > accels;
+ QObjectList *l = mainContainer()->queryList("QWidget");
+ if (l)
+ {
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
+ {
+ QWidget *w = (QWidget *) o;
+ const QMetaProperty *text =
+ w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
+ const QMetaProperty *title =
+ w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
+ const QMetaProperty *pageTitle =
+ w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true);
+ if (text)
+ find_accel(w->property("text").toString(), accels, w);
+ if (title)
+ find_accel(w->property("title").toString(), accels, w);
+ if (pageTitle)
+ find_accel(w->property("pageTitle").toString(), accels, w);
+ }
+ }
+ delete l;
+ }
+
+ bool ok = true;
+ QWidget *wid;
+ for (QMap < QChar, QWidgetList >::Iterator it = accels.begin(); it != accels.end(); ++it)
+ {
+ if ((*it).count() > 1)
+ {
+ ok = false;
+ if (KMessageBox::questionYesNo(mainWindow(),
+ i18n("Accelerator '%1' is used %2 times.").arg(it.key().upper()).arg((*it).count()),
+ i18n("Check Accelerators"), i18n("&Select"), KStdGuiItem::cancel()) == KMessageBox::Yes)
+ {
+ clearSelection(false);
+ for (wid = (*it).first(); wid; wid = (*it).next())
+ selectWidget(wid, true);
+ }
+ return;
+ }
+ }
+
+ if (ok)
+ KMessageBox::information(mainWindow(), i18n("No accelerator is used more than once."),
+ i18n("Check Accelerators"));
+}
+
+void FormWindow::raiseWidgets()
+{
+ QWidgetList widgets;
+ QPtrDictIterator < WidgetSelection > it(usedSelections);
+ for (; it.current(); ++it)
+ widgets.append(it.current()->widget());
+
+ RaiseCommand *cmd = new RaiseCommand(i18n("Raise"), this, widgets);
+ cmd->execute();
+ commandHistory()->addCommand(cmd);
+}
+
+void FormWindow::paste(const QString & cb, QWidget * parent)
+{
+ Resource resource(mainWindow());
+ resource.setWidget(this);
+ resource.paste(cb, parent);
+}
+
+void FormWindow::selectAll()
+{
+ checkedSelectionsForMove = false;
+ blockSignals(true);
+ QObjectList *l = mainContainer()->queryList("QWidget");
+ if (l)
+ {
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
+ {
+ selectWidget((QWidget *) o);
+ }
+ }
+ delete l;
+ }
+
+ blockSignals(false);
+ emitSelectionChanged();
+ if (propertyWidget)
+ emitShowProperties(propertyWidget);
+ emitSelectionChanged();
+}
+
+void FormWindow::layoutHorizontal()
+{
+ QWidgetList widgets(selectedWidgets());
+ LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out Horizontally"),
+ this, mainContainer(), 0, widgets);
+ clearSelection(false);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::layoutVertical()
+{
+ QWidgetList widgets(selectedWidgets());
+ LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out Vertically"),
+ this, mainContainer(), 0, widgets);
+ clearSelection(false);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::layoutHorizontalSplit()
+{
+ QWidgetList widgets(selectedWidgets());
+ LayoutHorizontalSplitCommand *cmd =
+ new LayoutHorizontalSplitCommand(i18n("Lay Out Horizontally (in splitter)"),
+ this, mainContainer(), 0, widgets);
+ clearSelection(false);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::layoutVerticalSplit()
+{
+ QWidgetList widgets(selectedWidgets());
+ LayoutVerticalSplitCommand *cmd =
+ new LayoutVerticalSplitCommand(i18n("Lay Out Vertically (in splitter)"),
+ this, mainContainer(), 0, widgets);
+ clearSelection(false);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::layoutGrid()
+{
+ int xres = grid().x();
+ int yres = grid().y();
+
+ QWidgetList widgets(selectedWidgets());
+ LayoutGridCommand *cmd = new LayoutGridCommand(i18n("Lay Out in a Grid"),
+ this, mainContainer(), 0, widgets, xres, yres);
+ clearSelection(false);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::layoutHorizontalContainer(QWidget * w)
+{
+ if (w == this)
+ w = mainContainer();
+ QObjectList *l = (QObjectList *) WidgetFactory::containerOfWidget(w)->children();
+ if (!l)
+ return;
+ QWidgetList widgets;
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ if (o->isWidgetType() &&
+ ((QWidget *) o)->isVisibleTo(this) && insertedWidgets.find((QWidget *) o))
+ widgets.append((QWidget *) o);
+ }
+ LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out Children Horizontally"),
+ this, mainContainer(), w, widgets);
+ clearSelection(false);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::layoutVerticalContainer(QWidget * w)
+{
+ if (w == this)
+ w = mainContainer();
+ QObjectList *l = (QObjectList *) WidgetFactory::containerOfWidget(w)->children();
+ if (!l)
+ return;
+ QWidgetList widgets;
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ if (o->isWidgetType() &&
+ ((QWidget *) o)->isVisibleTo(this) && insertedWidgets.find((QWidget *) o))
+ widgets.append((QWidget *) o);
+ }
+ LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out Children Vertically"),
+ this, mainContainer(), w, widgets);
+ clearSelection(false);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::layoutGridContainer(QWidget * w)
+{
+ if (w == this)
+ w = mainContainer();
+ int xres = grid().x();
+ int yres = grid().y();
+
+ QObjectList *l = (QObjectList *) WidgetFactory::containerOfWidget(w)->children();
+ if (!l)
+ return;
+ QWidgetList widgets;
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ if (o->isWidgetType() &&
+ ((QWidget *) o)->isVisibleTo(this) && insertedWidgets.find((QWidget *) o))
+ widgets.append((QWidget *) o);
+ }
+ LayoutGridCommand *cmd = new LayoutGridCommand(i18n("Lay Out Children in a Grid"),
+ this, mainContainer(), w, widgets, xres, yres);
+ clearSelection(false);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+void FormWindow::breakLayout(QWidget * w)
+{
+ if (w == this)
+ w = mainContainer();
+ w = WidgetFactory::containerOfWidget(w);
+ QPtrList < Command > commands;
+
+ for (;;)
+ {
+ if (!w || w == this)
+ break;
+ if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout &&
+ WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))))
+ {
+ Command *cmd = breakLayoutCommand(w);
+ if (cmd)
+ commands.insert(0, cmd);
+ if (!w->inherits("QLayoutWidget") && !w->inherits("QSplitter"))
+ break;
+ }
+ w = w->parentWidget();
+ }
+
+ if (commands.isEmpty())
+ return;
+
+ clearSelection(false);
+ MacroCommand *cmd = new MacroCommand(i18n("Break Layout"), this, commands);
+ commandHistory()->addCommand(cmd);
+ cmd->execute();
+}
+
+BreakLayoutCommand *FormWindow::breakLayoutCommand(QWidget * w)
+{
+ QObjectList *l = (QObjectList *) w->children();
+ if (!l)
+ return 0;
+
+ QWidgetList widgets;
+ for (QObject * o = l->first(); o; o = l->next())
+ {
+ if (o->isWidgetType() &&
+ !mainWindow()->isAToolBarChild((QWidget *) o) &&
+ ((QWidget *) o)->isVisibleTo(this) && insertedWidgets.find((QWidget *) o))
+ widgets.append((QWidget *) o);
+ }
+ return new BreakLayoutCommand(i18n("Break Layout"), this,
+ WidgetFactory::widgetOfContainer(w), widgets);
+}
+
+int FormWindow::numVisibleWidgets() const
+{
+ QPtrDictIterator < QWidget > it(insertedWidgets);
+ int visible = 0;
+ for (; it.current(); ++it)
+ {
+ if (it.current()->isVisibleTo((FormWindow *) this))
+ visible++;
+ }
+ return visible;
+}
+
+bool FormWindow::hasInsertedChildren(QWidget *w) const
+{
+ if (!w)
+ return false;
+ w = WidgetFactory::containerOfWidget(w);
+ if (!w)
+ return false;
+ QObjectList *l = w->queryList("QWidget");
+ if (!l || !l->first())
+ {
+ delete l;
+ return false;
+ }
+
+ for (QObject *o = l->first(); o; o = l->next())
+ if (o->isWidgetType() && ((QWidget*)o)->isVisibleTo((FormWindow*)this) &&
+ insertedWidgets.find((QWidget*)o))
+ {
+ delete l;
+ return true;
+ }
+ delete l;
+ return false;
+}
+
+bool FormWindow::allowMove(QWidget *w)
+{
+ w = w->parentWidget();
+ while (w)
+ {
+ if ((isMainContainer(w) || insertedWidgets.find(w)) && WidgetFactory::layoutType(w) ==
+ WidgetFactory::NoLayout)
+ return true;
+ w = w->parentWidget();
+ }
+ return false;
+}
+
+
+void FormWindow::editConnections()
+{
+ buffer = 0;
+ if (!connectSender || !connectReceiver)
+ return;
+ mainWindow()->statusBar()->clear();
+ ConnectionEditor editor(mainwindow, connectSender, connectReceiver, this);
+ mainWindow()->statusBar()->message(i18n("Edit connections..."));
+ editor.exec();
+ mainWindow()->statusBar()->clear();
+ if (!toolFixed)
+ mainwindow->resetTool();
+ connectSender = connectReceiver = 0;
+}
+
+void FormWindow::saveBackground()
+{
+ delete buffer;
+ buffer = new QPixmap(width(), height());
+ *buffer = QPixmap::grabWindow(winId());
+}
+
+void FormWindow::restoreConnectionLine()
+{
+ if (!unclippedPainter || !buffer)
+ return;
+
+ int a =QABS(connectStartPos.x() - currentConnectPos.x());
+ int b = QABS(connectStartPos.y() - currentConnectPos.y());
+ QRect r(connectStartPos, currentConnectPos);
+
+ if (a < 32 || b < 32)
+ { // special case: vertical or horizontal line
+ r = r.normalize();
+ unclippedPainter->drawPixmap(r.x() - 2, r.y() - 2, *buffer,
+ r.x() - 2, r.y() - 2, r.width() + 4, r.height() + 4);
+ return;
+ }
+
+ if (a <= 0)
+ a = 1;
+ if (b <= 0)
+ b = 1;
+ int w, h;
+ if (b > a)
+ {
+ h = 64;
+ w = (a * h) / b;
+ }
+ else
+ {
+ w = 64;
+ h = (b * w) / a;
+ }
+ int dx = 2 * w / 3;
+ int dy = 2 * h / 3;
+ QPoint p(connectStartPos);
+
+ if (r.x() > r.right())
+ {
+ dx = dx * -1;
+ p.setX(p.x() - 64);
+ r.moveBy(-64, 0);
+ }
+ if (r.y() > r.bottom()) {
+ dy = dy * -1;
+ p.setY(p.y() - 64);
+ r.moveBy(0, -64);
+ }
+
+ w = h = 64;
+ r = r.normalize();
+ while (r.contains(p))
+ {
+ unclippedPainter->drawPixmap(p, *buffer, QRect(p, QSize(w, h)));
+ unclippedPainter->setPen(red);
+ p.setX(p.x() + dx);
+ p.setY(p.y() + dy);
+ }
+
+ unclippedPainter->drawPixmap(connectStartPos.x() - 10, connectStartPos.y() - 10, *buffer,
+ connectStartPos.x() - 10, connectStartPos.y() - 10, 20, 20);
+}
+
+void FormWindow::restoreRect(const QRect &rect)
+{
+ if (!unclippedPainter)
+ return;
+ QRect r(rect);
+ r = r.normalize();
+ r = QRect(r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4);
+ unclippedPainter->drawPixmap(r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, r.width() + 4, 4);
+ unclippedPainter->drawPixmap(r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, 4, r.height() + 4);
+ unclippedPainter->drawPixmap(r.x() - 2, r.y() + r.height() - 3, *buffer, r.x() - 2,
+ r.y() + r.height() - 3, r.width() + 4, 5);
+ unclippedPainter->drawPixmap(r.x() + r.width() - 2, r.y(), *buffer, r.x() + r.width() - 2,
+ r.y(), 4, r.height() + 4);
+}
+
+void FormWindow::drawConnectLine()
+{
+ if (!unclippedPainter)
+ return;
+ unclippedPainter->setPen(QPen(white, 2));
+ unclippedPainter->drawLine(connectStartPos, currentConnectPos);
+ unclippedPainter->setPen(QPen(darkCyan, 1));
+ unclippedPainter->drawLine(connectStartPos, currentConnectPos);
+
+ unclippedPainter->setPen(QPen(magenta, 1));
+ if (connectSender)
+ {
+ QWidget *w = (QWidget*)connectSender;
+ QPoint p = mapToForm(w, QPoint(0,0));
+ unclippedPainter->drawRect(QRect(p + QPoint(2, 2), w->size() - QSize(4, 4)));
+ }
+ if (connectReceiver)
+ {
+ QWidget *w = (QWidget*)connectReceiver;
+ QPoint p = mapToForm(w, QPoint(0,0));
+ unclippedPainter->drawRect(QRect(p + QPoint(2, 2), w->size() - QSize(4, 4)));
+ }
+}
+
+QString FormWindow::fileName() const
+{
+ return ff->absFileName();
+}
+
+void FormWindow::setFileName(const QString &fn)
+{
+ ff->setFileName(fn);
+ emit fileNameChanged(ff->fileName(), this);
+}
+
+void FormWindow::modificationChanged(bool m)
+{
+ emit modificationChanged(m, this);
+ emit modificationChanged(m, ff->fileName());
+}
+
+bool FormWindow::unify(QObject *w, QString &s, bool changeIt)
+{
+ bool found = !isMainContainer(w) && !qstrcmp(name(), s.latin1());
+ if (!found)
+ {
+ QString orig = s;
+ int num = 1;
+ QPtrDictIterator<QWidget> it(insertedWidgets);
+ for (; it.current();)
+ if (it.current() != w && !qstrcmp(it.current()->name(), s.latin1()))
+ {
+ found = true;
+ if (!changeIt)
+ break;
+ s = orig + "_" + QString::number(++num);
+ it.toFirst();
+ }
+ else
+ ++it;
+
+ if (!found)
+ {
+ QPtrList<QAction> al;
+ QAction *a = 0;
+ for (a = actions.first(); a; a = actions.next())
+ {
+ QObjectList *l = a->queryList("QAction");
+ al.append(a);
+ for (QObject *ao = l->first(); ao; ao = l->next())
+ al.append((QAction*)ao);
+ delete l;
+ }
+ for (a = al.first(); a; a = al.next())
+ {
+ if (a != w && !qstrcmp(a->name(), s.latin1()))
+ {
+ found = true;
+ if (!changeIt)
+ break;
+ s = orig + "_" + QString::number(++num);
+ a = actions.first();
+ }
+ }
+ }
+
+ if (mainContainer()->inherits("QMainWindow"))
+ {
+ if (!found)
+ {
+ QObjectList *l = mainContainer()->queryList("QDockWindow", 0, true);
+ for (QObject *o = l->first(); o; o = l->next())
+ if (o != w && !qstrcmp(o->name(), s.latin1()))
+ {
+ found = true;
+ if (!changeIt)
+ break;
+ s = orig + "_" + QString::number(++num);
+ o = l->first();
+ }
+ delete l;
+ }
+ if (!found)
+ {
+ QObjectList *l = mainContainer()->queryList("QDesignerPopupMenu", 0, true);
+ for (QObject *o = l->first(); o; o = l->next())
+ if (o != w && !qstrcmp(o->name(), s.latin1()))
+ {
+ found = true;
+ if (!changeIt)
+ break;
+ s = orig + "_" + QString::number(++num);
+ o = l->first();
+ }
+ delete l;
+ }
+ }
+ }
+ if (!found)
+ return true;
+ return false;
+}
+
+bool FormWindow::isCustomWidgetUsed(MetaDataBase::CustomWidget *w)
+{
+ QPtrDictIterator<QWidget> it(insertedWidgets);
+ for (; it.current(); ++it)
+ if (it.current()->isA("CustomWidget") && !qstrcmp(WidgetFactory::classNameOf(it.current()),
+ w->className.utf8()))
+ return true;
+ return false;
+}
+
+bool FormWindow::isDatabaseWidgetUsed() const
+{
+#ifndef QT_NO_SQL
+ QStringList dbClasses;
+ dbClasses << "QDataTable"; // add more here
+ QPtrDictIterator<QWidget> it(insertedWidgets);
+ for (; it.current(); ++it)
+ {
+ QString c(it.current()->className());
+ if (dbClasses.contains(c) > 0)
+ return true;
+ }
+#endif
+ return false;
+}
+
+bool FormWindow::isDatabaseAware() const
+{
+#ifndef QT_NO_SQL
+ if (QString(mContainer->className()) == "QDesignerDataBrowser" ||
+ QString(mContainer->className()) == "QDesignerDataView")
+ return true;
+ return isDatabaseWidgetUsed();
+#else
+ return false;
+#endif
+}
+
+void FormWindow::visibilityChanged()
+{
+ if (currTool != ORDER_TOOL)
+ emitUpdateProperties(currentWidget());
+ else
+ {
+ updateOrderIndicators();
+ repositionOrderIndicators();
+ }
+}
+
+
+/*
+ Maps a pos in a w's coordinates to the form's coordinate system.
+
+ This is the equivalent to mapFromGlobal(w->mapToGlobal(pos)) but
+ avoids the two roundtrips to the X-Server on Unix/X11.
+ */
+QPoint FormWindow::mapToForm(const QWidget* w, const QPoint& pos) const
+{
+ QPoint p = pos;
+ const QWidget* i = w;
+ while (i && !i->isTopLevel() && !isMainContainer((QWidget*)i))
+ {
+ p = i->mapToParent(p);
+ i = i->parentWidget();
+ }
+ return mapFromGlobal(w->mapToGlobal(pos));
+}
+
+static int widgetDepth(QWidget *w)
+{
+ int d = -1;
+ while (w && !w->isTopLevel())
+ {
+ d++;
+ w = w->parentWidget();
+ }
+
+ return d;
+}
+
+static bool isChildOf(QWidget *c, QWidget *p)
+{
+ while (c && !c->isTopLevel())
+ {
+ if (c == p)
+ return true;
+ c = c->parentWidget();
+ }
+ return false;
+}
+
+QWidget *FormWindow::containerAt(const QPoint &pos, QWidget *notParentOf)
+{
+ QPtrDictIterator<QWidget> it(insertedWidgets);
+ QWidget *container = 0;
+ int depth = -1;
+ QWidgetList selected = selectedWidgets();
+ if (rect().contains(mapFromGlobal(pos)))
+ {
+ container = mainContainer();
+ depth = widgetDepth(container);
+ }
+
+ for (; it.current(); ++it) {
+ if (it.current()->inherits("QLayoutWidget"))
+ continue;
+ if (it.current()->inherits("QSplitter"))
+ continue;
+ if (!it.current()->isVisibleTo(this))
+ continue;
+ if (selected.find(it.current()) != -1)
+ continue;
+ if (!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(
+ WidgetFactory::classNameOf(it.current()))) && it.current() != mainContainer())
+ continue;
+
+ // the rectangles of all ancestors of the container must contain the insert position
+ QWidget *w = it.current();
+ while (w && !w->isTopLevel())
+ {
+ if (!w->rect().contains((w->mapFromGlobal(pos))))
+ break;
+ w = w->parentWidget();
+ }
+ if (w && !w->isTopLevel()) continue; // we did not get through the full while loop
+
+ int wd = widgetDepth(it.current());
+ if (wd == depth && container && ((QObjectList*)it.current()->parentWidget()->
+ children())->find(it.current()) >
+ ((QObjectList*)container->parentWidget()->children())->find(container))
+ wd++;
+ if (wd > depth && !isChildOf(it.current(), notParentOf)) {
+ depth = wd;
+ container = it.current();
+ }
+ }
+
+ return container;
+}
+
+bool FormWindow::isMainContainer(QObject *w) const
+{
+ return w && w->isWidgetType() && (w == (QWidget*)this || w == mainContainer());
+}
+
+void FormWindow::setMainContainer(QWidget *w)
+{
+ bool resetPropertyWidget = isMainContainer(propertyWidget);
+ if (mContainer)
+ insertedWidgets.remove(mContainer);
+ if (propertyWidget == mContainer)
+ propertyWidget = 0;
+ delete mContainer;
+ mContainer = w;
+ insertedWidgets.insert(mContainer, mContainer);
+ delete layout();
+ QHBoxLayout *l = new QHBoxLayout(this);
+ l->addWidget(w);
+ if (resetPropertyWidget)
+ {
+ QObject *opw = propertyWidget;
+ propertyWidget = mContainer;
+ if (opw && opw->isWidgetType())
+ repaintSelection((QWidget*)opw);
+ }
+}
+
+bool FormWindow::savePixmapInline() const
+{
+ return pixInline;
+}
+
+QString FormWindow::pixmapLoaderFunction() const
+{
+ return pixLoader;
+}
+
+void FormWindow::setSavePixmapInline(bool b)
+{
+ pixInline = b;
+}
+
+void FormWindow::setPixmapLoaderFunction(const QString &func)
+{
+ pixLoader = func;
+}
+
+void FormWindow::setActiveObject(QObject *o)
+{
+ emitShowProperties(o);
+ propertyWidget = o;
+}
+
+QAction *FormWindow::findAction(const QString &name)
+{
+ for (QAction *a = actionList().first(); a; a = actionList().next())
+ {
+ if (QString(a->name()) == name)
+ return a;
+ QAction *ac = (QAction*)a->child(name.latin1(), "QAction");
+ if (ac)
+ return ac;
+ }
+ return 0;
+}
+
+void FormWindow::killAccels(QObject *top)
+{
+ QObjectList *l = top->queryList("QAccel");
+ if (!l)
+ return;
+ for (QObject *o = l->first(); o; o = l->next())
+ ((QAccel*)o)->setEnabled(false);
+ delete l;
+}
+
+bool FormWindow::isCentralWidget(QObject *w) const
+{
+ if (!mainContainer()->inherits("QMainWindow"))
+ return false;
+ return w == ((QMainWindow*)mainContainer())->centralWidget();
+}
+
+QObject *FormWindow::connectableObject(QObject *w, QObject *)
+{
+ return w;
+}
+
+int FormWindow::layoutDefaultSpacing() const
+{
+ return defSpacing;
+}
+
+int FormWindow::layoutDefaultMargin() const
+{
+ return defMargin;
+}
+
+void FormWindow::setLayoutDefaultSpacing(int s)
+{
+ defSpacing = s;
+}
+
+void FormWindow::setLayoutDefaultMargin(int s)
+{
+ defMargin = s;
+}
+
+FormFile *FormWindow::formFile() const
+{
+ return ff;
+}
+
+void FormWindow::setFormFile(FormFile *f)
+{
+ ff = f;
+ if (ff)
+ connect(this, SIGNAL(modificationChanged(bool, const QString&)), ff, SLOT(formWindowChangedSomehow()));
+}
+#include "formwindow.moc"
diff --git a/kommander/editor/formwindow.h b/kommander/editor/formwindow.h
new file mode 100644
index 00000000..c6d871b0
--- /dev/null
+++ b/kommander/editor/formwindow.h
@@ -0,0 +1,292 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS.  All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#ifndef FORMWINDOW_H
+#define FORMWINDOW_H
+
+#include "command.h"
+#include "metadatabase.h"
+#include "sizehandle.h"
+#include "actiondnd.h"
+
+
+#include <qwidget.h>
+#include <qmap.h>
+#include <qptrdict.h>
+#include <qpixmap.h>
+#include <qwidgetlist.h>
+#include <qmap.h>
+
+class QPaintEvent;
+class QMouseEvent;
+class QKeyEvent;
+class QPainter;
+class QLabel;
+class MainWindow;
+class QTimer;
+class QFocusEvent;
+class QCloseEvent;
+class Resource;
+class QResizeEvent;
+class BreakLayoutCommand;
+class QPixmap;
+class QSizeGrip;
+class FormFile;
+
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#include "orderindicator.h"
+#else
+class OrderIndicator;
+#endif
+
+class FormWindow : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
+
+public:
+ FormWindow( FormFile *f, MainWindow *mw, QWidget *parent, const char *name = 0 );
+ FormWindow( FormFile *f, QWidget *parent, const char *name = 0 );
+ ~FormWindow();
+
+ void init();
+ virtual void setMainWindow( MainWindow *w );
+
+ virtual QString fileName() const;
+ virtual void setFileName( const QString &fn );
+
+ virtual QPoint grid() const;
+ virtual QPoint gridPoint( const QPoint &p );
+
+ virtual CommandHistory *commandHistory();
+
+ virtual void undo();
+ virtual void redo();
+ virtual QString copy();
+ virtual void paste( const QString &cb, QWidget *parent );
+ virtual void lowerWidgets();
+ virtual void raiseWidgets();
+ virtual void checkAccels();
+
+ virtual void layoutHorizontal();
+ virtual void layoutVertical();
+ virtual void layoutHorizontalSplit();
+ virtual void layoutVerticalSplit();
+ virtual void layoutGrid();
+
+ virtual void layoutHorizontalContainer( QWidget *w );
+ virtual void layoutVerticalContainer( QWidget *w );
+ virtual void layoutGridContainer( QWidget *w );
+
+ virtual void breakLayout( QWidget *w );
+
+ virtual void selectWidget( QObject *w, bool select = TRUE );
+ virtual void selectAll();
+ virtual void updateSelection( QWidget *w );
+ virtual void raiseSelection( QWidget *w );
+ virtual void repaintSelection( QWidget *w );
+ virtual void clearSelection( bool changePropertyDisplay = TRUE );
+ virtual void selectWidgets();
+ bool isWidgetSelected( QObject *w );
+ virtual void updateChildSelections( QWidget *w );
+ virtual void raiseChildSelections( QWidget *w );
+
+ virtual void emitUpdateProperties( QObject *w );
+ virtual void emitShowProperties( QObject *w = 0 );
+ virtual void emitSelectionChanged();
+
+ virtual void setPropertyShowingBlocked( bool b );
+ bool isPropertyShowingBlocked() const;
+
+ virtual QLabel *sizePreview() const;
+ virtual void checkPreviewGeometry( QRect &r );
+
+ virtual QPtrDict<QWidget> *widgets();
+ virtual QWidgetList selectedWidgets() const;
+
+ virtual QWidget *designerWidget( QObject *o ) const;
+
+ virtual void handleContextMenu( QContextMenuEvent *e, QWidget *w );
+ virtual void handleMousePress( QMouseEvent *e, QWidget *w );
+ virtual void handleMouseRelease( QMouseEvent *e, QWidget *w );
+ virtual void handleMouseDblClick( QMouseEvent *e, QWidget *w );
+ virtual void handleMouseMove( QMouseEvent *e, QWidget *w );
+ virtual void handleKeyPress( QKeyEvent *e, QWidget *w );
+ virtual void handleKeyRelease( QKeyEvent *e, QWidget *w );
+
+ virtual void updateUndoInfo();
+
+ virtual MainWindow *mainWindow() const { return mainwindow; }
+
+ bool checkCustomWidgets();
+ virtual void insertWidget( QWidget *w, bool checkName = FALSE );
+ virtual void removeWidget( QWidget *w );
+ virtual void deleteWidgets();
+ virtual void editAdjustSize();
+ virtual void editConnections();
+
+ virtual int numSelectedWidgets() const;
+ virtual int numVisibleWidgets() const;
+
+ virtual bool hasInsertedChildren( QWidget *w ) const;
+
+ virtual QWidget *currentWidget() const
+ { return propertyWidget && propertyWidget->isWidgetType() ? (QWidget*)propertyWidget : 0; }
+ virtual bool unify( QObject *w, QString &s, bool changeIt );
+
+ virtual bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w );
+ virtual bool isDatabaseWidgetUsed() const;
+ virtual bool isDatabaseAware() const;
+
+ virtual QPoint mapToForm( const QWidget* w, const QPoint& ) const;
+
+ bool isMainContainer( QObject *w ) const;
+ bool isCentralWidget( QObject *w ) const;
+ QWidget *mainContainer() const { return mContainer; }
+ void setMainContainer( QWidget *w );
+
+ void paintGrid( QWidget *w, QPaintEvent *e );
+
+ bool savePixmapInline() const;
+ QString pixmapLoaderFunction() const;
+ void setSavePixmapInline( bool b );
+ void setPixmapLoaderFunction( const QString &func );
+
+ void setToolFixed() { toolFixed = TRUE; }
+
+ void setActiveObject( QObject *o );
+
+ QPtrList<QAction> &actionList() { return actions; }
+ QAction *findAction( const QString &name );
+
+ void killAccels( QObject *top );
+
+ int layoutDefaultSpacing() const;
+ int layoutDefaultMargin() const;
+ void setLayoutDefaultSpacing( int s );
+ void setLayoutDefaultMargin( int s );
+
+ void initSlots();
+ FormFile *formFile() const;
+ void setFormFile( FormFile *f );
+
+public slots:
+ virtual void widgetChanged( QObject *w );
+ virtual void currentToolChanged();
+ virtual void visibilityChanged();
+ virtual void modificationChanged( bool m );
+
+signals:
+ void showProperties( QObject *w );
+ void updateProperties( QObject *w );
+ void undoRedoChanged( bool undoAvailable, bool redoAvailable, const QString &undoCmd,
+ const QString &redoCmd );
+ void selectionChanged();
+ void modificationChanged( bool m, FormWindow *fw );
+ void modificationChanged( bool m, const QString &s );
+ void fileNameChanged( const QString &s, FormWindow *fw );
+
+protected:
+ virtual void closeEvent( QCloseEvent *e );
+ virtual void focusInEvent( QFocusEvent *e );
+ virtual void focusOutEvent( QFocusEvent *e );
+ virtual void resizeEvent( QResizeEvent *e );
+ void mouseDoubleClickEvent( QMouseEvent *e )
+ { handleMouseDblClick( e, mainContainer() ); }
+
+private:
+ enum RectType { Insert, Rubber };
+
+ virtual void beginUnclippedPainter( bool doNot );
+ virtual void endUnclippedPainter();
+ virtual void drawConnectLine();
+ virtual void drawSizePreview( const QPoint &pos, const QString& text );
+
+ virtual void insertWidget();
+ virtual void moveSelectedWidgets( int dx, int dy );
+
+ virtual void startRectDraw( const QPoint &p, const QPoint &global, QWidget *w, RectType t );
+ virtual void continueRectDraw( const QPoint &p, const QPoint &global, QWidget *w, RectType t );
+ virtual void endRectDraw();
+
+ virtual void checkSelectionsForMove( QWidget *w );
+ virtual BreakLayoutCommand *breakLayoutCommand( QWidget *w );
+
+ virtual bool allowMove( QWidget *w );
+
+ virtual void saveBackground();
+ virtual void restoreConnectionLine();
+ virtual void restoreRect( const QRect &rect ) ;
+
+ virtual void showOrderIndicators();
+ virtual void updateOrderIndicators();
+ virtual void repositionOrderIndicators();
+ virtual void hideOrderIndicators();
+
+ virtual QWidget *containerAt( const QPoint &pos, QWidget *notParentOf );
+
+ QObject *connectableObject( QObject *w, QObject *fallback );
+
+private slots:
+ virtual void invalidCheckedSelections();
+ virtual void updatePropertiesTimerDone();
+ virtual void showPropertiesTimerDone();
+ virtual void selectionChangedTimerDone();
+
+private:
+ int currTool;
+ bool oldRectValid, widgetPressed, drawRubber, checkedSelectionsForMove;
+ QRect currRect;
+ QPoint rectAnchor;
+ QPainter *unclippedPainter;
+ QPoint sizePreviewPos;
+ QPixmap sizePreviewPixmap;
+ MainWindow *mainwindow;
+ QPtrList<WidgetSelection> selections;
+ QPtrDict<WidgetSelection> usedSelections;
+ QRect widgetGeom, rubber;
+ QPoint oldPressPos, origPressPos;
+ CommandHistory commands;
+ QMap<ulong, QPoint> moving;
+ QWidget *insertParent;
+ QObject *propertyWidget;
+ QLabel *sizePreviewLabel;
+ QTimer *checkSelectionsTimer;
+ QPtrDict<QWidget> insertedWidgets;
+ bool propShowBlocked;
+ QTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer;
+ QPoint connectStartPos, currentConnectPos;
+ QObject *connectSender, *connectReceiver;
+ QPixmap *buffer;
+ QPtrList<OrderIndicator> orderIndicators;
+ QWidgetList orderedWidgets;
+ QWidgetList stackedWidgets;
+ QWidget *mContainer;
+ bool pixInline;
+ QString pixLoader;
+ bool toolFixed;
+ QPtrList<QAction> actions;
+ QWidget* targetContainer;
+ QPalette restorePalette;
+ bool hadOwnPalette;
+ int defSpacing, defMargin;
+ FormFile *ff;
+};
+
+#endif
diff --git a/kommander/editor/functions.ui b/kommander/editor/functions.ui
new file mode 100644
index 00000000..48616099
--- /dev/null
+++ b/kommander/editor/functions.ui
@@ -0,0 +1,722 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>FunctionsDialogBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>FunctionsDialogBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>638</width>
+ <height>670</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Function Browser</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="2">
+ <property name="name">
+ <cstring>layout7_2</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Description:</string>
+ </property>
+ </widget>
+ <widget class="KTextBrowser">
+ <property name="name">
+ <cstring>descriptionText</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Group:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>groupComboBox</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>groupComboBox</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>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Function:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>functionListBox</cstring>
+ </property>
+ </widget>
+ <widget class="KListBox">
+ <property name="name">
+ <cstring>functionListBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox" row="0" column="1">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>250</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>&amp;Parameters</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="6" column="0">
+ <property name="name">
+ <cstring>argLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Arg3</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="10" column="0">
+ <property name="name">
+ <cstring>argLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Arg5</string>
+ </property>
+ </widget>
+ <spacer row="14" 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>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="15" column="0">
+ <property name="name">
+ <cstring>copyButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Insert function</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="8" column="0">
+ <property name="name">
+ <cstring>argLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Arg4</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="0">
+ <property name="name">
+ <cstring>widgetComboBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>arg1Edit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>quote1</cstring>
+ </property>
+ <property name="text">
+ <string>Quote</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>combo1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>argLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Arg1</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="5" column="0">
+ <property name="name">
+ <cstring>layout12</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>arg2Edit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>quote2</cstring>
+ </property>
+ <property name="text">
+ <string>Quote</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>combo2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="7" column="0">
+ <property name="name">
+ <cstring>layout13</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>arg3Edit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>quote3</cstring>
+ </property>
+ <property name="text">
+ <string>Quote</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>combo3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>widgetLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Widget:</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="9" column="0">
+ <property name="name">
+ <cstring>layout14</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>arg4Edit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>quote4</cstring>
+ </property>
+ <property name="text">
+ <string>Quote</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>combo4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="11" column="0">
+ <property name="name">
+ <cstring>layout15</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>arg5Edit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>quote5</cstring>
+ </property>
+ <property name="text">
+ <string>Quote</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>combo5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="13" column="0">
+ <property name="name">
+ <cstring>layout16</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>arg6Edit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>quote6</cstring>
+ </property>
+ <property name="text">
+ <string>Quote</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>combo6</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="12" column="0">
+ <property name="name">
+ <cstring>argLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Arg6</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>argLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Arg2</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <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>100</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton">
+ <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">
+ <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>
+ <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>100</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>layout12</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>clearButton</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Clear edited text</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Inserted &amp;text:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>insertedText</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="KTextEdit">
+ <property name="name">
+ <cstring>insertedText</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ <property name="textFormat">
+ <enum>PlainText</enum>
+ </property>
+ <property name="linkUnderline">
+ <bool>false</bool>
+ </property>
+ <property name="autoFormatting">
+ <set>AutoAll</set>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>FunctionsDialogBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>FunctionsDialogBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>groupComboBox</tabstop>
+ <tabstop>functionListBox</tabstop>
+ <tabstop>widgetComboBox</tabstop>
+ <tabstop>arg1Edit</tabstop>
+ <tabstop>arg2Edit</tabstop>
+ <tabstop>arg3Edit</tabstop>
+ <tabstop>arg4Edit</tabstop>
+ <tabstop>arg5Edit</tabstop>
+ <tabstop>arg6Edit</tabstop>
+ <tabstop>copyButton</tabstop>
+ <tabstop>descriptionText</tabstop>
+ <tabstop>clearButton</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>ktextbrowser.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klistbox.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>ktextedit.h</includehint>
+</includehints>
+</UI>
diff --git a/kommander/editor/functionsimpl.cpp b/kommander/editor/functionsimpl.cpp
new file mode 100644
index 00000000..ad4924e5
--- /dev/null
+++ b/kommander/editor/functionsimpl.cpp
@@ -0,0 +1,392 @@
+/***************************************************************************
+ functionsimpl.cpp - Function browser implementation
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or mody *
+ * it under the terms of the 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>
+#include <qlabel.h>
+#include <qmetaobject.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+/* KDE INCLUDES */
+#include <kcombobox.h>
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <klistbox.h>
+#include <klineedit.h>
+#include <klocale.h>
+#include <kpushbutton.h>
+#include <ktextedit.h>
+#include <ktextbrowser.h>
+#include <kdebug.h>
+
+/* OTHER INCLUDES */
+#include "functionsimpl.h"
+#include "kommanderwidget.h"
+#include "invokeclass.h"
+#include "widgetdatabase.h"
+
+const int MaxFunctionArgs = 6;
+
+
+FunctionsDialog::FunctionsDialog(QWidget* a_parent, const QDict<QWidget>& a_widgetList, bool useInternalParser, char* a_name,
+ bool a_modal)
+ : FunctionsDialogBase(a_parent, a_name, a_modal), m_widgetList(a_widgetList), m_useInternalParser(useInternalParser)
+{
+ clearButton->setPixmap(KGlobal::iconLoader()->loadIcon("locationbar_erase", KIcon::Toolbar));
+ copyButton->setPixmap(KGlobal::iconLoader()->loadIcon("1downarrow", KIcon::Toolbar));
+
+ groupComboBox->insertStringList(SpecialInformation::groups());
+ connect(groupComboBox, SIGNAL(activated(int)), SLOT(groupChanged(int)));
+ connect(widgetComboBox, SIGNAL(activated(int)), SLOT(groupChanged(int)));
+ connect(functionListBox, SIGNAL(highlighted(int)), SLOT(functionChanged(int)));
+ connect(copyButton, SIGNAL(clicked()), SLOT(copyText()));
+ connect(clearButton, SIGNAL(clicked()), insertedText, SLOT(clear()));
+
+ // build widget name list
+ for (QDictIterator<QWidget> It(m_widgetList); It.current(); ++It)
+ m_widgetNames.append(It.currentKey());
+ m_widgetNames.sort();
+ widgetComboBox->insertStringList(m_widgetNames);
+
+ for (int j = 0; j < WidgetDatabase::count(); j++)
+ {
+ QString group = WidgetDatabase::group(j);
+ if (group == "Kommander" || group == "Custom")
+ m_widgetTypes << WidgetDatabase::className(j);
+ }
+ m_widgetTypes.sort();
+
+//TODO: Insert either the generic widget types or parse for on the fly created widget
+//names. The problem is that the rest of the code depends on the fact that the widget
+//from the widgetComboBox exists
+// widgetComboBox->insertStringList(m_widgetTypes);
+
+ m_acceptedSlots = InvokeClass::acceptedSlots();
+
+ m_DCOP = -1; // Select DCOP functions by default
+ m_Slots = -1;
+ for (int i=0; i<groupComboBox->count(); i++)
+ {
+ if (groupComboBox->text(i) == i18n("Slots"))
+ {
+ m_Slots = i;
+ break;
+ }
+ }
+ if (!useInternalParser)
+ {
+ groupComboBox->removeItem(m_Slots);
+ m_Slots = -1;
+ }
+ for (int i=0; i<groupComboBox->count(); i++)
+ {
+ if (groupComboBox->text(i) == "DCOP")
+ {
+ m_DCOP = i;
+ break;
+ }
+ }
+ groupComboBox->changeItem(i18n("Functions"), m_DCOP); //this is a quick way to rename this group in the UI
+ groupComboBox->setCurrentItem(m_DCOP);
+ groupChanged(groupComboBox->currentItem());
+}
+
+FunctionsDialog::~FunctionsDialog()
+{
+}
+
+QString FunctionsDialog::functionText() const
+{
+ return insertedText->text();
+}
+
+QString FunctionsDialog::currentFunctionText()
+{
+ QString prefix, function;
+ int index = groupComboBox->currentItem();
+ QString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
+ if (m_useInternalParser)
+ {
+ function = SpecialInformation::parserGroupName(s);
+ if (!function.isEmpty())
+ function += "_";
+ }
+ else
+ {
+ prefix = "@";
+ function = s + ".";
+ }
+ if (groupComboBox->currentText() == "Kommander")
+ return QString("%1%2%3").arg(prefix).arg(functionListBox->currentText()).arg(params());
+ else if (groupComboBox->currentItem() == m_DCOP || groupComboBox->currentItem() == m_Slots)
+ return QString("%1%2.%3%4").arg(prefix).arg(widgetComboBox->currentText().section(' ', 0, 0))
+ .arg(functionListBox->currentText().left(functionListBox->currentText().find('('))).arg(params());
+ else
+ return QString("%1%2%3%4").arg(prefix).arg(function)
+ .arg(functionListBox->currentText()).arg(params());
+}
+
+void FunctionsDialog::groupChanged(int index)
+{
+ index = groupComboBox->currentItem();
+ functionListBox->clear();
+ m_slotList.clear();
+ if (index == m_Slots)
+ {
+ KommanderWidget* a_atw = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
+ QStringList pFunctions = QStringList::fromStrList(a_atw->object()->metaObject()->slotNames(true));
+ for (uint i=0; i<pFunctions.count(); i++)
+ {
+ QString slot = pFunctions[i];
+ QString slotArgStr = slot.section(QRegExp("\\(|\\)"), 1);
+ if (slotArgStr.isEmpty() || m_acceptedSlots.contains(slotArgStr))
+ {
+ QString name = slot.remove("()");
+ if (!m_slotList.contains(name))
+ {
+ m_slotList[name] = slot;
+ functionListBox->insertItem(name);
+ }
+ }
+ }
+ } else
+ {
+ QString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
+ QStringList pFunctions = SpecialInformation::functions(s);
+ KommanderWidget* a_atw = 0;
+ if (index == m_DCOP)
+ a_atw = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
+ int pGroup = SpecialInformation::group(s);
+ SpecialFunction::ParserType pType = m_useInternalParser
+ ? SpecialFunction::InternalParser : SpecialFunction::MacroParser;
+
+ for (uint i=0; i<pFunctions.count(); i++)
+ {
+ int pFunction = SpecialInformation::function(pGroup, pFunctions[i]);
+ if (!SpecialInformation::isValid(pGroup, pFunction, pType))
+ continue;
+ if (a_atw && !a_atw->isFunctionSupported(pFunction) && !a_atw->isCommonFunction(pFunction))
+ continue;
+ functionListBox->insertItem(pFunctions[i]);
+ }
+ }
+
+ functionListBox->sort();
+ functionListBox->setCurrentItem(0);
+ functionChanged(functionListBox->currentItem());
+}
+
+void FunctionsDialog::functionChanged(int)
+{
+ if (groupComboBox->currentItem() == m_Slots)
+ {
+ KommanderWidget* w = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
+ QObject *o = w->object();
+ QString slotHelp = i18n("To learn more about the slot, look at the documentation of the base Qt/KDE class, most probably <i>%1</i>.").arg(o->metaObject()->superClassName() ? QString(o->metaObject()->superClassName()) : QString(o->className()) );
+ QString slotName = functionListBox->currentText();
+ QString slot = m_slotList[slotName];
+ descriptionText->clear();
+ descriptionText->setText(i18n("<qt><h3>%1</h3>"
+ "<p><b>Description:</b> %2\n<p><b>Syntax:</b> <i>%3</i>%4</qt>")
+ .arg(slotName).arg(slotHelp).arg(slot).arg(""));
+ } else
+ {
+ int index = groupComboBox->currentItem();
+ QString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
+ m_function = SpecialInformation::functionObject(s,
+ functionListBox->currentText());
+ QString defArgs;
+ if (m_function.minArg() < m_function.argumentCount())
+ if (!m_function.minArg())
+ defArgs = i18n("<p>Parameters are not obligatory.");
+ else
+ defArgs = i18n("<p>Only first argument is obligatory.",
+ "<p>Only first %n arguments are obligatory.",
+ m_function.minArg());
+
+ uint pflags = SpecialFunction::ShowArgumentNames;
+ if (m_function.maxArg() && m_function.argumentName(0) == "widget")
+ pflags = pflags | SpecialFunction::SkipFirstArgument;
+
+ descriptionText->clear();
+ descriptionText->setText(i18n("<qt><h3>%1</h3>"
+ "<p><b>Description:</b> %2\n<p><b>Syntax:</b> <i>%3</i>%4</qt>")
+ .arg(functionListBox->currentText()).arg(m_function.description())
+ .arg(m_function.prototype(pflags)).arg(defArgs));
+
+ }
+ showParameters();
+}
+
+void FunctionsDialog::copyText()
+{
+ QString text = currentFunctionText();
+ int para, i;
+ insertedText->getCursorPosition(&para, &i);
+// int cursorPos = insertedText->cursorPosition();
+ insertedText->insert(text);
+ insertedText->setCursorPosition(para, i + text.find('(') + 1);
+}
+
+void FunctionsDialog::showParameters()
+{
+ KLineEdit* edits[MaxFunctionArgs] = {arg1Edit, arg2Edit, arg3Edit, arg4Edit, arg5Edit, arg6Edit};
+ QLabel* labels[MaxFunctionArgs] = {argLabel1, argLabel2, argLabel3, argLabel4, argLabel5, argLabel6};
+ KComboBox* combos[MaxFunctionArgs] = {combo1, combo2, combo3, combo4, combo5, combo6};
+ QCheckBox* quotes[MaxFunctionArgs] = {quote1, quote2, quote3, quote4, quote5, quote6};
+
+ if (groupComboBox->currentItem() == m_Slots)
+ {
+ widgetComboBox->setShown(true);
+ widgetLabel->setShown(true);
+ QString slot = m_slotList[functionListBox->currentText()];
+ QStringList slotArgs = QStringList::split(',', slot.section(QRegExp("\\(|\\)"), 1), false);
+ int argsCount = slotArgs.count();
+ for (int i = 0; i < MaxFunctionArgs; i++)
+ {
+ labels[i]->setShown(i < argsCount);
+ QString type;
+ if (i < argsCount)
+ {
+ type = slotArgs[i].remove(QRegExp("\\*|\\&|const\\s"));
+ labels[i]->setText(QString("%1:").arg(type));
+ }
+ quotes[i]->setChecked(true);
+ quotes[i]->setShown(false);
+ if (type == "bool")
+ {
+ edits[i]->setShown(false);
+ combos[i]->setShown(i < argsCount);
+ combos[i]->clear();
+ combos[i]->setEditable(false);
+ combos[i]->insertItem("true");
+ combos[i]->insertItem("false");
+ } else
+ {
+ combos[i]->setShown(false);
+ edits[i]->setShown(i < argsCount);
+ edits[i]->clear();
+ if (type == "QString")
+ {
+ quotes[i]->setShown(i < argsCount);
+ }
+ }
+ }
+ } else
+ {
+ int start = (m_function.argumentCount() && m_function.argumentName(0) == "widget");
+
+ widgetComboBox->setShown(start);
+ widgetLabel->setShown(start);
+ if (start)
+ {
+ arg1Edit->setShown(false);
+ argLabel1->setShown(false);
+ combo1->setShown(false);
+ quote1->setShown(false);
+ }
+ int argsCount = m_function.argumentCount();
+ for (int i=start; i<MaxFunctionArgs; i++)
+ {
+ labels[i]->setShown(i < argsCount);
+ if (i < argsCount)
+ labels[i]->setText(QString("%1:").arg(m_function.argumentName(i)));
+ quotes[i]->setChecked(true);
+ quotes[i]->setShown(false);
+ if (m_function.argumentType(i) == "bool")
+ {
+ edits[i]->setShown(false);
+ combos[i]->setShown(i < argsCount);
+ combos[i]->setEditable(false);
+ combos[i]->clear();
+ combos[i]->insertItem("true");
+ combos[i]->insertItem("false");
+ } else
+ {
+//FIXME: big hack to show a combo for createWidgets. Good solution: extra flag for arguments telling if it is a file/widget/etc.
+ if (m_function.name() == "createWidget" && ( i == 1 || i == 2))
+ {
+ combos[i]->clear();
+ combos[i]->setEditable(true);
+ if ( i == 1)
+ {
+ combos[i]->insertStringList(m_widgetTypes);
+ } else
+ {
+ combos[i]->insertItem("");
+ combos[i]->insertStringList(m_widgetNames);
+ }
+ edits[i]->setShown(false);
+ combos[i]->setShown(true);
+ } else
+ {
+ combos[i]->setShown(false);
+ edits[i]->setShown(i < argsCount);
+ edits[i]->clear();
+ if (m_function.argumentType(i) == "QString")
+ {
+ quotes[i]->setShown(i < argsCount);
+ }
+ }
+ }
+ }
+ }
+}
+
+QString FunctionsDialog::params()
+{
+ QLabel* labels[MaxFunctionArgs] = {argLabel1, argLabel2, argLabel3, argLabel4, argLabel5, argLabel6};
+ KLineEdit* edits[MaxFunctionArgs] = {arg1Edit, arg2Edit, arg3Edit, arg4Edit, arg5Edit, arg6Edit};
+ KComboBox* combos[MaxFunctionArgs] = {combo1, combo2, combo3, combo4, combo5, combo6};
+ QStringList pars;
+ QCheckBox* quotes[MaxFunctionArgs] = {quote1, quote2, quote3, quote4, quote5, quote6};
+ bool params = false;
+ bool slotsShown = (groupComboBox->currentItem() == m_Slots);
+ for (int i=0; i<MaxFunctionArgs; i++)
+ {
+ if (edits[i]->isShown())
+ {
+ QString s = edits[i]->text();
+ if (!s.isEmpty() || i < m_function.minArg())
+ {
+ if (quotes[i]->isChecked() && ( (!slotsShown && m_function.argumentType(i) == "QString")
+ || (slotsShown && labels[i]->text().startsWith("QString")) ) )
+ s = '"' + s + '"';
+ pars.append(s);
+ }
+ params = true;
+ } else
+ if (combos[i]->isShown())
+ {
+ QString s = combos[i]->currentText();
+ if (!s.isEmpty() || i < m_function.minArg())
+ {
+ if (s != "true" && s !="false")
+ s = '"' + s + '"';
+ pars.append(s);
+ }
+ params = true;
+ }
+ }
+ QString a_param = pars.join(", ");
+ if (params)
+ return QString("(%1)").arg(a_param);
+ else
+ return a_param;
+}
+
+
+#include "functionsimpl.moc"
diff --git a/kommander/editor/functionsimpl.h b/kommander/editor/functionsimpl.h
new file mode 100644
index 00000000..fab8661d
--- /dev/null
+++ b/kommander/editor/functionsimpl.h
@@ -0,0 +1,61 @@
+/***************************************************************************
+ functionsimpl.h - Function browser implementation
+ -------------------
+ copyright : (C) 2004 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 _HAVE_FUNCTIONSIMPL_H_
+#define _HAVE_FUNCTIONSIMPL_H_
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qwidget.h>
+#include <qdict.h>
+
+#include "functions.h"
+#include "specialinformation.h"
+
+class FunctionsDialog : public FunctionsDialogBase
+{
+ Q_OBJECT
+public:
+ FunctionsDialog(QWidget*, const QDict<QWidget>&, bool m_useInternalParser, char* = 0, bool = true);
+ ~FunctionsDialog();
+ // Return current content of text box
+ QString functionText() const;
+ // Return current function and parameters
+ QString currentFunctionText();
+public slots:
+ // Update list of function availabe for given group
+ void groupChanged(int);
+ // Update syntax of chosen function
+ void functionChanged(int);
+ // Copy current function and parameters into text box
+ void copyText();
+ // Show widgets for current function's parameters
+ void showParameters();
+private:
+ // Calculate current parameters
+ QString params();
+ SpecialFunction m_function;
+ int m_DCOP;
+ int m_Slots;
+ const QDict<QWidget> m_widgetList;
+ QStringList m_widgetNames;
+ QStringList m_widgetTypes;
+ bool m_useInternalParser;
+ QStringList m_acceptedSlots;
+ QMap<QString, QString> m_slotList;
+};
+
+
+#endif
+
diff --git a/kommander/editor/globaldefs.h b/kommander/editor/globaldefs.h
new file mode 100644
index 00000000..cc6ed400
--- /dev/null
+++ b/kommander/editor/globaldefs.h
@@ -0,0 +1,45 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef GLOBALDEFS_H
+#define GLOBALDEFS_H
+
+#include <qcolor.h>
+
+#define BOXLAYOUT_DEFAULT_MARGIN 11
+#define BOXLAYOUT_DEFAULT_SPACING 6
+
+#ifndef NO_STATIC_COLORS
+static QColor *backColor1 = 0;
+static QColor *backColor2 = 0;
+static QColor *selectedBack = 0;
+
+static void init_colors()
+{
+ if ( backColor1 )
+ return;
+ backColor1 = new QColor( 236, 245, 255 );
+ backColor2 = new QColor( 250, 250, 250 );
+ selectedBack = new QColor( 221, 221, 221 );
+}
+
+#endif
+
+#endif
diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp
new file mode 100644
index 00000000..b3f17713
--- /dev/null
+++ b/kommander/editor/hierarchyview.cpp
@@ -0,0 +1,724 @@
+/**********************************************************************
+** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "globaldefs.h"
+#include "hierarchyview.h"
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "command.h"
+#include "widgetfactory.h"
+#include "widgetdatabase.h"
+#include "pixmapchooser.h"
+#include "propertyeditor.h"
+#include "listeditor.h"
+
+#include <qpalette.h>
+#include <qobjectlist.h>
+#include <qheader.h>
+#include <qpopupmenu.h>
+#include <qtabwidget.h>
+#include <qwizard.h>
+#include <qwidgetstack.h>
+#include <qtabbar.h>
+#include <qfeatures.h>
+#include <qapplication.h>
+#include <qtimer.h>
+#include <qworkspace.h>
+#include <qaccel.h>
+
+#include <klocale.h>
+
+#include <stdlib.h>
+
+static const char * const folder_xpm[]={
+ "16 16 6 1",
+ ". c None",
+ "b c #ffff00",
+ "d c #000000",
+ "* c #999999",
+ "a c #cccccc",
+ "c c #ffffff",
+ "................",
+ "................",
+ "..*****.........",
+ ".*ababa*........",
+ "*abababa******..",
+ "*cccccccccccc*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "**************d.",
+ ".dddddddddddddd.",
+ "................"};
+
+QListViewItem *newItem = 0;
+
+HierarchyItem::HierarchyItem( Type type, QListViewItem *parent,
+ const QString &txt1, const QString &txt2, const QString &txt3 )
+ : QListViewItem( parent, txt1, txt2, txt3 ), typ( type )
+{
+}
+
+HierarchyItem::HierarchyItem( Type type, QListView *parent,
+ const QString &txt1, const QString &txt2, const QString &txt3 )
+ : QListViewItem( parent, txt1, txt2, txt3 ), typ( type )
+{
+}
+
+void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+{
+ QColorGroup g( cg );
+ g.setColor( QColorGroup::Base, backgroundColor() );
+ g.setColor( QColorGroup::Foreground, Qt::black );
+ g.setColor( QColorGroup::Text, Qt::black );
+ QString txt = text( 0 );
+ if ( rtti() == Slot &&
+ ( txt == "init()" || txt == "destroy()" ) ) {
+ listView()->setUpdatesEnabled( false );
+ if ( txt == "init()" )
+ setText( 0, txt + " " + i18n( "(Constructor)" ) );
+ else
+ setText( 0, txt + " " + i18n( "(Destructor)" ) );
+ QListViewItem::paintCell( p, g, column, width, align );
+ setText( 0, txt );
+ listView()->setUpdatesEnabled( true );
+ } else {
+ QListViewItem::paintCell( p, g, column, width, align );
+ }
+ p->save();
+ p->setPen( QPen( cg.dark(), 1 ) );
+ if ( column == 0 )
+ p->drawLine( 0, 0, 0, height() - 1 );
+ if ( listView()->firstChild() != this ) {
+ if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) {
+ int d = depth() - itemBelow()->depth();
+ p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 );
+ }
+ }
+ p->drawLine( 0, height() - 1, width, height() - 1 );
+ p->drawLine( width - 1, 0, width - 1, height() );
+ p->restore();
+}
+
+QColor HierarchyItem::backgroundColor()
+{
+ updateBackColor();
+ return backColor;
+}
+
+void HierarchyItem::updateBackColor()
+{
+ if ( listView()->firstChild() == this ) {
+ backColor = *backColor1;
+ return;
+ }
+
+ QListViewItemIterator it( this );
+ --it;
+ if ( it.current() ) {
+ if ( ( ( HierarchyItem*)it.current() )->backColor == *backColor1 )
+ backColor = *backColor2;
+ else
+ backColor = *backColor1;
+ } else {
+ backColor = *backColor1;
+ }
+}
+
+void HierarchyItem::setWidget( QWidget *w )
+{
+ wid = w;
+}
+
+QWidget *HierarchyItem::widget() const
+{
+ return wid;
+}
+
+void HierarchyItem::okRename( int col )
+{
+ if ( newItem == this )
+ newItem = 0;
+ QListViewItem::okRename( col );
+}
+
+void HierarchyItem::cancelRename( int col )
+{
+ if ( newItem == this ) {
+ newItem = 0;
+ QListViewItem::cancelRename( col );
+ delete this;
+ return;
+ }
+ QListViewItem::cancelRename( col );
+}
+
+
+
+
+HierarchyList::HierarchyList( QWidget *parent, FormWindow *fw, bool doConnects )
+ : QListView( parent ), formWindow( fw )
+{
+ init_colors();
+
+ setDefaultRenameAction( Accept );
+ header()->setMovingEnabled( false );
+ header()->setStretchEnabled( true );
+ normalMenu = 0;
+ tabWidgetMenu = 0;
+ addColumn( i18n("Name" ) );
+ addColumn( i18n("Class" ) );
+ QPalette p( palette() );
+ p.setColor( QColorGroup::Base, QColor( *backColor2 ) );
+ (void)*selectedBack; // hack
+ setPalette( p );
+ disconnect( header(), SIGNAL( sectionClicked( int ) ),
+ this, SLOT( changeSortColumn( int ) ) );
+ setSorting( -1 );
+ setHScrollBarMode( AlwaysOff );
+ setVScrollBarMode( AlwaysOn );
+ if ( doConnects ) {
+ connect( this, SIGNAL( clicked( QListViewItem * ) ),
+ this, SLOT( objectClicked( QListViewItem * ) ) );
+ connect( this, SIGNAL( returnPressed( QListViewItem * ) ),
+ this, SLOT( objectClicked( QListViewItem * ) ) );
+ connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint&, int ) ),
+ this, SLOT( showRMBMenu( QListViewItem *, const QPoint & ) ) );
+ }
+ deselect = true;
+ setColumnWidthMode( 1, Manual );
+}
+
+void HierarchyList::keyPressEvent( QKeyEvent *e )
+{
+ if ( e->key() == Key_Shift || e->key() == Key_Control )
+ deselect = false;
+ else
+ deselect = true;
+ QListView::keyPressEvent( e );
+}
+
+void HierarchyList::keyReleaseEvent( QKeyEvent *e )
+{
+ deselect = true;
+ QListView::keyReleaseEvent( e );
+}
+
+void HierarchyList::viewportMousePressEvent( QMouseEvent *e )
+{
+ if ( e->state() & ShiftButton || e->state() & ControlButton )
+ deselect = false;
+ else
+ deselect = true;
+ QListView::viewportMousePressEvent( e );
+}
+
+void HierarchyList::viewportMouseReleaseEvent( QMouseEvent *e )
+{
+ QListView::viewportMouseReleaseEvent( e );
+}
+
+void HierarchyList::objectClicked( QListViewItem *i )
+{
+ if ( !i )
+ return;
+
+ QWidget *w = findWidget( i );
+ if ( !w )
+ return;
+ if ( formWindow == w ) {
+ if ( deselect )
+ formWindow->clearSelection( false );
+ formWindow->emitShowProperties( formWindow );
+ return;
+ }
+
+ if ( !formWindow->widgets()->find( w ) ) {
+ if ( w->parent() && w->parent()->inherits( "QWidgetStack" ) &&
+ w->parent()->parent() &&
+ ( w->parent()->parent()->inherits( "QTabWidget" ) ||
+ w->parent()->parent()->inherits( "QWizard" ) ) ) {
+ if ( w->parent()->parent()->inherits( "QTabWidget" ) )
+ ( (QTabWidget*)w->parent()->parent() )->showPage( w );
+ else
+ ( (QDesignerWizard*)w->parent()->parent() )->setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
+ w = (QWidget*)w->parent()->parent();
+ formWindow->emitUpdateProperties( formWindow->currentWidget() );
+ } else {
+ return;
+ }
+ }
+
+ if ( deselect )
+ formWindow->clearSelection( false );
+ if ( w->isVisibleTo( formWindow ) )
+ formWindow->selectWidget( w, true );
+}
+
+QWidget *HierarchyList::findWidget( QListViewItem *i )
+{
+ return ( (HierarchyItem*)i )->widget();
+}
+
+QListViewItem *HierarchyList::findItem( QWidget *w )
+{
+ QListViewItemIterator it( this );
+ while ( it.current() ) {
+ if ( ( (HierarchyItem*)it.current() )->widget() == w )
+ return it.current();
+ ++it;
+ }
+ return 0;
+}
+
+QWidget *HierarchyList::current() const
+{
+ if ( currentItem() )
+ return ( (HierarchyItem*)currentItem() )->widget();
+ return 0;
+}
+
+void HierarchyList::changeNameOf( QWidget *w, const QString &name )
+{
+ QListViewItem *item = findItem( w );
+ if ( !item )
+ return;
+ item->setText( 0, name );
+}
+
+
+void HierarchyList::changeDatabaseOf( QWidget *w, const QString & info )
+{
+#ifndef QT_NO_SQL
+ if ( !formWindow->isDatabaseAware() )
+ return;
+ QListViewItem *item = findItem( w );
+ if ( !item )
+ return;
+ item->setText( 2, info );
+#else
+ Q_UNUSED(w);
+ Q_UNUSED(info);
+#endif
+}
+
+void HierarchyList::setup()
+{
+ if ( !formWindow )
+ return;
+ clear();
+ QWidget *w = formWindow->mainContainer();
+#ifndef QT_NO_SQL
+ if ( formWindow->isDatabaseAware() ) {
+ if ( columns() == 2 ) {
+ addColumn( i18n("Database" ) );
+ header()->resizeSection( 0, 1 );
+ header()->resizeSection( 1, 1 );
+ header()->resizeSection( 2, 1 );
+ header()->adjustHeaderSize();
+ }
+ } else {
+ if ( columns() == 3 ) {
+ removeColumn( 2 );
+ }
+ }
+#endif
+ if ( w )
+ insertObject( w, 0 );
+}
+
+void HierarchyList::setOpen( QListViewItem *i, bool b )
+{
+ QListView::setOpen( i, b );
+}
+
+void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
+{
+ bool fakeMainWindow = false;
+ if ( o && o->inherits( "QMainWindow" ) ) {
+ QObject *cw = ( (QMainWindow*)o )->centralWidget();
+ if ( cw ) {
+ o = cw;
+ fakeMainWindow = true;
+ }
+ }
+ QListViewItem *item = 0;
+ QString className = WidgetFactory::classNameOf( o );
+ if ( o->inherits( "QLayoutWidget" ) ) {
+ switch ( WidgetFactory::layoutType( (QWidget*)o ) ) {
+ case WidgetFactory::HBox:
+ className = "HBox";
+ break;
+ case WidgetFactory::VBox:
+ className = "VBox";
+ break;
+ case WidgetFactory::Grid:
+ className = "Grid";
+ break;
+ default:
+ break;
+ }
+ }
+
+ QString dbInfo;
+#ifndef QT_NO_SQL
+ dbInfo = MetaDataBase::fakeProperty( o, "database" ).toStringList().join(".");
+#endif
+
+ QString name = o->name();
+ if ( o->parent() && o->parent()->inherits( "QWidgetStack" ) &&
+ o->parent()->parent() ) {
+ if ( o->parent()->parent()->inherits( "QTabWidget" ) )
+ name = ( (QTabWidget*)o->parent()->parent() )->tabLabel( (QWidget*)o );
+ else if ( o->parent()->parent()->inherits( "QWizard" ) )
+ name = ( (QWizard*)o->parent()->parent() )->title( (QWidget*)o );
+ }
+
+ QToolBox *tb;
+ if ( o->parent() && o->parent()->parent() &&
+ (tb = ::qt_cast<QToolBox*>(o->parent()->parent()->parent())) )
+ name = tb->itemLabel( tb->indexOf((QWidget*)o) );
+
+
+ if ( fakeMainWindow ) {
+ name = o->parent()->name();
+ className = "QMainWindow";
+ }
+
+ if ( !parent )
+ item = new HierarchyItem( HierarchyItem::Widget, this, name, className, dbInfo );
+ else
+ item = new HierarchyItem( HierarchyItem::Widget, parent, name, className, dbInfo );
+ if ( !parent )
+ item->setPixmap( 0, PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) );
+ else if ( o->inherits( "QLayoutWidget") )
+ item->setPixmap( 0, PixmapChooser::loadPixmap( "layout.xpm", PixmapChooser::Small ) );
+ else
+ item->setPixmap( 0, WidgetDatabase::iconSet( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ).
+ pixmap( QIconSet::Small, QIconSet::Normal ) );
+ ( (HierarchyItem*)item )->setWidget( (QWidget*)o );
+
+ const QObjectList *l = o->children();
+ if ( !l )
+ return;
+ QObjectListIt it( *l );
+ it.toLast();
+ for ( ; it.current(); --it ) {
+ if ( !it.current()->isWidgetType() || ( (QWidget*)it.current() )->isHidden() )
+ continue;
+ if ( !formWindow->widgets()->find( (QWidget*)it.current() ) ) {
+ if ( it.current()->parent() &&
+ ( it.current()->parent()->inherits( "QTabWidget" ) ||
+ it.current()->parent()->inherits( "QWizard" ) ) &&
+ it.current()->inherits( "QWidgetStack" ) ) {
+ QObject *obj = it.current();
+ QObjectList *l2 = obj->queryList( "QWidget", 0, true, false );
+ QDesignerTabWidget *tw = 0;
+ QDesignerWizard *dw = 0;
+ if ( it.current()->parent()->inherits( "QTabWidget" ) )
+ tw = (QDesignerTabWidget*)it.current()->parent();
+ if ( it.current()->parent()->inherits( "QWizard" ) )
+ dw = (QDesignerWizard*)it.current()->parent();
+ QWidgetStack *stack = (QWidgetStack*)obj;
+ for ( obj = l2->last(); obj; obj = l2->prev() ) {
+ if ( qstrcmp( obj->className(), "QWidgetStackPrivate::Invisible" ) == 0 ||
+ ( tw && !tw->tabBar()->tab( stack->id( (QWidget*)obj ) ) ) ||
+ ( dw && dw->isPageRemoved( (QWidget*)obj ) ) )
+ continue;
+ insertObject( obj, item );
+ }
+ delete l2;
+ } else if ( ::qt_cast<QToolBox*>(it.current()->parent()) ) {
+ if ( !::qt_cast<QScrollView*>(it.current()) )
+ continue;
+ QToolBox *tb = (QToolBox*)it.current()->parent();
+ for ( int i = tb->count() - 1; i >= 0; --i )
+ insertObject( tb->item( i ), item );
+ }
+ continue;
+ }
+ insertObject( it.current(), item );
+ }
+
+ if ( item->firstChild() )
+ item->setOpen( true );
+}
+
+void HierarchyList::setCurrent( QWidget *w )
+{
+ QListViewItemIterator it( this );
+ while ( it.current() ) {
+ if ( ( (HierarchyItem*)it.current() )->widget() == w ) {
+ blockSignals( true );
+ setCurrentItem( it.current() );
+ ensureItemVisible( it.current() );
+ blockSignals( false );
+ return;
+ }
+ ++it;
+ }
+}
+
+void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p )
+{
+ if ( !i )
+ return;
+
+
+ QWidget *w = findWidget( i );
+ if ( !w )
+ return;
+
+ if ( w != formWindow &&
+ !formWindow->widgets()->find( w ) )
+ return;
+
+ if ( w->isVisibleTo( formWindow ) ) {
+ if ( !w->inherits( "QTabWidget" ) && !w->inherits( "QWizard" ) ) {
+ if ( !normalMenu )
+ normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this );
+ normalMenu->popup( p );
+ } else {
+ if ( !tabWidgetMenu )
+ tabWidgetMenu =
+ formWindow->mainWindow()->setupTabWidgetHierarchyMenu( this, SLOT( addTabPage() ),
+ SLOT( removeTabPage() ) );
+ tabWidgetMenu->popup( p );
+ }
+ }
+}
+
+void HierarchyList::addTabPage()
+{
+ QWidget *w = current();
+ if ( !w )
+ return;
+ if ( w->inherits( "QTabWidget" ) ) {
+ QTabWidget *tw = (QTabWidget*)w;
+ AddTabPageCommand *cmd = new AddTabPageCommand( i18n("Add Page to %1" ).arg( tw->name() ), formWindow,
+ tw, "Tab" );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ } else if ( w->inherits( "QWizard" ) ) {
+ QWizard *wiz = (QWizard*)formWindow->mainContainer();
+ AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wiz->name() ), formWindow,
+ wiz, "Page" );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ }
+}
+
+void HierarchyList::removeTabPage()
+{
+ QWidget *w = current();
+ if ( !w )
+ return;
+ if ( w->inherits( "QTabWidget" ) ) {
+ QTabWidget *tw = (QTabWidget*)w;
+ if ( tw->currentPage() ) {
+ QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
+ DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n("Delete Page %1 of %2" ).
+ arg( dtw->pageTitle() ).arg( tw->name() ),
+ formWindow, tw, tw->currentPage() );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ }
+ } else if ( w->inherits( "QWizard" ) ) {
+ QWizard *wiz = (QWizard*)formWindow->mainContainer();
+ if ( wiz->currentPage() ) {
+ QDesignerWizard *dw = (QDesignerWizard*)wiz;
+ DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" ).
+ arg( dw->pageTitle() ).arg( wiz->name() ),
+ formWindow, wiz,
+ wiz->indexOf( wiz->currentPage() ), true );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ }
+ }
+}
+
+// ------------------------------------------------------------
+
+
+// ------------------------------------------------------------
+static HierarchyItem::Type getChildType( int type )
+{
+ switch ( (HierarchyItem::Type)type ) {
+ case HierarchyItem::Widget:
+ case HierarchyItem::SlotParent:
+ qWarning( "getChildType: Inserting childs dynamically to Widget or SlotParent is not allwowed!" );
+ return (HierarchyItem::Type)type;
+ case HierarchyItem::Public:
+ case HierarchyItem::Protected:
+ case HierarchyItem::Private:
+ case HierarchyItem::Slot:
+ return HierarchyItem::Slot;
+ case HierarchyItem::DefinitionParent:
+ case HierarchyItem::Definition:
+ return HierarchyItem::Definition;
+ case HierarchyItem::Event:
+ case HierarchyItem::EventFunction:
+ return HierarchyItem::Event;
+ }
+ return (HierarchyItem::Type)type;
+}
+
+void HierarchyList::insertEntry( QListViewItem *i, const QPixmap &pix, const QString &s )
+{
+ HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, s,
+ QString::null, QString::null );
+ if ( !pix.isNull() )
+ item->setPixmap( 0, pix );
+ item->setRenameEnabled( 0, true );
+ setCurrentItem( item );
+ ensureItemVisible( item );
+ qApp->processEvents();
+ newItem = item;
+ item->startRename( 0 );
+}
+
+HierarchyView::HierarchyView( QWidget *parent )
+ : QTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+ WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
+{
+ formwindow = 0;
+ setIcon( PixmapChooser::loadPixmap( "logo" ) );
+ listview = new HierarchyList( this, formWindow() );
+ addTab( listview, i18n("Widgets" ) );
+}
+
+HierarchyView::~HierarchyView()
+{
+}
+
+void HierarchyView::clear()
+{
+ listview->clear();
+}
+
+void HierarchyView::setFormWindow( FormWindow *fw, QWidget *w )
+{
+ if (fw == 0 || w == 0)
+ {
+ listview->clear();
+ listview->setFormWindow(fw);
+ formwindow = 0;
+ }
+
+ if (fw == formwindow)
+ {
+ listview->setCurrent(w);
+ if (MainWindow::self->qWorkspace()->activeWindow() == fw)
+ showPage(listview);
+ return;
+ }
+
+ formwindow = fw;
+ listview->setFormWindow(fw);
+ listview->setup();
+ listview->setCurrent(w);
+
+ if (MainWindow::self->qWorkspace()->activeWindow() == fw)
+ showPage(listview);
+}
+
+FormWindow *HierarchyView::formWindow() const
+{
+ return formwindow;
+}
+
+void HierarchyView::closeEvent( QCloseEvent *e )
+{
+ emit hidden();
+ e->accept();
+}
+
+void HierarchyView::widgetInserted( QWidget * )
+{
+ listview->setup();
+}
+
+void HierarchyView::widgetRemoved( QWidget * )
+{
+ listview->setup();
+}
+
+void HierarchyView::widgetsInserted( const QWidgetList & )
+{
+ listview->setup();
+}
+
+void HierarchyView::widgetsRemoved( const QWidgetList & )
+{
+ listview->setup();
+}
+
+void HierarchyView::namePropertyChanged( QWidget *w, const QVariant & )
+{
+ QWidget *w2 = w;
+ if ( w->inherits( "QMainWindow" ) )
+ w2 = ( (QMainWindow*)w )->centralWidget();
+ listview->changeNameOf( w2, w->name() );
+}
+
+
+void HierarchyView::databasePropertyChanged( QWidget *w, const QStringList& info )
+{
+#ifndef QT_NO_SQL
+ QString i = info.join( "." );
+ listview->changeDatabaseOf( w, i );
+#else
+ Q_UNUSED(w);
+ Q_UNUSED(info);
+#endif
+}
+
+
+void HierarchyView::tabsChanged( QTabWidget * )
+{
+ listview->setup();
+}
+
+void HierarchyView::tabsChanged( QToolBox * )
+{
+ listview->setup();
+}
+
+void HierarchyView::pagesChanged( QWizard * )
+{
+ listview->setup();
+}
+
+void HierarchyView::rebuild()
+{
+ listview->setup();
+}
+
+void HierarchyView::closed( FormWindow *fw )
+{
+ if ( fw == formwindow )
+ listview->clear();
+}
+
+#include "hierarchyview.moc"
diff --git a/kommander/editor/hierarchyview.h b/kommander/editor/hierarchyview.h
new file mode 100644
index 00000000..54889ec2
--- /dev/null
+++ b/kommander/editor/hierarchyview.h
@@ -0,0 +1,161 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef HIRARCHYVIEW_H
+#define HIRARCHYVIEW_H
+
+#include <qvariant.h>
+#include <qlistview.h>
+#include <qtabwidget.h>
+#include <qguardedptr.h>
+#include <private/qcom_p.h>
+
+class FormWindow;
+class QCloseEvent;
+class QPopupMenu;
+class QKeyEvent;
+class QMouseEvent;
+class QWizard;
+class QToolBox;
+
+class HierarchyItem:public QListViewItem
+{
+public:
+ enum Type
+ {
+ Widget,
+ SlotParent,
+ Public,
+ Protected,
+ Private,
+ Slot,
+ DefinitionParent,
+ Definition,
+ Event,
+ EventFunction
+ };
+
+ HierarchyItem(Type type, QListViewItem * parent,
+ const QString & txt1, const QString & txt2, const QString & txt3);
+ HierarchyItem(Type type, QListView * parent,
+ const QString & txt1, const QString & txt2, const QString & txt3);
+
+ void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align);
+ void updateBackColor();
+
+ void setWidget(QWidget * w);
+ QWidget *widget() const;
+
+ void setText(int col, const QString & txt) {if (!txt.isEmpty()) QListViewItem::setText(col, txt);}
+ int rtti() const { return (int) typ;}
+
+private:
+ void okRename(int col);
+ void cancelRename(int col);
+
+private:
+ QColor backgroundColor();
+ QColor backColor;
+ QWidget *wid;
+ Type typ;
+};
+
+class HierarchyList:public QListView
+{
+ Q_OBJECT
+public:
+ HierarchyList(QWidget * parent, FormWindow * fw, bool doConnects = TRUE);
+
+ virtual void setup();
+ virtual void setCurrent(QWidget * w);
+ void setOpen(QListViewItem * i, bool b);
+ void changeNameOf(QWidget * w, const QString & name);
+ void changeDatabaseOf(QWidget * w, const QString & info);
+ void setFormWindow(FormWindow * fw) {formWindow = fw;}
+ void drawContentsOffset(QPainter * p, int ox, int oy, int cx, int cy, int cw, int ch)
+ { setUpdatesEnabled(FALSE); triggerUpdate(); setUpdatesEnabled(TRUE);
+ QListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch); }
+ void insertEntry(QListViewItem * i, const QPixmap & pix = QPixmap(), const QString & s =
+ QString::null);
+
+protected:
+ void keyPressEvent(QKeyEvent * e);
+ void keyReleaseEvent(QKeyEvent * e);
+ void viewportMousePressEvent(QMouseEvent * e);
+ void viewportMouseReleaseEvent(QMouseEvent * e);
+
+public slots:
+ void addTabPage();
+ void removeTabPage();
+
+private:
+ void insertObject(QObject * o, QListViewItem * parent);
+ QWidget *findWidget(QListViewItem * i);
+ QListViewItem *findItem(QWidget * w);
+ QWidget *current() const;
+
+ private slots: virtual void objectClicked(QListViewItem * i);
+ virtual void showRMBMenu(QListViewItem *, const QPoint &);
+
+protected:
+ FormWindow * formWindow;
+ QPopupMenu *normalMenu, *tabWidgetMenu;
+ bool deselect;
+};
+
+class HierarchyView : public QTabWidget
+{
+ Q_OBJECT
+
+public:
+ HierarchyView( QWidget *parent );
+ ~HierarchyView();
+
+ void setFormWindow( FormWindow *fw, QWidget *w );
+ FormWindow *formWindow() const;
+ void clear();
+ void widgetInserted( QWidget *w );
+ void widgetRemoved( QWidget *w );
+ void widgetsInserted( const QWidgetList &l );
+ void widgetsRemoved( const QWidgetList &l );
+ void namePropertyChanged( QWidget *w, const QVariant &old );
+ void databasePropertyChanged( QWidget *w, const QStringList& info );
+ void tabsChanged( QTabWidget *w );
+ void tabsChanged( QToolBox *w );
+ void pagesChanged( QWizard *w );
+ void rebuild();
+ void closed( FormWindow *fw );
+
+protected slots:
+
+protected:
+ void closeEvent( QCloseEvent *e );
+
+signals:
+ void hidden();
+
+private:
+ FormWindow *formwindow;
+ HierarchyList *listview;
+
+};
+
+
+#endif
diff --git a/kommander/editor/iconvieweditor.ui b/kommander/editor/iconvieweditor.ui
new file mode 100644
index 00000000..afa18459
--- /dev/null
+++ b/kommander/editor/iconvieweditor.ui
@@ -0,0 +1,450 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>IconViewEditorBase</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>IconViewEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>567</width>
+ <height>321</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit Iconview</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Edit Iconview&lt;/b&gt;&lt;p&gt;Add, edit or delete items in the icon view.&lt;/p&gt;&lt;p&gt;Click the &lt;b&gt;New Item&lt;/b&gt;-button to create a new item, then enter text and choose a pixmap.&lt;/p&gt;&lt;p&gt;Select an item from the view and click the &lt;b&gt;Delete Item&lt;/b&gt;-button to remove the item from the iconview.&lt;/p&gt;</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <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="QIconView">
+ <property name="name">
+ <cstring>preview</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>All items in the iconview.</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout5</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="QPushButton">
+ <property name="name">
+ <cstring>itemNew</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New Item</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Add an item</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Create a new item for the iconview.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>itemDelete</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete Item</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete item</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Delete the selected item.</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Vertical Spacing1</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>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>&amp;Item Properties</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>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Text:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemText</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>itemText</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Change text</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Change the text for the selected item.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>Label2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Pixmap:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemChoosePixmap</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="1">
+ <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>itemPixmap</cstring>
+ </property>
+ <property name="text">
+ <string>Label4</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>itemDeletePixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Delete the selected item's pixmap.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>itemChoosePixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select a Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select a pixmap file for the current item.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ </hbox>
+ </widget>
+ <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>buttonHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <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="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonApply</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Apply</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Apply all changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="409">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022630543251d2e253d856405bffcbc54105b19c856360003103711c6b53006ab440370316528264b4c198450c5808a94d1ed00aac214832b43124b544ec414d34b4c4c441103f11341120831309758313d0cf3b0840b7258d55a73010092c14eca</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>itemNew</sender>
+ <signal>clicked()</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>insertNewItem()</slot>
+ </connection>
+ <connection>
+ <sender>itemDelete</sender>
+ <signal>clicked()</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>deleteCurrentItem()</slot>
+ </connection>
+ <connection>
+ <sender>itemText</sender>
+ <signal>textChanged( const QString &amp; )</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>currentTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>okClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonApply</sender>
+ <signal>clicked()</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>applyClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>cancelClicked()</slot>
+ </connection>
+ <connection>
+ <sender>itemChoosePixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>choosePixmap()</slot>
+ </connection>
+ <connection>
+ <sender>preview</sender>
+ <signal>selectionChanged(QIconViewItem*)</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>currentItemChanged(QIconViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>preview</sender>
+ <signal>currentChanged(QIconViewItem*)</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>currentItemChanged(QIconViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>itemDeletePixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>IconViewEditorBase</receiver>
+ <slot>deletePixmap()</slot>
+ </connection>
+ <slot access="protected" language="C++" returnType="void">init()</slot>
+ <slot access="protected" language="C++" returnType="void">destroy()</slot>
+ <slot access="protected" language="C++" returnType="void">applyClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">cancelClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">choosePixmap()</slot>
+ <slot access="protected" language="C++" returnType="void">currentItemChanged( QIconViewItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">currentTextChanged( const QString &amp; )</slot>
+ <slot access="protected" language="C++" returnType="void">deleteCurrentItem()</slot>
+ <slot access="protected" language="C++" returnType="void">insertNewItem()</slot>
+ <slot access="protected" language="C++" returnType="void">deletePixmap()</slot>
+ <slot access="protected" language="C++" returnType="void">okClicked()</slot>
+</connections>
+<tabstops>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+ <tabstop>preview</tabstop>
+ <tabstop>itemNew</tabstop>
+ <tabstop>itemDelete</tabstop>
+ <tabstop>itemText</tabstop>
+ <tabstop>itemDeletePixmap</tabstop>
+ <tabstop>itemChoosePixmap</tabstop>
+ <tabstop>buttonHelp</tabstop>
+ <tabstop>buttonApply</tabstop>
+</tabstops>
+</UI>
diff --git a/kommander/editor/iconvieweditorimpl.cpp b/kommander/editor/iconvieweditorimpl.cpp
new file mode 100644
index 00000000..f7552cee
--- /dev/null
+++ b/kommander/editor/iconvieweditorimpl.cpp
@@ -0,0 +1,158 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "iconvieweditorimpl.h"
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "pixmapchooser.h"
+
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qiconview.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+
+#include <klocale.h>
+
+IconViewEditor::IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw )
+ : IconViewEditorBase( parent, 0, true ), formwindow( fw )
+{
+ connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ iconview = (QIconView*)editWidget;
+
+ itemText->setText( "" );
+ itemText->setEnabled( false );
+ itemPixmap->setText( "" );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+
+ QIconViewItem *i = 0;
+ for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
+ (void)new QIconViewItem( preview, i->text(), *i->pixmap() );
+ }
+
+ if ( preview->firstItem() )
+ preview->setCurrentItem( preview->firstItem() );
+}
+
+void IconViewEditor::insertNewItem()
+{
+ QIconViewItem *i = new QIconViewItem( preview, i18n("New Item" ) );
+ preview->setCurrentItem( i );
+ preview->setSelected( i, true );
+}
+
+void IconViewEditor::deleteCurrentItem()
+{
+ delete preview->currentItem();
+ if ( preview->currentItem() )
+ preview->setSelected( preview->currentItem(), true );
+}
+
+void IconViewEditor::currentItemChanged( QIconViewItem *i )
+{
+ itemText->blockSignals( true );
+ itemText->setText( "" );
+ itemPixmap->setText( "" );
+ itemText->blockSignals( false );
+
+ if ( !i ) {
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ return;
+ }
+
+ itemText->blockSignals( true );
+ itemText->setEnabled( true );
+ itemChoosePixmap->setEnabled( true );
+ itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
+
+ itemText->setText( i->text() );
+ if ( i->pixmap() )
+ itemPixmap->setPixmap( *i->pixmap() );
+ itemText->blockSignals( false );
+}
+
+void IconViewEditor::currentTextChanged( const QString &txt )
+{
+ if ( !preview->currentItem() )
+ return;
+
+ preview->currentItem()->setText( txt );
+}
+
+void IconViewEditor::okClicked()
+{
+ applyClicked();
+ accept();
+}
+
+void IconViewEditor::cancelClicked()
+{
+ reject();
+}
+
+void IconViewEditor::applyClicked()
+{
+ QIconViewItem *i = 0;
+ QValueList<PopulateIconViewCommand::Item> items;
+ for ( i = preview->firstItem(); i; i = i->nextItem() ) {
+ PopulateIconViewCommand::Item item;
+ if ( i->pixmap() )
+ item.pix = *i->pixmap();
+ item.text = i->text();
+ items.append( item );
+ }
+
+ PopulateIconViewCommand *cmd = new PopulateIconViewCommand( i18n("Edit Items of '%1'" ).arg( iconview->name() ),
+ formwindow, iconview, items );
+ cmd->execute();
+ formwindow->commandHistory()->addCommand( cmd );
+}
+
+void IconViewEditor::choosePixmap()
+{
+ if ( !preview->currentItem() )
+ return;
+
+ QPixmap pix;
+ if ( preview->currentItem()->pixmap() )
+ pix = qChoosePixmap( this, formwindow, *preview->currentItem()->pixmap() );
+ else
+ pix = qChoosePixmap( this, formwindow, QPixmap() );
+
+ if ( pix.isNull() )
+ return;
+
+ preview->currentItem()->setPixmap( pix );
+ itemPixmap->setPixmap( pix );
+ itemDeletePixmap->setEnabled( true );
+}
+
+void IconViewEditor::deletePixmap()
+{
+ if ( !preview->currentItem() )
+ return;
+
+ preview->currentItem()->setPixmap( QPixmap() );
+ itemPixmap->setText( "" );
+ itemDeletePixmap->setEnabled( false );
+}
+#include "iconvieweditorimpl.moc"
diff --git a/kommander/editor/iconvieweditorimpl.h b/kommander/editor/iconvieweditorimpl.h
new file mode 100644
index 00000000..120f0bb6
--- /dev/null
+++ b/kommander/editor/iconvieweditorimpl.h
@@ -0,0 +1,52 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef ICONVIEWEDITOR_H
+#define ICONVIEWEDITOR_H
+
+#include "iconvieweditor.h"
+
+class FormWindow;
+
+class IconViewEditor : public IconViewEditorBase
+{
+ Q_OBJECT
+
+public:
+ IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw );
+
+protected slots:
+ void insertNewItem();
+ void deleteCurrentItem();
+ void currentItemChanged( QIconViewItem * );
+ void currentTextChanged( const QString & );
+ void okClicked();
+ void cancelClicked();
+ void applyClicked();
+ void choosePixmap();
+ void deletePixmap();
+
+private:
+ QIconView *iconview;
+ FormWindow *formwindow;
+
+};
+
+#endif
diff --git a/kommander/editor/kmdr-editor.desktop b/kommander/editor/kmdr-editor.desktop
new file mode 100644
index 00000000..cdef1c5c
--- /dev/null
+++ b/kommander/editor/kmdr-editor.desktop
@@ -0,0 +1,129 @@
+[Desktop Entry]
+GenericName=Dynamic Dialog Editor
+GenericName[bg]=Редактор за диалогови прозорци
+GenericName[ca]=Editor de diàlegs dinàmics
+GenericName[cs]=Editor dynamických dialogů
+GenericName[da]=Dynamisk dialog-editor
+GenericName[de]=Editor für dynamische Dialoge
+GenericName[el]=ΕπεξεÏγαστής δυναμικών διαλόγων
+GenericName[en_GB]=Dynamic Dialogue Editor
+GenericName[es]=Editor de cuadros de diálogo dinámicos
+GenericName[et]=Dünaamiliste dialoogide redaktor
+GenericName[eu]=Elkarrizketa editore dinamikoa
+GenericName[fa]=ویرایشگر محاورۀ پویا
+GenericName[fi]=Dynaamisten dialogien editori
+GenericName[fr]=Éditeur dynamique de boîtes de dialogue
+GenericName[gl]=Editor de diálogos dinámicos
+GenericName[hi]=गतिशील संवाद संपादक
+GenericName[hu]=Párbeszédablak-szerkesztő
+GenericName[is]=Dynamic Dialog ritillinn
+GenericName[it]=Editor per le maschere dinamiche
+GenericName[ja]=動的ダイアログエディタ
+GenericName[ka]=დინáƒáƒ›áƒ˜áƒ£áƒ  დიáƒáƒšáƒáƒ’თრრედáƒáƒ¥áƒ¢áƒáƒ áƒ˜
+GenericName[lt]=Dinaminė dialogų rengyklė
+GenericName[ms]=Penyunting Dialog Dinamik
+GenericName[nds]=Editor för dünaamsch Dialogen
+GenericName[ne]=गतिशील संवाद समà¥à¤ªà¤¾à¤¦à¤•
+GenericName[nl]=Dynamische dialoog-editor
+GenericName[pl]=Edytor do dynamicznych okien dialogowych
+GenericName[pt]=Editor de Diálogos Dinâmicos
+GenericName[pt_BR]=Editor de Diálogo Dinâmico
+GenericName[ru]=Редактор диалогов
+GenericName[sk]=Dynamický editor dialógov
+GenericName[sl]=Urejevalnik dinamiÄnih pogovornih oken
+GenericName[sr]=Уређивач динамичких дијалога
+GenericName[sr@Latn]=UreÄ‘ivaÄ dinamiÄkih dijaloga
+GenericName[sv]=Editor för dynamiska dialogrutor
+GenericName[ta]=நிகழà¯à®®à¯ உரையாடல௠திரà¯à®¤à¯à®¤à®¿
+GenericName[tg]=Муҳаррири диалоги динамика
+GenericName[tr]=Dinamik Diyalog Düzenleyicisi
+GenericName[uk]=Динамічний редактор вікон
+GenericName[zh_CN]=动æ€å¯¹è¯æ¡†ç¼–辑器
+GenericName[zh_HK]=å‹•æ…‹å°è©±ç›’編輯器
+GenericName[zh_TW]=å‹•æ…‹å°è©±ç›’編輯器
+Name=Kommander Editor
+Name[br]=Aozer Kommander
+Name[ca]=Editor Kommander
+Name[cs]=Editor Kommanderu
+Name[da]=Kommander-editor
+Name[de]=Kommander-Editor
+Name[el]=ΕπεξεÏγαστής Kommander
+Name[et]=Redaktor Kommander
+Name[eu]=Kommander editorea
+Name[fa]=ویرایشگر Kommander
+Name[fi]=Komentoeditori
+Name[fr]=Éditeur Kommander
+Name[ga]=Eagarthóir Kommander
+Name[hi]=कमांडर संपादक
+Name[hu]=Kommander
+Name[is]=Kommander ritillinn
+Name[it]=Editor Kommander
+Name[ja]=Kommander エディタ
+Name[lt]=Kommander rengyklÄ—
+Name[ms]=Penyunting Kommander
+Name[nds]=Kommander-Editor
+Name[ne]=आदेश समà¥à¤ªà¤¾à¤¦à¤•
+Name[pa]=Kommander ਸੰਪਾਦਕ
+Name[pl]=Edytor Kommander
+Name[pt]=Editor do Kommander
+Name[pt_BR]=Editor Kommander
+Name[ru]=Редактор Kommander
+Name[sl]=Urejevalnik Kommander
+Name[sr]=Kommander уређивач
+Name[sr@Latn]=Kommander ureÄ‘ivaÄ
+Name[sv]=Kommander editor
+Name[ta]=Kகடà¯à®Ÿà®³à¯ˆà®¤à¯ திரà¯à®¤à¯à®¤à®¿
+Name[tg]=Муҳаррири Kommander
+Name[tr]=Kommander Düzenleyici
+Name[uk]=Редактор Kommander
+Name[zh_CN]=Kommander 编辑器
+Name[zh_HK]=Kommander 編輯器
+Name[zh_TW]=Kommander 編輯器
+Exec=kmdr-editor %F
+Icon=kommander
+Type=Application
+Comment=Dynamic Dialog Editor
+Comment[bg]=Редактор за диалогови прозорци
+Comment[ca]=Editor de diàlegs dinàmics
+Comment[cs]=Editor dynamických dialogů
+Comment[da]=Dynamisk dialog-editor
+Comment[de]=Editor für dynamische Dialoge
+Comment[el]=ΕπεξεÏγαστής δυναμικών διαλόγων
+Comment[en_GB]=Dynamic Dialogue Editor
+Comment[es]=Editor de cuadros de diálogo dinámicos
+Comment[et]=Dünaamiliste dialoogide redaktor
+Comment[eu]=Elkarrizketa editore dinamikoa
+Comment[fa]=ویرایشگر محاورۀ پویا
+Comment[fi]=Dynaamisten dialogien editori
+Comment[fr]=Éditeur dynamique de boîtes de dialogue
+Comment[gl]=Editor de diálogos dinámicos
+Comment[hi]=गतिशील संवाद संपादक
+Comment[hu]=Párbeszédablak-szerkesztő
+Comment[is]=Dynamic Dialog ritillinn
+Comment[it]=Editor per le maschere dinamiche
+Comment[ja]=動的ダイアログエディタ
+Comment[ka]=დინáƒáƒ›áƒ˜áƒ£áƒ  დიáƒáƒšáƒáƒ’თრრედáƒáƒ¥áƒ¢áƒáƒ áƒ˜
+Comment[lt]=Dinaminė dialogų rengyklė
+Comment[ms]=Penyunting Dialog Dinamik
+Comment[nds]=Editor för dünaamsch Dialogen
+Comment[ne]=गतिशील संवाद समà¥à¤ªà¤¾à¤¦à¤•
+Comment[nl]=Dynamische dialoog-editor
+Comment[pl]=Edytor do dynamicznych okien dialogowych
+Comment[pt]=Editor de diálogos dinâmicos
+Comment[pt_BR]=Editor de Diálogo Dinâmico
+Comment[ru]=ДинамичеÑкий редактор диалогов
+Comment[sk]=Dynamický editor dialógov
+Comment[sl]=Urejevalnik dinamiÄnih pogovornih oken
+Comment[sr]=Уређивач динамичких дијалога
+Comment[sr@Latn]=UreÄ‘ivaÄ dinamiÄkih dijaloga
+Comment[sv]=Editor för dynamiska dialogrutor
+Comment[ta]=நிகழà¯à®®à¯ உரையாடல௠திரà¯à®¤à¯à®¤à®¿
+Comment[tg]=Муҳаррири диалоги динамика
+Comment[tr]=Dinamik Diyalog Düzenleyicisi
+Comment[uk]=Динамічний редактор вікон
+Comment[zh_CN]=动æ€å¯¹è¯æ¡†ç¼–辑器
+Comment[zh_HK]=å‹•æ…‹å°è©±ç›’編輯器
+Comment[zh_TW]=å‹•æ…‹å°è©±ç›’編輯器
+MimeType=application/x-kommander;
+DocPath=kommander/index.html
+Categories=Qt;KDE;Development;
diff --git a/kommander/editor/kommander-new.xml b/kommander/editor/kommander-new.xml
new file mode 100644
index 00000000..deb3d88a
--- /dev/null
+++ b/kommander/editor/kommander-new.xml
@@ -0,0 +1,587 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE language SYSTEM "language.dtd"
+[
+ <!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#&#37;@-]*">
+ <!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*">
+ <!ENTITY word "[^|&amp;;()&lt;&gt;\s]+"> <!-- see man bash -->
+ <!ENTITY eos "(?=($|\s))"> <!-- eol or space following -->
+ <!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
+]>
+<language name="Kommander (new parser)" version="1.0" kateversion="2.4" section="Scripts" extensions="*.kmdr" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl), Andras Mantia (amantia@kde.org)" license="LGPL">
+
+<!-- (c) 2004 by Wilbert Berendsen, wilbert@kde.nl
+ Released under the LGPL, part of kdelibs/kate
+
+ Added Kommander specific highlighting.
+ (c) 2006 Andras Mantia, amantia@kde.org
+-->
+
+ <highlighting>
+
+ <list name="kmdrdcopfunctions">
+ <item>addUniqueItem</item>
+ <item>associatedText</item>
+ <item>cancel</item>
+ <item>cellText</item>
+ <item>clear</item>
+ <item>checked</item>
+ <item>children</item>
+ <item>columnCount</item>
+ <item>count</item>
+ <item>currentColumn</item>
+ <item>currentItem</item>
+ <item>currentRow</item>
+ <item>execute</item>
+ <item>findItem</item>
+ <item>geometry</item>
+ <item>global</item>
+ <item>hasFocus</item>
+ <item>insertColumn</item>
+ <item>insertItem</item>
+ <item>insertItems</item>
+ <item>insertRow</item>
+ <item>item</item>
+ <item>itemDepth</item>
+ <item>itemPath</item>
+ <item>removeColumn</item>
+ <item>removeItem</item>
+ <item>removeRow</item>
+ <item>rowCount</item>
+ <item>selection</item>
+ <item>setAssociatedText</item>
+ <item>setChecked</item>
+ <item>setCellText</item>
+ <item>setCurrentItem</item>
+ <item>setColumnCaption</item>
+ <item>setEnabled</item>
+ <item>setGlobal</item>
+ <item>setMaximum</item>
+ <item>setPixmap</item>
+ <item>setRowCaption</item>
+ <item>setSelection</item>
+ <item>setText</item>
+ <item>setVisible</item>
+ <item>text</item>
+ <item>type</item>
+ <item>setCellWidget</item>
+ <item>cellWidget</item>
+ <item>setEditable</item>
+ <item>type</item>
+ <item>insertTab</item>
+ </list>
+
+ <list name="kmdrfunctions">
+ <item>widgetText</item>
+ <item>selectedWidgetText</item>
+ <item>null</item>
+ <item>pid</item>
+ <item>dcopid</item>
+ <item>parentPid</item>
+ <item>debug</item>
+ <item>echo</item>
+ <item>env</item>
+ <item>exec</item>
+ <item>execBackground</item>
+ <item>global</item>
+ <item>i18n</item>
+ <item>dialog</item>
+ <item>readSetting</item>
+ <item>setGlobal</item>
+ <item>writeSetting</item>
+ <item>dcop</item>
+ <item>forBlock</item>
+ <item>forEachBlock</item>
+ <item>ifBlock</item>
+ <item>comment</item>
+ <item>createWidget</item>
+ <item>connect</item>
+ <item>disconnect</item>
+ <item>return</item>
+ <item>internalDcop</item>
+ <item>executeSlot</item>
+ <item>widgetExists</item>
+ </list>
+
+ <list name="kmdrarray">
+ <item>array_values</item>
+ <item>array_keys</item>
+ <item>array_clear</item>
+ <item>array_count</item>
+ <item>array_value</item>
+ <item>array_remove</item>
+ <item>array_setValue</item>
+ <item>array_fromString</item>
+ <item>array_toString</item>
+ <item>array_indexedFromString</item>
+ <item>array_indexedRemoveElements</item>
+ <item>array_indexedInsertElements</item>
+ <item>array_indexedToString</item>
+ <item>array_flipCopy</item>
+ </list>
+
+ <list name="kmdrmatrix">
+ <item>matrix_fromString</item>
+ <item>matrix_toString</item>
+ <item>matrix_clear</item>
+ <item>matrix_rows</item>
+ <item>matrix_columnToArray</item>
+ <item>matrix_columnToIndexedArray</item>
+ <item>matrix_rowToArray</item>
+ <item>matrix_columns</item>
+ <item>matrix_rowKeys</item>
+ <item>matrix_columnKeys</item>
+ <item>matrix_removeRow</item>
+ <item>matrix_removeColumn</item>
+ <item>matrix_addRow</item>
+ <item>matrix_findRow</item>
+ <!--<item>matrix_addColumn</item>
+ <item>matrix_indexedCopy</item>-->
+ </list>
+
+ <list name="kmdrstring">
+ <item>str_length</item>
+ <item>str_contains</item>
+ <item>str_find</item>
+ <item>str_findRev</item>
+ <item>str_left</item>
+ <item>str_right</item>
+ <item>str_mid</item>
+ <item>str_remove</item>
+ <item>str_replace</item>
+ <item>str_upper</item>
+ <item>str_lower</item>
+ <item>str_compare</item>
+ <item>str_isEmpty</item>
+ <item>str_isNumber</item>
+ <item>str_section</item>
+ <item>str_args</item>
+ <item>str_toint</item>
+ <item>str_todouble</item>
+ <item>str_round</item>
+ <item>str_sort</item>
+ <item>str_trim</item>
+ <item>str_padLeft</item>
+ <item>str_padRight</item>
+ <item>str_count</item>
+ </list>
+
+ <list name="kmdrfile">
+ <item>file_read</item>
+ <item>file_write</item>
+ <item>file_append</item>
+ <item>file_exists</item>
+ </list>
+
+ <list name="kmdrinput">
+ <item>input_color</item>
+ <item>input_text</item>
+ <item>input_password</item>
+ <item>input_value</item>
+ <item>input_double</item>
+ <item>input_valueDouble</item>
+ <item>input_openfile</item>
+ <item>input_openfiles</item>
+ <item>input_savefile</item>
+ <item>input_directory</item>
+ </list>
+
+ <list name="kmdrmessage">
+ <item>message_info</item>
+ <item>message_error</item>
+ <item>message_question</item>
+ <item>message_warning</item>
+ </list>
+
+
+ <list name="keywords">
+ <item> else </item>
+ <item> for </item>
+ <item> to </item>
+ <item> function </item>
+ <item> in </item>
+ <item> select </item>
+ <item> while </item>
+ <item> . </item>
+ <item> elseif </item>
+ <item> then </item>
+ <item> set </item>
+ <item> foreach </item>
+ <item> end </item>
+ <item> endif </item>
+ <item> do </item>
+ <item> break </item>
+ <item> continue </item>
+ <item> exit </item>
+ <item> switch </item>
+ <item> and </item>
+ <item> or </item>
+ <item> not </item>
+ <item> step </item>
+ <item> with </item>
+ </list>
+
+ <list name="booleans">
+ <item>true</item>
+ <item>false</item>
+ </list>
+
+ <contexts>
+ <context attribute="Normal Text" lineEndContext="#stay" name="Start">
+ <IncludeRules context="FindAll" />
+ </context>
+
+<!-- ====== The following rulessets are meant to be included ======== -->
+ <!-- FindAll tries to interpret everything -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindAll">
+ <IncludeRules context="FindComments" />
+ <IncludeRules context="FindBlockComments" />
+ <IncludeRules context="FindCommands" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- FindComments consumes shell comments till EOL -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="FindComments">
+ <Detect2Chars attribute="Comment" context="Comment" char="/" char1="/" firstNonSpace="true"/>
+ <RegExpr attribute="Normal Text" context="Comment" String="[\s;](?=/)" />
+ </context>
+ <!-- FindBlockComments consumes comments to end of block -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindBlockComments">
+ <Detect2Chars attribute="Comment" context="twolinecomment" char="/" char1="&#42;" beginRegion="Comment" />
+ </context>
+ <context name="twolinecomment" attribute="Comment" lineEndContext="#stay">
+ <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" />
+ </context>
+
+ <context attribute="Comment" lineEndContext="#pop" name="Comment">
+ <IncludeRules context="##Alerts" />
+ </context>
+
+ <!-- FindCommands matches many items that can be expected outside strings, substitutions etc. -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindCommands">
+ <!-- start expression in double parentheses -->
+ <Detect2Chars attribute="Keyword" context="ExprDblParen" char="(" char1="(" beginRegion="expression" />
+ <!-- start expression in double brackets -->
+ <RegExpr attribute="Keyword" context="ExprDblBracket" String="\[\[&eos;" beginRegion="expression" column="0"/>
+ <RegExpr attribute="Keyword" context="ExprDblBracket" String="\s\[\[&eos;" beginRegion="expression" />
+ <!-- start expression in single brackets -->
+ <RegExpr attribute="Builtin" context="ExprBracket" String="\[&eos;" beginRegion="expression" column="0"/>
+ <RegExpr attribute="Builtin" context="ExprBracket" String="\s\[&eos;" beginRegion="expression" />
+ <!-- start a group command with { -->
+ <RegExpr attribute="Keyword" context="Group" String="\{&eos;" beginRegion="group" />
+ <!-- match do and if blocks -->
+ <RegExpr attribute="Keyword" context="#stay" String="\bfor&noword;" beginRegion="for" />
+ <RegExpr attribute="Keyword" context="#stay" String="\bforeach&noword;" beginRegion="for" />
+ <RegExpr attribute="Keyword" context="#stay" String="\bwhile&noword;" beginRegion="for" />
+ <RegExpr attribute="Keyword" context="#stay" String="\bend&noword;" endRegion="for" />
+ <RegExpr attribute="Keyword" context="#stay" String="\bif&noword;" beginRegion="if" />
+ <RegExpr attribute="Keyword" context="#stay" String="\belseif&noword;" beginRegion="if" endRegion="if"/>
+ <RegExpr attribute="Keyword" context="#stay" String="\belse&noword;" beginRegion="if" endRegion="if"/>
+ <RegExpr attribute="Keyword" context="#stay" String="\bendif&noword;" endRegion="if"/>
+ <RegExpr attribute="Keyword" context="#stay" String="\}&eos;" endRegion="group"/>
+ <!-- handle case as a special case -->
+ <RegExpr attribute="Keyword" context="Case" String="\bcase&noword;" beginRegion="case" />
+ <!-- handle command line options -->
+ <RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9]+" />
+ <RegExpr attribute="Option" context="#stay" String="--[a-z][A-Za-z0-9_-]*" />
+ <!-- handle keywords -->
+ <keyword attribute="Keyword" context="#stay" String="keywords" />
+ <keyword attribute="Builtin" context="#stay" String="booleans" />
+ <!-- handle here-string -->
+ <StringDetect attribute="Redirection" context="#stay" String="&lt;&lt;&lt;" />
+ <!-- handle &, &&, | and || -->
+ <RegExpr attribute="Control" context="#stay" String="([|&amp;])\1?" />
+ <!-- Kommander rules -->
+ <RegExpr attribute="KmdrMethod" context="DetectKmdr" String="\b&varname;[\.|\[]" lookAhead="true"/>
+ <RegExpr attribute="KmdrMethod" context="DetectKmdrMethod" String="kmdrfunctions\(" />
+ <keyword attribute="DCOPMethod" context="#stay" String="kmdrfunctions" />
+ <keyword attribute="KmdrArray" context="#stay" String="kmdrarray" />
+ <keyword attribute="KmdrMatrix" context="#stay" String="kmdrmatrix" />
+ <keyword attribute="KmdrString" context="#stay" String="kmdrstring" />
+ <keyword attribute="KmdrFile" context="#stay" String="kmdrfile" />
+ <keyword attribute="KmdrInput" context="#stay" String="kmdrinput" />
+ <keyword attribute="KmdrMessage" context="#stay" String="kmdrmessage" />
+ <!-- handle variable assignments -->
+ <RegExpr attribute="GlobalVariable" context="#stay" String="\b_&varname;" />
+ <RegExpr attribute="Variable" context="#stay" String="\b&varname;" />
+ </context>
+
+ <!-- Kommander rules -->
+
+ <context attribute="KmdrVariable" lineEndContext="FindAll" name="DetectKmdr">
+ <RegExpr attribute="KmdrMethod" context="#stay" String="&varname;" />
+ <DetectChar attribute="Normal Text" context="#pop" char="(" lookAhead="true"/>
+ <DetectChar attribute="Normal Text" context="#pop" char=")" lookAhead="true"/>
+ <DetectChar attribute="Normal Text" context="#pop" char="[" lookAhead="true"/>
+ <DetectChar attribute="Normal Text" context="#pop" char="]" lookAhead="true"/>
+ <DetectChar attribute="Normal Text" context="#pop" char="{" lookAhead="true"/>
+ <DetectChar attribute="Normal Text" context="#pop" char="}" lookAhead="true"/>
+ <DetectChar attribute="KmdrMethod" context="DetectKmdrMethod" char="." lookAhead="true"/>
+ <RegExpr attribute="Normal Text" context="#pop" String="[\s\=\;\+\-\*\/\%]+" />
+
+ </context>
+ <context attribute="DCOPMethod" lineEndContext="FindAll" name="DetectKmdrMethod">
+ <DetectChar attribute="Normal Text" context="FindAll" char="(" lookAhead="true"/>
+ <DetectChar attribute="Normal Text" context="FindAll" char=")" lookAhead="true"/>
+ <RegExpr attribute="Normal Text" context="FindAll" String="[\s\=\;\+\-\*\/\%]+" />
+ </context>
+
+ <!-- FindOthers contains various rules to mark different shell input -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindOthers">
+ <RegExpr attribute="Escape" context="#stay" String="\\[][;&quot;\\'$`{}()|&amp;&lt;&gt;* ]" />
+ <RegExpr attribute="Keyword" context="#stay" String="\\$" />
+ <RegExpr attribute="Escape" context="#stay" String="\{(?!(\s|$))\S*\}" />
+ <RegExpr attribute="Path" context="#stay" String="\.?/[\w_@.+-]+(?=([\s/):]|$))" />
+ <!-- TODO: shell globs -->
+ </context>
+
+ <!-- FindStrings looks for single and double quoted strings, also with $-prefix -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">
+ <DetectChar attribute="String SingleQ" context="StringSQ" char="'" />
+ <DetectChar attribute="String DoubleQ" context="StringDQ" char="&quot;" />
+ <!-- <Detect2Chars attribute="String SingleQ" context="StringEsc" char="$" char1="'" /> -->
+ <!-- <Detect2Chars attribute="String Transl." context="StringDQ" char="$" char1="&quot;" /> -->
+ </context>
+
+ <!-- FindSubstitutions goes after anything starting with $ and ` and their escapes -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindSubstitutions">
+ <!-- <RegExpr attribute="Variable" context="#stay" String="\$[*@#?$!_0-9-]" />
+ <RegExpr attribute="Variable" context="Subscript" String="\$&varname;\[" />
+ <RegExpr attribute="Variable" context="#stay" String="\$&varname;" />
+ <RegExpr attribute="Variable" context="#stay" String="\$\{[*@#?$!_0-9-]\}" />
+ <RegExpr attribute="Variable" context="#stay" String="\$\{#&varname;\}" />
+ <RegExpr attribute="Variable" context="#stay" String="\$\{!&varname;\*?\}" />-->
+ <RegExpr attribute="Variable" context="VarBrace" String="\$\{&varname;" />
+ <RegExpr attribute="Variable" context="VarBrace" String="\$\{[*@#?$!_0-9-](?=[:#%/])" />
+ <StringDetect attribute="Variable" context="ExprDblParenSubst" String="$((" beginRegion="expression" />
+ <StringDetect attribute="Redirection" context="SubstFile" String="$(&lt;" />
+ <StringDetect attribute="Variable" context="SubstCommand" String="$(" />
+ <DetectChar attribute="Backquote" context="SubstBackq" char="`" />
+ <RegExpr attribute="Escape" context="#stay" String="\\[`$\\]" />
+ </context>
+
+
+
+
+
+<!-- ====== These are the contexts that can be branched to ======= -->
+
+ <!-- ExprDblParen consumes an expression started in command mode till )) -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParen">
+ <Detect2Chars attribute="Keyword" context="#pop" char=")" char1=")" endRegion="expression" />
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- ExprDblParenSubst like ExprDblParen but matches )) as Variable -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParenSubst">
+ <Detect2Chars attribute="Variable" context="#pop" char=")" char1=")" endRegion="expression" />
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- ExprSubParen consumes an expression till ) -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprSubParen">
+ <DetectChar attribute="Normal Text" context="#pop" char=")" />
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- ExprBracket consumes an expression till ] -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprBracket">
+ <RegExpr attribute="Builtin" context="#pop" String="\s\](?=($|[\s;|&amp;]))" endRegion="expression" />
+ <RegExpr attribute="Builtin" context="#pop" String="\](?=($|[\s;|&amp;]))" endRegion="expression" column="0"/>
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- ExprDblBracket consumes an expression till ]] -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracket">
+ <RegExpr attribute="Keyword" context="#pop" String="\s\]\](?=($|[\s;|&amp;]))" endRegion="expression" />
+ <RegExpr attribute="Keyword" context="#pop" String="\]\](?=($|[\s;|&amp;]))" endRegion="expression" column="0"/>
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- Group consumes shell input till } -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="Group">
+ <DetectChar attribute="Keyword" context="#pop" char="}" endRegion="group" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- SubShell consumes shell input till ) -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="SubShell">
+ <DetectChar attribute="Keyword" context="#pop" char=")" endRegion="subshell" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- Assign consumes an expression till EOL or whitespace -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="Assign" fallthrough="true" fallthroughContext="#pop">
+ <DetectChar attribute="Variable" context="AssignArray" char="(" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ <RegExpr attribute="Normal Text" context="#stay" String="[\w:,+_./-]+" />
+ </context>
+
+ <!-- AssignArray consumes everything till ), marking assignments -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="AssignArray">
+ <DetectChar attribute="Variable" context="#pop" char=")" />
+ <DetectChar attribute="Variable" context="Subscript" char="[" />
+ <DetectChar attribute="Variable" context="Assign" char="=" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- AssignSubscr first expects a [ then parses subscript and continues with '=value' -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="AssignSubscr" fallthrough="true" fallthroughContext="#pop">
+ <DetectChar attribute="Variable" context="Subscript" char="[" />
+ <DetectChar attribute="Variable" context="Assign" char="=" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- Subscript consumes anything till ], marks as Variable -->
+ <context attribute="Variable" lineEndContext="#stay" name="Subscript">
+ <DetectChar attribute="Variable" context="#pop" char="]" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- FunctionDef consumes a name, possibly with (), marks as Function -->
+ <context attribute="Function" lineEndContext="#pop" name="FunctionDef" fallthrough="true" fallthroughContext="#pop">
+ <RegExpr attribute="Function" context="#pop" String="\s+&funcname;(\s*\(\))?" />
+ </context>
+
+ <!-- VarName consumes spare variable names and assignments -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="VarName" fallthrough="true" fallthroughContext="#pop">
+ <!-- handle command line options -->
+ <RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9]+" />
+ <RegExpr attribute="Option" context="#stay" String="--[a-z][A-Za-z0-9_-]*" />
+ <RegExpr attribute="Variable" context="#stay" String="\b&varname;" />
+ <DetectChar attribute="Variable" context="Subscript" char="[" />
+ <DetectChar attribute="Variable" context="Assign" char="=" />
+ <IncludeRules context="FindAll" />
+ <!-- stay here in spaces and other safe characters -->
+ <RegExpr attribute="Normal Text" context="#stay" String="[^]})|;`&amp;&gt;&lt;]" />
+ </context>
+
+ <!-- StringSQ consumes anything till ' -->
+ <context attribute="String SingleQ" lineEndContext="#stay" name="StringSQ">
+
+ <DetectChar attribute="String SingleQ" context="#pop" char="'" />
+ </context>
+
+ <!-- StringDQ consumes anything till ", substitutes vars and expressions -->
+ <context attribute="String DoubleQ" lineEndContext="#stay" name="StringDQ">
+ <DetectChar attribute="String DoubleQ" context="#pop" char="&quot;" />
+ <RegExpr attribute="String Escape" context="#stay" String="\\[`&quot;\\$\n]" />
+ <IncludeRules context="FindSubstitutions" />
+ </context>
+
+ <!-- StringEsc eats till ', but escaping many characters -->
+ <context attribute="String SingleQ" lineEndContext="#stay" name="StringEsc">
+ <DetectChar attribute="String SingleQ" context="#pop" char="'" />
+ <RegExpr attribute="String Escape" context="#stay" String="\\[abefnrtv\\']" />
+ <RegExpr attribute="String Escape" context="#stay" String="\\([0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)" />
+ </context>
+
+ <!-- VarBrace is called as soon as ${xxx is encoutered -->
+ <context attribute="Variable" lineEndContext="#stay" name="VarBrace">
+ <DetectChar attribute="Variable" context="#pop" char="}" />
+ <DetectChar attribute="Variable" context="Subscript" char="[" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <!-- TODO: highlight various special parameter expansions } -->
+ </context>
+
+ <!-- SubstFile is called after a <( or >( is encoutered -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="SubstFile">
+ <DetectChar attribute="Redirection" context="#pop" char=")" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- SubstCommand is called after a $( is encountered -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="SubstCommand">
+ <DetectChar attribute="Variable" context="#pop" char=")" />
+ <IncludeRules context="FindCommands" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- SubstBackq is called when a backquote is encountered -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="SubstBackq">
+ <DetectChar attribute="Keyword" context="#pop" char="`" />
+ <IncludeRules context="FindCommands" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- Case is called after the case keyword is encoutered. We handle this because of
+ the lonely closing parentheses that would otherwise disturb the expr matching -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="Case">
+ <RegExpr attribute="Keyword" context="CaseIn" String="\sin\b" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- CaseIn is called when the construct 'case ... in' has been found. -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="CaseIn">
+ <RegExpr attribute="Keyword" context="#pop#pop" String="\besac(?=$|[\s;)])" endRegion="case" />
+ <DetectChar attribute="Keyword" context="CaseExpr" char=")" beginRegion="caseexpr" />
+ <AnyChar attribute="Keyword" context="#stay" String="(|" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- CaseExpr eats shell input till ;; -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="CaseExpr">
+ <Detect2Chars attribute="Keyword" context="#pop" char=";" char1=";" endRegion="caseexpr" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+
+ </contexts>
+
+ <itemDatas>
+ <itemData name="Normal Text" defStyleNum="dsNormal" />
+ <itemData name="Comment" defStyleNum="dsComment" />
+ <itemData name="Keyword" defStyleNum="dsKeyword" />
+ <itemData name="Control" defStyleNum="dsKeyword" />
+ <itemData name="Builtin" defStyleNum="dsKeyword" color="#808" />
+ <itemData name="Command" defStyleNum="dsKeyword" color="#c0c" />
+ <itemData name="Redirection" defStyleNum="dsKeyword" color="#238" />
+ <itemData name="Escape" defStyleNum="dsDataType" />
+ <itemData name="String SingleQ" defStyleNum="dsString" />
+ <itemData name="String DoubleQ" defStyleNum="dsString" />
+ <itemData name="Backquote" defStyleNum="dsKeyword" />
+ <itemData name="String Transl." defStyleNum="dsString" />
+ <itemData name="String Escape" defStyleNum="dsDataType" />
+ <itemData name="Variable" defStyleNum="dsOthers" />
+ <itemData name="Expression" defStyleNum="dsOthers" />
+ <itemData name="Function" defStyleNum="dsChar" bold="1" />
+ <itemData name="Path" defStyleNum="dsNormal" />
+ <itemData name="Option" defStyleNum="dsNormal" />
+ <itemData name="GlobalVariable" defStyleNum="dsOthers" bold="1" />
+ <itemData name="KmdrMethod" defStyleNum="dsKeyword" italic="1" color="#008000" />
+ <itemData name="DCOPMethod" defStyleNum="dsKeyword" italic="1" color="#21E52B" />
+ <itemData name="KmdrString" defStyleNum="dsKeyword" italic="1" color="#D0D000" />
+ <itemData name="KmdrArray" defStyleNum="dsKeyword" italic="1" color="#C0C0FF" />
+ <itemData name="KmdrMatrix" defStyleNum="dsKeyword" italic="1" color="#5050AA" />
+ <itemData name="KmdrFile" defStyleNum="dsKeyword" italic="1" color="#FF0000" />
+ <itemData name="KmdrInput" defStyleNum="dsKeyword" italic="1" color="#FF8000" />
+ <itemData name="KmdrMessage" defStyleNum="dsKeyword" italic="1" color="#800000" />
+ </itemDatas>
+ </highlighting>
+ <general>
+ <comments>
+ <comment name="singleLine" start="//"/>
+ <comment name="multiLine" start="/*" end="*/" />
+ </comments>
+ <keywords casesensitive="1" weakDeliminator="^%#[]$._{}:-" additionalDeliminator="`."/>
+ </general>
+</language>
diff --git a/kommander/editor/kommander.xml b/kommander/editor/kommander.xml
new file mode 100644
index 00000000..f5880b2f
--- /dev/null
+++ b/kommander/editor/kommander.xml
@@ -0,0 +1,998 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE language SYSTEM "language.dtd"
+[
+ <!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#&#37;@-]*">
+ <!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*">
+ <!ENTITY word "[^|&amp;;()&lt;&gt;\s]+"> <!-- see man bash -->
+ <!ENTITY eos "(?=($|\s))"> <!-- eol or space following -->
+ <!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
+]>
+<language name="Kommander (old parser)" version="2.07" kateversion="2.4" section="Scripts" extensions="*.kmdr" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl), Andras Mantia (amantia@kde.org)" license="LGPL">
+
+<!-- (c) 2004 by Wilbert Berendsen, wilbert@kde.nl
+ Released under the LGPL, part of kdelibs/kate
+
+ Added Kommander specific highlighting.
+ (c) 2006 Andras Mantia, amantia@kde.org
+-->
+
+ <highlighting>
+
+ <list name="kmdrdcopfunctions">
+ <item>addUniqueItem</item>
+ <item>associatedText</item>
+ <item>cancel</item>
+ <item>cellText</item>
+ <item>clear</item>
+ <item>checked</item>
+ <item>children</item>
+ <item>count</item>
+ <item>currentColumn</item>
+ <item>currentItem</item>
+ <item>currentRow</item>
+ <item>execute</item>
+ <item>findItem</item>
+ <item>geometry</item>
+ <item>global</item>
+ <item>hasFocus</item>
+ <item>insertColumn</item>
+ <item>insertItem</item>
+ <item>insertItems</item>
+ <item>insertRow</item>
+ <item>item</item>
+ <item>itemDepth</item>
+ <item>itemPath</item>
+ <item>removeColumn</item>
+ <item>removeItem</item>
+ <item>removeRow</item>
+ <item>selection</item>
+ <item>setAssociatedText</item>
+ <item>setChecked</item>
+ <item>setCellText</item>
+ <item>setCurrentItem</item>
+ <item>setColumnCaption</item>
+ <item>setEnabled</item>
+ <item>setGlobal</item>
+ <item>setMaximum</item>
+ <item>setPixmap</item>
+ <item>setRowCaption</item>
+ <item>setSelection</item>
+ <item>setText</item>
+ <item>setVisible</item>
+ <item>text</item>
+ <item>type</item>
+ </list>
+
+ <list name="kmdrfunctions">
+ <item>widgetText</item>
+ <item>selectedWidgetText</item>
+ <item>null</item>
+ <item>pid</item>
+ <item>dcopid</item>
+ <item>parentPid</item>
+ <item>debug</item>
+ <item>echo</item>
+ <item>env</item>
+ <item>exec</item>
+ <item>expr</item>
+ <item>global</item>
+ <item>i18n</item>
+ <item>dialog</item>
+ <item>readSetting</item>
+ <item>setGlobal</item>
+ <item>writeSetting</item>
+ <item>dcop</item>
+ <item>switchBlock</item>
+ <item>execBegin</item>
+ <item>forBlock</item>
+ <item>forEachBlock</item>
+ <item>ifBlock</item>
+ <item>comment</item>
+ </list>
+
+ <list name="kmdrarray">
+ <item>values</item>
+ <item>keys</item>
+ <item>clear</item>
+ <item>count</item>
+ <item>value</item>
+ <item>remove</item>
+ <item>setValue</item>
+ <item>fromString</item>
+ <item>toString</item>
+ </list>
+
+ <list name="kmdrstring">
+ <item>length</item>
+ <item>contains</item>
+ <item>find</item>
+ <item>findRev</item>
+ <item>left</item>
+ <item>right</item>
+ <item>mid</item>
+ <item>remove</item>
+ <item>replace</item>
+ <item>upper</item>
+ <item>lower</item>
+ <item>compare</item>
+ <item>isEmpty</item>
+ <item>isNumber</item>
+ <item>section</item>
+ <item>args</item>
+ <item>round</item>
+ </list>
+
+ <list name="kmdrfile">
+ <item>read</item>
+ <item>write</item>
+ <item>append</item>
+ <item>exists</item>
+ </list>
+
+ <list name="kmdrinput">
+ <item>color</item>
+ <item>text</item>
+ <item>password</item>
+ <item>value</item>
+ <item>double</item>
+ <item>valueDouble</item>
+ <item>openfile</item>
+ <item>openfiles</item>
+ <item>savefile</item>
+ <item>directory</item>
+ </list>
+
+ <list name="kmdrmessage">
+ <item>info</item>
+ <item>error</item>
+ <item>question</item>
+ <item>warning</item>
+ </list>
+
+
+ <list name="keywords">
+ <item> else </item>
+ <item> for </item>
+ <item> function </item>
+ <item> in </item>
+ <item> select </item>
+ <item> until </item>
+ <item> while </item>
+ <item> . </item>
+ <item> elif </item>
+ <item> then </item>
+ <item> set </item>
+ <item> foreach </item>
+ <item> end </item>
+ </list>
+
+
+ <list name="builtins">
+ <item> : </item>
+ <item> . </item>
+ <item> source </item>
+ <item> alias </item>
+ <item> bg </item>
+ <item> bind </item>
+ <item> break </item>
+ <item> builtin </item>
+ <item> cd </item>
+ <item> command </item>
+ <item> compgen </item>
+ <item> complete </item>
+ <item> continue </item>
+ <item> dirs </item>
+ <item> disown </item>
+ <item> echo </item>
+ <item> enable </item>
+ <item> eval </item>
+ <item> exec </item>
+ <item> exit </item>
+ <item> fc </item>
+ <item> fg </item>
+ <item> getopts </item>
+ <item> hash </item>
+ <item> help </item>
+ <item> history </item>
+ <item> jobs </item>
+ <item> kill </item>
+ <item> let </item>
+ <item> logout </item>
+ <item> popd </item>
+ <item> printf </item>
+ <item> pushd </item>
+ <item> pwd </item>
+ <item> return </item>
+ <item> set </item>
+ <item> shift </item>
+ <item> shopt </item>
+ <item> suspend </item>
+ <item> test </item>
+ <item> times </item>
+ <item> trap </item>
+ <item> type </item>
+ <item> ulimit </item>
+ <item> umask </item>
+ <item> unalias </item>
+ <item> wait </item>
+ </list>
+
+ <list name="builtins_var">
+ <item> export </item>
+ <item> unset </item>
+ <item> declare </item>
+ <item> typeset </item>
+ <item> local </item>
+ <item> read </item>
+ <item> readonly </item>
+ </list>
+
+ <list name="unixcommands">
+ <!-- /bin -->
+ <item> arch </item>
+ <item> awk </item>
+ <item> bash </item>
+ <item> bunzip2 </item>
+ <item> bzcat </item>
+ <item> bzcmp </item>
+ <item> bzdiff </item>
+ <item> bzegrep </item>
+ <item> bzfgrep </item>
+ <item> bzgrep </item>
+ <item> bzip2 </item>
+ <item> bzip2recover </item>
+ <item> bzless </item>
+ <item> bzmore </item>
+ <item> cat </item>
+ <item> chattr </item>
+ <item> chgrp </item>
+ <item> chmod </item>
+ <item> chown </item>
+ <item> chvt </item>
+ <item> cp </item>
+ <item> date </item>
+ <item> dd </item>
+ <item> deallocvt </item>
+ <item> df </item>
+ <item> dir </item>
+ <item> dircolors </item>
+ <item> dmesg </item>
+ <item> dnsdomainname </item>
+ <item> domainname </item>
+ <item> du </item>
+ <item> dumpkeys </item>
+ <item> echo </item>
+ <item> ed </item>
+ <item> egrep </item>
+ <item> false </item>
+ <item> fgconsole </item>
+ <item> fgrep </item>
+ <item> fuser </item>
+ <item> gawk </item>
+ <item> getkeycodes </item>
+ <item> gocr </item>
+ <item> grep </item>
+ <item> groups </item>
+ <item> gunzip </item>
+ <item> gzexe </item>
+ <item> gzip </item>
+ <item> hostname </item>
+ <item> igawk </item>
+ <item> install </item>
+ <item> kbd_mode </item>
+ <item> kbdrate </item>
+ <item> killall </item>
+ <item> last </item>
+ <item> lastb </item>
+ <item> link </item>
+ <item> ln </item>
+ <item> loadkeys </item>
+ <item> loadunimap </item>
+ <item> login </item>
+ <item> ls </item>
+ <item> lsattr </item>
+ <item> lsmod </item>
+ <item> lsmod.old </item>
+ <item> mapscrn </item>
+ <item> mesg </item>
+ <item> mkdir </item>
+ <item> mkfifo </item>
+ <item> mknod </item>
+ <item> mktemp </item>
+ <item> more </item>
+ <item> mount </item>
+ <item> mv </item>
+ <item> nano </item>
+ <item> netstat </item>
+ <item> nisdomainname </item>
+ <item> openvt </item>
+ <item> pgawk </item>
+ <item> pidof </item>
+ <item> ping </item>
+ <item> ps </item>
+ <item> pstree </item>
+ <item> pwd </item>
+ <item> rbash </item>
+ <item> readlink </item>
+ <item> red </item>
+ <item> resizecons </item>
+ <item> rm </item>
+ <item> rmdir </item>
+ <item> run-parts </item>
+ <item> sash </item>
+ <item> sed </item>
+ <item> setfont </item>
+ <item> setkeycodes </item>
+ <item> setleds </item>
+ <item> setmetamode </item>
+ <item> setserial </item>
+ <item> sh </item>
+ <item> showkey </item>
+ <item> shred </item>
+ <item> sleep </item>
+ <item> ssed </item>
+ <item> stat </item>
+ <item> stty </item>
+ <item> su </item>
+ <item> sync </item>
+ <item> tar </item>
+ <item> tempfile </item>
+ <item> touch </item>
+ <item> true </item>
+ <item> umount </item>
+ <item> uname </item>
+ <item> unicode_start </item>
+ <item> unicode_stop </item>
+ <item> unlink </item>
+ <item> utmpdump </item>
+ <item> uuidgen </item>
+ <item> vdir </item>
+ <item> wall </item>
+ <item> wc </item>
+ <item> ypdomainname </item>
+ <item> zcat </item>
+ <item> zcmp </item>
+ <item> zdiff </item>
+ <item> zegrep </item>
+ <item> zfgrep </item>
+ <item> zforce </item>
+ <item> zgrep </item>
+ <item> zless </item>
+ <item> zmore </item>
+ <item> znew </item>
+ <item> zsh </item>
+
+ <!-- some from /usr/bin -->
+ <item> aclocal </item>
+ <item> aconnect </item>
+ <item> aplay </item>
+ <item> apm </item>
+ <item> apmsleep </item>
+ <item> apropos </item>
+ <item> ar </item>
+ <item> arecord </item>
+ <item> as </item>
+ <item> as86 </item>
+ <item> autoconf </item>
+ <item> autoheader </item>
+ <item> automake </item>
+ <item> awk </item>
+ <item> basename </item>
+ <item> bc </item>
+ <item> bison </item>
+ <item> c++ </item>
+ <item> cal </item>
+ <item> cat </item>
+ <item> cc </item>
+ <item> cdda2wav </item>
+ <item> cdparanoia </item>
+ <item> cdrdao </item>
+ <item> cd-read </item>
+ <item> cdrecord </item>
+ <item> chfn </item>
+ <item> chgrp </item>
+ <item> chmod </item>
+ <item> chown </item>
+ <item> chroot </item>
+ <item> chsh </item>
+ <item> clear </item>
+ <item> cmp </item>
+ <item> co </item>
+ <item> col </item>
+ <item> comm </item>
+ <item> cp </item>
+ <item> cpio </item>
+ <item> cpp </item>
+ <item> cut </item>
+ <item> dc </item>
+ <item> dd </item>
+ <item> df </item>
+ <item> diff </item>
+ <item> diff3 </item>
+ <item> dir </item>
+ <item> dircolors </item>
+ <item> directomatic </item>
+ <item> dirname </item>
+ <item> du </item>
+ <item> env </item>
+ <item> expr </item>
+ <item> fbset </item>
+ <item> file </item>
+ <item> find </item>
+ <item> flex </item>
+ <item> flex++ </item>
+ <item> fmt </item>
+ <item> free </item>
+ <item> ftp </item>
+ <item> funzip </item>
+ <item> fuser </item>
+ <item> g++ </item>
+ <item> gawk </item>
+ <item> gc </item>
+ <item> gcc </item>
+ <item> gdb </item>
+ <item> getent </item>
+ <item> getopt </item>
+ <item> gettext </item>
+ <item> gettextize </item>
+ <item> gimp </item>
+ <item> gimp-remote </item>
+ <item> gimptool </item>
+ <item> gmake </item>
+ <item> gs </item>
+ <item> head </item>
+ <item> hexdump </item>
+ <item> id </item>
+ <item> install </item>
+ <item> join </item>
+ <item> kill </item>
+ <item> killall </item>
+ <item> ld </item>
+ <item> ld86 </item>
+ <item> ldd </item>
+ <item> less </item>
+ <item> lex </item>
+ <item> ln </item>
+ <item> locate </item>
+ <item> lockfile </item>
+ <item> logname </item>
+ <item> lp </item>
+ <item> lpr </item>
+ <item> ls </item>
+ <item> lynx </item>
+ <item> m4 </item>
+ <item> make </item>
+ <item> man </item>
+ <item> mkdir </item>
+ <item> mknod </item>
+ <item> msgfmt </item>
+ <item> mv </item>
+ <item> namei </item>
+ <item> nasm </item>
+ <item> nawk </item>
+ <item> nice </item>
+ <item> nl </item>
+ <item> nm </item>
+ <item> nm86 </item>
+ <item> nmap </item>
+ <item> nohup </item>
+ <item> nop </item>
+ <item> od </item>
+ <item> passwd </item>
+ <item> patch </item>
+ <item> pcregrep </item>
+ <item> pcretest </item>
+ <item> perl </item>
+ <item> perror </item>
+ <item> pidof </item>
+ <item> pr </item>
+ <item> printf </item>
+ <item> procmail </item>
+ <item> prune </item>
+ <item> ps2ascii </item>
+ <item> ps2epsi </item>
+ <item> ps2frag </item>
+ <item> ps2pdf </item>
+ <item> ps2ps </item>
+ <item> psbook </item>
+ <item> psmerge </item>
+ <item> psnup </item>
+ <item> psresize </item>
+ <item> psselect </item>
+ <item> pstops </item>
+ <item> rcs </item>
+ <item> rev </item>
+ <item> rm </item>
+ <item> scp </item>
+ <item> sed </item>
+ <item> seq </item>
+ <item> setterm </item>
+ <item> shred </item>
+ <item> size </item>
+ <item> size86 </item>
+ <item> skill </item>
+ <item> slogin </item>
+ <item> snice </item>
+ <item> sort </item>
+ <item> sox </item>
+ <item> split </item>
+ <item> ssh </item>
+ <item> ssh-add </item>
+ <item> ssh-agent </item>
+ <item> ssh-keygen </item>
+ <item> ssh-keyscan </item>
+ <item> stat </item>
+ <item> strings </item>
+ <item> strip </item>
+ <item> sudo </item>
+ <item> suidperl </item>
+ <item> sum </item>
+ <item> tac </item>
+ <item> tail </item>
+ <item> tee </item>
+ <item> test </item>
+ <item> tr </item>
+ <item> uniq </item>
+ <item> unlink </item>
+ <item> unzip </item>
+ <item> updatedb </item>
+ <item> updmap </item>
+ <item> uptime </item>
+ <item> users </item>
+ <item> vmstat </item>
+ <item> w </item>
+ <item> wc </item>
+ <item> wget </item>
+ <item> whatis </item>
+ <item> whereis </item>
+ <item> which </item>
+ <item> who </item>
+ <item> whoami </item>
+ <item> write </item>
+ <item> xargs </item>
+ <item> yacc </item>
+ <item> yes </item>
+ <item> zip </item>
+ <item> zsoelim </item>
+
+ <!-- others -->
+ <item> dcop </item>
+ <item> kdialog </item>
+ <item> kfile </item>
+ <item> xhost </item>
+ <item> xmodmap </item>
+ <item> xset </item>
+ </list>
+
+
+ <contexts>
+ <context attribute="Normal Text" lineEndContext="#stay" name="Start">
+ <IncludeRules context="FindAll" />
+ </context>
+
+<!-- ====== The following rulessets are meant to be included ======== -->
+ <!-- FindAll tries to interpret everything -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindAll">
+ <IncludeRules context="FindComments" />
+ <IncludeRules context="FindCommands" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- FindMost tries to interpret anything except commands -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindMost">
+ <IncludeRules context="FindComments" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+
+ <!-- FindComments consumes shell comments till EOL -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="FindComments">
+ <DetectChar attribute="Comment" context="Comment" char="#" firstNonSpace="true"/>
+ <RegExpr attribute="Normal Text" context="Comment" String="[\s;](?=#)" />
+ </context>
+ <context attribute="Comment" lineEndContext="#pop" name="Comment">
+ <IncludeRules context="##Alerts" />
+ </context>
+
+ <!-- FindCommentsParen consumes shell comments till EOL or a closing parenthese -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsParen">
+ <DetectChar attribute="Comment" context="CommentParen" char="#" firstNonSpace="true"/>
+ <RegExpr attribute="Normal Text" context="CommentParen" String="[\s;](?=#)" />
+ </context>
+ <context attribute="Comment" lineEndContext="#pop" name="CommentParen">
+ <RegExpr attribute="Comment" context="#pop" String="[^)](?=\))" />
+ <IncludeRules context="##Alerts" />
+ </context>
+
+ <!-- FindCommentsBackq consumes shell comments till EOL or a backquote -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsBackq">
+ <DetectChar attribute="Comment" context="CommentBackq" char="#" firstNonSpace="true"/>
+ <RegExpr attribute="Normal Text" context="CommentBackq" String="[\s;](?=#)" />
+ </context>
+ <context attribute="Comment" lineEndContext="#pop" name="CommentBackq">
+ <RegExpr attribute="Comment" context="#pop" String="[^`](?=`)" />
+ <IncludeRules context="##Alerts" />
+ </context>
+
+
+ <!-- FindCommands matches many items that can be expected outside strings, substitutions etc. -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindCommands">
+ <!-- start expression in double parentheses -->
+ <Detect2Chars attribute="Keyword" context="ExprDblParen" char="(" char1="(" beginRegion="expression" />
+ <!-- start expression in double brackets -->
+ <RegExpr attribute="Keyword" context="ExprDblBracket" String="\[\[&eos;" beginRegion="expression" column="0"/>
+ <RegExpr attribute="Keyword" context="ExprDblBracket" String="\s\[\[&eos;" beginRegion="expression" />
+ <!-- start expression in single brackets -->
+ <RegExpr attribute="Builtin" context="ExprBracket" String="\[&eos;" beginRegion="expression" column="0"/>
+ <RegExpr attribute="Builtin" context="ExprBracket" String="\s\[&eos;" beginRegion="expression" />
+ <!-- start a group command with { -->
+ <RegExpr attribute="Keyword" context="Group" String="\{&eos;" beginRegion="group" />
+ <!-- start a subshell -->
+ <DetectChar attribute="Keyword" context="SubShell" char="(" beginRegion="subshell" />
+ <!-- match do and if blocks -->
+ <RegExpr attribute="Keyword" context="#stay" String="\bdo&noword;" beginRegion="do" />
+ <RegExpr attribute="Keyword" context="#stay" String="\bdone&noword;" endRegion="do" />
+ <RegExpr attribute="Keyword" context="#stay" String="\bif&noword;" beginRegion="if" />
+ <RegExpr attribute="Keyword" context="#stay" String="\bfi&noword;" endRegion="if" />
+ <!-- handle case as a special case -->
+ <RegExpr attribute="Keyword" context="Case" String="\bcase&noword;" beginRegion="case" />
+ <!-- handle command line options -->
+ <RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9]+" />
+ <RegExpr attribute="Option" context="#stay" String="--[a-z][A-Za-z0-9_-]*" />
+ <!-- handle variable assignments -->
+ <RegExpr attribute="Variable" context="Assign" String="\b&varname;=" />
+ <RegExpr attribute="Variable" context="AssignSubscr" String="\b&varname;(?=\[[^]]+\]=)" />
+ <!-- handle functions with function keyword before keywords -->
+ <StringDetect attribute="Function" context="#stay" String=":()" />
+ <RegExpr attribute="Keyword" context="FunctionDef" String="\bfunction\b" />
+ <!-- handle keywords -->
+ <keyword attribute="Keyword" context="#stay" String="keywords" />
+ <keyword attribute="Builtin" context="#stay" String="builtins" />
+ <keyword attribute="Command" context="#stay" String="unixcommands" />
+ <!-- handle commands that have variable names as argument -->
+ <keyword attribute="Builtin" context="VarName" String="builtins_var" />
+ <!-- handle here-string -->
+ <StringDetect attribute="Redirection" context="#stay" String="&lt;&lt;&lt;" />
+ <!-- handle here document -->
+ <StringDetect attribute="Redirection" context="HereDoc" String="&lt;&lt;" lookAhead="true" />
+ <!-- handle process subst -->
+ <RegExpr attribute="Redirection" context="ProcessSubst" String="[&lt;&gt;]\(" />
+ <!-- handle redirection -->
+ <RegExpr attribute="Redirection" context="#stay" String="([0-9]*(&gt;{1,2}|&lt;)(&amp;[0-9]+-?)?|&amp;&gt;|&gt;&amp;|[0-9]*&lt;&gt;)" />
+ <!-- handle &, &&, | and || -->
+ <RegExpr attribute="Control" context="#stay" String="([|&amp;])\1?" />
+ <!-- mark function definitions without function keyword -->
+ <RegExpr attribute="Function" context="#stay" String="&funcname;\s*\(\)" />
+ <!-- Kommander rules -->
+ <RegExpr attribute="Comment" context="#stay" String="@#.*\s*" />
+ <DetectChar attribute="KmdrMethod" context="DetectKmdr" char="@" lookAhead="true"/>
+ </context>
+
+ <!-- Kommander rules -->
+
+ <context attribute="KmdrMethod" lineEndContext="#pop" name="DetectKmdr">
+ <RegExpr attribute="KmdrMethod" context="#stay" String="@&varname;" />
+ <DetectChar attribute="Normal Text" context="#pop" char="(" lookAhead="true"/>
+ <DetectChar attribute="Normal Text" context="#pop" char=")" lookAhead="true"/>
+ <RegExpr attribute="Normal Text" context="#pop" String="[\s\=\;\+\-\*\/\%]+" />
+ <keyword attribute="DCOPMethod" context="#pop" String="kmdrdcopfunctions" />
+ <keyword attribute="KmdrMethod" context="#pop" String="kmdrfunctions" />
+ <keyword attribute="KmdrArray" context="#pop" String="kmdrarray" />
+ <keyword attribute="KmdrString" context="#pop" String="kmdrstring" />
+ <keyword attribute="KmdrFile" context="#pop" String="kmdrfile" />
+ <keyword attribute="KmdrInput" context="#pop" String="kmdrinput" />
+ <keyword attribute="KmdrMessage" context="#pop" String="kmdrmessage" />
+ </context>
+
+ <!-- FindOthers contains various rules to mark different shell input -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindOthers">
+ <RegExpr attribute="Escape" context="#stay" String="\\[][;&quot;\\'$`{}()|&amp;&lt;&gt;* ]" />
+ <RegExpr attribute="Keyword" context="#stay" String="\\$" />
+ <RegExpr attribute="Escape" context="#stay" String="\{(?!(\s|$))\S*\}" />
+ <RegExpr attribute="Path" context="#stay" String="\.?/[\w_@.+-]+(?=([\s/):]|$))" />
+ <!-- TODO: shell globs -->
+ </context>
+
+ <!-- FindStrings looks for single and double quoted strings, also with $-prefix -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">
+ <DetectChar attribute="String SingleQ" context="StringSQ" char="'" />
+ <DetectChar attribute="String DoubleQ" context="StringDQ" char="&quot;" />
+ <Detect2Chars attribute="String SingleQ" context="StringEsc" char="$" char1="'" />
+ <Detect2Chars attribute="String Transl." context="StringDQ" char="$" char1="&quot;" />
+ </context>
+
+ <!-- FindSubstitutions goes after anything starting with $ and ` and their escapes -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="FindSubstitutions">
+ <RegExpr attribute="Variable" context="#stay" String="\$[*@#?$!_0-9-]" />
+ <RegExpr attribute="Variable" context="Subscript" String="\$&varname;\[" />
+ <RegExpr attribute="Variable" context="#stay" String="\$&varname;" />
+ <RegExpr attribute="Variable" context="#stay" String="\$\{[*@#?$!_0-9-]\}" />
+ <RegExpr attribute="Variable" context="#stay" String="\$\{#&varname;\}" />
+ <RegExpr attribute="Variable" context="#stay" String="\$\{!&varname;\*?\}" />
+ <RegExpr attribute="Variable" context="VarBrace" String="\$\{&varname;" />
+ <RegExpr attribute="Variable" context="VarBrace" String="\$\{[*@#?$!_0-9-](?=[:#%/])" />
+ <StringDetect attribute="Variable" context="ExprDblParenSubst" String="$((" beginRegion="expression" />
+ <StringDetect attribute="Redirection" context="SubstFile" String="$(&lt;" />
+ <StringDetect attribute="Variable" context="SubstCommand" String="$(" />
+ <DetectChar attribute="Backquote" context="SubstBackq" char="`" />
+ <RegExpr attribute="Escape" context="#stay" String="\\[`$\\]" />
+ </context>
+
+
+
+
+
+<!-- ====== These are the contexts that can be branched to ======= -->
+
+ <!-- ExprDblParen consumes an expression started in command mode till )) -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParen">
+ <Detect2Chars attribute="Keyword" context="#pop" char=")" char1=")" endRegion="expression" />
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindMost" />
+ </context>
+
+ <!-- ExprDblParenSubst like ExprDblParen but matches )) as Variable -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParenSubst">
+ <Detect2Chars attribute="Variable" context="#pop" char=")" char1=")" endRegion="expression" />
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindMost" />
+ </context>
+
+ <!-- ExprSubParen consumes an expression till ) -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprSubParen">
+ <DetectChar attribute="Normal Text" context="#pop" char=")" />
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindMost" />
+ </context>
+
+ <!-- ExprBracket consumes an expression till ] -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprBracket">
+ <RegExpr attribute="Builtin" context="#pop" String="\s\](?=($|[\s;|&amp;]))" endRegion="expression" />
+ <RegExpr attribute="Builtin" context="#pop" String="\](?=($|[\s;|&amp;]))" endRegion="expression" column="0"/>
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindMost" />
+ </context>
+
+ <!-- ExprDblBracket consumes an expression till ]] -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracket">
+ <RegExpr attribute="Keyword" context="#pop" String="\s\]\](?=($|[\s;|&amp;]))" endRegion="expression" />
+ <RegExpr attribute="Keyword" context="#pop" String="\]\](?=($|[\s;|&amp;]))" endRegion="expression" column="0"/>
+ <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+ <IncludeRules context="FindMost" />
+ </context>
+
+ <!-- Group consumes shell input till } -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="Group">
+ <DetectChar attribute="Keyword" context="#pop" char="}" endRegion="group" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- SubShell consumes shell input till ) -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="SubShell">
+ <DetectChar attribute="Keyword" context="#pop" char=")" endRegion="subshell" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- Assign consumes an expression till EOL or whitespace -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="Assign" fallthrough="true" fallthroughContext="#pop">
+ <DetectChar attribute="Variable" context="AssignArray" char="(" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ <RegExpr attribute="Normal Text" context="#stay" String="[\w:,+_./-]+" />
+ </context>
+
+ <!-- AssignArray consumes everything till ), marking assignments -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="AssignArray">
+ <DetectChar attribute="Variable" context="#pop" char=")" />
+ <DetectChar attribute="Variable" context="Subscript" char="[" />
+ <DetectChar attribute="Variable" context="Assign" char="=" />
+ <IncludeRules context="FindMost" />
+ </context>
+
+ <!-- AssignSubscr first expects a [ then parses subscript and continues with '=value' -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="AssignSubscr" fallthrough="true" fallthroughContext="#pop">
+ <DetectChar attribute="Variable" context="Subscript" char="[" />
+ <DetectChar attribute="Variable" context="Assign" char="=" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- Subscript consumes anything till ], marks as Variable -->
+ <context attribute="Variable" lineEndContext="#stay" name="Subscript">
+ <DetectChar attribute="Variable" context="#pop" char="]" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- FunctionDef consumes a name, possibly with (), marks as Function -->
+ <context attribute="Function" lineEndContext="#pop" name="FunctionDef" fallthrough="true" fallthroughContext="#pop">
+ <RegExpr attribute="Function" context="#pop" String="\s+&funcname;(\s*\(\))?" />
+ </context>
+
+ <!-- VarName consumes spare variable names and assignments -->
+ <context attribute="Normal Text" lineEndContext="#pop" name="VarName" fallthrough="true" fallthroughContext="#pop">
+ <!-- handle command line options -->
+ <RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9]+" />
+ <RegExpr attribute="Option" context="#stay" String="--[a-z][A-Za-z0-9_-]*" />
+ <RegExpr attribute="Variable" context="#stay" String="\b&varname;" />
+ <DetectChar attribute="Variable" context="Subscript" char="[" />
+ <DetectChar attribute="Variable" context="Assign" char="=" />
+ <IncludeRules context="FindMost" />
+ <!-- stay here in spaces and other safe characters -->
+ <RegExpr attribute="Normal Text" context="#stay" String="[^]})|;`&amp;&gt;&lt;]" />
+ </context>
+
+ <!-- ProcessSubst handles <(command) and >(command) -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="ProcessSubst">
+ <DetectChar attribute="Redirection" context="#pop" char=")" />
+ <IncludeRules context="FindCommentsParen" />
+ <IncludeRules context="FindCommands" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- StringSQ consumes anything till ' -->
+ <context attribute="String SingleQ" lineEndContext="#stay" name="StringSQ">
+
+ <DetectChar attribute="KmdrMethod" context="DetectKmdr" char="@" lookAhead="true"/>
+ <DetectChar attribute="String SingleQ" context="#pop" char="'" />
+ </context>
+
+ <!-- StringDQ consumes anything till ", substitutes vars and expressions -->
+ <context attribute="String DoubleQ" lineEndContext="#stay" name="StringDQ">
+ <DetectChar attribute="KmdrMethod" context="DetectKmdr" char="@" lookAhead="true"/>
+ <DetectChar attribute="String DoubleQ" context="#pop" char="&quot;" />
+ <RegExpr attribute="String Escape" context="#stay" String="\\[`&quot;\\$\n]" />
+ <IncludeRules context="FindSubstitutions" />
+ </context>
+
+ <!-- StringEsc eats till ', but escaping many characters -->
+ <context attribute="String SingleQ" lineEndContext="#stay" name="StringEsc">
+ <DetectChar attribute="String SingleQ" context="#pop" char="'" />
+ <RegExpr attribute="String Escape" context="#stay" String="\\[abefnrtv\\']" />
+ <RegExpr attribute="String Escape" context="#stay" String="\\([0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)" />
+ </context>
+
+ <!-- VarBrace is called as soon as ${xxx is encoutered -->
+ <context attribute="Variable" lineEndContext="#stay" name="VarBrace">
+ <DetectChar attribute="Variable" context="#pop" char="}" />
+ <DetectChar attribute="Variable" context="Subscript" char="[" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <!-- TODO: highlight various special parameter expansions } -->
+ </context>
+
+ <!-- SubstFile is called after a <( or >( is encoutered -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="SubstFile">
+ <DetectChar attribute="Redirection" context="#pop" char=")" />
+ <IncludeRules context="FindCommentsParen" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- SubstCommand is called after a $( is encountered -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="SubstCommand">
+ <DetectChar attribute="Variable" context="#pop" char=")" />
+ <IncludeRules context="FindCommentsParen" />
+ <IncludeRules context="FindCommands" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- SubstBackq is called when a backquote is encountered -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="SubstBackq">
+ <DetectChar attribute="Keyword" context="#pop" char="`" />
+ <IncludeRules context="FindCommentsBackq" />
+ <IncludeRules context="FindCommands" />
+ <IncludeRules context="FindStrings" />
+ <IncludeRules context="FindSubstitutions" />
+ <IncludeRules context="FindOthers" />
+ </context>
+
+ <!-- Case is called after the case keyword is encoutered. We handle this because of
+ the lonely closing parentheses that would otherwise disturb the expr matching -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="Case">
+ <RegExpr attribute="Keyword" context="CaseIn" String="\sin\b" />
+ <IncludeRules context="FindMost" />
+ </context>
+
+ <!-- CaseIn is called when the construct 'case ... in' has been found. -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="CaseIn">
+ <RegExpr attribute="Keyword" context="#pop#pop" String="\besac(?=$|[\s;)])" endRegion="case" />
+ <DetectChar attribute="Keyword" context="CaseExpr" char=")" beginRegion="caseexpr" />
+ <AnyChar attribute="Keyword" context="#stay" String="(|" />
+ <IncludeRules context="FindMost" />
+ </context>
+
+ <!-- CaseExpr eats shell input till ;; -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="CaseExpr">
+ <Detect2Chars attribute="Keyword" context="#pop" char=";" char1=";" endRegion="caseexpr" />
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <!-- HereDoc consumes Here-documents. It is called at the beginning of the "<<" construct. -->
+ <context attribute="Normal Text" lineEndContext="#stay" name="HereDoc">
+ <RegExpr attribute="Redirection" context="HereDocQ" String="(&lt;&lt;\s*&quot;(&word;)&quot;)" lookAhead="true" />
+ <RegExpr attribute="Redirection" context="HereDocQ" String="(&lt;&lt;\s*'(&word;)')" lookAhead="true" />
+ <RegExpr attribute="Redirection" context="HereDocQ" String="(&lt;&lt;\s*\\(&word;))" lookAhead="true" />
+ <RegExpr attribute="Redirection" context="HereDocNQ" String="(&lt;&lt;(?!-)\s*(&word;))" lookAhead="true" />
+ <RegExpr attribute="Redirection" context="HereDocIQ" String="(&lt;&lt;-\s*&quot;(&word;)&quot;)" lookAhead="true" />
+ <RegExpr attribute="Redirection" context="HereDocIQ" String="(&lt;&lt;-\s*'(&word;)')" lookAhead="true" />
+ <RegExpr attribute="Redirection" context="HereDocIQ" String="(&lt;&lt;-\s*\\(&word;))" lookAhead="true" />
+ <RegExpr attribute="Redirection" context="HereDocINQ" String="(&lt;&lt;-\s*(&word;))" lookAhead="true" />
+ <StringDetect attribute="Redirection" context="#pop" String="&lt;&lt;" /><!-- always met -->
+ </context>
+
+ <context attribute="Normal Text" lineEndContext="#pop" name="HereDocRemainder">
+ <IncludeRules context="FindAll" />
+ </context>
+
+ <context attribute="Normal Text" lineEndContext="#stay" name="HereDocQ" dynamic="true">
+ <RegExpr attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true" />
+ <RegExpr attribute="Redirection" context="#pop#pop" String="%2[\s;]*$" dynamic="true" column="0"/>
+ </context>
+
+ <context attribute="Normal Text" lineEndContext="#stay" name="HereDocNQ" dynamic="true">
+ <RegExpr attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true" />
+ <RegExpr attribute="Redirection" context="#pop#pop" String="%2[\s;]*$" dynamic="true" column="0"/>
+ <IncludeRules context="FindSubstitutions" />
+ </context>
+
+ <context attribute="Normal Text" lineEndContext="#stay" name="HereDocIQ" dynamic="true">
+ <RegExpr attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true" />
+ <RegExpr attribute="Redirection" context="#pop#pop" String="\s*%2[\s;]*$" dynamic="true" column="0"/>
+ </context>
+
+ <context attribute="Normal Text" lineEndContext="#stay" name="HereDocINQ" dynamic="true">
+ <RegExpr attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true" />
+ <RegExpr attribute="Redirection" context="#pop#pop" String="\s*%2[\s;]*$" dynamic="true" column="0"/>
+ <IncludeRules context="FindSubstitutions" />
+ </context>
+
+ </contexts>
+
+ <itemDatas>
+ <itemData name="Normal Text" defStyleNum="dsNormal" />
+ <itemData name="Comment" defStyleNum="dsComment" />
+ <itemData name="Keyword" defStyleNum="dsKeyword" />
+ <itemData name="Control" defStyleNum="dsKeyword" />
+ <itemData name="Builtin" defStyleNum="dsKeyword" color="#808" />
+ <itemData name="Command" defStyleNum="dsKeyword" color="#c0c" />
+ <itemData name="Redirection" defStyleNum="dsKeyword" color="#238" />
+ <itemData name="Escape" defStyleNum="dsDataType" />
+ <itemData name="String SingleQ" defStyleNum="dsString" />
+ <itemData name="String DoubleQ" defStyleNum="dsString" />
+ <itemData name="Backquote" defStyleNum="dsKeyword" />
+ <itemData name="String Transl." defStyleNum="dsString" />
+ <itemData name="String Escape" defStyleNum="dsDataType" />
+ <itemData name="Variable" defStyleNum="dsOthers" />
+ <itemData name="Expression" defStyleNum="dsOthers" />
+ <itemData name="Function" defStyleNum="dsChar" bold="1" />
+ <itemData name="Path" defStyleNum="dsNormal" />
+ <itemData name="Option" defStyleNum="dsNormal" />
+ <itemData name="KmdrMethod" defStyleNum="dsKeyword" italic="1" color="#008000" />
+ <itemData name="DCOPMethod" defStyleNum="dsKeyword" italic="1" color="#21E52B" />
+ <itemData name="KmdrString" defStyleNum="dsKeyword" italic="1" color="#D0D000" />
+ <itemData name="KmdrArray" defStyleNum="dsKeyword" italic="1" color="#C0C0FF" />
+ <itemData name="KmdrFile" defStyleNum="dsKeyword" italic="1" color="#FF0000" />
+ <itemData name="KmdrInput" defStyleNum="dsKeyword" italic="1" color="#FF8000" />
+ <itemData name="KmdrMessage" defStyleNum="dsKeyword" italic="1" color="#800000" />
+ </itemDatas>
+ </highlighting>
+ <general>
+ <comments>
+ <comment name="singleLine" start="@#"/>
+ </comments>
+ <keywords casesensitive="1" weakDeliminator="^%#[]$._{}:-" additionalDeliminator="`."/>
+ </general>
+</language>
diff --git a/kommander/editor/kommanderui.rc b/kommander/editor/kommanderui.rc
new file mode 100644
index 00000000..13679d7a
--- /dev/null
+++ b/kommander/editor/kommanderui.rc
@@ -0,0 +1,5 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui version="1" name="kommander" >
+ <MenuBar noMerge="0" >
+ </MenuBar>
+</kpartgui>
diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp
new file mode 100644
index 00000000..da4669f1
--- /dev/null
+++ b/kommander/editor/layout.cpp
@@ -0,0 +1,956 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "formwindow.h"
+#include "layout.h"
+#include "widgetdatabase.h"
+#include "widgetfactory.h"
+
+#include <qlayout.h>
+#include <qevent.h>
+#include <qpainter.h>
+#include <qpen.h>
+#include <qbitmap.h>
+#include <qsplitter.h>
+
+bool operator<( const QGuardedPtr<QWidget> &p1, const QGuardedPtr<QWidget> &p2 )
+{
+ return p1.operator->() < p2.operator->();
+}
+
+/*!
+ \class Layout layout.h
+ \brief Baseclass for layouting widgets in the Designer
+
+ Classes derived from this abstract base class are used for layouting
+ operations in the Designer.
+
+*/
+
+/*! \a p specifies the parent of the layoutBase \a lb. The parent
+ might be changed in setup(). If the layoutBase is a
+ container, the parent and the layoutBase are the same. Also they
+ always have to be a widget known to the designer (e.g. in the case
+ of the tabwidget parent and layoutBase are the tabwidget and not the
+ page which actually gets laid out. For actual usage the correct
+ widget is found later by Layout.)
+ */
+
+Layout::Layout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter )
+ : widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter )
+{
+ widgets.setAutoDelete( false );
+ layoutBase = lb;
+ if ( !doSetup && layoutBase )
+ oldGeometry = layoutBase->geometry();
+}
+
+/*! The widget list we got in the constructor might contain too much
+ widgets (like widgets with different parents, already laid out
+ widgets, etc.). Here we set up the list and so the only the "best"
+ widgets get laid out.
+*/
+
+void Layout::setup()
+{
+ startPoint = QPoint( 32767, 32767 );
+ QValueList<QWidgetList> lists;
+ QWidget *lastParent = 0;
+ QWidgetList *lastList = 0;
+ QWidget *w = 0;
+
+ // Go through all widgets of the list we got. As we can only
+ // layout widgets which have the same parent, we first do some
+ // sorting which means create a list for each parent containing
+ // its child here. After that we keep working on the list of
+ // childs which has the most entries.
+ // Widgets which are already laid out are thrown away here too
+ for ( w = widgets.first(); w; w = widgets.next() ) {
+ if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout )
+ continue;
+ if ( lastParent != w->parentWidget() ) {
+ lastList = 0;
+ lastParent = w->parentWidget();
+ QValueList<QWidgetList>::Iterator it = lists.begin();
+ for ( ; it != lists.end(); ++it ) {
+ if ( ( *it ).first()->parentWidget() == w->parentWidget() )
+ lastList = &( *it );
+ }
+ if ( !lastList ) {
+ QWidgetList l;
+ l.setAutoDelete( false );
+ lists.append( l );
+ lastList = &lists.last();
+ }
+ }
+ lastList->append( w );
+ }
+
+ // So, now find the list with the most entries
+ lastList = 0;
+ QValueList<QWidgetList>::Iterator it = lists.begin();
+ for ( ; it != lists.end(); ++it ) {
+ if ( !lastList || ( *it ).count() > lastList->count() )
+ lastList = &( *it );
+ }
+
+ // If we found no list (because no widget did fit at all) or the
+ // best list has only one entry and we do not layout a container,
+ // we leave here.
+ if ( !lastList || ( lastList->count() < 2 &&
+ ( !layoutBase ||
+ ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
+ layoutBase != formWindow->mainContainer() ) )
+ ) ) {
+ widgets.clear();
+ startPoint = QPoint( 0, 0 );
+ return;
+ }
+
+ // Now we have a new and clean widget list, which makes sense
+ // to layout
+ widgets = *lastList;
+ // Also use the only correct parent later, so store it
+ parent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() );
+ // Now calculate the position where the layout-meta-widget should
+ // be placed and connect to widgetDestroyed() signals of the
+ // widgets to get informed if one gets deleted to be able to
+ // handle that and do not crash in this case
+ for ( w = widgets.first(); w; w = widgets.next() ) {
+ connect( w, SIGNAL( destroyed() ),
+ this, SLOT( widgetDestroyed() ) );
+ startPoint = QPoint( QMIN( startPoint.x(), w->x() ),
+ QMIN( startPoint.y(), w->y() ) );
+ geometries.insert( w, QRect( w->pos(), w->size() ) );
+ // Change the Z-order, as saving/loading uses the Z-order for
+ // writing/creating widgets and this has to be the same as in
+ // the layout. Else saving + loading will give different results
+ w->raise();
+ }
+}
+
+void Layout::widgetDestroyed()
+{
+ if ( sender() && sender()->isWidgetType() )
+ widgets.removeRef( (QWidget*)sender() );
+}
+
+bool Layout::prepareLayout( bool &needMove, bool &needReparent )
+{
+ if ( !widgets.count() )
+ return false;
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() )
+ w->raise();
+ needMove = !layoutBase;
+ needReparent = needMove || layoutBase->inherits( "QLayoutWidget" ) || layoutBase->inherits( "QSplitter" );
+ if ( !layoutBase ) {
+ if ( !useSplitter )
+ layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "QLayoutWidget" ),
+ WidgetFactory::containerOfWidget( parent ) );
+ else
+ layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "QSplitter" ),
+ WidgetFactory::containerOfWidget( parent ) );
+ } else {
+ WidgetFactory::deleteLayout( layoutBase );
+ }
+
+ return true;
+}
+
+void Layout::finishLayout( bool needMove, QLayout *layout )
+{
+ if ( needMove )
+ layoutBase->move( startPoint );
+ QRect g( QRect( layoutBase->pos(), layoutBase->size() ) );
+ if ( WidgetFactory::layoutType( layoutBase->parentWidget() ) == WidgetFactory::NoLayout && !isBreak )
+ layoutBase->adjustSize();
+ else if ( isBreak )
+ layoutBase->setGeometry( oldGeometry );
+ oldGeometry = g;
+ layoutBase->show();
+ layout->activate();
+ formWindow->insertWidget( layoutBase );
+ formWindow->selectWidget( layoutBase );
+ QString n = layoutBase->name();
+ if ( n.find( "qt_dead_widget_" ) != -1 ) {
+ n.remove( 0, QString( "qt_dead_widget_" ).length() );
+ layoutBase->setName( n );
+ }
+}
+
+void Layout::undoLayout()
+{
+ if ( !widgets.count() )
+ return;
+ QMap<QGuardedPtr<QWidget>, QRect>::Iterator it = geometries.begin();
+ for ( ; it != geometries.end(); ++it ) {
+ if ( !it.key() )
+ continue;
+ it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
+ it.key()->resize( ( *it ).size() );
+ }
+ formWindow->selectWidget( layoutBase, false );
+ WidgetFactory::deleteLayout( layoutBase );
+ if ( parent != layoutBase && !layoutBase->inherits( "QMainWindow" ) ) {
+ layoutBase->hide();
+ QString n = layoutBase->name();
+ n.prepend( "qt_dead_widget_" );
+ layoutBase->setName( n );
+ } else {
+ layoutBase->setGeometry( oldGeometry );
+ }
+ if ( widgets.first() )
+ formWindow->selectWidget( widgets.first() );
+ else
+ formWindow->selectWidget( formWindow );
+}
+
+void Layout::breakLayout()
+{
+ QMap<QWidget*, QRect> rects;
+ if ( !widgets.isEmpty() ) {
+ QWidget *w;
+ for ( w = widgets.first(); w; w = widgets.next() )
+ rects.insert( w, w->geometry() );
+ }
+ WidgetFactory::deleteLayout( layoutBase );
+ bool needReparent = qstrcmp( layoutBase->className(), "QLayoutWidget" ) == 0 ||
+ qstrcmp( layoutBase->className(), "QSplitter" ) == 0 ||
+ ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
+ layoutBase != formWindow->mainContainer() );
+ bool needResize = qstrcmp( layoutBase->className(), "QSplitter" ) == 0;
+ bool add = geometries.isEmpty();
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ if ( needReparent )
+ w->reparent( layoutBase->parentWidget(), 0,
+ layoutBase->pos() + w->pos(), true );
+ if ( needResize ) {
+ QMap<QWidget*, QRect>::Iterator it = rects.find( w );
+ if ( it != rects.end() )
+ w->setGeometry( QRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) );
+ }
+ if ( add )
+ geometries.insert( w, QRect( w->pos(), w->size() ) );
+ }
+ if ( needReparent ) {
+ layoutBase->hide();
+ parent = layoutBase->parentWidget();
+ QString n = layoutBase->name();
+ n.prepend( "qt_dead_widget_" );
+ layoutBase->setName( n );
+ } else {
+ parent = layoutBase;
+ }
+ if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) )
+ formWindow->selectWidget( widgets.first() );
+ else
+ formWindow->selectWidget( formWindow );
+}
+
+class HorizontalLayoutList : public QWidgetList
+{
+public:
+ HorizontalLayoutList( const QWidgetList &l )
+ : QWidgetList( l ) {}
+
+ int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) {
+ QWidget *w1 = (QWidget*)item1;
+ QWidget *w2 = (QWidget*)item2;
+ if ( w1->x() == w2->x() )
+ return 0;
+ if ( w1->x() > w2->x() )
+ return 1;
+ return -1;
+ }
+
+};
+
+HorizontalLayout::HorizontalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter )
+ : Layout( wl, p, fw, lb, doSetup, splitter )
+{
+ if ( doSetup )
+ setup();
+}
+
+void HorizontalLayout::setup()
+{
+ HorizontalLayoutList l( widgets );
+ l.sort();
+ widgets = l;
+ Layout::setup();
+}
+
+void HorizontalLayout::doLayout()
+{
+ bool needMove, needReparent;
+ if ( !prepareLayout( needMove, needReparent ) )
+ return;
+
+ QHBoxLayout *layout = (QHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
+
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ if ( needReparent && w->parent() != layoutBase )
+ w->reparent( layoutBase, 0, QPoint( 0, 0 ), false );
+ if ( !useSplitter ) {
+ if ( qstrcmp( w->className(), "Spacer" ) == 0 )
+ layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
+ else
+ layout->addWidget( w );
+ if ( w->inherits( "QLayoutWidget" ) )
+ ( (QLayoutWidget*)w )->updateSizePolicy();
+ }
+ w->show();
+ }
+
+ if ( layoutBase->inherits( "QSplitter" ) )
+ ( (QSplitter*)layoutBase )->setOrientation( Qt::Horizontal );
+
+ finishLayout( needMove, layout );
+}
+
+
+
+
+class VerticalLayoutList : public QWidgetList
+{
+public:
+ VerticalLayoutList( const QWidgetList &l )
+ : QWidgetList( l ) {}
+
+ int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) {
+ QWidget *w1 = (QWidget*)item1;
+ QWidget *w2 = (QWidget*)item2;
+ if ( w1->y() == w2->y() )
+ return 0;
+ if ( w1->y() > w2->y() )
+ return 1;
+ return -1;
+ }
+
+};
+
+VerticalLayout::VerticalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter )
+ : Layout( wl, p, fw, lb, doSetup, splitter )
+{
+ if ( doSetup )
+ setup();
+}
+
+void VerticalLayout::setup()
+{
+ VerticalLayoutList l( widgets );
+ l.sort();
+ widgets = l;
+ Layout::setup();
+}
+
+void VerticalLayout::doLayout()
+{
+ bool needMove, needReparent;
+ if ( !prepareLayout( needMove, needReparent ) )
+ return;
+
+ QVBoxLayout *layout = (QVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
+
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ if ( needReparent && w->parent() != layoutBase )
+ w->reparent( layoutBase, 0, QPoint( 0, 0 ), false );
+ if ( !useSplitter ) {
+ if ( qstrcmp( w->className(), "Spacer" ) == 0 )
+ layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
+ else
+ layout->addWidget( w );
+ if ( w->inherits( "QLayoutWidget" ) )
+ ( (QLayoutWidget*)w )->updateSizePolicy();
+ }
+ w->show();
+ }
+
+ if ( layoutBase->inherits( "QSplitter" ) )
+ ( (QSplitter*)layoutBase )->setOrientation( Qt::Vertical );
+
+ finishLayout( needMove, layout );
+}
+
+
+
+
+
+class Grid
+{
+public:
+ Grid( int rows, int cols );
+ ~Grid();
+
+ QWidget* cell( int row, int col ) const { return cells[ row * ncols + col]; }
+ void setCell( int row, int col, QWidget* w ) { cells[ row*ncols + col] = w; }
+ int numRows() const { return nrows; }
+ int numCols() const { return ncols; }
+
+ void simplify();
+ bool locateWidget( QWidget* w, int& row, int& col, int& rowspan, int& colspan );
+
+private:
+ void merge();
+ int countRow( int r, int c ) const;
+ int countCol( int r, int c ) const;
+ void setRow( int r, int c, QWidget* w, int count );
+ void setCol( int r, int c, QWidget* w, int count );
+ bool isWidgetStartCol( int c ) const;
+ bool isWidgetEndCol( int c ) const;
+ bool isWidgetStartRow( int r ) const;
+ bool isWidgetEndRow( int r ) const;
+ bool isWidgetTopLeft( int r, int c ) const;
+ void extendLeft();
+ void extendRight();
+ void extendUp();
+ void extendDown();
+ QWidget** cells;
+ bool* cols;
+ bool* rows;
+ int nrows, ncols;
+
+};
+
+Grid::Grid( int r, int c )
+ : nrows( r ), ncols( c )
+{
+ cells = new QWidget*[ r * c ];
+ memset( cells, 0, sizeof( cells ) * r * c );
+ rows = new bool[ r ];
+ cols = new bool[ c ];
+
+}
+
+Grid::~Grid()
+{
+ delete [] cells;
+ delete [] cols;
+ delete [] rows;
+}
+
+int Grid::countRow( int r, int c ) const
+{
+ QWidget* w = cell( r, c );
+ int i = c + 1;
+ while ( i < ncols && cell( r, i ) == w )
+ i++;
+ return i - c;
+}
+
+int Grid::countCol( int r, int c ) const
+{
+ QWidget* w = cell( r, c );
+ int i = r + 1;
+ while ( i < nrows && cell( i, c ) == w )
+ i++;
+ return i - r;
+}
+
+void Grid::setCol( int r, int c, QWidget* w, int count )
+{
+ for (int i = 0; i < count; i++ )
+ setCell( r + i, c, w );
+}
+
+void Grid::setRow( int r, int c, QWidget* w, int count )
+{
+ for (int i = 0; i < count; i++ )
+ setCell( r, c + i, w );
+}
+
+bool Grid::isWidgetStartCol( int c ) const
+{
+ int r;
+ for ( r = 0; r < nrows; r++ ) {
+ if ( cell( r, c ) && ( (c==0) || (cell( r, c) != cell( r, c-1) )) ) {
+ return true;
+ }
+ }
+ return false;
+}
+
+bool Grid::isWidgetEndCol( int c ) const
+{
+ int r;
+ for ( r = 0; r < nrows; r++ ) {
+ if ( cell( r, c ) && ((c == ncols-1) || (cell( r, c) != cell( r, c+1) )) )
+ return true;
+ }
+ return false;
+}
+
+bool Grid::isWidgetStartRow( int r ) const
+{
+ int c;
+ for ( c = 0; c < ncols; c++ ) {
+ if ( cell( r, c ) && ( (r==0) || (cell( r, c) != cell( r-1, c) )) )
+ return true;
+ }
+ return false;
+}
+
+bool Grid::isWidgetEndRow( int r ) const
+{
+ int c;
+ for ( c = 0; c < ncols; c++ ) {
+ if ( cell( r, c ) && ((r == nrows-1) || (cell( r, c) != cell( r+1, c) )) )
+ return true;
+ }
+ return false;
+}
+
+
+bool Grid::isWidgetTopLeft( int r, int c ) const
+{
+ QWidget* w = cell( r, c );
+ if ( !w )
+ return false;
+ return ( !r || cell( r-1, c) != w ) && (!c || cell( r, c-1) != w);
+}
+
+void Grid::extendLeft()
+{
+ int r,c,i;
+ for ( c = 1; c < ncols; c++ ) {
+ for ( r = 0; r < nrows; r++ ) {
+ QWidget* w = cell( r, c );
+ if ( !w )
+ continue;
+ int cc = countCol( r, c);
+ int stretch = 0;
+ for ( i = c-1; i >= 0; i-- ) {
+ if ( cell( r, i ) )
+ break;
+ if ( countCol( r, i ) < cc )
+ break;
+ if ( isWidgetEndCol( i ) )
+ break;
+ if ( isWidgetStartCol( i ) ) {
+ stretch = c - i;
+ break;
+ }
+ }
+ if ( stretch ) {
+ for ( i = 0; i < stretch; i++ )
+ setCol( r, c-i-1, w, cc );
+ }
+ }
+ }
+}
+
+
+void Grid::extendRight()
+{
+ int r,c,i;
+ for ( c = ncols - 2; c >= 0; c-- ) {
+ for ( r = 0; r < nrows; r++ ) {
+ QWidget* w = cell( r, c );
+ if ( !w )
+ continue;
+ int cc = countCol( r, c);
+ int stretch = 0;
+ for ( i = c+1; i < ncols; i++ ) {
+ if ( cell( r, i ) )
+ break;
+ if ( countCol( r, i ) < cc )
+ break;
+ if ( isWidgetStartCol( i ) )
+ break;
+ if ( isWidgetEndCol( i ) ) {
+ stretch = i - c;
+ break;
+ }
+ }
+ if ( stretch ) {
+ for ( i = 0; i < stretch; i++ )
+ setCol( r, c+i+1, w, cc );
+ }
+ }
+ }
+
+}
+
+void Grid::extendUp()
+{
+ int r,c,i;
+ for ( r = 1; r < nrows; r++ ) {
+ for ( c = 0; c < ncols; c++ ) {
+ QWidget* w = cell( r, c );
+ if ( !w )
+ continue;
+ int cr = countRow( r, c);
+ int stretch = 0;
+ for ( i = r-1; i >= 0; i-- ) {
+ if ( cell( i, c ) )
+ break;
+ if ( countRow( i, c ) < cr )
+ break;
+ if ( isWidgetEndRow( i ) )
+ break;
+ if ( isWidgetStartRow( i ) ) {
+ stretch = r - i;
+ break;
+ }
+ }
+ if ( stretch ) {
+ for ( i = 0; i < stretch; i++ )
+ setRow( r-i-1, c, w, cr );
+ }
+ }
+ }
+}
+
+void Grid::extendDown()
+{
+ int r,c,i;
+ for ( r = nrows - 2; r >= 0; r-- ) {
+ for ( c = 0; c < ncols; c++ ) {
+ QWidget* w = cell( r, c );
+ if ( !w )
+ continue;
+ int cr = countRow( r, c);
+ int stretch = 0;
+ for ( i = r+1; i < nrows; i++ ) {
+ if ( cell( i, c ) )
+ break;
+ if ( countRow( i, c ) < cr )
+ break;
+ if ( isWidgetStartRow( i ) )
+ break;
+ if ( isWidgetEndRow( i ) ) {
+ stretch = i - r;
+ break;
+ }
+ }
+ if ( stretch ) {
+ for ( i = 0; i < stretch; i++ )
+ setRow( r+i+1, c, w, cr );
+ }
+ }
+ }
+
+}
+
+void Grid::simplify()
+{
+ extendLeft();
+ extendRight();
+ extendUp();
+ extendDown();
+ merge();
+}
+
+
+void Grid::merge()
+{
+ int r,c;
+ for ( c = 0; c < ncols; c++ )
+ cols[c] = false;
+
+ for ( r = 0; r < nrows; r++ )
+ rows[r] = false;
+
+ for ( c = 0; c < ncols; c++ ) {
+ for ( r = 0; r < nrows; r++ ) {
+ if ( isWidgetTopLeft( r, c ) ) {
+ rows[r] = true;
+ cols[c] = true;
+ }
+ }
+ }
+}
+
+bool Grid::locateWidget( QWidget* w, int& row, int& col, int& rowspan, int & colspan )
+{
+ int r,c, r2, c2;
+ for ( c = 0; c < ncols; c++ ) {
+ for ( r = 0; r < nrows; r++ ) {
+ if ( cell( r, c ) == w ) {
+ row = 0;
+ for ( r2 = 1; r2 <= r; r2++ ) {
+ if ( rows[ r2-1 ] )
+ row++;
+ }
+ col = 0;
+ for ( c2 = 1; c2 <= c; c2++ ) {
+ if ( cols[ c2-1 ] )
+ col++;
+ }
+ rowspan = 0;
+ for ( r2 = r ; r2 < nrows && cell( r2, c) == w; r2++ ) {
+ if ( rows[ r2 ] )
+ rowspan++;
+ }
+ colspan = 0;
+ for ( c2 = c; c2 < ncols && cell( r, c2) == w; c2++ ) {
+ if ( cols[ c2] )
+ colspan++;
+ }
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+
+
+
+GridLayout::GridLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, const QSize &res, bool doSetup )
+ : Layout( wl, p, fw, lb, doSetup ), resolution( res )
+{
+ grid = 0;
+ if ( doSetup )
+ setup();
+}
+
+GridLayout::~GridLayout()
+{
+ delete grid;
+}
+
+void GridLayout::doLayout()
+{
+ bool needMove, needReparent;
+ if ( !prepareLayout( needMove, needReparent ) )
+ return;
+
+ QDesignerGridLayout *layout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid );
+
+ if ( !grid )
+ buildGrid();
+
+ QWidget* w;
+ int r, c, rs, cs;
+ for ( w = widgets.first(); w; w = widgets.next() ) {
+ if ( grid->locateWidget( w, r, c, rs, cs) ) {
+ if ( needReparent && w->parent() != layoutBase )
+ w->reparent( layoutBase, 0, QPoint( 0, 0 ), false );
+ if ( rs * cs == 1 ) {
+ layout->addWidget( w, r, c, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 );
+ } else {
+ layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 );
+ }
+ if ( w->inherits( "QLayoutWidget" ) )
+ ( (QLayoutWidget*)w )->updateSizePolicy();
+ w->show();
+ } else {
+ qWarning("ooops, widget '%s' does not fit in layout", w->name() );
+ }
+ }
+ finishLayout( needMove, layout );
+}
+
+void GridLayout::setup()
+{
+ Layout::setup();
+ buildGrid();
+}
+
+void GridLayout::buildGrid()
+{
+ QWidget* w;
+ QRect br;
+ for ( w = widgets.first(); w; w = widgets.next() )
+ br = br.unite( w->geometry() );
+
+ delete grid;
+ grid = new Grid( br.height() / resolution.height() + 1,
+ br.width() / resolution.width() + 1 );
+
+ int r,c;
+ for ( r = 0; r < grid->numRows(); r++ ) {
+ for ( c = 0; c < grid->numCols(); c++ ) {
+ QPoint p( br.left() + c * resolution.width(),
+ br.top() + r* resolution.height() );
+ QRect cr( p, resolution );
+ for ( w = widgets.first(); w; w = widgets.next() ) {
+ // check that the overlap is significant
+ QRect intersect = cr.intersect( w->geometry() );
+ if ( intersect.size().width() > resolution.width()/2 &&
+ intersect.size().height() > resolution.height()/2 ) {
+ grid->setCell( r, c, w );
+ }
+ }
+ }
+ }
+ grid->simplify();
+}
+
+
+
+
+
+
+
+Spacer::Spacer( QWidget *parent, const char *name )
+ : QWidget( parent, name, WMouseNoMask ),
+ orient( Vertical ), interactive(true), sh( QSize(20,20) )
+{
+ setSizeType( Expanding );
+ setAutoMask( true );
+}
+
+void Spacer::paintEvent( QPaintEvent * )
+{
+ QPainter p( this );
+ p.setPen( Qt::blue );
+
+ if ( orient == Horizontal ) {
+ const int dist = 3;
+ const int amplitude = QMIN( 3, height() / 3 );
+ const int base = height() / 2;
+ int i = 0;
+ p.setPen( white );
+ for ( i = 0; i < width() / 3 +2; ++i )
+ p.drawLine( i * dist, base - amplitude, i * dist + dist / 2, base + amplitude );
+ p.setPen( blue );
+ for ( i = 0; i < width() / 3 +2; ++i )
+ p.drawLine( i * dist + dist / 2, base + amplitude, i * dist + dist, base - amplitude );
+ p.drawLine( 0, 0, 0, height() );
+ p.drawLine( width() - 1, 0, width() - 1, height());
+ } else {
+ const int dist = 3;
+ const int amplitude = QMIN( 3, width() / 3 );
+ const int base = width() / 2;
+ int i = 0;
+ p.setPen( white );
+ for ( i = 0; i < height() / 3 +2; ++i )
+ p.drawLine( base - amplitude, i * dist, base + amplitude,i * dist + dist / 2 );
+ p.setPen( blue );
+ for ( i = 0; i < height() / 3 +2; ++i )
+ p.drawLine( base + amplitude, i * dist + dist / 2, base - amplitude, i * dist + dist );
+ p.drawLine( 0, 0, width(), 0 );
+ p.drawLine( 0, height() - 1, width(), height() - 1 );
+ }
+}
+
+void Spacer::resizeEvent( QResizeEvent* e)
+{
+ QWidget::resizeEvent( e );
+ if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
+ sh = size();
+}
+
+void Spacer::updateMask()
+{
+ QRegion r( rect() );
+ if ( orient == Horizontal ) {
+ const int amplitude = QMIN( 3, height() / 3 );
+ const int base = height() / 2;
+ r = r.subtract( QRect(1, 0, width() - 2, base - amplitude ) );
+ r = r.subtract( QRect(1, base + amplitude, width() - 2, height() - base - amplitude ) );
+ } else {
+ const int amplitude = QMIN( 3, width() / 3 );
+ const int base = width() / 2;
+ r = r.subtract( QRect(0, 1, base - amplitude, height() - 2 ) );
+ r = r.subtract( QRect( base + amplitude, 1, width() - base - amplitude, height() - 2 ) );
+ }
+ setMask( r );
+}
+
+void Spacer::setSizeType( SizeType t )
+{
+ QSizePolicy sizeP;
+ if ( orient == Vertical )
+ sizeP = QSizePolicy( QSizePolicy::Minimum, (QSizePolicy::SizeType)t );
+ else
+ sizeP = QSizePolicy( (QSizePolicy::SizeType)t, QSizePolicy::Minimum );
+ setSizePolicy( sizeP );
+}
+
+
+Spacer::SizeType Spacer::sizeType() const
+{
+ if ( orient == Vertical )
+ return (SizeType)sizePolicy().verData();
+ return (SizeType)sizePolicy().horData();
+}
+
+int Spacer::alignment() const
+{
+ if ( orient == Vertical )
+ return AlignHCenter;
+ return AlignVCenter;
+}
+
+QSize Spacer::minimumSize() const
+{
+ return QSize( 20, 20 );
+}
+
+QSize Spacer::sizeHint() const
+{
+ QSize s = sh.expandedTo( QSize(0,0) );
+ if ( sizeType() == Expanding )
+ if ( orient == Horizontal )
+ s.rheight() = 0;
+ else
+ s.rwidth() = 0;
+ return s;
+}
+
+
+void Spacer::setSizeHint( const QSize &s )
+{
+ sh = s;
+ if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
+ resize( sizeHint() );
+ updateGeometry();
+}
+
+Qt::Orientation Spacer::orientation() const
+{
+ return orient;
+}
+
+void Spacer::setOrientation( Qt::Orientation o )
+{
+ if ( orient == o )
+ return;
+
+ SizeType st = sizeType();
+ orient = o;
+ setSizeType( st );
+ if ( interactive ) {
+ sh = QSize( sh.height(), sh.width() );
+ if (!parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
+ resize( height(), width() );
+ }
+ updateMask();
+ update();
+ updateGeometry();
+}
+
+
+void QDesignerGridLayout::addWidget( QWidget *w, int row, int col, int align_ )
+{
+ items.insert( w, Item(row, col, 1, 1) );
+ QGridLayout::addWidget( w, row, col, align_ );
+}
+
+void QDesignerGridLayout::addMultiCellWidget( QWidget *w, int fromRow, int toRow,
+ int fromCol, int toCol, int align_ )
+{
+ items.insert( w, Item(fromRow, fromCol, toRow - fromRow + 1, toCol - fromCol +1) );
+ QGridLayout::addMultiCellWidget( w, fromRow, toRow, fromCol, toCol, align_ );
+}
+#include "layout.moc"
diff --git a/kommander/editor/layout.h b/kommander/editor/layout.h
new file mode 100644
index 00000000..06dce7ac
--- /dev/null
+++ b/kommander/editor/layout.h
@@ -0,0 +1,180 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef LAYOUT_H
+#define LAYOUT_H
+
+#include <qwidget.h>
+#include <qmap.h>
+#include <qguardedptr.h>
+#include <qobject.h>
+#include <qlayout.h>
+#include <qwidgetlist.h>
+
+class FormWindow;
+class QPaintEvent;
+
+class Layout : public QObject
+{
+ Q_OBJECT
+
+public:
+ Layout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
+ virtual ~Layout() {}
+
+ virtual void doLayout() = 0;
+ virtual void undoLayout();
+ virtual void breakLayout();
+ virtual bool prepareLayout( bool &needMove, bool &needReparent );
+ virtual void finishLayout( bool needMove, QLayout *layout );
+
+protected:
+ QWidgetList widgets;
+ QWidget *parent;
+ QPoint startPoint;
+ QMap<QGuardedPtr<QWidget>, QRect> geometries;
+ QWidget *layoutBase;
+ FormWindow *formWindow;
+ QRect oldGeometry;
+ bool isBreak;
+ bool useSplitter;
+
+protected:
+ virtual void setup();
+
+protected slots:
+ void widgetDestroyed();
+
+};
+
+class HorizontalLayout : public Layout
+{
+public:
+ HorizontalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
+
+ void doLayout();
+
+protected:
+ void setup();
+
+};
+
+class VerticalLayout : public Layout
+{
+public:
+ VerticalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
+
+ void doLayout();
+
+protected:
+ void setup();
+
+};
+
+class Grid;
+
+class GridLayout : public Layout
+{
+public:
+ GridLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, const QSize &res, bool doSetup = TRUE );
+ ~GridLayout();
+
+ void doLayout();
+
+protected:
+ void setup();
+
+protected:
+ void buildGrid();
+ QSize resolution;
+ Grid* grid;
+
+};
+
+class Spacer : public QWidget
+{
+ Q_OBJECT
+
+ Q_OVERRIDE( QCString name )
+ Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
+ Q_ENUMS( SizeType )
+ Q_PROPERTY( SizeType sizeType READ sizeType WRITE setSizeType )
+ Q_PROPERTY( QSize sizeHint READ sizeHint WRITE setSizeHint DESIGNABLE true STORED true )
+ Q_OVERRIDE( QRect geometry DESIGNABLE false )
+
+private:
+ enum { HSize = 6, HMask = 0x3f, VMask = HMask << HSize,
+ MayGrow = 1, ExpMask = 2, MayShrink = 4 };
+
+public:
+ enum SizeType { Fixed = 0,
+ Minimum = MayGrow,
+ Maximum = MayShrink,
+ Preferred = MayGrow|MayShrink ,
+ MinimumExpanding = Minimum|ExpMask,
+ Expanding = MinimumExpanding|MayShrink };
+
+ Spacer( QWidget *parent, const char *name );
+
+ QSize minimumSize() const;
+ QSize sizeHint() const;
+ void setSizeType( SizeType t );
+ SizeType sizeType() const;
+ int alignment() const;
+ Orientation orientation() const;
+ void setOrientation( Orientation o );
+ void setInteraciveMode( bool b ) { interactive = b; };
+ void setSizeHint( const QSize &s );
+
+protected:
+ void paintEvent( QPaintEvent *e );
+ void resizeEvent( QResizeEvent* e );
+ void updateMask();
+ Qt::Orientation orient;
+ bool interactive;
+ QSize sh;
+};
+
+class QDesignerGridLayout : public QGridLayout
+{
+ Q_OBJECT
+public:
+ QDesignerGridLayout( QWidget *parent ) : QGridLayout( parent ){};
+ QDesignerGridLayout( QLayout *parentLayout ) : QGridLayout( parentLayout ){};
+
+ void addWidget( QWidget *, int row, int col, int align = 0 );
+ void addMultiCellWidget( QWidget *, int fromRow, int toRow,
+ int fromCol, int toCol, int align = 0 );
+
+ struct Item
+ {
+ Item(): row(0), column(0),rowspan(1),colspan(1){}
+ Item( int r, int c, int rs, int cs): row(r), column(c), rowspan(rs), colspan(cs){}
+ int row;
+ int column;
+ int rowspan;
+ int colspan;
+ };
+
+ QMap<QWidget*, Item> items;
+};
+
+
+#endif
diff --git a/kommander/editor/listboxeditor.ui b/kommander/editor/listboxeditor.ui
new file mode 100644
index 00000000..2b462987
--- /dev/null
+++ b/kommander/editor/listboxeditor.ui
@@ -0,0 +1,455 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>ListBoxEditorBase</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>ListBoxEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>461</width>
+ <height>196</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit Listbox</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Edit Listbox&lt;/b&gt;&lt;p&gt;Add, edit or delete items in the listbox.&lt;/p&gt;&lt;p&gt;Click the &lt;b&gt;New Item&lt;/b&gt;-button to create a new listbox entry, then enter text and choose a pixmap.&lt;/p&gt;&lt;p&gt;Select an item from the list and click the &lt;b&gt;Delete Item&lt;/b&gt;-button to remove the item from the list.&lt;/p&gt;</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="5" 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>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>helpButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <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="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonApply</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Apply</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Apply all changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QListBox" row="0" column="0" rowspan="5" colspan="1">
+ <property name="name">
+ <cstring>preview</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete Item</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The list of items.</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="0" column="2" rowspan="5" colspan="1">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>&amp;Item Properties</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>Label2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Pixmap:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemChoosePixmap</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>itemPixmap</cstring>
+ </property>
+ <property name="text">
+ <string>Label4</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>itemDeletePixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Delete the selected item's pixmap.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>itemChoosePixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select a Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Choose a pixmap file for the selected item.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Text:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemText</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>itemText</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Change text</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Change the selected item's text.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>itemNew</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New Item</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Add an item</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Add a new item.&lt;/b&gt;&lt;p&gt;New items are appended to the list.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>itemDelete</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete Item</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete Item</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Delete the selected item</string>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>Vertical Spacing1</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>
+ <widget class="QPushButton" row="3" column="1">
+ <property name="name">
+ <cstring>itemUp</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move up</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Moves the selected item up.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>itemDown</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move down</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Move the selected item down.</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="409">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022630543251d2e253d856405bffcbc54105b19c856360003103711c6b53006ab440370316528264b4c198450c5808a94d1ed00aac214832b43124b544ec414d34b4c4c441103f11341120831309758313d0cf3b0840b7258d55a73010092c14eca</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="1040">789c5dcf4d73a2401006e0bbbf82726ed61609ca0c4c6ded0125dfd1985baab6f600338c280a46fc08a6f6bf2f3ddd26abc0619eb7677a9aab9ef3361d3bbdab4ebd4db673e5a83cd9383dbd5bad9adf7f7e7d76ba9e70dacfe78ed7fdd1e9ba8e72265599c17adaae99773df033cb9818225f2cc38132027887f4af8d01ee817dc935720d1c7827d648c1910f969273cd8123e4a93a21d2d95ba0ef098d631864409b6f2c13c195063e210389d55720ef0b8dd56764e021c7c8905acd2c93b66aa71a224389fffb0e14fd4062f51119d290115252ab2391c6585ab653a5f6de033294f8fbf74849175544eacc80c120e478b644267451434c90a9659a78d8aa2066585d00c33425ae80d25702b92352756ea91475ce90ba8f4c80299cb5177d58ea8c5a6d819a67b4595b66865a29602632628e3406b9011a73a26b1f96a40c575f19536dc7d959c6543e5f1466f95fd646aba22cabf5fb57c636f9a24ddaa75e52c6b6f90ea3aada2f313b7ccc1b1b1da3e128a67df09aaa1addb82963dfb3b8b7cdf18e9dcfe70e8b687f91b1fba25acf2eb2a289460f17d9a28c4c7c9e1d8ae8f1e9227b1e4feafa859d9f8de378fa8afbfefeecfc030f08f1a3</data>
+ </image>
+ <image name="image2">
+ <data format="XPM.GZ" length="1085">789c5dd0cd6ee2301000e03b4f11911b5ad1189290a8da0324a5e90f29941e2aadf6e0d84ea10d1020849ad5befb7a3cceaa29e2e06f663c33ce55cf7a9dcfacde55e758d16acd2cb6a207abc74f9b8dfcf5fbe79f4e97f896fabb8145ba3f3addbec5ac74b715704ed5d9769c01cb73e0423368f80224c190e53e70091c389e83d98366e83942679f0c43cc7e0087c4f3307b63c8b1d559337459c6810f48df137aab49436c750f748917320f78418e4cf65993fa04b33572c4313b067a039f333de80e39e238680ff4d5d2581c69d2c0c3ad8e0db1f30619127cd1dcd00c7a4452824c80a321359d73cd8c129c1b1b0acc726030a414b31299f9989d1952a4d0ccc23073819f861c973c2133d3b904aacf6ceeda9a8c12bc5b219929de21f9005900a99bf9f8e9a8a159728a5477f5d77847367719305373b1788b14668d4c9337d95b2437ef5d03b9c84df10a28fc866fc05c9522fbf0b369c6b8d0c7ffb1fc6db57effb0bfc68acd7657ee0fedba63599dea73d18a7dca525ec6ed3aa16293a81d2bf232beb1bfc578d58a416731ad641da95381b1e3f496ca939432c9f3bb7b8c450f8fb39994b18c93493a36fda2a7b9aa8ae3e4b278b69b192aa822499dc2d6cddc68b94ff697f46c7fdd255ad6f5e2dbdbfac7c3cbd8ecf7f7baf30f538f0154</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>itemNew</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>insertNewItem()</slot>
+ </connection>
+ <connection>
+ <sender>itemDelete</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>deleteCurrentItem()</slot>
+ </connection>
+ <connection>
+ <sender>itemText</sender>
+ <signal>textChanged( const QString &amp; )</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>currentTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>okClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonApply</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>applyClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>cancelClicked()</slot>
+ </connection>
+ <connection>
+ <sender>itemChoosePixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>choosePixmap()</slot>
+ </connection>
+ <connection>
+ <sender>itemDeletePixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>deletePixmap()</slot>
+ </connection>
+ <connection>
+ <sender>itemUp</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>moveItemUp()</slot>
+ </connection>
+ <connection>
+ <sender>itemDown</sender>
+ <signal>clicked()</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>moveItemDown()</slot>
+ </connection>
+ <connection>
+ <sender>preview</sender>
+ <signal>selectionChanged(QListBoxItem*)</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>currentItemChanged(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>preview</sender>
+ <signal>currentChanged( QListBoxItem * )</signal>
+ <receiver>ListBoxEditorBase</receiver>
+ <slot>currentItemChanged(QListBoxItem*)</slot>
+ </connection>
+ <slot access="protected" language="C++" returnType="void">init()</slot>
+ <slot access="protected" language="C++" returnType="void">destroy()</slot>
+ <slot access="protected" language="C++" returnType="void">insertNewItem()</slot>
+ <slot access="protected" language="C++" returnType="void">deleteCurrentItem()</slot>
+ <slot access="protected" language="C++" returnType="void">currentItemChanged( QListBoxItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">currentTextChanged( const QString &amp; )</slot>
+ <slot access="protected" language="C++" returnType="void">okClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">cancelClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">applyClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">choosePixmap()</slot>
+ <slot access="protected" language="C++" returnType="void">deletePixmap()</slot>
+ <slot access="protected" language="C++" returnType="void">moveItemUp()</slot>
+ <slot access="protected" language="C++" returnType="void">moveItemDown()</slot>
+</connections>
+<tabstops>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+ <tabstop>preview</tabstop>
+ <tabstop>itemNew</tabstop>
+ <tabstop>itemDelete</tabstop>
+ <tabstop>itemUp</tabstop>
+ <tabstop>itemDown</tabstop>
+ <tabstop>itemText</tabstop>
+ <tabstop>itemDeletePixmap</tabstop>
+ <tabstop>itemChoosePixmap</tabstop>
+ <tabstop>helpButton</tabstop>
+ <tabstop>buttonApply</tabstop>
+</tabstops>
+</UI>
diff --git a/kommander/editor/listboxeditorimpl.cpp b/kommander/editor/listboxeditorimpl.cpp
new file mode 100644
index 00000000..5a2aac9d
--- /dev/null
+++ b/kommander/editor/listboxeditorimpl.cpp
@@ -0,0 +1,216 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "listboxeditorimpl.h"
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "pixmapchooser.h"
+#include "command.h"
+
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qlistbox.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+
+#include <klocale.h>
+
+ListBoxEditor::ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw )
+ : ListBoxEditorBase( parent, 0, true ), formwindow( fw )
+{
+ connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ listbox = (QListBox*)editWidget;
+
+ itemText->setText( "" );
+ itemText->setEnabled( false );
+ itemPixmap->setText( "" );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+
+ QListBoxItem *i = 0;
+ for ( i = listbox->firstItem(); i; i = i->next() ) {
+ if ( i->pixmap() )
+ (void)new QListBoxPixmap( preview, *i->pixmap(), i->text() );
+ else
+ (void)new QListBoxText( preview, i->text() );
+ }
+
+ if ( preview->firstItem() )
+ preview->setCurrentItem( preview->firstItem() );
+}
+
+void ListBoxEditor::insertNewItem()
+{
+ QListBoxItem *i = new QListBoxText( preview, i18n("New Item") );
+ preview->setCurrentItem( i );
+ preview->setSelected( i, true );
+}
+
+void ListBoxEditor::deleteCurrentItem()
+{
+ delete preview->item( preview->currentItem() );
+ if ( preview->currentItem() != -1 )
+ preview->setSelected( preview->currentItem(), true );
+}
+
+void ListBoxEditor::currentItemChanged( QListBoxItem *i )
+{
+ itemText->blockSignals( true );
+ itemText->setText( "" );
+ itemPixmap->setText( "" );
+ itemText->blockSignals( false );
+
+ if ( !i ) {
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ return;
+ }
+
+ itemText->blockSignals( true );
+ itemText->setEnabled( true );
+ itemChoosePixmap->setEnabled( true );
+ itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
+
+ itemText->setText( i->text() );
+ if ( i->pixmap() )
+ itemPixmap->setPixmap( *i->pixmap() );
+ itemText->blockSignals( false );
+}
+
+void ListBoxEditor::currentTextChanged( const QString &txt )
+{
+ if ( preview->currentItem() == -1 )
+ return;
+
+ preview->blockSignals( true );
+ if ( preview->item( preview->currentItem() )->pixmap() )
+ preview->changeItem( *preview->item( preview->currentItem() )->pixmap(), txt, preview->currentItem() );
+ else
+ preview->changeItem( txt, preview->currentItem() );
+ preview->blockSignals( false );
+}
+
+void ListBoxEditor::okClicked()
+{
+ applyClicked();
+ accept();
+}
+
+void ListBoxEditor::cancelClicked()
+{
+ reject();
+}
+
+void ListBoxEditor::applyClicked()
+{
+ QListBoxItem *i = 0;
+ QValueList<PopulateListBoxCommand::Item> items;
+ for ( i = preview->firstItem(); i; i = i->next() ) {
+ PopulateListBoxCommand::Item item;
+ if ( i->pixmap() )
+ item.pix = *i->pixmap();
+ item.text = i->text();
+ items.append( item );
+ }
+
+ PopulateListBoxCommand *cmd = new PopulateListBoxCommand( i18n("Edit Items of '%1'" ).arg( listbox->name() ),
+ formwindow, listbox, items );
+ cmd->execute();
+ formwindow->commandHistory()->addCommand( cmd );
+}
+
+void ListBoxEditor::choosePixmap()
+{
+ if ( preview->currentItem() == -1 )
+ return;
+
+ QPixmap pix;
+ if ( preview->item( preview->currentItem() )->pixmap() )
+ pix = qChoosePixmap( this, formwindow, *preview->item( preview->currentItem() )->pixmap() );
+ else
+ pix = qChoosePixmap( this, formwindow, QPixmap() );
+
+ if ( pix.isNull() )
+ return;
+
+ QString txt = preview->item( preview->currentItem() )->text();
+ preview->changeItem( pix, txt, preview->currentItem() );
+ itemDeletePixmap->setEnabled( true );
+}
+
+void ListBoxEditor::moveItemUp()
+{
+ if ( preview->currentItem() < 1 )
+ return;
+
+ QListBoxItem *i = preview->item( preview->currentItem() );
+ bool hasPix = (i->pixmap() != 0);
+ QPixmap pix;
+ if ( hasPix )
+ pix = *i->pixmap();
+ QString txt = i->text();
+
+ QListBoxItem *p = i->prev();
+ if ( p->pixmap() )
+ preview->changeItem( *p->pixmap(), p->text(), preview->currentItem() );
+ else
+ preview->changeItem( p->text(), preview->currentItem() );
+
+ if ( hasPix )
+ preview->changeItem( pix, txt, preview->currentItem() - 1 );
+ else
+ preview->changeItem( txt, preview->currentItem() - 1 );
+}
+
+void ListBoxEditor::moveItemDown()
+{
+ if ( preview->currentItem() == -1 || preview->currentItem() > (int)preview->count() - 2 )
+ return;
+
+ QListBoxItem *i = preview->item( preview->currentItem() );
+ bool hasPix = (i->pixmap() != 0);
+ QPixmap pix;
+ if ( hasPix )
+ pix = *i->pixmap();
+ QString txt = i->text();
+
+ QListBoxItem *n = i->next();
+ if ( n->pixmap() )
+ preview->changeItem( *n->pixmap(), n->text(), preview->currentItem() );
+ else
+ preview->changeItem( n->text(), preview->currentItem() );
+
+ if ( hasPix )
+ preview->changeItem( pix, txt, preview->currentItem() + 1 );
+ else
+ preview->changeItem( txt, preview->currentItem() + 1 );
+}
+
+void ListBoxEditor::deletePixmap()
+{
+ if ( preview->currentItem() == -1 )
+ return;
+
+ QListBoxItem *i = preview->item( preview->currentItem() );
+ preview->changeItem( i->text(), preview->currentItem() );
+ itemDeletePixmap->setEnabled( false );
+}
+#include "listboxeditorimpl.moc"
diff --git a/kommander/editor/listboxeditorimpl.h b/kommander/editor/listboxeditorimpl.h
new file mode 100644
index 00000000..294ce33e
--- /dev/null
+++ b/kommander/editor/listboxeditorimpl.h
@@ -0,0 +1,55 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef LISTBOXEDITOR_H
+#define LISTBOXEDITOR_H
+
+class QListBox;
+class FormWindow;
+
+#include "listboxeditor.h"
+
+class ListBoxEditor : public ListBoxEditorBase
+{
+ Q_OBJECT
+
+public:
+ ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw );
+
+protected slots:
+ void insertNewItem();
+ void deleteCurrentItem();
+ void currentItemChanged( QListBoxItem * );
+ void currentTextChanged( const QString & );
+ void okClicked();
+ void cancelClicked();
+ void applyClicked();
+ void choosePixmap();
+ void moveItemUp();
+ void moveItemDown();
+ void deletePixmap();
+
+private:
+ QListBox *listbox;
+ FormWindow *formwindow;
+
+};
+
+#endif
diff --git a/kommander/editor/listeditor.ui b/kommander/editor/listeditor.ui
new file mode 100644
index 00000000..6cafeed0
--- /dev/null
+++ b/kommander/editor/listeditor.ui
@@ -0,0 +1,147 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>ListEditor</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>ListEditor</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>331</width>
+ <height>301</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit</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="0" rowspan="5" colspan="1">
+ <column>
+ <property name="text">
+ <string>Column 1</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>listview</cstring>
+ </property>
+ <property name="selectionMode">
+ <enum>Extended</enum>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>PushButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>PushButton2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>PushButton3</cstring>
+ </property>
+ <property name="text">
+ <string>Re&amp;name</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>PushButton4</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ </widget>
+ <spacer row="3" 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>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>PushButton1</sender>
+ <signal>clicked()</signal>
+ <receiver>ListEditor</receiver>
+ <slot>addItem()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton2</sender>
+ <signal>clicked()</signal>
+ <receiver>ListEditor</receiver>
+ <slot>removeItems()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton4</sender>
+ <signal>clicked()</signal>
+ <receiver>ListEditor</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>listview</sender>
+ <signal>itemRenamed(QListViewItem*,int)</signal>
+ <receiver>ListEditor</receiver>
+ <slot>renamed(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>PushButton3</sender>
+ <signal>clicked()</signal>
+ <receiver>ListEditor</receiver>
+ <slot>renameItem()</slot>
+ </connection>
+</connections>
+<forwards>
+ <forward>class QStringList;</forward>
+</forwards>
+<slots>
+ <slot>init()</slot>
+ <slot>setList( const QStringList &amp; l )</slot>
+ <slot>addItem()</slot>
+ <slot>renamed( QListViewItem * i )</slot>
+ <slot>removeItems()</slot>
+ <slot returnType="QStringList">items()</slot>
+ <slot>renameItem()</slot>
+</slots>
+<pixmapinproject/>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/editor/listvieweditor.ui b/kommander/editor/listvieweditor.ui
new file mode 100644
index 00000000..32c5f135
--- /dev/null
+++ b/kommander/editor/listvieweditor.ui
@@ -0,0 +1,936 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>ListViewEditorBase</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>ListViewEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>599</width>
+ <height>351</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit Listview</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Edit Listview&lt;/b&gt;&lt;p&gt;Use the controls on the &lt;b&gt;Items&lt;/b&gt;-tab to add, edit or delete items in the listview. Change the column configuration of the listview using the controls on the &lt;b&gt;Columns&lt;/b&gt;-tab.&lt;/p&gt;Click the &lt;b&gt;New Item&lt;/b&gt;-button to create a new item, then enter text and add a pixmap.&lt;/p&gt;&lt;p&gt;Select an item from the list and click the &lt;b&gt;Delete Item&lt;/b&gt;-button to remove the item from the list.&lt;/p&gt;</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>tabWidget</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Widget10</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Items</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="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>itemDelete</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete Item</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete item</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Deletes the selected item.&lt;/b&gt;&lt;p&gt;Any sub-items are also deleted.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="0" column="2" rowspan="8" colspan="1">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Item &amp;Properties</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="2" column="0">
+ <property name="name">
+ <cstring>Label2</cstring>
+ </property>
+ <property name="text">
+ <string>Pi&amp;xmap:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemChoosePixmap</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Text:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemText</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>itemText</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Change text</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Change the text of the item.&lt;/b&gt;&lt;p&gt;The text will be changed in the current column of the selected item.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>itemColumn</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Change column</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Select the current column.&lt;/b&gt;&lt;p&gt;The item's text and pixmap will be changed for the current column&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>Label4</cstring>
+ </property>
+ <property name="text">
+ <string>Colu&amp;mn:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemColumn</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="1">
+ <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="QLabel">
+ <property name="name">
+ <cstring>itemPixmap</cstring>
+ </property>
+ <property name="text">
+ <string>Label4</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>itemDeletePixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Delete the selected item's pixmap.&lt;/b&gt;&lt;p&gt;The pixmap in the current column of the selected item will be deleted.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>itemChoosePixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select a Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Select a pixmap file for the item.&lt;/b&gt;&lt;p&gt;The pixmap will be changed in the current column of the selected item.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>itemNew</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New Item</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Add an item</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Adds a new item to the list.&lt;/b&gt;&lt;p&gt;The item will be inserted at the top of the list and can be moved using the up- and down-buttons.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QListView" row="0" column="0" rowspan="8" colspan="1">
+ <property name="name">
+ <cstring>itemsPreview</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The list of items.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>itemNewSub</cstring>
+ </property>
+ <property name="text">
+ <string>New &amp;Subitem</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Add a subitem</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Create a new sub-item for the selected item.&lt;/b&gt;&lt;p&gt;New sub-items are inserted at the top of the list of sub-items, and new levels are created automatically.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>Vertical Spacing1</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>
+ <widget class="QPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>itemUp</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move up</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item up.&lt;/b&gt;&lt;p&gt;The item will be moved within its level in the hierarchy.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="5" column="1">
+ <property name="name">
+ <cstring>itemDown</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move down</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item down.&lt;/b&gt;&lt;p&gt;The item will be moved within its level in the hierarchy.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="6" column="1">
+ <property name="name">
+ <cstring>itemLeft</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image3</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move left</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item one level up.&lt;/b&gt;&lt;p&gt;This will also change the level of the item's sub-items.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="7" column="1">
+ <property name="name">
+ <cstring>itemRight</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image4</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move right</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item one level down.&lt;/b&gt;&lt;p&gt;This will also change the level of the item's sub-items.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Widget11</cstring>
+ </property>
+ <attribute name="title">
+ <string>Co&amp;lumns</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="QGroupBox" row="0" column="2" rowspan="5" colspan="1">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Column Properties</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>Label2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Pixmap:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>colChoosePixmap</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>colPixmap</cstring>
+ </property>
+ <property name="text">
+ <string>Label4</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>colDeletePixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Delete the pixmap of the selected column.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>colChoosePixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select a Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Select a pixmap file for the selected column.&lt;/b&gt;&lt;p&gt;The pixmap will be displayed in the header of the listview.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Text:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>colText</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>colText</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enter column text</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Enter the text for the selected column.&lt;/b&gt;&lt;p&gt;The text will be displayed in the header of the listview.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>colClickable</cstring>
+ </property>
+ <property name="text">
+ <string>Clicka&amp;ble</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>If this option is checked, the selected column will react to mouse clicks on the header.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>colResizeable</cstring>
+ </property>
+ <property name="text">
+ <string>Re&amp;sizable</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The column's width will be resizeable if this option is checked.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>colDelete</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete Column</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete column</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Deletes the selected Column.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>colDown</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move down</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item down.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column in the list.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>colNew</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New Column</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Add a Column</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Create a new column.&lt;/b&gt;&lt;p&gt;New columns are appended at the end of (right of) the list and may be moved using the up- and down-buttons.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="3" column="1">
+ <property name="name">
+ <cstring>colUp</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move up</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item up.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column in the list.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QListBox" row="0" column="0" rowspan="5" colspan="1">
+ <property name="name">
+ <cstring>colPreview</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The list of columns.</string>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>Vertical Spacing2</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>
+ </widget>
+ <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>helpButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <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>okButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>applyButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Apply</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Apply all changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>cancelButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="409">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022630543251d2e253d856405bffcbc54105b19c856360003103711c6b53006ab440370316528264b4c198450c5808a94d1ed00aac214832b43124b544ec414d34b4c4c441103f11341120831309758313d0cf3b0840b7258d55a73010092c14eca</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="1040">789c5dcf4d73a2401006e0bbbf82726ed61609ca0c4c6ded0125dfd1985baab6f600338c280a46fc08a6f6bf2f3ddd26abc0619eb7677a9aab9ef3361d3bbdab4ebd4db673e5a83cd9383dbd5bad9adf7f7e7d76ba9e70dacfe78ed7fdd1e9ba8e72265599c17adaae99773df033cb9818225f2cc38132027887f4af8d01ee817dc935720d1c7827d648c1910f969273cd8123e4a93a21d2d95ba0ef098d631864409b6f2c13c195063e210389d55720ef0b8dd56764e021c7c8905acd2c93b66aa71a224389fffb0e14fd4062f51119d290115252ab2391c6585ab653a5f6de033294f8fbf74849175544eacc80c120e478b644267451434c90a9659a78d8aa2066585d00c33425ae80d25702b92352756ea91475ce90ba8f4c80299cb5177d58ea8c5a6d819a67b4595b66865a29602632628e3406b9011a73a26b1f96a40c575f19536dc7d959c6543e5f1466f95fd646aba22cabf5fb57c636f9a24ddaa75e52c6b6f90ea3aada2f313b7ccc1b1b1da3e128a67df09aaa1addb82963dfb3b8b7cdf18e9dcfe70e8b687f91b1fba25acf2eb2a289460f17d9a28c4c7c9e1d8ae8f1e9227b1e4feafa859d9f8de378fa8afbfefeecfc030f08f1a3</data>
+ </image>
+ <image name="image2">
+ <data format="XPM.GZ" length="1085">789c5dd0cd6ee2301000e03b4f11911b5ad1189290a8da0324a5e90f29941e2aadf6e0d84ea10d1020849ad5befb7a3cceaa29e2e06f663c33ce55cf7a9dcfacde55e758d16acd2cb6a207abc74f9b8dfcf5fbe79f4e97f896fabb8145ba3f3addbec5ac74b715704ed5d9769c01cb73e0423368f80224c190e53e70091c389e83d98366e83942679f0c43cc7e0087c4f3307b63c8b1d559337459c6810f48df137aab49436c750f748917320f78418e4cf65993fa04b33572c4313b067a039f333de80e39e238680ff4d5d2581c69d2c0c3ad8e0db1f30619127cd1dcd00c7a4452824c80a321359d73cd8c129c1b1b0acc726030a414b31299f9989d1952a4d0ccc23073819f861c973c2133d3b904aacf6ceeda9a8c12bc5b219929de21f9005900a99bf9f8e9a8a159728a5477f5d77847367719305373b1788b14668d4c9337d95b2437ef5d03b9c84df10a28fc866fc05c9522fbf0b369c6b8d0c7ffb1fc6db57effb0bfc68acd7657ee0fedba63599dea73d18a7dca525ec6ed3aa16293a81d2bf232beb1bfc578d58a416731ad641da95381b1e3f496ca939432c9f3bb7b8c450f8fb39994b18c93493a36fda2a7b9aa8ae3e4b278b69b192aa822499dc2d6cddc68b94ff697f46c7fdd255ad6f5e2dbdbfac7c3cbd8ecf7f7baf30f538f0154</data>
+ </image>
+ <image name="image3">
+ <data format="XPM.GZ" length="1055">789c65d25f6fa2401000f0773f05913773b1202c422ef7a056ebffda3e5dd2f461d95d2aa2605129dea5dfbdbb336373a7460dbf9961665cbc6b59bf570bab75d7381cf931159658f3d26ac9d36e777e79fdf5b7d174034bbf7dfdddfcd168b62d612d8b5c99eb677d6d3ba12792c47069e83a5ea820fb88f47dcc8e80dfc563a4ef2481e19448d99e61c7f184648603e4a5d5191831863c187a2e6312e60e91818bd90930620eb67a400611666b43dfed52ab059007ae80e215910969f884ec4a2c9e1bb24e20313b4386d4ea1ec8431ad4370c3a5d164371818ca8f80f9047119e4645a441b661d70b23dc2a4772ba774de448098c438983b648eee243c9880a8b37c8b883fc300c3d4d58a3240698e5c098336c951a46bea0ec89486b2440a1b3d0ea0d29a9786f184b457c3714ecc21d504a5a3236944ad192c250058a061d91095101f59dc8f6d5eb3b66f39b188f05bf8a49a192ab3abdc8db5afe17d3f3d24d66b7b9e436dfdaf014762acdb3bcd826fbfdfbbe3cc0911c4f599e57599a7e94ebbc3ec3832f373a545545613e750ffe2a837b1dca87a3c179f8500fc73063329de992b9948b496f395ee02ef3c7baa8681779d979357a9addfcb6fef3d4be3983fef236f6ef597dfe6c7c016080f871</data>
+ </image>
+ <image name="image4">
+ <data format="XPM.GZ" length="1175">789c65d24b6fda401000e03bbfc2c2375411fc583f54f510d204688040020949d5c37ad7368eb14978242455ff7b3d0f9002960ffe66676647bb3e6b18b3d1c0689cd5d61bb9c994a1e6726534f4b6283e7efff9f1b756b73ca37a856b58f56fb57ad350c67059c6f03dadbecd56cb769304386606c41ed00a1c157bc05ba0dd725c2d8037443788b1d51019ba8af808742c1126583b38103bf7899e20de2143d1521a3822ee57bb4cae7d02ba96d0947c8f944247c809d1b3140e7941f4054df50b286cdfd2c86b62c01bcd90d20f29f99d18685a2d819eed0bda2825865cbb434a9fc7d0c440d0183f89219f46fb40aced10a545cc80be23b9b34446412815f08118f29026515a74471f4c491b29664cad7260e0441ef11959d552f21571bfba6472ab05935b15c0eab63979ce94c418a914275f12b54ddc00a55b113b9f1f88ab095269aefd24c6bcba0546aef6a8768dd49a877c3b109357c498878c804a27bcef2b93575f80904a6c1e3d5f62a63c8d454a9fc4e224d527b5f338d31493cfa6a9cd6653e68b459196185bbebcaed6ebcdf62d5779be78dfe1ad7e16c5bc88cf0b054ffb027fa9cbab5c6559072259daede1efddb9eef607c39b51156af7c7582b7bb777939d9465bb0a4defbfcef2900ea693a3f966fdf1e478e647c83a8a3d95a767b03fab7fdf6bff01e3b51256</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>itemNew</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemNewClicked()</slot>
+ </connection>
+ <connection>
+ <sender>itemDelete</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemDeleteClicked()</slot>
+ </connection>
+ <connection>
+ <sender>itemUp</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemUpClicked()</slot>
+ </connection>
+ <connection>
+ <sender>itemDown</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemDownClicked()</slot>
+ </connection>
+ <connection>
+ <sender>itemColumn</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemColChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>itemText</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>itemDeletePixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemPixmapDeleted()</slot>
+ </connection>
+ <connection>
+ <sender>itemChoosePixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemPixmapChoosen()</slot>
+ </connection>
+ <connection>
+ <sender>colNew</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>newColumnClicked()</slot>
+ </connection>
+ <connection>
+ <sender>colDelete</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>deleteColumnClicked()</slot>
+ </connection>
+ <connection>
+ <sender>colUp</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>columnUpClicked()</slot>
+ </connection>
+ <connection>
+ <sender>colDown</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>columnDownClicked()</slot>
+ </connection>
+ <connection>
+ <sender>colText</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>columnTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>colDeletePixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>columnPixmapDeleted()</slot>
+ </connection>
+ <connection>
+ <sender>colChoosePixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>columnPixmapChosen()</slot>
+ </connection>
+ <connection>
+ <sender>colResizeable</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>columnResizable(bool)</slot>
+ </connection>
+ <connection>
+ <sender>colClickable</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>columnClickable(bool)</slot>
+ </connection>
+ <connection>
+ <sender>tabWidget</sender>
+ <signal>selected(const QString&amp;)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>initTabPage(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>okClicked()</slot>
+ </connection>
+ <connection>
+ <sender>applyButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>applyClicked()</slot>
+ </connection>
+ <connection>
+ <sender>colPreview</sender>
+ <signal>currentChanged(QListBoxItem*)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>currentColumnChanged(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>colPreview</sender>
+ <signal>selectionChanged(QListBoxItem*)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>currentColumnChanged(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>itemsPreview</sender>
+ <signal>currentChanged(QListViewItem*)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>currentItemChanged(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>itemsPreview</sender>
+ <signal>selectionChanged(QListViewItem*)</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>currentItemChanged(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>itemNewSub</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemNewSubClicked()</slot>
+ </connection>
+ <connection>
+ <sender>itemLeft</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemLeftClicked()</slot>
+ </connection>
+ <connection>
+ <sender>itemRight</sender>
+ <signal>clicked()</signal>
+ <receiver>ListViewEditorBase</receiver>
+ <slot>itemRightClicked()</slot>
+ </connection>
+ <slot access="protected" language="C++" returnType="void">init()</slot>
+ <slot access="protected" language="C++" returnType="void">destroy()</slot>
+ <slot access="protected" language="C++" returnType="void">applyClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">columnClickable(bool)</slot>
+ <slot access="protected" language="C++" returnType="void">columnDownClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">columnPixmapChosen()</slot>
+ <slot access="protected" language="C++" returnType="void">columnPixmapDeleted()</slot>
+ <slot access="protected" language="C++" returnType="void">columnResizable(bool)</slot>
+ <slot access="protected" language="C++" returnType="void">columnTextChanged(const QString &amp;)</slot>
+ <slot access="protected" language="C++" returnType="void">columnUpClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">currentColumnChanged(QListBoxItem*)</slot>
+ <slot access="protected" language="C++" returnType="void">currentItemChanged(QListViewItem*)</slot>
+ <slot access="protected" language="C++" returnType="void">deleteColumnClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">initTabPage(const QString &amp;)</slot>
+ <slot access="protected" language="C++" returnType="void">itemColChanged(int)</slot>
+ <slot access="protected" language="C++" returnType="void">itemDeleteClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">itemDownClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">itemLeftClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">itemNewClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">itemNewSubClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">itemPixmapChoosen()</slot>
+ <slot access="protected" language="C++" returnType="void">itemPixmapDeleted()</slot>
+ <slot access="protected" language="C++" returnType="void">itemTextChanged(const QString &amp;)</slot>
+ <slot access="protected" language="C++" returnType="void">itemUpClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">newColumnClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">itemRightClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">okClicked()</slot>
+</connections>
+<tabstops>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>itemsPreview</tabstop>
+ <tabstop>itemNew</tabstop>
+ <tabstop>itemNewSub</tabstop>
+ <tabstop>itemDelete</tabstop>
+ <tabstop>itemUp</tabstop>
+ <tabstop>itemDown</tabstop>
+ <tabstop>itemLeft</tabstop>
+ <tabstop>itemRight</tabstop>
+ <tabstop>itemColumn</tabstop>
+ <tabstop>itemText</tabstop>
+ <tabstop>itemDeletePixmap</tabstop>
+ <tabstop>itemChoosePixmap</tabstop>
+ <tabstop>helpButton</tabstop>
+ <tabstop>applyButton</tabstop>
+ <tabstop>colPreview</tabstop>
+ <tabstop>colNew</tabstop>
+ <tabstop>colDelete</tabstop>
+ <tabstop>colUp</tabstop>
+ <tabstop>colDown</tabstop>
+ <tabstop>colText</tabstop>
+ <tabstop>colDeletePixmap</tabstop>
+ <tabstop>colChoosePixmap</tabstop>
+ <tabstop>colClickable</tabstop>
+ <tabstop>colResizeable</tabstop>
+</tabstops>
+</UI>
diff --git a/kommander/editor/listvieweditorimpl.cpp b/kommander/editor/listvieweditorimpl.cpp
new file mode 100644
index 00000000..3f30106a
--- /dev/null
+++ b/kommander/editor/listvieweditorimpl.cpp
@@ -0,0 +1,585 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "listvieweditorimpl.h"
+#include "pixmapchooser.h"
+#include "command.h"
+
+#include <qlistview.h>
+#include <qheader.h>
+#include <qlistbox.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qtabwidget.h>
+#include <qspinbox.h>
+#include <qpushbutton.h>
+#include <qptrstack.h>
+
+#include <klocale.h>
+
+ListViewEditor::ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw )
+ : ListViewEditorBase( parent, 0, true ), listview( lv ), formwindow( fw )
+{
+ connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
+
+ setupColumns();
+ PopulateListViewCommand::transferItems( listview, itemsPreview );
+ setupItems();
+
+ itemsPreview->setShowSortIndicator( listview->showSortIndicator() );
+ itemsPreview->setAllColumnsShowFocus( listview->allColumnsShowFocus() );
+ itemsPreview->setRootIsDecorated( listview->rootIsDecorated() );
+
+ if ( itemsPreview->firstChild() ) {
+ itemsPreview->setCurrentItem( itemsPreview->firstChild() );
+ itemsPreview->setSelected( itemsPreview->firstChild(), true );
+ }
+}
+
+void ListViewEditor::applyClicked()
+{
+ setupItems();
+ PopulateListViewCommand *cmd = new PopulateListViewCommand( i18n("Edit Items and Columns of '%1'" ).arg( listview->name() ),
+ formwindow, listview, itemsPreview );
+ cmd->execute();
+ formwindow->commandHistory()->addCommand( cmd );
+}
+
+void ListViewEditor::okClicked()
+{
+ applyClicked();
+ accept();
+}
+
+
+
+void ListViewEditor::columnClickable( bool b )
+{
+ Column *c = findColumn( colPreview->item( colPreview->currentItem() ) );
+ if ( !c )
+ return;
+ c->clickable = b;
+}
+
+void ListViewEditor::columnDownClicked()
+{
+ if ( colPreview->currentItem() == -1 ||
+ colPreview->currentItem() > (int)colPreview->count() - 2 )
+ return;
+
+ colPreview->clearSelection();
+ QListBoxItem *i = colPreview->item( colPreview->currentItem() );
+ QListBoxItem *below = i->next();
+
+ colPreview->takeItem( i );
+ colPreview->insertItem( i, below );
+
+ colPreview->setCurrentItem( i );
+ colPreview->setSelected( i, true );
+}
+
+void ListViewEditor::columnPixmapChosen()
+{
+ Column *c = findColumn( colPreview->item( colPreview->currentItem() ) );
+ if ( !c )
+ return;
+
+ QPixmap pix;
+ if ( colPixmap->pixmap() )
+ pix = qChoosePixmap( this, formwindow, *colPixmap->pixmap() );
+ else
+ pix = qChoosePixmap( this, formwindow, QPixmap() );
+
+ if ( pix.isNull() )
+ return;
+
+ c->pixmap = pix;
+ colPreview->blockSignals( true );
+ if ( !c->pixmap.isNull() )
+ colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
+ else
+ colPreview->changeItem( c->text, colPreview->index( c->item ) );
+ c->item = colPreview->item( colPreview->currentItem() );
+ colPixmap->setPixmap( c->pixmap );
+ colPreview->blockSignals( false );
+ colDeletePixmap->setEnabled( true );
+}
+
+void ListViewEditor::columnPixmapDeleted()
+{
+ Column *c = findColumn( colPreview->item( colPreview->currentItem() ) );
+ if ( !c )
+ return;
+
+ c->pixmap = QPixmap();
+ colPreview->blockSignals( true );
+ if ( !c->pixmap.isNull() )
+ colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
+ else
+ colPreview->changeItem( c->text, colPreview->index( c->item ) );
+ c->item = colPreview->item( colPreview->currentItem() );
+ colPixmap->setText( "" );
+ colPreview->blockSignals( false );
+ colDeletePixmap->setEnabled( false );
+}
+
+void ListViewEditor::columnResizable( bool b )
+{
+ Column *c = findColumn( colPreview->item( colPreview->currentItem() ) );
+ if ( !c )
+ return;
+ c->resizable = b;
+}
+
+void ListViewEditor::columnTextChanged( const QString &txt )
+{
+ Column *c = findColumn( colPreview->item( colPreview->currentItem() ) );
+ if ( !c )
+ return;
+
+ c->text = txt;
+ colPreview->blockSignals( true );
+ if ( !c->pixmap.isNull() )
+ colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
+ else
+ colPreview->changeItem( c->text, colPreview->index( c->item ) );
+ c->item = colPreview->item( colPreview->currentItem() );
+ colPreview->blockSignals( false );
+}
+
+void ListViewEditor::columnUpClicked()
+{
+ if ( colPreview->currentItem() <= 0 )
+ return;
+
+ colPreview->clearSelection();
+ QListBoxItem *i = colPreview->item( colPreview->currentItem() );
+ QListBoxItem *above = i->prev();
+
+ colPreview->takeItem( above );
+ colPreview->insertItem( above, i );
+
+ colPreview->setCurrentItem( i );
+ colPreview->setSelected( i, true );
+}
+
+void ListViewEditor::currentColumnChanged( QListBoxItem *i )
+{
+ Column *c = findColumn( i );
+ if ( !i || !c ) {
+ colText->setEnabled( false );
+ colPixmap->setEnabled( false );
+ colDeletePixmap->setEnabled( false );
+ colText->blockSignals( true );
+ colText->setText( "" );
+ colText->blockSignals( false );
+ colClickable->setEnabled( false );
+ colResizeable->setEnabled( false );
+ return;
+ }
+
+ colText->setEnabled( true );
+ colPixmap->setEnabled( true );
+ colDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
+ colClickable->setEnabled( true );
+ colResizeable->setEnabled( true );
+
+ colText->blockSignals( true );
+ colText->setText( c->text );
+ colText->blockSignals( false );
+ if ( !c->pixmap.isNull() )
+ colPixmap->setPixmap( c->pixmap );
+ else
+ colPixmap->setText( "" );
+ colClickable->setChecked( c->clickable );
+ colResizeable->setChecked( c->resizable );
+}
+
+void ListViewEditor::newColumnClicked()
+{
+ Column col;
+ col.text = i18n("New Column" );
+ col.pixmap = QPixmap();
+ col.clickable = true;
+ col.resizable = true;
+ if ( !col.pixmap.isNull() )
+ col.item = new QListBoxPixmap( colPreview, col.pixmap, col.text );
+ else
+ col.item = new QListBoxText( colPreview, col.text );
+ columns.append( col );
+ colPreview->setCurrentItem( col.item );
+ colPreview->setSelected( col.item, true );
+}
+
+void ListViewEditor::deleteColumnClicked()
+{
+ QListBoxItem *i = colPreview->item( colPreview->currentItem() );
+ if ( !i )
+ return;
+
+ for ( QValueList<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
+ if ( ( *it ).item == i ) {
+ delete (*it).item;
+ columns.remove( it );
+ break;
+ }
+ }
+
+ if ( colPreview->currentItem() != -1 )
+ colPreview->setSelected( colPreview->currentItem(), true );
+}
+
+
+
+
+
+
+void ListViewEditor::currentItemChanged( QListViewItem *i )
+{
+ if ( !i ) {
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
+ return;
+ }
+
+ itemText->setEnabled( true );
+ itemChoosePixmap->setEnabled( true );
+ itemDeletePixmap->setEnabled( i->pixmap( itemColumn->value() ) &&
+ !i->pixmap( itemColumn->value() )->isNull() );
+ itemColumn->setEnabled( true );
+
+ displayItem( i, itemColumn->value() );
+}
+
+void ListViewEditor::displayItem( QListViewItem *i, int col )
+{
+ itemText->blockSignals( true );
+ itemText->setText( i->text( col ) );
+ itemText->blockSignals( false );
+
+ itemPixmap->blockSignals( true );
+ if ( i->pixmap( col ) )
+ itemPixmap->setPixmap( *i->pixmap( col ) );
+ else
+ itemPixmap->setText( "" );
+ itemPixmap->blockSignals( false );
+}
+
+void ListViewEditor::itemColChanged( int col )
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+
+ displayItem( i, col );
+ itemDeletePixmap->setEnabled( i->pixmap( col ) && !i->pixmap( col )->isNull() );
+}
+
+void ListViewEditor::itemDeleteClicked()
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+
+ delete i;
+ if ( itemsPreview->firstChild() ) {
+ itemsPreview->setCurrentItem( itemsPreview->firstChild() );
+ itemsPreview->setSelected( itemsPreview->firstChild(), true );
+ }
+}
+
+void ListViewEditor::itemDownClicked()
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+
+ QListViewItemIterator it( i );
+ QListViewItem *parent = i->parent();
+ it++;
+ while ( it.current() ) {
+ if ( it.current()->parent() == parent )
+ break;
+ it++;
+ }
+
+ if ( !it.current() )
+ return;
+ QListViewItem *other = it.current();
+
+ i->moveItem( other );
+}
+
+void ListViewEditor::itemNewClicked()
+{
+ QListViewItem *item = new QListViewItem( itemsPreview );
+ item->setText( 0, "Item" );
+ itemsPreview->setCurrentItem( item );
+ itemsPreview->setSelected( item, true );
+}
+
+void ListViewEditor::itemNewSubClicked()
+{
+ QListViewItem *parent = itemsPreview->currentItem();
+ QListViewItem *item = 0;
+ if ( parent ) {
+ item = new QListViewItem( parent );
+ parent->setOpen( true );
+ } else {
+ item = new QListViewItem( itemsPreview );
+ }
+ item->setText( 0, "Subitem" );
+ itemsPreview->setCurrentItem( item );
+ itemsPreview->setSelected( item, true );
+}
+
+void ListViewEditor::itemPixmapChoosen()
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+
+ QPixmap pix;
+ if ( itemPixmap->pixmap() )
+ pix = qChoosePixmap( this, formwindow, *itemPixmap->pixmap() );
+ else
+ pix = qChoosePixmap( this, formwindow, QPixmap() );
+
+ if ( pix.isNull() )
+ return;
+
+ i->setPixmap( itemColumn->value(), QPixmap( pix ) );
+ itemPixmap->setPixmap( pix );
+ itemDeletePixmap->setEnabled( true );
+}
+
+void ListViewEditor::itemPixmapDeleted()
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+
+ i->setPixmap( itemColumn->value(), QPixmap() );
+ itemPixmap->setText( "" );
+ itemDeletePixmap->setEnabled( false );
+}
+
+void ListViewEditor::itemTextChanged( const QString &txt )
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+ i->setText( itemColumn->value(), txt );
+}
+
+void ListViewEditor::itemUpClicked()
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+
+ QListViewItemIterator it( i );
+ QListViewItem *parent = i->parent();
+ --it;
+ while ( it.current() ) {
+ if ( it.current()->parent() == parent )
+ break;
+ --it;
+ }
+
+ if ( !it.current() )
+ return;
+ QListViewItem *other = it.current();
+
+ other->moveItem( i );
+}
+
+void ListViewEditor::itemRightClicked()
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+
+ QListViewItemIterator it( i );
+ QListViewItem *parent = i->parent();
+ parent = parent ? parent->firstChild() : itemsPreview->firstChild();
+ if ( !parent )
+ return;
+ it++;
+ while ( it.current() ) {
+ if ( it.current()->parent() == parent )
+ break;
+ it++;
+ }
+
+ if ( !it.current() )
+ return;
+ QListViewItem *other = it.current();
+
+ for ( int c = 0; c < itemsPreview->columns(); ++c ) {
+ QString s = i->text( c );
+ i->setText( c, other->text( c ) );
+ other->setText( c, s );
+ QPixmap pix;
+ if ( i->pixmap( c ) )
+ pix = *i->pixmap( c );
+ if ( other->pixmap( c ) )
+ i->setPixmap( c, *other->pixmap( c ) );
+ else
+ i->setPixmap( c, QPixmap() );
+ other->setPixmap( c, pix );
+ }
+
+ itemsPreview->setCurrentItem( other );
+ itemsPreview->setSelected( other, true );
+}
+
+void ListViewEditor::itemLeftClicked()
+{
+ QListViewItem *i = itemsPreview->currentItem();
+ if ( !i )
+ return;
+
+ QListViewItemIterator it( i );
+ QListViewItem *parent = i->parent();
+ if ( !parent )
+ return;
+ parent = parent->parent();
+ --it;
+ while ( it.current() ) {
+ if ( it.current()->parent() == parent )
+ break;
+ --it;
+ }
+
+ if ( !it.current() )
+ return;
+ QListViewItem *other = it.current();
+
+ for ( int c = 0; c < itemsPreview->columns(); ++c ) {
+ QString s = i->text( c );
+ i->setText( c, other->text( c ) );
+ other->setText( c, s );
+ QPixmap pix;
+ if ( i->pixmap( c ) )
+ pix = *i->pixmap( c );
+ if ( other->pixmap( c ) )
+ i->setPixmap( c, *other->pixmap( c ) );
+ else
+ i->setPixmap( c, QPixmap() );
+ other->setPixmap( c, pix );
+ }
+
+ itemsPreview->setCurrentItem( other );
+ itemsPreview->setSelected( other, true );
+}
+
+void ListViewEditor::setupColumns()
+{
+ QHeader *h = listview->header();
+ for ( int i = 0; i < (int)h->count(); ++i ) {
+ Column col;
+ col.text = h->label( i );
+ col.pixmap = QPixmap();
+ if ( h->iconSet( i ) )
+ col.pixmap = h->iconSet( i )->pixmap();
+ col.clickable = h->isClickEnabled( i );
+ col.resizable = h->isResizeEnabled( i );
+ if ( !col.pixmap.isNull() )
+ col.item = new QListBoxPixmap( colPreview, col.pixmap, col.text );
+ else
+ col.item = new QListBoxText( colPreview, col.text );
+ columns.append( col );
+ }
+
+ colText->setEnabled( false );
+ colPixmap->setEnabled( false );
+ colClickable->setEnabled( false );
+ colResizeable->setEnabled( false );
+
+ if ( colPreview->firstItem() )
+ colPreview->setCurrentItem( colPreview->firstItem() );
+ numColumns = colPreview->count();
+}
+
+void ListViewEditor::setupItems()
+{
+ itemColumn->setMinValue( 0 );
+ itemColumn->setMaxValue( QMAX( numColumns - 1, 0 ) );
+ int i = 0;
+ QHeader *header = itemsPreview->header();
+ for ( QListBoxItem *item = colPreview->firstItem(); item; item = item->next() ) {
+ Column *col = findColumn( item );
+ if ( !col )
+ continue;
+ if ( i >= itemsPreview->columns() )
+ itemsPreview->addColumn( col->text );
+ header->setLabel( i, col->pixmap, col->text );
+ header->setResizeEnabled( col->resizable, i );
+ header->setClickEnabled( col->clickable, i );
+ ++i;
+ }
+ while ( itemsPreview->columns() > i )
+ itemsPreview->removeColumn( i );
+
+ itemColumn->setValue( QMIN( numColumns - 1, itemColumn->value() ) );
+}
+
+ListViewEditor::Column *ListViewEditor::findColumn( QListBoxItem *i )
+{
+ if ( !i )
+ return 0;
+
+ for ( QValueList<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
+ if ( ( *it ).item == i )
+ return &( *it );
+ }
+
+ return 0;
+}
+
+void ListViewEditor::initTabPage( const QString &page )
+{
+ numColumns = colPreview->count();
+ if ( page == i18n("&Items" ) ) {
+ setupItems();
+ if ( numColumns == 0 ) {
+ itemNew->setEnabled( false );
+ itemNewSub->setEnabled( false );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
+ } else {
+ itemNew->setEnabled( true );
+ itemNewSub->setEnabled( true );
+ }
+ }
+}
+#include "listvieweditorimpl.moc"
diff --git a/kommander/editor/listvieweditorimpl.h b/kommander/editor/listvieweditorimpl.h
new file mode 100644
index 00000000..91da67c8
--- /dev/null
+++ b/kommander/editor/listvieweditorimpl.h
@@ -0,0 +1,94 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef LISTVIEWEDITORIMPL_H
+#define LISTVIEWEDITORIMPL_H
+
+#include "listvieweditor.h"
+
+#include <qmap.h>
+#include <qpixmap.h>
+#include <qvaluelist.h>
+
+class FormWindow;
+
+class ListViewEditor : public ListViewEditorBase
+{
+ Q_OBJECT
+
+public:
+ ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw );
+
+protected slots:
+ void applyClicked();
+ void columnClickable(bool);
+ void columnDownClicked();
+ void columnPixmapChosen();
+ void columnPixmapDeleted();
+ void columnResizable(bool);
+ void columnTextChanged(const QString &);
+ void columnUpClicked();
+ void currentColumnChanged(QListBoxItem*);
+ void currentItemChanged(QListViewItem*);
+ void deleteColumnClicked();
+ void itemColChanged(int);
+ void itemDeleteClicked();
+ void itemDownClicked();
+ void itemNewClicked();
+ void itemNewSubClicked();
+ void itemPixmapChoosen();
+ void itemPixmapDeleted();
+ void itemTextChanged(const QString &);
+ void itemUpClicked();
+ void itemLeftClicked();
+ void itemRightClicked();
+ void newColumnClicked();
+ void okClicked();
+ void initTabPage( const QString &page );
+
+private:
+ struct Column
+ {
+ QListBoxItem *item;
+ QString text;
+ QPixmap pixmap;
+ bool clickable, resizable;
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+ bool operator==( const Column& ) const { return FALSE; }
+#endif
+ };
+
+private:
+ void setupColumns();
+ void setupItems();
+ Column *findColumn( QListBoxItem *i );
+ void transferItems( QListView *from, QListView *to );
+ void displayItem( QListViewItem *i, int col );
+
+private:
+ QListView *listview;
+ QValueList<Column> columns;
+ int numColumns;
+ FormWindow *formwindow;
+
+};
+
+
+#endif
diff --git a/kommander/editor/main.cpp b/kommander/editor/main.cpp
new file mode 100644
index 00000000..7be1f31d
--- /dev/null
+++ b/kommander/editor/main.cpp
@@ -0,0 +1,81 @@
+/***************************************************************************
+ main.cpp - initialization
+ -------------------
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+// KDE includes
+#include <kaboutdata.h>
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kconfig.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <ksplashscreen.h>
+
+// Other includes
+#include "mainwindow.h"
+#include "kommanderwidget.h"
+#include "kommanderversion.h"
+
+static const char *description =
+ I18N_NOOP("Kommander is a graphical editor of scripted dialogs.");
+static const char *text =
+ I18N_NOOP("Based on Qt Designer, (C) 2000 Trolltech AS.");
+
+static KCmdLineOptions options[] =
+{
+ { "+file", I18N_NOOP("Dialog to open"), 0 },
+ { 0, 0, 0 }
+};
+
+int main( int argc, char *argv[] )
+{
+ KAboutData aboutData( "kommander", I18N_NOOP("Kommander"),
+ KOMMANDER_VERSION, description, KAboutData::License_GPL,
+ "(C) 2002-2005 Kommander authors", text);
+ aboutData.addAuthor("Eric Laffoon", I18N_NOOP("Project manager"), "eric@kdewebdev.org");
+ aboutData.addAuthor("Andras Mantia", I18N_NOOP("Current maintainer"), "amantia@kdewebdev.org");
+ aboutData.addAuthor("Michal Rudolf", I18N_NOOP("Previous maintainer"), "mrudolf@kdewebdev.org");
+ aboutData.addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au");
+ aboutData.setTranslator (I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"),
+ I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
+ KCmdLineArgs::init(argc, argv, &aboutData);
+ KCmdLineArgs::addCmdLineOptions(options);
+
+ KommanderWidget::inEditor = true;
+
+ KLocale::setMainCatalogue("kommander");
+ KApplication a(true, true);
+
+ KConfig *config = kapp->config();
+ config->setGroup("General");
+ bool splashScreen = config->readBoolEntry("SplashScreen", true);
+ KSplashScreen* splash = 0;
+ if (splashScreen) {
+ splash = new KSplashScreen(UserIcon("kommandersplash"));
+ splash->show();
+ }
+
+ MainWindow *mw = new MainWindow(false);
+ a.setMainWidget(mw);
+ mw->setCaption(i18n("Kommander Dialog Editor"));
+ mw->show();
+
+ if (splashScreen) {
+ splash->finish(mw);
+ delete splash;
+ }
+
+ return a.exec();
+}
+
diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp
new file mode 100644
index 00000000..a90a3b07
--- /dev/null
+++ b/kommander/editor/mainwindow.cpp
@@ -0,0 +1,1903 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+ (C) 2008 Andras Mantia <amantia@kde.org>
+
+**********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "actiondnd.h"
+#include "actioneditorimpl.h"
+#include "assoctexteditorimpl.h"
+#include "defs.h"
+#include "dialog.h"
+#include "formfile.h"
+#include "formwindow.h"
+#include "globaldefs.h"
+#include "hierarchyview.h"
+#include "kommanderfactory.h"
+#include "mainwindow.h"
+#include "messagelog.h"
+#include "metadatabase.h"
+#include "multilineeditorimpl.h"
+#include "newformimpl.h"
+#include "pixmapchooser.h"
+#include "propertyeditor.h"
+#include "resource.h"
+#include "specialinformation.h"
+#include "widgetdatabase.h"
+#include "widgetfactory.h"
+#include "wizardeditorimpl.h"
+#include "workspace.h"
+
+#include <qaccel.h>
+#include <qbuffer.h>
+#include <qclipboard.h>
+#include <qdir.h>
+#include <qfeatures.h>
+#include <qfile.h>
+#include <qlabel.h>
+#include <qmetaobject.h>
+#include <qpixmap.h>
+#include <qregexp.h>
+#include <qstylefactory.h>
+#include <qstyle.h>
+#include <qtimer.h>
+#include <qtooltip.h>
+#include <qvbox.h>
+#include <qwhatsthis.h>
+#include <qwidget.h>
+#include <qwizard.h>
+#include <qworkspace.h>
+
+
+#include "qcompletionedit.h"
+#include "assistproc.h"
+
+#include <kdebug.h>
+#include <kaction.h>
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kconfig.h>
+#include <kinputdialog.h>
+#include <klocale.h>
+#include <kmenubar.h>
+#include <kmessagebox.h>
+#include <kommanderversion.h>
+#include <kommanderwidget.h>
+#include <kprocess.h>
+#include <kstatusbar.h>
+#include <ktoolbar.h>
+#include <kurl.h>
+#include <kparts/partmanager.h>
+#include <kio/netaccess.h>
+
+extern QMap<QWidget*, QString> *qwf_functions;
+extern QMap<QWidget*, QString> *qwf_forms;
+extern QString *qwf_language;
+extern bool qwf_execute_code;
+extern bool qwf_stays_on_top;
+extern void set_splash_status(const QString &txt);
+/*### static bool tbSettingsRead = false; */
+
+MainWindow *MainWindow::self = 0;
+
+QString assistantPath()
+{
+ return "assistant";
+}
+
+
+static QString textNoAccel(const QString& text)
+{
+ QString t = text;
+ int i;
+ while ((i = t.find('&'))>= 0) {
+ t.remove(i,1);
+ }
+ return t;
+}
+
+
+MainWindow::MainWindow(bool asClient)
+ : KParts::DockMainWindow(0, "mainwindow", WType_TopLevel | WDestructiveClose | WGroupLeader),
+ grd(10, 10), sGrid(true), snGrid(true), restoreConfig(true), splashScreen(true),
+ docPath("$QTDIR/doc/html"), client(asClient), databaseAutoEdit(false), previewing(false)
+{
+ m_partManager = new KParts::PartManager(this);
+ //connect(m_partManager, SIGNAL(activePartChanged(KParts::Part * )), this, SLOT(slotActivePartChanged(KParts::Part * )));
+
+ init_colors();
+ inDebugMode = true; //debugging kommander
+
+ setupPlugins();
+
+ kapp->setMainWidget(this);
+ self = this;
+
+ prefDia = 0;
+ windowMenu = 0;
+ hierarchyView = 0;
+ actionEditor = 0;
+ wspace = 0;
+
+ statusBar()->clear();
+ statusBar()->addWidget(new QLabel(i18n("Welcome to the Kommander Editor"), statusBar()), 1);
+
+ setupMDI();
+ setupFileActions();
+ setupEditActions();
+ layoutToolBar = new KToolBar(this, "Layout");
+ ((KToolBar *) layoutToolBar)->setFullSize(false);
+ addToolBar(layoutToolBar, i18n("Layout"));
+ setupToolActions();
+ setupLayoutActions();
+ setupWorkspace();
+ setupHierarchyView();
+ setupPropertyEditor();
+ setupActionEditor();
+ setupMessageLog();
+ setupRunActions();
+ setupWindowActions();
+ setupSettingsActions();
+ setupHelpActions();
+ setupRMBMenus();
+
+ emit hasActiveForm(false);
+ emit hasActiveWindow(false);
+
+ lastPressWidget = 0;
+ kapp->installEventFilter(this);
+
+ QSize as(kapp->desktop()->size());
+ as -= QSize(30, 30);
+ resize(QSize(1200, 1000).boundedTo(as));
+
+ connect(kapp->clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+ clipboardChanged();
+ layoutChilds = false;
+ layoutSelected = false;
+ breakLayout = false;
+ backPix = true;
+
+ readConfig();
+
+ // hack to make WidgetFactory happy (so it knows QWidget and QDialog for resetting properties)
+ QWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("QWidget"), this, 0, false);
+ delete w;
+ w = WidgetFactory::create(WidgetDatabase::idFromClassName("Dialog"), this, 0, false);
+
+ delete w;
+ w = WidgetFactory::create(WidgetDatabase::idFromClassName("QLabel"), this, 0, false);
+ delete w;
+ w = WidgetFactory::create(WidgetDatabase::idFromClassName("QTabWidget"), this, 0, false);
+ delete w;
+ w = WidgetFactory::create(WidgetDatabase::idFromClassName("QFrame"), this, 0, false);
+ delete w;
+
+ assistant = new AssistProc(this, "Internal Assistant", assistantPath());
+ statusBar()->setSizeGripEnabled(true);
+ SpecialInformation::registerSpecials();
+
+ backupTimer = new QTimer(this);
+ connect(backupTimer, SIGNAL(timeout()), this, SLOT(slotCreateBackups()));
+ backupTimer->start(1000*60*5); //fire it every five minutes
+ //createGUI(0);
+
+}
+
+MainWindow::~MainWindow()
+{
+ MetaDataBase::clearDataBase();
+}
+
+void MainWindow::setupMDI()
+{
+ KDockWidget* toolDock = createDockWidget("Workspace", QPixmap(), 0L, "main_workspace");
+ QVBox *vbox = new QVBox(toolDock);
+ vbox->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ vbox->setMargin(1);
+ vbox->setLineWidth(1);
+
+ toolDock->setWidget(vbox);
+ toolDock->setDockSite(KDockWidget::DockCorner);
+ toolDock->setEnableDocking(KDockWidget::DockNone);
+ setView(toolDock);
+ setMainDockWidget(toolDock);
+
+ qworkspace = new QWorkspace(vbox);
+ qworkspace->setBackgroundMode(PaletteDark);
+ qworkspace->setBackgroundPixmap(PixmapChooser::loadPixmap("background.png",
+ PixmapChooser::NoSize));
+ qworkspace->setPaletteBackgroundColor(QColor(238, 238, 238));
+ qworkspace->setScrollBarsEnabled(true);
+ connect(qworkspace, SIGNAL(windowActivated(QWidget *)),
+ this, SLOT(activeWindowChanged(QWidget *)));
+ lastActiveFormWindow = 0;
+ qworkspace->setAcceptDrops(true);
+}
+
+void MainWindow::setupPropertyEditor()
+{
+ KDockWidget *dw = createDockWidget("Property Editor", QPixmap(), 0, i18n("Properties"));
+ propertyEditor = new PropertyEditor(dw);
+ //addToolBar(dw, Qt::DockLeft);
+ dw->setWidget(propertyEditor);
+ dw->manualDock(getMainDockWidget(), KDockWidget::DockLeft, 20);
+ dw->setCaption(i18n("Property Editor"));
+ QWhatsThis::add(propertyEditor,
+ i18n("<h2>The Property Editor</h2>"
+ "<p>You can change the appearance and behavior of the selected widget in the "
+ "property editor.</p>"
+ "<p>You can set properties for components and forms at design time and see the "
+ "immediately see the effects of the changes. "
+ "Each property has its own editor which (depending on the property) can be used "
+ "to enter "
+ "new values, open a special dialog, or to select values from a predefined list. "
+ "Click <b>F1</b> to get detailed help for the selected property.</p>"
+ "<p>You can resize the columns of the editor by dragging the separators in the "
+ "list's header.</p>"
+ "<p><b>Signal Handlers</b></p>"
+ "<p>In the Signal Handlers tab you can define connections between "
+ "the signals emitted by widgets and the slots in the form. "
+ "(These connections can also be made using the connection tool.)"));
+
+}
+
+
+void MainWindow::setupHierarchyView()
+{
+ if (hierarchyView)
+ return;
+ KDockWidget *dw = createDockWidget("Object Explorer", QPixmap(), 0, i18n("Widgets"));
+ hierarchyView = new HierarchyView(dw);
+ dw->setWidget(hierarchyView);
+ dw->setCaption(i18n("Object Explorer"));
+ QWhatsThis::add(hierarchyView,
+ i18n("<h2>The Object Explorer</h2>"
+ "<p>The Object Explorer provides an overview of the relationships "
+ "between the widgets in a form. You can use the clipboard functions using "
+ "a context menu for each item in the view. It is also useful for selecting widgets "
+ "in forms that have complex layouts.</p>"
+ "<p>The columns can be resized by dragging the separator in the list's header.</p>"
+ "<p>The second tab shows all the form's slots, class variables, includes, etc.</p>"));
+}
+
+void MainWindow::setupWorkspace()
+{
+ KDockWidget *dw = createDockWidget("Dialogs", QPixmap(), 0, i18n("Dialogs"));
+ QVBox *vbox = new QVBox(dw);
+ QCompletionEdit *edit = new QCompletionEdit(vbox);
+ QToolTip::add(edit, i18n("Start typing the buffer you want to switch to here (ALT+B)"));
+ QAccel *a = new QAccel(this);
+ a->connectItem(a->insertItem(ALT + Key_B), edit, SLOT(setFocus()));
+ wspace = new Workspace(vbox, this);
+ wspace->setBufferEdit(edit);
+ dw->setWidget(vbox);
+ dw->setCaption(i18n("Dialogs"));
+ QWhatsThis::add(wspace, i18n("<h2>The File Overview Window</h2>"
+ "<p>The File Overview Window displays all open dialogs.</p>"));
+
+}
+
+void MainWindow::setupActionEditor()
+{
+ KDockWidget *dw = createDockWidget("Action Editor", QPixmap(), 0, i18n("Actions"));
+ actionEditor = new ActionEditor(dw, "ActionEditor");
+ //addToolBar(dw, Qt::DockLeft);
+ dw->setWidget(actionEditor);
+ dw->setCaption(i18n("Action Editor"));
+ QWhatsThis::add(actionEditor, i18n("<b>The Action Editor</b>"
+ "<p>The Action Editor is used to add actions and action groups to "
+ "a form, and to connect actions to slots. Actions and action "
+ "groups can be dragged into menus and into toolbars, and may "
+ "feature keyboard shortcuts and tooltips. If actions have pixmaps "
+ "these are displayed on toolbar buttons and beside their names in " "menus.</p>"));
+}
+
+void MainWindow::setupMessageLog()
+{
+ KDockWidget *dw = createDockWidget("Message Log", QPixmap(), 0, i18n("Message Log"));
+ messageLog = new MessageLog(dw, "MessageLog");
+ dw->setWidget(messageLog);
+ dw->setCaption(i18n("Message Log"));
+ dw->manualDock(getMainDockWidget(), KDockWidget::DockBottom, 20);
+}
+
+void MainWindow::setupRMBMenus()
+{
+ rmbWidgets = new QPopupMenu(this);
+ actionEditCut->plug(rmbWidgets);
+ actionEditCopy->plug(rmbWidgets);
+ actionEditPaste->plug(rmbWidgets);
+ actionEditDelete->plug(rmbWidgets);
+
+ rmbWidgets->insertSeparator();
+ actionEditAdjustSize->plug(rmbWidgets);
+ actionEditHLayout->plug(rmbWidgets);
+ actionEditVLayout->plug(rmbWidgets);
+ actionEditGridLayout->plug(rmbWidgets);
+ actionEditSplitHorizontal->plug(rmbWidgets);
+ actionEditSplitVertical->plug(rmbWidgets);
+ actionEditBreakLayout->plug(rmbWidgets);
+ rmbWidgets->insertSeparator();
+ actionEditConnections->plug(rmbWidgets);
+ rmbFormWindow = new QPopupMenu(this);
+ actionEditPaste->plug(rmbFormWindow);
+ actionEditSelectAll->plug(rmbFormWindow);
+ actionEditAccels->plug(rmbFormWindow);
+ rmbFormWindow->insertSeparator();
+ actionEditAdjustSize->plug(rmbFormWindow);
+ actionEditHLayout->plug(rmbFormWindow);
+ actionEditVLayout->plug(rmbFormWindow);
+ actionEditGridLayout->plug(rmbFormWindow);
+ actionEditBreakLayout->plug(rmbFormWindow);
+ rmbFormWindow->insertSeparator();
+ actionEditConnections->plug(rmbFormWindow);
+ rmbFormWindow->insertSeparator();
+ actionEditFormSettings->plug(rmbFormWindow);
+}
+
+void MainWindow::toolSelected()
+{
+ if (!(sender())->inherits("KAction"))
+ return;
+ actionCurrentTool = (KAction*)sender();
+ emit currentToolChanged();
+ if (formWindow())
+ formWindow()->commandHistory()->emitUndoRedo();
+}
+
+int MainWindow::currentTool() const
+{
+ if (!actionCurrentTool)
+ return POINTER_TOOL;
+ return QString::fromLatin1(actionCurrentTool->name()).toInt();
+}
+
+void MainWindow::slotCreateBackups()
+{
+//create a backup of the opened forms
+ QWidgetList windows = qworkspace->windowList(QWorkspace::StackingOrder);
+ for (int i = 0; i < (int)windows.count(); ++i)
+ {
+ FormWindow* form = dynamic_cast<FormWindow*>(windows.at(i));
+ if (!form || !form->formFile())
+ continue;
+ QString fileName = form->formFile()->fileName();
+ QString backupName = fileName + ".backup";
+ bool modified = form->formFile()->isModified();
+ if (form->formFile()->hasTempFileName())
+ continue; //no need to create a backup
+ if (!modified)
+ continue;
+
+ form->formFile()->setFileName(backupName);
+ form->formFile()->setModified(true);
+ if (!form->formFile()->save(false))
+ {
+ KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(backupName));
+ }
+ form->formFile()->setFileName(fileName);
+ form->formFile()->setModified(modified);
+ }
+}
+
+void MainWindow::runForm()
+{
+ if (previewing)
+ {
+ KMessageBox::information(this, i18n("There is a dialog already running."), i18n("Run"));
+ return;
+ }
+ FormWindow* form = activeForm();
+ if (!form || !form->formFile())
+ return;
+
+ QObjectList *editors = queryList("AssocTextEditor");
+ QObjectListIt it(*editors);
+ QObject *editor;
+
+ while ((editor = it.current()) != 0L)
+ {
+ ++it;
+ static_cast<AssocTextEditor*>(editor)->save();
+ }
+ delete editors;
+
+ if (form->formFile()->hasTempFileName())
+ {
+ if (!form->formFile()->saveAs())
+ return;
+ }
+
+ m_fileName = form->formFile()->fileName();
+ m_backupName = m_fileName + ".running";
+ m_modified = form->formFile()->isModified();
+
+ bool readOnlyFile = !QFileInfo(m_fileName).isWritable();
+ struct stat statbuf;
+ ::stat(m_fileName.local8Bit(), &statbuf);
+ if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
+ {
+ KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").arg(m_backupName));
+ return;
+ }
+ form->formFile()->setFileName(m_fileName);
+ if (!readOnlyFile || m_modified)
+ form->formFile()->setModified(true);
+ if (form->formFile()->save(false))
+ {
+ if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true))
+ {
+ KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(m_fileName + ".backup"));
+ }
+ ::chmod(m_fileName.local8Bit(), S_IRWXU);
+ KProcess* process = new KProcess;
+ process->setUseShell(true);
+ (*process) << "kmdr-executor" << QString("\"%1\"").arg(form->formFile()->fileName());
+ connect(process, SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
+ SLOT(receivedStdout(KProcess*, char*, int)));
+ connect(process, SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
+ SLOT(receivedStderr(KProcess*, char*, int)));
+ connect(process, SIGNAL(processExited(KProcess*)), SLOT(closeRunningForm(KProcess*)));
+ messageLog->clear(MessageLog::All);
+ previewing = process->start(KProcess::NotifyOnExit, KProcess::AllOutput);
+ }
+}
+
+
+void MainWindow::runForm4()
+{
+ if (previewing)
+ {
+ KMessageBox::information(this, i18n("There is a dialog already running."), i18n("Run"));
+ return;
+ }
+ FormWindow* form = activeForm();
+ if (!form || !form->formFile())
+ return;
+
+ QObjectList *editors = queryList("AssocTextEditor");
+ QObjectListIt it(*editors);
+ QObject *editor;
+
+ while ((editor = it.current()) != 0L)
+ {
+ ++it;
+ static_cast<AssocTextEditor*>(editor)->save();
+ }
+ delete editors;
+
+ if (form->formFile()->hasTempFileName())
+ {
+ if (!form->formFile()->saveAs())
+ return;
+ }
+
+ m_fileName = form->formFile()->fileName();
+ m_backupName = m_fileName + ".running";
+ m_modified = form->formFile()->isModified();
+
+ bool readOnlyFile = !QFileInfo(m_fileName).isWritable();
+ struct stat statbuf;
+ ::stat(m_fileName.local8Bit(), &statbuf);
+ if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
+ {
+ KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").arg(m_backupName));
+ return;
+ }
+ form->formFile()->setFileName(m_fileName);
+ if (!readOnlyFile || m_modified)
+ form->formFile()->setModified(true);
+ if (form->formFile()->save(false))
+ {
+ if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true))
+ {
+ KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(m_fileName + ".backup"));
+ }
+ ::chmod(m_fileName.local8Bit(), S_IRWXU);
+ KProcess* process = new KProcess;
+ process->setUseShell(true);
+ (*process) << "kommander" << QString("\"%1\"").arg(form->formFile()->fileName());
+ connect(process, SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
+ SLOT(receivedStdout(KProcess*, char*, int)));
+ connect(process, SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
+ SLOT(receivedStderr(KProcess*, char*, int)));
+ connect(process, SIGNAL(processExited(KProcess*)), SLOT(closeRunningForm(KProcess*)));
+ messageLog->clear(MessageLog::All);
+ previewing = process->start(KProcess::NotifyOnExit, KProcess::AllOutput);
+ }
+}
+
+
+void MainWindow::closeRunningForm(KProcess* process)
+{
+ previewing = false;
+ delete process;
+
+ if (QFileInfo(m_backupName).exists())
+ {
+ struct stat statbuf;
+ ::stat(m_fileName.local8Bit(), &statbuf);
+ FormWindow* form = activeForm();
+ KIO::NetAccess::file_move(KURL::fromPathOrURL(m_backupName), KURL::fromPathOrURL(m_fileName), statbuf.st_mode, true);
+ form->formFile()->setModified(m_modified);
+ }
+}
+
+void MainWindow::showProperties(QObject *o)
+{
+ if (!o->isWidgetType()) {
+ propertyEditor->setWidget(o, lastActiveFormWindow);
+ if (lastActiveFormWindow)
+ hierarchyView->setFormWindow(lastActiveFormWindow, lastActiveFormWindow->mainContainer());
+ else
+ hierarchyView->setFormWindow(0, 0);
+ return;
+ }
+ QWidget *w = (QWidget*)o;
+ setupHierarchyView();
+ FormWindow *fw = (FormWindow*)isAFormWindowChild(w);
+ if (fw) {
+ propertyEditor->setWidget(w, fw);
+ hierarchyView->setFormWindow(fw, w);
+ } else {
+ propertyEditor->setWidget(0, 0);
+ hierarchyView->setFormWindow(0, 0);
+ }
+
+ if (currentTool() == POINTER_TOOL && fw &&
+ (!qworkspace->activeWindow() || !qworkspace->activeWindow()->inherits("SourceEditor")))
+ fw->setFocus();
+}
+
+void MainWindow::resetTool()
+{
+ actionPointerTool->setChecked(true);
+ actionCurrentTool = actionPointerTool;
+ emit currentToolChanged();
+}
+
+void MainWindow::updateProperties(QObject *)
+{
+ if (propertyEditor)
+ propertyEditor->refetchData();
+}
+
+bool MainWindow::eventFilter(QObject *o, QEvent *e)
+{
+ if (!o || !e || !o->isWidgetType())
+ return QMainWindow::eventFilter(o, e);
+
+ QWidget *w = 0;
+ bool passiveInteractor = WidgetFactory::isPassiveInteractor(o);
+ switch (e->type()) {
+ case QEvent::AccelOverride:
+ if (((QKeyEvent*)e)->key() == Key_F1 &&
+ (((QKeyEvent*)e)->state() & ShiftButton) != ShiftButton) {
+ w = (QWidget*)o;
+ while (w) {
+ if (w->inherits("PropertyList"))
+ break;
+ w = w->parentWidget(true);
+ }
+ if (w) {
+ propertyEditor->propertyList()->showCurrentWhatsThis();
+ ((QKeyEvent*)e)->accept();
+ return true;
+ }
+ }
+ break;
+ case QEvent::Accel:
+ if ((((QKeyEvent*)e)->key() == Key_A ||
+ ((QKeyEvent*)e)->key() == Key_E) &&
+ ((QKeyEvent*)e)->state() & ControlButton) {
+ if (qWorkspace()->activeWindow() &&
+ qWorkspace()->activeWindow()->inherits("SourceEditor")) {
+ ((QKeyEvent*)e)->ignore();
+ return true;
+ }
+ }
+ break;
+ case QEvent::MouseButtonPress:
+ if (((QMouseEvent*)e)->button() == MidButton && dynamic_cast<KommanderWidget *>(o))
+ {
+ AssocTextEditor *editor = new AssocTextEditor((QWidget*)o, formWindow(), propertyEditor, m_partManager,
+ this, "AssocTextEditor", false); //deletes itself!
+ editor->show();
+ ((QKeyEvent*)e)->accept();
+ return true;
+ }
+ case QEvent::ContextMenu:
+ if (o->inherits("QDesignerPopupMenu"))
+ break;
+ if (o && currentTool() == POINTER_TOOL && (o->inherits("QDesignerMenuBar") ||
+ o->inherits("QDesignerToolBar") ||
+ (o->inherits("QComboBox") || o->inherits("QToolButton") || o->inherits("QDesignerToolBarSeparator")) &&
+ o->parent() && o->parent()->inherits("QDesignerToolBar"))) {
+ QWidget *w = (QWidget*)o;
+ if (w->inherits("QToolButton") || w->inherits("QComboBox") || w->inherits("QDesignerToolBarSeparator"))
+ w = w->parentWidget();
+ QWidget *pw = w->parentWidget();
+ while (pw) {
+ if (pw->inherits("FormWindow")) {
+ ((FormWindow*)pw)->emitShowProperties(w);
+ if (!o->inherits("QDesignerToolBar"))
+ return !o->inherits("QToolButton") && !o->inherits("QMenuBar") &&
+ !o->inherits("QComboBox") && !o->inherits("QDesignerToolBarSeparator");
+ }
+ pw = pw->parentWidget();
+ }
+ }
+ if (o && (o->inherits("QDesignerToolBar") || o->inherits("QDockWindowHandle"))
+ && e->type() == QEvent::ContextMenu)
+ break;
+ if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
+ break;
+ if (o && o->inherits("QSizeGrip"))
+ break;
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
+ break;
+ if (!w->hasFocus())
+ w->setFocus();
+ if (!passiveInteractor || currentTool() != ORDER_TOOL) {
+ if(e->type() == QEvent::ContextMenu) {
+ ((FormWindow*)w)->handleContextMenu((QContextMenuEvent*)e,
+ ((FormWindow*)w)->designerWidget(o));
+ return true;
+ } else {
+ ((FormWindow*)w)->handleMousePress((QMouseEvent*)e,
+ ((FormWindow*)w)->designerWidget(o));
+ }
+ }
+ lastPressWidget = (QWidget*)o;
+ if (passiveInteractor)
+ QTimer::singleShot(0, formWindow(), SLOT(visibilityChanged()));
+ if (currentTool() == CONNECT_TOOL)
+ return true;
+ return !passiveInteractor;
+ case QEvent::MouseButtonRelease:
+ lastPressWidget = 0;
+ if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
+ break;
+ if (o && o->inherits("QSizeGrip"))
+ break;
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
+ break;
+ if (!passiveInteractor)
+ ((FormWindow*)w)->handleMouseRelease((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o));
+ if (passiveInteractor) {
+ selectionChanged();
+ QTimer::singleShot(0, formWindow(), SLOT(visibilityChanged()));
+ }
+ return !passiveInteractor;
+ case QEvent::MouseMove:
+ if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
+ break;
+ w = isAFormWindowChild(o);
+ if (lastPressWidget != (QWidget*)o && w &&
+ !o->inherits("SizeHandle") && !o->inherits("OrderIndicator") &&
+ !o->inherits("QPopupMenu") && !o->inherits("QMenuBar") &&
+ !o->inherits("QSizeGrip"))
+ return true;
+ if (o && o->inherits("QSizeGrip"))
+ break;
+ if (lastPressWidget != (QWidget*)o ||
+ (!w || o->inherits("SizeHandle") || o->inherits("OrderIndicator")))
+ break;
+ if (!passiveInteractor)
+ ((FormWindow*)w)->handleMouseMove((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o));
+ return !passiveInteractor;
+ case QEvent::KeyPress:
+ if (((QKeyEvent*)e)->key() == Key_Escape && currentTool() != POINTER_TOOL) {
+ resetTool();
+ return false;
+ }
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
+ break;
+ ((FormWindow*)w)->handleKeyPress((QKeyEvent*)e, ((FormWindow*)w)->designerWidget(o));
+ if (((QKeyEvent*)e)->isAccepted())
+ return true;
+ break;
+ case QEvent::MouseButtonDblClick:
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) {
+ if (o && o->inherits("QToolButton") && ((QToolButton*)o)->isOn() &&
+ o->parent() && o->parent()->inherits("QToolBar") && formWindow())
+ formWindow()->setToolFixed();
+ break;
+ }
+ if (currentTool() == ORDER_TOOL) {
+ ((FormWindow*)w)->handleMouseDblClick((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o));
+ return true;
+ }
+ if (!WidgetFactory::isPassiveInteractor(o))
+ return openEditor(((FormWindow*)w)->designerWidget(o), (FormWindow*)w);
+ return true;
+ case QEvent::KeyRelease:
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
+ break;
+ ((FormWindow*)w)->handleKeyRelease((QKeyEvent*)e, ((FormWindow*)w)->designerWidget(o));
+ if (((QKeyEvent*)e)->isAccepted())
+ return true;
+ break;
+ case QEvent::Hide:
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
+ break;
+ if (((FormWindow*)w)->isWidgetSelected((QWidget*)o))
+ ((FormWindow*)w)->selectWidget((QWidget*)o, false);
+ break;
+ case QEvent::Enter:
+ case QEvent::Leave:
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("QDesignerMenuBar"))
+ break;
+ return true;
+ case QEvent::Resize:
+ case QEvent::Move:
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
+ break;
+ if (WidgetFactory::layoutType((QWidget*)o->parent()) != WidgetFactory::NoLayout) {
+ ((FormWindow*)w)->updateSelection((QWidget*)o);
+ if (e->type() != QEvent::Resize)
+ ((FormWindow*)w)->updateChildSelections((QWidget*)o);
+ }
+ break;
+ case QEvent::Close:
+ break;
+ case QEvent::DragEnter:
+ if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ workspace()->contentsDragEnterEvent((QDragEnterEvent*)e);
+ return true;
+ }
+ break;
+ case QEvent::DragMove:
+ if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ workspace()->contentsDragMoveEvent((QDragMoveEvent*)e);
+ return true;
+ }
+ break;
+ case QEvent::Drop:
+ if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ workspace()->contentsDropEvent((QDropEvent*)e);
+ return true;
+ }
+ break;
+ case QEvent::Show:
+ if (o != this)
+ break;
+ if (((QShowEvent*)e)->spontaneous())
+ break;
+ QApplication::sendPostedEvents(qworkspace, QEvent::ChildInserted);
+ showEvent((QShowEvent*)e);
+ checkTempFiles();
+ return true;
+ case QEvent::Wheel:
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
+ break;
+ return true;
+ case QEvent::FocusIn:
+ if (!o->inherits("FormWindow") && isAFormWindowChild(o))
+ return true;
+ break;
+ case QEvent::FocusOut:
+ if (!o->inherits("FormWindow") && isAFormWindowChild(o))
+ return true;
+ break;
+ default:
+ return QMainWindow::eventFilter(o, e);
+ }
+
+ return QMainWindow::eventFilter(o, e);
+}
+
+QWidget *MainWindow::isAFormWindowChild(QObject *o) const
+{
+ if (o->parent() && o->parent()->inherits("QWizard") && !o->inherits("QPushButton"))
+ return 0;
+ while (o) {
+ if (o->inherits("FormWindow"))
+ return (QWidget*)o;
+ o = o->parent();
+ }
+ return 0;
+}
+
+QWidget *MainWindow::isAToolBarChild(QObject *o) const
+{
+ while (o) {
+ if (o->inherits("QDesignerToolBar"))
+ return (QWidget*)o;
+ if (o->inherits("FormWindow"))
+ return 0;
+ o = o->parent();
+ }
+ return 0;
+}
+
+FormWindow *MainWindow::formWindow()
+{
+ if (qworkspace->activeWindow()) {
+ FormWindow *fw = 0;
+ if (qworkspace->activeWindow()->inherits("FormWindow"))
+ fw = (FormWindow*)qworkspace->activeWindow();
+ else if (lastActiveFormWindow &&
+ qworkspace->windowList().find(lastActiveFormWindow) != -1)
+ fw = lastActiveFormWindow;
+ return fw;
+ }
+ return 0;
+}
+
+void MainWindow::insertFormWindow(FormWindow *fw)
+{
+ if (fw)
+ QWhatsThis::add(fw, i18n("<b>The Form Window</b>"
+ "<p>Use the various tools to add widgets or to change the layout "
+ "and behavior of the components in the form. Select one or multiple "
+ "widgets to move them or lay them out. If a single widget is chosen it can "
+ "be resized using the resize handles.</p>"
+ "<p>Changes in the <b>Property Editor</b> are visible at design time, "
+ "and you can preview the form in different styles.</p>"
+ "<p>You can change the grid resolution, or turn the grid off in the "
+ "<b>Preferences</b> dialog from the <b>Edit</b> menu."
+ "<p>You can have several forms open, and all open forms are listed "
+ "in the <b>Form List</b>."));
+
+ connect(fw, SIGNAL(showProperties(QObject *)),
+ this, SLOT(showProperties(QObject *)));
+ connect(fw, SIGNAL(updateProperties(QObject *)),
+ this, SLOT(updateProperties(QObject *)));
+ connect(this, SIGNAL(currentToolChanged()),
+ fw, SLOT(currentToolChanged()));
+ connect(fw, SIGNAL(selectionChanged()),
+ this, SLOT(selectionChanged()));
+ connect(fw, SIGNAL(undoRedoChanged(bool, bool, const QString &, const QString &)),
+ this, SLOT(updateUndoRedo(bool, bool, const QString &, const QString &)));
+
+ fw->show();
+ fw->currentToolChanged();
+ if (fw->caption().isEmpty() && qstrlen(fw->name()) )
+ fw->setCaption(fw->name());
+ fw->mainContainer()->setCaption(fw->caption());
+ WidgetFactory::saveDefaultProperties(fw->mainContainer(),
+ WidgetDatabase::
+ idFromClassName(WidgetFactory::classNameOf(fw->mainContainer())));
+ activeWindowChanged(fw);
+ emit formWindowsChanged();
+}
+
+
+
+bool MainWindow::unregisterClient(FormWindow *w)
+{
+ propertyEditor->closed(w);
+ objectHierarchy()->closed(w);
+ if (w == lastActiveFormWindow)
+ lastActiveFormWindow = 0;
+
+ if (actionEditor->form() == w)
+ actionEditor->setFormWindow(0);
+
+ return true;
+}
+
+void MainWindow::activeWindowChanged(QWidget *w)
+{
+ QWidget *old = formWindow();
+ if (w && w->inherits("FormWindow"))
+ {
+ FormWindow *fw = (FormWindow *) w;
+ lastActiveFormWindow = fw;
+ lastActiveFormWindow->updateUndoInfo();
+ emit hasActiveForm(true);
+ if (formWindow())
+ {
+ formWindow()->emitShowProperties();
+ emit formModified(formWindow()->commandHistory()->isModified());
+ if (currentTool() != POINTER_TOOL)
+ formWindow()->clearSelection();
+ }
+ workspace()->activeFormChanged(fw);
+ actionEditor->setFormWindow(lastActiveFormWindow);
+ emit formWindowChanged();
+
+ } else if (w == propertyEditor)
+ {
+ propertyEditor->resetFocus();
+ } else if (!lastActiveFormWindow)
+ {
+ emit formWindowChanged();
+ emit hasActiveForm(false);
+ actionEditUndo->setEnabled(false);
+ actionEditRedo->setEnabled(false);
+ }
+
+ if (!w)
+ {
+ emit formWindowChanged();
+ emit hasActiveForm(false);
+ propertyEditor->clear();
+ hierarchyView->clear();
+ updateUndoRedo(false, false, QString::null, QString::null);
+ }
+
+ selectionChanged();
+
+ if (currentTool() == ORDER_TOOL && w != old)
+ emit currentToolChanged();
+
+ emit hasActiveWindow(!!qworkspace->activeWindow());
+}
+
+
+void MainWindow::updateUndoRedo(bool undoAvailable, bool redoAvailable,
+ const QString &undoCmd, const QString &redoCmd)
+{
+ actionEditUndo->setEnabled(undoAvailable);
+ actionEditRedo->setEnabled(redoAvailable);
+ if (!undoCmd.isEmpty())
+ actionEditUndo->setText(i18n("&Undo: %1").arg(undoCmd));
+ else
+ actionEditUndo->setText(i18n("&Undo: Not Available"));
+ if (!redoCmd.isEmpty())
+ actionEditRedo->setText(i18n("&Redo: %1").arg(redoCmd));
+ else
+ actionEditRedo->setText(i18n("&Redo: Not Available"));
+
+ actionEditUndo->setToolTip(textNoAccel(actionEditUndo->text()));
+ actionEditRedo->setToolTip(textNoAccel(actionEditRedo->text()));
+
+ if (currentTool() == ORDER_TOOL) {
+ actionEditUndo->setEnabled(false);
+ actionEditRedo->setEnabled(false);
+ }
+}
+
+QWorkspace *MainWindow::qWorkspace() const
+{
+ return qworkspace;
+}
+
+void MainWindow::popupFormWindowMenu(const QPoint & gp, FormWindow *fw)
+{
+ QValueList<int> ids;
+ QMap<QString, int> commands;
+
+ setupRMBSpecialCommands(ids, commands, fw);
+ setupRMBProperties(ids, commands, fw);
+
+ kapp->processEvents();
+ int r = rmbFormWindow->exec(gp);
+
+ handleRMBProperties(r, commands, fw);
+ handleRMBSpecialCommands(r, commands, fw);
+
+ for (QValueList<int>::Iterator i = ids.begin(); i != ids.end(); ++i)
+ rmbFormWindow->removeItem(*i);
+}
+
+void MainWindow::popupWidgetMenu(const QPoint &gp, FormWindow * /*fw*/, QWidget * w)
+{
+ QValueList<int> ids;
+ QMap<QString, int> commands;
+
+ setupRMBSpecialCommands(ids, commands, w);
+ setupRMBProperties(ids, commands, w);
+
+ kapp->processEvents();
+ int r = rmbWidgets->exec(gp);
+
+ handleRMBProperties(r, commands, w);
+ handleRMBSpecialCommands(r, commands, w);
+
+ for (QValueList<int>::Iterator i = ids.begin(); i != ids.end(); ++i)
+ rmbWidgets->removeItem(*i);
+}
+
+void MainWindow::setupRMBProperties(QValueList<int> &ids, QMap<QString, int> &props, QWidget *w)
+{
+ const QMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
+ if (text && qstrcmp(text->type(), "QString") != 0)
+ text = 0;
+ const QMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
+ if (title && qstrcmp(title->type(), "QString") != 0)
+ title = 0;
+ const QMetaProperty* pagetitle =
+ w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true);
+ if (pagetitle && qstrcmp(pagetitle->type(), "QString") != 0)
+ pagetitle = 0;
+ const QMetaProperty* pixmap =
+ w->metaObject()->property(w->metaObject()->findProperty("pixmap", true), true);
+ if (pixmap && qstrcmp(pixmap->type(), "QPixmap") != 0)
+ pixmap = 0;
+
+ if (text && text->designable(w) ||
+ title && title->designable(w) ||
+ pagetitle && pagetitle->designable(w) ||
+ pixmap && pixmap->designable(w)) {
+ int id = 0;
+ if (ids.isEmpty())
+ ids << rmbWidgets->insertSeparator(0);
+ if (pixmap && pixmap->designable(w)) {
+ ids << (id = rmbWidgets->insertItem(i18n("Choose Pixmap..."), -1, 0));
+ props.insert("pixmap", id);
+ }
+ if (text && text->designable(w) && !w->inherits("QTextEdit")) {
+ ids << (id = rmbWidgets->insertItem(i18n("Edit Text..."), -1, 0));
+ props.insert("text", id);
+ }
+ if (title && title->designable(w)) {
+ ids << (id = rmbWidgets->insertItem(i18n("Edit Title..."), -1, 0));
+ props.insert("title", id);
+ }
+ if (pagetitle && pagetitle->designable(w)) {
+ ids << (id = rmbWidgets->insertItem(i18n("Edit Page Title..."), -1, 0));
+ props.insert("pagetitle", id);
+ }
+ }
+}
+
+void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int> &commands, QWidget *w)
+{
+ int id;
+ // KommanderWidget doesn't derive from QObject
+ KommanderWidget *atw = dynamic_cast<KommanderWidget *>(w);
+ if(atw)
+ {
+ if(ids.isEmpty())
+ ids << rmbWidgets->insertSeparator(0);
+
+ ids << (id = rmbWidgets->insertItem(i18n("Edit Kommander Text..."), -1, 0));
+
+ commands.insert("assoc", id);
+ }
+
+ if (w->inherits("QTabWidget")) {
+ if (ids.isEmpty())
+ ids << rmbWidgets->insertSeparator(0);
+ if (((QDesignerTabWidget*)w)->count() > 1) {
+ ids << (id = rmbWidgets->insertItem(i18n("Delete Page"), -1, 0));
+ commands.insert("remove", id);
+ }
+ ids << (id = rmbWidgets->insertItem(i18n("Add Page"), -1, 0));
+ commands.insert("add", id);
+ }
+ if (w->inherits("QToolBox")) {
+ if (ids.isEmpty())
+ ids << rmbWidgets->insertSeparator(0);
+ if (((QToolBox*)w)->count() > 1) {
+ ids << (id = rmbWidgets->insertItem(i18n("Delete Page"), -1, 0));
+ commands.insert("remove", id);
+ }
+ ids << (id = rmbWidgets->insertItem(i18n("Add Page"), -1, 0));
+ commands.insert("add", id);
+ }
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))))
+ {
+ if (ids.isEmpty())
+ ids << rmbWidgets->insertSeparator(0);
+ ids << (id = rmbWidgets->insertItem(i18n("Edit..."), -1, 0));
+ commands.insert("edit", id);
+ }
+}
+
+void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int> &commands, FormWindow *fw)
+{
+ int id;
+
+ // KommanderWidget doesn't derive from QObject
+ KommanderWidget *atw = dynamic_cast<KommanderWidget *>(fw->mainContainer());
+ if(atw)
+ {
+ if(ids.isEmpty())
+ ids << rmbFormWindow->insertSeparator(0);
+
+ ids << (id = rmbFormWindow->insertItem(i18n("Edit Kommander Text..."), -1, 0));
+
+ commands.insert("assoc", id);
+ }
+
+ if (fw->mainContainer()->inherits("QWizard")) {
+ if (ids.isEmpty())
+ ids << rmbFormWindow->insertSeparator(0);
+
+ if (((QWizard*)fw->mainContainer())->pageCount() > 1) {
+ ids << (id = rmbFormWindow->insertItem(i18n("Delete Page"), -1, 0));
+ commands.insert("remove", id);
+ }
+
+ ids << (id = rmbFormWindow->insertItem(i18n("Add Page"), -1, 0));
+ commands.insert("add", id);
+
+ ids << (id = rmbFormWindow->insertItem(i18n("Edit Page Title..."), -1, 0));
+ commands.insert("rename", id);
+
+ ids << (id = rmbFormWindow->insertItem(i18n("Edit Pages..."), -1, 0));
+ commands.insert("edit", id);
+
+ } else if (fw->mainContainer()->inherits("QMainWindow")) {
+ if (ids.isEmpty())
+ ids << rmbFormWindow->insertSeparator(0);
+ ids << (id = rmbFormWindow->insertItem(i18n("Add Menu Item"), -1, 0));
+ commands.insert("add_menu_item", id);
+ ids << (id = rmbFormWindow->insertItem(i18n("Add Toolbar"), -1, 0));
+ commands.insert("add_toolbar", id);
+ }
+}
+
+void MainWindow::handleRMBProperties(int id, QMap<QString, int> &props, QWidget *w)
+{
+ if (id == props[ "text" ]) {
+ bool ok = false;
+ QString text;
+ if (w->inherits("QTextView") || w->inherits("QLabel")) {
+ text = TextEditor::getText(this, w->property("text").toString());
+ ok = !text.isEmpty();
+ } else {
+ text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this);
+ }
+ if (ok) {
+ QString pn(i18n("Set the 'text' of '%1'").arg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ "text", w->property("text"),
+ text, QString::null, QString::null);
+ cmd->execute();
+ formWindow()->commandHistory()->addCommand(cmd);
+ MetaDataBase::setPropertyChanged(w, "text", true);
+ }
+ } else if (id == props[ "title" ]) {
+ bool ok = false;
+ QString title = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
+ if (ok) {
+ QString pn(i18n("Set the 'title' of '%1'").arg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ "title", w->property("title"),
+ title, QString::null, QString::null);
+ cmd->execute();
+ formWindow()->commandHistory()->addCommand(cmd);
+ MetaDataBase::setPropertyChanged(w, "title", true);
+ }
+ } else if (id == props[ "pagetitle" ]) {
+ bool ok = false;
+ QString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), w->property("pageTitle").toString(), &ok, this);
+ if (ok) {
+ QString pn(i18n("Set the 'pageTitle' of '%1'").arg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ "pageTitle", w->property("pageTitle"),
+ text, QString::null, QString::null);
+ cmd->execute();
+ formWindow()->commandHistory()->addCommand(cmd);
+ MetaDataBase::setPropertyChanged(w, "pageTitle", true);
+ }
+ } else if (id == props[ "pixmap" ]) {
+ QPixmap oldPix = w->property("pixmap").toPixmap();
+ QPixmap pix = qChoosePixmap(this, formWindow(), oldPix);
+ if (!pix.isNull()) {
+ QString pn(i18n("Set the 'pixmap' of '%1'").arg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ "pixmap", w->property("pixmap"),
+ pix, QString::null, QString::null);
+ cmd->execute();
+ formWindow()->commandHistory()->addCommand(cmd);
+ MetaDataBase::setPropertyChanged(w, "pixmap", true);
+ }
+ }
+}
+
+void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands, QWidget *w)
+{
+ // associated text menu
+ // we assume all widgets derive from KommanderWidget [MB02]
+ if(id == commands["assoc"])
+ {
+ AssocTextEditor *editor = new AssocTextEditor(w, formWindow(), propertyEditor, m_partManager,
+ this, "AssocTextEditor", false); //deletes itself!
+ editor->show();
+ }
+
+ if (w->inherits("QTabWidget")) {
+ QTabWidget *tw = (QTabWidget*)w;
+ if (id == commands[ "add" ]) {
+ AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
+ tw, "Tab");
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ } else if (id == commands[ "remove" ]) {
+ if (tw->currentPage()) {
+ QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
+ DeleteTabPageCommand *cmd = new DeleteTabPageCommand(i18n("Delete Page %1 of %2").
+ arg(dtw->pageTitle()).arg(tw->name()),
+ formWindow(), tw, tw->currentPage());
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ }
+ }
+ }
+ if (w->inherits("QToolBox")) {
+ QToolBox *tw = (QToolBox*)w;
+ if (id == commands[ "add" ]) {
+ AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
+ tw, "Page");
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ } else if (id == commands[ "remove" ]) {
+ if (tw->currentItem()) {
+ EditorToolBox *dtw = (EditorToolBox*)tw;
+ DeleteToolBoxPageCommand *cmd = new DeleteToolBoxPageCommand(i18n("Delete Page %1 of %2").
+ arg(dtw->pageTitle()).arg(tw->name()),
+ formWindow(), tw, tw->currentItem());
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ }
+ }
+ }
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
+ if (id == commands[ "edit" ])
+ WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow());
+ }
+}
+
+void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands, FormWindow *fw)
+{
+
+ if(id == commands["assoc"])
+ {
+ AssocTextEditor *editor = new AssocTextEditor(fw->mainContainer(), formWindow(), propertyEditor, m_partManager,
+ this, "AssocTextEditor", false); //deletes itself!
+ editor->show();
+ }
+
+
+ if (fw->mainContainer()->inherits("QWizard")) {
+ QWizard *wiz = (QWizard*)fw->mainContainer();
+ if (id == commands[ "add" ]) {
+ AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").arg(wiz->name()), formWindow(),
+ wiz, "Page");
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ } else if (id == commands[ "remove" ]) {
+ if (wiz->currentPage()) {
+ QDesignerWizard *dw = (QDesignerWizard*)wiz;
+ DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand(i18n("Delete Page %1 of %2").
+ arg(dw->pageTitle()).arg(wiz->name()),
+ formWindow(), wiz, wiz->indexOf(wiz->currentPage()));
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ }
+ } else if (id == commands[ "edit" ]) {
+ WizardEditor *e = new WizardEditor(this, wiz, fw);
+ e->exec();
+ delete e;
+ } else if (id == commands[ "rename" ]) {
+
+ bool ok = false;
+ QDesignerWizard *dw = (QDesignerWizard*)wiz;
+ QString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this);
+ if (ok) {
+ QString pn(i18n("Rename page %1 of %2").arg(dw->pageTitle()).arg(wiz->name()));
+ RenameWizardPageCommand *cmd = new RenameWizardPageCommand(pn, formWindow()
+ , wiz, wiz->indexOf(wiz->currentPage()), text);
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ }
+ }
+ } else if (fw->mainContainer()->inherits("QMainWindow")) {
+ QMainWindow *mw = (QMainWindow*)fw->mainContainer();
+ if (id == commands[ "add_toolbar" ]) {
+ AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").arg(formWindow()->name()), formWindow(), mw);
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ } else if (id == commands[ "add_menu_item" ]) {
+ AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").arg(formWindow()->name()), formWindow(), mw);
+ formWindow()->commandHistory()->addCommand(cmd);
+ cmd->execute();
+ }
+ }
+}
+
+void MainWindow::clipboardChanged()
+{
+ QString text(kapp->clipboard()->text());
+ QString start("<!DOCTYPE UI-SELECTION>");
+ actionEditPaste->setEnabled(text.left(start.length()) == start);
+}
+
+void MainWindow::selectionChanged()
+{
+ layoutChilds = false;
+ layoutSelected = false;
+ breakLayout = false;
+ if (!formWindow()) {
+ actionEditCut->setEnabled(false);
+ actionEditCopy->setEnabled(false);
+ actionEditDelete->setEnabled(false);
+ actionEditAdjustSize->setEnabled(false);
+ actionEditHLayout->setEnabled(false);
+ actionEditVLayout->setEnabled(false);
+ actionEditSplitHorizontal->setEnabled(false);
+ actionEditSplitVertical->setEnabled(false);
+ actionEditGridLayout->setEnabled(false);
+ actionEditBreakLayout->setEnabled(false);
+ actionEditLower->setEnabled(false);
+ actionEditRaise->setEnabled(false);
+ actionEditAdjustSize->setEnabled(false);
+ return;
+ }
+
+ int selectedWidgets = formWindow()->numSelectedWidgets();
+ bool enable = selectedWidgets > 0;
+ actionEditCut->setEnabled(enable);
+ actionEditCopy->setEnabled(enable);
+ actionEditDelete->setEnabled(enable);
+ actionEditLower->setEnabled(enable);
+ actionEditRaise->setEnabled(enable);
+
+ actionEditAdjustSize->setEnabled(false);
+ actionEditSplitHorizontal->setEnabled(false);
+ actionEditSplitVertical->setEnabled(false);
+
+ enable = false;
+ QWidgetList widgets = formWindow()->selectedWidgets();
+ if (selectedWidgets > 1) {
+ int unlaidout = 0;
+ int laidout = 0;
+ for (QWidget *w = widgets.first(); w; w = widgets.next()) {
+ if (!w->parentWidget() || WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout)
+ unlaidout++;
+ else
+ laidout++;
+ }
+ actionEditHLayout->setEnabled(unlaidout > 1);
+ actionEditVLayout->setEnabled(unlaidout > 1);
+ actionEditSplitHorizontal->setEnabled(unlaidout > 1);
+ actionEditSplitVertical->setEnabled(unlaidout > 1);
+ actionEditGridLayout->setEnabled(unlaidout > 1);
+ actionEditBreakLayout->setEnabled(laidout > 0);
+ actionEditAdjustSize->setEnabled(laidout > 0);
+ layoutSelected = unlaidout > 1;
+ breakLayout = laidout > 0;
+ } else if (selectedWidgets == 1) {
+ QWidget *w = widgets.first();
+ bool isContainer = WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))) ||
+ w == formWindow()->mainContainer();
+ actionEditAdjustSize->setEnabled(!w->parentWidget() ||
+ WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout);
+
+ if (!isContainer) {
+ actionEditHLayout->setEnabled(false);
+ actionEditVLayout->setEnabled(false);
+ actionEditGridLayout->setEnabled(false);
+ if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) {
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ breakLayout = true;
+ } else {
+ actionEditBreakLayout->setEnabled(false);
+ }
+ } else {
+ if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) {
+ if (!formWindow()->hasInsertedChildren(w)) {
+ actionEditHLayout->setEnabled(false);
+ actionEditVLayout->setEnabled(false);
+ actionEditGridLayout->setEnabled(false);
+ actionEditBreakLayout->setEnabled(false);
+ } else {
+ actionEditHLayout->setEnabled(true);
+ actionEditVLayout->setEnabled(true);
+ actionEditGridLayout->setEnabled(true);
+ actionEditBreakLayout->setEnabled(false);
+ layoutChilds = true;
+ }
+ if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) {
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ breakLayout = true;
+ }
+ } else {
+ actionEditHLayout->setEnabled(false);
+ actionEditVLayout->setEnabled(false);
+ actionEditGridLayout->setEnabled(false);
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ breakLayout = true;
+ }
+ }
+ } else if (selectedWidgets == 0 && formWindow()) {
+ actionEditAdjustSize->setEnabled(true);
+ QWidget *w = formWindow()->mainContainer();
+ if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) {
+ if (!formWindow()->hasInsertedChildren(w)) {
+ actionEditHLayout->setEnabled(false);
+ actionEditVLayout->setEnabled(false);
+ actionEditGridLayout->setEnabled(false);
+ actionEditBreakLayout->setEnabled(false);
+ } else {
+ actionEditHLayout->setEnabled(true);
+ actionEditVLayout->setEnabled(true);
+ actionEditGridLayout->setEnabled(true);
+ actionEditBreakLayout->setEnabled(false);
+ layoutChilds = true;
+ }
+ } else {
+ actionEditHLayout->setEnabled(false);
+ actionEditVLayout->setEnabled(false);
+ actionEditGridLayout->setEnabled(false);
+ actionEditBreakLayout->setEnabled(true);
+ breakLayout = true;
+ }
+ } else {
+ actionEditHLayout->setEnabled(false);
+ actionEditVLayout->setEnabled(false);
+ actionEditGridLayout->setEnabled(false);
+ actionEditBreakLayout->setEnabled(false);
+ }
+}
+
+void MainWindow::writeConfig()
+{
+ KConfig* config = kapp->config();
+
+ config->setGroup("General");
+ config->writeEntry("RestoreWorkspace", restoreConfig);
+ config->writeEntry("SplashScreen", splashScreen);
+ config->writeEntry("DocPath", docPath);
+ config->writeEntry("TemplatePath", templPath);
+
+ config->setGroup("Grid");
+ config->writeEntry("Snap", snGrid);
+ config->writeEntry("Show", sGrid);
+ config->writeEntry("x", grid().x());
+ config->writeEntry("y", grid().y());
+
+ config->setGroup("Background");
+ config->writeEntry("UsePixmap", backPix);
+ config->writeEntry("Color", qworkspace->backgroundColor().name());
+
+ /*
+ config->setGroup("Geometry");
+ config->writeEntry("MainWindow", size());
+ config->writeEntry("MainWindowMax", isMaximized());
+ */
+ writeDockConfig(config, "Docks");
+
+ config->setGroup("View");
+ config->writeEntry("TextLabels", usesTextLabel());
+ config->writeEntry("BigIcons", usesBigPixmaps());
+
+ actionCollection()->writeShortcutSettings("Keys", config);
+
+ config->deleteGroup("Recent Files");
+ actionRecent->saveEntries(config, "Recent Files");
+}
+
+void MainWindow::readConfig()
+{
+ KConfig *config = kapp->config();
+
+ config->setGroup("General");
+ restoreConfig = config->readBoolEntry("RestoreWorkspace", true);
+ splashScreen = config->readBoolEntry("SplashScreen", true);
+ docPath = config->readEntry("DocPath", docPath);
+ templPath = config->readEntry("TemplatePath", QString::null);
+
+ config->setGroup("Grid");
+ sGrid = config->readBoolEntry("Snap", true);
+ snGrid = config->readBoolEntry("Show", true);
+ grd.setX(config->readNumEntry("x", 10));
+ grd.setY(config->readNumEntry("y", 10));
+
+ config->setGroup("Background");
+ if (config->readBoolEntry("UsePixmap", true))
+ qworkspace->setBackgroundPixmap(PixmapChooser::loadPixmap("background.png", PixmapChooser::NoSize));
+ else
+ qworkspace->setBackgroundColor(QColor(config->readEntry("Color", "#f0f0f0")).rgb());
+
+ /*
+ config->setGroup("Geometry");
+ QSize winSize = size();
+ resize(config->readSizeEntry("MainWindow", &winSize));
+ if (config->readBoolEntry("MainWindowMax", false))
+ showMaximized();
+ */
+ readDockConfig(config, "Docks");
+
+
+ config->setGroup("View");
+ setUsesTextLabel(config->readBoolEntry("TextLabels", false));
+ setUsesBigPixmaps(config->readBoolEntry("BigIcons", false));
+
+ actionCollection()->readShortcutSettings("Keys", config);
+
+ actionRecent->loadEntries(config, "Recent Files");
+
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ for(int i = 0; i < args->count(); i++)
+ {
+ QFileInfo fi(args->url(i).path());
+ if (fi.exists() && openFormWindow(args->url(i).path()))
+ actionRecent->addURL(args->url(i));
+ }
+ args->clear();
+}
+
+
+HierarchyView *MainWindow::objectHierarchy() const
+{
+ if (!hierarchyView)
+ ((MainWindow *) this)->setupHierarchyView();
+ return hierarchyView;
+}
+
+QPopupMenu *MainWindow::setupNormalHierarchyMenu(QWidget *parent)
+{
+ QPopupMenu *menu = new QPopupMenu(parent);
+
+ actionEditCut->plug(menu);
+ actionEditCopy->plug(menu);
+ actionEditPaste->plug(menu);
+ actionEditDelete->plug(menu);
+
+ return menu;
+}
+
+QPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(QWidget *parent, const char *addSlot, const char *removeSlot)
+{
+ QPopupMenu *menu = new QPopupMenu(parent);
+
+ menu->insertItem(i18n("Add Page"), parent, addSlot);
+ menu->insertItem(i18n("Delete Page"), parent, removeSlot);
+ menu->insertSeparator();
+ actionEditCut->plug(menu);
+ actionEditCopy->plug(menu);
+ actionEditPaste->plug(menu);
+ actionEditDelete->plug(menu);
+
+ return menu;
+}
+
+void MainWindow::closeEvent(QCloseEvent *e)
+{
+ QWidgetList windows = qWorkspace()->windowList();
+ QWidgetListIt wit(windows);
+ while (wit.current())
+ {
+ QWidget *w = wit.current();
+ ++wit;
+ if (w->inherits("FormWindow"))
+ {
+ if (!((FormWindow *) w)->formFile()->close())
+ {
+ e->ignore();
+ return;
+ }
+ }
+ }
+
+ writeConfig();
+ hide();
+ e->accept();
+
+ if (client)
+ {
+ QDir home(QDir::homeDirPath());
+ home.remove(".designerpid");
+ }
+}
+
+Workspace *MainWindow::workspace() const
+{
+ if (!wspace)
+ ((MainWindow*)this)->setupWorkspace();
+ return wspace;
+}
+
+PropertyEditor *MainWindow::propertyeditor() const
+{
+ if (!propertyEditor)
+ ((MainWindow*)this)->setupPropertyEditor();
+ return propertyEditor;
+}
+
+ActionEditor *MainWindow::actioneditor() const
+{
+ if (!actionEditor)
+ ((MainWindow*)this)->setupActionEditor();
+ return actionEditor;
+}
+
+bool MainWindow::openEditor(QWidget* w, FormWindow*)
+{
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
+ statusBar()->message(i18n("Edit %1...").arg(w->className()));
+ WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow());
+ statusBar()->clear();
+ return true;
+ }
+
+ const QMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
+ const QMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
+ if (text && text->designable(w)) {
+ bool ok = false;
+ QString text;
+ if (w->inherits("QTextView") || w->inherits("QLabel")) {
+ text = TextEditor::getText(this, w->property("text").toString());
+ ok = !text.isEmpty();
+ } else {
+ text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this);
+ }
+ if (ok) {
+ QString pn(i18n("Set the 'text' of '%2'").arg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ "text", w->property("text"),
+ text, QString::null, QString::null);
+ cmd->execute();
+ formWindow()->commandHistory()->addCommand(cmd);
+ MetaDataBase::setPropertyChanged(w, "text", true);
+ }
+ return true;
+ }
+ if (title && title->designable(w)) {
+ bool ok = false;
+ QString text;
+ text = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
+ if (ok) {
+ QString pn(i18n("Set the 'title' of '%2'").arg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ "title", w->property("title"),
+ text, QString::null, QString::null);
+ cmd->execute();
+ formWindow()->commandHistory()->addCommand(cmd);
+ MetaDataBase::setPropertyChanged(w, "title", true);
+ }
+ return true;
+ }
+
+ return true;
+}
+
+void MainWindow::setGrid(const QPoint &p)
+{
+ if (p == grd)
+ return;
+ grd = p;
+ QWidgetList windows = qWorkspace()->windowList();
+ for (QWidget *w = windows.first(); w; w = windows.next()) {
+ if (!w->inherits("FormWindow"))
+ continue;
+ ((FormWindow*)w)->mainContainer()->update();
+ }
+}
+
+void MainWindow::setShowGrid(bool b)
+{
+ if (b == sGrid)
+ return;
+ sGrid = b;
+ QWidgetList windows = qWorkspace()->windowList();
+ for (QWidget *w = windows.first(); w; w = windows.next()) {
+ if (!w->inherits("FormWindow"))
+ continue;
+ ((FormWindow*)w)->mainContainer()->update();
+ }
+}
+
+void MainWindow::setSnapGrid(bool b)
+{
+ if (b == snGrid)
+ return;
+ snGrid = b;
+}
+
+QString MainWindow::documentationPath() const
+{
+ QString result = docPath;
+
+ if (docPath[0] == '$') {
+ int fs = docPath.find('/');
+ if (fs == -1)
+ fs = docPath.find('\\');
+
+ if (fs > -1) {
+ result = docPath.mid(1, fs-1);
+ } else {
+ fs=docPath.length();
+ result = docPath.right(fs-1);
+ }
+ result = getenv(result.latin1()) + docPath.right(docPath.length()-fs);
+ }
+
+ return result;
+}
+
+void MainWindow::windowsMenuActivated(int id)
+{
+ QWidget* w = qworkspace->windowList().at(id);
+ if (w)
+ w->setFocus();
+}
+
+
+
+void MainWindow::checkTempFiles()
+{
+ QString s = QDir::homeDirPath() + "/.designer";
+ QString baseName = s+ "/saved-form-";
+ if (!QFile::exists(baseName + "1.kmdr"))
+ return;
+ QDir d(s);
+ d.setNameFilter("*.kmdr");
+ QStringList lst = d.entryList();
+ QApplication::restoreOverrideCursor();
+ bool load = KMessageBox::questionYesNo(this,
+ i18n("Kommander found some temporary saved files, which were\n"
+ "written when Kommander crashed last time. Do you want to\n"
+ "load these files?"), i18n("Restoring Last Session"), i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes;
+ QApplication::setOverrideCursor(waitCursor);
+ for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) {
+ if (load)
+ openFormWindow(s + "/" + *it, false);
+ d.remove(*it);
+ }
+}
+
+void MainWindow::showDialogHelp()
+{
+ QWidget *w = (QWidget*)sender();
+ w = w->topLevelWidget();
+
+ QString link = "designer-manual-12.html#";
+
+ if (w->inherits("NewFormBase"))
+ link += "dialog-file-new";
+ else if (w->inherits("CreateTemplate"))
+ link += "dialog-file-create-template";
+ else if (w->inherits("EditSlotsBase"))
+ link += "dialog-edit-slots";
+ else if (w->inherits("ConnectionViewerBase"))
+ link += "dialog-view-connections";
+ else if (w->inherits("FormSettingsBase"))
+ link += "dialog-edit-form-settings";
+ else if (w->inherits("Preferences"))
+ link += "dialog-edit-preferences";
+ else if (w->inherits("PixmapCollectionEditor"))
+ link += "dialog-image-collection";
+ else if (w->inherits("DatabaseConnectionBase"))
+ link += "dialog-edit-database-connections";
+ else if (w->inherits("FindDialog"))
+ link += "dialog-find-text";
+ else if (w->inherits("ReplaceDialog"))
+ link += "dialog-replace-text";
+ else if (w->inherits("GotoLineDialog"))
+ link += "dialog-go-to-line";
+ else if (w->inherits("ConnectionEditorBase"))
+ link += "dialog-edit-connections";
+ else if (w->inherits("PaletteEditorBase"))
+ link += "dialog-edit-palette";
+ else if (w->inherits("ListBoxEditorBase"))
+ link += "dialog-edit-listbox";
+ else if (w->inherits("ListViewEditorBase"))
+ link += "dialog-edit-listview";
+ else if (w->inherits("IconViewEditorBase"))
+ link += "dialog-edit-iconview";
+ else if (w->inherits("TableEditorBase"))
+ link += "dialog-edit-table";
+
+ else {
+ KMessageBox::information(this,
+ i18n("There is no help available for this dialog at the moment."), i18n("Help"));
+ return;
+ }
+
+ if (assistant)
+ assistant->sendRequest(link+'\n');
+}
+
+
+
+void MainWindow::fileOpenRecent(const KURL& filename)
+{
+ if (!QFile::exists(filename.path()))
+ {
+ KMessageBox::error(this, i18n("<qt>Could not open file:<br><b>%1</b><br>File does not exist.</qt>").
+ arg(filename.path()), i18n("Open File"));
+ actionRecent->removeURL(filename);
+ }
+ else
+ fileOpen(filename.path());
+}
+
+void MainWindow::setupPlugins()
+{
+ KommanderFactory::loadPlugins();
+}
+
+
+
+void MainWindow::setModified(bool b, QWidget *window)
+{
+ QWidget *w = window;
+ while (w)
+ {
+ if (w->inherits("FormWindow"))
+ {
+ ((FormWindow *) w)->modificationChanged(b);
+ return;
+ }
+ w = w->parentWidget(true);
+ if (w->inherits("FormWindow"))
+ {
+ ((FormWindow *) w)->modificationChanged(b);
+ return;
+ }
+ w = w->parentWidget(true);
+ }
+}
+
+
+void MainWindow::updateWorkspace()
+{
+}
+
+QWidget *MainWindow::findRealForm(QWidget *wid)
+{
+ QWidgetList windows = qWorkspace()->windowList();
+ for (QWidget *w = windows.first(); w; w = windows.next()) {
+ if (QString(w->name()) == QString(wid->name()))
+ return w;
+ }
+ return 0;
+}
+
+void MainWindow::formNameChanged(FormWindow*)
+{
+}
+
+
+int MainWindow::currentLayoutDefaultSpacing() const
+{
+ if (((MainWindow*)this)->formWindow())
+ return ((MainWindow*)this)->formWindow()->layoutDefaultSpacing();
+ return BOXLAYOUT_DEFAULT_SPACING;
+}
+
+int MainWindow::currentLayoutDefaultMargin() const
+{
+ if (((MainWindow*)this)->formWindow())
+ return ((MainWindow*)this)->formWindow()->layoutDefaultMargin();
+ return BOXLAYOUT_DEFAULT_MARGIN;
+}
+
+QString MainWindow::whatsThisFrom(const QString&)
+{
+ return QString::null;
+}
+
+void MainWindow::slotActivePartChanged(KParts::Part * part)
+{
+// kdDebug(24000) << "ActivePartChanged" << part << endl;
+ if (part) // if part == 0L the pointer m_oldKTextEditor is not useable
+ {
+ // guiFactory()->removeClient(part);
+ }
+ createGUI(part);
+ if (part)
+ {
+ guiFactory()->addClient(part);
+ }
+}
+
+#include "mainwindow.moc"
+
diff --git a/kommander/editor/mainwindow.h b/kommander/editor/mainwindow.h
new file mode 100644
index 00000000..7a18438f
--- /dev/null
+++ b/kommander/editor/mainwindow.h
@@ -0,0 +1,317 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include "metadatabase.h"
+
+#include <kparts/dockmainwindow.h>
+#include <kdockwidget.h>
+
+#include <qmap.h>
+#include <qguardedptr.h>
+#include <qobjectlist.h>
+
+class ActionEditor;
+class AssistProc;
+class FindDialog;
+class FormFile;
+class FormWindow;
+class GotoLineDialog;
+class HierarchyView;
+class KAction;
+class KActionCollection;
+class KProcess;
+class KRecentFilesAction;
+class KToggleAction;
+class KToolBar;
+class KURL;
+class PropertyEditor;
+class QCloseEvent;
+class QMenuBar;
+class QTimer;
+class QWidget;
+class QWorkspace;
+class MessageLog;
+class ReplaceDialog;
+class Workspace;
+
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#include <qtoolbar.h>
+#else
+class QToolBar;
+#endif
+class Preferences;
+
+namespace KParts {
+ class PartManager;
+}
+
+
+class MainWindow : public KParts::DockMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow( bool asClient );
+ ~MainWindow();
+
+ HierarchyView *objectHierarchy() const;
+ Workspace *workspace() const;
+ PropertyEditor *propertyeditor() const;
+ ActionEditor *actioneditor() const;
+
+ void resetTool();
+ int currentTool() const;
+
+ FormWindow *formWindow();
+
+ bool unregisterClient( FormWindow *w );
+ QWidget *isAFormWindowChild( QObject *o ) const;
+ QWidget *isAToolBarChild( QObject *o ) const;
+
+ void insertFormWindow( FormWindow *fw );
+ QWorkspace *qWorkspace() const;
+
+ void popupFormWindowMenu( const QPoint &gp, FormWindow *fw );
+ void popupWidgetMenu( const QPoint &gp, FormWindow *fw, QWidget *w );
+
+ QPopupMenu *setupNormalHierarchyMenu( QWidget *parent );
+ QPopupMenu *setupTabWidgetHierarchyMenu( QWidget *parent, const char *addSlot, const char *removeSlot );
+
+ FormWindow *openFormWindow( const QString &fn, bool validFileName = TRUE, FormFile *ff = 0 );
+
+ void setGrid( const QPoint &p );
+ void setShowGrid( bool b );
+ void setSnapGrid( bool b );
+ QPoint grid() const { return grd; }
+ bool showGrid() const { return sGrid; }
+ bool snapGrid() const { return snGrid && sGrid; }
+
+ QString documentationPath() const;
+
+ static MainWindow *self;
+ void saveAllTemp();
+
+ QString templatePath() const { return templPath; }
+
+ bool isPreviewing() const { return previewing; }
+
+ FormWindow *activeForm() const { return lastActiveFormWindow; }
+
+ void setModified( bool b, QWidget *window );
+ void updateWorkspace();
+
+ void formNameChanged( FormWindow *fw );
+
+ int currentLayoutDefaultSpacing() const;
+ int currentLayoutDefaultMargin() const;
+
+
+public slots:
+ void showProperties( QObject *w );
+ void updateProperties( QObject *w );
+ void showDialogHelp();
+ void slotActivePartChanged(KParts::Part * );
+
+signals:
+ void addedFormFile(FormFile *);
+ void removedFormFile(FormFile *);
+ void currentToolChanged();
+ void hasActiveForm( bool );
+ void hasActiveWindow( bool );
+
+ void formModified( bool );
+ void formWindowsChanged();
+ void formWindowChanged();
+
+protected:
+ bool eventFilter( QObject *o, QEvent *e );
+ void closeEvent( QCloseEvent *e );
+
+public slots:
+ void fileNew();
+ void fileClose();
+ void fileOpen();
+ void fileOpen(const QString &filename);
+ void fileOpenRecent(const KURL& name);
+ bool fileSave();
+ bool fileSaveForm(); // not visible in menu, called from fileSave
+ bool fileSaveAs();
+ void fileSaveAll();
+ void fileCreateTemplate();
+
+ void editUndo();
+ void editRedo();
+ void editCut();
+ void editCopy();
+ void editPaste();
+ void editDelete();
+ void editSelectAll();
+ void editLower();
+ void editRaise();
+ void editAdjustSize();
+ void editLayoutHorizontal();
+ void editLayoutVertical();
+ void editLayoutHorizontalSplit();
+ void editLayoutVerticalSplit();
+ void editLayoutGrid();
+ void editLayoutContainerHorizontal();
+ void editLayoutContainerVertical();
+ void editLayoutContainerGrid();
+ void editBreakLayout();
+ void editAccels();
+ void editConnections();
+ void editFindGlobal();
+
+ void editFormSettings();
+ void editPreferences();
+ void editShortcuts();
+ void editPlugins();
+ void editExternalTool(int id);
+ void editToolExited(KProcess*);
+ void editToolOutput(KProcess*, char*, int);
+ void configureEditor();
+
+ void runForm();
+ void runForm4();
+
+private slots:
+ void activeWindowChanged( QWidget *w );
+ void updateUndoRedo( bool, bool, const QString &, const QString & );
+
+ void toolSelected();
+
+ void clipboardChanged();
+ void selectionChanged();
+
+ void chooseDocPath();
+ void windowsMenuActivated( int id );
+ void setupWindowActions();
+ void createNewTemplate();
+
+ void closeRunningForm(KProcess* process);
+ void slotCreateBackups();
+
+private:
+ void setupMDI();
+ void setupEditActions();
+ void setupToolActions();
+ void setupLayoutActions();
+ void setupFileActions();
+ void setupSettingsActions();
+ void setupRunActions();
+ void setupHelpActions();
+ void setupRMBMenus();
+
+ void setupPropertyEditor();
+ void setupHierarchyView();
+ void setupWorkspace();
+ void setupActionEditor();
+ void setupMessageLog();
+ void setupPlugins();
+
+ QWidget* previewFormInternal( QStyle* style = 0, QPalette* pal = 0 );
+
+ void writeConfig();
+ void readConfig();
+
+ void setupRMBProperties( QValueList<int> &ids, QMap<QString, int> &props, QWidget *w );
+ void handleRMBProperties( int id, QMap<QString, int> &props, QWidget *w );
+ void setupRMBSpecialCommands( QValueList<int> &ids, QMap<QString, int> &commands, QWidget *w );
+ void handleRMBSpecialCommands( int id, QMap<QString, int> &commands, QWidget *w );
+ void setupRMBSpecialCommands( QValueList<int> &ids, QMap<QString, int> &commands, FormWindow *w );
+ void handleRMBSpecialCommands( int id, QMap<QString, int> &commands, FormWindow *w );
+ bool openEditor( QWidget *w, FormWindow *fw );
+ void checkTempFiles();
+
+ void addRecentlyOpened(const QString &fn);
+ QWidget *findRealForm( QWidget *w );
+
+ QString whatsThisFrom( const QString &key );
+
+private:
+ PropertyEditor *propertyEditor;
+ HierarchyView *hierarchyView;
+ Workspace *wspace;
+ QWidget *lastPressWidget;
+ QWorkspace *qworkspace;
+ KMenuBar *menubar;
+ FormWindow *lastActiveFormWindow;
+ bool breakLayout, layoutChilds, layoutSelected;
+ QPoint grd;
+ bool sGrid, snGrid;
+ bool restoreConfig;
+ bool backPix;
+ bool splashScreen;
+ QString docPath;
+
+ KAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy,
+ *actionEditPaste, *actionEditDelete, *actionEditAdjustSize,
+ *actionEditHLayout, *actionEditVLayout, *actionEditGridLayout,
+ *actionEditSplitHorizontal, *actionEditSplitVertical,
+ *actionEditSelectAll, *actionEditBreakLayout, *actionEditConnections,
+ *actionEditLower, *actionEditRaise, *actionEditFindGlobal;
+
+ KToggleAction* actionPointerTool, *actionConnectTool, *actionOrderTool;
+ KAction* actionCurrentTool;
+ KAction *actionEditFormSettings, *actionEditAccels;
+ KRecentFilesAction* actionRecent;
+
+ QPopupMenu *rmbWidgets;
+ QPopupMenu *rmbFormWindow;
+ QPopupMenu *windowMenu, *fileMenu;
+
+ QToolBar *layoutToolBar;
+ KToolBar *fileTb;
+
+ Preferences *prefDia;
+ QMap<QString,QString> propertyDocumentation;
+ bool client;
+ QString templPath;
+ ActionEditor *actionEditor;
+
+ bool databaseAutoEdit;
+ QTimer *updateSlotsTimer;
+ QTimer *backupTimer;
+ bool inDebugMode;
+ QObjectList debuggingForms;
+ QString lastOpenFilter;
+ QString menuHelpFile;
+ AssistProc *assistant;
+
+ bool previewing;
+ MessageLog* messageLog;
+
+ // Paths of external Kommander tools for Editor
+ QStringList m_editorTools;
+ QString m_toolOutput;
+ KParts::PartManager *m_partManager;
+
+ QString m_fileName;
+ QString m_backupName;
+ bool m_modified;
+
+public:
+ QString lastSaveFilter;
+
+};
+
+#endif
diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp
new file mode 100644
index 00000000..f7657d26
--- /dev/null
+++ b/kommander/editor/mainwindowactions.cpp
@@ -0,0 +1,1201 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#include "mainwindow.h"
+
+#include <qapplication.h>
+#include <qclipboard.h>
+#include <qfileinfo.h>
+#include <qlineedit.h>
+#include <qlistbox.h>
+#include <qsignalmapper.h>
+#include <qspinbox.h>
+#include <qstatusbar.h>
+#include <qstylefactory.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qworkspace.h>
+
+#include "defs.h"
+#include "widgetdatabase.h"
+#include "widgetfactory.h"
+#include "preferences.h"
+#include "formwindow.h"
+#include "newformimpl.h"
+#include "resource.h"
+#include "workspace.h"
+#include "createtemplate.h"
+#include "hierarchyview.h"
+#include "formsettingsimpl.h"
+#include "styledbutton.h"
+#include "connectioneditorimpl.h"
+#include "actioneditorimpl.h"
+#include "formfile.h"
+#ifndef QT_NO_SQL
+#include "dbconnectionsimpl.h"
+#include "dbconnectionimpl.h"
+#endif
+#include "command.h"
+
+
+#include <kaction.h>
+#include <kapplication.h>
+#include <kfiledialog.h>
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <kkeydialog.h>
+#include <klocale.h>
+#include <kmenubar.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+#include <kprocess.h>
+#include <kstandarddirs.h>
+#include <kstatusbar.h>
+#include <kstdguiitem.h>
+#include <kurl.h>
+
+#include <ktexteditor/document.h>
+#include <ktexteditor/view.h>
+#include <ktexteditor/configinterface.h>
+
+#include <stdlib.h>
+
+const QString toolbarHelp = "<p>Toolbars contain a number of buttons to "
+"provide quick access to often used functions.%1"
+"<br>Click on the toolbar handle to hide the toolbar, "
+"or drag and place the toolbar to a different location.</p>";
+
+static QIconSet createIconSet( const QString &name )
+{
+ QIconSet ic( PixmapChooser::loadPixmap( name, PixmapChooser::Small ) );
+ ic.setPixmap( PixmapChooser::loadPixmap( name, PixmapChooser::Disabled ), QIconSet::Small, QIconSet::Disabled );
+ return ic;
+}
+
+int forms = 0;
+
+void MainWindow::setupEditActions()
+{
+ actionEditUndo = KStdAction::undo(this, SLOT(editUndo()), actionCollection());
+ actionEditUndo->setText(i18n("&Undo: Not Available"));
+ actionEditUndo->setToolTip(i18n("Undoes the last action"));
+ actionEditUndo->setWhatsThis(whatsThisFrom("Edit|Undo"));
+ actionEditUndo->setEnabled(false);
+
+ actionEditRedo = KStdAction::redo(this, SLOT(editRedo()), actionCollection());
+ actionEditRedo->setText(i18n("&Redo: Not Available"));
+ actionEditRedo->setToolTip(i18n("Redoes the last undone operation"));
+ actionEditRedo->setWhatsThis(whatsThisFrom("Edit|Redo"));
+ actionEditRedo->setEnabled(false);
+
+ actionEditCut = KStdAction::cut(this, SLOT(editCut()), actionCollection());
+ actionEditCut->setToolTip(i18n("Cuts the selected widgets and puts them on the clipboard"));
+ actionEditCut->setWhatsThis(whatsThisFrom("Edit|Cut"));
+ actionEditCut->setEnabled(false);
+
+ actionEditCopy = KStdAction::copy(this, SLOT(editCopy()), actionCollection());
+ actionEditCopy->setToolTip(i18n("Copies the selected widgets to the clipboard"));
+ actionEditCopy->setWhatsThis(whatsThisFrom("Edit|Copy"));
+ actionEditCopy->setEnabled(false);
+
+ actionEditPaste = KStdAction::paste(this, SLOT(editPaste()), actionCollection());
+ actionEditPaste->setToolTip(i18n("Pastes the clipboard's contents"));
+ actionEditPaste->setWhatsThis(whatsThisFrom("Edit|Paste"));
+ actionEditPaste->setEnabled(false);
+
+ actionEditDelete = new KAction(i18n("Delete"), Key_Delete, this, SLOT(editDelete()),
+ actionCollection(), "edit_delete");
+ actionEditDelete->setToolTip(i18n("Deletes the selected widgets"));
+ actionEditDelete->setWhatsThis(whatsThisFrom("Edit|Delete"));
+ actionEditDelete->setEnabled(false);
+
+ actionEditSelectAll = KStdAction::selectAll(this, SLOT(editSelectAll()), actionCollection());
+ actionEditSelectAll->setToolTip(i18n("Selects all widgets"));
+ actionEditSelectAll->setWhatsThis(whatsThisFrom("Edit|Select All"));
+
+ actionEditRaise = new KAction(i18n("Bring to Front"), createIconSet("editraise.xpm"),
+ KShortcut::null(), this, SLOT(editRaise()), actionCollection(), "edit_raise");
+ actionEditRaise->setToolTip(i18n("Raises the selected widgets"));
+ actionEditRaise->setEnabled(false);
+
+ actionEditLower = new KAction(i18n("Send to Back"), createIconSet("editlower.xpm"),
+ KShortcut::null(), this, SLOT(editLower()), actionCollection(), "edit_lower");
+ actionEditLower->setToolTip(i18n("Lowers the selected widgets"));
+ actionEditLower->setWhatsThis(i18n("Lowers the selected widgets"));
+ actionEditLower->setEnabled(false);
+
+ actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, this, SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
+ actionEditFindGlobal->setToolTip(i18n("Search for a text in the whole form."));
+ actionEditFindGlobal->setWhatsThis(whatsThisFrom("Edit|Find in Form"));
+ connect(this, SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, SLOT(setEnabled(bool)));
+
+ actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, this, SLOT(editAccels()),
+ actionCollection(), "edit_check_accel");
+ actionEditAccels->setToolTip(i18n("Checks if the accelerators used in the form are unique"));
+ actionEditAccels->setWhatsThis(whatsThisFrom("Edit|Check Accelerator"));
+ connect(this, SIGNAL(hasActiveForm(bool)), actionEditAccels, SLOT(setEnabled(bool)));
+
+ actionEditConnections = new KAction(i18n("Connections"), createIconSet("connecttool.xpm"),
+ KShortcut::null(), this, SLOT(editConnections()), actionCollection(),
+ "edit_connections");
+ actionEditConnections->setToolTip(i18n("Opens a dialog for editing connections"));
+ actionEditConnections->setWhatsThis(whatsThisFrom("Edit|Connections"));
+ connect(this, SIGNAL(hasActiveForm(bool)), actionEditConnections, SLOT(setEnabled(bool)));
+
+ actionEditFormSettings = new KAction(i18n("Form Settings..."), KShortcut::null(),
+ this, SLOT(editFormSettings()), actionCollection(), "edit_form");
+ actionEditFormSettings->setToolTip(i18n("Opens a dialog to change the form's settings"));
+ actionEditFormSettings->setWhatsThis(whatsThisFrom("Edit|Form Settings"));
+ connect(this, SIGNAL(hasActiveForm(bool)), actionEditFormSettings, SLOT(setEnabled(bool)));
+
+ KToolBar *tb = new KToolBar(this, "Edit");
+ tb->setFullSize(false);
+ QWhatsThis::add(tb, i18n("<b>The Edit toolbar</b>%1").arg(toolbarHelp));
+ addToolBar(tb, i18n("Edit"));
+ actionEditUndo->plug(tb);
+ actionEditRedo->plug(tb);
+ tb->addSeparator();
+ actionEditCut->plug(tb);
+ actionEditCopy->plug(tb);
+ actionEditPaste->plug(tb);
+
+ QPopupMenu *menu = new QPopupMenu(this, "Edit");
+ menuBar()->insertItem(i18n("&Edit"), menu);
+ actionEditUndo->plug(menu);
+ actionEditRedo->plug(menu);
+ menu->insertSeparator();
+ actionEditCut->plug(menu);
+ actionEditCopy->plug(menu);
+ actionEditPaste->plug(menu);
+ actionEditDelete->plug(menu);
+ actionEditSelectAll->plug(menu);
+ actionEditAccels->plug(menu);
+ menu->insertSeparator();
+// actionEditFindGlobal->plug(menu); //enable when implemented
+ actionEditConnections->plug(menu);
+ actionEditFormSettings->plug(menu);
+ menu->insertSeparator();
+
+}
+
+
+void MainWindow::setupLayoutActions()
+{
+ actionEditAdjustSize = new KAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"),
+ CTRL + Key_J, this, SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
+ actionEditAdjustSize->setToolTip(i18n("Adjusts the size of the selected widget"));
+ actionEditAdjustSize->setWhatsThis(whatsThisFrom("Layout|Adjust Size"));
+ actionEditAdjustSize->setEnabled(false);
+
+ actionEditHLayout = new KAction(i18n("Lay Out Horizontally"), createIconSet("edithlayout.xpm"),
+ CTRL + Key_H, this, SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
+ actionEditHLayout->setToolTip(i18n("Lays out the selected widgets horizontally"));
+ actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally"));
+ actionEditHLayout->setEnabled(false);
+
+ actionEditVLayout = new KAction(i18n("Lay Out Vertically"), createIconSet("editvlayout.xpm"),
+ CTRL + Key_L, this, SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
+ actionEditVLayout->setToolTip(i18n("Lays out the selected widgets vertically"));
+ actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically"));
+ actionEditVLayout->setEnabled(false);
+
+ actionEditGridLayout = new KAction(i18n("Lay Out in a Grid"), createIconSet("editgrid.xpm"),
+ CTRL + Key_G, this, SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
+ actionEditGridLayout->setToolTip(i18n("Lays out the selected widgets in a grid"));
+ actionEditGridLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out in a Grid"));
+ actionEditGridLayout->setEnabled(false);
+
+ actionEditSplitHorizontal = new KAction(i18n("Lay Out Horizontally in Splitter"), createIconSet("editvlayoutsplit.xpm"),
+ KShortcut::null(), this, SLOT(editLayoutHorizontalSplit()), actionCollection(),
+ "edit_split_h");
+ actionEditSplitHorizontal->setToolTip(i18n("Lays out the selected widgets horizontally in a splitter"));
+ actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally in Splitter"));
+ actionEditSplitHorizontal->setEnabled(false);
+
+ actionEditSplitVertical = new KAction(i18n("Lay Out Vertically in Splitter"), createIconSet("edithlayoutsplit.xpm"),
+ KShortcut::null(), this, SLOT(editLayoutVerticalSplit()), actionCollection(),
+ "edit_split_v");
+ actionEditSplitVertical->setToolTip(i18n("Lays out the selected widgets vertically in a splitter"));
+ actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically (in Splitter)"));
+ actionEditSplitVertical->setEnabled(false);
+
+ actionEditBreakLayout = new KAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"),
+ CTRL + Key_B, this, SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
+ actionEditBreakLayout->setToolTip(i18n("Breaks the selected layout"));
+ actionEditBreakLayout->setWhatsThis(whatsThisFrom("Layout|Break Layout"));
+
+ int id = WidgetDatabase::idFromClassName("Spacer");
+ KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), this, SLOT(toolSelected()),
+ actionCollection(), QString::number(id).latin1());
+ a->setExclusiveGroup("tool");
+ a->setText(i18n("Add ") + WidgetDatabase::className(id));
+ a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::toolTip(id)));
+ a->setWhatsThis(i18n("<b>A %1</b><p>%2</p>"
+ "<p>Click to insert a single %3,"
+ "or double click to keep the tool selected.").arg(WidgetDatabase::toolTip(id)).
+ arg(WidgetDatabase::whatsThis(id)).arg(WidgetDatabase::toolTip(id)));
+
+ QWhatsThis::add(layoutToolBar, i18n("<b>The Layout toolbar</b>%1").arg(toolbarHelp));
+ actionEditAdjustSize->plug(layoutToolBar);
+ layoutToolBar->addSeparator();
+ actionEditHLayout->plug(layoutToolBar);
+ actionEditVLayout->plug(layoutToolBar);
+ actionEditGridLayout->plug(layoutToolBar);
+ actionEditSplitHorizontal->plug(layoutToolBar);
+ actionEditSplitVertical->plug(layoutToolBar);
+ actionEditBreakLayout->plug(layoutToolBar);
+ layoutToolBar->addSeparator();
+ a->plug(layoutToolBar);
+
+ QPopupMenu *menu = new QPopupMenu(this, "Layout");
+ menuBar()->insertItem(i18n("&Layout"), menu);
+ actionEditAdjustSize->plug(menu);
+ menu->insertSeparator();
+ actionEditHLayout->plug(menu);
+ actionEditVLayout->plug(menu);
+ actionEditGridLayout->plug(menu);
+ actionEditSplitHorizontal->plug(menu);
+ actionEditSplitVertical->plug(menu);
+ actionEditBreakLayout->plug(menu);
+ menu->insertSeparator();
+ a->plug(menu);
+}
+
+void MainWindow::setupToolActions()
+{
+ actionPointerTool = new KToggleAction(i18n("Pointer"), "arrow", Key_F2,
+ this, SLOT(toolSelected()), actionCollection(),
+ QString::number(POINTER_TOOL).latin1());
+ actionPointerTool->setToolTip(i18n("Selects the pointer tool"));
+ actionPointerTool->setWhatsThis(whatsThisFrom("Tools|Pointer"));
+ actionPointerTool->setExclusiveGroup("tool");
+
+ actionConnectTool = new KToggleAction(i18n("Connect Signal/Slots"), createIconSet("connecttool.xpm"),
+ Key_F3, this, SLOT(toolSelected()), actionCollection(),
+ QString::number(CONNECT_TOOL).latin1());
+ actionConnectTool->setToolTip(i18n("Selects the connection tool"));
+ actionConnectTool->setWhatsThis(whatsThisFrom("Tools|Connect Signals and Slots"));
+ actionConnectTool->setExclusiveGroup("tool");
+
+ actionOrderTool = new KToggleAction(i18n("Tab Order"), createIconSet("ordertool.xpm"),
+ Key_F4, this, SLOT(toolSelected()), actionCollection(),
+ QString::number(ORDER_TOOL).latin1());
+ actionOrderTool->setToolTip(i18n("Selects the tab order tool"));
+ actionOrderTool->setWhatsThis(whatsThisFrom("Tools|Tab Order"));
+ actionOrderTool->setExclusiveGroup("tool");
+
+ KToolBar *tb = new KToolBar(this, "Tools");
+ tb->setFullSize(false);
+ QWhatsThis::add(tb, i18n("<b>The Tools toolbar</b>%1").arg(toolbarHelp));
+
+ addToolBar(tb, i18n("Tools"), QMainWindow::DockTop, true);
+ actionPointerTool->plug(tb);
+ actionConnectTool->plug(tb);
+ actionOrderTool->plug(tb);
+
+ QPopupMenu *mmenu = new QPopupMenu(this, "Tools");
+ menuBar()->insertItem(i18n("&Tools"), mmenu);
+ actionPointerTool->plug(mmenu);
+ actionConnectTool->plug(mmenu);
+ actionOrderTool->plug(mmenu);
+ mmenu->insertSeparator();
+
+ for (int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j)
+ {
+ QString grp = WidgetDatabase::widgetGroup(j);
+ if (!WidgetDatabase::isGroupVisible(grp) || WidgetDatabase::isGroupEmpty(grp))
+ continue;
+ KToolBar *tb = new KToolBar(this, grp.latin1());
+ tb->setFullSize(false);
+ bool plural = grp[(int) grp.length() - 1] == 's';
+ if (plural)
+ {
+ QWhatsThis::add(tb, i18n("<b>The %1</b>%2").arg(grp).arg(toolbarHelp).
+ arg(i18n(" Click on a button to insert a single widget, "
+ "or double click to insert multiple %1.")).arg(grp));
+ } else
+ {
+ QWhatsThis::add(tb, i18n("<b>The %1 Widgets</b>%2").arg(grp).arg(toolbarHelp).
+ arg(i18n(" Click on a button to insert a single %1 widget, "
+ "or double click to insert multiple widgets.")).arg(grp));
+ }
+ addToolBar(tb, grp);
+ QPopupMenu *menu = new QPopupMenu(this, grp.latin1());
+ mmenu->insertItem(grp, menu);
+
+ for (int i = 0; i < WidgetDatabase::count(); ++i)
+ {
+ if (WidgetDatabase::group(i) != grp)
+ continue; // only widgets, i.e. not forms and temp stuff
+ KToggleAction *a = new KToggleAction(WidgetDatabase::className(i), KShortcut::null(),
+ this, SLOT(toolSelected()), actionCollection(), QString::number(i).latin1());
+ a->setExclusiveGroup("tool");
+ QString atext = WidgetDatabase::className(i);
+ if (atext[0] == 'Q')
+ atext = atext.mid(1);
+ while (atext.length() && atext[0] >= 'a' && atext[0] <= 'z')
+ atext = atext.mid(1);
+ if (atext.isEmpty())
+ atext = WidgetDatabase::className(i);
+ a->setText(atext);
+ QString ttip = WidgetDatabase::toolTip(i);
+ a->setIconSet(WidgetDatabase::iconSet(i));
+ a->setToolTip(ttip);
+ if (!WidgetDatabase::isWhatsThisLoaded())
+ WidgetDatabase::loadWhatsThis(documentationPath());
+ a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::className(i)));
+
+ QString whats = i18n("<b>A %1</b>").arg(WidgetDatabase::className(i));
+ if (!WidgetDatabase::whatsThis(i).isEmpty())
+ whats += QString("<p>%1</p>").arg(WidgetDatabase::whatsThis(i));
+ a->setWhatsThis(whats + i18n("<p>Double click on this tool to keep it selected.</p>"));
+
+ if (grp != "KDE")
+ a->plug(tb);
+ a->plug(menu);
+ }
+ }
+
+ // add external Kommander dialogs for Editor
+ m_editorTools.clear();
+ QPopupMenu* editMenu = new QPopupMenu(this);
+ QStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/editor");
+ for (QStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it)
+ {
+ if (!QFile::exists(*it))
+ continue;
+ QDir dir(*it);
+ const QFileInfoList* fileList = dir.entryInfoList(QDir::DefaultFilter, QDir::DirsFirst | QDir::Name);
+ if (fileList)
+ for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
+ {
+ QFileInfo* fi = fit.current();
+ if (!fi->isFile() || fi->extension() != "kmdr")
+ continue;
+ QString name = fi->baseName();
+ name = name.replace("_", " ");
+ editMenu->insertItem(name, this, SLOT(editExternalTool(int)), 0, m_editorTools.count());
+ m_editorTools.append(fi->filePath());
+ }
+ }
+ if (editMenu->count())
+ mmenu->insertItem(i18n("Editor"), editMenu);
+
+ resetTool();
+}
+
+void MainWindow::setupFileActions()
+{
+ fileTb = new KToolBar(this, "File");
+ fileTb->setFullSize(false);
+
+ QWhatsThis::add(fileTb, i18n("<b>The File toolbar</b>%1").arg(toolbarHelp));
+ addToolBar(fileTb, i18n("File"));
+ fileMenu = new QPopupMenu(this, "File");
+ menuBar()->insertItem(i18n("&File"), fileMenu);
+
+ KAction *a = KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
+ a->setToolTip(i18n("Creates a new dialog"));
+ a->setWhatsThis(whatsThisFrom("File|New"));
+ a->plug(fileTb);
+ a->plug(fileMenu);
+
+ a = KStdAction::open(this, SLOT(fileOpen()), actionCollection());
+ a->setToolTip(i18n("Opens an existing dialog"));
+ a->setWhatsThis(whatsThisFrom("File|Open"));
+ a->plug(fileTb);
+ a->plug(fileMenu);
+
+ actionRecent = KStdAction::openRecent(this, SLOT(fileOpenRecent(const KURL&)), actionCollection());
+ actionRecent->setToolTip(i18n("Opens recently open file"));
+ actionRecent->plug(fileMenu);
+
+ fileMenu->insertSeparator();
+ a = KStdAction::close(this, SLOT(fileClose()), actionCollection());
+ a->setToolTip(i18n("Closes the current dialog"));
+ a->setWhatsThis(whatsThisFrom("File|Close"));
+ connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool)));
+ a->plug(fileMenu);
+
+ fileMenu->insertSeparator();
+
+ a = KStdAction::save(this, SLOT(fileSave()), actionCollection());
+ a->setToolTip(i18n("Saves the current dialog"));
+ a->setWhatsThis(whatsThisFrom("File|Save"));
+ connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool)));
+ a->plug(fileTb);
+ a->plug(fileMenu);
+
+ a = KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
+ a->setToolTip(i18n("Saves the current dialog with a new filename"));
+ a->setWhatsThis(whatsThisFrom("File|Save As"));
+ connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool)));
+ a->plug(fileMenu);
+
+ a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), this, SLOT(fileSaveAll()),
+ actionCollection(), "file_close_all");
+ a->setToolTip(i18n("Saves all open dialogs"));
+ a->setWhatsThis(whatsThisFrom("File|Save All"));
+ connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool)));
+ a->plug(fileMenu);
+
+ fileMenu->insertSeparator();
+
+ a = KStdAction::quit(kapp, SLOT(closeAllWindows()), actionCollection());
+ a->setToolTip(i18n("Quits the application and prompts to save any changed dialogs"));
+ a->setWhatsThis(whatsThisFrom("File|Exit"));
+ a->plug(fileMenu);
+}
+
+
+void MainWindow::setupRunActions()
+{
+ QPopupMenu *menu = new QPopupMenu(this, "Run");
+ menuBar()->insertItem(i18n("&Run"), menu);
+
+ KAction* a = new KAction(i18n("Run Dialog"), "run", CTRL + Key_R,
+ this, SLOT(runForm()), actionCollection(), "run");
+ a->setToolTip(i18n("Executes dialog"));
+ a->setWhatsThis(whatsThisFrom("Run|Run dialog"));
+ connect(this, SIGNAL(hasActiveForm(bool)), a, SLOT(setEnabled(bool)));
+ a->plug(fileTb);
+ a->plug(menu);
+ // add KDE4 executor
+
+ KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + Qt::Key_R,
+ this, SLOT(runForm4()), actionCollection(), "run4");
+ b->setToolTip(i18n("Executes dialog in KDE4"));
+ b->setWhatsThis(whatsThisFrom("Run|Run dialog"));
+ connect(this, SIGNAL(hasActiveForm(bool)), b, SLOT(setEnabled(bool)));
+ b->plug(menu);
+}
+
+void MainWindow::setupWindowActions()
+{
+ static bool windowActionsSetup = false;
+ if (!windowActionsSetup)
+ {
+ windowActionsSetup = true;
+
+ KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), qworkspace, SLOT(tile()),
+ actionCollection(), "window_tile");
+ actionWindowTile->setToolTip(i18n("Tiles the windows so that they are all visible"));
+ actionWindowTile->setWhatsThis(whatsThisFrom("Window|Tile"));
+
+ KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, SLOT(cascade()),
+ actionCollection(), "window_cascade");
+ actionWindowCascade->setToolTip(i18n("Cascades the windows so that all their title bars are visible"));
+ actionWindowCascade->setWhatsThis(whatsThisFrom("Window|Cascade"));
+
+ KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, SLOT(closeActiveWindow()),
+ actionCollection(), "window_close");
+ actionWindowClose->setToolTip(i18n("Closes the active window"));
+ actionWindowClose->setWhatsThis(whatsThisFrom("Window|Close"));
+
+ KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), qworkspace,
+ SLOT(closeAllWindows()), actionCollection(), "window_close_all");
+ actionWindowCloseAll->setToolTip(i18n("Closes all form windows"));
+ actionWindowCloseAll->setWhatsThis(whatsThisFrom("Window|Close All"));
+
+ KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, qworkspace,
+ SLOT(activateNextWindow()), actionCollection(), "window_next");
+ actionWindowNext->setToolTip(i18n("Activates the next window"));
+ actionWindowNext->setWhatsThis(whatsThisFrom("Window|Next"));
+
+ KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, qworkspace,
+ SLOT(activatePreviousWindow()), actionCollection(), "window_prev");
+ actionWindowPrevious->setToolTip(i18n("Activates the previous window"));
+ actionWindowPrevious->setWhatsThis(whatsThisFrom("Window|Previous"));
+
+ windowMenu = new KPopupMenu(this, "Window");
+ menuBar()->insertItem(i18n("&Window"), windowMenu);
+ connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(setupWindowActions()));
+
+ actionWindowClose->plug(windowMenu);
+ actionWindowCloseAll->plug(windowMenu);
+ windowMenu->insertSeparator();
+ actionWindowNext->plug(windowMenu);
+ actionWindowPrevious->plug(windowMenu);
+ windowMenu->insertSeparator();
+ actionWindowTile->plug(windowMenu);
+ actionWindowCascade->plug(windowMenu);
+ windowMenu->insertSeparator();
+ windowMenu->insertItem(i18n("Vie&ws"), dockHideShowMenu());
+ windowMenu->insertItem(i18n("Tool&bars"), createDockWindowMenu(OnlyToolBars));
+ }
+
+ //FIXME find a better way to remove only menu items linked to dialogs/forms
+ while (windowMenu->count() > 11)
+ windowMenu->removeItemAt(windowMenu->count() - 1);
+
+ QWidgetList windows = qworkspace->windowList();
+ if (windows.count() && formWindow())
+ windowMenu->insertSeparator();
+ int j = 0;
+ for (int i = 0; i < int (windows.count()); ++i)
+ {
+ QWidget *w = windows.at(i);
+ if (!w->inherits("FormWindow") && !w->inherits("SourceEditor"))
+ continue;
+ j++;
+ QString itemText;
+ if (j < 10)
+ itemText = QString("&%1 ").arg(j);
+ if (w->inherits("FormWindow"))
+ itemText += w->name();
+ else
+ itemText += w->caption();
+
+ int id = windowMenu->insertItem(itemText, this, SLOT(windowsMenuActivated(int)));
+ windowMenu->setItemParameter(id, i);
+ windowMenu->setItemChecked(id, qworkspace->activeWindow() == windows.at(i));
+ }
+}
+
+
+void MainWindow::setupSettingsActions()
+{
+ KPopupMenu *settings = new KPopupMenu(this, "Settings");
+ KAction* a = KStdAction::keyBindings(this, SLOT(editShortcuts()), actionCollection());
+ a->setToolTip(i18n("Opens a dialog to change shortcuts"));
+ a->plug(settings);
+
+ a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), this, SLOT(editPlugins()),
+ actionCollection(), "configure_plugins");
+ a->setToolTip(i18n("Opens a dialog to configure plugins"));
+ a->plug(settings);
+
+ a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), this, SLOT(configureEditor()),
+ actionCollection(), "configure_editor");
+ a->setToolTip(i18n("Configure various aspects of this editor."));
+ a->plug(settings);
+
+ a = KStdAction::preferences(this, SLOT(editPreferences()), actionCollection());
+ a->setToolTip(i18n("Opens a dialog to change preferences"));
+ a->setWhatsThis(whatsThisFrom("Edit|Preferences"));
+ a->plug(settings);
+
+ menuBar()->insertItem( i18n("&Settings"), settings);
+}
+
+void MainWindow::setupHelpActions()
+{
+ KPopupMenu *help = helpMenu();
+ menuBar()->insertItem( i18n("&Help"), help);
+}
+
+
+void MainWindow::fileNew()
+{
+ statusBar()->message(i18n("Create a new dialog..."));
+ NewForm dlg(this, QString::null);
+ dlg.exec();
+ statusBar()->clear();
+}
+
+void MainWindow::fileClose()
+{
+ QWidget *w = qworkspace->activeWindow();
+ if (w->inherits("FormWindow"))
+ {
+ emit removedFormFile(((FormWindow *) w)->formFile());
+ ((FormWindow *) w)->formFile()->close();
+ }
+}
+
+void MainWindow::fileOpen() // as called by the menu
+{
+ fileOpen("");
+}
+
+void MainWindow::fileOpen(const QString & fn)
+{
+ statusBar()->message(i18n("Open a file..."));
+ QStringList additionalSources;
+
+ QStringList filenames;
+ if (fn.isEmpty())
+ filenames = KFileDialog::getOpenFileNames(QString::null, i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
+ else
+ filenames << fn;
+ for (QStringList::ConstIterator fit = filenames.constBegin(); fit != filenames.constEnd(); ++fit)
+ {
+ QString filename = *fit;
+ if (!filename.isEmpty())
+ {
+ QFileInfo fi(filename);
+ if (fi.exists() && openFormWindow(filename))
+ actionRecent->addURL(filename);
+ }
+ }
+}
+
+
+
+FormWindow *MainWindow::openFormWindow(const QString &filename, bool validFileName, FormFile *ff)
+{
+ if (filename.isEmpty())
+ return 0;
+
+ bool makeNew = false;
+
+ if (!QFile::exists(filename))
+ {
+ makeNew = true;
+ } else
+ {
+ QFile f(filename);
+ f.open(IO_ReadOnly);
+ QTextStream ts(&f);
+ makeNew = ts.read().length() < 2;
+ }
+ if (!makeNew)
+ {
+ statusBar()->message(i18n("Reading file '%1'...").arg(filename));
+ if (QFile::exists(filename))
+ {
+ QApplication::setOverrideCursor(WaitCursor);
+ Resource resource(this);
+ if (!ff)
+ ff = new FormFile(filename, false);
+ bool b = resource.load(ff) && (FormWindow *) resource.widget();
+ if (!validFileName && resource.widget())
+ ((FormWindow *) resource.widget())->setFileName(QString::null);
+ QApplication::restoreOverrideCursor();
+ if (b)
+ {
+ statusBar()->message(i18n("Loaded file '%1'").arg(filename), 3000);
+ } else
+ {
+ emit removedFormFile(ff);
+ ff->close();
+ delete ff;
+ statusBar()->message(i18n("Could not load file '%1'").arg(filename), 5000);
+ KMessageBox::information(this, i18n("Could not load file '%1'").arg(filename), i18n("Load File"));
+ }
+ return (FormWindow *) resource.widget();
+ } else
+ {
+ statusBar()->clear();
+ }
+ } else
+ {
+ fileNew();
+ if (formWindow())
+ formWindow()->setFileName(filename);
+ return formWindow();
+ }
+ return 0;
+}
+
+bool MainWindow::fileSave()
+{
+ return fileSaveForm();
+}
+
+bool MainWindow::fileSaveForm()
+{
+ FormWindow* fw = 0;
+ if (!fw)
+ fw = formWindow();
+ if (!fw || !fw->formFile()->save())
+ return false;
+ QApplication::restoreOverrideCursor();
+ return true;
+}
+
+bool MainWindow::fileSaveAs()
+{
+ statusBar()->message(i18n("Enter a filename..."));
+
+ QWidget *w = qworkspace->activeWindow();
+ if (!w)
+ return true;
+ if (w->inherits("FormWindow"))
+ return ((FormWindow *) w)->formFile()->saveAs();
+ return false;
+}
+
+void MainWindow::fileSaveAll()
+{
+ QWidgetList windows = qworkspace->windowList(QWorkspace::StackingOrder);
+ for (int i = 0; i < (int)windows.count(); ++i)
+ {
+ FormWindow* fw = dynamic_cast<FormWindow*>(windows.at(i));
+ if (fw)
+ fw->formFile()->save();
+ }
+}
+
+static bool inSaveAllTemp = false;
+
+void MainWindow::saveAllTemp()
+{
+ if (inSaveAllTemp)
+ return;
+ inSaveAllTemp = true;
+ statusBar()->message(i18n("Qt Designer is crashing. Attempting to save files..."));
+ QWidgetList windows = qWorkspace()->windowList();
+ QString baseName = QDir::homeDirPath() + "/.designer/saved-form-";
+ int i = 1;
+ for (QWidget * w = windows.first(); w; w = windows.next())
+ {
+ if (!w->inherits("FormWindow"))
+ continue;
+
+ QString fn = baseName + QString::number(i++) + ".kmdr";
+ ((FormWindow *) w)->setFileName(fn);
+ ((FormWindow *) w)->formFile()->save();
+ }
+ inSaveAllTemp = false;
+}
+
+void MainWindow::fileCreateTemplate()
+{
+ CreateTemplate dia(this, 0, true);
+
+ int i = 0;
+ for (i = 0; i < WidgetDatabase::count(); ++i)
+ {
+ if (WidgetDatabase::isForm(i) && WidgetDatabase::widgetGroup(i) != "Temp")
+ {
+ dia.listClass->insertItem(WidgetDatabase::className(i));
+ }
+ }
+ for (i = 0; i < WidgetDatabase::count(); ++i)
+ {
+ if (WidgetDatabase::isContainer(i) && !WidgetDatabase::isForm(i) &&
+ WidgetDatabase::className(i) != "QTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp")
+ {
+ dia.listClass->insertItem(WidgetDatabase::className(i));
+ }
+ }
+
+ dia.editName->setText(i18n("NewTemplate"));
+ connect(dia.buttonCreate, SIGNAL(clicked()), this, SLOT(createNewTemplate()));
+ dia.exec();
+}
+
+void MainWindow::createNewTemplate()
+{
+ CreateTemplate *dia = (CreateTemplate *) sender()->parent();
+ QString fn = dia->editName->text();
+ QString cn = dia->listClass->currentText();
+ if (fn.isEmpty() || cn.isEmpty())
+ {
+ KMessageBox::information(this, i18n("Could not create the template"), i18n("Create Template"));
+ return;
+ }
+
+ QStringList templRoots;
+ const char *qtdir = getenv("QTDIR");
+ if (qtdir)
+ templRoots << qtdir;
+#ifdef QT_INSTALL_PREFIX
+ templRoots << QT_INSTALL_PREFIX;
+#endif
+#ifdef QT_INSTALL_DATA
+ templRoots << QT_INSTALL_DATA;
+#endif
+ if (qtdir) //try the tools/designer directory last!
+ templRoots << QString(qtdir) + "/tools/designer";
+ QFile f;
+ for (QStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it)
+ {
+ if (QFile::exists((*it) + "/templates/"))
+ {
+ QString tmpfn = (*it) + "/templates/" + fn + ".kmdr";
+ f.setName(tmpfn);
+ if (f.open(IO_WriteOnly))
+ break;
+ }
+ }
+ if (!f.isOpen())
+ {
+ KMessageBox::information(this, i18n("Could not create the template"), i18n("Create Template"));
+ return;
+ }
+ QTextStream ts(&f);
+
+ ts << "<!DOCTYPE UI><UI>" << endl;
+ ts << "<widget>" << endl;
+ ts << "<class>" << cn << "</class>" << endl;
+ ts << "<property stdset=\"1\">" << endl;
+ ts << " <name>name</name>" << endl;
+ ts << " <cstring>" << cn << "Form</cstring>" << endl;
+ ts << "</property>" << endl;
+ ts << "<property stdset=\"1\">" << endl;
+ ts << " <name>geometry</name>" << endl;
+ ts << " <rect>" << endl;
+ ts << " <width>300</width>" << endl;
+ ts << " <height>400</height>" << endl;
+ ts << " </rect>" << endl;
+ ts << "</property>" << endl;
+ ts << "</widget>" << endl;
+ ts << "</UI>" << endl;
+
+ dia->editName->setText(i18n("NewTemplate"));
+
+ f.close();
+}
+
+void MainWindow::editUndo()
+{
+ if (formWindow())
+ formWindow()->undo();
+}
+
+void MainWindow::editRedo()
+{
+ if (formWindow())
+ formWindow()->redo();
+}
+
+void MainWindow::editCut()
+{
+ editCopy();
+ editDelete();
+}
+
+void MainWindow::editCopy()
+{
+ if (formWindow())
+ qApp->clipboard()->setText(formWindow()->copy());
+}
+
+void MainWindow::editPaste()
+{
+ if (!formWindow())
+ return;
+
+ QWidget *w = formWindow()->mainContainer();
+ QWidgetList l(formWindow()->selectedWidgets());
+ if (l.count() == 1)
+ {
+ w = l.first();
+ if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
+ (!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::
+ classNameOf(w))) && w != formWindow()->mainContainer()))
+ w = formWindow()->mainContainer();
+ }
+
+ if (w && WidgetFactory::layoutType(w) == WidgetFactory::NoLayout)
+ {
+ formWindow()->paste(qApp->clipboard()->text(), WidgetFactory::containerOfWidget(w));
+ hierarchyView->widgetInserted(0);
+ formWindow()->commandHistory()->setModified(true);
+ } else
+ {
+ KMessageBox::information(this, i18n("Cannot paste widgets. Designer could not find a container\n"
+ "to paste into which does not contain a layout. Break the layout\n"
+ "of the container you want to paste into and select this container\n"
+ "and then paste again."), i18n("Paste Error"));
+ }
+}
+
+void MainWindow::editDelete()
+{
+ if (formWindow())
+ formWindow()->deleteWidgets();
+}
+
+void MainWindow::editSelectAll()
+{
+ if (formWindow())
+ formWindow()->selectAll();
+}
+
+void MainWindow::editLower()
+{
+ if (formWindow())
+ formWindow()->lowerWidgets();
+}
+
+void MainWindow::editRaise()
+{
+ if (formWindow())
+ formWindow()->raiseWidgets();
+}
+
+void MainWindow::editAdjustSize()
+{
+ if (formWindow())
+ formWindow()->editAdjustSize();
+}
+
+void MainWindow::editLayoutHorizontal()
+{
+ if (layoutChilds)
+ editLayoutContainerHorizontal();
+ else if (layoutSelected && formWindow())
+ formWindow()->layoutHorizontal();
+}
+
+void MainWindow::editLayoutVertical()
+{
+ if (layoutChilds)
+ editLayoutContainerVertical();
+ else if (layoutSelected && formWindow())
+ formWindow()->layoutVertical();
+}
+
+void MainWindow::editLayoutHorizontalSplit()
+{
+ if (layoutChilds)
+ ; // no way to do that
+ else if (layoutSelected && formWindow())
+ formWindow()->layoutHorizontalSplit();
+}
+
+void MainWindow::editLayoutVerticalSplit()
+{
+ if (layoutChilds)
+ ; // no way to do that
+ else if (layoutSelected && formWindow())
+ formWindow()->layoutVerticalSplit();
+}
+
+void MainWindow::editLayoutGrid()
+{
+ if (layoutChilds)
+ editLayoutContainerGrid();
+ else if (layoutSelected && formWindow())
+ formWindow()->layoutGrid();
+}
+
+void MainWindow::editLayoutContainerVertical()
+{
+ if (!formWindow())
+ return;
+ QWidget *w = formWindow()->mainContainer();
+ QWidgetList l(formWindow()->selectedWidgets());
+ if (l.count() == 1)
+ w = l.first();
+ if (w)
+ formWindow()->layoutVerticalContainer(w);
+}
+
+void MainWindow::editLayoutContainerHorizontal()
+{
+ if (!formWindow())
+ return;
+ QWidget *w = formWindow()->mainContainer();
+ QWidgetList l(formWindow()->selectedWidgets());
+ if (l.count() == 1)
+ w = l.first();
+ if (w)
+ formWindow()->layoutHorizontalContainer(w);
+}
+
+void MainWindow::editLayoutContainerGrid()
+{
+ if (!formWindow())
+ return;
+ QWidget *w = formWindow()->mainContainer();
+ QWidgetList l(formWindow()->selectedWidgets());
+ if (l.count() == 1)
+ w = l.first();
+ if (w)
+ formWindow()->layoutGridContainer(w);
+}
+
+
+void MainWindow::editBreakLayout()
+{
+ if (!formWindow() || !breakLayout)
+ {
+ return;
+ }
+ QWidget *w = formWindow()->mainContainer();
+ if (formWindow()->currentWidget())
+ w = formWindow()->currentWidget();
+ if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
+ w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ {
+ formWindow()->breakLayout(w);
+ return;
+ }
+ else
+ {
+ QWidgetList widgets = formWindow()->selectedWidgets();
+ for (w = widgets.first(); w; w = widgets.next())
+ {
+ if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
+ w->parentWidget()
+ && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ break;
+ }
+ if (w)
+ {
+ formWindow()->breakLayout(w);
+ return;
+ }
+ }
+
+ w = formWindow()->mainContainer();
+ if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
+ w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ {
+ formWindow()->breakLayout(w);
+ }
+}
+
+void MainWindow::editAccels()
+{
+ if (formWindow())
+ formWindow()->checkAccels();
+}
+
+
+void MainWindow::editConnections()
+{
+ if (!formWindow())
+ return;
+
+ statusBar()->message(i18n("Edit connections..."));
+ ConnectionEditor editor(this, 0, 0, formWindow());
+ editor.exec();
+ statusBar()->clear();
+}
+
+void MainWindow::editFindGlobal()
+{
+ if (!formWindow())
+ return;
+
+}
+
+
+void MainWindow::editFormSettings()
+{
+ if (!formWindow())
+ return;
+
+ statusBar()->message(i18n("Edit the current form's settings..."));
+ FormSettings dlg(this, formWindow());
+ dlg.exec();
+ statusBar()->clear();
+}
+
+void MainWindow::editPreferences()
+{
+ statusBar()->message(i18n("Edit preferences..."));
+ Preferences *dia = new Preferences(this, 0, true);
+ prefDia = dia;
+ connect(dia->helpButton, SIGNAL(clicked()), MainWindow::self, SLOT(showDialogHelp()));
+ dia->buttonColor->setEditor(StyledButton::ColorEditor);
+ dia->buttonPixmap->setEditor(StyledButton::PixmapEditor);
+ dia->checkBoxShowGrid->setChecked(sGrid);
+ dia->checkBoxGrid->setChecked(snGrid);
+ dia->spinGridX->setValue(grid().x());
+ dia->spinGridY->setValue(grid().y());
+ dia->checkBoxWorkspace->setChecked(restoreConfig);
+ dia->checkBoxBigIcons->setChecked(usesBigPixmaps());
+ dia->checkBoxBigIcons->hide(); // ##### disabled for now
+ dia->checkBoxTextLabels->setChecked(usesTextLabel());
+ dia->buttonColor->setColor(qworkspace->backgroundColor());
+ if (qworkspace->backgroundPixmap())
+ dia->buttonPixmap->setPixmap(*qworkspace->backgroundPixmap());
+ if (backPix)
+ dia->radioPixmap->setChecked(true);
+ else
+ dia->radioColor->setChecked(true);
+ dia->checkBoxSplash->setChecked(splashScreen);
+ dia->editDocPath->setText(docPath);
+ dia->checkAutoEdit->setChecked(!databaseAutoEdit);
+ connect(dia->buttonDocPath, SIGNAL(clicked()), this, SLOT(chooseDocPath()));
+
+ if (dia->exec() == QDialog::Accepted)
+ {
+ setSnapGrid(dia->checkBoxGrid->isChecked());
+ setShowGrid(dia->checkBoxShowGrid->isChecked());
+ setGrid(QPoint(dia->spinGridX->value(), dia->spinGridY->value()));
+ restoreConfig = dia->checkBoxWorkspace->isChecked();
+ setUsesBigPixmaps(false /*dia->checkBoxBigIcons->isChecked() */ ); // ### disable for now
+ setUsesTextLabel(dia->checkBoxTextLabels->isChecked());
+ if (dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap())
+ {
+ qworkspace->setBackgroundPixmap(*dia->buttonPixmap->pixmap());
+ backPix = true;
+ } else
+ {
+ qworkspace->setBackgroundColor(dia->buttonColor->color());
+ backPix = false;
+ }
+ splashScreen = dia->checkBoxSplash->isChecked();
+ docPath = dia->editDocPath->text();
+ databaseAutoEdit = !dia->checkAutoEdit->isChecked();
+ }
+ delete dia;
+ prefDia = 0;
+ statusBar()->clear();
+}
+
+void MainWindow::editShortcuts()
+{
+ KKeyDialog K(false);
+ K.configure(actionCollection());
+}
+
+void MainWindow::editPlugins()
+{
+ KProcess process;
+ process << "kmdr-plugins";
+ process.start(KProcess::Block);
+}
+
+void MainWindow::configureEditor()
+{
+ KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", 0L, "KTextEditor::Document");
+ KTextEditor::View *view = doc->createView(0);
+ KTextEditor::ConfigInterface *configIf = KTextEditor::configInterface(doc);
+ configIf->configDialog();
+ delete doc;
+}
+
+void MainWindow::editExternalTool(int id)
+{
+ KProcess* process = new KProcess;
+ (*process) << "kmdr-executor" << m_editorTools[id];
+ connect(process, SIGNAL(processExited(KProcess*)), SLOT(editToolExited(KProcess*)));
+ connect(process, SIGNAL(receivedStdout(KProcess*, char*, int)), SLOT(editToolOutput(KProcess*, char*, int)));
+ m_toolOutput = '\0';
+ process->start(KProcess::NotifyOnExit, KProcess::Stdout);
+}
+
+void MainWindow::editToolExited(KProcess* process)
+{
+ delete process;
+}
+
+void MainWindow::editToolOutput(KProcess*, char* buffer, int buflen)
+{
+ m_toolOutput += QString::fromLocal8Bit(buffer, buflen);
+}
+
+void MainWindow::chooseDocPath()
+{
+ if (!prefDia)
+ return;
+ QString fn = KFileDialog::getExistingDirectory(QString::null, this);
+ if (!fn.isEmpty())
+ prefDia->editDocPath->setText(fn);
+}
+
+
diff --git a/kommander/editor/messagelog.cpp b/kommander/editor/messagelog.cpp
new file mode 100644
index 00000000..952dd19f
--- /dev/null
+++ b/kommander/editor/messagelog.cpp
@@ -0,0 +1,149 @@
+/***************************************************************************
+ messagelog.cpp - Kommander dialog output
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 "messagelog.h"
+
+#include <kapplication.h>
+#include <kfiledialog.h>
+#include <kiconloader.h>
+#include <klistbox.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+#include <kprocess.h>
+
+#include <qclipboard.h>
+#include <qfile.h>
+#include <qtextstream.h>
+
+MessageLog::MessageLog(QWidget* parent, const char* name) : QTabWidget(parent, name)
+{
+ m_popupMenu = new KPopupMenu(this);
+ m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, SLOT(copyLine()));
+ m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("&Copy Content"), this, SLOT(copyContent()));
+ m_popupMenu->insertItem(SmallIconSet("filesaveas"), i18n("&Save As..."), this, SLOT(saveToFile()));
+ m_popupMenu->insertSeparator();
+ m_popupMenu->insertItem(SmallIconSet("editclear"), i18n("Clear"), this, SLOT(clearContent()));
+
+ for (int i = 0; i < m_listCount; i++)
+ {
+ m_lists[i] = new KListBox(this);
+ addTab(m_lists[i], m_listNames[i]);
+ m_seenEOL[i] = false;
+ connect(m_lists[i], SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)),
+ this, SLOT(showMenu(QListBoxItem*, const QPoint&)));
+ }
+}
+
+MessageLog::~MessageLog()
+{
+}
+
+void MessageLog::insertItem(InfoType i, QString text)
+{
+ bool seenEOL = text.endsWith("\n");
+ if (seenEOL)
+ text.truncate(text.length() - 1);
+ QStringList items(QStringList::split('\n', text));
+ for (QStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
+ {
+ if (!m_seenEOL[i] && m_lists[i]->count() && it == items.begin())
+ m_lists[i]->changeItem(m_lists[i]->text(m_lists[i]->count() - 1) + *it, m_lists[i]->count() - 1);
+ else
+ m_lists[i]->insertItem(*it);
+ }
+ m_seenEOL[i] = seenEOL;
+ m_lists[i]->setCurrentItem(m_lists[i]->count()-1);
+ m_lists[i]->ensureCurrentVisible();
+}
+
+QString MessageLog::content()
+{
+ QString p_content;
+ KListBox* list = m_lists[currentPageIndex()];
+ for (uint i=0; i < list->count(); i++)
+ p_content.append(list->text(i) + "\n");
+ return p_content;
+}
+
+void MessageLog::clear(InfoType i)
+{
+ if (i != All)
+ {
+ m_lists[(int)i]->clear();
+ m_seenEOL[i] = false;
+ }
+ else
+ for (int i = 0; i < m_listCount; i++)
+ clear((InfoType)i);
+}
+
+void MessageLog::receivedStdout(KProcess*, char* buffer, int buflen)
+{
+ insertItem(Stdout, QString::fromLocal8Bit(buffer, buflen));
+}
+
+void MessageLog::receivedStderr(KProcess*, char* buffer, int buflen)
+{
+ insertItem(Stderr, QString::fromLocal8Bit(buffer, buflen));
+}
+
+void MessageLog::clearContent()
+{
+ clear((InfoType)currentPageIndex());
+}
+
+void MessageLog::copyLine()
+{
+ if (m_lists[currentPageIndex()]->count())
+ kapp->clipboard()->setText(m_lists[currentPageIndex()]->currentText(), QClipboard::Clipboard);
+}
+
+void MessageLog::copyContent()
+{
+ kapp->clipboard()->setText(content(), QClipboard::Clipboard);
+}
+
+void MessageLog::saveToFile()
+{
+ 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();
+}
+
+void MessageLog::showMenu(QListBoxItem*, const QPoint& l_point)
+{
+ m_popupMenu->exec(l_point);
+}
+
+QString MessageLog::m_listNames[m_listCount] = {i18n("Stdout"), i18n("Stderr")};
+
+#include "messagelog.moc"
+
diff --git a/kommander/editor/messagelog.h b/kommander/editor/messagelog.h
new file mode 100644
index 00000000..6b071cf4
--- /dev/null
+++ b/kommander/editor/messagelog.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ messagelog.h - Kommander dialog output
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 MESSAGELOG_H
+#define MESSAGELOG_H
+
+#include <qtabwidget.h>
+
+#include <klocale.h>
+
+class KListBox;
+class KProcess;
+class KPopupMenu;
+class QListBoxItem;
+
+class MessageLog : public QTabWidget
+{
+ Q_OBJECT
+public:
+ enum InfoType {Stdout, Stderr, All};
+ MessageLog(QWidget* parent = 0, const char* name = 0);
+ ~MessageLog();
+ virtual void insertItem(InfoType i, QString text);
+ virtual void clear(InfoType i = All);
+ QString content();
+public slots:
+ void receivedStdout(KProcess *proc, char *buffer, int buflen);
+ void receivedStderr(KProcess *proc, char *buffer, int buflen);
+ void clearContent();
+ void copyLine();
+ void copyContent();
+ void saveToFile();
+ void showMenu(QListBoxItem*, const QPoint& l_point);
+private:
+ static const int m_listCount = 2;
+ static QString m_listNames[m_listCount];
+ KListBox* m_lists[m_listCount];
+ bool m_seenEOL[m_listCount];
+ KPopupMenu* m_popupMenu;
+};
+
+#endif
diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp
new file mode 100644
index 00000000..b902f2f4
--- /dev/null
+++ b/kommander/editor/metadatabase.cpp
@@ -0,0 +1,1219 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#include "metadatabase.h"
+#include "widgetfactory.h"
+#include "formwindow.h"
+#include "parser.h"
+#include "widgetdatabase.h"
+#include "formfile.h"
+
+#include <qapplication.h>
+#include <qobject.h>
+#include <qlayout.h>
+#include <qptrdict.h>
+#include <qobjectlist.h>
+#include <qstrlist.h>
+#include <qmetaobject.h>
+#include <qwidgetlist.h>
+#include <qmainwindow.h>
+#include <qregexp.h>
+#include <private/qpluginmanager_p.h>
+#include <qdatetime.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qtextstream.h>
+
+#include <stdlib.h>
+
+
+class MetaDataBaseRecord
+{
+public:
+ QObject *object;
+ QStringList changedProperties;
+ QMap<QString,QVariant> fakeProperties;
+ QMap<QString, QString> propertyComments;
+ int spacing, margin;
+ QValueList<MetaDataBase::Connection> connections;
+ QValueList<MetaDataBase::Slot> slotList;
+ QValueList<MetaDataBase::Include> includes;
+ QStringList forwards, variables, sigs;
+ QWidgetList tabOrder;
+ MetaDataBase::MetaInfo metaInfo;
+ QCursor cursor;
+ QMap<int, QString> pixmapArguments;
+ QMap<int, QString> pixmapKeys;
+ QMap<QString, QString> columnFields;
+ QMap<QString, QStringList> eventFunctions;
+ QMap<QString, QString> functionBodies;
+ QMap<QString, QString> functionComments;
+ QValueList<int> breakPoints;
+ QString exportMacro;
+};
+
+static QPtrDict<MetaDataBaseRecord> *db = 0;
+static QPtrList<MetaDataBase::CustomWidget> *cWidgets = 0;
+static bool doUpdate = true;
+static QStringList langList;
+static QStringList editorLangList;
+
+/*!
+ \class MetaDataBase metadatabase.h
+ \brief Database which stores meta data of widgets
+
+ The MetaDataBase stores meta information of widgets, which are not
+ stored directly in widgets (properties). This is e.g. the
+ information which properties have been modified.
+*/
+
+MetaDataBase::MetaDataBase()
+{
+}
+
+inline void setupDataBase()
+{
+ if ( !db || !cWidgets ) {
+ db = new QPtrDict<MetaDataBaseRecord>( 1481 );
+ db->setAutoDelete( true );
+ cWidgets = new QPtrList<MetaDataBase::CustomWidget>;
+ cWidgets->setAutoDelete( true );
+ }
+}
+
+void MetaDataBase::clearDataBase()
+{
+ delete db;
+ db = 0;
+ delete cWidgets;
+ cWidgets = 0;
+}
+
+void MetaDataBase::addEntry( QObject *o )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ if ( db->find( o ) )
+ return;
+ MetaDataBaseRecord *r = new MetaDataBaseRecord;
+ r->object = o;
+ r->spacing = r->margin = -1;
+ db->insert( (void*)o, r );
+
+ WidgetFactory::initChangedProperties( o );
+}
+
+void MetaDataBase::removeEntry( QObject *o )
+{
+ setupDataBase();
+ db->remove( o );
+}
+
+void MetaDataBase::setPropertyChanged( QObject *o, const QString &property, bool changed )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ if ( changed ) {
+ if ( r->changedProperties.findIndex( property ) == -1 )
+ r->changedProperties.append( property );
+ } else {
+ if ( r->changedProperties.findIndex( property ) != -1 )
+ r->changedProperties.remove( property );
+ }
+
+ if ( doUpdate &&
+ ( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) {
+ doUpdate = false;
+ setPropertyChanged( o, "alignment", changed ||
+ isPropertyChanged( o, "hAlign" ) ||
+ isPropertyChanged( o, "vAlign" ) ||
+ isPropertyChanged( o, "wordwrap" ) );
+ doUpdate = true;
+ }
+
+ if ( doUpdate && property == "alignment" ) {
+ doUpdate = false;
+ setPropertyChanged( o, "hAlign", changed );
+ setPropertyChanged( o, "vAlign", changed );
+ setPropertyChanged( o, "wordwrap", changed );
+ doUpdate = true;
+ }
+}
+
+bool MetaDataBase::isPropertyChanged( QObject *o, const QString &property )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return false;
+ }
+
+ return r->changedProperties.findIndex( property ) != -1;
+}
+
+QStringList MetaDataBase::changedProperties( QObject *o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QStringList();
+ }
+
+ QStringList lst( r->changedProperties );
+ return lst;
+}
+
+void MetaDataBase::setPropertyComment( QObject *o, const QString &property, const QString &comment )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->propertyComments.insert( property, comment );
+}
+
+QString MetaDataBase::propertyComment( QObject *o, const QString &property )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QString::null;
+ }
+
+ return *r->propertyComments.find( property );
+}
+
+void MetaDataBase::setFakeProperty( QObject *o, const QString &property, const QVariant& value )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+ r->fakeProperties[property] = value;
+}
+
+QVariant MetaDataBase::fakeProperty( QObject * o, const QString &property)
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QVariant();
+ }
+ QMap<QString, QVariant>::Iterator it = r->fakeProperties.find( property );
+ if ( it != r->fakeProperties.end() )
+ return r->fakeProperties[property];
+ return WidgetFactory::defaultValue( o, property );
+
+}
+
+QMap<QString,QVariant>* MetaDataBase::fakeProperties( QObject* o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return 0;
+ }
+ return &r->fakeProperties;
+}
+
+void MetaDataBase::setSpacing( QObject *o, int spacing )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r || !o->isWidgetType() ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->spacing = spacing;
+ QLayout * layout = 0;
+ WidgetFactory::layoutType( (QWidget*)o, layout );
+ if ( layout )
+ layout->setSpacing( spacing );
+}
+
+int MetaDataBase::spacing( QObject *o )
+{
+ if ( !o )
+ return -1;
+ setupDataBase();
+ if ( o->inherits( "QMainWindow" ) )
+ o = ( (QMainWindow*)o )->centralWidget();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r || !o->isWidgetType() ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return -1;
+ }
+
+ return r->spacing;
+}
+
+void MetaDataBase::setMargin( QObject *o, int margin )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r || !o->isWidgetType() ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->margin = margin;
+ QLayout * layout = 0;
+ WidgetFactory::layoutType( (QWidget*)o, layout );
+ if ( margin < 1 )
+ margin = 1;
+ if ( layout )
+ layout->setMargin( margin );
+}
+
+int MetaDataBase::margin( QObject *o )
+{
+ if ( !o )
+ return -1;
+ setupDataBase();
+ if ( o->inherits( "QMainWindow" ) )
+ o = ( (QMainWindow*)o )->centralWidget();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r || !o->isWidgetType() ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return -1;
+ }
+
+ return r->margin;
+}
+
+void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &signal,
+ QObject *receiver, const QCString &slot )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+ Connection conn;
+ conn.sender = sender;
+ conn.signal = signal;
+ conn.receiver = receiver;
+ conn.slot = slot;
+ r->connections.append( conn );
+}
+
+void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString &signal,
+ QObject *receiver, const QCString &slot )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ for ( QValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
+ Connection conn = *it;
+ if ( conn.sender == sender &&
+ conn.signal == signal &&
+ conn.receiver == receiver &&
+ conn.slot == slot ) {
+ r->connections.remove( it );
+ break;
+ }
+ }
+}
+
+QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QValueList<Connection>();
+ }
+ return r->connections;
+}
+
+QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObject *sender,
+ QObject *receiver )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QValueList<Connection>();
+ }
+ QValueList<Connection>::Iterator it = r->connections.begin();
+ QValueList<Connection> ret;
+ QValueList<Connection>::Iterator conn;
+ while ( ( conn = it ) != r->connections.end() ) {
+ ++it;
+ if ( (*conn).sender == sender &&
+ (*conn).receiver == receiver )
+ ret << *conn;
+ }
+
+ return ret;
+}
+
+QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObject *object )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QValueList<Connection>();
+ }
+ QValueList<Connection>::Iterator it = r->connections.begin();
+ QValueList<Connection> ret;
+ QValueList<Connection>::Iterator conn;
+ while ( ( conn = it ) != r->connections.end() ) {
+ ++it;
+ if ( (*conn).sender == object ||
+ (*conn).receiver == object )
+ ret << *conn;
+ }
+ return ret;
+}
+
+void MetaDataBase::doConnections( QObject *o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ QObject *sender = 0, *receiver = 0;
+ QObjectList *l = 0;
+ QValueList<Connection>::Iterator it = r->connections.begin();
+ for ( ; it != r->connections.end(); ++it ) {
+ Connection conn = *it;
+ if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) {
+ sender = o;
+ } else {
+ l = o->queryList( 0, conn.sender->name(), false );
+ if ( !l || !l->first() ) {
+ delete l;
+ continue;
+ }
+ sender = l->first();
+ delete l;
+ }
+ if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) {
+ receiver = o;
+ } else {
+ l = o->queryList( 0, conn.receiver->name(), false );
+ if ( !l || !l->first() ) {
+ delete l;
+ continue;
+ }
+ receiver = l->first();
+ delete l;
+ }
+ QString s = "2""%1";
+ s = s.arg( conn.signal );
+ QString s2 = "1""%1";
+ s2 = s2.arg( conn.slot );
+
+ QStrList signalList = sender->metaObject()->signalNames( true );
+ QStrList slotList = receiver->metaObject()->slotNames( true );
+
+ // avoid warnings
+ if ( signalList.find( conn.signal ) == -1 ||
+ slotList.find( conn.slot ) == -1 )
+ continue;
+
+ QObject::connect( sender, s, receiver, s2 );
+ }
+}
+
+void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& specifier,
+ const QString &access, const QString &language, const QString &returnType )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ Slot s;
+ s.slot = slot;
+ s.specifier = specifier;
+ s.access = access;
+ s.language = language;
+ s.returnType = returnType;
+ QValueList<MetaDataBase::Slot>::Iterator it = r->slotList.find( s );
+ if ( it != r->slotList.end() )
+ r->slotList.remove( it );
+ r->slotList.append( s );
+#ifndef KOMMANDER
+ ( (FormWindow*)o )->formFile()->addSlotCode( s );
+#endif
+}
+
+void MetaDataBase::setSlotList( QObject *o, const QValueList<Slot> &slotList )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+ r->slotList = slotList;
+}
+
+void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString& specifier,
+ const QString &access, const QString &language, const QString &returnType )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ Slot s = *it;
+ if ( s.slot == slot &&
+ s.specifier == specifier &&
+ s.access == access &&
+ ( language.isEmpty() || s.language == language ) &&
+ ( returnType.isEmpty() || s.returnType == returnType ) ) {
+ r->slotList.remove( it );
+ break;
+ }
+ }
+}
+
+void MetaDataBase::removeSlot( QObject *o, const QString &slot )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ Slot s = *it;
+ if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) {
+ r->slotList.remove( it );
+ break;
+ }
+ }
+}
+
+QValueList<MetaDataBase::Slot> MetaDataBase::slotList( QObject *o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QValueList<Slot>();
+ }
+
+ return r->slotList;
+}
+
+bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return false;
+ }
+
+ QValueList<Connection> conns = connections( o );
+ for ( QValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) {
+ if ( (*it).slot == slot )
+ return true;
+ }
+ return false;
+}
+
+void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString &newName )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ Slot s = *it;
+ if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) {
+ (*it).slot = newName;
+ return;
+ }
+ }
+}
+
+void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot,
+ const QString& specifier, const QString &access,
+ const QString &language, const QString &returnType )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ Slot s = *it;
+ if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) {
+ (*it).specifier = specifier;
+ (*it).access = access;
+ (*it).language = language;
+ (*it).returnType = returnType;
+ return;
+ }
+ }
+}
+
+bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return false;
+ }
+
+ if ( !onlyCustom ) {
+ QStrList slotList = o->metaObject()->slotNames( true );
+ if ( slotList.find( slot ) != -1 )
+ return true;
+
+ if ( o->inherits( "FormWindow" ) ) {
+ o = ( (FormWindow*)o )->mainContainer();
+ slotList = o->metaObject()->slotNames( true );
+ if ( slotList.find( slot ) != -1 )
+ return true;
+ }
+
+ if ( o->inherits( "CustomWidget" ) ) {
+ MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget();
+ for ( QValueList<Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
+ QCString s = (*it).slot;
+ if ( !s.data() )
+ continue;
+ if ( s == slot )
+ return true;
+ }
+ }
+ }
+
+ for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ Slot s = *it;
+ if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) )
+ return true;
+ }
+
+ return false;
+}
+
+QString MetaDataBase::languageOfSlot( QObject *o, const QCString &slot )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QString::null;
+ }
+
+ QString sl = slot;
+ sl = normalizeSlot( sl );
+ for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ Slot s = *it;
+ QString sl2 = s.slot;
+ sl2 = normalizeSlot( sl2 );
+ if ( sl == sl2 )
+ return s.language;
+ }
+ return QString::null;
+}
+
+bool MetaDataBase::addCustomWidget( CustomWidget *wid )
+{
+ setupDataBase();
+
+ for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
+ if ( *wid == *w ) {
+ for ( QValueList<QCString>::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) {
+ if ( !w->hasSignal( *it ) )
+ w->lstSignals.append( *it );
+ }
+ for ( QValueList<Slot>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) {
+ if ( !w->hasSlot( MetaDataBase::normalizeSlot( (*it2).slot ).latin1() ) )
+ w->lstSlots.append( *it2 );
+ }
+ for ( QValueList<Property>::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) {
+ if ( !w->hasProperty( (*it3).property ) )
+ w->lstProperties.append( *it3 );
+ }
+ delete wid;
+ return false;
+ }
+ }
+
+
+ WidgetDatabaseRecord *r = new WidgetDatabaseRecord;
+ r->name = wid->className;
+ r->group = WidgetDatabase::widgetGroup( "Custom" );
+ r->toolTip = wid->className;
+ r->iconSet = new QIconSet( *wid->pixmap, *wid->pixmap );
+ r->isContainer = wid->isContainer;
+ wid->id = WidgetDatabase::addCustomWidget( r );
+ cWidgets->append( wid );
+ return true;
+}
+
+void MetaDataBase::removeCustomWidget( CustomWidget *w )
+{
+ cWidgets->removeRef( w );
+}
+
+QPtrList<MetaDataBase::CustomWidget> *MetaDataBase::customWidgets()
+{
+ setupDataBase();
+ return cWidgets;
+}
+
+MetaDataBase::CustomWidget *MetaDataBase::customWidget( int id )
+{
+ for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
+ if ( id == w->id )
+ return w;
+ }
+ return 0;
+}
+
+bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid )
+{
+ for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
+ if ( w == wid )
+ continue;
+ if ( wid->className == w->className )
+ return true;
+ }
+ return false;
+}
+
+bool MetaDataBase::hasCustomWidget( const QString &className )
+{
+ for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
+ if ( w->className == className )
+ return true;
+ }
+ return false;
+}
+
+void MetaDataBase::setTabOrder( QWidget *w, const QWidgetList &order )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*) w );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ w, w->name(), w->className() );
+ return;
+ }
+
+ r->tabOrder = order;
+}
+
+QWidgetList MetaDataBase::tabOrder( QWidget *w )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*) w );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ w, w->name(), w->className() );
+ return QWidgetList();
+ }
+
+ return r->tabOrder;
+}
+
+void MetaDataBase::setIncludes( QObject *o, const QValueList<Include> &incs )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->includes = incs;
+}
+
+QValueList<MetaDataBase::Include> MetaDataBase::includes( QObject *o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QValueList<Include>();
+ }
+
+ return r->includes;
+}
+
+void MetaDataBase::setForwards( QObject *o, const QStringList &fwds )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->forwards = fwds;
+}
+
+QStringList MetaDataBase::forwards( QObject *o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QStringList();
+ }
+
+ return r->forwards;
+}
+
+void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->sigs.clear();
+
+ for ( QStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) {
+ QString s = (*it).simplifyWhiteSpace();
+ bool hasSemicolon = s.endsWith( ";" );
+ if ( hasSemicolon )
+ s = s.left( s.length() - 1 );
+ int p = s.find( '(' );
+ if ( p < 0 )
+ p = s.length();
+ int sp = s.find( ' ' );
+ if ( sp >= 0 && sp < p ) {
+ s = s.mid( sp+1 );
+ p -= sp + 1;
+ }
+ if ( p == (int) s.length() )
+ s += "()";
+ if ( hasSemicolon )
+ s += ";";
+ r->sigs << s;
+ }
+}
+
+QStringList MetaDataBase::signalList( QObject *o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QStringList();
+ }
+
+ return r->sigs;
+}
+
+void MetaDataBase::setMetaInfo( QObject *o, MetaInfo mi )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->metaInfo = mi;
+}
+
+MetaDataBase::MetaInfo MetaDataBase::metaInfo( QObject *o )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return MetaInfo();
+ }
+
+ return r->metaInfo;
+}
+
+
+
+
+MetaDataBase::CustomWidget::CustomWidget()
+{
+ className = "MyCustomWidget";
+ includeFile = "mywidget.h";
+ includePolicy = Local;
+ sizeHint = QSize( -1, -1 );
+ pixmap = new QPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) );
+ id = -1;
+ sizePolicy = QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
+ isContainer = false;
+}
+
+MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
+{
+ className = w.className;
+ includeFile = w.includeFile;
+ includePolicy = w.includePolicy;
+ sizeHint = w.sizeHint;
+ if ( w.pixmap )
+ pixmap = new QPixmap( *w.pixmap );
+ else
+ pixmap = 0;
+ id = w.id;
+ isContainer = w.isContainer;
+}
+
+void MetaDataBase::setCursor( QWidget *w, const QCursor &c )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)w );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ w, w->name(), w->className() );
+ return;
+ }
+
+ r->cursor = c;
+}
+
+QCursor MetaDataBase::cursor( QWidget *w )
+{
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)w );
+ if ( !r ) {
+ w->unsetCursor();
+ return w->cursor();
+ }
+
+ return r->cursor;
+}
+
+bool MetaDataBase::CustomWidget::operator==( const CustomWidget &w ) const
+{
+ return className == w.className;
+}
+
+MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomWidget &w )
+{
+ delete pixmap;
+ className = w.className;
+ includeFile = w.includeFile;
+ includePolicy = w.includePolicy;
+ sizeHint = w.sizeHint;
+ if ( w.pixmap )
+ pixmap = new QPixmap( *w.pixmap );
+ else
+ pixmap = 0;
+ lstSignals = w.lstSignals;
+ lstSlots = w.lstSlots;
+ lstProperties = w.lstProperties;
+ id = w.id;
+ isContainer = w.isContainer;
+ return *this;
+}
+
+bool MetaDataBase::CustomWidget::hasSignal( const QCString &signal ) const
+{
+ QStrList sigList = QWidget::staticMetaObject()->signalNames( true );
+ if ( sigList.find( signal ) != -1 )
+ return true;
+ for ( QValueList<QCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) {
+ if ( normalizeSlot( *it ) == normalizeSlot( signal ) )
+ return true;
+ }
+ return false;
+}
+
+bool MetaDataBase::CustomWidget::hasSlot( const QCString &slot ) const
+{
+ QStrList slotList = QWidget::staticMetaObject()->slotNames( true );
+ if ( slotList.find( normalizeSlot( slot ) ) != -1 )
+ return true;
+
+ for ( QValueList<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
+ if ( normalizeSlot( (*it).slot ) == normalizeSlot( slot ) )
+ return true;
+ }
+ return false;
+}
+
+bool MetaDataBase::CustomWidget::hasProperty( const QCString &prop ) const
+{
+ QStrList propList = QWidget::staticMetaObject()->propertyNames( true );
+ if ( propList.find( prop ) != -1 )
+ return true;
+
+ for ( QValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
+ if ( (*it).property == prop )
+ return true;
+ }
+ return false;
+}
+
+void MetaDataBase::setPixmapArgument( QObject *o, int pixmap, const QString &arg )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->pixmapArguments.remove( pixmap );
+ r->pixmapArguments.insert( pixmap, arg );
+}
+
+QString MetaDataBase::pixmapArgument( QObject *o, int pixmap )
+{
+ if ( !o )
+ return QString::null;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QString::null;
+ }
+
+ return *r->pixmapArguments.find( pixmap );
+}
+
+void MetaDataBase::clearPixmapArguments( QObject *o )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->pixmapArguments.clear();
+}
+
+
+void MetaDataBase::setPixmapKey( QObject *o, int pixmap, const QString &arg )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->pixmapKeys.remove( pixmap );
+ r->pixmapKeys.insert( pixmap, arg );
+}
+
+QString MetaDataBase::pixmapKey( QObject *o, int pixmap )
+{
+ if ( !o )
+ return QString::null;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QString::null;
+ }
+
+ return *r->pixmapKeys.find( pixmap );
+}
+
+void MetaDataBase::clearPixmapKeys( QObject *o )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->pixmapKeys.clear();
+}
+
+
+
+void MetaDataBase::setColumnFields( QObject *o, const QMap<QString, QString> &columnFields )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->columnFields = columnFields;
+}
+
+QMap<QString, QString> MetaDataBase::columnFields( QObject *o )
+{
+ if ( !o )
+ return QMap<QString, QString>();
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return QMap<QString, QString>();
+ }
+
+ return r->columnFields;
+}
+
+QString MetaDataBase::normalizeSlot( const QString &s )
+{
+ return Parser::cleanArgs( s );
+}
+
+void MetaDataBase::clear( QObject *o )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ db->remove( (void*)o );
+ for ( QPtrDictIterator<QWidget> it( *( (FormWindow*)o )->widgets() ); it.current(); ++it )
+ db->remove( (void*)it.current() );
+}
+
+void MetaDataBase::setExportMacro( QObject *o, const QString &macro )
+{
+ if ( !o )
+ return;
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return;
+ }
+
+ r->exportMacro = macro;
+}
+
+QString MetaDataBase::exportMacro( QObject *o )
+{
+ if ( !o )
+ return "";
+ setupDataBase();
+ MetaDataBaseRecord *r = db->find( (void*)o );
+ if ( !r ) {
+ qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
+ o, o->name(), o->className() );
+ return "";
+ }
+
+ return r->exportMacro;
+}
+
+bool MetaDataBase::hasObject( QObject *o )
+{
+ return !!db->find( o );
+}
+
diff --git a/kommander/editor/metadatabase.h b/kommander/editor/metadatabase.h
new file mode 100644
index 00000000..8bb79c38
--- /dev/null
+++ b/kommander/editor/metadatabase.h
@@ -0,0 +1,222 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef METADATABASE_H
+#define METADATABASE_H
+
+#include <qvariant.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qmap.h>
+#include <qptrlist.h>
+#include <qsizepolicy.h>
+#include <qsize.h>
+#include <qwidgetlist.h>
+#include <qcursor.h>
+
+#include "pixmapchooser.h"
+
+class QObject;
+class QPixmap;
+
+class MetaDataBase
+{
+public:
+ struct Connection
+ {
+ QObject *sender, *receiver;
+ QCString signal, slot;
+ bool operator==( const Connection &c ) const {
+ return sender == c.sender && receiver == c.receiver &&
+ signal == c.signal && slot == c.slot ;
+ }
+ };
+
+ struct Slot
+ {
+ QString returnType;
+ QCString slot;
+ QString specifier;
+ QString access;
+ QString language;
+ bool operator==( const Slot &s ) const {
+ return ( returnType == s.returnType &&
+ slot == s.slot &&
+ access == s.access &&
+ specifier == s.specifier &&
+ language == s.language
+ );
+ }
+ };
+
+ struct Property
+ {
+ QCString property;
+ QString type;
+ bool operator==( const Property &p ) const {
+ return property == p.property &&
+ type == p.type;
+ }
+ };
+
+ struct CustomWidget
+ {
+ CustomWidget();
+ CustomWidget( const CustomWidget &w );
+ ~CustomWidget() { delete pixmap; } // inlined to work around 2.7.2.3 bug
+ bool operator==( const CustomWidget &w ) const;
+ CustomWidget &operator=( const CustomWidget &w );
+
+ bool hasSignal( const QCString &signal ) const;
+ bool hasSlot( const QCString &slot ) const;
+ bool hasProperty( const QCString &prop ) const;
+
+ enum IncludePolicy { Global, Local };
+ QString className;
+ QString includeFile;
+ IncludePolicy includePolicy;
+ QSize sizeHint;
+ QSizePolicy sizePolicy;
+ QPixmap *pixmap;
+ QValueList<QCString> lstSignals;
+ QValueList<Slot> lstSlots;
+ QValueList<Property> lstProperties;
+ int id;
+ bool isContainer;
+ };
+
+ struct Include
+ {
+ Include() : header(), location(), implDecl( "in implementation" ) {}
+ QString header;
+ QString location;
+ bool operator==( const Include &i ) const {
+ return header == i.header && location == i.location;
+ }
+ QString implDecl;
+ };
+
+ struct MetaInfo
+ {
+ QString license;
+ QString version;
+ QString comment;
+ QString author;
+ };
+
+ struct EventDescription
+ {
+ QString name;
+ QStringList args;
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+ bool operator==( const EventDescription& ) const { return FALSE; }
+#endif
+ };
+
+ MetaDataBase();
+ static void clearDataBase();
+
+ static void addEntry( QObject *o );
+ static void removeEntry( QObject *o );
+ static void setPropertyChanged( QObject *o, const QString &property, bool changed );
+ static bool isPropertyChanged( QObject *o, const QString &property );
+ static void setPropertyComment( QObject *o, const QString &property, const QString &comment );
+ static QString propertyComment( QObject *o, const QString &property );
+ static QStringList changedProperties( QObject *o );
+
+ static void setFakeProperty( QObject *o, const QString &property, const QVariant& value );
+ static QVariant fakeProperty( QObject * o, const QString &property );
+ static QMap<QString,QVariant>* fakeProperties( QObject* o );
+
+ static void setSpacing( QObject *o, int spacing );
+ static int spacing( QObject *o );
+ static void setMargin( QObject *o, int margin );
+ static int margin( QObject *o );
+
+ static void addConnection( QObject *o, QObject *sender, const QCString &signal,
+ QObject *receiver, const QCString &slot );
+ static void removeConnection( QObject *o, QObject *sender, const QCString &signal,
+ QObject *receiver, const QCString &slot );
+ static QValueList<Connection> connections( QObject *o );
+ static QValueList<Connection> connections( QObject *o, QObject *sender, QObject *receiver );
+ static QValueList<Connection> connections( QObject *o, QObject *object );
+ static void doConnections( QObject *o );
+
+ static void addSlot( QObject *o, const QCString &slot, const QString& specifier, const QString &access, const QString &language, const QString &returnType );
+ static void removeSlot( QObject *o, const QCString &slot, const QString& specifier, const QString &access, const QString &language, const QString &returnType );
+ static void removeSlot( QObject *o, const QString &slot );
+ static QValueList<Slot> slotList( QObject *o );
+ static bool isSlotUsed( QObject *o, const QCString &slot );
+ static bool hasSlot( QObject *o, const QCString &slot, bool onlyCustom = FALSE );
+ static void changeSlot( QObject *o, const QCString &slot, const QCString &newName );
+ static void changeSlotAttributes( QObject *o, const QCString &slot,
+ const QString& specifier, const QString &access,
+ const QString &language, const QString &returnType );
+ static QString languageOfSlot( QObject *o, const QCString &slot );
+ static void setSlotList( QObject *o, const QValueList<Slot> &slotList );
+
+ static bool addCustomWidget( CustomWidget *w );
+ static void removeCustomWidget( CustomWidget *w );
+ static QPtrList<CustomWidget> *customWidgets();
+ static CustomWidget *customWidget( int id );
+ static bool isWidgetNameUsed( CustomWidget *w );
+ static bool hasCustomWidget( const QString &className );
+
+ static void setTabOrder( QWidget *w, const QWidgetList &order );
+ static QWidgetList tabOrder( QWidget *w );
+
+ static void setIncludes( QObject *o, const QValueList<Include> &incs );
+ static QValueList<Include> includes( QObject *o );
+
+ static void setForwards( QObject *o, const QStringList &fwds );
+ static QStringList forwards( QObject *o );
+
+ static void setSignalList( QObject *o, const QStringList &sigs );
+ static QStringList signalList( QObject *o );
+
+ static void setMetaInfo( QObject *o, MetaInfo mi );
+ static MetaInfo metaInfo( QObject *o );
+
+ static void setCursor( QWidget *w, const QCursor &c );
+ static QCursor cursor( QWidget *w );
+
+ static void setPixmapArgument( QObject *o, int pixmap, const QString &arg );
+ static QString pixmapArgument( QObject *o, int pixmap );
+ static void clearPixmapArguments( QObject *o );
+
+ static void setPixmapKey( QObject *o, int pixmap, const QString &arg );
+ static QString pixmapKey( QObject *o, int pixmap );
+ static void clearPixmapKeys( QObject *o );
+
+ static void setColumnFields( QObject *o, const QMap<QString, QString> &columnFields );
+ static QMap<QString, QString> columnFields( QObject *o );
+
+ static QString normalizeSlot( const QString &slot );
+
+ static void clear( QObject *o );
+
+ static void setExportMacro( QObject *o, const QString &macro );
+ static QString exportMacro( QObject *o );
+
+ static bool hasObject( QObject *o );
+
+};
+
+#endif
diff --git a/kommander/editor/multilineeditor.ui b/kommander/editor/multilineeditor.ui
new file mode 100644
index 00000000..9b9cbe9f
--- /dev/null
+++ b/kommander/editor/multilineeditor.ui
@@ -0,0 +1,225 @@
+<!DOCTYPE UI><UI>
+<class>MultiLineEditorBase</class><comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget>
+ <class>QDialog</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>MultiLineEditorBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>421</width>
+ <height>275</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Edit Multiline Edit</string>
+ </property>
+ <property stdset="1">
+ <name>sizeGripEnabled</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>&lt;b&gt;Edit Multiline Edit&lt;/b&gt;&lt;p&gt;Enter the text and click the &lt;b&gt;OK&lt;/b&gt;-Button to apply the changes.&lt;/p&gt;</string>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Text:</string>
+ </property>
+ <property>
+ <name>buddy</name>
+ <cstring>preview</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QMultiLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>preview</cstring>
+ </property>
+ <property stdset="1">
+ <name>wordWrap</name>
+ <enum>WidgetWidth</enum>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Enter your text here.</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>buttonHelp</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Help</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>buttonOk</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;OK</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>default</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>buttonApply</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Apply</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Apply all changes.</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Cancel</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>MultiLineEditorBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>MultiLineEditorBase</receiver>
+ <slot>okClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonApply</sender>
+ <signal>clicked()</signal>
+ <receiver>MultiLineEditorBase</receiver>
+ <slot>applyClicked()</slot>
+ </connection>
+ <slot access="protected">applyClicked()</slot>
+ <slot access="protected">okClicked()</slot>
+</connections>
+</UI>
diff --git a/kommander/editor/multilineeditorimpl.cpp b/kommander/editor/multilineeditorimpl.cpp
new file mode 100644
index 00000000..1b823d3f
--- /dev/null
+++ b/kommander/editor/multilineeditorimpl.cpp
@@ -0,0 +1,98 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "multilineeditorimpl.h"
+#include "formwindow.h"
+#include "command.h"
+#include "mainwindow.h"
+
+#include <qmultilineedit.h>
+#include <qpushbutton.h>
+
+#include <klocale.h>
+
+MultiLineEditor::MultiLineEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw )
+ : MultiLineEditorBase( parent, 0, true ), formwindow( fw )
+{
+ connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ mlined = (QMultiLineEdit*)editWidget;
+ // #### complete list of properties here
+ preview->setAlignment( mlined->alignment() );
+ preview->setMaxLines( mlined->maxLines() );
+ preview->setWordWrap( mlined->wordWrap() );
+ preview->setWrapColumnOrWidth( mlined->wrapColumnOrWidth() );
+ preview->setWrapPolicy( mlined->wrapPolicy() );
+ //preview->setTextFormat( mlined->textFormat() );
+ preview->setText( mlined->text() );
+ preview->setFocus();
+ preview->selectAll();
+}
+
+void MultiLineEditor::okClicked()
+{
+ applyClicked();
+ accept();
+}
+
+void MultiLineEditor::applyClicked()
+{
+ PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n("Set Text of '%1'" ).arg( mlined->name() ),
+ formwindow, mlined, preview->text() );
+ cmd->execute();
+ formwindow->commandHistory()->addCommand( cmd );
+ preview->setFocus();
+}
+
+
+TextEditor::TextEditor( QWidget *parent, const QString &text )
+ : MultiLineEditorBase( parent, 0, true )
+{
+ buttonApply->hide();
+ setCaption( i18n("Text" ) );
+ preview->setText( text );
+ preview->setFocus();
+ preview->selectAll();
+}
+
+QString TextEditor::getText( QWidget *parent, const QString &text )
+{
+ TextEditor dlg( parent, text );
+ if ( dlg.exec() == QDialog::Accepted ) {
+ QString txt = dlg.preview->text();
+ int i = txt.length() - 1;
+ while ( i >= 0 &&
+ ( txt[ i ] == '\n' || txt[ i ] == ' ' || txt[ i ] == '\t' || txt[ i ].isSpace() ) ) {
+ txt.remove( i, 1 );
+ i--;
+ }
+ return txt;
+ }
+ return QString::null;
+}
+
+void TextEditor::okClicked()
+{
+ accept();
+}
+
+void TextEditor::applyClicked()
+{
+}
+#include "multilineeditorimpl.moc"
diff --git a/kommander/editor/multilineeditorimpl.h b/kommander/editor/multilineeditorimpl.h
new file mode 100644
index 00000000..16314b2a
--- /dev/null
+++ b/kommander/editor/multilineeditorimpl.h
@@ -0,0 +1,61 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef MULTILINEEDITORIMPL_H
+#define MULTILINEEDITORIMPL_H
+
+#include "multilineeditor.h"
+
+class FormWindow;
+class QMultiLineEdit;
+
+class MultiLineEditor : public MultiLineEditorBase
+{
+ Q_OBJECT
+
+public:
+ MultiLineEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw );
+
+protected slots:
+ void okClicked();
+ void applyClicked();
+
+private:
+ QMultiLineEdit *mlined;
+ FormWindow *formwindow;
+
+};
+
+class TextEditor : public MultiLineEditorBase
+{
+ Q_OBJECT
+
+public:
+ TextEditor( QWidget *parent, const QString &text );
+
+ static QString getText( QWidget *parent, const QString &text );
+
+protected slots:
+ void okClicked();
+ void applyClicked();
+
+};
+
+#endif
diff --git a/kommander/editor/newform.ui b/kommander/editor/newform.ui
new file mode 100644
index 00000000..16bb0365
--- /dev/null
+++ b/kommander/editor/newform.ui
@@ -0,0 +1,210 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>NewFormBase</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>NewFormBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>557</width>
+ <height>436</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>New File</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;New Form&lt;/b&gt;&lt;p&gt;Select a template for the new form and click the &lt;b&gt;OK&lt;/b&gt;-button to create it.&lt;/p&gt;</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="2" 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>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>helpButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <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>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <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>
+ <property name="whatsThis" stdset="0">
+ <string>Create a new form using the selected template.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog without creating a new form.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QIconView" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>templateView</cstring>
+ </property>
+ <property name="gridX">
+ <number>120</number>
+ </property>
+ <property name="resizeMode">
+ <enum>Adjust</enum>
+ </property>
+ <property name="itemsMovable">
+ <bool>false</bool>
+ </property>
+ <property name="wordWrapIconText">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Displays a list of the available templates.</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>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>NewFormBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>NewFormBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>templateView</sender>
+ <signal>currentChanged(QIconViewItem*)</signal>
+ <receiver>NewFormBase</receiver>
+ <slot>itemChanged(QIconViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>templateView</sender>
+ <signal>doubleClicked(QIconViewItem*)</signal>
+ <receiver>NewFormBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>templateView</sender>
+ <signal>returnPressed(QIconViewItem*)</signal>
+ <receiver>NewFormBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>templateView</tabstop>
+ <tabstop>helpButton</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<slots>
+ <slot access="protected">itemChanged( QIconViewItem * )</slot>
+ <slot access="protected">projectChanged( const QString &amp; )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp
new file mode 100644
index 00000000..70e7b1df
--- /dev/null
+++ b/kommander/editor/newformimpl.cpp
@@ -0,0 +1,202 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. �All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#include "newformimpl.h"
+#include "mainwindow.h"
+#include "pixmapchooser.h"
+#include "metadatabase.h"
+#include "formwindow.h"
+#include "widgetfactory.h"
+#include "widgetdatabase.h"
+#include "actioneditorimpl.h"
+#include "hierarchyview.h"
+#include "resource.h"
+#include "formfile.h"
+
+#include <qiconview.h>
+#include <qlabel.h>
+#include <qfileinfo.h>
+#include <qdir.h>
+#include <qregexp.h>
+#include <qpushbutton.h>
+#include <stdlib.h>
+#include <qcombobox.h>
+#include <qworkspace.h>
+#include <qmessagebox.h>
+
+#include <klocale.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+
+#include "dialog.h"
+
+static int _forms = 0;
+
+FormItem::FormItem(QIconView *view, const QString &text) : NewItem(view, text)
+{
+}
+
+void FormItem::insert()
+{
+ QString n = "Form" + QString::number(++_forms);
+ FormWindow *fw = 0;
+ FormFile *ff = new FormFile(FormFile::createUnnamedFileName(), true);
+ fw = new FormWindow(ff, MainWindow::self, MainWindow::self->qWorkspace(), n);
+ MetaDataBase::addEntry(fw);
+ QWidget *w = 0L;
+ if (fType == Dialog)
+ {
+ w = WidgetFactory::create(WidgetDatabase::idFromClassName("Dialog"), fw, n.latin1());
+ fw->setMainContainer(w);
+ }
+ else if (fType == Wizard)
+ {
+ w = WidgetFactory::create(WidgetDatabase::idFromClassName("Wizard"), fw, n.latin1());
+ fw->setMainContainer(w);
+ }
+ if (w)
+ {
+ w->setProperty("useInternalParser", true);
+ MetaDataBase::setPropertyChanged(w, "useInternalParser", true);
+ }
+ fw->setCaption(n);
+ fw->resize(600, 480);
+ MainWindow::self->insertFormWindow(fw);
+
+ // the wizard might have changed a lot, lets update everything
+ MainWindow::self->actioneditor()->setFormWindow(fw);
+ MainWindow::self->objectHierarchy()->setFormWindow(fw, fw);
+ fw->killAccels(fw);
+ fw->setFocus();
+}
+
+
+
+CustomFormItem::CustomFormItem(QIconView *view, const QString &text)
+ : NewItem(view, text)
+{
+}
+
+static void unifyFormName(FormWindow *fw, QWorkspace *qworkspace)
+{
+ QStringList lst;
+ QWidgetList windows = qworkspace->windowList();
+ for (QWidget* w = windows.first(); w; w = windows.next())
+ if (w != fw)
+ lst << w->name();
+
+ if (lst.findIndex(fw->name()) == -1)
+ return;
+ QString origName = fw->name();
+ QString n = origName;
+ int i = 1;
+ while (lst.findIndex(n) != -1)
+ n = origName + QString::number(i++);
+ fw->setName(n);
+ fw->setCaption(n);
+}
+
+void CustomFormItem::insert()
+{
+ QString filename = templateFileName();
+ if (!filename.isEmpty() && QFile::exists(filename))
+ {
+ Resource resource(MainWindow::self);
+ FormFile *ff = new FormFile(filename, true);
+ if (!resource.load(ff))
+ {
+ QMessageBox::information(MainWindow::self, i18n("Load Template"),
+ i18n("Could not load form description from template '%1'").arg(filename));
+ delete ff;
+ return;
+ }
+ ff->setFileName(QString::null);
+ if (MainWindow::self->formWindow())
+ {
+ MainWindow::self->formWindow()->setFileName(QString::null);
+ unifyFormName(MainWindow::self->formWindow(), MainWindow::self->qWorkspace());
+ }
+ }
+}
+
+
+NewForm::NewForm(QWidget *parent, const QString &templatePath)
+ : NewFormBase(parent, 0, true)
+{
+ connect(helpButton, SIGNAL(clicked()), MainWindow::self, SLOT(showDialogHelp()));
+
+ QIconViewItem *cur = 0;
+ FormItem *fi = new FormItem(templateView, i18n("Dialog"));
+ allItems.append(fi);
+ fi->setFormType(FormItem::Dialog);
+ fi->setPixmap(PixmapChooser::loadPixmap("newform.xpm"));
+ fi->setDragEnabled(false);
+ cur = fi;
+ fi = new FormItem(templateView, i18n("Wizard"));
+ allItems.append(fi);
+ fi->setFormType(FormItem::Wizard);
+ fi->setPixmap(PixmapChooser::loadPixmap("newform.xpm"));
+ fi->setDragEnabled(false);
+
+
+ QStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/templates");
+ if (!templatePath.isEmpty())
+ searchPaths.append(templatePath);
+
+
+ // search each path
+ for (QStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it)
+ {
+ if (!QFile::exists(*it))
+ continue;
+ QDir dir(*it);
+ const QFileInfoList* fileList = dir.entryInfoList(QDir::DefaultFilter, QDir::DirsFirst | QDir::Name);
+ if (fileList)
+ for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
+ {
+ QFileInfo* fi = fit.current();
+ if (!fi->isFile() || fi->extension() != "kmdr")
+ continue;
+ QString name = fi->baseName();
+ name = name.replace("_", " ");
+ CustomFormItem *ci = new CustomFormItem(templateView, name);
+ allItems.append(ci);
+ ci->setDragEnabled(false);
+ ci->setPixmap(PixmapChooser::loadPixmap("newform.xpm"));
+ ci->setTemplateFile(fi->absFilePath());
+ }
+ }
+ templateView->viewport()->setFocus();
+ templateView->setCurrentItem(cur);
+}
+
+void NewForm::accept()
+{
+ if (!templateView->currentItem())
+ return;
+ ((NewItem *) templateView->currentItem())->insert();
+ NewFormBase::accept();
+}
+
+
+void NewForm::itemChanged(QIconViewItem *item)
+{
+ Q_UNUSED(item);
+}
+
+#include "newformimpl.moc"
diff --git a/kommander/editor/newformimpl.h b/kommander/editor/newformimpl.h
new file mode 100644
index 00000000..12fec22c
--- /dev/null
+++ b/kommander/editor/newformimpl.h
@@ -0,0 +1,73 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS.  All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#ifndef NEWFORMIMPL_H
+#define NEWFORMIMPL_H
+
+#include "newform.h"
+#include <qiconview.h>
+
+class FormFile;
+
+
+class NewItem : public QIconViewItem
+{
+public:
+ enum Type {Form, CustomForm};
+ NewItem( QIconView *view, const QString &text ) : QIconViewItem( view, text ) {}
+ virtual void insert( ) = 0;
+};
+
+class FormItem : public NewItem
+{
+public:
+ enum FormType {Dialog, Wizard, MainWindow};
+ FormItem( QIconView *view, const QString &text);
+ void insert();
+ int rtti() const {return (int)Form;}
+ void setFormType(FormType ft) {fType = ft;}
+ FormType formType() const {return fType;}
+private:
+ FormType fType;
+};
+
+class CustomFormItem : public NewItem
+{
+public:
+ CustomFormItem( QIconView *view, const QString &text );
+ void insert();
+ int rtti() const {return (int)CustomForm; }
+ void setTemplateFile(const QString &tf) {templFile = tf;}
+ QString templateFileName() const {return templFile;}
+private:
+ QString templFile;
+};
+
+class NewForm : public NewFormBase
+{
+ Q_OBJECT
+public:
+ NewForm( QWidget *parent, const QString &templatePath );
+ void accept();
+protected slots:
+ void itemChanged(QIconViewItem *item);
+private:
+ QPtrList<QIconViewItem> allItems;
+};
+
+#endif
diff --git a/kommander/editor/orderindicator.cpp b/kommander/editor/orderindicator.cpp
new file mode 100644
index 00000000..31450bbf
--- /dev/null
+++ b/kommander/editor/orderindicator.cpp
@@ -0,0 +1,107 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qvariant.h> // HP-UX compiler need this here
+
+#include "orderindicator.h"
+#include "formwindow.h"
+
+#include <qpainter.h>
+#include <qbitmap.h>
+#include <qapplication.h>
+
+OrderIndicator::OrderIndicator( int i, QWidget* w, FormWindow *fw )
+ : QWidget( fw, "order_indicator", WMouseNoMask ), formWindow( fw )
+{
+ order = -1;
+ widget = w;
+ setBackgroundMode( NoBackground );
+ setAutoMask( true );
+ setOrder( i, w );
+}
+
+
+OrderIndicator::~OrderIndicator()
+{
+}
+
+
+void OrderIndicator::setOrder( int i, QWidget* wid )
+{
+ if ( widget != wid )
+ return;
+ if ( !wid->isVisibleTo( formWindow ) ) {
+ hide();
+ return;
+ }
+
+ if ( order == i ) {
+ show();
+ raise();
+ return;
+ }
+ order = i;
+ int w = fontMetrics().width( QString::number( i ) ) + 10;
+ int h = fontMetrics().lineSpacing() * 3 / 2;
+ QFont f( font() );
+ f.setBold( true );
+ setFont( f );
+ resize( QMAX( w, h ), h );
+ update(); // in case the size didn't change
+ reposition();
+ show();
+ raise();
+}
+
+void OrderIndicator::reposition()
+{
+ QPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) );
+ move( p - QPoint( width()/3, height()/3 ) );
+}
+
+
+void OrderIndicator::paintEvent( QPaintEvent * )
+{
+ QPainter p( this );
+ p.setPen( white );
+ p.setBrush( blue );
+ p.drawEllipse( rect() );
+ p.drawText( rect(), AlignCenter, QString::number( order ) );
+}
+
+
+void OrderIndicator::updateMask()
+{
+ QBitmap bm( size() );
+ bm.fill( color0 );
+ {
+ QPainter p( &bm, this );
+ p.setPen( color1 );
+ p.setBrush( color1 );
+ p.drawEllipse( rect() );
+ }
+ setMask( bm );
+}
+
+void OrderIndicator::mousePressEvent( QMouseEvent *e )
+{
+ QApplication::sendEvent( widget, e );
+}
+#include "orderindicator.moc"
diff --git a/kommander/editor/orderindicator.h b/kommander/editor/orderindicator.h
new file mode 100644
index 00000000..28cc7816
--- /dev/null
+++ b/kommander/editor/orderindicator.h
@@ -0,0 +1,52 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef ORDER_INDICATOR_H
+#define ORDER_INDICATOR_H
+
+#include <qwidget.h>
+
+class FormWindow;
+
+class OrderIndicator : public QWidget
+{
+ Q_OBJECT
+
+public:
+ OrderIndicator( int i, QWidget* w, FormWindow* fw );
+ ~OrderIndicator();
+
+ void setOrder( int i, QWidget* w );
+ void reposition();
+
+protected:
+ void paintEvent( QPaintEvent * );
+ void mousePressEvent( QMouseEvent *e );
+ void updateMask();
+
+private:
+ int order;
+ QWidget* widget;
+ FormWindow *formWindow;
+
+};
+
+
+#endif
diff --git a/kommander/editor/paletteeditor.ui b/kommander/editor/paletteeditor.ui
new file mode 100644
index 00000000..31a4cd8a
--- /dev/null
+++ b/kommander/editor/paletteeditor.ui
@@ -0,0 +1,518 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>PaletteEditorBase</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>PaletteEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>449</width>
+ <height>443</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>Edit Palette</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupAutoPalette</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Build Palette</string>
+ </property>
+ <property name="alignment">
+ <set>AlignAuto</set>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelMainColor</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>50</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>&amp;3D effects:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>buttonMainColor</cstring>
+ </property>
+ </widget>
+ <widget class="StyledButton">
+ <property name="name">
+ <cstring>buttonMainColor</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ <property name="scale" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose a color</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Choose the effect-color for the generated palette.</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelMainColor2</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>50</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>Back&amp;ground:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>buttonMainColor2</cstring>
+ </property>
+ </widget>
+ <widget class="StyledButton">
+ <property name="name">
+ <cstring>buttonMainColor2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ <property name="scale" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose a color</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Choose the background color for the generated palette.</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>btnAdvanced</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Tune Palette...</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox126</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Preview</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <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="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Select &amp;palette:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>paletteCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Active Palette</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Inactive Palette</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled Palette</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>paletteCombo</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="PreviewFrame">
+ <property name="name">
+ <cstring>previewFrame</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </vbox>
+ </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="QPushButton">
+ <property name="name">
+ <cstring>buttonHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing11</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="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>StyledButton</class>
+ <header location="local">styledbutton.h</header>
+ <sizehint>
+ <width>40</width>
+ <height>25</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ <signal>clicked()</signal>
+ <signal>changed()</signal>
+ <property type="Color">color</property>
+ <property type="Pixmap">pixmap</property>
+ <property type="Bool">scale</property>
+ </customwidget>
+ <customwidget>
+ <class>PreviewFrame</class>
+ <header location="local">previewframe.h</header>
+ <sizehint>
+ <width>200</width>
+ <height>200</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image1</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="1112">789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonMainColor2</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorBase</receiver>
+ <slot>onChoose2ndMainColor()</slot>
+ </connection>
+ <connection>
+ <sender>paletteCombo</sender>
+ <signal>activated(int)</signal>
+ <receiver>PaletteEditorBase</receiver>
+ <slot>paletteSelected(int)</slot>
+ </connection>
+ <connection>
+ <sender>btnAdvanced</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorBase</receiver>
+ <slot>onTune()</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>buttonMainColor</sender>
+ <signal>changed()</signal>
+ <receiver>PaletteEditorBase</receiver>
+ <slot>onChooseMainColor()</slot>
+ </connection>
+ <connection>
+ <sender>buttonMainColor</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorBase</receiver>
+ <slot>onChooseMainColor()</slot>
+ </connection>
+ <connection>
+ <sender>buttonMainColor2</sender>
+ <signal>changed()</signal>
+ <receiver>PaletteEditorBase</receiver>
+ <slot>onChoose2ndMainColor()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+ <tabstop>buttonMainColor</tabstop>
+ <tabstop>buttonMainColor2</tabstop>
+ <tabstop>btnAdvanced</tabstop>
+ <tabstop>paletteCombo</tabstop>
+ <tabstop>buttonHelp</tabstop>
+</tabstops>
+<slots>
+ <slot access="protected">init()</slot>
+ <slot access="protected">destroy()</slot>
+ <slot access="protected">onTune()</slot>
+ <slot access="protected">onChoose2ndMainColor()</slot>
+ <slot access="protected">onChooseMainColor()</slot>
+ <slot access="protected">paletteSelected(int)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>styledbutton.h</includehint>
+ <includehint>styledbutton.h</includehint>
+ <includehint>previewframe.h</includehint>
+</includehints>
+</UI>
diff --git a/kommander/editor/paletteeditoradvanced.ui b/kommander/editor/paletteeditoradvanced.ui
new file mode 100644
index 00000000..cf868b69
--- /dev/null
+++ b/kommander/editor/paletteeditoradvanced.ui
@@ -0,0 +1,766 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>PaletteEditorAdvancedBase</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>PaletteEditorAdvancedBase</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>430</width>
+ <height>368</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Tune Palette</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Edit Palette&lt;/b&gt;&lt;p&gt;Change the current widget or form's palette.&lt;/p&gt;&lt;p&gt;Use a generated palette or select colors for each color group and each color role.&lt;/p&gt;&lt;p&gt;The palette can be tested with different widget layouts in the preview section.&lt;/p&gt;</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <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>TextLabel1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>MShape</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>MShadow</enum>
+ </property>
+ <property name="text">
+ <string>Select &amp;palette:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>paletteCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Active Palette</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Inactive Palette</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled Palette</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>paletteCombo</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Auto</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkBuildInactive</cstring>
+ </property>
+ <property name="text">
+ <string>Build the inactive palette from the active palette.</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkBuildDisabled</cstring>
+ </property>
+ <property name="text">
+ <string>Build the disabled palette from the active palette.</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupCentral</cstring>
+ </property>
+ <property name="title">
+ <string>Central Color &amp;Roles</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Background</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Foreground</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Button</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Base</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Text</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>BrightText</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ButtonText</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Highlight</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>HighlightText</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Link</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>LinkVisited</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboCentral</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose the central color role</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Select a color role.&lt;/b&gt;&lt;p&gt;Available central color roles are: &lt;ul&gt; &lt;li&gt;Background - general background color.&lt;/li&gt; &lt;li&gt;Foreground - general foreground color. &lt;/li&gt; &lt;li&gt;Base - used as the background color for example, for text entry widgets; it is usually white or another light color. &lt;/li&gt; &lt;li&gt;Text - the forground color used with Base. Usually this is the same as the Foreground, in which case it must provide good contrast both with the Background and with the Base. &lt;/li&gt; &lt;li&gt;Button - general button background color; useful where buttons need a background different from Background, as in the Macintosh style. &lt;/li&gt; &lt;li&gt;ButtonText - a foreground color used with the Button color. &lt;/li&gt; &lt;li&gt;Highlight - a color used to indicate a selected or highlighted item. &lt;/li&gt; &lt;li&gt;HighlightedText - a text color that contrasts to Highlight. &lt;/li&gt; &lt;li&gt;BrightText - a text color that is very different from Foreground and contrasts well with, for example, black. &lt;/li&gt; &lt;/ul&gt; &lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout32_2</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_Spacing1</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="QLabel">
+ <property name="name">
+ <cstring>labelPixmap</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Choose pi&amp;xmap:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>buttonPixmap</cstring>
+ </property>
+ </widget>
+ <widget class="StyledButton">
+ <property name="name">
+ <cstring>buttonPixmap</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="scale" stdset="0">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select a pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Choose a pixmap file for the selected central color role.</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelCentral</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;Select color:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>buttonCentral</cstring>
+ </property>
+ </widget>
+ <widget class="StyledButton">
+ <property name="name">
+ <cstring>buttonCentral</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="scale" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose a color</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Choose a color for the selected central color role.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupEffect</cstring>
+ </property>
+ <property name="title">
+ <string>3D Shadow &amp;Effects</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout32_3</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="QCheckBox">
+ <property name="name">
+ <cstring>checkBuildEffect</cstring>
+ </property>
+ <property name="text">
+ <string>Build &amp;from button color:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Generate shadings</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Check to let 3D-effect colors be calculated from the button-color.</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Light</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Midlight</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Mid</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Dark</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Shadow</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboEffect</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose 3D-effect color role</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Select a color effect role.&lt;/b&gt;&lt;p&gt;Available effect roles are: &lt;ul&gt; &lt;li&gt;Light - lighter than Button color. &lt;/li&gt; &lt;li&gt;Midlight - between Button and Light. &lt;/li&gt; &lt;li&gt;Mid - between Button and Dark. &lt;/li&gt; &lt;li&gt;Dark - darker than Button. &lt;/li&gt; &lt;li&gt;Shadow - a very dark color. &lt;/li&gt; &lt;/ul&gt;</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout31_2</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_Spacing3</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="QLabel">
+ <property name="name">
+ <cstring>labelEffect</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>Select co&amp;lor:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>buttonEffect</cstring>
+ </property>
+ </widget>
+ <widget class="StyledButton">
+ <property name="name">
+ <cstring>buttonEffect</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="scale" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose a color</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Choose a color for the selected effect color role.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </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="QPushButton">
+ <property name="name">
+ <cstring>buttonHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <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="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>StyledButton</class>
+ <header location="local">styledbutton.h</header>
+ <sizehint>
+ <width>40</width>
+ <height>25</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ <signal>clicked()</signal>
+ <signal>changed()</signal>
+ <property type="Color">color</property>
+ <property type="Pixmap">pixmap</property>
+ <property type="Bool">scale</property>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="1112">789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>paletteCombo</sender>
+ <signal>activated(int)</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>paletteSelected(int)</slot>
+ </connection>
+ <connection>
+ <sender>comboCentral</sender>
+ <signal>activated(int)</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>onCentral(int)</slot>
+ </connection>
+ <connection>
+ <sender>buttonPixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>onChoosePixmap()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCentral</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>onChooseCentralColor()</slot>
+ </connection>
+ <connection>
+ <sender>buttonEffect</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>onChooseEffectColor()</slot>
+ </connection>
+ <connection>
+ <sender>comboEffect</sender>
+ <signal>activated(int)</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>onEffect(int)</slot>
+ </connection>
+ <connection>
+ <sender>checkBuildEffect</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>onToggleBuildEffects(bool)</slot>
+ </connection>
+ <connection>
+ <sender>buttonHelp</sender>
+ <signal>clicked()</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>showHelp()</slot>
+ </connection>
+ <connection>
+ <sender>checkBuildEffect</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>comboEffect</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkBuildEffect</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>buttonEffect</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkBuildInactive</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>onToggleBuildInactive(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkBuildDisabled</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>PaletteEditorAdvancedBase</receiver>
+ <slot>onToggleBuildDisabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+ <tabstop>paletteCombo</tabstop>
+ <tabstop>checkBuildInactive</tabstop>
+ <tabstop>checkBuildDisabled</tabstop>
+ <tabstop>comboCentral</tabstop>
+ <tabstop>buttonPixmap</tabstop>
+ <tabstop>buttonCentral</tabstop>
+ <tabstop>checkBuildEffect</tabstop>
+ <tabstop>comboEffect</tabstop>
+ <tabstop>buttonEffect</tabstop>
+ <tabstop>buttonHelp</tabstop>
+</tabstops>
+<slots>
+ <slot access="protected">init()</slot>
+ <slot access="protected">destroy()</slot>
+ <slot access="protected">onToggleBuildDisabled(bool)</slot>
+ <slot access="protected">onCentral(int)</slot>
+ <slot access="protected">onChooseCentralColor()</slot>
+ <slot access="protected">onChooseEffectColor()</slot>
+ <slot access="protected">onChoosePixmap()</slot>
+ <slot access="protected">onEffect(int)</slot>
+ <slot access="protected">onToggleBuildEffects(bool)</slot>
+ <slot access="protected">onToggleBuildInactive(bool)</slot>
+ <slot access="protected">paletteSelected(int)</slot>
+ <slot>showHelp()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>styledbutton.h</includehint>
+ <includehint>styledbutton.h</includehint>
+ <includehint>styledbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/kommander/editor/paletteeditoradvancedimpl.cpp b/kommander/editor/paletteeditoradvancedimpl.cpp
new file mode 100644
index 00000000..3b5ccffd
--- /dev/null
+++ b/kommander/editor/paletteeditoradvancedimpl.cpp
@@ -0,0 +1,638 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "paletteeditoradvancedimpl.h"
+#include "styledbutton.h"
+#include "mainwindow.h"
+#include "formwindow.h"
+
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qlistbox.h>
+#include <qpainter.h>
+#include <qgroupbox.h>
+
+/*!
+ Class used by PaletteEditor for bold combobox items
+*/
+
+class BoldListBoxText : public QListBoxText
+{
+public:
+ BoldListBoxText( QString text, QListBox* lb = 0 );
+
+protected:
+ virtual void paint( QPainter* );
+};
+
+BoldListBoxText::BoldListBoxText( QString text, QListBox* lb )
+ : QListBoxText( lb )
+{
+ setText( text );
+}
+
+void BoldListBoxText::paint( QPainter* painter )
+{
+ QFont f = painter->font();
+ f.setBold( true );
+ painter->setFont( f );
+
+ QListBoxText::paint( painter );
+}
+
+PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, QWidget * parent,
+ const char * name, bool modal, WFlags f )
+ : PaletteEditorAdvancedBase( parent, name, modal, f ), formWindow( fw ), selectedPalette(0)
+{
+ connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+
+ buttonPixmap->setEditor( StyledButton::PixmapEditor );
+
+ editPalette = QApplication::palette();
+ setPreviewPalette( editPalette );
+
+ buttonPixmap->setFormWindow( formWindow );
+
+ // force toggle event
+ checkBuildEffect->setChecked(false);
+ checkBuildEffect->setChecked(true);
+}
+
+PaletteEditorAdvanced::~PaletteEditorAdvanced()
+{
+}
+
+void PaletteEditorAdvanced::onToggleBuildInactive( bool v )
+{
+ if (selectedPalette == 1) {
+ groupCentral->setDisabled(v);
+ groupEffect->setDisabled(v);
+ }
+
+ if (v) {
+ buildInactive();
+ updateStyledButtons();
+ }
+}
+
+void PaletteEditorAdvanced::onToggleBuildDisabled( bool v )
+{
+ if (selectedPalette == 2) {
+ groupCentral->setDisabled(v);
+ groupEffect->setDisabled(v);
+ }
+
+ if (v) {
+ buildDisabled();
+ updateStyledButtons();
+ }
+}
+
+void PaletteEditorAdvanced::paletteSelected(int p)
+{
+ selectedPalette = p;
+
+ if(p == 1) { // inactive
+ groupCentral->setDisabled(checkBuildInactive->isChecked());
+ groupEffect->setDisabled(checkBuildInactive->isChecked());
+ }
+ else if (p == 2) { // disabled
+ groupCentral->setDisabled(checkBuildDisabled->isChecked());
+ groupEffect->setDisabled(checkBuildDisabled->isChecked());
+ }
+ else {
+ groupCentral->setEnabled(true);
+ groupEffect->setEnabled(true);
+ }
+ updateStyledButtons();
+}
+
+void PaletteEditorAdvanced::onChooseCentralColor()
+{
+ switch(selectedPalette) {
+ case 0:
+ default:
+ mapToActiveCentralRole( buttonCentral->color() );
+ break;
+ case 1:
+ mapToInactiveCentralRole( buttonCentral->color() );
+ break;
+ case 2:
+ mapToDisabledCentralRole( buttonCentral->color() );
+ break;
+ }
+ updateStyledButtons();
+}
+
+void PaletteEditorAdvanced::onChooseEffectColor()
+{
+ switch(selectedPalette) {
+ case 0:
+ default:
+ mapToActiveEffectRole( buttonEffect->color() );
+ break;
+ case 1:
+ mapToInactiveEffectRole( buttonEffect->color() );
+ break;
+ case 2:
+ mapToDisabledEffectRole( buttonEffect->color() );
+ break;
+ }
+ updateStyledButtons();
+}
+
+void PaletteEditorAdvanced::onChoosePixmap()
+{
+ if (buttonPixmap->pixmap()) {
+ switch(selectedPalette) {
+ case 0:
+ default:
+ mapToActivePixmapRole( *buttonPixmap->pixmap() );
+ break;
+ case 1:
+ mapToInactivePixmapRole( *buttonPixmap->pixmap() );
+ break;
+ case 2:
+ mapToDisabledPixmapRole( *buttonPixmap->pixmap() );
+ break;
+ }
+ }
+ updateStyledButtons();
+}
+
+void PaletteEditorAdvanced::onToggleBuildEffects( bool on )
+{
+ if (!on) return;
+ buildActiveEffect();
+ buildInactiveEffect();
+ buildDisabledEffect();
+}
+
+QColorGroup::ColorRole PaletteEditorAdvanced::centralFromItem( int item )
+{
+ switch( item ) {
+ case 0:
+ return QColorGroup::Background;
+ case 1:
+ return QColorGroup::Foreground;
+ case 2:
+ return QColorGroup::Button;
+ case 3:
+ return QColorGroup::Base;
+ case 4:
+ return QColorGroup::Text;
+ case 5:
+ return QColorGroup::BrightText;
+ case 6:
+ return QColorGroup::ButtonText;
+ case 7:
+ return QColorGroup::Highlight;
+ case 8:
+ return QColorGroup::HighlightedText;
+ case 9:
+ return QColorGroup::Link;
+ case 10:
+ return QColorGroup::LinkVisited;
+ default:
+ return QColorGroup::NColorRoles;
+ }
+}
+
+QColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item )
+{
+ switch( item ) {
+ case 0:
+ return QColorGroup::Light;
+ case 1:
+ return QColorGroup::Midlight;
+ case 2:
+ return QColorGroup::Mid;
+ case 3:
+ return QColorGroup::Dark;
+ case 4:
+ return QColorGroup::Shadow;
+ default:
+ return QColorGroup::NColorRoles;
+ }
+}
+
+void PaletteEditorAdvanced::onCentral( int item )
+{
+ QPixmap* p = 0;
+ QColor c;
+
+ switch(selectedPalette) {
+ case 0:
+ default:
+ c = editPalette.active().color( centralFromItem(item) );
+ p = editPalette.active().brush( centralFromItem(item) ).pixmap();
+ break;
+ case 1:
+ c = editPalette.inactive().color( centralFromItem(item) );
+ p = editPalette.inactive().brush( centralFromItem(item) ).pixmap();
+ break;
+ case 2:
+ c = editPalette.disabled().color( centralFromItem(item) );
+ p = editPalette.disabled().brush( centralFromItem(item) ).pixmap();
+ break;
+ }
+
+ buttonCentral->setColor(c);
+
+ if (p)
+ buttonPixmap->setPixmap( *p );
+ else
+ buttonPixmap->setPixmap( QPixmap() );
+}
+
+void PaletteEditorAdvanced::onEffect( int item )
+{
+ QColor c;
+ switch(selectedPalette) {
+ case 0:
+ default:
+ c = editPalette.active().color( effectFromItem(item) );
+ break;
+ case 1:
+ editPalette.inactive().color( effectFromItem(item) );
+ break;
+ case 2:
+ editPalette.disabled().color( effectFromItem(item) );
+ break;
+ }
+ buttonEffect->setColor(c);
+}
+
+void PaletteEditorAdvanced::mapToActiveCentralRole( const QColor& c )
+{
+ QColorGroup cg = editPalette.active();
+ cg.setColor( centralFromItem(comboCentral->currentItem()), c );
+ editPalette.setActive( cg );
+
+ buildActiveEffect();
+ if(checkBuildInactive->isChecked())
+ buildInactive();
+ if(checkBuildDisabled->isChecked())
+ buildDisabled();
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::mapToActiveEffectRole( const QColor& c )
+{
+ QColorGroup cg = editPalette.active();
+ cg.setColor( effectFromItem(comboEffect->currentItem()), c );
+ editPalette.setActive( cg );
+
+ if(checkBuildInactive->isChecked())
+ buildInactive();
+ if(checkBuildDisabled->isChecked())
+ buildDisabled();
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::mapToActivePixmapRole( const QPixmap& pm )
+{
+ QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
+ QColorGroup cg = editPalette.active();
+ if ( !pm.isNull() )
+ cg.setBrush( role, QBrush( cg.color( role ), pm ) );
+ else
+ cg.setBrush( role, QBrush( cg.color( role ) ) );
+ editPalette.setActive( cg );
+
+
+ buildActiveEffect();
+ if(checkBuildInactive->isChecked())
+ buildInactive();
+ if(checkBuildDisabled->isChecked())
+ buildDisabled();
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::mapToInactiveCentralRole( const QColor& c )
+{
+ QColorGroup cg = editPalette.inactive();
+ cg.setColor( centralFromItem(comboCentral->currentItem()), c );
+ editPalette.setInactive( cg );
+
+ buildInactiveEffect();
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::mapToInactiveEffectRole( const QColor& c )
+{
+ QColorGroup cg = editPalette.inactive();
+ cg.setColor( effectFromItem(comboEffect->currentItem()), c );
+ editPalette.setInactive( cg );
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::mapToInactivePixmapRole( const QPixmap& pm )
+{
+ QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
+ QColorGroup cg = editPalette.inactive();
+ if ( !pm.isNull() )
+ cg.setBrush( role, QBrush( cg.color( role ), pm ) );
+ else
+ cg.setBrush( role, QBrush( cg.color( role ) ) );
+ editPalette.setInactive( cg );
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::mapToDisabledCentralRole( const QColor& c )
+{
+ QColorGroup cg = editPalette.disabled();
+ cg.setColor( centralFromItem(comboCentral->currentItem()), c );
+ editPalette.setDisabled( cg );
+
+ buildDisabledEffect();
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::mapToDisabledEffectRole( const QColor& c )
+{
+ QColorGroup cg = editPalette.disabled();
+ cg.setColor( effectFromItem(comboEffect->currentItem()), c );
+ editPalette.setDisabled( cg );
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::mapToDisabledPixmapRole( const QPixmap& pm )
+{
+ QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
+ QColorGroup cg = editPalette.disabled();
+ if ( !pm.isNull() )
+ cg.setBrush( role, QBrush( cg.color( role ), pm ) );
+ else
+ cg.setBrush( role, QBrush( cg.color( role ) ) );
+
+ editPalette.setDisabled( cg );
+
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditorAdvanced::buildActiveEffect()
+{
+ QColorGroup cg = editPalette.active();
+ QColor btn = cg.color( QColorGroup::Button );
+
+ QPalette temp( btn, btn );
+
+ for (int i = 0; i<5; i++)
+ cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) );
+
+ editPalette.setActive( cg );
+ setPreviewPalette( editPalette );
+
+ updateStyledButtons();
+}
+
+void PaletteEditorAdvanced::buildInactive()
+{
+ editPalette.setInactive( editPalette.active() );
+ buildInactiveEffect();
+}
+
+void PaletteEditorAdvanced::buildInactiveEffect()
+{
+ QColorGroup cg = editPalette.inactive();
+
+ QColor light, midlight, mid, dark, shadow;
+ QColor btn = cg.color( QColorGroup::Button );
+
+ light = btn.light(150);
+ midlight = btn.light(115);
+ mid = btn.dark(150);
+ dark = btn.dark();
+ shadow = black;
+
+ cg.setColor( QColorGroup::Light, light );
+ cg.setColor( QColorGroup::Midlight, midlight );
+ cg.setColor( QColorGroup::Mid, mid );
+ cg.setColor( QColorGroup::Dark, dark );
+ cg.setColor( QColorGroup::Shadow, shadow );
+
+ editPalette.setInactive( cg );
+ setPreviewPalette( editPalette );
+ updateStyledButtons();
+}
+
+void PaletteEditorAdvanced::buildDisabled()
+{
+ QColorGroup cg = editPalette.active();
+ cg.setColor( QColorGroup::ButtonText, darkGray );
+ cg.setColor( QColorGroup::Foreground, darkGray );
+ editPalette.setDisabled( cg );
+
+ buildDisabledEffect();
+}
+
+void PaletteEditorAdvanced::buildDisabledEffect()
+{
+ QColorGroup cg = editPalette.disabled();
+
+ QColor light, midlight, mid, dark, shadow;
+ QColor btn = cg.color( QColorGroup::Button );
+
+ light = btn.light(150);
+ midlight = btn.light(115);
+ mid = btn.dark(150);
+ dark = btn.dark();
+ shadow = black;
+
+ cg.setColor( QColorGroup::Light, light );
+ cg.setColor( QColorGroup::Midlight, midlight );
+ cg.setColor( QColorGroup::Mid, mid );
+ cg.setColor( QColorGroup::Dark, dark );
+ cg.setColor( QColorGroup::Shadow, shadow );
+
+ editPalette.setDisabled( cg );
+ setPreviewPalette( editPalette );
+ updateStyledButtons();
+}
+
+void PaletteEditorAdvanced::setPreviewPalette( const QPalette& pal )
+{
+ QColorGroup cg;
+
+ switch (selectedPalette) {
+ case 0:
+ default:
+ cg = pal.active();
+ break;
+ case 1:
+ cg = pal.inactive();
+ break;
+ case 2:
+ cg = pal.disabled();
+ break;
+ }
+ previewPalette.setActive( cg );
+ previewPalette.setInactive( cg );
+ previewPalette.setDisabled( cg );
+}
+
+void PaletteEditorAdvanced::updateStyledButtons()
+{
+ QColor central, effect;
+ QPixmap *pm = 0;
+ switch (selectedPalette) {
+ case 0:
+ default:
+ central = editPalette.active().color( centralFromItem( comboCentral->currentItem() ) );
+ effect = editPalette.active().color( effectFromItem( comboEffect->currentItem() ) );
+ pm = editPalette.active().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ break;
+ case 1:
+ central = editPalette.inactive().color( centralFromItem( comboCentral->currentItem() ) );
+ effect = editPalette.inactive().color( effectFromItem( comboEffect->currentItem() ) );
+ pm = editPalette.inactive().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ break;
+ case 2:
+ central = editPalette.disabled().color( centralFromItem( comboCentral->currentItem() ) );
+ effect = editPalette.disabled().color( effectFromItem( comboEffect->currentItem() ) );
+ pm = editPalette.disabled().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ break;
+ }
+
+ buttonCentral->setColor(central);
+ buttonEffect->setColor(effect);
+ if ( pm && !pm->isNull() )
+ buttonPixmap->setPixmap( *pm );
+ else
+ buttonPixmap->setPixmap(QPixmap());
+}
+
+void PaletteEditorAdvanced::setPal( const QPalette& pal )
+{
+ editPalette = pal;
+ setPreviewPalette( pal );
+ updateStyledButtons();
+}
+
+QPalette PaletteEditorAdvanced::pal() const
+{
+ return editPalette;
+}
+
+void PaletteEditorAdvanced::setupBackgroundMode( BackgroundMode mode )
+{
+ int initRole = 0;
+
+ switch( mode ) {
+ case PaletteBackground:
+ initRole = 0;
+ break;
+ case PaletteForeground:
+ initRole = 1;
+ break;
+ case PaletteButton:
+ initRole = 2;
+ break;
+ case PaletteBase:
+ initRole = 3;
+ break;
+ case PaletteText:
+ initRole = 4;
+ break;
+ case PaletteBrightText:
+ initRole = 5;
+ break;
+ case PaletteButtonText:
+ initRole = 6;
+ break;
+ case PaletteHighlight:
+ initRole = 7;
+ break;
+ case PaletteHighlightedText:
+ initRole = 8;
+ break;
+ case PaletteLight:
+ initRole = 9;
+ break;
+ case PaletteMidlight:
+ initRole = 10;
+ break;
+ case PaletteDark:
+ initRole = 11;
+ break;
+ case PaletteMid:
+ initRole = 12;
+ break;
+ case PaletteShadow:
+ initRole = 13;
+ break;
+ default:
+ initRole = -1;
+ break;
+ }
+
+ if ( initRole <= -1 ) return;
+
+ if (initRole > 8 ) {
+ comboEffect->setCurrentItem( initRole - 9 );
+ if ( comboEffect->listBox() ) {
+ QString text = comboEffect->currentText();
+ comboEffect->listBox()->changeItem( new BoldListBoxText( text ), initRole - 9 );
+ }
+ }
+ else {
+ comboCentral->setCurrentItem( initRole );
+ if ( comboCentral->listBox() ) {
+ QString text = comboCentral->currentText();
+ comboCentral->listBox()->changeItem( new BoldListBoxText( text ), initRole );
+ }
+ }
+}
+
+QPalette PaletteEditorAdvanced::getPalette( bool *ok, const QPalette &init,
+ BackgroundMode mode, QWidget* parent,
+ const char* name, FormWindow *fw )
+{
+ PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, true );
+ dlg->setupBackgroundMode( mode );
+
+ if ( init != QPalette() )
+ dlg->setPal( init );
+ int resultCode = dlg->exec();
+
+ QPalette result = init;
+ if ( resultCode == QDialog::Accepted ) {
+ if ( ok )
+ *ok = true;
+ result = dlg->pal();
+ } else {
+ if ( ok )
+ *ok = false;
+ }
+ delete dlg;
+ return result;
+}
+#include "paletteeditoradvancedimpl.moc"
diff --git a/kommander/editor/paletteeditoradvancedimpl.h b/kommander/editor/paletteeditoradvancedimpl.h
new file mode 100644
index 00000000..a1b56c06
--- /dev/null
+++ b/kommander/editor/paletteeditoradvancedimpl.h
@@ -0,0 +1,90 @@
+#ifndef PALETTEEDITORADVANCEDIMPL_H
+#define PALETTEEDITORADVANCEDIMPL_H
+
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "paletteeditoradvanced.h"
+
+class FormWindow;
+
+class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
+{
+ Q_OBJECT
+public:
+ PaletteEditorAdvanced( FormWindow *fw, QWidget * parent=0, const char * name=0,
+ bool modal=FALSE, WFlags f=0 );
+ ~PaletteEditorAdvanced();
+
+ static QPalette getPalette( bool *ok, const QPalette &pal, BackgroundMode mode = PaletteBackground,
+ QWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+
+protected slots:
+ void paletteSelected(int);
+
+ void onCentral( int );
+ void onEffect( int );
+
+ void onChooseCentralColor();
+ void onChooseEffectColor();
+ void onChoosePixmap();
+
+ void onToggleBuildEffects( bool );
+ void onToggleBuildInactive( bool );
+ void onToggleBuildDisabled( bool );
+
+protected:
+ void mapToActiveCentralRole( const QColor& );
+ void mapToActiveEffectRole( const QColor& );
+ void mapToActivePixmapRole( const QPixmap& );
+ void mapToInactiveCentralRole( const QColor& );
+ void mapToInactiveEffectRole( const QColor& );
+ void mapToInactivePixmapRole( const QPixmap& );
+ void mapToDisabledCentralRole( const QColor& );
+ void mapToDisabledEffectRole( const QColor& );
+ void mapToDisabledPixmapRole( const QPixmap& );
+
+
+ void buildPalette();
+ void buildActiveEffect();
+ void buildInactive();
+ void buildInactiveEffect();
+ void buildDisabled();
+ void buildDisabledEffect();
+
+private:
+ void setPreviewPalette( const QPalette& );
+ void updateStyledButtons();
+ void setupBackgroundMode( BackgroundMode );
+
+ QPalette pal() const;
+ void setPal( const QPalette& );
+
+ QColorGroup::ColorRole centralFromItem( int );
+ QColorGroup::ColorRole effectFromItem( int );
+ QPalette editPalette;
+ QPalette previewPalette;
+
+ FormWindow *formWindow;
+
+ int selectedPalette;
+};
+
+#endif
diff --git a/kommander/editor/paletteeditorimpl.cpp b/kommander/editor/paletteeditorimpl.cpp
new file mode 100644
index 00000000..9264c810
--- /dev/null
+++ b/kommander/editor/paletteeditorimpl.cpp
@@ -0,0 +1,299 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "paletteeditorimpl.h"
+#include "paletteeditoradvancedimpl.h"
+#include "previewframe.h"
+#include "styledbutton.h"
+#include "mainwindow.h"
+#include "formwindow.h"
+
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qapplication.h>
+#include <qpushbutton.h>
+
+PaletteEditor::PaletteEditor( FormWindow *fw, QWidget * parent, const char * name, bool modal, WFlags f )
+ : PaletteEditorBase( parent, name, modal, f ), formWindow( fw )
+{
+ connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+
+ editPalette = QApplication::palette();
+ setPreviewPalette( editPalette );
+
+ buttonMainColor->setColor( editPalette.active().color( QColorGroup::Button ) );
+ buttonMainColor2->setColor( editPalette.active().color( QColorGroup::Background ) );
+}
+
+PaletteEditor::~PaletteEditor()
+{
+}
+
+void PaletteEditor::onTune()
+{
+ bool ok;
+ QPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow);
+ if (!ok) return;
+
+ editPalette = pal;
+ setPreviewPalette( editPalette );
+}
+
+void PaletteEditor::onChooseMainColor()
+{
+ buildPalette();
+}
+
+void PaletteEditor::onChoose2ndMainColor()
+{
+ buildPalette();
+}
+
+void PaletteEditor::paletteSelected(int)
+{
+ setPreviewPalette(editPalette);
+}
+
+QColorGroup::ColorRole PaletteEditor::centralFromItem( int item )
+{
+ switch( item )
+ {
+ case 0:
+ return QColorGroup::Background;
+ case 1:
+ return QColorGroup::Foreground;
+ case 2:
+ return QColorGroup::Button;
+ case 3:
+ return QColorGroup::Base;
+ case 4:
+ return QColorGroup::Text;
+ case 5:
+ return QColorGroup::BrightText;
+ case 6:
+ return QColorGroup::ButtonText;
+ case 7:
+ return QColorGroup::Highlight;
+ case 8:
+ return QColorGroup::HighlightedText;
+ default:
+ return QColorGroup::NColorRoles;
+ }
+}
+
+QColorGroup::ColorRole PaletteEditor::effectFromItem( int item )
+{
+ switch( item )
+ {
+ case 0:
+ return QColorGroup::Light;
+ case 1:
+ return QColorGroup::Midlight;
+ case 2:
+ return QColorGroup::Mid;
+ case 3:
+ return QColorGroup::Dark;
+ case 4:
+ return QColorGroup::Shadow;
+ default:
+ return QColorGroup::NColorRoles;
+ }
+}
+
+void PaletteEditor::buildPalette()
+{
+ int i;
+ QColorGroup cg;
+ QColor btn = buttonMainColor->color();
+ QColor back = buttonMainColor2->color();
+ QPalette automake( btn, back );
+
+ for (i = 0; i<9; i++)
+ cg.setColor( centralFromItem(i), automake.active().color( centralFromItem(i) ) );
+
+ editPalette.setActive( cg );
+ buildActiveEffect();
+
+ cg = editPalette.inactive();
+
+ QPalette temp( editPalette.active().color( QColorGroup::Button ),
+ editPalette.active().color( QColorGroup::Background ) );
+
+ for (i = 0; i<9; i++)
+ cg.setColor( centralFromItem(i), temp.inactive().color( centralFromItem(i) ) );
+
+ editPalette.setInactive( cg );
+ buildInactiveEffect();
+
+ cg = editPalette.disabled();
+
+ for (i = 0; i<9; i++)
+ cg.setColor( centralFromItem(i), temp.disabled().color( centralFromItem(i) ) );
+
+ editPalette.setDisabled( cg );
+ buildDisabledEffect();
+
+ updateStyledButtons();
+}
+
+void PaletteEditor::buildActiveEffect()
+{
+ QColorGroup cg = editPalette.active();
+ QColor btn = cg.color( QColorGroup::Button );
+
+ QPalette temp( btn, btn );
+
+ for (int i = 0; i<5; i++)
+ cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) );
+
+ editPalette.setActive( cg );
+ setPreviewPalette( editPalette );
+
+ updateStyledButtons();
+}
+
+void PaletteEditor::buildInactive()
+{
+ editPalette.setInactive( editPalette.active() );
+ buildInactiveEffect();
+}
+
+void PaletteEditor::buildInactiveEffect()
+{
+ QColorGroup cg = editPalette.inactive();
+
+ QColor light, midlight, mid, dark, shadow;
+ QColor btn = cg.color( QColorGroup::Button );
+
+ light = btn.light(150);
+ midlight = btn.light(115);
+ mid = btn.dark(150);
+ dark = btn.dark();
+ shadow = black;
+
+ cg.setColor( QColorGroup::Light, light );
+ cg.setColor( QColorGroup::Midlight, midlight );
+ cg.setColor( QColorGroup::Mid, mid );
+ cg.setColor( QColorGroup::Dark, dark );
+ cg.setColor( QColorGroup::Shadow, shadow );
+
+ editPalette.setInactive( cg );
+ setPreviewPalette( editPalette );
+ updateStyledButtons();
+}
+
+void PaletteEditor::buildDisabled()
+{
+ QColorGroup cg = editPalette.active();
+ cg.setColor( QColorGroup::ButtonText, darkGray );
+ cg.setColor( QColorGroup::Foreground, darkGray );
+ editPalette.setDisabled( cg );
+
+ buildDisabledEffect();
+}
+
+void PaletteEditor::buildDisabledEffect()
+{
+ QColorGroup cg = editPalette.disabled();
+
+ QColor light, midlight, mid, dark, shadow;
+ QColor btn = cg.color( QColorGroup::Button );
+
+ light = btn.light(150);
+ midlight = btn.light(115);
+ mid = btn.dark(150);
+ dark = btn.dark();
+ shadow = black;
+
+ cg.setColor( QColorGroup::Light, light );
+ cg.setColor( QColorGroup::Midlight, midlight );
+ cg.setColor( QColorGroup::Mid, mid );
+ cg.setColor( QColorGroup::Dark, dark );
+ cg.setColor( QColorGroup::Shadow, shadow );
+
+ editPalette.setDisabled( cg );
+ setPreviewPalette( editPalette );
+ updateStyledButtons();
+}
+
+void PaletteEditor::setPreviewPalette( const QPalette& pal )
+{
+ QColorGroup cg;
+
+ switch (paletteCombo->currentItem()) {
+ case 0:
+ default:
+ cg = pal.active();
+ break;
+ case 1:
+ cg = pal.inactive();
+ break;
+ case 2:
+ cg = pal.disabled();
+ break;
+ }
+ previewPalette.setActive( cg );
+ previewPalette.setInactive( cg );
+ previewPalette.setDisabled( cg );
+
+ previewFrame->setPreviewPalette(previewPalette);
+}
+
+void PaletteEditor::updateStyledButtons()
+{
+ buttonMainColor->setColor( editPalette.active().color( QColorGroup::Button ));
+ buttonMainColor2->setColor( editPalette.active().color( QColorGroup::Background ));
+}
+
+void PaletteEditor::setPal( const QPalette& pal )
+{
+ editPalette = pal;
+ setPreviewPalette( pal );
+ updateStyledButtons();
+}
+
+QPalette PaletteEditor::pal() const
+{
+ return editPalette;
+}
+
+QPalette PaletteEditor::getPalette( bool *ok, const QPalette &init, BackgroundMode mode,
+ QWidget* parent, const char* name, FormWindow *fw )
+{
+ PaletteEditor* dlg = new PaletteEditor( fw, parent, name, true );
+ dlg->setupBackgroundMode( mode );
+
+ if ( init != QPalette() )
+ dlg->setPal( init );
+ int resultCode = dlg->exec();
+
+ QPalette result = init;
+ if ( resultCode == QDialog::Accepted ) {
+ if ( ok )
+ *ok = true;
+ result = dlg->pal();
+ } else {
+ if ( ok )
+ *ok = false;
+ }
+ delete dlg;
+ return result;
+}
+#include "paletteeditorimpl.moc"
diff --git a/kommander/editor/paletteeditorimpl.h b/kommander/editor/paletteeditorimpl.h
new file mode 100644
index 00000000..258d0978
--- /dev/null
+++ b/kommander/editor/paletteeditorimpl.h
@@ -0,0 +1,70 @@
+#ifndef PALETTEEDITORIMPL_H
+#define PALETTEEDITORIMPL_H
+
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "paletteeditor.h"
+
+class FormWindow;
+
+class PaletteEditor : public PaletteEditorBase
+{
+ Q_OBJECT
+
+public:
+ PaletteEditor( FormWindow *fw, QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
+ ~PaletteEditor();
+
+ static QPalette getPalette( bool *ok, const QPalette &pal, BackgroundMode mode = PaletteBackground,
+ QWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+
+protected slots:
+ void onChooseMainColor();
+ void onChoose2ndMainColor();
+ void onTune();
+ void paletteSelected(int);
+
+protected:
+ void buildPalette();
+ void buildActiveEffect();
+ void buildInactive();
+ void buildInactiveEffect();
+ void buildDisabled();
+ void buildDisabledEffect();
+
+private:
+ void setPreviewPalette( const QPalette& );
+ void updateStyledButtons();
+ void setupBackgroundMode( BackgroundMode mode ) { backgroundMode = mode; }
+
+ QPalette pal() const;
+ void setPal( const QPalette& );
+
+ QColorGroup::ColorRole centralFromItem( int );
+ QColorGroup::ColorRole effectFromItem( int );
+ QPalette editPalette;
+ QPalette previewPalette;
+
+ FormWindow *formWindow;
+ BackgroundMode backgroundMode;
+};
+
+#endif
diff --git a/kommander/editor/parser.cpp b/kommander/editor/parser.cpp
new file mode 100644
index 00000000..4fc13c5f
--- /dev/null
+++ b/kommander/editor/parser.cpp
@@ -0,0 +1,66 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "parser.h"
+#include <qobject.h>
+#include <qstringlist.h>
+
+class NormalizeObject : public QObject
+{
+public:
+ NormalizeObject() : QObject() {}
+ static QCString normalizeSignalSlot( const char *signalSlot ) { return QObject::normalizeSignalSlot( signalSlot ); }
+};
+
+QString Parser::cleanArgs( const QString &func )
+{
+ QString slot( func );
+ int begin = slot.find( "(" ) + 1;
+ QString args = slot.mid( begin );
+ args = args.left( args.find( ")" ) );
+ QStringList lst = QStringList::split( ',', args );
+ QString res = slot.left( begin );
+ for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ if ( it != lst.begin() )
+ res += ",";
+ QString arg = *it;
+ int pos = 0;
+ if ( ( pos = arg.find( "&" ) ) != -1 ) {
+ arg = arg.left( pos + 1 );
+ } else if ( ( pos = arg.find( "*" ) ) != -1 ) {
+ arg = arg.left( pos + 1 );
+ } else {
+ arg = arg.simplifyWhiteSpace();
+ if ( ( pos = arg.find( ':' ) ) != -1 )
+ arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace();
+ QStringList l = QStringList::split( ' ', arg );
+ if ( l.count() == 2 ) {
+ if ( l[ 0 ] != "const" && l[ 0 ] != "unsigned" && l[ 0 ] != "var" )
+ arg = l[ 0 ];
+ } else if ( l.count() == 3 ) {
+ arg = l[ 0 ] + " " + l[ 1 ];
+ }
+ }
+ res += arg;
+ }
+ res += ")";
+
+ return QString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
+}
diff --git a/kommander/editor/parser.h b/kommander/editor/parser.h
new file mode 100644
index 00000000..5a5671ad
--- /dev/null
+++ b/kommander/editor/parser.h
@@ -0,0 +1,33 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef PARSER_H
+#define PARSER_H
+
+#include <qstring.h>
+
+class Parser
+{
+public:
+ static QString cleanArgs( const QString &func );
+
+};
+
+#endif
diff --git a/kommander/editor/pics/Makefile.am b/kommander/editor/pics/Makefile.am
new file mode 100644
index 00000000..2306b047
--- /dev/null
+++ b/kommander/editor/pics/Makefile.am
@@ -0,0 +1,5 @@
+kmdr_editordir = ${kde_datadir}/kommander/pics
+
+kmdr_editor_DATA = kommandersplash.png toolbox.png kfontcombo.png
+
+
diff --git a/kommander/editor/pics/arrow.xbm b/kommander/editor/pics/arrow.xbm
new file mode 100644
index 00000000..076875d4
--- /dev/null
+++ b/kommander/editor/pics/arrow.xbm
@@ -0,0 +1,10 @@
+#define arrow_width 25
+#define arrow_height 25
+static unsigned char arrow_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x01,0x00,
+ 0x00,0x80,0x02,0x00,0x00,0x80,0x04,0x00,0x00,0x80,0x08,0x00,0x00,0x80,0x10,
+ 0x00,0x00,0x80,0x20,0x00,0x00,0x80,0x40,0x00,0x00,0x80,0x80,0x00,0x00,0x80,
+ 0x00,0x01,0x00,0x80,0x00,0x02,0x00,0x80,0xc0,0x07,0x00,0x80,0x48,0x00,0x00,
+ 0x80,0x4c,0x00,0x00,0x80,0x92,0x00,0x00,0x80,0x91,0x00,0x00,0x80,0x20,0x01,
+ 0x00,0x00,0x20,0x01,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x80,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/background.png b/kommander/editor/pics/background.png
new file mode 100644
index 00000000..d2102bac
--- /dev/null
+++ b/kommander/editor/pics/background.png
Binary files differ
diff --git a/kommander/editor/pics/cross.xbm b/kommander/editor/pics/cross.xbm
new file mode 100644
index 00000000..e6334a16
--- /dev/null
+++ b/kommander/editor/pics/cross.xbm
@@ -0,0 +1,10 @@
+#define cross_width 25
+#define cross_height 25
+static unsigned char cross_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0xf0,0xff,0x1f,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/hand.xbm b/kommander/editor/pics/hand.xbm
new file mode 100644
index 00000000..19513f38
--- /dev/null
+++ b/kommander/editor/pics/hand.xbm
@@ -0,0 +1,10 @@
+#define hand_width 25
+#define hand_height 25
+static unsigned char hand_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x80,0x04,0x00,0x00,0x80,0x04,0x00,
+ 0x00,0x80,0x04,0x00,0x00,0x80,0x04,0x00,0x00,0x80,0x1c,0x00,0x00,0x80,0xe4,
+ 0x00,0x00,0x80,0x24,0x03,0x00,0x80,0x24,0x05,0x00,0xb8,0x24,0x09,0x00,0xc8,
+ 0x00,0x09,0x00,0x88,0x00,0x08,0x00,0x90,0x00,0x08,0x00,0xa0,0x00,0x08,0x00,
+ 0x20,0x00,0x08,0x00,0x40,0x00,0x08,0x00,0x40,0x00,0x04,0x00,0x80,0x00,0x04,
+ 0x00,0x80,0x00,0x04,0x00,0x00,0x01,0x02,0x00,0x00,0x01,0x02,0x00,0x00,0xff,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/hsplit.xbm b/kommander/editor/pics/hsplit.xbm
new file mode 100644
index 00000000..8d053797
--- /dev/null
+++ b/kommander/editor/pics/hsplit.xbm
@@ -0,0 +1,10 @@
+#define hsplit_width 25
+#define hsplit_height 25
+static unsigned char hsplit_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x1c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0xf0,
+ 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x07,0x00,
+ 0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/ibeam.xbm b/kommander/editor/pics/ibeam.xbm
new file mode 100644
index 00000000..479c5134
--- /dev/null
+++ b/kommander/editor/pics/ibeam.xbm
@@ -0,0 +1,10 @@
+#define ibeam_width 25
+#define ibeam_height 25
+static unsigned char ibeam_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xee,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0xee,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/images.h b/kommander/editor/pics/images.h
new file mode 100644
index 00000000..adec0936
--- /dev/null
+++ b/kommander/editor/pics/images.h
@@ -0,0 +1,10979 @@
+#ifndef _QEMBED_1804289383
+#define _QEMBED_1804289383
+static const unsigned int arrow_xbm_len = 601;
+static const unsigned char arrow_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x61,0x72,0x72,0x6f,0x77,0x5f,
+ 0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,
+ 0x6e,0x65,0x20,0x61,0x72,0x72,0x6f,0x77,0x5f,0x68,0x65,0x69,0x67,0x68,
+ 0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,
+ 0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x61,0x72,
+ 0x72,0x6f,0x77,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,
+ 0x31,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,
+ 0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x38,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x38,0x30,0x2c,0x30,0x78,0x32,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x34,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,
+ 0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x63,0x30,0x2c,0x30,0x78,
+ 0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,
+ 0x78,0x34,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x34,0x63,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,
+ 0x78,0x39,0x32,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x39,0x31,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x32,
+ 0x30,0x2c,0x30,0x78,0x30,0x31,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x32,0x30,0x2c,0x30,0x78,0x30,0x31,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x34,
+ 0x30,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x34,0x30,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+/* Generated by qembed */
+static const unsigned int cross_xbm_len = 601;
+static const unsigned char cross_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x63,0x72,0x6f,0x73,0x73,0x5f,
+ 0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,
+ 0x6e,0x65,0x20,0x63,0x72,0x6f,0x73,0x73,0x5f,0x68,0x65,0x69,0x67,0x68,
+ 0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,
+ 0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x63,0x72,
+ 0x6f,0x73,0x73,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x31,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x66,0x30,
+ 0x2c,0x30,0x78,0x66,0x66,0x2c,0x30,0x78,0x31,0x66,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int hand_xbm_len = 598;
+static const unsigned char hand_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x68,0x61,0x6e,0x64,0x5f,0x77,
+ 0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,
+ 0x65,0x20,0x68,0x61,0x6e,0x64,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x20,
+ 0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,0x73,0x69,
+ 0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x68,0x61,0x6e,0x64,
+ 0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x33,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,
+ 0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,
+ 0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,
+ 0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x65,0x34,0x2c,0x0a,0x20,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,
+ 0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,0x33,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,
+ 0x35,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x62,0x38,0x2c,0x30,0x78,
+ 0x32,0x34,0x2c,0x30,0x78,0x30,0x39,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x63,0x38,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x39,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x38,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x39,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x61,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,
+ 0x78,0x32,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x34,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x34,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x34,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x31,0x2c,0x30,
+ 0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x66,0x66,0x2c,0x0a,0x20,0x30,
+ 0x78,0x30,0x33,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int hsplit_xbm_len = 604;
+static const unsigned char hsplit_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x68,0x73,0x70,0x6c,0x69,0x74,
+ 0x5f,0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,
+ 0x69,0x6e,0x65,0x20,0x68,0x73,0x70,0x6c,0x69,0x74,0x5f,0x68,0x65,0x69,
+ 0x67,0x68,0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,
+ 0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,
+ 0x68,0x73,0x70,0x6c,0x69,0x74,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,
+ 0x3d,0x20,0x7b,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x63,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x33,0x65,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x38,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x66,0x30,0x2c,0x0a,0x20,0x30,0x78,
+ 0x66,0x66,0x2c,0x30,0x78,0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x66,
+ 0x30,0x2c,0x30,0x78,0x66,0x66,0x2c,0x30,0x78,0x30,0x37,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x33,0x65,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x38,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,
+ 0x3b,0x0a
+};
+
+static const unsigned int ibeam_xbm_len = 601;
+static const unsigned char ibeam_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x69,0x62,0x65,0x61,0x6d,0x5f,
+ 0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,
+ 0x6e,0x65,0x20,0x69,0x62,0x65,0x61,0x6d,0x5f,0x68,0x65,0x69,0x67,0x68,
+ 0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,
+ 0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x69,0x62,
+ 0x65,0x61,0x6d,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x65,0x65,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x31,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x65,0x65,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int no_xbm_len = 592;
+static const unsigned char no_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x6e,0x6f,0x5f,0x77,0x69,0x64,
+ 0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,
+ 0x6e,0x6f,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x20,0x32,0x35,0x0a,0x73,
+ 0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,
+ 0x20,0x63,0x68,0x61,0x72,0x20,0x6e,0x6f,0x5f,0x62,0x69,0x74,0x73,0x5b,
+ 0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x37,0x65,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x66,0x66,
+ 0x2c,0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x63,
+ 0x30,0x2c,0x30,0x78,0x63,0x33,0x2c,0x30,0x78,0x30,0x33,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x65,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x66,0x30,0x2c,
+ 0x30,0x78,0x30,0x31,0x2c,0x0a,0x20,0x30,0x78,0x30,0x65,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x62,0x30,0x2c,0x30,0x78,0x30,0x33,0x2c,0x30,
+ 0x78,0x30,0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x33,0x38,0x2c,
+ 0x30,0x78,0x30,0x37,0x2c,0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x31,0x38,0x2c,0x30,0x78,0x30,0x65,0x2c,0x30,0x78,0x31,
+ 0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x38,0x2c,0x0a,0x20,
+ 0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x31,0x38,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x31,0x38,0x2c,0x30,0x78,0x33,0x38,0x2c,0x30,0x78,0x31,
+ 0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x38,0x2c,0x30,0x78,
+ 0x37,0x30,0x2c,0x30,0x78,0x31,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x33,0x38,0x2c,0x30,0x78,0x65,0x30,0x2c,0x30,0x78,0x31,0x63,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x33,0x30,0x2c,0x30,0x78,
+ 0x63,0x30,0x2c,0x30,0x78,0x30,0x64,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x37,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x66,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x65,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x63,
+ 0x30,0x2c,0x30,0x78,0x63,0x33,0x2c,0x30,0x78,0x30,0x33,0x2c,0x0a,0x20,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x66,0x66,
+ 0x2c,0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x37,0x65,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int sizeall_xbm_len = 607;
+static const unsigned char sizeall_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x61,0x6c,
+ 0x6c,0x5f,0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,
+ 0x66,0x69,0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x61,0x6c,0x6c,0x5f,0x68,
+ 0x65,0x69,0x67,0x68,0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,
+ 0x63,0x20,0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,
+ 0x72,0x20,0x73,0x69,0x7a,0x65,0x61,0x6c,0x6c,0x5f,0x62,0x69,0x74,0x73,
+ 0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,
+ 0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x33,
+ 0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x37,0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x66,0x65,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x31,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x34,0x30,
+ 0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x36,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,
+ 0x30,0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x37,0x30,0x2c,0x0a,
+ 0x20,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x66,0x38,0x2c,0x30,0x78,0x66,0x66,0x2c,0x30,0x78,
+ 0x33,0x66,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x37,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x36,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x63,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x34,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x66,0x65,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,
+ 0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x37,
+ 0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x33,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int sizeb_xbm_len = 601;
+static const unsigned char sizeb_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x62,0x5f,
+ 0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,
+ 0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x62,0x5f,0x68,0x65,0x69,0x67,0x68,
+ 0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,
+ 0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x73,0x69,
+ 0x7a,0x65,0x62,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x63,0x30,0x2c,0x30,0x78,0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x63,0x30,0x2c,0x30,0x78,0x30,0x33,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x63,0x30,0x2c,0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x63,0x30,0x2c,0x30,0x78,0x30,0x32,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x34,0x30,
+ 0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x38,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x32,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x34,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,
+ 0x30,0x36,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x37,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x63,
+ 0x30,0x2c,0x30,0x78,0x30,0x37,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int sizef_xbm_len = 601;
+static const unsigned char sizef_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x66,0x5f,
+ 0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,
+ 0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x66,0x5f,0x68,0x65,0x69,0x67,0x68,
+ 0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,
+ 0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x73,0x69,
+ 0x7a,0x65,0x66,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x65,0x30,0x2c,0x30,0x78,0x30,0x33,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x63,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x33,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x33,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x34,0x30,0x2c,
+ 0x30,0x78,0x30,0x33,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x32,0x30,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x31,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x32,0x30,0x2c,0x30,
+ 0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x36,0x30,0x2c,0x30,0x78,0x30,0x31,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x65,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x65,0x30,0x2c,0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x65,0x30,0x2c,0x30,0x78,0x30,
+ 0x33,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int sizeh_xbm_len = 601;
+static const unsigned char sizeh_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x68,0x5f,
+ 0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,
+ 0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x68,0x5f,0x68,0x65,0x69,0x67,0x68,
+ 0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,
+ 0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x73,0x69,
+ 0x7a,0x65,0x68,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x34,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x36,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x37,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x66,0x38,0x2c,0x0a,0x20,0x30,0x78,0x66,0x66,0x2c,
+ 0x30,0x78,0x33,0x66,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x37,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x36,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x34,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int sizev_xbm_len = 601;
+static const unsigned char sizev_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x76,0x5f,
+ 0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,
+ 0x6e,0x65,0x20,0x73,0x69,0x7a,0x65,0x76,0x5f,0x68,0x65,0x69,0x67,0x68,
+ 0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,
+ 0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x73,0x69,
+ 0x7a,0x65,0x76,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x63,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x33,
+ 0x65,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x37,0x66,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x38,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x37,
+ 0x66,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x33,0x65,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int uparrow_xbm_len = 607;
+static const unsigned char uparrow_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x75,0x70,0x61,0x72,0x72,0x6f,
+ 0x77,0x5f,0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,
+ 0x66,0x69,0x6e,0x65,0x20,0x75,0x70,0x61,0x72,0x72,0x6f,0x77,0x5f,0x68,
+ 0x65,0x69,0x67,0x68,0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,
+ 0x63,0x20,0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,
+ 0x72,0x20,0x75,0x70,0x61,0x72,0x72,0x6f,0x77,0x5f,0x62,0x69,0x74,0x73,
+ 0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,
+ 0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x33,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x37,0x63,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x66,0x65,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,
+ 0x20,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,
+ 0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x31,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int vsplit_xbm_len = 604;
+static const unsigned char vsplit_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x76,0x73,0x70,0x6c,0x69,0x74,
+ 0x5f,0x77,0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,
+ 0x69,0x6e,0x65,0x20,0x76,0x73,0x70,0x6c,0x69,0x74,0x5f,0x68,0x65,0x69,
+ 0x67,0x68,0x74,0x20,0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,
+ 0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,
+ 0x76,0x73,0x70,0x6c,0x69,0x74,0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,
+ 0x3d,0x20,0x7b,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x32,0x34,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x32,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x31,0x30,0x2c,0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,0x38,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x38,0x2c,0x0a,0x20,0x30,0x78,
+ 0x32,0x34,0x2c,0x30,0x78,0x31,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x66,0x63,0x2c,0x30,0x78,0x65,0x37,0x2c,0x30,0x78,0x33,0x66,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,0x38,0x2c,0x30,0x78,0x32,0x34,
+ 0x2c,0x30,0x78,0x31,0x38,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x31,
+ 0x30,0x2c,0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,0x38,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x32,0x34,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x32,0x34,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x32,0x34,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x32,0x34,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,
+ 0x3b,0x0a
+};
+
+static const unsigned int wait_xbm_len = 598;
+static const unsigned char wait_xbm_data[] = {
+ 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x77,0x61,0x69,0x74,0x5f,0x77,
+ 0x69,0x64,0x74,0x68,0x20,0x32,0x35,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,
+ 0x65,0x20,0x77,0x61,0x69,0x74,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x20,
+ 0x32,0x35,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x6e,0x73,0x69,
+ 0x67,0x6e,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x20,0x77,0x61,0x69,0x74,
+ 0x5f,0x62,0x69,0x74,0x73,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x63,0x30,0x2c,0x30,0x78,0x66,0x66,
+ 0x2c,0x30,0x78,0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x63,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x36,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x63,0x30,0x2c,0x30,0x78,0x66,0x66,0x2c,0x30,
+ 0x78,0x30,0x37,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,
+ 0x30,0x78,0x35,0x34,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x32,0x38,0x2c,0x0a,0x20,0x30,
+ 0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,
+ 0x30,0x78,0x31,0x31,0x2c,0x30,0x78,0x30,0x33,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x33,0x2c,0x30,0x78,0x30,
+ 0x31,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x64,0x36,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,0x78,0x36,0x63,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,
+ 0x36,0x63,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,
+ 0x78,0x30,0x30,0x2c,0x30,0x78,0x63,0x36,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x39,0x33,
+ 0x2c,0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x30,0x2c,0x0a,0x20,0x30,
+ 0x78,0x38,0x30,0x2c,0x30,0x78,0x30,0x31,0x2c,0x30,0x78,0x30,0x33,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x31,0x30,
+ 0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,
+ 0x30,0x2c,0x30,0x78,0x32,0x38,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x38,0x30,0x2c,0x30,0x78,0x35,0x34,0x2c,0x30,
+ 0x78,0x30,0x32,0x2c,0x0a,0x20,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x38,
+ 0x30,0x2c,0x30,0x78,0x61,0x61,0x2c,0x30,0x78,0x30,0x32,0x2c,0x30,0x78,
+ 0x30,0x30,0x2c,0x30,0x78,0x63,0x30,0x2c,0x30,0x78,0x66,0x66,0x2c,0x30,
+ 0x78,0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x63,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x36,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x63,0x30,0x2c,0x30,0x78,0x66,0x66,0x2c,0x0a,0x20,0x30,
+ 0x78,0x30,0x37,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,
+ 0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,
+ 0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,0x30,0x2c,0x30,0x78,0x30,
+ 0x30,0x2c,0x30,0x78,0x30,0x30,0x20,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_book_xpm_len = 767;
+static const unsigned char small_book_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x2f,0x2a,0x20,0x44,
+ 0x72,0x61,0x77,0x6e,0x20,0x20,0x62,0x79,0x20,0x4d,0x61,0x72,0x6b,0x20,
+ 0x44,0x6f,0x6e,0x6f,0x68,0x6f,0x65,0x20,0x66,0x6f,0x72,0x20,0x74,0x68,
+ 0x65,0x20,0x4b,0x20,0x44,0x65,0x73,0x6b,0x74,0x6f,0x70,0x20,0x45,0x6e,
+ 0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x2a,0x2f,0x0a,0x2f,
+ 0x2a,0x20,0x53,0x65,0x65,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
+ 0x77,0x77,0x2e,0x6b,0x64,0x65,0x2e,0x6f,0x72,0x67,0x20,0x2a,0x2f,0x0a,
+ 0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x2a,0x6f,0x70,
+ 0x65,0x6e,0x62,0x6f,0x6f,0x6b,0x5b,0x5d,0x3d,0x7b,0x0a,0x22,0x32,0x32,
+ 0x20,0x32,0x32,0x20,0x34,0x20,0x31,0x22,0x2c,0x0a,0x22,0x23,0x20,0x63,
+ 0x20,0x23,0x30,0x30,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x61,0x20,
+ 0x63,0x20,0x23,0x38,0x30,0x38,0x30,0x38,0x30,0x22,0x2c,0x0a,0x22,0x62,
+ 0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x2e,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x22,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x23,0x23,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x23,0x61,0x62,0x23,0x2e,0x2e,0x2e,0x2e,
+ 0x23,0x23,0x23,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x2e,0x2e,0x2e,0x2e,0x23,0x61,0x62,0x62,0x23,0x2e,0x23,0x23,0x62,0x62,
+ 0x23,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,
+ 0x2e,0x2e,0x23,0x61,0x62,0x62,0x62,0x23,0x61,0x62,0x62,0x62,0x23,0x23,
+ 0x23,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,
+ 0x23,0x61,0x62,0x62,0x62,0x23,0x62,0x62,0x62,0x62,0x23,0x61,0x23,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x23,0x61,
+ 0x62,0x62,0x62,0x23,0x61,0x62,0x62,0x62,0x23,0x61,0x23,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x23,0x61,0x62,0x62,
+ 0x62,0x23,0x62,0x62,0x62,0x62,0x23,0x61,0x23,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x23,0x61,0x62,0x62,0x62,0x23,
+ 0x61,0x62,0x62,0x62,0x23,0x61,0x23,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x23,0x61,0x62,0x62,0x62,0x23,0x62,0x62,
+ 0x62,0x62,0x23,0x61,0x23,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x23,0x61,0x62,0x62,0x23,0x61,0x62,0x62,0x23,
+ 0x23,0x61,0x23,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x23,0x61,0x62,0x23,0x62,0x23,0x23,0x62,0x62,0x61,
+ 0x23,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x23,0x61,0x23,0x23,0x61,0x61,0x61,0x61,0x61,0x23,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x23,0x23,0x61,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x23,0x23,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x7d,0x3b,0x0a,0x0a
+};
+
+static const unsigned int small_databrowser_xpm_len = 3100;
+static const unsigned char small_databrowser_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x32,0x38,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x63,
+ 0x20,0x23,0x63,0x32,0x63,0x32,0x64,0x33,0x22,0x2c,0x0a,0x22,0x2e,0x20,
+ 0x20,0x63,0x20,0x23,0x39,0x36,0x39,0x36,0x61,0x33,0x22,0x2c,0x0a,0x22,
+ 0x58,0x20,0x20,0x63,0x20,0x23,0x61,0x62,0x61,0x62,0x62,0x62,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x20,0x63,0x20,0x23,0x64,0x62,0x64,0x62,0x65,0x66,
+ 0x22,0x2c,0x0a,0x22,0x4f,0x20,0x20,0x63,0x20,0x47,0x68,0x6f,0x73,0x74,
+ 0x57,0x68,0x69,0x74,0x65,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x20,0x63,0x20,
+ 0x23,0x37,0x64,0x37,0x64,0x38,0x39,0x22,0x2c,0x0a,0x22,0x40,0x20,0x20,
+ 0x63,0x20,0x23,0x37,0x65,0x37,0x65,0x38,0x39,0x22,0x2c,0x0a,0x22,0x23,
+ 0x20,0x20,0x63,0x20,0x23,0x36,0x31,0x36,0x31,0x36,0x61,0x22,0x2c,0x0a,
+ 0x22,0x24,0x20,0x20,0x63,0x20,0x23,0x34,0x31,0x34,0x31,0x34,0x37,0x22,
+ 0x2c,0x0a,0x22,0x25,0x20,0x20,0x63,0x20,0x23,0x64,0x61,0x64,0x61,0x65,
+ 0x65,0x22,0x2c,0x0a,0x22,0x26,0x20,0x20,0x63,0x20,0x23,0x64,0x38,0x64,
+ 0x38,0x65,0x63,0x22,0x2c,0x0a,0x22,0x2a,0x20,0x20,0x63,0x20,0x23,0x37,
+ 0x31,0x37,0x31,0x37,0x62,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x20,0x63,0x20,
+ 0x23,0x34,0x36,0x34,0x36,0x34,0x63,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x20,
+ 0x63,0x20,0x23,0x34,0x37,0x34,0x37,0x34,0x65,0x22,0x2c,0x0a,0x22,0x3b,
+ 0x20,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x66,0x65,0x22,0x2c,0x0a,
+ 0x22,0x3a,0x20,0x20,0x63,0x20,0x23,0x61,0x63,0x61,0x63,0x62,0x63,0x22,
+ 0x2c,0x0a,0x22,0x3e,0x20,0x20,0x63,0x20,0x23,0x63,0x31,0x63,0x31,0x64,
+ 0x33,0x22,0x2c,0x0a,0x22,0x2c,0x20,0x20,0x63,0x20,0x23,0x64,0x39,0x64,
+ 0x39,0x65,0x64,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x20,0x63,0x20,0x23,0x64,
+ 0x64,0x64,0x64,0x66,0x31,0x22,0x2c,0x0a,0x22,0x31,0x20,0x20,0x63,0x20,
+ 0x23,0x66,0x36,0x66,0x36,0x66,0x66,0x22,0x2c,0x0a,0x22,0x32,0x20,0x20,
+ 0x63,0x20,0x23,0x64,0x64,0x64,0x64,0x66,0x30,0x22,0x2c,0x0a,0x22,0x33,
+ 0x20,0x20,0x63,0x20,0x23,0x66,0x34,0x66,0x34,0x66,0x66,0x22,0x2c,0x0a,
+ 0x22,0x34,0x20,0x20,0x63,0x20,0x23,0x61,0x31,0x61,0x31,0x61,0x64,0x22,
+ 0x2c,0x0a,0x22,0x35,0x20,0x20,0x63,0x20,0x23,0x36,0x30,0x36,0x30,0x36,
+ 0x39,0x22,0x2c,0x0a,0x22,0x36,0x20,0x20,0x63,0x20,0x23,0x38,0x32,0x38,
+ 0x32,0x38,0x65,0x22,0x2c,0x0a,0x22,0x37,0x20,0x20,0x63,0x20,0x23,0x39,
+ 0x38,0x39,0x37,0x61,0x33,0x22,0x2c,0x0a,0x22,0x38,0x20,0x20,0x63,0x20,
+ 0x23,0x63,0x32,0x63,0x32,0x63,0x61,0x22,0x2c,0x0a,0x22,0x39,0x20,0x20,
+ 0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x61,0x31,0x22,0x2c,0x0a,0x22,0x30,
+ 0x20,0x20,0x63,0x20,0x23,0x64,0x35,0x64,0x35,0x65,0x39,0x22,0x2c,0x0a,
+ 0x22,0x71,0x20,0x20,0x63,0x20,0x23,0x36,0x31,0x36,0x31,0x36,0x62,0x22,
+ 0x2c,0x0a,0x22,0x77,0x20,0x20,0x63,0x20,0x23,0x66,0x31,0x66,0x31,0x66,
+ 0x65,0x22,0x2c,0x0a,0x22,0x65,0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,
+ 0x64,0x62,0x63,0x22,0x2c,0x0a,0x22,0x72,0x20,0x20,0x63,0x20,0x23,0x66,
+ 0x32,0x66,0x32,0x66,0x66,0x22,0x2c,0x0a,0x22,0x74,0x20,0x20,0x63,0x20,
+ 0x23,0x39,0x66,0x39,0x66,0x61,0x62,0x22,0x2c,0x0a,0x22,0x79,0x20,0x20,
+ 0x63,0x20,0x23,0x39,0x35,0x39,0x35,0x61,0x33,0x22,0x2c,0x0a,0x22,0x75,
+ 0x20,0x20,0x63,0x20,0x23,0x36,0x30,0x36,0x30,0x36,0x38,0x22,0x2c,0x0a,
+ 0x22,0x69,0x20,0x20,0x63,0x20,0x23,0x62,0x30,0x62,0x30,0x62,0x61,0x22,
+ 0x2c,0x0a,0x22,0x70,0x20,0x20,0x63,0x20,0x23,0x37,0x30,0x36,0x66,0x37,
+ 0x37,0x22,0x2c,0x0a,0x22,0x61,0x20,0x20,0x63,0x20,0x23,0x34,0x35,0x34,
+ 0x35,0x34,0x62,0x22,0x2c,0x0a,0x22,0x73,0x20,0x20,0x63,0x20,0x23,0x65,
+ 0x35,0x65,0x35,0x66,0x34,0x22,0x2c,0x0a,0x22,0x64,0x20,0x20,0x63,0x20,
+ 0x23,0x66,0x65,0x66,0x65,0x66,0x66,0x22,0x2c,0x0a,0x22,0x66,0x20,0x20,
+ 0x63,0x20,0x23,0x39,0x61,0x39,0x61,0x61,0x37,0x22,0x2c,0x0a,0x22,0x67,
+ 0x20,0x20,0x63,0x20,0x23,0x39,0x37,0x39,0x37,0x61,0x35,0x22,0x2c,0x0a,
+ 0x22,0x68,0x20,0x20,0x63,0x20,0x23,0x66,0x35,0x66,0x35,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x6a,0x20,0x20,0x63,0x20,0x23,0x35,0x63,0x35,0x63,0x36,
+ 0x30,0x22,0x2c,0x0a,0x22,0x6b,0x20,0x20,0x63,0x20,0x23,0x33,0x66,0x33,
+ 0x66,0x34,0x35,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x20,0x63,0x20,0x23,0x33,
+ 0x64,0x33,0x64,0x34,0x33,0x22,0x2c,0x0a,0x22,0x7a,0x20,0x20,0x63,0x20,
+ 0x23,0x35,0x31,0x35,0x31,0x35,0x37,0x22,0x2c,0x0a,0x22,0x78,0x20,0x20,
+ 0x63,0x20,0x23,0x38,0x32,0x38,0x31,0x38,0x34,0x22,0x2c,0x0a,0x22,0x63,
+ 0x20,0x20,0x63,0x20,0x23,0x33,0x38,0x33,0x38,0x33,0x64,0x22,0x2c,0x0a,
+ 0x22,0x76,0x20,0x20,0x63,0x20,0x23,0x34,0x30,0x34,0x30,0x34,0x36,0x22,
+ 0x2c,0x0a,0x22,0x62,0x20,0x20,0x63,0x20,0x23,0x39,0x61,0x39,0x61,0x61,
+ 0x39,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x20,0x63,0x20,0x23,0x64,0x61,0x64,
+ 0x61,0x65,0x64,0x22,0x2c,0x0a,0x22,0x6d,0x20,0x20,0x63,0x20,0x23,0x37,
+ 0x65,0x37,0x65,0x38,0x61,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x20,0x63,0x20,
+ 0x23,0x34,0x31,0x34,0x31,0x34,0x36,0x22,0x2c,0x0a,0x22,0x4e,0x20,0x20,
+ 0x63,0x20,0x23,0x34,0x62,0x34,0x62,0x35,0x30,0x22,0x2c,0x0a,0x22,0x42,
+ 0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x35,0x30,0x22,0x2c,0x0a,
+ 0x22,0x56,0x20,0x20,0x63,0x20,0x23,0x66,0x31,0x66,0x31,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x43,0x20,0x20,0x63,0x20,0x23,0x64,0x63,0x64,0x63,0x66,
+ 0x30,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x20,0x63,0x20,0x23,0x39,0x65,0x39,
+ 0x65,0x61,0x62,0x22,0x2c,0x0a,0x22,0x41,0x20,0x20,0x63,0x20,0x23,0x66,
+ 0x33,0x66,0x33,0x66,0x66,0x22,0x2c,0x0a,0x22,0x53,0x20,0x20,0x63,0x20,
+ 0x23,0x66,0x39,0x66,0x39,0x66,0x66,0x22,0x2c,0x0a,0x22,0x44,0x20,0x20,
+ 0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x62,0x30,0x22,0x2c,0x0a,0x22,0x46,
+ 0x20,0x20,0x63,0x20,0x23,0x35,0x39,0x35,0x39,0x35,0x66,0x22,0x2c,0x0a,
+ 0x22,0x47,0x20,0x20,0x63,0x20,0x23,0x65,0x38,0x65,0x38,0x65,0x62,0x22,
+ 0x2c,0x0a,0x22,0x48,0x20,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x66,
+ 0x66,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x20,0x63,0x20,0x23,0x36,0x32,0x36,
+ 0x32,0x36,0x62,0x22,0x2c,0x0a,0x22,0x4b,0x20,0x20,0x63,0x20,0x23,0x61,
+ 0x64,0x61,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x4c,0x20,0x20,0x63,0x20,
+ 0x23,0x39,0x36,0x39,0x36,0x61,0x34,0x22,0x2c,0x0a,0x22,0x50,0x20,0x20,
+ 0x63,0x20,0x23,0x30,0x30,0x30,0x30,0x37,0x62,0x22,0x2c,0x0a,0x22,0x49,
+ 0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x55,
+ 0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x22,
+ 0x54,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x52,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x45,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x57,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x51,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x21,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7e,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x5e,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2f,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x28,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x29,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x5f,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x60,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x27,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x5d,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x5b,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7b,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7d,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7c,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x20,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2e,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x58,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x4f,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2b,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x40,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x23,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x24,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x25,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x26,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2a,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3d,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2d,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3b,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3a,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3e,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2c,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3c,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x31,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x32,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x33,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x34,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x35,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x36,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x37,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x38,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x39,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x30,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x71,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x77,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x65,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x72,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x74,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x79,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x75,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x2f,
+ 0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x59,
+ 0x20,0x59,0x20,0x6f,0x20,0x6f,0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,
+ 0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x20,0x20,0x62,0x20,0x2e,0x20,0x40,
+ 0x20,0x40,0x20,0x4a,0x20,0x4a,0x20,0x4a,0x20,0x4a,0x20,0x4a,0x20,0x4a,
+ 0x20,0x4a,0x20,0x4a,0x20,0x4a,0x20,0x70,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x58,
+ 0x20,0x20,0x20,0x20,0x20,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x2b,0x20,0x2b,
+ 0x20,0x2b,0x20,0x23,0x20,0x23,0x20,0x23,0x20,0x24,0x20,0x63,0x20,0x4d,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,
+ 0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x4f,0x20,0x3c,
+ 0x20,0x58,0x20,0x58,0x20,0x58,0x20,0x2e,0x20,0x40,0x20,0x71,0x20,0x23,
+ 0x20,0x2d,0x20,0x24,0x20,0x42,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x4f,0x20,0x4f,0x20,0x32,0x20,0x20,0x20,0x58,
+ 0x20,0x2e,0x20,0x6d,0x20,0x4a,0x20,0x2d,0x20,0x24,0x20,0x4e,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x53,
+ 0x20,0x3c,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,
+ 0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,
+ 0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x4f,0x20,0x32,0x20,0x49,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,
+ 0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x4f,0x20,0x43,
+ 0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x50,0x20,0x55,
+ 0x20,0x50,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,
+ 0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x48,0x20,0x6f,0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x50,0x20,0x50,0x20,0x55,0x20,0x50,0x20,0x50,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x31,0x20,0x6f,0x20,0x49,
+ 0x20,0x55,0x20,0x55,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x55,0x20,0x50,
+ 0x20,0x50,0x20,0x50,0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,
+ 0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x31,0x20,0x6f,0x20,0x49,0x20,0x55,0x20,0x50,0x20,0x50,0x20,0x50,
+ 0x20,0x50,0x20,0x55,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x55,
+ 0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x68,0x20,0x25,0x20,0x49,0x20,0x55,
+ 0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x55,0x20,0x50,0x20,0x50,
+ 0x20,0x50,0x20,0x50,0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x33,
+ 0x20,0x25,0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x50,0x20,0x50,0x20,0x50,
+ 0x20,0x55,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x55,0x20,0x55,0x20,0x49,
+ 0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x33,0x20,0x25,0x20,0x49,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x50,0x20,0x50,0x20,0x55,0x20,0x50,0x20,0x50,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,
+ 0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x41,0x20,0x6e,
+ 0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x50,0x20,0x55,
+ 0x20,0x50,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,
+ 0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x72,0x20,0x2c,0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x56,0x20,0x2c,0x20,0x49,
+ 0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,
+ 0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x59,0x20,0x22,
+ 0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x77,0x20,0x26,0x20,0x3e,0x20,0x3a,0x20,0x4c,0x20,0x40,0x20,0x35,
+ 0x20,0x3d,0x20,0x6b,0x20,0x6a,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x3b,0x20,0x26,0x20,0x3e,0x20,0x65,
+ 0x20,0x4c,0x20,0x40,0x20,0x35,0x20,0x3d,0x20,0x76,0x20,0x7a,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x64,0x20,0x3b,
+ 0x20,0x26,0x20,0x20,0x20,0x3a,0x20,0x4c,0x20,0x2b,0x20,0x75,0x20,0x61,
+ 0x20,0x6c,0x20,0x46,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x44,0x20,0x34,0x20,0x69,
+ 0x20,0x38,0x20,0x47,0x20,0x73,0x20,0x30,0x20,0x20,0x20,0x58,0x20,0x4c,
+ 0x20,0x36,0x20,0x2a,0x20,0x2a,0x20,0x2a,0x20,0x78,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,
+ 0x20,0x59,0x20,0x74,0x20,0x34,0x20,0x5a,0x20,0x66,0x20,0x67,0x20,0x4c,
+ 0x20,0x4c,0x20,0x4c,0x20,0x4c,0x20,0x79,0x20,0x39,0x20,0x37,0x20,0x2e,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_datatable_xpm_len = 3100;
+static const unsigned char small_datatable_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x32,0x38,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x63,
+ 0x20,0x23,0x63,0x32,0x63,0x32,0x64,0x33,0x22,0x2c,0x0a,0x22,0x2e,0x20,
+ 0x20,0x63,0x20,0x23,0x39,0x36,0x39,0x36,0x61,0x33,0x22,0x2c,0x0a,0x22,
+ 0x58,0x20,0x20,0x63,0x20,0x23,0x61,0x62,0x61,0x62,0x62,0x62,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x20,0x63,0x20,0x23,0x64,0x62,0x64,0x62,0x65,0x66,
+ 0x22,0x2c,0x0a,0x22,0x4f,0x20,0x20,0x63,0x20,0x47,0x68,0x6f,0x73,0x74,
+ 0x57,0x68,0x69,0x74,0x65,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x20,0x63,0x20,
+ 0x23,0x37,0x64,0x37,0x64,0x38,0x39,0x22,0x2c,0x0a,0x22,0x40,0x20,0x20,
+ 0x63,0x20,0x23,0x37,0x65,0x37,0x65,0x38,0x39,0x22,0x2c,0x0a,0x22,0x23,
+ 0x20,0x20,0x63,0x20,0x23,0x36,0x31,0x36,0x31,0x36,0x61,0x22,0x2c,0x0a,
+ 0x22,0x24,0x20,0x20,0x63,0x20,0x23,0x34,0x31,0x34,0x31,0x34,0x37,0x22,
+ 0x2c,0x0a,0x22,0x25,0x20,0x20,0x63,0x20,0x23,0x64,0x61,0x64,0x61,0x65,
+ 0x65,0x22,0x2c,0x0a,0x22,0x26,0x20,0x20,0x63,0x20,0x23,0x64,0x38,0x64,
+ 0x38,0x65,0x63,0x22,0x2c,0x0a,0x22,0x2a,0x20,0x20,0x63,0x20,0x23,0x37,
+ 0x31,0x37,0x31,0x37,0x62,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x20,0x63,0x20,
+ 0x23,0x34,0x36,0x34,0x36,0x34,0x63,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x20,
+ 0x63,0x20,0x23,0x34,0x37,0x34,0x37,0x34,0x65,0x22,0x2c,0x0a,0x22,0x3b,
+ 0x20,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x66,0x65,0x22,0x2c,0x0a,
+ 0x22,0x3a,0x20,0x20,0x63,0x20,0x23,0x61,0x63,0x61,0x63,0x62,0x63,0x22,
+ 0x2c,0x0a,0x22,0x3e,0x20,0x20,0x63,0x20,0x23,0x63,0x31,0x63,0x31,0x64,
+ 0x33,0x22,0x2c,0x0a,0x22,0x2c,0x20,0x20,0x63,0x20,0x23,0x64,0x39,0x64,
+ 0x39,0x65,0x64,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x20,0x63,0x20,0x23,0x64,
+ 0x64,0x64,0x64,0x66,0x31,0x22,0x2c,0x0a,0x22,0x31,0x20,0x20,0x63,0x20,
+ 0x23,0x66,0x36,0x66,0x36,0x66,0x66,0x22,0x2c,0x0a,0x22,0x32,0x20,0x20,
+ 0x63,0x20,0x23,0x64,0x64,0x64,0x64,0x66,0x30,0x22,0x2c,0x0a,0x22,0x33,
+ 0x20,0x20,0x63,0x20,0x23,0x66,0x34,0x66,0x34,0x66,0x66,0x22,0x2c,0x0a,
+ 0x22,0x34,0x20,0x20,0x63,0x20,0x23,0x61,0x31,0x61,0x31,0x61,0x64,0x22,
+ 0x2c,0x0a,0x22,0x35,0x20,0x20,0x63,0x20,0x23,0x36,0x30,0x36,0x30,0x36,
+ 0x39,0x22,0x2c,0x0a,0x22,0x36,0x20,0x20,0x63,0x20,0x23,0x38,0x32,0x38,
+ 0x32,0x38,0x65,0x22,0x2c,0x0a,0x22,0x37,0x20,0x20,0x63,0x20,0x23,0x39,
+ 0x38,0x39,0x37,0x61,0x33,0x22,0x2c,0x0a,0x22,0x38,0x20,0x20,0x63,0x20,
+ 0x23,0x63,0x32,0x63,0x32,0x63,0x61,0x22,0x2c,0x0a,0x22,0x39,0x20,0x20,
+ 0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x61,0x31,0x22,0x2c,0x0a,0x22,0x30,
+ 0x20,0x20,0x63,0x20,0x23,0x64,0x35,0x64,0x35,0x65,0x39,0x22,0x2c,0x0a,
+ 0x22,0x71,0x20,0x20,0x63,0x20,0x23,0x36,0x31,0x36,0x31,0x36,0x62,0x22,
+ 0x2c,0x0a,0x22,0x77,0x20,0x20,0x63,0x20,0x23,0x66,0x31,0x66,0x31,0x66,
+ 0x65,0x22,0x2c,0x0a,0x22,0x65,0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,
+ 0x64,0x62,0x63,0x22,0x2c,0x0a,0x22,0x72,0x20,0x20,0x63,0x20,0x23,0x66,
+ 0x32,0x66,0x32,0x66,0x66,0x22,0x2c,0x0a,0x22,0x74,0x20,0x20,0x63,0x20,
+ 0x23,0x39,0x66,0x39,0x66,0x61,0x62,0x22,0x2c,0x0a,0x22,0x79,0x20,0x20,
+ 0x63,0x20,0x23,0x39,0x35,0x39,0x35,0x61,0x33,0x22,0x2c,0x0a,0x22,0x75,
+ 0x20,0x20,0x63,0x20,0x23,0x36,0x30,0x36,0x30,0x36,0x38,0x22,0x2c,0x0a,
+ 0x22,0x69,0x20,0x20,0x63,0x20,0x23,0x62,0x30,0x62,0x30,0x62,0x61,0x22,
+ 0x2c,0x0a,0x22,0x70,0x20,0x20,0x63,0x20,0x23,0x37,0x30,0x36,0x66,0x37,
+ 0x37,0x22,0x2c,0x0a,0x22,0x61,0x20,0x20,0x63,0x20,0x23,0x34,0x35,0x34,
+ 0x35,0x34,0x62,0x22,0x2c,0x0a,0x22,0x73,0x20,0x20,0x63,0x20,0x23,0x65,
+ 0x35,0x65,0x35,0x66,0x34,0x22,0x2c,0x0a,0x22,0x64,0x20,0x20,0x63,0x20,
+ 0x23,0x66,0x65,0x66,0x65,0x66,0x66,0x22,0x2c,0x0a,0x22,0x66,0x20,0x20,
+ 0x63,0x20,0x23,0x39,0x61,0x39,0x61,0x61,0x37,0x22,0x2c,0x0a,0x22,0x67,
+ 0x20,0x20,0x63,0x20,0x23,0x39,0x37,0x39,0x37,0x61,0x35,0x22,0x2c,0x0a,
+ 0x22,0x68,0x20,0x20,0x63,0x20,0x23,0x66,0x35,0x66,0x35,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x6a,0x20,0x20,0x63,0x20,0x23,0x35,0x63,0x35,0x63,0x36,
+ 0x30,0x22,0x2c,0x0a,0x22,0x6b,0x20,0x20,0x63,0x20,0x23,0x33,0x66,0x33,
+ 0x66,0x34,0x35,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x20,0x63,0x20,0x23,0x33,
+ 0x64,0x33,0x64,0x34,0x33,0x22,0x2c,0x0a,0x22,0x7a,0x20,0x20,0x63,0x20,
+ 0x23,0x35,0x31,0x35,0x31,0x35,0x37,0x22,0x2c,0x0a,0x22,0x78,0x20,0x20,
+ 0x63,0x20,0x23,0x38,0x32,0x38,0x31,0x38,0x34,0x22,0x2c,0x0a,0x22,0x63,
+ 0x20,0x20,0x63,0x20,0x23,0x33,0x38,0x33,0x38,0x33,0x64,0x22,0x2c,0x0a,
+ 0x22,0x76,0x20,0x20,0x63,0x20,0x23,0x34,0x30,0x34,0x30,0x34,0x36,0x22,
+ 0x2c,0x0a,0x22,0x62,0x20,0x20,0x63,0x20,0x23,0x39,0x61,0x39,0x61,0x61,
+ 0x39,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x20,0x63,0x20,0x23,0x64,0x61,0x64,
+ 0x61,0x65,0x64,0x22,0x2c,0x0a,0x22,0x6d,0x20,0x20,0x63,0x20,0x23,0x37,
+ 0x65,0x37,0x65,0x38,0x61,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x20,0x63,0x20,
+ 0x23,0x34,0x31,0x34,0x31,0x34,0x36,0x22,0x2c,0x0a,0x22,0x4e,0x20,0x20,
+ 0x63,0x20,0x23,0x34,0x62,0x34,0x62,0x35,0x30,0x22,0x2c,0x0a,0x22,0x42,
+ 0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x35,0x30,0x22,0x2c,0x0a,
+ 0x22,0x56,0x20,0x20,0x63,0x20,0x23,0x66,0x31,0x66,0x31,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x43,0x20,0x20,0x63,0x20,0x23,0x64,0x63,0x64,0x63,0x66,
+ 0x30,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x20,0x63,0x20,0x23,0x39,0x65,0x39,
+ 0x65,0x61,0x62,0x22,0x2c,0x0a,0x22,0x41,0x20,0x20,0x63,0x20,0x23,0x66,
+ 0x33,0x66,0x33,0x66,0x66,0x22,0x2c,0x0a,0x22,0x53,0x20,0x20,0x63,0x20,
+ 0x23,0x66,0x39,0x66,0x39,0x66,0x66,0x22,0x2c,0x0a,0x22,0x44,0x20,0x20,
+ 0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x62,0x30,0x22,0x2c,0x0a,0x22,0x46,
+ 0x20,0x20,0x63,0x20,0x23,0x35,0x39,0x35,0x39,0x35,0x66,0x22,0x2c,0x0a,
+ 0x22,0x47,0x20,0x20,0x63,0x20,0x23,0x65,0x38,0x65,0x38,0x65,0x62,0x22,
+ 0x2c,0x0a,0x22,0x48,0x20,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x66,
+ 0x66,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x20,0x63,0x20,0x23,0x36,0x32,0x36,
+ 0x32,0x36,0x62,0x22,0x2c,0x0a,0x22,0x4b,0x20,0x20,0x63,0x20,0x23,0x61,
+ 0x64,0x61,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x4c,0x20,0x20,0x63,0x20,
+ 0x23,0x39,0x36,0x39,0x36,0x61,0x34,0x22,0x2c,0x0a,0x22,0x50,0x20,0x20,
+ 0x63,0x20,0x23,0x38,0x36,0x38,0x36,0x39,0x32,0x22,0x2c,0x0a,0x22,0x49,
+ 0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x55,
+ 0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x22,
+ 0x54,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x52,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x45,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x57,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x51,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x21,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7e,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x5e,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2f,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x28,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x29,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x5f,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x60,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x27,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x5d,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x5b,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7b,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7d,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7c,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x20,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2e,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x58,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x4f,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2b,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x40,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x23,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x24,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x25,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x26,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2a,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3d,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2d,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3b,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3a,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3e,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2c,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3c,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x31,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x32,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x33,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x34,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x35,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x36,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x37,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x38,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x39,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x30,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x71,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x77,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x65,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x72,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x74,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x79,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x75,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x2f,
+ 0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x59,
+ 0x20,0x59,0x20,0x6f,0x20,0x6f,0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,
+ 0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,0x20,0x4b,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x20,0x20,0x62,0x20,0x2e,0x20,0x40,
+ 0x20,0x40,0x20,0x4a,0x20,0x4a,0x20,0x4a,0x20,0x4a,0x20,0x4a,0x20,0x4a,
+ 0x20,0x4a,0x20,0x4a,0x20,0x4a,0x20,0x70,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x58,
+ 0x20,0x20,0x20,0x20,0x20,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x2b,0x20,0x2b,
+ 0x20,0x2b,0x20,0x23,0x20,0x23,0x20,0x23,0x20,0x24,0x20,0x63,0x20,0x4d,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,
+ 0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x4f,0x20,0x3c,
+ 0x20,0x58,0x20,0x58,0x20,0x58,0x20,0x2e,0x20,0x40,0x20,0x71,0x20,0x23,
+ 0x20,0x2d,0x20,0x24,0x20,0x42,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x4f,0x20,0x4f,0x20,0x32,0x20,0x20,0x20,0x58,
+ 0x20,0x2e,0x20,0x6d,0x20,0x4a,0x20,0x2d,0x20,0x24,0x20,0x4e,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x53,
+ 0x20,0x3c,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,
+ 0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,
+ 0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x4f,0x20,0x32,0x20,0x49,0x20,0x55,0x20,0x55,
+ 0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,
+ 0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x4f,0x20,0x43,
+ 0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,
+ 0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x48,0x20,0x6f,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,
+ 0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,
+ 0x20,0x49,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x31,0x20,0x6f,0x20,0x49,
+ 0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,
+ 0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x31,0x20,0x6f,0x20,0x49,0x20,0x50,0x20,0x50,0x20,0x49,0x20,0x50,
+ 0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,
+ 0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x68,0x20,0x25,0x20,0x49,0x20,0x55,
+ 0x20,0x55,0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x33,
+ 0x20,0x25,0x20,0x49,0x20,0x50,0x20,0x50,0x20,0x49,0x20,0x50,0x20,0x50,
+ 0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x49,
+ 0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x33,0x20,0x25,0x20,0x49,0x20,0x55,0x20,0x55,
+ 0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,
+ 0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x41,0x20,0x6e,
+ 0x20,0x49,0x20,0x50,0x20,0x50,0x20,0x49,0x20,0x50,0x20,0x50,0x20,0x50,
+ 0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x50,0x20,0x49,0x20,0x59,
+ 0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x72,0x20,0x2c,0x20,0x49,0x20,0x55,0x20,0x55,0x20,0x49,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x55,0x20,0x49,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x56,0x20,0x2c,0x20,0x49,
+ 0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,
+ 0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x49,0x20,0x59,0x20,0x22,
+ 0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,
+ 0x20,0x77,0x20,0x26,0x20,0x3e,0x20,0x3a,0x20,0x4c,0x20,0x40,0x20,0x35,
+ 0x20,0x3d,0x20,0x6b,0x20,0x6a,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4c,0x20,0x55,
+ 0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x3b,0x20,0x26,0x20,0x3e,0x20,0x65,
+ 0x20,0x4c,0x20,0x40,0x20,0x35,0x20,0x3d,0x20,0x76,0x20,0x7a,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x4c,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x64,0x20,0x3b,
+ 0x20,0x26,0x20,0x20,0x20,0x3a,0x20,0x4c,0x20,0x2b,0x20,0x75,0x20,0x61,
+ 0x20,0x6c,0x20,0x46,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,0x20,0x44,0x20,0x34,0x20,0x69,
+ 0x20,0x38,0x20,0x47,0x20,0x73,0x20,0x30,0x20,0x20,0x20,0x58,0x20,0x4c,
+ 0x20,0x36,0x20,0x2a,0x20,0x2a,0x20,0x2a,0x20,0x78,0x20,0x59,0x20,0x59,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x22,0x2c,0x0a,0x22,0x59,
+ 0x20,0x59,0x20,0x74,0x20,0x34,0x20,0x5a,0x20,0x66,0x20,0x67,0x20,0x4c,
+ 0x20,0x4c,0x20,0x4c,0x20,0x4c,0x20,0x79,0x20,0x39,0x20,0x37,0x20,0x2e,
+ 0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,0x20,0x59,
+ 0x20,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_dataview_xpm_len = 3164;
+static const unsigned char small_dataview_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x32,0x38,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x63,
+ 0x20,0x23,0x61,0x62,0x61,0x62,0x62,0x62,0x22,0x2c,0x0a,0x22,0x2e,0x20,
+ 0x20,0x63,0x20,0x23,0x39,0x36,0x39,0x36,0x61,0x33,0x22,0x2c,0x0a,0x22,
+ 0x58,0x20,0x20,0x63,0x20,0x23,0x63,0x32,0x63,0x32,0x64,0x33,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x20,0x63,0x20,0x23,0x37,0x65,0x37,0x65,0x38,0x39,
+ 0x22,0x2c,0x0a,0x22,0x4f,0x20,0x20,0x63,0x20,0x23,0x37,0x64,0x37,0x64,
+ 0x38,0x39,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x20,0x63,0x20,0x47,0x68,0x6f,
+ 0x73,0x74,0x57,0x68,0x69,0x74,0x65,0x22,0x2c,0x0a,0x22,0x40,0x20,0x20,
+ 0x63,0x20,0x23,0x64,0x62,0x64,0x62,0x65,0x66,0x22,0x2c,0x0a,0x22,0x23,
+ 0x20,0x20,0x63,0x20,0x23,0x36,0x31,0x36,0x31,0x36,0x61,0x22,0x2c,0x0a,
+ 0x22,0x24,0x20,0x20,0x63,0x20,0x23,0x37,0x31,0x37,0x31,0x37,0x62,0x22,
+ 0x2c,0x0a,0x22,0x25,0x20,0x20,0x63,0x20,0x23,0x64,0x61,0x64,0x61,0x65,
+ 0x65,0x22,0x2c,0x0a,0x22,0x26,0x20,0x20,0x63,0x20,0x23,0x34,0x31,0x34,
+ 0x31,0x34,0x37,0x22,0x2c,0x0a,0x22,0x2a,0x20,0x20,0x63,0x20,0x23,0x64,
+ 0x38,0x64,0x38,0x65,0x63,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x20,0x63,0x20,
+ 0x47,0x72,0x61,0x79,0x35,0x36,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x20,0x63,
+ 0x20,0x23,0x64,0x39,0x64,0x39,0x65,0x64,0x22,0x2c,0x0a,0x22,0x3b,0x20,
+ 0x20,0x63,0x20,0x23,0x64,0x64,0x64,0x64,0x66,0x30,0x22,0x2c,0x0a,0x22,
+ 0x3a,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x39,0x34,0x22,0x2c,0x0a,
+ 0x22,0x3e,0x20,0x20,0x63,0x20,0x23,0x63,0x31,0x63,0x31,0x64,0x33,0x22,
+ 0x2c,0x0a,0x22,0x2c,0x20,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x66,
+ 0x65,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x20,0x63,0x20,0x23,0x34,0x36,0x34,
+ 0x36,0x34,0x63,0x22,0x2c,0x0a,0x22,0x31,0x20,0x20,0x63,0x20,0x23,0x61,
+ 0x31,0x61,0x31,0x61,0x64,0x22,0x2c,0x0a,0x22,0x32,0x20,0x20,0x63,0x20,
+ 0x23,0x61,0x63,0x61,0x63,0x62,0x63,0x22,0x2c,0x0a,0x22,0x33,0x20,0x20,
+ 0x63,0x20,0x23,0x34,0x37,0x34,0x37,0x34,0x65,0x22,0x2c,0x0a,0x22,0x34,
+ 0x20,0x20,0x63,0x20,0x23,0x66,0x34,0x66,0x34,0x66,0x66,0x22,0x2c,0x0a,
+ 0x22,0x35,0x20,0x20,0x63,0x20,0x23,0x66,0x36,0x66,0x36,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x36,0x20,0x20,0x63,0x20,0x23,0x36,0x30,0x36,0x30,0x36,
+ 0x39,0x22,0x2c,0x0a,0x22,0x37,0x20,0x20,0x63,0x20,0x23,0x64,0x64,0x64,
+ 0x64,0x66,0x31,0x22,0x2c,0x0a,0x22,0x38,0x20,0x20,0x63,0x20,0x23,0x62,
+ 0x32,0x62,0x32,0x62,0x32,0x22,0x2c,0x0a,0x22,0x39,0x20,0x20,0x63,0x20,
+ 0x23,0x62,0x63,0x62,0x63,0x62,0x63,0x22,0x2c,0x0a,0x22,0x30,0x20,0x20,
+ 0x63,0x20,0x67,0x61,0x69,0x6e,0x73,0x62,0x6f,0x72,0x6f,0x22,0x2c,0x0a,
+ 0x22,0x71,0x20,0x20,0x63,0x20,0x23,0x33,0x38,0x33,0x38,0x33,0x64,0x22,
+ 0x2c,0x0a,0x22,0x77,0x20,0x20,0x63,0x20,0x23,0x39,0x35,0x39,0x35,0x61,
+ 0x33,0x22,0x2c,0x0a,0x22,0x65,0x20,0x20,0x63,0x20,0x23,0x61,0x35,0x61,
+ 0x35,0x62,0x30,0x22,0x2c,0x0a,0x22,0x72,0x20,0x20,0x63,0x20,0x23,0x37,
+ 0x31,0x37,0x31,0x37,0x31,0x22,0x2c,0x0a,0x22,0x74,0x20,0x20,0x63,0x20,
+ 0x23,0x30,0x32,0x30,0x32,0x30,0x32,0x22,0x2c,0x0a,0x22,0x79,0x20,0x20,
+ 0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x75,
+ 0x20,0x20,0x63,0x20,0x23,0x33,0x65,0x33,0x65,0x33,0x65,0x22,0x2c,0x0a,
+ 0x22,0x69,0x20,0x20,0x63,0x20,0x23,0x62,0x30,0x62,0x30,0x62,0x61,0x22,
+ 0x2c,0x0a,0x22,0x70,0x20,0x20,0x63,0x20,0x23,0x39,0x61,0x39,0x61,0x61,
+ 0x37,0x22,0x2c,0x0a,0x22,0x61,0x20,0x20,0x63,0x20,0x23,0x66,0x65,0x66,
+ 0x65,0x66,0x66,0x22,0x2c,0x0a,0x22,0x73,0x20,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x36,0x22,0x2c,0x0a,0x22,0x64,0x20,0x20,0x63,0x20,0x23,0x33,
+ 0x66,0x33,0x66,0x34,0x35,0x22,0x2c,0x0a,0x22,0x66,0x20,0x20,0x63,0x20,
+ 0x23,0x36,0x32,0x36,0x32,0x36,0x32,0x22,0x2c,0x0a,0x22,0x67,0x20,0x20,
+ 0x63,0x20,0x23,0x37,0x65,0x37,0x65,0x38,0x61,0x22,0x2c,0x0a,0x22,0x68,
+ 0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x35,0x33,0x22,0x2c,0x0a,0x22,
+ 0x6a,0x20,0x20,0x63,0x20,0x23,0x34,0x36,0x34,0x36,0x34,0x36,0x22,0x2c,
+ 0x0a,0x22,0x6b,0x20,0x20,0x63,0x20,0x23,0x37,0x63,0x37,0x63,0x37,0x63,
+ 0x22,0x2c,0x0a,0x22,0x6c,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,
+ 0x35,0x22,0x2c,0x0a,0x22,0x7a,0x20,0x20,0x63,0x20,0x23,0x64,0x35,0x64,
+ 0x35,0x65,0x39,0x22,0x2c,0x0a,0x22,0x78,0x20,0x20,0x63,0x20,0x23,0x64,
+ 0x64,0x64,0x64,0x64,0x64,0x22,0x2c,0x0a,0x22,0x63,0x20,0x20,0x63,0x20,
+ 0x23,0x64,0x63,0x64,0x63,0x66,0x30,0x22,0x2c,0x0a,0x22,0x76,0x20,0x20,
+ 0x63,0x20,0x23,0x38,0x32,0x38,0x31,0x38,0x34,0x22,0x2c,0x0a,0x22,0x62,
+ 0x20,0x20,0x63,0x20,0x23,0x33,0x64,0x33,0x64,0x34,0x33,0x22,0x2c,0x0a,
+ 0x22,0x6e,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x39,0x22,0x2c,0x0a,
+ 0x22,0x6d,0x20,0x20,0x63,0x20,0x23,0x65,0x39,0x65,0x39,0x65,0x39,0x22,
+ 0x2c,0x0a,0x22,0x4d,0x20,0x20,0x63,0x20,0x23,0x35,0x39,0x35,0x39,0x35,
+ 0x66,0x22,0x2c,0x0a,0x22,0x4e,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,
+ 0x34,0x22,0x2c,0x0a,0x22,0x42,0x20,0x20,0x63,0x20,0x23,0x33,0x35,0x33,
+ 0x35,0x33,0x35,0x22,0x2c,0x0a,0x22,0x56,0x20,0x20,0x63,0x20,0x23,0x39,
+ 0x37,0x39,0x37,0x61,0x35,0x22,0x2c,0x0a,0x22,0x43,0x20,0x20,0x63,0x20,
+ 0x23,0x35,0x63,0x35,0x63,0x36,0x30,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x20,
+ 0x63,0x20,0x47,0x72,0x61,0x79,0x38,0x30,0x22,0x2c,0x0a,0x22,0x41,0x20,
+ 0x20,0x63,0x20,0x23,0x39,0x38,0x39,0x37,0x61,0x33,0x22,0x2c,0x0a,0x22,
+ 0x53,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x39,0x33,0x22,0x2c,0x0a,
+ 0x22,0x44,0x20,0x20,0x63,0x20,0x23,0x30,0x62,0x30,0x62,0x30,0x62,0x22,
+ 0x2c,0x0a,0x22,0x46,0x20,0x20,0x63,0x20,0x23,0x38,0x30,0x38,0x30,0x38,
+ 0x30,0x22,0x2c,0x0a,0x22,0x47,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,
+ 0x39,0x35,0x22,0x2c,0x0a,0x22,0x48,0x20,0x20,0x63,0x20,0x23,0x66,0x37,
+ 0x66,0x37,0x66,0x66,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x20,0x63,0x20,0x23,
+ 0x34,0x35,0x34,0x35,0x34,0x62,0x22,0x2c,0x0a,0x22,0x4b,0x20,0x20,0x63,
+ 0x20,0x23,0x34,0x30,0x34,0x30,0x34,0x36,0x22,0x2c,0x0a,0x22,0x4c,0x20,
+ 0x20,0x63,0x20,0x23,0x63,0x31,0x63,0x31,0x63,0x31,0x22,0x2c,0x0a,0x22,
+ 0x50,0x20,0x20,0x63,0x20,0x23,0x66,0x33,0x66,0x33,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x49,0x20,0x20,0x63,0x20,0x23,0x35,0x38,0x35,0x38,0x35,0x38,
+ 0x22,0x2c,0x0a,0x22,0x55,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x38,
+ 0x34,0x22,0x2c,0x0a,0x22,0x59,0x20,0x20,0x63,0x20,0x23,0x39,0x30,0x39,
+ 0x30,0x39,0x30,0x22,0x2c,0x0a,0x22,0x54,0x20,0x20,0x63,0x20,0x23,0x32,
+ 0x61,0x32,0x61,0x32,0x61,0x22,0x2c,0x0a,0x22,0x52,0x20,0x20,0x63,0x20,
+ 0x23,0x34,0x62,0x34,0x62,0x35,0x30,0x22,0x2c,0x0a,0x22,0x45,0x20,0x20,
+ 0x63,0x20,0x47,0x72,0x61,0x79,0x32,0x33,0x22,0x2c,0x0a,0x22,0x57,0x20,
+ 0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x39,0x36,0x22,0x2c,0x0a,0x22,0x51,
+ 0x20,0x20,0x63,0x20,0x23,0x34,0x34,0x34,0x34,0x34,0x34,0x22,0x2c,0x0a,
+ 0x22,0x21,0x20,0x20,0x63,0x20,0x23,0x66,0x39,0x66,0x39,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x7e,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x33,0x35,
+ 0x22,0x2c,0x0a,0x22,0x5e,0x20,0x20,0x63,0x20,0x23,0x31,0x31,0x31,0x31,
+ 0x31,0x31,0x22,0x2c,0x0a,0x22,0x2f,0x20,0x20,0x63,0x20,0x47,0x72,0x61,
+ 0x79,0x33,0x34,0x22,0x2c,0x0a,0x22,0x28,0x20,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x34,0x34,0x22,0x2c,0x0a,0x22,0x29,0x20,0x20,0x63,0x20,0x23,
+ 0x65,0x38,0x65,0x38,0x65,0x62,0x22,0x2c,0x0a,0x22,0x5f,0x20,0x20,0x63,
+ 0x20,0x23,0x65,0x35,0x65,0x35,0x66,0x34,0x22,0x2c,0x0a,0x22,0x60,0x20,
+ 0x20,0x63,0x20,0x23,0x63,0x32,0x63,0x32,0x63,0x61,0x22,0x2c,0x0a,0x22,
+ 0x27,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x34,0x22,0x2c,0x0a,
+ 0x22,0x5d,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x35,0x32,0x22,0x2c,
+ 0x0a,0x22,0x5b,0x20,0x20,0x63,0x20,0x23,0x39,0x65,0x39,0x65,0x61,0x62,
+ 0x22,0x2c,0x0a,0x22,0x7b,0x20,0x20,0x63,0x20,0x23,0x66,0x31,0x66,0x31,
+ 0x66,0x65,0x22,0x2c,0x0a,0x22,0x7d,0x20,0x20,0x63,0x20,0x23,0x66,0x65,
+ 0x66,0x65,0x66,0x65,0x22,0x2c,0x0a,0x22,0x7c,0x20,0x20,0x63,0x20,0x23,
+ 0x66,0x39,0x66,0x39,0x66,0x39,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x20,0x63,
+ 0x20,0x23,0x34,0x31,0x34,0x31,0x34,0x36,0x22,0x2c,0x0a,0x22,0x2e,0x2e,
+ 0x20,0x63,0x20,0x23,0x66,0x31,0x66,0x31,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x58,0x2e,0x20,0x63,0x20,0x23,0x39,0x66,0x39,0x66,0x61,0x62,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x2e,0x20,0x63,0x20,0x23,0x66,0x32,0x66,0x32,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x4f,0x2e,0x20,0x63,0x20,0x23,0x35,0x31,0x35,0x31,
+ 0x35,0x37,0x22,0x2c,0x0a,0x22,0x2b,0x2e,0x20,0x63,0x20,0x23,0x34,0x61,
+ 0x34,0x61,0x35,0x30,0x22,0x2c,0x0a,0x22,0x40,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x35,0x22,0x2c,0x0a,0x22,0x23,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x31,0x22,0x2c,0x0a,0x22,0x24,0x2e,0x20,0x63,0x20,0x23,
+ 0x36,0x30,0x36,0x30,0x36,0x38,0x22,0x2c,0x0a,0x22,0x25,0x2e,0x20,0x63,
+ 0x20,0x23,0x64,0x61,0x64,0x61,0x65,0x64,0x22,0x2c,0x0a,0x22,0x26,0x2e,
+ 0x20,0x63,0x20,0x23,0x36,0x38,0x36,0x38,0x36,0x38,0x22,0x2c,0x0a,0x22,
+ 0x2a,0x2e,0x20,0x63,0x20,0x23,0x37,0x30,0x36,0x66,0x37,0x37,0x22,0x2c,
+ 0x0a,0x22,0x3d,0x2e,0x20,0x63,0x20,0x23,0x39,0x61,0x39,0x61,0x61,0x39,
+ 0x22,0x2c,0x0a,0x22,0x2d,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,
+ 0x62,0x63,0x22,0x2c,0x0a,0x22,0x3b,0x2e,0x20,0x63,0x20,0x23,0x66,0x35,
+ 0x66,0x35,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3a,0x2e,0x20,0x63,0x20,0x23,
+ 0x39,0x34,0x39,0x34,0x61,0x31,0x22,0x2c,0x0a,0x22,0x3e,0x2e,0x20,0x63,
+ 0x20,0x23,0x36,0x31,0x36,0x31,0x36,0x62,0x22,0x2c,0x0a,0x22,0x2c,0x2e,
+ 0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x37,0x22,0x2c,0x0a,0x22,0x3c,
+ 0x2e,0x20,0x63,0x20,0x23,0x38,0x32,0x38,0x32,0x38,0x65,0x22,0x2c,0x0a,
+ 0x22,0x31,0x2e,0x20,0x63,0x20,0x23,0x36,0x32,0x36,0x32,0x36,0x62,0x22,
+ 0x2c,0x0a,0x22,0x32,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x62,
+ 0x64,0x22,0x2c,0x0a,0x22,0x33,0x2e,0x20,0x63,0x20,0x23,0x39,0x36,0x39,
+ 0x36,0x61,0x34,0x22,0x2c,0x0a,0x22,0x34,0x2e,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x35,0x2e,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x20,0x63,0x20,
+ 0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x22,0x37,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x38,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x39,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x30,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x71,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x77,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x65,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x72,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x74,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x79,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x75,0x2e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,
+ 0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x36,0x2e,0x36,0x2e,0x40,0x20,0x40,
+ 0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x36,0x2e,0x36,0x2e,0x36,
+ 0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,
+ 0x2e,0x58,0x20,0x3d,0x2e,0x2e,0x20,0x6f,0x20,0x6f,0x20,0x31,0x2e,0x31,
+ 0x2e,0x31,0x2e,0x31,0x2e,0x31,0x2e,0x31,0x2e,0x31,0x2e,0x31,0x2e,0x31,
+ 0x2e,0x2a,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x20,0x20,0x58,0x20,0x58,0x20,0x2e,
+ 0x20,0x2e,0x20,0x4f,0x20,0x4f,0x20,0x4f,0x20,0x4f,0x20,0x23,0x20,0x23,
+ 0x20,0x23,0x20,0x26,0x20,0x71,0x20,0x20,0x2e,0x36,0x2e,0x36,0x2e,0x36,
+ 0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x2b,0x20,0x37,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2e,0x20,0x6f,0x20,0x3e,0x2e,0x23,0x20,0x33,0x20,0x26,0x20,0x2b,
+ 0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x2b,
+ 0x20,0x2b,0x20,0x3b,0x20,0x58,0x20,0x20,0x20,0x2e,0x20,0x67,0x20,0x31,
+ 0x2e,0x33,0x20,0x26,0x20,0x52,0x20,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,
+ 0x2e,0x36,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x21,0x20,0x37,0x20,0x34,0x2e,0x34,
+ 0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,
+ 0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x36,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x2b,
+ 0x20,0x3b,0x20,0x34,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x34,
+ 0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x2b,0x20,0x63,0x20,0x34,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x34,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,
+ 0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x48,0x20,0x40,
+ 0x20,0x34,0x2e,0x55,0x20,0x46,0x20,0x6a,0x20,0x6c,0x20,0x54,0x20,0x7e,
+ 0x20,0x59,0x20,0x78,0x20,0x3a,0x20,0x53,0x20,0x35,0x2e,0x34,0x2e,0x36,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x20,0x40,0x20,0x34,0x2e,0x4e,0x20,0x44,0x20,0x40,
+ 0x2e,0x34,0x2e,0x34,0x2e,0x75,0x20,0x2f,0x20,0x6e,0x20,0x3d,0x20,0x2c,
+ 0x2e,0x6d,0x20,0x34,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x20,0x40,0x20,0x34,
+ 0x2e,0x34,0x2e,0x51,0x20,0x66,0x20,0x34,0x2e,0x34,0x2e,0x73,0x20,0x5e,
+ 0x20,0x28,0x20,0x3a,0x20,0x5d,0x20,0x38,0x20,0x34,0x2e,0x36,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x3b,0x2e,0x25,0x20,0x34,0x2e,0x23,0x2e,0x49,0x20,0x4c,0x20,0x45,
+ 0x20,0x34,0x2e,0x74,0x20,0x42,0x20,0x30,0x20,0x35,0x2e,0x39,0x20,0x3d,
+ 0x20,0x34,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x34,0x20,0x25,0x20,0x34,0x2e,0x27,
+ 0x20,0x72,0x20,0x6b,0x20,0x68,0x20,0x26,0x2e,0x79,0x20,0x5a,0x20,0x57,
+ 0x20,0x7c,0x20,0x47,0x20,0x7d,0x20,0x34,0x2e,0x36,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x34,
+ 0x20,0x25,0x20,0x34,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x34,
+ 0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x50,0x20,0x25,0x2e,0x34,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x34,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,
+ 0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x6f,0x2e,0x2d,
+ 0x20,0x34,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x34,0x2e,0x36,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x2e,0x2e,0x2d,0x20,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,
+ 0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,0x2e,0x34,
+ 0x2e,0x34,0x2e,0x34,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x7b,0x20,0x2a,0x20,0x3e,
+ 0x20,0x32,0x20,0x33,0x2e,0x6f,0x20,0x36,0x20,0x3c,0x20,0x64,0x20,0x43,
+ 0x20,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,0x2e,0x35,0x2e,0x35,0x2e,0x35,
+ 0x2e,0x2c,0x20,0x2a,0x20,0x3e,0x20,0x2d,0x2e,0x33,0x2e,0x6f,0x20,0x36,
+ 0x20,0x3c,0x20,0x4b,0x20,0x4f,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,
+ 0x2e,0x36,0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x33,0x2e,0x35,
+ 0x2e,0x35,0x2e,0x35,0x2e,0x61,0x20,0x2c,0x20,0x2a,0x20,0x58,0x20,0x32,
+ 0x20,0x33,0x2e,0x4f,0x20,0x24,0x2e,0x4a,0x20,0x62,0x20,0x4d,0x20,0x36,
+ 0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x36,0x2e,0x65,0x20,0x31,0x20,0x69,0x20,0x60,0x20,0x29,0x20,0x5f,
+ 0x20,0x7a,0x20,0x58,0x20,0x20,0x20,0x33,0x2e,0x3c,0x2e,0x24,0x20,0x24,
+ 0x20,0x24,0x20,0x76,0x20,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,
+ 0x2e,0x36,0x2e,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x36,0x2e,0x58,0x2e,0x31,
+ 0x20,0x5b,0x20,0x70,0x20,0x56,0x20,0x33,0x2e,0x33,0x2e,0x33,0x2e,0x33,
+ 0x2e,0x77,0x20,0x3a,0x2e,0x41,0x20,0x2e,0x20,0x36,0x2e,0x36,0x2e,0x36,
+ 0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x36,0x2e,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_editdelete_xpm_len = 4330;
+static const unsigned char small_editdelete_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x20,0x65,0x64,0x69,0x74,
+ 0x64,0x65,0x6c,0x65,0x74,0x65,0x5f,0x78,0x70,0x6d,0x5b,0x5d,0x20,0x3d,
+ 0x20,0x7b,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,0x20,0x32,0x30,0x31,0x20,
+ 0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x09,0x63,0x20,0x4e,0x6f,0x6e,0x65,
+ 0x22,0x2c,0x0a,0x22,0x2e,0x20,0x09,0x63,0x20,0x23,0x34,0x35,0x34,0x35,
+ 0x34,0x35,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x09,0x63,0x20,0x23,0x38,0x42,
+ 0x38,0x42,0x38,0x42,0x22,0x2c,0x0a,0x22,0x40,0x20,0x09,0x63,0x20,0x23,
+ 0x32,0x38,0x32,0x38,0x32,0x38,0x22,0x2c,0x0a,0x22,0x23,0x20,0x09,0x63,
+ 0x20,0x23,0x34,0x36,0x34,0x36,0x34,0x36,0x22,0x2c,0x0a,0x22,0x24,0x20,
+ 0x09,0x63,0x20,0x23,0x36,0x46,0x36,0x46,0x36,0x46,0x22,0x2c,0x0a,0x22,
+ 0x25,0x20,0x09,0x63,0x20,0x23,0x46,0x37,0x46,0x37,0x46,0x37,0x22,0x2c,
+ 0x0a,0x22,0x26,0x20,0x09,0x63,0x20,0x23,0x46,0x44,0x46,0x44,0x46,0x44,
+ 0x22,0x2c,0x0a,0x22,0x2a,0x20,0x09,0x63,0x20,0x23,0x35,0x41,0x35,0x41,
+ 0x35,0x41,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x09,0x63,0x20,0x23,0x43,0x32,
+ 0x43,0x32,0x43,0x32,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x09,0x63,0x20,0x23,
+ 0x34,0x32,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x09,0x63,
+ 0x20,0x23,0x46,0x30,0x46,0x30,0x46,0x30,0x22,0x2c,0x0a,0x22,0x3e,0x20,
+ 0x09,0x63,0x20,0x23,0x44,0x37,0x44,0x37,0x44,0x37,0x22,0x2c,0x0a,0x22,
+ 0x2c,0x20,0x09,0x63,0x20,0x23,0x43,0x44,0x43,0x44,0x43,0x44,0x22,0x2c,
+ 0x0a,0x22,0x27,0x20,0x09,0x63,0x20,0x23,0x45,0x42,0x45,0x42,0x45,0x42,
+ 0x22,0x2c,0x0a,0x22,0x29,0x20,0x09,0x63,0x20,0x23,0x43,0x46,0x43,0x46,
+ 0x43,0x46,0x22,0x2c,0x0a,0x22,0x21,0x20,0x09,0x63,0x20,0x23,0x41,0x41,
+ 0x41,0x41,0x41,0x41,0x22,0x2c,0x0a,0x22,0x7e,0x20,0x09,0x63,0x20,0x23,
+ 0x45,0x35,0x45,0x35,0x45,0x35,0x22,0x2c,0x0a,0x22,0x7b,0x20,0x09,0x63,
+ 0x20,0x23,0x36,0x38,0x36,0x38,0x36,0x38,0x22,0x2c,0x0a,0x22,0x5d,0x20,
+ 0x09,0x63,0x20,0x23,0x46,0x35,0x46,0x35,0x46,0x35,0x22,0x2c,0x0a,0x22,
+ 0x5e,0x20,0x09,0x63,0x20,0x23,0x43,0x39,0x43,0x39,0x43,0x39,0x22,0x2c,
+ 0x0a,0x22,0x2f,0x20,0x09,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x33,0x31,
+ 0x22,0x2c,0x0a,0x22,0x28,0x20,0x09,0x63,0x20,0x23,0x46,0x34,0x46,0x34,
+ 0x46,0x34,0x22,0x2c,0x0a,0x22,0x5f,0x20,0x09,0x63,0x20,0x23,0x44,0x43,
+ 0x44,0x43,0x44,0x43,0x22,0x2c,0x0a,0x22,0x3a,0x20,0x09,0x63,0x20,0x23,
+ 0x45,0x30,0x45,0x30,0x45,0x30,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x09,0x63,
+ 0x20,0x23,0x45,0x33,0x45,0x33,0x45,0x33,0x22,0x2c,0x0a,0x22,0x5b,0x20,
+ 0x09,0x63,0x20,0x23,0x44,0x30,0x44,0x30,0x44,0x30,0x22,0x2c,0x0a,0x22,
+ 0x7d,0x20,0x09,0x63,0x20,0x23,0x36,0x35,0x36,0x33,0x36,0x33,0x22,0x2c,
+ 0x0a,0x22,0x7c,0x20,0x09,0x63,0x20,0x23,0x42,0x35,0x42,0x35,0x42,0x35,
+ 0x22,0x2c,0x0a,0x22,0x31,0x20,0x09,0x63,0x20,0x23,0x41,0x38,0x41,0x38,
+ 0x41,0x38,0x22,0x2c,0x0a,0x22,0x32,0x20,0x09,0x63,0x20,0x23,0x32,0x35,
+ 0x32,0x35,0x32,0x35,0x22,0x2c,0x0a,0x22,0x33,0x20,0x09,0x63,0x20,0x23,
+ 0x46,0x31,0x46,0x31,0x46,0x31,0x22,0x2c,0x0a,0x22,0x34,0x20,0x09,0x63,
+ 0x20,0x23,0x42,0x38,0x42,0x38,0x42,0x38,0x22,0x2c,0x0a,0x22,0x35,0x20,
+ 0x09,0x63,0x20,0x23,0x45,0x37,0x45,0x37,0x45,0x37,0x22,0x2c,0x0a,0x22,
+ 0x36,0x20,0x09,0x63,0x20,0x23,0x42,0x39,0x42,0x39,0x42,0x39,0x22,0x2c,
+ 0x0a,0x22,0x37,0x20,0x09,0x63,0x20,0x23,0x44,0x32,0x44,0x32,0x44,0x32,
+ 0x22,0x2c,0x0a,0x22,0x38,0x20,0x09,0x63,0x20,0x23,0x42,0x33,0x42,0x33,
+ 0x42,0x33,0x22,0x2c,0x0a,0x22,0x39,0x20,0x09,0x63,0x20,0x23,0x45,0x38,
+ 0x45,0x38,0x45,0x38,0x22,0x2c,0x0a,0x22,0x30,0x20,0x09,0x63,0x20,0x23,
+ 0x39,0x45,0x39,0x44,0x39,0x44,0x22,0x2c,0x0a,0x22,0x61,0x20,0x09,0x63,
+ 0x20,0x23,0x37,0x41,0x37,0x39,0x37,0x41,0x22,0x2c,0x0a,0x22,0x62,0x20,
+ 0x09,0x63,0x20,0x23,0x36,0x37,0x36,0x37,0x36,0x37,0x22,0x2c,0x0a,0x22,
+ 0x63,0x20,0x09,0x63,0x20,0x23,0x34,0x45,0x34,0x45,0x34,0x45,0x22,0x2c,
+ 0x0a,0x22,0x64,0x20,0x09,0x63,0x20,0x23,0x31,0x36,0x31,0x36,0x31,0x36,
+ 0x22,0x2c,0x0a,0x22,0x65,0x20,0x09,0x63,0x20,0x23,0x41,0x35,0x41,0x34,
+ 0x41,0x34,0x22,0x2c,0x0a,0x22,0x66,0x20,0x09,0x63,0x20,0x23,0x42,0x34,
+ 0x42,0x34,0x42,0x34,0x22,0x2c,0x0a,0x22,0x67,0x20,0x09,0x63,0x20,0x23,
+ 0x44,0x46,0x44,0x46,0x44,0x46,0x22,0x2c,0x0a,0x22,0x68,0x20,0x09,0x63,
+ 0x20,0x23,0x38,0x46,0x38,0x45,0x38,0x45,0x22,0x2c,0x0a,0x22,0x69,0x20,
+ 0x09,0x63,0x20,0x23,0x39,0x46,0x39,0x46,0x39,0x45,0x22,0x2c,0x0a,0x22,
+ 0x6a,0x20,0x09,0x63,0x20,0x23,0x46,0x32,0x46,0x30,0x45,0x45,0x22,0x2c,
+ 0x0a,0x22,0x6b,0x20,0x09,0x63,0x20,0x23,0x45,0x37,0x45,0x32,0x44,0x46,
+ 0x22,0x2c,0x0a,0x22,0x6c,0x20,0x09,0x63,0x20,0x23,0x44,0x31,0x43,0x42,
+ 0x43,0x36,0x22,0x2c,0x0a,0x22,0x6d,0x20,0x09,0x63,0x20,0x23,0x41,0x43,
+ 0x41,0x33,0x39,0x44,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x09,0x63,0x20,0x23,
+ 0x32,0x31,0x31,0x46,0x31,0x45,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x09,0x63,
+ 0x20,0x23,0x46,0x32,0x46,0x32,0x46,0x32,0x22,0x2c,0x0a,0x22,0x70,0x20,
+ 0x09,0x63,0x20,0x23,0x43,0x31,0x43,0x31,0x43,0x31,0x22,0x2c,0x0a,0x22,
+ 0x71,0x20,0x09,0x63,0x20,0x23,0x44,0x38,0x44,0x37,0x44,0x37,0x22,0x2c,
+ 0x0a,0x22,0x72,0x20,0x09,0x63,0x20,0x23,0x42,0x45,0x42,0x45,0x42,0x45,
+ 0x22,0x2c,0x0a,0x22,0x73,0x20,0x09,0x63,0x20,0x23,0x45,0x45,0x45,0x45,
+ 0x45,0x45,0x22,0x2c,0x0a,0x22,0x74,0x20,0x09,0x63,0x20,0x23,0x44,0x31,
+ 0x44,0x31,0x44,0x31,0x22,0x2c,0x0a,0x22,0x75,0x20,0x09,0x63,0x20,0x23,
+ 0x43,0x38,0x43,0x36,0x43,0x35,0x22,0x2c,0x0a,0x22,0x76,0x20,0x09,0x63,
+ 0x20,0x23,0x43,0x43,0x43,0x38,0x43,0x34,0x22,0x2c,0x0a,0x22,0x77,0x20,
+ 0x09,0x63,0x20,0x23,0x44,0x31,0x43,0x42,0x43,0x35,0x22,0x2c,0x0a,0x22,
+ 0x78,0x20,0x09,0x63,0x20,0x23,0x44,0x43,0x44,0x32,0x43,0x41,0x22,0x2c,
+ 0x0a,0x22,0x79,0x20,0x09,0x63,0x20,0x23,0x45,0x34,0x44,0x37,0x43,0x44,
+ 0x22,0x2c,0x0a,0x22,0x7a,0x20,0x09,0x63,0x20,0x23,0x32,0x45,0x32,0x42,
+ 0x32,0x39,0x22,0x2c,0x0a,0x22,0x41,0x20,0x09,0x63,0x20,0x23,0x45,0x46,
+ 0x45,0x45,0x45,0x45,0x22,0x2c,0x0a,0x22,0x42,0x20,0x09,0x63,0x20,0x23,
+ 0x45,0x32,0x44,0x45,0x44,0x43,0x22,0x2c,0x0a,0x22,0x43,0x20,0x09,0x63,
+ 0x20,0x23,0x44,0x37,0x44,0x32,0x43,0x45,0x22,0x2c,0x0a,0x22,0x44,0x20,
+ 0x09,0x63,0x20,0x23,0x44,0x36,0x43,0x45,0x43,0x38,0x22,0x2c,0x0a,0x22,
+ 0x45,0x20,0x09,0x63,0x20,0x23,0x44,0x42,0x44,0x31,0x43,0x38,0x22,0x2c,
+ 0x0a,0x22,0x46,0x20,0x09,0x63,0x20,0x23,0x45,0x34,0x44,0x36,0x43,0x43,
+ 0x22,0x2c,0x0a,0x22,0x47,0x20,0x09,0x63,0x20,0x23,0x45,0x36,0x44,0x36,
+ 0x43,0x38,0x22,0x2c,0x0a,0x22,0x48,0x20,0x09,0x63,0x20,0x23,0x32,0x45,
+ 0x32,0x41,0x32,0x37,0x22,0x2c,0x0a,0x22,0x49,0x20,0x09,0x63,0x20,0x23,
+ 0x45,0x43,0x45,0x43,0x45,0x43,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x09,0x63,
+ 0x20,0x23,0x41,0x34,0x41,0x33,0x41,0x33,0x22,0x2c,0x0a,0x22,0x4b,0x20,
+ 0x09,0x63,0x20,0x23,0x43,0x44,0x43,0x44,0x43,0x43,0x22,0x2c,0x0a,0x22,
+ 0x4c,0x20,0x09,0x63,0x20,0x23,0x41,0x31,0x41,0x30,0x39,0x46,0x22,0x2c,
+ 0x0a,0x22,0x4d,0x20,0x09,0x63,0x20,0x23,0x42,0x45,0x42,0x42,0x42,0x39,
+ 0x22,0x2c,0x0a,0x22,0x4e,0x20,0x09,0x63,0x20,0x23,0x45,0x34,0x44,0x45,
+ 0x44,0x38,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x09,0x63,0x20,0x23,0x42,0x41,
+ 0x42,0x33,0x41,0x44,0x22,0x2c,0x0a,0x22,0x50,0x20,0x09,0x63,0x20,0x23,
+ 0x39,0x44,0x39,0x35,0x38,0x45,0x22,0x2c,0x0a,0x22,0x51,0x20,0x09,0x63,
+ 0x20,0x23,0x42,0x36,0x41,0x43,0x41,0x32,0x22,0x2c,0x0a,0x22,0x52,0x20,
+ 0x09,0x63,0x20,0x23,0x42,0x41,0x41,0x43,0x41,0x31,0x22,0x2c,0x0a,0x22,
+ 0x53,0x20,0x09,0x63,0x20,0x23,0x45,0x33,0x44,0x30,0x43,0x30,0x22,0x2c,
+ 0x0a,0x22,0x54,0x20,0x09,0x63,0x20,0x23,0x32,0x44,0x32,0x39,0x32,0x36,
+ 0x22,0x2c,0x0a,0x22,0x55,0x20,0x09,0x63,0x20,0x23,0x39,0x33,0x39,0x32,
+ 0x39,0x31,0x22,0x2c,0x0a,0x22,0x56,0x20,0x09,0x63,0x20,0x23,0x43,0x35,
+ 0x43,0x32,0x43,0x30,0x22,0x2c,0x0a,0x22,0x57,0x20,0x09,0x63,0x20,0x23,
+ 0x39,0x35,0x39,0x31,0x38,0x45,0x22,0x2c,0x0a,0x22,0x58,0x20,0x09,0x63,
+ 0x20,0x23,0x39,0x45,0x39,0x38,0x39,0x33,0x22,0x2c,0x0a,0x22,0x59,0x20,
+ 0x09,0x63,0x20,0x23,0x42,0x38,0x41,0x46,0x41,0x37,0x22,0x2c,0x0a,0x22,
+ 0x5a,0x20,0x09,0x63,0x20,0x23,0x38,0x46,0x38,0x36,0x37,0x46,0x22,0x2c,
+ 0x0a,0x22,0x60,0x20,0x09,0x63,0x20,0x23,0x39,0x37,0x38,0x44,0x38,0x33,
+ 0x22,0x2c,0x0a,0x22,0x20,0x2e,0x09,0x63,0x20,0x23,0x43,0x46,0x42,0x45,
+ 0x41,0x46,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x09,0x63,0x20,0x23,0x45,0x31,
+ 0x43,0x43,0x42,0x39,0x22,0x2c,0x0a,0x22,0x2b,0x2e,0x09,0x63,0x20,0x23,
+ 0x32,0x44,0x32,0x38,0x32,0x34,0x22,0x2c,0x0a,0x22,0x40,0x2e,0x09,0x63,
+ 0x20,0x23,0x46,0x33,0x46,0x33,0x46,0x33,0x22,0x2c,0x0a,0x22,0x23,0x2e,
+ 0x09,0x63,0x20,0x23,0x44,0x31,0x44,0x30,0x43,0x46,0x22,0x2c,0x0a,0x22,
+ 0x24,0x2e,0x09,0x63,0x20,0x23,0x44,0x46,0x44,0x42,0x44,0x38,0x22,0x2c,
+ 0x0a,0x22,0x25,0x2e,0x09,0x63,0x20,0x23,0x43,0x45,0x43,0x38,0x43,0x32,
+ 0x22,0x2c,0x0a,0x22,0x26,0x2e,0x09,0x63,0x20,0x23,0x43,0x35,0x42,0x45,
+ 0x42,0x37,0x22,0x2c,0x0a,0x22,0x2a,0x2e,0x09,0x63,0x20,0x23,0x44,0x33,
+ 0x43,0x38,0x42,0x45,0x22,0x2c,0x0a,0x22,0x3d,0x2e,0x09,0x63,0x20,0x23,
+ 0x43,0x33,0x42,0x36,0x41,0x43,0x22,0x2c,0x0a,0x22,0x2d,0x2e,0x09,0x63,
+ 0x20,0x23,0x44,0x31,0x43,0x31,0x42,0x34,0x22,0x2c,0x0a,0x22,0x3b,0x2e,
+ 0x09,0x63,0x20,0x23,0x44,0x34,0x43,0x32,0x42,0x33,0x22,0x2c,0x0a,0x22,
+ 0x3e,0x2e,0x09,0x63,0x20,0x23,0x44,0x32,0x42,0x44,0x41,0x42,0x22,0x2c,
+ 0x0a,0x22,0x2c,0x2e,0x09,0x63,0x20,0x23,0x44,0x46,0x43,0x35,0x42,0x30,
+ 0x22,0x2c,0x0a,0x22,0x27,0x2e,0x09,0x63,0x20,0x23,0x32,0x43,0x32,0x37,
+ 0x32,0x33,0x22,0x2c,0x0a,0x22,0x29,0x2e,0x09,0x63,0x20,0x23,0x30,0x30,
+ 0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x21,0x2e,0x09,0x63,0x20,0x23,
+ 0x36,0x45,0x36,0x45,0x36,0x45,0x22,0x2c,0x0a,0x22,0x7e,0x2e,0x09,0x63,
+ 0x20,0x23,0x45,0x46,0x45,0x44,0x45,0x43,0x22,0x2c,0x0a,0x22,0x7b,0x2e,
+ 0x09,0x63,0x20,0x23,0x43,0x35,0x43,0x31,0x42,0x45,0x22,0x2c,0x0a,0x22,
+ 0x5d,0x2e,0x09,0x63,0x20,0x23,0x44,0x38,0x44,0x31,0x43,0x43,0x22,0x2c,
+ 0x0a,0x22,0x5e,0x2e,0x09,0x63,0x20,0x23,0x43,0x34,0x42,0x42,0x42,0x34,
+ 0x22,0x2c,0x0a,0x22,0x2f,0x2e,0x09,0x63,0x20,0x23,0x42,0x41,0x42,0x30,
+ 0x41,0x37,0x22,0x2c,0x0a,0x22,0x28,0x2e,0x09,0x63,0x20,0x23,0x43,0x41,
+ 0x42,0x43,0x42,0x31,0x22,0x2c,0x0a,0x22,0x5f,0x2e,0x09,0x63,0x20,0x23,
+ 0x42,0x37,0x41,0x38,0x39,0x43,0x22,0x2c,0x0a,0x22,0x3a,0x2e,0x09,0x63,
+ 0x20,0x23,0x43,0x38,0x42,0x36,0x41,0x37,0x22,0x2c,0x0a,0x22,0x3c,0x2e,
+ 0x09,0x63,0x20,0x23,0x43,0x43,0x42,0x38,0x41,0x35,0x22,0x2c,0x0a,0x22,
+ 0x5b,0x2e,0x09,0x63,0x20,0x23,0x43,0x38,0x42,0x31,0x39,0x44,0x22,0x2c,
+ 0x0a,0x22,0x7d,0x2e,0x09,0x63,0x20,0x23,0x44,0x42,0x42,0x46,0x41,0x37,
+ 0x22,0x2c,0x0a,0x22,0x7c,0x2e,0x09,0x63,0x20,0x23,0x32,0x38,0x32,0x33,
+ 0x31,0x45,0x22,0x2c,0x0a,0x22,0x31,0x2e,0x09,0x63,0x20,0x23,0x33,0x33,
+ 0x33,0x33,0x33,0x33,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x09,0x63,0x20,0x23,
+ 0x36,0x45,0x36,0x45,0x36,0x46,0x22,0x2c,0x0a,0x22,0x33,0x2e,0x09,0x63,
+ 0x20,0x23,0x38,0x30,0x38,0x30,0x38,0x30,0x22,0x2c,0x0a,0x22,0x34,0x2e,
+ 0x09,0x63,0x20,0x23,0x36,0x44,0x36,0x43,0x36,0x42,0x22,0x2c,0x0a,0x22,
+ 0x35,0x2e,0x09,0x63,0x20,0x23,0x45,0x39,0x45,0x34,0x45,0x30,0x22,0x2c,
+ 0x0a,0x22,0x36,0x2e,0x09,0x63,0x20,0x23,0x39,0x39,0x39,0x33,0x38,0x46,
+ 0x22,0x2c,0x0a,0x22,0x37,0x2e,0x09,0x63,0x20,0x23,0x39,0x42,0x39,0x34,
+ 0x38,0x45,0x22,0x2c,0x0a,0x22,0x38,0x2e,0x09,0x63,0x20,0x23,0x41,0x33,
+ 0x39,0x39,0x39,0x31,0x22,0x2c,0x0a,0x22,0x39,0x2e,0x09,0x63,0x20,0x23,
+ 0x39,0x45,0x39,0x32,0x38,0x39,0x22,0x2c,0x0a,0x22,0x30,0x2e,0x09,0x63,
+ 0x20,0x23,0x41,0x45,0x41,0x30,0x39,0x34,0x22,0x2c,0x0a,0x22,0x61,0x2e,
+ 0x09,0x63,0x20,0x23,0x42,0x41,0x41,0x39,0x39,0x41,0x22,0x2c,0x0a,0x22,
+ 0x62,0x2e,0x09,0x63,0x20,0x23,0x39,0x41,0x38,0x39,0x37,0x42,0x22,0x2c,
+ 0x0a,0x22,0x63,0x2e,0x09,0x63,0x20,0x23,0x39,0x44,0x38,0x41,0x37,0x41,
+ 0x22,0x2c,0x0a,0x22,0x64,0x2e,0x09,0x63,0x20,0x23,0x41,0x43,0x39,0x35,
+ 0x38,0x32,0x22,0x2c,0x0a,0x22,0x65,0x2e,0x09,0x63,0x20,0x23,0x44,0x39,
+ 0x42,0x39,0x39,0x45,0x22,0x2c,0x0a,0x22,0x66,0x2e,0x09,0x63,0x20,0x23,
+ 0x33,0x38,0x33,0x33,0x32,0x45,0x22,0x2c,0x0a,0x22,0x67,0x2e,0x09,0x63,
+ 0x20,0x23,0x39,0x39,0x39,0x39,0x39,0x39,0x22,0x2c,0x0a,0x22,0x68,0x2e,
+ 0x09,0x63,0x20,0x23,0x35,0x30,0x35,0x30,0x35,0x30,0x22,0x2c,0x0a,0x22,
+ 0x69,0x2e,0x09,0x63,0x20,0x23,0x32,0x44,0x32,0x44,0x32,0x44,0x22,0x2c,
+ 0x0a,0x22,0x6a,0x2e,0x09,0x63,0x20,0x23,0x41,0x34,0x41,0x34,0x41,0x34,
+ 0x22,0x2c,0x0a,0x22,0x6b,0x2e,0x09,0x63,0x20,0x23,0x35,0x45,0x35,0x45,
+ 0x35,0x46,0x22,0x2c,0x0a,0x22,0x6c,0x2e,0x09,0x63,0x20,0x23,0x34,0x42,
+ 0x34,0x42,0x34,0x42,0x22,0x2c,0x0a,0x22,0x6d,0x2e,0x09,0x63,0x20,0x23,
+ 0x36,0x43,0x36,0x41,0x36,0x37,0x22,0x2c,0x0a,0x22,0x6e,0x2e,0x09,0x63,
+ 0x20,0x23,0x46,0x32,0x45,0x41,0x45,0x32,0x22,0x2c,0x0a,0x22,0x6f,0x2e,
+ 0x09,0x63,0x20,0x23,0x46,0x36,0x45,0x41,0x45,0x31,0x22,0x2c,0x0a,0x22,
+ 0x70,0x2e,0x09,0x63,0x20,0x23,0x46,0x34,0x45,0x36,0x44,0x42,0x22,0x2c,
+ 0x0a,0x22,0x71,0x2e,0x09,0x63,0x20,0x23,0x46,0x32,0x45,0x32,0x44,0x33,
+ 0x22,0x2c,0x0a,0x22,0x72,0x2e,0x09,0x63,0x20,0x23,0x46,0x31,0x44,0x45,
+ 0x43,0x44,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x09,0x63,0x20,0x23,0x45,0x46,
+ 0x44,0x38,0x43,0x35,0x22,0x2c,0x0a,0x22,0x74,0x2e,0x09,0x63,0x20,0x23,
+ 0x45,0x44,0x44,0x34,0x42,0x45,0x22,0x2c,0x0a,0x22,0x75,0x2e,0x09,0x63,
+ 0x20,0x23,0x45,0x42,0x43,0x46,0x42,0x37,0x22,0x2c,0x0a,0x22,0x76,0x2e,
+ 0x09,0x63,0x20,0x23,0x45,0x41,0x43,0x41,0x42,0x30,0x22,0x2c,0x0a,0x22,
+ 0x77,0x2e,0x09,0x63,0x20,0x23,0x45,0x38,0x43,0x35,0x41,0x38,0x22,0x2c,
+ 0x0a,0x22,0x78,0x2e,0x09,0x63,0x20,0x23,0x44,0x37,0x42,0x34,0x39,0x36,
+ 0x22,0x2c,0x0a,0x22,0x79,0x2e,0x09,0x63,0x20,0x23,0x32,0x44,0x32,0x36,
+ 0x32,0x31,0x22,0x2c,0x0a,0x22,0x7a,0x2e,0x09,0x63,0x20,0x23,0x38,0x31,
+ 0x38,0x31,0x38,0x31,0x22,0x2c,0x0a,0x22,0x41,0x2e,0x09,0x63,0x20,0x23,
+ 0x37,0x41,0x37,0x41,0x37,0x41,0x22,0x2c,0x0a,0x22,0x42,0x2e,0x09,0x63,
+ 0x20,0x23,0x37,0x30,0x37,0x30,0x37,0x30,0x22,0x2c,0x0a,0x22,0x43,0x2e,
+ 0x09,0x63,0x20,0x23,0x34,0x44,0x34,0x44,0x34,0x44,0x22,0x2c,0x0a,0x22,
+ 0x44,0x2e,0x09,0x63,0x20,0x23,0x34,0x34,0x34,0x34,0x34,0x34,0x22,0x2c,
+ 0x0a,0x22,0x45,0x2e,0x09,0x63,0x20,0x23,0x34,0x41,0x34,0x41,0x34,0x41,
+ 0x22,0x2c,0x0a,0x22,0x46,0x2e,0x09,0x63,0x20,0x23,0x35,0x37,0x35,0x35,
+ 0x35,0x32,0x22,0x2c,0x0a,0x22,0x47,0x2e,0x09,0x63,0x20,0x23,0x42,0x32,
+ 0x41,0x41,0x41,0x33,0x22,0x2c,0x0a,0x22,0x48,0x2e,0x09,0x63,0x20,0x23,
+ 0x42,0x31,0x41,0x36,0x39,0x45,0x22,0x2c,0x0a,0x22,0x49,0x2e,0x09,0x63,
+ 0x20,0x23,0x42,0x30,0x41,0x33,0x39,0x39,0x22,0x2c,0x0a,0x22,0x4a,0x2e,
+ 0x09,0x63,0x20,0x23,0x41,0x44,0x39,0x44,0x39,0x30,0x22,0x2c,0x0a,0x22,
+ 0x4b,0x2e,0x09,0x63,0x20,0x23,0x41,0x43,0x39,0x39,0x38,0x41,0x22,0x2c,
+ 0x0a,0x22,0x4c,0x2e,0x09,0x63,0x20,0x23,0x41,0x41,0x39,0x36,0x38,0x35,
+ 0x22,0x2c,0x0a,0x22,0x4d,0x2e,0x09,0x63,0x20,0x23,0x41,0x39,0x39,0x32,
+ 0x37,0x46,0x22,0x2c,0x0a,0x22,0x4e,0x2e,0x09,0x63,0x20,0x23,0x41,0x38,
+ 0x38,0x46,0x37,0x41,0x22,0x2c,0x0a,0x22,0x4f,0x2e,0x09,0x63,0x20,0x23,
+ 0x41,0x36,0x38,0x42,0x37,0x33,0x22,0x2c,0x0a,0x22,0x50,0x2e,0x09,0x63,
+ 0x20,0x23,0x41,0x33,0x38,0x35,0x36,0x43,0x22,0x2c,0x0a,0x22,0x51,0x2e,
+ 0x09,0x63,0x20,0x23,0x32,0x35,0x32,0x30,0x31,0x42,0x22,0x2c,0x0a,0x22,
+ 0x52,0x2e,0x09,0x63,0x20,0x23,0x35,0x39,0x35,0x39,0x35,0x39,0x22,0x2c,
+ 0x0a,0x22,0x53,0x2e,0x09,0x63,0x20,0x23,0x33,0x41,0x33,0x41,0x33,0x41,
+ 0x22,0x2c,0x0a,0x22,0x54,0x2e,0x09,0x63,0x20,0x23,0x34,0x33,0x34,0x33,
+ 0x34,0x33,0x22,0x2c,0x0a,0x22,0x55,0x2e,0x09,0x63,0x20,0x23,0x33,0x46,
+ 0x33,0x46,0x33,0x46,0x22,0x2c,0x0a,0x22,0x56,0x2e,0x09,0x63,0x20,0x23,
+ 0x32,0x39,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x57,0x2e,0x09,0x63,
+ 0x20,0x23,0x30,0x34,0x30,0x34,0x30,0x34,0x22,0x2c,0x0a,0x22,0x58,0x2e,
+ 0x09,0x63,0x20,0x23,0x32,0x42,0x32,0x42,0x32,0x42,0x22,0x2c,0x0a,0x22,
+ 0x59,0x2e,0x09,0x63,0x20,0x23,0x35,0x34,0x35,0x34,0x35,0x34,0x22,0x2c,
+ 0x0a,0x22,0x5a,0x2e,0x09,0x63,0x20,0x23,0x36,0x44,0x36,0x44,0x36,0x44,
+ 0x22,0x2c,0x0a,0x22,0x60,0x2e,0x09,0x63,0x20,0x23,0x33,0x44,0x33,0x44,
+ 0x33,0x44,0x22,0x2c,0x0a,0x22,0x20,0x2b,0x09,0x63,0x20,0x23,0x32,0x31,
+ 0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x09,0x63,0x20,0x23,
+ 0x38,0x39,0x38,0x39,0x38,0x39,0x22,0x2c,0x0a,0x22,0x2b,0x2b,0x09,0x63,
+ 0x20,0x23,0x32,0x37,0x32,0x37,0x32,0x37,0x22,0x2c,0x0a,0x22,0x40,0x2b,
+ 0x09,0x63,0x20,0x23,0x30,0x31,0x30,0x31,0x30,0x31,0x22,0x2c,0x0a,0x22,
+ 0x23,0x2b,0x09,0x63,0x20,0x23,0x37,0x38,0x37,0x38,0x37,0x38,0x22,0x2c,
+ 0x0a,0x22,0x24,0x2b,0x09,0x63,0x20,0x23,0x36,0x41,0x36,0x41,0x36,0x41,
+ 0x22,0x2c,0x0a,0x22,0x25,0x2b,0x09,0x63,0x20,0x23,0x36,0x30,0x36,0x30,
+ 0x36,0x30,0x22,0x2c,0x0a,0x22,0x26,0x2b,0x09,0x63,0x20,0x23,0x30,0x42,
+ 0x30,0x42,0x30,0x42,0x22,0x2c,0x0a,0x22,0x2a,0x2b,0x09,0x63,0x20,0x23,
+ 0x35,0x35,0x35,0x35,0x35,0x35,0x22,0x2c,0x0a,0x22,0x3d,0x2b,0x09,0x63,
+ 0x20,0x23,0x35,0x32,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x2d,0x2b,
+ 0x09,0x63,0x20,0x23,0x38,0x36,0x38,0x36,0x38,0x36,0x22,0x2c,0x0a,0x22,
+ 0x3b,0x2b,0x09,0x63,0x20,0x23,0x35,0x31,0x35,0x31,0x35,0x31,0x22,0x2c,
+ 0x0a,0x22,0x3e,0x2b,0x09,0x63,0x20,0x23,0x30,0x43,0x30,0x43,0x30,0x43,
+ 0x22,0x2c,0x0a,0x22,0x2c,0x2b,0x09,0x63,0x20,0x23,0x37,0x37,0x37,0x37,
+ 0x37,0x37,0x22,0x2c,0x0a,0x22,0x27,0x2b,0x09,0x63,0x20,0x23,0x37,0x43,
+ 0x37,0x43,0x37,0x43,0x22,0x2c,0x0a,0x22,0x29,0x2b,0x09,0x63,0x20,0x23,
+ 0x33,0x34,0x33,0x34,0x33,0x34,0x22,0x2c,0x0a,0x22,0x21,0x2b,0x09,0x63,
+ 0x20,0x23,0x31,0x37,0x31,0x37,0x31,0x37,0x22,0x2c,0x0a,0x22,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2e,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,
+ 0x2b,0x20,0x40,0x20,0x23,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x24,0x20,0x25,0x20,0x26,0x20,0x26,0x20,
+ 0x26,0x20,0x26,0x20,0x26,0x20,0x26,0x20,0x2a,0x20,0x3d,0x20,0x2d,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x2c,
+ 0x0a,0x22,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x24,0x20,
+ 0x3b,0x20,0x3e,0x20,0x2c,0x20,0x27,0x20,0x29,0x20,0x21,0x20,0x7e,0x20,
+ 0x7b,0x20,0x5d,0x20,0x5e,0x20,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x24,0x20,0x28,0x20,0x5f,0x20,0x27,0x20,0x3a,0x20,
+ 0x3c,0x20,0x5b,0x20,0x3b,0x20,0x7d,0x20,0x7c,0x20,0x5b,0x20,0x31,0x20,
+ 0x32,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x2c,0x0a,0x22,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x24,0x20,0x33,0x20,
+ 0x34,0x20,0x35,0x20,0x36,0x20,0x37,0x20,0x38,0x20,0x39,0x20,0x30,0x20,
+ 0x61,0x20,0x62,0x20,0x63,0x20,0x64,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x24,0x20,0x27,0x20,0x65,0x20,0x66,0x20,0x67,0x20,0x5e,0x20,
+ 0x68,0x20,0x69,0x20,0x6a,0x20,0x6b,0x20,0x6c,0x20,0x6d,0x20,0x6e,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x24,0x20,0x6f,0x20,0x70,0x20,
+ 0x71,0x20,0x72,0x20,0x73,0x20,0x74,0x20,0x75,0x20,0x76,0x20,0x77,0x20,
+ 0x78,0x20,0x79,0x20,0x7a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x24,0x20,0x28,0x20,0x37,0x20,0x3c,0x20,0x5b,0x20,0x41,0x20,0x42,0x20,
+ 0x43,0x20,0x44,0x20,0x45,0x20,0x46,0x20,0x47,0x20,0x48,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x24,0x20,0x49,0x20,0x4a,0x20,0x4b,0x20,
+ 0x4c,0x20,0x4d,0x20,0x4e,0x20,0x4f,0x20,0x50,0x20,0x51,0x20,0x52,0x20,
+ 0x53,0x20,0x54,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x2c,
+ 0x0a,0x22,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x24,0x20,
+ 0x73,0x20,0x30,0x20,0x55,0x20,0x56,0x20,0x57,0x20,0x58,0x20,0x59,0x20,
+ 0x5a,0x20,0x60,0x20,0x20,0x2e,0x2e,0x2e,0x2b,0x2e,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x24,0x20,0x40,0x2e,0x23,0x2e,0x24,0x2e,0x25,0x2e,
+ 0x26,0x2e,0x2a,0x2e,0x3d,0x2e,0x2d,0x2e,0x3b,0x2e,0x3e,0x2e,0x2c,0x2e,
+ 0x27,0x2e,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x2c,0x0a,0x22,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x29,0x2e,0x21,0x2e,0x7e,0x2e,
+ 0x7b,0x2e,0x5d,0x2e,0x5e,0x2e,0x2f,0x2e,0x28,0x2e,0x5f,0x2e,0x3a,0x2e,
+ 0x3c,0x2e,0x5b,0x2e,0x7d,0x2e,0x7c,0x2e,0x29,0x2e,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,0x31,0x2e,0x32,0x2e,
+ 0x33,0x2e,0x34,0x2e,0x35,0x2e,0x36,0x2e,0x37,0x2e,0x38,0x2e,0x39,0x2e,
+ 0x30,0x2e,0x61,0x2e,0x62,0x2e,0x63,0x2e,0x64,0x2e,0x65,0x2e,0x66,0x2e,
+ 0x67,0x2e,0x68,0x2e,0x69,0x2e,0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,
+ 0x29,0x2e,0x6a,0x2e,0x6b,0x2e,0x6c,0x2e,0x6d,0x2e,0x6e,0x2e,0x6f,0x2e,
+ 0x70,0x2e,0x71,0x2e,0x72,0x2e,0x73,0x2e,0x74,0x2e,0x75,0x2e,0x76,0x2e,
+ 0x77,0x2e,0x78,0x2e,0x79,0x2e,0x23,0x20,0x7a,0x2e,0x41,0x2e,0x20,0x20,
+ 0x22,0x2c,0x0a,0x22,0x20,0x20,0x42,0x2e,0x43,0x2e,0x44,0x2e,0x45,0x2e,
+ 0x46,0x2e,0x47,0x2e,0x48,0x2e,0x49,0x2e,0x30,0x2e,0x4a,0x2e,0x4b,0x2e,
+ 0x4c,0x2e,0x4d,0x2e,0x4e,0x2e,0x4f,0x2e,0x50,0x2e,0x51,0x2e,0x2d,0x20,
+ 0x52,0x2e,0x24,0x20,0x53,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x20,0x41,0x2e,
+ 0x54,0x2e,0x55,0x2e,0x56,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,
+ 0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,
+ 0x29,0x2e,0x57,0x2e,0x58,0x2e,0x59,0x2e,0x5a,0x2e,0x60,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x20,0x20,0x20,0x2b,0x2e,0x2b,0x2b,0x2b,0x40,0x2b,0x29,0x2e,
+ 0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,
+ 0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x57,0x2e,0x2e,0x20,
+ 0x23,0x2b,0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,0x24,0x2b,
+ 0x25,0x2b,0x2e,0x20,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,
+ 0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,0x29,0x2e,
+ 0x26,0x2b,0x2a,0x2b,0x7b,0x20,0x3d,0x2b,0x20,0x20,0x22,0x2c,0x0a,0x22,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x58,0x2e,0x44,0x2e,0x2d,0x2b,0x2d,0x2b,
+ 0x3b,0x2b,0x3e,0x2b,0x3e,0x2b,0x3e,0x2b,0x3e,0x2b,0x3e,0x2b,0x3e,0x2b,
+ 0x3e,0x2b,0x2c,0x2b,0x2d,0x2b,0x27,0x2b,0x29,0x2b,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x29,0x2e,0x29,0x2e,0x44,0x2e,0x41,0x2e,0x41,0x2e,0x41,0x2e,
+ 0x41,0x2e,0x41,0x2e,0x41,0x2e,0x41,0x2e,0x21,0x2b,0x29,0x2e,0x29,0x2e,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x2c,0x0a,0x22,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x22,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_editlower_xpm_len = 2428;
+static const unsigned char small_editlower_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x38,0x35,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x23,
+ 0x64,0x65,0x64,0x65,0x35,0x61,0x35,0x61,0x33,0x39,0x33,0x39,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x35,0x61,0x35,
+ 0x61,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x36,0x33,0x36,0x33,0x33,0x39,0x33,0x39,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x36,0x62,0x36,
+ 0x62,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x37,0x33,0x37,0x33,0x35,0x61,0x35,0x61,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x37,0x33,0x37,
+ 0x33,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x40,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x37,0x62,0x37,0x62,0x36,0x62,0x36,0x62,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x37,0x62,0x37,
+ 0x62,0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,0x22,0x24,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x37,0x33,0x37,0x33,0x36,0x33,0x36,0x33,0x22,0x2c,
+ 0x0a,0x22,0x25,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x36,0x33,0x36,
+ 0x33,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,0x20,0x23,
+ 0x65,0x37,0x65,0x37,0x36,0x33,0x36,0x33,0x34,0x61,0x34,0x61,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x36,0x33,0x36,
+ 0x33,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x37,0x62,0x37,0x62,0x35,0x61,0x35,0x61,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x36,0x62,0x36,
+ 0x62,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x36,0x33,0x36,0x33,0x34,0x32,0x34,0x32,0x22,0x2c,
+ 0x0a,0x22,0x3a,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x36,0x62,0x36,
+ 0x62,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x3e,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x36,0x62,0x36,0x62,0x34,0x61,0x34,0x61,0x22,0x2c,
+ 0x0a,0x22,0x2c,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x37,0x33,0x37,
+ 0x33,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x37,0x33,0x37,0x33,0x35,0x32,0x35,0x32,0x22,0x2c,
+ 0x0a,0x22,0x31,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x37,0x62,0x37,
+ 0x62,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x32,0x20,0x63,0x20,0x23,
+ 0x39,0x34,0x39,0x34,0x38,0x34,0x38,0x34,0x37,0x62,0x37,0x62,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x38,0x34,0x38,
+ 0x34,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x34,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x38,0x34,0x38,0x34,0x37,0x33,0x37,0x33,0x22,0x2c,
+ 0x0a,0x22,0x35,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x38,0x63,0x38,
+ 0x63,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x36,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x38,0x34,0x38,0x34,0x37,0x33,0x37,0x33,0x22,0x2c,
+ 0x0a,0x22,0x37,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x38,0x63,0x38,
+ 0x63,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x38,0x20,0x63,0x20,0x23,
+ 0x65,0x37,0x65,0x37,0x38,0x34,0x38,0x34,0x36,0x62,0x36,0x62,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x38,0x34,0x38,
+ 0x34,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x30,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x38,0x63,0x38,0x63,0x37,0x33,0x37,0x33,0x22,0x2c,
+ 0x0a,0x22,0x71,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x39,0x34,0x39,
+ 0x34,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x77,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x38,0x34,0x38,0x34,0x36,0x33,0x36,0x33,0x22,0x2c,
+ 0x0a,0x22,0x65,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x38,0x63,0x38,
+ 0x63,0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,0x22,0x72,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x39,0x34,0x39,0x34,0x37,0x62,0x37,0x62,0x22,0x2c,
+ 0x0a,0x22,0x74,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x38,0x63,0x38,
+ 0x63,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x79,0x20,0x63,0x20,0x23,
+ 0x39,0x63,0x39,0x63,0x38,0x63,0x38,0x63,0x38,0x63,0x38,0x63,0x22,0x2c,
+ 0x0a,0x22,0x75,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x34,0x39,
+ 0x34,0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x69,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x36,0x31,0x22,0x2c,0x0a,0x22,0x70,0x20,0x63,0x20,0x23,
+ 0x62,0x35,0x62,0x35,0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,0x22,0x2c,
+ 0x0a,0x22,0x61,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x61,0x35,0x61,
+ 0x35,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x73,0x20,0x63,0x20,0x23,
+ 0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x22,0x2c,
+ 0x0a,0x22,0x64,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x61,0x35,0x61,
+ 0x35,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x66,0x20,0x63,0x20,0x23,
+ 0x62,0x35,0x62,0x35,0x61,0x64,0x61,0x64,0x61,0x64,0x61,0x64,0x22,0x2c,
+ 0x0a,0x22,0x67,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x61,0x64,0x61,
+ 0x64,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x68,0x20,0x63,0x20,0x23,
+ 0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x62,0x35,0x62,0x35,0x22,0x2c,
+ 0x0a,0x22,0x6a,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,0x64,0x62,
+ 0x64,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x6b,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x37,0x34,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x22,0x2c,
+ 0x0a,0x22,0x7a,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x39,0x34,0x39,
+ 0x34,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x78,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x39,0x34,0x39,0x34,0x38,0x63,0x38,0x63,0x22,0x2c,
+ 0x0a,0x22,0x63,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x39,0x63,0x39,
+ 0x63,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x76,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x39,0x63,0x39,0x63,0x39,0x34,0x39,0x34,0x22,0x2c,
+ 0x0a,0x22,0x62,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x39,0x63,0x39,
+ 0x63,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x39,0x63,0x39,0x63,0x38,0x63,0x38,0x63,0x22,0x2c,
+ 0x0a,0x22,0x6d,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x61,0x35,0x61,
+ 0x35,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x61,0x64,0x61,0x64,0x61,0x35,0x61,0x35,0x22,0x2c,
+ 0x0a,0x22,0x4e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x62,0x35,0x62,
+ 0x35,0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,0x42,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x62,0x35,0x62,0x35,0x62,0x35,0x62,0x35,0x22,0x2c,
+ 0x0a,0x22,0x56,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x62,0x64,0x62,
+ 0x64,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x43,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x39,0x63,0x39,0x63,0x38,0x34,0x38,0x34,0x22,0x2c,
+ 0x0a,0x22,0x5a,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x39,0x63,0x39,
+ 0x63,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x41,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x61,0x35,0x61,0x35,0x39,0x34,0x39,0x34,0x22,0x2c,
+ 0x0a,0x22,0x53,0x20,0x63,0x20,0x23,0x63,0x30,0x63,0x30,0x63,0x30,0x63,
+ 0x30,0x63,0x30,0x63,0x30,0x22,0x2c,0x0a,0x22,0x44,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x46,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x63,0x36,0x63,
+ 0x36,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x47,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x48,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x63,0x65,0x63,
+ 0x65,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x64,0x36,0x64,0x36,0x63,0x65,0x63,0x65,0x22,0x2c,
+ 0x0a,0x22,0x4b,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x36,0x64,
+ 0x36,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x4c,0x20,0x63,0x20,0x23,
+ 0x64,0x65,0x64,0x65,0x64,0x65,0x64,0x65,0x64,0x36,0x64,0x36,0x22,0x2c,
+ 0x0a,0x22,0x50,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x64,0x65,0x64,
+ 0x65,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x49,0x20,0x63,0x20,0x23,
+ 0x65,0x37,0x65,0x37,0x64,0x65,0x64,0x65,0x64,0x65,0x64,0x65,0x22,0x2c,
+ 0x0a,0x22,0x55,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x65,0x37,0x65,
+ 0x37,0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,0x22,0x59,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x65,0x66,0x65,0x66,0x64,0x65,0x64,0x65,0x22,0x2c,
+ 0x0a,0x22,0x54,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x65,0x37,0x65,
+ 0x37,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x52,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x22,0x2c,
+ 0x0a,0x22,0x45,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x65,0x66,0x65,
+ 0x66,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x57,0x20,0x63,0x20,0x23,
+ 0x66,0x37,0x66,0x37,0x65,0x66,0x65,0x66,0x65,0x37,0x65,0x37,0x22,0x2c,
+ 0x0a,0x22,0x51,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x65,0x66,0x65,
+ 0x66,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x21,0x20,0x63,0x20,0x23,
+ 0x66,0x37,0x66,0x37,0x66,0x37,0x66,0x37,0x65,0x66,0x65,0x66,0x22,0x2c,
+ 0x0a,0x22,0x7e,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x66,0x37,0x66,
+ 0x37,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x5e,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x39,0x37,0x22,0x2c,0x0a,0x22,0x2f,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x66,0x37,0x66,0x37,0x66,0x37,0x66,0x37,0x22,0x2c,
+ 0x0a,0x22,0x28,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
+ 0x66,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x29,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,0x22,0x5f,0x20,0x63,0x20,
+ 0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,
+ 0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x2b,0x26,0x6f,0x4f,0x2b,0x24,0x40,
+ 0x23,0x33,0x34,0x35,0x7a,0x70,0x7a,0x76,0x6b,0x5f,0x5f,0x5f,0x5f,0x5f,
+ 0x5f,0x22,0x2c,0x0a,0x22,0x3d,0x2c,0x3c,0x3e,0x3e,0x3e,0x2c,0x3e,0x3a,
+ 0x3e,0x3e,0x3a,0x3a,0x3e,0x20,0x69,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x22,
+ 0x2c,0x0a,0x22,0x38,0x3e,0x3e,0x3e,0x2c,0x3e,0x3e,0x2c,0x3e,0x2c,0x3e,
+ 0x3e,0x3e,0x2c,0x25,0x75,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x22,0x2c,0x0a,
+ 0x22,0x36,0x3a,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
+ 0x3e,0x25,0x74,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x22,0x2c,0x0a,0x22,0x37,
+ 0x3a,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x2c,0x2a,
+ 0x74,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x22,0x2c,0x0a,0x22,0x6c,0x3a,0x3e,
+ 0x3e,0x3a,0x3e,0x3e,0x3a,0x3e,0x3e,0x3a,0x3e,0x3e,0x3e,0x2a,0x79,0x5f,
+ 0x5f,0x5f,0x5f,0x5f,0x5f,0x22,0x2c,0x0a,0x22,0x78,0x3e,0x3a,0x3e,0x3e,
+ 0x3e,0x3a,0x3b,0x58,0x58,0x58,0x58,0x58,0x58,0x2e,0x32,0x5f,0x5f,0x5f,
+ 0x5f,0x5f,0x5f,0x22,0x2c,0x0a,0x22,0x63,0x3a,0x3e,0x3e,0x3a,0x3a,0x31,
+ 0x41,0x5a,0x43,0x43,0x71,0x30,0x30,0x39,0x79,0x6b,0x6b,0x6b,0x68,0x68,
+ 0x6b,0x22,0x2c,0x0a,0x22,0x61,0x3b,0x3a,0x3e,0x3a,0x3b,0x72,0x29,0x29,
+ 0x29,0x5e,0x5e,0x28,0x5e,0x5e,0x21,0x45,0x52,0x55,0x49,0x54,0x73,0x22,
+ 0x2c,0x0a,0x22,0x6d,0x3e,0x3a,0x3e,0x3a,0x58,0x65,0x28,0x28,0x28,0x28,
+ 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x29,0x64,0x22,0x2c,0x0a,
+ 0x22,0x67,0x3e,0x3a,0x3b,0x3a,0x3b,0x77,0x28,0x2f,0x7e,0x7e,0x7e,0x2f,
+ 0x7e,0x2f,0x7e,0x7e,0x2f,0x7e,0x7e,0x29,0x64,0x22,0x2c,0x0a,0x22,0x66,
+ 0x2d,0x3b,0x3e,0x3a,0x3b,0x31,0x7e,0x28,0x7e,0x2f,0x2f,0x7e,0x7e,0x7e,
+ 0x7e,0x2f,0x7e,0x28,0x7e,0x29,0x73,0x22,0x2c,0x0a,0x22,0x4e,0x2d,0x3a,
+ 0x3b,0x3b,0x3b,0x3c,0x51,0x28,0x7e,0x7e,0x7e,0x2f,0x7e,0x2f,0x7e,0x7e,
+ 0x7e,0x7e,0x7e,0x29,0x66,0x22,0x2c,0x0a,0x22,0x42,0x6f,0x3b,0x3a,0x3b,
+ 0x3b,0x3c,0x59,0x2f,0x7e,0x2f,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,
+ 0x7e,0x28,0x6a,0x22,0x2c,0x0a,0x22,0x56,0x4d,0x6d,0x62,0x76,0x6e,0x6e,
+ 0x55,0x28,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x29,
+ 0x6a,0x22,0x2c,0x0a,0x22,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x6b,0x54,0x2f,
+ 0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x28,0x6b,0x22,
+ 0x2c,0x0a,0x22,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x44,0x4b,0x28,0x7e,0x7e,
+ 0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x29,0x6a,0x22,0x2c,0x0a,
+ 0x22,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x6b,0x49,0x7e,0x7e,0x7e,0x7e,0x7e,
+ 0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x28,0x6b,0x22,0x2c,0x0a,0x22,0x5f,
+ 0x5f,0x5f,0x5f,0x5f,0x5f,0x6b,0x4b,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,
+ 0x7e,0x7e,0x21,0x7e,0x7e,0x28,0x6a,0x22,0x2c,0x0a,0x22,0x5f,0x5f,0x5f,
+ 0x5f,0x5f,0x5f,0x44,0x47,0x2f,0x7e,0x7e,0x7e,0x21,0x7e,0x7e,0x21,0x7e,
+ 0x7e,0x7e,0x7e,0x28,0x56,0x22,0x2c,0x0a,0x22,0x5f,0x5f,0x5f,0x5f,0x5f,
+ 0x5f,0x5f,0x4b,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,
+ 0x7e,0x28,0x56,0x22,0x2c,0x0a,0x22,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,
+ 0x6b,0x47,0x44,0x6b,0x48,0x46,0x44,0x4b,0x4a,0x48,0x50,0x4b,0x4c,0x57,
+ 0x46,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_editraise_xpm_len = 2365;
+static const unsigned char small_editraise_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x38,0x32,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x23,
+ 0x61,0x64,0x61,0x64,0x35,0x61,0x35,0x61,0x34,0x61,0x34,0x61,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x35,0x61,0x35,
+ 0x61,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,0x23,
+ 0x62,0x64,0x62,0x64,0x35,0x61,0x35,0x61,0x34,0x32,0x34,0x32,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x36,0x33,0x36,
+ 0x33,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x63,0x20,0x23,
+ 0x61,0x35,0x61,0x35,0x36,0x33,0x36,0x33,0x35,0x32,0x35,0x32,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x36,0x33,0x36,
+ 0x33,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x40,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x35,0x32,0x35,0x32,0x33,0x39,0x33,0x39,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x35,0x61,0x35,
+ 0x61,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x24,0x20,0x63,0x20,0x23,
+ 0x64,0x65,0x64,0x65,0x35,0x32,0x35,0x32,0x33,0x39,0x33,0x39,0x22,0x2c,
+ 0x0a,0x22,0x25,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x34,0x61,0x34,
+ 0x61,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x35,0x61,0x35,0x61,0x33,0x31,0x33,0x31,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x35,0x61,0x35,
+ 0x61,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x36,0x33,0x36,0x33,0x33,0x39,0x33,0x39,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x35,0x61,0x35,
+ 0x61,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x35,0x61,0x35,0x61,0x34,0x32,0x34,0x32,0x22,0x2c,
+ 0x0a,0x22,0x3a,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x36,0x62,0x36,
+ 0x62,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x3e,0x20,0x63,0x20,0x23,
+ 0x64,0x65,0x64,0x65,0x36,0x62,0x36,0x62,0x35,0x32,0x35,0x32,0x22,0x2c,
+ 0x0a,0x22,0x2c,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x37,0x33,0x37,
+ 0x33,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x37,0x33,0x37,0x33,0x36,0x33,0x36,0x33,0x22,0x2c,
+ 0x0a,0x22,0x31,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x37,0x33,0x37,
+ 0x33,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x32,0x20,0x63,0x20,0x23,
+ 0x64,0x65,0x64,0x65,0x37,0x62,0x37,0x62,0x36,0x33,0x36,0x33,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x36,0x33,0x36,
+ 0x33,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x34,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x37,0x33,0x37,0x33,0x35,0x32,0x35,0x32,0x22,0x2c,
+ 0x0a,0x22,0x35,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x36,0x62,0x36,
+ 0x62,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x36,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x36,0x33,0x36,0x33,0x34,0x32,0x34,0x32,0x22,0x2c,
+ 0x0a,0x22,0x37,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x36,0x62,0x36,
+ 0x62,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x38,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x36,0x62,0x36,0x62,0x34,0x61,0x34,0x61,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x37,0x33,0x37,
+ 0x33,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x30,0x20,0x63,0x20,0x23,
+ 0x66,0x37,0x66,0x37,0x37,0x33,0x37,0x33,0x35,0x32,0x35,0x32,0x22,0x2c,
+ 0x0a,0x22,0x71,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x38,0x34,0x38,
+ 0x34,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x77,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x38,0x34,0x38,0x34,0x37,0x33,0x37,0x33,0x22,0x2c,
+ 0x0a,0x22,0x65,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x38,0x63,0x38,
+ 0x63,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x72,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x38,0x34,0x38,0x34,0x37,0x33,0x37,0x33,0x22,0x2c,
+ 0x0a,0x22,0x74,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x38,0x63,0x38,
+ 0x63,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x79,0x20,0x63,0x20,0x23,
+ 0x65,0x37,0x65,0x37,0x38,0x34,0x38,0x34,0x36,0x62,0x36,0x62,0x22,0x2c,
+ 0x0a,0x22,0x75,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x38,0x63,0x38,
+ 0x63,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x69,0x20,0x63,0x20,0x23,
+ 0x62,0x35,0x62,0x35,0x39,0x34,0x39,0x34,0x38,0x63,0x38,0x63,0x22,0x2c,
+ 0x0a,0x22,0x70,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x39,0x63,0x39,
+ 0x63,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x61,0x20,0x63,0x20,0x23,
+ 0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x22,0x2c,
+ 0x0a,0x22,0x73,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x61,0x35,0x61,
+ 0x35,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x64,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x36,0x38,0x22,0x2c,0x0a,0x22,0x66,0x20,0x63,0x20,0x23,
+ 0x62,0x64,0x62,0x64,0x61,0x64,0x61,0x64,0x61,0x35,0x61,0x35,0x22,0x2c,
+ 0x0a,0x22,0x67,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x31,0x22,0x2c,
+ 0x0a,0x22,0x68,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,0x35,0x62,
+ 0x35,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x6a,0x20,0x63,0x20,0x23,
+ 0x62,0x64,0x62,0x64,0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x22,0x2c,
+ 0x0a,0x22,0x6b,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x34,0x22,0x2c,
+ 0x0a,0x22,0x6c,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x63,0x36,0x63,
+ 0x36,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x7a,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x22,0x2c,
+ 0x0a,0x22,0x78,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x39,0x34,0x39,
+ 0x34,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x63,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x39,0x34,0x39,0x34,0x38,0x34,0x38,0x34,0x22,0x2c,
+ 0x0a,0x22,0x76,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x39,0x63,0x39,
+ 0x63,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x62,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x61,0x35,0x61,0x35,0x39,0x63,0x39,0x63,0x22,0x2c,
+ 0x0a,0x22,0x6e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x61,0x64,0x61,
+ 0x64,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x6d,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x61,0x64,0x61,0x64,0x61,0x64,0x61,0x64,0x22,0x2c,
+ 0x0a,0x22,0x4d,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x62,0x35,0x62,
+ 0x35,0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,0x4e,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x62,0x64,0x62,0x64,0x62,0x64,0x62,0x64,0x22,0x2c,
+ 0x0a,0x22,0x42,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x61,0x35,0x61,
+ 0x35,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x56,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x61,0x64,0x61,0x64,0x39,0x63,0x39,0x63,0x22,0x2c,
+ 0x0a,0x22,0x43,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x62,0x35,0x62,
+ 0x35,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x62,0x64,0x62,0x64,0x22,0x2c,
+ 0x0a,0x22,0x41,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x63,0x36,0x63,
+ 0x36,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x53,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x63,0x36,0x63,0x36,0x62,0x35,0x62,0x35,0x22,0x2c,
+ 0x0a,0x22,0x44,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x63,0x65,0x63,
+ 0x65,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x46,0x20,0x63,0x20,0x23,
+ 0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x22,0x2c,
+ 0x0a,0x22,0x47,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x63,0x36,0x63,
+ 0x36,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x48,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x4a,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x63,0x65,0x63,
+ 0x65,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x4b,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x22,0x2c,
+ 0x0a,0x22,0x4c,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x63,0x65,0x63,
+ 0x65,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x50,0x20,0x63,0x20,0x23,
+ 0x64,0x65,0x64,0x65,0x63,0x65,0x63,0x65,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x49,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x36,0x64,
+ 0x36,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x55,0x20,0x63,0x20,0x23,
+ 0x64,0x65,0x64,0x65,0x64,0x36,0x64,0x36,0x64,0x36,0x64,0x36,0x22,0x2c,
+ 0x0a,0x22,0x59,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x64,0x65,0x64,
+ 0x65,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x54,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x64,0x65,0x64,0x65,0x64,0x36,0x64,0x36,0x22,0x2c,
+ 0x0a,0x22,0x52,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x64,0x36,0x64,
+ 0x36,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x45,0x20,0x63,0x20,0x23,
+ 0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x64,0x65,0x64,0x65,0x22,0x2c,
+ 0x0a,0x22,0x57,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x65,0x66,0x65,
+ 0x66,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x51,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x66,0x37,0x66,0x37,0x65,0x66,0x65,0x66,0x22,0x2c,
+ 0x0a,0x22,0x21,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x66,0x37,0x66,
+ 0x37,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x7e,0x20,0x63,0x20,0x23,
+ 0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x37,0x66,0x37,0x22,0x2c,
+ 0x0a,0x22,0x5e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x30,0x30,0x22,
+ 0x2c,0x0a,0x22,0x2f,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,
+ 0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,
+ 0x2c,0x33,0x3e,0x3a,0x3c,0x31,0x3c,0x77,0x71,0x77,0x65,0x75,0x69,0x78,
+ 0x66,0x4e,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x22,0x2c,0x0a,0x22,0x30,0x39,
+ 0x39,0x38,0x37,0x39,0x38,0x38,0x37,0x38,0x37,0x36,0x36,0x36,0x4f,0x6b,
+ 0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x22,0x2c,0x0a,0x22,0x32,0x38,0x38,0x38,
+ 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x39,0x39,0x39,0x2b,0x68,0x2f,0x2f,
+ 0x2f,0x2f,0x2f,0x2f,0x22,0x2c,0x0a,0x22,0x79,0x37,0x38,0x38,0x38,0x38,
+ 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x6f,0x67,0x2f,0x2f,0x2f,0x2f,
+ 0x2f,0x2f,0x22,0x2c,0x0a,0x22,0x72,0x37,0x38,0x38,0x38,0x38,0x38,0x38,
+ 0x38,0x37,0x38,0x38,0x38,0x39,0x20,0x68,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+ 0x22,0x2c,0x0a,0x22,0x74,0x37,0x38,0x38,0x37,0x38,0x38,0x37,0x38,0x38,
+ 0x38,0x37,0x38,0x39,0x2e,0x67,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x22,0x2c,
+ 0x0a,0x22,0x7a,0x38,0x37,0x38,0x37,0x38,0x37,0x38,0x37,0x38,0x37,0x38,
+ 0x37,0x38,0x58,0x67,0x6b,0x2f,0x2f,0x2f,0x2f,0x2f,0x22,0x2c,0x0a,0x22,
+ 0x63,0x37,0x38,0x37,0x38,0x38,0x37,0x38,0x38,0x37,0x38,0x37,0x38,0x37,
+ 0x2d,0x67,0x48,0x5a,0x4e,0x6a,0x6b,0x64,0x22,0x2c,0x0a,0x22,0x76,0x37,
+ 0x38,0x37,0x38,0x37,0x38,0x37,0x37,0x38,0x37,0x38,0x37,0x37,0x3b,0x45,
+ 0x5e,0x7e,0x7e,0x7e,0x5e,0x61,0x22,0x2c,0x0a,0x22,0x70,0x37,0x36,0x38,
+ 0x36,0x37,0x38,0x36,0x38,0x36,0x38,0x36,0x38,0x37,0x23,0x55,0x7e,0x7e,
+ 0x21,0x21,0x5e,0x73,0x22,0x2c,0x0a,0x22,0x62,0x37,0x37,0x37,0x37,0x38,
+ 0x36,0x37,0x37,0x37,0x37,0x37,0x36,0x38,0x40,0x49,0x7e,0x51,0x51,0x51,
+ 0x5e,0x73,0x22,0x2c,0x0a,0x22,0x66,0x38,0x36,0x38,0x37,0x36,0x38,0x36,
+ 0x38,0x36,0x38,0x36,0x38,0x37,0x40,0x49,0x7e,0x21,0x21,0x51,0x5e,0x61,
+ 0x22,0x2c,0x0a,0x22,0x6e,0x36,0x37,0x36,0x36,0x37,0x36,0x37,0x36,0x37,
+ 0x36,0x37,0x36,0x37,0x24,0x50,0x7e,0x51,0x51,0x51,0x5e,0x67,0x22,0x2c,
+ 0x0a,0x22,0x6d,0x36,0x36,0x37,0x36,0x36,0x37,0x36,0x36,0x36,0x37,0x36,
+ 0x38,0x37,0x24,0x50,0x7e,0x51,0x51,0x51,0x7e,0x6a,0x22,0x2c,0x0a,0x22,
+ 0x67,0x32,0x34,0x30,0x35,0x38,0x36,0x36,0x36,0x3d,0x2a,0x2a,0x2a,0x26,
+ 0x25,0x41,0x7e,0x51,0x51,0x51,0x5e,0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x6a,
+ 0x4e,0x68,0x67,0x4d,0x6d,0x6e,0x52,0x44,0x53,0x43,0x43,0x56,0x42,0x54,
+ 0x21,0x51,0x51,0x51,0x5e,0x6a,0x22,0x2c,0x0a,0x22,0x2f,0x2f,0x2f,0x2f,
+ 0x2f,0x2f,0x2f,0x6c,0x7e,0x5e,0x7e,0x5e,0x5e,0x7e,0x5e,0x21,0x51,0x51,
+ 0x51,0x51,0x7e,0x6a,0x22,0x2c,0x0a,0x22,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+ 0x2f,0x4a,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,
+ 0x7e,0x6b,0x22,0x2c,0x0a,0x22,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x6b,
+ 0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x7e,0x6a,
+ 0x22,0x2c,0x0a,0x22,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x6b,0x51,0x51,
+ 0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x7e,0x4e,0x22,0x2c,
+ 0x0a,0x22,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x4e,0x51,0x51,0x51,0x51,
+ 0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x7e,0x5a,0x22,0x2c,0x0a,0x22,
+ 0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x6b,0x6b,0x47,0x6b,0x47,0x4b,0x5a,
+ 0x4c,0x55,0x4b,0x55,0x59,0x55,0x57,0x48,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_form_xpm_len = 1483;
+static const unsigned char small_form_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x33,0x39,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x23,
+ 0x34,0x61,0x34,0x61,0x39,0x66,0x39,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x35,0x33,0x35,0x33,0x39,0x66,0x39,
+ 0x66,0x66,0x36,0x66,0x36,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,0x23,
+ 0x34,0x66,0x34,0x66,0x61,0x34,0x61,0x34,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x63,0x20,0x23,0x35,0x36,0x35,0x36,0x61,0x37,0x61,
+ 0x37,0x66,0x65,0x66,0x65,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x63,0x20,0x23,
+ 0x35,0x37,0x35,0x37,0x61,0x64,0x61,0x64,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x20,0x63,0x20,0x23,0x35,0x65,0x35,0x65,0x61,0x66,0x61,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x40,0x20,0x63,0x20,0x23,
+ 0x35,0x65,0x35,0x65,0x62,0x32,0x62,0x32,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x63,0x20,0x23,0x36,0x31,0x36,0x31,0x61,0x65,0x61,
+ 0x65,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x24,0x20,0x63,0x20,0x23,
+ 0x36,0x30,0x36,0x30,0x61,0x66,0x61,0x66,0x66,0x38,0x66,0x38,0x22,0x2c,
+ 0x0a,0x22,0x25,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x63,0x35,0x63,
+ 0x35,0x63,0x31,0x63,0x31,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,0x20,0x23,
+ 0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x64,0x30,0x64,
+ 0x30,0x63,0x63,0x63,0x63,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x23,
+ 0x63,0x64,0x63,0x64,0x64,0x37,0x64,0x37,0x64,0x33,0x64,0x33,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x63,0x20,0x23,0x64,0x31,0x64,0x31,0x64,0x63,0x64,
+ 0x63,0x64,0x37,0x64,0x37,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x63,0x20,0x23,
+ 0x64,0x34,0x64,0x34,0x64,0x66,0x64,0x66,0x64,0x62,0x64,0x62,0x22,0x2c,
+ 0x0a,0x22,0x3a,0x20,0x63,0x20,0x23,0x64,0x37,0x64,0x37,0x65,0x34,0x65,
+ 0x34,0x64,0x66,0x64,0x66,0x22,0x2c,0x0a,0x22,0x3e,0x20,0x63,0x20,0x23,
+ 0x64,0x61,0x64,0x61,0x65,0x35,0x65,0x35,0x64,0x66,0x64,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2c,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x65,0x32,0x65,
+ 0x32,0x65,0x38,0x65,0x38,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x63,0x20,0x23,
+ 0x64,0x32,0x64,0x32,0x65,0x37,0x65,0x37,0x65,0x66,0x65,0x66,0x22,0x2c,
+ 0x0a,0x22,0x31,0x20,0x63,0x20,0x23,0x64,0x34,0x64,0x34,0x65,0x38,0x65,
+ 0x38,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x32,0x20,0x63,0x20,0x23,
+ 0x64,0x64,0x64,0x64,0x65,0x37,0x65,0x37,0x65,0x32,0x65,0x32,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x63,0x20,0x23,0x64,0x66,0x64,0x66,0x65,0x63,0x65,
+ 0x63,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x34,0x20,0x63,0x20,0x23,
+ 0x64,0x37,0x64,0x37,0x65,0x63,0x65,0x63,0x66,0x34,0x66,0x34,0x22,0x2c,
+ 0x0a,0x22,0x35,0x20,0x63,0x20,0x23,0x64,0x61,0x64,0x61,0x65,0x66,0x65,
+ 0x66,0x66,0x36,0x66,0x36,0x22,0x2c,0x0a,0x22,0x36,0x20,0x63,0x20,0x23,
+ 0x64,0x63,0x64,0x63,0x66,0x30,0x66,0x30,0x66,0x37,0x66,0x37,0x22,0x2c,
+ 0x0a,0x22,0x37,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x66,0x30,0x66,
+ 0x30,0x66,0x61,0x66,0x61,0x22,0x2c,0x0a,0x22,0x38,0x20,0x63,0x20,0x23,
+ 0x65,0x32,0x65,0x32,0x65,0x65,0x65,0x65,0x65,0x37,0x65,0x37,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x63,0x20,0x23,0x65,0x34,0x65,0x34,0x65,0x66,0x65,
+ 0x66,0x65,0x61,0x65,0x61,0x22,0x2c,0x0a,0x22,0x30,0x20,0x63,0x20,0x23,
+ 0x65,0x37,0x65,0x37,0x66,0x33,0x66,0x33,0x65,0x65,0x65,0x65,0x22,0x2c,
+ 0x0a,0x22,0x71,0x20,0x63,0x20,0x23,0x65,0x38,0x65,0x38,0x66,0x30,0x66,
+ 0x30,0x65,0x36,0x65,0x36,0x22,0x2c,0x0a,0x22,0x77,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x66,0x37,0x66,0x37,0x65,0x63,0x65,0x63,0x22,0x2c,
+ 0x0a,0x22,0x65,0x20,0x63,0x20,0x23,0x65,0x30,0x65,0x30,0x66,0x31,0x66,
+ 0x31,0x66,0x64,0x66,0x64,0x22,0x2c,0x0a,0x22,0x72,0x20,0x63,0x20,0x23,
+ 0x65,0x63,0x65,0x63,0x66,0x37,0x66,0x37,0x66,0x32,0x66,0x32,0x22,0x2c,
+ 0x0a,0x22,0x74,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x66,0x63,0x66,
+ 0x63,0x66,0x36,0x66,0x36,0x22,0x2c,0x0a,0x22,0x79,0x20,0x63,0x20,0x23,
+ 0x66,0x31,0x66,0x31,0x66,0x61,0x66,0x61,0x65,0x66,0x65,0x66,0x22,0x2c,
+ 0x0a,0x22,0x75,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x66,0x66,0x66,
+ 0x66,0x66,0x36,0x66,0x36,0x22,0x2c,0x0a,0x22,0x69,0x20,0x63,0x20,0x23,
+ 0x66,0x39,0x66,0x39,0x66,0x66,0x66,0x66,0x66,0x37,0x66,0x37,0x22,0x2c,
+ 0x0a,0x22,0x70,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x30,0x30,0x22,
+ 0x2c,0x0a,0x22,0x61,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,
+ 0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,
+ 0x23,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x2b,0x23,0x2b,
+ 0x2e,0x2b,0x2e,0x2b,0x2e,0x2b,0x2e,0x23,0x22,0x2c,0x0a,0x22,0x23,0x2b,
+ 0x2b,0x2b,0x4f,0x2b,0x6f,0x4f,0x6f,0x6f,0x6f,0x58,0x58,0x6f,0x58,0x6f,
+ 0x58,0x20,0x20,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x23,0x40,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x6f,0x2b,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x2e,0x22,0x2c,0x0a,0x22,0x3c,0x65,0x37,0x37,0x37,0x37,
+ 0x35,0x37,0x34,0x34,0x34,0x35,0x34,0x34,0x34,0x31,0x34,0x3c,0x3c,0x34,
+ 0x2c,0x3b,0x22,0x2c,0x0a,0x22,0x79,0x70,0x69,0x75,0x75,0x75,0x75,0x75,
+ 0x75,0x75,0x75,0x79,0x79,0x79,0x79,0x77,0x77,0x77,0x77,0x71,0x77,0x38,
+ 0x22,0x2c,0x0a,0x22,0x77,0x74,0x75,0x74,0x74,0x74,0x74,0x72,0x72,0x72,
+ 0x36,0x77,0x72,0x30,0x30,0x30,0x30,0x30,0x39,0x39,0x39,0x3e,0x22,0x2c,
+ 0x0a,0x22,0x39,0x74,0x74,0x74,0x72,0x74,0x72,0x72,0x72,0x72,0x77,0x30,
+ 0x77,0x30,0x30,0x30,0x39,0x30,0x39,0x39,0x39,0x3a,0x22,0x2c,0x0a,0x22,
+ 0x32,0x75,0x74,0x72,0x74,0x72,0x72,0x72,0x77,0x36,0x77,0x30,0x30,0x30,
+ 0x39,0x30,0x39,0x38,0x39,0x39,0x39,0x3b,0x22,0x2c,0x0a,0x22,0x32,0x74,
+ 0x72,0x72,0x72,0x72,0x36,0x77,0x36,0x77,0x30,0x30,0x30,0x39,0x30,0x38,
+ 0x39,0x39,0x33,0x33,0x38,0x2d,0x22,0x2c,0x0a,0x22,0x3e,0x74,0x72,0x72,
+ 0x72,0x77,0x77,0x30,0x77,0x30,0x30,0x30,0x39,0x30,0x38,0x39,0x39,0x33,
+ 0x38,0x33,0x38,0x2d,0x22,0x2c,0x0a,0x22,0x3b,0x74,0x77,0x36,0x77,0x36,
+ 0x30,0x30,0x39,0x30,0x39,0x30,0x39,0x39,0x38,0x39,0x33,0x38,0x33,0x33,
+ 0x33,0x3b,0x22,0x2c,0x0a,0x22,0x3e,0x77,0x36,0x77,0x30,0x77,0x30,0x30,
+ 0x30,0x39,0x39,0x39,0x39,0x38,0x39,0x38,0x33,0x33,0x32,0x32,0x33,0x2d,
+ 0x22,0x2c,0x0a,0x22,0x32,0x72,0x77,0x30,0x30,0x39,0x30,0x39,0x39,0x39,
+ 0x39,0x38,0x33,0x33,0x33,0x33,0x32,0x32,0x33,0x32,0x33,0x3d,0x22,0x2c,
+ 0x0a,0x22,0x3e,0x30,0x30,0x39,0x30,0x39,0x30,0x38,0x39,0x39,0x31,0x38,
+ 0x38,0x33,0x33,0x32,0x33,0x32,0x33,0x3e,0x32,0x3d,0x22,0x2c,0x0a,0x22,
+ 0x3b,0x30,0x39,0x30,0x39,0x39,0x38,0x39,0x38,0x38,0x38,0x33,0x32,0x33,
+ 0x32,0x32,0x33,0x32,0x32,0x3e,0x33,0x2a,0x22,0x2c,0x0a,0x22,0x2d,0x30,
+ 0x30,0x39,0x38,0x31,0x39,0x38,0x33,0x38,0x33,0x33,0x32,0x33,0x32,0x33,
+ 0x32,0x3e,0x3e,0x3e,0x32,0x2a,0x22,0x2c,0x0a,0x22,0x2d,0x30,0x38,0x33,
+ 0x38,0x38,0x38,0x33,0x33,0x33,0x33,0x32,0x32,0x32,0x32,0x3a,0x3e,0x3a,
+ 0x32,0x3a,0x3a,0x3d,0x22,0x2c,0x0a,0x22,0x2a,0x30,0x38,0x38,0x38,0x33,
+ 0x33,0x33,0x32,0x33,0x32,0x33,0x32,0x32,0x32,0x3a,0x3e,0x3a,0x3a,0x3a,
+ 0x3a,0x3d,0x22,0x2c,0x0a,0x22,0x2a,0x39,0x38,0x33,0x33,0x33,0x32,0x33,
+ 0x33,0x32,0x32,0x3e,0x32,0x32,0x3a,0x3e,0x3e,0x3e,0x3a,0x3a,0x3a,0x2a,
+ 0x22,0x2c,0x0a,0x22,0x3b,0x39,0x32,0x33,0x32,0x33,0x32,0x33,0x3e,0x3e,
+ 0x3a,0x32,0x3a,0x3a,0x3a,0x3a,0x3a,0x3b,0x3a,0x3b,0x3a,0x2a,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x33,0x32,0x33,0x32,0x32,0x32,0x3e,0x32,0x32,0x32,0x3a,
+ 0x3e,0x3a,0x3a,0x3a,0x3b,0x3a,0x3b,0x2d,0x3e,0x61,0x22,0x2c,0x0a,0x22,
+ 0x2a,0x32,0x3e,0x3a,0x3e,0x3a,0x3a,0x3a,0x3b,0x3a,0x3b,0x3b,0x3b,0x3b,
+ 0x2d,0x3b,0x2d,0x2d,0x2d,0x2d,0x3b,0x25,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_home_xpm_len = 3981;
+static const unsigned char small_home_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x33,0x32,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x63,
+ 0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x20,0x63,
+ 0x20,0x23,0x30,0x38,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+ 0x22,0x2c,0x0a,0x22,0x58,0x20,0x20,0x63,0x20,0x23,0x30,0x38,0x30,0x38,
+ 0x30,0x38,0x30,0x38,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x6f,0x20,
+ 0x20,0x63,0x20,0x23,0x30,0x38,0x30,0x38,0x31,0x30,0x31,0x30,0x30,0x38,
+ 0x30,0x38,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x20,0x63,0x20,0x23,0x31,0x30,
+ 0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,
+ 0x2b,0x20,0x20,0x63,0x20,0x23,0x32,0x39,0x32,0x39,0x32,0x31,0x32,0x31,
+ 0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x40,0x20,0x20,0x63,0x20,0x23,
+ 0x33,0x31,0x33,0x31,0x32,0x39,0x32,0x39,0x30,0x30,0x30,0x30,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,0x32,0x39,
+ 0x32,0x39,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x24,0x20,0x20,0x63,
+ 0x20,0x23,0x33,0x39,0x33,0x39,0x33,0x31,0x33,0x31,0x30,0x30,0x30,0x30,
+ 0x22,0x2c,0x0a,0x22,0x25,0x20,0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,
+ 0x33,0x39,0x33,0x39,0x30,0x38,0x30,0x38,0x22,0x2c,0x0a,0x22,0x26,0x20,
+ 0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,0x33,0x39,0x33,0x39,0x31,0x30,
+ 0x31,0x30,0x22,0x2c,0x0a,0x22,0x2a,0x20,0x20,0x63,0x20,0x23,0x33,0x39,
+ 0x33,0x39,0x33,0x31,0x33,0x31,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,
+ 0x3d,0x20,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x33,0x39,0x33,0x39,
+ 0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x20,0x63,0x20,0x23,
+ 0x34,0x61,0x34,0x61,0x34,0x32,0x34,0x32,0x30,0x38,0x30,0x38,0x22,0x2c,
+ 0x0a,0x22,0x3b,0x20,0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,0x35,0x32,
+ 0x35,0x32,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x3a,0x20,0x20,0x63,
+ 0x20,0x23,0x34,0x32,0x34,0x32,0x34,0x32,0x34,0x32,0x33,0x31,0x33,0x31,
+ 0x22,0x2c,0x0a,0x22,0x3e,0x20,0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,
+ 0x34,0x32,0x34,0x32,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x2c,0x20,
+ 0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,0x34,0x61,0x34,0x61,0x33,0x31,
+ 0x33,0x31,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x20,0x63,0x20,0x23,0x35,0x32,
+ 0x35,0x32,0x35,0x61,0x35,0x61,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,
+ 0x31,0x20,0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x35,0x32,0x35,0x32,
+ 0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x32,0x20,0x20,0x63,0x20,0x23,
+ 0x36,0x33,0x36,0x33,0x35,0x61,0x35,0x61,0x30,0x38,0x30,0x38,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x35,0x61,
+ 0x35,0x61,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x34,0x20,0x20,0x63,
+ 0x20,0x23,0x36,0x62,0x36,0x62,0x35,0x61,0x35,0x61,0x31,0x30,0x31,0x30,
+ 0x22,0x2c,0x0a,0x22,0x35,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,
+ 0x37,0x33,0x37,0x33,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x36,0x20,
+ 0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x36,0x62,0x36,0x62,0x32,0x31,
+ 0x32,0x31,0x22,0x2c,0x0a,0x22,0x37,0x20,0x20,0x63,0x20,0x23,0x36,0x62,
+ 0x36,0x62,0x37,0x33,0x37,0x33,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,
+ 0x38,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x37,0x33,0x37,0x33,
+ 0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x39,0x20,0x20,0x63,0x20,0x23,
+ 0x37,0x33,0x37,0x33,0x37,0x62,0x37,0x62,0x32,0x39,0x32,0x39,0x22,0x2c,
+ 0x0a,0x22,0x30,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x37,0x62,
+ 0x37,0x62,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x71,0x20,0x20,0x63,
+ 0x20,0x23,0x37,0x62,0x37,0x62,0x37,0x62,0x37,0x62,0x32,0x39,0x32,0x39,
+ 0x22,0x2c,0x0a,0x22,0x77,0x20,0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,
+ 0x34,0x61,0x34,0x61,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x65,0x20,
+ 0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x34,0x32,0x34,0x32,0x34,0x32,
+ 0x34,0x32,0x22,0x2c,0x0a,0x22,0x72,0x20,0x20,0x63,0x20,0x47,0x72,0x61,
+ 0x79,0x32,0x39,0x22,0x2c,0x0a,0x22,0x74,0x20,0x20,0x63,0x20,0x23,0x34,
+ 0x61,0x34,0x61,0x35,0x32,0x35,0x32,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,
+ 0x22,0x79,0x20,0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,0x34,0x61,0x34,
+ 0x61,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x75,0x20,0x20,0x63,0x20,
+ 0x23,0x35,0x61,0x35,0x61,0x35,0x32,0x35,0x32,0x34,0x61,0x34,0x61,0x22,
+ 0x2c,0x0a,0x22,0x69,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x33,0x32,
+ 0x22,0x2c,0x0a,0x22,0x70,0x20,0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,
+ 0x35,0x61,0x35,0x61,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x61,0x20,
+ 0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,0x36,0x33,0x36,0x33,0x35,0x61,
+ 0x35,0x61,0x22,0x2c,0x0a,0x22,0x73,0x20,0x20,0x63,0x20,0x23,0x36,0x33,
+ 0x36,0x33,0x36,0x33,0x36,0x33,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,
+ 0x64,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x33,0x39,0x22,0x2c,0x0a,
+ 0x22,0x66,0x20,0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x36,0x62,0x36,
+ 0x62,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x67,0x20,0x20,0x63,0x20,
+ 0x23,0x36,0x62,0x36,0x62,0x36,0x62,0x36,0x62,0x36,0x33,0x36,0x33,0x22,
+ 0x2c,0x0a,0x22,0x68,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x34,0x32,
+ 0x22,0x2c,0x0a,0x22,0x6a,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,
+ 0x36,0x62,0x36,0x62,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x6b,0x20,
+ 0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x36,0x62,0x36,0x62,0x36,0x62,
+ 0x36,0x62,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x20,0x63,0x20,0x23,0x37,0x62,
+ 0x37,0x62,0x37,0x33,0x37,0x33,0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,
+ 0x7a,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x34,0x35,0x22,0x2c,0x0a,
+ 0x22,0x78,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x37,0x33,0x37,
+ 0x33,0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,0x22,0x63,0x20,0x20,0x63,0x20,
+ 0x23,0x37,0x62,0x37,0x62,0x37,0x62,0x37,0x62,0x37,0x33,0x37,0x33,0x22,
+ 0x2c,0x0a,0x22,0x76,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x37,
+ 0x62,0x37,0x62,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x62,0x20,0x20,
+ 0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x38,0x34,0x38,0x34,0x37,0x62,0x37,
+ 0x62,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x20,0x63,0x20,0x23,0x38,0x63,0x38,
+ 0x63,0x37,0x62,0x37,0x62,0x30,0x38,0x30,0x38,0x22,0x2c,0x0a,0x22,0x6d,
+ 0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x37,0x62,0x37,0x62,0x31,
+ 0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x20,0x63,0x20,0x23,0x38,
+ 0x63,0x38,0x63,0x37,0x62,0x37,0x62,0x31,0x30,0x31,0x30,0x22,0x2c,0x0a,
+ 0x22,0x4e,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x37,0x62,0x37,
+ 0x62,0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,0x22,0x42,0x20,0x20,0x63,0x20,
+ 0x23,0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x31,0x38,0x31,0x38,0x22,
+ 0x2c,0x0a,0x22,0x56,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x38,
+ 0x34,0x38,0x34,0x30,0x38,0x30,0x38,0x22,0x2c,0x0a,0x22,0x43,0x20,0x20,
+ 0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x38,0x34,0x38,0x34,0x32,0x39,0x32,
+ 0x39,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,
+ 0x34,0x38,0x34,0x38,0x34,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x41,
+ 0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x38,0x34,0x38,0x34,0x32,
+ 0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x53,0x20,0x20,0x63,0x20,0x23,0x61,
+ 0x35,0x61,0x35,0x39,0x34,0x39,0x34,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,
+ 0x22,0x44,0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x39,0x63,0x39,
+ 0x63,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x46,0x20,0x20,0x63,0x20,
+ 0x23,0x62,0x35,0x62,0x35,0x61,0x35,0x61,0x35,0x30,0x38,0x30,0x38,0x22,
+ 0x2c,0x0a,0x22,0x47,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x61,
+ 0x35,0x61,0x35,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x48,0x20,0x20,
+ 0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x61,0x35,0x61,0x35,0x32,0x31,0x32,
+ 0x31,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,
+ 0x64,0x61,0x64,0x61,0x64,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x4b,
+ 0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x61,0x64,0x61,0x64,0x33,
+ 0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x4c,0x20,0x20,0x63,0x20,0x23,0x38,
+ 0x63,0x38,0x63,0x39,0x34,0x39,0x34,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,
+ 0x22,0x50,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x39,0x34,0x39,
+ 0x34,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x49,0x20,0x20,0x63,0x20,
+ 0x23,0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,0x35,0x32,0x35,0x32,0x22,
+ 0x2c,0x0a,0x22,0x55,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x39,
+ 0x63,0x39,0x63,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x59,0x20,0x20,
+ 0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x38,0x63,0x38,0x63,0x36,0x62,0x36,
+ 0x62,0x22,0x2c,0x0a,0x22,0x54,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,
+ 0x34,0x38,0x34,0x38,0x34,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x52,
+ 0x20,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x37,
+ 0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x45,0x20,0x20,0x63,0x20,0x23,0x39,
+ 0x63,0x39,0x63,0x39,0x63,0x39,0x63,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,
+ 0x22,0x57,0x20,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x63,0x39,
+ 0x63,0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,0x51,0x20,0x20,0x63,0x20,
+ 0x23,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x37,0x33,0x37,0x33,0x22,
+ 0x2c,0x0a,0x22,0x21,0x20,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x62,
+ 0x64,0x62,0x64,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x7e,0x20,0x20,
+ 0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x62,0x35,0x62,0x35,0x33,0x31,0x33,
+ 0x31,0x22,0x2c,0x0a,0x22,0x5e,0x20,0x20,0x63,0x20,0x23,0x63,0x36,0x63,
+ 0x36,0x62,0x35,0x62,0x35,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x2f,
+ 0x20,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x63,0x36,0x63,0x36,0x33,
+ 0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x28,0x20,0x20,0x63,0x20,0x23,0x64,
+ 0x36,0x64,0x36,0x63,0x36,0x63,0x36,0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,
+ 0x22,0x29,0x20,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x64,0x36,0x64,
+ 0x36,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x5f,0x20,0x20,0x63,0x20,
+ 0x23,0x66,0x37,0x66,0x37,0x64,0x65,0x64,0x65,0x31,0x38,0x31,0x38,0x22,
+ 0x2c,0x0a,0x22,0x60,0x20,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x64,
+ 0x36,0x64,0x36,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x27,0x20,0x20,
+ 0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x64,0x65,0x64,0x65,0x33,0x31,0x33,
+ 0x31,0x22,0x2c,0x0a,0x22,0x5d,0x20,0x20,0x63,0x20,0x23,0x65,0x66,0x65,
+ 0x66,0x64,0x65,0x64,0x65,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x5b,
+ 0x20,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x65,0x37,0x65,0x37,0x31,
+ 0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x7b,0x20,0x20,0x63,0x20,0x23,0x66,
+ 0x66,0x66,0x66,0x65,0x37,0x65,0x37,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,
+ 0x22,0x7d,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x38,0x34,0x38,
+ 0x34,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x7c,0x20,0x20,0x63,0x20,
+ 0x23,0x38,0x34,0x38,0x34,0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x22,
+ 0x2c,0x0a,0x22,0x20,0x2e,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x38,
+ 0x34,0x38,0x34,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x20,
+ 0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x38,0x63,0x38,0x63,0x38,0x34,0x38,
+ 0x34,0x22,0x2c,0x0a,0x22,0x58,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,
+ 0x35,0x35,0x22,0x2c,0x0a,0x22,0x6f,0x2e,0x20,0x63,0x20,0x23,0x39,0x34,
+ 0x39,0x34,0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,
+ 0x4f,0x2e,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,
+ 0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x2b,0x2e,0x20,0x63,0x20,0x23,
+ 0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,0x38,0x63,0x38,0x63,0x22,0x2c,
+ 0x0a,0x22,0x40,0x2e,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x34,
+ 0x39,0x34,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x23,0x2e,0x20,0x63,
+ 0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x63,0x39,0x63,0x38,0x63,0x38,0x63,
+ 0x22,0x2c,0x0a,0x22,0x24,0x2e,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,
+ 0x39,0x63,0x39,0x63,0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x25,0x2e,
+ 0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x36,0x31,0x22,0x2c,0x0a,0x22,0x26,
+ 0x2e,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x61,0x35,0x61,0x35,0x39,
+ 0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x2a,0x2e,0x20,0x63,0x20,0x23,0x39,
+ 0x63,0x39,0x63,0x61,0x64,0x61,0x64,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,
+ 0x22,0x3d,0x2e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x39,0x34,0x39,
+ 0x34,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x2d,0x2e,0x20,0x63,0x20,
+ 0x23,0x61,0x35,0x61,0x35,0x39,0x63,0x39,0x63,0x39,0x34,0x39,0x34,0x22,
+ 0x2c,0x0a,0x22,0x3b,0x2e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x39,
+ 0x63,0x39,0x63,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x3a,0x2e,0x20,
+ 0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x39,0x63,0x39,
+ 0x63,0x22,0x2c,0x0a,0x22,0x3e,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,
+ 0x64,0x61,0x35,0x61,0x35,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x2c,
+ 0x2e,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x61,0x35,0x61,0x35,0x39,
+ 0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x3c,0x2e,0x20,0x63,0x20,0x23,0x61,
+ 0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,
+ 0x22,0x31,0x2e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x61,0x64,0x61,
+ 0x64,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x20,0x63,0x20,
+ 0x23,0x61,0x35,0x61,0x35,0x61,0x64,0x61,0x64,0x61,0x64,0x61,0x64,0x22,
+ 0x2c,0x0a,0x22,0x33,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x61,
+ 0x64,0x61,0x64,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x34,0x2e,0x20,
+ 0x63,0x20,0x47,0x72,0x61,0x79,0x36,0x38,0x22,0x2c,0x0a,0x22,0x35,0x2e,
+ 0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x62,0x35,0x62,0x35,0x61,0x64,
+ 0x61,0x64,0x22,0x2c,0x0a,0x22,0x36,0x2e,0x20,0x63,0x20,0x23,0x61,0x35,
+ 0x61,0x35,0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,
+ 0x37,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x62,0x35,0x62,0x35,
+ 0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x38,0x2e,0x20,0x63,0x20,0x23,
+ 0x62,0x35,0x62,0x35,0x61,0x64,0x61,0x64,0x61,0x35,0x61,0x35,0x22,0x2c,
+ 0x0a,0x22,0x39,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x31,0x22,
+ 0x2c,0x0a,0x22,0x30,0x2e,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x62,
+ 0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x71,0x2e,0x20,
+ 0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x62,0x35,0x62,
+ 0x35,0x22,0x2c,0x0a,0x22,0x77,0x2e,0x20,0x63,0x20,0x23,0x62,0x64,0x62,
+ 0x64,0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x65,
+ 0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x34,0x22,0x2c,0x0a,0x22,
+ 0x72,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x63,0x36,0x63,0x36,
+ 0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x74,0x2e,0x20,0x63,0x20,0x23,
+ 0x62,0x64,0x62,0x64,0x63,0x36,0x63,0x36,0x62,0x64,0x62,0x64,0x22,0x2c,
+ 0x0a,0x22,0x79,0x2e,0x20,0x63,0x20,0x23,0x63,0x30,0x63,0x30,0x63,0x30,
+ 0x63,0x30,0x63,0x30,0x63,0x30,0x22,0x2c,0x0a,0x22,0x75,0x2e,0x20,0x63,
+ 0x20,0x23,0x63,0x36,0x63,0x36,0x64,0x36,0x64,0x36,0x63,0x65,0x63,0x65,
+ 0x22,0x2c,0x0a,0x22,0x69,0x2e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,
+ 0x64,0x65,0x64,0x65,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x70,0x2e,
+ 0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x64,0x65,0x64,0x65,0x64,0x36,
+ 0x64,0x36,0x22,0x2c,0x0a,0x22,0x61,0x2e,0x20,0x63,0x20,0x23,0x64,0x36,
+ 0x64,0x36,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,
+ 0x73,0x2e,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,
+ 0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x33,0x2e,0x25,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x39,0x2e,0x65,0x2e,0x7c,0x20,
+ 0x34,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x65,0x2e,
+ 0x3a,0x2e,0x70,0x2e,0x26,0x2e,0x67,0x20,0x65,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x3c,0x2e,0x32,0x2e,0x35,0x2e,0x52,0x20,0x74,0x20,
+ 0x7d,0x20,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x39,0x2e,0x26,0x2e,0x36,0x2e,
+ 0x26,0x2e,0x20,0x2e,0x64,0x20,0x74,0x20,0x25,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x65,0x2e,
+ 0x3b,0x2e,0x3e,0x2e,0x31,0x2e,0x69,0x2e,0x26,0x2e,0x6c,0x20,0x70,0x20,
+ 0x79,0x20,0x39,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x25,0x2e,0x2d,0x2e,0x2d,0x2e,0x33,0x2e,0x61,0x2e,
+ 0x3e,0x2e,0x4e,0x20,0x73,0x20,0x65,0x20,0x64,0x20,0x65,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x34,0x2e,0x7c,0x20,0x36,0x2e,
+ 0x74,0x2e,0x32,0x2e,0x3a,0x2e,0x3a,0x2e,0x4e,0x20,0x69,0x20,0x61,0x20,
+ 0x77,0x20,0x58,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x65,0x2e,
+ 0x2b,0x2e,0x2a,0x2e,0x72,0x2e,0x35,0x2e,0x31,0x2e,0x25,0x2e,0x2e,0x2e,
+ 0x62,0x20,0x73,0x20,0x66,0x20,0x61,0x20,0x3d,0x20,0x3c,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x65,0x2e,0x24,0x2e,0x3d,0x2e,0x3e,0x2e,0x40,0x2e,0x3b,0x2e,
+ 0x30,0x2e,0x75,0x2e,0x2d,0x2e,0x3a,0x2e,0x6b,0x20,0x6a,0x20,0x75,0x20,
+ 0x2a,0x20,0x72,0x20,0x39,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x34,0x2e,0x6f,0x2e,0x31,0x2e,
+ 0x38,0x2e,0x3e,0x2e,0x33,0x2e,0x75,0x2e,0x61,0x2e,0x2c,0x2e,0x38,0x2e,
+ 0x78,0x20,0x67,0x20,0x67,0x20,0x79,0x20,0x3d,0x20,0x7d,0x20,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x65,0x2e,0x37,0x2e,0x31,0x2e,0x76,0x20,0x6b,0x20,0x7a,0x20,0x62,0x20,
+ 0x54,0x20,0x52,0x20,0x63,0x20,0x73,0x20,0x3a,0x20,0x2a,0x20,0x7a,0x20,
+ 0x34,0x2e,0x65,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x39,0x2e,0x34,0x20,
+ 0x31,0x20,0x2d,0x20,0x24,0x20,0x2b,0x20,0x4f,0x20,0x4f,0x20,0x2e,0x20,
+ 0x4f,0x20,0x58,0x20,0x63,0x20,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x77,0x2e,0x21,0x20,0x5b,0x20,0x5d,0x20,0x60,0x20,0x2f,0x20,
+ 0x44,0x20,0x4d,0x20,0x32,0x20,0x40,0x20,0x4f,0x20,0x63,0x20,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x65,0x2e,0x7e,0x20,0x29,0x20,
+ 0x27,0x20,0x5d,0x20,0x5d,0x20,0x28,0x20,0x48,0x20,0x56,0x20,0x33,0x20,
+ 0x40,0x20,0x63,0x20,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x65,0x2e,0x7e,0x20,0x29,0x20,0x27,0x20,0x4b,0x20,0x41,0x20,0x53,0x20,
+ 0x47,0x20,0x4d,0x20,0x31,0x20,0x40,0x20,0x76,0x20,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x65,0x2e,0x5e,0x20,0x5f,0x20,0x44,0x20,
+ 0x4f,0x20,0x20,0x20,0x4f,0x20,0x34,0x20,0x6e,0x20,0x32,0x20,0x24,0x20,
+ 0x54,0x20,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x71,0x2e,
+ 0x4a,0x20,0x5f,0x20,0x6d,0x20,0x20,0x20,0x4f,0x20,0x58,0x20,0x40,0x20,
+ 0x4d,0x20,0x33,0x20,0x23,0x20,0x3e,0x20,0x68,0x20,0x76,0x20,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x65,0x2e,0x59,0x20,0x46,0x20,0x7b,0x20,0x42,0x20,0x20,0x20,
+ 0x58,0x20,0x20,0x20,0x25,0x20,0x4d,0x20,0x33,0x20,0x40,0x20,0x2e,0x20,
+ 0x4f,0x20,0x2c,0x20,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x73,0x2e,0x73,0x2e,0x73,0x2e,0x74,0x2e,0x4f,0x2e,0x36,0x20,0x42,0x20,
+ 0x29,0x20,0x42,0x20,0x6f,0x20,0x26,0x20,0x3c,0x20,0x30,0x20,0x6e,0x20,
+ 0x32,0x20,0x2d,0x20,0x3b,0x20,0x39,0x20,0x59,0x20,0x73,0x2e,0x73,0x2e,
+ 0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x23,0x2e,
+ 0x37,0x20,0x39,0x20,0x71,0x20,0x43,0x20,0x43,0x20,0x38,0x20,0x39,0x20,
+ 0x39,0x20,0x39,0x20,0x35,0x20,0x38,0x20,0x71,0x20,0x43,0x20,0x71,0x20,
+ 0x4f,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,
+ 0x73,0x2e,0x73,0x2e,0x51,0x20,0x57,0x20,0x57,0x20,0x57,0x20,0x45,0x20,
+ 0x45,0x20,0x55,0x20,0x55,0x20,0x4c,0x20,0x49,0x20,0x4c,0x20,0x50,0x20,
+ 0x50,0x20,0x50,0x20,0x5a,0x20,0x3a,0x2e,0x73,0x2e,0x73,0x2e,0x73,0x2e,
+ 0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_image_xpm_len = 5406;
+static const unsigned char small_image_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x39,0x38,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x63,
+ 0x20,0x47,0x72,0x61,0x79,0x33,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x20,0x63,
+ 0x20,0x23,0x30,0x38,0x30,0x38,0x30,0x38,0x30,0x38,0x31,0x30,0x31,0x30,
+ 0x22,0x2c,0x0a,0x22,0x58,0x20,0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,
+ 0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x22,0x2c,0x0a,0x22,0x6f,0x20,
+ 0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,0x31,0x38,0x31,0x38,0x31,0x38,
+ 0x31,0x38,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x20,0x63,0x20,0x23,0x31,0x38,
+ 0x31,0x38,0x31,0x38,0x31,0x38,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,
+ 0x2b,0x20,0x20,0x63,0x20,0x23,0x31,0x38,0x31,0x38,0x31,0x38,0x31,0x38,
+ 0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x40,0x20,0x20,0x63,0x20,0x23,
+ 0x31,0x38,0x31,0x38,0x32,0x31,0x32,0x31,0x32,0x31,0x32,0x31,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x20,0x63,0x20,0x23,0x31,0x38,0x31,0x38,0x32,0x31,
+ 0x32,0x31,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x24,0x20,0x20,0x63,
+ 0x20,0x23,0x32,0x39,0x32,0x39,0x32,0x31,0x32,0x31,0x31,0x30,0x31,0x30,
+ 0x22,0x2c,0x0a,0x22,0x25,0x20,0x20,0x63,0x20,0x23,0x32,0x39,0x32,0x39,
+ 0x32,0x31,0x32,0x31,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x26,0x20,
+ 0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x33,0x22,0x2c,0x0a,0x22,0x2a,
+ 0x20,0x20,0x63,0x20,0x23,0x32,0x31,0x32,0x31,0x32,0x31,0x32,0x31,0x32,
+ 0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x31,0x36,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x20,0x63,0x20,0x23,
+ 0x33,0x31,0x33,0x31,0x33,0x31,0x33,0x31,0x33,0x31,0x33,0x31,0x22,0x2c,
+ 0x0a,0x22,0x3b,0x20,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x33,0x39,
+ 0x33,0x39,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x3a,0x20,0x20,0x63,
+ 0x20,0x23,0x33,0x39,0x33,0x39,0x34,0x32,0x34,0x32,0x34,0x32,0x34,0x32,
+ 0x22,0x2c,0x0a,0x22,0x3e,0x20,0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,
+ 0x33,0x31,0x33,0x31,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x2c,0x20,
+ 0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,0x34,0x32,0x34,0x32,0x33,0x31,
+ 0x33,0x31,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x20,0x63,0x20,0x23,0x34,0x32,
+ 0x34,0x32,0x34,0x32,0x34,0x32,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,
+ 0x31,0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x34,0x32,0x34,0x32,
+ 0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x32,0x20,0x20,0x63,0x20,0x23,
+ 0x34,0x61,0x34,0x61,0x34,0x61,0x34,0x61,0x33,0x31,0x33,0x31,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x34,0x61,
+ 0x34,0x61,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x34,0x20,0x20,0x63,
+ 0x20,0x23,0x36,0x33,0x36,0x33,0x35,0x61,0x35,0x61,0x33,0x39,0x33,0x39,
+ 0x22,0x2c,0x0a,0x22,0x35,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,
+ 0x35,0x61,0x35,0x61,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x36,0x20,
+ 0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x34,0x61,0x34,0x61,0x34,0x32,
+ 0x34,0x32,0x22,0x2c,0x0a,0x22,0x37,0x20,0x20,0x63,0x20,0x47,0x72,0x61,
+ 0x79,0x32,0x39,0x22,0x2c,0x0a,0x22,0x38,0x20,0x20,0x63,0x20,0x23,0x35,
+ 0x32,0x35,0x32,0x34,0x61,0x34,0x61,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,
+ 0x22,0x39,0x20,0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x34,0x61,0x34,
+ 0x61,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x30,0x20,0x20,0x63,0x20,
+ 0x23,0x35,0x61,0x35,0x61,0x35,0x32,0x35,0x32,0x34,0x61,0x34,0x61,0x22,
+ 0x2c,0x0a,0x22,0x71,0x20,0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x35,
+ 0x61,0x35,0x61,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x77,0x20,0x20,
+ 0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x34,0x61,0x34,
+ 0x61,0x22,0x2c,0x0a,0x22,0x65,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,
+ 0x33,0x32,0x22,0x2c,0x0a,0x22,0x72,0x20,0x20,0x63,0x20,0x23,0x35,0x61,
+ 0x35,0x61,0x35,0x32,0x35,0x32,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,
+ 0x74,0x20,0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,
+ 0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x79,0x20,0x20,0x63,0x20,0x23,
+ 0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x22,0x2c,
+ 0x0a,0x22,0x75,0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x35,0x32,
+ 0x35,0x32,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x69,0x20,0x20,0x63,
+ 0x20,0x23,0x36,0x33,0x36,0x33,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,
+ 0x22,0x2c,0x0a,0x22,0x70,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,
+ 0x36,0x62,0x36,0x62,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x61,0x20,
+ 0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x36,0x33,0x36,0x33,0x35,0x61,
+ 0x35,0x61,0x22,0x2c,0x0a,0x22,0x73,0x20,0x20,0x63,0x20,0x23,0x37,0x62,
+ 0x37,0x62,0x37,0x33,0x37,0x33,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,
+ 0x64,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x33,0x39,0x22,0x2c,0x0a,
+ 0x22,0x66,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x36,0x33,0x36,
+ 0x33,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x67,0x20,0x20,0x63,0x20,
+ 0x23,0x36,0x62,0x36,0x62,0x36,0x62,0x36,0x62,0x36,0x33,0x36,0x33,0x22,
+ 0x2c,0x0a,0x22,0x68,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x34,0x32,
+ 0x22,0x2c,0x0a,0x22,0x6a,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,
+ 0x37,0x33,0x37,0x33,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x6b,0x20,
+ 0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x36,0x62,0x36,0x62,0x36,0x33,
+ 0x36,0x33,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x20,0x63,0x20,0x23,0x37,0x33,
+ 0x37,0x33,0x36,0x62,0x36,0x62,0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,
+ 0x7a,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x37,0x33,0x37,0x33,
+ 0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,0x78,0x20,0x20,0x63,0x20,0x23,
+ 0x37,0x62,0x37,0x62,0x37,0x33,0x37,0x33,0x37,0x33,0x37,0x33,0x22,0x2c,
+ 0x0a,0x22,0x63,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x37,0x62,
+ 0x37,0x62,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x76,0x20,0x20,0x63,
+ 0x20,0x23,0x36,0x62,0x36,0x62,0x37,0x33,0x37,0x33,0x38,0x34,0x38,0x34,
+ 0x22,0x2c,0x0a,0x22,0x62,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,
+ 0x37,0x62,0x37,0x62,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x6e,0x20,
+ 0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x37,0x33,0x37,0x33,0x35,0x32,
+ 0x35,0x32,0x22,0x2c,0x0a,0x22,0x6d,0x20,0x20,0x63,0x20,0x23,0x62,0x35,
+ 0x62,0x35,0x37,0x62,0x37,0x62,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,
+ 0x4d,0x20,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x38,0x34,0x38,0x34,
+ 0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x4e,0x20,0x20,0x63,0x20,0x23,
+ 0x39,0x63,0x39,0x63,0x38,0x34,0x38,0x34,0x35,0x61,0x35,0x61,0x22,0x2c,
+ 0x0a,0x22,0x42,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x38,0x34,
+ 0x38,0x34,0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,0x56,0x20,0x20,0x63,
+ 0x20,0x23,0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x36,0x62,0x36,0x62,
+ 0x22,0x2c,0x0a,0x22,0x43,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,
+ 0x38,0x34,0x38,0x34,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x5a,0x20,
+ 0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x38,0x63,0x38,0x63,0x37,0x62,
+ 0x37,0x62,0x22,0x2c,0x0a,0x22,0x41,0x20,0x20,0x63,0x20,0x23,0x39,0x63,
+ 0x39,0x63,0x38,0x63,0x38,0x63,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,
+ 0x53,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,
+ 0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,0x22,0x44,0x20,0x20,0x63,0x20,0x23,
+ 0x39,0x63,0x39,0x63,0x61,0x35,0x61,0x35,0x37,0x62,0x37,0x62,0x22,0x2c,
+ 0x0a,0x22,0x46,0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x38,0x34,
+ 0x38,0x34,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x47,0x20,0x20,0x63,
+ 0x20,0x23,0x62,0x64,0x62,0x64,0x38,0x63,0x38,0x63,0x35,0x61,0x35,0x61,
+ 0x22,0x2c,0x0a,0x22,0x48,0x20,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,
+ 0x38,0x63,0x38,0x63,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x4a,0x20,
+ 0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x38,0x63,0x38,0x63,0x36,0x33,
+ 0x36,0x33,0x22,0x2c,0x0a,0x22,0x4b,0x20,0x20,0x63,0x20,0x23,0x61,0x64,
+ 0x61,0x64,0x39,0x63,0x39,0x63,0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,
+ 0x4c,0x20,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x39,0x63,0x39,0x63,
+ 0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x50,0x20,0x20,0x63,0x20,0x23,
+ 0x62,0x64,0x62,0x64,0x61,0x35,0x61,0x35,0x36,0x62,0x36,0x62,0x22,0x2c,
+ 0x0a,0x22,0x49,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x61,0x35,
+ 0x61,0x35,0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,0x22,0x55,0x20,0x20,0x63,
+ 0x20,0x23,0x62,0x64,0x62,0x64,0x61,0x64,0x61,0x64,0x37,0x33,0x37,0x33,
+ 0x22,0x2c,0x0a,0x22,0x59,0x20,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,
+ 0x61,0x35,0x61,0x35,0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,0x54,0x20,
+ 0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x61,0x64,0x61,0x64,0x36,0x62,
+ 0x36,0x62,0x22,0x2c,0x0a,0x22,0x52,0x20,0x20,0x63,0x20,0x23,0x63,0x36,
+ 0x63,0x36,0x61,0x64,0x61,0x64,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,
+ 0x45,0x20,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x61,0x64,0x61,0x64,
+ 0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x57,0x20,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x62,0x35,0x62,0x35,0x37,0x33,0x37,0x33,0x22,0x2c,
+ 0x0a,0x22,0x51,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x38,0x34,
+ 0x38,0x34,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x21,0x20,0x20,0x63,
+ 0x20,0x23,0x38,0x34,0x38,0x34,0x38,0x34,0x38,0x34,0x38,0x63,0x38,0x63,
+ 0x22,0x2c,0x0a,0x22,0x7e,0x20,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,
+ 0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x5e,0x20,
+ 0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x38,0x63,0x38,0x63,0x39,0x34,
+ 0x39,0x34,0x22,0x2c,0x0a,0x22,0x2f,0x20,0x20,0x63,0x20,0x23,0x38,0x63,
+ 0x38,0x63,0x39,0x34,0x39,0x34,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,
+ 0x28,0x20,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x39,0x34,0x39,0x34,
+ 0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x29,0x20,0x20,0x63,0x20,0x23,
+ 0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,0x38,0x63,0x38,0x63,0x22,0x2c,
+ 0x0a,0x22,0x5f,0x20,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x63,
+ 0x39,0x63,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x60,0x20,0x20,0x63,
+ 0x20,0x23,0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x63,0x39,0x63,
+ 0x22,0x2c,0x0a,0x22,0x27,0x20,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,
+ 0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x5d,0x20,
+ 0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x36,0x31,0x22,0x2c,0x0a,0x22,0x5b,
+ 0x20,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x61,0x35,0x61,0x35,0x61,
+ 0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,0x7b,0x20,0x20,0x63,0x20,0x23,0x39,
+ 0x63,0x39,0x63,0x61,0x35,0x61,0x35,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,
+ 0x22,0x7d,0x20,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x39,0x34,0x39,
+ 0x34,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x7c,0x20,0x20,0x63,0x20,
+ 0x23,0x61,0x35,0x61,0x35,0x39,0x63,0x39,0x63,0x38,0x63,0x38,0x63,0x22,
+ 0x2c,0x0a,0x22,0x20,0x2e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x39,
+ 0x63,0x39,0x63,0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x20,
+ 0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x39,0x63,0x39,0x63,0x39,0x63,0x39,
+ 0x63,0x22,0x2c,0x0a,0x22,0x58,0x2e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,
+ 0x35,0x61,0x35,0x61,0x35,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x6f,
+ 0x2e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x39,
+ 0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x4f,0x2e,0x20,0x63,0x20,0x23,0x61,
+ 0x64,0x61,0x64,0x61,0x35,0x61,0x35,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,
+ 0x22,0x2b,0x2e,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x61,0x35,0x61,
+ 0x35,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x40,0x2e,0x20,0x63,0x20,
+ 0x23,0x62,0x64,0x62,0x64,0x61,0x64,0x61,0x64,0x39,0x34,0x39,0x34,0x22,
+ 0x2c,0x0a,0x22,0x23,0x2e,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x62,
+ 0x35,0x62,0x35,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x24,0x2e,0x20,
+ 0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,0x64,0x62,0x64,0x39,0x63,0x39,
+ 0x63,0x22,0x2c,0x0a,0x22,0x25,0x2e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,
+ 0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x26,
+ 0x2e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,
+ 0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,0x2a,0x2e,0x20,0x63,0x20,0x23,0x61,
+ 0x35,0x61,0x35,0x61,0x64,0x61,0x64,0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,
+ 0x22,0x3d,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x61,0x64,0x61,
+ 0x64,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x2d,0x2e,0x20,0x63,0x20,
+ 0x47,0x72,0x61,0x79,0x36,0x38,0x22,0x2c,0x0a,0x22,0x3b,0x2e,0x20,0x63,
+ 0x20,0x23,0x61,0x64,0x61,0x64,0x61,0x64,0x61,0x64,0x62,0x35,0x62,0x35,
+ 0x22,0x2c,0x0a,0x22,0x3a,0x2e,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,
+ 0x61,0x64,0x61,0x64,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x3e,0x2e,
+ 0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x61,0x64,0x61,0x64,0x61,0x64,
+ 0x61,0x64,0x22,0x2c,0x0a,0x22,0x2c,0x2e,0x20,0x63,0x20,0x23,0x62,0x35,
+ 0x62,0x35,0x62,0x35,0x62,0x35,0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,
+ 0x3c,0x2e,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,
+ 0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x31,0x2e,0x20,0x63,0x20,0x23,
+ 0x62,0x64,0x62,0x64,0x62,0x64,0x62,0x64,0x61,0x35,0x61,0x35,0x22,0x2c,
+ 0x0a,0x22,0x32,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x31,0x22,
+ 0x2c,0x0a,0x22,0x33,0x2e,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x62,
+ 0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x34,0x2e,0x20,
+ 0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x62,0x35,0x62,
+ 0x35,0x22,0x2c,0x0a,0x22,0x35,0x2e,0x20,0x63,0x20,0x23,0x62,0x64,0x62,
+ 0x64,0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x36,
+ 0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x34,0x22,0x2c,0x0a,0x22,
+ 0x37,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x62,0x64,0x62,0x64,
+ 0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x38,0x2e,0x20,0x63,0x20,0x23,
+ 0x62,0x35,0x62,0x35,0x62,0x64,0x62,0x64,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x39,0x2e,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x63,0x36,
+ 0x63,0x36,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x30,0x2e,0x20,0x63,
+ 0x20,0x23,0x62,0x64,0x62,0x64,0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,
+ 0x22,0x2c,0x0a,0x22,0x71,0x2e,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,
+ 0x62,0x35,0x62,0x35,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x77,0x2e,
+ 0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x62,0x64,0x62,0x64,0x38,0x34,
+ 0x38,0x34,0x22,0x2c,0x0a,0x22,0x65,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,
+ 0x64,0x65,0x62,0x64,0x62,0x64,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,
+ 0x72,0x2e,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x62,0x35,0x62,0x35,
+ 0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x74,0x2e,0x20,0x63,0x20,0x23,
+ 0x64,0x65,0x64,0x65,0x62,0x35,0x62,0x35,0x39,0x34,0x39,0x34,0x22,0x2c,
+ 0x0a,0x22,0x79,0x2e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x62,0x64,
+ 0x62,0x64,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x75,0x2e,0x20,0x63,
+ 0x20,0x23,0x63,0x65,0x63,0x65,0x62,0x64,0x62,0x64,0x61,0x35,0x61,0x35,
+ 0x22,0x2c,0x0a,0x22,0x69,0x2e,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,
+ 0x62,0x35,0x62,0x35,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x70,0x2e,
+ 0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x62,0x64,0x62,0x64,0x38,0x34,
+ 0x38,0x34,0x22,0x2c,0x0a,0x22,0x61,0x2e,0x20,0x63,0x20,0x23,0x65,0x66,
+ 0x65,0x66,0x62,0x64,0x62,0x64,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,
+ 0x73,0x2e,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x62,0x35,0x62,0x35,
+ 0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x64,0x2e,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x62,0x64,0x62,0x64,0x39,0x34,0x39,0x34,0x22,0x2c,
+ 0x0a,0x22,0x66,0x2e,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x62,0x64,
+ 0x62,0x64,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x67,0x2e,0x20,0x63,
+ 0x20,0x23,0x66,0x37,0x66,0x37,0x62,0x64,0x62,0x64,0x38,0x63,0x38,0x63,
+ 0x22,0x2c,0x0a,0x22,0x68,0x2e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,
+ 0x63,0x36,0x63,0x36,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x6a,0x2e,
+ 0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x63,0x36,0x63,0x36,0x38,0x63,
+ 0x38,0x63,0x22,0x2c,0x0a,0x22,0x6b,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,
+ 0x64,0x65,0x64,0x36,0x64,0x36,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,
+ 0x6c,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x36,0x64,0x36,
+ 0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x7a,0x2e,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x61,0x64,0x61,0x64,0x22,0x2c,
+ 0x0a,0x22,0x78,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x65,
+ 0x64,0x65,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x63,0x2e,0x20,0x63,
+ 0x20,0x23,0x65,0x66,0x65,0x66,0x63,0x36,0x63,0x36,0x38,0x63,0x38,0x63,
+ 0x22,0x2c,0x0a,0x22,0x76,0x2e,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,
+ 0x63,0x36,0x63,0x36,0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x62,0x2e,
+ 0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x64,0x65,0x64,0x65,0x39,0x34,
+ 0x39,0x34,0x22,0x2c,0x0a,0x22,0x6e,0x2e,0x20,0x63,0x20,0x23,0x65,0x37,
+ 0x65,0x37,0x64,0x65,0x64,0x65,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,
+ 0x6d,0x2e,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x63,0x65,0x63,0x65,
+ 0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x4d,0x2e,0x20,0x63,0x20,0x23,
+ 0x66,0x37,0x66,0x37,0x64,0x36,0x64,0x36,0x39,0x63,0x39,0x63,0x22,0x2c,
+ 0x0a,0x22,0x4e,0x2e,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x64,0x65,
+ 0x64,0x65,0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,0x42,0x2e,0x20,0x63,
+ 0x20,0x23,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x61,0x35,0x61,0x35,
+ 0x22,0x2c,0x0a,0x22,0x56,0x2e,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,
+ 0x65,0x37,0x65,0x37,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x43,0x2e,
+ 0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x65,0x37,0x65,0x37,0x61,0x64,
+ 0x61,0x64,0x22,0x2c,0x0a,0x22,0x5a,0x2e,0x20,0x63,0x20,0x23,0x65,0x66,
+ 0x65,0x66,0x65,0x66,0x65,0x66,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,
+ 0x41,0x2e,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x65,0x66,0x65,0x66,
+ 0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x53,0x2e,0x20,0x63,0x20,0x23,
+ 0x66,0x37,0x66,0x37,0x65,0x66,0x65,0x66,0x61,0x64,0x61,0x64,0x22,0x2c,
+ 0x0a,0x22,0x44,0x2e,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x65,0x66,
+ 0x65,0x66,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x46,0x2e,0x20,0x63,
+ 0x20,0x23,0x66,0x37,0x66,0x37,0x66,0x37,0x66,0x37,0x62,0x35,0x62,0x35,
+ 0x22,0x2c,0x0a,0x22,0x47,0x2e,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,
+ 0x66,0x37,0x66,0x37,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x48,0x2e,
+ 0x20,0x63,0x20,0x23,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,
+ 0x63,0x30,0x22,0x2c,0x0a,0x22,0x4a,0x2e,0x20,0x63,0x20,0x23,0x63,0x36,
+ 0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,
+ 0x4b,0x2e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,
+ 0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x4c,0x2e,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x22,0x2c,
+ 0x0a,0x22,0x50,0x2e,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x63,0x36,
+ 0x63,0x36,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x49,0x2e,0x20,0x63,
+ 0x20,0x23,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x36,0x63,0x36,
+ 0x22,0x2c,0x0a,0x22,0x55,0x2e,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,
+ 0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x59,0x2e,
+ 0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x64,0x36,0x64,0x36,0x63,0x65,
+ 0x63,0x65,0x22,0x2c,0x0a,0x22,0x54,0x2e,0x20,0x63,0x20,0x23,0x63,0x65,
+ 0x63,0x65,0x64,0x36,0x64,0x36,0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,0x22,
+ 0x52,0x2e,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x63,0x65,0x63,0x65,
+ 0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x45,0x2e,0x20,0x63,0x20,0x23,
+ 0x64,0x36,0x64,0x36,0x64,0x36,0x64,0x36,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x57,0x2e,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x64,0x36,
+ 0x64,0x36,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x51,0x2e,0x20,0x63,
+ 0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x36,0x64,0x36,0x63,0x36,0x63,0x36,
+ 0x22,0x2c,0x0a,0x22,0x21,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,
+ 0x64,0x36,0x64,0x36,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x7e,0x2e,
+ 0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x65,0x64,0x65,0x63,0x36,
+ 0x63,0x36,0x22,0x2c,0x0a,0x22,0x5e,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,
+ 0x79,0x38,0x34,0x22,0x2c,0x0a,0x22,0x2f,0x2e,0x20,0x63,0x20,0x23,0x64,
+ 0x36,0x64,0x36,0x64,0x65,0x64,0x65,0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,
+ 0x22,0x28,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x36,0x64,
+ 0x36,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x29,0x2e,0x20,0x63,0x20,
+ 0x23,0x64,0x65,0x64,0x65,0x64,0x65,0x64,0x65,0x64,0x36,0x64,0x36,0x22,
+ 0x2c,0x0a,0x22,0x5f,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x38,0x37,
+ 0x22,0x2c,0x0a,0x22,0x60,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,
+ 0x64,0x65,0x64,0x65,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x27,0x2e,
+ 0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x64,0x65,
+ 0x64,0x65,0x22,0x2c,0x0a,0x22,0x5d,0x2e,0x20,0x63,0x20,0x23,0x65,0x66,
+ 0x65,0x66,0x65,0x37,0x65,0x37,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,
+ 0x5b,0x2e,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x65,0x37,0x65,0x37,
+ 0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,0x22,0x7b,0x2e,0x20,0x63,0x20,0x23,
+ 0x66,0x37,0x66,0x37,0x66,0x37,0x66,0x37,0x64,0x36,0x64,0x36,0x22,0x2c,
+ 0x0a,0x22,0x7d,0x2e,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x66,0x66,
+ 0x66,0x66,0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,0x22,0x7c,0x2e,0x20,0x63,
+ 0x20,0x23,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,
+ 0x22,0x2c,0x0a,0x22,0x20,0x58,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,
+ 0x65,0x37,0x65,0x37,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x2e,0x58,
+ 0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x65,0x66,0x65,0x66,0x65,0x66,
+ 0x65,0x66,0x22,0x2c,0x0a,0x22,0x58,0x58,0x20,0x63,0x20,0x23,0x65,0x66,
+ 0x65,0x66,0x65,0x66,0x65,0x66,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x58,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x65,0x66,0x65,0x66,
+ 0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x4f,0x58,0x20,0x63,0x20,0x23,
+ 0x65,0x66,0x65,0x66,0x65,0x66,0x65,0x66,0x66,0x37,0x66,0x37,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x58,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x66,0x37,
+ 0x66,0x37,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x40,0x58,0x20,0x63,
+ 0x20,0x23,0x66,0x37,0x66,0x37,0x65,0x66,0x65,0x66,0x65,0x66,0x65,0x66,
+ 0x22,0x2c,0x0a,0x22,0x23,0x58,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x39,
+ 0x37,0x22,0x2c,0x0a,0x22,0x24,0x58,0x20,0x63,0x20,0x23,0x66,0x37,0x66,
+ 0x37,0x66,0x37,0x66,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x25,
+ 0x58,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x66,0x66,0x66,0x66,0x66,
+ 0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x26,0x58,0x20,0x63,0x20,0x23,0x66,
+ 0x66,0x66,0x66,0x66,0x37,0x66,0x37,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,
+ 0x22,0x2a,0x58,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
+ 0x66,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x3d,0x58,0x20,0x63,0x20,
+ 0x47,0x72,0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,0x22,0x2d,0x58,0x20,
+ 0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,
+ 0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x75,0x2e,0x63,0x2e,0x6e,
+ 0x2e,0x78,0x2e,0x42,0x2e,0x41,0x2e,0x41,0x2e,0x53,0x2e,0x44,0x2e,0x46,
+ 0x2e,0x47,0x2e,0x46,0x2e,0x53,0x2e,0x4d,0x2e,0x70,0x2e,0x67,0x2e,0x5a,
+ 0x2e,0x56,0x2e,0x42,0x2e,0x6e,0x2e,0x5a,0x2e,0x4e,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x72,0x2e,0x57,0x20,0x3c,0x20,0x30,0x20,0x5a,0x20,0x52,0x2e,0x57,
+ 0x2e,0x3d,0x2e,0x45,0x2e,0x3b,0x2e,0x5f,0x20,0x21,0x2e,0x57,0x2e,0x5d,
+ 0x2e,0x5b,0x2e,0x5b,0x2e,0x5b,0x2e,0x27,0x2e,0x59,0x2e,0x2f,0x20,0x44,
+ 0x20,0x43,0x2e,0x22,0x2c,0x0a,0x22,0x74,0x2e,0x55,0x20,0x40,0x20,0x2b,
+ 0x20,0x36,0x20,0x51,0x20,0x25,0x2e,0x32,0x2e,0x30,0x2e,0x32,0x2e,0x2d,
+ 0x2e,0x4a,0x2e,0x4b,0x2e,0x60,0x2e,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x3d,
+ 0x58,0x3d,0x58,0x4f,0x58,0x7e,0x2e,0x78,0x2e,0x22,0x2c,0x0a,0x22,0x73,
+ 0x2e,0x50,0x20,0x2a,0x20,0x4f,0x20,0x6b,0x20,0x5e,0x2e,0x26,0x58,0x23,
+ 0x58,0x58,0x58,0x60,0x2e,0x5e,0x2e,0x4a,0x2e,0x33,0x2e,0x32,0x2e,0x29,
+ 0x2e,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x7d,0x2e,0x6e,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x74,0x2e,0x47,0x20,0x2a,0x20,0x26,0x20,0x3d,
+ 0x20,0x6b,0x20,0x57,0x2e,0x7c,0x2e,0x7c,0x2e,0x58,0x58,0x7c,0x2e,0x5e,
+ 0x2e,0x4a,0x2e,0x26,0x2e,0x5d,0x20,0x51,0x20,0x7e,0x20,0x3e,0x2e,0x5e,
+ 0x2e,0x58,0x58,0x7b,0x2e,0x6c,0x2e,0x22,0x2c,0x0a,0x22,0x73,0x2e,0x6d,
+ 0x20,0x2a,0x20,0x4f,0x20,0x4f,0x20,0x2d,0x20,0x37,0x20,0x65,0x20,0x6c,
+ 0x20,0x2e,0x2e,0x49,0x2e,0x3d,0x58,0x3d,0x58,0x2b,0x58,0x4a,0x2e,0x6a,
+ 0x20,0x2b,0x20,0x20,0x20,0x58,0x20,0x2b,0x20,0x73,0x20,0x56,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x64,0x2e,0x4a,0x20,0x25,0x20,0x51,0x20,0x21,0x20,0x72,
+ 0x20,0x63,0x20,0x7a,0x20,0x2d,0x2e,0x2a,0x2e,0x78,0x20,0x5b,0x2e,0x3d,
+ 0x58,0x58,0x58,0x5e,0x2e,0x4c,0x2e,0x60,0x20,0x35,0x2e,0x28,0x20,0x3a,
+ 0x20,0x71,0x20,0x6e,0x2e,0x22,0x2c,0x0a,0x22,0x76,0x2e,0x4a,0x20,0x6f,
+ 0x20,0x43,0x20,0x2a,0x58,0x2e,0x58,0x40,0x58,0x3d,0x58,0x3d,0x58,0x25,
+ 0x58,0x60,0x20,0x51,0x2e,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x3d,
+ 0x58,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x59,0x2e,0x42,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x61,0x2e,0x46,0x20,0x40,0x20,0x3d,0x20,0x6b,0x20,0x2c,0x2e,0x5e,
+ 0x2e,0x55,0x2e,0x3d,0x58,0x37,0x2e,0x37,0x20,0x51,0x2e,0x3d,0x58,0x3d,
+ 0x58,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x24,0x58,0x39,
+ 0x2e,0x6c,0x2e,0x22,0x2c,0x0a,0x22,0x67,0x2e,0x6e,0x20,0x40,0x20,0x26,
+ 0x20,0x72,0x20,0x3a,0x2e,0x5f,0x2e,0x30,0x2e,0x55,0x2e,0x75,0x20,0x25,
+ 0x20,0x20,0x2e,0x2f,0x2e,0x36,0x2e,0x29,0x2e,0x3d,0x58,0x3d,0x58,0x3d,
+ 0x58,0x3d,0x58,0x6f,0x58,0x7e,0x20,0x6b,0x2e,0x22,0x2c,0x0a,0x22,0x69,
+ 0x2e,0x4e,0x20,0x2e,0x20,0x61,0x20,0x40,0x58,0x25,0x58,0x20,0x58,0x36,
+ 0x2e,0x2d,0x2e,0x6a,0x20,0x64,0x20,0x69,0x20,0x4f,0x2e,0x7c,0x2e,0x26,
+ 0x58,0x3d,0x58,0x3d,0x58,0x2b,0x58,0x23,0x58,0x7b,0x20,0x77,0x20,0x62,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x66,0x2e,0x4d,0x20,0x38,0x20,0x21,0x2e,0x25,
+ 0x58,0x5d,0x20,0x68,0x20,0x79,0x20,0x29,0x20,0x25,0x2e,0x6f,0x2e,0x23,
+ 0x58,0x3d,0x58,0x7c,0x2e,0x55,0x2e,0x4a,0x2e,0x55,0x2e,0x28,0x2e,0x5b,
+ 0x20,0x23,0x20,0x32,0x20,0x56,0x2e,0x22,0x2c,0x0a,0x22,0x66,0x2e,0x71,
+ 0x2e,0x29,0x2e,0x23,0x58,0x23,0x58,0x54,0x2e,0x21,0x20,0x52,0x2e,0x3d,
+ 0x58,0x3d,0x58,0x3b,0x2e,0x2e,0x2e,0x5e,0x20,0x65,0x20,0x66,0x20,0x7e,
+ 0x20,0x50,0x2e,0x7c,0x2e,0x7c,0x2e,0x76,0x20,0x2c,0x20,0x5a,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x6d,0x2e,0x4b,0x20,0x3a,0x20,0x78,0x20,0x34,0x2e,0x5b,
+ 0x20,0x5f,0x20,0x40,0x58,0x3d,0x58,0x3d,0x58,0x3d,0x58,0x25,0x58,0x24,
+ 0x58,0x60,0x2e,0x5b,0x20,0x68,0x20,0x3d,0x2e,0x38,0x2e,0x63,0x20,0x3b,
+ 0x20,0x33,0x20,0x4e,0x2e,0x22,0x2c,0x0a,0x22,0x59,0x20,0x4e,0x20,0x34,
+ 0x20,0x62,0x20,0x53,0x20,0x56,0x20,0x58,0x2e,0x24,0x2e,0x23,0x2e,0x3c,
+ 0x2e,0x7a,0x2e,0x79,0x2e,0x31,0x2e,0x7c,0x20,0x39,0x20,0x35,0x20,0x4c,
+ 0x20,0x7c,0x20,0x42,0x20,0x77,0x20,0x70,0x20,0x68,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x26,0x2e,0x25,0x2e,0x25,0x2e,0x25,0x2e,0x25,0x2e,0x25,0x2e,0x7e,
+ 0x20,0x24,0x20,0x51,0x20,0x25,0x2e,0x3c,0x20,0x31,0x20,0x25,0x2e,0x67,
+ 0x20,0x3e,0x20,0x27,0x20,0x2e,0x2e,0x5d,0x20,0x5d,0x20,0x5d,0x20,0x5d,
+ 0x20,0x6f,0x2e,0x22,0x2c,0x0a,0x22,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,
+ 0x58,0x2d,0x58,0x2d,0x58,0x3c,0x2e,0x48,0x20,0x35,0x2e,0x2d,0x58,0x36,
+ 0x20,0x79,0x20,0x2d,0x58,0x3e,0x2e,0x54,0x20,0x3d,0x2e,0x2d,0x58,0x2d,
+ 0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x22,0x2c,0x0a,0x22,0x2d,
+ 0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x36,0x2e,0x6a,0x2e,0x7d,
+ 0x20,0x2d,0x58,0x2d,0x58,0x38,0x20,0x69,0x20,0x2d,0x58,0x36,0x2e,0x65,
+ 0x2e,0x40,0x2e,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,
+ 0x58,0x22,0x2c,0x0a,0x22,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,
+ 0x58,0x35,0x2e,0x57,0x20,0x25,0x2e,0x2d,0x58,0x2d,0x58,0x38,0x20,0x69,
+ 0x20,0x2d,0x58,0x2d,0x58,0x40,0x2e,0x57,0x20,0x36,0x2e,0x2d,0x58,0x2d,
+ 0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x22,0x2c,0x0a,0x22,0x2d,0x58,0x2d,
+ 0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x79,0x2e,0x49,0x20,0x32,0x2e,0x2d,
+ 0x58,0x2d,0x58,0x38,0x20,0x69,0x20,0x2d,0x58,0x2d,0x58,0x2c,0x2e,0x65,
+ 0x2e,0x3d,0x2e,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x22,
+ 0x2c,0x0a,0x22,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x36,0x2e,0x6a,
+ 0x2e,0x41,0x20,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x38,0x20,0x69,0x20,0x2d,
+ 0x58,0x2d,0x58,0x35,0x2e,0x77,0x2e,0x2b,0x2e,0x2d,0x58,0x2d,0x58,0x2d,
+ 0x58,0x2d,0x58,0x2d,0x58,0x22,0x2c,0x0a,0x22,0x2d,0x58,0x2d,0x58,0x2d,
+ 0x58,0x2d,0x58,0x35,0x2e,0x45,0x20,0x2e,0x2e,0x2d,0x58,0x2d,0x58,0x2d,
+ 0x58,0x74,0x20,0x67,0x20,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x40,0x2e,0x52,
+ 0x20,0x36,0x2e,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x2d,0x58,0x22,0x0a,0x7d,
+ 0x3b,0x0a
+};
+
+static const unsigned int small_layout_xpm_len = 3179;
+static const unsigned char small_layout_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x39,0x33,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x63,0x20,
+ 0x23,0x32,0x31,0x32,0x31,0x30,0x38,0x30,0x38,0x30,0x30,0x30,0x30,0x22,
+ 0x2c,0x0a,0x22,0x2e,0x20,0x20,0x63,0x20,0x23,0x32,0x39,0x32,0x39,0x30,
+ 0x38,0x30,0x38,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x58,0x20,0x20,
+ 0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x30,0x38,0x30,0x38,0x30,0x30,0x30,
+ 0x30,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x20,0x63,0x20,0x23,0x33,0x31,0x33,
+ 0x31,0x30,0x38,0x30,0x38,0x30,0x38,0x30,0x38,0x22,0x2c,0x0a,0x22,0x4f,
+ 0x20,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x31,0x30,0x31,0x30,0x30,
+ 0x38,0x30,0x38,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x20,0x63,0x20,0x23,0x33,
+ 0x31,0x33,0x31,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x22,0x2c,0x0a,
+ 0x22,0x40,0x20,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x31,0x38,0x31,
+ 0x38,0x31,0x30,0x31,0x30,0x22,0x2c,0x0a,0x22,0x23,0x20,0x20,0x63,0x20,
+ 0x23,0x33,0x39,0x33,0x39,0x31,0x38,0x31,0x38,0x31,0x30,0x31,0x30,0x22,
+ 0x2c,0x0a,0x22,0x24,0x20,0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,0x32,
+ 0x31,0x32,0x31,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x25,0x20,0x20,
+ 0x63,0x20,0x23,0x34,0x32,0x34,0x32,0x32,0x39,0x32,0x39,0x32,0x31,0x32,
+ 0x31,0x22,0x2c,0x0a,0x22,0x26,0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,
+ 0x61,0x33,0x31,0x33,0x31,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x2a,
+ 0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x33,0x31,0x33,0x31,0x33,
+ 0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x20,0x63,0x20,0x23,0x35,
+ 0x32,0x35,0x32,0x33,0x39,0x33,0x39,0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,
+ 0x22,0x2d,0x20,0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x31,0x30,0x31,
+ 0x30,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x20,0x63,0x20,
+ 0x23,0x36,0x62,0x36,0x62,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x22,
+ 0x2c,0x0a,0x22,0x3a,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x31,
+ 0x30,0x31,0x30,0x30,0x38,0x30,0x38,0x22,0x2c,0x0a,0x22,0x3e,0x20,0x20,
+ 0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x31,0x38,0x31,0x38,0x30,0x38,0x30,
+ 0x38,0x22,0x2c,0x0a,0x22,0x2c,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,
+ 0x33,0x31,0x38,0x31,0x38,0x30,0x38,0x30,0x38,0x22,0x2c,0x0a,0x22,0x3c,
+ 0x20,0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x32,0x31,0x32,0x31,0x31,
+ 0x30,0x31,0x30,0x22,0x2c,0x0a,0x22,0x31,0x20,0x20,0x63,0x20,0x23,0x36,
+ 0x62,0x36,0x62,0x32,0x31,0x32,0x31,0x31,0x30,0x31,0x30,0x22,0x2c,0x0a,
+ 0x22,0x32,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x32,0x39,0x32,
+ 0x39,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x33,0x20,0x20,0x63,0x20,
+ 0x23,0x37,0x33,0x37,0x33,0x32,0x31,0x32,0x31,0x31,0x30,0x31,0x30,0x22,
+ 0x2c,0x0a,0x22,0x34,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x33,
+ 0x31,0x33,0x31,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x35,0x20,0x20,
+ 0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x33,0x31,0x33,0x31,0x32,0x39,0x32,
+ 0x39,0x22,0x2c,0x0a,0x22,0x36,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,
+ 0x62,0x34,0x32,0x34,0x32,0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x37,
+ 0x20,0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x35,0x32,0x35,0x32,0x34,
+ 0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x38,0x20,0x20,0x63,0x20,0x23,0x37,
+ 0x33,0x37,0x33,0x36,0x33,0x36,0x33,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,
+ 0x22,0x39,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x33,0x39,0x33,
+ 0x39,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x30,0x20,0x20,0x63,0x20,
+ 0x23,0x62,0x35,0x62,0x35,0x33,0x39,0x33,0x39,0x32,0x39,0x32,0x39,0x22,
+ 0x2c,0x0a,0x22,0x71,0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x33,
+ 0x39,0x33,0x39,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x77,0x20,0x20,
+ 0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x33,0x39,0x33,0x39,0x32,0x39,0x32,
+ 0x39,0x22,0x2c,0x0a,0x22,0x65,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,
+ 0x34,0x34,0x32,0x34,0x32,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x72,
+ 0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x34,0x32,0x34,0x32,0x33,
+ 0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x74,0x20,0x20,0x63,0x20,0x23,0x62,
+ 0x64,0x62,0x64,0x34,0x32,0x34,0x32,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,
+ 0x22,0x79,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x34,0x32,0x34,
+ 0x32,0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x75,0x20,0x20,0x63,0x20,
+ 0x23,0x62,0x35,0x62,0x35,0x34,0x61,0x34,0x61,0x33,0x31,0x33,0x31,0x22,
+ 0x2c,0x0a,0x22,0x69,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x34,
+ 0x61,0x34,0x61,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x70,0x20,0x20,
+ 0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x34,0x32,0x34,0x32,0x33,0x31,0x33,
+ 0x31,0x22,0x2c,0x0a,0x22,0x61,0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,
+ 0x64,0x34,0x61,0x34,0x61,0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x73,
+ 0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x34,0x61,0x34,0x61,0x33,
+ 0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x64,0x20,0x20,0x63,0x20,0x23,0x38,
+ 0x63,0x38,0x63,0x35,0x32,0x35,0x32,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,
+ 0x22,0x66,0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x35,0x32,0x35,
+ 0x32,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x67,0x20,0x20,0x63,0x20,
+ 0x23,0x62,0x35,0x62,0x35,0x35,0x32,0x35,0x32,0x34,0x32,0x34,0x32,0x22,
+ 0x2c,0x0a,0x22,0x68,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x35,
+ 0x32,0x35,0x32,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x6a,0x20,0x20,
+ 0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x35,0x32,0x35,0x32,0x34,0x32,0x34,
+ 0x32,0x22,0x2c,0x0a,0x22,0x6b,0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,
+ 0x64,0x35,0x32,0x35,0x32,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x6c,
+ 0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x36,0x33,0x36,0x33,0x35,
+ 0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x7a,0x20,0x20,0x63,0x20,0x23,0x61,
+ 0x64,0x61,0x64,0x36,0x62,0x36,0x62,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,
+ 0x22,0x78,0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x36,0x33,0x36,
+ 0x33,0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x63,0x20,0x20,0x63,0x20,
+ 0x23,0x61,0x64,0x61,0x64,0x37,0x33,0x37,0x33,0x36,0x33,0x36,0x33,0x22,
+ 0x2c,0x0a,0x22,0x76,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x36,
+ 0x62,0x36,0x62,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x62,0x20,0x20,
+ 0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x37,0x62,0x37,0x62,0x37,0x33,0x37,
+ 0x33,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x20,0x63,0x20,0x23,0x63,0x36,0x63,
+ 0x36,0x34,0x32,0x34,0x32,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x6d,
+ 0x20,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x34,0x32,0x34,0x32,0x33,
+ 0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x20,0x63,0x20,0x23,0x63,
+ 0x65,0x63,0x65,0x34,0x32,0x34,0x32,0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,
+ 0x22,0x4e,0x20,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x36,0x62,0x36,
+ 0x62,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x42,0x20,0x20,0x63,0x20,
+ 0x23,0x64,0x65,0x64,0x65,0x37,0x62,0x37,0x62,0x36,0x62,0x36,0x62,0x22,
+ 0x2c,0x0a,0x22,0x56,0x20,0x20,0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x35,
+ 0x61,0x35,0x61,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x43,0x20,0x20,
+ 0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x35,0x61,0x35,0x61,0x34,0x32,0x34,
+ 0x32,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x20,0x63,0x20,0x23,0x65,0x66,0x65,
+ 0x66,0x36,0x33,0x36,0x33,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x41,
+ 0x20,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x36,0x62,0x36,0x62,0x35,
+ 0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x53,0x20,0x20,0x63,0x20,0x23,0x65,
+ 0x66,0x65,0x66,0x36,0x62,0x36,0x62,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,
+ 0x22,0x44,0x20,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x36,0x33,0x36,
+ 0x33,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x46,0x20,0x20,0x63,0x20,
+ 0x23,0x66,0x66,0x66,0x66,0x36,0x33,0x36,0x33,0x34,0x61,0x34,0x61,0x22,
+ 0x2c,0x0a,0x22,0x47,0x20,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x36,
+ 0x62,0x36,0x62,0x34,0x61,0x34,0x61,0x22,0x2c,0x0a,0x22,0x48,0x20,0x20,
+ 0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x36,0x62,0x36,0x62,0x35,0x32,0x35,
+ 0x32,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x20,0x63,0x20,0x23,0x66,0x37,0x66,
+ 0x37,0x37,0x33,0x37,0x33,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,0x22,0x4b,
+ 0x20,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x37,0x33,0x37,0x33,0x35,
+ 0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x4c,0x20,0x20,0x63,0x20,0x23,0x66,
+ 0x66,0x66,0x66,0x37,0x33,0x37,0x33,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,
+ 0x22,0x50,0x20,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x37,0x33,0x37,
+ 0x33,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x49,0x20,0x20,0x63,0x20,
+ 0x23,0x65,0x37,0x65,0x37,0x37,0x62,0x37,0x62,0x36,0x33,0x36,0x33,0x22,
+ 0x2c,0x0a,0x22,0x55,0x20,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x37,
+ 0x62,0x37,0x62,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x59,0x20,0x20,
+ 0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x37,0x62,0x37,0x62,0x36,0x33,0x36,
+ 0x33,0x22,0x2c,0x0a,0x22,0x54,0x20,0x20,0x63,0x20,0x23,0x66,0x37,0x66,
+ 0x37,0x37,0x62,0x37,0x62,0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,0x52,
+ 0x20,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x37,0x62,0x37,0x62,0x36,
+ 0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x45,0x20,0x20,0x63,0x20,0x23,0x62,
+ 0x35,0x62,0x35,0x38,0x34,0x38,0x34,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,
+ 0x22,0x57,0x20,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x38,0x34,0x38,
+ 0x34,0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,0x22,0x51,0x20,0x20,0x63,0x20,
+ 0x23,0x65,0x37,0x65,0x37,0x38,0x34,0x38,0x34,0x36,0x62,0x36,0x62,0x22,
+ 0x2c,0x0a,0x22,0x21,0x20,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x38,
+ 0x63,0x38,0x63,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x7e,0x20,0x20,
+ 0x63,0x20,0x23,0x66,0x37,0x66,0x37,0x38,0x34,0x38,0x34,0x36,0x62,0x36,
+ 0x62,0x22,0x2c,0x0a,0x22,0x5e,0x20,0x20,0x63,0x20,0x23,0x66,0x66,0x66,
+ 0x66,0x38,0x34,0x38,0x34,0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x2f,
+ 0x20,0x20,0x63,0x20,0x23,0x66,0x66,0x66,0x66,0x38,0x34,0x38,0x34,0x36,
+ 0x62,0x36,0x62,0x22,0x2c,0x0a,0x22,0x28,0x20,0x20,0x63,0x20,0x23,0x66,
+ 0x37,0x66,0x37,0x38,0x34,0x38,0x34,0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,
+ 0x22,0x29,0x20,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x61,0x35,0x61,
+ 0x35,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x5f,0x20,0x20,0x63,0x20,
+ 0x47,0x72,0x61,0x79,0x36,0x38,0x22,0x2c,0x0a,0x22,0x60,0x20,0x20,0x63,
+ 0x20,0x47,0x72,0x61,0x79,0x37,0x31,0x22,0x2c,0x0a,0x22,0x27,0x20,0x20,
+ 0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,0x35,0x62,0x35,0x62,0x35,0x62,
+ 0x35,0x22,0x2c,0x0a,0x22,0x5d,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,
+ 0x37,0x34,0x22,0x2c,0x0a,0x22,0x5b,0x20,0x20,0x63,0x20,0x23,0x64,0x65,
+ 0x64,0x65,0x39,0x34,0x39,0x34,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,
+ 0x7b,0x20,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x62,0x64,0x62,0x64,
+ 0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x7d,0x20,0x20,0x63,0x20,0x23,
+ 0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x22,0x2c,
+ 0x0a,0x22,0x7c,0x20,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x63,0x36,
+ 0x63,0x36,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x20,0x63,
+ 0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,
+ 0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x20,0x2e,0x6a,0x20,0x71,0x20,
+ 0x77,0x20,0x77,0x20,0x77,0x20,0x77,0x20,0x71,0x20,0x71,0x20,0x70,0x20,
+ 0x5d,0x20,0x5d,0x20,0x67,0x20,0x71,0x20,0x71,0x20,0x77,0x20,0x71,0x20,
+ 0x77,0x20,0x71,0x20,0x71,0x20,0x73,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x20,0x2e,0x59,0x20,0x4c,0x20,0x4b,0x20,0x4c,0x20,0x4b,0x20,0x4c,0x20,
+ 0x4b,0x20,0x4c,0x20,0x4a,0x20,0x5d,0x20,0x7b,0x20,0x50,0x20,0x48,0x20,
+ 0x48,0x20,0x48,0x20,0x48,0x20,0x48,0x20,0x48,0x20,0x47,0x20,0x4a,0x20,
+ 0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x54,0x20,0x52,0x20,0x52,0x20,
+ 0x52,0x20,0x52,0x20,0x52,0x20,0x52,0x20,0x52,0x20,0x59,0x20,0x5d,0x20,
+ 0x5d,0x20,0x42,0x20,0x52,0x20,0x4c,0x20,0x4a,0x20,0x4c,0x20,0x4a,0x20,
+ 0x4c,0x20,0x4a,0x20,0x4a,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x75,0x20,0x30,0x20,0x30,0x20,0x30,0x20,0x30,0x20,0x30,0x20,0x30,0x20,
+ 0x39,0x20,0x72,0x20,0x27,0x20,0x5d,0x20,0x66,0x20,0x39,0x20,0x30,0x20,
+ 0x30,0x20,0x30,0x20,0x39,0x20,0x30,0x20,0x39,0x20,0x79,0x20,0x20,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x20,0x2e,0x32,0x20,0x3a,0x20,0x2d,0x20,0x3e,0x20,
+ 0x3a,0x20,0x2d,0x20,0x3a,0x20,0x3a,0x20,0x3c,0x20,0x5d,0x20,0x5d,0x20,
+ 0x34,0x20,0x2d,0x20,0x3a,0x20,0x2d,0x20,0x3e,0x20,0x3a,0x20,0x3a,0x20,
+ 0x3a,0x20,0x3c,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x2a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x4f,0x20,0x20,0x20,0x4f,0x20,0x20,0x20,
+ 0x2b,0x20,0x5d,0x20,0x5d,0x20,0x26,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x25,0x20,0x20,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x20,0x2e,0x60,0x20,0x29,0x20,0x5f,0x20,0x5f,0x20,0x29,0x20,
+ 0x5f,0x20,0x29,0x20,0x29,0x20,0x5f,0x20,0x5d,0x20,0x7c,0x20,0x5f,0x20,
+ 0x29,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,0x29,0x20,
+ 0x5f,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x20,0x2e,0x62,0x20,0x67,0x20,0x68,0x20,0x68,0x20,0x68,0x20,0x68,0x20,
+ 0x68,0x20,0x67,0x20,0x6c,0x20,0x5d,0x20,0x5d,0x20,0x7a,0x20,0x67,0x20,
+ 0x67,0x20,0x68,0x20,0x67,0x20,0x68,0x20,0x67,0x20,0x67,0x20,0x63,0x20,
+ 0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x50,0x20,0x46,0x20,0x5a,0x20,
+ 0x44,0x20,0x47,0x20,0x56,0x20,0x47,0x20,0x56,0x20,0x5a,0x20,0x60,0x20,
+ 0x7c,0x20,0x4e,0x20,0x44,0x20,0x56,0x20,0x56,0x20,0x56,0x20,0x56,0x20,
+ 0x56,0x20,0x56,0x20,0x53,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x21,0x20,0x2f,0x20,0x2f,0x20,0x2f,0x20,0x2f,0x20,0x2f,0x20,0x5e,0x20,
+ 0x2f,0x20,0x55,0x20,0x60,0x20,0x5d,0x20,0x51,0x20,0x52,0x20,0x5e,0x20,
+ 0x52,0x20,0x5e,0x20,0x52,0x20,0x52,0x20,0x52,0x20,0x7e,0x20,0x20,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x20,0x2e,0x78,0x20,0x6e,0x20,0x6d,0x20,0x6d,0x20,
+ 0x6d,0x20,0x74,0x20,0x6d,0x20,0x6e,0x20,0x73,0x20,0x60,0x20,0x5d,0x20,
+ 0x68,0x20,0x6d,0x20,0x6d,0x20,0x74,0x20,0x6d,0x20,0x74,0x20,0x6e,0x20,
+ 0x74,0x20,0x6a,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x36,0x20,
+ 0x3e,0x20,0x3e,0x20,0x3e,0x20,0x3e,0x20,0x2c,0x20,0x3e,0x20,0x3e,0x20,
+ 0x31,0x20,0x60,0x20,0x7c,0x20,0x35,0x20,0x3b,0x20,0x3e,0x20,0x3e,0x20,
+ 0x3a,0x20,0x3e,0x20,0x3e,0x20,0x3a,0x20,0x35,0x20,0x20,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x20,0x2e,0x37,0x20,0x2e,0x20,0x6f,0x20,0x58,0x20,0x4f,0x20,
+ 0x6f,0x20,0x4f,0x20,0x2e,0x20,0x24,0x20,0x60,0x20,0x5d,0x20,0x26,0x20,
+ 0x6f,0x20,0x4f,0x20,0x6f,0x20,0x4f,0x20,0x6f,0x20,0x4f,0x20,0x2e,0x20,
+ 0x3d,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x60,0x20,0x5f,0x20,
+ 0x5f,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,
+ 0x5d,0x20,0x7c,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,0x5f,0x20,
+ 0x5f,0x20,0x5f,0x20,0x5f,0x20,0x60,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x45,0x20,0x72,0x20,0x69,0x20,
+ 0x66,0x20,0x69,0x20,0x69,0x20,0x69,0x20,0x69,0x20,0x66,0x20,0x27,0x20,
+ 0x5d,0x20,0x6c,0x20,0x69,0x20,0x69,0x20,0x69,0x20,0x69,0x20,0x69,0x20,
+ 0x69,0x20,0x72,0x20,0x63,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x57,0x20,0x46,0x20,0x5a,0x20,0x46,0x20,0x47,0x20,0x5a,0x20,0x46,0x20,
+ 0x46,0x20,0x5a,0x20,0x60,0x20,0x5d,0x20,0x41,0x20,0x56,0x20,0x5a,0x20,
+ 0x5a,0x20,0x44,0x20,0x5a,0x20,0x44,0x20,0x43,0x20,0x49,0x20,0x20,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x20,0x2e,0x5b,0x20,0x2f,0x20,0x2f,0x20,0x2f,0x20,
+ 0x2f,0x20,0x2f,0x20,0x2f,0x20,0x2f,0x20,0x54,0x20,0x60,0x20,0x7c,0x20,
+ 0x51,0x20,0x2f,0x20,0x52,0x20,0x52,0x20,0x52,0x20,0x52,0x20,0x52,0x20,
+ 0x52,0x20,0x28,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x76,0x20,
+ 0x4d,0x20,0x6d,0x20,0x6d,0x20,0x6d,0x20,0x6d,0x20,0x6d,0x20,0x6d,0x20,
+ 0x61,0x20,0x60,0x20,0x5d,0x20,0x6b,0x20,0x6e,0x20,0x6d,0x20,0x6e,0x20,
+ 0x6d,0x20,0x6e,0x20,0x6d,0x20,0x74,0x20,0x6b,0x20,0x20,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x20,0x2e,0x64,0x20,0x2c,0x20,0x2c,0x20,0x2c,0x20,0x2c,0x20,
+ 0x2c,0x20,0x2c,0x20,0x2c,0x20,0x33,0x20,0x60,0x20,0x5d,0x20,0x35,0x20,
+ 0x2c,0x20,0x2c,0x20,0x2c,0x20,0x3e,0x20,0x2c,0x20,0x3e,0x20,0x2c,0x20,
+ 0x65,0x20,0x20,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x38,0x20,0x2e,0x20,
+ 0x40,0x20,0x23,0x20,0x40,0x20,0x23,0x20,0x40,0x20,0x2b,0x20,0x24,0x20,
+ 0x60,0x20,0x5d,0x20,0x3d,0x20,0x4f,0x20,0x2b,0x20,0x23,0x20,0x23,0x20,
+ 0x23,0x20,0x23,0x20,0x4f,0x20,0x37,0x20,0x20,0x2e,0x22,0x0a,0x7d,0x3b,
+ 0x0a
+};
+
+static const unsigned int small_left_xpm_len = 3621;
+static const unsigned char small_left_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x31,0x33,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x63,
+ 0x20,0x23,0x30,0x38,0x30,0x38,0x32,0x39,0x32,0x39,0x65,0x66,0x65,0x66,
+ 0x22,0x2c,0x0a,0x22,0x2e,0x20,0x20,0x63,0x20,0x23,0x30,0x30,0x30,0x30,
+ 0x32,0x39,0x32,0x39,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x58,0x20,
+ 0x20,0x63,0x20,0x23,0x30,0x38,0x30,0x38,0x32,0x39,0x32,0x39,0x66,0x37,
+ 0x66,0x37,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x20,0x63,0x20,0x23,0x30,0x38,
+ 0x30,0x38,0x33,0x31,0x33,0x31,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x4f,0x20,0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,0x32,0x39,0x32,0x39,
+ 0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x20,0x63,0x20,0x23,
+ 0x31,0x30,0x31,0x30,0x32,0x39,0x32,0x39,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x40,0x20,0x20,0x63,0x20,0x23,0x31,0x38,0x31,0x38,0x33,0x31,
+ 0x33,0x31,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x23,0x20,0x20,0x63,
+ 0x20,0x23,0x31,0x38,0x31,0x38,0x33,0x39,0x33,0x39,0x65,0x37,0x65,0x37,
+ 0x22,0x2c,0x0a,0x22,0x24,0x20,0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,
+ 0x33,0x31,0x33,0x31,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x25,0x20,
+ 0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,0x33,0x39,0x33,0x39,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x26,0x20,0x20,0x63,0x20,0x23,0x32,0x31,
+ 0x32,0x31,0x33,0x39,0x33,0x39,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,
+ 0x2a,0x20,0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,0x34,0x32,0x34,0x32,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x20,0x63,0x20,0x23,
+ 0x31,0x38,0x31,0x38,0x34,0x32,0x34,0x32,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x20,0x63,0x20,0x23,0x32,0x39,0x32,0x39,0x34,0x32,
+ 0x34,0x32,0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x20,0x63,
+ 0x20,0x23,0x33,0x31,0x33,0x31,0x34,0x32,0x34,0x32,0x64,0x36,0x64,0x36,
+ 0x22,0x2c,0x0a,0x22,0x3a,0x20,0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,
+ 0x35,0x32,0x35,0x32,0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,0x22,0x3e,0x20,
+ 0x20,0x63,0x20,0x23,0x32,0x31,0x32,0x31,0x34,0x32,0x34,0x32,0x65,0x37,
+ 0x65,0x37,0x22,0x2c,0x0a,0x22,0x2c,0x20,0x20,0x63,0x20,0x23,0x32,0x39,
+ 0x32,0x39,0x34,0x32,0x34,0x32,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,
+ 0x3c,0x20,0x20,0x63,0x20,0x23,0x32,0x31,0x32,0x31,0x35,0x32,0x35,0x32,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x31,0x20,0x20,0x63,0x20,0x23,
+ 0x32,0x39,0x32,0x39,0x35,0x32,0x35,0x32,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x32,0x20,0x20,0x63,0x20,0x23,0x32,0x39,0x32,0x39,0x35,0x61,
+ 0x35,0x61,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x33,0x20,0x20,0x63,
+ 0x20,0x23,0x33,0x31,0x33,0x31,0x36,0x33,0x36,0x33,0x66,0x66,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x34,0x20,0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,
+ 0x36,0x33,0x36,0x33,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x35,0x20,
+ 0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,0x36,0x62,0x36,0x62,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x36,0x20,0x20,0x63,0x20,0x23,0x35,0x61,
+ 0x35,0x61,0x36,0x62,0x36,0x62,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,
+ 0x37,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x37,0x33,0x37,0x33,
+ 0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x38,0x20,0x20,0x63,0x20,0x23,
+ 0x34,0x32,0x34,0x32,0x35,0x32,0x35,0x32,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x35,0x61,
+ 0x35,0x61,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x30,0x20,0x20,0x63,
+ 0x20,0x23,0x34,0x32,0x34,0x32,0x35,0x32,0x35,0x32,0x64,0x36,0x64,0x36,
+ 0x22,0x2c,0x0a,0x22,0x71,0x20,0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,
+ 0x36,0x33,0x36,0x33,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x77,0x20,
+ 0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x36,0x62,0x36,0x62,0x63,0x36,
+ 0x63,0x36,0x22,0x2c,0x0a,0x22,0x65,0x20,0x20,0x63,0x20,0x23,0x34,0x32,
+ 0x34,0x32,0x36,0x33,0x36,0x33,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,
+ 0x72,0x20,0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,0x36,0x62,0x36,0x62,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x74,0x20,0x20,0x63,0x20,0x23,
+ 0x34,0x32,0x34,0x32,0x37,0x33,0x37,0x33,0x65,0x66,0x65,0x66,0x22,0x2c,
+ 0x0a,0x22,0x79,0x20,0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,0x37,0x33,
+ 0x37,0x33,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x75,0x20,0x20,0x63,
+ 0x20,0x23,0x34,0x61,0x34,0x61,0x37,0x33,0x37,0x33,0x66,0x66,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x69,0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,
+ 0x37,0x62,0x37,0x62,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x70,0x20,
+ 0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x38,0x34,0x38,0x34,0x62,0x35,
+ 0x62,0x35,0x22,0x2c,0x0a,0x22,0x61,0x20,0x20,0x63,0x20,0x23,0x35,0x32,
+ 0x35,0x32,0x38,0x34,0x38,0x34,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x73,0x20,0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x38,0x63,0x38,0x63,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x64,0x20,0x20,0x63,0x20,0x23,
+ 0x36,0x62,0x36,0x62,0x38,0x63,0x38,0x63,0x64,0x65,0x64,0x65,0x22,0x2c,
+ 0x0a,0x22,0x66,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x38,0x34,
+ 0x38,0x34,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x67,0x20,0x20,0x63,
+ 0x20,0x23,0x37,0x62,0x37,0x62,0x38,0x63,0x38,0x63,0x63,0x36,0x63,0x36,
+ 0x22,0x2c,0x0a,0x22,0x68,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,
+ 0x38,0x63,0x38,0x63,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x6a,0x20,
+ 0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x38,0x63,0x38,0x63,0x64,0x36,
+ 0x64,0x36,0x22,0x2c,0x0a,0x22,0x6b,0x20,0x20,0x63,0x20,0x23,0x37,0x62,
+ 0x37,0x62,0x38,0x63,0x38,0x63,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,
+ 0x6c,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x39,0x34,0x39,0x34,
+ 0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x7a,0x20,0x20,0x63,0x20,0x23,
+ 0x37,0x62,0x37,0x62,0x39,0x63,0x39,0x63,0x64,0x36,0x64,0x36,0x22,0x2c,
+ 0x0a,0x22,0x78,0x20,0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x38,0x34,
+ 0x38,0x34,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x63,0x20,0x20,0x63,
+ 0x20,0x23,0x36,0x33,0x36,0x33,0x38,0x63,0x38,0x63,0x66,0x66,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x76,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,
+ 0x39,0x34,0x39,0x34,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x62,0x20,
+ 0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x39,0x34,0x39,0x34,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x20,0x63,0x20,0x23,0x36,0x33,
+ 0x36,0x33,0x39,0x63,0x39,0x63,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x6d,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x39,0x63,0x39,0x63,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x20,0x63,0x20,0x23,
+ 0x37,0x33,0x37,0x33,0x39,0x34,0x39,0x34,0x65,0x37,0x65,0x37,0x22,0x2c,
+ 0x0a,0x22,0x4e,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x39,0x63,
+ 0x39,0x63,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x42,0x20,0x20,0x63,
+ 0x20,0x23,0x37,0x33,0x37,0x33,0x39,0x63,0x39,0x63,0x66,0x37,0x66,0x37,
+ 0x22,0x2c,0x0a,0x22,0x56,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,
+ 0x61,0x35,0x61,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x43,0x20,
+ 0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x61,0x64,0x61,0x64,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x20,0x63,0x20,0x23,0x37,0x62,
+ 0x37,0x62,0x62,0x35,0x62,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x41,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x39,0x34,0x39,0x34,
+ 0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x53,0x20,0x20,0x63,0x20,0x23,
+ 0x38,0x63,0x38,0x63,0x39,0x34,0x39,0x34,0x62,0x64,0x62,0x64,0x22,0x2c,
+ 0x0a,0x22,0x44,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x39,0x34,
+ 0x39,0x34,0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,0x46,0x20,0x20,0x63,
+ 0x20,0x23,0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x34,0x62,0x35,0x62,0x35,
+ 0x22,0x2c,0x0a,0x22,0x47,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,
+ 0x39,0x63,0x39,0x63,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x48,0x20,
+ 0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x63,0x39,0x63,0x62,0x64,
+ 0x62,0x64,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x20,0x63,0x20,0x23,0x39,0x63,
+ 0x39,0x63,0x61,0x35,0x61,0x35,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,
+ 0x4b,0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x36,0x38,0x22,0x2c,0x0a,
+ 0x22,0x4c,0x20,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x61,0x35,0x61,
+ 0x35,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x50,0x20,0x20,0x63,0x20,
+ 0x23,0x61,0x64,0x61,0x64,0x61,0x64,0x61,0x64,0x62,0x35,0x62,0x35,0x22,
+ 0x2c,0x0a,0x22,0x49,0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x61,
+ 0x64,0x61,0x64,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x55,0x20,0x20,
+ 0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x62,0x35,0x62,0x35,0x62,0x64,0x62,
+ 0x64,0x22,0x2c,0x0a,0x22,0x59,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,
+ 0x35,0x62,0x64,0x62,0x64,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x54,
+ 0x20,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x37,0x34,0x22,0x2c,0x0a,0x22,
+ 0x52,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x39,0x34,0x39,0x34,
+ 0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x45,0x20,0x20,0x63,0x20,0x23,
+ 0x38,0x63,0x38,0x63,0x39,0x63,0x39,0x63,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x57,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x61,0x35,
+ 0x61,0x35,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x51,0x20,0x20,0x63,
+ 0x20,0x23,0x38,0x63,0x38,0x63,0x61,0x35,0x61,0x35,0x65,0x37,0x65,0x37,
+ 0x22,0x2c,0x0a,0x22,0x21,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,
+ 0x61,0x64,0x61,0x64,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x7e,0x20,
+ 0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x62,0x35,0x62,0x35,0x65,0x66,
+ 0x65,0x66,0x22,0x2c,0x0a,0x22,0x5e,0x20,0x20,0x63,0x20,0x23,0x38,0x34,
+ 0x38,0x34,0x62,0x35,0x62,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x2f,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x62,0x64,0x62,0x64,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x28,0x20,0x20,0x63,0x20,0x23,
+ 0x38,0x63,0x38,0x63,0x62,0x64,0x62,0x64,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x29,0x20,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x62,0x35,
+ 0x62,0x35,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x5f,0x20,0x20,0x63,
+ 0x20,0x23,0x39,0x63,0x39,0x63,0x62,0x64,0x62,0x64,0x66,0x37,0x66,0x37,
+ 0x22,0x2c,0x0a,0x22,0x60,0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,
+ 0x61,0x64,0x61,0x64,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x27,0x20,
+ 0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x62,0x35,0x62,0x35,0x63,0x36,
+ 0x63,0x36,0x22,0x2c,0x0a,0x22,0x5d,0x20,0x20,0x63,0x20,0x23,0x62,0x35,
+ 0x62,0x35,0x62,0x64,0x62,0x64,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,
+ 0x5b,0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,0x64,0x62,0x64,
+ 0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x7b,0x20,0x20,0x63,0x20,0x23,
+ 0x61,0x64,0x61,0x64,0x62,0x64,0x62,0x64,0x65,0x66,0x65,0x66,0x22,0x2c,
+ 0x0a,0x22,0x7d,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x63,0x36,
+ 0x63,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x7c,0x20,0x20,0x63,
+ 0x20,0x23,0x39,0x34,0x39,0x34,0x63,0x65,0x63,0x65,0x66,0x66,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x20,0x2e,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,
+ 0x63,0x65,0x63,0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x2e,0x2e,
+ 0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x64,0x36,0x64,0x36,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x58,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,
+ 0x61,0x64,0x64,0x65,0x64,0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x2e,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x63,0x65,0x63,0x65,
+ 0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x4f,0x2e,0x20,0x63,0x20,0x23,
+ 0x62,0x35,0x62,0x35,0x64,0x65,0x64,0x65,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x2e,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x64,0x36,
+ 0x64,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x40,0x2e,0x20,0x63,
+ 0x20,0x23,0x61,0x64,0x61,0x64,0x65,0x37,0x65,0x37,0x66,0x66,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x23,0x2e,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,
+ 0x65,0x37,0x65,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x24,0x2e,
+ 0x20,0x63,0x20,0x23,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,
+ 0x63,0x30,0x22,0x2c,0x0a,0x22,0x25,0x2e,0x20,0x63,0x20,0x23,0x63,0x65,
+ 0x63,0x65,0x64,0x65,0x64,0x65,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,
+ 0x26,0x2e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x65,0x37,0x65,0x37,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x2a,0x2e,0x20,0x63,0x20,0x23,
+ 0x63,0x36,0x63,0x36,0x65,0x66,0x65,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x3d,0x2e,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x65,0x37,
+ 0x65,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x2d,0x2e,0x20,0x63,
+ 0x20,0x23,0x64,0x36,0x64,0x36,0x65,0x37,0x65,0x37,0x66,0x66,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x3b,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,
+ 0x65,0x37,0x65,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3a,0x2e,
+ 0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x66,0x66,0x66,0x66,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x3e,0x2e,0x20,0x63,0x20,0x23,0x64,0x65,
+ 0x64,0x65,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x2c,0x2e,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x66,0x66,0x66,0x66,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3c,0x2e,0x20,0x63,0x20,0x23,
+ 0x66,0x37,0x66,0x37,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x31,0x2e,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x30,0x30,
+ 0x22,0x2c,0x0a,0x22,0x32,0x2e,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,
+ 0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,
+ 0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x47,0x20,0x51,0x20,0x6b,0x20,0x55,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x46,0x20,0x29,0x20,0x31,0x2e,0x7b,0x20,0x27,0x20,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x54,0x20,0x45,0x20,0x6f,0x2e,0x31,0x2e,
+ 0x3e,0x2e,0x7e,0x20,0x55,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x54,0x20,0x53,0x20,
+ 0x2d,0x2e,0x31,0x2e,0x3a,0x2e,0x2e,0x2e,0x4e,0x20,0x5d,0x20,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,
+ 0x54,0x20,0x52,0x20,0x25,0x2e,0x31,0x2e,0x3a,0x2e,0x20,0x2e,0x28,0x20,
+ 0x4d,0x20,0x55,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x32,0x2e,0x55,0x20,0x67,0x20,0x3b,0x2e,0x31,0x2e,0x26,0x2e,
+ 0x7d,0x20,0x5e,0x20,0x5a,0x20,0x42,0x20,0x46,0x20,0x54,0x20,0x5b,0x20,
+ 0x59,0x20,0x27,0x20,0x48,0x20,0x52,0x20,0x67,0x20,0x6a,0x20,0x4d,0x20,
+ 0x6a,0x20,0x4c,0x20,0x22,0x2c,0x0a,0x22,0x5b,0x20,0x68,0x20,0x2d,0x2e,
+ 0x31,0x2e,0x2a,0x2e,0x2f,0x20,0x43,0x20,0x43,0x20,0x43,0x20,0x6d,0x20,
+ 0x74,0x20,0x64,0x20,0x6c,0x20,0x7a,0x20,0x57,0x20,0x5f,0x20,0x58,0x2e,
+ 0x3d,0x2e,0x2a,0x2e,0x23,0x2e,0x6e,0x20,0x30,0x20,0x22,0x2c,0x0a,0x22,
+ 0x41,0x20,0x2b,0x2e,0x3c,0x2e,0x2a,0x2e,0x7d,0x20,0x21,0x20,0x43,0x20,
+ 0x56,0x20,0x56,0x20,0x56,0x20,0x43,0x20,0x2e,0x2e,0x4f,0x2e,0x23,0x2e,
+ 0x26,0x2e,0x4f,0x2e,0x58,0x2e,0x20,0x2e,0x28,0x20,0x43,0x20,0x35,0x20,
+ 0x2c,0x20,0x22,0x2c,0x0a,0x22,0x57,0x20,0x2c,0x2e,0x40,0x2e,0x28,0x20,
+ 0x43,0x20,0x43,0x20,0x56,0x20,0x56,0x20,0x56,0x20,0x56,0x20,0x43,0x20,
+ 0x43,0x20,0x21,0x20,0x43,0x20,0x56,0x20,0x56,0x20,0x56,0x20,0x6d,0x20,
+ 0x6d,0x20,0x62,0x20,0x32,0x20,0x3e,0x20,0x22,0x2c,0x0a,0x22,0x63,0x20,
+ 0x7c,0x20,0x5e,0x20,0x21,0x20,0x43,0x20,0x56,0x20,0x56,0x20,0x56,0x20,
+ 0x56,0x20,0x56,0x20,0x56,0x20,0x56,0x20,0x6d,0x20,0x6d,0x20,0x6d,0x20,
+ 0x6d,0x20,0x6d,0x20,0x62,0x20,0x62,0x20,0x73,0x20,0x31,0x20,0x23,0x20,
+ 0x22,0x2c,0x0a,0x22,0x71,0x20,0x31,0x20,0x73,0x20,0x6d,0x20,0x56,0x20,
+ 0x6d,0x20,0x6d,0x20,0x6d,0x20,0x56,0x20,0x6d,0x20,0x75,0x20,0x34,0x20,
+ 0x35,0x20,0x79,0x20,0x69,0x20,0x61,0x20,0x61,0x20,0x73,0x20,0x61,0x20,
+ 0x61,0x20,0x3c,0x20,0x2c,0x20,0x22,0x2c,0x0a,0x22,0x4b,0x20,0x3b,0x20,
+ 0x2a,0x20,0x75,0x20,0x62,0x20,0x6d,0x20,0x6d,0x20,0x6d,0x20,0x56,0x20,
+ 0x62,0x20,0x2b,0x20,0x4f,0x20,0x40,0x20,0x20,0x20,0x58,0x20,0x24,0x20,
+ 0x3d,0x20,0x3d,0x20,0x3c,0x20,0x31,0x20,0x25,0x20,0x2d,0x20,0x22,0x2c,
+ 0x0a,0x22,0x32,0x2e,0x4a,0x20,0x2d,0x20,0x3d,0x20,0x72,0x20,0x63,0x20,
+ 0x62,0x20,0x6d,0x20,0x6d,0x20,0x63,0x20,0x37,0x20,0x4a,0x20,0x49,0x20,
+ 0x44,0x20,0x66,0x20,0x36,0x20,0x38,0x20,0x3b,0x20,0x2d,0x20,0x2c,0x20,
+ 0x2d,0x20,0x70,0x20,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x55,0x20,
+ 0x30,0x20,0x6f,0x20,0x33,0x20,0x61,0x20,0x62,0x20,0x62,0x20,0x76,0x20,
+ 0x55,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x54,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x32,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x50,0x20,0x39,0x20,0x6f,0x20,0x33,0x20,
+ 0x73,0x20,0x73,0x20,0x78,0x20,0x49,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x59,0x20,0x77,0x20,0x6f,0x20,0x32,0x20,0x79,0x20,0x65,0x20,0x49,0x20,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x54,0x20,0x37,0x20,0x2e,0x20,
+ 0x2a,0x20,0x2c,0x20,0x60,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x54,0x20,0x70,0x20,0x26,0x20,0x3a,0x20,0x55,0x20,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,
+ 0x32,0x2e,0x32,0x2e,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_newform_xpm_len = 1131;
+static const unsigned char small_newform_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x20,0x6e,0x65,0x77,0x66,
+ 0x6f,0x72,0x6d,0x5f,0x78,0x70,0x6d,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,
+ 0x22,0x33,0x34,0x20,0x32,0x36,0x20,0x36,0x20,0x31,0x22,0x2c,0x0a,0x22,
+ 0x20,0x09,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x22,0x2e,0x09,
+ 0x63,0x20,0x23,0x46,0x46,0x46,0x46,0x46,0x46,0x22,0x2c,0x0a,0x22,0x2b,
+ 0x09,0x63,0x20,0x23,0x30,0x30,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,
+ 0x40,0x09,0x63,0x20,0x23,0x30,0x30,0x30,0x30,0x46,0x46,0x22,0x2c,0x0a,
+ 0x22,0x23,0x09,0x63,0x20,0x23,0x43,0x30,0x43,0x30,0x43,0x30,0x22,0x2c,
+ 0x0a,0x22,0x24,0x09,0x63,0x20,0x23,0x38,0x30,0x38,0x30,0x38,0x30,0x22,
+ 0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x40,0x40,0x40,
+ 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
+ 0x40,0x40,0x40,0x40,0x40,0x40,0x2b,0x23,0x2b,0x23,0x2b,0x23,0x2b,0x24,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x24,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x2e,0x2b,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x24,
+ 0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x24,0x2b,0x24,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,
+ 0x2b,0x2e,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x24,0x2b,0x24,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x2e,0x2b,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x24,
+ 0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x24,0x2b,0x24,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,
+ 0x2b,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x24,0x2b,0x24,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x2e,0x2b,0x2e,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x24,
+ 0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,
+ 0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x24,0x2b,0x24,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x2e,0x2b,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,0x23,0x2e,
+ 0x23,0x2e,0x23,0x2e,0x23,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,
+ 0x2b,0x2e,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x2b,0x24,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2b,0x2b,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x24,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_print_xpm_len = 2434;
+static const unsigned char small_print_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x38,0x39,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x31,
+ 0x30,0x31,0x30,0x30,0x38,0x30,0x38,0x31,0x30,0x31,0x30,0x22,0x2c,0x0a,
+ 0x22,0x58,0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,
+ 0x31,0x30,0x31,0x30,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x63,0x20,0x23,0x31,
+ 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,
+ 0x22,0x4f,0x20,0x63,0x20,0x23,0x31,0x38,0x31,0x38,0x31,0x30,0x31,0x30,
+ 0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x63,0x20,0x23,0x31,
+ 0x38,0x31,0x38,0x31,0x38,0x31,0x38,0x31,0x38,0x31,0x38,0x22,0x2c,0x0a,
+ 0x22,0x40,0x20,0x63,0x20,0x23,0x31,0x38,0x31,0x38,0x31,0x38,0x31,0x38,
+ 0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,0x22,0x23,0x20,0x63,0x20,0x23,0x32,
+ 0x31,0x32,0x31,0x31,0x38,0x31,0x38,0x32,0x31,0x32,0x31,0x22,0x2c,0x0a,
+ 0x22,0x24,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x33,0x22,0x2c,0x0a,
+ 0x22,0x25,0x20,0x63,0x20,0x23,0x32,0x31,0x32,0x31,0x32,0x31,0x32,0x31,
+ 0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,0x20,0x23,0x32,
+ 0x39,0x32,0x39,0x32,0x31,0x32,0x31,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,
+ 0x22,0x2a,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x36,0x22,0x2c,0x0a,
+ 0x22,0x3d,0x20,0x63,0x20,0x23,0x32,0x39,0x32,0x39,0x32,0x39,0x32,0x39,
+ 0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x63,0x20,0x23,0x33,
+ 0x31,0x33,0x31,0x32,0x39,0x32,0x39,0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,
+ 0x22,0x3b,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x33,0x31,0x33,0x31,
+ 0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x3a,0x20,0x63,0x20,0x23,0x33,
+ 0x31,0x33,0x31,0x33,0x31,0x33,0x31,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,
+ 0x22,0x3e,0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,0x33,0x31,0x33,0x31,
+ 0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,0x22,0x2c,0x20,0x63,0x20,0x23,0x33,
+ 0x39,0x33,0x39,0x33,0x39,0x33,0x39,0x33,0x39,0x33,0x39,0x22,0x2c,0x0a,
+ 0x22,0x3c,0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,0x33,0x39,0x33,0x39,
+ 0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,0x22,0x31,0x20,0x63,0x20,0x23,0x34,
+ 0x32,0x34,0x32,0x33,0x39,0x33,0x39,0x34,0x32,0x34,0x32,0x22,0x2c,0x0a,
+ 0x22,0x32,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x32,0x36,0x22,0x2c,0x0a,
+ 0x22,0x33,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x34,0x61,0x34,0x61,
+ 0x35,0x32,0x35,0x32,0x22,0x2c,0x0a,0x22,0x34,0x20,0x63,0x20,0x23,0x35,
+ 0x61,0x35,0x61,0x35,0x32,0x35,0x32,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,
+ 0x22,0x35,0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,
+ 0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x36,0x20,0x63,0x20,0x23,0x36,
+ 0x62,0x36,0x62,0x36,0x33,0x36,0x33,0x36,0x62,0x36,0x62,0x22,0x2c,0x0a,
+ 0x22,0x37,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x34,0x32,0x22,0x2c,0x0a,
+ 0x22,0x38,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x36,0x62,0x36,0x62,
+ 0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,0x22,0x39,0x20,0x63,0x20,0x23,0x37,
+ 0x33,0x37,0x33,0x36,0x62,0x36,0x62,0x37,0x33,0x37,0x33,0x22,0x2c,0x0a,
+ 0x22,0x30,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x37,0x33,0x37,0x33,
+ 0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,0x22,0x71,0x20,0x63,0x20,0x23,0x37,
+ 0x62,0x37,0x62,0x37,0x33,0x37,0x33,0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,
+ 0x22,0x77,0x20,0x63,0x20,0x23,0x30,0x38,0x30,0x38,0x66,0x66,0x66,0x66,
+ 0x30,0x38,0x30,0x38,0x22,0x2c,0x0a,0x22,0x65,0x20,0x63,0x20,0x23,0x32,
+ 0x39,0x32,0x39,0x66,0x66,0x66,0x66,0x32,0x39,0x32,0x39,0x22,0x2c,0x0a,
+ 0x22,0x72,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x66,0x66,0x66,0x66,
+ 0x33,0x31,0x33,0x31,0x22,0x2c,0x0a,0x22,0x74,0x20,0x63,0x20,0x23,0x35,
+ 0x61,0x35,0x61,0x63,0x65,0x63,0x65,0x35,0x61,0x35,0x61,0x22,0x2c,0x0a,
+ 0x22,0x79,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x66,0x66,0x66,0x66,
+ 0x36,0x33,0x36,0x33,0x22,0x2c,0x0a,0x22,0x75,0x20,0x63,0x20,0x23,0x37,
+ 0x62,0x37,0x62,0x66,0x66,0x66,0x66,0x37,0x62,0x37,0x62,0x22,0x2c,0x0a,
+ 0x22,0x69,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x37,0x62,0x37,0x62,
+ 0x38,0x34,0x38,0x34,0x22,0x2c,0x0a,0x22,0x70,0x20,0x63,0x20,0x23,0x38,
+ 0x34,0x38,0x34,0x37,0x62,0x37,0x62,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,
+ 0x22,0x61,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x37,0x62,0x37,0x62,
+ 0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x73,0x20,0x63,0x20,0x23,0x38,
+ 0x34,0x38,0x34,0x38,0x34,0x38,0x34,0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,
+ 0x22,0x64,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x38,0x34,0x38,0x34,
+ 0x38,0x63,0x38,0x63,0x22,0x2c,0x0a,0x22,0x66,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x35,0x35,0x22,0x2c,0x0a,0x22,0x67,0x20,0x63,0x20,0x23,0x38,
+ 0x63,0x38,0x63,0x38,0x34,0x38,0x34,0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,
+ 0x22,0x68,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x38,0x63,0x38,0x63,
+ 0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,0x22,0x6a,0x20,0x63,0x20,0x23,0x39,
+ 0x34,0x39,0x34,0x38,0x63,0x38,0x63,0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,
+ 0x22,0x6b,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x38,0x63,0x38,0x63,
+ 0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x35,0x38,0x22,0x2c,0x0a,0x22,0x7a,0x20,0x63,0x20,0x23,0x39,
+ 0x34,0x39,0x34,0x39,0x34,0x39,0x34,0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,
+ 0x22,0x78,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x34,0x39,0x34,
+ 0x39,0x63,0x39,0x63,0x22,0x2c,0x0a,0x22,0x63,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x36,0x31,0x22,0x2c,0x0a,0x22,0x76,0x20,0x63,0x20,0x23,0x39,
+ 0x63,0x39,0x63,0x39,0x34,0x39,0x34,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,
+ 0x22,0x62,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x63,0x39,0x63,
+ 0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x63,0x20,0x23,0x61,
+ 0x35,0x61,0x35,0x39,0x63,0x39,0x63,0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,
+ 0x22,0x6d,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x39,0x63,0x39,0x63,
+ 0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x63,0x20,0x23,0x61,
+ 0x64,0x61,0x64,0x39,0x63,0x39,0x63,0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,
+ 0x22,0x4e,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,
+ 0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x42,0x20,0x63,0x20,0x23,0x61,
+ 0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,
+ 0x22,0x56,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x61,0x35,0x61,0x35,
+ 0x61,0x64,0x61,0x64,0x22,0x2c,0x0a,0x22,0x43,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x36,0x38,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x63,0x20,0x23,0x61,
+ 0x64,0x61,0x64,0x61,0x64,0x61,0x64,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,
+ 0x22,0x41,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x61,0x64,0x61,0x64,
+ 0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x53,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x37,0x31,0x22,0x2c,0x0a,0x22,0x44,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x37,0x34,0x22,0x2c,0x0a,0x22,0x46,0x20,0x63,0x20,0x23,0x39,
+ 0x34,0x39,0x34,0x63,0x36,0x63,0x36,0x39,0x34,0x39,0x34,0x22,0x2c,0x0a,
+ 0x22,0x47,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x63,0x65,0x63,0x65,
+ 0x61,0x35,0x61,0x35,0x22,0x2c,0x0a,0x22,0x48,0x20,0x63,0x20,0x23,0x62,
+ 0x64,0x62,0x64,0x64,0x36,0x64,0x36,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,
+ 0x22,0x4a,0x20,0x63,0x20,0x23,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,
+ 0x63,0x30,0x63,0x30,0x22,0x2c,0x0a,0x22,0x4b,0x20,0x63,0x20,0x23,0x63,
+ 0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,
+ 0x22,0x4c,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x63,0x36,0x63,0x36,
+ 0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x50,0x20,0x63,0x20,0x23,0x63,
+ 0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,
+ 0x22,0x49,0x20,0x63,0x20,0x23,0x63,0x65,0x63,0x65,0x63,0x65,0x63,0x65,
+ 0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x55,0x20,0x63,0x20,0x23,0x64,
+ 0x36,0x64,0x36,0x63,0x65,0x63,0x65,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,
+ 0x22,0x59,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x63,0x65,0x63,0x65,
+ 0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,0x22,0x54,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x38,0x34,0x22,0x2c,0x0a,0x22,0x52,0x20,0x63,0x20,0x23,0x64,
+ 0x36,0x64,0x36,0x64,0x36,0x64,0x36,0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,
+ 0x22,0x45,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x36,0x64,0x36,
+ 0x64,0x65,0x64,0x65,0x22,0x2c,0x0a,0x22,0x57,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x38,0x37,0x22,0x2c,0x0a,0x22,0x51,0x20,0x63,0x20,0x23,0x64,
+ 0x65,0x64,0x65,0x64,0x36,0x64,0x36,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,
+ 0x22,0x21,0x20,0x63,0x20,0x23,0x64,0x65,0x64,0x65,0x64,0x65,0x64,0x65,
+ 0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x7e,0x20,0x63,0x20,0x23,0x64,
+ 0x36,0x64,0x36,0x66,0x66,0x66,0x66,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,
+ 0x22,0x5e,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x64,0x65,0x64,0x65,
+ 0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x2f,0x20,0x63,0x20,0x23,0x65,
+ 0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,
+ 0x22,0x28,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x65,0x37,0x65,0x37,
+ 0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x29,0x20,0x63,0x20,0x23,0x65,
+ 0x66,0x65,0x66,0x65,0x37,0x65,0x37,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,
+ 0x22,0x5f,0x20,0x63,0x20,0x23,0x65,0x66,0x65,0x66,0x65,0x66,0x65,0x66,
+ 0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x60,0x20,0x63,0x20,0x23,0x65,
+ 0x37,0x65,0x37,0x66,0x66,0x66,0x66,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,
+ 0x22,0x27,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x39,0x37,0x22,0x2c,0x0a,
+ 0x22,0x5d,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x31,0x30,0x30,0x22,0x2c,
+ 0x0a,0x22,0x5b,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,
+ 0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x5b,
+ 0x5b,0x5b,0x5b,0x5b,0x5b,0x53,0x44,0x50,0x50,0x50,0x50,0x4b,0x4b,0x44,
+ 0x44,0x43,0x44,0x5b,0x5b,0x5b,0x5b,0x22,0x2c,0x0a,0x22,0x5b,0x5b,0x5b,
+ 0x5b,0x5b,0x5b,0x44,0x5f,0x2f,0x2f,0x2f,0x2f,0x2f,0x5f,0x5f,0x5f,0x57,
+ 0x44,0x5b,0x5b,0x5b,0x5b,0x22,0x2c,0x0a,0x22,0x5b,0x5b,0x5b,0x5b,0x5b,
+ 0x5b,0x44,0x4b,0x4b,0x4b,0x50,0x50,0x4b,0x4b,0x4b,0x4b,0x44,0x4b,0x5b,
+ 0x5b,0x5b,0x5b,0x22,0x2c,0x0a,0x22,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x53,
+ 0x44,0x44,0x44,0x44,0x53,0x44,0x44,0x53,0x53,0x43,0x44,0x5b,0x5b,0x5b,
+ 0x5b,0x22,0x2c,0x0a,0x22,0x5b,0x5b,0x5b,0x5b,0x5b,0x4b,0x43,0x4b,0x44,
+ 0x4b,0x4b,0x4b,0x44,0x44,0x44,0x4b,0x53,0x5b,0x5b,0x5b,0x5b,0x5b,0x22,
+ 0x2c,0x0a,0x22,0x5b,0x5b,0x5b,0x5b,0x5b,0x44,0x44,0x53,0x44,0x44,0x44,
+ 0x44,0x44,0x44,0x4b,0x4b,0x53,0x5b,0x5b,0x5b,0x5b,0x5b,0x22,0x2c,0x0a,
+ 0x22,0x5b,0x5b,0x5b,0x5b,0x5b,0x44,0x53,0x4b,0x44,0x44,0x44,0x44,0x44,
+ 0x4b,0x44,0x4b,0x43,0x5b,0x5b,0x5b,0x5b,0x5b,0x22,0x2c,0x0a,0x22,0x5b,
+ 0x5b,0x5b,0x5b,0x5b,0x4b,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
+ 0x44,0x53,0x5b,0x5b,0x5b,0x5b,0x5b,0x22,0x2c,0x0a,0x22,0x5b,0x5b,0x5b,
+ 0x5b,0x5b,0x43,0x50,0x2f,0x57,0x57,0x57,0x57,0x57,0x57,0x54,0x57,0x4e,
+ 0x4e,0x5a,0x5b,0x5b,0x5b,0x22,0x2c,0x0a,0x22,0x5b,0x5b,0x5b,0x44,0x63,
+ 0x39,0x53,0x54,0x50,0x54,0x50,0x54,0x50,0x54,0x57,0x57,0x6a,0x34,0x32,
+ 0x37,0x53,0x5b,0x22,0x2c,0x0a,0x22,0x5b,0x5b,0x44,0x7a,0x69,0x71,0x30,
+ 0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x61,0x67,0x38,0x3c,0x25,0x40,0x32,
+ 0x4e,0x22,0x2c,0x0a,0x22,0x5b,0x44,0x63,0x45,0x28,0x21,0x45,0x52,0x52,
+ 0x52,0x52,0x55,0x59,0x47,0x74,0x46,0x6e,0x32,0x23,0x23,0x4f,0x3c,0x22,
+ 0x2c,0x0a,0x22,0x44,0x62,0x29,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,
+ 0x5d,0x7e,0x65,0x77,0x65,0x50,0x61,0x3b,0x40,0x58,0x23,0x22,0x2c,0x0a,
+ 0x22,0x56,0x27,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x60,
+ 0x79,0x72,0x75,0x5d,0x51,0x30,0x40,0x20,0x23,0x22,0x2c,0x0a,0x22,0x42,
+ 0x52,0x49,0x4c,0x49,0x54,0x52,0x52,0x57,0x5e,0x21,0x45,0x21,0x52,0x48,
+ 0x55,0x49,0x4c,0x68,0x4f,0x20,0x40,0x22,0x2c,0x0a,0x22,0x6a,0x41,0x5a,
+ 0x56,0x42,0x6d,0x42,0x6e,0x6d,0x6d,0x4e,0x6d,0x6e,0x6d,0x4d,0x76,0x7a,
+ 0x68,0x36,0x6f,0x20,0x23,0x22,0x2c,0x0a,0x22,0x6a,0x5a,0x5a,0x6d,0x42,
+ 0x6e,0x6e,0x6e,0x62,0x6e,0x62,0x62,0x62,0x62,0x76,0x78,0x78,0x67,0x36,
+ 0x6f,0x20,0x2b,0x22,0x2c,0x0a,0x22,0x6c,0x6d,0x6d,0x6e,0x62,0x6e,0x62,
+ 0x62,0x62,0x76,0x63,0x76,0x78,0x78,0x78,0x76,0x6a,0x73,0x36,0x4f,0x20,
+ 0x33,0x22,0x2c,0x0a,0x22,0x6a,0x42,0x6e,0x6e,0x76,0x63,0x76,0x78,0x76,
+ 0x63,0x76,0x78,0x76,0x78,0x7a,0x6a,0x68,0x64,0x38,0x6f,0x2b,0x43,0x22,
+ 0x2c,0x0a,0x22,0x6c,0x73,0x64,0x67,0x66,0x67,0x64,0x68,0x67,0x64,0x68,
+ 0x68,0x6a,0x68,0x6a,0x6b,0x68,0x67,0x36,0x2b,0x6c,0x5b,0x22,0x2c,0x0a,
+ 0x22,0x53,0x39,0x25,0x40,0x24,0x25,0x26,0x26,0x26,0x3d,0x2d,0x2d,0x3a,
+ 0x3a,0x3e,0x3e,0x3a,0x2d,0x3a,0x6c,0x5b,0x5b,0x22,0x2c,0x0a,0x22,0x5b,
+ 0x5b,0x43,0x35,0x31,0x31,0x2c,0x3a,0x3b,0x3b,0x3b,0x2a,0x2a,0x25,0x2b,
+ 0x2b,0x2e,0x32,0x63,0x5b,0x5b,0x5b,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_right_xpm_len = 3634;
+static const unsigned char small_right_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x31,0x33,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x20,0x63,
+ 0x20,0x23,0x30,0x30,0x30,0x30,0x31,0x38,0x31,0x38,0x66,0x37,0x66,0x37,
+ 0x22,0x2c,0x0a,0x22,0x2e,0x20,0x20,0x63,0x20,0x23,0x30,0x30,0x30,0x30,
+ 0x31,0x38,0x31,0x38,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x58,0x20,
+ 0x20,0x63,0x20,0x23,0x30,0x30,0x30,0x30,0x32,0x31,0x32,0x31,0x66,0x37,
+ 0x66,0x37,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x20,0x63,0x20,0x23,0x30,0x30,
+ 0x30,0x30,0x32,0x31,0x32,0x31,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x4f,0x20,0x20,0x63,0x20,0x23,0x30,0x30,0x30,0x30,0x32,0x39,0x32,0x39,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x20,0x63,0x20,0x23,
+ 0x31,0x30,0x31,0x30,0x33,0x31,0x33,0x31,0x65,0x66,0x65,0x66,0x22,0x2c,
+ 0x0a,0x22,0x40,0x20,0x20,0x63,0x20,0x23,0x31,0x38,0x31,0x38,0x33,0x31,
+ 0x33,0x31,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x23,0x20,0x20,0x63,
+ 0x20,0x23,0x31,0x38,0x31,0x38,0x33,0x39,0x33,0x39,0x65,0x37,0x65,0x37,
+ 0x22,0x2c,0x0a,0x22,0x24,0x20,0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,
+ 0x33,0x31,0x33,0x31,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x25,0x20,
+ 0x20,0x63,0x20,0x23,0x31,0x30,0x31,0x30,0x33,0x39,0x33,0x39,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x26,0x20,0x20,0x63,0x20,0x23,0x32,0x39,
+ 0x32,0x39,0x33,0x39,0x33,0x39,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,
+ 0x2a,0x20,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x33,0x39,0x33,0x39,
+ 0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x20,0x63,0x20,0x23,
+ 0x31,0x30,0x31,0x30,0x34,0x32,0x34,0x32,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x20,0x63,0x20,0x23,0x31,0x38,0x31,0x38,0x34,0x32,
+ 0x34,0x32,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x20,0x63,
+ 0x20,0x23,0x33,0x39,0x33,0x39,0x34,0x61,0x34,0x61,0x63,0x36,0x63,0x36,
+ 0x22,0x2c,0x0a,0x22,0x3a,0x20,0x20,0x63,0x20,0x23,0x32,0x39,0x32,0x39,
+ 0x35,0x32,0x35,0x32,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3e,0x20,
+ 0x20,0x63,0x20,0x23,0x32,0x39,0x32,0x39,0x35,0x61,0x35,0x61,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x2c,0x20,0x20,0x63,0x20,0x23,0x33,0x31,
+ 0x33,0x31,0x35,0x32,0x35,0x32,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,
+ 0x3c,0x20,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x35,0x61,0x35,0x61,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x31,0x20,0x20,0x63,0x20,0x23,
+ 0x33,0x31,0x33,0x31,0x36,0x33,0x36,0x33,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x32,0x20,0x20,0x63,0x20,0x23,0x33,0x39,0x33,0x39,0x36,0x62,
+ 0x36,0x62,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x33,0x20,0x20,0x63,
+ 0x20,0x23,0x34,0x61,0x34,0x61,0x35,0x61,0x35,0x61,0x62,0x64,0x62,0x64,
+ 0x22,0x2c,0x0a,0x22,0x34,0x20,0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,
+ 0x36,0x62,0x36,0x62,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x35,0x20,
+ 0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x37,0x33,0x37,0x33,0x62,0x35,
+ 0x62,0x35,0x22,0x2c,0x0a,0x22,0x36,0x20,0x20,0x63,0x20,0x23,0x37,0x33,
+ 0x37,0x33,0x37,0x62,0x37,0x62,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,
+ 0x37,0x20,0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,0x34,0x61,0x34,0x61,
+ 0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x38,0x20,0x20,0x63,0x20,0x23,
+ 0x34,0x61,0x34,0x61,0x35,0x32,0x35,0x32,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x35,0x61,
+ 0x35,0x61,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x30,0x20,0x20,0x63,
+ 0x20,0x23,0x35,0x32,0x35,0x32,0x35,0x61,0x35,0x61,0x63,0x36,0x63,0x36,
+ 0x22,0x2c,0x0a,0x22,0x71,0x20,0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,
+ 0x36,0x33,0x36,0x33,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x77,0x20,
+ 0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,0x36,0x62,0x36,0x62,0x63,0x65,
+ 0x63,0x65,0x22,0x2c,0x0a,0x22,0x65,0x20,0x20,0x63,0x20,0x23,0x35,0x61,
+ 0x35,0x61,0x36,0x62,0x36,0x62,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,
+ 0x72,0x20,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x37,0x33,0x37,0x33,
+ 0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x74,0x20,0x20,0x63,0x20,0x23,
+ 0x34,0x61,0x34,0x61,0x37,0x33,0x37,0x33,0x65,0x66,0x65,0x66,0x22,0x2c,
+ 0x0a,0x22,0x79,0x20,0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,0x37,0x33,
+ 0x37,0x33,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x75,0x20,0x20,0x63,
+ 0x20,0x23,0x34,0x61,0x34,0x61,0x37,0x62,0x37,0x62,0x66,0x66,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x69,0x20,0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,
+ 0x37,0x62,0x37,0x62,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x70,0x20,
+ 0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x37,0x33,0x37,0x33,0x63,0x36,
+ 0x63,0x36,0x22,0x2c,0x0a,0x22,0x61,0x20,0x20,0x63,0x20,0x23,0x36,0x33,
+ 0x36,0x33,0x37,0x33,0x37,0x33,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,
+ 0x73,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x37,0x62,0x37,0x62,
+ 0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x64,0x20,0x20,0x63,0x20,0x23,
+ 0x37,0x62,0x37,0x62,0x38,0x34,0x38,0x34,0x62,0x35,0x62,0x35,0x22,0x2c,
+ 0x0a,0x22,0x66,0x20,0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x38,0x34,
+ 0x38,0x34,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x67,0x20,0x20,0x63,
+ 0x20,0x23,0x35,0x61,0x35,0x61,0x38,0x34,0x38,0x34,0x65,0x66,0x65,0x66,
+ 0x22,0x2c,0x0a,0x22,0x68,0x20,0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,
+ 0x38,0x34,0x38,0x34,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x6a,0x20,
+ 0x20,0x63,0x20,0x23,0x35,0x32,0x35,0x32,0x38,0x34,0x38,0x34,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x6b,0x20,0x20,0x63,0x20,0x23,0x35,0x61,
+ 0x35,0x61,0x38,0x63,0x38,0x63,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x6c,0x20,0x20,0x63,0x20,0x23,0x35,0x61,0x35,0x61,0x39,0x34,0x39,0x34,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x7a,0x20,0x20,0x63,0x20,0x23,
+ 0x36,0x62,0x36,0x62,0x38,0x34,0x38,0x34,0x64,0x36,0x64,0x36,0x22,0x2c,
+ 0x0a,0x22,0x78,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x38,0x63,
+ 0x38,0x63,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x63,0x20,0x20,0x63,
+ 0x20,0x23,0x37,0x33,0x37,0x33,0x38,0x34,0x38,0x34,0x63,0x36,0x63,0x36,
+ 0x22,0x2c,0x0a,0x22,0x76,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,
+ 0x38,0x63,0x38,0x63,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x62,0x20,
+ 0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x38,0x34,0x38,0x34,0x65,0x37,
+ 0x65,0x37,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x20,0x63,0x20,0x23,0x36,0x33,
+ 0x36,0x33,0x38,0x63,0x38,0x63,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,
+ 0x6d,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x38,0x34,0x38,0x34,
+ 0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x20,0x63,0x20,0x23,
+ 0x36,0x33,0x36,0x33,0x39,0x34,0x39,0x34,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x4e,0x20,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x39,0x34,
+ 0x39,0x34,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x42,0x20,0x20,0x63,
+ 0x20,0x23,0x36,0x62,0x36,0x62,0x39,0x63,0x39,0x63,0x66,0x66,0x66,0x66,
+ 0x22,0x2c,0x0a,0x22,0x56,0x20,0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,
+ 0x39,0x63,0x39,0x63,0x65,0x37,0x65,0x37,0x22,0x2c,0x0a,0x22,0x43,0x20,
+ 0x20,0x63,0x20,0x23,0x37,0x33,0x37,0x33,0x39,0x63,0x39,0x63,0x66,0x66,
+ 0x66,0x66,0x22,0x2c,0x0a,0x22,0x5a,0x20,0x20,0x63,0x20,0x23,0x37,0x33,
+ 0x37,0x33,0x61,0x35,0x61,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,
+ 0x41,0x20,0x20,0x63,0x20,0x23,0x37,0x62,0x37,0x62,0x61,0x64,0x61,0x64,
+ 0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x53,0x20,0x20,0x63,0x20,0x23,
+ 0x38,0x34,0x38,0x34,0x38,0x34,0x38,0x34,0x62,0x35,0x62,0x35,0x22,0x2c,
+ 0x0a,0x22,0x44,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x38,0x63,
+ 0x38,0x63,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x46,0x20,0x20,0x63,
+ 0x20,0x23,0x38,0x63,0x38,0x63,0x39,0x34,0x39,0x34,0x62,0x35,0x62,0x35,
+ 0x22,0x2c,0x0a,0x22,0x47,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,
+ 0x39,0x34,0x39,0x34,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x48,0x20,
+ 0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x39,0x63,0x39,0x63,0x62,0x35,
+ 0x62,0x35,0x22,0x2c,0x0a,0x22,0x4a,0x20,0x20,0x63,0x20,0x23,0x39,0x63,
+ 0x39,0x63,0x39,0x63,0x39,0x63,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,
+ 0x4b,0x20,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x39,0x63,0x39,0x63,
+ 0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x4c,0x20,0x20,0x63,0x20,0x23,
+ 0x61,0x35,0x61,0x35,0x61,0x35,0x61,0x35,0x62,0x35,0x62,0x35,0x22,0x2c,
+ 0x0a,0x22,0x50,0x20,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x61,0x64,
+ 0x61,0x64,0x62,0x35,0x62,0x35,0x22,0x2c,0x0a,0x22,0x49,0x20,0x20,0x63,
+ 0x20,0x23,0x61,0x64,0x61,0x64,0x61,0x64,0x61,0x64,0x62,0x64,0x62,0x64,
+ 0x22,0x2c,0x0a,0x22,0x55,0x20,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,
+ 0x62,0x35,0x62,0x35,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x59,0x20,
+ 0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x62,0x64,0x62,0x64,0x62,0x64,
+ 0x62,0x64,0x22,0x2c,0x0a,0x22,0x54,0x20,0x20,0x63,0x20,0x47,0x72,0x61,
+ 0x79,0x37,0x34,0x22,0x2c,0x0a,0x22,0x52,0x20,0x20,0x63,0x20,0x23,0x38,
+ 0x34,0x38,0x34,0x39,0x34,0x39,0x34,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,
+ 0x22,0x45,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x39,0x34,0x39,
+ 0x34,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x57,0x20,0x20,0x63,0x20,
+ 0x23,0x38,0x63,0x38,0x63,0x61,0x35,0x61,0x35,0x63,0x65,0x63,0x65,0x22,
+ 0x2c,0x0a,0x22,0x51,0x20,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x61,
+ 0x64,0x61,0x64,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x21,0x20,0x20,
+ 0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x61,0x35,0x61,0x35,0x63,0x36,0x63,
+ 0x36,0x22,0x2c,0x0a,0x22,0x7e,0x20,0x20,0x63,0x20,0x23,0x39,0x34,0x39,
+ 0x34,0x61,0x64,0x61,0x64,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x5e,
+ 0x20,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x61,0x64,0x61,0x64,0x64,
+ 0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x2f,0x20,0x20,0x63,0x20,0x23,0x39,
+ 0x63,0x39,0x63,0x62,0x64,0x62,0x64,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,
+ 0x22,0x28,0x20,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x61,0x64,0x61,
+ 0x64,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x29,0x20,0x20,0x63,0x20,
+ 0x23,0x38,0x34,0x38,0x34,0x61,0x64,0x61,0x64,0x66,0x66,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x5f,0x20,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x34,0x62,
+ 0x35,0x62,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x60,0x20,0x20,
+ 0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x62,0x35,0x62,0x35,0x66,0x37,0x66,
+ 0x37,0x22,0x2c,0x0a,0x22,0x27,0x20,0x20,0x63,0x20,0x23,0x38,0x63,0x38,
+ 0x63,0x62,0x35,0x62,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x5d,
+ 0x20,0x20,0x63,0x20,0x23,0x38,0x63,0x38,0x63,0x62,0x64,0x62,0x64,0x66,
+ 0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x5b,0x20,0x20,0x63,0x20,0x23,0x39,
+ 0x34,0x39,0x34,0x62,0x64,0x62,0x64,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,
+ 0x22,0x7b,0x20,0x20,0x63,0x20,0x23,0x61,0x35,0x61,0x35,0x62,0x64,0x62,
+ 0x64,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x7d,0x20,0x20,0x63,0x20,
+ 0x23,0x62,0x35,0x62,0x35,0x62,0x35,0x62,0x35,0x63,0x36,0x63,0x36,0x22,
+ 0x2c,0x0a,0x22,0x7c,0x20,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x62,
+ 0x64,0x62,0x64,0x63,0x36,0x63,0x36,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x20,
+ 0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x62,0x64,0x62,0x64,0x65,0x66,0x65,
+ 0x66,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x20,0x63,0x20,0x23,0x38,0x63,0x38,
+ 0x63,0x63,0x36,0x63,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x58,
+ 0x2e,0x20,0x63,0x20,0x23,0x39,0x34,0x39,0x34,0x63,0x36,0x63,0x36,0x66,
+ 0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x6f,0x2e,0x20,0x63,0x20,0x23,0x39,
+ 0x34,0x39,0x34,0x63,0x65,0x63,0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,
+ 0x22,0x4f,0x2e,0x20,0x63,0x20,0x23,0x39,0x63,0x39,0x63,0x63,0x65,0x63,
+ 0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x2b,0x2e,0x20,0x63,0x20,
+ 0x23,0x61,0x35,0x61,0x35,0x64,0x36,0x64,0x36,0x66,0x66,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x40,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,0x64,0x64,
+ 0x65,0x64,0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x23,0x2e,0x20,
+ 0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x64,0x36,0x64,0x36,0x66,0x66,0x66,
+ 0x66,0x22,0x2c,0x0a,0x22,0x24,0x2e,0x20,0x63,0x20,0x23,0x61,0x64,0x61,
+ 0x64,0x65,0x37,0x65,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x25,
+ 0x2e,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x65,0x37,0x65,0x37,0x66,
+ 0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x26,0x2e,0x20,0x63,0x20,0x23,0x62,
+ 0x64,0x62,0x64,0x65,0x37,0x65,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,
+ 0x22,0x2a,0x2e,0x20,0x63,0x20,0x23,0x62,0x64,0x62,0x64,0x65,0x66,0x65,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3d,0x2e,0x20,0x63,0x20,
+ 0x23,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x22,
+ 0x2c,0x0a,0x22,0x2d,0x2e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x63,
+ 0x65,0x63,0x65,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x3b,0x2e,0x20,
+ 0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x65,0x66,0x65,0x66,0x66,0x66,0x66,
+ 0x66,0x22,0x2c,0x0a,0x22,0x3a,0x2e,0x20,0x63,0x20,0x23,0x63,0x65,0x63,
+ 0x65,0x65,0x66,0x65,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3e,
+ 0x2e,0x20,0x63,0x20,0x23,0x63,0x36,0x63,0x36,0x66,0x37,0x66,0x37,0x66,
+ 0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x2c,0x2e,0x20,0x63,0x20,0x23,0x63,
+ 0x65,0x63,0x65,0x66,0x37,0x66,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,
+ 0x22,0x3c,0x2e,0x20,0x63,0x20,0x23,0x64,0x36,0x64,0x36,0x66,0x37,0x66,
+ 0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x31,0x2e,0x20,0x63,0x20,
+ 0x23,0x65,0x37,0x65,0x37,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x22,
+ 0x2c,0x0a,0x22,0x32,0x2e,0x20,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,
+ 0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,
+ 0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x54,0x20,0x21,0x20,0x66,0x20,0x47,
+ 0x20,0x54,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x59,
+ 0x20,0x2d,0x2e,0x3b,0x2e,0x74,0x20,0x44,0x20,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x54,0x20,0x7b,0x20,0x2a,0x2e,0x6f,0x2e,0x68,
+ 0x20,0x70,0x20,0x54,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x59,0x20,0x2f,
+ 0x20,0x4f,0x2e,0x2b,0x2e,0x4f,0x2e,0x75,0x20,0x36,0x20,0x54,0x20,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x54,0x20,0x51,0x20,0x58,0x2e,0x58,0x2e,0x6f,0x2e,0x4f,
+ 0x2e,0x6b,0x20,0x61,0x20,0x55,0x20,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x50,0x20,0x45,0x20,0x6d,0x20,0x7a,0x20,0x63,0x20,0x52,0x20,0x4b,
+ 0x20,0x7d,0x20,0x54,0x20,0x7c,0x20,0x54,0x20,0x48,0x20,0x56,0x20,0x5d,
+ 0x20,0x5d,0x20,0x5d,0x20,0x58,0x2e,0x58,0x2e,0x6c,0x20,0x39,0x20,0x49,
+ 0x20,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x78,0x20,0x3c,0x2e,0x31,0x2e,0x3a,
+ 0x2e,0x23,0x2e,0x4f,0x2e,0x60,0x20,0x28,0x20,0x57,0x20,0x7e,0x20,0x5e,
+ 0x20,0x20,0x2e,0x27,0x20,0x41,0x20,0x5f,0x20,0x5f,0x20,0x5d,0x20,0x5d,
+ 0x20,0x5d,0x20,0x6a,0x20,0x77,0x20,0x50,0x20,0x22,0x2c,0x0a,0x22,0x67,
+ 0x20,0x3e,0x2e,0x25,0x2e,0x24,0x2e,0x40,0x2e,0x25,0x2e,0x25,0x2e,0x26,
+ 0x2e,0x3b,0x2e,0x2c,0x2e,0x3c,0x2e,0x3b,0x2e,0x5b,0x20,0x41,0x20,0x5f,
+ 0x20,0x5f,0x20,0x5f,0x20,0x29,0x20,0x5f,0x20,0x5d,0x20,0x75,0x20,0x71,
+ 0x20,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x24,0x2e,0x4f,0x2e,0x5b,0x20,0x5d,
+ 0x20,0x5d,0x20,0x5d,0x20,0x5f,0x20,0x5d,0x20,0x5d,0x20,0x5d,0x20,0x5f,
+ 0x20,0x41,0x20,0x29,0x20,0x41,0x20,0x29,0x20,0x41,0x20,0x41,0x20,0x5a,
+ 0x20,0x5a,0x20,0x4d,0x20,0x2c,0x20,0x22,0x2c,0x0a,0x22,0x67,0x20,0x4f,
+ 0x2e,0x58,0x2e,0x5f,0x20,0x5f,0x20,0x41,0x20,0x41,0x20,0x41,0x20,0x41,
+ 0x20,0x41,0x20,0x41,0x20,0x41,0x20,0x5f,0x20,0x41,0x20,0x41,0x20,0x41,
+ 0x20,0x41,0x20,0x5a,0x20,0x4e,0x20,0x6a,0x20,0x3e,0x20,0x23,0x20,0x22,
+ 0x2c,0x0a,0x22,0x72,0x20,0x2e,0x2e,0x5f,0x20,0x5a,0x20,0x42,0x20,0x4d,
+ 0x20,0x6b,0x20,0x6b,0x20,0x75,0x20,0x32,0x20,0x32,0x20,0x6b,0x20,0x41,
+ 0x20,0x41,0x20,0x41,0x20,0x41,0x20,0x43,0x20,0x42,0x20,0x69,0x20,0x3a,
+ 0x20,0x6f,0x20,0x33,0x20,0x22,0x2c,0x0a,0x22,0x65,0x20,0x79,0x20,0x31,
+ 0x20,0x3a,0x20,0x2d,0x20,0x24,0x20,0x2b,0x20,0x40,0x20,0x26,0x20,0x3b,
+ 0x20,0x3b,0x20,0x2b,0x20,0x6b,0x20,0x29,0x20,0x5a,0x20,0x5a,0x20,0x42,
+ 0x20,0x75,0x20,0x2d,0x20,0x6f,0x20,0x37,0x20,0x55,0x20,0x22,0x2c,0x0a,
+ 0x22,0x4c,0x20,0x39,0x20,0x26,0x20,0x26,0x20,0x33,0x20,0x34,0x20,0x53,
+ 0x20,0x4a,0x20,0x55,0x20,0x54,0x20,0x54,0x20,0x46,0x20,0x62,0x20,0x5a,
+ 0x20,0x43,0x20,0x4e,0x20,0x6a,0x20,0x2d,0x20,0x6f,0x20,0x2a,0x20,0x4c,
+ 0x20,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x59,0x20,0x50,0x20,0x59,
+ 0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x54,0x20,0x57,0x20,0x4d,0x20,0x4d,0x20,0x79,0x20,0x25,0x20,0x6f,
+ 0x20,0x38,0x20,0x50,0x20,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x57,0x20,0x6a,0x20,0x79,
+ 0x20,0x3d,0x20,0x2e,0x20,0x30,0x20,0x59,0x20,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x76,0x20,0x3c,0x20,0x25,0x20,0x58,0x20,0x34,0x20,0x50,0x20,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x73,0x20,0x4f,0x20,0x20,0x20,0x35,
+ 0x20,0x7c,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,
+ 0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x44,
+ 0x20,0x26,0x20,0x64,0x20,0x54,0x20,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,0x22,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x22,0x2c,0x0a,
+ 0x22,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,0x2e,0x32,
+ 0x2e,0x32,0x2e,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_adjustsize_png_len = 495;
+static const unsigned char small_adjustsize_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x81,0x49,0x44,0x41,0x54,0x28,0x15,0x05,0xc1,
+ 0x3b,0x6e,0x13,0x41,0x00,0x00,0xd0,0x37,0xeb,0xb1,0xc9,0x5a,0x96,0x50,
+ 0x10,0x14,0x71,0x44,0x42,0x83,0x90,0xa8,0x88,0x28,0xb8,0x47,0x6e,0x41,
+ 0x81,0xa0,0xa2,0x40,0x42,0xb4,0x40,0x9b,0xe4,0x0c,0x50,0x50,0xd3,0xd0,
+ 0x70,0x19,0x0c,0xa2,0xc0,0x90,0x58,0xd9,0xcc,0xee,0x7c,0x78,0x2f,0x36,
+ 0x21,0x98,0x99,0xe9,0x04,0x01,0x40,0xd3,0x54,0x45,0x69,0x0d,0x80,0x18,
+ 0x82,0x85,0xa5,0x95,0xde,0x42,0x07,0xa0,0xca,0x46,0x83,0x31,0x4c,0x9a,
+ 0xaa,0xc8,0x4a,0x34,0xb3,0x3c,0xfd,0x03,0x00,0x00,0x8f,0xf5,0xe6,0xe6,
+ 0x3a,0xbc,0x5c,0xdb,0x19,0xa2,0x99,0x55,0xf5,0x19,0x00,0xc0,0x85,0x27,
+ 0xd6,0xee,0x58,0x59,0x38,0x63,0x6d,0x63,0x8a,0x3a,0x7d,0x95,0x00,0x00,
+ 0x64,0xbf,0x2d,0xf5,0x16,0x3a,0x95,0x7d,0x5b,0x97,0x51,0xb0,0x28,0xae,
+ 0x01,0x00,0x8c,0xb6,0xee,0x1a,0xf4,0x3a,0x85,0x5e,0xd4,0x45,0x41,0x37,
+ 0xd9,0x01,0x00,0x48,0xae,0x25,0xc9,0xa8,0x53,0x00,0x11,0x8a,0x1d,0xe0,
+ 0x04,0x3c,0x74,0x2e,0x29,0x26,0xa3,0x24,0xc8,0x80,0x08,0xd9,0x0e,0x00,
+ 0x0f,0x7c,0xb0,0x34,0x9a,0x8c,0x46,0x49,0x30,0x01,0x22,0x64,0x3b,0x00,
+ 0xf7,0x5d,0xf9,0xa5,0x97,0x4c,0x46,0x49,0x42,0x06,0x44,0xc8,0xae,0x00,
+ 0x47,0xde,0xb8,0xf2,0xce,0x6b,0x49,0x36,0x4a,0x12,0x26,0x40,0xd4,0xd4,
+ 0xec,0x1a,0xf0,0xca,0x9e,0x3d,0x2f,0xbc,0xf7,0xcc,0x81,0x6c,0x74,0xa3,
+ 0xca,0x80,0xa8,0xc9,0xd5,0x57,0x00,0xc0,0x53,0xdf,0x1d,0x3b,0x96,0xfd,
+ 0x70,0x20,0x03,0xa2,0x6a,0x7c,0xe4,0xc4,0x3f,0x83,0x0c,0xe0,0xd0,0x91,
+ 0x4f,0xee,0x29,0x3e,0xba,0x30,0x01,0xa2,0x62,0xe8,0xac,0xcc,0x4c,0x2a,
+ 0x80,0xce,0xa1,0xe7,0xce,0xed,0xd9,0xb8,0x91,0x01,0x51,0x31,0x32,0x17,
+ 0x54,0x0d,0x40,0xd0,0x29,0x6e,0xd9,0x20,0xc9,0x80,0xd8,0x5a,0x98,0x9a,
+ 0xce,0x5c,0x03,0x00,0x7f,0x9d,0xf9,0x09,0x46,0x13,0x20,0xa2,0x55,0x05,
+ 0x00,0xc0,0x6d,0x6f,0x01,0x49,0x01,0x44,0xd4,0xe2,0x1b,0x00,0x00,0x00,
+ 0xc0,0x20,0xab,0x11,0xe5,0xcb,0xda,0xda,0xbe,0x1e,0x00,0x00,0xc0,0x60,
+ 0x6b,0x50,0x22,0xb2,0x9d,0x8d,0xad,0x08,0x00,0x00,0x20,0x1b,0xec,0xe4,
+ 0x88,0x62,0x30,0xb9,0xd4,0x01,0x00,0x00,0xa8,0x8a,0xac,0xfc,0x07,0xf0,
+ 0x84,0xac,0x17,0x4d,0x9c,0xec,0x12,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,
+ 0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_buttongroup_png_len = 648;
+static const unsigned char small_buttongroup_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0x1a,0x49,0x44,0x41,0x54,0x48,0xc7,0xb5,0x94,
+ 0xbf,0x8b,0x1a,0x41,0x14,0xc7,0x97,0x80,0x20,0x78,0x57,0xe4,0x9f,0xb0,
+ 0xb3,0x4b,0x65,0x40,0xf0,0x17,0x57,0x9c,0xdb,0x88,0x6b,0x11,0x41,0x2c,
+ 0x02,0x82,0x88,0x85,0x68,0x63,0x21,0x16,0x16,0x0a,0x16,0x12,0x10,0x44,
+ 0x10,0x11,0xc5,0x1f,0x8d,0x68,0x11,0xb0,0x11,0x22,0x11,0xb1,0xb2,0xb0,
+ 0x31,0x85,0x8d,0x8d,0x85,0x8d,0x85,0x85,0x20,0xc8,0xcb,0xbc,0xc7,0xce,
+ 0xb0,0xdc,0xa8,0x47,0xf0,0x22,0x7c,0x98,0x99,0xaf,0xbb,0x1f,0xc7,0x37,
+ 0xcc,0x53,0x00,0x40,0xf9,0x1f,0xc8,0x81,0xa2,0x68,0x8c,0x5f,0x0c,0xb8,
+ 0x03,0x7e,0xaf,0xbd,0x2b,0x66,0x9f,0x4f,0x0c,0x13,0xc3,0xcc,0xf8,0xfd,
+ 0x8e,0x94,0x83,0xcf,0x3d,0x1b,0x78,0x62,0x58,0x74,0x87,0x89,0xa4,0x4e,
+ 0xa7,0xf3,0x9b,0xdb,0xed,0x9e,0x79,0x3c,0x1e,0x78,0x04,0x97,0xcb,0xb5,
+ 0xb0,0xdb,0xed,0x51,0xe6,0xfc,0x8c,0x62,0x13,0x4a,0x57,0xab,0x15,0x5c,
+ 0x2e,0x97,0x87,0x40,0x07,0xdb,0xe4,0x92,0x39,0xad,0x28,0x36,0xe3,0xaf,
+ 0x9d,0xcf,0x67,0x62,0x3c,0x1e,0xc3,0x70,0x38,0x84,0x6e,0xb7,0x0b,0xc5,
+ 0x62,0x51,0xe4,0xbc,0x04,0xf3,0xf9,0x5c,0x64,0xd7,0x40,0x17,0x7b,0xce,
+ 0x8e,0x62,0x0b,0x2e,0x4e,0xa7,0x13,0x31,0x18,0x0c,0xe0,0xcb,0xcf,0xef,
+ 0xa0,0x74,0x3d,0x10,0x8b,0xc5,0x44,0x8e,0x94,0x4a,0x25,0x92,0x1b,0xb3,
+ 0xb7,0xe8,0xe2,0x17,0x14,0x3f,0xe1,0xe2,0x78,0x3c,0x12,0xed,0x76,0x9b,
+ 0xa4,0xca,0x8f,0xaf,0x10,0x89,0x44,0x44,0x8e,0x42,0xe3,0x78,0x0b,0x5d,
+ 0xfc,0x8a,0xe2,0x67,0x5c,0x1c,0x0e,0x07,0x22,0x9f,0xcf,0x43,0x34,0x1a,
+ 0x85,0x70,0x38,0x0c,0xc1,0x60,0x50,0xe4,0xf1,0x78,0x5c,0x94,0xa3,0x50,
+ 0x28,0x50,0xf6,0x76,0x44,0x74,0xb1,0x2a,0xc4,0xfb,0xfd,0xfe,0x43,0x90,
+ 0xc4,0xbb,0xdd,0x8e,0x18,0x8d,0x46,0xd0,0xeb,0xf5,0xa0,0xd1,0x68,0x40,
+ 0x36,0x9b,0x15,0x39,0xee,0x94,0xcf,0xef,0x21,0x89,0xb7,0xdb,0x2d,0xd1,
+ 0xe9,0x74,0xc4,0xe1,0x61,0x8d,0x79,0xce,0xcb,0x90,0xcb,0xe5,0x44,0x76,
+ 0x0d,0x49,0xbc,0xd9,0x6c,0x88,0x5a,0xad,0x26,0x0e,0x0f,0x6b,0xcc,0x73,
+ 0x94,0x1a,0xc7,0x5b,0x48,0xe2,0xf5,0x7a,0x4d,0xa4,0xd3,0x69,0x08,0x85,
+ 0x42,0x10,0x08,0x04,0x40,0x55,0x55,0x91,0xf3,0x1d,0x67,0x32,0x19,0x5a,
+ 0xdf,0x1a,0x25,0x31,0xde,0x9a,0x8f,0x40,0x12,0x2f,0x97,0x4b,0xa2,0xdf,
+ 0xef,0xd3,0xc1,0x55,0x2a,0x15,0x48,0x26,0x93,0x22,0x6f,0xb5,0x5a,0xb4,
+ 0xe3,0x54,0x2a,0x25,0xb2,0x6b,0x48,0xe2,0xc5,0x62,0x41,0xd4,0xeb,0x75,
+ 0x71,0x78,0x9a,0xa6,0x89,0x1c,0xa5,0x7c,0x7e,0x0f,0x49,0x3c,0x9b,0xcd,
+ 0x88,0x72,0xb9,0x2c,0x0e,0x0f,0x6b,0xcc,0x73,0x14,0xf3,0xf9,0x3d,0x8c,
+ 0x62,0xba,0xd2,0xd3,0xe9,0x94,0xc0,0xfe,0xe0,0xf7,0xfb,0xc1,0xe7,0xf3,
+ 0x81,0xd7,0xeb,0x15,0x79,0xb5,0x5a,0x25,0x79,0x22,0x91,0xa0,0xf5,0xad,
+ 0xd1,0x78,0xa5,0x2d,0xd8,0x47,0x9b,0xcd,0x26,0x4c,0x26,0x93,0x87,0x40,
+ 0x87,0xc3,0xe1,0xf8,0xc3,0x9b,0x90,0x19,0x9b,0x33,0xf6,0xd1,0x47,0x1b,
+ 0x3d,0x4a,0x6d,0x36,0x5b,0x89,0xb7,0x4d,0x93,0xde,0xf1,0xad,0x7a,0xf0,
+ 0xa2,0xff,0x15,0xf5,0x1f,0x79,0xd5,0xdf,0x45,0x87,0xf5,0x2f,0xff,0xbc,
+ 0x8d,0x3a,0x81,0x5d,0xdc,0x05,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,
+ 0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_checkbox_png_len = 817;
+static const unsigned char small_checkbox_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0xc3,0x49,0x44,0x41,0x54,0x48,0xc7,0xcd,0xd5,
+ 0xdd,0x4b,0x53,0x71,0x1c,0xc7,0xf1,0x19,0x4b,0x06,0xba,0x34,0xbd,0x69,
+ 0x12,0xa2,0x5e,0x68,0x74,0x93,0xba,0xf2,0xa2,0x89,0xc3,0x39,0x6f,0xd4,
+ 0xcd,0x21,0x08,0xd1,0x1f,0x90,0xbb,0x88,0xcd,0x3d,0x34,0x63,0x93,0xe6,
+ 0xc3,0xa6,0x6d,0xea,0x36,0x1f,0x26,0xdb,0x45,0xed,0x79,0x16,0x74,0xd3,
+ 0x75,0x50,0x74,0x19,0x04,0x5d,0x94,0xe2,0x8d,0xf8,0xa7,0x7c,0xfa,0xfc,
+ 0x8e,0xe7,0x94,0x5b,0xa6,0x53,0x08,0x1a,0xbc,0x61,0xb2,0xdf,0xef,0xb5,
+ 0xb3,0xc3,0xf7,0x77,0x54,0x01,0x50,0xfd,0x8b,0x54,0xff,0x2d,0xcc,0xd7,
+ 0x03,0x96,0x61,0x41,0x76,0x8b,0x5d,0xfb,0x05,0xf3,0x55,0xc7,0xd4,0x4c,
+ 0xc3,0x1a,0x98,0xb6,0xc6,0x8c,0xac,0xb8,0x3b,0x30,0x80,0xe7,0xcd,0xcd,
+ 0x02,0x7a,0xc5,0xda,0x25,0x4b,0x86,0xd5,0xc1,0x60,0x10,0x4e,0xa7,0x13,
+ 0x33,0x33,0x33,0x35,0x35,0x3d,0x3d,0x8d,0xce,0xce,0x4e,0xa4,0x4c,0x26,
+ 0x1c,0x8d,0x8e,0xe2,0x3b,0xaf,0xf1,0x29,0xa3,0x15,0x95,0x2e,0x4e,0x86,
+ 0x35,0x02,0x7d,0xb3,0xb7,0x87,0x4c,0xe6,0x35,0xb2,0xd9,0x2c,0x72,0xb9,
+ 0x1c,0xf2,0xac,0x50,0xc8,0xa3,0x58,0x2c,0xa2,0x54,0x2a,0xa2,0x5c,0x2e,
+ 0x49,0x6b,0xa2,0xd1,0x28,0xc6,0xc7,0xc7,0x25,0xf4,0x78,0x62,0x02,0x3f,
+ 0x08,0xbe,0x63,0xb3,0x27,0xf0,0x7b,0x76,0x53,0x81,0x1b,0xc4,0x55,0x08,
+ 0x74,0x65,0x65,0x05,0x2f,0x57,0x57,0x11,0x89,0x44,0x08,0x44,0xb0,0xbe,
+ 0xb6,0x86,0x8d,0x8d,0x75,0xc4,0x63,0x31,0x24,0x12,0x71,0x3c,0x9f,0x9b,
+ 0xc3,0xf0,0xf0,0x70,0x05,0xfa,0x96,0x3d,0x39,0x41,0x3f,0xb2,0xc7,0xac,
+ 0x45,0x81,0xb5,0x02,0xce,0x66,0x33,0x67,0xa0,0x1b,0xb5,0xa2,0x5f,0x98,
+ 0x83,0x75,0xb0,0xc6,0x0a,0x58,0xfc,0x7c,0x81,0x2e,0x2d,0x2e,0xc2,0x66,
+ 0xb3,0xc1,0x68,0x34,0xc2,0xeb,0xf1,0x20,0x11,0x8f,0x61,0xee,0x7c,0x94,
+ 0xb7,0x58,0xf5,0x82,0xdd,0x63,0xcd,0xec,0xfa,0x1f,0xb0,0x40,0x4d,0xdc,
+ 0x3c,0xdf,0xdb,0x8b,0x2d,0x9d,0x0e,0x43,0x43,0x43,0xf0,0x78,0xdc,0xe7,
+ 0xa1,0xa2,0x24,0x1b,0x65,0xb7,0x25,0x54,0x4c,0xd9,0x69,0x38,0x9f,0xcf,
+ 0xc1,0x36,0x39,0x29,0xa1,0xc7,0x56,0x2b,0x0e,0xdb,0xdb,0x11,0xe7,0xc6,
+ 0xb6,0xb6,0x36,0xa4,0x08,0x57,0xa3,0x77,0x7a,0x7a,0x14,0x98,0x7f,0xaa,
+ 0xee,0x4b,0xf7,0x96,0xe8,0xe9,0x39,0x96,0xe0,0x42,0xa1,0x80,0xc1,0xc1,
+ 0x41,0xec,0x12,0x3a,0xec,0xe8,0xc0,0x41,0x6b,0x2b,0xf6,0xb5,0x5a,0x7c,
+ 0xd6,0xeb,0x71,0x64,0x36,0x57,0xa0,0xfd,0xfd,0xfd,0x98,0x9a,0x9a,0x52,
+ 0xe0,0x47,0xec,0x2e,0xbb,0x51,0x71,0xf2,0x14,0x58,0x8c,0x95,0xdb,0xed,
+ 0x86,0xc1,0xf0,0x10,0xdb,0xfc,0x48,0xa0,0x07,0x4d,0x4d,0x38,0x68,0x69,
+ 0xc1,0xb7,0x2a,0xd4,0x6e,0xb7,0xc3,0xe5,0x9a,0x55,0x60,0x1b,0xeb,0x11,
+ 0xce,0x99,0x70,0x89,0x70,0x8c,0x53,0xe0,0x76,0xb9,0xa0,0xe3,0xfd,0xfd,
+ 0xc4,0x2b,0xdf,0xaf,0xaf,0xc7,0x07,0x2e,0xcb,0x55,0xa1,0x62,0x04,0xfd,
+ 0x7e,0xbf,0x02,0x5b,0x59,0xf7,0x5f,0xe1,0x72,0xa9,0xc4,0x09,0x88,0x4b,
+ 0xe3,0x65,0xb5,0x58,0x10,0x68,0x6c,0xc4,0x57,0x2e,0x29,0x2b,0x68,0x5f,
+ 0x9f,0x74,0xea,0x04,0x9a,0x4e,0xa7,0xb1,0xb0,0x10,0x54,0x60,0xcb,0xb9,
+ 0xf0,0x5e,0xb9,0x8c,0xcd,0xcd,0x04,0xb6,0xb6,0x36,0x11,0x0e,0x87,0x31,
+ 0x32,0x62,0x82,0x53,0x3e,0x51,0x7a,0xde,0x67,0xbb,0x5d,0x41,0x53,0x9c,
+ 0xa0,0x2c,0x42,0xa1,0xe5,0xda,0x60,0x71,0x5c,0x05,0xba,0xb3,0xb3,0x8d,
+ 0x64,0x32,0xc9,0x53,0x18,0x86,0x95,0xd3,0x61,0x30,0x18,0xe0,0x70,0x38,
+ 0xa4,0x5f,0x92,0x4e,0x11,0xe5,0x91,0x2f,0x16,0x0b,0xfc,0xf2,0xd0,0xc5,
+ 0xf0,0xd8,0xd8,0x18,0xe2,0x3c,0x08,0x5e,0xaf,0x17,0x3e,0x9f,0x4f,0x3a,
+ 0x10,0xe2,0xa4,0x89,0xf7,0x3e,0xdf,0x33,0xa9,0x40,0xc0,0x0f,0xf1,0xb0,
+ 0x0a,0x2d,0x2f,0x21,0x1c,0x0a,0x61,0x3e,0x10,0xb8,0x10,0x6e,0x50,0xfd,
+ 0x1e,0xf6,0xab,0x64,0x66,0x5d,0xc2,0xa9,0x86,0xc5,0x73,0x58,0xc7,0xf4,
+ 0xf2,0x22,0xcb,0x25,0x32,0xcb,0xfb,0xc4,0x7e,0x4d,0x35,0xac,0x96,0x1f,
+ 0xdc,0x3a,0xf9,0x9b,0xbb,0x2f,0x51,0x97,0xbc,0x4f,0xec,0x57,0x57,0xc3,
+ 0x57,0xfd,0x0f,0xa2,0x95,0xd7,0x6b,0xe4,0xfd,0x75,0x0a,0xfc,0x13,0xde,
+ 0x0c,0x36,0x4e,0x07,0x4d,0xc5,0xde,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,
+ 0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_closebutton_png_len = 585;
+static const unsigned char small_closebutton_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x19,0x74,0x45,0x58,0x74,0x53,
+ 0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,0x65,0x20,
+ 0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,0x65,0x3c,
+ 0x00,0x00,0x01,0xeb,0x49,0x44,0x41,0x54,0x78,0x9c,0xa5,0x95,0xcb,0x6a,
+ 0xdb,0x50,0x10,0x86,0x3f,0xd9,0xb2,0x53,0x15,0x8b,0xa6,0xd4,0x25,0x86,
+ 0x6e,0x9c,0x8d,0xbd,0xee,0xaa,0xd0,0xbc,0x48,0xdf,0xa0,0xd0,0x17,0x31,
+ 0x86,0xbe,0x43,0xf6,0x7d,0x0b,0x83,0x37,0x01,0xb7,0x38,0x02,0x9b,0xba,
+ 0x18,0xd2,0x65,0x4a,0x4f,0x20,0xc2,0x6a,0x84,0xa5,0x73,0xc9,0x42,0x17,
+ 0x24,0x45,0x35,0xb6,0xf3,0xc3,0xc0,0xb9,0xcc,0xf9,0x34,0x67,0xe6,0x30,
+ 0xb2,0x80,0xc6,0x78,0x3c,0xfe,0xa4,0xb5,0xfe,0x22,0x84,0xb8,0x08,0x82,
+ 0x80,0x43,0xe5,0xfb,0x3e,0x9e,0xe7,0x5d,0x2d,0x97,0xcb,0x4b,0xe0,0x1b,
+ 0xf0,0x00,0xd0,0x1a,0x8d,0x46,0xd3,0xf5,0x7a,0x6d,0x94,0x52,0x47,0xdb,
+ 0x64,0x32,0x31,0xc0,0x0f,0x60,0x00,0xbc,0xb6,0x81,0xa6,0x10,0xe2,0xa2,
+ 0xdf,0xef,0xa3,0x94,0x3a,0x38,0xda,0x4c,0x8e,0xe3,0x00,0xbc,0x07,0xba,
+ 0xc0,0x3f,0x1b,0x68,0x06,0x41,0x80,0x94,0x12,0x63,0xcc,0xd1,0xe0,0x28,
+ 0x8a,0xb2,0xa1,0x0b,0x9c,0xd8,0x80,0x05,0xa0,0xb5,0x2e,0x45,0xdc,0x71,
+ 0x5d,0x00,0x82,0xcd,0xe6,0x09,0xa4,0x6e,0xaf,0x70,0xd6,0x06,0x9a,0x39,
+ 0x58,0x29,0x55,0x9b,0x8a,0x8e,0xeb,0xe2,0xdf,0xdf,0xe7,0xf3,0x57,0xa7,
+ 0xa7,0x75,0x30,0xb4,0xd6,0xd9,0xb0,0x01,0x58,0x8d,0xa2,0x93,0x94,0x32,
+ 0xb7,0x3b,0x21,0x4a,0x30,0x29,0x65,0x09,0x7a,0x27,0x44,0xc9,0xbf,0x1a,
+ 0x94,0x5d,0x05,0x17,0xf5,0xe7,0xf6,0x96,0xb3,0x5e,0x0f,0x80,0x37,0xdd,
+ 0x6e,0x69,0x9d,0x8a,0x6f,0x15,0x9c,0x47,0x5c,0x85,0x96,0x20,0x3b,0xe6,
+ 0x00,0x71,0x1c,0x13,0xc7,0x71,0x7d,0xc4,0x52,0xca,0x62,0x65,0x73,0xf5,
+ 0xcf,0xcf,0x4b,0xf3,0xb3,0x5e,0x8f,0xdf,0x37,0x37,0x44,0x51,0x44,0xbb,
+ 0xdd,0xde,0x2f,0xe2,0x28,0x8a,0x4a,0x56,0x84,0xfe,0x5a,0xad,0x9e,0x7c,
+ 0xac,0xe8,0x5b,0xbd,0x71,0x6d,0xf1,0x00,0x06,0xc3,0x61,0xee,0xb4,0x5c,
+ 0x2c,0x90,0x52,0xb2,0x5c,0x2c,0xf2,0xb5,0xc1,0x70,0xb8,0xb3,0x78,0x39,
+ 0x38,0xcb,0x53,0x1c,0xc7,0x84,0x61,0x98,0x3b,0x5c,0xcf,0xe7,0xa5,0xbd,
+ 0xeb,0xf9,0x9c,0xba,0x33,0xd5,0x88,0xff,0xfb,0x2a,0xbe,0xcf,0x66,0x59,
+ 0x8e,0xa8,0xaa,0x6e,0x6f,0x27,0xb8,0x5a,0xd9,0x43,0xb4,0xf3,0x1d,0x3f,
+ 0xa7,0x09,0xd5,0x81,0x8d,0xef,0xfb,0xb5,0x05,0xd8,0x57,0xdb,0xed,0x96,
+ 0x42,0x1f,0xd7,0x80,0xb1,0x01,0xe3,0x79,0xde,0xd5,0x74,0x3a,0xfd,0xe0,
+ 0x38,0xce,0x51,0xf0,0x30,0x0c,0x99,0x25,0x79,0x5f,0x01,0x12,0x50,0x00,
+ 0x2f,0x80,0xcf,0x24,0x4d,0xda,0x3c,0xc3,0x7e,0x02,0x5f,0x81,0x8f,0xc0,
+ 0x3b,0x0b,0x68,0x01,0x1d,0xe0,0x2d,0x49,0x93,0x76,0x49,0x52,0x94,0x3f,
+ 0xc5,0x3d,0xa4,0xd3,0x48,0x37,0x80,0x00,0xfe,0x5a,0x29,0xa0,0x05,0xbc,
+ 0x4c,0xed,0x04,0x68,0x92,0xb6,0xd3,0x3d,0x65,0xd2,0xeb,0x6f,0x49,0xfe,
+ 0x77,0x0f,0x96,0x31,0x06,0xcb,0xb2,0x1a,0x29,0x2c,0x33,0xeb,0x08,0x70,
+ 0x06,0x57,0x80,0x7a,0x04,0xa5,0x20,0xa7,0x6d,0xec,0x70,0x28,0x0f,0x00,
+ 0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_combobox_png_len = 549;
+static const unsigned char small_combobox_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xb7,0x49,0x44,0x41,0x54,0x48,0xc7,0xad,0x95,
+ 0x3f,0x48,0x02,0x51,0x18,0xc0,0x1f,0x4d,0x41,0xb4,0xb4,0x05,0xed,0x2d,
+ 0x12,0xa8,0x8b,0x34,0xd8,0x72,0x26,0x04,0x65,0x09,0x21,0xb4,0x27,0xcd,
+ 0x0d,0x62,0xbb,0x93,0x42,0x8b,0x83,0x28,0x88,0xa0,0xcb,0x0d,0x82,0xe0,
+ 0xe2,0xe2,0xa2,0x9e,0x1e,0xa2,0x90,0x82,0x48,0x74,0x82,0x21,0x38,0xb8,
+ 0x88,0x6e,0x6e,0x5f,0xef,0x7b,0x79,0xd7,0xa9,0x4f,0xe9,0xee,0x1c,0x7e,
+ 0xbc,0x7f,0xf7,0x7e,0xef,0xf1,0xbd,0x77,0xdf,0x23,0x84,0x90,0x27,0xca,
+ 0x27,0x05,0xf6,0x80,0x42,0x79,0xa1,0x9c,0x50,0x88,0x54,0xab,0xd5,0x60,
+ 0xb1,0x58,0xfc,0x8b,0x64,0x32,0xb9,0x75,0x0c,0x3d,0xd4,0xf7,0x41,0x39,
+ 0x47,0x31,0x4c,0xa7,0x53,0x8d,0x7c,0x3e,0xbf,0xb3,0x1e,0x8f,0xc7,0x59,
+ 0xc9,0xdb,0xb1,0xae,0xff,0x92,0x89,0x47,0xa3,0x11,0x23,0x97,0xcb,0x6d,
+ 0xd4,0xd7,0xcb,0x58,0x2c,0xa6,0xb5,0xf5,0x52,0x75,0x7c,0xd9,0xf6,0x32,
+ 0x71,0xbf,0xdf,0xd7,0x48,0xa5,0x52,0x3b,0xeb,0x91,0x48,0x64,0xa5,0x0f,
+ 0xe7,0xeb,0xbf,0x5b,0x8a,0x6f,0x50,0xdc,0x4c,0xa7,0xd3,0x20,0xcb,0x32,
+ 0x48,0x92,0x04,0xd5,0x6a,0x15,0x2a,0x95,0xca,0x56,0x42,0xa1,0xd0,0x4a,
+ 0x3b,0x1a,0x8d,0x6a,0xf5,0x44,0x22,0x81,0xd2,0x2f,0xca,0x2d,0x59,0x9e,
+ 0xe2,0xb7,0xcf,0xe7,0x03,0x8f,0xc7,0x03,0x82,0x20,0x98,0xc6,0x6e,0xb7,
+ 0xab,0x3b,0x66,0x62,0xbc,0x1a,0x17,0x28,0x9d,0xcf,0xe7,0x30,0x9b,0xcd,
+ 0x4c,0xa3,0x3b,0x3c,0x3f,0x8a,0x0f,0x29,0x67,0xb8,0x22,0x0e,0xd8,0xae,
+ 0x6c,0xe0,0xba,0x73,0x81,0xfb,0xd1,0x6d,0x98,0x5e,0xaf,0xa7,0x8a,0x1f,
+ 0x50,0x7c,0x80,0xbb,0x46,0xf1,0x64,0x32,0x61,0xd2,0xc0,0x5b,0x00,0x82,
+ 0xef,0x41,0xc3,0x74,0x3a,0x1d,0x55,0x7c,0x4f,0x00,0xb0,0x24,0xc7,0x28,
+ 0x1e,0x8f,0xc7,0x6c,0x65,0xfc,0x28,0x2c,0x86,0x0d,0xd3,0x6e,0xb7,0xff,
+ 0x62,0xac,0x17,0x0f,0x87,0x43,0x18,0x0c,0x06,0xa6,0xc1,0x9b,0xc5,0x15,
+ 0x2b,0x8a,0x02,0x8e,0x6b,0x07,0x78,0x9f,0xbd,0xe0,0x7f,0xf5,0x1b,0x06,
+ 0xaf,0x2a,0x57,0x8c,0x17,0xdc,0x4a,0x8c,0xcb,0xe5,0x32,0x5f,0xdc,0xed,
+ 0x76,0x2d,0xc5,0xb8,0x54,0x2a,0xf1,0xc5,0xad,0x56,0x0b,0xea,0xf5,0xba,
+ 0x69,0x8a,0xc5,0x22,0x5f,0xdc,0x68,0x34,0x2c,0xc5,0x18,0x33,0x20,0x57,
+ 0x8c,0xff,0xbb,0x95,0x18,0x8b,0xa2,0xc8,0x17,0x63,0xf0,0xad,0xc4,0x38,
+ 0x9b,0xcd,0x6e,0x8a,0x31,0x81,0x14,0x0a,0x05,0xc8,0x64,0x32,0xa6,0xc1,
+ 0xd7,0x65,0x5d,0x7c,0xb4,0xa7,0x37,0x4f,0x45,0x50,0xc5,0x98,0x88,0x4e,
+ 0x29,0x4e,0xd6,0xf9,0x9b,0xf6,0xcc,0x82,0xf3,0x9d,0x3f,0xa1,0xa1,0x27,
+ 0x2c,0x4e,0xc5,0xe2,0x38,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,
+ 0x42,0x60,0x82
+};
+
+static const unsigned int small_connecttool_png_len = 553;
+static const unsigned char small_connecttool_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xbb,0x49,0x44,0x41,0x54,0x48,0xc7,0xdd,0xd4,
+ 0xbb,0x4b,0x42,0x61,0x18,0xc7,0xf1,0xe3,0x93,0x99,0xd0,0x8d,0x1a,0xa2,
+ 0x82,0x16,0x87,0x82,0x5a,0xce,0x20,0x5d,0x68,0x0a,0xd4,0x2e,0x5b,0x4b,
+ 0x38,0x37,0xb8,0x76,0x5b,0xa2,0x82,0x2e,0x43,0x51,0x8b,0x46,0x50,0x66,
+ 0x06,0x99,0x11,0x44,0x4b,0x08,0xd6,0x5a,0x91,0x44,0x76,0x19,0xba,0x50,
+ 0x04,0x49,0xff,0xc9,0xd3,0xef,0xf5,0x7d,0x35,0xd3,0x34,0xc5,0x5a,0x3a,
+ 0xf0,0xe1,0x45,0x3d,0xe7,0x7b,0xde,0xe3,0x39,0xe7,0xd5,0x98,0x59,0xfb,
+ 0x0b,0xda,0xff,0x0a,0x63,0xa3,0x5f,0x0f,0x63,0xeb,0x37,0xe2,0x67,0x8c,
+ 0x03,0x50,0x02,0x86,0xdf,0x0a,0x87,0xf6,0x74,0x9d,0x3b,0x65,0x7c,0x08,
+ 0xca,0x0a,0xb9,0x82,0x5c,0x61,0x8e,0x39,0x1c,0xbc,0x8d,0xb1,0x49,0xc6,
+ 0x7b,0xc0,0x94,0xef,0xcc,0x73,0x86,0xdf,0xec,0x76,0x8e,0x62,0x5c,0x06,
+ 0x93,0x8c,0x77,0x41,0x69,0x3e,0x71,0xb1,0xad,0x6b,0xf2,0xa0,0x0c,0xb1,
+ 0xde,0x5e,0x7e,0xc4,0x28,0x2c,0x41,0x45,0x96,0xfd,0xd2,0x6c,0x82,0x31,
+ 0x3e,0xb3,0x77,0xa7,0x93,0xdf,0x6c,0xb6,0x2f,0x44,0xf4,0xd5,0x6a,0x4d,
+ 0x86,0x1f,0xc0,0x4d,0xc4,0x66,0x8c,0x33,0x6b,0x3a,0x87,0x1e,0x6d,0x1c,
+ 0x7e,0xb6,0xf3,0xf1,0xcb,0xa7,0xc0,0x35,0x25,0xe2,0x95,0xf2,0x92,0x11,
+ 0x4a,0x04,0x7e,0xb2,0x8f,0xb8,0xb8,0xa1,0x13,0xab,0xc4,0x3b,0x57,0xc4,
+ 0xbb,0xb7,0xc4,0xc1,0x3b,0x69,0x21,0x98,0x0c,0x37,0x14,0x1c,0xbe,0x07,
+ 0x3f,0x54,0xc3,0xc8,0x0a,0x71,0x20,0x25,0x9e,0x12,0xb6,0x14,0x1c,0x16,
+ 0x2e,0x61,0x0d,0xf4,0x6e,0x9c,0xe4,0x02,0xf1,0x9b,0x8c,0x70,0x73,0xc1,
+ 0xe1,0x1b,0x08,0xc1,0x3c,0xb4,0xb5,0x6b,0xec,0x3d,0x45,0x38,0x5a,0x64,
+ 0x58,0x44,0x8f,0x60,0x0c,0x08,0x86,0xa7,0x88,0xbd,0x67,0x45,0x86,0xd3,
+ 0xa3,0xae,0x79,0xe2,0xd5,0x13,0x62,0x7f,0xa4,0x88,0xbf,0x22,0x23,0x3a,
+ 0x4b,0xec,0x09,0x13,0xfb,0xce,0xe5,0x6c,0xbf,0xb9,0x79,0x32,0x2c,0xee,
+ 0xf4,0x41,0x9a,0x48,0x96,0xe8,0xa0,0x8b,0x78,0xdc,0x43,0x3c,0xed,0x23,
+ 0x9e,0x0b,0x20,0xb6,0x2b,0x83,0xc2,0xe4,0xc6,0xd7,0xa7,0x62,0x2b,0xdb,
+ 0x5b,0xf4,0x64,0x32,0x25,0xa3,0x5a,0xfe,0x0e,0x13,0xcf,0xb1,0x78,0xf7,
+ 0x6b,0xd5,0xf4,0x3b,0xd4,0x62,0x63,0x8f,0x87,0xcd,0xe6,0xe4,0x4c,0xf1,
+ 0x79,0x51,0x7d,0x6f,0x85,0x56,0x68,0x51,0xc7,0xa4,0xb2,0xa8,0x68,0xfc,
+ 0xcd,0x33,0xa8,0x78,0xb9,0x3a,0x41,0x1d,0xd4,0xc3,0x89,0xfb,0x33,0x3a,
+ 0x0a,0x3a,0x34,0xa9,0x7d,0xaa,0xd4,0xc1,0xe9,0x44,0xc3,0x1c,0x5f,0x2b,
+ 0x72,0xac,0x4e,0x7d,0x2a,0xea,0x84,0x46,0xa8,0xc9,0x77,0x65,0x13,0x3e,
+ 0x00,0x84,0xce,0x9d,0x42,0x55,0x40,0xaa,0x56,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_customwidget_png_len = 1133;
+static const unsigned char small_customwidget_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x03,0xff,0x49,0x44,0x41,0x54,0x48,0xc7,0xb5,0x95,
+ 0xef,0x4f,0x5b,0x55,0x18,0xc7,0x97,0xe6,0x52,0x29,0xb4,0xf4,0xd2,0x9b,
+ 0xdb,0xb4,0x37,0xbd,0x37,0xbd,0x97,0xb5,0xd4,0xc2,0x82,0xdd,0x4c,0x44,
+ 0x5f,0x28,0x9a,0xcc,0xc4,0xa4,0xee,0x17,0x6e,0x86,0x31,0xa8,0x8c,0x76,
+ 0x3a,0x66,0x89,0x6e,0xb3,0x55,0xc8,0x5e,0xf8,0x4a,0x8a,0x2e,0xfb,0x81,
+ 0x19,0xdb,0x80,0xd1,0x0e,0xd4,0xb0,0x45,0x47,0xb1,0x95,0xc2,0xdc,0x0c,
+ 0xc6,0x4d,0x8d,0xbe,0xf4,0x85,0x89,0xc9,0x12,0x5f,0xec,0xef,0xf8,0xfa,
+ 0x9c,0xd3,0xd3,0x4d,0xc9,0xac,0xfa,0xc2,0x26,0xdf,0xf4,0x26,0xf7,0x9c,
+ 0xcf,0x79,0x9e,0xe7,0x7b,0x9e,0xe7,0x6e,0x01,0xb0,0xa5,0x26,0xfa,0xd9,
+ 0x48,0x0d,0x24,0x07,0xa9,0x99,0xe4,0x24,0xb9,0xfe,0x41,0x4e,0xb1,0xd6,
+ 0x21,0xf6,0xda,0x38,0xab,0x06,0x1d,0x1f,0x1f,0x6f,0x29,0x14,0x0a,0x99,
+ 0xa9,0xa9,0xa9,0x5f,0xc7,0xc6,0xc6,0x90,0x4e,0xa7,0xff,0x95,0x12,0x89,
+ 0x04,0xba,0xbb,0xbb,0x7f,0xb3,0xdb,0xed,0xef,0x13,0xd4,0x10,0x87,0x48,
+ 0x0f,0x22,0x65,0xd0,0xca,0xd7,0x9f,0x61,0x75,0xe3,0x43,0x94,0x36,0xde,
+ 0xc2,0x8d,0xdb,0xc3,0x58,0xfe,0x26,0x89,0xe2,0x46,0x12,0xe5,0x3b,0x49,
+ 0xac,0x7e,0x9f,0x42,0xe5,0x47,0xd2,0x0f,0x29,0x7a,0x4e,0x56,0x45,0xcf,
+ 0xa5,0xbb,0x03,0xf8,0xf8,0x93,0x67,0xf1,0xd4,0xf3,0x0e,0x06,0x9a,0x24,
+ 0x05,0x38,0x5c,0x80,0x1b,0x58,0xa4,0x0c,0x3a,0xbf,0xfc,0x22,0x4e,0x2f,
+ 0x98,0xc8,0xe5,0x7d,0x38,0xbb,0xe4,0xc5,0xe9,0x45,0x03,0xd9,0x49,0x13,
+ 0xa9,0x8c,0x86,0xd4,0x3b,0x41,0x64,0x73,0x21,0x9c,0xbb,0x66,0x60,0xf6,
+ 0x2b,0x0d,0xd3,0x45,0x3f,0xa6,0x57,0x34,0x5c,0x2c,0x6a,0x88,0xf7,0x39,
+ 0x19,0xe8,0x77,0x52,0x17,0x49,0xad,0x81,0x1d,0x2c,0xfd,0x32,0x45,0xca,
+ 0xa0,0x13,0x57,0x15,0x82,0x06,0x30,0x7a,0xca,0x44,0x47,0x4c,0x85,0xcd,
+ 0xe6,0x24,0xd9,0x84,0x5c,0xb0,0x22,0x2a,0x5e,0x7f,0xcf,0xc2,0x95,0x4a,
+ 0x08,0xb3,0xab,0x1a,0x3f,0xe4,0x95,0xc3,0x2d,0x0c,0xc4,0xd4,0xc3,0x4b,
+ 0x22,0xc0,0xcd,0xac,0x5e,0x2c,0xfd,0x5c,0xde,0xcb,0xa1,0x7d,0x6f,0x04,
+ 0x08,0xd2,0xc4,0xa1,0x2e,0xb7,0x8c,0xae,0x27,0x7d,0x88,0x3d,0xe3,0x87,
+ 0x2f,0xa0,0x88,0x83,0x9a,0xb0,0xbb,0x5f,0x47,0xe1,0x66,0x10,0xf9,0x9b,
+ 0x7e,0xec,0x7b,0xcd,0x55,0x03,0xbf,0x44,0xda,0x5a,0x03,0x3b,0x19,0x98,
+ 0xd5,0x94,0xa5,0x3f,0x7a,0x2a,0x48,0x1b,0x1b,0x49,0x76,0xec,0xdc,0xad,
+ 0x23,0x37,0x1b,0xc4,0xe5,0x15,0x13,0x57,0xd6,0x0d,0x5c,0x58,0x8e,0xa0,
+ 0x7f,0xc4,0x82,0x24,0xb9,0xe8,0xbd,0x84,0x23,0x27,0xc2,0xb8,0xf6,0x5d,
+ 0xe4,0xcf,0x11,0xc7,0x49,0xa1,0x1a,0xd8,0xc5,0xc0,0xcc,0x28,0x56,0xd3,
+ 0x68,0x97,0xc2,0x37,0xed,0xdc,0x15,0xc0,0xcc,0x97,0x16,0x2e,0x95,0x54,
+ 0x82,0x2a,0xf4,0x2e,0x8c,0xde,0x61,0x03,0xf9,0xf5,0x4e,0x24,0x4f,0x58,
+ 0xfc,0x70,0xaf,0xdf,0x83,0xb9,0x62,0x14,0xaf,0xa6,0xdc,0x35,0xf0,0xcb,
+ 0xa4,0xf0,0x5f,0xc0,0xcc,0xfd,0x6c,0xce,0x84,0x44,0xa9,0xca,0xb2,0x87,
+ 0x47,0x7a,0xa9,0x4c,0x1b,0x2b,0x2a,0x19,0x66,0xa1,0x73,0xbb,0xc6,0x61,
+ 0x3d,0x71,0x1f,0x16,0x6e,0x6d,0x43,0x64,0x5b,0x35,0x80,0xec,0x44,0x1b,
+ 0x0e,0x1e,0xad,0x03,0x66,0x57,0x2a,0x99,0xd1,0xf8,0xe2,0xae,0x1d,0x1a,
+ 0x2e,0x17,0x4d,0xcc,0xad,0xa9,0x38,0xbf,0x14,0x46,0xc7,0x0e,0x95,0x43,
+ 0x55,0xaf,0x87,0xdf,0x8c,0x2f,0x7e,0x0e,0x61,0xcf,0x21,0x9d,0xaf,0x1d,
+ 0x3c,0x66,0xa0,0xff,0x58,0xeb,0xdf,0x83,0xd9,0x1d,0x4d,0x9d,0x0c,0x72,
+ 0xf7,0x63,0x4f,0xfb,0x08,0x6a,0xe0,0xa3,0x85,0xf0,0x83,0x48,0x59,0xcd,
+ 0x03,0x3a,0x99,0xfb,0x69,0x14,0x2b,0xbf,0x04,0xd1,0x7b,0xd8,0xe4,0xe0,
+ 0x43,0x54,0xf3,0x81,0xb4,0x52,0x07,0x4c,0x0d,0x90,0xc9,0x99,0xfc,0x4a,
+ 0x79,0xc9,0x7d,0x66,0xd4,0xde,0xa1,0xaa,0x91,0x1e,0x8f,0x07,0x9a,0xe6,
+ 0xad,0xc2,0x2d,0x19,0x67,0x16,0x63,0xe8,0x7e,0xce,0x4f,0x65,0xb3,0x53,
+ 0x29,0x22,0x48,0x8c,0xb6,0xd6,0x2f,0xc5,0xb9,0x25,0x1d,0x66,0xd8,0xcb,
+ 0xaf,0xd4,0xc1,0xa3,0x16,0xe6,0xd7,0x3a,0xf0,0xc2,0x2e,0x3f,0xde,0xa5,
+ 0xf4,0xcf,0x2e,0x76,0x12,0xd4,0xc3,0x33,0x92,0x3d,0x0a,0x9a,0x1a,0x1b,
+ 0xa1,0xa8,0x2e,0x14,0xd6,0xda,0x31,0x98,0xae,0x57,0xe3,0xbb,0x49,0xcc,
+ 0x96,0x35,0x8c,0x64,0x2c,0x0e,0x96,0x24,0x27,0x92,0x27,0xdb,0xc8,0xa8,
+ 0x4e,0x7c,0xfe,0x93,0x45,0xe9,0xeb,0x38,0xb3,0xb0,0x1d,0xaa,0xcf,0x43,
+ 0x91,0xda,0xe8,0xbd,0x84,0x03,0xa9,0x20,0x6e,0xdf,0x6b,0xa3,0x52,0xb4,
+ 0xd4,0x8f,0x78,0x7a,0x59,0x43,0xa1,0x44,0xc6,0xf4,0xe9,0xa2,0xd3,0x9a,
+ 0x10,0x79,0x42,0xc5,0x1e,0x6a,0x86,0xde,0x21,0x83,0xd2,0xd7,0xd0,0x68,
+ 0x77,0x72,0x28,0x93,0xd5,0xae,0xe2,0xe2,0x4a,0x07,0x86,0x8e,0xcb,0x8f,
+ 0x04,0x3b,0xd9,0x94,0x2a,0xdd,0x19,0xe0,0xfd,0x3f,0x57,0xf6,0xa3,0xb0,
+ 0x6e,0xe2,0xc8,0xf1,0x76,0x68,0x01,0x99,0xd7,0x95,0x99,0x54,0x3d,0x48,
+ 0xa2,0xf4,0x9d,0x3c,0x52,0x23,0xa4,0x40,0xd5,0xdd,0x38,0x7f,0xfd,0x71,
+ 0xec,0x1f,0x7e,0x74,0x83,0x34,0xb3,0xd1,0xc7,0xa6,0xd4,0x34,0x0d,0x94,
+ 0x99,0x72,0x00,0xf3,0xeb,0x3a,0x96,0xbe,0x6d,0xc3,0x0c,0x19,0x98,0x99,
+ 0xb0,0x90,0x18,0x09,0x62,0x90,0xdc,0xcf,0x7e,0x10,0x41,0xbe,0xd2,0x8e,
+ 0x5b,0xf7,0x42,0x34,0x80,0xa2,0x04,0x8d,0xe2,0xc2,0x0d,0x1d,0xd1,0xd8,
+ 0x63,0x0c,0x74,0x7f,0x73,0x4b,0x3b,0xd8,0x3c,0x65,0xa3,0x8f,0x4d,0xa9,
+ 0x5e,0x6a,0xcf,0x7d,0x09,0x37,0xfd,0xbb,0x70,0x20,0xe9,0xa6,0xb9,0xe1,
+ 0xa6,0x36,0x96,0x31,0xf0,0xa6,0x42,0x26,0xb5,0x52,0x3d,0x65,0x5e,0xd3,
+ 0xa1,0xb7,0x65,0x8a,0x54,0x26,0x28,0xeb,0x40,0x89,0x81,0x16,0x37,0x0f,
+ 0xa1,0x06,0x31,0xa4,0x27,0xc5,0xe8,0xc3,0x7f,0xd4,0x7d,0x01,0xdd,0xbb,
+ 0x79,0x6c,0xda,0xc4,0xe4,0x0f,0x88,0x17,0x3d,0x22,0xa5,0xb8,0x30,0xa3,
+ 0x9e,0xe2,0x62,0x6d,0x8f,0xd8,0xfb,0x70,0xd0,0x0b,0xb8,0x24,0xe0,0xaa,
+ 0x88,0x7e,0x2b,0x37,0x81,0x39,0x5c,0x5f,0x21,0xb1,0xd6,0x10,0x7b,0x1f,
+ 0x7e,0x9a,0xfe,0x8f,0x8f,0xe9,0x1f,0x75,0x09,0xbb,0x54,0x76,0xdd,0xcd,
+ 0xec,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_dateedit_png_len = 505;
+static const unsigned char small_dateedit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x8b,0x49,0x44,0x41,0x54,0x48,0xc7,0xbd,0x95,
+ 0xb1,0x6a,0x83,0x40,0x18,0x80,0x15,0x1c,0x04,0xc9,0x98,0x21,0x74,0x6b,
+ 0x21,0x50,0x42,0x68,0x4a,0xa9,0xd0,0xb1,0xe2,0x5c,0xb3,0x74,0x0c,0x58,
+ 0x4a,0x49,0x91,0x2e,0x42,0x97,0xbe,0x80,0x4f,0xe1,0xe6,0x10,0xd7,0x2e,
+ 0x12,0xc4,0x07,0x48,0xa6,0x2c,0xbe,0x40,0xc1,0x41,0x1c,0x84,0x3e,0xc1,
+ 0xf5,0xff,0xed,0x7f,0xe1,0x52,0xb4,0xda,0x26,0xed,0xc1,0xc7,0xe9,0xe9,
+ 0x7d,0xf7,0x9f,0x77,0xf7,0x2b,0x31,0xc6,0xa4,0xbf,0x40,0xfa,0x17,0x31,
+ 0x14,0x19,0x50,0x00,0x15,0xd0,0x80,0x5e,0x07,0x34,0x7a,0x1f,0xfb,0xc9,
+ 0x4d,0x62,0xc5,0x75,0x5d,0x66,0xdb,0x36,0xb3,0x2c,0xab,0x15,0x5d,0xd7,
+ 0xb1,0x13,0x72,0x09,0x1c,0xd1,0x00,0x72,0x9d,0x58,0x45,0xe9,0x6a,0xb5,
+ 0x62,0x71,0x1c,0xb7,0x12,0x04,0xc1,0xa7,0x78,0x6c,0x61,0x7d,0x0d,0xf4,
+ 0x31,0xb8,0x3a,0xb1,0x86,0x91,0x60,0xa7,0x30,0x0c,0x5b,0xf1,0x3c,0x8f,
+ 0x47,0x8c,0xdc,0x01,0x27,0x18,0x5c,0x9d,0xb8,0x87,0xd3,0xc3,0x48,0xb0,
+ 0x53,0x1b,0x8e,0xe3,0x88,0x62,0x17,0x18,0x63,0x70,0xb5,0x62,0xe1,0xc5,
+ 0x9f,0xf2,0x02,0x9c,0xa3,0xa3,0x51,0xbc,0x5e,0xaf,0x59,0x14,0x45,0x9d,
+ 0x10,0xc4,0xcf,0xad,0xe2,0xb2,0x2c,0x59,0x9e,0xe7,0x15,0x29,0xdc,0xf3,
+ 0x9a,0xf3,0xb6,0x58,0x6c,0x9f,0x0b,0xe2,0xa7,0x56,0x31,0x2f,0x5c,0xf4,
+ 0xb5,0x88,0x6d,0x82,0xf8,0xb1,0xb3,0x58,0x94,0xbc,0x2f,0x97,0xdb,0x81,
+ 0xf0,0xfa,0x60,0x62,0xac,0x8b,0xa2,0x60,0x69,0x9a,0xee,0x70,0x10,0xf1,
+ 0xeb,0xf7,0xbb,0x62,0x0e,0x4c,0x3a,0x8b,0x77,0x06,0xa1,0x08,0xf1,0x70,
+ 0xf8,0xbe,0x5f,0x5d,0x9b,0xa6,0xc9,0xc5,0xf7,0xc0,0xd9,0x5e,0x62,0x2e,
+ 0x35,0x0c,0x83,0x25,0x49,0xc2,0xc5,0x33,0x60,0xb4,0x97,0x98,0x4b,0xf1,
+ 0xe8,0x6f,0x36,0x1b,0xde,0x76,0x0b,0x9c,0x36,0x89,0xb5,0x2e,0xa7,0x0c,
+ 0xa7,0x8f,0x91,0xa2,0x34,0xcb,0x32,0xde,0x3e,0x05,0x86,0x4d,0x62,0xb5,
+ 0x4a,0x24,0x57,0x0f,0xbf,0x39,0xd2,0x26,0x70,0xdc,0x94,0x2b,0x14,0x4a,
+ 0x7d,0xb8,0xba,0x37,0x80,0x4d,0xdb,0x48,0x64,0x4e,0x0b,0x35,0xa3,0xe9,
+ 0x4f,0x49,0x7a,0x01,0x0c,0x9a,0xb2,0x9b,0x4c,0x51,0xf7,0x29,0x05,0x8e,
+ 0x69,0x6f,0x8a,0x4c,0x68,0xf5,0x47,0xf4,0x4d,0x87,0x14,0xe9,0x80,0xd6,
+ 0x48,0xa9,0xfd,0xe7,0x1d,0xea,0xf7,0xf4,0x01,0xf1,0x64,0x94,0x3a,0x02,
+ 0x52,0x67,0x4a,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
+ 0x82
+};
+
+static const unsigned int small_datepicker_png_len = 965;
+static const unsigned char small_datepicker_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8f,0x0b,0xfc,0x61,0x05,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,
+ 0x44,0x00,0x00,0x00,0x00,0x00,0x00,0xf9,0x43,0xbb,0x7f,0x00,0x00,0x00,
+ 0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x12,0x00,0x00,0x0b,0x12,0x01,
+ 0xd2,0xdd,0x7e,0xfc,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd2,
+ 0x03,0x19,0x13,0x1c,0x1b,0x8b,0xe1,0xfc,0xd9,0x00,0x00,0x03,0x42,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0xb5,0x95,0x4f,0x68,0x9a,0x67,0x1c,0xc7,0x3f,
+ 0x6f,0x62,0x46,0xc3,0x02,0x6a,0x48,0x6a,0xc7,0x6c,0xb1,0xc6,0xd6,0x34,
+ 0xab,0xcb,0x21,0xb8,0x6a,0x36,0xb6,0xc3,0x70,0x93,0x80,0xe9,0x29,0xa5,
+ 0x97,0x5e,0x7a,0xd9,0x25,0x27,0x59,0x2e,0xdb,0x61,0xee,0x3c,0xd2,0xc3,
+ 0xe8,0xa5,0xa7,0x1d,0x96,0x43,0x50,0xca,0xaa,0xac,0x30,0xb6,0x53,0x20,
+ 0x4c,0x21,0xa4,0x07,0x69,0x68,0x5a,0x6a,0x53,0xaa,0x66,0xa8,0xf1,0x55,
+ 0x37,0x5d,0x8c,0x9a,0xfc,0x76,0x78,0x51,0xfc,0xf3,0x86,0x8c,0xc1,0xbe,
+ 0xf0,0xf2,0x3c,0xef,0xef,0xcf,0xf7,0xf9,0x3e,0xbf,0xdf,0xc3,0xf3,0x28,
+ 0x22,0x42,0x1b,0xa6,0x79,0x9f,0x54,0x0a,0x39,0xfe,0x0b,0x8c,0x93,0x16,
+ 0xca,0xbf,0xff,0xa6,0xb4,0xff,0x0d,0x00,0x97,0x6f,0x7f,0x21,0xaf,0xb7,
+ 0xe3,0xf8,0x67,0xaf,0xf1,0xa7,0xf2,0x37,0x07,0x07,0x07,0xd4,0x6a,0x35,
+ 0xba,0x17,0xd5,0x83,0x88,0xd0,0x6a,0xb5,0x30,0x1a,0x8d,0xf8,0xe7,0xa6,
+ 0x51,0xae,0xbc,0x2f,0xb6,0x39,0x2f,0x7b,0xeb,0x0f,0x94,0x21,0x80,0x36,
+ 0xa9,0xe3,0x9d,0xf3,0xe4,0xf3,0x79,0x8a,0xc5,0x22,0x99,0x4c,0x06,0xbb,
+ 0xdd,0x8e,0xaa,0xaa,0x3d,0x5f,0x36,0x9b,0xed,0xd8,0x4b,0xa5,0x12,0x95,
+ 0x4a,0x85,0xa3,0xa3,0x23,0x02,0x81,0x00,0xdf,0x7f,0xf5,0x25,0xaf,0xb7,
+ 0xe3,0x9a,0x62,0xd3,0xbc,0x4f,0xda,0xa4,0x81,0x40,0x80,0x68,0x34,0x4a,
+ 0xbd,0x5e,0x27,0x95,0x4a,0x61,0xb3,0xd9,0xd8,0xdc,0xdc,0xec,0x51,0xd9,
+ 0x6f,0x0f,0x85,0x42,0x8c,0x8f,0x8f,0xe3,0x76,0xbb,0xf1,0xf9,0x4c,0x58,
+ 0x2c,0x16,0x4c,0xf3,0x3e,0x31,0x54,0x0a,0x39,0xcc,0xce,0x8b,0xd8,0xed,
+ 0x76,0xdc,0x6e,0x37,0x2b,0x2b,0x2b,0xd4,0x6a,0x35,0x9e,0xee,0x3c,0x65,
+ 0x6d,0x6d,0x8d,0x50,0x28,0xd4,0x21,0x2d,0x97,0xcb,0xa4,0x5f,0xa6,0x07,
+ 0xec,0x4e,0xa7,0x13,0xb3,0xd9,0x0c,0xc0,0xf4,0xd4,0x65,0xb4,0x3e,0x39,
+ 0x5c,0xb2,0xbc,0xbc,0x2c,0xe1,0x70,0x58,0x1a,0x8d,0x86,0xb4,0x31,0x3c,
+ 0x3c,0x2c,0x80,0x34,0x1a,0x0d,0xc9,0x6f,0x6c,0x48,0xe9,0xc5,0x0b,0xa9,
+ 0x56,0xab,0x02,0xc8,0x34,0xc8,0x1f,0xc9,0xa4,0x14,0x0a,0x05,0xc9,0xe5,
+ 0x72,0xa2,0xaa,0x6a,0x27,0xaf,0xd9,0x6c,0x0a,0x0e,0x97,0x18,0xda,0xab,
+ 0x8e,0x8d,0x8d,0x31,0x32,0x32,0xd2,0x51,0xd1,0x6a,0xb5,0x3a,0xf3,0xfd,
+ 0xfb,0xf7,0x01,0x98,0x0d,0x87,0x11,0x11,0x36,0x2e,0x5d,0x82,0xdd,0x5d,
+ 0x26,0x5c,0xae,0x81,0x86,0xd6,0xeb,0x75,0x00,0x86,0xf4,0xba,0xad,0xdc,
+ 0x7d,0x88,0x72,0xf7,0xa1,0xee,0x49,0x28,0x27,0x12,0x9c,0xb3,0x5a,0x4f,
+ 0x8d,0x55,0x4b,0x65,0x10,0x19,0x24,0x3e,0x8d,0xd0,0xe8,0xf5,0x52,0x4e,
+ 0x24,0xc8,0x45,0x22,0x98,0xbc,0x5e,0x5d,0x31,0xaf,0xf2,0x55,0x9e,0xa5,
+ 0xde,0x0c,0x12,0xdf,0xfb,0xe5,0xb9,0x2e,0x29,0xc0,0x85,0xa5,0x25,0x72,
+ 0x91,0x08,0xe5,0x78,0x1c,0xa3,0xc7,0xa3,0x1b,0xf3,0xe8,0x49,0x96,0x92,
+ 0x5a,0x04,0x39,0xe9,0x25,0x0e,0xfa,0x9d,0xac,0xde,0xba,0xae,0x9b,0x74,
+ 0xce,0x6a,0xa5,0x9e,0x4e,0xeb,0xaa,0x05,0x58,0xbd,0x75,0x9d,0xa0,0xdf,
+ 0xc9,0xbb,0xe7,0xc7,0xb5,0x1d,0xe0,0x70,0xc9,0xb2,0xff,0x13,0x16,0x16,
+ 0x16,0x68,0x36,0x1b,0x00,0xbc,0x7c,0x6b,0x1a,0x00,0x47,0x63,0x97,0xc5,
+ 0xc5,0x9b,0x94,0x13,0x09,0x4c,0x1e,0xcf,0x40,0x7d,0x7f,0x7d,0xb2,0xdd,
+ 0x13,0x0b,0x70,0xe3,0x86,0x87,0x0b,0x1f,0x7e,0x8a,0xa1,0x7b,0xd5,0xc5,
+ 0xc5,0x9b,0x3d,0x2a,0x62,0x31,0x2d,0xb8,0x7a,0x75,0x96,0xaa,0x7a,0x88,
+ 0xd5,0xe3,0x21,0xa3,0x1e,0x12,0x4f,0x95,0xf0,0x4e,0x99,0x3b,0xbb,0xd4,
+ 0xa0,0x8d,0x5b,0x3b,0x29,0xe0,0x94,0x53,0xd1,0x8f,0xe0,0xfa,0x0e,0xf1,
+ 0x54,0xa9,0x33,0xef,0x1e,0xfb,0xb1,0xff,0x66,0x0f,0x4e,0x4e,0x7a,0x15,
+ 0xc7,0x62,0xd1,0x81,0xc0,0x44,0x97,0xba,0x58,0x2c,0x4a,0xf0,0xf3,0x8f,
+ 0xf1,0x4c,0x99,0x89,0x6c,0xed,0xeb,0xe6,0x8c,0x8e,0xbe,0x0d,0x70,0x56,
+ 0x29,0xa2,0x78,0xa6,0xcc,0xa4,0xd5,0xc3,0x1e,0x7f,0x22,0x55,0xe2,0xe2,
+ 0xf8,0xa8,0x6e,0x4e,0x32,0x99,0x04,0x65,0xe8,0xdf,0x95,0xa2,0x1b,0x19,
+ 0xf5,0x90,0xc8,0xd6,0x3e,0xab,0xb7,0xdf,0xd3,0xf5,0x4f,0x4c,0x4c,0x80,
+ 0xa2,0x68,0xc4,0xc5,0x6a,0x8d,0x56,0xab,0xc5,0xf1,0xf1,0xf1,0x99,0xc4,
+ 0xc1,0xf5,0x9d,0x9e,0x52,0xf4,0x23,0x9d,0x2f,0x80,0xa2,0x60,0x30,0x4e,
+ 0x5a,0x28,0xfd,0xa5,0x5d,0xea,0x8f,0x1f,0xff,0x3c,0x10,0x18,0x8b,0x45,
+ 0xf1,0x7e,0xf4,0x59,0x67,0xbe,0xe4,0x76,0x0f,0xf8,0xdb,0x70,0xbb,0x3f,
+ 0xe0,0x55,0x3a,0x8b,0x71,0xd2,0xa2,0xbd,0x02,0x38,0x5c,0xf2,0xcd,0x77,
+ 0xf7,0xa4,0x1f,0xd1,0xe8,0xa3,0x01,0xdb,0x69,0xfe,0x5c,0x2e,0x27,0x3f,
+ 0xfe,0x14,0x13,0x1c,0x2e,0x11,0x11,0xad,0x79,0xb6,0x39,0x2f,0xdf,0x3e,
+ 0xf8,0x81,0x99,0x99,0x19,0xae,0x39,0xec,0xb8,0xae,0x5e,0x39,0xb3,0x24,
+ 0x6d,0x88,0x08,0xc9,0xdd,0xe7,0x3c,0x4b,0xed,0x71,0x67,0xe5,0x6b,0x4d,
+ 0x2d,0xa0,0xfc,0x5f,0x8f,0xe9,0x3f,0x94,0xe3,0xe0,0xb7,0x5d,0x5b,0xab,
+ 0x32,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_datetimeedit_png_len = 1074;
+static const unsigned char small_datetimeedit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x03,0xc4,0x49,0x44,0x41,0x54,0x48,0xc7,0x95,0x95,
+ 0x7d,0x4c,0x53,0x57,0x18,0x87,0x0f,0x77,0x57,0x47,0x90,0x0e,0xa6,0x32,
+ 0x75,0xab,0xdb,0x94,0xc4,0x2c,0x33,0x64,0xda,0x45,0xcc,0x24,0x19,0x63,
+ 0x7f,0xc8,0x94,0x8c,0x26,0x66,0x2e,0xd1,0x2c,0xa4,0x66,0x21,0xe1,0xe3,
+ 0x0f,0x53,0x4d,0x30,0x26,0x1b,0x4a,0x34,0x24,0xcd,0x3e,0x33,0x63,0xd9,
+ 0x30,0x4c,0x6b,0x87,0x74,0x77,0x91,0x0d,0xa1,0x15,0xaa,0x73,0xb4,0x20,
+ 0xa5,0x80,0x92,0xa8,0x25,0xa0,0xd6,0x82,0x14,0xa5,0x8a,0x50,0x74,0xe0,
+ 0xd8,0x46,0x7f,0x7b,0xcf,0xe5,0x76,0xe9,0xb4,0x50,0x76,0x92,0x27,0xa7,
+ 0xb7,0xf7,0xbc,0xcf,0x79,0xef,0x79,0xef,0x39,0x97,0x31,0xc6,0x44,0x22,
+ 0x9e,0x58,0x44,0xa8,0xe6,0xc1,0x22,0x65,0x3c,0x8f,0x8b,0x03,0xc0,0xa2,
+ 0xc1,0xf4,0x7a,0x3d,0x74,0x3a,0x1d,0xb4,0x5a,0x6d,0x4c,0xd2,0xd3,0xd3,
+ 0x29,0x82,0x71,0x36,0x10,0x2f,0x29,0x13,0x44,0x95,0x33,0x2e,0x6d,0x6f,
+ 0x6f,0x87,0xdd,0x6e,0x8f,0x89,0xd9,0x6c,0x9e,0x11,0xa7,0x69,0x79,0x9f,
+ 0x45,0xa4,0xf0,0xcc,0xa3,0x8a,0x79,0x26,0x3c,0xc8,0x62,0xb1,0xc4,0xa4,
+ 0xbc,0xbc,0x3c,0x9c,0x31,0x67,0x17,0x91,0xca,0xb3,0x8e,0x2a,0xe6,0x8f,
+ 0xc7,0x33,0xe1,0x41,0xb1,0x28,0x2a,0x2a,0x8a,0x14,0xeb,0x89,0x34,0xbe,
+ 0xe6,0x51,0xc5,0x11,0x03,0xff,0x2f,0xfb,0x89,0xf5,0xbc,0xa0,0xb3,0x8a,
+ 0xdd,0x6e,0x37,0x6c,0x36,0xdb,0xbc,0x10,0xc4,0x85,0x10,0xe3,0x55,0x10,
+ 0x55,0x29,0x26,0x51,0xf5,0x42,0x31,0x5d,0xbf,0x49,0x8e,0xe7,0x88,0x05,
+ 0x4f,0x89,0x47,0x47,0x47,0x31,0x3c,0x3c,0x2c,0x73,0x8d,0xae,0xc3,0x7d,
+ 0x98,0x81,0x9a,0x1a,0x78,0x3c,0x3d,0xa8,0x3c,0x29,0x21,0xeb,0xc3,0x02,
+ 0xec,0xdc,0xf3,0x29,0x0a,0xca,0x0c,0x0f,0xb5,0xbb,0xcb,0xfc,0xab,0x73,
+ 0x0a,0x9d,0xe2,0x4a,0x4d,0x09,0x79,0x5e,0x57,0x5e,0x47,0xe1,0x5f,0x71,
+ 0xb8,0x85,0x45,0x4f,0xb6,0xb3,0xaa,0x64,0x1c,0xaa,0x90,0x70,0xb8,0xa2,
+ 0x12,0x1d,0xdd,0x75,0xf0,0xfa,0x1a,0xd1,0xd3,0x7b,0x06,0x81,0x07,0x0e,
+ 0xd8,0xdd,0x56,0x68,0x0f,0x54,0x86,0xd8,0xda,0x5c,0x2b,0x13,0xc4,0x6c,
+ 0xf2,0x2d,0xe5,0xf2,0xff,0x88,0xc3,0x72,0xde,0xc6,0x1b,0x1b,0xe5,0xdf,
+ 0x2d,0xa2,0x88,0x32,0xc3,0x31,0x54,0x49,0x26,0xf4,0xf7,0x9f,0x85,0xcf,
+ 0x67,0x23,0x61,0x2b,0xf2,0x4a,0xcd,0x70,0x76,0xd4,0x63,0x68,0xd0,0x86,
+ 0xdf,0xa7,0x2e,0x23,0xef,0x73,0x13,0x58,0x6a,0xa6,0x9d,0x7c,0xef,0x12,
+ 0x09,0xb3,0x8a,0x79,0x1f,0x08,0x04,0xf0,0xcd,0xb1,0x93,0x28,0x3d,0x5a,
+ 0x85,0x2b,0x57,0x6b,0x31,0x16,0x74,0x62,0x62,0xc2,0x85,0xb1,0x47,0x1d,
+ 0xc8,0x2d,0x39,0x85,0x5e,0x5f,0x33,0x26,0x27,0x2f,0x62,0xa0,0xdf,0x0e,
+ 0xdf,0x1d,0x27,0x32,0x0a,0xcb,0xff,0x64,0xf1,0xc9,0x5f,0x90,0x53,0x3d,
+ 0xa7,0xf8,0x38,0x15,0x6a,0xcb,0xae,0x12,0x58,0x9b,0x25,0x0c,0x0d,0x9d,
+ 0xc3,0xd8,0x98,0x83,0xee,0x74,0xe3,0xce,0x88,0x0b,0x9b,0xf7,0xfc,0x80,
+ 0xc1,0x40,0x1b,0x10,0xea,0x44,0x6f,0x5f,0x3d,0xa6,0xff,0xee,0xc2,0xd1,
+ 0xd3,0x12,0x68,0xbd,0x5b,0xc9,0xb9,0xee,0x29,0x71,0x64,0xb3,0x48,0x12,
+ 0xb6,0xe9,0x0d,0x70,0xb8,0x7e,0xc2,0xc0,0x40,0x13,0x42,0xa1,0x2e,0xfa,
+ 0xf7,0x32,0xba,0xaf,0x3b,0xa0,0xc9,0x37,0xe1,0x7e,0xd0,0x25,0x4f,0x14,
+ 0x08,0xfc,0x86,0xdb,0xb7,0x9b,0xd0,0x76,0xed,0x1c,0x96,0x6b,0xb2,0x6f,
+ 0x92,0xf3,0x9d,0x39,0xc5,0x55,0xc7,0x4d,0xc8,0xd9,0xfd,0x19,0x9c,0xee,
+ 0x5a,0x39,0x78,0x46,0x7c,0x09,0xf7,0x48,0xf8,0xfe,0xbe,0x6a,0x2a,0xdc,
+ 0x79,0x59,0x3c,0x3e,0xde,0x42,0xf7,0x7f,0x45,0x77,0xdf,0x05,0xac,0xda,
+ 0xb8,0x75,0x90,0x9c,0xef,0xcd,0x29,0xae,0xae,0xb1,0x60,0x63,0x5e,0x29,
+ 0x2e,0xb8,0xeb,0xe1,0xf7,0xdb,0xf1,0x60,0xd4,0x21,0x67,0x3c,0x1d,0xba,
+ 0x84,0x83,0xdf,0xff,0x82,0xd7,0x74,0x27,0xb0,0xdf,0x58,0x0b,0x4f,0x6f,
+ 0x03,0x42,0xd3,0x5d,0xb0,0xb7,0x35,0x60,0xc5,0xda,0x0c,0x2f,0x39,0xb7,
+ 0xce,0xbd,0xf3,0x04,0x01,0x2f,0x67,0x7d,0x84,0xbd,0xdf,0x56,0xc3,0x3f,
+ 0xd8,0x84,0x91,0x91,0x66,0x04,0x83,0xad,0x72,0xd6,0x7c,0x82,0x1e,0x6f,
+ 0x33,0x8c,0xd2,0xcf,0xb8,0xda,0x63,0xc5,0x1f,0x53,0x6e,0x1c,0x32,0x7e,
+ 0x07,0x71,0xc9,0xca,0xce,0x70,0xc6,0xa9,0xec,0xad,0xfc,0x59,0xe5,0xf1,
+ 0x4b,0xd4,0x78,0xf1,0x63,0x23,0x6a,0x5b,0x6d,0x18,0xa7,0x8c,0x3d,0x9e,
+ 0x3a,0xdc,0xa7,0x09,0xfa,0x6e,0x34,0x60,0xf8,0x2e,0xbd,0x0d,0xb7,0x1a,
+ 0x78,0xa9,0xd1,0xd8,0x62,0xc5,0xfa,0xcd,0x3b,0x26,0x29,0xe6,0xc7,0xf0,
+ 0x1a,0xa7,0x28,0x55,0xcc,0x25,0x74,0x44,0x41,0x04,0xc5,0xc4,0xc1,0x85,
+ 0x69,0x5b,0xae,0x2c,0xd7,0x1d,0x81,0xf1,0xcc,0x69,0x04,0x1f,0xb9,0xf0,
+ 0xf8,0xb1,0x4b,0x96,0xf3,0xac,0x83,0x0f,0x5d,0xa8,0x3b,0x5f,0x87,0xb7,
+ 0xb7,0x17,0xff,0x25,0x24,0x2c,0xee,0xe0,0xe3,0x09,0x0d,0x53,0x0e,0xeb,
+ 0x14,0xe5,0x08,0x4c,0x53,0x0e,0x96,0x48,0x36,0xd1,0x46,0x2a,0x14,0xd7,
+ 0x64,0x5e,0x4c,0xcc,0xd9,0x37,0x95,0x53,0xf2,0x15,0x0c,0x26,0x33,0x2a,
+ 0xa4,0x53,0xf8,0xd2,0x74,0x02,0xf9,0x9f,0x18,0xb0,0x26,0x73,0xdb,0x84,
+ 0x90,0x28,0x4b,0xbf,0x26,0xb6,0x13,0xaf,0x72,0x71,0x5c,0x8c,0xcf,0x53,
+ 0x12,0xf1,0x0a,0x2f,0x88,0x90,0x90,0x7c,0x84,0xa9,0xdf,0x70,0xb1,0x55,
+ 0x19,0x5e,0x61,0xf5,0x26,0x3f,0x53,0xaf,0xf3,0xb2,0xa4,0x15,0x9d,0xca,
+ 0xe3,0xf3,0x4c,0x3f,0x50,0xce,0x8c,0x24,0x36,0xdb,0x37,0xeb,0x89,0x93,
+ 0x4a,0x50,0xb6,0xa9,0x5a,0x59,0xb6,0x4c,0x22,0x5b,0xa9,0x7e,0xb6,0xb2,
+ 0xa6,0x1a,0x25,0x53,0x9e,0xc8,0x82,0x79,0x89,0x15,0x79,0x9c,0x1c,0x30,
+ 0xf3,0x54,0xcf,0x2b,0xcb,0xb7,0x4c,0xe9,0x17,0x13,0x89,0xc4,0xb3,0xc4,
+ 0x33,0x7c,0xfc,0x3f,0xa4,0x48,0xee,0xab,0x12,0x6e,0x96,0x1e,0x00,0x00,
+ 0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_dial_png_len = 1024;
+static const unsigned char small_dial_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x03,0x92,0x49,0x44,0x41,0x54,0x48,0xc7,0xb5,0x95,
+ 0x59,0x48,0x54,0x51,0x1c,0xc6,0x1d,0x19,0x04,0x85,0xb0,0x0d,0x41,0x70,
+ 0xcb,0xca,0x07,0x9d,0x30,0x17,0x46,0x67,0x34,0xc9,0xd9,0x7a,0x68,0xb1,
+ 0x0d,0x27,0x4a,0xcc,0x5e,0xca,0xa1,0x41,0x54,0x12,0x43,0x33,0x7b,0xc8,
+ 0x6a,0x92,0x52,0x69,0x03,0xa3,0x45,0x33,0x35,0x51,0xb4,0x22,0x0b,0x2b,
+ 0x5b,0xa0,0x88,0x16,0xb3,0x65,0x48,0x2b,0xaa,0x87,0xc4,0x28,0x22,0x22,
+ 0xa3,0x08,0x9a,0xaf,0xf3,0x5d,0xce,0x8d,0x69,0x9c,0x36,0xa2,0x0b,0x1f,
+ 0x33,0xdc,0xb9,0xe7,0x77,0xff,0xe7,0xff,0x7d,0xff,0x33,0x01,0x00,0x02,
+ 0xfe,0x87,0xfe,0xee,0xe1,0x80,0x80,0xb9,0xff,0x0c,0x16,0x57,0x8c,0x90,
+ 0x46,0x48,0x2b,0x14,0x24,0x14,0xac,0xd5,0x6a,0x6b,0xc4,0x67,0x08,0xbf,
+ 0xcb,0x7b,0x53,0x85,0x26,0xfd,0x31,0x58,0x02,0x1b,0x2a,0x5c,0x79,0x75,
+ 0xd5,0xf5,0x79,0x83,0x25,0x5b,0x16,0x8d,0x15,0x14,0x67,0x78,0x56,0x39,
+ 0xd3,0xe0,0xdc,0x6c,0x1d,0x2b,0x77,0xe5,0xdc,0xaf,0xac,0x5b,0xba,0x4d,
+ 0x3c,0xd3,0x2a,0x14,0x2e,0x5f,0xae,0xf9,0x25,0x98,0x0f,0xd4,0x1f,0x2d,
+ 0x9e,0x5b,0xbd,0x3b,0xff,0x5e,0x99,0x6b,0x91,0x67,0x6f,0x57,0x3e,0x4e,
+ 0x5c,0x77,0xa0,0xf7,0x51,0x11,0x4e,0xb9,0x0b,0xd1,0x74,0xd5,0x0e,0x57,
+ 0xbb,0x0d,0xce,0x1a,0xfd,0xd7,0x35,0x1b,0x52,0x47,0x9d,0x55,0xd6,0x25,
+ 0x62,0x4d,0xa8,0xdc,0x81,0xc6,0x2f,0x58,0x85,0x56,0xd5,0xe6,0xbd,0xd8,
+ 0xd7,0x55,0x80,0xbe,0xc7,0x65,0x38,0xff,0xac,0x14,0xbd,0x4f,0xd6,0xe1,
+ 0xf4,0x70,0x01,0x4e,0x0e,0xaf,0x44,0xcf,0xb0,0x1d,0x1d,0x83,0xcb,0x71,
+ 0xe0,0x82,0x0d,0x35,0xc7,0x8d,0x28,0xac,0x32,0x8e,0xd8,0xd7,0x1a,0xec,
+ 0x6c,0x89,0x37,0xdc,0xb7,0xa7,0x0d,0xac,0x94,0xd0,0xfe,0xe7,0xe5,0x38,
+ 0xfb,0xb4,0x50,0x81,0x75,0x3e,0xca,0x41,0x87,0x7b,0x1e,0x5a,0x06,0x2d,
+ 0xa8,0xef,0xcd,0xc4,0xae,0xb6,0x65,0xe8,0xb9,0xb2,0x13,0x7b,0xfa,0x32,
+ 0xb1,0x7e,0x7b,0x02,0x56,0x38,0xf4,0x43,0x62,0xad,0x43,0x4a,0xeb,0x0b,
+ 0xd6,0xb0,0xa7,0x65,0xae,0x05,0x1e,0x56,0x4a,0x68,0xf7,0x50,0xae,0x02,
+ 0x6c,0x7f,0x68,0xc1,0xde,0xbe,0x0c,0x6c,0x3e,0x64,0x44,0xff,0x9d,0xc3,
+ 0xf8,0xfc,0xe5,0x23,0x76,0xb6,0x2e,0x16,0x2f,0x31,0xa2,0xe2,0x60,0x32,
+ 0x2c,0xf6,0x48,0x8f,0xd1,0x3a,0xbd,0x5f,0x30,0x22,0xa4,0xb9,0x1a,0x6f,
+ 0xb0,0x96,0x46,0xb1,0xa7,0xdc,0x3e,0x2b,0x25,0xb4,0xe9,0x56,0x36,0x76,
+ 0x9d,0x32,0xa0,0xf9,0xdc,0x06,0xbc,0x7d,0xff,0x12,0xbc,0x2e,0x0f,0x34,
+ 0xa3,0xee,0x8c,0x11,0xfb,0x2f,0x65,0xa1,0xb4,0x21,0x11,0x0b,0xd7,0xc4,
+ 0xc0,0x92,0x33,0xeb,0x89,0x60,0xe8,0x84,0x26,0x2b,0x66,0x7a,0x81,0x83,
+ 0xe8,0xbe,0x62,0x94,0xe8,0x29,0xb7,0xdf,0x26,0x2a,0xad,0x6c,0x4c,0xc5,
+ 0x0d,0x77,0x37,0xd4,0xeb,0xdd,0x87,0x57,0x4a,0xe5,0xc7,0x06,0x4c,0x68,
+ 0xba,0x6d,0x42,0xc9,0xee,0x59,0x30,0xe7,0x46,0x60,0x76,0x7a,0xd4,0x27,
+ 0xc1,0x30,0xc8,0x94,0x04,0x79,0x83,0x83,0x19,0x29,0xba,0x4f,0xa3,0xd4,
+ 0x16,0xb0,0xe2,0x6d,0xcd,0x56,0x8c,0xbe,0x7d,0xaa,0x80,0x8f,0xf7,0x6d,
+ 0x14,0xbd,0xcd,0x50,0x7e,0x6b,0x19,0x34,0xc3,0xb9,0x43,0x07,0xbd,0x39,
+ 0x0c,0x51,0x71,0xa1,0x1e,0xc1,0x30,0x09,0x45,0x2b,0x39,0x57,0x27,0x8a,
+ 0xe1,0x67,0x4e,0x19,0x29,0xb6,0xa1,0xfd,0xa1,0x55,0x59,0x4c,0xed,0xbf,
+ 0x98,0x89,0xad,0x4d,0x66,0x5c,0x7b,0xd0,0xa1,0xb4,0x45,0xbd,0x7f,0xe4,
+ 0x46,0x36,0x56,0x97,0xc7,0x29,0xe0,0xc8,0x99,0x13,0x10,0x18,0x18,0x78,
+ 0x4c,0xb0,0xca,0x94,0x3e,0x7b,0x55,0x1c,0xc2,0xf0,0x33,0xa7,0x8c,0xd4,
+ 0x09,0xb7,0xed,0x3b,0x40,0xa9,0xfc,0x8e,0x09,0x15,0x8d,0x29,0xca,0xa7,
+ 0x7a,0xaf,0xb6,0xc7,0x80,0x79,0x2b,0x23,0x91,0x94,0x35,0x05,0xf1,0xb3,
+ 0x23,0x3e,0x0b,0x86,0x4d,0x28,0xd6,0x17,0x1c,0xcc,0x89,0x62,0xf8,0x7b,
+ 0x86,0x44,0x56,0xdd,0xf3,0x7f,0x00,0xfb,0xea,0xe8,0xcd,0x6c,0x14,0xd5,
+ 0xea,0x90,0x66,0x0d,0x43,0x82,0x7e,0x22,0x92,0x0d,0x33,0x9f,0x8f,0x6b,
+ 0x85,0x6a,0x1e,0xc7,0x94,0x13,0xd5,0x71,0x3f,0x47,0x01,0xb7,0xfd,0x02,
+ 0x5a,0xd1,0x98,0x0c,0xf3,0xf2,0x08,0xe8,0x2d,0x61,0x88,0x4d,0x08,0xf5,
+ 0x24,0xa6,0xc4,0x76,0xfe,0xcc,0x3c,0x1e,0x28,0x07,0xf2,0x4b,0x53,0x5e,
+ 0x73,0xa2,0x5a,0xee,0x9a,0xb1,0xef,0x42,0xa6,0x12,0x29,0xba,0x4f,0xa3,
+ 0xd8,0x53,0x6e,0x9f,0x95,0x12,0xaa,0x56,0xab,0x4b,0x89,0x1a,0x11,0x6b,
+ 0xcf,0x0b,0x15,0xf9,0x8b,0x1b,0x47,0x32,0x9c,0xb3,0xcf,0x31,0xe5,0x44,
+ 0x31,0xfc,0xcc,0x29,0x23,0x45,0xf7,0x69,0x14,0x7b,0x4a,0x20,0x2b,0x25,
+ 0x34,0x31,0x75,0xda,0x9b,0xb8,0xf8,0xa8,0x4d,0x62,0x6d,0xba,0x50,0xfc,
+ 0xb8,0x01,0x51,0x87,0x84,0x07,0x0a,0x67,0x9f,0x63,0xca,0x89,0x62,0xf8,
+ 0x99,0x53,0x3a,0x4f,0xd1,0x28,0x02,0xb9,0xfd,0x84,0xa4,0xc8,0x51,0x09,
+ 0x9d,0x23,0x34,0x43,0x1e,0x46,0x5a,0xbf,0x87,0x90,0x3c,0x48,0x58,0xbd,
+ 0x83,0x63,0xca,0x89,0x62,0xf8,0x99,0x53,0x46,0x8a,0xee,0xd3,0xa8,0xa4,
+ 0xb4,0xb8,0x56,0xb9,0xfd,0x74,0x09,0xf5,0x7f,0x08,0xf9,0x81,0x3b,0xe4,
+ 0xec,0xeb,0xa4,0x29,0x26,0x99,0x53,0x9b,0x74,0xdf,0x20,0x7b,0x9a,0xfe,
+ 0xdb,0x63,0xd3,0x07,0xae,0x95,0xfd,0x9a,0x2c,0x9d,0x8e,0x96,0xe1,0x8f,
+ 0x95,0xdf,0xc3,0xe5,0x6f,0x21,0x7f,0x74,0xd0,0xff,0xe4,0x05,0x41,0xf2,
+ 0xef,0x28,0xc4,0xe7,0xaf,0x69,0x1c,0x50,0xd5,0x37,0x1f,0x12,0x9f,0x65,
+ 0x93,0x3f,0xe3,0x89,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,
+ 0x60,0x82
+};
+
+static const unsigned int small_editbreaklayout_png_len = 744;
+static const unsigned char small_editbreaklayout_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0x7a,0x49,0x44,0x41,0x54,0x48,0xc7,0x95,0x95,
+ 0xb1,0x6b,0x5a,0x51,0x14,0xc6,0x8d,0x48,0xb0,0x2f,0x49,0x2d,0x5d,0x9a,
+ 0x44,0x0c,0xa2,0x10,0xa8,0x25,0x4b,0x14,0x2c,0xda,0xba,0xc4,0x76,0x10,
+ 0x6d,0x50,0x74,0xc8,0x56,0x84,0x0e,0x2a,0xdd,0xd4,0x25,0x50,0xb7,0x0e,
+ 0x2e,0x62,0x06,0x97,0xae,0xd6,0xa1,0x14,0xad,0x4b,0x5b,0x9c,0x9a,0xff,
+ 0xa3,0x08,0x29,0x25,0xff,0x84,0x2d,0xa7,0xdf,0xb9,0x3d,0x57,0x6e,0x5e,
+ 0xf4,0xf5,0x55,0xf8,0xf1,0xb8,0xf7,0x9e,0xfb,0xbd,0xf3,0xce,0xf9,0xee,
+ 0xd5,0xe3,0xf1,0x78,0x36,0x80,0x0f,0xf8,0xc1,0x16,0xd8,0xb1,0xc1,0x73,
+ 0x96,0xac,0x5b,0x0e,0x31,0x7e,0xd1,0xd9,0x20,0x22,0x0f,0xff,0x7c,0xd5,
+ 0x6a,0x95,0x2a,0x95,0x0a,0x95,0x4a,0xa5,0x1b,0xa4,0xd3,0x69,0x8e,0x60,
+ 0x0e,0x5c,0xc4,0xec,0xc9,0x4b,0x7c,0x5a,0xd8,0xcf,0x1b,0xa6,0xd3,0x29,
+ 0x4d,0x26,0x13,0x1a,0x8f,0xc7,0x8a,0xe1,0x70,0x48,0xbd,0x5e,0x4f,0x6f,
+ 0x7a,0xe2,0x22,0x26,0x2e,0xe2,0x7e,0x2d,0xbc,0xc5,0x6f,0x1e,0x8d,0x46,
+ 0x34,0x18,0x0c,0xa8,0xdf,0xef,0x2b,0xba,0xdd,0x2e,0xb5,0xdb,0x6d,0xbd,
+ 0xe9,0xd4,0x45,0x4c,0x16,0x44,0x58,0x4f,0x0b,0xef,0xf0,0xe7,0xf0,0x9b,
+ 0x5b,0xad,0x16,0xd5,0x6a,0x35,0x45,0xbd,0x5e,0xa7,0x46,0xa3,0xa1,0x37,
+ 0x9d,0xb9,0x88,0x29,0x80,0x43,0xd6,0x5b,0x66,0x2c,0x0b,0x4e,0x9c,0xba,
+ 0x88,0xb9,0x95,0x31,0x77,0xfa,0x80,0xeb,0x28,0x02,0x67,0x36,0x78,0xee,
+ 0x19,0x38,0x07,0x5f,0xc1,0x4f,0xf0,0x0b,0x5c,0x83,0x4b,0x70,0x01,0x4a,
+ 0xe0,0xa9,0xe8,0x58,0xcb,0xe6,0xb9,0xe8,0xf8,0xf8,0xd5,0xfe,0x3e,0x7d,
+ 0x38,0x3a,0xa2,0x39,0xe6,0x16,0x27,0x27,0xea,0xc9,0x63,0x9e,0x97,0x98,
+ 0x0a,0x08,0x81,0x3b,0xcb,0x8c,0xd7,0x75,0xbc,0xd3,0xe9,0x50,0xd4,0xb2,
+ 0xe8,0x5d,0x2c,0x46,0xbf,0x21,0x46,0xd9,0xec,0x2d,0x78,0x9e,0xd7,0x39,
+ 0x0e,0x5a,0xcf,0x41,0x40,0xce,0xc6,0x7a,0x57,0xa4,0x52,0x29,0xb5,0x49,
+ 0x8b,0xcc,0x8e,0x8f,0xa9,0x15,0x0e,0xd3,0xe3,0x40,0x40,0x3d,0x2f,0xe3,
+ 0xf1,0xe5,0x1a,0xc7,0xf1,0x97,0x81,0x5d,0x39,0x28,0xab,0x5d,0x51,0x28,
+ 0x14,0xd4,0x67,0xea,0x4c,0xdf,0x46,0xa3,0xb4,0xe9,0xf5,0x52,0x26,0x93,
+ 0xa1,0x64,0x32,0x49,0xb1,0xed,0x6d,0xfa,0x8e,0x7d,0x66,0xe6,0x52,0x96,
+ 0xd7,0xd2,0xb7,0xf5,0xae,0xe0,0x1a,0xea,0x4c,0x59,0x54,0xcf,0x9b,0xa2,
+ 0xfc,0xd4,0x99,0x73,0x3c,0xd6,0x3f,0x81,0xfb,0x4e,0xae,0xb8,0x9e,0xcb,
+ 0x66,0xfe,0x6c,0x8c,0x47,0xe0,0xbd,0x5d,0x94,0xc7,0xbc,0xce,0xe3,0xf9,
+ 0xdf,0x66,0x5f,0x81,0xe0,0x5a,0x57,0x78,0x91,0xe1,0x42,0xca,0xc0,0x35,
+ 0x8d,0x23,0xab,0x55,0xa2,0xa1,0x50,0x48,0xad,0xf3,0x1c,0xc7,0x43,0x6f,
+ 0x01,0xc2,0x6b,0x5d,0x11,0x89,0x44,0xc8,0xcc,0xd8,0x2e,0xca,0x2e,0x28,
+ 0x97,0xcb,0x54,0x2c,0x16,0xed,0x19,0xff,0x90,0x83,0xb2,0xda,0x15,0xdc,
+ 0x24,0x5d,0x63,0xae,0xa1,0x5d,0x34,0x97,0xcb,0x51,0xb3,0xd9,0x54,0xb5,
+ 0xe7,0x1e,0x18,0x35,0xfe,0xac,0x33,0x5e,0xe9,0x8a,0x7c,0x3e,0x7f,0xc3,
+ 0x15,0xa6,0x68,0x22,0x91,0x50,0x87,0x87,0x45,0xd9,0x2d,0x36,0x57,0xbc,
+ 0xd1,0x35,0x76,0xbc,0x2b,0x4c,0x1f,0x7f,0x43,0xe6,0xa6,0x8f,0x75,0xa6,
+ 0x86,0x8f,0x67,0x20,0xa1,0x5d,0xe1,0x97,0x7b,0x34,0x2e,0x17,0x49,0x41,
+ 0x78,0x01,0x1a,0xff,0x79,0xf2,0x5e,0x82,0xa8,0xf6,0xb1,0x4f,0x6e,0xfe,
+ 0x3d,0x29,0xfa,0xa1,0xc1,0x43,0x90,0x03,0x1f,0xff,0x71,0x57,0xcc,0x44,
+ 0xf4,0x91,0x64,0xab,0x4e,0x9e,0xd3,0x7f,0xde,0x5d,0x70,0x0f,0x3c,0x00,
+ 0x75,0x31,0xff,0x95,0x58,0x8a,0xbb,0xff,0x45,0x6a,0x9a,0x90,0x4c,0x59,
+ 0x74,0x53,0x69,0xf2,0x4d,0xe4,0x84,0xf1,0x62,0x4b,0x36,0x06,0xa5,0xeb,
+ 0x11,0x79,0x06,0x65,0xde,0x32,0xff,0x4c,0xff,0x00,0xcd,0x57,0xa8,0x51,
+ 0xaa,0xbd,0x58,0xdd,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,
+ 0x60,0x82
+};
+
+static const unsigned int small_editcopy_png_len = 485;
+static const unsigned char small_editcopy_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x77,0x49,0x44,0x41,0x54,0x28,0xcf,0x85,0xd3,
+ 0xc1,0x6a,0x13,0x51,0x18,0xc5,0xf1,0xdf,0x24,0xb7,0xda,0x56,0x88,0x0a,
+ 0x2e,0x6a,0x7d,0x07,0x37,0xba,0xb0,0x45,0x10,0xc4,0x7d,0xd7,0xae,0x5c,
+ 0x8b,0xb8,0xf1,0x09,0x14,0x44,0x7c,0x01,0xf1,0x11,0x7c,0x00,0x77,0xd2,
+ 0x95,0x48,0x74,0xa7,0x2b,0x77,0x95,0x6e,0xd2,0x42,0x51,0x07,0x6d,0xcc,
+ 0x24,0x99,0x3b,0x33,0x2e,0x92,0x49,0xa6,0x49,0xc4,0x73,0x57,0xf7,0xf2,
+ 0xe7,0x9c,0xf3,0x5d,0xf8,0x42,0x65,0xae,0x24,0xd1,0x16,0xb4,0xb5,0x66,
+ 0x4f,0x95,0x52,0x54,0x54,0x05,0x04,0x4d,0xb5,0x6f,0xe6,0xa3,0xc6,0x75,
+ 0xe0,0xc0,0xbd,0xde,0xfe,0x0d,0x7f,0x92,0x61,0x15,0x17,0xe1,0x30,0xf2,
+ 0xc5,0x3c,0xeb,0xab,0xeb,0xf6,0xaf,0xdd,0xfe,0xfc,0x61,0x47,0x9a,0x0c,
+ 0xaa,0x18,0xce,0x84,0x6f,0x96,0x7e,0xa9,0x24,0x12,0x41,0x4b,0xc4,0x6b,
+ 0x0f,0xaf,0xee,0x7e,0xea,0xee,0x90,0x0c,0xc2,0x62,0xf8,0x1d,0x03,0x07,
+ 0xee,0x7b,0x69,0xc3,0x18,0x9b,0x5e,0x79,0xb4,0xb5,0xfb,0xb1,0x7b,0x4b,
+ 0x19,0x56,0x87,0xbf,0x31,0xf4,0x42,0x86,0x07,0xa0,0xbb,0xe5,0x8a,0x61,
+ 0x40,0x9b,0xbc,0x51,0x7c,0x1a,0xae,0xf0,0xc4,0x3b,0xe7,0xb4,0xa4,0xf6,
+ 0xb8,0xe4,0x47,0x40,0x8b,0xd8,0x70,0x2e,0xea,0x70,0x95,0x67,0x3a,0xd6,
+ 0x9d,0xc0,0x79,0x6b,0xa1,0x06,0xca,0x33,0xce,0x93,0xf0,0xb7,0x1e,0xa3,
+ 0x3d,0xc9,0x6d,0x4b,0xa6,0x70,0xae,0x98,0xc1,0x17,0xbd,0x07,0xa9,0x3d,
+ 0xa9,0x75,0x17,0x8c,0xeb,0x9f,0x5d,0x86,0x3b,0x3a,0xe0,0x04,0x03,0x43,
+ 0xe3,0xd9,0x44,0x2b,0xe0,0x5a,0x39,0xc6,0xc6,0x72,0x71,0x11,0x8e,0x4b,
+ 0xf0,0x18,0x51,0x6e,0xb4,0x5c,0x23,0x5f,0xe9,0x1c,0xa7,0xe7,0xbf,0x70,
+ 0x44,0x6a,0x4d,0xb2,0xec,0x3c,0x5a,0x59,0xe3,0xe9,0xfc,0x9a,0x89,0xa1,
+ 0x76,0x89,0x2b,0x9d,0x3d,0xd7,0xd3,0x43,0x26,0x95,0x05,0x38,0xd5,0xf7,
+ 0x73,0xa5,0xb3,0x9e,0x6f,0x0e,0x11,0x65,0xfa,0x01,0xe5,0xa1,0xbb,0xfe,
+ 0xa1,0x23,0xc7,0x8e,0x51,0x2a,0x26,0x35,0x0a,0xdb,0xb6,0x5d,0xb6,0xb1,
+ 0x84,0x66,0x52,0xdf,0xab,0x53,0x8d,0x01,0xa3,0xbe,0x23,0xe9,0xc2,0xd6,
+ 0xa8,0xc3,0x1b,0x8b,0x84,0x42,0x26,0xf7,0xbb,0xb1,0xa6,0xb5,0x4a,0x45,
+ 0x73,0xf2,0xbf,0xb0,0x14,0xa3,0x81,0xb1,0x86,0x26,0x8d,0x00,0x00,0x00,
+ 0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_editcut_png_len = 649;
+static const unsigned char small_editcut_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0x1b,0x49,0x44,0x41,0x54,0x28,0xcf,0x7d,0xd3,
+ 0x4b,0x48,0x94,0x51,0x18,0xc6,0xf1,0xff,0xd7,0x34,0x17,0x30,0x44,0x74,
+ 0x10,0x33,0xcb,0x56,0x76,0x01,0x6d,0x25,0x6d,0xc2,0x50,0xca,0x45,0xa0,
+ 0x65,0xe4,0xd4,0x80,0xb4,0xe8,0x82,0x85,0x84,0xb8,0x29,0xa3,0x26,0x17,
+ 0x05,0x89,0x34,0xb9,0x30,0x8b,0x70,0x15,0x2e,0xa2,0x7b,0xe4,0x20,0xa3,
+ 0x09,0x93,0x61,0x4a,0x58,0x42,0x3a,0x83,0x89,0xa3,0x92,0x88,0x88,0xdd,
+ 0x2c,0x90,0x6a,0x6c,0x7a,0x5a,0xcc,0x7c,0xa3,0x59,0xc9,0x59,0xbd,0xe7,
+ 0xfc,0x38,0x9c,0xf7,0xe1,0xbc,0x08,0x81,0x45,0x90,0xce,0x06,0xac,0x62,
+ 0xa5,0x85,0x60,0x35,0x19,0x9c,0xe2,0x22,0x75,0xec,0x26,0x79,0x45,0x8c,
+ 0x41,0x26,0x97,0x19,0x43,0x4c,0x72,0x9b,0x62,0x6c,0x89,0x23,0x83,0x26,
+ 0x22,0xf1,0x22,0xc2,0x0d,0xec,0x60,0xa3,0x8a,0x19,0xc4,0x47,0x42,0x4c,
+ 0xd2,0x4a,0x11,0x4e,0x93,0xba,0x15,0x56,0x58,0x23,0x1a,0x56,0x9f,0x72,
+ 0x44,0x3e,0x64,0xd2,0x86,0x98,0xa3,0x95,0xb3,0xf4,0x30,0xc1,0x2d,0x8a,
+ 0x70,0xc4,0xe8,0x98,0xc2,0x0a,0xa9,0x47,0x8f,0x55,0x24,0x1e,0xb0,0x11,
+ 0xb2,0xe9,0x40,0xcc,0xe3,0xa5,0x98,0x1a,0x82,0x4c,0xd2,0xcc,0x7a,0xae,
+ 0xc5,0x68,0x50,0x6d,0x6a,0x51,0x81,0x08,0x50,0x48,0x16,0x24,0x73,0x9a,
+ 0x30,0x51,0xe6,0xf0,0x52,0x46,0x0b,0x11,0x46,0xb9,0xbb,0x8c,0xbe,0xc4,
+ 0x45,0x1e,0xa9,0x60,0x21,0x07,0x0f,0x53,0x88,0x4f,0x34,0x71,0x95,0x2f,
+ 0x5b,0xf5,0x17,0x3d,0x48,0x1e,0x69,0x58,0x63,0x7d,0xa7,0xe2,0x61,0x18,
+ 0x31,0xcd,0xc4,0xce,0xff,0x53,0xc3,0x8c,0x29,0x83,0x4b,0xcc,0xa0,0x15,
+ 0x6e,0x35,0xc4,0x62,0xa6,0x5b,0xa8,0x67,0xf6,0x90,0x46,0xe5,0x51,0xad,
+ 0x49,0x47,0xa8,0x60,0x9b,0x49,0xe3,0x18,0x83,0x75,0xec,0xa5,0x9a,0xf1,
+ 0x6a,0x85,0x54,0xab,0x4a,0xb5,0xa8,0x40,0x9b,0xc4,0x00,0x55,0xac,0xc5,
+ 0x16,0xa3,0x26,0x76,0x72,0x92,0xa7,0x8c,0xf3,0x9e,0xaf,0x47,0xd5,0xad,
+ 0x56,0x15,0x68,0x87,0xae,0xeb,0x8c,0xe8,0xa4,0x14,0x47,0x02,0xb3,0x8a,
+ 0x6c,0x8e,0x10,0x60,0x9a,0x20,0xdd,0xb4,0xf3,0x63,0x9f,0x0a,0x95,0xab,
+ 0x9b,0xf2,0xa9,0x57,0x0d,0xc2,0xc7,0x1e,0xec,0xf1,0x67,0xe0,0xe4,0x18,
+ 0x01,0xa6,0xb8,0xc7,0x05,0x9a,0x79,0xc5,0x77,0xa2,0xcc,0xf2,0xf6,0xbc,
+ 0x7a,0xf5,0x46,0x83,0xba,0xb2,0x84,0x83,0x9b,0xe7,0x7c,0xe0,0x0e,0x07,
+ 0x28,0xe7,0x3e,0xf3,0x2c,0xd0,0xc3,0x09,0x8e,0xd3,0xe5,0xd5,0xa0,0x82,
+ 0x1a,0x5a,0xc2,0xc1,0xcb,0x2f,0xde,0x51,0xc3,0x61,0x9e,0x10,0xe5,0x27,
+ 0xdd,0xec,0xc7,0xca,0x1a,0x4a,0xf1,0x37,0x6a,0xe8,0x4f,0x4e,0x1d,0x51,
+ 0xbe,0xf1,0x8c,0x4e,0x84,0xe8,0xc7,0x45,0xb2,0xc0,0xc0,0x41,0x09,0xfe,
+ 0x46,0x0d,0xe8,0x85,0xfa,0x4c,0x4e,0x21,0x41,0x16,0x10,0x0b,0x44,0xe8,
+ 0xc0,0x85,0x25,0x91,0xbc,0x83,0x12,0xfc,0xf5,0xf2,0xe9,0x91,0x7c,0x3a,
+ 0x27,0x1e,0x42,0x12,0x15,0xf4,0x33,0xcd,0x67,0x5e,0x53,0xbe,0xf8,0xf5,
+ 0x13,0xbc,0x3d,0x5e,0x76,0xe1,0x46,0x60,0x67,0x17,0x95,0x34,0x50,0xb6,
+ 0x7c,0xa8,0x30,0x70,0x90,0xce,0x66,0xf2,0xd9,0x4e,0x2e,0x59,0xe6,0xb6,
+ 0xf3,0xdf,0xd3,0x87,0x81,0x95,0x24,0x52,0x48,0x23,0x85,0xa4,0xdf,0x75,
+ 0x37,0x8b,0x00,0xeb,0xd0,0xf0,0x20,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,
+ 0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_editgrid_png_len = 520;
+static const unsigned char small_editgrid_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x9a,0x49,0x44,0x41,0x54,0x48,0xc7,0xed,0x55,
+ 0x3d,0x4b,0xc3,0x50,0x14,0x4d,0x21,0x43,0x48,0xc9,0xe6,0xd2,0x25,0x83,
+ 0x43,0x97,0xa0,0x82,0x55,0xba,0xc5,0x60,0xa2,0x28,0xa5,0xc4,0xa5,0xb8,
+ 0x17,0x14,0x9c,0x8a,0x38,0x08,0xa2,0xe0,0xe0,0xe0,0x20,0x82,0xb3,0x93,
+ 0x60,0x8b,0x1f,0x7b,0xb5,0x9b,0x8a,0xbb,0x1f,0xd8,0xc9,0x08,0xf5,0x97,
+ 0x5c,0xdf,0x49,0xee,0xeb,0x90,0x26,0xb6,0x01,0x1d,0x04,0x87,0x93,0x47,
+ 0x4e,0xde,0x3d,0xef,0xbe,0x7b,0x2e,0x37,0x0a,0x11,0x29,0xbf,0x81,0xe8,
+ 0xa1,0x28,0x39,0x01,0x55,0x40,0x13,0xc8,0x0b,0x18,0xbc,0xea,0xcc,0xe9,
+ 0x23,0xf2,0x1a,0xeb,0xe4,0xa4,0xb0,0xea,0xfb,0x3e,0xb9,0xae,0x4b,0x8e,
+ 0xe3,0x90,0x65,0x59,0x20,0x01,0x33,0x23,0x5f,0xe0,0x43,0x54,0x29,0xac,
+ 0x61,0xd3,0x5d,0x6f,0x9b,0x3a,0x1f,0x1b,0x74,0xd5,0x5d,0x96,0x1b,0x6d,
+ 0x08,0xdc,0xf7,0x76,0xa8,0x13,0x24,0xf3,0x37,0xc1,0x1a,0x35,0x5f,0x5c,
+ 0xc9,0x97,0x58,0x5c,0x93,0xc2,0x79,0x9c,0x1c,0x89,0x2e,0xd1,0xe1,0x75,
+ 0x99,0xa6,0xed,0xb1,0x70,0x73,0x63,0x6f,0x85,0x6e,0x83,0x75,0xba,0xec,
+ 0x2e,0x26,0xf2,0x17,0x6f,0x1e,0x1d,0xb4,0x66,0xa5,0xb0,0x27,0x30,0x1e,
+ 0x96,0x85,0x85,0x0d,0x5c,0x07,0x19,0x21,0xb8,0x71,0x34,0x21,0x37,0xd6,
+ 0x0d,0xc3,0xa0,0xe6,0xb3,0x1b,0x06,0xa7,0xf1,0x9b,0xc7,0x93,0x92,0xaf,
+ 0x0a,0x14,0xc3,0x72,0xc8,0x8c,0xf9,0x43,0x3f,0x23,0xc6,0x6a,0x46,0x7e,
+ 0x21,0x9e,0x31,0xdc,0x35,0x51,0x3b,0x99,0x11,0x07,0x57,0x04,0x1c,0x5e,
+ 0x87,0xf1,0x35,0x8e,0x37,0x43,0x3d,0x69,0x1e,0xcc,0x00,0x50,0x3b,0x5c,
+ 0x93,0x03,0x9c,0x8c,0x7c,0x39,0x6e,0x9e,0x8e,0xae,0x80,0xcb,0x30,0x04,
+ 0xb5,0xe3,0x8d,0x15,0x04,0x3f,0x7c,0xee,0xa6,0xf2,0xed,0xf7,0x3a,0x9d,
+ 0x3e,0xce,0xf5,0xbb,0x25,0x9e,0x71,0xd4,0x15,0xa2,0xa5,0xe0,0x3e,0x0c,
+ 0x49,0x73,0x3f,0xce,0xb7,0x5e,0x5d,0xda,0x3f,0x9b,0x49,0xad,0xf1,0x7f,
+ 0x57,0xfc,0xf5,0xae,0xc0,0x40,0x49,0x72,0x1f,0xc1,0x70,0x3f,0x89,0x3f,
+ 0x7f,0x9a,0x1f,0xde,0x15,0x98,0x52,0x31,0x97,0x43,0xf7,0x91,0x11,0x82,
+ 0xd3,0xf8,0xad,0x93,0xa9,0xe1,0x5d,0x11,0x43,0x2d,0x23,0x3f,0x30,0xdd,
+ 0x34,0x2e,0x7a,0x89,0x3f,0x56,0xf9,0x5a,0x36,0x1b,0x62,0xf3,0xfb,0x77,
+ 0xbc,0x97,0x34,0x8f,0x55,0x9e,0xfc,0x05,0x3e,0xb1,0xc8,0xab,0xc9,0x9c,
+ 0x39,0x22,0x3f,0xf0,0x07,0xf9,0xf1,0x7f,0xde,0x17,0x06,0xe3,0x4a,0xec,
+ 0x21,0xdc,0x6e,0x6a,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,
+ 0x60,0x82
+};
+
+static const unsigned int small_edithlayout_png_len = 706;
+static const unsigned char small_edithlayout_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x02,0x4d,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0xd1,0xc4,0x54,0x20,0x00,0x08,0x20,0x9a,0x19,0x0c,0x10,0x40,
+ 0x34,0x33,0x18,0x20,0x80,0x68,0x66,0x30,0x40,0x00,0xd1,0xcc,0x60,0x80,
+ 0x00,0xa2,0x99,0xc1,0x00,0x01,0xc4,0x02,0x22,0x8e,0xdc,0x7a,0xff,0xff,
+ 0xd4,0xfd,0x8f,0x0c,0xb7,0x5e,0x7c,0x65,0x38,0x7d,0xe7,0x0d,0xc3,0xbb,
+ 0x2b,0x7b,0x18,0xee,0xaf,0x6f,0x66,0x84,0xc9,0x1d,0xba,0xf5,0x8e,0xe1,
+ 0xd2,0xe3,0xcf,0x0c,0xfb,0xaf,0xbe,0x64,0xf8,0x72,0x7d,0x2f,0xc3,0xd7,
+ 0xbd,0x5d,0x60,0xb9,0x1d,0x97,0x5e,0xfd,0xdf,0x75,0xe9,0x39,0xc3,0x85,
+ 0x7b,0x6f,0x18,0xf6,0x5f,0x7c,0xc0,0xc0,0xf0,0xe0,0x08,0xc3,0xff,0xb3,
+ 0xf3,0xc1,0x72,0x00,0x01,0x04,0x36,0xf8,0xd4,0xbd,0x0f,0x0c,0x8b,0x0f,
+ 0xdc,0x62,0xf8,0xfd,0xe5,0x1d,0x90,0xf7,0x9f,0xe1,0xef,0xcf,0x6f,0x70,
+ 0x9b,0x2f,0x3e,0xfe,0xc4,0x30,0x7d,0xfb,0x35,0x86,0xef,0x9f,0xdf,0x32,
+ 0xfc,0xfa,0xfd,0x97,0xe1,0xf7,0x8f,0xaf,0x70,0xb9,0xd3,0x77,0xdf,0x32,
+ 0xf4,0xaf,0x3d,0xc5,0xc0,0xf0,0xfd,0x2d,0x03,0xc3,0xdf,0x3f,0x0c,0x0c,
+ 0x7f,0x7e,0xc0,0xe5,0x00,0x02,0x08,0x6c,0xf0,0xad,0x97,0xdf,0x18,0x7e,
+ 0xbc,0x79,0xc8,0xc0,0xc8,0xc4,0xc2,0xc0,0x2e,0x24,0xc3,0xc0,0xc8,0xc6,
+ 0x05,0x57,0xf0,0xe4,0xdd,0x4f,0x86,0x6f,0xaf,0x1f,0x32,0xfc,0xfe,0xcf,
+ 0xc8,0xf0,0x8b,0x4b,0x82,0xe1,0x37,0x13,0x27,0x42,0xee,0xcd,0x67,0x06,
+ 0x86,0x8f,0x8f,0x40,0x6e,0x61,0x60,0xe0,0x12,0x62,0x60,0x60,0x66,0x85,
+ 0xcb,0x01,0x04,0x10,0x38,0x8c,0x7f,0xfe,0xfe,0xc7,0xc0,0x08,0x14,0x64,
+ 0xe5,0x13,0x65,0x90,0x10,0x13,0x62,0xf8,0xcf,0x8a,0x30,0xf8,0xcf,0xbf,
+ 0x7f,0x40,0x43,0x99,0x19,0x7e,0xb1,0x09,0x31,0x48,0x88,0x08,0x03,0x35,
+ 0xb3,0x21,0x02,0xf2,0xdf,0x5f,0x20,0x01,0xf4,0x39,0x3b,0x2f,0x83,0xbc,
+ 0x24,0x48,0x8e,0x03,0x2e,0x05,0x10,0x40,0x2c,0xc8,0x01,0xfe,0xe7,0xdf,
+ 0x7f,0x86,0x3f,0x7f,0xff,0x01,0x31,0x22,0x9b,0x83,0xd8,0x3f,0xff,0xfc,
+ 0x63,0xf8,0xc5,0xf4,0x0f,0x68,0xd0,0x6f,0xa8,0x61,0x50,0xf0,0x1f,0x28,
+ 0xf6,0x1f,0xc8,0xff,0xf7,0x07,0xc2,0x46,0x02,0x00,0x01,0x04,0x76,0x31,
+ 0xd8,0x18,0x36,0x1e,0x06,0x46,0x2e,0x41,0x06,0x2e,0x36,0x66,0xb0,0x05,
+ 0x30,0xf0,0xe1,0xdb,0x6f,0xa0,0xa1,0x5c,0x0c,0x8c,0xec,0x3c,0x0c,0x42,
+ 0x9c,0x8c,0x10,0x43,0xa0,0xe0,0xeb,0xf7,0x9f,0x60,0x1f,0x30,0x72,0xf0,
+ 0x32,0x08,0xf1,0x70,0xa0,0x18,0x0c,0x10,0x40,0x60,0x17,0x9f,0xbf,0x0f,
+ 0x8c,0x98,0x5f,0x40,0x45,0x3f,0x7f,0x31,0x5c,0x78,0xf4,0x97,0xe1,0xe7,
+ 0xd7,0x8f,0x70,0x05,0x0b,0x8e,0x3c,0x65,0x60,0xf8,0xfd,0x8d,0xe1,0xff,
+ 0x2f,0x2e,0x86,0xf3,0x77,0x81,0x11,0xf7,0x13,0x21,0xb7,0x74,0xff,0x75,
+ 0x60,0xa4,0xfd,0x06,0x3a,0xf6,0x2f,0xc3,0xf9,0x7b,0xaf,0x81,0xea,0x10,
+ 0x11,0x0b,0x10,0x40,0x60,0x83,0xdf,0x5c,0xdc,0xc1,0xf0,0xfb,0xe7,0x0f,
+ 0x86,0x7f,0x2c,0x5c,0x0c,0xbf,0xff,0xfc,0x61,0xf8,0xf5,0xee,0x09,0xc2,
+ 0xea,0x9b,0x5b,0x81,0x1a,0x7e,0x40,0x22,0x06,0x14,0x14,0x9f,0x5f,0x20,
+ 0xe4,0x1e,0x1e,0x85,0x88,0x7d,0x78,0x08,0x09,0x8a,0xaf,0x6f,0xe0,0x52,
+ 0x00,0x01,0xc4,0x48,0xab,0x62,0x13,0x20,0x80,0x68,0x96,0xf3,0x00,0x02,
+ 0x88,0x66,0x06,0x03,0x04,0x10,0xcd,0x0c,0x06,0x08,0x20,0x9a,0x19,0x0c,
+ 0x10,0x40,0x34,0x33,0x18,0x20,0x80,0x68,0x66,0x30,0x40,0x80,0x01,0x00,
+ 0x52,0xb6,0xe5,0x8b,0xaa,0x4e,0x11,0xd1,0x00,0x00,0x00,0x00,0x49,0x45,
+ 0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_edithlayoutsplit_png_len = 809;
+static const unsigned char small_edithlayoutsplit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x02,0xb4,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0xb1,0xe0,0x93,0x3c,0x72,0xeb,0xfd,0xff,0x53,0xf7,0x3f,0x32,0xdc,
+ 0x7a,0xf1,0x95,0xe1,0xe7,0xef,0x7f,0x60,0x31,0x90,0x33,0xce,0xdf,0x7f,
+ 0xcb,0xf0,0xe6,0xe2,0x0e,0x86,0xa7,0x5b,0x3a,0x18,0x71,0xe9,0x05,0x08,
+ 0x20,0xbc,0x06,0x9f,0xba,0xf7,0x81,0x61,0xf1,0x81,0x5b,0x0c,0x3f,0xde,
+ 0x3c,0x64,0x60,0x64,0x66,0x85,0x08,0xb2,0xf1,0x30,0xfc,0xfa,0xf5,0x93,
+ 0xe1,0xf7,0xcf,0x1f,0x78,0x5d,0x0c,0x10,0x40,0x78,0x0d,0xbe,0xf5,0xf2,
+ 0x1b,0xc3,0xef,0x2f,0xef,0x18,0x18,0x99,0x58,0x18,0x58,0x79,0x45,0x18,
+ 0xfe,0xfc,0xfb,0xcf,0xc0,0xc8,0x25,0xc8,0xc0,0xf0,0xf3,0x17,0xc3,0x3f,
+ 0x16,0x2e,0xbc,0x06,0x03,0x04,0x10,0x13,0x3e,0xc9,0xd3,0x77,0xde,0x30,
+ 0x80,0x3c,0xcf,0x2e,0x24,0xc3,0x70,0x51,0xf9,0x09,0x83,0x94,0xa4,0x04,
+ 0x83,0xb2,0x28,0x17,0xc3,0xef,0x7f,0xcc,0x0c,0xbf,0xff,0xfc,0xc1,0x6b,
+ 0x30,0x40,0x00,0xe1,0x75,0xf1,0xdb,0x4b,0x3b,0x19,0xfe,0xfd,0xfe,0xc9,
+ 0xf0,0xa8,0x2b,0x11,0x18,0xe0,0xf7,0x18,0x36,0x9d,0xeb,0x67,0x90,0xff,
+ 0xae,0xc3,0xf0,0xf3,0xeb,0x47,0x86,0x5f,0xef,0x9e,0xe0,0x35,0x18,0x20,
+ 0x80,0x18,0x09,0xa6,0x8a,0xe3,0xc7,0xff,0x33,0x3c,0x7d,0xca,0xf0,0xf7,
+ 0xc2,0x05,0x86,0x6b,0xaf,0x5f,0x33,0xbc,0xfb,0xfe,0x9d,0xc1,0x7e,0xd1,
+ 0x22,0x9c,0x91,0x06,0x03,0x00,0x01,0x84,0x37,0x28,0x18,0xf6,0xee,0x05,
+ 0x1b,0xfa,0xe1,0xfd,0x7b,0x86,0x73,0xec,0xec,0x0c,0xd7,0xd8,0xd8,0x18,
+ 0xee,0x71,0x72,0x32,0x6c,0x2c,0x2a,0x22,0x98,0x46,0x01,0x02,0x88,0xa0,
+ 0x8b,0x83,0x82,0x82,0xc0,0x0a,0x1a,0x42,0x43,0x19,0x1a,0x56,0xaf,0x46,
+ 0x91,0x5b,0xb7,0x6e,0x1d,0x4e,0x97,0x03,0x04,0x10,0x03,0xc8,0x60,0x62,
+ 0xf0,0x8f,0x27,0x4f,0xfe,0x07,0x06,0x06,0xfe,0x27,0x56,0x3d,0x40,0x00,
+ 0x41,0x5c,0xfc,0xef,0x1f,0x88,0x07,0x4c,0x9f,0xbf,0x18,0xfe,0xfe,0xfd,
+ 0xcb,0xc0,0xcc,0xcc,0x0c,0xc7,0x0c,0x8c,0x8c,0x0c,0xaf,0x5e,0xbe,0x64,
+ 0x10,0x10,0x10,0x60,0x38,0x7e,0xe2,0x04,0x83,0xbc,0x9c,0x1c,0x83,0xa0,
+ 0xa0,0x20,0x03,0x2b,0x2b,0x24,0x5d,0x33,0x02,0xe5,0x41,0x7a,0xbe,0x7d,
+ 0xfb,0xc6,0xf0,0xf9,0xf3,0x67,0x06,0x65,0x35,0x35,0xb0,0x2f,0x00,0x02,
+ 0x08,0x1e,0x14,0x30,0x2f,0xe3,0x02,0x4b,0x17,0x2e,0x64,0x88,0x8e,0x8f,
+ 0x27,0x14,0xb4,0xf0,0x20,0x02,0x08,0x20,0xa2,0x83,0xe2,0xff,0xd3,0xa7,
+ 0x24,0x05,0x05,0x40,0x00,0xe1,0x8f,0xbc,0x6b,0xd7,0xfe,0x33,0x00,0x53,
+ 0x01,0x03,0x28,0x33,0xbc,0x7a,0xc5,0xf0,0xfe,0xd1,0x23,0x86,0x87,0x40,
+ 0xfa,0xeb,0xcf,0x9f,0x0c,0xd6,0x65,0x65,0x78,0x93,0x1c,0x40,0x00,0x11,
+ 0x4e,0xc7,0x53,0xa6,0xfc,0x67,0xf8,0xfa,0x95,0xe1,0xe9,0x9b,0x37,0x0c,
+ 0xe7,0x9f,0x3f,0x67,0x78,0xf4,0xf1,0x23,0xc3,0x1e,0x68,0xf8,0xe2,0x4b,
+ 0x15,0x00,0x01,0x84,0x37,0xe7,0x6d,0xbd,0xf0,0xf2,0xff,0x5e,0x01,0x5b,
+ 0x86,0xc4,0xad,0x15,0x0c,0xd7,0x3f,0x7d,0x02,0xe3,0x89,0x3f,0xb9,0x19,
+ 0xde,0x7f,0xfe,0xce,0xc0,0x20,0xae,0x83,0xd7,0x3d,0x00,0x01,0x84,0x37,
+ 0x83,0xec,0xb9,0xfc,0x82,0xa1,0x7f,0xed,0x29,0x06,0xbd,0x9f,0x26,0x0c,
+ 0xdf,0x80,0x2e,0x6d,0x78,0xf1,0x9b,0xe1,0xfd,0x87,0x4f,0x0c,0x0c,0x1a,
+ 0xbe,0x0c,0x0c,0x7f,0x7f,0xe1,0x35,0x18,0x20,0x80,0xf0,0x1a,0x7c,0xf1,
+ 0x3e,0xb0,0x10,0xfa,0xfe,0x16,0x5c,0x08,0x27,0xca,0xc4,0x31,0x30,0x30,
+ 0x31,0x33,0x30,0x5a,0x64,0x32,0x30,0x70,0x8b,0x30,0x30,0xb0,0x70,0xe0,
+ 0x35,0x18,0x20,0x80,0xf0,0x06,0xc5,0xfe,0x8b,0x0f,0x80,0x2e,0x03,0x46,
+ 0x1c,0x97,0x10,0x83,0xbc,0xa4,0x30,0x03,0x83,0x74,0x29,0x83,0x10,0x0f,
+ 0x07,0xc3,0xf9,0x7b,0xaf,0x81,0x96,0xfd,0xc3,0x6b,0x30,0x40,0x00,0xe1,
+ 0x35,0x98,0xe1,0xc1,0x11,0x60,0x8a,0x00,0x16,0xe8,0xc0,0x42,0xfe,0xe1,
+ 0x2b,0x88,0x0b,0x1f,0x82,0x88,0xdf,0x5f,0x19,0x18,0xbe,0xbe,0xc1,0xab,
+ 0x15,0x20,0x80,0x08,0xa7,0x0a,0x32,0x01,0x40,0x00,0xe1,0x2f,0xdd,0x28,
+ 0x00,0x00,0x01,0x06,0x00,0x52,0xb4,0x82,0xa9,0xfa,0xab,0x43,0xd9,0x00,
+ 0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_editpaste_png_len = 902;
+static const unsigned char small_editpaste_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x03,0x11,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0xb1,0x10,0x52,0xc0,0xc8,0xc8,0x08,0xb7,0x19,0xe8,0x08,0x46,0x62,
+ 0x0d,0x06,0x08,0x20,0xbc,0x06,0x83,0x0c,0xfd,0xfa,0xf5,0x2b,0xc3,0xe3,
+ 0xc7,0x8f,0x19,0x2e,0x5f,0xbe,0x0c,0xe6,0x13,0x6b,0x38,0x40,0x00,0x81,
+ 0x0d,0xae,0xab,0xab,0xfb,0x7f,0xfb,0xf6,0x6d,0x86,0xf7,0xef,0xdf,0xc3,
+ 0x25,0x76,0xee,0xdc,0xc9,0xf0,0xf7,0xef,0x5f,0xb0,0x81,0xd7,0xae,0x5d,
+ 0x63,0xe0,0xe4,0xe4,0x64,0x98,0x31,0x63,0x06,0xd8,0x70,0x77,0x77,0x77,
+ 0xb8,0xba,0x37,0x6f,0xde,0x30,0x9c,0x3d,0x7b,0x16,0xc3,0x37,0x00,0x01,
+ 0xc4,0x02,0x32,0xd4,0xca,0x4a,0x9e,0x41,0x4e,0xee,0x27,0xc3,0xe7,0xcf,
+ 0xbc,0x20,0x0f,0x33,0x14,0x15,0xcd,0x01,0x29,0x64,0xb8,0x72,0xe5,0x0a,
+ 0xc3,0xe2,0xc5,0x8b,0x19,0x7a,0x7b,0x7b,0x19,0x96,0x2c,0x59,0xc2,0xa0,
+ 0xa8,0xa8,0xc8,0xd0,0xd7,0xd7,0x07,0x94,0x2f,0x02,0xd2,0x29,0x60,0x03,
+ 0xbe,0x7f,0x17,0x64,0x50,0x51,0xf9,0x8e,0xe1,0x1b,0x80,0x00,0x62,0x02,
+ 0xb9,0xf4,0xc9,0x93,0x5b,0x0c,0x37,0x6e,0x9c,0x64,0xb8,0x7b,0xf7,0x3c,
+ 0xd8,0xd0,0x57,0xaf,0x5e,0x31,0xdc,0xb9,0x73,0x87,0x61,0xdb,0xb6,0x6d,
+ 0x60,0x43,0x41,0x20,0x26,0x26,0x06,0x6c,0xd9,0xf7,0xef,0xdf,0x19,0xd2,
+ 0xd3,0xd3,0xc1,0xea,0xee,0xde,0xbd,0xc0,0xf0,0xec,0xd9,0x1d,0x86,0x4f,
+ 0x9f,0x7e,0x62,0x04,0x05,0x40,0x00,0xb1,0x80,0xbc,0xff,0xf9,0x33,0x0f,
+ 0xc3,0x8f,0x1f,0x5f,0xe1,0x82,0x6b,0xd7,0xae,0x05,0x7b,0xff,0xc5,0x8b,
+ 0x17,0x0c,0xc9,0xc9,0xc9,0x0c,0x6a,0x6a,0x6a,0x0c,0xec,0xec,0xec,0x0c,
+ 0x7b,0xf7,0xee,0x65,0x78,0xf0,0xe0,0x01,0x03,0x7a,0x4a,0xc2,0x96,0xb0,
+ 0x00,0x02,0x08,0x23,0xf2,0xb2,0xb3,0x4d,0x18,0x32,0x33,0x33,0xf1,0xc5,
+ 0x0b,0x5c,0x1d,0x3e,0x00,0x10,0x40,0x58,0x53,0x05,0x21,0x4d,0xc4,0x00,
+ 0x80,0x00,0x62,0xa2,0xd8,0x04,0x1c,0x00,0x20,0x80,0x08,0x66,0x10,0xb0,
+ 0x22,0x96,0x2c,0x86,0xdf,0xbf,0xff,0x32,0xfc,0xfc,0xf9,0x1b,0x18,0x79,
+ 0xbf,0x80,0xf4,0x1f,0x20,0x0d,0x4a,0x45,0x3f,0x18,0xde,0xbd,0xfb,0xc2,
+ 0xf0,0xfa,0xf5,0x47,0x06,0x61,0xe1,0x0f,0x28,0x7a,0x00,0x02,0x88,0xa0,
+ 0xc1,0x20,0x43,0x27,0x4c,0x48,0xc4,0xab,0x46,0x58,0x38,0x1e,0x18,0x81,
+ 0x6e,0x28,0x62,0x00,0x01,0x44,0xd0,0x60,0x90,0x4b,0x41,0x20,0x31,0x31,
+ 0x11,0x98,0xac,0x3e,0x31,0x80,0x72,0xe2,0xb7,0x6f,0xdf,0x80,0xa9,0xe8,
+ 0x07,0x83,0x82,0xc2,0x1a,0x86,0x55,0xab,0xe4,0x80,0x86,0xfe,0x63,0xb8,
+ 0x7a,0xb5,0x97,0x41,0x40,0x20,0xf8,0xff,0x87,0x0f,0x6b,0xc1,0x69,0x19,
+ 0x20,0x80,0x08,0x1a,0x0c,0xf2,0x3e,0x08,0xcc,0x9f,0x3f,0x1f,0xab,0x3c,
+ 0x24,0xe9,0xfd,0x67,0xf8,0xf5,0xeb,0x17,0xc3,0xe1,0xc3,0x0d,0x0c,0xfc,
+ 0xfc,0x3e,0xff,0x3f,0x7e,0xdc,0xc2,0x08,0x10,0x40,0x04,0x0d,0x06,0x85,
+ 0x29,0x08,0x80,0xb2,0xf1,0xc7,0x8f,0x1f,0x19,0xbe,0x7c,0xf9,0x02,0x76,
+ 0xed,0xcf,0x9f,0x3f,0x19,0xb4,0xb4,0x0e,0x33,0x6c,0xdd,0x2a,0x03,0x36,
+ 0xd8,0xc0,0xa0,0x84,0xe1,0xdf,0xbf,0x9f,0x40,0x8b,0xfe,0x32,0xf0,0xf1,
+ 0xb9,0xfd,0x07,0x08,0x20,0x82,0x06,0x7f,0xfd,0x0a,0xc9,0x55,0xa0,0xb2,
+ 0x03,0x19,0xfc,0xfb,0xf7,0x0f,0xec,0xda,0xdf,0xbf,0x7f,0x33,0xdc,0xba,
+ 0x35,0x91,0xe1,0xed,0xdb,0xb7,0x60,0xfc,0xee,0xdd,0x3b,0x86,0xc8,0xc8,
+ 0x5e,0x06,0x80,0x00,0x62,0x01,0x71,0x40,0xf9,0x1d,0x17,0x78,0xff,0xfe,
+ 0x0b,0x98,0x56,0x56,0x56,0x06,0x87,0x31,0x66,0xae,0xfb,0x0f,0xc7,0x8a,
+ 0x8a,0x13,0x19,0x4a,0x4b,0x59,0x81,0xec,0xdf,0x0c,0x00,0x01,0xc4,0x72,
+ 0xe6,0xcc,0x19,0xa0,0xa6,0x6f,0xe0,0xfc,0x8e,0x2d,0x6b,0xbe,0x7c,0xf9,
+ 0x11,0x4c,0x83,0x4a,0x39,0x50,0xc4,0x81,0xca,0x8a,0x3f,0x7f,0xfe,0x80,
+ 0x4b,0x3e,0x10,0x00,0xb1,0x41,0xe2,0xa0,0xa2,0x01,0xe4,0xc8,0x0f,0x1f,
+ 0x3e,0x80,0x0d,0x06,0x08,0x20,0x16,0x50,0x89,0x84,0x5c,0x98,0xa3,0x03,
+ 0x21,0xa1,0x8f,0x60,0xc5,0x20,0x17,0x83,0xbc,0x0f,0x73,0x25,0x36,0x57,
+ 0x4b,0x49,0x95,0x31,0xa4,0xa4,0x70,0x00,0x45,0xfe,0x32,0x00,0x04,0x10,
+ 0x0b,0x54,0x02,0x67,0xe1,0x2d,0x24,0x14,0xf5,0x1f,0x54,0xe6,0x6e,0xdf,
+ 0xbe,0x1d,0x1c,0x14,0xa0,0xa4,0x06,0x4a,0x01,0xb0,0x30,0x06,0xb9,0x1c,
+ 0x14,0x99,0x20,0x71,0x10,0x06,0x45,0x2a,0x08,0x00,0x04,0x10,0x23,0x31,
+ 0x75,0x1e,0x3f,0xbf,0x1f,0x50,0x19,0x28,0xa8,0x7e,0x01,0xf1,0x1f,0xa0,
+ 0xc8,0x3f,0x28,0x86,0x95,0x6c,0x10,0x3e,0x28,0x3d,0x03,0x7d,0x0f,0x0c,
+ 0x9a,0x33,0x8c,0x00,0x01,0x44,0x94,0xc1,0xe4,0x00,0x80,0x00,0x03,0x00,
+ 0xd3,0x6a,0xb5,0xa8,0xf4,0x4a,0x8f,0x34,0x00,0x00,0x00,0x00,0x49,0x45,
+ 0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_editslots_png_len = 690;
+static const unsigned char small_editslots_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0x44,0x49,0x44,0x41,0x54,0x48,0xc7,0xb5,0xd4,
+ 0xe1,0x6b,0x12,0x71,0x1c,0xc7,0x71,0xb7,0x56,0x2b,0x28,0x62,0xc1,0x1a,
+ 0x8b,0x82,0x06,0x91,0x50,0x8c,0x36,0x11,0x7a,0x90,0xe0,0xf0,0xb4,0x61,
+ 0x94,0x14,0x34,0x84,0xb2,0x82,0xf5,0x60,0x7b,0x12,0xc1,0xe8,0xc9,0x08,
+ 0x7a,0xb0,0x90,0x8a,0x1e,0xb4,0x43,0xb0,0xeb,0x88,0x95,0xec,0x81,0x91,
+ 0x73,0x26,0x1c,0xa3,0x1e,0x04,0xda,0xb3,0x34,0x85,0xb1,0x4b,0xe6,0xa8,
+ 0x9d,0x50,0x0c,0xec,0x8f,0xd8,0xa7,0xef,0xd7,0x7e,0x0e,0xb7,0x5d,0x91,
+ 0x79,0x3d,0x78,0x3d,0xb8,0xfb,0x71,0x6f,0xbf,0xf7,0xbb,0xf3,0x6c,0x00,
+ 0x6c,0xff,0xc3,0xe6,0x03,0x9b,0x2d,0x48,0x32,0x42,0xd0,0x92,0x30,0x87,
+ 0x02,0x57,0x06,0x11,0x4d,0x5f,0xc7,0x93,0xe4,0x05,0x48,0x23,0x87,0xd1,
+ 0x4a,0xbc,0x31,0x9c,0xe1,0xa8,0xb6,0x32,0x8a,0xb8,0xee,0xc5,0x84,0x7c,
+ 0x8a,0x4f,0x66,0x2c,0x09,0xf3,0xa4,0x1c,0x8d,0xbe,0x77,0x61,0xfc,0xfe,
+ 0x49,0xcb,0xc2,0x41,0xbe,0x7d,0x9e,0x94,0xa3,0x4e,0xa9,0xdb,0xb2,0xad,
+ 0x78,0x4a,0xb0,0x85,0x4a,0x76,0x92,0xf6,0x7f,0x0a,0x73,0xd4,0xe7,0x1b,
+ 0x46,0xb9,0x6c,0xa0,0x54,0xfa,0x5a,0xb3,0xb4,0xb4,0x02,0x8f,0xc7,0xcb,
+ 0x8b,0x2f,0xc8,0xb0,0xf8,0x81,0xb6,0x66,0xc3,0x28,0x14,0x4a,0x98,0x9a,
+ 0x7a,0x08,0xa7,0xf3,0x34,0x5c,0x2e,0x37,0xa6,0xa7,0xa3,0xc8,0xe7,0x75,
+ 0x84,0xc3,0x8f,0x20,0x49,0x3e,0x98,0xdc,0x0d,0xfe,0x74,0x87,0xf5,0xb0,
+ 0xc2,0x0b,0xe3,0x7d,0x7d,0xc8,0xb9,0xdd,0xc8,0xd9,0xed,0x18,0xa3,0x63,
+ 0x8e,0x17,0x0a,0x9f,0xb1,0xb8,0x58,0x86,0xae,0x7f,0xd9,0xb8,0x9b,0x46,
+ 0xab,0xab,0xdf,0x51,0xad,0xfe,0xc0,0xda,0x5a,0x15,0xa1,0x50,0x88,0x63,
+ 0x37,0xc9,0xee,0x7a,0x78,0x07,0xf9,0xc0,0x51,0x38,0x1c,0x58,0xa7,0xe8,
+ 0x3c,0xe1,0xad,0xf8,0x35,0x75,0x78,0x13,0x45,0x51,0xa0,0x69,0x1a,0x8a,
+ 0xc5,0x22,0x2a,0x95,0x4a,0x8d,0x61,0x18,0x50,0x55,0x95,0x63,0x39,0x72,
+ 0xa0,0x1e,0x6e,0x23,0x59,0x9e,0x94,0xa3,0xdf,0xc8,0x0c,0xf1,0x7a,0xcf,
+ 0x6e,0x0b,0x9b,0x45,0x99,0xae,0xeb,0x90,0x65,0x99,0x63,0x05,0xd2,0x5b,
+ 0x0f,0x47,0x79,0x2b,0xc6,0xc4,0xa4,0x1c,0xbd,0x48,0x22,0x11,0x05,0xe9,
+ 0xf4,0x3b,0xc4,0xe3,0x29,0xcc,0xce,0x26,0xc8,0xeb,0x6d,0x12,0x89,0x34,
+ 0x16,0x16,0xde,0x22,0x99,0x4c,0xc1,0xef,0xf7,0x73,0xec,0x6e,0x63,0x18,
+ 0xcb,0xcb,0x06,0x4d,0x33,0x53,0x9b,0x92,0xc9,0xb2,0x82,0x58,0xec,0x15,
+ 0x02,0x81,0x4b,0xb4,0x3b,0xce,0xbf,0x7d,0x78,0x29,0x62,0x6f,0xdc,0x0a,
+ 0x65,0x68,0x48,0xc2,0xdc,0x9c,0xb6,0x31,0x89,0xaa,0xc6,0x30,0x30,0xe0,
+ 0xe0,0x45,0x8d,0xdc,0x22,0x0e,0x72,0x42,0x5c,0x78,0xdc,0xc4,0x31,0x72,
+ 0xa4,0x16,0x6d,0x78,0x78,0x1d,0xe4,0xb9,0xc9,0x04,0x6f,0xc8,0x20,0x39,
+ 0x4a,0xba,0xc9,0x7e,0xb2,0xef,0x37,0xf6,0x92,0x3d,0x5b,0x5f,0xb7,0x76,
+ 0x72,0xed,0xdc,0x48,0x3f,0x1e,0xbc,0xbc,0x8c,0x7b,0xcf,0xbc,0x38,0x73,
+ 0xbe,0x97,0x17,0xee,0x90,0x43,0xe2,0xc2,0x8e,0xa6,0xff,0x20,0x22,0x9e,
+ 0x8d,0xcc,0x87,0x90,0xd2,0x6f,0x20,0xf6,0xc9,0x83,0xdb,0x8f,0xfb,0xf9,
+ 0x64,0x9e,0x1c,0x24,0x9d,0xad,0x7c,0x2b,0xb2,0x26,0x5f,0x37,0x7e,0x75,
+ 0x7a,0xc8,0xae,0x56,0xc2,0x57,0x4d,0xbe,0x6e,0x93,0x56,0x84,0x79,0xd3,
+ 0x47,0xc9,0x47,0x31,0xe9,0xa4,0x78,0xd2,0x5d,0xbc,0xd6,0x4a,0x98,0x1f,
+ 0x60,0xa7,0x08,0xf5,0x08,0x5d,0xe2,0x5c,0xd3,0x9f,0xcd,0x9f,0x09,0x9b,
+ 0x14,0x3c,0x6f,0xbc,0x09,0x28,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,
+ 0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_editvlayout_png_len = 289;
+static const unsigned char small_editvlayout_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x00,0xb3,0x49,0x44,0x41,0x54,0x48,0xc7,0x63,0xf8,
+ 0xff,0xff,0x3f,0x03,0x0c,0x03,0x01,0x23,0x10,0xb3,0x00,0x31,0x07,0x10,
+ 0x73,0x03,0x31,0x2f,0x11,0x98,0x1b,0xaa,0x1e,0xa4,0x8f,0x11,0x6e,0x16,
+ 0x9a,0xc1,0x2c,0xad,0xad,0xad,0xff,0xf3,0xf3,0xf3,0xff,0x27,0x26,0x26,
+ 0x12,0xc4,0x8e,0x8e,0x8e,0x20,0x4d,0x20,0x2c,0x09,0xb5,0x84,0x05,0x97,
+ 0xc1,0x1c,0x20,0x43,0x8f,0x3f,0x6e,0xfb,0xbf,0xef,0x7e,0x31,0x41,0xbc,
+ 0xf8,0xac,0x13,0xcc,0x60,0x63,0xa8,0xe1,0x1c,0xb8,0x0c,0xe6,0x06,0xb9,
+ 0x02,0xa4,0xa1,0xb0,0x5f,0x8f,0x20,0x4e,0xaa,0x56,0x87,0x19,0xec,0x02,
+ 0xc4,0x4a,0x20,0xfd,0x38,0x0d,0x86,0x2a,0x24,0x15,0x13,0x34,0x98,0x03,
+ 0xea,0x25,0x63,0xa8,0x62,0x5f,0x22,0xb0,0x0b,0x31,0x41,0xc1,0x02,0x8d,
+ 0x04,0x49,0xa8,0x0b,0xd4,0x88,0xc0,0x4a,0xc4,0x44,0x1e,0x33,0xd4,0xd5,
+ 0x82,0x40,0x2c,0x0e,0xd5,0x40,0x08,0x8b,0x43,0xd5,0x83,0xf4,0x31,0x8f,
+ 0x26,0xb7,0xd1,0xe4,0x36,0x9a,0xdc,0x46,0x93,0xdb,0xa0,0x4c,0x6e,0x54,
+ 0xab,0x4c,0x01,0x44,0xb6,0x99,0x20,0xa4,0x19,0xbb,0xc3,0x00,0x00,0x00,
+ 0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_editvlayoutsplit_png_len = 355;
+static const unsigned char small_editvlayoutsplit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x00,0xf5,0x49,0x44,0x41,0x54,0x48,0xc7,0x63,0xf8,
+ 0xff,0xff,0x3f,0x03,0x2d,0x30,0xc3,0xa8,0xc1,0x64,0x19,0xcc,0x00,0x56,
+ 0x4e,0x82,0xc1,0x40,0xc0,0x08,0xc4,0x2c,0x40,0xcc,0x01,0xc4,0xdc,0x50,
+ 0xcc,0x01,0x15,0x63,0xc4,0x63,0x11,0x6e,0x7d,0x50,0x05,0x2c,0xa1,0xa1,
+ 0xa1,0xff,0x7d,0x7c,0x7c,0xfe,0x9b,0x98,0x98,0x80,0x04,0x40,0x58,0x12,
+ 0x88,0x79,0x41,0x72,0xb8,0x5c,0x8c,0x57,0x1f,0x54,0x01,0x07,0x48,0x72,
+ 0xdb,0xed,0xf4,0xff,0xcb,0x2f,0xbb,0xc0,0x14,0x18,0x43,0x15,0x71,0xe0,
+ 0x71,0x31,0x6e,0x7d,0x50,0x05,0xdc,0x5e,0x5e,0x5e,0xff,0x37,0xdd,0x8c,
+ 0xfb,0xdf,0xba,0xd2,0x0c,0xa6,0xc0,0x05,0x88,0x95,0x40,0x72,0x78,0x5c,
+ 0x8c,0x5b,0x1f,0x54,0x01,0x2f,0x16,0x05,0xbe,0x40,0xac,0x06,0x0d,0x8e,
+ 0x10,0x34,0x03,0x43,0x08,0xea,0x23,0xc2,0xe0,0x58,0x98,0x4b,0x91,0x69,
+ 0x90,0xe1,0x94,0x18,0x9c,0x0b,0x65,0xa3,0x07,0x01,0x4c,0x4d,0x2c,0x39,
+ 0x06,0x77,0x20,0x19,0x80,0x13,0x9b,0x99,0x99,0x0d,0x1e,0x17,0xd3,0x34,
+ 0x8c,0x69,0x9a,0x2a,0x78,0xf1,0xa4,0x63,0xc2,0x06,0x83,0xb2,0x24,0x28,
+ 0xf7,0x54,0xce,0x32,0xc4,0x69,0x30,0x96,0x9c,0x87,0x5b,0x1f,0x2c,0x07,
+ 0x61,0x89,0x71,0xa2,0x72,0x1e,0x4e,0x7d,0xb0,0x3c,0x0f,0x2d,0x17,0x8c,
+ 0xa1,0x12,0x2e,0xc4,0x96,0x15,0x38,0xf5,0xc1,0x4a,0x29,0x68,0x24,0x49,
+ 0x42,0x5d,0xa9,0x44,0x6c,0xe9,0x86,0x53,0x1f,0xad,0xca,0x63,0x00,0x42,
+ 0x86,0x4b,0xcc,0xc3,0x5b,0xa9,0xcc,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,
+ 0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_exec_png_len = 1408;
+static const unsigned char small_exec_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,
+ 0x48,0x59,0x73,0x00,0x00,0x0b,0x12,0x00,0x00,0x0b,0x12,0x01,0xd2,0xdd,
+ 0x7e,0xfc,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd3,0x09,0x02,
+ 0x16,0x03,0x37,0x74,0x5c,0x47,0xd5,0x00,0x00,0x05,0x0d,0x49,0x44,0x41,
+ 0x54,0x78,0xda,0x9d,0x95,0x59,0x6c,0x54,0x55,0x1c,0xc6,0xbf,0x73,0xce,
+ 0xbd,0xb7,0x77,0xee,0x74,0x66,0x4a,0xa7,0x2b,0xa5,0x54,0x28,0x14,0x03,
+ 0x08,0xc8,0x22,0x48,0xa2,0x46,0xf0,0xc1,0x17,0x37,0x4c,0xd0,0x44,0x45,
+ 0x62,0x22,0x98,0x20,0x89,0x89,0xc6,0xa8,0x51,0x13,0xe3,0x46,0x34,0x51,
+ 0x03,0xf2,0x82,0x21,0xd1,0x1a,0x05,0x65,0x51,0x43,0x0c,0x82,0x2c,0x4d,
+ 0x8d,0x95,0xb0,0xb7,0x05,0x0a,0x03,0x94,0xa5,0x9d,0xae,0xd3,0xce,0xd6,
+ 0x3b,0x73,0x97,0xb3,0xf8,0xd0,0x25,0x48,0x25,0x18,0xbf,0xa7,0xf3,0x70,
+ 0xce,0xef,0x9c,0xff,0xf6,0x1d,0x82,0x9b,0xf4,0xec,0xde,0x9c,0xe5,0x53,
+ 0xf2,0x48,0x52,0x27,0x0f,0xea,0xae,0x18,0xd2,0xfa,0x07,0x36,0x41,0x0b,
+ 0xe7,0x20,0xd5,0x32,0xee,0xf3,0x36,0xa9,0xe8,0xc5,0xbd,0x2f,0x44,0xf3,
+ 0xb8,0x8d,0xc8,0xe8,0x62,0xf5,0x01,0xc7,0x04,0xa0,0xfb,0x9e,0x8c,0xc4,
+ 0x39,0xdb,0xd5,0x36,0x59,0xbb,0x27,0xe4,0x0b,0x7f,0xda,0xb5,0xa1,0x7d,
+ 0x86,0x43,0x3a,0x3b,0xca,0x8c,0xa7,0x95,0x2f,0xba,0x8b,0xba,0xb2,0x5b,
+ 0x90,0x4e,0x7d,0xd9,0xf0,0xda,0x2c,0x7e,0x5b,0xf0,0xea,0x03,0x8e,0x69,
+ 0x33,0xf2,0x99,0x4d,0xf0,0xa8,0xee,0x8a,0x7d,0xd7,0x32,0xec,0xb1,0xd6,
+ 0x3a,0x23,0xaa,0xc2,0x80,0x99,0x13,0x2a,0x9c,0xe1,0x32,0x5b,0xc8,0x18,
+ 0x18,0x41,0x6d,0xcb,0xc0,0x15,0xa3,0xa5,0x6d,0x75,0x20,0x5a,0x77,0x51,
+ 0x08,0xa5,0x35,0xbd,0x5e,0xd5,0x71,0x4b,0xf0,0xf3,0xfb,0x9d,0xa5,0x2d,
+ 0x26,0xfb,0xfd,0x7c,0x19,0xb3,0x8a,0x73,0x12,0x39,0x9d,0x20,0x43,0x80,
+ 0x70,0x5b,0x1a,0x56,0xc2,0x81,0xe6,0x0b,0x10,0x53,0x83,0x28,0xb3,0x80,
+ 0x00,0x43,0x38,0xe1,0x5e,0x31,0x6c,0x79,0x19,0x2e,0x17,0xac,0x6f,0xf0,
+ 0x8d,0xe3,0xef,0xcf,0x3a,0x7d,0x33,0x58,0x03,0x00,0x21,0xe4,0xfc,0xf8,
+ 0x71,0x5d,0xcf,0xcf,0x20,0x88,0xd7,0x30,0x68,0x36,0x47,0xe5,0x1f,0x3d,
+ 0x88,0x24,0x87,0xc0,0x14,0x1f,0xbe,0x9d,0x00,0xb4,0x4b,0x83,0x16,0xb1,
+ 0x90,0x9b,0x14,0x99,0x72,0xb9,0x36,0x3c,0x85,0xda,0xbe,0x9c,0x3c,0x98,
+ 0xe2,0xd3,0x57,0x7d,0xfb,0xe2,0xc5,0xfa,0xe7,0xba,0xc7,0x81,0xa5,0x00,
+ 0x8f,0x08,0x89,0xfe,0x3e,0x0a,0x55,0x0e,0x84,0x63,0x59,0x94,0x70,0x57,
+ 0x6a,0x11,0xde,0x2d,0x3d,0xb7,0x8f,0x6a,0x7a,0x98,0x16,0x98,0xd5,0x84,
+ 0x10,0x03,0x70,0x11,0x1d,0xc8,0x20,0x48,0x09,0xae,0x16,0x1a,0xd4,0x77,
+ 0xf2,0x7a,0x2a,0xd6,0x10,0x18,0x97,0x8a,0x95,0x7b,0xec,0x87,0x1d,0x90,
+ 0x8f,0xd3,0x1e,0xe6,0x36,0x87,0x0a,0x48,0x26,0x08,0x54,0x9e,0x19,0x10,
+ 0x25,0xf1,0x73,0xdf,0x25,0x8e,0xed,0xd8,0x06,0x29,0x13,0xc6,0x84,0x4a,
+ 0x12,0x28,0xab,0xae,0x29,0x9a,0xbd,0x78,0x9d,0x1e,0x0c,0x2d,0x21,0x94,
+ 0x9a,0x3a,0xd3,0x90,0xb1,0x0a,0x11,0xef,0xb2,0xed,0x82,0x0b,0xd7,0xdf,
+ 0xd4,0x44,0x64,0xa7,0x92,0xaa,0x3f,0xb6,0xb1,0x8e,0x03,0x80,0x96,0x16,
+ 0x64,0xd9,0xa9,0xa0,0x31,0xaf,0x2f,0xc2,0x00,0x00,0xd4,0x53,0x50,0x42,
+ 0x24,0x7a,0x1b,0xf7,0x6c,0xeb,0x69,0xd8,0x7c,0x18,0x80,0x3b,0xf2,0x88,
+ 0x63,0x73,0xdf,0xae,0x6f,0x98,0x30,0x67,0xc9,0x5a,0x33,0x5a,0xfc,0x16,
+ 0xa1,0xd4,0x2a,0x13,0x0a,0x03,0xd5,0x91,0xe0,0xa0,0x3e,0x6d,0xa3,0xd5,
+ 0x65,0xbf,0xca,0xda,0x2f,0xaf,0x02,0xd0,0x38,0xcc,0xc9,0xa2,0xca,0x4b,
+ 0x13,0x20,0x0f,0xc0,0x01,0x24,0x27,0x10,0x81,0x40,0x71,0xb0,0x76,0x51,
+ 0xe9,0x0d,0x50,0x00,0x40,0xf3,0x07,0xab,0x12,0x5e,0xaa,0xe3,0x73,0x2d,
+ 0x44,0x37,0x9b,0xa5,0x01,0x59,0x50,0xa2,0xa1,0x38,0xc0,0x90,0xae,0x8e,
+ 0x60,0xb0,0xa6,0xa8,0xc6,0x0b,0x58,0x2f,0x8d,0xa6,0x97,0x0a,0x57,0x79,
+ 0xea,0xbc,0x02,0x8e,0x00,0x88,0x01,0xc8,0x01,0x99,0x90,0xa5,0x07,0x66,
+ 0xde,0xbb,0x7e,0xde,0xfa,0x5d,0x55,0x37,0xe7,0xae,0x69,0xcd,0xf2,0x9c,
+ 0x59,0x1a,0xd8,0x64,0x14,0xe9,0x7f,0xea,0xc5,0x06,0x4c,0x9d,0x82,0xe5,
+ 0x14,0x68,0x87,0xc7,0x65,0x2a,0xc3,0x01,0x4c,0x00,0x00,0xaa,0x33,0xd1,
+ 0x59,0x51,0xe8,0xa3,0x90,0x09,0x68,0x49,0x05,0x0c,0x01,0x0e,0xd5,0x91,
+ 0x28,0x29,0x99,0x17,0x9a,0x3a,0xff,0x9d,0xfb,0x37,0x34,0x47,0xc7,0xb5,
+ 0x92,0x69,0xc6,0x09,0xa5,0x0d,0x94,0x10,0x4e,0x04,0x01,0xc9,0x4b,0x04,
+ 0x7a,0xba,0x62,0xce,0xd9,0x1d,0x3f,0x02,0xc8,0x02,0x00,0x35,0x44,0xa6,
+ 0xbe,0xc2,0x3e,0xb5,0x6e,0x81,0x79,0xe1,0x9b,0x9a,0x22,0xdb,0xa6,0x79,
+ 0x05,0xe5,0x02,0xbd,0x86,0xa5,0xb7,0x97,0x54,0xae,0x95,0xa5,0x13,0xeb,
+ 0x57,0x6c,0x1f,0x58,0xb0,0xf2,0xa7,0xac,0x39,0x0a,0xde,0x5e,0x49,0xa4,
+ 0xc6,0x49,0x07,0x06,0xe1,0x5f,0x4d,0x02,0x1e,0xa7,0xc8,0x97,0x97,0xcf,
+ 0xd4,0x17,0xad,0x5b,0x1b,0x7d,0xfc,0x60,0xd1,0x8d,0x23,0x5d,0xb0,0xe4,
+ 0xdd,0xa6,0xbb,0x73,0xe5,0x33,0x76,0x9e,0x0b,0x16,0x55,0x71,0x42,0x01,
+ 0x02,0x10,0x05,0x14,0x13,0xae,0xea,0x0c,0xbf,0xbd,0x3a,0xa8,0x9a,0x82,
+ 0x01,0xd6,0xa8,0x15,0xb0,0x84,0x6e,0xd0,0x49,0x43,0xa0,0x4f,0x36,0xf7,
+ 0xe3,0xbe,0xb3,0x49,0x30,0xae,0x00,0x22,0x14,0x02,0xed,0x7d,0xae,0x71,
+ 0xb4,0x71,0x4d,0x6a,0xdf,0xca,0xef,0xb5,0x11,0xb0,0xab,0x2a,0xa7,0x2f,
+ 0xec,0xb1,0xac,0x89,0x9c,0x53,0x40,0x00,0x60,0x80,0xa2,0xc0,0x00,0xd7,
+ 0xc8,0x51,0x57,0xab,0x6d,0xb1,0xd5,0xd4,0xa8,0xa9,0x9e,0xb2,0x74,0x22,
+ 0x73,0x82,0xb0,0x41,0x07,0x9a,0xcd,0x41,0x14,0x00,0x04,0x01,0xa5,0x03,
+ 0x70,0x7c,0xe9,0xf5,0xb7,0xa6,0x00,0xb0,0x51,0x30,0x7c,0x4a,0x1e,0xca,
+ 0x95,0x32,0x02,0x67,0x24,0x4b,0xd1,0x91,0xfa,0xa6,0x00,0x91,0x04,0x6c,
+ 0x45,0x88,0xed,0x12,0x63,0x9c,0x29,0x18,0xc3,0x7b,0xf5,0x78,0x16,0xac,
+ 0xab,0xf3,0xb8,0x13,0x3f,0x78,0x0d,0x80,0x18,0x03,0xeb,0x8e,0xff,0x73,
+ 0x34,0x9b,0x5f,0xe6,0x55,0xd3,0x90,0x45,0x1c,0xdf,0x48,0x7b,0x7e,0x6a,
+ 0x72,0xc8,0xf2,0x4b,0x34,0xa8,0x18,0x80,0xe4,0xc8,0x46,0x13,0x80,0x8e,
+ 0xe1,0xa8,0xf2,0x00,0x4b,0xb9,0xb0,0x5a,0xe2,0x52,0x25,0x7b,0x1a,0xbd,
+ 0x63,0x5f,0x6d,0xf0,0x7b,0x9b,0xda,0x01,0xf0,0x31,0xb0,0x4a,0xa6,0x76,
+ 0x95,0x64,0xed,0x49,0x7a,0x32,0xf7,0x8a,0x76,0xa9,0x7d,0x3f,0x4f,0x25,
+ 0xda,0x02,0x75,0xb3,0x57,0x0c,0xce,0x29,0xbb,0x2b,0x6b,0x14,0xb2,0x31,
+ 0xcb,0x9a,0x01,0x60,0xe2,0x70,0xcf,0xe3,0x04,0x20,0xa4,0x01,0x99,0x97,
+ 0xb6,0x8a,0x1d,0xfd,0xc1,0x8d,0x7d,0x7d,0x74,0xb4,0x2b,0xd8,0x28,0x38,
+ 0xde,0xb0,0xd9,0x2b,0x5b,0xf0,0xcc,0x09,0xff,0x4c,0xd3,0xc1,0xee,0xfd,
+ 0x9f,0x1c,0x1e,0x3c,0xbd,0x63,0x6f,0x71,0xf9,0xf2,0x63,0x94,0x5a,0x0f,
+ 0x64,0xab,0xc2,0x51,0x38,0x80,0x9e,0x77,0x11,0xba,0xd2,0x3b,0xa4,0x27,
+ 0xf2,0xd2,0xbf,0xc3,0xd2,0x10,0x22,0xd0,0x7a,0x6d,0xc5,0x2e,0x5e,0x3d,
+ 0xe9,0xb5,0x6e,0xdd,0x2a,0xb3,0x97,0x3a,0x00,0xc8,0x31,0x13,0x1a,0x9b,
+ 0xac,0x4f,0x17,0xdb,0x18,0x1e,0x95,0x91,0xb0,0x2b,0x3a,0x95,0x44,0x0e,
+ 0x77,0x02,0x64,0x9a,0x82,0xb5,0xb3,0x2f,0xa5,0x1d,0x3a,0xf8,0x05,0x2b,
+ 0xab,0x9d,0xc0,0x35,0xfa,0xb2,0x08,0x30,0xa2,0x37,0x5f,0x3b,0xc3,0x8f,
+ 0x6f,0xf9,0x90,0xc7,0x7f,0x8b,0x01,0xf0,0xff,0xe1,0x6e,0xb7,0x92,0x14,
+ 0xd2,0xd5,0x3b,0x73,0xe9,0xa2,0x7d,0xdd,0x79,0xa9,0x51,0xaa,0x9f,0x3c,
+ 0xf7,0x4b,0xe6,0xd4,0xa6,0xdd,0xd6,0xa2,0x8f,0xf2,0xc6,0xa1,0x78,0x15,
+ 0x4f,0x5d,0xef,0xe7,0xad,0xbb,0xf7,0xf8,0x9d,0xbf,0x9e,0x04,0x90,0xf9,
+ 0xd7,0xaf,0xe9,0x56,0x2a,0xa8,0x58,0x68,0x5a,0xd3,0x9f,0x58,0x4a,0x83,
+ 0xd5,0x35,0xe9,0xbf,0xde,0x3b,0xc2,0xd3,0x97,0xaf,0x0e,0x97,0x0d,0x06,
+ 0x80,0x08,0x80,0x34,0x00,0x0f,0xff,0x53,0x64,0xa4,0x17,0x8c,0xff,0x7a,
+ 0xe0,0x6f,0x77,0xe3,0x54,0x57,0x80,0x6c,0x28,0xa3,0x00,0x00,0x00,0x00,
+ 0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_filenew_png_len = 313;
+static const unsigned char small_filenew_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x00,0xcb,0x49,0x44,0x41,0x54,0x28,0xcf,0x9d,0xd3,
+ 0x3d,0x0a,0xc2,0x30,0x18,0xc6,0xf1,0x7f,0xa5,0x28,0x22,0xe2,0xea,0xe2,
+ 0xe0,0x01,0xbc,0x82,0x78,0x07,0x57,0x27,0x27,0x0f,0x20,0xde,0x41,0xef,
+ 0xe5,0xee,0xea,0xe2,0xea,0xa6,0x08,0x05,0xa5,0x1f,0x79,0x1d,0x6c,0x43,
+ 0xd2,0xbc,0x4a,0x6b,0x96,0x64,0xf8,0xf1,0xbc,0x1f,0x90,0x58,0x68,0x7e,
+ 0x62,0xfe,0xc1,0x51,0x50,0x42,0xa2,0x1f,0xc9,0x79,0x79,0x1b,0x6e,0x1c,
+ 0xd9,0x12,0x49,0x9d,0x3b,0xd8,0xd8,0xdb,0x20,0xcc,0x58,0x06,0xdc,0xc3,
+ 0x62,0xb1,0x41,0xd8,0x90,0xd6,0xb8,0x83,0x0b,0x8b,0x0b,0x0a,0x20,0x61,
+ 0x5d,0xe3,0x5e,0xcf,0x15,0xce,0x11,0x84,0x04,0x58,0x79,0x5c,0x4d,0x16,
+ 0x3a,0x0c,0xb8,0x00,0xb0,0xe0,0x6e,0xb9,0x87,0x3f,0x23,0x0a,0x30,0xe2,
+ 0xca,0x9e,0x14,0x80,0x97,0xbe,0xba,0x0a,0xc7,0x8c,0xd9,0x71,0x27,0x43,
+ 0x80,0x33,0x87,0xef,0x18,0x84,0x21,0x53,0x26,0x4e,0x25,0xa5,0xe7,0xc2,
+ 0xd9,0x69,0x8f,0x6e,0xf9,0xea,0x6b,0x38,0xf3,0xb0,0x1b,0xa2,0x26,0xe7,
+ 0x6d,0xb0,0x9e,0x6c,0xf4,0x6d,0xb4,0x48,0x6e,0x85,0x4d,0x9b,0x01,0x9f,
+ 0x9c,0x54,0xfc,0xd0,0xf0,0xbc,0xf9,0xb7,0x0a,0x3f,0x51,0x78,0xde,0x2d,
+ 0xfa,0x60,0x2c,0x45,0xbe,0xf6,0x7b,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,
+ 0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_fileopen_png_len = 681;
+static const unsigned char small_fileopen_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0x3b,0x49,0x44,0x41,0x54,0x48,0xc7,0xb5,0x95,
+ 0xcb,0x6f,0x12,0x51,0x1c,0x85,0xfb,0xc7,0xb5,0x58,0xeb,0x8b,0x18,0xe2,
+ 0xc2,0xb6,0x20,0x26,0x46,0x91,0xd2,0x62,0xb1,0xb4,0x05,0x86,0x3e,0x98,
+ 0x96,0x0e,0xb4,0x86,0x88,0xd0,0x08,0x4a,0x0a,0x55,0x1a,0xc4,0x27,0x3e,
+ 0x62,0xc2,0x96,0x2d,0x61,0x63,0x60,0xc1,0x02,0x12,0x16,0x10,0x36,0xc0,
+ 0x02,0x36,0x34,0x39,0x32,0xb7,0xcc,0x95,0xc9,0x5c,0xa0,0x86,0x74,0x71,
+ 0x12,0x2e,0x73,0xf9,0xbe,0xdf,0x3d,0x30,0xc3,0x14,0x80,0xa9,0xab,0x88,
+ 0x7c,0xd1,0x5b,0xf6,0xa3,0xe9,0x87,0xae,0x27,0x06,0x27,0x93,0x49,0x09,
+ 0x86,0xd3,0x3f,0x27,0x30,0xbd,0x30,0x82,0x25,0x18,0x27,0x53,0x80,0xcf,
+ 0xcf,0xcf,0xd1,0xed,0x76,0x91,0x48,0x24,0x46,0x0a,0xc6,0x9d,0x46,0x01,
+ 0xee,0x74,0x3a,0x68,0xb7,0xdb,0x24,0xe2,0xeb,0x78,0x3c,0xce,0x14,0x8c,
+ 0x3a,0x4d,0x9f,0x25,0xb3,0x23,0x16,0x8b,0xa1,0xd1,0x68,0xd0,0x34,0x9b,
+ 0x4d,0xb4,0x5a,0x2d,0xf2,0xfe,0xa0,0x60,0x30,0x2c,0x01,0x99,0x52,0xe7,
+ 0xd0,0x42,0xef,0xd4,0xd1,0x8b,0xe1,0x70,0x18,0xd5,0x6a,0x55,0x96,0x5a,
+ 0xad,0x86,0x7a,0xbd,0x8e,0x48,0x24,0x42,0xf7,0x89,0x40,0x96,0x80,0x82,
+ 0x17,0xd6,0xe7,0xe1,0xfd,0x29,0xe0,0xe8,0xb7,0x17,0x7a,0xee,0x9f,0x20,
+ 0x18,0x0c,0xa2,0x54,0x2a,0xc9,0x52,0x2e,0x97,0x51,0xa9,0x54,0x10,0x0a,
+ 0x85,0x98,0x82,0x41,0x30,0xa9,0x62,0xff,0x33,0x8f,0x83,0x6f,0xfb,0xf0,
+ 0xfc,0x38,0xe8,0x09,0x3c,0x78,0x30,0x20,0xf0,0xf9,0x7c,0xc8,0xe7,0xf3,
+ 0xb2,0x14,0x0a,0x05,0x14,0x8b,0x45,0x04,0x02,0x01,0x59,0x45,0x14,0x2c,
+ 0x7d,0x69,0xf7,0xcc,0x1a,0xb8,0x3e,0x6c,0x63,0xef,0x93,0x0b,0xee,0xaf,
+ 0x7b,0xf0,0x7c,0x77,0xe3,0xf0,0x97,0x87,0xd4,0x24,0x7d,0x50,0x10,0x04,
+ 0x64,0xb3,0x59,0x59,0x72,0xb9,0x1c,0xd2,0xe9,0xf4,0x50,0x30,0x99,0x9a,
+ 0x8b,0xd9,0xb0,0xf5,0x9e,0xc3,0x6e,0x62,0x0b,0xfc,0xc7,0x5d,0xb8,0xbf,
+ 0xf0,0x10,0x52,0x6e,0x52,0x93,0xce,0xbe,0x48,0x05,0x2e,0x97,0x0b,0x99,
+ 0x4c,0x86,0x26,0x1a,0x8d,0xb2,0xc1,0xd2,0xd4,0x77,0x1e,0xdf,0xc6,0xe6,
+ 0x5b,0x2b,0x1c,0x51,0x1b,0x9c,0xef,0x1c,0xd8,0x39,0x73,0xf6,0x4e,0xb1,
+ 0x23,0xab,0x69,0x50,0xc0,0x71,0x1c,0x99,0x56,0xea,0x7b,0x18,0x98,0x4c,
+ 0x6d,0x09,0x98,0x61,0x7d,0x6d,0xc1,0xc6,0x1b,0x2b,0xec,0x27,0x9b,0xe0,
+ 0x4e,0xed,0xd8,0x3e,0xe3,0x14,0x35,0x69,0x6d,0x17,0x82,0x54,0x2a,0x05,
+ 0xbf,0xdf,0x3f,0x1c,0x2c,0x4d,0x3d,0xab,0xbb,0x86,0x15,0x9f,0x09,0xab,
+ 0xaf,0xcc,0x58,0x3b,0xb6,0x60,0x3d,0xbc,0x06,0x5b,0x64,0x83,0x59,0x93,
+ 0xb8,0x5f,0xbc,0x43,0xbd,0x5e,0xef,0x58,0x30,0xbd,0x59,0x66,0xb5,0x2a,
+ 0x2c,0xf7,0x04,0xcf,0xfc,0x2b,0xb0,0x1c,0xaf,0xc2,0x1a,0x7a,0xae,0xa8,
+ 0x49,0xdc,0x67,0x34,0x1a,0xc1,0xf3,0xfc,0x68,0x30,0x53,0xb0,0xa8,0x22,
+ 0xbf,0x53,0xf3,0xcb,0x65,0x45,0x4d,0x1a,0xd3,0x5d,0xda,0xf5,0xa5,0xc0,
+ 0x2c,0x81,0x6a,0x41,0x85,0xa5,0xa3,0xa7,0x8a,0x9a,0xc4,0x6b,0x6a,0xb5,
+ 0xfa,0xff,0xc0,0x4c,0xc1,0xfc,0x0c,0x96,0x0e,0x0d,0xb4,0xa6,0x5b,0x8f,
+ 0x6e,0x0e,0xbf,0x41,0x2e,0xfd,0xf0,0x96,0x09,0xa6,0x61,0xf4,0x18,0x48,
+ 0x4d,0x37,0x1e,0xce,0x4d,0x06,0x66,0x09,0x66,0xee,0x4f,0xc3,0x20,0x3c,
+ 0x21,0x35,0xcd,0xe9,0xaf,0x4f,0x06,0x66,0x09,0x14,0x8f,0xcd,0xab,0xfa,
+ 0x33,0xfd,0x0b,0x6b,0x4c,0x83,0xb2,0x3e,0x78,0x0a,0x5d,0x00,0x00,0x00,
+ 0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_filesave_png_len = 328;
+static const unsigned char small_filesave_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x00,0xda,0x49,0x44,0x41,0x54,0x48,0xc7,0x63,0xf8,
+ 0xff,0xff,0x3f,0x03,0x2d,0x30,0x84,0x60,0x60,0x08,0x01,0xe2,0xff,0x54,
+ 0xc2,0x21,0xc8,0x06,0xff,0x4f,0x6c,0x4d,0xf8,0xdf,0x76,0xa0,0xf9,0x3f,
+ 0x39,0x60,0xf5,0xea,0xd5,0x60,0xbd,0x2e,0x25,0x4e,0x60,0xc3,0x51,0x0c,
+ 0x06,0x49,0x64,0x6c,0x48,0x21,0xdb,0x60,0x90,0x5e,0xff,0x56,0x1f,0xec,
+ 0x06,0x6b,0xb9,0x69,0xc0,0x15,0xa7,0xa5,0xa5,0xe1,0xc4,0xc8,0xf2,0x24,
+ 0x1b,0x4c,0x55,0x17,0x23,0x07,0x05,0x55,0x5d,0x4c,0xb3,0x30,0xc6,0xe5,
+ 0x62,0x7c,0xfc,0xc1,0xe3,0x62,0xaa,0x1b,0x0c,0x52,0x44,0x0e,0x26,0x68,
+ 0x30,0x25,0x18,0xaf,0xc1,0xc2,0x12,0xc2,0x24,0x97,0x0f,0x72,0x4a,0x72,
+ 0x84,0x0d,0x06,0xb1,0xb3,0xb2,0xb2,0xfe,0x17,0x16,0x16,0x12,0x85,0xeb,
+ 0xeb,0xeb,0xc1,0x7a,0x88,0x32,0x18,0xa4,0xa1,0xa1,0xa1,0x01,0x2b,0x76,
+ 0x70,0x70,0x80,0x63,0x10,0xbf,0xb7,0xb7,0x77,0xb8,0x19,0x1c,0x54,0x1b,
+ 0xf0,0x3f,0x63,0x3d,0xf9,0x06,0x47,0x4c,0x09,0xf9,0x6f,0x10,0xa0,0x87,
+ 0x61,0x30,0xb8,0x06,0xb1,0x4a,0xb2,0x00,0x4b,0x80,0x22,0x04,0xa4,0x01,
+ 0x1b,0x76,0x77,0x77,0x87,0x63,0x10,0x7f,0xd2,0xa4,0x49,0x60,0x3d,0x30,
+ 0x43,0x51,0x6a,0x10,0x2a,0x56,0x4f,0x21,0x28,0x75,0x1e,0x2d,0x30,0x00,
+ 0x03,0x3b,0xbe,0x90,0x7a,0x5c,0xaf,0x5d,0x00,0x00,0x00,0x00,0x49,0x45,
+ 0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_frame_png_len = 400;
+static const unsigned char small_frame_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x22,0x49,0x44,0x41,0x54,0x28,0xcf,0xb5,0x93,
+ 0x31,0x4e,0xc3,0x40,0x10,0x45,0xdf,0x7a,0xc7,0xc4,0xc4,0x0e,0x51,0x24,
+ 0xd3,0x53,0xd1,0xa4,0x42,0x34,0x94,0x1c,0x81,0x96,0x50,0x50,0x71,0x83,
+ 0x48,0x1c,0x83,0x53,0x50,0xa4,0x49,0x1b,0x1a,0xa4,0x20,0x0e,0xc0,0x19,
+ 0x52,0x59,0x8a,0x50,0x84,0x6c,0xd9,0x32,0x89,0xd7,0x4b,0xe1,0x00,0x05,
+ 0x76,0x42,0x90,0xd8,0x69,0xb6,0x78,0xfa,0xfa,0xa3,0x3f,0x5f,0x59,0x7e,
+ 0xff,0x9c,0x1d,0x58,0x04,0x94,0x83,0x46,0xa3,0x51,0xa8,0x06,0xca,0x62,
+ 0x31,0x18,0x85,0x33,0xbc,0x8b,0xae,0x67,0x5d,0xb3,0x41,0xd1,0xe0,0xc7,
+ 0xde,0x68,0x72,0x0b,0xee,0xd5,0xdb,0x93,0x35,0x5b,0x66,0x62,0x4f,0x12,
+ 0x8e,0x05,0x3d,0xeb,0x9e,0x31,0x64,0xda,0xa8,0xeb,0x31,0xe0,0x82,0x28,
+ 0x20,0x14,0xb4,0xa1,0x60,0xca,0xcb,0x0d,0x29,0x39,0x45,0xdd,0x5e,0xfd,
+ 0xf1,0x00,0xa0,0x23,0x28,0x2a,0x22,0x25,0x62,0x41,0x5e,0x27,0x1d,0x22,
+ 0x00,0x22,0x28,0x58,0x01,0xe4,0x2c,0x98,0x93,0xd6,0xc0,0xfe,0x9a,0x70,
+ 0x04,0xd6,0xdf,0x82,0x9c,0xd4,0x26,0x3f,0x59,0xf5,0x49,0x54,0xa1,0x2c,
+ 0xb7,0xc6,0xb1,0xfc,0x86,0x57,0x5b,0xe1,0xd5,0x1f,0xe1,0x7f,0xb1,0x21,
+ 0x55,0xf6,0x1e,0x08,0x1e,0x7e,0xed,0x25,0xf9,0xad,0x2f,0xd8,0x1a,0xe0,
+ 0x9c,0xfe,0x38,0x6c,0x50,0x6d,0x71,0x44,0x4c,0x09,0xa5,0x60,0xfd,0xf8,
+ 0xf9,0xe0,0x94,0x80,0xbd,0x46,0x13,0x19,0x0f,0xf4,0xb2,0x79,0x21,0x18,
+ 0x6f,0x74,0x7f,0x19,0x05,0x9b,0x1c,0x97,0xf4,0xb2,0xfd,0x47,0x12,0x85,
+ 0x4b,0xc0,0x21,0x21,0x1d,0xa4,0xb1,0x37,0x25,0x05,0x09,0xaf,0x0a,0x07,
+ 0x97,0x36,0x6d,0x5a,0xe8,0x0d,0x4d,0x31,0xbc,0x93,0x29,0xbb,0x43,0xad,
+ 0x3e,0x00,0x5a,0x69,0x7f,0x4b,0x28,0x09,0xf5,0x31,0x00,0x00,0x00,0x00,
+ 0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_groupbox_png_len = 439;
+static const unsigned char small_groupbox_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x49,0x49,0x44,0x41,0x54,0x28,0xcf,0xcd,0xd3,
+ 0x3f,0x4e,0x02,0x41,0x14,0xc7,0xf1,0xef,0xfc,0x01,0x0c,0x88,0x85,0xc1,
+ 0x98,0x58,0x1b,0x7b,0x6c,0xb6,0xe0,0x22,0x9e,0x81,0xc6,0x13,0x78,0x08,
+ 0x2f,0x20,0xd6,0xd6,0xb6,0x34,0xc6,0x86,0x98,0x50,0xd1,0x90,0x10,0x1a,
+ 0x2d,0x4c,0xd4,0xc4,0xb0,0xc2,0x66,0x61,0x66,0x9e,0xc5,0x6e,0x14,0x58,
+ 0xc1,0xc4,0xca,0xdf,0x54,0x33,0xf3,0xc9,0xe4,0xcd,0x9b,0x8c,0x12,0x00,
+ 0x94,0xc2,0x60,0x31,0x68,0x96,0x13,0xf0,0x38,0xbc,0x64,0x08,0x9b,0x2f,
+ 0x9b,0x8b,0xc5,0x84,0xf5,0x0c,0xe8,0x1e,0xf1,0x41,0x82,0xfb,0xc2,0x4a,
+ 0x63,0xa8,0x4d,0xb8,0x2c,0xe0,0x08,0x8e,0x79,0xe6,0x5d,0x25,0x08,0x1e,
+ 0x6f,0x95,0xbe,0x3e,0x93,0xf6,0x5b,0xeb,0x91,0x9f,0xd2,0xbe,0xdb,0xa3,
+ 0xc6,0x9c,0x51,0x6f,0xdc,0xe9,0xdd,0x40,0xa9,0x73,0xff,0x24,0xb1,0x9c,
+ 0x0b,0x85,0x11,0x49,0x57,0xc6,0x12,0x8b,0x97,0x07,0x39,0xed,0x73,0x62,
+ 0x31,0x71,0xeb,0x90,0x29,0x03,0xa2,0xc2,0xb9,0x0b,0x2c,0xe0,0x71,0x08,
+ 0x69,0x93,0x86,0xc5,0xcc,0x70,0x04,0xae,0x78,0x61,0x42,0xba,0x82,0x2b,
+ 0xd4,0x30,0x04,0x1c,0x29,0x0e,0xea,0x16,0x05,0x0e,0x28,0xb3,0x4f,0x95,
+ 0xb0,0x82,0x35,0x3b,0x94,0x01,0x87,0x07,0xb0,0x16,0x05,0x1e,0x9f,0x6f,
+ 0xac,0x63,0x8d,0xc6,0x13,0xb2,0xde,0x69,0x0b,0xe0,0x70,0x80,0xc2,0x60,
+ 0x0a,0x75,0x07,0x02,0xe4,0x8d,0xb6,0xd9,0x45,0xe6,0x6c,0xcf,0xe2,0x1b,
+ 0xbb,0x7c,0xb2,0x39,0xee,0x8f,0xf8,0x3f,0x94,0x21,0xd3,0x5f,0xf1,0x9c,
+ 0x98,0x00,0xc1,0x22,0xa3,0x5e,0x3f,0x0a,0xd9,0x1b,0x6d,0x48,0xc2,0x80,
+ 0x64,0x88,0xb3,0xf8,0x71,0x67,0x58,0x4e,0x9b,0x6e,0x0b,0x0e,0x24,0xc3,
+ 0xe4,0x96,0x58,0x51,0x62,0x97,0x03,0x1a,0xd4,0xb1,0x6b,0x9f,0x6a,0x59,
+ 0x3b,0x62,0x5e,0x15,0x9a,0x12,0x55,0xaa,0x54,0x30,0xa8,0x0d,0x58,0xf0,
+ 0xa4,0xcc,0x94,0x64,0xdf,0xca,0x60,0x50,0x5b,0xb0,0xe0,0xf1,0x9f,0xe4,
+ 0x0e,0x9a,0x91,0xbd,0x00,0x0b,0xaa,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,
+ 0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_help_png_len = 837;
+static const unsigned char small_help_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x02,0xd0,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0xd1,0xc4,0x54,0x20,0x00,0x08,0x20,0x16,0x72,0x35,0xa6,0xa6,
+ 0xec,0xf8,0xff,0xf0,0xc1,0x47,0x86,0x47,0x8f,0x3f,0x33,0x3c,0x7b,0xfa,
+ 0x99,0xe1,0xd3,0x97,0x42,0x46,0x64,0x79,0x80,0x00,0x62,0x44,0x0e,0x0a,
+ 0x57,0x57,0xd7,0xff,0xbb,0x77,0xef,0x66,0xc4,0x30,0x05,0x0d,0x24,0xc4,
+ 0x6d,0xfd,0x7f,0xee,0xfc,0x4b,0x86,0xeb,0xd7,0xde,0x02,0x79,0xbf,0x81,
+ 0xf8,0x1f,0x10,0xff,0x61,0xf8,0xcf,0xf0,0x93,0xe1,0xcf,0xdf,0x76,0xb0,
+ 0x7e,0x80,0x00,0x42,0x71,0x31,0x1b,0x1b,0x1b,0x83,0x84,0x84,0xc4,0xff,
+ 0x17,0x2f,0x5e,0xe0,0x34,0x3c,0x2a,0x62,0xd3,0xff,0x5d,0xbb,0x1e,0x30,
+ 0x7c,0xfc,0xf8,0x0a,0x68,0xd0,0x57,0xa0,0x08,0x33,0x03,0x23,0x03,0x1b,
+ 0x03,0xc4,0x79,0x3f,0xe0,0xea,0x00,0x02,0x08,0x23,0x8c,0x5f,0x3c,0x7a,
+ 0xc1,0xc0,0xc8,0xc8,0x88,0x35,0x46,0x3d,0xdd,0x57,0xff,0xdf,0xbc,0xf9,
+ 0x2e,0xc3,0x87,0x8f,0x4f,0x18,0xfe,0xff,0x7f,0x01,0x74,0x5d,0x3f,0xe3,
+ 0x9f,0xbf,0x3d,0x48,0x8a,0xff,0x30,0xb0,0x30,0x25,0x83,0xb9,0x00,0x01,
+ 0x84,0x62,0xf0,0xbf,0x7f,0xff,0xc0,0xf4,0xd7,0x77,0x5f,0xb1,0x1a,0xbe,
+ 0x67,0xcf,0x7d,0x86,0xef,0x3f,0x9e,0x33,0x30,0xfc,0x7f,0xcd,0xf0,0xe7,
+ 0xdf,0x1c,0xb8,0xaf,0xfe,0xfc,0x6d,0x63,0x64,0x64,0x60,0x85,0x06,0x09,
+ 0xc4,0xd5,0x00,0x01,0x84,0x62,0x30,0xd0,0x30,0x30,0xcd,0xc1,0xc1,0xc1,
+ 0xf0,0xf2,0xf1,0x4b,0x0c,0xc3,0xff,0x33,0x7c,0x00,0x12,0x1f,0xc1,0x2e,
+ 0xc3,0x04,0xcc,0x40,0x39,0x50,0x38,0x43,0xe4,0x00,0x02,0x08,0x6b,0xaa,
+ 0x60,0x62,0x62,0x62,0xe0,0xe2,0xe4,0x62,0x78,0x7a,0xff,0x29,0xd8,0x70,
+ 0x20,0x60,0x84,0xb9,0x0c,0x9b,0x7a,0x2d,0xcd,0x39,0x40,0x07,0xfc,0x02,
+ 0xb2,0x7e,0x32,0xfc,0xfd,0xb7,0x12,0xac,0x06,0x20,0x80,0x50,0x0c,0x86,
+ 0xb9,0x18,0x18,0x1b,0x60,0x57,0xff,0xf9,0xf3,0x07,0xc3,0x70,0x74,0xe0,
+ 0xe3,0xb5,0xe6,0xff,0xed,0x5b,0x6f,0x81,0x2e,0xfd,0xc8,0x80,0x1c,0x79,
+ 0x00,0x01,0x84,0x33,0x1d,0xb3,0xb0,0xb0,0x30,0xb0,0xb3,0xb3,0x83,0xc3,
+ 0xfd,0xf1,0xdd,0xc7,0x58,0x0d,0x0f,0x0a,0x58,0xff,0xff,0xe2,0x45,0x50,
+ 0xea,0x78,0x0b,0x0e,0xa2,0x3f,0xff,0x56,0xc0,0xe5,0x01,0x02,0x08,0x25,
+ 0x8c,0xd1,0xb3,0x37,0x33,0x33,0x33,0x38,0x58,0xfe,0xfe,0xfd,0xcb,0x70,
+ 0xe9,0xcc,0x25,0x8c,0x30,0xbf,0x75,0xfb,0x1d,0xc3,0x8b,0x17,0xaf,0x80,
+ 0x1a,0xdf,0x01,0x0d,0x5d,0x84,0x62,0x29,0x40,0x00,0xa1,0x18,0xfc,0xeb,
+ 0xd7,0x2f,0xa8,0x0d,0xc0,0x64,0xff,0xfb,0x37,0x98,0xff,0xf3,0xd7,0x4f,
+ 0x86,0x2f,0x5f,0xbe,0x30,0xbc,0x7d,0xf7,0x96,0x61,0xe3,0x9a,0x8d,0x28,
+ 0x86,0xdf,0xba,0xf9,0x0e,0xa8,0xf4,0x0b,0x4a,0x10,0xc0,0x00,0x40,0x00,
+ 0xa1,0x04,0xc5,0xfb,0xf7,0xef,0xc1,0x86,0x7e,0xfc,0xf8,0x91,0xe1,0xd7,
+ 0xef,0x5f,0xe0,0x60,0xf8,0xfa,0xf5,0x2b,0x83,0x8e,0x91,0x0e,0x8a,0x26,
+ 0x58,0xb0,0xfc,0xff,0xff,0x0f,0xe2,0x0a,0x06,0xcc,0x22,0x07,0x20,0x80,
+ 0xc0,0xde,0x87,0x61,0x3e,0x3e,0xbe,0xff,0xc0,0x0c,0xf2,0xff,0xf2,0xd9,
+ 0xcb,0x20,0xd5,0xff,0xef,0x5c,0xbb,0xf3,0xff,0xc6,0xa5,0x1b,0xff,0x21,
+ 0xa1,0xf4,0x9f,0x81,0x14,0x0c,0x10,0x40,0xa8,0x1c,0xa0,0x01,0xa7,0x8e,
+ 0x9c,0x82,0x1b,0x04,0x33,0xfc,0xf8,0xa1,0xe3,0x58,0x0d,0x97,0x96,0x9c,
+ 0xfa,0x9f,0x85,0xa9,0xfa,0x3f,0x33,0x63,0x3a,0x86,0x1c,0x40,0x00,0x61,
+ 0xa4,0x0a,0x33,0x1b,0x33,0x06,0xe4,0xd8,0xe7,0xe6,0xe6,0x06,0x87,0x37,
+ 0x36,0xf0,0xf2,0xe5,0x27,0x60,0x40,0x7c,0x67,0x00,0xa5,0x5f,0x74,0x00,
+ 0x10,0x40,0x18,0x06,0x23,0x1b,0x0a,0x62,0x83,0xc2,0x13,0x94,0x96,0xcf,
+ 0x1e,0x3f,0x8b,0x25,0xc9,0x7d,0x02,0x2a,0x02,0x45,0xde,0x2f,0x0c,0x83,
+ 0x01,0x02,0x08,0xc5,0x60,0x5c,0x99,0x00,0x94,0x9e,0x41,0x25,0x1f,0x3a,
+ 0xf8,0x8d,0x23,0x27,0x82,0x00,0x40,0x00,0x11,0xac,0x41,0x40,0x96,0x89,
+ 0x48,0x89,0x80,0x93,0xde,0xfa,0x55,0xeb,0x71,0x96,0x7c,0xe8,0x00,0x20,
+ 0x80,0x88,0xae,0x9a,0x3e,0x7d,0xfe,0xc4,0xf0,0xf1,0xd3,0x47,0x62,0x95,
+ 0x33,0x00,0x04,0x10,0x4a,0x0d,0x82,0x57,0x21,0xd4,0xa5,0xb8,0x82,0x0b,
+ 0x1d,0x00,0x04,0x18,0x00,0x29,0x15,0x9b,0x2c,0x53,0x95,0xae,0x38,0x00,
+ 0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_iconview_png_len = 613;
+static const unsigned char small_iconview_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xf7,0x49,0x44,0x41,0x54,0x38,0xcb,0xed,0xd5,
+ 0x4b,0x4b,0x95,0x51,0x14,0xc6,0xf1,0x9f,0x9e,0x93,0x77,0x93,0x04,0x2b,
+ 0x91,0x28,0x2b,0x23,0xb3,0xf2,0x16,0x74,0xb5,0x20,0xa8,0x81,0x15,0x54,
+ 0xd6,0x20,0x0c,0x44,0x1a,0x44,0x08,0x41,0xa3,0x90,0x0a,0x22,0x13,0x3f,
+ 0x41,0x91,0x96,0x23,0x73,0x6c,0x93,0x1a,0xe5,0x20,0xb5,0x59,0x8d,0xfa,
+ 0x0a,0x45,0x34,0x69,0x50,0x73,0x57,0x93,0xed,0xe5,0xa4,0x47,0x0f,0x41,
+ 0x34,0x69,0xb0,0xe1,0x7d,0xd9,0xff,0xfd,0xec,0x87,0xb5,0xd6,0xc3,0x16,
+ 0x11,0xfe,0xc6,0xca,0xfd,0xa1,0x08,0x19,0x64,0xd3,0x2a,0x5e,0x71,0xa0,
+ 0x00,0x26,0x47,0x38,0x1d,0x68,0x57,0xec,0x1e,0x9e,0xa2,0x1e,0x35,0xa8,
+ 0xc0,0x86,0x24,0x56,0x5c,0x00,0x53,0xb4,0x28,0x9c,0x44,0x4b,0x35,0xfb,
+ 0x30,0x3e,0xf3,0x3c,0x5a,0x1e,0x1d,0x08,0xfb,0x7c,0xb6,0xc3,0x94,0x2a,
+ 0x63,0xd8,0x9b,0x04,0xaa,0xd7,0x60,0x5a,0xb0,0x11,0x25,0x28,0x5a,0x10,
+ 0xce,0xba,0x2c,0x74,0x0b,0x27,0xc5,0xc0,0xb3,0xde,0x18,0x79,0x33,0x12,
+ 0x57,0x27,0x7b,0x63,0x70,0xee,0x6e,0x38,0xee,0x1b,0x9a,0xd6,0x64,0x8e,
+ 0xf9,0x8e,0xc6,0x64,0x20,0xbb,0x20,0x5c,0xe2,0x90,0xb9,0xd9,0xf9,0x77,
+ 0xd1,0x3a,0xd6,0x12,0x5a,0x84,0x2e,0x31,0xf0,0xa4,0x2f,0x86,0xdf,0x0f,
+ 0x87,0xeb,0x02,0x5d,0xda,0xf2,0x30,0x73,0x43,0xe1,0x9a,0xc0,0x61,0x34,
+ 0xa0,0x6c,0x49,0x98,0xce,0xf2,0x87,0xe5,0x11,0x11,0x31,0xfe,0x65,0x3c,
+ 0xdc,0x11,0xda,0xc4,0xad,0x97,0xfd,0xe1,0x8c,0x79,0x9c,0x47,0xf7,0x6a,
+ 0xcc,0xcd,0x89,0xbe,0x70,0x4a,0xe0,0x2c,0x76,0xa2,0x72,0xa9,0x14,0xd4,
+ 0xe2,0x81,0x41,0x31,0xf2,0x69,0x28,0x26,0xbf,0x4e,0x44,0xcf,0xeb,0x9e,
+ 0x28,0xba,0x2d,0x74,0x08,0x5c,0x4c,0x8e,0x1e,0xff,0xce,0x18,0x10,0xf6,
+ 0x8b,0x74,0xf9,0x1e,0x54,0x2f,0x6f,0x5e,0x79,0xea,0xf2,0x15,0x59,0x6f,
+ 0x5d,0x17,0x97,0xa6,0xce,0x45,0xe7,0x68,0x7b,0xa8,0x13,0xb8,0x80,0x83,
+ 0x68,0x42,0xcf,0x72,0xa6,0x7d,0xb4,0x35,0xd4,0xac,0x22,0x9c,0xc4,0x33,
+ 0x69,0x6c,0xea,0x53,0x87,0xfb,0x65,0xcc,0x38,0x2a,0xf0,0x03,0xa7,0xb1,
+ 0x1b,0x75,0xd8,0x9a,0xc3,0x1c,0xc9,0x61,0x1a,0x17,0x4b,0xb1,0x4c,0x3c,
+ 0x8b,0x4a,0x6c,0xc6,0x2e,0xb4,0xe1,0x04,0xba,0xd2,0x77,0x3d,0xaa,0x0a,
+ 0x60,0xca,0x56,0x06,0x24,0xe3,0x7e,0x1a,0xfe,0xc6,0xb4,0x9a,0x92,0x40,
+ 0x43,0x1a,0xa5,0xce,0x75,0x98,0xea,0xe5,0xe3,0x96,0x2f,0x20,0xaf,0x54,
+ 0x7a,0x91,0x9c,0x6c,0xc1,0x26,0xcd,0x3e,0xe6,0x61,0x3a,0x52,0x99,0x2a,
+ 0x90,0xf9,0x1f,0x90,0x7f,0x17,0x90,0xe9,0x02,0x02,0x32,0xfd,0xa7,0x01,
+ 0xb9,0x21,0x6b,0x36,0x0d,0xff,0xcf,0x3c,0x01,0x59,0x8d,0x59,0x35,0x20,
+ 0x99,0xe4,0xbc,0x16,0xdb,0x93,0xc3,0x85,0xe1,0x6f,0x4f,0x97,0x56,0x16,
+ 0xc0,0x94,0xc9,0xf3,0xf4,0x64,0x93,0xfb,0xda,0xd4,0xe5,0x6d,0xc9,0x65,
+ 0x55,0xda,0x5b,0x9f,0xc9,0xfb,0x18,0x2e,0x1d,0x2e,0x4d,0x0e,0xcb,0x16,
+ 0x44,0x0b,0x61,0x7e,0x01,0x51,0x63,0x2c,0x0f,0x0d,0xdc,0x47,0xb4,0x00,
+ 0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_konsole_png_len = 1155;
+static const unsigned char small_konsole_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xaf,0xc8,0x37,0x05,0x8a,0xe9,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,
+ 0x44,0x00,0xff,0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,
+ 0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x00,
+ 0x46,0xc9,0x6b,0x3e,0x00,0x00,0x04,0x13,0x49,0x44,0x41,0x54,0x38,0xcb,
+ 0x95,0x95,0xcf,0x6b,0x14,0x67,0x18,0xc7,0xbf,0xcf,0x3b,0xef,0xcc,0xfe,
+ 0x74,0xa9,0x66,0x83,0x96,0x44,0x1b,0x4c,0x02,0x81,0x42,0xb1,0xc1,0x2a,
+ 0x48,0x0f,0x82,0x97,0x1e,0x04,0x0f,0x5e,0x8b,0xb7,0x5e,0x05,0x0f,0x05,
+ 0xff,0x04,0xa1,0x3d,0x08,0x1e,0x2c,0x3d,0xe4,0x94,0x5b,0x28,0xd4,0x6b,
+ 0x9b,0x1c,0xf6,0x20,0xa9,0x8d,0x25,0x63,0x6b,0x82,0x89,0xab,0x21,0xbb,
+ 0xd9,0xac,0xeb,0xae,0x1b,0x57,0x77,0x66,0x76,0xe6,0x7d,0xe7,0x7d,0x7a,
+ 0x71,0xc7,0xdd,0xc4,0x56,0x1d,0x78,0x18,0xe6,0x61,0x9e,0xcf,0xf3,0x7d,
+ 0x9e,0xe7,0x9d,0x67,0xa8,0x50,0x28,0x1c,0x9b,0x9d,0x9d,0xbd,0x50,0x2c,
+ 0x16,0x8f,0x30,0x33,0xe3,0x23,0x2f,0x66,0x06,0x11,0x51,0x14,0x45,0xda,
+ 0x75,0xdd,0xe5,0x6a,0xb5,0xea,0x02,0x00,0xdd,0xb8,0x71,0xe3,0xd7,0x2b,
+ 0x57,0xae,0x7c,0x53,0x28,0x14,0xe4,0x87,0x72,0xfb,0xef,0xf5,0xef,0x44,
+ 0x04,0xa5,0x14,0x2d,0x2d,0x2d,0x3d,0xba,0x7a,0xf5,0xea,0xb7,0xcf,0x9e,
+ 0x3d,0x5b,0xa5,0x72,0xb9,0xac,0x4f,0x9c,0x38,0x61,0xad,0xaf,0xaf,0xc3,
+ 0xb2,0x2c,0x64,0x32,0x99,0x8f,0x52,0x1c,0xc7,0x31,0x5e,0xbd,0x7a,0x85,
+ 0x99,0x99,0x19,0x84,0x61,0x88,0xcb,0x97,0x2f,0x7f,0x5f,0x2a,0x95,0x7e,
+ 0x94,0xb6,0x6d,0x5b,0xaf,0x5f,0xbf,0xc6,0x2f,0x77,0xee,0xe0,0xab,0x73,
+ 0xe7,0xd0,0x6e,0x34,0xd0,0x7e,0xfe,0x1c,0xc6,0x18,0x10,0xd1,0x7b,0xc1,
+ 0x5a,0x6b,0xb8,0xae,0x8b,0xeb,0xd7,0xaf,0x63,0x7c,0x7c,0x1c,0x52,0xca,
+ 0x0c,0x00,0x48,0x21,0x04,0x88,0x08,0xe9,0x54,0x0a,0x99,0x7c,0x1e,0xa7,
+ 0x67,0x66,0xd0,0x6e,0x36,0x71,0x77,0x71,0x11,0xcf,0xeb,0xf5,0x0f,0x82,
+ 0x8f,0x8c,0x8c,0x00,0x00,0xa2,0x28,0x4a,0x7c,0x92,0x88,0x20,0x84,0x40,
+ 0xbb,0xd5,0xc2,0x83,0x95,0x15,0x8c,0x1e,0x3d,0x8a,0xf1,0x89,0x09,0x28,
+ 0x63,0xb0,0xbb,0xbb,0x0b,0x21,0xc4,0x7b,0xc1,0x96,0x65,0xc1,0xf7,0x7d,
+ 0x74,0xbb,0xdd,0x44,0x88,0x24,0x22,0x18,0x63,0xf0,0x49,0xb1,0x88,0x53,
+ 0x67,0xcf,0xa2,0xb4,0xb8,0x88,0x3f,0xef,0xde,0xc5,0x6e,0xa5,0x02,0xad,
+ 0x14,0x40,0x84,0x7e,0xf2,0xfd,0xc3,0xeb,0xc7,0x06,0x41,0x80,0x20,0x08,
+ 0x10,0xc7,0xf1,0x5b,0xb0,0x10,0x02,0x52,0x4a,0xfc,0x75,0xef,0x1e,0x7e,
+ 0xbe,0x7d,0x1b,0x52,0x08,0xd8,0xb6,0x8d,0xcf,0x4e,0x9e,0xc4,0x17,0xa7,
+ 0x4f,0x83,0x88,0x10,0xf6,0x7a,0x58,0x5d,0x59,0x81,0xef,0x79,0x30,0xc6,
+ 0x20,0x8e,0x63,0x18,0x63,0x60,0x8c,0x41,0xa7,0xd3,0x49,0x12,0x0c,0xce,
+ 0x45,0xd2,0x1b,0x45,0x9d,0x97,0x2f,0x51,0xdd,0xde,0x46,0x3e,0x9f,0x47,
+ 0x2e,0x9b,0x85,0xd7,0xed,0xa2,0xd7,0xeb,0x41,0x08,0x81,0x5e,0x18,0xc2,
+ 0xf3,0x3c,0x78,0xdd,0x2e,0x8c,0x31,0x50,0x4a,0x21,0x8a,0x22,0x78,0x9e,
+ 0x07,0xdf,0xf7,0x31,0x3a,0x3a,0xfa,0xdf,0x60,0xc7,0x71,0x90,0xc9,0x64,
+ 0x90,0x4e,0xa7,0x61,0x49,0x89,0x9d,0x4a,0x05,0xbb,0x3b,0x3b,0x10,0x42,
+ 0x0c,0x99,0x31,0xe6,0xed,0x80,0xa4,0x84,0x6d,0xdb,0x20,0x22,0x30,0xf3,
+ 0xbb,0xc1,0xe9,0x74,0x1a,0xd9,0x6c,0x16,0xd9,0x6c,0x16,0xa9,0x54,0x0a,
+ 0x8e,0xe3,0x40,0x4a,0x09,0xcb,0xb2,0x86,0x02,0x95,0x52,0x50,0x4a,0xc1,
+ 0xb6,0x6d,0x58,0x96,0x05,0x00,0xb0,0x6d,0xfb,0xa0,0xe2,0xfe,0x50,0xfa,
+ 0x8a,0xfb,0xe0,0x54,0x2a,0x95,0x04,0xf7,0xc1,0x71,0x1c,0x43,0x6b,0x8d,
+ 0x28,0x8a,0x86,0xfc,0xa9,0x54,0x2a,0x49,0x9c,0x54,0x33,0x58,0x96,0xe3,
+ 0x38,0x70,0x1c,0x07,0xe9,0x74,0x7a,0x48,0xb5,0x10,0x02,0xcc,0x0c,0xad,
+ 0x35,0x94,0x52,0xc9,0x73,0xbf,0x02,0x29,0x65,0x92,0x78,0xa8,0x15,0x00,
+ 0x30,0x35,0x35,0x85,0x28,0x8a,0x90,0xcb,0xe5,0x86,0x14,0x4b,0x29,0x13,
+ 0x65,0x7d,0x70,0x18,0x86,0x08,0xc3,0x10,0xbd,0x5e,0x0f,0xbe,0xef,0x27,
+ 0x42,0x86,0x5a,0x11,0x86,0xa1,0x2a,0x14,0x0a,0xf6,0xb5,0x6b,0xd7,0x10,
+ 0x45,0x51,0xa2,0x64,0xbf,0xf5,0x8f,0x58,0x1c,0xc7,0x07,0xac,0x0f,0x34,
+ 0xc6,0x20,0x8a,0x22,0x05,0x00,0x56,0x3e,0x9f,0xff,0xfc,0xf8,0xf1,0xe3,
+ 0x93,0x00,0x2c,0xad,0xb5,0x51,0x4a,0x99,0x28,0x8a,0x62,0x22,0x12,0xcc,
+ 0x4c,0x83,0xc0,0x01,0x30,0x07,0x41,0xa0,0x95,0x52,0xe6,0x4d,0xdf,0x59,
+ 0x29,0xc5,0xab,0xab,0xab,0x5b,0x0b,0x0b,0x0b,0x3f,0x79,0x9e,0xb7,0x45,
+ 0x8e,0xe3,0x1c,0x9d,0x98,0x98,0x38,0x7f,0xe8,0xd0,0xa1,0x63,0xc6,0x18,
+ 0x93,0xcd,0x66,0x8f,0xcc,0xce,0xce,0x9e,0xbf,0x74,0xe9,0xd2,0xd7,0xc5,
+ 0x62,0x51,0x0e,0xaa,0x32,0xc6,0x80,0x99,0xb1,0xb7,0xb7,0x67,0x96,0x97,
+ 0x97,0x1f,0xdd,0xbf,0x7f,0x7f,0xa9,0xd1,0x68,0x94,0x89,0x88,0xb4,0xd6,
+ 0x71,0xa5,0x52,0xf9,0xbb,0xd3,0xe9,0xfc,0x01,0xe0,0xed,0xd2,0x00,0x80,
+ 0xc9,0xc9,0xc9,0x2f,0xe7,0xe6,0xe6,0x7e,0xab,0xd5,0x6a,0x7e,0xa5,0x52,
+ 0xe1,0x6a,0xb5,0xca,0xcd,0x66,0x93,0x5b,0xad,0x16,0xb7,0x5a,0x2d,0x6e,
+ 0x36,0x9b,0xbc,0xbd,0xbd,0xcd,0xe5,0x72,0x99,0xdb,0xed,0xb6,0x2e,0x95,
+ 0x4a,0x8f,0x2f,0x5e,0xbc,0xf8,0x1d,0x11,0x59,0xff,0xb7,0x48,0xec,0x5b,
+ 0xb7,0x6e,0x2d,0x30,0x33,0x6b,0xad,0xb9,0xdb,0xed,0x72,0xad,0x56,0xe3,
+ 0x9d,0x9d,0x1d,0xae,0xd7,0xeb,0x5c,0xab,0xd5,0xf8,0xc9,0x93,0x27,0xec,
+ 0xba,0x2e,0x6f,0x6c,0x6c,0x70,0x10,0x04,0xcc,0xcc,0xec,0xba,0x6e,0x63,
+ 0x6c,0x6c,0xec,0xcc,0x7e,0x5e,0x72,0xdc,0xe2,0x38,0x36,0x9b,0x9b,0x9b,
+ 0x2f,0x6a,0xb5,0x1a,0xf2,0xf9,0x3c,0x8c,0x31,0xb0,0x6d,0x3b,0xf9,0x7c,
+ 0x8d,0x31,0x10,0x42,0x60,0x64,0x64,0x04,0x8e,0xe3,0xa0,0xd7,0xeb,0x21,
+ 0x08,0x02,0xac,0xad,0xad,0x29,0xdf,0xf7,0x0f,0x28,0x1e,0x74,0xf0,0xc3,
+ 0x87,0x0f,0xff,0xd9,0xda,0xda,0xca,0x0a,0x21,0x3e,0x25,0xa2,0x8c,0x31,
+ 0x46,0x0c,0xfe,0xae,0x98,0x19,0x4a,0x29,0xec,0xed,0xed,0xf1,0xfa,0xfa,
+ 0xba,0x37,0x3f,0x3f,0xff,0xe0,0xe6,0xcd,0x9b,0x3f,0x34,0x1a,0x8d,0xdf,
+ 0x01,0xe8,0x41,0xf0,0xbb,0xb6,0x78,0xee,0xf0,0xe1,0xc3,0x67,0xa6,0xa7,
+ 0xa7,0x2f,0x4c,0x4d,0x4d,0x9d,0x1a,0x1b,0x1b,0x1b,0xcf,0xe5,0x72,0x39,
+ 0x22,0xa2,0x30,0x0c,0x75,0xb3,0xd9,0x7c,0xf1,0xf4,0xe9,0xd3,0xf2,0xc6,
+ 0xc6,0xc6,0x72,0xbd,0x5e,0x2f,0xc5,0x71,0xfc,0x78,0x3f,0x14,0x00,0xfe,
+ 0x05,0x28,0xfb,0xab,0x02,0x0e,0x36,0xd1,0x14,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_label_png_len = 953;
+static const unsigned char small_label_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x03,0x4b,0x49,0x44,0x41,0x54,0x48,0xc7,0xb5,0x94,
+ 0x6d,0x48,0x53,0x61,0x14,0xc7,0x97,0x99,0x58,0xcd,0x0a,0x87,0x32,0x97,
+ 0x89,0x53,0xb0,0x51,0x8d,0x8c,0x04,0xcb,0x24,0xa7,0x6b,0x95,0x61,0x7e,
+ 0xc9,0xb2,0x08,0xd2,0xe9,0xb2,0x08,0xf4,0x8b,0x04,0x7d,0x88,0x0a,0x5a,
+ 0xa4,0x11,0x44,0x51,0x69,0x91,0xa1,0x29,0xa1,0x26,0x6a,0xa1,0x89,0x0a,
+ 0x42,0x2f,0x90,0x51,0x68,0xf3,0x2d,0x28,0x2a,0x2a,0x7b,0x5b,0xea,0xdc,
+ 0x96,0xd3,0x6a,0xdb,0xbf,0xf3,0x6c,0xf7,0xda,0x36,0xef,0xac,0x3e,0x74,
+ 0xe0,0xc7,0x1e,0x2e,0x77,0xbf,0x9d,0x9d,0x73,0x9e,0x23,0x02,0x20,0xfa,
+ 0x1f,0xfc,0x3e,0x88,0x44,0x73,0x72,0x72,0x72,0xa0,0xd5,0x6a,0xa1,0xd3,
+ 0xe9,0xbc,0x60,0xcf,0x55,0x2a,0x15,0xe4,0x72,0xf9,0x9e,0xe0,0xe0,0xe0,
+ 0xf9,0xf4,0x6e,0xc0,0xbf,0x88,0xb3,0x35,0x1a,0x0d,0xda,0x4a,0x77,0xc3,
+ 0x71,0xff,0x24,0x1c,0x0f,0x4e,0x71,0xe8,0xe1,0xe8,0x2c,0x46,0x77,0x49,
+ 0x2a,0x7b,0xa9,0x9f,0xc4,0xc9,0xf4,0xf9,0x47,0x39,0x8b,0x2c,0x02,0xbe,
+ 0x38,0x5e,0xb4,0xe1,0x67,0xcb,0x41,0x37,0x0d,0xbb,0x30,0x55,0xad,0x86,
+ 0x54,0x2a,0x75,0x28,0x14,0x8a,0x67,0xb1,0xb1,0xb1,0x7b,0xc5,0x62,0xf1,
+ 0x92,0xd9,0xe4,0x22,0x4e,0xc4,0xe4,0x0b,0x93,0x92,0x92,0x30,0x75,0xa7,
+ 0x00,0xf6,0xa1,0x66,0xb4,0x96,0x1d,0xc1,0xe4,0x8d,0xb4,0x69,0xa6,0x6a,
+ 0x33,0x61,0xba,0x7b,0x04,0x5d,0x7a,0x35,0x28,0x6b,0x63,0x40,0x40,0x40,
+ 0x36,0x7d,0x67,0x01,0x31,0xd7,0x6f,0xc6,0xdc,0x21,0x84,0x89,0x27,0x9a,
+ 0xf7,0xe3,0x5b,0xdd,0x4e,0x58,0x2b,0x53,0x7f,0x53,0xb5,0x09,0x43,0x2d,
+ 0xe7,0xf1,0xe6,0x61,0x1d,0x2c,0x55,0x9b,0x11,0x1a,0x1a,0xea,0xa4,0x7a,
+ 0x77,0xcb,0x64,0xb2,0x4d,0xfe,0xca,0x32,0x43,0x6c,0x69,0xc8,0x83,0xf9,
+ 0xe6,0x0e,0x8c,0x5d,0x53,0xc1,0x54,0xe1,0xa6,0xbf,0xe9,0x0c,0x7a,0x7a,
+ 0x7a,0x30,0x3c,0xfc,0x1e,0xc6,0xc1,0x7b,0x30,0x75,0x9c,0x40,0x93,0x3e,
+ 0x8b,0x35,0x73,0x5c,0x22,0x91,0xe4,0x71,0xf2,0xb9,0x7e,0xc5,0x4a,0xa5,
+ 0x12,0x23,0x55,0x99,0xf8,0x5a,0xa1,0xc1,0xa7,0xf2,0x8d,0x30,0x5e,0x4d,
+ 0x81,0xa1,0xb1,0x14,0x06,0x83,0x01,0x16,0x8b,0x05,0x0e,0x87,0x03,0x93,
+ 0x93,0x93,0x30,0xbf,0xea,0xc6,0x68,0x7d,0x3e,0xda,0x8f,0x25,0xb3,0xec,
+ 0x7b,0xc3,0xc3,0xc3,0x67,0x34,0xd4,0x4b,0xcc,0xea,0x5d,0x9c,0x11,0x85,
+ 0xe1,0xcb,0xc9,0x2e,0x7a,0x9b,0xce,0x4e,0x4b,0xf9,0x60,0x72,0xeb,0xf8,
+ 0x28,0x3e,0x3f,0x69,0xc4,0xa7,0xba,0x7c,0x5c,0x29,0xdc,0x80,0x98,0x98,
+ 0x98,0xe7,0xc4,0x01,0xcf,0x86,0xf2,0x53,0xb1,0x96,0x35,0x8f,0x58,0x49,
+ 0x38,0x1f,0xeb,0x13,0x31,0x50,0x55,0x84,0x81,0x81,0x01,0x58,0xad,0x56,
+ 0xf8,0x86,0xdd,0x6e,0x87,0xd9,0x6c,0x86,0xf1,0xe5,0x53,0x7c,0xbc,0x55,
+ 0x88,0x3b,0x87,0xe3,0x41,0xcd,0x7c,0x1f,0x18,0x18,0x98,0xce,0x97,0x85,
+ 0x4f,0x7b,0x2d,0xf7,0x60,0x39,0x51,0x51,0x98,0xbe,0x0c,0xbd,0x0d,0x25,
+ 0xf8,0x31,0x31,0x0e,0x7f,0xe1,0x74,0x3a,0xa9,0x2c,0x36,0x7c,0x78,0x7a,
+ 0x1b,0x83,0xe7,0x52,0x10,0x16,0x16,0x66,0x8f,0x8b,0x8b,0x7b,0x4c,0x35,
+ 0xdf,0xe3,0x9a,0x16,0x4e,0xbc,0x85,0x98,0x47,0x48,0x08,0x0d,0xd1,0x1c,
+ 0x14,0x14,0x64,0xeb,0xb8,0x78,0x08,0x96,0x77,0x7d,0x70,0xd2,0xdf,0x17,
+ 0x0a,0x96,0x39,0x63,0x6a,0xec,0x03,0xfa,0x4a,0x13,0x71,0xa5,0x40,0xc1,
+ 0x64,0x26,0x42,0xca,0x8b,0xe3,0x09,0x19,0x37,0x97,0x91,0x44,0x22,0x51,
+ 0x46,0xd8,0x1e,0x5d,0xd6,0xc2,0x36,0x3a,0x8c,0xd9,0xe2,0xf5,0x93,0xbb,
+ 0x38,0xbc,0x3d,0x0a,0x09,0x31,0x21,0x4c,0x76,0x9c,0x50,0x78,0x8e,0x07,
+ 0x93,0x07,0x12,0x8b,0x08,0x39,0x97,0x79,0xab,0x56,0x2d,0x47,0xd7,0xf5,
+ 0xa3,0xf8,0xf6,0xe5,0x8d,0xa0,0xf4,0x59,0x47,0x0d,0x0a,0xd4,0x91,0x58,
+ 0x1d,0x25,0x66,0x92,0x0b,0x44,0x26,0xb1,0xc6,0x77,0xa8,0x65,0x5c,0x49,
+ 0x16,0x73,0x72,0x15,0xab,0x39,0x31,0xd2,0x56,0xb2,0x03,0xa6,0xb7,0xfd,
+ 0x5e,0xd2,0xde,0x8e,0x6a,0xe4,0xa7,0xca,0xa0,0x74,0x4b,0xcb,0x89,0x5c,
+ 0x62,0x2b,0xb1,0xc2,0x57,0x1c,0xc1,0xb6,0x1c,0x27,0xe7,0x33,0x5f,0x4f,
+ 0xd4,0xeb,0xd2,0x22,0xd1,0x59,0x5e,0x8c,0xef,0x13,0x66,0x97,0xb4,0xa7,
+ 0xbd,0x1a,0x79,0x2a,0x19,0x56,0x2d,0x9b,0x96,0xe6,0x71,0xd9,0xb2,0x41,
+ 0x58,0xea,0x2b,0x8e,0xf7,0x38,0xf3,0xf2,0x68,0x62,0x3b,0x51,0x4b,0x58,
+ 0x1b,0x4f,0xef,0x83,0xa1,0xb3,0x06,0xb9,0xaa,0x08,0x21,0x69,0x02,0xd7,
+ 0xa3,0x85,0x42,0xcb,0x23,0x82,0xdf,0xcf,0x3e,0x72,0x96,0x79,0x25,0xf1,
+ 0xa3,0x88,0xc6,0x71,0xe5,0x6c,0x52,0x7e,0x8e,0x85,0xc4,0x02,0x99,0xb3,
+ 0xb2,0x64,0xb0,0x86,0x72,0x1b,0xf1,0x12,0xa1,0x15,0x92,0x7a,0x2d,0x7a,
+ 0x7f,0x72,0x8f,0xcc,0xf9,0x86,0xae,0xe3,0x4a,0xc3,0x6e,0xec,0x36,0xae,
+ 0xa6,0x5e,0x52,0xbf,0x62,0x81,0x1f,0xf2,0x94,0x47,0xbb,0xc6,0xc9,0x3d,
+ 0xeb,0x4a,0x57,0xa3,0x7c,0xa4,0x7f,0x2d,0xf6,0x91,0xb3,0x65,0x15,0xe6,
+ 0xba,0x5d,0xee,0x9b,0x2a,0xb8,0xec,0x7f,0x01,0xc8,0xec,0xb4,0x80,0x13,
+ 0x27,0x47,0xab,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
+ 0x82
+};
+
+static const unsigned int small_lcdnumber_png_len = 558;
+static const unsigned char small_lcdnumber_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xc0,0x49,0x44,0x41,0x54,0x38,0xcb,0xb5,0x55,
+ 0x4d,0x4b,0xc3,0x40,0x10,0xdd,0x4d,0x5b,0x6a,0xc5,0x1c,0x04,0x3d,0x49,
+ 0xa1,0xbd,0xd8,0xb3,0x50,0x90,0xea,0xaf,0xf0,0xe6,0xd5,0x83,0x08,0xfa,
+ 0x07,0xbc,0x08,0x82,0x87,0x52,0xf0,0xea,0xc9,0x83,0x77,0x11,0xfc,0x0d,
+ 0x85,0x40,0x11,0x8a,0x87,0x1e,0x8a,0x85,0x42,0x7f,0x80,0x39,0xb4,0xb4,
+ 0xb6,0xa4,0x1f,0x59,0xe7,0x2d,0xbb,0x21,0x09,0x69,0x63,0x23,0x1d,0x78,
+ 0xd9,0x9d,0xd9,0xd9,0x97,0xd9,0x61,0xf3,0xc2,0x19,0x63,0x46,0xad,0x56,
+ 0x3b,0x77,0x5d,0xf7,0xda,0xb6,0xed,0xd3,0xd1,0x68,0xc4,0xd6,0xb5,0xc1,
+ 0x60,0xc0,0x5a,0xad,0xd6,0x47,0xbb,0xdd,0x7e,0x21,0xf7,0x95,0x30,0x46,
+ 0x3c,0x53,0xad,0x56,0xad,0x6e,0xb7,0x2b,0x16,0x8b,0x45,0x62,0xd4,0xeb,
+ 0x75,0x41,0x5c,0x9f,0x84,0x43,0xc2,0x6e,0x9a,0x1e,0x29,0x54,0x5a,0x28,
+ 0x14,0x18,0x25,0xb0,0xa4,0x96,0xcb,0xe5,0x30,0x1c,0x11,0xf6,0x08,0x3f,
+ 0x92,0x18,0xc7,0x9f,0xcf,0xe7,0x4c,0x08,0x91,0x98,0x78,0x3a,0x9d,0xea,
+ 0xa9,0x49,0xc8,0x82,0x98,0xc3,0xa3,0x1e,0xc7,0x56,0x6c,0x9e,0x99,0xde,
+ 0x7c,0xf8,0x3e,0x0c,0xac,0xf9,0xf6,0xca,0x62,0x0d,0x4d,0x8c,0x05,0x00,
+ 0x9b,0xf5,0x3c,0xec,0xf7,0xdf,0xfa,0x1e,0xc2,0x79,0x28,0x4c,0x99,0xe4,
+ 0x4c,0xfb,0xdf,0x88,0x76,0xc0,0xf4,0xa8,0x2d,0xec,0x47,0xc5,0xc3,0xa7,
+ 0xdd,0x3c,0x31,0x92,0x66,0xb3,0x99,0x9c,0xeb,0x51,0x5b,0xd8,0x8f,0x8a,
+ 0x87,0x73,0x02,0xc4,0x40,0xef,0xb9,0xc7,0xf2,0x17,0x79,0x2f,0x01,0xbe,
+ 0xae,0xac,0x78,0x59,0x8c,0x8c,0xc7,0x56,0xac,0xaf,0x4c,0xe7,0xa9,0xe3,
+ 0x25,0x80,0x0c,0x7e,0xe9,0xa6,0x14,0x88,0xfb,0xae,0x57,0x64,0xbb,0x22,
+ 0x7b,0xbc,0xac,0x97,0xcb,0xd6,0x57,0x56,0x8c,0x1e,0xc5,0xf5,0x72,0xd9,
+ 0xfa,0x46,0x2b,0x5e,0x49,0x1c,0x55,0x51,0xe3,0xa1,0x21,0xe3,0x18,0xcb,
+ 0xb7,0xe5,0x40,0xbc,0x72,0x57,0x91,0x63,0xec,0x3d,0x8e,0xfb,0xa4,0xad,
+ 0x7b,0x2b,0xd0,0x53,0xf8,0x7a,0x4f,0x14,0xb1,0x80,0x9e,0xe2,0x28,0x49,
+ 0xd5,0xcd,0x71,0x1c,0xe6,0xd3,0x71,0x7c,0xdb,0x42,0x12,0x43,0xa4,0x2d,
+ 0xcb,0x3a,0x86,0xf4,0x25,0x21,0x9f,0x4c,0x26,0xac,0xd9,0x6c,0xca,0x9b,
+ 0x8a,0x76,0xe3,0x00,0x70,0xb6,0x08,0x57,0x4a,0xa4,0xc5,0x3f,0xf0,0x45,
+ 0x78,0x24,0x9c,0x10,0x0e,0xa0,0x6c,0x19,0xc2,0x0e,0x61,0x5f,0x89,0xb4,
+ 0xa9,0x5a,0x64,0xac,0x51,0xb4,0xab,0x2a,0x85,0x96,0xda,0x84,0x6f,0xae,
+ 0x08,0x40,0xbe,0xad,0x90,0x85,0x9e,0x6a,0x39,0xfd,0xa3,0x09,0x75,0x7c,
+ 0x47,0xfd,0xef,0xc6,0x1c,0x7f,0x0d,0xce,0xb9,0xa1,0xc8,0x52,0x3e,0xd2,
+ 0x75,0x89,0x35,0xb9,0xc4,0x2f,0x75,0xa7,0xa1,0xa5,0x37,0x35,0xaa,0x69,
+ 0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_lineedit_png_len = 461;
+static const unsigned char small_lineedit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x19,0x74,0x45,0x58,0x74,0x53,
+ 0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,0x65,0x20,
+ 0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,0x65,0x3c,
+ 0x00,0x00,0x01,0x6f,0x49,0x44,0x41,0x54,0x78,0x9c,0xed,0x94,0x4d,0x4e,
+ 0xc2,0x50,0x10,0xc7,0x7f,0xd3,0x16,0x14,0x3f,0xc2,0x42,0x59,0x79,0x05,
+ 0x37,0xac,0x4c,0x3c,0x8c,0x5b,0xcf,0xe0,0x8e,0x03,0x48,0xdc,0x70,0x0b,
+ 0x0f,0xd2,0x18,0x12,0x43,0x48,0x48,0x34,0xe1,0x02,0xa4,0x2e,0xa4,0x35,
+ 0x10,0xa1,0x8f,0x71,0xd1,0x16,0x9f,0xe5,0xa3,0x96,0x04,0x57,0x4e,0x32,
+ 0x9b,0x79,0x7d,0xbf,0xf7,0x9f,0x99,0xce,0x88,0xaa,0xb2,0x0f,0x73,0xf6,
+ 0x42,0xfd,0x07,0xff,0x09,0xd8,0x03,0x10,0x11,0x17,0xb0,0x5d,0x76,0x60,
+ 0x29,0x60,0x32,0x17,0xc0,0x6d,0xb7,0xdb,0x0f,0x51,0x14,0xdd,0x04,0x41,
+ 0x50,0x8f,0xe3,0xb8,0x34,0xd1,0x18,0xc3,0x60,0x30,0x08,0x7d,0xdf,0x7f,
+ 0x04,0xee,0x80,0x0f,0x80,0x6a,0xab,0xd5,0x7a,0xd7,0x9c,0x19,0x63,0x0a,
+ 0xdd,0xfe,0x6e,0x34,0x1a,0x29,0x10,0x01,0x97,0x40,0xc3,0x03,0xdc,0x20,
+ 0x08,0xea,0x79,0x15,0x8e,0xb3,0xbd,0xfc,0x22,0x82,0xaa,0xe2,0xba,0x2e,
+ 0xaa,0xca,0x70,0x38,0x04,0x38,0x01,0xce,0x80,0xc8,0x03,0x5c,0x3b,0x7d,
+ 0x91,0xef,0xf2,0x66,0x53,0x69,0xc7,0xb2,0xb8,0xaa,0x2e,0xe1,0x00,0xf3,
+ 0xf9,0x3c,0x3b,0x3e,0x06,0xaa,0x1e,0x56,0xa3,0x9a,0xcd,0x26,0xf6,0x88,
+ 0xdb,0x17,0x37,0xc5,0x33,0x9b,0xcd,0x66,0xcb,0x64,0x01,0xf1,0xec,0xc3,
+ 0x5e,0xaf,0xb7,0xa2,0x6e,0x5b,0x26,0xb6,0x59,0x8a,0x05,0xd2,0xdf,0x2d,
+ 0x9f,0x66,0x11,0xac,0x40,0x31,0x6b,0xc1,0x9b,0xac,0x48,0xf1,0x56,0x70,
+ 0xfe,0xc2,0xba,0xfa,0xda,0x0f,0xd9,0x0d,0xcc,0x83,0x1d,0x40,0xc7,0xe3,
+ 0xf1,0x6f,0x85,0x6f,0x7c,0x34,0x0c,0xc3,0xec,0x68,0x01,0xa8,0x07,0x68,
+ 0xbf,0xdf,0x7f,0xea,0x74,0x3a,0x57,0xb5,0x5a,0x0d,0x63,0x4c,0xe9,0x47,
+ 0xa6,0xd3,0x29,0xdd,0x6e,0x17,0xe0,0x15,0x88,0x49,0xc6,0x9a,0x43,0xe0,
+ 0x16,0x78,0x26,0x99,0xf7,0x5d,0xfd,0x05,0xb8,0x07,0xae,0x81,0x0b,0x01,
+ 0x2a,0x24,0x13,0xd3,0x00,0xce,0x81,0x53,0x92,0xda,0x97,0xd9,0x7c,0x8b,
+ 0x54,0x69,0x04,0xbc,0x01,0x81,0xa4,0x80,0x0a,0x70,0x94,0xfa,0x01,0xe5,
+ 0x37,0x5c,0xb6,0xd9,0x3e,0x81,0x09,0x30,0x91,0xb4,0xb3,0x0e,0xab,0x6b,
+ 0xb3,0x2c,0xf8,0xc7,0xda,0xfc,0x02,0xf9,0x12,0x02,0x4b,0xeb,0xbb,0x9d,
+ 0xd4,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_line_png_len = 287;
+static const unsigned char small_line_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x00,0xb1,0x49,0x44,0x41,0x54,0x28,0xcf,0xb5,0x93,
+ 0xb1,0x0a,0x83,0x30,0x14,0x45,0x8f,0x98,0x60,0x30,0x75,0x70,0xb0,0x90,
+ 0xa5,0x43,0x0a,0x1d,0x14,0x0b,0xc5,0x45,0x4a,0x07,0x41,0xd7,0xd2,0xff,
+ 0xff,0x9a,0x74,0x8c,0xd8,0x18,0x54,0x28,0x67,0x3d,0x3c,0xee,0x7d,0x79,
+ 0xc1,0xb1,0x1d,0x0e,0xc8,0x24,0x08,0x14,0x9a,0x22,0x80,0x46,0x21,0x48,
+ 0xbc,0x9c,0x9e,0x63,0x23,0x4b,0x14,0xa9,0x97,0x05,0x05,0x06,0xcb,0x2d,
+ 0x80,0xc5,0x50,0x20,0x0e,0xca,0xf2,0xe9,0xae,0x2b,0xe0,0xb0,0x94,0x48,
+ 0x2f,0x67,0xd1,0x35,0xd4,0x54,0x64,0x73,0xb9,0xa2,0xa6,0x67,0x08,0xd0,
+ 0x2f,0x65,0x49,0x89,0xa5,0xa5,0x0b,0xd0,0x2e,0x63,0xc8,0x8f,0x1b,0xdd,
+ 0x10,0xa0,0x09,0x64,0x56,0x77,0x77,0x5a,0xcf,0xdc,0x61,0x50,0x5e,0xce,
+ 0xa3,0x05,0x5f,0x5c,0xc8,0x67,0x93,0x31,0x74,0x4c,0xbc,0x03,0x4c,0xcb,
+ 0xc9,0x7f,0x2c,0x38,0xba,0xc7,0xda,0xfb,0xfd,0x14,0xd4,0x4d,0xac,0xe0,
+ 0x84,0x45,0xcf,0x64,0x76,0xc8,0xbb,0xb6,0xb1,0xeb,0x44,0x37,0x7d,0xab,
+ 0x2f,0x16,0x3a,0x2d,0xfe,0x87,0x4f,0x5c,0x7f,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_listbox_png_len = 386;
+static const unsigned char small_listbox_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x14,0x49,0x44,0x41,0x54,0x28,0xcf,0x8d,0x93,
+ 0xbf,0x2b,0x84,0x61,0x00,0xc7,0x3f,0x99,0x94,0x2c,0xb7,0x29,0xbb,0x4d,
+ 0x5d,0x36,0xf3,0x2b,0xa5,0x2e,0x3f,0x16,0x65,0x34,0x59,0xcc,0xfe,0x07,
+ 0xd9,0xe5,0x4a,0xe4,0x16,0xc3,0x95,0xb2,0x28,0x59,0x5e,0x77,0x48,0x14,
+ 0x57,0xba,0x84,0xa2,0x2b,0xca,0xf2,0xc6,0x66,0xfb,0x18,0xde,0xc3,0x43,
+ 0xdd,0xf3,0xea,0x53,0xdf,0xe7,0xfb,0xd4,0xa7,0x6f,0xcf,0xf2,0xc0,0x02,
+ 0xb7,0x58,0xc8,0x3d,0x4b,0x94,0xa0,0xd9,0xf0,0xa3,0x90,0x86,0x5c,0x31,
+ 0x02,0x66,0x66,0xd6,0xff,0x64,0xdd,0xba,0x59,0xb0,0x9c,0x89,0x8c,0x83,
+ 0x1d,0x3b,0xd6,0xbe,0x33,0x6f,0x5f,0x3d,0x57,0x6b,0x76,0x44,0x26,0xc1,
+ 0xb6,0x6d,0xab,0x56,0x6d,0x5b,0xed,0xf6,0x30,0xe9,0x36,0x64,0x0a,0xce,
+ 0x37,0x3d,0xb3,0xe9,0xb1,0xa9,0xa9,0xa9,0xab,0xdd,0x33,0xfd,0x75,0x5f,
+ 0x97,0x3b,0x2a,0xb0,0xc4,0xd3,0xb4,0x13,0x26,0x51,0xca,0x22,0x15,0x28,
+ 0x31,0x3a,0xe1,0xbb,0x6f,0x51,0x32,0x91,0x39,0xe8,0x67,0x38,0x31,0x73,
+ 0xde,0x65,0x57,0x7a,0x72,0x23,0x32,0x0b,0x7d,0x94,0x12,0x5f,0x7d,0x89,
+ 0x72,0x2d,0x32,0x83,0x30,0x98,0xf8,0xec,0xa2,0x6b,0x6e,0xf7,0xe4,0x32,
+ 0x7f,0x73,0x2e,0x3f,0xfa,0x10,0xe5,0x2c,0x94,0xef,0x0b,0x96,0x8f,0x43,
+ 0xb9,0x6d,0x2b,0xca,0x51,0x28,0xb7,0x0a,0x96,0x0f,0x42,0xf9,0xc2,0x93,
+ 0x28,0xfb,0xa1,0x7c,0x5a,0xb0,0x5c,0x0f,0xe5,0xd4,0xc3,0x28,0xbb,0xa1,
+ 0x7c,0x54,0xb0,0xbc,0xf3,0x23,0x97,0xdd,0x73,0x2b,0xca,0xc6,0xb7,0x3c,
+ 0xf0,0x8f,0x3f,0x28,0x92,0x20,0xf4,0x33,0xc4,0x18,0x09,0x95,0x28,0x09,
+ 0x63,0x9f,0xe1,0x1b,0x9b,0x55,0xd0,0xe5,0xa7,0x9c,0x00,0x00,0x00,0x00,
+ 0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_listview_png_len = 759;
+static const unsigned char small_listview_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0x89,0x49,0x44,0x41,0x54,0x48,0xc7,0xb5,0x95,
+ 0x4d,0x48,0x14,0x61,0x1c,0xc6,0x7f,0xba,0xe3,0xee,0xb6,0xee,0xb6,0x7e,
+ 0x80,0x34,0xb4,0x5b,0x56,0x14,0x85,0x21,0xb5,0x06,0x06,0x96,0x85,0x95,
+ 0x1e,0xb2,0x50,0x48,0xf2,0x60,0x87,0x0d,0xc1,0x4b,0x44,0x6d,0x91,0xae,
+ 0x9b,0xc5,0xb2,0x78,0xe8,0xd0,0xa9,0xc5,0x8f,0xa4,0x43,0x1f,0xe7,0xba,
+ 0x44,0xa7,0x2e,0x8a,0x74,0xea,0xb6,0xe8,0x4d,0x06,0xa5,0x25,0x03,0x41,
+ 0x48,0x11,0x4f,0x3e,0x1d,0x7c,0x0d,0x5d,0x74,0x2b,0x97,0x06,0xfe,0x33,
+ 0xcc,0x30,0xef,0x6f,0x9e,0x77,0xde,0xe7,0xf9,0xbf,0x48,0xe2,0x7f,0xd4,
+ 0xfa,0x09,0x8a,0x00,0x17,0x60,0x99,0x2a,0xfe,0xab,0xc1,0x5b,0xc7,0x95,
+ 0x98,0x72,0x99,0xe7,0x14,0x01,0xa7,0x29,0x26,0x01,0x0c,0x01,0x36,0x10,
+ 0x04,0x7c,0x9b,0x5f,0xdc,0x01,0x7a,0x26,0x18,0x0c,0x3e,0xf1,0x7a,0xbd,
+ 0x8f,0x2d,0xcb,0x4a,0x02,0xb7,0x80,0x32,0x60,0x0f,0x80,0x87,0x1a,0xbe,
+ 0x8e,0x8e,0x0f,0xab,0x2c,0x59,0x29,0x6a,0xf8,0xc6,0x61,0x3e,0xe0,0xe7,
+ 0x25,0x70,0x1c,0xd8,0x0b,0xb8,0x73,0xe1,0x80,0xcb,0xb6,0xed,0xe1,0xe5,
+ 0xe5,0x65,0x49,0x52,0x26,0x93,0x51,0x38,0x1c,0x16,0x90,0x58,0x17,0xd7,
+ 0x81,0xb8,0x86,0xb8,0x88,0xba,0x87,0xda,0x95,0xfa,0x94,0xd2,0xd5,0x77,
+ 0xed,0x7a,0x30,0x19,0x13,0x8d,0xfc,0x00,0x0e,0x99,0x19,0x58,0x39,0xe0,
+ 0x92,0x40,0x20,0xf0,0x42,0xe6,0x98,0x9d,0x9d,0x55,0x5b,0x5b,0x9b,0xaa,
+ 0xab,0xab,0x05,0x5c,0x81,0x7a,0x26,0x27,0xd6,0xc6,0x65,0x8f,0x96,0x89,
+ 0x93,0x88,0x0b,0xa8,0x3b,0xdd,0xa1,0xe4,0x97,0xa4,0x88,0x22,0xa0,0x1e,
+ 0xd8,0x0f,0x78,0x73,0xc0,0x6e,0x9f,0xcf,0x97,0x5e,0x58,0x58,0xd0,0xea,
+ 0xea,0xaa,0x96,0x96,0x96,0x24,0x49,0x83,0x83,0x83,0x02,0xee,0x03,0xd4,
+ 0x31,0x80,0x24,0x69,0x2c,0x3b,0x26,0x62,0x88,0x08,0xba,0xfd,0xf6,0xa6,
+ 0x68,0x61,0x0d,0x68,0x06,0x04,0x94,0x02,0x32,0x50,0x01,0x1e,0x9f,0xcf,
+ 0x97,0x76,0x1c,0x47,0xf3,0xf3,0xf3,0x9a,0x9b,0x9b,0x93,0x24,0x25,0x12,
+ 0x09,0x01,0xbd,0x00,0x15,0xc0,0x00,0xbd,0x28,0x95,0x79,0xaa,0x37,0xdf,
+ 0x5f,0xab,0xf9,0x63,0xb3,0xb8,0x87,0xa8,0x43,0x40,0x2b,0x70,0x0c,0xf0,
+ 0xe7,0x28,0xf6,0xf8,0xfd,0xfe,0xf4,0xd4,0xd4,0x94,0x66,0x66,0x66,0x34,
+ 0x3d,0x3d,0xad,0xc5,0xc5,0x45,0xc5,0x62,0x31,0x01,0x71,0xcc,0x0a,0xda,
+ 0xc0,0x0d,0x2c,0x3e,0x13,0x45,0x97,0xdf,0x37,0xea,0xc0,0x48,0x48,0x54,
+ 0x6d,0x01,0x07,0x36,0x14,0x6f,0x80,0x43,0xa1,0xd0,0x2b,0xc7,0x71,0x94,
+ 0xcd,0x66,0xe5,0x38,0x8e,0x56,0x56,0x56,0x14,0x8f,0xc7,0x05,0x0c,0x60,
+ 0xec,0xe4,0x33,0xf0,0x1a,0x20,0x8a,0xc5,0x04,0x0d,0x08,0xf8,0x09,0x34,
+ 0x99,0x05,0x2c,0xcd,0xfd,0xc7,0x96,0x65,0xa5,0xa3,0xd1,0xa8,0xba,0xba,
+ 0xba,0xd4,0xd9,0xd9,0xa9,0x9e,0x9e,0x1e,0x45,0x22,0x11,0x01,0xfd,0xbf,
+ 0xad,0x63,0x94,0x57,0x00,0x07,0x81,0x5a,0xe0,0x1c,0x70,0x1e,0x38,0x65,
+ 0x3e,0xea,0xcd,0x51,0x5c,0x02,0x54,0x02,0xd7,0x81,0xbb,0xc0,0x43,0x63,
+ 0xb5,0x3e,0xe0,0x52,0xae,0xe1,0x2d,0xa3,0xbe,0xc2,0x38,0x21,0x0c,0xec,
+ 0x03,0xfc,0xdb,0xd8,0xcd,0x05,0x34,0x04,0x02,0x81,0x67,0x6e,0xb7,0xfb,
+ 0xb9,0x65,0x59,0x43,0x40,0x3f,0x70,0x16,0x38,0xb1,0x53,0x4c,0x2d,0xc0,
+ 0x63,0x66,0xe1,0x35,0xf7,0x45,0x39,0x8a,0x5d,0xb6,0x6d,0x8f,0x6c,0x13,
+ 0x90,0x14,0x70,0x74,0xf7,0x4d,0x26,0x7f,0x40,0x5a,0xfe,0x15,0xb6,0xd9,
+ 0xc7,0xf9,0x03,0x52,0x80,0xe2,0xfc,0x01,0x29,0x04,0x9c,0x37,0x20,0x85,
+ 0x80,0xf3,0x06,0xa4,0x00,0xf0,0x9f,0x03,0xb2,0x5b,0x57,0x18,0xbf,0xb7,
+ 0x02,0x77,0x4c,0x47,0xeb,0x03,0x1e,0x01,0x4d,0x85,0x80,0x8b,0x8d,0xcf,
+ 0xab,0x80,0x23,0xa6,0x1d,0xd4,0x9a,0xeb,0xa1,0xc2,0x36,0xcc,0xf5,0xf4,
+ 0x79,0x4d,0x83,0x2a,0x37,0x33,0x28,0x07,0x02,0xbf,0x00,0x34,0xf2,0x8f,
+ 0x1f,0xa8,0x5e,0xd8,0x06,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,
+ 0x42,0x60,0x82
+};
+
+static const unsigned int small_multilineedit_png_len = 454;
+static const unsigned char small_multilineedit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x58,0x49,0x44,0x41,0x54,0x28,0xcf,0x7d,0xd2,
+ 0x31,0x6a,0x1b,0x41,0x14,0x87,0xf1,0x9f,0xb4,0x83,0x8d,0x02,0x82,0x14,
+ 0x3a,0x40,0x52,0xb9,0x36,0x08,0x4c,0x50,0x91,0x53,0x04,0x72,0x06,0x57,
+ 0xb9,0x46,0x4e,0xa1,0xde,0x75,0x7a,0x37,0x02,0x61,0x30,0x21,0x18,0x62,
+ 0xa2,0x5a,0x4d,0xc0,0x2a,0x62,0x56,0x96,0x90,0x77,0x67,0x37,0x85,0x46,
+ 0xeb,0xb5,0x6c,0x6b,0x9a,0xf7,0x31,0xf3,0xf1,0xe7,0xbd,0xb7,0x1b,0x74,
+ 0xbf,0x7f,0xad,0xce,0x17,0xa3,0xa5,0xb7,0xce,0xbd,0x9b,0xab,0xdb,0xb1,
+ 0x0b,0xab,0x20,0xab,0xce,0xbf,0x8c,0x3e,0x3a,0x74,0x26,0x67,0x9f,0x8f,
+ 0x5c,0xba,0x0b,0xb2,0xc5,0xe8,0x83,0x78,0x50,0xee,0x71,0x6a,0xe0,0x21,
+ 0xc8,0x96,0x4a,0xb5,0x1e,0x58,0x6f,0x9f,0x5a,0xbc,0xd6,0x33,0x81,0xbe,
+ 0xe3,0xa0,0x43,0xe5,0x9d,0x3c,0x65,0xe4,0xb4,0x38,0xd7,0x93,0xfb,0x09,
+ 0x41,0x16,0x74,0x88,0xe8,0xa7,0xbc,0x27,0xfe,0x97,0x9a,0x8b,0x2a,0xe8,
+ 0xea,0x84,0x9d,0xb0,0x00,0x03,0x65,0xc3,0xef,0x53,0x2d,0x9b,0x89,0x1a,
+ 0xb9,0x4c,0x17,0x25,0x06,0xe0,0x6f,0xba,0xdb,0x93,0x4b,0x73,0x05,0x98,
+ 0x2b,0xcc,0xd3,0x53,0xd1,0xd4,0xe2,0xb9,0x5c,0x1e,0x58,0xdc,0x8b,0xe4,
+ 0x47,0x27,0x60,0x46,0xa2,0x2d,0xc3,0x63,0x13,0x95,0x7a,0x3e,0xf1,0x1b,
+ 0x52,0x6d,0xf3,0x8b,0xe4,0xa2,0xe9,0xf0,0x57,0x8b,0x77,0xb5,0xd8,0x4f,
+ 0xde,0x6d,0x63,0xe8,0x7a,0x6f,0x33,0xed,0x89,0x92,0x3c,0x35,0x04,0x53,
+ 0x05,0x2d,0xfe,0x64,0x6a,0x68,0xfc,0x5c,0x8e,0xdb,0xef,0x2f,0x92,0x68,
+ 0xc7,0xd1,0xc4,0x9f,0x46,0xae,0xef,0x5b,0x23,0xbc,0x76,0x36,0x96,0x50,
+ 0xa9,0x83,0xfa,0xe6,0x6a,0x72,0xd6,0x3b,0xa0,0xaf,0x5d,0x33,0x53,0x8a,
+ 0x41,0xbc,0x1d,0x7f,0x3b,0x72,0x7a,0xf0,0x87,0x9e,0xf9,0x21,0xb7,0x09,
+ 0xa2,0x0b,0x97,0x06,0xfa,0x82,0xee,0xab,0x6a,0xa5,0x94,0x5b,0x58,0x05,
+ 0xd1,0xca,0x9d,0x07,0xc7,0x32,0x9d,0x57,0xe5,0x5a,0xb4,0xb1,0xb2,0x0a,
+ 0x75,0xd5,0x29,0x2c,0xad,0x65,0x3a,0x6f,0xca,0xb5,0x28,0x8a,0xff,0x01,
+ 0x48,0x40,0x9e,0xd7,0x6c,0x2b,0x5f,0xd2,0x00,0x00,0x00,0x00,0x49,0x45,
+ 0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_ordertool_png_len = 587;
+static const unsigned char small_ordertool_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xdd,0x49,0x44,0x41,0x54,0x48,0xc7,0xcd,0x94,
+ 0xcb,0x4b,0x42,0x41,0x14,0xc6,0x2d,0x1f,0x3d,0x7c,0x44,0xe1,0x4d,0x7b,
+ 0xa0,0x11,0x98,0x62,0x59,0x41,0x11,0x11,0x3d,0x4c,0x6c,0x23,0x85,0x62,
+ 0x0b,0x91,0x56,0xfd,0x11,0x51,0xbb,0x56,0xd5,0x2e,0x0b,0xc4,0x45,0x50,
+ 0x10,0xb8,0xa8,0xb4,0x45,0xb4,0x28,0x82,0x82,0x88,0xa0,0x4d,0xbb,0x36,
+ 0xfd,0x35,0xa7,0x33,0xf1,0x4d,0x4c,0x17,0x93,0x1a,0x37,0x5d,0xf8,0x71,
+ 0x19,0x66,0xee,0x37,0xdf,0x39,0xf3,0xdd,0xb1,0x10,0x91,0x45,0xc2,0x4f,
+ 0x13,0x63,0x65,0x6c,0x78,0x37,0xa9,0xf3,0x7f,0xc1,0x2c,0xda,0xc2,0x88,
+ 0x41,0x07,0xd3,0xae,0x6c,0xe0,0xc0,0xd8,0xc5,0xb8,0xeb,0xe0,0xc2,0x3a,
+ 0x87,0x2a,0x6c,0x85,0xa8,0x20,0xc8,0x78,0x19,0x67,0x3e,0x9f,0xdf,0xc9,
+ 0x66,0xb3,0x94,0x4c,0x26,0xeb,0x92,0x48,0x24,0x28,0x12,0x89,0x88,0x6f,
+ 0x0b,0x8c,0xa1,0x0a,0xdb,0x20,0x26,0x06,0x51,0xa6,0x8f,0xe9,0xcc,0x64,
+ 0x32,0x74,0x78,0xb1,0x40,0x07,0x97,0xc3,0x54,0xa8,0x46,0xa9,0x78,0x35,
+ 0x46,0x47,0x37,0xd3,0x74,0xfa,0xb0,0x48,0xe7,0xcf,0x29,0xba,0x7a,0x5d,
+ 0xa5,0xdb,0xb7,0x35,0xba,0x7f,0x5f,0xa7,0xea,0xcb,0xb2,0x34,0x16,0x33,
+ 0x3b,0xee,0xc2,0xc4,0x08,0xd3,0xcf,0x74,0x0b,0x17,0x9b,0xa5,0x66,0xda,
+ 0x28,0x36,0xd3,0x56,0xa9,0x9d,0xb6,0x8f,0x0d,0xda,0x2b,0x0f,0xd0,0x7e,
+ 0x25,0x4a,0xa5,0xeb,0x49,0x3a,0xb9,0x9b,0xa7,0xf2,0xe3,0x12,0x9d,0x3d,
+ 0xa5,0xd8,0x40,0x5c,0x0a,0xcf,0x99,0x7b,0xec,0xc1,0x44,0x88,0xf1,0xa3,
+ 0x82,0x82,0xd2,0xa2,0xdf,0x50,0xf9,0x26,0x0c,0xf1,0x56,0x51,0x3e,0xd3,
+ 0x83,0xb7,0xe7,0xb3,0x5f,0xa2,0x34,0x8b,0x25,0xce,0xa4,0x98,0x95,0x3a,
+ 0xa4,0xb0,0x2e,0x26,0x9d,0xda,0x20,0xda,0x01,0x97,0x06,0x4e,0xb9,0x15,
+ 0xa7,0x6c,0xe0,0x40,0x45,0x25,0x43,0x75,0x08,0x61,0x9d,0x61,0x4e,0x83,
+ 0xc4,0x8f,0x4d,0x5a,0x80,0x0b,0x1b,0xfa,0x50,0xcd,0x4f,0xf8,0xb0,0xce,
+ 0x25,0xd3,0x20,0x4a,0x0e,0x20,0x0d,0xa3,0x10,0x17,0x0b,0x3d,0xb9,0x5c,
+ 0x6e,0x57,0x2b,0x6e,0x8a,0xb0,0xea,0x38,0x8a,0x8d,0xbc,0xe9,0x74,0x5a,
+ 0x2f,0x6e,0xfc,0xd8,0x31,0x10,0x3d,0x9a,0x62,0x66,0x99,0x09,0x66,0x50,
+ 0x94,0xa6,0x1d,0x37,0xe5,0x37,0x36,0x13,0x40,0xcf,0x0e,0xb5,0xe2,0x06,
+ 0x61,0x2f,0x1c,0x8f,0xc3,0xed,0x57,0x2b,0xd0,0x6b,0xad,0xb8,0xd9,0x91,
+ 0x80,0x80,0x12,0xa7,0xa0,0x12,0x39,0xb7,0x6e,0xdc,0x6c,0x35,0xca,0x91,
+ 0x93,0x22,0xc3,0x6d,0xff,0x2e,0x6e,0xe2,0x07,0x71,0x9a,0x1c,0xc7,0x64,
+ 0x2a,0x1a,0x89,0x9b,0x15,0x7d,0x0c,0xe0,0xf0,0x66,0x94,0xf8,0xf5,0x86,
+ 0xc3,0x61,0xed,0xb8,0xd5,0xfa,0xa5,0xa5,0xe3,0x9e,0x46,0xe2,0x56,0xab,
+ 0xc7,0x11,0xe5,0x86,0xf3,0xeb,0xc6,0xcd,0xaa,0x5c,0x97,0x3e,0xe5,0x1e,
+ 0x96,0xb7,0x9b,0x53,0x27,0x6e,0x1f,0xac,0x71,0xb5,0x00,0x3b,0xb1,0x41,
+ 0x4e,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_pixlabel_png_len = 1229;
+static const unsigned char small_pixlabel_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x04,0x5f,0x49,0x44,0x41,0x54,0x48,0xc7,0xa5,0x95,
+ 0x4d,0x6c,0x54,0x55,0x18,0x86,0x9f,0x73,0xee,0x99,0x3b,0x3f,0xbd,0xed,
+ 0xf4,0x8f,0xb6,0xd2,0x00,0xa2,0x06,0x44,0x50,0x04,0x13,0x09,0x6d,0xd0,
+ 0x08,0x9a,0x20,0xba,0x21,0x2e,0x34,0x31,0x2c,0xd4,0x44,0x23,0x71,0xe7,
+ 0xa2,0x1b,0x13,0xe3,0x4e,0x13,0x37,0x2e,0x4d,0x4c,0xdc,0xe8,0x42,0xe2,
+ 0xa6,0x75,0x21,0x4a,0x42,0x11,0x21,0x14,0x4d,0xac,0x05,0x3a,0xd3,0x29,
+ 0xfd,0x9d,0x76,0x6a,0xe7,0xa7,0xe3,0x30,0xb7,0x73,0x3b,0x73,0x7f,0xce,
+ 0x75,0x41,0x8b,0x12,0x4b,0x22,0xf1,0x4b,0xbe,0xe4,0xac,0x9e,0xf3,0x9e,
+ 0xf7,0xfd,0xf2,0x1d,0x01,0xc8,0x81,0x81,0x81,0xd7,0xb4,0xd6,0xa7,0x4b,
+ 0xa5,0x52,0xbf,0x6d,0xdb,0xdc,0x6f,0x55,0xab,0x55,0x52,0xa9,0xd4,0xd5,
+ 0xc5,0xc5,0xc5,0x2f,0x81,0x33,0x80,0xa3,0x00,0x43,0x6b,0x7d,0x3a,0xf1,
+ 0xf0,0x33,0xfd,0x2d,0x3b,0x93,0xc4,0x02,0xe8,0xe9,0xdd,0x4e,0x61,0xe2,
+ 0x22,0x4b,0xdf,0x7d,0xc6,0xc0,0x7b,0x47,0xd9,0xff,0xf2,0x2b,0x48,0xd3,
+ 0x22,0x0c,0x5d,0x90,0x02,0xaf,0x3a,0x4b,0xf5,0x7a,0x9a,0x0b,0x67,0xc6,
+ 0xf8,0x61,0xba,0xcc,0xd2,0xad,0x55,0x2a,0xc5,0x95,0x43,0x80,0x09,0x0c,
+ 0x03,0x45,0x05,0x18,0xa5,0x52,0xa9,0xbf,0x7b,0xff,0x83,0x4c,0x64,0x72,
+ 0x24,0xac,0x24,0x2d,0x35,0x9b,0x5f,0x07,0xbf,0x40,0xdf,0x1c,0xa3,0x51,
+ 0xdd,0xcd,0xad,0x95,0x09,0x94,0x61,0x10,0xaa,0x28,0x0d,0xaf,0x86,0xbb,
+ 0xb2,0x40,0x39,0x73,0x0d,0xd3,0xce,0xd1,0x9a,0xcf,0xb3,0x96,0xb7,0x91,
+ 0xc2,0x00,0x38,0x00,0x74,0x02,0x35,0x05,0x18,0xb6,0x6d,0xd3,0xa9,0x25,
+ 0x66,0x2c,0xc1,0xb6,0x9e,0x0e,0xaa,0x37,0x86,0x98,0x1d,0xbd,0xc4,0x0b,
+ 0xbb,0x7a,0xe8,0xdc,0xd2,0x8e,0x08,0x1c,0x02,0x19,0x05,0xaf,0x41,0x22,
+ 0x9e,0x24,0x12,0x8f,0xa1,0x1f,0xe9,0x65,0x4f,0x53,0x33,0xed,0xbd,0x1d,
+ 0x04,0xe7,0xa7,0x98,0x1d,0x5f,0xd8,0x70,0xa6,0x19,0x88,0x2a,0x40,0x00,
+ 0x74,0x24,0x2d,0xf6,0x9a,0x71,0x92,0x31,0x9f,0xab,0xe3,0x97,0x28,0xba,
+ 0x9a,0x9e,0xee,0x66,0xac,0x64,0x0b,0x7e,0xc5,0x26,0xb6,0xc5,0xc4,0x88,
+ 0x45,0x58,0x9d,0x9e,0xa1,0x98,0x9e,0x22,0xde,0x6e,0xa1,0xc3,0x08,0xb5,
+ 0x40,0xb2,0xea,0x7a,0x68,0x1d,0x6e,0x80,0x15,0x60,0xdc,0x01,0x37,0x3c,
+ 0x9f,0xba,0x0b,0xb5,0xf2,0x1f,0x2c,0xcf,0x4f,0x62,0x49,0x98,0xc8,0x39,
+ 0x9c,0xfd,0xea,0x0a,0xab,0xa5,0x0a,0x87,0x4e,0xee,0xe2,0x81,0xee,0x2e,
+ 0x3e,0x79,0x7f,0x90,0xee,0x96,0x28,0x91,0xf6,0x16,0x46,0xd2,0x4b,0xac,
+ 0xd6,0x1a,0x24,0x9b,0x62,0xc4,0x0c,0x41,0xf5,0x36,0x58,0x02,0x42,0x6e,
+ 0x5c,0x13,0x31,0xc0,0xb1,0x4b,0xa4,0xa6,0xb2,0x14,0x6d,0x0f,0x53,0x4a,
+ 0x0a,0xe5,0x1a,0xf3,0x0b,0x25,0xa6,0x17,0x1d,0x72,0xa3,0x39,0x66,0xa6,
+ 0x56,0xf0,0x9c,0x3a,0x27,0x4e,0x1d,0xa6,0xe6,0xb9,0x74,0xb7,0x18,0xbc,
+ 0xf5,0xf6,0x11,0x8e,0x3e,0xf5,0x10,0x8a,0xf0,0xae,0x49,0x51,0x1b,0x87,
+ 0xd1,0x8b,0x83,0x5c,0x1e,0x3e,0xcb,0xf6,0xc7,0xfa,0x08,0x35,0x54,0x7c,
+ 0xcd,0x1b,0x27,0x9f,0xe0,0xf9,0x63,0x7b,0x98,0x4f,0x2d,0xb2,0xf5,0x60,
+ 0x37,0xa5,0x45,0xcd,0x73,0x47,0xb6,0xd1,0xf9,0xa8,0xc5,0xab,0x6f,0xf6,
+ 0x61,0xb6,0x25,0xe9,0xea,0x68,0xe6,0x9b,0xcc,0x59,0xbc,0x80,0xcd,0xc1,
+ 0x85,0xcc,0x15,0xec,0xfc,0x1c,0x2b,0x4e,0x16,0x51,0x2f,0xa3,0x91,0xe0,
+ 0x37,0xd8,0x7a,0x60,0x17,0x3d,0x7d,0x87,0x09,0x5c,0x1b,0xa3,0x3e,0x4d,
+ 0xbc,0x6f,0x07,0xed,0x7b,0x0f,0xd2,0x75,0x78,0x0f,0xee,0x4a,0x9a,0xb9,
+ 0x33,0x3f,0x92,0xca,0x94,0x68,0x48,0xb1,0x39,0xd8,0xad,0xdd,0x22,0x74,
+ 0x6d,0xca,0x79,0x9b,0x78,0x00,0x0a,0xcd,0x8d,0xf4,0x32,0x9e,0x5d,0xa7,
+ 0x5e,0xaf,0x10,0x8d,0x59,0xa8,0x44,0x27,0x81,0xb3,0x44,0xad,0x58,0xc5,
+ 0x74,0xa7,0x70,0xa7,0xb3,0x8c,0xff,0xb2,0xcc,0x4c,0xd5,0x06,0x71,0x0f,
+ 0x2b,0x42,0xad,0xf1,0xdd,0x35,0x74,0xc3,0x05,0x0d,0xa6,0x94,0x8c,0x8e,
+ 0x97,0xc8,0x0c,0xdf,0xa0,0x7d,0x77,0x1b,0x05,0x27,0xc1,0x4f,0xe7,0x67,
+ 0x28,0x4e,0xdf,0xe4,0xdd,0x13,0xfd,0x38,0x0b,0x73,0xa4,0xcf,0x5d,0x63,
+ 0x6c,0xba,0x40,0xc5,0xf5,0x31,0xc4,0xdd,0x8a,0xef,0x84,0x67,0x28,0x85,
+ 0x94,0x06,0x52,0x4a,0x5c,0x09,0x48,0x49,0xb6,0xd6,0x60,0x74,0x68,0x9c,
+ 0xb0,0xb8,0x8a,0x8a,0x1a,0x0c,0x0f,0x5e,0xc4,0xf7,0x04,0xd9,0x73,0xa3,
+ 0xe4,0x47,0x52,0xd8,0xcb,0x36,0xe2,0x6f,0xc4,0xe6,0x60,0x1d,0x6a,0xb4,
+ 0x0e,0x11,0x4a,0x21,0x91,0x58,0x52,0x51,0xd1,0x1a,0x5b,0x19,0xcc,0x5e,
+ 0xcb,0x53,0xcb,0x15,0x38,0x75,0xec,0x49,0x74,0xc9,0xe7,0xf7,0x4b,0x29,
+ 0x64,0x73,0x1c,0x61,0x46,0x71,0x82,0x80,0x46,0x18,0x22,0xb8,0x87,0x62,
+ 0x89,0x44,0xc5,0x9a,0x88,0x98,0x71,0x4c,0x25,0xf1,0x81,0x3a,0x30,0x74,
+ 0x3d,0x4b,0xa2,0xab,0x85,0xae,0x1d,0x6d,0xe8,0x98,0x66,0xf7,0xce,0x24,
+ 0xdb,0x7b,0x3b,0xf9,0x73,0xce,0x26,0x33,0x91,0x67,0xbe,0xe2,0xb0,0xa6,
+ 0x05,0x42,0xa8,0x7b,0x80,0x23,0x26,0x66,0x53,0x3b,0x51,0xab,0x03,0xd0,
+ 0x04,0x5a,0xd3,0xa6,0x14,0x97,0x0b,0x45,0x3e,0xfe,0xfc,0x3c,0x28,0x93,
+ 0xe3,0x1f,0xbd,0xce,0xd3,0x2f,0x3d,0x4e,0xad,0xe0,0x30,0x7c,0x61,0x92,
+ 0x9f,0xa7,0x72,0x94,0x3d,0x8f,0x35,0xdf,0x47,0x87,0xfe,0xe6,0xe1,0x21,
+ 0x0d,0x54,0xa2,0x15,0x81,0x8f,0x2e,0x65,0x89,0x4a,0x4d,0x80,0xc6,0x52,
+ 0x26,0xdf,0xcf,0x15,0xf9,0xe0,0xc3,0x6f,0x79,0xf1,0xd9,0x7d,0xcc,0x8f,
+ 0x2f,0x31,0x32,0x96,0x25,0x67,0x3b,0xb8,0x12,0x1c,0x61,0x80,0x01,0xc2,
+ 0xfb,0xf7,0x1c,0x87,0xd5,0x6a,0x95,0x88,0xb5,0x03,0xab,0x2b,0x09,0xda,
+ 0xa5,0xbe,0x90,0xc6,0x77,0x57,0xf1,0x90,0xf8,0x68,0x4c,0x65,0xf2,0xf5,
+ 0xc8,0x24,0x43,0x23,0x93,0x58,0x98,0x04,0x31,0x13,0xa5,0x40,0x0a,0x03,
+ 0x2b,0x26,0x69,0x55,0x06,0x8a,0x80,0xb2,0x73,0x3b,0x2e,0x20,0x54,0x40,
+ 0x98,0x4a,0xa5,0xae,0x06,0x1d,0xe2,0x10,0x22,0x24,0xf4,0x3d,0x74,0xdc,
+ 0xc2,0xab,0x55,0x88,0x18,0x8a,0x80,0x10,0xad,0x01,0x0c,0xb6,0x6d,0x6d,
+ 0x65,0x5f,0x77,0x1b,0xe9,0xa5,0x0a,0xf6,0x9a,0x4b,0x73,0x54,0xd1,0xd1,
+ 0x14,0x21,0x61,0x2a,0x56,0xd6,0x6a,0x00,0x19,0xc0,0x07,0x02,0x80,0x18,
+ 0xf0,0x0e,0xf0,0x1b,0x10,0xfe,0x8f,0x9e,0x00,0x3e,0x05,0xfa,0x80,0x5e,
+ 0x01,0x44,0x00,0x0b,0xd8,0xb2,0xbe,0xa4,0x9b,0xd7,0x2d,0x92,0xf7,0xf1,
+ 0x3b,0xe9,0x75,0xa5,0x36,0x50,0x02,0x8a,0x62,0x1d,0x10,0x01,0x12,0xeb,
+ 0x1d,0x05,0x8c,0x8d,0x75,0xfa,0x1f,0x2b,0x5c,0x7f,0x7e,0x03,0x70,0x00,
+ 0x47,0x84,0x61,0x88,0x10,0x42,0xae,0xc3,0x8c,0x7f,0x40,0xef,0x17,0xbc,
+ 0x01,0x0f,0x80,0xe0,0x2f,0x1e,0x77,0x0d,0xd9,0xcc,0xde,0x09,0xba,0x00,
+ 0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_pointer_png_len = 586;
+static const unsigned char small_pointer_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xdc,0x49,0x44,0x41,0x54,0x48,0xc7,0x9d,0x95,
+ 0x4b,0x4b,0x02,0x51,0x18,0x86,0xa7,0xd3,0x80,0x92,0x48,0x08,0x66,0x48,
+ 0x1b,0x49,0x90,0xd0,0xa4,0x20,0xc9,0x32,0xa9,0x18,0x1a,0x22,0x2b,0xac,
+ 0x85,0xae,0x5a,0x04,0x41,0x22,0xb8,0x90,0x82,0x20,0x08,0xba,0x51,0x14,
+ 0x15,0x11,0xd1,0xa2,0x1b,0x65,0x44,0x44,0x05,0x81,0x05,0x45,0x20,0xb4,
+ 0xea,0x6f,0x7d,0x7d,0xc7,0x3e,0x47,0x8b,0xe6,0xcc,0x8c,0xc2,0xc3,0x9c,
+ 0x85,0xf3,0xf8,0x9e,0xf7,0x5c,0x94,0x00,0x40,0xfa,0x0b,0x7e,0x1a,0x90,
+ 0x46,0x44,0xa6,0x67,0xc3,0x7f,0xdf,0x13,0x21,0xe9,0x88,0xe5,0x54,0x2a,
+ 0xc5,0x07,0xcd,0x88,0x13,0xb1,0x59,0x95,0xeb,0x89,0xed,0x24,0xe6,0xf8,
+ 0x90,0x16,0xab,0x72,0x3d,0xb1,0x23,0x9b,0xcd,0x42,0x7a,0x2e,0x5c,0x91,
+ 0x77,0x5a,0x95,0xeb,0x89,0x9d,0xb9,0x5c,0x0e,0x4e,0x8b,0x09,0xe8,0x1f,
+ 0x93,0xea,0x92,0xeb,0x8a,0x33,0x99,0x0c,0x9c,0x15,0x47,0x61,0xe5,0x82,
+ 0x41,0x2c,0x61,0x5d,0x2e,0x14,0x9f,0xbf,0xaa,0xb0,0x56,0x60,0xb0,0x7a,
+ 0xc5,0x60,0x60,0xc2,0x9a,0x5c,0x28,0xbe,0x7c,0x53,0x61,0xf3,0x96,0x95,
+ 0xd9,0xb8,0x61,0x30,0x38,0x69,0x5e,0x2e,0x14,0x5f,0x7f,0xa8,0xb0,0x7d,
+ 0xcf,0x34,0xb6,0xee,0x18,0x0c,0x25,0xcd,0xc9,0x85,0xe2,0x42,0x49,0x85,
+ 0xdd,0x47,0xf6,0x8b,0x9d,0x07,0x06,0xc3,0x53,0xc6,0x72,0xa1,0xf8,0xf6,
+ 0x53,0x85,0xbd,0x67,0xa6,0xb1,0x8e,0x75,0x2c,0x1e,0x31,0xc8,0xef,0x63,
+ 0xe7,0x06,0x0b,0x2a,0xee,0xb8,0xd4,0x05,0x4b,0x27,0x0c,0x96,0x4f,0x31,
+ 0xed,0x13,0x2b,0x8f,0x3b,0x7a,0x34,0x61,0x2d,0x3e,0x3a,0xa1,0x8d,0x86,
+ 0xe2,0x74,0x3a,0x0d,0x87,0x2f,0x0c,0x82,0x91,0x9f,0x97,0x47,0x52,0x52,
+ 0x79,0x11,0x49,0x94,0x45,0x66,0x90,0x09,0xa4,0x0f,0xf1,0xd3,0xf1,0x97,
+ 0x0d,0xc5,0x8a,0xa2,0xd4,0x1e,0x8e,0xf9,0x50,0x28,0x04,0x97,0x9f,0x3e,
+ 0x88,0x57,0x77,0xc6,0x24,0xd2,0x4b,0x52,0x5e,0x45,0x93,0xa9,0xc4,0x1e,
+ 0x8f,0xa7,0x22,0x98,0xe6,0x04,0x02,0x01,0x98,0xcd,0x07,0xe1,0xa0,0xa8,
+ 0xa5,0x1e,0x47,0xc2,0x48,0x2b,0x49,0x65,0x33,0x1d,0x3b,0xe8,0xe5,0x28,
+ 0x12,0x43,0x22,0x48,0x0f,0x4f,0x5d,0xf8,0xf2,0xc1,0x50,0x75,0x57,0x74,
+ 0x23,0xee,0xda,0x0a,0x0c,0x6f,0x37,0x9a,0x9e,0x9f,0x16,0xc6,0x8b,0xb4,
+ 0xf1,0xd4,0x73,0x0b,0x41,0x38,0x7e,0xd7,0x52,0x2b,0x48,0x3b,0x05,0x31,
+ 0xb5,0xdd,0x64,0x9a,0x5e,0xe5,0x3e,0xb6,0xd3,0xb3,0x9d,0xa7,0xbe,0xf8,
+ 0xc2,0x53,0x98,0x14,0xa7,0x96,0xcc,0xfe,0x83,0xd0,0xd8,0xcd,0x53,0x27,
+ 0x66,0x24,0x88,0x28,0x9a,0x38,0xce,0x67,0xc3,0xf7,0xb1,0xa1,0x58,0xf0,
+ 0x63,0x0e,0xaa,0xa6,0x22,0x4d,0xd2,0x3a,0x78,0xeb,0x16,0xd7,0x54,0xe4,
+ 0x42,0x02,0x24,0x8c,0xd2,0xd8,0x65,0xaa,0x0a,0x83,0xd4,0x36,0x12,0x79,
+ 0x09,0xd7,0x7f,0x77,0xc5,0x37,0x58,0xff,0x81,0x01,0x6f,0x58,0xf6,0xf8,
+ 0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_progress_png_len = 609;
+static const unsigned char small_progress_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x01,0xec,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0xd1,0xc4,0x54,0x20,0x00,0x08,0x20,0x9a,0x19,0x0c,0x10,0x40,
+ 0x34,0x33,0x18,0x20,0x80,0x68,0x66,0x30,0x40,0x00,0xd1,0xcc,0x60,0x80,
+ 0x00,0x62,0x41,0xe6,0x30,0xaa,0xea,0x51,0x94,0x44,0xfe,0xdf,0xbe,0xc4,
+ 0x08,0x63,0x03,0x04,0x10,0x0b,0xba,0xe4,0x87,0x33,0x87,0x19,0xfe,0xfe,
+ 0xfd,0x0b,0xc6,0xff,0xfe,0xfd,0x63,0xc0,0x95,0x1c,0x41,0xe2,0x20,0x35,
+ 0x5f,0xbf,0x7e,0x65,0x78,0xf8,0xf0,0x21,0x83,0x7b,0x76,0x09,0x8a,0x3c,
+ 0x40,0x00,0x61,0x04,0x85,0x80,0x53,0x2b,0x83,0xb0,0x6b,0x07,0x58,0x93,
+ 0x8c,0x5f,0x3f,0x83,0x5e,0xcc,0x0c,0x30,0x3b,0xa4,0x72,0x35,0x43,0x7a,
+ 0xc7,0x16,0x30,0xbb,0x7b,0xc9,0x31,0x86,0xb9,0x9b,0xce,0x31,0xfc,0xfe,
+ 0xfd,0x9b,0xe1,0xfd,0xfb,0xf7,0x0c,0x6f,0xdf,0xbe,0xc5,0xb0,0x18,0x20,
+ 0x80,0x30,0x5c,0x2c,0x29,0x29,0x05,0xa6,0xff,0xfc,0xf9,0xc3,0x20,0x29,
+ 0x21,0xc5,0xc0,0xcf,0xcd,0x06,0x66,0x0b,0x09,0x09,0x31,0x08,0xf0,0xb0,
+ 0x83,0xd9,0xdc,0xdc,0xdc,0x0c,0x1c,0x1c,0xac,0x0c,0xdf,0xbf,0x7f,0x67,
+ 0xf8,0xf4,0xe9,0x13,0xc3,0xc7,0x8f,0x1f,0x31,0x0c,0x06,0x08,0x20,0x0c,
+ 0x83,0x95,0x95,0x95,0xc1,0x34,0x28,0x18,0x94,0x95,0x95,0x18,0xb8,0xd9,
+ 0x99,0xc1,0xae,0x94,0x94,0x94,0x64,0xe0,0xe3,0x64,0x01,0xb3,0x05,0x04,
+ 0x04,0x80,0xe2,0x4c,0x0c,0x3f,0x7f,0xfe,0x64,0xf8,0xf5,0xeb,0x17,0x18,
+ 0xa3,0x03,0x80,0x00,0xc2,0x30,0x58,0x54,0x54,0x14,0x4c,0x83,0x0c,0x10,
+ 0x11,0x11,0x61,0xe0,0x62,0x63,0x02,0xbb,0x92,0x8f,0x8f,0x1f,0x68,0x18,
+ 0x23,0x98,0xcd,0xc1,0xc1,0xc1,0xc0,0xc6,0xfa,0x1f,0x68,0xe0,0x4f,0x70,
+ 0x70,0x80,0xc4,0xd0,0x01,0x40,0x00,0x61,0x18,0x0c,0xf2,0x1a,0x08,0x7c,
+ 0xff,0xce,0x07,0x66,0xff,0x01,0xba,0xec,0xf3,0x67,0x66,0x86,0x4f,0x9f,
+ 0x3f,0x31,0xfc,0xfb,0xc5,0x08,0x64,0xff,0x07,0xe2,0xef,0x0c,0xbf,0x59,
+ 0xfe,0x33,0x7c,0xe1,0xfc,0x05,0x0e,0x0e,0x6c,0x2e,0x06,0x08,0x20,0x0c,
+ 0x83,0x6f,0xdf,0xba,0x05,0xa6,0x9f,0x3c,0x61,0x60,0xb8,0x73,0xeb,0x36,
+ 0x03,0x17,0x07,0x13,0x90,0x2d,0xc5,0x70,0xef,0xce,0x6b,0x06,0x1e,0x10,
+ 0x5b,0x56,0x98,0xe1,0xc1,0xfd,0x4f,0x0c,0x9c,0x6c,0x8c,0x0c,0xa2,0x0c,
+ 0x4c,0x0c,0xef,0xde,0xbd,0x63,0xf8,0xf6,0xed,0x1b,0x86,0xc1,0x00,0x01,
+ 0xc4,0x88,0x9c,0x9c,0x40,0xe9,0x78,0xe7,0xd4,0x1e,0x70,0x2c,0x83,0x22,
+ 0x04,0xe4,0x12,0x50,0x58,0x63,0x03,0x20,0x71,0x90,0x3c,0xc8,0xd0,0x2f,
+ 0x5f,0xbe,0x30,0xf4,0x6f,0xde,0x83,0x92,0x8e,0x01,0x02,0x08,0xc3,0x60,
+ 0xac,0xa6,0x10,0x09,0x90,0x0d,0x06,0x08,0x20,0x46,0x5a,0x95,0xc7,0x00,
+ 0x01,0x44,0xb3,0xb2,0x02,0x20,0x80,0x68,0x66,0x30,0x40,0x00,0xd1,0xcc,
+ 0x60,0x80,0x00,0xa2,0x99,0xc1,0x00,0x01,0x44,0x33,0x83,0x01,0x02,0x0c,
+ 0x00,0x3d,0xd7,0xd8,0x42,0x12,0x79,0x14,0x47,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_pushbutton_png_len = 408;
+static const unsigned char small_pushbutton_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x2a,0x49,0x44,0x41,0x54,0x28,0xcf,0x95,0x92,
+ 0xb1,0x6e,0xc2,0x30,0x14,0x45,0x4f,0x92,0x27,0x10,0x03,0x1b,0x03,0x0b,
+ 0x52,0x99,0x98,0x99,0x18,0x32,0xf4,0x2b,0x2a,0xf5,0x1b,0x98,0xfa,0x1b,
+ 0xfd,0x0a,0x76,0xe6,0xee,0x2c,0x2c,0x48,0x1d,0x10,0x52,0x90,0x32,0x75,
+ 0x60,0x41,0x82,0x05,0x11,0x82,0xc0,0x76,0xdc,0x21,0x2e,0x85,0x88,0x84,
+ 0xf6,0x2d,0xb6,0xae,0x8e,0x8f,0xae,0x6c,0x0b,0xfe,0xfb,0x6b,0x36,0xdc,
+ 0x86,0x09,0x65,0xb3,0x63,0x31,0x5b,0x8e,0x18,0x93,0x0a,0x41,0x36,0x7c,
+ 0x09,0xbb,0x54,0xcd,0x74,0xf0,0x5c,0x63,0xc2,0x46,0x08,0xb6,0xe1,0x13,
+ 0xa6,0x12,0x6e,0x40,0x9f,0x16,0x07,0x21,0x48,0xd0,0xd8,0x4a,0xf8,0x0c,
+ 0xd0,0xa4,0x2e,0x78,0x90,0x3d,0x30,0x1b,0x00,0x21,0x10,0x3c,0x30,0x0f,
+ 0xe0,0x0c,0xc0,0xc7,0x93,0xfc,0xa4,0x7e,0x6c,0x06,0x6e,0xe0,0x36,0x00,
+ 0x6b,0xa0,0xcd,0xda,0x25,0xeb,0x22,0xac,0x51,0x40,0x87,0x95,0x03,0x56,
+ 0x70,0x49,0x94,0xdb,0x5f,0xc1,0xb9,0xf9,0xa7,0x8c,0x06,0x3a,0xc0,0x97,
+ 0x4b,0x0a,0xe6,0xf3,0xef,0x15,0xb9,0x35,0x06,0xba,0xc4,0x37,0x92,0xab,
+ 0xce,0x11,0x3d,0x00,0x22,0xb4,0x03,0x22,0x7a,0x44,0x45,0xb3,0x72,0xad,
+ 0xe6,0xe0,0x1a,0xce,0x2f,0x89,0xba,0x6f,0x2e,0x9f,0x02,0xac,0xfe,0x73,
+ 0xcf,0xe6,0x8f,0xb0,0xdd,0xa1,0x2b,0xe1,0x13,0x49,0xfe,0xe6,0x56,0xb0,
+ 0x8b,0xd9,0x74,0xd0,0xa8,0xc0,0x8f,0x7c,0x42,0x8c,0xc6,0x08,0x66,0x39,
+ 0x7a,0xab,0xd1,0xaf,0xec,0x11,0xf3,0xc1,0x9e,0x93,0x60,0x18,0x33,0xa1,
+ 0x45,0x13,0xc1,0x2f,0xf9,0x74,0x9a,0x3d,0x5b,0x52,0xc1,0x90,0xb2,0xe1,
+ 0x40,0x9d,0x00,0xef,0x2e,0x6c,0x31,0x9c,0x48,0x49,0xc5,0x66,0x9e,0x22,
+ 0xe1,0x48,0x80,0x57,0x0a,0x5b,0x0c,0x06,0xf3,0x0d,0xc5,0x5b,0x86,0xab,
+ 0x30,0x5c,0xf4,0x11,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,
+ 0x60,0x82
+};
+
+static const unsigned int small_radiobutton_png_len = 586;
+static const unsigned char small_radiobutton_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xdc,0x49,0x44,0x41,0x54,0x28,0xcf,0xcd,0xd2,
+ 0x4d,0x48,0xd3,0x01,0x18,0xc7,0xf1,0xdf,0xf8,0xcb,0xd8,0x0b,0xb2,0x4e,
+ 0x6e,0x81,0x8d,0x36,0x29,0x46,0x31,0xda,0x56,0x2c,0x92,0xa0,0x51,0x2c,
+ 0x10,0x09,0x32,0x42,0x28,0xa3,0xc3,0x28,0xf5,0x60,0x61,0x75,0xc8,0x6c,
+ 0x18,0x09,0x16,0x11,0x64,0x87,0x35,0x22,0x4a,0x82,0xba,0x0c,0xea,0x92,
+ 0xb6,0x4b,0x44,0x87,0xc1,0x76,0x29,0x69,0x14,0x4a,0x2f,0x64,0x11,0x45,
+ 0x1d,0x77,0x18,0xbe,0x2c,0xfe,0xdf,0x0e,0xc6,0x16,0xff,0x94,0x3a,0xc6,
+ 0x73,0xfd,0xf0,0xf0,0xbc,0xfc,0x84,0xfe,0xbd,0xf4,0x5f,0x62,0xd9,0x64,
+ 0xc8,0x2e,0xa7,0x5c,0x72,0xc9,0x29,0xbb,0x0c,0xd9,0x56,0xc1,0x32,0x4e,
+ 0xa7,0x8e,0x14,0x76,0x56,0xd6,0x9a,0x3e,0xb3,0xbd,0xd2,0x5d,0x4a,0x0d,
+ 0xc8,0x23,0x87,0x8c,0x15,0xb0,0x9a,0x7a,0x73,0xdb,0xe7,0x47,0x99,0xe2,
+ 0x35,0x65,0x1e,0x32,0x4c,0x6c,0xa1,0x7b,0x52,0x3e,0xb9,0xd5,0x64,0xc1,
+ 0x32,0x8e,0xe7,0x4e,0xd6,0x5e,0xf0,0x9d,0x2f,0x7c,0xe6,0x13,0x73,0xbc,
+ 0x63,0x8a,0x9e,0x5a,0x57,0x5e,0xad,0x72,0x2f,0x77,0xaf,0xcf,0x3a,0x98,
+ 0x8a,0xcf,0x3f,0xe7,0x1b,0x1f,0x79,0xcf,0x5b,0x66,0x28,0x33,0x4d,0x89,
+ 0xdb,0x84,0x17,0x3b,0xd3,0xf2,0xc9,0x21,0x5b,0x03,0x1b,0x87,0x0a,0x23,
+ 0x7c,0xe5,0x03,0x25,0xce,0x13,0x25,0xc2,0x19,0x1e,0xf3,0x94,0x7b,0xf4,
+ 0xb2,0xbb,0xac,0x90,0x3c,0x32,0x1a,0xd8,0xbe,0xa3,0xf2,0x80,0x39,0x66,
+ 0x38,0x57,0x5f,0xa2,0x8f,0x3c,0xb7,0x18,0x63,0x73,0x55,0x71,0x79,0x65,
+ 0x6f,0x60,0x67,0x8b,0x59,0xe2,0x0d,0x2f,0x89,0xd4,0xf1,0x46,0x72,0xdc,
+ 0x20,0xc3,0x1a,0x53,0x09,0xf9,0xe5,0x6c,0x60,0x57,0x8b,0xf9,0x8c,0x57,
+ 0x14,0x09,0xd7,0x71,0x1b,0x77,0x18,0xe7,0x2a,0x1e,0x53,0x49,0x05,0xe4,
+ 0xfa,0x0d,0x6f,0xad,0xdc,0x64,0x9a,0x27,0xf4,0xd7,0xf1,0x41,0xb2,0x8c,
+ 0x31,0xc8,0x86,0xaa,0x15,0x3b,0x3b,0x4a,0xfd,0x14,0x78,0xc4,0x04,0x3d,
+ 0x04,0x09,0x72,0x80,0xcb,0x5c,0x63,0x88,0x7d,0xc4,0x66,0xad,0x63,0xd8,
+ 0xf7,0x0f,0x84,0x16,0xb2,0xdc,0xe7,0x2e,0x13,0x64,0xb9,0xce,0x38,0x57,
+ 0x38,0xcb,0x51,0xfc,0x4b,0xe1,0x8c,0x75,0x41,0x43,0x9e,0x3d,0x93,0x1d,
+ 0xb5,0x11,0x2e,0x31,0xca,0x45,0x2e,0x30,0xcc,0x29,0x0e,0x13,0xfb,0x11,
+ 0x29,0x2a,0x69,0x3d,0x9d,0x4d,0x0e,0xf9,0x76,0xe5,0xdb,0x16,0xbb,0x38,
+ 0x41,0x9a,0x21,0x8e,0xb1,0x97,0x75,0x4b,0x5b,0x8a,0xea,0x54,0xd4,0xf2,
+ 0x14,0x24,0x43,0x6e,0xb5,0xb6,0xa7,0xb7,0x95,0x83,0xd5,0x66,0xb3,0xd9,
+ 0x5c,0x5f,0x0d,0xcf,0x6e,0xca,0x28,0xa9,0xe8,0x1f,0xef,0x5e,0x0e,0x92,
+ 0xdc,0xf2,0x29,0xa4,0xb8,0x12,0x4a,0x2a,0xa9,0x84,0xe2,0x0a,0xad,0x18,
+ 0xa4,0x5f,0xdd,0x1d,0xf2,0xc8,0x2b,0xbf,0x02,0x0a,0xc8,0x2f,0xef,0xaa,
+ 0x11,0xfd,0x7b,0xf8,0x7f,0x02,0x6c,0x38,0xbb,0x71,0x07,0xb6,0xcc,0x62,
+ 0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_redo_png_len = 592;
+static const unsigned char small_redo_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xe2,0x49,0x44,0x41,0x54,0x48,0xc7,0xd5,0x95,
+ 0x39,0x4b,0x03,0x41,0x14,0xc7,0xa7,0xb1,0x11,0x16,0xd3,0x2c,0x58,0x84,
+ 0x6c,0x61,0x97,0x48,0x6c,0x02,0x16,0x6e,0x67,0x6d,0xe1,0xd7,0xf0,0x13,
+ 0x08,0x76,0x82,0x85,0xa0,0x78,0x5f,0xc1,0x23,0x28,0xa2,0x78,0xa0,0x88,
+ 0x28,0xa2,0x88,0x22,0x8a,0x78,0x82,0x85,0x42,0xc0,0x42,0x0b,0xef,0xa3,
+ 0x10,0x04,0x11,0x79,0xfe,0x67,0xe7,0xed,0x3a,0xd9,0x24,0xba,0x11,0x2c,
+ 0x0c,0xfc,0xd8,0x49,0xb2,0xf9,0xbd,0xff,0xe3,0xcd,0x4e,0x04,0x11,0x89,
+ 0xbf,0x40,0xfc,0x7f,0x31,0x5e,0xc5,0xc0,0x02,0x51,0x46,0xae,0x8b,0x7f,
+ 0x2d,0xd6,0x84,0x09,0x40,0x3e,0x12,0x85,0x16,0xd0,0xa5,0x51,0x57,0x54,
+ 0x95,0xaa,0xa2,0xd8,0x60,0x8c,0x62,0xa9,0x18,0x85,0x93,0x61,0xbd,0x40,
+ 0x34,0xa8,0xdc,0x15,0xcb,0x34,0x64,0x8f,0xd8,0x14,0x4f,0xc6,0xc9,0xea,
+ 0xb5,0x48,0xb4,0x42,0xd4,0x0e,0x3a,0x05,0x19,0xc3,0x06,0x85,0x27,0xbc,
+ 0x02,0xf1,0x20,0x72,0x37,0xad,0xd3,0xbe,0x94,0x8a,0x66,0xf1,0x25,0xed,
+ 0x02,0x03,0x60,0x18,0xa4,0xc0,0x98,0x08,0x2c,0xf7,0xd2,0x46,0xba,0x23,
+ 0x24,0xea,0xf1,0xa3,0x06,0xd0,0xe6,0x93,0x4a,0xe1,0x24,0x98,0x02,0xb3,
+ 0xf9,0xe5,0x1c,0xd2,0xe4,0x2b,0x0f,0xab,0x59,0x1b,0x56,0x07,0xe8,0xf7,
+ 0x49,0xa7,0xc1,0x3c,0x58,0x04,0x2b,0xd9,0x72,0xbd,0x73,0x0e,0x8b,0xb4,
+ 0x7d,0x48,0x5b,0xe7,0x7c,0x50,0x03,0x6a,0x9d,0x2f,0x07,0xc1,0xa8,0x4f,
+ 0xba,0x0c,0xd6,0xc0,0x06,0xd8,0xca,0x90,0x9b,0xfa,0xf0,0x79,0x8d,0x45,
+ 0x8b,0xf3,0xa6,0x82,0x29,0xe5,0x9b,0x49,0x8c,0x83,0x19,0xb0,0xa0,0x49,
+ 0x37,0xc1,0x0e,0xd8,0x07,0x47,0x9e,0xa8,0x5a,0x5e,0x8d,0x2b,0x43,0x2f,
+ 0xa6,0x26,0xcf,0x52,0xd9,0x42,0x11,0xb7,0xa5,0xe4,0x73,0x60,0x09,0xac,
+ 0x6b,0xd2,0x03,0x70,0x02,0x4e,0x41,0x5a,0xc9,0xed,0x7b,0x9b,0xc4,0x9e,
+ 0x57,0xa8,0x52,0x89,0x9b,0xbc,0xf8,0xa6,0x6f,0x10,0x4a,0xbe,0xca,0xed,
+ 0xef,0x82,0x43,0x96,0x9e,0x81,0x73,0x70,0x21,0x28,0x74,0x1d,0x22,0xeb,
+ 0x11,0x5b,0xb4,0xc7,0x13,0xdb,0x42,0xab,0x20,0xd3,0x96,0xe4,0x98,0xb2,
+ 0x92,0x6f,0x6b,0x49,0x5d,0xe9,0x25,0xb8,0x06,0x77,0xe0,0x89,0x07,0xee,
+ 0x13,0x97,0xb1,0xa4,0x28,0xcf,0xd9,0xa1,0xe4,0xc7,0xdc,0x7e,0x2e,0xe9,
+ 0x0b,0x48,0x66,0x8a,0xcd,0x00,0x9b,0xfd,0x4b,0x9e,0x56,0xed,0x3b,0xd2,
+ 0x07,0xf0,0xcc,0xd2,0x57,0xde,0x49,0xae,0x38,0xf0,0xa1,0xa2,0x02,0x38,
+ 0xd3,0x0f,0xdd,0x86,0xb2,0xa5,0x6f,0x60,0xa4,0x40,0xb1,0x7e,0x48,0xd9,
+ 0x8f,0x36,0x59,0x4f,0x56,0xa6,0xf4,0x1d,0x7c,0xf0,0x63,0x1f,0x54,0xac,
+ 0x3f,0x51,0xc6,0x8d,0xa1,0x76,0x45,0x2f,0x0f,0x4a,0xb6,0x3e,0xc4,0x49,
+ 0xa5,0xb4,0xb1,0x30,0xb1,0x99,0xe3,0x7c,0xfe,0x89,0xf2,0xa0,0x89,0xdd,
+ 0x7f,0x94,0x38,0x6f,0x4d,0xfb,0x1b,0xca,0xe5,0xb6,0xfd,0x04,0x86,0x5a,
+ 0x64,0x75,0x88,0xdb,0x84,0x51,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,
+ 0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_richtextedit_png_len = 834;
+static const unsigned char small_richtextedit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0xd4,0x49,0x44,0x41,0x54,0x48,0xc7,0x9d,0x95,
+ 0x4d,0x48,0x1b,0x41,0x18,0x86,0x17,0x41,0x2a,0x68,0x0f,0x1e,0x14,0xc5,
+ 0x5b,0x21,0x0a,0x82,0x27,0x3d,0x04,0x15,0x09,0x46,0xe2,0x21,0x46,0xaf,
+ 0x5a,0x2f,0xde,0x02,0xe2,0x4d,0x2f,0x5e,0x3c,0x09,0x56,0xaa,0xd4,0x5e,
+ 0x42,0x85,0xf8,0x1f,0x24,0x2a,0x1e,0x14,0x41,0x92,0xaa,0xc1,0x1a,0x48,
+ 0x11,0x59,0x04,0x6b,0x68,0x4a,0xd0,0xda,0x10,0x50,0x50,0x50,0x22,0x49,
+ 0x8c,0x59,0xdf,0xce,0x37,0xce,0x2e,0x0b,0xee,0x65,0x73,0x78,0x98,0x77,
+ 0x66,0x32,0xcf,0xee,0xec,0x66,0xbe,0x95,0x24,0x49,0x2a,0x9a,0x9c,0x9c,
+ 0xfc,0x38,0x31,0x31,0x11,0x1e,0x1e,0x1e,0x86,0xdb,0xed,0x36,0x4d,0x6f,
+ 0x6f,0x2f,0xea,0xeb,0xeb,0x7f,0x32,0x97,0x9b,0x51,0xce,0x78,0xc7,0x90,
+ 0x8a,0x49,0x1a,0x8f,0xc7,0xa1,0x28,0x4a,0xc1,0x1c,0x1e,0x1e,0x82,0xb9,
+ 0x64,0x46,0xad,0x90,0x4b,0x25,0x74,0xa7,0xf9,0x7c,0x1e,0xb9,0x5c,0xae,
+ 0x60,0x8e,0x8f,0x8f,0x49,0x4c,0x34,0x33,0x6a,0x48,0x5c,0x4a,0xdb,0xc9,
+ 0x66,0xb3,0xc8,0x64,0x32,0x9c,0x86,0x86,0x06,0x8c,0x8d,0x8d,0xf1,0xfc,
+ 0x74,0x74,0x84,0x97,0xea,0x6a,0x28,0x3d,0x3d,0x78,0x61,0xe3,0x39,0xbf,
+ 0x9f,0x8f,0x93,0x44,0xdf,0x86,0xc3,0x61,0x55,0xdc,0xc9,0xf8,0x40,0xe2,
+ 0x32,0x12,0xa7,0xd3,0x69,0xa4,0x52,0x29,0xc8,0xb2,0x8c,0xee,0xee,0x6e,
+ 0x54,0x33,0x19,0xf5,0x33,0x6c,0x8b,0x79,0xd6,0xe7,0x79,0x7b,0x5b,0xcb,
+ 0x04,0x89,0xd4,0x2c,0x1e,0x05,0xe1,0x64,0x58,0x48,0xfc,0x9e,0xc4,0x34,
+ 0x79,0x7f,0x7f,0x8f,0xa1,0xa1,0x21,0xac,0xac,0xac,0xf0,0x76,0x6b,0x6b,
+ 0x0b,0x8f,0x07,0x07,0xfc,0x8e,0x9f,0x5d,0x2e,0x28,0x6d,0x6d,0x78,0x62,
+ 0xe3,0xf4,0x3b,0x82,0x44,0x6a,0x0e,0x85,0x42,0xaa,0xd8,0x25,0x9e,0xf3,
+ 0xab,0x98,0x26,0x6f,0x6f,0x6f,0xf9,0x9d,0x76,0x75,0x75,0xa1,0xb5,0xb5,
+ 0x15,0x83,0x83,0x83,0x78,0x08,0x06,0x91,0x63,0x7d,0x9a,0x23,0xd8,0x4a,
+ 0x2d,0x4b,0xba,0xbc,0xb7,0xb7,0x67,0x2c,0xbe,0xbb,0xbb,0xc3,0xfc,0xfc,
+ 0x3c,0xfa,0xfa,0xfa,0x70,0x7d,0x7d,0xcd,0xa9,0xaa,0xaa,0xc2,0xbf,0xf5,
+ 0x75,0x28,0xac,0x7d,0x72,0x3a,0xf1,0xdc,0xd2,0x82,0xd4,0xf8,0xb8,0x36,
+ 0x4f,0x22,0x35,0x07,0x02,0x01,0x63,0xf1,0xcd,0xcd,0x0d,0x12,0x89,0x84,
+ 0x29,0x48,0xa4,0xe6,0x9d,0x9d,0x1d,0x63,0x71,0x32,0x99,0xc4,0xe5,0xe5,
+ 0xa5,0x29,0x48,0xa4,0x66,0x7a,0x1f,0x86,0xe2,0xab,0xab,0x2b,0xc8,0xbf,
+ 0x64,0x38,0xbe,0x3a,0x38,0xd6,0xcf,0x56,0xec,0x46,0x76,0xb1,0xb1,0x91,
+ 0x40,0x65,0xa5,0x02,0x87,0x23,0x0d,0xab,0x35,0x8b,0xc5,0xc5,0x24,0x62,
+ 0xb1,0x18,0x87,0x44,0x6a,0xde,0xdc,0xdc,0x34,0x16,0x5f,0x5c,0x5c,0x60,
+ 0xc0,0x3b,0x80,0xd1,0xb5,0x51,0x9c,0x9f,0x9f,0x63,0x2e,0x38,0xc7,0xf3,
+ 0xda,0xda,0x5f,0x74,0x74,0x3c,0xf2,0xb1,0x50,0xe8,0x0f,0xea,0xea,0x72,
+ 0x3c,0x13,0x24,0x52,0xf3,0x3a,0x7b,0x17,0x86,0x62,0xba,0xaa,0xfd,0x8b,
+ 0x1d,0xbe,0xef,0x3e,0x9c,0x9e,0x9e,0x6a,0xf8,0x7c,0x71,0xd8,0xed,0x29,
+ 0xad,0xcf,0xd6,0xea,0xb2,0xa4,0xe5,0xd5,0xd5,0x55,0x63,0x71,0x34,0x1a,
+ 0x45,0xff,0xb7,0x7e,0x8c,0xf8,0x46,0x70,0x72,0x72,0x02,0xcf,0xb6,0x87,
+ 0xe7,0xa5,0xa5,0x18,0xda,0xdb,0x53,0x7c,0x8c,0x72,0x53,0x53,0x9a,0x67,
+ 0x82,0x44,0x6a,0x5e,0x5e,0x5e,0x36,0x16,0x9f,0x9d,0x9d,0x61,0xff,0xc7,
+ 0x3e,0x6c,0x53,0x36,0x4e,0xe3,0xa7,0x46,0xf8,0x03,0x7e,0xf6,0x17,0x8c,
+ 0xa2,0xa2,0x22,0x0f,0x9b,0xed,0x01,0x16,0x4b,0x96,0xf7,0x23,0x91,0x08,
+ 0x97,0xe8,0xdb,0x85,0x85,0x05,0x63,0x31,0x6d,0x87,0xce,0x7b,0xa1,0x78,
+ 0xbd,0xde,0x37,0xe2,0x32,0xaa,0xa7,0xb4,0x1d,0x3a,0xef,0x85,0x10,0x64,
+ 0xa7,0x73,0x66,0x66,0xe6,0x4d,0xad,0x28,0xa5,0x22,0x4d,0x13,0xb3,0xb3,
+ 0xb3,0xf0,0x78,0x3c,0xa6,0x99,0x9e,0x9e,0xe6,0x27,0x96,0xb9,0x7e,0xeb,
+ 0xab,0x5b,0x89,0xa8,0xfc,0xb2,0xb8,0x62,0xa1,0x90,0x74,0x4a,0x5f,0x8f,
+ 0x8b,0x45,0xc5,0xaf,0x15,0x83,0x9d,0x62,0x3b,0x2e,0x13,0x38,0xc5,0xba,
+ 0x66,0xfd,0x17,0xa4,0x48,0x7c,0xa3,0xca,0xc5,0x95,0x3e,0x88,0x67,0x54,
+ 0x6b,0x02,0x8b,0x58,0x57,0xa3,0x7d,0xf3,0x40,0x85,0xf0,0x55,0x5e,0x2c,
+ 0x1e,0x4b,0x29,0xbd,0x50,0xfa,0xb7,0x98,0xa0,0x4c,0xac,0x2b,0x11,0x9e,
+ 0xa2,0xff,0x1d,0x6e,0x08,0xba,0x78,0xe7,0x80,0x2a,0x00,0x00,0x00,0x00,
+ 0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_scrollbar_png_len = 408;
+static const unsigned char small_scrollbar_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x2a,0x49,0x44,0x41,0x54,0x48,0xc7,0xed,0x94,
+ 0x31,0x4b,0xc3,0x60,0x10,0x86,0x0f,0x41,0xb0,0xd8,0x2e,0x9d,0xbb,0x49,
+ 0xf5,0x3f,0xd8,0x1f,0x50,0xc5,0x3a,0xb9,0xd9,0x41,0x10,0x14,0x71,0xad,
+ 0xa0,0xa0,0xa0,0x0e,0x0e,0x82,0x20,0x08,0x2a,0x41,0x5c,0x5c,0xe2,0xe4,
+ 0xe6,0xa6,0x9b,0x0e,0x4e,0x2e,0x19,0x0a,0x0e,0x4e,0xfe,0x8e,0xd7,0xf7,
+ 0x95,0xfb,0x92,0x20,0x56,0x68,0x4d,0x17,0x69,0xe0,0x19,0xee,0x72,0xf7,
+ 0x70,0x1c,0x97,0x18,0x00,0x1b,0x06,0x36,0x12,0x8f,0xc4,0xff,0x41,0xcc,
+ 0x67,0x8c,0x8c,0x93,0x12,0x99,0x24,0x65,0x52,0x19,0x80,0xb2,0xf7,0x97,
+ 0xdc,0x67,0xcb,0xa4,0x4b,0x50,0x00,0x6f,0x64,0x83,0x54,0x25,0x7e,0x8a,
+ 0xe3,0x18,0x49,0x92,0xfc,0x19,0x79,0xe8,0x7b,0x25,0x33,0x12,0xa7,0x2f,
+ 0xa2,0x28,0x42,0x88,0xe7,0xdb,0x86,0xa5,0x4d,0x43,0x7b,0xcb,0xb0,0xba,
+ 0x6b,0x58,0xdb,0xcf,0x50,0xac,0xbc,0xea,0x54,0xaf,0xbe,0xe0,0xf0,0xc9,
+ 0x67,0x53,0x71,0x90,0x86,0x58,0xd2,0xf5,0x43,0x43,0xe7,0xcc,0xb0,0x77,
+ 0x6d,0x38,0xb8,0xc9,0x50,0xac,0x7c,0x4e,0x94,0xca,0x3d,0x6e,0x5a,0x48,
+ 0xe6,0x77,0xa5,0x02,0x4d,0xa4,0xe6,0xa3,0x5b,0xc3,0xe9,0xbd,0xe1,0xfc,
+ 0x21,0x43,0xb1,0xf2,0x79,0xf1,0x37,0xcf,0x42,0xcf,0x89,0x57,0x76,0x0c,
+ 0xdb,0x97,0x86,0xe3,0x3b,0xc3,0xc5,0xa3,0xe1,0xea,0x39,0x43,0xb1,0xf2,
+ 0xbf,0x4c,0xbc,0xd8,0x73,0xc7,0xfd,0x4c,0xfc,0xc3,0x8e,0xbf,0x26,0x7e,
+ 0x29,0xf8,0x2a,0xba,0x61,0xc7,0xba,0xbb,0xf7,0x82,0xee,0xf8,0x83,0x9c,
+ 0x84,0xab,0xa8,0xfa,0xdd,0x35,0xc8,0x1c,0x69,0xf9,0x8e,0xfa,0xa5,0xe5,
+ 0xfd,0x8d,0x70,0xc7,0x13,0x2e,0xaf,0x91,0x29,0x52,0x27,0xd3,0x03,0x50,
+ 0xf7,0xfe,0x5a,0xf8,0xf2,0x86,0xf2,0xaf,0xf8,0x04,0x10,0x4f,0xeb,0x55,
+ 0xd2,0x98,0x8b,0x23,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,
+ 0x60,0x82
+};
+
+static const unsigned int small_searchfind_png_len = 843;
+static const unsigned char small_searchfind_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0xdd,0x49,0x44,0x41,0x54,0x38,0xcb,0xb5,0x95,
+ 0x5f,0x48,0x53,0x51,0x1c,0xc7,0xbf,0xd3,0xab,0x43,0x74,0xf8,0xb2,0xd5,
+ 0x08,0xe6,0x30,0x0d,0xf2,0x61,0x68,0xae,0x61,0x2d,0x90,0xa1,0xe4,0xa8,
+ 0xc7,0x2d,0xc5,0x91,0x20,0xac,0x58,0xae,0x87,0x92,0x58,0x56,0x4f,0x3e,
+ 0x84,0x95,0x2b,0xc4,0xa0,0xd0,0x40,0xc3,0x5e,0x14,0x91,0x7a,0xdb,0xc3,
+ 0x85,0x05,0xbe,0x48,0xf5,0x20,0x0c,0xf6,0x24,0x4c,0x5f,0x56,0xf3,0xa9,
+ 0x99,0x60,0x6c,0xea,0xae,0xeb,0xfc,0x8e,0x9e,0xb5,0xab,0x5b,0x0d,0xc1,
+ 0x1f,0xfc,0xb8,0x3b,0xec,0xde,0xcf,0xf9,0xfe,0xfe,0x9c,0xdf,0x91,0xb2,
+ 0xd9,0x2c,0x4e,0xc2,0x24,0x9c,0x90,0x15,0x05,0x6b,0x34,0x9a,0xff,0x86,
+ 0xc2,0xa2,0xd5,0x1c,0x4b,0x71,0x26,0x93,0x51,0xad,0xf7,0xf6,0xf6,0x90,
+ 0x4c,0x26,0xb1,0xb4,0xb4,0x84,0x40,0x20,0xc0,0x37,0x2f,0x06,0xff,0x27,
+ 0x98,0x40,0x87,0xd7,0xe4,0x54,0x17,0x8b,0xc5,0x02,0xb7,0xdb,0x5d,0x14,
+ 0x2e,0x1d,0x0a,0xdf,0xc1,0x1e,0x1e,0xe6,0x4e,0x5a,0xfb,0xfd,0x7e,0xf4,
+ 0xf4,0xf4,0xa0,0xbd,0xbd,0x5d,0x05,0x16,0xf0,0x81,0x81,0x01,0xec,0xec,
+ 0xec,0x14,0x84,0x4b,0x79,0xd0,0x5b,0x67,0xac,0x8e,0xa9,0x06,0xa7,0x07,
+ 0xa6,0xcb,0x9c,0x8b,0xd6,0x1f,0x32,0x46,0x9e,0x3d,0x47,0x2c,0x16,0x43,
+ 0x7f,0x7f,0x3f,0x07,0x2a,0x8a,0xc2,0x9d,0x6c,0x6b,0x6b,0x0b,0x5e,0xaf,
+ 0xb7,0x20,0x5c,0x12,0x4a,0x09,0x7a,0x69,0xf0,0x15,0xf4,0x4d,0xd6,0xdc,
+ 0xae,0xde,0x6b,0x3e,0xb4,0xb4,0x5a,0xf1,0xe4,0x61,0x00,0x66,0xb3,0x19,
+ 0x76,0xbb,0x9d,0xe7,0x9d,0xd4,0x92,0x13,0x98,0xac,0xaf,0xaf,0xef,0x08,
+ 0x5c,0x28,0xf6,0x90,0xd2,0x7c,0x28,0x0f,0x9d,0x79,0xf3,0x05,0x2b,0x6e,
+ 0xf4,0x7a,0xb0,0xb0,0xb0,0x80,0xb6,0xb6,0x36,0x0e,0x2c,0x2b,0x2b,0x43,
+ 0x75,0x75,0x35,0xd6,0xd6,0xd6,0x72,0xef,0x3a,0x1c,0x0e,0x6c,0x6c,0x6c,
+ 0xe4,0xe0,0x02,0xec,0x14,0xe1,0xab,0xc0,0xac,0xe1,0xa8,0xe7,0x3a,0xaf,
+ 0x3a,0x11,0x1c,0x79,0x9a,0x4b,0x41,0x6d,0x6d,0x2d,0xd6,0xd7,0xd7,0x31,
+ 0x3a,0x3a,0xca,0x95,0x0a,0x4b,0xa7,0xd3,0x25,0x76,0x45,0x76,0x5f,0xb5,
+ 0x92,0xd7,0x7e,0x92,0x24,0xc1,0x68,0x34,0x62,0x68,0x68,0x88,0x2b,0xdc,
+ 0xdd,0xdd,0x85,0x38,0xbd,0x2b,0x2b,0x2b,0x08,0x06,0x83,0x2a,0xb0,0x1c,
+ 0xff,0x22,0xfb,0x9a,0x5c,0x3e,0x15,0x58,0x39,0x50,0x1c,0x96,0x65,0xde,
+ 0x19,0xa4,0x98,0x20,0x3a,0x9d,0x0e,0xf5,0xf5,0xf5,0x30,0x99,0x4c,0xaa,
+ 0x96,0xcc,0x1f,0x0f,0x02,0x3c,0xb7,0x2a,0xcf,0xf9,0x0c,0x2c,0xc7,0xf9,
+ 0x79,0xa6,0x4f,0x22,0xcb,0xcb,0xf8,0x38,0x3f,0x87,0xf3,0xe7,0x1a,0x90,
+ 0x48,0x24,0x60,0x30,0x18,0xf8,0x7f,0x5a,0xad,0x16,0x95,0x95,0x95,0x2a,
+ 0x21,0x55,0x55,0x55,0x6a,0x30,0xdb,0x69,0x91,0x25,0xfd,0xf6,0xd7,0xf1,
+ 0x80,0xaa,0xdd,0x66,0xbe,0xc9,0xf8,0x34,0x3f,0x8b,0x4c,0x3a,0x85,0xef,
+ 0xd1,0x10,0x9c,0x9d,0xef,0x71,0xf7,0xde,0x23,0xde,0x05,0xe5,0xe5,0xe5,
+ 0x54,0x28,0x75,0x84,0x8a,0x72,0x34,0xc7,0x0c,0x3e,0xcd,0x5e,0x5c,0x4d,
+ 0x2c,0x2f,0x8a,0x03,0x62,0xce,0xb0,0xc3,0x71,0xb6,0xce,0x84,0x64,0xec,
+ 0x33,0xbc,0x4e,0x23,0xae,0xd4,0x25,0xf1,0x72,0xfc,0x05,0x2f,0x18,0xc1,
+ 0x2b,0x2a,0x2a,0x54,0xf0,0x82,0x60,0xa1,0x9c,0x3d,0x16,0xc5,0x10,0x1a,
+ 0x1e,0x1e,0x46,0x3c,0x1e,0x47,0xaf,0x7b,0x16,0x2d,0xa7,0x7f,0xe2,0x54,
+ 0x4d,0x06,0xfe,0x0e,0xe0,0xdd,0xe4,0x18,0x87,0x10,0x9c,0x8a,0x49,0xed,
+ 0x77,0x78,0x04,0xfc,0x77,0x08,0xe9,0xf5,0x7a,0x78,0xef,0x0c,0xe2,0xcd,
+ 0xc4,0x18,0x6e,0xda,0x01,0x83,0x0e,0x70,0x5f,0x04,0xa6,0x26,0x5f,0xf3,
+ 0x03,0x43,0x07,0x87,0xe0,0xa4,0xbc,0xa8,0xe2,0x42,0x60,0x72,0x97,0xcb,
+ 0x85,0xed,0xed,0x6d,0x7c,0x98,0x7e,0x8b,0xeb,0xcd,0xc0,0xaf,0xdf,0x80,
+ 0x8e,0xd5,0x29,0x1c,0x0e,0x73,0xd5,0x07,0x11,0x96,0x0e,0x16,0x03,0x87,
+ 0xac,0xbb,0xbb,0x9b,0xff,0x9e,0x99,0x9e,0x40,0x8d,0x16,0xb0,0xd8,0x3a,
+ 0xd0,0xd5,0xd5,0xc5,0x37,0xa6,0x42,0x52,0x3a,0x4a,0x06,0xa7,0x52,0x29,
+ 0x44,0x22,0x91,0x5c,0x8f,0x36,0x36,0x36,0xe2,0xfe,0x83,0xc7,0x88,0x46,
+ 0xa3,0xb0,0xd9,0x6c,0x7c,0x38,0x51,0xcb,0x89,0x54,0x6c,0x6e,0x6e,0x96,
+ 0x06,0x16,0xe3,0xb2,0x90,0x85,0x42,0xa1,0xe3,0x5d,0x4d,0xc5,0x6e,0x06,
+ 0xcd,0xdf,0xfe,0xd2,0xec,0xbf,0x56,0xf8,0x36,0xfe,0x03,0x31,0xcf,0x73,
+ 0x51,0x2e,0x4c,0xd6,0x43,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,
+ 0x42,0x60,0x82
+};
+
+static const unsigned int small_shellscript_png_len = 1053;
+static const unsigned char small_shellscript_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,
+ 0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,
+ 0x00,0x04,0x67,0x41,0x4d,0x41,0x00,0x00,0xb1,0x8e,0x7c,0xfb,0x51,0x93,
+ 0x00,0x00,0x00,0x20,0x63,0x48,0x52,0x4d,0x00,0x00,0x7a,0x25,0x00,0x00,
+ 0x80,0x83,0x00,0x00,0xf9,0xff,0x00,0x00,0x80,0xe9,0x00,0x00,0x75,0x30,
+ 0x00,0x00,0xea,0x60,0x00,0x00,0x3a,0x98,0x00,0x00,0x17,0x6f,0x92,0x5f,
+ 0xc5,0x46,0x00,0x00,0x03,0x93,0x49,0x44,0x41,0x54,0x78,0xda,0x62,0xfc,
+ 0xff,0xff,0x3f,0xc3,0x8c,0x19,0x33,0xfe,0x33,0x50,0x11,0x64,0x64,0x64,
+ 0x30,0x02,0x04,0x10,0x0b,0x8c,0x63,0xed,0x9f,0xc1,0xf0,0xed,0x07,0x03,
+ 0xc3,0xf7,0x5f,0x0c,0x0c,0xdc,0x1c,0x0c,0x0c,0x97,0x1e,0xfe,0x65,0xf8,
+ 0xfa,0xe3,0x1f,0xc3,0x83,0x57,0x3f,0x18,0x5e,0x7d,0xfa,0xcd,0xf0,0xe3,
+ 0xd7,0x1f,0x86,0x1f,0x7f,0xfe,0x31,0xfc,0x04,0xd2,0xdf,0x7f,0xff,0x05,
+ 0xf2,0xff,0x32,0x7c,0x03,0x89,0xfd,0xfa,0x07,0xd4,0xf3,0x97,0xe1,0xc3,
+ 0xb7,0x3f,0x0c,0x8e,0x7a,0x22,0x0c,0x7e,0xdc,0x9b,0xc1,0xe6,0x01,0x04,
+ 0xe0,0x71,0x5c,0x52,0x00,0x84,0x81,0x28,0x16,0x3a,0xa3,0x0b,0xbd,0xff,
+ 0x4d,0xd5,0xaa,0x9d,0x8f,0x03,0x42,0x17,0x8f,0x6c,0x42,0x78,0x33,0xdc,
+ 0x2f,0x28,0x8f,0x5e,0xb1,0x77,0x24,0xfb,0x3a,0xd8,0x34,0x79,0xee,0xe4,
+ 0x38,0x8d,0xa6,0x83,0x96,0x81,0x88,0x17,0x1d,0x89,0x9f,0x5a,0x5b,0x30,
+ 0xc2,0xbd,0x7c,0x9b,0xaf,0x3f,0x01,0x04,0x37,0xd8,0x4c,0x19,0xc6,0x62,
+ 0x82,0xd2,0xcc,0x50,0x9a,0x93,0xe1,0x1f,0x03,0x1f,0xc3,0x3f,0x68,0x60,
+ 0xfd,0xfd,0xc7,0x00,0x66,0x83,0x82,0xf0,0xff,0xdf,0xff,0x40,0x36,0x10,
+ 0xff,0xfb,0x07,0xa4,0xff,0x31,0xf0,0x70,0xb1,0x33,0xcc,0x9d,0x05,0x51,
+ 0x07,0x10,0x40,0x2c,0x98,0x21,0x04,0x32,0x81,0x11,0x89,0x0d,0xb4,0x0a,
+ 0xa8,0x99,0x11,0x64,0x10,0x98,0xfe,0x0b,0xa4,0x81,0x32,0xff,0xfe,0x83,
+ 0x0d,0x03,0x8a,0x32,0x70,0x70,0x71,0x40,0x1c,0xc4,0x88,0x30,0x05,0x20,
+ 0x80,0x50,0x0c,0xbe,0x7f,0xff,0x3e,0x83,0x90,0x90,0x10,0x98,0x0d,0x72,
+ 0x05,0xc8,0x20,0x14,0x2b,0xa1,0xfc,0xff,0x30,0x4b,0x18,0x19,0x19,0x3e,
+ 0x7f,0xfe,0x0c,0x16,0x93,0x91,0x91,0x61,0x60,0x65,0x65,0x86,0xab,0x05,
+ 0x08,0x20,0x98,0xbf,0x19,0x5e,0xbf,0x7e,0xcd,0x20,0x21,0x21,0xc1,0xf0,
+ 0xeb,0xd7,0x2f,0x86,0xf7,0xef,0xdf,0x83,0xc3,0x8c,0x85,0x85,0x05,0x05,
+ 0xb3,0xb2,0xb2,0x82,0x31,0x1b,0x1b,0x1b,0x03,0x3b,0x3b,0x3b,0xc3,0x5f,
+ 0xa0,0x1a,0x45,0x45,0x45,0xb0,0x25,0x9f,0x3e,0x7d,0x42,0x71,0x04,0x40,
+ 0x00,0xa1,0xb8,0x98,0x93,0x93,0x93,0xa1,0xa2,0xb2,0x92,0x41,0x51,0x49,
+ 0x89,0xe1,0xdf,0x9f,0x3f,0x0c,0x1f,0x3f,0x7c,0x60,0xe0,0x00,0x8a,0x61,
+ 0x03,0x20,0x8b,0x2e,0x5f,0xbe,0xcc,0xd0,0xd5,0xd5,0x05,0xd6,0x87,0xee,
+ 0x3b,0x80,0x00,0x82,0x1b,0xcc,0xc4,0x04,0x71,0xbc,0xa8,0x88,0x08,0x83,
+ 0x00,0x30,0x38,0x1c,0x5c,0x5c,0x18,0x4e,0x1d,0x3b,0xc6,0xb0,0x69,0xed,
+ 0x5a,0x60,0xd8,0x31,0x82,0xbd,0x0d,0x03,0x20,0x36,0x2c,0x28,0x40,0x3e,
+ 0xfc,0x03,0x74,0x04,0x17,0x17,0x17,0x8a,0xc1,0x00,0x01,0x84,0x61,0xf0,
+ 0xb3,0x67,0xcf,0x18,0xf8,0xc5,0xc4,0x18,0xde,0xbe,0x7b,0xc7,0x70,0xf3,
+ 0xc6,0x0d,0x86,0x8b,0x97,0x2e,0x81,0xc5,0x41,0xde,0x07,0x05,0x03,0x72,
+ 0x78,0x83,0x82,0x02,0x14,0xc6,0x20,0xd7,0xc3,0xf4,0xc3,0x00,0x40,0x00,
+ 0x61,0xa4,0x8a,0x9f,0x3f,0x7f,0x32,0x4c,0x99,0x38,0x91,0xa1,0xae,0xbc,
+ 0x9c,0x81,0x09,0xe8,0x22,0x77,0x1f,0x1f,0x06,0x4e,0xa0,0x6b,0x6e,0x5e,
+ 0xbb,0xc6,0x70,0xfd,0xca,0x15,0x06,0x46,0xa0,0x01,0xa0,0x88,0xfd,0xf6,
+ 0xed,0x1b,0x58,0x3d,0xc8,0xb5,0x20,0x83,0x99,0x99,0x99,0x51,0xcc,0x01,
+ 0x08,0x20,0xb8,0xc1,0x20,0xc5,0x30,0x83,0x6f,0x01,0x0d,0x01,0x01,0x6e,
+ 0x6e,0x6e,0x86,0x6f,0x5f,0xbe,0x80,0x9c,0xc7,0xf0,0xf5,0xeb,0x57,0x60,
+ 0x46,0xf9,0x0a,0x76,0x25,0x08,0x23,0xbb,0x1c,0x84,0xd1,0x5d,0x0c,0x10,
+ 0x40,0x70,0x83,0x7f,0xff,0xfe,0x0d,0x8f,0x40,0x10,0xe0,0xe1,0xe1,0x01,
+ 0xc7,0xfc,0xa1,0x03,0x07,0xc0,0x9a,0x98,0x81,0xae,0x02,0x25,0x45,0x50,
+ 0x98,0x82,0x5c,0xfb,0xe3,0xc7,0x0f,0xb0,0x4b,0x41,0x2e,0x86,0x85,0x3b,
+ 0x32,0x00,0x08,0x20,0xb8,0xc1,0x30,0xaf,0x80,0xc2,0x12,0x04,0xf8,0xf9,
+ 0xf9,0xc1,0x11,0x02,0x0b,0x5b,0x90,0xab,0x40,0x96,0xc3,0x0c,0x04,0xf1,
+ 0x41,0xe2,0x30,0xd7,0x83,0xc4,0x90,0x01,0x40,0x00,0xb1,0x20,0x27,0x1f,
+ 0x98,0x4b,0xc5,0x80,0x91,0x27,0x2e,0x2e,0x0e,0x36,0x18,0x14,0x1c,0x20,
+ 0xc3,0x41,0x06,0x80,0x0c,0xfe,0xfe,0xfd,0x3b,0x38,0xc2,0x60,0x16,0x82,
+ 0xc4,0x41,0xae,0x46,0x77,0x31,0x40,0x00,0xa1,0xa4,0x0a,0x50,0x38,0x97,
+ 0x95,0x95,0x31,0xa4,0xa5,0xa5,0x81,0xc5,0x40,0xde,0x86,0xb9,0x0e,0xa4,
+ 0x19,0x64,0x30,0xc8,0x20,0x90,0xe1,0xa0,0x34,0x0c,0x02,0x97,0xa0,0xa9,
+ 0xe6,0xc8,0x91,0x23,0x28,0x06,0x03,0x04,0x10,0xdc,0x60,0x5e,0x5e,0x5e,
+ 0x86,0x37,0x6f,0xde,0x80,0x2d,0x00,0x05,0x03,0xc8,0x12,0x58,0x44,0xfd,
+ 0x85,0xe6,0x42,0x58,0x90,0xc0,0x22,0x1a,0x58,0xee,0xa2,0x18,0x06,0x2c,
+ 0xd7,0x19,0x32,0x33,0x33,0xe5,0x40,0xe2,0x00,0x01,0x84,0xe2,0x62,0x51,
+ 0x51,0x51,0xb8,0xb7,0xd0,0xbd,0x06,0xe3,0x83,0x68,0x50,0xca,0x39,0x73,
+ 0xe6,0x0c,0xd8,0x42,0x58,0xdc,0x40,0x0d,0xd5,0x04,0x32,0x1f,0x83,0xf8,
+ 0x00,0x01,0xc4,0x82,0xae,0x19,0x39,0x13,0xe0,0x02,0xa0,0xd4,0x02,0x4b,
+ 0x49,0x20,0x1f,0xcc,0x99,0x33,0x07,0x64,0xa8,0x24,0x50,0xe8,0x05,0x4c,
+ 0x0d,0x40,0x00,0xb1,0x90,0x53,0xf5,0xc0,0x5c,0x0f,0x0a,0xba,0x2d,0x5b,
+ 0xb6,0x60,0x18,0x0a,0x02,0x00,0x01,0xc4,0x42,0x49,0xdd,0x06,0x35,0x14,
+ 0x54,0xce,0xbe,0x47,0x97,0x03,0x08,0x20,0x16,0xe4,0x80,0x27,0x15,0x00,
+ 0x0d,0x15,0x04,0x52,0x1f,0xb0,0xc9,0x01,0x04,0x18,0x00,0xf8,0x8e,0xa8,
+ 0xba,0x67,0x19,0x36,0x31,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,
+ 0x42,0x60,0x82
+};
+
+static const unsigned int small_slider_png_len = 729;
+static const unsigned char small_slider_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0x6b,0x49,0x44,0x41,0x54,0x48,0xc7,0xbd,0x95,
+ 0xdf,0x6b,0x52,0x61,0x18,0xc7,0x5f,0x1c,0x96,0xcb,0x75,0x33,0x2a,0x08,
+ 0x82,0x2e,0xc4,0x09,0xbb,0xcb,0x81,0x17,0x05,0x41,0x45,0x6b,0x1a,0x5d,
+ 0x74,0x2e,0x86,0xce,0x60,0x2d,0xa8,0xd4,0x84,0x72,0x8e,0x30,0x42,0xc2,
+ 0x46,0x85,0x21,0x54,0x98,0x14,0x42,0xc6,0xa1,0x35,0x6c,0xc9,0x5a,0x8e,
+ 0xa4,0x82,0x41,0xa3,0xa8,0x06,0xb1,0x15,0xc8,0x98,0x0d,0xb6,0xab,0x55,
+ 0x17,0xd5,0xbf,0xf0,0xed,0x79,0xce,0x79,0x77,0x60,0xe2,0x85,0x3f,0xaa,
+ 0x03,0x1f,0xe4,0x78,0x9e,0xf7,0xe3,0xfb,0xbe,0xe7,0xfb,0x3e,0x0a,0x00,
+ 0xe2,0x5f,0x20,0xfe,0x9b,0x98,0x2e,0x13,0x61,0x26,0xda,0x09,0x2b,0xd1,
+ 0x21,0x3f,0xdb,0xe5,0xf7,0xa6,0x86,0xc5,0x3c,0x28,0x1c,0x0e,0x0f,0x04,
+ 0x02,0x81,0x25,0xaf,0xd7,0x0b,0x45,0x51,0xe0,0xf1,0x78,0x60,0xb7,0xdb,
+ 0x97,0xe9,0x59,0x80,0xe8,0x24,0x2c,0xf5,0xc8,0xab,0xc5,0xe6,0x60,0x30,
+ 0xf8,0x6e,0xea,0xfd,0x39,0xcc,0xae,0xfa,0x31,0xb3,0xa2,0x60,0xba,0xe2,
+ 0xc2,0x15,0x55,0xf0,0xc3,0x05,0xc2,0x21,0xe5,0xe6,0x46,0xc5,0x16,0xbf,
+ 0xdf,0x8f,0xd9,0x95,0x41,0xbc,0xaa,0xb8,0x51,0x5c,0x74,0xe2,0xd1,0xbc,
+ 0xc0,0x8d,0x09,0x4d,0xcc,0xec,0x25,0x76,0x71,0x5d,0xa3,0x62,0x2b,0x2f,
+ 0xff,0x75,0x45,0xc1,0xb3,0x72,0x0f,0xd4,0x4f,0x02,0xa9,0xa2,0xc0,0xc8,
+ 0x5d,0x43,0x7c,0x84,0xb0,0x71,0x5d,0xa3,0xe2,0x0e,0x16,0xbf,0x5c,0x54,
+ 0x50,0xf8,0xec,0xc4,0xc3,0x8f,0x02,0x37,0x27,0x05,0x86,0xef,0x18,0xe2,
+ 0xa3,0x84,0x9d,0xeb,0x1a,0x15,0x6f,0x65,0xf1,0x8b,0xb2,0x82,0xdf,0xf8,
+ 0x8a,0x33,0x63,0x02,0x3f,0x50,0x86,0xe7,0xa2,0x21,0x3e,0x46,0x74,0x71,
+ 0x5d,0x5d,0x62,0xba,0xda,0x88,0x4d,0xc4,0x0e,0x16,0x4f,0x7f,0xd1,0xc5,
+ 0xa7,0x55,0x5d,0xec,0x1e,0x31,0xc4,0xfd,0xc4,0x1e,0x62,0x27,0xcb,0x6b,
+ 0xc0,0xd1,0xdc,0x22,0x5d,0x9a,0xf4,0x9a,0x1c,0xa8,0x45,0xec,0xf9,0xbc,
+ 0x2e,0x3e,0xf5,0x40,0xe0,0x3b,0x89,0x7b,0x87,0x0d,0x71,0x3d,0xdc,0x22,
+ 0xb6,0x0b,0x19,0x7a,0x44,0x22,0x11,0x64,0xb3,0x59,0x4d,0x3c,0x39,0xa7,
+ 0xe0,0x17,0x89,0x4f,0xde,0xd7,0xc5,0x87,0xcf,0xeb,0x83,0xe2,0xf1,0x38,
+ 0xd2,0xe9,0x34,0x54,0x55,0x45,0x3e,0x9f,0xdf,0x40,0xa1,0x50,0x40,0xa9,
+ 0x54,0xd2,0x3c,0x54,0xdb,0xcd,0xe2,0xcd,0x44,0xca,0xe5,0x72,0x81,0x32,
+ 0xac,0x89,0x9f,0x7e,0x50,0xf0,0x93,0xc4,0x27,0x32,0x02,0xdf,0x48,0x7c,
+ 0x28,0xac,0x8b,0x7d,0x3e,0x1f,0x42,0xa1,0x10,0xa2,0xd1,0x28,0x62,0xb1,
+ 0xd8,0x06,0x12,0x89,0x04,0x72,0xb9,0x1c,0x92,0xc9,0xe4,0x63,0xaa,0xed,
+ 0x59,0x9f,0xf1,0x36,0xf9,0x2b,0x7d,0x2c,0x7e,0xf2,0x56,0x17,0x0f,0x50,
+ 0x1a,0xd6,0x48,0x7c,0x30,0x68,0x2c,0x73,0x54,0x9e,0xc0,0x7e,0xf9,0x22,
+ 0xab,0xf1,0x10,0xfb,0xd7,0x67,0xdc,0x26,0x37,0x9c,0xf7,0xa5,0x9b,0xc5,
+ 0xe3,0x6f,0x14,0xdc,0x2b,0x39,0x71,0x7d,0x42,0xcf,0xf0,0xd0,0x65,0x43,
+ 0xcc,0xd2,0x5e,0xf9,0x02,0xbb,0x6a,0xc0,0x51,0xdc,0xad,0xb9,0x6a,0xa5,
+ 0x62,0x6c,0x46,0x41,0xa6,0xe8,0xc4,0xe8,0x38,0x65,0xf8,0xb6,0xc0,0x60,
+ 0xac,0x89,0x54,0x54,0x1f,0x10,0xb7,0xdb,0x8d,0xcc,0x94,0xde,0x1f,0x2e,
+ 0xa4,0x04,0xce,0x5e,0xa5,0xbd,0x8d,0xb4,0x7e,0x40,0xac,0x0e,0x87,0x63,
+ 0x6e,0xe8,0x92,0x2e,0xf4,0x53,0xcc,0xbc,0x94,0x88,0x03,0xc7,0x35,0xe9,
+ 0x52,0x2b,0x47,0xda,0x22,0xf7,0x71,0xb5,0x2a,0x9b,0x6b,0x9c,0x9c,0x56,
+ 0x9a,0x90,0x59,0xb6,0x45,0x6e,0x8f,0xfb,0x38,0x25,0x72,0xf9,0x7d,0xf2,
+ 0xbe,0xe9,0xb6,0x69,0x92,0xb3,0xee,0x94,0x33,0xb3,0xc9,0x3d,0xb5,0xc9,
+ 0xfb,0xe6,0x1a,0xfd,0xdf,0xfc,0x6b,0xfa,0x03,0x1c,0x60,0x85,0x9a,0xe9,
+ 0x45,0x38,0x23,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
+ 0x82
+};
+
+static const unsigned int small_spacer_png_len = 715;
+static const unsigned char small_spacer_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x02,0x5d,0x49,0x44,0x41,0x54,0x48,0xc7,0x63,0xf8,
+ 0xff,0xff,0x3f,0x03,0x2d,0x30,0xc3,0xa8,0xc1,0xb4,0x37,0x18,0x08,0x18,
+ 0x81,0x98,0x05,0x88,0x39,0x80,0x98,0x1b,0x8a,0x39,0xa0,0x62,0x8c,0x44,
+ 0x18,0x80,0x4b,0x3f,0x03,0x4b,0x68,0x68,0xe8,0x7f,0x1f,0x1f,0x9f,0xff,
+ 0x26,0x26,0x26,0x20,0x95,0x20,0x2c,0x09,0xc4,0xbc,0x20,0x39,0x22,0x0c,
+ 0xc6,0xa5,0x9f,0x81,0x03,0x24,0xb8,0x79,0xf3,0xe6,0xff,0x8b,0x17,0x2f,
+ 0x86,0x49,0xc0,0xb0,0x15,0x10,0x6b,0x00,0x71,0x38,0x92,0x18,0xc8,0x42,
+ 0x7b,0x20,0xce,0x83,0x89,0x61,0xd1,0x6f,0x0c,0x32,0x98,0xdb,0xcb,0xcb,
+ 0xeb,0xff,0xaa,0x55,0xab,0xfe,0xd7,0xd5,0xd5,0x81,0x25,0x6e,0x3e,0x7b,
+ 0xf7,0xff,0xf0,0x95,0xbb,0x30,0x45,0x60,0x43,0xaf,0x3f,0x79,0xf3,0xbf,
+ 0x77,0xe1,0x2a,0xb0,0x58,0x5a,0x69,0xcd,0x5c,0x10,0x7d,0xfe,0xde,0xb3,
+ 0xff,0x42,0x0a,0xaa,0xff,0x5d,0x5d,0x5d,0x51,0xf4,0x03,0xb1,0x0b,0xc8,
+ 0x60,0x5e,0x90,0xc1,0x4b,0x97,0x2e,0xfd,0x5f,0x51,0x51,0x01,0x96,0x38,
+ 0x7c,0xe3,0xd1,0x3f,0x64,0x97,0x9f,0xb8,0xfd,0xe4,0xff,0xf6,0xe3,0x17,
+ 0x7e,0x22,0x8b,0x1d,0xbb,0xf1,0xe8,0xff,0xe4,0x25,0x6b,0xef,0x80,0xd8,
+ 0xe8,0xfa,0x81,0xd8,0x17,0x6e,0xf0,0xfc,0xf9,0xf3,0xff,0x17,0x15,0x15,
+ 0xc1,0x35,0xf2,0x0a,0x08,0x80,0xe9,0xf5,0xc7,0xaf,0x7c,0x5b,0x7d,0xe8,
+ 0x02,0x8a,0x45,0x5b,0xcf,0xdd,0xfa,0xbf,0x68,0xdb,0x41,0xb8,0x45,0x58,
+ 0xf4,0x23,0x0c,0x9e,0x31,0x63,0xc6,0xff,0xdc,0xdc,0x5c,0xb0,0x84,0x63,
+ 0x48,0xcc,0x2e,0x10,0x9d,0x55,0xdf,0xf5,0x7f,0xda,0xf6,0x13,0x60,0x31,
+ 0x0e,0x2e,0xae,0x52,0x10,0x3d,0x79,0xcd,0xae,0xff,0x13,0xd7,0xef,0x87,
+ 0x19,0x60,0x09,0xa2,0xed,0xed,0xed,0x51,0xf4,0xa3,0x18,0x3c,0x69,0xd2,
+ 0xa4,0xff,0xe9,0xe9,0xe9,0x60,0x09,0x36,0x0e,0xae,0xf9,0x20,0xba,0x79,
+ 0xc9,0xf6,0xff,0x05,0x93,0x96,0x20,0x47,0xe4,0xff,0xda,0xc5,0x3b,0xfe,
+ 0x27,0x54,0xb4,0xc3,0xc4,0x62,0x40,0xb4,0xb1,0xb1,0x31,0x8a,0x7e,0x14,
+ 0x83,0xbb,0xba,0xba,0xfe,0x27,0x26,0x26,0xc2,0xbd,0x9b,0xd6,0x3e,0xe3,
+ 0x41,0x42,0x0f,0xc4,0x50,0x26,0x16,0x96,0x12,0x10,0x5d,0x30,0x6d,0xd5,
+ 0xb7,0xb0,0xea,0x7e,0x98,0x1a,0x73,0x10,0xed,0xdb,0xb1,0xf0,0xbf,0xae,
+ 0xae,0x2e,0xba,0x7e,0x84,0xc1,0xcd,0xcd,0xcd,0xff,0x23,0x23,0x23,0xe1,
+ 0x06,0x47,0xb7,0xcf,0xfb,0xef,0x98,0x5a,0x81,0x92,0xfc,0xfc,0x6a,0xa7,
+ 0xfd,0x37,0xf4,0x0c,0x83,0xc4,0x81,0x90,0x30,0x98,0x76,0xc8,0x6f,0xfb,
+ 0x03,0x32,0x18,0x4d,0x3f,0xc2,0xe0,0x9a,0x9a,0x9a,0xff,0xc1,0xc1,0xc1,
+ 0x60,0x89,0xe0,0xb2,0x9e,0xb7,0x76,0xd9,0xcd,0x28,0x86,0xfa,0x57,0x4f,
+ 0xfe,0x6b,0x12,0x95,0xf7,0x03,0x59,0xcc,0xb9,0xb8,0xe7,0xbf,0xb6,0x4f,
+ 0xd4,0x4d,0x33,0x33,0x33,0x14,0xfd,0x28,0x06,0x97,0x96,0x96,0xfe,0xf7,
+ 0xf5,0xf5,0x05,0x4b,0x58,0x65,0xb5,0x40,0x82,0x80,0x8d,0xab,0x0e,0x44,
+ 0x5b,0x26,0x57,0x3f,0x32,0x8e,0x2b,0x81,0x69,0xb2,0x05,0xd1,0x76,0xd9,
+ 0x2d,0x3f,0x75,0x03,0x52,0xc0,0x16,0x39,0x3a,0x3a,0xa2,0xe8,0x87,0x1b,
+ 0x0c,0xca,0x8a,0x11,0x11,0x11,0x60,0x05,0x48,0x2e,0xaa,0x86,0xe6,0x30,
+ 0x0d,0x24,0x31,0x50,0xc2,0xe7,0x03,0x62,0x3b,0x24,0x31,0x37,0x2c,0xfa,
+ 0xc1,0x06,0x73,0xa3,0x65,0x63,0x98,0x01,0x4a,0x20,0x39,0x22,0xca,0x0a,
+ 0x5c,0xfa,0xc1,0x25,0x91,0x24,0x34,0x7f,0xbb,0x40,0xb1,0x31,0x54,0x8c,
+ 0x83,0x08,0x83,0x71,0xe9,0x07,0x17,0x79,0xbc,0x50,0x49,0x25,0x28,0x26,
+ 0xa9,0x74,0xc3,0xa1,0x9f,0x36,0xe5,0x31,0x00,0xda,0xdd,0x5c,0xc0,0x6d,
+ 0x57,0xec,0xdb,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
+ 0x82
+};
+
+static const unsigned int small_spinbox_png_len = 455;
+static const unsigned char small_spinbox_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x59,0x49,0x44,0x41,0x54,0x28,0xcf,0x7d,0xd3,
+ 0xb1,0x4a,0x5b,0x51,0x1c,0x80,0xf1,0x8f,0x40,0x48,0x20,0xc9,0x70,0xe7,
+ 0x6c,0x81,0x64,0xf0,0x11,0xf2,0x02,0x19,0x82,0xbb,0xf5,0x05,0xee,0x03,
+ 0xf8,0x10,0x52,0xb0,0xe0,0x54,0x28,0x68,0x45,0x45,0x87,0x40,0x87,0x42,
+ 0x97,0x96,0x42,0x09,0x86,0x46,0x24,0x88,0x50,0x5a,0x14,0xc4,0x50,0x82,
+ 0xa0,0xa0,0x20,0x08,0x2a,0xc1,0xf2,0x75,0x48,0x4c,0x8e,0x70,0x12,0x7e,
+ 0xdc,0xc3,0x7f,0xf8,0xe0,0xc0,0xe1,0x7f,0x21,0xf3,0x76,0x79,0xb5,0xb3,
+ 0x62,0x3a,0xd3,0x92,0x0b,0x87,0xa4,0x24,0xe4,0x20,0xbb,0xda,0x39,0xf7,
+ 0xdf,0x5c,0x6d,0x39,0xa6,0x46,0x02,0xf9,0x15,0x9f,0x1d,0xce,0xf0,0xd3,
+ 0xa1,0x43,0x8f,0x44,0xea,0x94,0xa1,0x90,0xfa,0xe4,0x63,0xd4,0x81,0x78,
+ 0xe0,0xa3,0x1d,0x91,0x06,0x15,0x28,0xa6,0x3e,0x78,0x1f,0xd1,0x16,0x11,
+ 0xdb,0xa3,0xa9,0x49,0x15,0x4a,0xa9,0xf7,0xde,0x45,0x30,0xf1,0x43,0x64,
+ 0x91,0x1a,0x94,0x52,0xef,0x6c,0x89,0xd8,0xf2,0x26,0x98,0xa6,0xbe,0x87,
+ 0xf1,0xad,0x78,0xe5,0x95,0x8c,0xbf,0x97,0xf3,0xc5,0xd7,0x30,0xbe,0x76,
+ 0x57,0xc4,0x5d,0x07,0x0e,0xc6,0x57,0x0f,0x02,0x5f,0xc2,0xf8,0x52,0xec,
+ 0xdb,0x1f,0x9f,0xaf,0xa7,0xbe,0x7d,0x3f,0x87,0xf1,0x5f,0x37,0x45,0xdc,
+ 0xf4,0x2c,0x98,0xa6,0x3e,0x85,0xf1,0x85,0xbf,0x23,0xa6,0xaf,0xd1,0x0a,
+ 0xe3,0x33,0x4f,0x22,0xf6,0xc6,0xe9,0x9e,0xfb,0x61,0xfc,0xc7,0x5e,0xd4,
+ 0xb6,0xb8,0x6d,0xcf,0x9d,0x30,0xfe,0x65,0x77,0x86,0x8f,0x76,0xed,0xba,
+ 0x15,0xc6,0x27,0x76,0xe6,0xda,0x98,0xc4,0xc5,0x25,0x7b,0xb6,0xe7,0xf8,
+ 0xe6,0xfa,0x64,0x37,0x0a,0x0b,0x87,0xeb,0x7e,0xf0,0xfd,0x4c,0xef,0x7c,
+ 0x23,0xa7,0xa3,0xad,0xcb,0x93,0x72,0x8c,0x73,0x9d,0xb2,0x36,0xda,0xe7,
+ 0x2c,0x09,0x35,0xea,0x34,0x68,0xb2,0x18,0xd5,0xa4,0x41,0x7d,0xf4,0xa7,
+ 0x64,0xc8,0x91,0x50,0xa6,0x42,0x95,0x5a,0x54,0x95,0x0a,0x65,0x12,0x72,
+ 0x08,0x19,0xb2,0xe4,0x29,0x50,0xa4,0x14,0x55,0xa4,0x40,0x9e,0x2c,0x99,
+ 0xff,0x6a,0xa0,0x52,0xe8,0x80,0x5e,0x8e,0x49,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_statusbar_png_len = 294;
+static const unsigned char small_statusbar_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0xed,0x49,0x44,0x41,0x54,0x78,
+ 0x9c,0xb5,0xd4,0xb1,0x0e,0x82,0x30,0x10,0x06,0xe0,0xbf,0x80,0x8b,0x10,
+ 0xc3,0xa6,0x89,0xb8,0xf1,0x00,0x37,0xb1,0x99,0x38,0x9a,0x98,0xb0,0x78,
+ 0x0f,0xe9,0xc0,0xe6,0x8b,0xf0,0x00,0x6c,0xc6,0xc1,0xcd,0x45,0x17,0x51,
+ 0x1c,0x4c,0x6b,0x21,0x48,0x25,0xd0,0x5b,0x5a,0x0a,0xf9,0x8e,0xfc,0x90,
+ 0x13,0x55,0x55,0xc1,0x46,0x39,0x56,0x54,0x9b,0xb0,0x18,0x1b,0xb4,0x15,
+ 0xad,0xc2,0x05,0x36,0xb0,0xd2,0xc2,0xf3,0x1f,0x5b,0xac,0x17,0x33,0x84,
+ 0x93,0xf1,0xe2,0x3e,0x9e,0xae,0xf0,0x6e,0x97,0x33,0xc2,0x55,0x88,0x24,
+ 0x49,0x90,0xa6,0xe9,0x60,0xf4,0xfe,0x7c,0xe1,0xb0,0xdb,0x7f,0xff,0x8a,
+ 0x28,0x8a,0x06,0xa3,0x00,0x30,0x75,0x3f,0xa4,0x82,0x83,0x20,0xa8,0x3d,
+ 0xc0,0xcc,0x60,0x66,0xc4,0x71,0xac,0xce,0xf4,0xbd,0xa9,0x5a,0x83,0x95,
+ 0x40,0x96,0x65,0x20,0xa2,0x5e,0x60,0x27,0x2c,0x51,0x7d,0x6d,0x36,0x36,
+ 0x35,0x6b,0x85,0x89,0xe8,0xe7,0xb5,0x04,0x8b,0xa2,0xe8,0x0f,0x9b,0xca,
+ 0x84,0x76,0xc2,0xcc,0xac,0xd6,0x3c,0xcf,0x6b,0xf7,0xfe,0xc9,0xdc,0xa1,
+ 0xc0,0x05,0x00,0x94,0x65,0xa9,0x0e,0x65,0xae,0x12,0xd7,0xdf,0x50,0xee,
+ 0x4d,0xb8,0x27,0x37,0xcd,0xe1,0xd1,0xf6,0xd1,0x24,0x6a,0x8a,0xc2,0x9f,
+ 0x2f,0x21,0x88,0xc8,0xe2,0x38,0xb2,0x50,0xa3,0xce,0x63,0x3d,0xce,0x5e,
+ 0x70,0x9f,0x21,0x2e,0x6c,0x4d,0xfc,0x37,0x31,0xad,0x4f,0x4d,0xa2,0x0d,
+ 0xe1,0x14,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_table_png_len = 483;
+static const unsigned char small_table_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x75,0x49,0x44,0x41,0x54,0x28,0x15,0x05,0xc1,
+ 0x3f,0x4b,0x94,0x01,0x1c,0x00,0xe0,0xe7,0xbd,0xfb,0xe1,0x21,0x24,0xb7,
+ 0x28,0xad,0xe5,0x26,0x4e,0x4e,0x0e,0x37,0x84,0x0e,0x37,0x44,0x0d,0x12,
+ 0x45,0x9f,0xc1,0xa9,0xaf,0xd1,0x67,0x88,0x70,0x8a,0xe2,0x1c,0x8c,0x94,
+ 0x1a,0x5d,0x24,0x10,0xa2,0x3f,0x07,0xa7,0x39,0x35,0x54,0x83,0x78,0x8b,
+ 0x78,0xde,0x71,0xbd,0xef,0xef,0x7d,0x7b,0x9e,0xd0,0x7a,0xf9,0xbc,0xde,
+ 0x1d,0xf7,0x26,0x00,0x00,0x00,0xae,0x0d,0x4f,0xcf,0xf6,0x0c,0x4c,0x43,
+ 0xbb,0xde,0x7d,0xda,0xbb,0x0f,0xb6,0x75,0x1d,0x00,0x80,0x81,0x67,0x38,
+ 0xd9,0x7c,0xb0,0xe0,0xd8,0x55,0x68,0x8f,0x7b,0xf7,0x24,0xe8,0x5a,0x97,
+ 0x00,0x20,0x25,0x16,0xd9,0xb0,0xec,0x36,0xb4,0x27,0xde,0x6a,0x40,0xc7,
+ 0x8a,0x77,0x00,0xe0,0x54,0x8d,0x5f,0xb0,0xa4,0x13,0x0a,0x9e,0x48,0x70,
+ 0x88,0x1d,0x00,0xd0,0xd8,0xc1,0x57,0x08,0xed,0x50,0x90,0x12,0x40,0x02,
+ 0x80,0x94,0xa8,0xa1,0xa5,0x08,0x78,0xa4,0xab,0x83,0xbb,0x3a,0xde,0x38,
+ 0x77,0x09,0x80,0x4f,0x00,0x08,0xe8,0x5a,0xb7,0x82,0x8e,0x3b,0x58,0xb3,
+ 0x0a,0x00,0x60,0x1f,0x04,0xbc,0xf2,0x0f,0x7c,0xc0,0x36,0x00,0x38,0xf4,
+ 0x18,0x3f,0x00,0x01,0x95,0x0a,0x9c,0x5b,0x53,0x01,0x80,0x54,0x21,0x01,
+ 0x01,0x07,0x4a,0x70,0x69,0xd5,0x7b,0x00,0xf0,0x5d,0x85,0xdf,0x80,0x80,
+ 0x87,0x66,0xe0,0x33,0xfa,0x00,0x20,0xf5,0x31,0x02,0x04,0x94,0x4a,0x00,
+ 0x25,0x00,0x48,0x25,0x2a,0x40,0xc0,0x91,0x39,0x80,0x8f,0x00,0x60,0x28,
+ 0xf1,0x17,0x10,0xd0,0x37,0x01,0xdf,0xb0,0x05,0x00,0xd2,0x16,0x7e,0x02,
+ 0x02,0x52,0x02,0x48,0x00,0x50,0x4b,0x24,0x20,0x34,0xd7,0x2a,0x09,0x20,
+ 0x01,0x40,0x2d,0xcd,0x4d,0xa0,0xd6,0x84,0x66,0x78,0x7a,0xb2,0xb9,0x28,
+ 0x01,0x23,0x00,0xf0,0xc7,0xc8,0xcc,0x17,0x2e,0x54,0x32,0xe4,0xd9,0xde,
+ 0x8b,0x05,0x1b,0xc0,0x3e,0x00,0x80,0xd7,0x70,0xe1,0xc8,0x8d,0x79,0x48,
+ 0x03,0xc7,0x96,0x2d,0x09,0x2d,0x00,0x00,0x50,0xab,0xdc,0x18,0x9b,0x86,
+ 0x34,0x75,0xe5,0x56,0x47,0x5b,0x01,0x00,0x00,0x1a,0x69,0x6e,0x6a,0x1a,
+ 0x4d,0x5d,0x94,0x26,0x66,0xda,0x0a,0x05,0x00,0x00,0x68,0x34,0x52,0xca,
+ 0xff,0xf8,0x11,0x91,0x01,0x37,0xfc,0x06,0x6a,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_tabwidget_png_len = 572;
+static const unsigned char small_tabwidget_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xce,0x49,0x44,0x41,0x54,0x48,0xc7,0xd5,0x95,
+ 0xbd,0x6e,0xd4,0x40,0x10,0x80,0xbf,0x19,0xef,0xe9,0x72,0x09,0xd6,0x91,
+ 0x44,0x22,0x11,0x12,0xdd,0xb9,0x3b,0x9e,0x80,0x16,0x4a,0xa4,0x74,0x20,
+ 0x1e,0x21,0x25,0x0d,0x12,0xbc,0x48,0x0a,0xde,0x22,0x45,0x5a,0x5a,0xa8,
+ 0x10,0x12,0x1d,0xa4,0x02,0x9d,0x52,0x38,0x16,0xe0,0xe0,0x3b,0xff,0x2d,
+ 0x85,0xd7,0xbe,0x35,0x17,0x09,0x71,0x47,0x0a,0x46,0x1a,0xcd,0x78,0xbc,
+ 0xfb,0x79,0x3c,0xb3,0x1e,0x8b,0xb5,0x96,0x9b,0x10,0xe5,0x86,0xe4,0xff,
+ 0x03,0x8b,0xd3,0x00,0x30,0xce,0xfa,0x0f,0xab,0x81,0x0a,0x28,0x9d,0x6d,
+ 0xf7,0xa8,0xb7,0xd7,0x17,0xeb,0xb4,0x36,0x40,0x30,0x9d,0x4e,0x8b,0x3c,
+ 0xcf,0xf1,0x1b,0x99,0xa6,0x29,0xb3,0xd9,0x8c,0xc9,0x64,0x82,0xb5,0x16,
+ 0x11,0x41,0x44,0x7a,0xf7,0xa2,0x28,0x5a,0x59,0x0f,0x84,0x40,0x6e,0x00,
+ 0x93,0xe7,0x39,0x8f,0x8f,0xaf,0xa8,0xea,0x05,0x08,0xa8,0xc2,0xcf,0x79,
+ 0xcc,0xc9,0x0b,0x48,0x9e,0xbc,0xa6,0x0e,0x0f,0x91,0xed,0xdb,0xc8,0x60,
+ 0x08,0x40,0x9c,0xd5,0xf0,0x7c,0x9f,0x77,0x97,0x97,0xcb,0x57,0x8b,0x63,
+ 0xf6,0x1b,0x37,0x04,0x7e,0x18,0x20,0xb0,0xd6,0x52,0xd5,0x0b,0xae,0xe6,
+ 0x31,0xaa,0x20,0x0a,0x5f,0x3f,0x37,0xab,0xbe,0x7d,0xf9,0x44,0x19,0xa6,
+ 0x30,0xda,0x85,0xc1,0x56,0x13,0xfc,0x70,0x0a,0xc0,0x79,0x1c,0x77,0xe0,
+ 0xd3,0x65,0x39,0xc6,0x40,0x61,0xba,0x9a,0xba,0x4c,0x45,0x1b,0x7b,0xe7,
+ 0x1e,0xdc,0x7f,0x00,0x17,0x67,0x2f,0x19,0x8f,0xc7,0xab,0xdd,0x89,0x22,
+ 0x9e,0x7a,0x97,0x69,0x9a,0x42,0x53,0x8a,0x3d,0x20,0x33,0xdd,0xf1,0xf0,
+ 0xa0,0xa2,0xb0,0x1d,0xc2,0xc3,0x67,0x03,0xb6,0x86,0x0b,0x8c,0x49,0x50,
+ 0x05,0x0d,0xe8,0x6c,0x10,0xb8,0xf5,0x41,0xa3,0xf3,0x22,0xe6,0xd5,0x11,
+ 0x00,0x07,0x40,0xd2,0x81,0x7d,0x68,0xbb,0x19,0x29,0xc9,0xcb,0xef,0x94,
+ 0xd6,0x01,0x6a,0x07,0xb5,0xa0,0x6d,0x8c,0xc6,0x7f,0xff,0xa6,0x4b,0x7e,
+ 0x07,0x18,0xea,0x75,0x19,0xb7,0x59,0x5c,0xe7,0x07,0x81,0x17,0xf3,0xe2,
+ 0x22,0xfd,0x6f,0xa3,0x03,0x8b,0xac,0x0f,0x6d,0x93,0x72,0x92,0x01,0x45,
+ 0x2f,0xe3,0x4d,0xa0,0x1e,0xb8,0x00,0xaa,0x65,0xf3,0xda,0x1a,0xae,0x01,
+ 0xfd,0xad,0x14,0x15,0x50,0x6b,0x0f,0xbc,0x26,0x54,0xb5,0x07,0xee,0x0f,
+ 0x21,0xd9,0x04,0xaa,0xab,0x53,0xc3,0xb4,0x87,0x7b,0x9e,0xc7,0x7c,0x7c,
+ 0xeb,0x35,0xd1,0x65,0xd1,0xd6,0x4f,0x5b,0xdf,0x8b,0x89,0xb8,0x4c,0x05,
+ 0x92,0x8b,0xd5,0xe9,0xb6,0x03,0xa4,0xff,0x70,0x62,0x3e,0x02,0xce,0x8d,
+ 0x2b,0xf6,0x5d,0xa7,0xbb,0xc0,0x68,0x03,0x68,0x06,0x24,0x40,0x26,0xae,
+ 0x1c,0x23,0xe0,0x96,0xb3,0x66,0x03,0x70,0xe9,0xe0,0xe9,0x9f,0x06,0xfd,
+ 0xdf,0x4a,0xf7,0x63,0xf8,0x05,0xcf,0xaa,0x90,0x2f,0xd4,0xc0,0xa1,0x02,
+ 0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_textbrowser_png_len = 514;
+static const unsigned char small_textbrowser_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x94,0x49,0x44,0x41,0x54,0x28,0xcf,0x7d,0x93,
+ 0x31,0x48,0x42,0x51,0x14,0x86,0x0f,0x82,0x24,0x68,0x43,0x73,0x9b,0xa0,
+ 0x41,0xd0,0x5e,0xd6,0xee,0x20,0x0e,0xd1,0x62,0xad,0x0d,0x0f,0xb7,0xa0,
+ 0xa9,0xa5,0xa8,0x21,0x0b,0x0a,0x9c,0xa2,0x20,0x0a,0x03,0x1b,0xa2,0x86,
+ 0xa0,0x86,0x22,0x0c,0x49,0xc8,0x32,0x44,0x88,0x22,0x21,0x92,0x88,0xa0,
+ 0xc0,0x40,0x08,0x2a,0xa2,0xf8,0xfb,0xef,0x7d,0x0f,0xbb,0x85,0xca,0xc7,
+ 0xbd,0xe7,0x5c,0xef,0xf7,0x38,0xf7,0xf9,0xee,0x11,0x71,0xcd,0x8f,0x24,
+ 0x72,0xe3,0xb0,0x9a,0x12,0x43,0x77,0x5e,0x2c,0xe9,0x90,0x36,0x11,0x77,
+ 0x22,0x77,0x8b,0xef,0x96,0x64,0x21,0x45,0x09,0x52,0x17,0xcf,0x38,0xbe,
+ 0xf0,0xe9,0x50,0xa9,0x67,0x26,0xe7,0x10,0x48,0x48,0x3a,0x45,0xbc,0x16,
+ 0x3e,0xf0,0xee,0x30,0x54,0xcf,0x6c,0x4e,0xf4,0x9c,0x53,0x72,0x58,0xfc,
+ 0x22,0x3e,0x0b,0x6f,0x78,0xd5,0x14,0xf8,0x63,0xc1,0xc9,0x15,0x2c,0xcf,
+ 0x61,0x47,0x89,0x48,0x40,0xa4,0xdd,0xe2,0xb2,0xa6,0x99,0xc6,0x20,0x47,
+ 0xcd,0x21,0xa3,0x14,0x92,0xc1,0xb1,0x8a,0x51,0x9e,0x5a,0xc9,0x35,0x54,
+ 0x35,0x93,0x58,0x44,0x8f,0x93,0x57,0x1d,0x55,0x71,0x64,0xca,0x2f,0x78,
+ 0x22,0x45,0x2c,0x73,0xa8,0xc2,0x4f,0xff,0x38,0x30,0xe5,0x67,0x3c,0x90,
+ 0x39,0x5c,0x73,0x1e,0xc0,0x84,0x5e,0x99,0xec,0x99,0xf2,0x23,0xff,0xb2,
+ 0x0a,0xe2,0xd8,0x26,0x71,0xf4,0xeb,0x95,0xc9,0xae,0x29,0xdf,0xa3,0xcc,
+ 0xe2,0x16,0x66,0x34,0xea,0x20,0xe5,0x3f,0xec,0x98,0xf2,0x1d,0xae,0x30,
+ 0x85,0x33,0xce,0x8a,0x3e,0xe6,0x2a,0xfe,0xbe,0xe0,0x96,0x29,0x97,0x51,
+ 0xc2,0x28,0x87,0xcd,0x18,0x7a,0x75,0x4c,0x3b,0x6a,0x1a,0x9b,0xa6,0x7c,
+ 0xcd,0x97,0xea,0xc2,0x3e,0x2e,0x48,0x96,0x5f,0x51,0x30,0xab,0xf3,0x14,
+ 0xb3,0x14,0xe3,0x86,0x29,0x5f,0xe2,0xb4,0x09,0x6b,0x7a,0x5e,0x37,0xe5,
+ 0x12,0xbf,0x7e,0x2b,0x56,0xeb,0xb2,0x2f,0xa6,0x8b,0x37,0xe7,0x10,0xc9,
+ 0xfa,0xdd,0xf0,0x76,0xe7,0x93,0x58,0xc1,0x52,0x53,0x16,0x31,0x0c,0xb9,
+ 0xb1,0x6f,0x9d,0x87,0x5d,0x50,0x14,0xb4,0xe4,0x46,0x16,0xec,0xfb,0xec,
+ 0x66,0x07,0x04,0x99,0x86,0x59,0x28,0xda,0x90,0x08,0xf7,0x42,0x76,0xa7,
+ 0xb8,0xd8,0x5b,0x1d,0x7c,0xca,0xcf,0x33,0x05,0x1b,0x12,0xe0,0x5e,0xa7,
+ 0xee,0x41,0x28,0xdd,0xcd,0xc3,0x78,0xc5,0x27,0xed,0x0d,0xf1,0x71,0xcf,
+ 0x43,0xc7,0xf5,0x03,0x70,0x91,0x55,0x5a,0x29,0x33,0x10,0x51,0x00,0x00,
+ 0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_textedit_png_len = 497;
+static const unsigned char small_textedit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x83,0x49,0x44,0x41,0x54,0x28,0xcf,0x7d,0xd2,
+ 0x3d,0x6b,0x93,0x61,0x14,0xc6,0xf1,0x5f,0xfa,0xdc,0xa4,0x04,0xcc,0x56,
+ 0xf0,0x6d,0x51,0x41,0x74,0x11,0xec,0x62,0x87,0x16,0xfc,0x06,0x81,0x0a,
+ 0x8a,0xb3,0x83,0x43,0x5d,0x04,0x33,0x88,0xdf,0xc0,0x4f,0xe0,0x58,0x07,
+ 0x17,0x0b,0x6e,0x12,0x5f,0x86,0x16,0x24,0x50,0x0b,0x99,0x0a,0x06,0x3b,
+ 0xfa,0x8a,0xd0,0x2c,0x25,0x69,0x4a,0x9a,0xe7,0xc5,0x21,0x8f,0xed,0x63,
+ 0x69,0x9e,0x33,0x9c,0xe1,0x3a,0xff,0x73,0x71,0x71,0x9f,0x3b,0x98,0x79,
+ 0x7e,0x3f,0x5d,0xe9,0x2d,0x0e,0x4c,0xab,0x3d,0xdb,0x5b,0xdd,0x55,0x6b,
+ 0x86,0x41,0x94,0xae,0xdc,0x5d,0xbc,0xac,0xac,0xda,0x0b,0xb7,0xab,0x36,
+ 0xec,0x06,0x51,0x6f,0xf1,0x92,0x24,0x97,0x7f,0xb9,0x78,0x0a,0x5c,0x63,
+ 0xde,0x9c,0xfd,0x20,0x1a,0x88,0x65,0xb9,0xdc,0xf4,0xea,0x18,0x70,0x90,
+ 0xf7,0x43,0xa8,0x9b,0x0d,0x2a,0xa4,0xb9,0xf3,0x57,0x6f,0x3c,0x75,0x1d,
+ 0xf4,0x51,0xd3,0x47,0x3c,0x99,0x06,0x51,0x50,0x21,0xc9,0xe1,0x96,0x65,
+ 0x2d,0x57,0x0b,0x01,0x26,0x7a,0x0a,0x33,0x2a,0x61,0x22,0xc5,0xf9,0x68,
+ 0xc9,0x4b,0x8f,0x0a,0x70,0x5c,0x58,0xa1,0x00,0xff,0x76,0xc1,0x2d,0x4f,
+ 0x7c,0x71,0xad,0x0c,0x8e,0x8d,0xf1,0x51,0x43,0xdd,0x92,0xf7,0xae,0x1c,
+ 0xc1,0xe3,0x42,0x3f,0x82,0x63,0x7c,0xd3,0xc5,0x0d,0x9f,0x3c,0x2c,0x77,
+ 0x3e,0xf4,0x47,0xaa,0x8b,0xf3,0x5e,0xf8,0xee,0x5c,0x3e,0x3e,0x2c,0xac,
+ 0x14,0x32,0xaf,0x7b,0xe0,0x0c,0x78,0x67,0xdd,0xbd,0xe9,0xce,0x63,0x63,
+ 0x3f,0xcd,0xe6,0xd9,0x16,0x7c,0xb0,0xfc,0x5f,0xe6,0x13,0xce,0xaf,0xb5,
+ 0xdd,0x71,0x16,0xfb,0x7e,0xf8,0xac,0xe5,0x19,0x3a,0x6e,0xa2,0x73,0x12,
+ 0x6e,0x68,0xe4,0x3e,0x55,0x4d,0x4d,0x6c,0x62,0x9c,0xf7,0x13,0xef,0x9c,
+ 0x94,0xfe,0xba,0x63,0x38,0xdb,0xfb,0x77,0xfd,0x29,0x35,0x32,0x98,0xdc,
+ 0x3c,0x0b,0xb2,0xed,0xad,0xf6,0x42,0xad,0x04,0x3f,0xd0,0x61,0x47,0x2c,
+ 0x09,0x92,0xee,0xea,0xe3,0xaa,0xf9,0xd2,0x1c,0x3b,0xde,0xea,0x1b,0x05,
+ 0x89,0x35,0x1b,0xe6,0xd4,0x05,0x33,0xa7,0xa2,0xa9,0x58,0x5f,0xcf,0x30,
+ 0x48,0x0c,0xed,0xda,0x37,0x2b,0x52,0x39,0x15,0xce,0x24,0x46,0x86,0x86,
+ 0x21,0x4b,0x2b,0x63,0x03,0x07,0x22,0x95,0xa9,0x70,0x26,0x91,0x48,0xfe,
+ 0x02,0x5a,0x81,0x9f,0x13,0x68,0xe3,0xbf,0x39,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_textview_png_len = 498;
+static const unsigned char small_textview_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x04,0x00,0x00,
+ 0x00,0x6e,0xbd,0xa4,0xb0,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0x84,0x49,0x44,0x41,0x54,0x28,0xcf,0x7d,0xd2,
+ 0xbf,0x6b,0x14,0x51,0x14,0xc5,0xf1,0xcf,0xcc,0xec,0x92,0x6c,0x30,0x45,
+ 0x24,0x2a,0x92,0xc6,0xca,0x2e,0x85,0x82,0x08,0xa6,0x11,0x2c,0x44,0x30,
+ 0x60,0x69,0x63,0xab,0xa0,0x6d,0xfe,0x87,0x20,0x58,0x69,0x69,0x21,0x36,
+ 0x49,0x30,0xa6,0xb1,0xb0,0xb0,0x52,0xb2,0x20,0x0b,0x21,0x45,0x50,0x31,
+ 0x20,0xd8,0x88,0x82,0x2e,0x64,0x63,0xd6,0x95,0x64,0x7e,0x59,0xec,0xb8,
+ 0xcc,0x64,0x93,0xbd,0xa7,0x79,0xf7,0xbe,0x2f,0x87,0x73,0x1f,0x2f,0x10,
+ 0x3e,0xbc,0x9d,0xdd,0x6f,0xcf,0x75,0x1d,0x57,0xbb,0xb6,0x5a,0x9f,0x9e,
+ 0x79,0xa1,0x47,0x7d,0xb1,0xf9,0x25,0x4f,0x47,0xea,0x5d,0x6e,0xd3,0x79,
+ 0x53,0x35,0x51,0x7b,0xee,0x9c,0xb4,0xe4,0xf4,0xdb,0x9e,0x99,0x8a,0x77,
+ 0x83,0x0b,0xa6,0xfd,0x09,0x45,0x5d,0x89,0xb4,0xa4,0x15,0x0b,0x95,0x3e,
+ 0x75,0x00,0x93,0xc6,0x42,0x01,0x99,0xa4,0xa4,0xa7,0xd6,0x7c,0xa8,0x4c,
+ 0x52,0xa8,0x89,0x42,0x81,0x8a,0xcb,0x7b,0x53,0x58,0xae,0xcc,0x32,0x08,
+ 0x05,0x21,0xa4,0x25,0x97,0xd7,0x1e,0x9b,0xb5,0x6c,0xe7,0xb0,0x33,0x0e,
+ 0xc1,0x3b,0xbe,0x3a,0xed,0x8e,0x1f,0x56,0x8f,0x83,0x13,0x71,0xa1,0x35,
+ 0xd7,0xc5,0x6e,0x3a,0xeb,0xf9,0x60,0x16,0x8b,0xab,0xf0,0x7f,0x35,0xdd,
+ 0x90,0x68,0xb8,0xe5,0xa3,0xd6,0x90,0x73,0xad,0x0f,0x1f,0x80,0x75,0x1b,
+ 0x1e,0x80,0x0e,0x5e,0x9a,0x2d,0xa0,0xa4,0x0c,0xa7,0x45,0xfb,0xc6,0x92,
+ 0x33,0xc5,0xc5,0x82,0x15,0x77,0x8b,0xae,0x92,0xb9,0x9f,0xeb,0x9b,0xcc,
+ 0xc9,0x41,0xca,0xab,0x78,0x55,0x9c,0x93,0xe1,0xd7,0x78,0xeb,0x62,0x29,
+ 0xfd,0x35,0x2c,0x0d,0xba,0x0a,0x1c,0x5b,0xb5,0x68,0xdb,0xf7,0xc2,0xab,
+ 0x63,0x1d,0x3f,0x3d,0xd1,0x11,0x57,0x17,0x4c,0xa5,0xe6,0xcd,0x97,0xf2,
+ 0x8d,0xbb,0xa4,0x59,0x20,0x69,0x09,0xce,0x77,0x4b,0x8f,0x73,0x54,0xed,
+ 0xeb,0x42,0x26,0xaf,0xc9,0xb7,0x5a,0xcd,0xcb,0x8d,0x11,0xf8,0x5f,0x1b,
+ 0x6c,0xf7,0x1d,0xc7,0xdd,0xb3,0x29,0x1f,0xa9,0xcf,0x1e,0xb9,0x62,0x26,
+ 0x50,0x77,0xc2,0x29,0xd3,0x26,0xd5,0xfa,0xeb,0x0e,0x55,0x26,0xb1,0xa7,
+ 0xed,0x57,0x20,0x54,0x37,0x61,0xc2,0x98,0x48,0x70,0x24,0x9c,0x4b,0xed,
+ 0xeb,0xe9,0x05,0xb9,0x20,0x14,0x89,0x44,0x82,0x63,0xe1,0xbc,0xff,0xb1,
+ 0xff,0x01,0x08,0xb2,0x0b,0x7e,0xbc,0x39,0x06,0x4b,0x00,0x00,0x00,0x00,
+ 0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_timeedit_png_len = 1520;
+static const unsigned char small_timeedit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x05,0x82,0x49,0x44,0x41,0x54,0x48,0xc7,0x4d,0x95,
+ 0xcb,0x6f,0xdc,0x57,0x15,0xc7,0x3f,0xf7,0xf7,0x9a,0xd7,0x6f,0x5e,0xf6,
+ 0x78,0x3c,0xb6,0xe3,0x78,0xfc,0xea,0xd8,0x49,0x5c,0x9a,0xc4,0xb5,0x84,
+ 0x69,0x2a,0x68,0xdc,0x22,0x45,0xe2,0xa1,0x22,0x21,0x60,0xc5,0x06,0x76,
+ 0x48,0x48,0x2c,0x90,0xd8,0xb2,0x40,0x82,0x7f,0x00,0xb1,0x45,0x42,0x42,
+ 0x82,0x82,0x84,0xa8,0x90,0x50,0xa1,0x34,0x4d,0x20,0x35,0x4a,0x6b,0xb7,
+ 0xb1,0x1d,0xdb,0x93,0xc4,0x19,0xdb,0xf3,0xf0,0xcc,0x78,0xde,0x8f,0xdf,
+ 0xeb,0xb2,0xe8,0xcf,0x28,0x57,0xba,0xba,0x47,0x67,0xf1,0xd1,0x39,0xe7,
+ 0x9e,0x73,0xbe,0x42,0x4a,0xc9,0xc5,0x11,0x42,0x28,0x23,0x99,0x49,0xa5,
+ 0xd3,0x6c,0xc6,0xa7,0x66,0x73,0x57,0x26,0xe6,0x96,0x57,0x6d,0xa9,0xce,
+ 0xda,0x9e,0x48,0x59,0xae,0xcb,0x70,0x60,0x75,0xac,0x5e,0xeb,0xe4,0xfc,
+ 0xd9,0xa3,0x9d,0xee,0x79,0x29,0x2f,0x5d,0xa7,0x0a,0xb2,0x03,0xf4,0x81,
+ 0xa1,0x94,0xd2,0xfb,0x3f,0xeb,0x02,0x2c,0x84,0xd0,0x03,0xe1,0x48,0x78,
+ 0x26,0xb7,0x72,0xe3,0xda,0xfa,0x9b,0xdf,0x37,0x93,0x93,0x1b,0x42,0x38,
+ 0xe9,0x64,0x54,0xd3,0xe2,0xb1,0x10,0x9e,0x07,0xf5,0x8e,0xc3,0xe3,0xf2,
+ 0xc0,0x29,0x94,0x9b,0xd5,0xd6,0xf3,0x9d,0xcd,0xda,0xa3,0x7f,0xfe,0xd5,
+ 0xaa,0x97,0xb7,0x90,0x6e,0x09,0xa8,0x01,0x3d,0xc0,0x93,0x52,0x4a,0x01,
+ 0x08,0x40,0x33,0xe3,0x23,0xf1,0x57,0x6f,0x7f,0xed,0x9b,0x57,0xd7,0xde,
+ 0xf8,0x89,0x6b,0x75,0x97,0x66,0xc7,0x3d,0x6e,0xad,0x66,0x18,0x1f,0x8b,
+ 0xe2,0x0c,0x2d,0x62,0x66,0x10,0x3d,0x68,0x50,0xa8,0xf4,0x79,0x7f,0xab,
+ 0xc1,0x1f,0x3e,0x6a,0xb1,0xb7,0x9f,0x3f,0x6a,0x3e,0xfc,0xcb,0x1f,0xed,
+ 0xe2,0xfe,0x7b,0xb8,0xce,0x21,0x50,0x02,0xba,0x80,0xa7,0x02,0x8a,0x11,
+ 0x08,0x47,0xd7,0xbf,0xfa,0xf6,0xdb,0xaf,0xbc,0x7e,0xe7,0xe7,0xb2,0x5f,
+ 0xc9,0x6e,0xac,0x86,0x79,0xeb,0x4b,0x33,0xcc,0xcf,0xa4,0x19,0x8d,0x47,
+ 0xb8,0xff,0xdf,0x22,0xf9,0x13,0x87,0xec,0x74,0x9c,0x91,0x08,0x7c,0x71,
+ 0x39,0xce,0xea,0x62,0x8c,0xe7,0xed,0x60,0xe2,0xc8,0x49,0xe7,0x68,0x95,
+ 0x86,0x6e,0xbb,0x7e,0xee,0x43,0x7b,0x3e,0x58,0xa8,0x73,0x2b,0x37,0xd6,
+ 0x5e,0xbb,0xf3,0xbd,0x5f,0xb8,0xbd,0xca,0xcc,0xb7,0x36,0xc6,0x79,0xe3,
+ 0xb5,0x1c,0x3b,0xbb,0x25,0x86,0x03,0x8b,0xf4,0x78,0x8c,0x3f,0xdd,0xef,
+ 0xf1,0xcb,0x77,0xda,0x5c,0x4e,0x7a,0x0c,0x1a,0x67,0xa8,0xba,0xc1,0xf2,
+ 0x7c,0x86,0xf5,0x65,0x93,0xbd,0x12,0xa1,0x67,0x6d,0xe3,0x92,0x57,0xd9,
+ 0xaf,0x49,0x7b,0x58,0xf5,0x4b,0xe2,0xa8,0x81,0x50,0x24,0xf1,0xd6,0x77,
+ 0x7e,0xf8,0x53,0x23,0x14,0xbc,0x7d,0x73,0x5e,0xf2,0x95,0xf5,0x05,0x6c,
+ 0xdb,0x23,0x95,0x32,0x19,0x19,0x35,0x31,0x8c,0x10,0xbb,0x47,0x03,0x8e,
+ 0x8a,0x3d,0xbe,0xbd,0x91,0xe2,0x0b,0xcb,0x29,0xa2,0xf1,0x10,0xf5,0x7a,
+ 0x8b,0x54,0xcc,0xe0,0xca,0x74,0x98,0x0f,0x0f,0xbc,0x68,0xa3,0x56,0x33,
+ 0x9c,0x5a,0xe1,0x29,0x70,0x04,0x58,0xca,0xe4,0x5c,0xee,0x6a,0x3a,0x9b,
+ 0x7b,0xd3,0x90,0x0d,0x6e,0xad,0xcd,0xf0,0xf0,0xe3,0x02,0xc5,0x72,0x83,
+ 0x64,0x32,0x41,0x24,0x12,0x06,0x5c,0x7a,0x7d,0x1b,0xd7,0x95,0x04,0x0c,
+ 0x0d,0xd3,0x4c,0xa2,0xeb,0x1a,0x9f,0xee,0x9c,0x70,0x90,0xaf,0x70,0x7d,
+ 0x21,0xc9,0x77,0x5f,0x9f,0x40,0xcb,0x5c,0x59,0x12,0x21,0xf3,0x2a,0x60,
+ 0x02,0x86,0x32,0xfd,0xd2,0xcb,0xab,0xb6,0xa7,0x8d,0x5f,0x9b,0x8b,0x32,
+ 0x37,0x33,0xc6,0xe2,0x42,0x9a,0xf4,0x58,0x0c,0x70,0x00,0x89,0xeb,0x49,
+ 0xaa,0x2d,0x87,0x81,0x07,0x48,0x09,0x58,0x48,0x0f,0x16,0x66,0xd3,0x64,
+ 0x32,0x09,0x40,0xe5,0xcb,0x2f,0x27,0x59,0x98,0x99,0x88,0x29,0x91,0x91,
+ 0x45,0x20,0x02,0xe8,0x8a,0xd0,0x83,0xd9,0xee,0xc0,0x52,0x2f,0x65,0x4c,
+ 0x2a,0x67,0x2d,0x74,0x5d,0x65,0x24,0x19,0x05,0x3e,0x6f,0xc3,0x56,0xcf,
+ 0xe1,0xf0,0x78,0x80,0x6d,0x7b,0x18,0x01,0x01,0x80,0xae,0x69,0x5c,0x9a,
+ 0x4a,0x70,0x7e,0xde,0xa5,0xd5,0x6e,0x72,0x39,0x13,0x66,0xe9,0x72,0x5c,
+ 0xa0,0x47,0x52,0x40,0x10,0xd0,0x35,0x50,0xc7,0x86,0xae,0x44,0xe2,0x71,
+ 0x72,0x5a,0xc7,0x91,0x2a,0xa9,0x54,0x14,0x45,0x51,0x00,0x50,0x15,0x18,
+ 0x8b,0xa9,0x14,0x23,0x2a,0x66,0x48,0x03,0x54,0x40,0xd2,0xed,0x59,0x1c,
+ 0x3c,0xa9,0xa0,0xa9,0x92,0x54,0x26,0xc5,0x68,0x34,0x88,0xa6,0x05,0x42,
+ 0x2e,0xe8,0x80,0xaa,0xd8,0xae,0x27,0xfa,0x43,0x17,0x50,0x99,0x9b,0x9b,
+ 0x62,0x39,0x37,0xe1,0x43,0x25,0xe0,0x11,0x0d,0xeb,0xdc,0xba,0x91,0xa0,
+ 0xd1,0xf6,0xf8,0xdd,0xbb,0x55,0x8a,0xe7,0x7d,0x40,0x21,0x1e,0x0b,0x73,
+ 0xf3,0x7a,0x96,0x74,0x7a,0x04,0xc7,0xf1,0x50,0x91,0xa8,0x38,0x2a,0xa0,
+ 0x00,0x8a,0xd6,0xed,0x75,0x5a,0x03,0xc7,0xa3,0x3d,0x54,0x88,0x45,0x83,
+ 0x1c,0x15,0xaa,0xf4,0xfa,0x43,0xd2,0xa9,0x28,0x20,0x10,0x28,0x4c,0x8f,
+ 0x1b,0x24,0xc2,0x82,0x9f,0xfd,0xf6,0x84,0x7f,0x6c,0x37,0xf9,0xc1,0x9d,
+ 0x34,0xaf,0xcc,0x09,0xd2,0xa9,0x20,0xe1,0x70,0x98,0x6a,0xa9,0x49,0xab,
+ 0xd9,0x45,0xb8,0x96,0x7d,0x31,0xd2,0x4a,0xab,0x51,0x3d,0xb1,0x85,0x70,
+ 0x37,0x0f,0x3a,0x34,0x9b,0x6d,0x9e,0x1c,0x96,0x69,0xd4,0xbb,0x7e,0xa9,
+ 0x14,0xc0,0x61,0xe9,0x72,0x88,0x5f,0xfd,0x28,0xcb,0xaf,0x7f,0x9c,0x45,
+ 0x51,0x74,0xfe,0x7c,0xaf,0xc5,0x83,0x87,0xa7,0x9c,0x1e,0x37,0x00,0x8f,
+ 0xe3,0xd2,0x80,0xe7,0xc7,0x55,0xe9,0xf4,0x5b,0x5d,0x3f,0x55,0xa9,0x9d,
+ 0x1d,0x6c,0xef,0x64,0x6e,0xd6,0xce,0xfe,0xd3,0xd7,0x33,0x5b,0xf9,0x73,
+ 0xd6,0xd6,0xe6,0xb0,0x1d,0x97,0x52,0xa9,0x8a,0xae,0x0b,0x46,0x47,0x4d,
+ 0x12,0xa6,0xc1,0xab,0xcb,0x41,0xae,0x2f,0x04,0x59,0x9e,0xf0,0x10,0x9a,
+ 0xc1,0x64,0x32,0x41,0x66,0x2c,0x82,0x65,0xbb,0xfc,0x7b,0xab,0x44,0xb1,
+ 0xf0,0xb4,0x3f,0x6c,0xd7,0x2b,0x80,0x0b,0x78,0x4a,0xf7,0xbc,0x9c,0x3f,
+ 0xdd,0xdb,0x7c,0x50,0xb2,0x82,0xfc,0xe6,0xbd,0x33,0x5c,0x45,0x23,0x12,
+ 0x32,0xd8,0xfa,0xf4,0x88,0xc2,0x71,0x1d,0xcb,0xb2,0x39,0xcc,0x17,0xa9,
+ 0x54,0x6a,0xb4,0x3b,0x7d,0x86,0x8d,0x1a,0x53,0x71,0x8b,0xf9,0x6c,0x8a,
+ 0x48,0xc4,0xe4,0x5f,0x0f,0xca,0xdc,0xdf,0xcc,0x73,0xfa,0x64,0xbb,0x8c,
+ 0x33,0x2c,0x01,0x16,0xe0,0xa8,0x48,0x2f,0xd0,0x3b,0xaf,0x48,0x25,0x95,
+ 0x5d,0x79,0x3a,0x88,0x27,0x6a,0x95,0x26,0xab,0xb9,0x38,0x2f,0xcd,0xc4,
+ 0x49,0x8e,0x98,0xb8,0x9e,0x64,0x67,0xb7,0x88,0xed,0xb8,0x4c,0x4d,0x24,
+ 0x88,0xc5,0x03,0xa4,0x52,0x51,0x74,0xdd,0xe0,0x83,0x8f,0xca,0xfc,0xfe,
+ 0xdd,0x5d,0x3e,0xbc,0xfb,0x7e,0xab,0x72,0xb0,0xb5,0x2d,0x3d,0xe7,0x33,
+ 0x60,0x07,0x68,0xaa,0x80,0xea,0x0d,0xfa,0xb6,0xd3,0xae,0xa1,0x25,0xa7,
+ 0x72,0x5b,0x55,0x3d,0xbc,0x93,0xaf,0x93,0x9d,0x30,0x99,0x9d,0x8c,0x13,
+ 0x08,0xe8,0x64,0x2f,0x27,0x98,0xc8,0x24,0x51,0xb5,0x20,0xa6,0x19,0xa2,
+ 0xd1,0x72,0xf9,0xdb,0xdd,0x13,0xde,0xf9,0xfb,0x2e,0x1f,0xdc,0xbd,0xd7,
+ 0x7f,0xf6,0xc9,0xbd,0x47,0xde,0xb0,0xf3,0x08,0xd8,0x05,0xf2,0x40,0x5b,
+ 0x00,0x21,0x60,0x1c,0x55,0xcb,0x05,0xc7,0xe7,0xbf,0x1e,0xbe,0x76,0xfb,
+ 0x1b,0x24,0x66,0xa6,0xd2,0x51,0x85,0xdb,0xcb,0x31,0x6e,0xad,0x8c,0x92,
+ 0x8c,0x06,0x3e,0x9f,0x42,0x5b,0x72,0x52,0xee,0xf1,0xc9,0xe3,0x33,0x1e,
+ 0xe7,0x0b,0xec,0x6f,0x7f,0xdc,0x2a,0xee,0x6d,0xee,0xd9,0xbd,0xe6,0x36,
+ 0x70,0x71,0xf7,0x81,0x86,0xf0,0xbf,0x3e,0x02,0x4c,0x20,0xc4,0x82,0x1a,
+ 0x8e,0xaf,0x07,0xa7,0x57,0x36,0x8c,0xc9,0xc5,0x25,0x2d,0x94,0x88,0x05,
+ 0x54,0x4d,0x04,0x34,0x05,0xd5,0x73,0x10,0xae,0x83,0x90,0x3d,0x3a,0xd5,
+ 0xd3,0xde,0xd9,0xd1,0x6e,0xd9,0xae,0x14,0x0e,0x3d,0xd7,0x3a,0xf0,0x61,
+ 0xbb,0xc0,0x13,0xe0,0x0c,0xe8,0x09,0x29,0x25,0x42,0x08,0xcd,0x8f,0x7c,
+ 0x0c,0x98,0x02,0xb1,0x28,0x02,0xc1,0xab,0x4a,0x2c,0xbd,0x88,0x16,0x1a,
+ 0x55,0x54,0x25,0x8c,0xeb,0x2a,0xae,0x33,0xb4,0xbd,0x7e,0xa7,0x4b,0xbf,
+ 0x51,0xc5,0x75,0x8a,0xc0,0x29,0x50,0xf0,0x37,0x5a,0xf1,0x05,0x15,0xb1,
+ 0x2f,0xc0,0x17,0x91,0xeb,0x40,0xc0,0xcf,0xc0,0xf4,0xdf,0xa0,0xef,0x57,
+ 0xfc,0xde,0x97,0x7e,0x4b,0x59,0xc0,0xe0,0x85,0xe5,0xde,0x03,0x86,0x80,
+ 0x0d,0x78,0x2f,0x6a,0xde,0x85,0x4c,0xa9,0x80,0x06,0x18,0x3e,0x50,0xf7,
+ 0x7d,0x2f,0x82,0x3d,0x7f,0xfd,0x39,0x3e,0xc8,0xf6,0x6d,0xef,0x42,0xf3,
+ 0xfe,0x07,0xd9,0x3f,0x88,0x22,0xef,0xd9,0x4f,0x79,0x00,0x00,0x00,0x00,
+ 0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_timer_png_len = 1462;
+static const unsigned char small_timer_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,
+ 0x48,0x59,0x73,0x00,0x00,0x0b,0x0e,0x00,0x00,0x0b,0x0e,0x01,0x40,0xbe,
+ 0xe1,0x41,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd3,0x09,0x02,
+ 0x0f,0x2b,0x1c,0x96,0x4a,0x88,0xc0,0x00,0x00,0x05,0x43,0x49,0x44,0x41,
+ 0x54,0x78,0xda,0x75,0x95,0x4d,0x6c,0x5c,0x57,0x15,0x80,0xbf,0xf7,0x33,
+ 0x6f,0xc6,0xf6,0x8c,0x67,0xec,0xf9,0xc9,0x58,0xfe,0x1b,0x3c,0x89,0x6b,
+ 0x2c,0xbb,0x44,0x6d,0x8a,0x4b,0x70,0x68,0xa3,0x62,0x51,0x81,0xac,0x34,
+ 0x2a,0x15,0x15,0x42,0xa8,0x84,0x0a,0x76,0x41,0x54,0x15,0x5b,0x76,0xac,
+ 0x58,0x20,0x24,0xab,0x2a,0x0b,0x58,0x20,0x28,0x88,0xb2,0x69,0x8a,0x0c,
+ 0x24,0xc2,0x45,0x2e,0x25,0xfc,0xb4,0xc8,0x4e,0x88,0xc1,0x96,0x13,0xcf,
+ 0xc4,0xf6,0x78,0xfe,0x3a,0x33,0x1e,0x7b,0xde,0xbc,0xf7,0xee,0xbd,0x8f,
+ 0x45,0x6c,0xcb,0x8e,0xc2,0x91,0x8e,0x74,0xcf,0xb9,0x47,0x9f,0xce,0x3d,
+ 0x3f,0xba,0xda,0xd8,0xd8,0x18,0x07,0x92,0x38,0x9b,0x8d,0xfd,0xb4,0xc3,
+ 0x32,0x66,0x5d,0xa1,0xb0,0x1d,0x51,0xba,0x93,0x6f,0x7e,0x1e,0xb8,0xc5,
+ 0xa3,0x65,0xf2,0xfc,0x78,0xfc,0x86,0xa1,0x93,0xf2,0x81,0xdd,0x96,0xb8,
+ 0xb6,0x7c,0xb7,0x71,0x05,0xa8,0x00,0x98,0x87,0x51,0x13,0x99,0xee,0x37,
+ 0xaf,0x5e,0xca,0xce,0xf6,0x84,0x03,0x94,0xea,0x2e,0xab,0x9b,0xcd,0xd4,
+ 0x9d,0x7c,0xf3,0x0a,0xf0,0xdd,0xff,0x03,0xbe,0xf2,0x9d,0x17,0xce,0xa4,
+ 0xd2,0xbd,0x41,0x5c,0xe1,0x73,0x27,0xb7,0x3b,0x3b,0x77,0x6d,0xfd,0xcd,
+ 0xd5,0xcd,0xe6,0x8b,0x87,0xe0,0xc4,0x44,0xa6,0xfb,0x27,0xdf,0xff,0xda,
+ 0xf8,0x0b,0x86,0x06,0xc5,0x9a,0x43,0x75,0xd7,0xa5,0xaf,0x37,0xf4,0x27,
+ 0xe0,0x8f,0x4f,0x9c,0x8e,0x2d,0x9a,0x86,0x3e,0xe1,0x03,0xbe,0x0f,0xe0,
+ 0xe3,0x49,0xff,0xf6,0xd2,0x7a,0xfd,0x07,0x86,0xce,0x99,0xfd,0xb6,0x7c,
+ 0xc6,0x76,0x45,0x38,0xda,0x65,0xf2,0x8d,0x99,0xe1,0xcb,0x6f,0xbc,0xbb,
+ 0xfe,0xdb,0x7c,0xd9,0xfe,0xb6,0xf6,0xf2,0x97,0x9e,0x7e,0xe7,0xea,0xa5,
+ 0xec,0x6c,0xac,0x2b,0x40,0xb9,0xe1,0x52,0xac,0xb7,0xb7,0x96,0xef,0x35,
+ 0x6e,0xdd,0xba,0xb7,0xeb,0x7d,0x71,0x2a,0x3d,0xfb,0xdc,0xd9,0x14,0x89,
+ 0xee,0x20,0xca,0xf7,0x51,0xca,0x47,0xf9,0x50,0xac,0xb7,0x59,0x58,0x2a,
+ 0xf3,0xbb,0xbf,0x15,0x7e,0xf3,0xd9,0xf1,0x84,0x7d,0xf1,0xf1,0xe4,0x73,
+ 0x8e,0x27,0xfb,0x9b,0xb6,0x60,0xbd,0xb0,0xc7,0xfc,0x3f,0x76,0xae,0x99,
+ 0x86,0xae,0x4d,0xe8,0xba,0x46,0xa9,0xee,0x50,0x6a,0x38,0x5b,0x37,0xfe,
+ 0x55,0x7a,0xe3,0xdc,0x68,0xef,0xeb,0xaf,0x7c,0x61,0x24,0x96,0x4a,0x0f,
+ 0xa0,0xc5,0x46,0xd1,0x7a,0xc6,0xf0,0xad,0x18,0xad,0x56,0x8b,0x80,0xda,
+ 0x27,0x55,0x5d,0xe1,0x72,0x62,0x95,0xf3,0xe3,0xc9,0x97,0x16,0x97,0x4b,
+ 0xf5,0x5f,0xfd,0xf9,0xfe,0x0f,0x9f,0x99,0x8c,0x7f,0xcb,0x76,0x55,0xbf,
+ 0xae,0x21,0x0c,0x5d,0x1b,0x37,0x3c,0x3d,0xfc,0x87,0xea,0xae,0x33,0x7d,
+ 0xbf,0x62,0xb7,0x3f,0x5a,0xab,0xff,0xec,0xe9,0xf1,0xf8,0x6b,0x5f,0xb9,
+ 0x38,0x12,0x0b,0x0f,0x7e,0x9a,0xfd,0xd4,0x0c,0xc4,0x3f,0x85,0xd9,0x95,
+ 0xc2,0x37,0x3a,0x58,0xfa,0xf7,0x1a,0xe9,0xcc,0x38,0x6e,0x68,0x88,0xb6,
+ 0xd5,0x4f,0x38,0xa8,0x91,0x8d,0xb7,0x43,0xc5,0x5a,0xeb,0x89,0x1b,0x1f,
+ 0x15,0x7f,0x54,0xae,0x39,0x03,0xb7,0x73,0xcd,0xbb,0x77,0x77,0x5a,0x2f,
+ 0x9b,0xc0,0x7f,0x16,0x6f,0x57,0x2f,0x01,0xe7,0xbf,0xf9,0x7c,0xe6,0xc7,
+ 0x97,0xa7,0x33,0x31,0xbd,0xff,0x59,0xcc,0xfe,0x0b,0x84,0xa4,0x41,0x3e,
+ 0x9f,0x27,0x93,0xc9,0x20,0xa5,0x64,0x7e,0x7e,0x9e,0xc9,0xc9,0x49,0x0a,
+ 0x85,0x02,0xa9,0xd4,0x29,0xb4,0xae,0x19,0x74,0xbd,0x93,0x99,0x27,0x45,
+ 0xac,0xb1,0xe7,0xbd,0xf6,0xf6,0xe2,0xe6,0x55,0xe0,0x03,0x20,0xaf,0x1f,
+ 0x74,0x38,0xff,0xd8,0x40,0xe4,0xdc,0xd9,0x6c,0x2c,0x69,0xc6,0x3f,0xc9,
+ 0x7e,0xf8,0x2c,0x6d,0xa1,0x63,0x18,0x06,0x43,0x43,0x43,0x08,0x21,0x90,
+ 0x52,0x52,0xab,0xd5,0x10,0x42,0xd0,0xd7,0xd7,0x87,0xa6,0x69,0xb8,0x52,
+ 0xa7,0xdd,0x3d,0x89,0xd1,0x93,0x65,0x6c,0x30,0x9c,0xcc,0xa4,0xbb,0xce,
+ 0x01,0x79,0x80,0x43,0x70,0x67,0x32,0x6a,0xbd,0x3a,0x99,0x4d,0x62,0x0c,
+ 0x5c,0xc4,0x08,0x76,0x91,0xcf,0xe7,0x8f,0x80,0x52,0x4a,0x84,0x10,0xf8,
+ 0xbe,0x7f,0x74,0x96,0x52,0x52,0x2a,0x95,0xd0,0x03,0x1d,0x98,0xe9,0xcf,
+ 0x70,0x66,0xb0,0x97,0xde,0x70,0xe0,0x55,0xa0,0xf3,0x38,0x78,0xee,0xf5,
+ 0x97,0x1e,0x8b,0xfa,0xdd,0x59,0x7c,0xab,0x07,0xd3,0x34,0x19,0x18,0x18,
+ 0x40,0x08,0x71,0x42,0x7d,0xdf,0x3f,0x82,0x0a,0x21,0x88,0xc7,0xe3,0xe8,
+ 0xba,0x8e,0x0a,0x44,0xf1,0xc3,0x43,0x7c,0x7d,0x66,0x38,0x0a,0xcc,0x9d,
+ 0x58,0x10,0xa9,0x14,0x84,0x92,0x08,0x74,0x7c,0x29,0x51,0x4a,0x9d,0x50,
+ 0x79,0xe0,0x93,0x8f,0xba,0xf3,0x35,0x7c,0xab,0x07,0x29,0xfd,0xa3,0xed,
+ 0x39,0x02,0x7b,0xc2,0x47,0x68,0x1d,0x6c,0xac,0xad,0xe3,0xba,0x2e,0x83,
+ 0x83,0x83,0x04,0x02,0x01,0x94,0x52,0xf8,0xbe,0x4f,0x2e,0x97,0xa3,0xd9,
+ 0x6c,0x52,0xad,0x56,0x89,0x44,0x22,0x28,0xa5,0xb0,0x6d,0x9b,0x5c,0x2e,
+ 0x87,0x69,0x9a,0x24,0xb4,0x20,0xe2,0x51,0x60,0xa1,0x7c,0x84,0xe7,0x30,
+ 0x3c,0x3c,0xf4,0x60,0x11,0x1e,0xca,0x6e,0x71,0x71,0x91,0xe9,0xe9,0xe9,
+ 0x23,0xbf,0x94,0x12,0xd3,0x34,0xc9,0x64,0x32,0xf8,0x4a,0xb1,0x9f,0xcf,
+ 0xe1,0x3d,0x12,0x2c,0x7c,0x9c,0x66,0x11,0xdd,0xb5,0x71,0x5c,0x85,0xae,
+ 0x3f,0x28,0xbf,0x52,0x8a,0x95,0x95,0x15,0x52,0xa9,0x14,0x53,0x53,0x53,
+ 0x07,0xb1,0x02,0xa5,0x14,0x42,0x08,0x5c,0xd7,0xc5,0xd0,0x7d,0xda,0x7b,
+ 0x15,0x84,0x54,0x47,0xe0,0xc3,0xe6,0xbd,0xb5,0xb0,0x54,0xb2,0xdb,0xd5,
+ 0x0d,0xec,0x66,0x9d,0x72,0xb9,0x8c,0xe7,0x79,0x48,0x29,0x69,0xb5,0x5a,
+ 0x5c,0xbf,0x7e,0x9d,0x91,0x91,0x91,0x07,0xbd,0x38,0x36,0x15,0x9e,0xe7,
+ 0x51,0x2e,0x97,0x69,0x35,0x1b,0xb4,0xeb,0x9b,0x7c,0xb8,0x5a,0xb3,0x81,
+ 0xb7,0x00,0x8c,0x44,0x22,0x01,0xb0,0xee,0x08,0xf5,0xe2,0xc4,0x40,0xa8,
+ 0xcf,0x0a,0x75,0x10,0x49,0x9d,0x06,0x4d,0xc7,0x71,0x1c,0x00,0x46,0x47,
+ 0x47,0x89,0x46,0xa3,0x47,0xa5,0x39,0xcc,0x54,0xd7,0x75,0xac,0x80,0x49,
+ 0x7b,0x67,0x99,0xea,0xd6,0x2a,0x0b,0x4b,0xe5,0xdb,0xf5,0x3d,0xef,0x7b,
+ 0xc7,0xc1,0x54,0x1a,0xee,0x7f,0xbb,0x3b,0xcd,0x57,0x06,0x23,0x2d,0xf4,
+ 0x8e,0x24,0xca,0x08,0x53,0xd8,0xd9,0xc1,0xb2,0x2c,0x82,0xc1,0x20,0x95,
+ 0x4a,0x85,0x60,0x30,0x88,0x52,0x0a,0xc7,0x71,0x0e,0x6c,0x0b,0x6f,0xf7,
+ 0x3e,0xbb,0x1b,0x7f,0xe1,0xef,0x2b,0x65,0xfe,0xb9,0x56,0xfb,0x2a,0xb0,
+ 0x71,0x02,0x0c,0x54,0x1a,0xfb,0x5e,0x64,0x38,0x69,0x3d,0x69,0x79,0x25,
+ 0x9d,0x40,0x17,0xa1,0xee,0x24,0x86,0x19,0x40,0x4a,0xc9,0xd6,0xd6,0x16,
+ 0xd1,0x68,0x14,0xa5,0x14,0x9a,0x06,0xa6,0x69,0xe0,0x7e,0xbc,0x41,0xe3,
+ 0xee,0xfb,0x6c,0xef,0x54,0xc5,0x7b,0xcb,0xe5,0xb9,0xfd,0xb6,0xf8,0x39,
+ 0xe0,0x3e,0x0c,0x76,0x77,0x5b,0x62,0x7e,0x7d,0x7b,0x2f,0x79,0x2a,0xc2,
+ 0x94,0x65,0xe7,0x50,0xae,0xfd,0x60,0x42,0x34,0x03,0x29,0xc1,0x0a,0x04,
+ 0x90,0xce,0x1e,0x4e,0x63,0x9b,0x56,0xe1,0x16,0xbb,0xb9,0x9b,0xe4,0x0b,
+ 0x15,0xde,0xb9,0x59,0x98,0x2b,0xd6,0xda,0x57,0x0f,0xa1,0x27,0xa6,0xe2,
+ 0x40,0x3a,0x82,0x01,0x23,0x6b,0xea,0x1a,0xd7,0x3e,0xc8,0xf3,0xb9,0xc7,
+ 0xdb,0x58,0xdb,0x77,0x30,0xac,0x30,0xbe,0x6e,0x52,0xce,0xf9,0x28,0xe9,
+ 0xe1,0xd9,0x7b,0xd8,0xf6,0x3e,0x7f,0x5d,0xa9,0xf0,0xd4,0x68,0x0f,0x5d,
+ 0x41,0x23,0x0b,0x74,0x00,0xf6,0x21,0xe8,0x78,0xc6,0xe9,0xd1,0xfe,0xc8,
+ 0xaf,0xbf,0x7c,0x61,0xe0,0xf9,0x70,0xa7,0xc9,0xef,0x3f,0xdc,0xd9,0x7b,
+ 0xf7,0x66,0xe1,0x97,0x9a,0x12,0xe9,0x72,0xb5,0x16,0xde,0xdc,0x2a,0xb3,
+ 0x59,0x28,0xb3,0x5d,0xfc,0x98,0xb5,0xfb,0xb5,0x9d,0x5f,0x2c,0xe4,0xdf,
+ 0xf6,0xa4,0x3a,0x7d,0x61,0x22,0x69,0x8d,0xf6,0x47,0xce,0x94,0xea,0xce,
+ 0x53,0xd5,0xa6,0x7b,0x03,0xd8,0x03,0xd0,0x8e,0x7d,0xa6,0xcf,0x9e,0xea,
+ 0x09,0x2d,0xf4,0x44,0x02,0x00,0x6c,0xec,0xb4,0x36,0xda,0xae,0xfc,0x04,
+ 0x30,0x0d,0x24,0x1e,0x7a,0x59,0x05,0x78,0x3f,0x64,0x19,0xf7,0x32,0xe9,
+ 0xce,0x0c,0x40,0xad,0xe9,0x51,0xac,0xb5,0x2f,0x02,0xef,0x01,0xfc,0x0f,
+ 0x0a,0x3e,0xe9,0x1a,0x33,0xf0,0xe7,0x05,0x00,0x00,0x00,0x00,0x49,0x45,
+ 0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_toolbutton_png_len = 1262;
+static const unsigned char small_toolbutton_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x04,0x80,0x49,0x44,0x41,0x54,0x38,0xcb,0x95,0x55,
+ 0x5b,0x48,0x5c,0x57,0x14,0x5d,0x77,0xee,0x63,0xee,0x8c,0x6f,0x67,0x9c,
+ 0xf1,0x95,0xfa,0x2c,0x21,0x3e,0xf0,0xdd,0xf8,0x8a,0x36,0x06,0x1b,0x13,
+ 0x3f,0xec,0x87,0xd8,0x4f,0x3f,0x13,0xfa,0xd1,0x62,0xfa,0xd5,0x3f,0xc1,
+ 0x6f,0xbf,0xac,0x84,0x42,0x91,0x80,0xd6,0xc4,0x26,0x22,0x52,0x09,0x62,
+ 0xc1,0x28,0x34,0x21,0xa9,0x4d,0xa4,0x01,0xa9,0x18,0xc4,0x2a,0x36,0xd4,
+ 0x38,0x8e,0x13,0x9c,0xd1,0x71,0x9c,0x99,0xdb,0xbd,0x4f,0xe6,0x4a,0x4c,
+ 0x22,0xb4,0x07,0xce,0xdc,0x3b,0xf7,0x9c,0xbb,0xce,0xda,0x6b,0xaf,0xbd,
+ 0xaf,0x02,0x40,0xea,0xed,0xed,0x2d,0xd3,0x75,0xfd,0x3b,0x8f,0xc7,0xd3,
+ 0xb0,0xb7,0xb7,0x87,0xff,0x3b,0x76,0x76,0x76,0xb0,0xb8,0xb8,0xf8,0x64,
+ 0x75,0x75,0xf5,0x5b,0xfa,0xbb,0x48,0x73,0x5f,0xa1,0x1f,0x99,0x41,0xeb,
+ 0xea,0xea,0x1a,0x4a,0x4b,0x4b,0x61,0x18,0xc6,0xa9,0x00,0xbc,0x26,0x49,
+ 0xd2,0xf1,0x9e,0xb7,0xef,0x87,0x87,0x87,0xcf,0xf7,0xf4,0xf4,0xf4,0xd3,
+ 0x6d,0x17,0x4d,0x0f,0x03,0x2b,0xcc,0xb4,0xa4,0xa4,0x04,0xa1,0x50,0x08,
+ 0xd1,0x68,0xf4,0x54,0x50,0x1e,0xd1,0xa8,0x41,0xf7,0xd1,0x18,0xb0,0x05,
+ 0x16,0x8b,0x24,0xee,0x99,0x14,0x8d,0x0a,0x9a,0xce,0x63,0xc6,0x1c,0x7e,
+ 0x38,0x1c,0xc6,0xd1,0xd1,0xd1,0xa9,0xa0,0x07,0x07,0x07,0x98,0x9a,0x9a,
+ 0x42,0x5f,0x5f,0x1f,0xba,0xba,0xbe,0x40,0x67,0x67,0x27,0xb2,0xb3,0xb3,
+ 0xa1,0x69,0x1a,0x14,0x45,0xa6,0xf5,0xa0,0xb9,0x3d,0x91,0xa6,0xce,0xc0,
+ 0xe2,0xc8,0x48,0x24,0x22,0xe6,0x87,0xc6,0xda,0xda,0x1a,0xa6,0xa7,0xa7,
+ 0xb1,0xb5,0xb5,0x85,0x5b,0xb7,0x46,0x30,0x3f,0x3f,0x8b,0x81,0x81,0x01,
+ 0x5c,0xbc,0xd8,0x82,0x0b,0x17,0x1a,0x11,0x17,0x67,0x17,0xc4,0x62,0x43,
+ 0x65,0xb2,0xc7,0xc0,0x2c,0xc1,0x87,0x80,0x99,0x2d,0x47,0x12,0x08,0xec,
+ 0xa3,0xa5,0xa5,0x0d,0x67,0xcf,0x16,0x21,0x33,0x33,0x07,0x4f,0x9f,0x2e,
+ 0xe0,0xee,0xdd,0x51,0xb1,0x56,0x5f,0x5f,0x8f,0xc3,0xc3,0x37,0x8c,0x2d,
+ 0x16,0x8b,0x4c,0x58,0x92,0x62,0x02,0xf0,0x89,0x6f,0x9d,0x7a,0x02,0x38,
+ 0x33,0x33,0x13,0xed,0xed,0xed,0x18,0x19,0x19,0x15,0x21,0x57,0x55,0xd5,
+ 0xa0,0xa2,0xa2,0x1a,0x1b,0x1b,0xeb,0x98,0x9c,0x9c,0x84,0xdb,0xed,0xa6,
+ 0xfc,0x1c,0x9a,0xaf,0x08,0xa2,0xc7,0xc0,0xcc,0xf6,0x5d,0x8d,0x4d,0x17,
+ 0x84,0xc3,0x11,0x24,0x27,0x27,0xe1,0xf2,0xe5,0xcf,0x30,0x36,0x36,0x46,
+ 0x7b,0xa3,0xa8,0xae,0xfe,0x84,0x12,0x56,0x46,0xb2,0x3c,0xc0,0x93,0x27,
+ 0xbf,0x21,0x37,0x37,0x47,0xbc,0x43,0x9a,0x2b,0xa1,0x50,0x58,0x3a,0x01,
+ 0x6c,0x4a,0xc1,0xcc,0x97,0x96,0x96,0xa0,0xeb,0x36,0xe4,0xe5,0xe5,0xc2,
+ 0x74,0x60,0x46,0x46,0x06,0x1a,0x1b,0x1b,0xc9,0x5a,0x3f,0xd0,0xf3,0x3c,
+ 0x38,0x1c,0x0e,0x31,0xd7,0xd7,0xd7,0x91,0x92,0x92,0x1c,0x93,0x42,0x91,
+ 0x15,0x25,0x7a,0x12,0x98,0x01,0x99,0xa5,0xd7,0xeb,0x25,0x26,0xf3,0x14,
+ 0x41,0x18,0xad,0xad,0xad,0xc8,0xca,0xca,0x82,0x2c,0xcb,0x50,0x55,0x05,
+ 0x05,0x05,0x05,0xc2,0x66,0xb2,0x2c,0x11,0x3b,0x2b,0x69,0x1b,0x8a,0xe5,
+ 0x20,0x20,0x70,0x64,0x86,0x8d,0x86,0x4f,0x6a,0xcc,0x3e,0x66,0x60,0xd6,
+ 0x8d,0x72,0x20,0x6c,0x35,0x34,0xf4,0x3d,0x9a,0x9a,0x9a,0x91,0x9f,0x9f,
+ 0x0b,0xab,0x55,0xc7,0xe6,0xe6,0x06,0xd9,0x4b,0x81,0xdd,0xae,0xd3,0x1e,
+ 0xab,0x78,0xd7,0xeb,0xdd,0x86,0xdf,0x6f,0x02,0xcb,0x72,0x24,0x62,0x79,
+ 0x9f,0x31,0xbb,0x63,0x70,0x70,0x10,0x33,0x33,0x73,0x38,0x73,0x26,0x07,
+ 0x6d,0x6d,0x1d,0x94,0xfd,0x1f,0x71,0xe9,0x52,0x8b,0x60,0x3a,0x37,0xf7,
+ 0x00,0xd7,0xaf,0x7f,0x49,0xa1,0x3b,0xa8,0x94,0x5f,0xa3,0xbc,0xbc,0x12,
+ 0x13,0x13,0xab,0x64,0xc5,0x7f,0x62,0xc0,0xaa,0xa6,0xaa,0x86,0xf2,0x1e,
+ 0x30,0x5f,0xbb,0xbb,0xbb,0x71,0xe7,0xce,0x08,0xae,0x5d,0xfb,0x9a,0xb2,
+ 0x5f,0x49,0x4c,0xad,0xe4,0xdb,0x7e,0xb1,0xef,0xc6,0x8d,0x6f,0x44,0xd2,
+ 0xb6,0xb7,0x3d,0xd8,0xdf,0x3f,0x40,0x5d,0x5d,0x3d,0x45,0x1a,0xc4,0xfd,
+ 0xfb,0x3f,0x8b,0x75,0xab,0x55,0x4b,0x90,0x65,0x8b,0x76,0x42,0x0a,0xd6,
+ 0x8a,0x19,0x37,0x37,0x7f,0x8a,0xdb,0xb7,0x47,0xf1,0xf0,0xe1,0x3c,0x6a,
+ 0x6b,0x1b,0x50,0x5c,0x5c,0x82,0x9b,0x37,0x87,0x60,0xb3,0x69,0x62,0xaf,
+ 0xc7,0xb3,0x83,0xdd,0x5d,0x9f,0x90,0x8e,0x7c,0x8b,0x86,0x86,0x26,0x51,
+ 0x3c,0x2b,0x2b,0xcb,0x2c,0x57,0x6a,0x7c,0xbc,0x9a,0x78,0x0c,0x6c,0x16,
+ 0x08,0x5f,0xe3,0xe3,0xe3,0x50,0x59,0x59,0x85,0x7b,0xf7,0x46,0x85,0x57,
+ 0x6b,0x6a,0x6a,0xe9,0x59,0x3c,0x25,0x4f,0x13,0xec,0x83,0xc1,0xa0,0x98,
+ 0xba,0xae,0x09,0x9b,0x79,0xbd,0x3e,0xe1,0x75,0x1e,0x49,0x49,0x89,0x6e,
+ 0x45,0xd1,0x52,0xde,0x61,0xcc,0x05,0x62,0x50,0x72,0x54,0x62,0x59,0x2c,
+ 0x22,0x98,0x9d,0xfd,0x05,0x8f,0x1e,0xfd,0x2a,0x0e,0x63,0xdb,0xe5,0xe7,
+ 0x17,0x92,0x9f,0xaf,0x8a,0x04,0x96,0x97,0x97,0xc1,0xe9,0x74,0x10,0xf3,
+ 0x23,0x3c,0x7f,0xfe,0x07,0xd2,0xd3,0xd3,0x91,0x9a,0xea,0x70,0x10,0x70,
+ 0x12,0x03,0x1b,0xdc,0x4f,0x19,0x84,0xbb,0x16,0xbf,0x4c,0x35,0x21,0x98,
+ 0x15,0x15,0x15,0x53,0x61,0xa4,0x62,0x79,0xf9,0x4f,0xbc,0x7a,0xb5,0x4d,
+ 0x12,0x78,0xe8,0xa0,0x19,0x72,0xc0,0x3e,0x3a,0x3a,0x3e,0xa7,0x68,0x36,
+ 0x99,0x21,0xd9,0x4e,0xc5,0x95,0x2b,0x57,0x45,0x89,0x93,0xaf,0x75,0x8a,
+ 0xcc,0x26,0x80,0xb9,0x49,0x8f,0x8f,0x8f,0x9f,0x67,0x8f,0x9a,0xd5,0xc7,
+ 0xed,0x91,0xa3,0xe0,0x1e,0xe0,0x76,0xbb,0x84,0x14,0x2e,0x97,0x1b,0x3e,
+ 0xdf,0x2e,0x9e,0x3d,0x7b,0x4c,0xa5,0xed,0x47,0x61,0xe1,0xc7,0xd4,0x33,
+ 0x7e,0x17,0xa0,0x1c,0xc1,0xb9,0x73,0xc5,0x87,0xe4,0x1c,0x83,0x23,0x66,
+ 0xe0,0x08,0x77,0x7e,0xb2,0x58,0x7f,0xac,0x9f,0xfe,0xa7,0xf1,0xe2,0xc5,
+ 0x8a,0xb8,0xba,0x5c,0x2e,0x2c,0x2c,0x3c,0x26,0x0b,0x7e,0x65,0x64,0x67,
+ 0x7f,0xf4,0xd2,0xe7,0xf3,0xee,0x92,0x14,0x01,0x06,0x0e,0xc7,0x3e,0x27,
+ 0x5d,0xb1,0x26,0x9d,0x18,0x6b,0x7d,0x94,0x70,0xd1,0xc5,0x25,0xae,0x7f,
+ 0x2e,0x55,0xae,0x2a,0x95,0xe2,0xa4,0x8a,0x8b,0xa3,0x72,0x77,0x26,0x24,
+ 0x24,0xa6,0xa5,0xa5,0x39,0x9d,0x91,0x88,0x61,0x9f,0x98,0xf8,0x49,0xa5,
+ 0x2f,0xd1,0xae,0xa6,0xe9,0xcb,0x64,0xb9,0x97,0x82,0x31,0x77,0x7c,0x76,
+ 0x51,0xec,0xaa,0xb3,0xcf,0x19,0xd0,0xfc,0x9a,0x88,0xa6,0x42,0xf5,0xcf,
+ 0xa5,0x4a,0x95,0xc9,0x07,0x58,0x69,0x29,0x81,0xf2,0x90,0xac,0xeb,0xd6,
+ 0x14,0x62,0x68,0xa3,0xc6,0x64,0xa1,0x86,0x15,0xb0,0xd9,0x6c,0x7f,0x93,
+ 0xee,0x7f,0x29,0xb4,0xd1,0xa0,0x07,0x2c,0xac,0x9f,0x66,0xd0,0x04,0x35,
+ 0xdb,0xdf,0x1b,0xbd,0xb9,0xdc,0xcd,0x7f,0x41,0xc9,0xef,0x7f,0xcd,0xd1,
+ 0xa8,0x81,0x80,0x97,0x3f,0x20,0xba,0xdd,0xae,0xa9,0xa1,0x90,0x46,0xc0,
+ 0x7a,0x58,0x92,0xc2,0x7b,0xba,0xae,0x04,0xfe,0x05,0x00,0x12,0x29,0xd3,
+ 0x40,0xbb,0x4e,0xd5,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,
+ 0x60,0x82
+};
+
+static const unsigned int small_undo_png_len = 572;
+static const unsigned char small_undo_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xd6,0xd8,0xd4,0x4f,0x58,0x32,0x00,0x00,0x00,0x19,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x41,0x64,0x6f,0x62,
+ 0x65,0x20,0x49,0x6d,0x61,0x67,0x65,0x52,0x65,0x61,0x64,0x79,0x71,0xc9,
+ 0x65,0x3c,0x00,0x00,0x01,0xce,0x49,0x44,0x41,0x54,0x48,0xc7,0xdd,0xd4,
+ 0x3f,0x28,0x84,0x61,0x1c,0xc0,0xf1,0x5b,0x2c,0x57,0x62,0xb9,0x4d,0x6e,
+ 0xb8,0xed,0xe4,0x06,0x29,0x72,0x37,0x28,0xab,0xc9,0xa2,0xb0,0x50,0x18,
+ 0x90,0x0c,0x32,0x30,0xde,0x46,0x51,0x38,0x11,0xf9,0x3b,0x21,0x37,0x89,
+ 0x4d,0x0c,0xa2,0x64,0xa0,0x2c,0x52,0xca,0x49,0x47,0x29,0x91,0x88,0x7a,
+ 0x7c,0x1f,0xf7,0x7b,0xbd,0xcf,0x3d,0x71,0x7f,0x94,0x85,0xfa,0x7a,0x1e,
+ 0x6f,0xdd,0xe7,0x7d,0x3d,0xcf,0x73,0xaf,0x47,0x29,0xe5,0xf9,0x8b,0x3c,
+ 0xff,0x1f,0xe6,0xc7,0x4b,0x7e,0x0a,0x4a,0x7a,0xee,0xfd,0x35,0x6c,0x80,
+ 0x95,0xa4,0xac,0x2a,0xed,0x1b,0xe4,0x83,0x06,0x1d,0x68,0x3d,0x1c,0x56,
+ 0xcb,0x65,0x65,0x6a,0x9e,0x62,0x25,0x25,0xe6,0x0d,0x82,0x0e,0x9e,0x17,
+ 0xba,0x05,0x18,0x0f,0x85,0xd4,0xb2,0xdf,0xaf,0xc6,0xf9,0x7b,0x8c,0x86,
+ 0x69,0xb4,0xb0,0x50,0x45,0x5d,0x3c,0x90,0x15,0x36,0xd1,0x9d,0x48,0x44,
+ 0xc5,0x01,0x17,0x99,0xcf,0x50,0x8c,0x1c,0x7c,0x84,0x06,0x5c,0xb8,0x56,
+ 0x3e,0xf7,0xf9,0xcb,0x67,0x6f,0x80,0x89,0xee,0x83,0x6e,0x83,0xae,0x31,
+ 0x5f,0x21,0x13,0xef,0xa5,0x66,0x1a,0xa4,0x76,0xe3,0xa9,0x3d,0xb2,0xe8,
+ 0xce,0x06,0x78,0x6d,0xf4,0x18,0x74,0x17,0x74,0x93,0xf9,0x06,0x99,0x78,
+ 0x3f,0xd5,0x1b,0x9b,0x38,0x92,0xfe,0xd4,0xee,0xa6,0xc8,0xdc,0xe7,0x5c,
+ 0x3b,0x03,0x3d,0x04,0xdd,0x61,0xbe,0x4d,0x26,0x3e,0x44,0x0d,0xee,0xe7,
+ 0xda,0xa8,0x66,0xae,0xb4,0x54,0x75,0xba,0xd7,0x52,0xc8,0x1d,0x9b,0x22,
+ 0x17,0xea,0xf4,0x78,0x01,0x7a,0x02,0x7a,0xc8,0x7c,0x4f,0xaf,0xb1,0x81,
+ 0xeb,0x8d,0x6a,0x74,0x81,0x26,0xf9,0xd7,0x0b,0xa8,0xa8,0xc7,0x86,0xef,
+ 0x81,0xaf,0xe4,0xe2,0x35,0xe8,0x39,0xe8,0x29,0xf3,0x23,0x32,0x71,0x7d,
+ 0x0a,0x5a,0xbe,0x41,0x65,0x09,0x0b,0xc6,0x6c,0xf8,0x81,0x33,0x99,0x64,
+ 0x4c,0x16,0x17,0xab,0x04,0xe8,0x85,0x5e,0x0a,0x32,0x71,0x7d,0x0a,0x5a,
+ 0x7f,0x40,0x9d,0xa2,0x36,0xfc,0x08,0x7c,0xcf,0x78,0x4b,0x37,0x74,0xa9,
+ 0x97,0xc3,0xc0,0xf5,0x29,0xe8,0xc8,0x82,0xca,0x53,0x57,0xa5,0xc1,0xcf,
+ 0xc0,0x0f,0x7a,0x49,0x04,0x4f,0x18,0xf8,0x12,0x75,0xe7,0x80,0x0a,0x1c,
+ 0x48,0x83,0x5f,0x81,0x9f,0xf4,0x92,0x58,0xf8,0x2a,0xf5,0xe5,0x88,0x1a,
+ 0x47,0xd5,0xf7,0x05,0xbf,0x03,0xbf,0x30,0xda,0xf8,0x81,0x8b,0x76,0x51,
+ 0x79,0x26,0xd4,0xba,0x41,0x0a,0x56,0xc0,0x6f,0x8c,0x36,0x9e,0x94,0x25,
+ 0x11,0xbc,0xe2,0xbb,0x57,0x64,0x46,0x58,0xa3,0x0b,0x34,0x47,0xb3,0x34,
+ 0x4d,0x53,0x34,0x49,0x13,0xf2,0x4e,0x10,0xbc,0x3a,0x17,0xdc,0xfc,0x4a,
+ 0xe7,0x93,0x2f,0x17,0xd8,0x79,0x81,0x87,0xe4,0xa8,0x44,0x32,0x54,0x25,
+ 0x9b,0x97,0xf5,0x89,0x3f,0x00,0xc7,0x8d,0x6d,0x93,0x39,0x21,0x73,0x78,
+ 0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_editcut_xpm_len = 733;
+static const unsigned char small_disabled_editcut_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x34,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,
+ 0x38,0x34,0x38,0x32,0x38,0x34,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,
+ 0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x63,0x20,0x6e,
+ 0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,
+ 0x73,0x20,0x2a,0x2f,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,
+ 0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x6f,
+ 0x6f,0x2e,0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x6f,0x2e,0x2e,
+ 0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x6f,0x6f,0x6f,0x2e,0x20,0x20,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x2e,0x2e,0x6f,0x2e,0x2e,0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x2e,0x2e,0x2e,0x20,0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,
+ 0x2e,0x2e,0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x20,
+ 0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x6f,0x2e,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x20,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x2e,0x6f,0x2e,0x20,0x2e,0x20,0x20,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x6f,
+ 0x20,0x2e,0x20,0x2e,0x20,0x6f,0x6f,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x6f,0x20,0x6f,0x2e,
+ 0x20,0x2e,0x20,0x6f,0x6f,0x6f,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x2e,0x6f,0x20,0x6f,0x6f,0x2e,0x20,0x2e,
+ 0x20,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x2e,0x6f,
+ 0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,
+ 0x6f,0x6f,0x2e,0x20,0x6f,0x6f,0x6f,0x2e,0x20,0x6f,0x2e,0x20,0x6f,0x2e,
+ 0x6f,0x20,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,
+ 0x2e,0x20,0x6f,0x6f,0x2e,0x6f,0x20,0x6f,0x6f,0x2e,0x2e,0x6f,0x20,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,
+ 0x2e,0x2e,0x6f,0x20,0x6f,0x6f,0x6f,0x6f,0x20,0x20,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x20,0x20,
+ 0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_disabled_editslots_xpm_len = 899;
+static const unsigned char small_disabled_editslots_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x36,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x63,0x20,
+ 0x23,0x66,0x65,0x66,0x65,0x66,0x65,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,
+ 0x20,0x47,0x72,0x61,0x79,0x39,0x39,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x63,
+ 0x20,0x23,0x63,0x38,0x39,0x61,0x36,0x64,0x22,0x2c,0x0a,0x22,0x4f,0x20,
+ 0x63,0x20,0x23,0x63,0x38,0x39,0x35,0x34,0x34,0x22,0x2c,0x0a,0x22,0x2b,
+ 0x20,0x63,0x20,0x23,0x63,0x35,0x38,0x64,0x35,0x32,0x22,0x2c,0x0a,0x22,
+ 0x40,0x20,0x63,0x20,0x23,0x38,0x34,0x38,0x32,0x38,0x34,0x22,0x2c,0x0a,
+ 0x22,0x23,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,
+ 0x24,0x20,0x63,0x20,0x6e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x22,0x25,0x20,
+ 0x63,0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,
+ 0x20,0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x2a,0x20,0x63,0x20,
+ 0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x63,0x20,0x47,0x72,0x61,
+ 0x79,0x30,0x22,0x2c,0x0a,0x22,0x3a,0x20,0x63,0x20,0x47,0x72,0x61,0x79,
+ 0x30,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,0x73,0x20,
+ 0x2a,0x2f,0x0a,0x22,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x22,0x2c,
+ 0x0a,0x22,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x40,0x40,0x40,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x24,0x24,0x40,
+ 0x40,0x20,0x40,0x20,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x24,0x40,0x40,0x20,0x20,
+ 0x40,0x20,0x24,0x24,0x24,0x40,0x40,0x40,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x40,0x40,0x20,0x20,0x24,0x40,0x20,
+ 0x24,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x24,0x24,0x24,0x24,0x22,0x2c,
+ 0x0a,0x22,0x24,0x24,0x24,0x40,0x20,0x20,0x24,0x24,0x40,0x20,0x24,0x40,
+ 0x20,0x20,0x20,0x24,0x20,0x40,0x20,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,
+ 0x24,0x24,0x40,0x40,0x20,0x24,0x24,0x24,0x40,0x20,0x40,0x40,0x20,0x24,
+ 0x24,0x24,0x24,0x40,0x40,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,0x40,0x40,
+ 0x40,0x20,0x20,0x24,0x24,0x24,0x40,0x20,0x40,0x20,0x20,0x24,0x24,0x24,
+ 0x24,0x24,0x40,0x40,0x40,0x40,0x22,0x2c,0x0a,0x22,0x40,0x40,0x40,0x20,
+ 0x24,0x24,0x24,0x24,0x40,0x20,0x40,0x20,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x40,0x40,0x40,0x40,0x22,0x2c,0x0a,0x22,0x24,0x20,0x40,0x40,0x24,0x24,
+ 0x24,0x24,0x40,0x20,0x40,0x40,0x24,0x24,0x24,0x24,0x24,0x40,0x40,0x20,
+ 0x20,0x20,0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x40,0x20,0x24,0x24,0x24,
+ 0x40,0x20,0x24,0x40,0x20,0x24,0x24,0x24,0x24,0x40,0x20,0x20,0x24,0x24,
+ 0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x40,0x40,0x24,0x24,0x24,0x40,0x20,
+ 0x24,0x40,0x40,0x40,0x24,0x40,0x40,0x40,0x20,0x24,0x24,0x24,0x22,0x2c,
+ 0x0a,0x22,0x24,0x24,0x24,0x24,0x40,0x40,0x24,0x24,0x40,0x20,0x24,0x24,
+ 0x20,0x40,0x40,0x40,0x20,0x20,0x20,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,
+ 0x24,0x24,0x24,0x24,0x24,0x40,0x40,0x24,0x40,0x20,0x24,0x24,0x24,0x24,
+ 0x20,0x20,0x20,0x24,0x24,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x40,0x40,0x40,0x20,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x20,0x20,0x20,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x22,0x2c,0x0a,0x22,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+ 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x22,0x0a,
+ 0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_disabled_layout_xpm_len = 931;
+static const unsigned char small_disabled_layout_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x31,0x34,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x23,
+ 0x36,0x37,0x36,0x37,0x36,0x37,0x36,0x37,0x36,0x37,0x36,0x37,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x36,0x66,0x36,0x66,0x36,0x66,0x36,
+ 0x66,0x36,0x66,0x36,0x66,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,0x23,
+ 0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x35,0x30,0x22,0x2c,
+ 0x0a,0x22,0x4f,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x35,0x33,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x20,0x63,0x20,0x47,0x72,0x61,0x79,0x35,0x36,0x22,0x2c,
+ 0x0a,0x22,0x40,0x20,0x63,0x20,0x23,0x39,0x37,0x39,0x37,0x39,0x37,0x39,
+ 0x37,0x39,0x37,0x39,0x37,0x22,0x2c,0x0a,0x22,0x23,0x20,0x63,0x20,0x23,
+ 0x39,0x66,0x39,0x66,0x39,0x66,0x39,0x66,0x39,0x66,0x39,0x66,0x22,0x2c,
+ 0x0a,0x22,0x24,0x20,0x63,0x20,0x23,0x61,0x37,0x61,0x37,0x61,0x37,0x61,
+ 0x37,0x61,0x37,0x61,0x37,0x22,0x2c,0x0a,0x22,0x25,0x20,0x63,0x20,0x23,
+ 0x61,0x66,0x61,0x66,0x61,0x66,0x61,0x66,0x61,0x66,0x61,0x66,0x22,0x2c,
+ 0x0a,0x22,0x26,0x20,0x63,0x20,0x23,0x62,0x37,0x62,0x37,0x62,0x37,0x62,
+ 0x37,0x62,0x37,0x62,0x37,0x22,0x2c,0x0a,0x22,0x2a,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x37,0x35,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x37,0x38,0x22,0x2c,0x0a,0x22,0x2d,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x38,0x31,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,
+ 0x65,0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x2a,0x2a,0x3d,0x3d,0x3d,0x3d,
+ 0x3d,0x3d,0x3d,0x2a,0x2a,0x2a,0x2a,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
+ 0x3d,0x2a,0x22,0x2c,0x0a,0x22,0x3d,0x3d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x3d,0x2a,0x2a,0x2a,0x2d,0x3d,0x2d,0x2d,0x3d,0x2d,0x2d,0x3d,0x3d,
+ 0x22,0x2c,0x0a,0x22,0x3d,0x2d,0x3d,0x2d,0x3d,0x2d,0x3d,0x3d,0x3d,0x2a,
+ 0x2a,0x2a,0x2a,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x22,0x2c,
+ 0x0a,0x22,0x26,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x26,0x26,
+ 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x26,0x22,0x2c,0x0a,0x22,
+ 0x25,0x2b,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x40,0x25,0x25,0x23,0x4f,
+ 0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x2b,0x25,0x22,0x2c,0x0a,0x22,0x25,0x4f,
+ 0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x2b,0x25,0x25,0x2b,0x58,0x58,0x58,
+ 0x58,0x58,0x58,0x58,0x4f,0x24,0x22,0x2c,0x0a,0x22,0x26,0x24,0x23,0x23,
+ 0x23,0x23,0x23,0x23,0x23,0x24,0x26,0x26,0x24,0x23,0x23,0x23,0x23,0x23,
+ 0x23,0x23,0x24,0x26,0x22,0x2c,0x0a,0x22,0x2a,0x26,0x26,0x26,0x2a,0x26,
+ 0x2a,0x26,0x2a,0x26,0x2a,0x2a,0x2a,0x26,0x2a,0x26,0x2a,0x26,0x2a,0x26,
+ 0x26,0x2a,0x22,0x2c,0x0a,0x22,0x2a,0x2a,0x3d,0x3d,0x2a,0x3d,0x3d,0x3d,
+ 0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x3d,0x3d,0x2a,0x3d,0x3d,0x2a,0x2a,0x2a,
+ 0x22,0x2c,0x0a,0x22,0x3d,0x3d,0x2d,0x2d,0x2d,0x2d,0x2d,0x3d,0x2d,0x2a,
+ 0x2a,0x2a,0x3d,0x2d,0x3d,0x2d,0x2d,0x3d,0x2d,0x3d,0x3d,0x3d,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x3d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2a,0x26,0x2a,
+ 0x2a,0x3d,0x2d,0x2d,0x3d,0x3d,0x3d,0x2d,0x3d,0x3d,0x22,0x2c,0x0a,0x22,
+ 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x25,0x26,0x26,0x26,0x26,
+ 0x26,0x25,0x26,0x26,0x26,0x25,0x26,0x26,0x22,0x2c,0x0a,0x22,0x25,0x40,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x40,0x25,0x25,0x23,0x2b,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x40,0x25,0x22,0x2c,0x0a,0x22,0x25,0x2b,0x6f,0x6f,
+ 0x6f,0x58,0x6f,0x58,0x6f,0x2b,0x25,0x25,0x40,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x4f,0x25,0x22,0x2c,0x0a,0x22,0x26,0x24,0x23,0x23,0x23,0x23,
+ 0x23,0x23,0x23,0x24,0x26,0x26,0x25,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+ 0x24,0x26,0x22,0x2c,0x0a,0x22,0x2a,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+ 0x26,0x26,0x2a,0x2a,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x2a,
+ 0x22,0x2c,0x0a,0x22,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x26,
+ 0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x3d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2a,0x2a,0x2a,
+ 0x3d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x3d,0x2a,0x22,0x2c,0x0a,0x22,
+ 0x2a,0x3d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2a,0x2a,0x26,0x3d,0x3d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x3d,0x3d,0x3d,0x22,0x2c,0x0a,0x22,0x26,0x26,
+ 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x25,0x26,0x26,0x26,0x26,0x26,0x26,
+ 0x26,0x26,0x26,0x26,0x26,0x2a,0x22,0x2c,0x0a,0x22,0x26,0x23,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x40,0x25,0x25,0x23,0x2b,0x2b,0x2b,0x2b,0x2b,
+ 0x2b,0x2b,0x23,0x25,0x22,0x2c,0x0a,0x22,0x25,0x4f,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x4f,0x24,0x25,0x4f,0x2e,0x2e,0x2e,0x20,0x2e,0x2e,0x2e,
+ 0x6f,0x24,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_disabled_left_xpm_len = 733;
+static const unsigned char small_disabled_left_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x34,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,
+ 0x38,0x34,0x38,0x32,0x38,0x34,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,
+ 0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x63,0x20,0x6e,
+ 0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,
+ 0x73,0x20,0x2a,0x2f,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x2e,0x2e,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,
+ 0x2e,0x20,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x6f,0x20,
+ 0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x2e,0x2e,0x2e,0x6f,0x6f,0x20,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x20,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,
+ 0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,
+ 0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x20,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x2e,0x2e,
+ 0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x20,0x2e,0x2e,0x2e,0x6f,
+ 0x6f,0x20,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x20,0x2e,0x2e,0x2e,0x6f,0x20,
+ 0x2e,0x2e,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x20,0x20,0x2e,0x2e,0x2e,0x20,0x2e,0x2e,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x6f,0x6f,0x20,0x20,0x2e,0x2e,0x2e,0x2e,0x2e,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x6f,0x6f,0x6f,0x20,0x20,0x2e,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x20,0x20,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x20,0x20,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x20,0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_disabled_right_xpm_len = 733;
+static const unsigned char small_disabled_right_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x32,0x32,0x20,0x32,0x32,
+ 0x20,0x34,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x47,0x72,
+ 0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,
+ 0x38,0x34,0x38,0x32,0x38,0x34,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,
+ 0x47,0x72,0x61,0x79,0x30,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x63,0x20,0x6e,
+ 0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,
+ 0x73,0x20,0x2a,0x2f,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,
+ 0x2e,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x2e,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x2e,0x2e,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x20,0x2e,0x2e,0x2e,0x6f,0x6f,
+ 0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x20,0x6f,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x20,0x6f,0x6f,0x2e,0x2e,0x2e,0x6f,0x6f,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x20,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x6f,0x22,0x2c,0x0a,0x22,
+ 0x2e,0x2e,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,
+ 0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x6f,0x6f,0x6f,0x6f,
+ 0x2e,0x2e,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x20,0x6f,0x6f,0x2e,0x2e,0x2e,
+ 0x20,0x20,0x22,0x2c,0x0a,0x22,0x6f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2e,0x2e,0x20,0x6f,0x2e,0x2e,0x2e,0x20,0x20,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x2e,0x2e,0x20,0x2e,0x2e,0x2e,0x20,0x20,0x6f,0x6f,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x20,0x20,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,
+ 0x2e,0x2e,0x20,0x20,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x2e,0x20,
+ 0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x2e,0x2e,0x20,0x20,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x20,0x20,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x22,0x2c,0x0a,0x22,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int small_disabled_adjustsize_png_len = 659;
+static const unsigned char small_disabled_adjustsize_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x02,0x1e,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xf8,0xff,0xff,0x3f,0x03,0x31,0xf8,0xfa,
+ 0xf5,0xeb,0xff,0x89,0x55,0x0b,0xc2,0x00,0x01,0xc4,0xc4,0x40,0x02,0x08,
+ 0x0a,0x0a,0xfa,0x4f,0xac,0x5a,0x80,0x00,0x22,0xc9,0x60,0x52,0x00,0x40,
+ 0x00,0x31,0x82,0x9c,0x8d,0x0f,0xdc,0xb8,0x71,0x03,0xae,0xe0,0xd4,0xa9,
+ 0x53,0x0c,0x1f,0x3e,0x7c,0x60,0xc8,0xcb,0xcb,0x63,0x24,0x64,0x30,0x40,
+ 0x00,0x11,0x34,0x18,0x04,0x4e,0x9f,0x3e,0xfd,0xff,0xc2,0x85,0x0b,0x0c,
+ 0x57,0xae,0x5c,0x61,0x78,0xfc,0xf8,0x31,0x58,0x6c,0xdd,0xba,0x75,0x78,
+ 0x0d,0x07,0x08,0x20,0xa2,0x82,0xc2,0xd4,0xd4,0x94,0xf1,0xc9,0x93,0x27,
+ 0x44,0x1b,0x0a,0x02,0x00,0x01,0x44,0x74,0x2c,0x83,0x70,0x60,0x60,0x20,
+ 0xd1,0x29,0x03,0x20,0x80,0x88,0x0a,0x0a,0x72,0x00,0x40,0x00,0xa1,0x04,
+ 0x05,0x72,0x44,0xc1,0x15,0x30,0x31,0xfd,0x97,0x96,0x96,0xfe,0x2f,0x29,
+ 0x29,0x09,0xc6,0x62,0x62,0x62,0xff,0x95,0x95,0x95,0xff,0x13,0xd2,0x07,
+ 0x10,0x40,0x2c,0xe8,0x02,0xa0,0x88,0x02,0x85,0x29,0x8c,0x0f,0x34,0x8c,
+ 0x61,0xda,0xb4,0x69,0x0c,0x0f,0x1f,0x3e,0x64,0xe0,0xe3,0xe3,0x63,0xf8,
+ 0xf9,0xf3,0x27,0xc3,0x91,0x23,0x47,0x18,0xf6,0xee,0xdd,0xfb,0xdf,0xd9,
+ 0xd9,0x99,0x11,0x66,0x28,0x28,0x8d,0x23,0x87,0x3d,0x40,0x00,0x31,0x81,
+ 0x24,0x60,0x18,0x24,0x00,0x8a,0xfd,0xfa,0xfa,0x7a,0xb8,0x0b,0xfe,0xfd,
+ 0xfb,0xc7,0xf0,0xe0,0xc1,0x03,0x86,0xa7,0x4f,0x9f,0x82,0xd9,0xbc,0xbc,
+ 0xbc,0x0c,0xfc,0xfc,0xfc,0x0c,0x0a,0x0a,0x0a,0x70,0x97,0xde,0xbd,0x7b,
+ 0x97,0xc1,0xcd,0xcd,0x8d,0x61,0xd1,0xa2,0x45,0xff,0x37,0x6d,0xda,0x04,
+ 0x16,0x03,0x08,0x20,0x16,0x0d,0x0d,0x0d,0x46,0x58,0x8e,0x0a,0x08,0x08,
+ 0x80,0x27,0x29,0x64,0x17,0x80,0x0c,0x02,0x19,0xa8,0xa4,0xa4,0x04,0x76,
+ 0x31,0x33,0x33,0x33,0xd8,0x52,0x90,0xde,0xed,0xdb,0xb7,0xff,0x3f,0x7f,
+ 0xfe,0x3c,0xc3,0xb9,0x73,0xe7,0xe0,0xbe,0x5e,0xb0,0x60,0xc1,0x7f,0x80,
+ 0x00,0x02,0x07,0x05,0xcc,0x80,0x49,0x93,0x26,0xfd,0x47,0x4f,0x52,0x7f,
+ 0xff,0xfe,0x65,0xf8,0xfe,0xfd,0x3b,0x03,0x0f,0x0f,0x0f,0xc3,0x8f,0x1f,
+ 0x3f,0x18,0x5e,0xbc,0x78,0xc1,0xf0,0xf1,0xe3,0x47,0xb8,0x21,0x9e,0x9e,
+ 0x9e,0x8c,0x27,0x4e,0x9c,0xf8,0x8f,0xac,0x07,0x04,0x00,0x02,0x08,0x25,
+ 0x8c,0x41,0x39,0xea,0xc0,0x81,0x03,0x28,0x61,0x05,0x72,0x29,0x28,0x4c,
+ 0x41,0xe1,0xcb,0xca,0xca,0x0a,0x36,0x14,0x64,0x38,0x32,0x68,0x6c,0x6c,
+ 0x64,0x44,0x2f,0x47,0x00,0x02,0x88,0xa8,0xe4,0x06,0x8a,0x28,0x50,0x98,
+ 0x22,0x03,0x45,0x45,0x45,0x50,0x8a,0xc1,0x99,0x51,0x00,0x02,0x88,0xe8,
+ 0xcc,0x41,0x6a,0xb1,0x09,0x10,0x40,0x44,0x65,0x69,0x58,0xec,0x83,0x22,
+ 0x8a,0x18,0xf5,0x20,0x00,0x10,0x40,0x04,0x0d,0x46,0x4e,0x52,0x67,0xcf,
+ 0x9e,0x45,0x49,0x8a,0xf8,0x00,0x40,0x00,0x11,0x15,0xc6,0xa0,0x88,0x01,
+ 0xa5,0xd3,0x5d,0xbb,0x76,0xc1,0xc5,0x08,0x15,0x44,0x00,0x01,0x44,0x74,
+ 0x98,0x2d,0x5c,0xb8,0xf0,0x3f,0x29,0x85,0x10,0x40,0x00,0x11,0x5d,0x83,
+ 0x08,0x08,0x08,0x10,0xab,0x14,0x0c,0x00,0x02,0x88,0x68,0x83,0xfd,0xfc,
+ 0xfc,0x08,0x97,0xc1,0x48,0x00,0x20,0xc0,0x00,0x03,0xf1,0xf0,0x41,0xde,
+ 0x11,0x65,0xed,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
+ 0x82
+};
+
+static const unsigned int small_disabled_connecttool_png_len = 836;
+static const unsigned char small_disabled_connecttool_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x02,0xcf,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0xd1,0xc4,0x54,0x20,0x00,0x08,0x20,0x9a,0x19,0x0c,0x10,0x40,
+ 0x34,0x33,0x18,0x20,0x80,0x68,0x66,0x30,0x40,0x00,0xb1,0xc0,0x6d,0x60,
+ 0x62,0xfa,0x2f,0x26,0x26,0x06,0x97,0xf8,0xf7,0xef,0x1f,0xc3,0xaf,0x5f,
+ 0xbf,0xc0,0x98,0x8d,0x8d,0x8d,0x81,0x85,0x85,0x85,0x81,0x99,0x99,0x99,
+ 0x81,0x91,0x91,0x11,0xc3,0x10,0x50,0x02,0x10,0x16,0x16,0x66,0x90,0x97,
+ 0x97,0x97,0xd9,0xbe,0x7d,0xfb,0x53,0x90,0x18,0x40,0x00,0x31,0x82,0x04,
+ 0x41,0x86,0x46,0x44,0x44,0x30,0x34,0x36,0x36,0x82,0x0d,0x04,0x89,0xfd,
+ 0xf9,0xf3,0x87,0xe1,0xdb,0xb7,0x6f,0x0c,0xfb,0xf6,0xed,0x63,0x38,0x71,
+ 0xe2,0x04,0x43,0x78,0x78,0x38,0x83,0x86,0x86,0x06,0x03,0x2b,0x2b,0x2b,
+ 0xd8,0x30,0x64,0x0b,0x40,0x6a,0x9f,0x3c,0x79,0xc2,0x30,0x6b,0xd6,0x2c,
+ 0x10,0xd7,0x64,0xe3,0xc6,0x8d,0x67,0x01,0x02,0x70,0x38,0x07,0x35,0x00,
+ 0xc4,0x20,0x14,0x44,0xff,0x5a,0xa8,0x04,0x34,0xac,0x88,0xba,0xaa,0x32,
+ 0x2c,0x60,0x80,0x6a,0x68,0x0f,0x5c,0x48,0x08,0x49,0x5b,0xce,0x93,0xbc,
+ 0xcc,0xed,0x5f,0xa1,0x63,0x0c,0xb8,0x3b,0x22,0xa2,0xe0,0x77,0xba,0xf7,
+ 0x86,0x99,0x41,0x55,0x21,0x22,0xe8,0xbd,0x83,0x88,0x0a,0x7d,0xf7,0x77,
+ 0xa8,0xe0,0xcc,0xc4,0x5a,0x0b,0x73,0x4e,0x30,0x33,0x5a,0x6b,0xff,0x11,
+ 0x40,0x8c,0xe2,0xe2,0xe2,0xff,0x0f,0x1c,0x38,0xc0,0xf0,0xe1,0xc3,0x07,
+ 0x86,0xd7,0xaf,0x5f,0x83,0x0d,0x02,0x29,0x84,0x05,0x07,0xc8,0x35,0x20,
+ 0xfa,0xd9,0xb3,0x67,0x0c,0xe7,0xcf,0x9f,0x67,0x30,0x32,0x32,0x62,0x90,
+ 0x96,0x96,0x06,0x07,0x0d,0x08,0xc3,0x82,0xe2,0xeb,0xd7,0xaf,0x0c,0xaf,
+ 0x5e,0xbd,0x02,0xfb,0xce,0xcd,0xcd,0x8d,0x01,0x20,0x80,0x98,0x60,0x36,
+ 0xfe,0xfc,0xf9,0x13,0xc5,0x50,0x68,0xb8,0x83,0x35,0x83,0x5c,0x08,0x74,
+ 0x00,0x83,0xae,0xae,0x2e,0xd8,0xe5,0x6f,0xde,0xbc,0x61,0x10,0x11,0x11,
+ 0x61,0x10,0x14,0x14,0x84,0x07,0x0d,0xcc,0x21,0x20,0xb5,0x26,0x26,0x26,
+ 0x0c,0x00,0x01,0xc4,0x04,0xb3,0x11,0x24,0x88,0x6c,0x28,0x0c,0x80,0x14,
+ 0x82,0xe4,0x40,0x2e,0xe2,0xe6,0xe6,0x66,0xd0,0xd6,0xd6,0x66,0x38,0x7e,
+ 0xfc,0x38,0x38,0x28,0x40,0x11,0x06,0x12,0x83,0x99,0x81,0x9c,0x8b,0x01,
+ 0x02,0x88,0x05,0xc3,0x24,0xb4,0xd8,0x06,0x85,0xf9,0x97,0x2f,0x5f,0xc0,
+ 0x41,0x05,0xb2,0x00,0xe6,0x42,0x29,0x29,0x29,0x30,0xcd,0xc9,0xc9,0x09,
+ 0x8e,0x0b,0x98,0x7a,0x10,0x00,0xa5,0x22,0x80,0x00,0xc2,0x69,0x30,0xcc,
+ 0xd0,0x4f,0x9f,0x3e,0x81,0x35,0x82,0x82,0x0a,0x14,0xa1,0x0f,0x1e,0x3c,
+ 0x60,0xa8,0xac,0xac,0x64,0xe0,0xe2,0xe2,0x02,0xfb,0x02,0x96,0x8a,0x60,
+ 0x34,0x4c,0x2f,0x40,0x00,0xb1,0x20,0xa7,0x57,0x6c,0x86,0x82,0x62,0x1b,
+ 0x94,0x5a,0x40,0x06,0x3f,0x7a,0xf4,0x88,0xa1,0xb8,0xb8,0x18,0x14,0xeb,
+ 0x60,0x3e,0xc8,0x60,0x90,0x1a,0x90,0x5a,0x50,0xd2,0x04,0xd1,0x20,0x00,
+ 0xa2,0x01,0x02,0x88,0x05,0xa4,0x08,0x94,0x4c,0x40,0x06,0x83,0x24,0x41,
+ 0x86,0x82,0xc2,0x1a,0xc4,0x06,0x69,0xfa,0xfe,0xfd,0x3b,0x38,0x28,0x5e,
+ 0xbc,0x78,0xc1,0x90,0x92,0x92,0xc2,0xc0,0xcf,0xcf,0x0f,0x8e,0x64,0x90,
+ 0x18,0x28,0xa5,0x80,0x82,0x08,0x16,0x54,0x20,0x33,0x60,0x49,0x10,0x20,
+ 0x80,0xc0,0x19,0xc4,0xdb,0xdb,0xfb,0xbf,0xb9,0xb9,0x39,0x58,0x10,0x64,
+ 0x1b,0xc8,0x17,0x20,0x1a,0x84,0x41,0xc1,0x00,0x72,0xb5,0xab,0xab,0x2b,
+ 0x83,0x8e,0x8e,0x0e,0xd8,0x90,0x97,0x2f,0x5f,0x32,0xbc,0x7d,0xfb,0x16,
+ 0x6c,0x39,0xc8,0x11,0x20,0x75,0x20,0x43,0xaf,0x5d,0xbb,0xc6,0xb0,0x6c,
+ 0xd9,0x32,0x30,0x1f,0x20,0x80,0x18,0x61,0xe1,0xe2,0xec,0xec,0xfc,0x1f,
+ 0x96,0x75,0x61,0x62,0x20,0x8b,0x60,0x2e,0x40,0x07,0xe8,0x61,0x0a,0x52,
+ 0xb7,0x70,0xe1,0x42,0x06,0x3e,0x3e,0x3e,0x50,0x8a,0x61,0x04,0x08,0x20,
+ 0x46,0xe4,0x24,0xd2,0xdf,0xdf,0xff,0xdf,0xcc,0xcc,0x0c,0xc5,0x00,0x50,
+ 0xa6,0x81,0x01,0x51,0x51,0x51,0x3c,0x69,0x88,0x81,0x41,0x55,0x55,0x95,
+ 0x01,0x58,0xde,0x80,0xf3,0x3a,0x40,0x00,0x31,0xd2,0xaa,0x06,0x01,0x08,
+ 0x20,0x9a,0x15,0x9b,0x00,0x01,0x44,0x33,0x83,0x01,0x02,0x88,0x66,0x06,
+ 0x03,0x04,0x18,0x00,0x71,0xa8,0xa9,0xb5,0x42,0xc3,0xb2,0xce,0x00,0x00,
+ 0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_editbreaklayout_png_len = 1126;
+static const unsigned char small_disabled_editbreaklayout_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x03,0xf1,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xf8,0xff,0xff,0x3f,0x03,0x08,0x33,0x32,
+ 0x32,0xfe,0x37,0x34,0x34,0xfc,0x0f,0xe3,0x93,0x82,0xc5,0xc5,0xc5,0x31,
+ 0xf4,0x01,0x04,0x10,0x13,0x03,0x10,0x30,0x31,0x31,0xfd,0xf7,0xf1,0xf1,
+ 0x61,0xb0,0xb7,0xb7,0x67,0x70,0x70,0x70,0xf8,0xaf,0xac,0xac,0xfc,0x9f,
+ 0x81,0x08,0x00,0xd2,0x27,0x2b,0x2b,0xfb,0xdf,0xc0,0xc0,0x80,0x21,0x23,
+ 0x23,0x03,0x45,0x0f,0x40,0x00,0x36,0xe7,0xd8,0x06,0x60,0x10,0x06,0x80,
+ 0xe0,0xb3,0x01,0xb5,0x47,0x60,0x1d,0xc4,0x06,0xde,0xcf,0x85,0x57,0xa1,
+ 0x80,0x8a,0xc6,0x23,0xb8,0x46,0x51,0x52,0xa7,0x7f,0x9d,0xbe,0xbc,0xa7,
+ 0xbd,0x77,0xc6,0x18,0xac,0xb5,0xc8,0x4c,0xee,0xbd,0xec,0xbd,0x99,0x73,
+ 0x72,0xce,0x29,0x7f,0xa0,0x88,0xd0,0x5a,0x43,0x55,0xa9,0xb5,0x12,0x11,
+ 0xb8,0x3b,0x66,0xf6,0xf5,0x8f,0x00,0x1c,0x8e,0xb1,0x0d,0x00,0x31,0x08,
+ 0x03,0xfd,0xd2,0x83,0x44,0x8a,0x8c,0x90,0x05,0xd2,0x92,0x86,0x3e,0x63,
+ 0xa7,0xa5,0x61,0xa8,0xfc,0x43,0x67,0xc9,0x96,0xef,0xde,0x2c,0xd7,0x5a,
+ 0xa5,0x3f,0xe7,0x04,0x11,0xa1,0xb5,0x06,0x55,0xc5,0x39,0x07,0x66,0x76,
+ 0xdd,0xbd,0xc6,0x63,0x8c,0x9b,0xd0,0xbd,0x37,0x52,0x46,0x44,0xd0,0x7b,
+ 0x4f,0x10,0x98,0xb9,0xf2,0xff,0x75,0x23,0xe2,0xf9,0x04,0xe0,0x80,0x0c,
+ 0x8d,0x00,0x08,0x61,0x20,0x78,0xbc,0xc2,0x50,0x06,0x15,0x50,0x67,0x9a,
+ 0xa0,0x92,0x18,0x3c,0x2a,0x2e,0x86,0x1e,0x32,0x4c,0x14,0x4f,0xd0,0x77,
+ 0x62,0x77,0xbf,0x4b,0x95,0x5a,0x6b,0x10,0x91,0xa0,0x43,0x29,0x05,0x39,
+ 0x67,0xb8,0x7b,0x74,0x47,0xef,0x1d,0xaa,0xfa,0x34,0xd7,0x5a,0xe9,0xa6,
+ 0x42,0xad,0x15,0x66,0xf6,0xbe,0x7b,0x6f,0xcc,0x39,0x31,0xc6,0x00,0x11,
+ 0x81,0x99,0x63,0x3b,0xbf,0x00,0x62,0x04,0xb9,0x14,0x06,0x80,0x2e,0xfc,
+ 0x0f,0xb2,0x00,0x68,0x00,0x58,0x63,0x53,0x53,0x13,0x83,0x90,0x90,0x10,
+ 0xc8,0x45,0x28,0xc1,0xe1,0xec,0xec,0xfc,0x5f,0x41,0x41,0x81,0x41,0x44,
+ 0x44,0x84,0xe1,0xe3,0xc7,0x8f,0x0c,0x2d,0x2d,0x2d,0x60,0xd7,0x83,0x7c,
+ 0x03,0xb4,0x0c,0xac,0x16,0x20,0x80,0xb0,0xc6,0x32,0xd0,0xab,0xff,0x6f,
+ 0xdf,0xbe,0xfd,0xff,0xef,0xdf,0xbf,0x38,0x53,0x09,0x30,0x4e,0xc0,0x6a,
+ 0x80,0xae,0xfd,0x0f,0x8c,0x17,0x0c,0x75,0x00,0x01,0x04,0x67,0x80,0x22,
+ 0xd1,0xd1,0xd1,0x11,0xae,0x00,0x9b,0x62,0x74,0xbc,0x70,0xe1,0x42,0xb0,
+ 0x9a,0xce,0xce,0x4e,0x0c,0xb5,0x00,0x01,0x04,0x0e,0x0a,0x58,0x72,0xb3,
+ 0xb6,0xb6,0x66,0x38,0x7e,0xfc,0x38,0x03,0xd0,0x25,0x0c,0x57,0xaf,0x5e,
+ 0xc5,0x48,0x0d,0xe8,0x00,0x14,0x99,0x39,0x39,0x39,0x0c,0x3b,0x76,0xec,
+ 0x60,0x90,0x91,0x91,0x01,0xc5,0x07,0x5c,0x0f,0x40,0x00,0x81,0x93,0x5b,
+ 0x60,0x60,0x20,0x38,0x96,0x41,0x49,0x0c,0x14,0xb6,0x7f,0xfe,0xfc,0x61,
+ 0xb8,0x75,0xeb,0x16,0x38,0x42,0x1f,0x3c,0x78,0x80,0x35,0xb9,0x49,0x4a,
+ 0x4a,0x32,0xa8,0xab,0xab,0x33,0xc4,0xc6,0xc6,0x32,0xf0,0xf3,0xf3,0x83,
+ 0x93,0xdb,0xce,0x9d,0x3b,0x19,0xb6,0x6e,0xdd,0x0a,0x56,0x0f,0x10,0x80,
+ 0x63,0x32,0xc4,0x01,0x18,0x00,0x61,0x60,0x17,0x48,0x30,0xbc,0x06,0x85,
+ 0xc6,0xf3,0x66,0x2c,0xbf,0xda,0x56,0x5c,0xc5,0xa9,0xcb,0xf5,0x72,0x63,
+ 0x15,0x14,0xcf,0x2d,0x22,0x97,0x5b,0x44,0x60,0x66,0x90,0x99,0xef,0xee,
+ 0x1e,0xcc,0x33,0x90,0xab,0x2a,0x74,0x37,0xcc,0x0c,0xee,0x7e,0xf5,0xa8,
+ 0xea,0xed,0xff,0x2c,0xf4,0xfe,0x7c,0x02,0x08,0x9c,0xdc,0xcc,0xcd,0xcd,
+ 0xc1,0x99,0x03,0x96,0xdc,0x40,0x31,0xfc,0xeb,0xd7,0x2f,0xb0,0x86,0x25,
+ 0x4b,0x96,0xc0,0x93,0xdb,0xe3,0xc7,0x8f,0x19,0x6d,0x6d,0x6d,0x19,0x94,
+ 0x94,0x94,0xc0,0x19,0x09,0xe4,0x00,0x90,0x0f,0x2f,0x5e,0xbc,0xc8,0x70,
+ 0xea,0xd4,0x29,0x86,0xa9,0x53,0xa7,0x82,0x93,0x1d,0x28,0xb9,0x01,0x04,
+ 0x10,0x46,0x72,0xbb,0x74,0xe9,0x12,0x38,0xb9,0x7d,0xfb,0xf6,0x8d,0xa1,
+ 0xb5,0xb5,0x15,0x6b,0x72,0xb3,0xb3,0xb3,0xfb,0x0f,0x0c,0x5f,0x06,0x41,
+ 0x41,0x41,0x86,0xcf,0x9f,0x3f,0x33,0xf4,0xf4,0xf4,0x60,0x24,0x37,0x80,
+ 0x00,0xc2,0x1a,0xdb,0xa0,0x74,0x4a,0x28,0xb9,0xf9,0xf9,0xf9,0xe1,0x4d,
+ 0x6e,0x00,0x01,0x84,0x92,0xdc,0x40,0x05,0x10,0x39,0xc9,0xad,0xae,0xae,
+ 0x0e,0x43,0x2d,0x40,0x00,0xc1,0x93,0x9b,0x97,0x97,0x17,0x28,0xa2,0x18,
+ 0x4e,0x9e,0x3c,0xc9,0x70,0xe7,0xce,0x1d,0x86,0xeb,0xd7,0xaf,0x13,0x4c,
+ 0x6e,0xa0,0xc8,0x4c,0x4f,0x4f,0x07,0xa7,0x06,0x50,0x2a,0x59,0xb5,0x6a,
+ 0x15,0x5c,0x0f,0x40,0x00,0x81,0x93,0x9b,0xbf,0xbf,0x3f,0x43,0x40,0x40,
+ 0x00,0x4a,0x72,0x03,0xa5,0x65,0x50,0x84,0x82,0xca,0x07,0x6c,0xc9,0x0d,
+ 0x58,0x06,0x33,0x00,0x8b,0x57,0x86,0xb0,0xb0,0x30,0x78,0x72,0x03,0x95,
+ 0x13,0xbb,0x77,0xef,0x06,0xab,0x07,0x08,0xc0,0x41,0x19,0x1a,0x01,0x10,
+ 0x84,0x30,0x30,0x37,0xf3,0x8e,0x46,0x30,0x50,0x01,0x9a,0xc6,0xb1,0x38,
+ 0x0a,0xba,0xbf,0xe0,0x22,0xa2,0x32,0x9b,0xfd,0x54,0x15,0x4f,0xf0,0x78,
+ 0x7b,0x82,0x99,0xb8,0x51,0x42,0xee,0x8e,0xaa,0xa2,0xe5,0x6e,0x77,0x6f,
+ 0xf9,0x9d,0x60,0x71,0x8b,0x08,0x64,0xe6,0xf6,0x88,0x18,0xed,0x46,0x2b,
+ 0x8a,0x08,0xcc,0xec,0xce,0xcc,0xf9,0x05,0xe0,0xa1,0x0c,0x8e,0x00,0x80,
+ 0x21,0x20,0x78,0x49,0x23,0xba,0x50,0xad,0x02,0x54,0xa3,0xa6,0xdc,0x7a,
+ 0xc4,0x97,0x31,0x8c,0x5d,0xd7,0x12,0x1c,0x8c,0x43,0x08,0xcb,0xb0,0x49,
+ 0x2e,0xcc,0x77,0x23,0xba,0xfb,0xe3,0xe6,0xa9,0x4e,0x66,0x2a,0x22,0x96,
+ 0x1a,0xea,0xd8,0xd0,0x8d,0x34,0x33,0xaa,0x2a,0x99,0xf9,0xc5,0xed,0x09,
+ 0x20,0x8c,0xe4,0xb6,0x6b,0xd7,0x2e,0x86,0x4f,0x9f,0x3e,0x81,0x8b,0x43,
+ 0x50,0x32,0xc2,0x96,0xdc,0x40,0x99,0x46,0x5a,0x5a,0x1a,0x9e,0xdc,0x40,
+ 0xe9,0x17,0x3d,0xb9,0x01,0x04,0x10,0xd6,0xd8,0x06,0xe6,0x3a,0x82,0xc9,
+ 0x0d,0x18,0x54,0x60,0x35,0xa0,0xd4,0x03,0x74,0x08,0x86,0x3a,0x80,0x00,
+ 0xc2,0x99,0x94,0x80,0x29,0x83,0x60,0x72,0xc3,0xa7,0x06,0x20,0xc0,0x00,
+ 0xb7,0x9e,0x55,0xda,0x49,0xd3,0x2b,0x6a,0x00,0x00,0x00,0x00,0x49,0x45,
+ 0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_editcopy_png_len = 931;
+static const unsigned char small_disabled_editcopy_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x03,0x2e,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0x64,0x64,0x64,0xfc,0x2f,0x24,0x24,0xc4,
+ 0x00,0x02,0xff,0xff,0xff,0x67,0x80,0x01,0x10,0x5b,0x4a,0x4a,0x8a,0xe1,
+ 0xca,0x95,0x2b,0x8c,0x0c,0x64,0x00,0x80,0x00,0x62,0x14,0x16,0x16,0xfe,
+ 0x7f,0xf6,0xec,0x59,0xb8,0x61,0xc8,0x78,0xf1,0xe2,0xc5,0x0c,0x8f,0x1e,
+ 0x3d,0x62,0x98,0x37,0x6f,0x1e,0xc9,0x86,0x03,0x04,0x10,0x13,0xb2,0x0b,
+ 0xd1,0x31,0x27,0x27,0x27,0x43,0x70,0x70,0x30,0x43,0x74,0x74,0xf4,0x7f,
+ 0x7c,0x86,0x60,0x03,0x00,0x01,0xc4,0x02,0x33,0x64,0xd7,0xae,0x5d,0x0c,
+ 0x7f,0xff,0xfe,0x05,0x63,0x0d,0x0d,0x0d,0x06,0x79,0x79,0x79,0xb0,0x38,
+ 0x3f,0x3f,0x3f,0x83,0xaf,0xaf,0x2f,0xc8,0x82,0xff,0x6b,0xd7,0xae,0x25,
+ 0xda,0xe5,0x00,0x01,0xc4,0x08,0x0c,0x5f,0x70,0x50,0xa0,0xbb,0x16,0x64,
+ 0xc1,0xba,0x75,0xeb,0x18,0xbe,0x7d,0xfb,0xc6,0xf0,0xfd,0xfb,0x77,0x86,
+ 0x77,0xef,0xde,0x31,0xbc,0x7a,0xf5,0x8a,0x61,0xcb,0x96,0x2d,0x44,0x19,
+ 0x0e,0x10,0x40,0x60,0x83,0xcf,0x9c,0x39,0xc3,0xb0,0x63,0xc7,0x0e,0xb8,
+ 0x8b,0x35,0x35,0x35,0xc1,0x2e,0xfe,0xf8,0xf1,0x23,0xc3,0xdb,0xb7,0x6f,
+ 0xc1,0x06,0xbe,0x7f,0xff,0x9e,0xe1,0xc4,0x89,0x13,0x0c,0x6e,0x6e,0x6e,
+ 0x0c,0x49,0x49,0x49,0x04,0x0d,0x07,0x08,0x20,0xb8,0xc1,0x30,0x97,0x82,
+ 0x00,0xcc,0xc5,0x5f,0xbf,0x7e,0x65,0xf8,0xf0,0xe1,0x03,0x83,0x8b,0x8b,
+ 0x0b,0x83,0xa8,0xa8,0x28,0x5c,0x0e,0x19,0x28,0x28,0x28,0x30,0x9c,0x3a,
+ 0x75,0x0a,0xc3,0x22,0x80,0x00,0x62,0x81,0x31,0xb6,0x6f,0xdf,0x0e,0x36,
+ 0xec,0xdf,0xbf,0x7f,0x60,0x0c,0x62,0xff,0xfc,0xf9,0x13,0x6c,0x38,0xc8,
+ 0xd0,0xab,0x57,0xaf,0xc2,0x35,0x21,0x3b,0x62,0xc3,0x86,0x0d,0x0c,0x65,
+ 0x65,0x65,0xff,0xbb,0xba,0xba,0x50,0x0c,0x07,0x08,0x20,0x16,0x98,0x42,
+ 0x0f,0x0f,0x0f,0xb0,0x81,0x20,0xc3,0x40,0x86,0xfe,0xfe,0xfd,0x1b,0x6c,
+ 0x28,0x28,0x6c,0x81,0xc9,0x0d,0xc5,0x50,0x64,0x36,0x0f,0x0f,0x0f,0x83,
+ 0x97,0x97,0x17,0x43,0x5e,0x5e,0xde,0xff,0x49,0x93,0x26,0xc1,0x0d,0x07,
+ 0x08,0x20,0x70,0xaa,0x00,0x19,0x08,0x8c,0x71,0x86,0x5f,0xbf,0x7e,0x81,
+ 0x0d,0x44,0x76,0x31,0x28,0xf2,0x60,0x86,0xc1,0x52,0x0e,0x48,0x5e,0x4d,
+ 0x4d,0x8d,0x41,0x51,0x51,0x11,0xcc,0x16,0x10,0x10,0x00,0x07,0x57,0x6a,
+ 0x6a,0xea,0xff,0xd9,0xb3,0x67,0x83,0x0d,0x07,0x08,0x20,0xb0,0x8b,0x3f,
+ 0x7d,0xfa,0xc4,0x60,0x61,0x61,0xc1,0xf0,0xe5,0xcb,0x17,0xb0,0x61,0x20,
+ 0x0b,0xfe,0xfc,0xf9,0xc3,0xf0,0xe3,0xc7,0x0f,0x86,0xcf,0x9f,0x3f,0xc3,
+ 0x5d,0xe7,0xea,0xea,0x8a,0x12,0x0f,0x20,0x35,0x20,0xfa,0xf8,0xf1,0xe3,
+ 0x60,0x07,0x80,0x72,0x70,0x4c,0x4c,0xcc,0xff,0x25,0x4b,0x96,0x30,0x02,
+ 0x04,0x10,0x8b,0xb8,0xb8,0x38,0xc3,0xdd,0xbb,0x77,0x19,0x98,0x99,0x99,
+ 0xc1,0x06,0x83,0x92,0x16,0xc8,0xd5,0x20,0x0c,0xb2,0x04,0xc4,0x87,0x01,
+ 0x58,0xca,0x01,0xb9,0x12,0x96,0xd6,0x8d,0x8d,0x8d,0x19,0xde,0xbc,0x79,
+ 0xc3,0xf0,0xe2,0xc5,0x0b,0x70,0xb0,0x80,0x1c,0x02,0x54,0xf7,0x1f,0x20,
+ 0x80,0x58,0xae,0x5f,0xbf,0xce,0x18,0x12,0x12,0xf2,0x9f,0x8b,0x8b,0x8b,
+ 0x81,0x89,0x89,0x09,0xee,0x5a,0x58,0x70,0x80,0xd8,0x30,0xe0,0xee,0xee,
+ 0x8e,0x12,0xce,0x20,0x39,0x16,0x16,0x16,0x06,0x76,0x76,0x76,0x06,0x6e,
+ 0x6e,0x6e,0xb0,0x0f,0x59,0x59,0x59,0x19,0x94,0x94,0x94,0x18,0x00,0x02,
+ 0x08,0x1c,0x14,0x6b,0xd6,0xac,0x61,0x04,0x46,0xd0,0x7f,0x7d,0x7d,0x7d,
+ 0xf4,0x54,0x03,0x06,0x9e,0x9e,0x9e,0xf0,0x94,0x03,0x4b,0x35,0x30,0x8b,
+ 0x41,0x86,0x81,0x7c,0x2a,0x28,0x28,0xc8,0xc0,0xc6,0xc6,0x06,0x76,0x18,
+ 0x08,0x00,0x04,0x10,0x3c,0xb9,0x11,0x48,0xf4,0xff,0x41,0xae,0x04,0x59,
+ 0x00,0x4b,0x39,0x20,0xd7,0x82,0x82,0x0b,0x64,0x28,0x28,0xe5,0x80,0x82,
+ 0x03,0x84,0x61,0x06,0x03,0x04,0x10,0x0b,0x1e,0xc3,0xd0,0x4d,0x06,0xa7,
+ 0x1c,0x90,0xa1,0x20,0x03,0x61,0xb9,0x14,0xe4,0x62,0x50,0xb2,0x04,0x95,
+ 0x29,0xa0,0x20,0x01,0xc9,0x81,0x00,0x40,0x00,0x11,0x65,0x30,0xc8,0x50,
+ 0x50,0xf6,0x36,0x37,0x37,0x07,0x47,0x0e,0xc8,0x30,0x58,0x5c,0x80,0x22,
+ 0x17,0x94,0xaa,0x40,0x18,0x64,0x01,0xc8,0x32,0x10,0x00,0x08,0x20,0xa2,
+ 0x0c,0x96,0x95,0x95,0x65,0xb8,0x7d,0xfb,0x36,0x38,0xe5,0x80,0x0c,0x86,
+ 0xa5,0x1c,0x90,0xe1,0xb0,0x94,0x03,0x13,0x03,0x56,0x1c,0x60,0x3d,0x00,
+ 0x01,0xc4,0x88,0x9e,0xf7,0x71,0x81,0xb4,0xb4,0xb4,0xff,0xa0,0xe4,0x04,
+ 0x4a,0x39,0x20,0x17,0xc3,0x52,0x0e,0xc8,0x30,0x18,0x1b,0x64,0x28,0x28,
+ 0x97,0x82,0xe4,0x01,0x02,0x88,0x68,0x83,0x41,0x00,0x94,0x3e,0x41,0x49,
+ 0x09,0x1f,0x90,0x90,0x90,0x60,0xe0,0xe3,0xe3,0x63,0x04,0x08,0x20,0x92,
+ 0x0c,0x26,0x05,0x00,0x04,0x10,0x13,0x61,0x25,0xe4,0x01,0x80,0x00,0x03,
+ 0x00,0xdb,0xac,0x42,0x6a,0x5e,0x37,0x98,0xca,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_editgrid_png_len = 735;
+static const unsigned char small_disabled_editgrid_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x02,0x6a,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x2e,0xe7,0xd0,0x06,0x00,0x18,0x04,0xa2,0x28,0x25,0xb5,0x04,0x0b,
+ 0xfb,0x6f,0x05,0x61,0x14,0x68,0x03,0xa2,0xa2,0xe2,0xbe,0x79,0xe6,0x76,
+ 0x07,0x11,0x8f,0xaa,0x42,0x55,0xcd,0x98,0x19,0xcc,0x6c,0xfd,0x96,0x99,
+ 0x63,0xee,0xfe,0x4c,0x44,0xa0,0xcf,0xb5,0x11,0x11,0x44,0xc4,0xd8,0x15,
+ 0x40,0x60,0x83,0x41,0x1a,0x67,0xce,0x9c,0xc9,0xf0,0xfe,0xfd,0x7b,0xb0,
+ 0x01,0x47,0x8e,0x1c,0x61,0xd8,0xbb,0x77,0xef,0x7f,0x67,0x67,0x67,0x46,
+ 0x90,0xdc,0xd4,0xa9,0x53,0xe1,0x72,0x47,0x8f,0x1e,0x45,0x91,0xeb,0xef,
+ 0xef,0x87,0xcb,0x1d,0x3f,0x7e,0x1c,0x2e,0x07,0x10,0x40,0x60,0x83,0x41,
+ 0x82,0x20,0x49,0x4e,0x4e,0x4e,0x06,0x01,0x01,0x01,0x06,0x11,0x11,0x11,
+ 0x06,0x05,0x05,0x05,0xb0,0x97,0x40,0xae,0x01,0xc9,0x71,0x70,0x70,0x80,
+ 0x5d,0x2b,0x2c,0x2c,0x0c,0x97,0x83,0xe9,0x83,0xc9,0x09,0x0a,0x0a,0xc2,
+ 0xe5,0x00,0x02,0x88,0x09,0xa6,0x00,0x16,0x04,0xcc,0xcc,0xcc,0x60,0x6f,
+ 0xc1,0x00,0x88,0x4d,0x8c,0x1c,0x8c,0x0f,0x03,0x00,0x01,0xa8,0xa0,0x63,
+ 0x1b,0x00,0x80,0x10,0x06,0x62,0xfb,0x0f,0x9a,0xb0,0xc6,0xcb,0x5f,0x20,
+ 0x51,0x9b,0xe2,0xc2,0x2f,0x06,0xe6,0x2b,0x85,0x49,0xf6,0xc0,0xdf,0xcc,
+ 0x57,0xca,0xda,0x1e,0x33,0x5f,0x29,0x9b,0x99,0xb5,0x27,0x80,0x18,0x61,
+ 0xa9,0x02,0x14,0x36,0x30,0x6f,0x80,0x80,0xa2,0xa2,0x22,0x28,0x72,0x18,
+ 0xc9,0x95,0x03,0x08,0x20,0x46,0x5a,0x25,0x37,0x80,0x00,0x42,0x49,0x6e,
+ 0xc8,0xc9,0xe6,0xce,0x9d,0x3b,0x58,0x93,0x1b,0x72,0x92,0x82,0x25,0x37,
+ 0x98,0x1c,0x17,0x17,0x17,0xc3,0xc3,0x87,0x0f,0xc1,0x72,0x00,0x01,0x04,
+ 0x4f,0x6e,0xa0,0x24,0xf5,0xee,0xdd,0x3b,0xbc,0x49,0x0a,0xa4,0x19,0x39,
+ 0x49,0x81,0x0c,0x6d,0x69,0x69,0x81,0xcb,0x9d,0x3e,0x7d,0x1a,0x2e,0x07,
+ 0x10,0x40,0xf0,0xe4,0x06,0x32,0x14,0x96,0x6c,0x90,0x93,0x1b,0xba,0x9c,
+ 0x90,0x90,0x10,0x86,0x1c,0x3b,0x3b,0x3b,0x03,0x0f,0x0f,0x0f,0x38,0xa9,
+ 0xc2,0xe4,0x00,0x02,0x08,0x9c,0xdc,0x88,0x4d,0x52,0x8c,0x8c,0x8c,0x28,
+ 0x72,0x7f,0xfe,0xfc,0x01,0xcb,0x81,0x0c,0x45,0x97,0x03,0x08,0x20,0x78,
+ 0x72,0x03,0x79,0x1f,0x96,0xdc,0x90,0x93,0x14,0x48,0x13,0xc8,0xfb,0x20,
+ 0x97,0x62,0x93,0x03,0x79,0x1f,0xe4,0x52,0x90,0xdc,0xcb,0x97,0x2f,0xe1,
+ 0x72,0x00,0x01,0x44,0xb3,0xe4,0x06,0x10,0x40,0x34,0x4b,0x6e,0x00,0x01,
+ 0x84,0x51,0xba,0x81,0xbc,0x04,0xf2,0xe2,0xbd,0x7b,0xf7,0x30,0x92,0x14,
+ 0x28,0x4c,0x41,0x72,0x0f,0x1e,0x3c,0x80,0xcb,0x89,0x8b,0x8b,0xc3,0xe5,
+ 0x40,0xc9,0xed,0xf1,0xe3,0xc7,0x60,0x39,0x80,0x00,0x02,0x1b,0x0c,0xd2,
+ 0xd8,0xd7,0xd7,0x07,0x2f,0xa5,0x8e,0x1d,0x3b,0x86,0x92,0xa4,0x9a,0x9b,
+ 0x9b,0xe1,0x72,0xa7,0x4e,0x9d,0x82,0xcb,0x81,0x0c,0x2d,0x2b,0x2b,0x63,
+ 0xf8,0xf8,0xf1,0x23,0x58,0xee,0xc2,0x85,0x0b,0x70,0x39,0x80,0x00,0x42,
+ 0x29,0xdd,0x40,0x49,0x8a,0x8f,0x8f,0x0f,0xa3,0x04,0x83,0x25,0x37,0x6e,
+ 0x6e,0x6e,0x94,0x12,0x0c,0x24,0x07,0x32,0x94,0x8d,0x8d,0x0d,0x2c,0x07,
+ 0x4a,0x04,0x30,0x39,0x80,0x00,0x42,0x49,0x6e,0x20,0x43,0x41,0xc9,0x06,
+ 0xe4,0x2d,0x18,0x80,0x25,0x29,0x90,0x46,0x5c,0xc9,0x0d,0x24,0x07,0x0c,
+ 0x16,0x30,0x1b,0x06,0x00,0x02,0x08,0xec,0x62,0x90,0x81,0x20,0xef,0xc3,
+ 0x92,0x14,0x72,0x29,0x05,0xd2,0x04,0x4a,0x52,0xb0,0x12,0x0c,0x39,0x49,
+ 0x81,0xc2,0x14,0xe4,0x7d,0x90,0x4b,0x41,0x86,0xbe,0x7e,0xfd,0x1a,0x2e,
+ 0x07,0x10,0x40,0x34,0x4b,0x6e,0x00,0x01,0x44,0xb3,0xe4,0x06,0x10,0x60,
+ 0x00,0xd8,0x8f,0xea,0x4f,0x23,0xea,0x8f,0x33,0x00,0x00,0x00,0x00,0x49,
+ 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_edithlayout_png_len = 601;
+static const unsigned char small_disabled_edithlayout_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x01,0xe4,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0xd1,0xc4,0x54,0x20,0x00,0x08,0x20,0x9a,0x19,0x0c,0x10,0x40,
+ 0x34,0x33,0x18,0x20,0x80,0x68,0x66,0x30,0x40,0x00,0xd1,0xcc,0x60,0x80,
+ 0x00,0xa2,0x99,0xc1,0x00,0x01,0x98,0xa4,0x63,0x14,0x80,0x81,0x10,0x0a,
+ 0xa2,0x3f,0x4b,0xba,0x05,0x2d,0xc5,0xfb,0xdf,0x4a,0xac,0x3c,0x87,0xba,
+ 0x21,0x16,0x21,0xf5,0x83,0xa9,0xe6,0x9e,0xfa,0x5a,0x47,0x55,0xf1,0xae,
+ 0x57,0x55,0x60,0x66,0x98,0xd9,0xf5,0xb7,0xee,0x1e,0x23,0x22,0xb8,0xfb,
+ 0x67,0x22,0x32,0x96,0x99,0xd8,0x7b,0x23,0x22,0xc6,0x1e,0x01,0x78,0x98,
+ 0x63,0x23,0x00,0x60,0x08,0x80,0xa2,0xb2,0x85,0x7d,0xec,0x65,0x0b,0x8d,
+ 0x5d,0x54,0xb4,0x46,0x71,0x46,0x48,0x8e,0x22,0xf5,0xbb,0xff,0x77,0x3c,
+ 0xa1,0xaa,0x42,0x77,0xef,0xdc,0xdd,0xc1,0xcc,0x2e,0x11,0x9d,0x31,0x11,
+ 0x81,0xaa,0xda,0x41,0x44,0x7c,0x43,0x44,0x60,0xe6,0xb5,0x19,0x67,0xe6,
+ 0xb7,0x27,0x00,0x0f,0x64,0x74,0x03,0x00,0x10,0xc1,0xd0,0xce,0x80,0x01,
+ 0xec,0xbf,0x95,0x98,0x01,0xbf,0x77,0x24,0x7c,0xbf,0xa4,0xaf,0xed,0x5c,
+ 0xd1,0x61,0xdf,0x84,0xaa,0x02,0x33,0x43,0x44,0xa0,0xaa,0x58,0x66,0x66,
+ 0xc8,0xcc,0x59,0x42,0x44,0xc7,0x5a,0xe4,0xee,0x88,0x88,0x69,0xdb,0x7c,
+ 0xd9,0x13,0x40,0x2c,0x30,0xcd,0xac,0xac,0xac,0x60,0x43,0x41,0x18,0xa4,
+ 0x08,0x19,0x30,0x33,0x33,0xc3,0x0d,0x65,0x67,0x67,0xc7,0x08,0x4f,0x1e,
+ 0x1e,0x1e,0xb0,0x3e,0x36,0x36,0x36,0xb8,0x18,0x40,0x00,0xa1,0x44,0x1e,
+ 0xc8,0x02,0x10,0x06,0xb9,0x04,0x19,0x80,0xf8,0x20,0x71,0x90,0x77,0x41,
+ 0x18,0x19,0x80,0xc2,0x1d,0x24,0x8f,0xae,0x07,0x20,0x80,0xe0,0x06,0x83,
+ 0x5c,0x09,0x72,0x11,0xc8,0x75,0xc8,0xe5,0x07,0x88,0xcd,0xc9,0xc9,0x09,
+ 0x76,0x15,0x23,0x23,0x23,0xd8,0x20,0x64,0x39,0x90,0x0f,0x40,0x7a,0x39,
+ 0x38,0x38,0x50,0x0c,0x06,0x08,0x20,0x16,0x98,0x8b,0x7e,0xfd,0xfa,0x05,
+ 0xc6,0x20,0x17,0x7d,0xfa,0xf4,0x09,0xc5,0x45,0xa0,0xb0,0x07,0x61,0x50,
+ 0x58,0x7e,0xfc,0xf8,0x11,0x2e,0xf7,0xfb,0xf7,0x6f,0x86,0x9f,0x3f,0x7f,
+ 0x82,0xd5,0xbc,0x7a,0xf5,0x0a,0x1c,0x0f,0x30,0x00,0x10,0x40,0x60,0x83,
+ 0x41,0x49,0x08,0x94,0x12,0x40,0xe1,0x04,0x52,0xf4,0xf4,0xe9,0x53,0xb8,
+ 0x02,0x90,0x6b,0x8e,0x1d,0x3b,0x06,0x0e,0x63,0x90,0x41,0x2f,0x5e,0xbc,
+ 0x80,0xcb,0x81,0x7c,0x72,0xf9,0xf2,0x65,0x06,0x01,0x01,0x01,0xb0,0xe3,
+ 0xde,0xbc,0x79,0x03,0x97,0x03,0x08,0x20,0x46,0x98,0xb7,0x41,0xc9,0x04,
+ 0x16,0xa3,0x20,0xa0,0xa8,0xa8,0x08,0x4a,0xa7,0x8c,0xe4,0xca,0x01,0x04,
+ 0x10,0x23,0xad,0xca,0x63,0x80,0x00,0xa2,0x59,0x96,0x06,0x08,0x20,0x9a,
+ 0x19,0x0c,0x10,0x40,0x34,0x33,0x18,0x20,0x80,0x68,0x66,0x30,0x40,0x00,
+ 0xd1,0xcc,0x60,0x80,0x00,0x03,0x00,0x1a,0x11,0xec,0xf2,0x8a,0xf2,0x73,
+ 0x35,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_edithlayoutsplit_png_len = 754;
+static const unsigned char small_disabled_edithlayoutsplit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x02,0x7d,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0xb1,0xe0,0x93,0x64,0x62,0x62,0xfa,0x2f,0x29,0x29,0xc9,0x00,0xb2,
+ 0x1c,0xd9,0x01,0xff,0xfe,0xfd,0x63,0xe0,0xe3,0xe3,0x63,0xb8,0x7d,0xfb,
+ 0x36,0x23,0x2e,0xbd,0x00,0x01,0x84,0xd7,0x60,0x90,0xa1,0xb3,0x66,0xcd,
+ 0x62,0x78,0xf4,0xe8,0x11,0x03,0x2b,0x2b,0x2b,0x58,0x8c,0x9b,0x9b,0x9b,
+ 0xe1,0xd7,0xaf,0x5f,0x0c,0x87,0x0f,0x1f,0x66,0xd8,0xbb,0x77,0xef,0x7f,
+ 0x67,0x67,0x67,0xac,0x86,0x03,0x04,0x10,0x5e,0x83,0x41,0xae,0x7c,0xff,
+ 0xfe,0x3d,0x03,0x0b,0x0b,0x0b,0x83,0xb0,0xb0,0x30,0x98,0x2f,0x24,0x24,
+ 0x04,0x36,0x18,0xc4,0x57,0x50,0x50,0xc0,0xa9,0x17,0x20,0x80,0xf0,0x1a,
+ 0xfc,0xf7,0xef,0x5f,0xb0,0x61,0xd2,0xd2,0xd2,0x0c,0xc6,0xc6,0xc6,0x0c,
+ 0xf7,0xef,0xdf,0x67,0x60,0x66,0x66,0x66,0xf8,0xf3,0xe7,0x0f,0x58,0x0e,
+ 0x1f,0x00,0x08,0x20,0x26,0x7c,0x92,0xa0,0x70,0x04,0x79,0xd9,0xde,0xde,
+ 0x1e,0x1c,0xae,0x1c,0x1c,0x1c,0x0c,0xdb,0xb7,0x6f,0x67,0xd8,0xb1,0x63,
+ 0x07,0xc3,0xd3,0xa7,0x4f,0xf1,0x1a,0x0c,0x10,0x40,0x8c,0x84,0x52,0x05,
+ 0x30,0x28,0xfe,0x7f,0xff,0xfe,0x1d,0x1c,0x24,0x77,0xef,0xde,0x65,0xf8,
+ 0xf8,0xf1,0x23,0x83,0x95,0x95,0x15,0x58,0x4e,0x51,0x51,0x11,0x14,0xc1,
+ 0x58,0xc3,0x18,0x20,0x80,0xf0,0x1a,0xfc,0xf8,0xf1,0xe3,0xff,0x3f,0x7e,
+ 0xfc,0x60,0xf8,0xf0,0xe1,0x03,0xc3,0x83,0x07,0x0f,0x18,0x9e,0x3c,0x79,
+ 0xc2,0x00,0xb2,0x84,0x9f,0x9f,0x9f,0x21,0x3b,0x3b,0x1b,0x67,0x8a,0x00,
+ 0x01,0x80,0x00,0x22,0xe8,0xe2,0xa0,0xa0,0x20,0xb0,0x82,0xf8,0xf8,0x78,
+ 0x86,0x85,0x0b,0x17,0xa2,0xc8,0xad,0x5b,0xb7,0x0e,0xa7,0xe1,0x00,0x01,
+ 0x04,0x4f,0xa3,0x84,0xf0,0xc5,0x8b,0x17,0xff,0x07,0x06,0x06,0xfe,0x27,
+ 0x56,0x3d,0x40,0x00,0x1a,0xe9,0xd8,0x06,0x00,0x18,0x84,0x81,0xa0,0x2b,
+ 0x2a,0xe6,0x62,0x5e,0x96,0xa3,0x40,0x14,0x04,0x5b,0x0a,0x1b,0xe0,0x3f,
+ 0xa9,0xb8,0xda,0x3b,0x33,0xe8,0x6e,0xd5,0x66,0xf9,0xdb,0x4e,0x76,0xcd,
+ 0x0c,0x99,0x89,0xf3,0x0a,0x77,0x97,0x5d,0x46,0xfd,0xae,0x79,0x0c,0xcb,
+ 0x89,0xaa,0x0a,0x11,0xa1,0x2f,0x9e,0x00,0x82,0x07,0x05,0xcc,0xcb,0xb8,
+ 0x40,0x5d,0x5d,0x1d,0x43,0x53,0x53,0x13,0xde,0x60,0x43,0x0e,0x22,0x80,
+ 0x00,0x22,0x3a,0x28,0x40,0xbe,0x22,0x25,0x28,0x00,0x02,0x08,0x6f,0xe4,
+ 0xbd,0x7a,0xf5,0xea,0x3f,0xc8,0xcb,0x20,0xaf,0x7e,0xf9,0xf2,0x85,0xe1,
+ 0xe5,0xcb,0x97,0x0c,0xcf,0x9e,0x3d,0x63,0xf8,0xf6,0xed,0x1b,0x43,0x54,
+ 0x54,0x14,0xde,0x54,0x01,0x10,0x40,0x04,0x53,0x05,0x30,0xed,0xfe,0x07,
+ 0x85,0xfb,0xf3,0xe7,0xcf,0x19,0xae,0x5f,0xbf,0x0e,0xa6,0x2f,0x5f,0xbe,
+ 0x8c,0xf0,0x32,0x0e,0x00,0x10,0x40,0x04,0x4b,0x37,0x71,0x71,0x71,0x86,
+ 0x99,0x33,0x67,0x82,0x33,0xc7,0xbd,0x7b,0xf7,0xc0,0x85,0x12,0xc8,0x31,
+ 0x62,0x62,0x62,0x78,0x1d,0x04,0x10,0x40,0x78,0xb3,0x34,0xc8,0xd0,0xfa,
+ 0xfa,0x7a,0x86,0x93,0x27,0x4f,0x32,0x80,0x32,0xca,0xae,0x5d,0xbb,0x18,
+ 0x94,0x94,0x94,0x18,0x8a,0x8a,0x8a,0x18,0xf4,0xf5,0xf5,0xc1,0x29,0x04,
+ 0x97,0x5e,0x80,0x00,0xc2,0xeb,0x62,0x50,0xd8,0xbe,0x7d,0xfb,0x16,0x91,
+ 0x36,0x81,0xa5,0x5c,0x4a,0x4a,0x0a,0x38,0x49,0x0a,0x08,0x08,0xe0,0x2d,
+ 0xdd,0x00,0x02,0x08,0xaf,0xc1,0xa0,0x52,0x0c,0x84,0x41,0x45,0x25,0xa8,
+ 0x98,0x04,0xb9,0x14,0x54,0x10,0x01,0x23,0x15,0x6c,0x29,0x3e,0x00,0x10,
+ 0x40,0x78,0x0d,0x06,0x15,0xea,0x67,0xcf,0x9e,0x05,0x97,0x0d,0xa0,0x8c,
+ 0x02,0x03,0xa0,0x54,0xf1,0xe6,0xcd,0x1b,0xbc,0x06,0x03,0x04,0x10,0xc1,
+ 0x54,0x01,0x0a,0x47,0x5c,0x5e,0xc6,0x57,0xba,0x01,0x04,0x10,0x41,0x83,
+ 0xc9,0x05,0x00,0x01,0x06,0x00,0x15,0xce,0x9c,0x41,0x6d,0xbf,0xbf,0x0b,
+ 0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_editpaste_png_len = 901;
+static const unsigned char small_disabled_editpaste_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x03,0x10,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0x11,0x52,0xc0,0xc8,0xc8,0xf8,0x9f,0x8f,0x8f,0xef,0xbf,0x92,
+ 0x92,0x12,0x49,0x2e,0x00,0x08,0x20,0x46,0x7c,0x2e,0x06,0x19,0xea,0xe5,
+ 0xe5,0xc5,0x90,0x92,0x92,0xc2,0xf0,0xf8,0xf1,0x63,0x86,0xfd,0xfb,0xf7,
+ 0x33,0xac,0x5f,0xbf,0x9e,0x91,0x18,0x83,0x01,0x02,0x08,0x6c,0x30,0x13,
+ 0x13,0xd3,0x7f,0x7e,0x7e,0x7e,0x06,0x74,0x4b,0x6c,0x6c,0x6c,0x18,0x12,
+ 0x12,0x12,0x18,0xbe,0x7c,0xf9,0x02,0x52,0xc3,0xf0,0xfa,0xf5,0x6b,0x86,
+ 0xcd,0x9b,0x37,0x33,0x5c,0xb8,0x70,0x01,0x45,0x9d,0x90,0x90,0x10,0xc3,
+ 0xbd,0x7b,0xf7,0x50,0x2c,0x04,0x08,0x20,0x46,0x90,0xab,0x1c,0x1c,0x1c,
+ 0x18,0x42,0x43,0x43,0x19,0x7e,0xff,0xfe,0x0d,0x16,0xbc,0x73,0xe7,0x0e,
+ 0x83,0xaf,0xaf,0x2f,0xc3,0xa7,0x4f,0x9f,0xc0,0x2e,0x05,0x6a,0x62,0x30,
+ 0x34,0x34,0x64,0x60,0x63,0x63,0x03,0x5b,0x72,0xf5,0xea,0x55,0x06,0x15,
+ 0x15,0x15,0xb0,0xda,0xbf,0x7f,0xff,0x32,0x3c,0x7b,0xf6,0x0c,0xac,0x07,
+ 0xd9,0x37,0x00,0x01,0xc4,0x04,0x72,0x29,0xc8,0x50,0x90,0x21,0x9f,0x3f,
+ 0x7f,0x06,0x2b,0x70,0x73,0x73,0x63,0xf8,0xfa,0xf5,0x2b,0xc3,0xab,0x57,
+ 0xaf,0xc0,0x86,0x82,0xc0,0xf9,0xf3,0xe7,0xe1,0x06,0xc9,0xcb,0xcb,0x83,
+ 0xd5,0x81,0xd4,0x7f,0xfb,0xf6,0x8d,0x81,0x93,0x93,0x93,0x41,0x58,0x58,
+ 0x98,0xa1,0xb1,0xb1,0x11,0xee,0x65,0x80,0x00,0x62,0x01,0x79,0x1f,0xe4,
+ 0xd2,0x3f,0x7f,0xfe,0xc0,0xbd,0xf1,0xfc,0xf9,0x73,0xb0,0xcb,0x7e,0xfc,
+ 0xf8,0xc1,0x20,0x27,0x27,0xc7,0xc0,0xcd,0xcd,0x0d,0x0e,0x8a,0x37,0x6f,
+ 0xde,0x80,0x0d,0xc2,0x06,0xb8,0xb8,0xb8,0x18,0x6c,0x6d,0x6d,0xe1,0x7c,
+ 0x80,0x00,0x62,0x41,0x57,0x20,0x2e,0x2e,0xce,0x70,0xf9,0xf2,0x65,0x3c,
+ 0xd1,0x82,0x50,0x87,0x0f,0x00,0x04,0x10,0x86,0xc1,0xc4,0x68,0x22,0x06,
+ 0x00,0x04,0x10,0xc1,0x74,0x4c,0x2e,0x00,0x08,0x20,0xac,0x2e,0x46,0x06,
+ 0xb5,0xb5,0xb5,0x0c,0xa2,0xa2,0xa2,0x70,0x3e,0x2c,0x49,0x82,0x68,0x18,
+ 0x06,0xf9,0xd0,0xc5,0xc5,0x05,0x45,0x1f,0x40,0x00,0xe1,0x35,0x18,0x64,
+ 0x68,0x6c,0x6c,0x2c,0x43,0x67,0x67,0x27,0xd8,0x80,0x7f,0xff,0xfe,0xc1,
+ 0x69,0x18,0xde,0xb5,0x6b,0x17,0x38,0xf5,0x48,0x4b,0x4b,0xa3,0xe8,0x05,
+ 0x08,0x20,0xbc,0x06,0x83,0x5c,0x0a,0x32,0xf4,0xf4,0xe9,0xd3,0x0c,0x3f,
+ 0x7f,0xfe,0x04,0xa7,0x1e,0x58,0x0a,0x52,0x50,0x50,0x00,0xa7,0x18,0x10,
+ 0x1b,0xe4,0xda,0xc3,0x87,0x0f,0x33,0x28,0x2a,0x2a,0xc2,0xf5,0x02,0x04,
+ 0x10,0xc1,0xa0,0x00,0xb9,0xd0,0xc8,0xc8,0x08,0xc5,0x95,0xb0,0x20,0x00,
+ 0xa5,0x69,0x10,0xff,0xd7,0xaf,0x5f,0x60,0x17,0xcf,0x9e,0x3d,0x9b,0xc1,
+ 0xc9,0xc9,0x09,0xac,0x0f,0x20,0x80,0x08,0x1a,0x0c,0xd2,0x78,0xf0,0xe0,
+ 0x41,0xb0,0x8b,0x41,0x06,0x80,0x5c,0x08,0x32,0x50,0x4d,0x4d,0x0d,0xec,
+ 0x6a,0x90,0xfc,0xb1,0x63,0xc7,0xc0,0x19,0x0a,0x94,0xd9,0x02,0x03,0x03,
+ 0xff,0x83,0x72,0x20,0x40,0x00,0xe1,0x35,0x18,0x16,0x9e,0xd6,0xd6,0xd6,
+ 0x70,0xd7,0x21,0x87,0x35,0xc8,0x12,0x2b,0x2b,0x2b,0x86,0x0f,0x1f,0x3e,
+ 0x30,0xbc,0x7f,0xff,0x9e,0xe1,0xe3,0xc7,0x8f,0x0c,0x87,0x0e,0x1d,0x62,
+ 0x58,0xb1,0x62,0xc5,0x7f,0x80,0x00,0x02,0x1b,0x0c,0xd2,0x84,0xcb,0x60,
+ 0x90,0xdc,0xd6,0xad,0x5b,0xc1,0xb9,0x10,0x64,0x10,0x2c,0x38,0x60,0xbe,
+ 0x01,0xf9,0x04,0x94,0x1b,0x41,0x59,0x1a,0x94,0xfb,0x98,0x99,0x99,0x19,
+ 0xb4,0xb4,0xb4,0x18,0x00,0x02,0x88,0x05,0x54,0x32,0x81,0x0a,0x11,0x50,
+ 0x7e,0xc7,0x66,0x30,0xc8,0x30,0x50,0x56,0xfd,0xfe,0xfd,0x3b,0xd8,0x70,
+ 0x90,0x45,0x30,0x87,0x80,0x68,0x90,0x38,0xc8,0xa5,0x20,0x57,0x83,0xca,
+ 0x1b,0x90,0x1a,0x10,0x00,0x08,0x20,0x16,0x50,0x71,0x07,0x0a,0x17,0x98,
+ 0x8d,0xe8,0x06,0x83,0x34,0x6d,0xd8,0xb0,0x01,0xac,0x01,0x94,0x22,0x40,
+ 0x86,0xc1,0xd2,0x32,0xc8,0xc5,0x20,0x31,0x90,0xe1,0x02,0x02,0x02,0x0c,
+ 0x3c,0x3c,0x3c,0xf0,0x32,0x07,0x20,0x80,0xc0,0x41,0x01,0x0a,0x6c,0x50,
+ 0xc9,0x84,0x5c,0x88,0x80,0xc0,0xbe,0x7d,0xfb,0x18,0xee,0xde,0xbd,0xcb,
+ 0x60,0x60,0x60,0x00,0x2e,0x94,0x40,0x06,0x80,0x0c,0x82,0x05,0x05,0xc8,
+ 0x12,0x50,0x50,0x80,0x2c,0x05,0xc9,0x81,0x22,0x17,0x06,0x00,0x02,0x08,
+ 0x6f,0x0d,0x02,0x02,0x51,0x51,0x51,0xff,0x41,0x2e,0x01,0x96,0xdb,0x60,
+ 0x43,0x60,0x91,0x88,0x1c,0x07,0xb0,0xb0,0x07,0xa9,0x59,0xb2,0x64,0x09,
+ 0x58,0x1d,0x40,0x00,0x11,0x34,0x18,0x04,0x40,0xb1,0x0c,0x8a,0x10,0x62,
+ 0x80,0xac,0xac,0x2c,0x83,0xa0,0xa0,0x20,0x23,0x40,0x80,0x01,0x00,0x44,
+ 0x54,0xe5,0xc1,0x18,0x2f,0x14,0x22,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,
+ 0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_editvlayout_png_len = 617;
+static const unsigned char small_disabled_editvlayout_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x01,0xf4,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0xb1,0xe0,0x93,0x64,0x62,0x62,0xfa,0x2f,0x29,0x29,0xc9,0x00,0xb2,
+ 0x1c,0xd9,0x01,0xff,0xfe,0xfd,0x63,0xe0,0xe3,0xe3,0x63,0xb8,0x7d,0xfb,
+ 0x36,0x23,0x2e,0xbd,0x00,0x01,0x84,0xd7,0x60,0x90,0xa1,0xb3,0x66,0xcd,
+ 0x62,0x78,0xf4,0xe8,0x11,0x03,0x2b,0x2b,0x2b,0x58,0x8c,0x9b,0x9b,0x9b,
+ 0xe1,0xd7,0xaf,0x5f,0x0c,0x87,0x0f,0x1f,0x66,0xd8,0xbb,0x77,0xef,0x7f,
+ 0x67,0x67,0x67,0xac,0x86,0x03,0x04,0x10,0x5e,0x83,0x41,0xae,0x7c,0xff,
+ 0xfe,0x3d,0x03,0x0b,0x0b,0x0b,0x83,0xb0,0xb0,0x30,0x98,0x2f,0x24,0x24,
+ 0x04,0x36,0x18,0xc4,0x57,0x50,0x50,0xc0,0xa9,0x17,0x20,0x80,0xf0,0x1a,
+ 0xfc,0xf7,0xef,0x5f,0xb0,0x61,0xd2,0xd2,0xd2,0x70,0x83,0x99,0x99,0x99,
+ 0x19,0xfe,0xfc,0xf9,0x03,0x96,0xc3,0x07,0x00,0x02,0x08,0xaf,0xc1,0xfc,
+ 0xfc,0xfc,0x60,0x2f,0x8b,0x88,0x88,0x80,0x83,0x00,0x14,0xb6,0x20,0xc3,
+ 0x3f,0x7d,0xfa,0xc4,0xf0,0xf4,0xe9,0x53,0xbc,0x06,0x03,0x04,0x10,0x23,
+ 0xa1,0x54,0x01,0x0a,0x47,0x5c,0x5e,0x56,0x54,0x54,0x04,0x45,0x30,0xd6,
+ 0x30,0x06,0x08,0x20,0x82,0x06,0x93,0x0b,0x00,0x02,0x88,0xe8,0xe4,0x06,
+ 0x03,0x20,0x36,0x28,0x7c,0x41,0x41,0x73,0xff,0xfe,0x7d,0x9c,0xc9,0x0d,
+ 0x20,0x80,0x08,0x26,0xb7,0xa9,0x53,0xa7,0x32,0x3c,0x7c,0xf8,0x10,0x1c,
+ 0x69,0xa0,0x30,0xe6,0xe4,0xe4,0x64,0xf8,0xfe,0xfd,0x3b,0xc3,0xb1,0x63,
+ 0xc7,0xf0,0x26,0x37,0x80,0x00,0xc2,0x6b,0x30,0xc8,0xa0,0xb7,0x6f,0xdf,
+ 0x82,0x5c,0x0e,0x8e,0x48,0x90,0x6b,0x79,0x78,0x78,0xc0,0x06,0x83,0xf8,
+ 0xf8,0x92,0x1b,0x40,0x00,0x11,0x4c,0x6e,0x20,0xc3,0xc5,0xc5,0xc5,0xc1,
+ 0xe9,0x17,0x94,0xcc,0x18,0x19,0x19,0x19,0xbe,0x7e,0xfd,0xca,0xf0,0xfb,
+ 0xf7,0x6f,0x7c,0x5a,0x19,0x00,0x02,0x08,0xaf,0xc1,0xa0,0x6c,0x7b,0xe4,
+ 0xc8,0x11,0xb0,0xa1,0xec,0xec,0xec,0xf0,0xf4,0xfb,0xf1,0xe3,0x47,0x86,
+ 0x17,0x2f,0x5e,0xe0,0x35,0x18,0x20,0x80,0x68,0x96,0xdc,0x00,0x02,0x88,
+ 0x66,0xc9,0x0d,0x20,0x80,0x08,0x26,0x37,0x09,0x09,0x09,0x70,0x38,0xc3,
+ 0x00,0xc8,0x21,0xa0,0xf0,0x05,0xa5,0x0e,0x60,0xee,0xc3,0x99,0xdc,0x00,
+ 0x02,0x08,0xaf,0xc1,0xa0,0x48,0xab,0xab,0xab,0x63,0x78,0xfc,0xf8,0x31,
+ 0x98,0x0f,0x0a,0x5f,0x50,0x58,0xff,0xfc,0xf9,0x93,0xe1,0xf2,0xe5,0xcb,
+ 0x78,0x93,0x1b,0x40,0x00,0x11,0x95,0xdc,0x60,0xc9,0x0c,0xc4,0x07,0x65,
+ 0x0c,0x90,0x05,0x02,0x02,0x02,0x78,0x93,0x1b,0x40,0x00,0xe1,0x35,0x18,
+ 0x94,0x0a,0x40,0x18,0x94,0x2a,0x40,0xa5,0x1b,0xc8,0x60,0x0e,0x0e,0x0e,
+ 0x86,0x57,0xaf,0x5e,0xa1,0x04,0x0f,0x36,0x00,0x10,0x40,0x78,0x0d,0x06,
+ 0xb9,0xee,0xec,0xd9,0xb3,0xe0,0xcc,0xc0,0xc6,0xc6,0x06,0x17,0xff,0xf6,
+ 0xed,0x1b,0xc3,0x9b,0x37,0x6f,0xf0,0x1a,0x0c,0x10,0x40,0x34,0x4b,0x6e,
+ 0x00,0x01,0x44,0xb3,0xe4,0x06,0x10,0x60,0x00,0xc0,0x62,0xf3,0xb9,0xf2,
+ 0x11,0x7d,0x86,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
+ 0x82
+};
+
+static const unsigned int small_disabled_editvlayoutsplit_png_len = 752;
+static const unsigned char small_disabled_editvlayoutsplit_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x02,0x7b,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0x11,0xab,0xf0,0xfe,0xfd,0xfb,0x24,0xb9,0x00,0x20,0x80,0x88,
+ 0x36,0xf8,0xf7,0xef,0xdf,0x0c,0x41,0x41,0x41,0x44,0x1b,0x0e,0x10,0x40,
+ 0x44,0x1b,0xfc,0xf3,0xe7,0x4f,0x62,0x95,0x82,0x01,0x40,0x00,0x11,0x6d,
+ 0xf0,0xdf,0xbf,0x7f,0x49,0x32,0x18,0x20,0x80,0x88,0x36,0x98,0x99,0x99,
+ 0x99,0x24,0x83,0x01,0x02,0x88,0x68,0x83,0x99,0x98,0x88,0x56,0x0a,0x06,
+ 0x00,0x01,0x78,0xa4,0x63,0x14,0x00,0x62,0x10,0x88,0xa2,0x0a,0x6b,0x25,
+ 0xa4,0x8c,0xa4,0xf0,0xfe,0x87,0xb2,0xd3,0xce,0x33,0x84,0x18,0x5c,0x96,
+ 0xed,0xff,0x2b,0x06,0xe6,0xf9,0x50,0xad,0xb5,0xa0,0xaf,0xd7,0x93,0xc7,
+ 0x18,0x60,0x66,0x18,0x11,0xa5,0xaa,0xd8,0x0d,0x11,0xfd,0x28,0x33,0x6b,
+ 0xce,0x89,0xed,0x44,0x04,0xce,0x39,0xb0,0xf7,0x06,0x66,0x06,0x77,0x7f,
+ 0xfb,0x2b,0x80,0xc0,0x06,0x83,0x0c,0x9d,0x35,0x6b,0x16,0xc3,0xfb,0xf7,
+ 0xef,0xc1,0x86,0x1f,0x3e,0x7c,0x18,0xc4,0xfe,0xff,0xe3,0xc7,0x0f,0x70,
+ 0x4a,0x58,0xb7,0x6e,0x1d,0x23,0x1b,0x1b,0x1b,0xdc,0x60,0x90,0x25,0x77,
+ 0xef,0xde,0x05,0x1b,0x5a,0x5f,0x5f,0xcf,0xf0,0xf6,0xed,0x5b,0xb0,0xc1,
+ 0x67,0xcf,0x9e,0x65,0xd8,0xbb,0x77,0xef,0x7f,0x67,0x67,0x67,0x46,0x80,
+ 0x00,0x3c,0x8f,0xa1,0x11,0x00,0x30,0x08,0x03,0xb3,0x01,0x82,0x05,0xd8,
+ 0x18,0xcd,0x16,0x8c,0x86,0xe1,0xb0,0x85,0x88,0xba,0x17,0xb9,0x24,0x4f,
+ 0xbf,0x2b,0xdb,0x25,0xcc,0x0c,0x54,0x15,0xee,0x4e,0xae,0xaa,0x5f,0x96,
+ 0x99,0x9f,0xef,0xe1,0x99,0x45,0x04,0xd6,0x0a,0xdd,0xcd,0xb7,0x22,0x02,
+ 0x33,0x63,0xe6,0x09,0x20,0x16,0x98,0xc1,0x20,0x57,0x80,0x0c,0x35,0x36,
+ 0x36,0x66,0xf8,0xf4,0xe9,0x13,0xd8,0xf5,0x0f,0x1e,0x3c,0x60,0x88,0x8f,
+ 0x8f,0x67,0xb8,0x74,0xe9,0x12,0xc8,0x15,0x0c,0x0e,0x0e,0x0e,0x20,0xb1,
+ 0xff,0x8c,0x8c,0x8c,0x0c,0xcf,0x9f,0x3f,0x07,0xb9,0x9a,0x81,0x87,0x87,
+ 0x07,0xac,0x1f,0xa4,0x17,0xd9,0x57,0x00,0x01,0xc4,0x82,0x1c,0xe0,0x20,
+ 0x05,0xc0,0x1c,0xc6,0xc0,0xc1,0xc1,0x01,0xf6,0xc1,0x93,0x27,0x4f,0xc0,
+ 0xc1,0x02,0x02,0x20,0x03,0xbe,0x7c,0xf9,0x02,0x66,0x57,0x54,0x54,0x30,
+ 0x5c,0xbf,0x7e,0x9d,0xe1,0xde,0xbd,0x7b,0x0c,0xbb,0x76,0xed,0x62,0x60,
+ 0x61,0x61,0x61,0x28,0x2a,0x2a,0x42,0x89,0x3c,0x80,0x00,0x82,0x47,0x35,
+ 0xc8,0x2b,0x42,0x42,0x42,0xe0,0x64,0xb5,0x69,0xd3,0x26,0x86,0x8f,0x1f,
+ 0x3f,0x82,0x83,0x03,0x04,0x40,0x61,0x0c,0x72,0x39,0x8c,0xfd,0xec,0xd9,
+ 0x33,0xb0,0x8b,0x41,0xf1,0x02,0x4a,0x2d,0x29,0x29,0x29,0x60,0xc7,0x20,
+ 0x03,0x80,0x00,0x62,0x82,0x85,0xd9,0xaf,0x5f,0xbf,0xc0,0x18,0x64,0x20,
+ 0x28,0x28,0xac,0xac,0xac,0xc0,0x61,0x06,0x03,0xa0,0x94,0x02,0x03,0xdf,
+ 0xbe,0x7d,0x63,0xb8,0x7c,0xf9,0x32,0xd8,0x87,0xfe,0xfe,0xfe,0xe0,0xf0,
+ 0x06,0xa6,0x14,0xb0,0x38,0x0c,0x00,0x04,0x10,0x0b,0x4c,0x13,0xc8,0xcb,
+ 0xa0,0x70,0x02,0x29,0x7a,0xfa,0xf4,0x29,0x58,0x32,0x3b,0x3b,0x9b,0x11,
+ 0x14,0xcb,0xe8,0xc9,0x2d,0x2a,0x2a,0x8a,0x71,0xcd,0x9a,0x35,0xa0,0x24,
+ 0x07,0xb6,0x40,0x40,0x40,0x00,0xec,0xb8,0x37,0x6f,0xde,0xc0,0xd5,0x00,
+ 0x04,0x10,0xd8,0x60,0x50,0x9a,0x05,0x19,0x00,0x8b,0x51,0x10,0x50,0x54,
+ 0x54,0x84,0x7b,0x9d,0x01,0x0b,0x80,0x89,0xe3,0xd2,0x07,0x10,0x40,0xf0,
+ 0xc8,0x03,0xa5,0x3d,0x6c,0x06,0x10,0x02,0xb8,0xf4,0x01,0x04,0x10,0xd1,
+ 0xf9,0x14,0xe4,0x55,0x52,0x00,0x40,0x00,0x11,0x6d,0x30,0x2c,0x85,0x10,
+ 0x0b,0x00,0x02,0x88,0x68,0x83,0x41,0xb9,0x8b,0x14,0x00,0x10,0x40,0x44,
+ 0x1b,0xec,0xe6,0xe6,0x46,0x52,0x1c,0x00,0x04,0x10,0x23,0xad,0x2a,0x53,
+ 0x80,0x00,0x03,0x00,0x83,0xcb,0x1a,0xf1,0x99,0x41,0xce,0x33,0x00,0x00,
+ 0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_filesave_png_len = 587;
+static const unsigned char small_disabled_filesave_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x01,0xd6,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0xb1,0xc0,0x18,0x4c,0x4c,0x4c,0xff,0x05,0x04,0x04,0x18,0xc8,0xb1,
+ 0x08,0xa4,0x07,0x84,0x85,0x85,0x85,0x19,0xee,0xdd,0xbb,0xc7,0x08,0x12,
+ 0x03,0x08,0x20,0x46,0x90,0x00,0xc8,0x50,0x07,0x07,0x07,0x86,0xa8,0xa8,
+ 0x28,0x86,0x57,0xaf,0x5e,0x31,0x18,0x1b,0x1b,0x93,0x64,0xf0,0xc1,0x83,
+ 0x07,0x19,0x38,0x38,0x38,0x18,0x3e,0x7d,0xfa,0xc4,0x70,0xfb,0xf6,0x6d,
+ 0x86,0x8d,0x1b,0x37,0x32,0x02,0x04,0x60,0x74,0x0e,0x4a,0x00,0x00,0x42,
+ 0x20,0x00,0xee,0x4f,0xb0,0x95,0xcd,0x6c,0x66,0x2a,0x17,0x5f,0x7a,0x68,
+ 0x82,0x2b,0x30,0xcc,0x8d,0x77,0xba,0x68,0x55,0x21,0x33,0xd1,0xdd,0x88,
+ 0x88,0x2f,0xd4,0xcc,0x40,0x12,0x22,0x02,0x55,0xbd,0xb5,0xbb,0xcf,0x13,
+ 0x40,0x2c,0x30,0xaf,0xfc,0xfa,0xf5,0x0b,0x8c,0x41,0x86,0x83,0x0c,0xb6,
+ 0xb7,0xb7,0x27,0xca,0x60,0x90,0xda,0x3f,0x7f,0xfe,0x30,0xbc,0x7e,0xfd,
+ 0x9a,0x41,0x50,0x50,0x10,0x6c,0xb8,0xad,0xad,0x2d,0x03,0x40,0x00,0xc1,
+ 0xc3,0xf8,0xef,0xdf,0xbf,0x60,0x05,0x20,0x1a,0x64,0xd1,0x8e,0x1d,0x3b,
+ 0x88,0x32,0xd8,0xc3,0xc3,0x03,0xab,0x38,0x40,0x00,0xc1,0x0d,0x86,0x45,
+ 0x1a,0x8c,0xc6,0xa5,0x01,0x17,0x10,0x11,0x11,0x01,0x3b,0x0a,0x06,0x00,
+ 0x02,0x88,0x05,0x97,0x42,0x4a,0x5d,0x0c,0x10,0x40,0x38,0x0d,0x26,0xd5,
+ 0xc5,0xe8,0x00,0x20,0x80,0x68,0xe6,0x62,0x80,0x00,0xa2,0x99,0x8b,0x01,
+ 0x02,0x08,0xc3,0x60,0x31,0x31,0x31,0xa2,0x5d,0x8b,0xac,0x07,0x94,0xec,
+ 0x90,0x01,0x40,0x00,0x61,0x75,0xb1,0xb8,0xb8,0x38,0x5e,0x83,0x60,0x59,
+ 0x18,0x99,0x8f,0x0e,0x00,0x02,0x88,0x89,0x24,0xa7,0x21,0x19,0x0a,0xc2,
+ 0x20,0x57,0xe2,0x2a,0x5b,0x00,0x02,0x08,0xab,0x8b,0x5f,0xbe,0x7c,0x49,
+ 0x92,0x65,0xa2,0xa2,0xa2,0x18,0x62,0x00,0x01,0x84,0x33,0xf2,0x70,0x01,
+ 0x77,0x77,0x77,0x86,0xdf,0xbf,0x7f,0x83,0xb3,0xff,0x91,0x23,0x47,0xc0,
+ 0x62,0x8c,0x8c,0x8c,0x18,0xea,0x00,0x02,0x88,0x64,0x83,0xb1,0x01,0x98,
+ 0xc1,0xc8,0x16,0x00,0x04,0x10,0x38,0x8c,0x41,0xe1,0x04,0x72,0x05,0xac,
+ 0xac,0xc0,0x07,0x40,0xe1,0x8a,0x1e,0xb6,0xc8,0xe1,0x0e,0x03,0x00,0x01,
+ 0x04,0x2f,0xdd,0x40,0xc5,0x25,0xba,0x24,0x36,0x00,0x0a,0x02,0x90,0x03,
+ 0x40,0x0e,0xc1,0x67,0x30,0x40,0x00,0x81,0x0d,0x06,0x95,0xa1,0xa0,0x42,
+ 0x1a,0x54,0xe4,0x11,0x32,0x18,0xe4,0x00,0x90,0xaf,0x90,0xd3,0x2d,0xac,
+ 0x44,0x44,0x16,0x03,0x08,0x20,0x46,0x98,0x41,0xfe,0xfe,0xfe,0xff,0x41,
+ 0x16,0x80,0x0c,0xa7,0x04,0x14,0x16,0x16,0x82,0xcd,0x00,0x08,0x20,0x46,
+ 0x64,0x17,0x82,0x4a,0x7e,0x50,0x21,0x4d,0x09,0xd0,0xd2,0xd2,0x62,0x90,
+ 0x94,0x94,0x64,0x04,0x08,0x30,0x00,0xcf,0x8a,0xfa,0x9c,0xfa,0xe5,0x97,
+ 0x27,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_redo_png_len = 531;
+static const unsigned char small_disabled_redo_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x01,0x9e,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0xd1,0xc4,0x54,0x20,0x00,0x08,0x20,0x9a,0x19,0x0c,0x10,0x40,
+ 0x34,0x33,0x18,0x20,0x80,0x68,0x66,0x30,0x40,0x00,0xd1,0xcc,0x60,0x80,
+ 0x00,0x62,0xc1,0x6b,0x2b,0x13,0xd3,0x7f,0x3e,0x3e,0x3e,0x38,0x5f,0x42,
+ 0x42,0x82,0xe1,0xc6,0x8d,0x1b,0x8c,0xc4,0x18,0x0c,0x10,0x40,0x8c,0xb8,
+ 0x92,0x1b,0xc8,0x50,0x03,0x03,0x03,0x06,0x6b,0x6b,0x6b,0x86,0x3f,0x7f,
+ 0xfe,0x80,0xc5,0x7e,0xfd,0xfa,0xc5,0xf0,0xe4,0xc9,0x13,0x86,0x87,0x0f,
+ 0x1f,0x62,0x58,0x20,0x20,0x20,0xf0,0xff,0xc3,0x87,0x0f,0x70,0x31,0x80,
+ 0x00,0xc2,0x6a,0x30,0xc8,0x50,0x3d,0x3d,0x3d,0x06,0x33,0x33,0x33,0x86,
+ 0xca,0xca,0x4a,0x06,0x7e,0x7e,0x7e,0x90,0x41,0x70,0xf9,0x17,0x2f,0x5e,
+ 0x30,0x1c,0x3d,0x7a,0x94,0xa1,0xb7,0xb7,0x97,0x11,0xa6,0x5e,0x5b,0x5b,
+ 0x9b,0x21,0x25,0x25,0x85,0x21,0x3f,0x3f,0x1f,0x2c,0x06,0x10,0x40,0x0c,
+ 0x20,0x83,0xd1,0x31,0xd0,0xa0,0xff,0xf7,0xee,0xdd,0xfb,0xff,0xf6,0xed,
+ 0xdb,0xff,0x2f,0x5f,0xbe,0xfc,0x8f,0x4d,0x4d,0x49,0x49,0xc9,0xff,0xa8,
+ 0xa8,0xa8,0xff,0x42,0x42,0x42,0xff,0x4d,0x4c,0x4c,0xfe,0x67,0x67,0x67,
+ 0xff,0x07,0x5a,0x06,0x57,0x0b,0x10,0x40,0x38,0x23,0x0f,0xe4,0x4a,0xa0,
+ 0x26,0x46,0x31,0x31,0x31,0xac,0x61,0xda,0xdd,0xdd,0x0d,0x16,0x2f,0x28,
+ 0x28,0x60,0x70,0x73,0x73,0x63,0xf8,0xfd,0xfb,0x37,0x8a,0x3c,0x40,0x00,
+ 0xe1,0x34,0x18,0xd9,0xeb,0xd8,0x00,0xc8,0xfb,0xb7,0x6e,0xdd,0x62,0xf8,
+ 0xfe,0xfd,0x3b,0xc3,0xd7,0xaf,0x5f,0xe1,0xf1,0x00,0x03,0x00,0x01,0x84,
+ 0x35,0x55,0x80,0x62,0x1f,0x14,0x8e,0xb8,0x00,0x28,0xa2,0x40,0x61,0x6a,
+ 0x6e,0x6e,0xce,0x00,0x0c,0x2e,0xb0,0xa1,0xe8,0x06,0x03,0x04,0x10,0xce,
+ 0x54,0x91,0x9b,0x9b,0xfb,0xff,0xc7,0x8f,0x1f,0x0c,0xb3,0x67,0xcf,0xc6,
+ 0x1a,0x14,0x13,0x27,0x4e,0xfc,0x6f,0x6a,0x6a,0x8a,0x22,0x06,0xb2,0x88,
+ 0x99,0x99,0x19,0xac,0x1e,0x20,0x80,0xb0,0x46,0x1e,0x0c,0x27,0x24,0x24,
+ 0xfc,0x3f,0x72,0xe4,0x08,0xd6,0xc8,0x23,0x84,0x01,0x02,0x08,0xa7,0x8b,
+ 0x61,0xe0,0xdd,0xbb,0x77,0xa0,0x98,0x27,0x2a,0x53,0x20,0x03,0x80,0x00,
+ 0x22,0x68,0x30,0xb9,0x00,0x20,0x80,0x68,0x56,0x56,0x00,0x04,0x10,0xcd,
+ 0x0c,0x06,0x08,0x20,0x9a,0x19,0x0c,0x10,0x40,0x34,0x33,0x18,0x20,0x80,
+ 0x68,0x66,0x30,0x40,0x80,0x01,0x00,0xf7,0xb3,0xec,0x5d,0x7c,0xf2,0xab,
+ 0x77,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_searchfind_png_len = 1013;
+static const unsigned char small_disabled_searchfind_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x03,0x80,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0xb1,0x60,0x13,0x64,0x62,0x62,0xfa,0x2f,0x2c,0x2c,0xcc,0x80,0xcd,
+ 0x52,0x98,0x98,0x84,0x84,0x04,0xc3,0xd5,0xab,0x57,0x19,0x71,0x19,0x0c,
+ 0x10,0x40,0x8c,0xe8,0x9a,0x41,0x86,0x86,0x85,0x85,0x31,0x34,0x34,0x34,
+ 0xe0,0x75,0xd1,0xb2,0x65,0xcb,0x18,0x5e,0xbc,0x78,0xc1,0x30,0x6b,0xd6,
+ 0x2c,0xac,0x86,0x03,0x04,0x10,0x13,0xba,0x00,0xc8,0xa5,0x84,0x0c,0x05,
+ 0x01,0x5e,0x5e,0x5e,0x86,0xf0,0xf0,0x70,0x86,0xb4,0xb4,0x34,0xac,0x61,
+ 0x09,0x10,0x40,0x18,0x41,0x01,0xf2,0xc1,0xbf,0x7f,0xff,0xc0,0xf4,0xb6,
+ 0x6d,0xdb,0x18,0x38,0x38,0x38,0x18,0xfe,0xfe,0xfd,0x0b,0xe6,0xab,0xab,
+ 0xab,0x33,0x28,0x29,0x29,0xc1,0xd5,0x8a,0x89,0x89,0xc1,0x0d,0x47,0x77,
+ 0x39,0x40,0x00,0x61,0x0d,0xe3,0x9f,0x3f,0x7f,0x82,0x0d,0x77,0x72,0x72,
+ 0x82,0x78,0x8b,0x89,0x89,0x81,0x99,0x99,0x19,0x8c,0x91,0x83,0x0e,0xc4,
+ 0x07,0x19,0x1e,0x1a,0x1a,0x8a,0x61,0x38,0x40,0x00,0xa1,0x84,0x31,0x28,
+ 0x7c,0xf9,0xf9,0xf9,0xe1,0x7c,0x01,0x01,0x01,0x86,0xe4,0xe4,0x64,0x06,
+ 0x6e,0x6e,0x6e,0xb0,0x45,0xaa,0xaa,0xaa,0x0c,0xca,0xca,0xca,0x60,0x8b,
+ 0xb6,0x6c,0xd9,0x82,0xe2,0x98,0xcf,0x9f,0x3f,0xa3,0x84,0x39,0x40,0x00,
+ 0xc1,0x0d,0x06,0x19,0xea,0xee,0xee,0xce,0x50,0x53,0x53,0xc3,0xc0,0xc6,
+ 0xc6,0xc6,0xf0,0xeb,0xd7,0x2f,0xb0,0xe2,0x5d,0xbb,0x76,0x31,0x78,0x7a,
+ 0x7a,0x82,0x5d,0x07,0xb2,0x00,0x14,0x34,0x2c,0x2c,0x2c,0x60,0xc3,0x19,
+ 0x19,0x19,0x19,0xbe,0x7c,0xf9,0xc2,0xf0,0xed,0xdb,0x37,0x30,0x3e,0x76,
+ 0xec,0x18,0x83,0xac,0xac,0x2c,0x43,0x6a,0x6a,0x2a,0x23,0x40,0x00,0xb1,
+ 0xc0,0x0c,0xf5,0xf3,0xf3,0x63,0x68,0x69,0x69,0x61,0x78,0xf3,0xe6,0x0d,
+ 0xd8,0xa5,0x20,0x8d,0x20,0x0b,0xfc,0xfd,0xfd,0x19,0xf6,0xee,0xdd,0x0b,
+ 0x0e,0xdb,0x3f,0x7f,0xfe,0x80,0x0d,0x80,0xc5,0x01,0x28,0xcc,0x15,0x14,
+ 0x14,0xe0,0xc1,0x04,0x8a,0x50,0x03,0x03,0x03,0xb0,0x43,0x01,0x02,0x08,
+ 0x6c,0x30,0xc8,0xfb,0xad,0xad,0xad,0x60,0x97,0x7c,0xfa,0xf4,0x89,0x41,
+ 0x48,0x48,0x88,0xe1,0xe1,0xc3,0x87,0x70,0x6f,0x6a,0x6a,0x6a,0x82,0x5d,
+ 0x03,0xb2,0x9c,0x8b,0x8b,0x0b,0x8c,0xd9,0xd9,0xd9,0xc1,0x96,0x83,0x2c,
+ 0x81,0x45,0x3a,0x32,0x00,0x08,0x20,0x78,0xe4,0x81,0xbc,0x05,0x02,0xbf,
+ 0x7f,0xff,0x06,0xdb,0x2e,0x2a,0x2a,0xca,0xf0,0xf5,0xeb,0x57,0xb0,0x38,
+ 0x28,0x82,0x40,0x96,0x3d,0x7f,0xfe,0x9c,0xe1,0xfd,0xfb,0xf7,0x60,0xc3,
+ 0x40,0x58,0x43,0x43,0x83,0x41,0x51,0x51,0x11,0x5b,0xfc,0x33,0x00,0x04,
+ 0x10,0xdc,0x60,0x90,0x8d,0x20,0xaf,0xc2,0xd8,0xaf,0x5f,0xbf,0x86,0x2b,
+ 0x02,0x85,0x2d,0xc8,0x9b,0x20,0x97,0x83,0xc2,0x94,0x8f,0x8f,0x0f,0x1c,
+ 0xd6,0x20,0x07,0xc0,0x5c,0x8c,0x0e,0x00,0x02,0x08,0x6c,0xb0,0xb4,0xb4,
+ 0x34,0xc3,0x83,0x07,0x0f,0x18,0xe4,0xe4,0xe4,0x18,0x58,0x59,0x59,0xc1,
+ 0xae,0x14,0x11,0x11,0x01,0xbb,0x18,0x64,0x20,0x32,0xb8,0x74,0xe9,0x12,
+ 0xdc,0x72,0x50,0x2a,0xc1,0xe5,0x62,0x80,0x00,0x02,0x1b,0x7c,0xe5,0xca,
+ 0x15,0x46,0x50,0x3a,0x0c,0x0e,0x0e,0x06,0xbb,0x06,0x14,0x76,0xa0,0x48,
+ 0x04,0x01,0x1e,0x1e,0x1e,0x86,0x93,0x27,0x4f,0x32,0x48,0x49,0x49,0x81,
+ 0xf9,0x3a,0x3a,0x3a,0x60,0x31,0x4e,0x4e,0x4e,0x70,0x9c,0xe0,0x02,0x00,
+ 0x01,0x04,0x97,0x01,0xa5,0x3f,0x90,0xe1,0xde,0xde,0xde,0x60,0x83,0x41,
+ 0xe1,0x0a,0x0a,0x1a,0x90,0xa1,0xa0,0x20,0xf8,0xf0,0xe1,0x03,0x38,0x42,
+ 0x41,0x41,0xf1,0xf1,0xe3,0x47,0xb0,0x8b,0x41,0x69,0x1a,0x39,0x27,0x22,
+ 0x03,0x80,0x00,0x42,0xb1,0x12,0x66,0xb8,0xa4,0xa4,0x24,0x3c,0x08,0x4c,
+ 0x4c,0x4c,0xc0,0x29,0x05,0x14,0x96,0x20,0xfa,0xce,0x9d,0x3b,0x0c,0x8e,
+ 0x8e,0x8e,0xe0,0x30,0x06,0xb9,0x1a,0x64,0x39,0xc8,0x12,0xf4,0x54,0x01,
+ 0x10,0x40,0x18,0x85,0xd0,0xda,0xb5,0x6b,0x19,0x64,0x64,0x64,0x18,0xec,
+ 0xed,0xed,0xc1,0x18,0x14,0x71,0xdf,0xbf,0x7f,0x07,0x6b,0x14,0x17,0x17,
+ 0x07,0xbb,0x72,0xdf,0xbe,0x7d,0x60,0x31,0x50,0x1c,0x80,0xd2,0x35,0x28,
+ 0x33,0x81,0xca,0x13,0x64,0x00,0x10,0x40,0x18,0x06,0x83,0x0c,0xb0,0xb6,
+ 0xb6,0x06,0x67,0x0e,0x50,0xac,0x83,0x82,0x05,0x64,0xd8,0xa3,0x47,0x8f,
+ 0xc0,0xe1,0x0e,0x2a,0x87,0x41,0x91,0xb6,0x7f,0xff,0x7e,0xb0,0xc1,0xa0,
+ 0xdc,0x09,0xa2,0x41,0x86,0x23,0x03,0x80,0x00,0xc2,0x08,0x7d,0x50,0x30,
+ 0x3c,0x7d,0xfa,0x14,0x1c,0x14,0x20,0x57,0xc0,0x92,0x93,0x9d,0x9d,0x1d,
+ 0xc3,0xd1,0xa3,0x47,0xc1,0x6c,0x90,0xcb,0x41,0x29,0x07,0xc4,0x37,0x36,
+ 0x36,0x06,0x3b,0x00,0x96,0x0f,0x60,0x00,0x20,0x80,0x30,0x0c,0x06,0xd5,
+ 0x0a,0xa0,0x70,0x06,0xb9,0x0c,0x39,0xa9,0x81,0x52,0x00,0x08,0x83,0x22,
+ 0x10,0x96,0x69,0x40,0x34,0x28,0x79,0x82,0x92,0x2a,0xa8,0x44,0x4c,0x4c,
+ 0x4c,0x84,0xab,0x07,0x08,0x20,0x8c,0x1a,0x04,0x06,0x66,0xcf,0x9e,0xfd,
+ 0x1f,0x96,0xef,0x91,0x83,0x09,0x64,0x18,0xa8,0x9c,0x06,0xa5,0x7d,0x50,
+ 0x51,0x60,0x6a,0x6a,0x0a,0x0e,0x22,0x90,0x1c,0x28,0x4d,0x03,0xd3,0x3f,
+ 0xd8,0xe9,0x00,0x01,0x04,0x8f,0x51,0x52,0xf1,0x8e,0x1d,0x3b,0xfe,0x5f,
+ 0xbf,0x7e,0xfd,0x3f,0x30,0xb8,0xfe,0x63,0x93,0x07,0x08,0x30,0x00,0xad,
+ 0x91,0xb8,0x43,0x2d,0xea,0x93,0x7f,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,
+ 0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int small_disabled_undo_png_len = 541;
+static const unsigned char small_disabled_undo_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
+ 0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8b,0x0c,0x91,0xa5,0x1c,0x00,0x00,0x00,0x20,0x63,0x48,0x52,
+ 0x4d,0x00,0x00,0x6e,0x9a,0x00,0x00,0x74,0x0f,0x00,0x00,0xef,0x68,0x00,
+ 0x00,0x87,0x88,0x00,0x00,0x6a,0xb8,0x00,0x00,0xf5,0x93,0x00,0x00,0x48,
+ 0x46,0x00,0x00,0x1e,0x75,0x20,0x95,0x94,0xb3,0x00,0x00,0x01,0xa8,0x49,
+ 0x44,0x41,0x54,0x78,0x9c,0x62,0xfc,0xff,0xff,0x3f,0x03,0x2d,0x00,0x40,
+ 0x00,0x31,0xd1,0xc4,0x54,0x20,0x00,0x08,0x20,0x9a,0x19,0x0c,0x10,0x40,
+ 0x34,0x33,0x18,0x20,0x80,0x68,0x66,0x30,0x40,0x00,0xd1,0xcc,0x60,0x80,
+ 0x00,0x62,0x21,0x55,0x03,0x13,0x13,0xd3,0x7f,0x3e,0x3e,0x3e,0x38,0x5f,
+ 0x42,0x42,0x82,0xe1,0xc6,0x8d,0x1b,0x8c,0xe8,0xea,0x00,0x02,0x88,0x11,
+ 0x5b,0x72,0x13,0x16,0x16,0xfe,0xff,0xf6,0xed,0x5b,0x14,0xc5,0x20,0x03,
+ 0xf9,0xf9,0xf9,0x19,0xe4,0xe4,0xe4,0x18,0xec,0xec,0xec,0xc0,0x62,0xec,
+ 0xec,0xec,0x0c,0x3f,0x7f,0xfe,0x64,0x78,0xf5,0xea,0x15,0xc3,0xca,0x95,
+ 0x2b,0x51,0xd4,0x03,0x04,0x10,0x4e,0x83,0xbd,0xbd,0xbd,0x19,0x16,0x2d,
+ 0x5a,0xc4,0x08,0x33,0x54,0x57,0x57,0x97,0x61,0xc3,0x86,0x0d,0x0c,0x20,
+ 0xc3,0x81,0x2e,0x84,0xab,0xdd,0xb8,0x71,0x23,0xc3,0xef,0xdf,0xbf,0x19,
+ 0xee,0xdf,0xbf,0xcf,0xb0,0x7e,0xfd,0x7a,0xb8,0xe1,0x00,0x01,0x84,0xd5,
+ 0x60,0x41,0x41,0xc1,0xff,0x29,0x29,0x29,0x0c,0xd7,0xae,0x5d,0x63,0x38,
+ 0x7e,0xfc,0x38,0x83,0xac,0xac,0x2c,0xd8,0x50,0x90,0x6b,0x99,0x99,0x99,
+ 0x31,0xbc,0x1d,0x17,0x17,0xf7,0x1f,0xa8,0x87,0x41,0x49,0x49,0x89,0x21,
+ 0x3f,0x3f,0x1f,0x2c,0x0f,0x10,0x40,0x38,0x23,0x8f,0x97,0x97,0x97,0xc1,
+ 0xc4,0xc4,0x84,0x21,0x2d,0x2d,0x0d,0xaf,0xa1,0x20,0x00,0xf2,0x19,0xc8,
+ 0x11,0xa6,0xa6,0xa6,0x70,0x31,0x80,0x00,0xc2,0x6a,0x30,0xc8,0x17,0xbf,
+ 0x7e,0xfd,0x62,0xf8,0xf1,0xe3,0x07,0x98,0x3e,0x76,0xec,0x18,0x4e,0x43,
+ 0x61,0xe0,0xcc,0x99,0x33,0x28,0x7c,0x80,0x00,0xc2,0x6a,0xb0,0xa8,0xa8,
+ 0x28,0xc3,0xd3,0xa7,0x4f,0x19,0xde,0xbf,0x7f,0xcf,0xf0,0xf9,0xf3,0x67,
+ 0x86,0xed,0xdb,0xb7,0x33,0xf8,0xf8,0xf8,0xe0,0x2c,0x54,0x40,0x71,0x20,
+ 0x23,0x23,0x83,0x22,0x06,0x10,0x40,0x58,0xc3,0x18,0x04,0x26,0x4e,0x9c,
+ 0xf8,0x1f,0xd9,0x6b,0x1a,0x1a,0x1a,0x60,0x5a,0x48,0x48,0x08,0x23,0xb5,
+ 0xe8,0xe8,0xe8,0x80,0x23,0x91,0x9b,0x9b,0x9b,0x41,0x4c,0x4c,0x0c,0x2c,
+ 0x0f,0x10,0x40,0x60,0x6f,0x53,0x82,0x55,0x54,0x54,0xfe,0x1f,0x39,0x72,
+ 0xe4,0xff,0x9f,0x3f,0x7f,0xfe,0x23,0x8b,0x03,0x04,0x10,0xc5,0x39,0xef,
+ 0xf6,0xed,0xdb,0x8c,0x40,0x80,0x11,0x07,0x00,0x01,0x84,0x33,0x28,0x28,
+ 0x05,0x00,0x01,0x44,0xb3,0xb2,0x02,0x20,0x80,0x68,0x66,0x30,0x40,0x00,
+ 0xd1,0xcc,0x60,0x80,0x00,0xa2,0x99,0xc1,0x00,0x01,0x44,0x33,0x83,0x01,
+ 0x02,0x0c,0x00,0x57,0x5a,0xba,0x0b,0x05,0xcd,0x84,0xac,0x00,0x00,0x00,
+ 0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int mini_down_xpm_len = 1447;
+static const unsigned char mini_down_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x31,0x36,0x20,0x31,0x36,
+ 0x20,0x34,0x39,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x23,
+ 0x30,0x36,0x30,0x36,0x32,0x64,0x32,0x64,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x30,0x38,0x30,0x38,0x32,0x65,0x32,
+ 0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,0x23,
+ 0x31,0x62,0x31,0x62,0x33,0x66,0x33,0x66,0x66,0x31,0x66,0x31,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x63,0x20,0x23,0x33,0x64,0x33,0x64,0x34,0x65,0x34,
+ 0x65,0x62,0x62,0x62,0x62,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x63,0x20,0x23,
+ 0x32,0x66,0x32,0x66,0x35,0x30,0x35,0x30,0x65,0x31,0x65,0x31,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x20,0x63,0x20,0x23,0x32,0x36,0x32,0x36,0x35,0x31,0x35,
+ 0x31,0x66,0x62,0x66,0x62,0x22,0x2c,0x0a,0x22,0x40,0x20,0x63,0x20,0x23,
+ 0x32,0x62,0x32,0x62,0x35,0x39,0x35,0x39,0x66,0x65,0x66,0x65,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x63,0x20,0x23,0x33,0x31,0x33,0x31,0x35,0x34,0x35,
+ 0x34,0x65,0x32,0x65,0x32,0x22,0x2c,0x0a,0x22,0x24,0x20,0x63,0x20,0x23,
+ 0x33,0x37,0x33,0x37,0x35,0x65,0x35,0x65,0x66,0x33,0x66,0x33,0x22,0x2c,
+ 0x0a,0x22,0x25,0x20,0x63,0x20,0x23,0x33,0x63,0x33,0x63,0x36,0x35,0x36,
+ 0x35,0x65,0x65,0x65,0x65,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,0x20,0x23,
+ 0x33,0x61,0x33,0x61,0x36,0x35,0x36,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x20,0x63,0x20,0x23,0x34,0x34,0x34,0x34,0x35,0x62,0x35,
+ 0x62,0x63,0x32,0x63,0x32,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x23,
+ 0x34,0x38,0x34,0x38,0x36,0x30,0x36,0x30,0x63,0x35,0x63,0x35,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x63,0x20,0x23,0x35,0x30,0x35,0x30,0x36,0x66,0x36,
+ 0x66,0x63,0x63,0x63,0x63,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x63,0x20,0x23,
+ 0x34,0x37,0x34,0x37,0x37,0x35,0x37,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x3a,0x20,0x63,0x20,0x23,0x34,0x64,0x34,0x64,0x37,0x64,0x37,
+ 0x64,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3e,0x20,0x63,0x20,0x23,
+ 0x35,0x33,0x35,0x33,0x37,0x63,0x37,0x63,0x65,0x62,0x65,0x62,0x22,0x2c,
+ 0x0a,0x22,0x2c,0x20,0x63,0x20,0x23,0x36,0x63,0x36,0x63,0x38,0x34,0x38,
+ 0x34,0x62,0x61,0x62,0x61,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x63,0x20,0x23,
+ 0x36,0x65,0x36,0x65,0x38,0x37,0x38,0x37,0x63,0x37,0x63,0x37,0x22,0x2c,
+ 0x0a,0x22,0x31,0x20,0x63,0x20,0x23,0x36,0x62,0x36,0x62,0x39,0x32,0x39,
+ 0x32,0x65,0x32,0x65,0x32,0x22,0x2c,0x0a,0x22,0x32,0x20,0x63,0x20,0x23,
+ 0x36,0x35,0x36,0x35,0x39,0x37,0x39,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x63,0x20,0x23,0x36,0x63,0x36,0x63,0x39,0x64,0x39,
+ 0x64,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x34,0x20,0x63,0x20,0x23,
+ 0x36,0x63,0x36,0x63,0x61,0x31,0x61,0x31,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x35,0x20,0x63,0x20,0x23,0x37,0x65,0x37,0x65,0x61,0x32,0x61,
+ 0x32,0x65,0x61,0x65,0x61,0x22,0x2c,0x0a,0x22,0x36,0x20,0x63,0x20,0x23,
+ 0x37,0x36,0x37,0x36,0x61,0x36,0x61,0x36,0x66,0x65,0x66,0x65,0x22,0x2c,
+ 0x0a,0x22,0x37,0x20,0x63,0x20,0x23,0x37,0x66,0x37,0x66,0x61,0x66,0x61,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x38,0x20,0x63,0x20,0x23,
+ 0x38,0x66,0x38,0x66,0x39,0x39,0x39,0x39,0x62,0x37,0x62,0x37,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x63,0x20,0x23,0x39,0x66,0x39,0x66,0x61,0x32,0x61,
+ 0x32,0x62,0x33,0x62,0x33,0x22,0x2c,0x0a,0x22,0x30,0x20,0x63,0x20,0x23,
+ 0x38,0x65,0x38,0x65,0x39,0x65,0x39,0x65,0x63,0x30,0x63,0x30,0x22,0x2c,
+ 0x0a,0x22,0x71,0x20,0x63,0x20,0x23,0x38,0x32,0x38,0x32,0x61,0x39,0x61,
+ 0x39,0x65,0x38,0x65,0x38,0x22,0x2c,0x0a,0x22,0x77,0x20,0x63,0x20,0x23,
+ 0x38,0x37,0x38,0x37,0x62,0x37,0x62,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x65,0x20,0x63,0x20,0x23,0x38,0x37,0x38,0x37,0x62,0x38,0x62,
+ 0x38,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x72,0x20,0x63,0x20,0x23,
+ 0x38,0x65,0x38,0x65,0x62,0x65,0x62,0x65,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x74,0x20,0x63,0x20,0x23,0x61,0x34,0x61,0x34,0x62,0x34,0x62,
+ 0x34,0x63,0x64,0x63,0x64,0x22,0x2c,0x0a,0x22,0x79,0x20,0x63,0x20,0x23,
+ 0x61,0x36,0x61,0x36,0x62,0x61,0x62,0x61,0x65,0x63,0x65,0x63,0x22,0x2c,
+ 0x0a,0x22,0x75,0x20,0x63,0x20,0x23,0x39,0x37,0x39,0x37,0x63,0x38,0x63,
+ 0x38,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x69,0x20,0x63,0x20,0x23,
+ 0x39,0x64,0x39,0x64,0x63,0x65,0x63,0x65,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x70,0x20,0x63,0x20,0x23,0x39,0x66,0x39,0x66,0x64,0x33,0x64,
+ 0x33,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x61,0x20,0x63,0x20,0x23,
+ 0x61,0x32,0x61,0x32,0x63,0x65,0x63,0x65,0x66,0x36,0x66,0x36,0x22,0x2c,
+ 0x0a,0x22,0x73,0x20,0x63,0x20,0x23,0x61,0x32,0x61,0x32,0x64,0x31,0x64,
+ 0x31,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x64,0x20,0x63,0x20,0x23,
+ 0x62,0x32,0x62,0x32,0x63,0x39,0x63,0x39,0x65,0x65,0x65,0x65,0x22,0x2c,
+ 0x0a,0x22,0x66,0x20,0x63,0x20,0x23,0x62,0x39,0x62,0x39,0x63,0x61,0x63,
+ 0x61,0x65,0x65,0x65,0x65,0x22,0x2c,0x0a,0x22,0x67,0x20,0x63,0x20,0x23,
+ 0x62,0x61,0x62,0x61,0x64,0x36,0x64,0x36,0x66,0x38,0x66,0x38,0x22,0x2c,
+ 0x0a,0x22,0x68,0x20,0x63,0x20,0x23,0x62,0x35,0x62,0x35,0x65,0x62,0x65,
+ 0x62,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x6a,0x20,0x63,0x20,0x23,
+ 0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x22,0x2c,
+ 0x0a,0x22,0x6b,0x20,0x63,0x20,0x23,0x64,0x61,0x64,0x61,0x66,0x61,0x66,
+ 0x61,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x63,0x20,0x23,
+ 0x65,0x31,0x65,0x31,0x66,0x61,0x66,0x61,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x7a,0x20,0x63,0x20,0x23,0x66,0x36,0x66,0x36,0x66,0x66,0x66,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x78,0x20,0x63,0x20,0x4e,
+ 0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,
+ 0x73,0x20,0x2a,0x2f,0x0a,0x22,0x78,0x78,0x78,0x78,0x78,0x39,0x79,0x66,
+ 0x64,0x71,0x38,0x78,0x78,0x78,0x78,0x78,0x22,0x2c,0x0a,0x22,0x78,0x78,
+ 0x78,0x78,0x78,0x35,0x7a,0x6c,0x6b,0x73,0x23,0x39,0x78,0x78,0x78,0x78,
+ 0x22,0x2c,0x0a,0x22,0x78,0x78,0x78,0x78,0x74,0x31,0x68,0x70,0x75,0x32,
+ 0x4f,0x78,0x78,0x78,0x78,0x78,0x22,0x2c,0x0a,0x22,0x78,0x78,0x78,0x78,
+ 0x78,0x3c,0x75,0x69,0x72,0x3a,0x6f,0x74,0x78,0x78,0x78,0x78,0x22,0x2c,
+ 0x0a,0x22,0x78,0x78,0x78,0x78,0x78,0x30,0x77,0x75,0x77,0x3b,0x2d,0x78,
+ 0x78,0x78,0x78,0x78,0x22,0x2c,0x0a,0x22,0x78,0x78,0x78,0x78,0x78,0x38,
+ 0x77,0x75,0x77,0x26,0x2c,0x78,0x78,0x78,0x78,0x78,0x22,0x2c,0x0a,0x22,
+ 0x78,0x78,0x78,0x78,0x78,0x74,0x35,0x75,0x37,0x24,0x39,0x78,0x78,0x78,
+ 0x78,0x78,0x22,0x2c,0x0a,0x22,0x78,0x78,0x78,0x78,0x78,0x74,0x71,0x69,
+ 0x37,0x24,0x39,0x78,0x78,0x78,0x78,0x78,0x22,0x2c,0x0a,0x22,0x78,0x74,
+ 0x78,0x78,0x78,0x38,0x61,0x69,0x77,0x3a,0x2c,0x74,0x78,0x78,0x74,0x78,
+ 0x22,0x2c,0x0a,0x22,0x78,0x3c,0x61,0x67,0x79,0x77,0x72,0x77,0x77,0x77,
+ 0x36,0x35,0x35,0x3e,0x2a,0x78,0x22,0x2c,0x0a,0x22,0x78,0x2c,0x25,0x34,
+ 0x65,0x65,0x77,0x77,0x37,0x77,0x37,0x36,0x26,0x20,0x2d,0x78,0x22,0x2c,
+ 0x0a,0x22,0x78,0x78,0x2c,0x40,0x33,0x77,0x77,0x77,0x37,0x37,0x36,0x3b,
+ 0x2e,0x3d,0x39,0x78,0x22,0x2c,0x0a,0x22,0x78,0x78,0x78,0x2c,0x40,0x33,
+ 0x37,0x37,0x36,0x36,0x3a,0x20,0x6f,0x74,0x78,0x78,0x22,0x2c,0x0a,0x22,
+ 0x78,0x78,0x78,0x78,0x2c,0x2b,0x32,0x36,0x32,0x3b,0x20,0x6f,0x39,0x78,
+ 0x78,0x78,0x22,0x2c,0x0a,0x22,0x78,0x78,0x78,0x78,0x78,0x2c,0x2b,0x3a,
+ 0x3a,0x2e,0x6f,0x74,0x78,0x78,0x78,0x78,0x22,0x2c,0x0a,0x22,0x78,0x78,
+ 0x78,0x78,0x78,0x78,0x3c,0x4f,0x58,0x2d,0x39,0x78,0x78,0x78,0x78,0x78,
+ 0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int mini_form_xpm_len = 991;
+static const unsigned char mini_form_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x20,0x66,0x6f,0x72,0x6d,
+ 0x5f,0x78,0x70,0x6d,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x22,0x32,0x30,
+ 0x20,0x32,0x30,0x20,0x34,0x20,0x32,0x22,0x2c,0x0a,0x22,0x20,0x20,0x09,
+ 0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x09,0x63,
+ 0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x22,0x2b,0x20,0x09,0x63,0x20,
+ 0x23,0x30,0x30,0x30,0x30,0x37,0x39,0x22,0x2c,0x0a,0x22,0x40,0x20,0x09,
+ 0x63,0x20,0x23,0x46,0x46,0x46,0x46,0x46,0x46,0x22,0x2c,0x0a,0x22,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,
+ 0x22,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x22,
+ 0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x2b,0x20,0x2b,
+ 0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,
+ 0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2e,
+ 0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2b,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x2b,
+ 0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2b,
+ 0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,
+ 0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,
+ 0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,
+ 0x20,0x2b,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,
+ 0x20,0x2e,0x20,0x2b,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,
+ 0x22,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x22,
+ 0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x2b,0x20,0x2e,0x20,0x2e,
+ 0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x2b,0x20,0x2e,
+ 0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x2b,
+ 0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2b,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,
+ 0x20,0x2b,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,
+ 0x20,0x2e,0x20,0x2b,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,
+ 0x22,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x40,
+ 0x20,0x40,0x20,0x40,0x20,0x40,0x20,0x2b,0x20,0x2e,0x20,0x2e,0x20,0x22,
+ 0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,
+ 0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,
+ 0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2b,0x20,0x2e,0x20,0x2e,
+ 0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x22,0x2c,0x0a,0x22,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x2e,
+ 0x20,0x2e,0x20,0x2e,0x20,0x2e,0x20,0x22,0x7d,0x3b,0x0a
+};
+
+static const unsigned int mini_image_xpm_len = 510;
+static const unsigned char mini_image_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x63,0x68,0x61,0x72,0x20,
+ 0x2a,0x69,0x6d,0x61,0x67,0x65,0x5f,0x78,0x70,0x6d,0x5b,0x5d,0x20,0x3d,
+ 0x20,0x7b,0x0a,0x22,0x31,0x37,0x20,0x31,0x35,0x20,0x39,0x20,0x31,0x22,
+ 0x2c,0x0a,0x22,0x20,0x09,0x63,0x20,0x23,0x37,0x46,0x37,0x46,0x37,0x46,
+ 0x22,0x2c,0x0a,0x22,0x2e,0x09,0x63,0x20,0x23,0x46,0x46,0x46,0x46,0x46,
+ 0x46,0x22,0x2c,0x0a,0x22,0x58,0x09,0x63,0x20,0x23,0x30,0x30,0x42,0x36,
+ 0x46,0x46,0x22,0x2c,0x0a,0x22,0x6f,0x09,0x63,0x20,0x23,0x42,0x46,0x42,
+ 0x46,0x42,0x46,0x22,0x2c,0x0a,0x22,0x4f,0x09,0x63,0x20,0x23,0x46,0x46,
+ 0x36,0x43,0x30,0x30,0x22,0x2c,0x0a,0x22,0x2b,0x09,0x63,0x20,0x23,0x30,
+ 0x30,0x30,0x30,0x30,0x30,0x22,0x2c,0x0a,0x22,0x40,0x09,0x63,0x20,0x23,
+ 0x30,0x30,0x30,0x30,0x46,0x46,0x22,0x2c,0x0a,0x22,0x23,0x09,0x63,0x20,
+ 0x23,0x36,0x43,0x46,0x46,0x30,0x30,0x22,0x2c,0x0a,0x22,0x24,0x09,0x63,
+ 0x20,0x23,0x46,0x46,0x42,0x36,0x39,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2e,0x2e,0x58,
+ 0x58,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+ 0x6f,0x20,0x20,0x20,0x2e,0x58,0x58,0x58,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x6f,0x2e,0x20,0x20,0x58,0x58,0x58,
+ 0x2b,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x4f,0x40,0x40,0x40,0x40,0x40,0x40,
+ 0x2b,0x2b,0x2b,0x58,0x58,0x58,0x2b,0x2b,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x4f,0x40,0x40,0x40,0x40,0x40,0x40,0x4f,0x2e,0x58,0x58,0x58,0x2b,0x2b,
+ 0x2b,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x4f,0x40,0x40,0x40,0x40,0x40,0x40,
+ 0x4f,0x58,0x58,0x58,0x2b,0x2b,0x2b,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x4f,0x23,0x23,0x23,0x23,0x23,0x23,0x58,0x58,0x58,0x2b,0x2b,0x2e,0x2e,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x4f,0x23,0x23,0x23,0x23,0x23,0x58,
+ 0x58,0x58,0x2b,0x2b,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x4f,0x23,0x23,0x24,0x23,0x24,0x58,0x58,0x2b,0x6f,0x2b,0x2e,0x2e,0x2e,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x4f,0x23,0x24,0x24,0x24,0x24,0x24,
+ 0x2b,0x2e,0x6f,0x2b,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x4f,0x23,0x23,0x24,0x24,0x23,0x23,0x4f,0x2e,0x6f,0x2b,0x2e,0x2e,0x2e,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
+ 0x4f,0x2e,0x6f,0x2b,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x20,0x2e,
+ 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x6f,0x2b,0x2e,0x2e,0x2e,
+ 0x2e,0x22,0x2c,0x0a,0x22,0x20,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,
+ 0x6f,0x6f,0x6f,0x2b,0x2e,0x2e,0x2e,0x2e,0x22,0x2c,0x0a,0x22,0x2b,0x2b,
+ 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2e,0x2e,0x2e,
+ 0x2e,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int mini_left_xpm_len = 1405;
+static const unsigned char mini_left_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x31,0x36,0x20,0x31,0x36,
+ 0x20,0x34,0x37,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x23,
+ 0x30,0x66,0x30,0x66,0x33,0x63,0x33,0x63,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x31,0x36,0x31,0x36,0x33,0x39,0x33,
+ 0x39,0x65,0x66,0x65,0x66,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,0x23,
+ 0x31,0x38,0x31,0x38,0x33,0x66,0x33,0x66,0x66,0x62,0x66,0x62,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x63,0x20,0x23,0x32,0x37,0x32,0x37,0x33,0x66,0x33,
+ 0x66,0x64,0x31,0x64,0x31,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x63,0x20,0x23,
+ 0x31,0x37,0x31,0x37,0x34,0x35,0x34,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x20,0x63,0x20,0x23,0x31,0x64,0x31,0x64,0x34,0x33,0x34,
+ 0x33,0x66,0x32,0x66,0x32,0x22,0x2c,0x0a,0x22,0x40,0x20,0x63,0x20,0x23,
+ 0x31,0x64,0x31,0x64,0x34,0x63,0x34,0x63,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x63,0x20,0x23,0x33,0x30,0x33,0x30,0x35,0x36,0x35,
+ 0x36,0x64,0x38,0x64,0x38,0x22,0x2c,0x0a,0x22,0x24,0x20,0x63,0x20,0x23,
+ 0x33,0x61,0x33,0x61,0x35,0x32,0x35,0x32,0x64,0x34,0x64,0x34,0x22,0x2c,
+ 0x0a,0x22,0x25,0x20,0x63,0x20,0x23,0x32,0x30,0x32,0x30,0x34,0x37,0x34,
+ 0x37,0x66,0x63,0x66,0x63,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,0x20,0x23,
+ 0x32,0x63,0x32,0x63,0x35,0x36,0x35,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x20,0x63,0x20,0x23,0x33,0x34,0x33,0x34,0x36,0x32,0x36,
+ 0x32,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x23,
+ 0x33,0x62,0x33,0x62,0x36,0x62,0x36,0x62,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x63,0x20,0x23,0x36,0x33,0x36,0x33,0x37,0x37,0x37,
+ 0x37,0x62,0x38,0x62,0x38,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x63,0x20,0x23,
+ 0x34,0x62,0x34,0x62,0x36,0x33,0x36,0x33,0x63,0x34,0x63,0x34,0x22,0x2c,
+ 0x0a,0x22,0x3a,0x20,0x63,0x20,0x23,0x34,0x38,0x34,0x38,0x36,0x37,0x36,
+ 0x37,0x63,0x39,0x63,0x39,0x22,0x2c,0x0a,0x22,0x3e,0x20,0x63,0x20,0x23,
+ 0x35,0x31,0x35,0x31,0x36,0x64,0x36,0x64,0x63,0x64,0x63,0x64,0x22,0x2c,
+ 0x0a,0x22,0x2c,0x20,0x63,0x20,0x23,0x34,0x35,0x34,0x35,0x37,0x34,0x37,
+ 0x34,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x63,0x20,0x23,
+ 0x34,0x63,0x34,0x63,0x37,0x64,0x37,0x64,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x31,0x20,0x63,0x20,0x23,0x37,0x61,0x37,0x61,0x38,0x63,0x38,
+ 0x63,0x62,0x64,0x62,0x64,0x22,0x2c,0x0a,0x22,0x32,0x20,0x63,0x20,0x23,
+ 0x35,0x36,0x35,0x36,0x38,0x35,0x38,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x63,0x20,0x23,0x35,0x66,0x35,0x66,0x38,0x62,0x38,
+ 0x62,0x66,0x61,0x66,0x61,0x22,0x2c,0x0a,0x22,0x34,0x20,0x63,0x20,0x23,
+ 0x37,0x36,0x37,0x36,0x38,0x62,0x38,0x62,0x63,0x30,0x63,0x30,0x22,0x2c,
+ 0x0a,0x22,0x35,0x20,0x63,0x20,0x23,0x36,0x37,0x36,0x37,0x39,0x37,0x39,
+ 0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x36,0x20,0x63,0x20,0x23,
+ 0x36,0x61,0x36,0x61,0x39,0x38,0x39,0x38,0x66,0x34,0x66,0x34,0x22,0x2c,
+ 0x0a,0x22,0x37,0x20,0x63,0x20,0x23,0x36,0x66,0x36,0x66,0x39,0x66,0x39,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x38,0x20,0x63,0x20,0x23,
+ 0x37,0x66,0x37,0x66,0x61,0x33,0x61,0x33,0x65,0x39,0x65,0x39,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x63,0x20,0x23,0x37,0x36,0x37,0x36,0x61,0x36,0x61,
+ 0x36,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x30,0x20,0x63,0x20,0x23,
+ 0x37,0x36,0x37,0x36,0x61,0x38,0x61,0x38,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x71,0x20,0x63,0x20,0x23,0x37,0x65,0x37,0x65,0x61,0x66,0x61,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x77,0x20,0x63,0x20,0x23,
+ 0x37,0x66,0x37,0x66,0x62,0x31,0x62,0x31,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x65,0x20,0x63,0x20,0x23,0x38,0x66,0x38,0x66,0x61,0x36,0x61,
+ 0x36,0x65,0x39,0x65,0x39,0x22,0x2c,0x0a,0x22,0x72,0x20,0x63,0x20,0x23,
+ 0x38,0x33,0x38,0x33,0x62,0x31,0x62,0x31,0x66,0x35,0x66,0x35,0x22,0x2c,
+ 0x0a,0x22,0x74,0x20,0x63,0x20,0x23,0x38,0x32,0x38,0x32,0x62,0x35,0x62,
+ 0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x79,0x20,0x63,0x20,0x23,
+ 0x39,0x34,0x39,0x34,0x63,0x34,0x63,0x34,0x66,0x61,0x66,0x61,0x22,0x2c,
+ 0x0a,0x22,0x75,0x20,0x63,0x20,0x23,0x39,0x37,0x39,0x37,0x63,0x62,0x63,
+ 0x62,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x69,0x20,0x63,0x20,0x23,
+ 0x39,0x66,0x39,0x66,0x63,0x36,0x63,0x36,0x66,0x31,0x66,0x31,0x22,0x2c,
+ 0x0a,0x22,0x70,0x20,0x63,0x20,0x23,0x39,0x66,0x39,0x66,0x64,0x34,0x64,
+ 0x34,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x61,0x20,0x63,0x20,0x23,
+ 0x62,0x62,0x62,0x62,0x65,0x34,0x65,0x34,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x73,0x20,0x63,0x20,0x23,0x63,0x30,0x63,0x30,0x63,0x30,0x63,
+ 0x30,0x63,0x30,0x63,0x30,0x22,0x2c,0x0a,0x22,0x64,0x20,0x63,0x20,0x23,
+ 0x63,0x65,0x63,0x65,0x64,0x63,0x64,0x63,0x66,0x64,0x66,0x64,0x22,0x2c,
+ 0x0a,0x22,0x66,0x20,0x63,0x20,0x23,0x63,0x33,0x63,0x33,0x65,0x36,0x65,
+ 0x36,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x67,0x20,0x63,0x20,0x23,
+ 0x64,0x38,0x64,0x38,0x65,0x31,0x65,0x31,0x66,0x39,0x66,0x39,0x22,0x2c,
+ 0x0a,0x22,0x68,0x20,0x63,0x20,0x23,0x65,0x36,0x65,0x36,0x65,0x61,0x65,
+ 0x61,0x66,0x61,0x66,0x61,0x22,0x2c,0x0a,0x22,0x6a,0x20,0x63,0x20,0x23,
+ 0x65,0x34,0x65,0x34,0x66,0x39,0x66,0x39,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x6b,0x20,0x63,0x20,0x23,0x65,0x65,0x65,0x65,0x66,0x66,0x66,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x63,0x20,0x4e,
+ 0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,
+ 0x73,0x20,0x2a,0x2f,0x0a,0x22,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,
+ 0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x22,0x2c,0x0a,0x22,0x6c,0x6c,
+ 0x6c,0x6c,0x6c,0x34,0x65,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,
+ 0x22,0x2c,0x0a,0x22,0x6c,0x6c,0x6c,0x6c,0x65,0x67,0x68,0x65,0x6c,0x6c,
+ 0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x22,0x2c,0x0a,0x22,0x6c,0x6c,0x6c,0x31,
+ 0x68,0x6b,0x69,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x22,0x2c,
+ 0x0a,0x22,0x6c,0x6c,0x31,0x6b,0x6b,0x70,0x30,0x31,0x6c,0x6c,0x6c,0x6c,
+ 0x6c,0x6c,0x6c,0x6c,0x22,0x2c,0x0a,0x22,0x6c,0x34,0x6b,0x6b,0x79,0x77,
+ 0x71,0x34,0x6c,0x65,0x31,0x65,0x34,0x65,0x38,0x34,0x22,0x2c,0x0a,0x22,
+ 0x31,0x64,0x6b,0x79,0x39,0x71,0x39,0x35,0x38,0x69,0x61,0x61,0x66,0x61,
+ 0x74,0x23,0x22,0x2c,0x0a,0x22,0x69,0x6a,0x75,0x71,0x39,0x39,0x37,0x71,
+ 0x79,0x79,0x72,0x74,0x30,0x39,0x2c,0x26,0x22,0x2c,0x0a,0x22,0x36,0x74,
+ 0x77,0x39,0x39,0x37,0x37,0x37,0x35,0x35,0x37,0x37,0x35,0x35,0x2c,0x6f,
+ 0x22,0x2c,0x0a,0x22,0x2d,0x25,0x33,0x39,0x37,0x37,0x39,0x2a,0x58,0x25,
+ 0x26,0x2a,0x3d,0x2c,0x2a,0x2b,0x22,0x2c,0x0a,0x22,0x6c,0x24,0x40,0x32,
+ 0x35,0x37,0x37,0x3e,0x31,0x31,0x3b,0x24,0x6f,0x2e,0x2b,0x3b,0x22,0x2c,
+ 0x0a,0x22,0x6c,0x6c,0x3e,0x4f,0x2c,0x35,0x37,0x31,0x6c,0x6c,0x6c,0x6c,
+ 0x6c,0x6c,0x31,0x6c,0x22,0x2c,0x0a,0x22,0x6c,0x6c,0x6c,0x3a,0x58,0x3c,
+ 0x32,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x22,0x2c,0x0a,0x22,
+ 0x6c,0x6c,0x6c,0x6c,0x2d,0x20,0x40,0x34,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,
+ 0x6c,0x6c,0x22,0x2c,0x0a,0x22,0x6c,0x6c,0x6c,0x6c,0x6c,0x2d,0x2e,0x34,
+ 0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x22,0x2c,0x0a,0x22,0x6c,0x6c,
+ 0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,
+ 0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int mini_resetproperty_xpm_len = 180;
+static const unsigned char mini_resetproperty_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x20,0x72,0x65,0x73,0x65,
+ 0x74,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x78,0x70,0x6d,0x5b,
+ 0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x22,0x37,0x20,0x36,0x20,0x34,0x20,0x31,
+ 0x22,0x2c,0x0a,0x22,0x20,0x09,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x09,0x63,0x20,0x23,0x43,0x30,0x30,0x30,0x30,0x30,0x22,
+ 0x2c,0x0a,0x22,0x2b,0x09,0x63,0x20,0x23,0x46,0x46,0x30,0x30,0x30,0x30,
+ 0x22,0x2c,0x0a,0x22,0x40,0x09,0x63,0x20,0x4e,0x6f,0x6e,0x65,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x2b,0x40,0x40,0x40,0x2b,0x2e,0x22,0x2c,0x0a,0x22,0x40,
+ 0x2e,0x2b,0x40,0x2b,0x2e,0x40,0x22,0x2c,0x0a,0x22,0x40,0x40,0x2e,0x2b,
+ 0x2e,0x40,0x40,0x22,0x2c,0x0a,0x22,0x40,0x40,0x2b,0x2e,0x2b,0x40,0x40,
+ 0x22,0x2c,0x0a,0x22,0x40,0x2b,0x2e,0x40,0x2e,0x2b,0x40,0x22,0x2c,0x0a,
+ 0x22,0x2b,0x2e,0x40,0x40,0x40,0x2e,0x2b,0x22,0x7d,0x3b,0x0a
+};
+
+static const unsigned int mini_right_xpm_len = 1573;
+static const unsigned char mini_right_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x31,0x36,0x20,0x31,0x36,
+ 0x20,0x35,0x35,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x23,
+ 0x30,0x32,0x30,0x32,0x32,0x35,0x32,0x35,0x66,0x65,0x66,0x65,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x30,0x36,0x30,0x36,0x32,0x61,0x32,
+ 0x61,0x66,0x62,0x66,0x62,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,0x23,
+ 0x31,0x63,0x31,0x63,0x33,0x63,0x33,0x63,0x65,0x35,0x65,0x35,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x63,0x20,0x23,0x32,0x32,0x32,0x32,0x33,0x37,0x33,
+ 0x37,0x64,0x36,0x64,0x36,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x63,0x20,0x23,
+ 0x33,0x62,0x33,0x62,0x35,0x33,0x35,0x33,0x63,0x62,0x63,0x62,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x20,0x63,0x20,0x23,0x32,0x36,0x32,0x36,0x34,0x61,0x34,
+ 0x61,0x65,0x62,0x65,0x62,0x22,0x2c,0x0a,0x22,0x40,0x20,0x63,0x20,0x23,
+ 0x32,0x63,0x32,0x63,0x34,0x66,0x34,0x66,0x65,0x65,0x65,0x65,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x63,0x20,0x23,0x33,0x33,0x33,0x33,0x35,0x62,0x35,
+ 0x62,0x66,0x31,0x66,0x31,0x22,0x2c,0x0a,0x22,0x24,0x20,0x63,0x20,0x23,
+ 0x33,0x32,0x33,0x32,0x35,0x61,0x35,0x61,0x66,0x61,0x66,0x61,0x22,0x2c,
+ 0x0a,0x22,0x25,0x20,0x63,0x20,0x23,0x33,0x35,0x33,0x35,0x36,0x35,0x36,
+ 0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,0x20,0x23,
+ 0x33,0x39,0x33,0x39,0x36,0x34,0x36,0x34,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x20,0x63,0x20,0x23,0x33,0x65,0x33,0x65,0x36,0x39,0x36,
+ 0x39,0x66,0x65,0x66,0x65,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x23,
+ 0x34,0x39,0x34,0x39,0x35,0x64,0x35,0x64,0x62,0x63,0x62,0x63,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x63,0x20,0x23,0x36,0x32,0x36,0x32,0x37,0x37,0x37,
+ 0x37,0x62,0x62,0x62,0x62,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x63,0x20,0x23,
+ 0x36,0x38,0x36,0x38,0x37,0x64,0x37,0x64,0x62,0x38,0x62,0x38,0x22,0x2c,
+ 0x0a,0x22,0x3a,0x20,0x63,0x20,0x23,0x34,0x30,0x34,0x30,0x35,0x64,0x35,
+ 0x64,0x63,0x61,0x63,0x61,0x22,0x2c,0x0a,0x22,0x3e,0x20,0x63,0x20,0x23,
+ 0x34,0x39,0x34,0x39,0x36,0x33,0x36,0x33,0x63,0x36,0x63,0x36,0x22,0x2c,
+ 0x0a,0x22,0x2c,0x20,0x63,0x20,0x23,0x35,0x30,0x35,0x30,0x37,0x31,0x37,
+ 0x31,0x64,0x66,0x64,0x66,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x63,0x20,0x23,
+ 0x34,0x63,0x34,0x63,0x37,0x35,0x37,0x35,0x65,0x39,0x65,0x39,0x22,0x2c,
+ 0x0a,0x22,0x31,0x20,0x63,0x20,0x23,0x35,0x63,0x35,0x63,0x37,0x61,0x37,
+ 0x61,0x65,0x61,0x65,0x61,0x22,0x2c,0x0a,0x22,0x32,0x20,0x63,0x20,0x23,
+ 0x37,0x39,0x37,0x39,0x38,0x39,0x38,0x39,0x61,0x66,0x61,0x66,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x63,0x20,0x23,0x35,0x34,0x35,0x34,0x38,0x34,0x38,
+ 0x34,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x34,0x20,0x63,0x20,0x23,
+ 0x35,0x64,0x35,0x64,0x38,0x65,0x38,0x65,0x66,0x64,0x66,0x64,0x22,0x2c,
+ 0x0a,0x22,0x35,0x20,0x63,0x20,0x23,0x36,0x65,0x36,0x65,0x38,0x35,0x38,
+ 0x35,0x63,0x35,0x63,0x35,0x22,0x2c,0x0a,0x22,0x36,0x20,0x63,0x20,0x23,
+ 0x36,0x37,0x36,0x37,0x39,0x36,0x39,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x37,0x20,0x63,0x20,0x23,0x36,0x64,0x36,0x64,0x39,0x38,0x39,
+ 0x38,0x66,0x30,0x66,0x30,0x22,0x2c,0x0a,0x22,0x38,0x20,0x63,0x20,0x23,
+ 0x36,0x64,0x36,0x64,0x39,0x62,0x39,0x62,0x66,0x61,0x66,0x61,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x63,0x20,0x23,0x37,0x39,0x37,0x39,0x39,0x38,0x39,
+ 0x38,0x65,0x38,0x65,0x38,0x22,0x2c,0x0a,0x22,0x30,0x20,0x63,0x20,0x23,
+ 0x36,0x63,0x36,0x63,0x61,0x30,0x61,0x30,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x71,0x20,0x63,0x20,0x23,0x37,0x66,0x37,0x66,0x61,0x30,0x61,
+ 0x30,0x65,0x33,0x65,0x33,0x22,0x2c,0x0a,0x22,0x77,0x20,0x63,0x20,0x23,
+ 0x37,0x36,0x37,0x36,0x61,0x36,0x61,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x65,0x20,0x63,0x20,0x23,0x37,0x63,0x37,0x63,0x61,0x38,0x61,
+ 0x38,0x66,0x32,0x66,0x32,0x22,0x2c,0x0a,0x22,0x72,0x20,0x63,0x20,0x23,
+ 0x37,0x66,0x37,0x66,0x61,0x66,0x61,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x74,0x20,0x63,0x20,0x23,0x38,0x38,0x38,0x38,0x61,0x32,0x61,
+ 0x32,0x66,0x30,0x66,0x30,0x22,0x2c,0x0a,0x22,0x79,0x20,0x63,0x20,0x23,
+ 0x38,0x36,0x38,0x36,0x62,0x36,0x62,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x75,0x20,0x63,0x20,0x23,0x38,0x38,0x38,0x38,0x62,0x37,0x62,
+ 0x37,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x69,0x20,0x63,0x20,0x23,
+ 0x38,0x63,0x38,0x63,0x62,0x38,0x62,0x38,0x66,0x30,0x66,0x30,0x22,0x2c,
+ 0x0a,0x22,0x70,0x20,0x63,0x20,0x23,0x38,0x66,0x38,0x66,0x62,0x66,0x62,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x61,0x20,0x63,0x20,0x23,
+ 0x39,0x35,0x39,0x35,0x63,0x37,0x63,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x73,0x20,0x63,0x20,0x23,0x39,0x37,0x39,0x37,0x63,0x38,0x63,
+ 0x38,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x64,0x20,0x63,0x20,0x23,
+ 0x39,0x64,0x39,0x64,0x63,0x66,0x63,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x66,0x20,0x63,0x20,0x23,0x39,0x66,0x39,0x66,0x64,0x32,0x64,
+ 0x32,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x67,0x20,0x63,0x20,0x23,
+ 0x61,0x32,0x61,0x32,0x64,0x30,0x64,0x30,0x66,0x30,0x66,0x30,0x22,0x2c,
+ 0x0a,0x22,0x68,0x20,0x63,0x20,0x23,0x61,0x31,0x61,0x31,0x64,0x30,0x64,
+ 0x30,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x6a,0x20,0x63,0x20,0x23,
+ 0x61,0x39,0x61,0x39,0x64,0x65,0x64,0x65,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x6b,0x20,0x63,0x20,0x23,0x62,0x31,0x62,0x31,0x64,0x37,0x64,
+ 0x37,0x66,0x32,0x66,0x32,0x22,0x2c,0x0a,0x22,0x6c,0x20,0x63,0x20,0x23,
+ 0x62,0x65,0x62,0x65,0x64,0x62,0x64,0x62,0x66,0x35,0x66,0x35,0x22,0x2c,
+ 0x0a,0x22,0x7a,0x20,0x63,0x20,0x23,0x62,0x63,0x62,0x63,0x64,0x39,0x64,
+ 0x39,0x66,0x65,0x66,0x65,0x22,0x2c,0x0a,0x22,0x78,0x20,0x63,0x20,0x23,
+ 0x61,0x64,0x61,0x64,0x65,0x32,0x65,0x32,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x63,0x20,0x63,0x20,0x23,0x62,0x39,0x62,0x39,0x65,0x35,0x65,
+ 0x35,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x76,0x20,0x63,0x20,0x23,
+ 0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x63,0x30,0x22,0x2c,
+ 0x0a,0x22,0x62,0x20,0x63,0x20,0x23,0x63,0x63,0x63,0x63,0x66,0x30,0x66,
+ 0x30,0x66,0x32,0x66,0x32,0x22,0x2c,0x0a,0x22,0x6e,0x20,0x63,0x20,0x23,
+ 0x63,0x64,0x63,0x64,0x66,0x36,0x66,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x6d,0x20,0x63,0x20,0x23,0x65,0x32,0x65,0x32,0x66,0x66,0x66,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x4d,0x20,0x63,0x20,0x4e,
+ 0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,0x6c,
+ 0x73,0x20,0x2a,0x2f,0x0a,0x22,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
+ 0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x22,0x2c,0x0a,0x22,0x4d,0x4d,
+ 0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x71,0x32,0x4d,0x4d,0x4d,0x4d,0x4d,
+ 0x22,0x2c,0x0a,0x22,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x62,
+ 0x72,0x35,0x4d,0x4d,0x4d,0x4d,0x22,0x2c,0x0a,0x22,0x4d,0x4d,0x4d,0x4d,
+ 0x4d,0x4d,0x4d,0x4d,0x4d,0x64,0x6a,0x36,0x35,0x4d,0x4d,0x4d,0x22,0x2c,
+ 0x0a,0x22,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x71,0x73,0x64,
+ 0x77,0x35,0x4d,0x4d,0x22,0x2c,0x0a,0x22,0x32,0x74,0x71,0x71,0x35,0x71,
+ 0x4d,0x4d,0x32,0x79,0x70,0x70,0x61,0x36,0x2d,0x4d,0x22,0x2c,0x0a,0x22,
+ 0x69,0x6d,0x6e,0x63,0x6c,0x6c,0x67,0x6b,0x7a,0x79,0x72,0x79,0x79,0x70,
+ 0x34,0x3b,0x22,0x2c,0x0a,0x22,0x65,0x78,0x61,0x61,0x73,0x61,0x64,0x68,
+ 0x61,0x72,0x72,0x72,0x72,0x72,0x38,0x3c,0x22,0x2c,0x0a,0x22,0x37,0x66,
+ 0x75,0x79,0x72,0x77,0x77,0x30,0x72,0x72,0x72,0x72,0x77,0x36,0x2a,0x58,
+ 0x22,0x2c,0x0a,0x22,0x2c,0x30,0x33,0x2a,0x25,0x24,0x40,0x2b,0x26,0x72,
+ 0x72,0x77,0x38,0x25,0x2e,0x3b,0x22,0x2c,0x0a,0x22,0x32,0x58,0x6f,0x4f,
+ 0x3e,0x3b,0x32,0x32,0x2d,0x38,0x77,0x38,0x25,0x20,0x3d,0x4d,0x22,0x2c,
+ 0x0a,0x22,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x39,0x36,0x24,
+ 0x20,0x3e,0x4d,0x4d,0x22,0x2c,0x0a,0x22,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
+ 0x4d,0x4d,0x4d,0x31,0x25,0x2e,0x3e,0x4d,0x4d,0x4d,0x22,0x2c,0x0a,0x22,
+ 0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x23,0x20,0x3e,0x4d,0x4d,
+ 0x4d,0x4d,0x22,0x2c,0x0a,0x22,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
+ 0x4d,0x3a,0x2d,0x4d,0x4d,0x4d,0x4d,0x4d,0x22,0x2c,0x0a,0x22,0x4d,0x4d,
+ 0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
+ 0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int mini_up_xpm_len = 1378;
+static const unsigned char mini_up_xpm_data[] = {
+ 0x2f,0x2a,0x20,0x58,0x50,0x4d,0x20,0x2a,0x2f,0x0a,0x73,0x74,0x61,0x74,
+ 0x69,0x63,0x20,0x63,0x68,0x61,0x72,0x20,0x2a,0x6d,0x61,0x67,0x69,0x63,
+ 0x6b,0x5b,0x5d,0x20,0x3d,0x20,0x7b,0x0a,0x2f,0x2a,0x20,0x63,0x6f,0x6c,
+ 0x75,0x6d,0x6e,0x73,0x20,0x72,0x6f,0x77,0x73,0x20,0x63,0x6f,0x6c,0x6f,
+ 0x72,0x73,0x20,0x63,0x68,0x61,0x72,0x73,0x2d,0x70,0x65,0x72,0x2d,0x70,
+ 0x69,0x78,0x65,0x6c,0x20,0x2a,0x2f,0x0a,0x22,0x31,0x36,0x20,0x31,0x36,
+ 0x20,0x34,0x36,0x20,0x31,0x22,0x2c,0x0a,0x22,0x20,0x20,0x63,0x20,0x23,
+ 0x31,0x36,0x31,0x36,0x33,0x36,0x33,0x36,0x65,0x62,0x65,0x62,0x22,0x2c,
+ 0x0a,0x22,0x2e,0x20,0x63,0x20,0x23,0x31,0x37,0x31,0x37,0x33,0x61,0x33,
+ 0x61,0x65,0x63,0x65,0x63,0x22,0x2c,0x0a,0x22,0x58,0x20,0x63,0x20,0x23,
+ 0x31,0x61,0x31,0x61,0x33,0x66,0x33,0x66,0x66,0x33,0x66,0x33,0x22,0x2c,
+ 0x0a,0x22,0x6f,0x20,0x63,0x20,0x23,0x31,0x62,0x31,0x62,0x34,0x33,0x34,
+ 0x33,0x66,0x65,0x66,0x65,0x22,0x2c,0x0a,0x22,0x4f,0x20,0x63,0x20,0x23,
+ 0x33,0x66,0x33,0x66,0x35,0x36,0x35,0x36,0x64,0x31,0x64,0x31,0x22,0x2c,
+ 0x0a,0x22,0x2b,0x20,0x63,0x20,0x23,0x32,0x62,0x32,0x62,0x35,0x63,0x35,
+ 0x63,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x40,0x20,0x63,0x20,0x23,
+ 0x33,0x31,0x33,0x31,0x35,0x66,0x35,0x66,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x23,0x20,0x63,0x20,0x23,0x33,0x36,0x33,0x36,0x36,0x37,0x36,
+ 0x37,0x66,0x65,0x66,0x65,0x22,0x2c,0x0a,0x22,0x24,0x20,0x63,0x20,0x23,
+ 0x33,0x62,0x33,0x62,0x36,0x36,0x36,0x36,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x25,0x20,0x63,0x20,0x23,0x33,0x66,0x33,0x66,0x36,0x65,0x36,
+ 0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x26,0x20,0x63,0x20,0x23,
+ 0x36,0x39,0x36,0x39,0x37,0x62,0x37,0x62,0x62,0x38,0x62,0x38,0x22,0x2c,
+ 0x0a,0x22,0x2a,0x20,0x63,0x20,0x23,0x34,0x64,0x34,0x64,0x36,0x35,0x36,
+ 0x35,0x63,0x63,0x63,0x63,0x22,0x2c,0x0a,0x22,0x3d,0x20,0x63,0x20,0x23,
+ 0x35,0x31,0x35,0x31,0x36,0x63,0x36,0x63,0x63,0x65,0x63,0x65,0x22,0x2c,
+ 0x0a,0x22,0x2d,0x20,0x63,0x20,0x23,0x35,0x35,0x35,0x35,0x37,0x32,0x37,
+ 0x32,0x63,0x65,0x63,0x65,0x22,0x2c,0x0a,0x22,0x3b,0x20,0x63,0x20,0x23,
+ 0x35,0x38,0x35,0x38,0x37,0x31,0x37,0x31,0x63,0x37,0x63,0x37,0x22,0x2c,
+ 0x0a,0x22,0x3a,0x20,0x63,0x20,0x23,0x34,0x32,0x34,0x32,0x36,0x64,0x36,
+ 0x64,0x65,0x64,0x65,0x64,0x22,0x2c,0x0a,0x22,0x3e,0x20,0x63,0x20,0x23,
+ 0x34,0x37,0x34,0x37,0x37,0x37,0x37,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x2c,0x20,0x63,0x20,0x23,0x34,0x61,0x34,0x61,0x37,0x61,0x37,
+ 0x61,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x3c,0x20,0x63,0x20,0x23,
+ 0x36,0x34,0x36,0x34,0x37,0x62,0x37,0x62,0x63,0x30,0x63,0x30,0x22,0x2c,
+ 0x0a,0x22,0x31,0x20,0x63,0x20,0x23,0x37,0x32,0x37,0x32,0x38,0x37,0x38,
+ 0x37,0x62,0x62,0x62,0x62,0x22,0x2c,0x0a,0x22,0x32,0x20,0x63,0x20,0x23,
+ 0x35,0x30,0x35,0x30,0x38,0x35,0x38,0x35,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x33,0x20,0x63,0x20,0x23,0x35,0x63,0x35,0x63,0x38,0x61,0x38,
+ 0x61,0x66,0x37,0x66,0x37,0x22,0x2c,0x0a,0x22,0x34,0x20,0x63,0x20,0x23,
+ 0x36,0x61,0x36,0x61,0x38,0x39,0x38,0x39,0x64,0x37,0x64,0x37,0x22,0x2c,
+ 0x0a,0x22,0x35,0x20,0x63,0x20,0x23,0x36,0x30,0x36,0x30,0x38,0x65,0x38,
+ 0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x36,0x20,0x63,0x20,0x23,
+ 0x36,0x36,0x36,0x36,0x39,0x37,0x39,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x37,0x20,0x63,0x20,0x23,0x36,0x37,0x36,0x37,0x39,0x38,0x39,
+ 0x38,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x38,0x20,0x63,0x20,0x23,
+ 0x36,0x61,0x36,0x61,0x39,0x62,0x39,0x62,0x66,0x34,0x66,0x34,0x22,0x2c,
+ 0x0a,0x22,0x39,0x20,0x63,0x20,0x23,0x36,0x65,0x36,0x65,0x39,0x65,0x39,
+ 0x65,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x30,0x20,0x63,0x20,0x23,
+ 0x37,0x36,0x37,0x36,0x61,0x37,0x61,0x37,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x71,0x20,0x63,0x20,0x23,0x37,0x37,0x37,0x37,0x61,0x39,0x61,
+ 0x39,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x77,0x20,0x63,0x20,0x23,
+ 0x37,0x38,0x37,0x38,0x61,0x31,0x61,0x31,0x66,0x37,0x66,0x37,0x22,0x2c,
+ 0x0a,0x22,0x65,0x20,0x63,0x20,0x23,0x37,0x65,0x37,0x65,0x61,0x66,0x61,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x72,0x20,0x63,0x20,0x23,
+ 0x38,0x39,0x38,0x39,0x62,0x64,0x62,0x64,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x74,0x20,0x63,0x20,0x23,0x39,0x30,0x39,0x30,0x63,0x36,0x63,
+ 0x36,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x79,0x20,0x63,0x20,0x23,
+ 0x39,0x36,0x39,0x36,0x63,0x63,0x63,0x63,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x75,0x20,0x63,0x20,0x23,0x39,0x39,0x39,0x39,0x63,0x39,0x63,
+ 0x39,0x66,0x39,0x66,0x39,0x22,0x2c,0x0a,0x22,0x69,0x20,0x63,0x20,0x23,
+ 0x39,0x64,0x39,0x64,0x64,0x31,0x64,0x31,0x66,0x66,0x66,0x66,0x22,0x2c,
+ 0x0a,0x22,0x70,0x20,0x63,0x20,0x23,0x62,0x32,0x62,0x32,0x63,0x36,0x63,
+ 0x36,0x66,0x34,0x66,0x34,0x22,0x2c,0x0a,0x22,0x61,0x20,0x63,0x20,0x23,
+ 0x62,0x66,0x62,0x66,0x65,0x36,0x65,0x36,0x66,0x65,0x66,0x65,0x22,0x2c,
+ 0x0a,0x22,0x73,0x20,0x63,0x20,0x23,0x63,0x30,0x63,0x30,0x63,0x30,0x63,
+ 0x30,0x63,0x30,0x63,0x30,0x22,0x2c,0x0a,0x22,0x64,0x20,0x63,0x20,0x23,
+ 0x64,0x31,0x64,0x31,0x65,0x30,0x65,0x30,0x66,0x63,0x66,0x63,0x22,0x2c,
+ 0x0a,0x22,0x66,0x20,0x63,0x20,0x23,0x64,0x62,0x64,0x62,0x66,0x39,0x66,
+ 0x39,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x67,0x20,0x63,0x20,0x23,
+ 0x65,0x34,0x65,0x34,0x65,0x62,0x65,0x62,0x66,0x63,0x66,0x63,0x22,0x2c,
+ 0x0a,0x22,0x68,0x20,0x63,0x20,0x23,0x65,0x37,0x65,0x37,0x66,0x66,0x66,
+ 0x66,0x66,0x66,0x66,0x66,0x22,0x2c,0x0a,0x22,0x6a,0x20,0x63,0x20,0x47,
+ 0x72,0x61,0x79,0x31,0x30,0x30,0x22,0x2c,0x0a,0x22,0x6b,0x20,0x63,0x20,
+ 0x4e,0x6f,0x6e,0x65,0x22,0x2c,0x0a,0x2f,0x2a,0x20,0x70,0x69,0x78,0x65,
+ 0x6c,0x73,0x20,0x2a,0x2f,0x0a,0x22,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x31,
+ 0x70,0x77,0x31,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x22,0x2c,0x0a,0x22,0x6b,
+ 0x6b,0x6b,0x6b,0x6b,0x31,0x67,0x66,0x69,0x3e,0x3b,0x6b,0x6b,0x6b,0x6b,
+ 0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x6b,0x6b,0x6b,0x31,0x67,0x68,0x75,0x72,
+ 0x65,0x3e,0x26,0x6b,0x6b,0x6b,0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x6b,0x6b,
+ 0x31,0x67,0x68,0x74,0x65,0x30,0x30,0x39,0x40,0x3c,0x6b,0x6b,0x6b,0x22,
+ 0x2c,0x0a,0x22,0x6b,0x6b,0x31,0x6a,0x68,0x72,0x30,0x30,0x39,0x39,0x39,
+ 0x39,0x23,0x26,0x6b,0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x31,0x64,0x68,0x79,
+ 0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x2b,0x26,0x6b,0x22,0x2c,0x0a,
+ 0x22,0x6b,0x34,0x61,0x75,0x71,0x30,0x39,0x39,0x39,0x39,0x37,0x36,0x33,
+ 0x24,0x2e,0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x31,0x6b,0x31,0x6b,0x31,0x3e,
+ 0x39,0x39,0x24,0x2a,0x6b,0x77,0x31,0x31,0x6b,0x22,0x2c,0x0a,0x22,0x6b,
+ 0x6b,0x6b,0x6b,0x6b,0x6b,0x3a,0x71,0x37,0x6f,0x31,0x6b,0x6b,0x6b,0x6b,
+ 0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x33,0x65,0x36,
+ 0x2b,0x31,0x6b,0x6b,0x6b,0x6b,0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x6b,0x6b,
+ 0x6b,0x6b,0x31,0x38,0x65,0x39,0x40,0x3b,0x6b,0x6b,0x6b,0x6b,0x6b,0x22,
+ 0x2c,0x0a,0x22,0x6b,0x6b,0x6b,0x6b,0x6b,0x31,0x65,0x71,0x36,0x24,0x4f,
+ 0x6b,0x6b,0x6b,0x6b,0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x6b,0x6b,0x6b,0x6b,
+ 0x31,0x72,0x30,0x36,0x3e,0x2e,0x6b,0x6b,0x6b,0x6b,0x6b,0x22,0x2c,0x0a,
+ 0x22,0x6b,0x6b,0x6b,0x6b,0x6b,0x34,0x65,0x36,0x35,0x2c,0x2e,0x6b,0x6b,
+ 0x6b,0x6b,0x6b,0x22,0x2c,0x0a,0x22,0x6b,0x6b,0x6b,0x6b,0x6b,0x2d,0x32,
+ 0x25,0x23,0x23,0x58,0x31,0x6b,0x6b,0x6b,0x6b,0x22,0x2c,0x0a,0x22,0x6b,
+ 0x6b,0x6b,0x6b,0x6b,0x31,0x2e,0x2e,0x2e,0x20,0x3d,0x6b,0x6b,0x6b,0x6b,
+ 0x6b,0x22,0x0a,0x7d,0x3b,0x0a
+};
+
+static const unsigned int background_png_len = 15068;
+static const unsigned char background_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0xa8,0x00,0x00,0x00,0xa5,0x08,0x02,0x00,0x00,
+ 0x00,0x47,0xb7,0x21,0x3d,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,
+ 0xd4,0x08,0x03,0x00,0x22,0x0a,0x20,0xd9,0xbf,0x88,0x00,0x00,0x00,0x06,
+ 0x62,0x4b,0x47,0x44,0x00,0xff,0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,
+ 0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x10,0x00,0x00,
+ 0x0b,0x10,0x01,0xad,0x23,0xbd,0x75,0x00,0x00,0x3a,0x69,0x49,0x44,0x41,
+ 0x54,0x78,0xda,0xb5,0x7d,0xdb,0x92,0xe3,0x48,0x8e,0x25,0x00,0x77,0x4a,
+ 0x8a,0xc8,0x2e,0xb3,0x7d,0xea,0xff,0x7f,0xea,0x4f,0x9b,0x97,0x9d,0x59,
+ 0xb3,0xe9,0x0c,0x5d,0xe9,0xee,0xd8,0x07,0x90,0x20,0xe8,0x37,0xba,0x94,
+ 0xd5,0xd1,0xd5,0x59,0x51,0x91,0x0a,0x8a,0x22,0x1c,0xf7,0x83,0x03,0xfc,
+ 0xd7,0xbf,0xfe,0x05,0x00,0x88,0xc8,0xcc,0xcc,0x0c,0x00,0xfa,0xa7,0x7c,
+ 0x13,0x63,0xe4,0x14,0xbc,0xf7,0xde,0x7b,0x24,0xe2,0x94,0x52,0x8c,0x89,
+ 0x13,0x30,0x00,0x82,0xfc,0x2e,0x00,0x20,0xe0,0x7a,0x1d,0x40,0xc4,0xf3,
+ 0xe5,0xcc,0x40,0x21,0x84,0x94,0x12,0x33,0xcb,0x6b,0xe4,0x82,0x21,0x84,
+ 0xd7,0xeb,0x75,0x3a,0x9d,0xfe,0xfa,0xeb,0xaf,0xd7,0xeb,0xf5,0x7a,0xbd,
+ 0xf4,0xbd,0xf4,0x6b,0xb9,0x26,0xa2,0x7c,0x23,0xdf,0xc7,0x18,0x43,0x08,
+ 0xe7,0xf3,0xf9,0xd7,0xaf,0x5f,0x88,0x18,0x42,0x90,0xeb,0x97,0xf7,0xac,
+ 0x5f,0xd9,0x87,0xb2,0x97,0x95,0x5f,0x74,0xce,0x8d,0xff,0x4a,0x76,0x7b,
+ 0xcc,0x1c,0x63,0x64,0x66,0xe7,0xdc,0x5f,0x7f,0xfd,0xe5,0x9c,0xbb,0xdd,
+ 0x6e,0x7a,0x3f,0xf6,0x22,0x7a,0x65,0xfd,0xab,0x18,0xa3,0x73,0x6e,0x9a,
+ 0x26,0x79,0xfd,0xfa,0x82,0xf4,0x7a,0xcd,0x44,0x38,0x4d,0xa7,0xbf,0xfe,
+ 0xfa,0x07,0x22,0xdd,0x6e,0x37,0x00,0x40,0x04,0xf9,0xd5,0x94,0x38,0xa5,
+ 0x94,0x52,0x94,0x4b,0x7d,0x7f,0xff,0xf2,0xde,0xdf,0xef,0x77,0x79,0xc8,
+ 0x7a,0xfd,0xce,0x3d,0xeb,0x9f,0x64,0xef,0xc9,0xde,0xdc,0xee,0x17,0xd0,
+ 0x85,0x79,0x0e,0xf3,0xcc,0x31,0x21,0x22,0x39,0x47,0x48,0x48,0x08,0x80,
+ 0x60,0xa4,0xbe,0x7c,0x4f,0x48,0x84,0xf2,0x93,0xe5,0x6a,0xeb,0xa7,0x65,
+ 0xe6,0x94,0x12,0x27,0x7d,0xa0,0x72,0x8b,0x08,0xfb,0xaf,0xea,0x7d,0xeb,
+ 0x47,0x72,0xce,0x95,0x8f,0x32,0xbb,0xe7,0x52,0x84,0x7a,0xb5,0xec,0xb2,
+ 0xfa,0x5b,0xe5,0x0b,0x70,0xff,0x05,0xed,0xaf,0x18,0xa3,0xbe,0x61,0xf9,
+ 0x30,0xb3,0x5b,0x5a,0xdf,0xae,0xfa,0x01,0x97,0x9f,0x13,0x11,0x00,0x99,
+ 0x13,0x06,0x7a,0xa4,0x11,0x45,0x6a,0xc8,0x0c,0xd7,0xeb,0xf5,0xf5,0x7a,
+ 0x9e,0xcf,0x67,0x22,0xb2,0x8f,0x48,0x7f,0xb1,0x25,0x75,0x00,0x20,0x7d,
+ 0x45,0xa9,0xf1,0xf2,0x73,0x22,0x42,0x44,0x20,0xf7,0x7a,0x85,0x10,0xe6,
+ 0x94,0x12,0x22,0x12,0x39,0x44,0x5a,0x6f,0x1c,0xf5,0xb3,0xa8,0xfa,0xdb,
+ 0xf7,0x83,0x4c,0x81,0x96,0x9f,0x2d,0xc7,0x54,0x9f,0x57,0x47,0xea,0xf2,
+ 0x9f,0xcb,0x9d,0xd4,0x9e,0x69,0x55,0xbd,0xac,0x50,0xad,0x20,0xf5,0x87,
+ 0xfa,0xbc,0x96,0x67,0x41,0x24,0xa7,0x2a,0x93,0x77,0xeb,0x21,0xea,0x0b,
+ 0xbc,0xf7,0xf2,0x6e,0x55,0x45,0x6f,0x7c,0x61,0xe3,0x47,0x08,0x20,0x87,
+ 0x9b,0x5b,0x9f,0xce,0x7c,0x0a,0xbe,0x5e,0x6f,0x62,0x05,0xe5,0xb3,0x94,
+ 0x02,0x6e,0x6a,0x7c,0x66,0x24,0xab,0x4f,0x50,0x1e,0x3b,0x3a,0x91,0x7d,
+ 0xe0,0xc4,0xe8,0xc8,0x39,0x47,0x44,0x88,0xb4,0xda,0x7b,0x5c,0xcd,0xfd,
+ 0xa2,0xfa,0x56,0x00,0xe5,0xc5,0xf5,0x1d,0x46,0xa4,0x9e,0x19,0x58,0xfd,
+ 0xa6,0xbc,0x78,0x29,0xf5,0xaa,0x25,0xe7,0xf5,0xdc,0x11,0xd1,0xe9,0x74,
+ 0x12,0x4f,0x67,0x4f,0x43,0x4b,0xd7,0x4b,0xd5,0x2f,0xcf,0x62,0x55,0xf6,
+ 0xfb,0x83,0x08,0x6a,0xe1,0xed,0xa7,0xc3,0xf5,0x64,0x87,0x10,0x86,0xb4,
+ 0x11,0x90,0x08,0xaf,0xd7,0x9f,0xd7,0xeb,0x75,0xb9,0x5c,0xe4,0x87,0xe5,
+ 0x6d,0x67,0x0f,0x50,0xfe,0xd6,0xb7,0xb4,0x27,0x7b,0x63,0x79,0x22,0x8c,
+ 0x10,0x42,0x44,0x80,0x09,0x4f,0x48,0x44,0x0e,0x39,0x45,0x66,0x94,0xd3,
+ 0xb9,0x1a,0x7d,0x51,0x6a,0x04,0x80,0xbd,0x03,0xab,0x1c,0xdb,0xaa,0xd4,
+ 0x3b,0x66,0x9f,0x88,0x88,0xc8,0xfa,0xf5,0xce,0x3d,0x97,0xa6,0x2f,0x8b,
+ 0x36,0xe4,0x61,0x01,0xc0,0x3c,0xcf,0x29,0x25,0xb9,0x78,0xdf,0xaa,0x97,
+ 0x8f,0x92,0x99,0x43,0x08,0x55,0xfd,0xe9,0x5c,0x60,0x35,0x2d,0xf5,0xf3,
+ 0xe4,0xbd,0xb7,0x16,0xa1,0x25,0xfb,0x94,0xa2,0x08,0xe7,0x7e,0xbf,0x33,
+ 0xf3,0xd7,0xd7,0xd7,0xeb,0xf5,0x5a,0xfd,0x4e,0xf3,0x86,0x97,0x5f,0xaf,
+ 0x06,0x74,0xad,0x4f,0x8b,0x48,0x48,0x6e,0x0e,0x21,0xc4,0xc0,0x9c,0x08,
+ 0x90,0xc8,0x11,0x11,0x12,0x88,0xb3,0xb6,0xd6,0xbe,0xef,0x80,0x33,0x63,
+ 0x60,0x4f,0x43,0x4b,0xc9,0xe4,0x9b,0x7e,0x34,0x57,0xc6,0x04,0xd5,0xc3,
+ 0xe1,0x9c,0xfb,0xf5,0xeb,0xd7,0xe9,0x74,0x4a,0x29,0x85,0x10,0x24,0x46,
+ 0x2b,0x9f,0x4e,0x2b,0xf8,0xc8,0x7e,0x2e,0x11,0xa2,0x9e,0xf2,0xd6,0x2d,
+ 0x95,0xbe,0x66,0xb1,0x94,0xfa,0xb7,0xeb,0xc5,0x63,0x0c,0x50,0xb3,0x1f,
+ 0xc5,0xb3,0xa2,0xf5,0xf7,0xf8,0x7e,0xbf,0x85,0x30,0x9f,0x4e,0x27,0x1b,
+ 0x03,0x15,0x6f,0xb7,0x3d,0x0a,0x3f,0x18,0x12,0xab,0xc2,0x31,0x33,0xe3,
+ 0x34,0xcf,0x33,0x03,0x4c,0xde,0x3b,0x72,0x8c,0xcc,0x8c,0x6c,0xe3,0x7c,
+ 0x40,0x40,0x60,0x4e,0xd5,0xe8,0x26,0x2d,0xc1,0x1d,0x94,0x91,0x73,0xf5,
+ 0x49,0x65,0x1f,0x40,0x1f,0x71,0xd5,0x98,0xb7,0x8e,0x82,0x8d,0xef,0x2e,
+ 0x97,0x8b,0x7c,0xf3,0x78,0x3c,0xe4,0x52,0x44,0x24,0xe2,0x1f,0xd4,0x78,
+ 0x6b,0x42,0x24,0x44,0xef,0x8b,0xbc,0x34,0x6c,0x99,0xf1,0x33,0x1f,0x18,
+ 0x98,0x01,0x10,0x53,0x62,0xe7,0xac,0xcf,0xac,0x5c,0x9c,0x08,0x01,0x28,
+ 0xa5,0x84,0x80,0x8c,0x78,0xbd,0x5e,0xbf,0xbf,0xbf,0xce,0xe7,0xf3,0xeb,
+ 0x35,0x5b,0xbd,0xcf,0x1e,0xa3,0xdc,0xb3,0x1f,0x0c,0x89,0x6d,0x04,0xc4,
+ 0xcc,0x0c,0x3e,0x86,0x88,0x80,0x38,0x2d,0x9e,0x85,0x13,0x32,0x32,0x83,
+ 0xfc,0x0f,0x20,0x81,0x08,0xb8,0x26,0x15,0x11,0x36,0xf5,0x63,0xf8,0xc3,
+ 0xe8,0x7a,0xc4,0xb5,0x67,0x7a,0x3c,0x4d,0x93,0x28,0x84,0x18,0xe7,0xaa,
+ 0x9c,0x4a,0x1f,0xd4,0x91,0x7a,0xf9,0x9f,0x9d,0x48,0xbe,0xfa,0x16,0xf2,
+ 0x8d,0xf9,0xa4,0xc4,0x9c,0x38,0x71,0x4a,0xc9,0x39,0x97,0xbd,0x51,0x29,
+ 0x22,0x44,0x20,0xc2,0x94,0x08,0x81,0x11,0xe1,0xf1,0x78,0x00,0xe0,0xe9,
+ 0x74,0x9a,0x67,0x94,0x40,0xa1,0x8c,0x90,0x16,0x6f,0xd2,0x72,0x93,0xd5,
+ 0x70,0x66,0xbb,0x3f,0xe7,0x52,0xc2,0x18,0xa3,0x23,0x44,0x9c,0x88,0x00,
+ 0x1d,0x72,0xc2,0xc4,0x89,0x39,0x01,0x42,0xea,0x2a,0x9f,0x9c,0xd6,0xcc,
+ 0x3c,0xee,0x6e,0x51,0xed,0xde,0x12,0x3d,0x2e,0x67,0x0e,0x80,0xcb,0x74,
+ 0xae,0x1a,0x5b,0x65,0xba,0x2e,0x41,0x9c,0x73,0x4e,0x53,0xff,0xf2,0x59,
+ 0x7c,0xfc,0x25,0xc2,0x23,0x22,0xef,0xbd,0xa6,0xd4,0x55,0x79,0x9b,0xef,
+ 0xb7,0x0f,0x65,0x23,0x21,0x7d,0xa5,0xfc,0x50,0x94,0xa7,0xf1,0xa1,0xc0,
+ 0xa4,0x27,0xc8,0x9c,0x98,0xc5,0xe6,0xdf,0x89,0xe8,0x74,0x9a,0x34,0xcf,
+ 0x2c,0xb3,0xe2,0xc5,0xc7,0x67,0x77,0x59,0xbd,0xef,0x32,0x50,0x74,0xce,
+ 0x91,0xf3,0x73,0x08,0x21,0x04,0x66,0x00,0x24,0x74,0x48,0x48,0x40,0x44,
+ 0x8e,0x00,0xd8,0x56,0x15,0xcc,0x65,0x13,0x00,0xfe,0xcf,0xff,0xfc,0x37,
+ 0x91,0x5b,0x2f,0x88,0x12,0x55,0x69,0x08,0x49,0x1a,0x9e,0xae,0xae,0x43,
+ 0xaf,0xe3,0x9c,0x17,0xc1,0xc7,0x18,0xe5,0xfa,0x65,0x6d,0xa4,0xbc,0xed,
+ 0xd3,0xe9,0x34,0x4d,0x13,0x00,0xd8,0xd8,0xa7,0x34,0xe9,0x1a,0x4b,0x57,
+ 0xad,0x7d,0xe6,0x8f,0x54,0x5f,0x45,0x48,0x8f,0xc7,0xe3,0xf1,0xb8,0x8b,
+ 0x20,0xa7,0x69,0xf2,0xde,0x4f,0xd3,0x34,0x4d,0x93,0x8d,0xb4,0xb3,0xab,
+ 0xc9,0x47,0x50,0xb5,0x36,0x29,0x2b,0x88,0xdf,0x89,0x31,0x4e,0xd3,0xa4,
+ 0x36,0x32,0x4b,0xfc,0xcc,0x0d,0x00,0x11,0x3a,0x47,0x44,0x80,0x88,0x84,
+ 0x78,0xbb,0x5e,0x5f,0xaf,0xd7,0xf9,0x7c,0xb6,0x17,0xcf,0x1e,0x94,0x1f,
+ 0x39,0xf2,0x9d,0x1a,0x10,0x90,0x8f,0x29,0x62,0x80,0x69,0xf2,0x62,0xbf,
+ 0x31,0x02,0x20,0xa6,0x68,0xa5,0x02,0x7a,0xeb,0xcc,0xc0,0x9c,0xfe,0xf9,
+ 0xcf,0x7f,0xea,0xa1,0x26,0xca,0x1c,0xfc,0x56,0xa9,0x00,0x63,0xed,0xad,
+ 0x3d,0x4c,0x29,0xc9,0x53,0xab,0x86,0x8a,0x5b,0xe0,0x4a,0x24,0x5a,0x68,
+ 0x6a,0x2c,0x15,0x47,0x9b,0x85,0xfa,0x23,0xc1,0x7c,0x96,0x9b,0xc8,0xed,
+ 0xc5,0x98,0x62,0x4c,0x7b,0x6d,0x46,0x44,0xf0,0xde,0xdb,0x5a,0xa1,0xb9,
+ 0xcd,0xa4,0x07,0x7d,0xff,0xd6,0xc8,0x6b,0x8d,0x6e,0xfd,0xbc,0x9c,0x1b,
+ 0x4d,0x71,0x97,0x6b,0x05,0x45,0xfe,0x21,0xc2,0x94,0x12,0x03,0x20,0xe2,
+ 0xe3,0xfe,0x00,0xc0,0xcb,0xe5,0x3c,0xcf,0x4b,0xe8,0x9a,0x29,0x86,0x1f,
+ 0x74,0xed,0xd5,0x47,0xb0,0xf8,0x7b,0x46,0x79,0xac,0xf2,0x88,0x9d,0x73,
+ 0x08,0x94,0x38,0x18,0x49,0x14,0xd1,0x29,0x40,0x08,0xb3,0xba,0xf9,0xe5,
+ 0xe7,0x4b,0x21,0xa0,0x52,0x41,0xb3,0xe2,0x14,0x91,0x67,0xea,0x5e,0xa6,
+ 0x70,0xce,0x39,0x79,0xe2,0xf2,0xe2,0x6a,0x94,0xdb,0x0f,0xbf,0x47,0x5c,
+ 0x80,0xad,0x02,0x59,0xb1,0xc8,0x4d,0xad,0x6f,0x1b,0xf5,0x65,0x44,0xe4,
+ 0xbd,0x14,0x89,0x71,0x75,0x79,0x84,0x48,0xcc,0xd1,0xbc,0x35,0xa4,0x04,
+ 0x9c,0x58,0x8a,0xc1,0x35,0x5f,0xc0,0xa6,0xe2,0x63,0x14,0x12,0x90,0x88,
+ 0x34,0xa6,0x7e,0xdc,0x6f,0xde,0xbb,0xd3,0xe9,0xf4,0x7a,0xbd,0x34,0xe1,
+ 0xdc,0xa2,0xfa,0x96,0x9b,0xac,0x56,0x00,0x32,0x79,0xac,0x7e,0x17,0x42,
+ 0xe0,0xe7,0xf3,0xb9,0xd8,0x7f,0x72,0x89,0x6d,0xd2,0x85,0xe5,0x5b,0x10,
+ 0x62,0x4a,0x8c,0x68,0xe5,0xb1,0x84,0x7b,0x36,0x65,0x97,0xbf,0xcd,0xd2,
+ 0xa4,0xaa,0xd4,0xed,0xa3,0x11,0x63,0x2b,0x87,0x52,0x3e,0x70,0xb5,0x16,
+ 0x5b,0x8d,0x04,0x25,0x9b,0x2f,0xb5,0xbf,0x55,0xe8,0xed,0x1c,0xa0,0x4c,
+ 0x61,0xe4,0x9e,0x53,0x4a,0xf3,0x8b,0x91,0x90,0x88,0xa6,0xc9,0x23,0x11,
+ 0x00,0x38,0x47,0x29,0x59,0x07,0x84,0x00,0x3c,0xcf,0x33,0x11,0x3a,0xf7,
+ 0xe5,0x9c,0x8b,0x31,0xe8,0x9d,0xea,0x1f,0xb9,0xef,0xd0,0x22,0x0a,0x3a,
+ 0xe6,0x24,0xb9,0xc1,0xcf,0xcf,0xcf,0xaf,0xef,0xef,0xd3,0xf9,0x42,0x44,
+ 0xf3,0xbc,0x84,0xfa,0x72,0xb7,0xbe,0xda,0x42,0xe8,0x1b,0xf9,0xbc,0xdb,
+ 0x11,0xa3,0x28,0xba,0x26,0x1f,0xab,0x60,0xf2,0xc7,0xa1,0x02,0x5b,0xca,
+ 0xbd,0xb5,0xf2,0x78,0xf6,0x34,0xed,0x5d,0x95,0xe5,0x91,0x4c,0xea,0x62,
+ 0x36,0x45,0x4b,0xf4,0x8c,0x57,0xdf,0x22,0xbb,0x82,0x9a,0x62,0x11,0x7c,
+ 0x5f,0xe3,0x3f,0x0e,0x06,0x71,0xed,0x65,0x2c,0xad,0x2f,0x66,0xef,0x51,
+ 0x4a,0xe0,0x59,0xdc,0xb0,0x06,0x01,0x72,0x3f,0xc5,0xcd,0xa0,0x1a,0xf9,
+ 0x4c,0xea,0xfa,0xb7,0xc4,0xc0,0x0c,0xec,0x08,0x1f,0xf7,0x3b,0x30,0x9f,
+ 0x2e,0x5f,0x36,0xf3,0x5c,0x7c,0x7c,0x55,0xde,0x07,0xae,0x7d,0x8b,0x6b,
+ 0x62,0x4c,0x29,0xc5,0x30,0x4d,0x5e,0xfa,0x0b,0xa2,0xee,0x56,0x29,0xb3,
+ 0xb7,0x20,0xe9,0xe2,0x20,0x8a,0x6b,0x28,0xcb,0xc3,0x65,0xd5,0xa2,0x7a,
+ 0x28,0xad,0xd4,0xc5,0x2a,0x4e,0xd3,0x24,0xf2,0x2b,0xa5,0x9e,0x7d,0x84,
+ 0xf2,0x52,0x62,0xae,0xe4,0x9b,0x7e,0x51,0x68,0xc4,0xf7,0x1f,0xe6,0x81,
+ 0xb6,0x14,0x61,0xcb,0x91,0x65,0x85,0x60,0x31,0xa2,0x29,0x14,0x75,0x7e,
+ 0xac,0x76,0x00,0x10,0x10,0x08,0x90,0x81,0x19,0x45,0xfc,0xd7,0xdb,0x0d,
+ 0x08,0x4f,0xd3,0x59,0xed,0x25,0x48,0x0b,0xa8,0xfa,0xe8,0xfb,0x4d,0xbd,
+ 0xed,0x03,0xc4,0x94,0x52,0x70,0x8e,0x9c,0xf3,0x44,0x08,0x88,0x31,0xc6,
+ 0x79,0x9e,0x4d,0x35,0x3e,0xaf,0xcf,0x4b,0x83,0x87,0x16,0x2b,0xe7,0x54,
+ 0x0c,0xa5,0x5a,0x97,0xff,0xd9,0xaa,0x62,0xca,0x31,0x12,0x45,0x37,0x76,
+ 0x05,0xab,0xb2,0xaf,0x5e,0xd3,0x16,0xf0,0xab,0xde,0xad,0x5f,0x25,0x1c,
+ 0xb4,0x04,0xf6,0x5d,0xf4,0x7b,0x1b,0xdf,0x49,0x5a,0x28,0x0f,0x47,0x4e,
+ 0x30,0x00,0x48,0x4a,0xb2,0xb7,0xa0,0xa8,0xff,0x89,0xe6,0x24,0xac,0xdd,
+ 0x12,0x6d,0x69,0x49,0xea,0x8d,0x3f,0xbf,0x7f,0xee,0x8f,0xbb,0xf7,0x4e,
+ 0xdb,0x39,0x54,0x2d,0x77,0x8c,0xe4,0x33,0x00,0x12,0x80,0x24,0x47,0xce,
+ 0x4f,0x13,0xae,0x41,0x99,0x18,0x93,0x46,0x95,0x9e,0x11,0x4d,0x83,0x88,
+ 0x28,0x93,0x6e,0x55,0x36,0x23,0xbd,0xb8,0x4e,0x9d,0x35,0xbb,0xf3,0x32,
+ 0xdd,0xb7,0x92,0x6e,0x25,0xdf,0x7f,0x9e,0xeb,0x57,0xfb,0x4c,0x9a,0x9e,
+ 0x88,0x94,0x4a,0x47,0xa6,0xb2,0x97,0xdc,0xa7,0x6c,0xe6,0xa1,0x69,0xea,
+ 0x2d,0xff,0xb5,0x44,0xc8,0x60,0x7a,0x78,0x40,0x88,0xf7,0xdb,0xed,0x71,
+ 0xbf,0x39,0xe7,0xa4,0x29,0xe5,0xab,0xed,0x93,0x6a,0xdd,0xa6,0x7c,0x82,
+ 0x31,0x45,0x44,0xf2,0xde,0xad,0x05,0x17,0x92,0x4f,0xd2,0x51,0x08,0x39,
+ 0x89,0x7a,0x1a,0xab,0xda,0x39,0xd2,0x6e,0xaf,0x16,0xc8,0xb2,0x8a,0x58,
+ 0x35,0xa0,0xeb,0xf8,0x8e,0xec,0xbc,0xfe,0xe7,0xbe,0x6c,0x9f,0x49,0x6c,
+ 0x6f,0x66,0x5f,0x55,0x25,0x62,0x5c,0x32,0x02,0xe7,0x7c,0x4a,0xaf,0x8a,
+ 0x85,0xdf,0x80,0x10,0xe6,0x20,0xac,0xcd,0x70,0x51,0x7d,0x46,0x96,0xd3,
+ 0x70,0xbb,0xde,0x10,0xe9,0x74,0x3a,0xc3,0xf9,0x4c,0xb6,0x8d,0x5f,0xed,
+ 0x40,0x57,0x9b,0xd3,0xab,0x80,0xd9,0x7b,0x5a,0x5a,0x05,0x44,0x9c,0x78,
+ 0x9e,0x83,0x0d,0xe2,0x8a,0x00,0x58,0x52,0x5b,0x52,0x6b,0x56,0x95,0x7a,
+ 0x35,0xde,0x3e,0xac,0xc6,0xdb,0xc7,0x57,0xb6,0x43,0xaa,0x52,0xaf,0x66,
+ 0x71,0x9a,0x3d,0x1f,0xe2,0x2f,0x3e,0x8b,0xf8,0x6c,0xea,0x2f,0x52,0x0f,
+ 0x21,0x68,0xc4,0x63,0x1d,0xbf,0x24,0x44,0x31,0x86,0x79,0x9e,0x9d,0x93,
+ 0x82,0x84,0x4d,0xde,0x60,0x87,0x86,0xd8,0x5a,0x64,0x6a,0xa2,0x98,0x81,
+ 0x11,0x80,0x70,0x01,0xc6,0x90,0xa3,0xdf,0xbf,0x7f,0x8b,0xde,0x93,0x77,
+ 0x74,0x3a,0x9d,0x6c,0x73,0x62,0x44,0xd7,0x53,0x4a,0x00,0x4c,0x4b,0x83,
+ 0x48,0x32,0x75,0x0e,0x36,0xc3,0x36,0x16,0x72,0xdf,0xed,0x76,0xf6,0x99,
+ 0x56,0xcd,0x4c,0x07,0xc7,0x52,0xcd,0xb2,0xec,0x89,0xc9,0xba,0x2c,0xad,
+ 0x34,0xac,0x0e,0x34,0x02,0xa8,0x66,0xfc,0x7f,0xd7,0x57,0x51,0xa1,0x43,
+ 0xeb,0xe9,0x9d,0xdb,0x55,0x72,0xa4,0x10,0x2b,0x55,0xdb,0x94,0x62,0x4a,
+ 0x2c,0xb5,0xb9,0x12,0xb6,0xb1,0x73,0xed,0xf6,0x53,0xb2,0x39,0x20,0x2b,
+ 0x68,0xc6,0x11,0xde,0x6e,0xb7,0xc7,0xed,0x4a,0xcf,0xe7,0xc3,0x3b,0xa7,
+ 0xb2,0xef,0x84,0xf1,0xb9,0xd1,0x06,0x70,0x8b,0x91,0x47,0x22,0x08,0x91,
+ 0xb5,0xe4,0xd9,0x7a,0xca,0xfa,0x99,0x5b,0x52,0x6c,0xe1,0xfe,0x3a,0x0e,
+ 0xbe,0x53,0x63,0xc8,0x4a,0x40,0xfd,0x92,0xbe,0x3d,0x3d,0x83,0x52,0x1f,
+ 0x0f,0xe6,0x3b,0xd8,0x18,0x55,0x7a,0x66,0xc8,0x4e,0xad,0x1a,0xc5,0x18,
+ 0xd3,0x1c,0x02,0x22,0x49,0x94,0x87,0x0d,0xf8,0x8e,0x29,0xe7,0x2c,0x80,
+ 0x20,0x60,0x90,0xb4,0x1a,0xb5,0x01,0x42,0x88,0x88,0xd7,0xdf,0xff,0x97,
+ 0x7e,0xfe,0xfb,0xbf,0xee,0xf7,0x9b,0x77,0xee,0x72,0xb9,0x64,0xad,0xdc,
+ 0xca,0x9f,0x88,0x49,0x02,0x51,0x04,0x3f,0x79,0x04,0x02,0x04,0x42,0x08,
+ 0x11,0x24,0x92,0x57,0x3b,0x09,0x46,0x30,0x22,0x3f,0x71,0x54,0xab,0xc7,
+ 0x72,0xfb,0xb4,0x1e,0x4b,0xd9,0x74,0x1a,0x86,0xad,0x27,0x68,0xa0,0x29,
+ 0x95,0x30,0xbe,0xe3,0xda,0xed,0xdb,0xd9,0xc4,0xfa,0xef,0x92,0x7a,0x27,
+ 0x08,0x15,0x75,0x97,0xca,0xbc,0x94,0x1a,0x6b,0x85,0x23,0xe6,0x18,0xe7,
+ 0x39,0x20,0xd2,0x69,0x9a,0xb6,0x1e,0xc6,0xde,0xc8,0x33,0x02,0x30,0xf0,
+ 0x52,0xcf,0xdd,0x74,0x7e,0xa9,0xef,0x12,0xd2,0x5a,0x27,0x73,0xa7,0xbf,
+ 0x88,0xbe,0xfe,0xcf,0xe3,0xf1,0xfb,0xf1,0xb8,0x3b,0x42,0xd1,0xfb,0x4e,
+ 0x0a,0x97,0x62,0x4c,0x31,0x22,0xb0,0x73,0x6e,0x3d,0x40,0x10,0x13,0xac,
+ 0x65,0x81,0x64,0x31,0x55,0x72,0x09,0x63,0xe4,0x51,0x05,0x63,0xc5,0xdc,
+ 0x71,0xc0,0x83,0x68,0xaa,0x6a,0x44,0xf2,0xc1,0x79,0x1a,0x94,0x65,0xe9,
+ 0xa7,0xde,0x32,0xf2,0x16,0xd1,0xa4,0xfe,0x45,0xa3,0xf7,0x4c,0xf6,0x52,
+ 0x8c,0x62,0x86,0xc4,0x1c,0x63,0x0c,0x31,0x91,0x23,0xe7,0x3d,0x1a,0xa0,
+ 0xa3,0x1a,0x79,0x5c,0x65,0xbc,0xfc,0xc9,0xbb,0x4e,0xc9,0x5a,0x38,0x5b,
+ 0x8c,0x3e,0x11,0x21,0xe1,0xe9,0x76,0xff,0x7f,0xaf,0xd7,0xd3,0xb9,0x25,
+ 0xcf,0xab,0x56,0xe8,0x96,0xbe,0x08,0x27,0x7d,0xb8,0x84,0x90,0x18,0x62,
+ 0x8a,0x6b,0x62,0xba,0xb4,0x0b,0x37,0xa1,0x6e,0x2d,0x17,0x29,0x53,0x6c,
+ 0x3d,0x09,0x85,0x5d,0x57,0xd3,0x98,0x41,0x34,0x55,0xbf,0x8b,0xdf,0x0a,
+ 0x17,0x3a,0x41,0x43,0xdf,0xc7,0xb5,0xf2,0x8e,0xb7,0x12,0xb9,0x4e,0x72,
+ 0xaf,0x39,0x7d,0x35,0xe4,0x8c,0x31,0x86,0x79,0x8e,0x31,0x39,0xe7,0x9c,
+ 0xf7,0x8a,0x70,0x5e,0xe1,0xab,0xfb,0x4f,0xb7,0x29,0x3d,0xab,0xdc,0x97,
+ 0x74,0x7a,0xb1,0xd3,0x84,0x48,0xe8,0xdd,0xaf,0xeb,0xcf,0xff,0x3e,0xee,
+ 0x57,0x47,0xa4,0xed,0xbc,0x0c,0x85,0x9e,0x52,0xe2,0x14,0x01,0xd8,0x79,
+ 0x27,0x1a,0x9c,0x00,0xe7,0x10,0x63,0xd4,0x72,0x04,0x64,0xaa,0xac,0xdf,
+ 0x4f,0x7e,0xf2,0x7e,0x5a,0x61,0xb5,0x4d,0x83,0x79,0x08,0xaa,0x69,0x15,
+ 0xde,0x35,0x48,0xee,0x84,0x8a,0x1d,0xa9,0x5b,0x8d,0xb7,0x2e,0xa3,0x83,
+ 0xb4,0x3c,0xac,0xe7,0xb4,0x02,0xcc,0xea,0x97,0x73,0xce,0x7b,0x27,0x23,
+ 0x06,0x52,0x7f,0xdc,0xf7,0x81,0xb4,0x01,0x18,0x43,0x08,0x31,0x26,0xef,
+ 0xbd,0x77,0x93,0x3e,0x83,0x45,0xc0,0xbc,0x37,0xee,0x59,0x98,0xb7,0xba,
+ 0x00,0x44,0xa0,0x25,0xa9,0x16,0xf5,0x75,0xd3,0xe3,0xf1,0x78,0x3c,0x96,
+ 0x96,0x8e,0x02,0x8d,0xb7,0x0f,0xc9,0x09,0x11,0xa6,0x69,0x12,0xbd,0x4d,
+ 0x0c,0x76,0x9e,0x61,0x39,0x67,0x46,0xea,0x5a,0x9e,0xf2,0xde,0x9d,0xcf,
+ 0x27,0x3d,0xb6,0x5a,0x1f,0xdd,0x5d,0xbc,0x8b,0xce,0x1b,0xa9,0x2a,0x66,
+ 0x65,0xaf,0x32,0x54,0x1c,0x8c,0x1b,0x5a,0x4d,0x8a,0x56,0x93,0xe6,0x2d,
+ 0x8f,0x5e,0x3d,0x31,0x6b,0x51,0x85,0x52,0x4a,0xcf,0xe7,0x93,0x99,0x35,
+ 0xb5,0x5b,0x2f,0xb2,0x9d,0x42,0x91,0x7d,0x08,0xd1,0x79,0xa7,0x7e,0x41,
+ 0xc5,0xbb,0x21,0xa0,0x16,0x23,0xcf,0x59,0x3f,0x0f,0x78,0x05,0x3d,0x48,
+ 0xa7,0x88,0x50,0xfe,0x8d,0xf7,0xfb,0xfd,0xf5,0x7c,0x6a,0x9c,0xaf,0x4f,
+ 0x50,0x04,0x2c,0xd0,0x25,0x72,0xc4,0x0c,0xf3,0x1c,0xa4,0xfd,0xbc,0x06,
+ 0x74,0xe5,0x33,0x92,0x52,0x1d,0x4e,0xd3,0x49,0x70,0xdc,0x52,0xb8,0x50,
+ 0x48,0xd0,0xc8,0x68,0xc4,0x21,0x24,0xa4,0xf4,0xeb,0xb6,0x0a,0x36,0x1e,
+ 0x2a,0xb6,0x0e,0xd3,0xdf,0x92,0xb8,0x57,0x6d,0x8c,0x9a,0x96,0xf3,0xf9,
+ 0xac,0xb5,0xac,0x18,0xe3,0xeb,0xf5,0xd2,0xf8,0xd7,0x46,0xf8,0xb4,0xa6,
+ 0x64,0x8b,0xd9,0x0f,0x11,0xc9,0x7b,0x3f,0xe1,0xa6,0xe3,0x16,0xf8,0x60,
+ 0xd4,0xde,0x9a,0xfc,0x35,0x20,0x94,0x54,0x7c,0x11,0xbb,0x43,0x37,0x39,
+ 0x7f,0xbd,0xfe,0xbe,0x3f,0x6e,0xce,0x2d,0x36,0x5f,0x6b,0x35,0x82,0x2b,
+ 0x41,0x72,0x9c,0xe0,0xf9,0x7a,0xad,0xd8,0xa0,0x54,0xa2,0x2d,0x6c,0x15,
+ 0xe2,0x72,0x39,0x7b,0xef,0x15,0x37,0xa1,0x93,0x50,0x65,0x94,0xd4,0x91,
+ 0xba,0xed,0xa1,0xb5,0xf0,0xd7,0x5a,0x34,0xcc,0x0c,0xc9,0x78,0x15,0xc8,
+ 0x86,0x5a,0x36,0xf8,0x6a,0xc1,0xd6,0x3e,0x08,0xe0,0xcb,0x77,0x97,0x0e,
+ 0xb2,0x42,0x3d,0x05,0x08,0x14,0x42,0x70,0x79,0xda,0x0e,0x8b,0xa2,0x6e,
+ 0x37,0x19,0x43,0x08,0x80,0xe4,0xbc,0x47,0x22,0xc0,0xac,0x9c,0xcf,0xbb,
+ 0xf6,0x3d,0xe7,0x45,0x3f,0x5a,0x1a,0xf8,0x32,0x12,0x45,0x00,0x08,0xde,
+ 0xf9,0xe7,0xfd,0xf1,0xb8,0xdf,0x05,0xbe,0x22,0x35,0x20,0x47,0xe4,0xfd,
+ 0x04,0x48,0x29,0xa6,0x79,0x9e,0xb5,0x35,0x9e,0xa1,0x03,0xf6,0xd9,0x30,
+ 0x78,0x3f,0x4d,0xd3,0x49,0xbb,0x81,0xb6,0xc5,0x5e,0x0d,0xa4,0x5b,0x52,
+ 0x3f,0x6c,0x1f,0x68,0x6f,0xad,0x6c,0x31,0x1f,0x4a,0x3d,0xab,0xf1,0x69,
+ 0x0d,0xaa,0xd2,0x9b,0x68,0xbb,0x8c,0xf1,0xac,0xcf,0xde,0x9b,0xc2,0xf4,
+ 0x14,0x24,0x23,0x91,0xef,0xeb,0xf5,0xb2,0xa8,0xac,0xaa,0x6d,0x13,0x8c,
+ 0x4e,0x08,0x21,0x31,0x10,0x12,0x92,0x5b,0x4b,0xb5,0xbb,0xfb,0xe3,0x2c,
+ 0xd1,0x5a,0xd0,0x3a,0x8a,0x81,0x11,0x9d,0xd7,0x3f,0x1c,0x3e,0xee,0xb7,
+ 0xf9,0xf5,0x00,0x4e,0xce,0x11,0x21,0x4e,0xa7,0x13,0x20,0xa5,0x18,0x43,
+ 0x8c,0x51,0x74,0xdd,0x80,0x35,0xcc,0x1b,0x21,0x00,0x70,0x4a,0x52,0x83,
+ 0x14,0xc8,0x9f,0xc4,0x2c,0x6a,0xde,0x35,0x4e,0xd1,0x42,0x5b,0xa9,0x49,
+ 0x87,0x33,0x94,0xad,0x96,0xab,0x3d,0x5e,0x87,0x38,0xd2,0xa3,0x21,0x82,
+ 0xbc,0xe8,0xfb,0xe7,0x16,0x3e,0x2b,0x39,0x48,0xbf,0x44,0xc6,0x39,0x0c,
+ 0x98,0x91,0x98,0x59,0x9d,0x7d,0x29,0x7b,0xf5,0x65,0x6b,0xac,0x17,0xa3,
+ 0x00,0xae,0x68,0x49,0xd5,0x35,0xac,0x37,0x0e,0xdf,0x94,0xcd,0x11,0x10,
+ 0xc0,0xa3,0xa9,0xfa,0x11,0xe2,0x72,0x40,0x10,0x1d,0xc1,0xfd,0xfe,0x98,
+ 0x26,0x0f,0x48,0xe7,0xf3,0x05,0x10,0x53,0x8a,0x21,0x2e,0x7e,0x9d,0x05,
+ 0xd1,0xc9,0x8a,0xa4,0x02,0x1b,0x5a,0x8b,0x80,0xcf,0xe7,0x0b,0x33,0xcc,
+ 0xf3,0x2b,0x9b,0x59,0x74,0xce,0x49,0xeb,0x56,0xa1,0x45,0x9d,0xe6,0xdb,
+ 0x60,0x9b,0x58,0x5f,0x2f,0x5d,0x8d,0x0c,0xe0,0xd6,0xb9,0x72,0x79,0x59,
+ 0x75,0x2b,0x59,0x09,0xef,0x2d,0x75,0xaf,0xf6,0x03,0xb3,0xfb,0x91,0x28,
+ 0xca,0x4a,0xdd,0x98,0x74,0x10,0x00,0xe7,0xe5,0x72,0x39,0x9d,0x4e,0x22,
+ 0xdd,0x6a,0x16,0x23,0xe2,0x5f,0xc2,0x7e,0xc9,0xd7,0x10,0x11,0xd2,0xe6,
+ 0x79,0x99,0x33,0x23,0x2f,0x12,0xf7,0xdb,0x5d,0xda,0x87,0x8b,0x08,0x0c,
+ 0xe8,0x5c,0x62,0x26,0xc4,0x05,0x34,0x94,0xe2,0x0a,0x95,0x2f,0xf1,0x5f,
+ 0x5b,0x0d,0x1f,0x11,0x25,0x2f,0x90,0x7b,0xb2,0x85,0xb0,0xed,0x9b,0x05,
+ 0x76,0x17,0x6c,0x07,0xa8,0xaa,0x8b,0x2d,0xd4,0x7d,0xf5,0xe1,0xea,0x38,
+ 0x5c,0x0b,0x92,0xdc,0xaa,0xf5,0x5a,0x65,0xb2,0xa3,0xdd,0xa5,0x93,0xfe,
+ 0x93,0xc4,0xdd,0x1a,0x79,0x05,0xd3,0x55,0xfb,0x81,0xda,0x8f,0x7f,0x3e,
+ 0x9f,0x97,0xcb,0x45,0x2a,0xb5,0x59,0x49,0xd1,0xf6,0xb5,0x53,0x62,0x00,
+ 0x26,0x42,0x66,0x48,0xbc,0xa6,0xf6,0x8c,0x00,0x09,0xd0,0xfa,0x7b,0xd4,
+ 0x62,0x9f,0x47,0x24,0x10,0xf4,0x3a,0x0a,0x2c,0x08,0x59,0x5b,0xed,0xbc,
+ 0x85,0x6f,0xe2,0x51,0x6c,0x5e,0xb8,0x7b,0x08,0xb8,0xc5,0x5f,0x9a,0x9c,
+ 0xc8,0x13,0xac,0x4f,0xc4,0x11,0x41,0x8c,0x89,0x53,0x08,0x41,0x52,0x97,
+ 0x52,0x9b,0x5b,0xbf,0xdb,0xaa,0xc9,0x8b,0xc8,0x05,0xb2,0x72,0xd8,0xc8,
+ 0xef,0x9c,0x27,0x71,0xba,0x25,0x3a,0xef,0x4f,0xfc,0x7a,0xf9,0x25,0x31,
+ 0x5d,0xa9,0xee,0x45,0xa1,0x3e,0x49,0x2d,0xfc,0x74,0x3a,0xc9,0x8b,0xdb,
+ 0x1e,0x47,0xb1,0x9d,0xb6,0x66,0x27,0x6a,0x4c,0xb0,0x45,0xf8,0xcb,0x07,
+ 0xf3,0xbc,0xb8,0x79,0x5c,0x55,0x77,0xd3,0x69,0x79,0x95,0xfa,0xe3,0x5a,
+ 0xec,0xcd,0x6b,0xa1,0x70,0x41,0xd3,0x3a,0xef,0x2e,0xe7,0x0b,0x33,0xdb,
+ 0xbb,0xac,0x96,0x53,0x88,0x08,0xd2,0x32,0xd1,0xa2,0xb2,0x97,0x9f,0x77,
+ 0xf0,0x33,0x55,0xa9,0xeb,0x5f,0xa9,0xd4,0x3b,0x36,0xb6,0xef,0x3b,0x54,
+ 0x0b,0xb5,0x24,0x60,0x3f,0xfb,0x9f,0x48,0xdd,0xda,0xa4,0xcb,0xe5,0xe2,
+ 0xbd,0x9f,0xe7,0x39,0x6b,0x6b,0x95,0xb2,0x67,0xc6,0x94,0xd2,0xeb,0xf5,
+ 0x92,0xb3,0x12,0x63,0x10,0x0d,0xac,0x41,0x48,0x24,0x7a,0xd8,0xa0,0x2e,
+ 0xac,0x1f,0x96,0xcd,0xdc,0xd2,0x22,0x6a,0x34,0xda,0xb6,0x3e,0x4f,0x5b,
+ 0xbb,0xce,0xe6,0xd7,0x1b,0xb2,0x17,0x41,0xa2,0xf7,0x5e,0x62,0xf8,0x52,
+ 0xd7,0x3b,0xa3,0x4f,0x22,0x7b,0x8b,0xc1,0xca,0x3c,0xeb,0x61,0x9b,0xd8,
+ 0xfe,0xad,0x16,0x88,0x0e,0x8b,0x01,0x6f,0x05,0xe1,0x6f,0x41,0xea,0xfa,
+ 0xa9,0xbf,0xd4,0x42,0xa4,0x2b,0x33,0x58,0xf5,0x13,0x45,0x5a,0x2b,0xf9,
+ 0x29,0x43,0x3c,0xc0,0x6e,0x84,0x16,0xab,0x60,0xf3,0x5d,0x70,0x07,0x80,
+ 0x88,0xde,0x96,0x3e,0xad,0xa1,0x68,0x01,0x16,0x8a,0x1f,0x32,0x33,0x08,
+ 0x7b,0x87,0x28,0xae,0x26,0x7b,0xd0,0x98,0x3e,0xb1,0x8d,0x5d,0xf9,0x5e,
+ 0x9c,0xbd,0x58,0xbf,0xe7,0xf3,0x29,0xfe,0xaf,0x0c,0xfa,0x3a,0x25,0xf4,
+ 0xaa,0x4e,0xf7,0x3b,0x3a,0xf5,0xd1,0xb0,0xbf,0x15,0x68,0x05,0x95,0xf9,
+ 0x56,0x14,0x87,0xad,0xf9,0xdb,0xc0,0x49,0x5a,0x2c,0xb6,0x58,0x88,0xaf,
+ 0xaf,0x0b,0x11,0x89,0x0d,0x18,0x81,0x75,0x57,0x01,0x99,0x0a,0xb6,0xcc,
+ 0x40,0xab,0xbc,0x1f,0x82,0xa9,0x27,0xd6,0x8a,0x9f,0xf4,0xde,0x9d,0xcf,
+ 0x17,0xa1,0x73,0xb1,0x99,0x5b,0x15,0x57,0xb3,0xab,0xc9,0xec,0xdd,0xb3,
+ 0x64,0x29,0x3a,0xde,0x46,0x44,0xd5,0x8e,0x45,0xe7,0x3c,0x01,0x34,0x01,
+ 0xbe,0x50,0x67,0x94,0x80,0xb2,0xb7,0x2b,0xb7,0xd1,0x99,0xec,0x1f,0x2f,
+ 0xd7,0xec,0x51,0x15,0xa4,0x45,0x3a,0x89,0xd2,0xc7,0x1b,0xb9,0x16,0xb0,
+ 0x74,0xbb,0xdd,0x99,0xf9,0x74,0x3a,0x09,0x2b,0xd1,0xe0,0x69,0xdb,0xc5,
+ 0x76,0x0c,0xbb,0xa8,0xde,0x9e,0x00,0xd8,0xa7,0x6a,0xd5,0xbc,0x48,0x59,
+ 0x40,0x4e,0xa7,0x09,0x71,0x89,0x53,0x32,0x43,0x3d,0xe2,0xf0,0xa4,0x58,
+ 0xad,0x4a,0x20,0x35,0x0d,0xc9,0x5e,0xb2,0x71,0xd1,0x6a,0x40,0x57,0x76,
+ 0xd3,0x53,0x4a,0x16,0xc6,0x34,0x12,0xd0,0x95,0x20,0xad,0xec,0xf8,0xbe,
+ 0x6b,0x03,0xb2,0xb3,0xa8,0xc3,0x5c,0x12,0x34,0xbc,0x85,0xec,0xb3,0xf5,
+ 0x09,0xc1,0x66,0xde,0xef,0x77,0x91,0xba,0x7d,0x6e,0xad,0x84,0xa8,0x75,
+ 0x55,0x6f,0x40,0x1b,0xa6,0xa7,0xb7,0x03,0xef,0x54,0x31,0x93,0x5b,0x52,
+ 0x4e,0xe4,0x14,0x16,0x58,0x56,0x3c,0xaa,0xc9,0x8c,0x4a,0x5d,0x91,0xd1,
+ 0x52,0xae,0x5a,0xe9,0x55,0x96,0x2e,0xb0,0x1c,0x2c,0x4b,0x3b,0xd0,0x69,
+ 0xb9,0x66,0x3f,0xb1,0x48,0xce,0x11,0xa7,0x5e,0xf6,0xa0,0xc7,0xa1,0x38,
+ 0x9d,0x1a,0xbe,0x06,0x1c,0x2a,0xfe,0x7e,0x40,0xd7,0xe9,0x4a,0xa8,0x89,
+ 0x14,0x61,0xcb,0x48,0xa5,0x4d,0x0b,0xed,0x09,0xa8,0xdc,0xb6,0xce,0xa8,
+ 0x22,0x22,0x82,0xaf,0x45,0x5d,0x43,0x80,0x27,0x99,0x63,0x4e,0x29,0xcd,
+ 0xf3,0x2c,0x8d,0x7c,0x0d,0x80,0x5b,0x2e,0xb6,0x94,0xba,0x24,0x2a,0x88,
+ 0x28,0x85,0x2a,0x1d,0x30,0x53,0x5c,0x8a,0x1c,0x8b,0x0c,0x06,0xd9,0x31,
+ 0xc2,0x9a,0x19,0x67,0xf6,0x60,0xb0,0x0a,0x64,0x13,0x04,0x1d,0xa7,0xfa,
+ 0x93,0x76,0xbb,0xd4,0x33,0xe6,0x79,0x9e,0xe7,0x99,0x88,0x24,0x9e,0xb7,
+ 0xf5,0xbb,0x77,0x1d,0x87,0x73,0x84,0x48,0x92,0xb8,0xcb,0x65,0xe5,0xf9,
+ 0x1c,0x98,0x93,0xdd,0x87,0x44,0xd1,0x78,0xd8,0x4f,0x33,0x56,0x63,0xb1,
+ 0x94,0x49,0xdd,0x72,0x2c,0xc9,0x9b,0xa9,0xe5,0xd1,0x26,0x47,0xcb,0xe1,
+ 0x59,0x4f,0xaf,0x3e,0x4f,0x6b,0x1a,0xb6,0xc1,0xb3,0x96,0xa5,0xc8,0x56,
+ 0xad,0x55,0x87,0x5a,0xb1,0x67,0x69,0xfa,0x06,0xa5,0x9e,0x9d,0x95,0xb7,
+ 0x52,0xb8,0x96,0x6d,0x97,0xe7,0x23,0x98,0xb7,0xe7,0xf3,0x29,0x1f,0xf9,
+ 0x5d,0xd9,0x6f,0xae,0x87,0x90,0x96,0x09,0xc3,0xed,0x0d,0x4d,0xb7,0x93,
+ 0x9c,0x73,0xda,0xd6,0x33,0x43,0xb2,0x2b,0x52,0x8b,0x19,0x04,0x71,0x8b,
+ 0xe0,0xa5,0xff,0xa6,0xa5,0xb7,0xaa,0xd7,0xd4,0x63,0xb1,0x41,0x6f,0x0c,
+ 0x6c,0x52,0xc4,0x26,0x7a,0x2f,0xa3,0xe1,0x72,0x2b,0x25,0xc6,0x2d,0x73,
+ 0xed,0x5a,0xc4,0x90,0x32,0x8e,0x96,0xa0,0x33,0x3c,0x85,0xa2,0x8f,0x6d,
+ 0x92,0x5d,0x9d,0xac,0xb3,0x15,0x4d,0x3d,0x43,0x83,0xb5,0xbf,0xd6,0x8c,
+ 0xa3,0xce,0x37,0x75,0x46,0x6b,0x33,0xa9,0x6b,0x86,0xb2,0x4d,0x6d,0x02,
+ 0x12,0x51,0x4c,0xf1,0xf9,0x7a,0x22,0xe2,0xe9,0x34,0xad,0xdd,0xaf,0xba,
+ 0xec,0xab,0xbd,0x2b,0x5a,0xa1,0xe9,0xc5,0xb9,0x5c,0x26,0x73,0x53,0x4a,
+ 0x2b,0x4d,0x9e,0x80,0x74,0xfc,0x82,0x7e,0xcb,0x4b,0xc2,0x08,0x00,0x7e,
+ 0xd3,0xfe,0x15,0x9b,0xa5,0x38,0x19,0x1d,0xe1,0x5c,0x5f,0xbd,0xcd,0xfa,
+ 0xaa,0xc6,0xdb,0xfb,0x16,0xd5,0xd7,0x13,0xbd,0x0e,0x52,0x71,0x35,0xa0,
+ 0x13,0xac,0x87,0x30,0x15,0x74,0xa4,0xae,0xf9,0x9e,0x1e,0x14,0x75,0xc0,
+ 0xd5,0x5c,0x43,0x5c,0x8f,0x34,0x94,0x61,0x8c,0x5d,0xa7,0x25,0x4b,0xb1,
+ 0xa2,0xfa,0xc4,0xed,0xa8,0x69,0xc7,0x09,0x4a,0xe8,0xae,0x55,0x39,0x1b,
+ 0x12,0x91,0x81,0x5a,0x48,0x58,0x5e,0x4e,0x1d,0xd5,0x15,0xdd,0x0e,0x44,
+ 0x55,0x06,0xff,0x6c,0x5e,0x26,0x5c,0x6a,0x41,0x3b,0xd4,0xce,0x91,0x8c,
+ 0xce,0xaf,0x84,0x6a,0xcb,0xb9,0x91,0xf7,0xe6,0x75,0xea,0x02,0x99,0xc1,
+ 0xb9,0x45,0x8f,0xe7,0x79,0x9e,0xa6,0x53,0x8b,0x14,0xd0,0x06,0x5c,0xd6,
+ 0xaf,0x8b,0x33,0x93,0xb0,0x53,0xa9,0x66,0xec,0x84,0xb3,0xd5,0xf5,0x75,
+ 0x28,0x30,0x97,0x7a,0x59,0xc1,0x50,0x9b,0x6f,0xd1,0x60,0xa5,0xc1,0x17,
+ 0x5b,0x97,0x57,0x2d,0xc6,0x6a,0x7f,0xb6,0x3d,0x63,0x83,0x0c,0xbd,0x72,
+ 0x75,0xe0,0xcb,0x86,0x93,0x32,0xa1,0x8d,0x88,0xaf,0x15,0xaf,0x50,0xf6,
+ 0x02,0xb4,0x12,0x67,0x19,0xaa,0x5a,0x71,0x55,0x66,0xc0,0xf4,0xb1,0x1f,
+ 0x96,0x95,0x4c,0xb5,0x40,0x14,0xd8,0x89,0xc1,0x16,0xab,0xc0,0xbc,0x9a,
+ 0x7a,0x5a,0x74,0x77,0xf9,0x98,0x22,0x75,0xdb,0xe2,0xb4,0x4e,0x3d,0xfb,
+ 0xf0,0x25,0xdb,0x80,0xf5,0xfa,0xd2,0x76,0xb4,0xba,0x2e,0x3f,0x97,0x96,
+ 0xa2,0x06,0x6e,0x99,0xd4,0xab,0xc0,0x78,0xbd,0x25,0x15,0x6d,0xf5,0xe1,
+ 0xaa,0xfc,0xe4,0x29,0x0f,0x42,0x6b,0x1a,0x04,0x5d,0x79,0x87,0x49,0x35,
+ 0x26,0x23,0x7a,0xd1,0x6c,0x2d,0xad,0x5f,0x25,0x24,0x44,0x2b,0x16,0x22,
+ 0x7b,0x25,0x63,0xca,0x47,0xfc,0x57,0x4e,0x01,0xab,0xe8,0x99,0xd4,0x33,
+ 0x84,0x6a,0x16,0xf0,0x6a,0x26,0x2c,0x62,0xce,0xd8,0x56,0x16,0xc1,0x4b,
+ 0xa1,0xad,0x2c,0xa3,0xa6,0x94,0x74,0xd6,0xa9,0x1c,0x65,0xed,0x3b,0x48,
+ 0x79,0x99,0x40,0x88,0x44,0x09,0xd4,0xec,0x8b,0x46,0xaa,0xd4,0xab,0xba,
+ 0xde,0xaa,0xcf,0xcb,0xf3,0xd2,0xf3,0x64,0xed,0xde,0xee,0x04,0x98,0xd9,
+ 0xe3,0x6a,0xc5,0xb7,0xc3,0x95,0xbb,0xeb,0x79,0x2c,0x44,0x5e,0x79,0x31,
+ 0x44,0x6b,0x4d,0x96,0x56,0x4a,0x72,0x93,0xd7,0xeb,0xa5,0xc1,0x50,0xf5,
+ 0x3c,0xe9,0x59,0xd4,0x8e,0xbb,0xe8,0xbd,0xfc,0x50,0x5d,0x18,0xc2,0x82,
+ 0x84,0xb4,0x69,0x85,0x6d,0xe5,0xb5,0xd2,0x36,0xdb,0xab,0x3d,0x9d,0x4e,
+ 0x00,0x10,0x63,0x02,0xc0,0x6c,0xc8,0x9e,0x99,0xbd,0x24,0x06,0xd5,0x6c,
+ 0xd8,0x6a,0x79,0x35,0xba,0xe9,0x54,0xe3,0xb5,0x3b,0x9e,0x99,0x68,0xf1,
+ 0x9a,0xb6,0x21,0xdb,0x91,0x7a,0xc9,0x86,0xa2,0xed,0x1f,0x3d,0x8e,0x7b,
+ 0x75,0xdc,0xcd,0x4e,0x1c,0x12,0xf9,0x76,0xe0,0xb6,0x29,0x69,0x3b,0x7b,
+ 0x8b,0xa8,0x97,0x71,0x85,0x35,0xe3,0x50,0xf3,0x23,0x5a,0xab,0xb5,0xea,
+ 0x0e,0xac,0x08,0xf6,0x13,0x93,0x6a,0xf3,0x45,0xea,0x9b,0x75,0x21,0x44,
+ 0xa8,0x78,0xd5,0x91,0xe0,0xdf,0xda,0x03,0x4b,0x21,0xa5,0x2d,0x37,0x58,
+ 0x89,0x11,0xb8,0x43,0x74,0xd6,0x19,0x77,0xea,0xd4,0xd1,0x32,0x64,0x84,
+ 0x2a,0xb7,0x84,0xb2,0x86,0x34,0x85,0x0e,0xcf,0x53,0xa9,0xfa,0x72,0x9c,
+ 0x4b,0x02,0x3f,0xb9,0xb8,0xfc,0x55,0x08,0x61,0x99,0x36,0xea,0xca,0xbe,
+ 0x3f,0x2b,0x6f,0xdb,0xf3,0x00,0x80,0x2c,0x7a,0x43,0x6a,0x6c,0xd5,0xbc,
+ 0x97,0x43,0xf9,0x7d,0x07,0xac,0xaf,0x49,0x9c,0xc4,0x2e,0xda,0xde,0x74,
+ 0x06,0x0f,0xc9,0x7c,0xca,0x08,0xfa,0xc3,0xe2,0x9d,0xc4,0xda,0x03,0xe4,
+ 0x25,0x2f,0x9f,0x55,0xe3,0xb7,0x54,0x18,0xd8,0xa2,0x6c,0x3b,0x15,0xa5,
+ 0x2a,0x7c,0x3d,0xc3,0xd6,0x85,0x10,0xc4,0xf2,0x98,0x2e,0x13,0x96,0x52,
+ 0xaf,0x82,0x9a,0xcb,0xda,0x91,0x7a,0x5f,0x45,0xdb,0xc9,0x27,0x14,0x26,
+ 0x7c,0xbd,0xac,0x14,0x34,0xfa,0x27,0xb5,0x4d,0xda,0xbc,0x2b,0xb7,0xc9,
+ 0x03,0x49,0x09,0x10,0xa3,0x54,0x2a,0x45,0x53,0x35,0x9b,0x3d,0x72,0x1c,
+ 0x95,0x88,0x35,0xa5,0x84,0xbc,0xb0,0xee,0xb7,0x7a,0x45,0x55,0xc5,0xe8,
+ 0x5f,0x59,0x1f,0xf8,0xfa,0x88,0xc8,0xc0,0xaf,0xf7,0x1a,0x5f,0x05,0x28,
+ 0x8a,0xa9,0x29,0x0b,0x52,0x6f,0xa1,0xcd,0x33,0x2c,0xa9,0xb4,0x70,0x34,
+ 0xee,0x38,0x9c,0x84,0xea,0xb7,0x49,0x98,0x13,0x22,0x79,0x3f,0x89,0x60,
+ 0xf4,0x09,0x66,0x23,0xf2,0x2d,0xbd,0xef,0x64,0x65,0xe2,0x98,0xac,0x7f,
+ 0xcd,0xc0,0xce,0x55,0xf3,0x5b,0xde,0x70,0x9f,0x4a,0x43,0x43,0xdd,0x56,
+ 0x8a,0xf1,0xae,0xd4,0xab,0x11,0x6e,0x55,0xea,0x90,0xd1,0x9d,0x95,0x29,
+ 0x69,0x07,0xd5,0x5a,0xbe,0x4d,0x76,0x7a,0xf4,0xb9,0x48,0xec,0x2a,0x2d,
+ 0xa9,0xbe,0xd4,0x0f,0x81,0xad,0xfb,0x08,0x19,0x52,0xda,0xea,0x74,0x2b,
+ 0x14,0x29,0x29,0xcf,0x96,0xad,0xf7,0x75,0x02,0x91,0xaa,0xde,0x97,0x92,
+ 0x2e,0xa3,0x0d,0x05,0x44,0x97,0x5d,0x8c,0x11,0x90,0xb5,0xfc,0x8d,0x6d,
+ 0x4f,0x54,0x39,0x60,0xde,0xfa,0x32,0x60,0xac,0x04,0x35,0xb2,0x6f,0xcd,
+ 0xf8,0x7d,0x2b,0x8f,0xb4,0x1c,0xde,0x2d,0xd2,0x8a,0xd6,0x54,0xa2,0xad,
+ 0x49,0x29,0x82,0x58,0xcf,0x41,0x2b,0x4e,0x39,0x34,0xc5,0xa5,0xe1,0x91,
+ 0xf1,0x03,0x6d,0x55,0x09,0x0f,0xbc,0x14,0x98,0x05,0x9a,0x9e,0x31,0x23,
+ 0x76,0x5c,0x7b,0xa7,0x32,0x93,0x0d,0x3b,0xda,0xc9,0x8d,0x56,0x78,0x75,
+ 0x68,0x8d,0x57,0x1a,0x5a,0x67,0xa1,0xf2,0x87,0xbf,0xfe,0x96,0xba,0xa7,
+ 0x94,0x74,0x1a,0xcb,0x48,0x7d,0xb9,0x06,0x35,0xa0,0xa8,0xb9,0x83,0xaf,
+ 0x56,0xb6,0xfb,0x34,0x13,0x76,0xec,0xa3,0x1c,0x8d,0xee,0x87,0x8a,0xd0,
+ 0x98,0x74,0xac,0xda,0x09,0xc5,0x30,0x39,0xe7,0x2d,0x1e,0xd9,0x9e,0xdd,
+ 0x7e,0x33,0xb7,0xf3,0x88,0xb3,0x99,0xf5,0x8c,0xb7,0xe8,0x90,0xfe,0x95,
+ 0x6b,0x5f,0xf6,0xca,0x9d,0xd2,0x48,0x49,0xfb,0xf0,0x96,0xf6,0x9b,0x8c,
+ 0x7f,0xeb,0xbe,0xaa,0xd9,0xf7,0x25,0xf1,0xe8,0x9a,0xf9,0xd1,0x60,0x3a,
+ 0x74,0x38,0xac,0xa4,0x48,0xea,0xaa,0xba,0xf7,0xad,0x71,0xeb,0xbc,0x67,
+ 0x09,0x9b,0xce,0x18,0x0b,0xab,0xeb,0xca,0x8c,0x8e,0x1d,0xd0,0x5f,0xbf,
+ 0x97,0xfa,0x41,0x07,0xb6,0xec,0x0b,0x77,0x5e,0x5c,0xd2,0x82,0x8c,0xf4,
+ 0xd1,0x0f,0xe7,0xb7,0x2d,0x68,0xd1,0x14,0xaf,0xb8,0xdc,0x07,0xe2,0x6b,
+ 0xdd,0x77,0xce,0xfa,0x6f,0x2d,0xd9,0xf7,0x0d,0xa6,0x66,0x6b,0x16,0x32,
+ 0x96,0xb1,0x23,0x1d,0xf2,0xd0,0x75,0xb8,0xce,0xb2,0x08,0x79,0x9e,0xe7,
+ 0x18,0x93,0xf7,0x82,0x0f,0x58,0x38,0x17,0xe5,0x1d,0xc7,0xef,0xb9,0x13,
+ 0xc9,0x1e,0x36,0xf2,0x0f,0xa7,0x3f,0x2d,0xe5,0x55,0x69,0x15,0x46,0x80,
+ 0x02,0x2d,0x93,0xd9,0x0a,0x41,0x14,0x24,0x91,0xf5,0x57,0x73,0xbe,0x7a,
+ 0x3b,0x45,0x90,0x95,0x8d,0x0e,0x65,0x73,0x78,0x1e,0xe7,0x79,0xd6,0x41,
+ 0x49,0x3b,0xe4,0xd6,0x0f,0xbb,0xa0,0x3d,0x53,0x0e,0xfb,0x0d,0x0a,0xe2,
+ 0xdd,0x99,0x75,0x99,0xcf,0x31,0xd5,0x4a,0x47,0xea,0x65,0xfd,0xa7,0x75,
+ 0x14,0xc6,0x21,0x3a,0xe3,0x23,0x19,0x55,0x5b,0xa2,0xdd,0xb9,0x7e,0xab,
+ 0xb0,0x5a,0xe9,0x2b,0xaf,0xe9,0x0f,0xb1,0x1f,0xa5,0x09,0x1a,0x9f,0x45,
+ 0xcd,0x1e,0x8a,0xc8,0x5e,0xdc,0xb0,0xad,0x77,0x56,0x1d,0x70,0xeb,0xfa,
+ 0x9d,0x0d,0x0a,0xe2,0xa7,0x9c,0x73,0x44,0xcb,0x6e,0x33,0xdb,0xd4,0x39,
+ 0x3c,0x4f,0x99,0x0e,0xf4,0x11,0x5a,0xad,0x14,0x6e,0xdc,0x13,0x8f,0x54,
+ 0x42,0x6d,0x65,0x45,0xf3,0x94,0x91,0x3d,0x0a,0x76,0xdb,0x52,0x55,0x34,
+ 0x1e,0x0a,0xea,0x75,0xed,0x71,0x95,0xc5,0xb8,0x0f,0x08,0x2c,0xb2,0x87,
+ 0xae,0x10,0x71,0x6d,0x74,0xb6,0x08,0xd5,0xe1,0x88,0xc0,0xa2,0xc5,0x83,
+ 0xbb,0x8c,0x8c,0xa5,0x98,0x62,0x44,0x93,0x98,0x8c,0x5c,0x79,0x44,0xea,
+ 0x9d,0xfe,0x29,0x74,0x49,0xb1,0x47,0x8e,0xc2,0xda,0x59,0xd9,0xa9,0x56,
+ 0x06,0x07,0xea,0xab,0x7b,0x39,0x68,0x60,0x0b,0x59,0x9b,0xc6,0x57,0x19,
+ 0x3c,0xb3,0xcf,0x70,0x48,0x30,0xd1,0xd7,0xc8,0xec,0xfa,0xda,0xb7,0xcd,
+ 0x64,0xdf,0x91,0xc4,0x9b,0xa8,0x18,0x4c,0x29,0x25,0x06,0x5e,0x08,0xd9,
+ 0x8e,0xad,0xc8,0x48,0x45,0xac,0xf5,0xcd,0x5b,0xc0,0xfb,0xc1,0x9a,0x6b,
+ 0xab,0x74,0x51,0x6d,0x48,0x76,0x62,0x91,0x8e,0x53,0xf0,0xd5,0x0f,0xdf,
+ 0xc2,0x35,0x8f,0x04,0xdb,0x87,0x35,0xe4,0xac,0x70,0x6b,0x0f,0xe3,0x20,
+ 0xc3,0xdd,0x31,0x35,0x06,0x10,0x02,0xa4,0x94,0x9c,0x1b,0x75,0xed,0x2d,
+ 0xf0,0xf5,0x20,0x20,0x6e,0x5c,0xea,0x1f,0xa0,0x37,0x65,0xd8,0x48,0x39,
+ 0x9f,0x0f,0xc7,0x0d,0x6c,0x9d,0xbf,0x1a,0x3f,0x31,0xb3,0xd7,0x12,0x95,
+ 0xad,0x75,0x94,0x34,0x81,0xe3,0xc1,0x76,0x07,0xce,0x6c,0x6d,0x86,0xf8,
+ 0x7b,0xa5,0x05,0xf8,0xc3,0x2b,0x57,0x6f,0x35,0x84,0xa0,0x05,0x5d,0x18,
+ 0x58,0xb6,0x35,0x82,0xd0,0x82,0x4f,0x99,0x70,0xca,0x53,0x3b,0x78,0x98,
+ 0xc4,0xc8,0x8b,0xd4,0xfb,0x21,0x7d,0x2b,0xe9,0xb5,0xb0,0x7c,0x55,0x3f,
+ 0x6d,0x0a,0xa1,0x14,0x6d,0x24,0xff,0xd1,0x62,0xa7,0x05,0x42,0x8d,0x07,
+ 0xdb,0xd0,0xdd,0x2d,0xa5,0xdf,0xdb,0xc6,0x94,0x1d,0x0d,0x19,0x99,0x72,
+ 0x3d,0xac,0x31,0x48,0xe1,0x42,0x91,0x30,0x23,0x84,0x28,0x23,0x0a,0xda,
+ 0x79,0xc4,0x7f,0x6e,0xe4,0xab,0x52,0x57,0x3d,0x6c,0x15,0x8b,0x3a,0xf1,
+ 0x5d,0x8c,0xf1,0xf1,0x78,0x38,0xe7,0xcb,0x07,0xa8,0x3f,0xda,0x94,0x49,
+ 0xd9,0x6f,0xaa,0xc9,0xc0,0xb8,0x6b,0x6f,0x21,0xdd,0xac,0xcd,0x17,0x79,
+ 0x0b,0x4a,0x73,0x44,0xf6,0xe3,0xbb,0x53,0x2d,0xd2,0x74,0x24,0x54,0xec,
+ 0x1f,0xd3,0x3e,0xc9,0xe7,0x07,0xfa,0xdd,0x7a,0x97,0x12,0x8b,0x6c,0x89,
+ 0xfd,0x0f,0x1d,0x7c,0x69,0xba,0x52,0x4a,0xcc,0x73,0xf9,0x02,0x5f,0x5d,
+ 0x3f,0xa0,0xdd,0x46,0xd8,0x2f,0x8b,0x18,0x91,0xfa,0xa1,0xe3,0xb1,0xb2,
+ 0x97,0xf1,0x7f,0xd9,0x12,0x25,0xdb,0x53,0xfe,0xf0,0xca,0xe3,0x55,0xc5,
+ 0xea,0x6e,0x86,0x71,0xa9,0x0f,0x6e,0x13,0x3d,0xcc,0x0e,0x3a,0x09,0xa1,
+ 0x6d,0x35,0x1d,0x16,0x79,0xca,0x47,0x64,0x97,0xe4,0x96,0xa7,0xd0,0x67,
+ 0x80,0x0d,0x9b,0x35,0xc2,0xd8,0xc6,0xdc,0xfe,0x92,0xba,0x96,0x9b,0x34,
+ 0xab,0xd5,0xd2,0xe3,0xf1,0x90,0x73,0x3d,0x4d,0x93,0x80,0xcf,0xfb,0xb2,
+ 0x19,0x21,0x44,0x81,0x61,0xee,0xbc,0xbe,0xd9,0xec,0xf4,0x70,0xff,0xfc,
+ 0xab,0x8c,0x7e,0xca,0x18,0xb6,0xa5,0xee,0x2d,0xd2,0x8d,0xc3,0x60,0x3c,
+ 0x2f,0xd9,0x56,0x01,0x17,0x83,0x47,0xfb,0x5d,0xda,0x92,0x32,0xd6,0x13,
+ 0x79,0x8b,0xcd,0x97,0x98,0x7f,0xb0,0x23,0x0c,0x63,0x5c,0xf7,0x7d,0x7f,
+ 0xfc,0x6e,0x40,0x77,0x28,0xfb,0x43,0x0b,0xdf,0x7a,0x0e,0x59,0x33,0xde,
+ 0xc2,0x70,0x3f,0x2b,0xe0,0xb7,0xf4,0x93,0x3a,0xf6,0xb3,0x55,0xa1,0xab,
+ 0xce,0xc4,0x8c,0xef,0x34,0xc9,0x10,0x26,0xfa,0xca,0xe7,0xf3,0x19,0x63,
+ 0x10,0xbd,0x6f,0x19,0xf9,0xc3,0x51,0x98,0xce,0x4a,0x9b,0x7e,0x37,0xe5,
+ 0xd0,0x8a,0x8c,0xd3,0x5f,0x8d,0xd4,0x03,0x3a,0xeb,0x49,0xed,0xca,0x12,
+ 0x25,0x41,0xe9,0x60,0xef,0xdf,0xcd,0x1b,0xb7,0xe0,0xae,0xd3,0x0e,0x3f,
+ 0xac,0x9c,0x8f,0xa4,0x58,0xad,0x2c,0x48,0xe3,0x6d,0xf5,0x49,0x21,0x44,
+ 0xa2,0xe5,0x98,0x8b,0x0d,0x78,0x6b,0x14,0xe6,0x2d,0x5e,0xc3,0x91,0xf5,
+ 0xd1,0x9d,0x72,0xca,0x07,0x0f,0xbd,0x5f,0xf1,0xb5,0x5f,0x76,0x8f,0x1f,
+ 0xfc,0x4d,0x7b,0x33,0xb2,0xf7,0xa2,0x3f,0x0f,0x8e,0xfa,0x61,0x7c,0xa3,
+ 0xaa,0x9a,0x43,0x9d,0x64,0xee,0x0b,0x80,0x1f,0x8f,0xbb,0x4e,0x63,0x75,
+ 0x0c,0x66,0x6b,0x83,0xc2,0xc8,0x3d,0xdb,0xe5,0x45,0x19,0x0d,0x26,0x8c,
+ 0x81,0x71,0xa1,0x4b,0x47,0x3c,0x68,0xe4,0xfb,0x7d,0xdb,0x3e,0x82,0xe1,
+ 0xcf,0xbf,0x7c,0x55,0x36,0x87,0xed,0xcb,0xce,0x2a,0xe6,0x41,0xa9,0x67,
+ 0x54,0x33,0xce,0x7b,0x04,0x94,0xce,0xbd,0x6c,0xf7,0x16,0xd0,0xb1,0x01,
+ 0x0d,0xe2,0x5b,0xe7,0xa9,0x13,0x84,0x4a,0x0f,0xf7,0xeb,0xeb,0x22,0x6b,
+ 0x51,0x17,0x5a,0xaf,0xfd,0x2c,0x66,0x27,0x8e,0xf9,0xc0,0xd7,0x1e,0x76,
+ 0x77,0xb2,0xca,0xbc,0xb6,0x33,0xaa,0xb4,0x58,0x83,0xb5,0xbf,0xfe,0x71,
+ 0xf1,0x1f,0xb4,0x5c,0x3f,0x60,0x1f,0xcc,0xaa,0x40,0xe5,0x98,0x23,0xa1,
+ 0x12,0x9f,0x20,0x00,0x8b,0x9d,0xd7,0x29,0x85,0x3f,0x0f,0xe3,0xb3,0x82,
+ 0x34,0x00,0x3c,0xee,0x8f,0xf3,0xc9,0x23,0x39,0x21,0x14,0x74,0x6e,0x42,
+ 0x02,0x00,0x42,0x40,0x34,0x5b,0xe0,0x54,0xe1,0x3e,0xf6,0xeb,0xef,0x16,
+ 0xda,0xec,0x42,0xb2,0xff,0x90,0xba,0x2f,0x1c,0x38,0xef,0xb6,0x5c,0x3f,
+ 0x08,0xe3,0xb3,0x1e,0x9d,0x25,0x2c,0xd1,0x41,0xa1,0x3d,0x40,0x03,0x9e,
+ 0xcf,0x07,0x22,0x9c,0xcf,0x17,0xad,0xed,0xf7,0x4f,0xd5,0x61,0xcb,0xd5,
+ 0xde,0xf3,0x32,0x0a,0x13,0x93,0x63,0x40,0x80,0x04,0x1c,0xd3,0x73,0x61,
+ 0x7c,0x23,0x44,0x72,0x24,0x87,0x91,0x9c,0xa5,0x61,0x5d,0x46,0x68,0x85,
+ 0x58,0x6e,0x3f,0xba,0xf0,0x59,0x3d,0xa0,0xbc,0x5b,0x81,0x4e,0xc8,0x89,
+ 0xef,0xc0,0x73,0xb3,0x79,0xc5,0x0f,0xc0,0x01,0xbe,0x25,0x9b,0xb7,0x5c,
+ 0x7b,0xdf,0x13,0xb7,0xd2,0x42,0x95,0x81,0x4e,0x14,0xa7,0x94,0x90,0x10,
+ 0x92,0xd0,0xea,0xf1,0xfd,0xfe,0x20,0x5a,0x78,0xb4,0xa5,0xb6,0xd3,0xf7,
+ 0xc1,0xe3,0xf7,0xbc,0xad,0x43,0xe6,0x84,0xc0,0x7e,0x4f,0x8d,0xc7,0x31,
+ 0xa4,0xd5,0xfa,0x08,0xb5,0x13,0x22,0x12,0x3a,0x61,0x72,0x8e,0x21,0x02,
+ 0x11,0x18,0x3b,0x3c,0x32,0xe6,0x72,0x58,0xfb,0xb3,0x8c,0xbf,0x76,0x6c,
+ 0x6d,0x24,0x5d,0x2c,0xcf,0xc1,0xa1,0xdf,0xf1,0x87,0xe4,0x9b,0x9d,0x46,
+ 0xfb,0x48,0x6f,0xb1,0xfa,0x32,0xed,0x19,0xe8,0xaa,0xf8,0xcd,0x99,0xf1,
+ 0xee,0x77,0x1f,0x8f,0x87,0xee,0x85,0x96,0x11,0x9c,0x0e,0x38,0x60,0x64,
+ 0x1b,0x81,0xbd,0x07,0x06,0xe0,0x84,0x31,0x24,0x42,0x72,0xde,0xc9,0x62,
+ 0x4e,0x58,0x36,0x71,0xcb,0xbd,0x00,0x08,0x6f,0x24,0xa7,0x00,0x81,0x81,
+ 0xc3,0xfc,0xd2,0x15,0xe1,0xba,0x3e,0xc8,0xb9,0x49,0x26,0x94,0x2c,0xbc,
+ 0xb8,0x53,0x16,0xac,0x6a,0xb3,0x65,0x88,0xcc,0x5e,0x09,0xc3,0xeb,0x14,
+ 0xdf,0x30,0xf5,0x9f,0xb9,0xf6,0xc1,0x2c,0xab,0x24,0x0f,0x2a,0x91,0xd7,
+ 0x58,0xb0,0x4c,0xd9,0xeb,0x11,0x61,0x08,0x81,0x16,0x72,0xdc,0xb3,0xfa,
+ 0xfb,0xf1,0x0a,0x5d,0xa7,0x75,0x24,0x96,0x9d,0x11,0x43,0x08,0x08,0xe0,
+ 0xfd,0xe4,0x1c,0x01,0x51,0x4c,0x69,0x25,0x13,0x60,0x40,0x40,0x06,0x5e,
+ 0x76,0xfd,0xac,0x8b,0x9d,0x98,0x63,0x02,0x66,0x88,0xba,0xca,0x97,0xc8,
+ 0x89,0x5f,0x40,0xa5,0xfc,0xee,0x71,0xf5,0x94,0xf7,0x6c,0xb7,0xbc,0x2b,
+ 0x16,0xa3,0x45,0x1e,0xd6,0xf1,0x2c,0x83,0x25,0x64,0xff,0x77,0xb5,0x5c,
+ 0xb3,0x36,0x4c,0xd6,0x27,0xc8,0x9c,0x93,0x8e,0x8a,0x49,0x73,0x16,0xf6,
+ 0x5c,0x48,0x0a,0xfb,0x14,0x5d,0xf7,0xde,0xdf,0x1f,0x8f,0x69,0xf2,0xe7,
+ 0xf3,0x19,0xf1,0xac,0xfe,0xfe,0x6f,0xb9,0x67,0x5c,0x77,0x71,0x86,0x18,
+ 0x19,0xe0,0x44,0x13,0x91,0xf3,0xe4,0x52,0x0c,0x31,0x25,0x48,0x6c,0x56,
+ 0x00,0x88,0xed,0x47,0x86,0x65,0xfc,0x50,0xe6,0x8d,0x93,0x30,0xff,0xc6,
+ 0x04,0x31,0x45,0x42,0xe7,0xbc,0xac,0x55,0x56,0xba,0xb6,0x4c,0x89,0x6d,
+ 0xeb,0xa8,0xdc,0x90,0x2e,0x63,0x59,0x19,0x6d,0x53,0xb9,0x57,0x3d,0x6b,
+ 0xb4,0xb7,0xb6,0xa7,0xb6,0x64,0xbf,0x69,0xfc,0x9f,0x3c,0x41,0xb3,0x26,
+ 0x9a,0xaa,0x4e,0x68,0xa5,0xe2,0xde,0xde,0x55,0x3e,0xb9,0x72,0x58,0xfb,
+ 0x69,0x87,0x85,0x15,0xd6,0xce,0x85,0x46,0x66,0x19,0x09,0x60,0xa9,0xe7,
+ 0x9f,0xcf,0x17,0x1d,0xb8,0xff,0xac,0x4d,0x5c,0x1e,0x7f,0x21,0x85,0xe1,
+ 0x75,0x89,0xef,0xe4,0x01,0xc9,0xa1,0x73,0xc4,0x90,0x88,0x39,0x2e,0xbb,
+ 0xdb,0x36,0x3a,0xb0,0x95,0x53,0x06,0xcc,0x0a,0x38,0xe5,0x7e,0x26,0x42,
+ 0x02,0x0a,0xab,0x12,0x4b,0xb0,0x26,0xd3,0x1d,0x5b,0x60,0xb5,0x96,0xdf,
+ 0x65,0xe2,0xc0,0xf2,0x45,0x68,0xdf,0xbd,0x1a,0x44,0xdb,0xed,0x05,0x55,
+ 0x9f,0x3b,0x9e,0x02,0xf8,0xc3,0x30,0xbe,0x25,0xf5,0x2c,0x29,0x17,0x73,
+ 0xbd,0x1d,0x73,0x42,0x47,0x0e,0x77,0x6e,0x8f,0x95,0x58,0x26,0x23,0xc8,
+ 0x48,0x71,0x19,0x7f,0xd1,0x4b,0xc2,0xb2,0x6d,0x9c,0xfc,0xca,0x1b,0x40,
+ 0xb4,0xf8,0x78,0x91,0xbd,0xc6,0x7a,0xef,0xd6,0x97,0x9a,0xcd,0x5c,0x22,
+ 0x60,0x8c,0x91,0x01,0x82,0xf7,0x80,0x44,0xe4,0x88,0x23,0x23,0xc6,0x75,
+ 0x26,0x4b,0x4e,0xee,0xb6,0xe3,0x69,0x3d,0xca,0x7b,0xe1,0x37,0x92,0x1a,
+ 0xf9,0xa4,0x96,0x18,0x6c,0x1d,0x02,0x71,0x9a,0xda,0x48,0x4d,0x29,0x83,
+ 0x41,0xa8,0x96,0xcb,0x29,0xd1,0x95,0x0c,0x23,0x0d,0xdf,0x9e,0x8f,0x7f,
+ 0xab,0x2e,0x5b,0xd5,0x1e,0x8d,0x65,0x84,0x60,0x3b,0xe3,0x1a,0x84,0xfd,
+ 0xf4,0x49,0x76,0x59,0xa5,0x91,0x54,0x7b,0xb0,0x92,0x70,0x2f,0x63,0x31,
+ 0x44,0xee,0x35,0x3f,0x75,0x48,0xe0,0xf1,0x78,0x00,0xc0,0xf9,0x7c,0x39,
+ 0x9d,0x4e,0x5a,0xd3,0xfd,0xf3,0x36,0x31,0x18,0x9e,0x92,0x10,0x43,0x8c,
+ 0x71,0x9a,0x4e,0xce,0xa1,0x23,0x92,0x11,0x13,0xa3,0xef,0xa8,0x4b,0x5e,
+ 0x70,0xb7,0xe8,0x95,0xd5,0x09,0x93,0x27,0x4a,0x3a,0xb1,0xb6,0x2c,0x82,
+ 0x56,0x1d,0x50,0x7e,0xba,0x75,0xb5,0x4c,0xc8,0xe0,0x6e,0xc9,0x60,0x08,
+ 0xd4,0xd3,0x0b,0xde,0x52,0xe3,0xdc,0xb7,0x86,0x73,0xab,0x5f,0xf4,0x6e,
+ 0xd3,0xba,0x93,0x43,0x2b,0xef,0x8d,0x30,0xa9,0x44,0xb3,0x6a,0xb6,0x0f,
+ 0x7d,0xc9,0xe0,0xb6,0xba,0x21,0x75,0xb3,0x1e,0xcb,0xb8,0x2f,0x12,0xd1,
+ 0xf3,0xf9,0x7a,0x3e,0x9f,0xce,0x91,0x3d,0x64,0x23,0x8d,0xf6,0xc3,0x36,
+ 0xf1,0xfa,0x8d,0x4b,0x89,0xe7,0xf9,0x15,0x62,0x62,0x00,0x02,0xd9,0xd3,
+ 0x45,0x7a,0x75,0x80,0x62,0x93,0xbb,0xee,0x46,0x5f,0xf6,0xfa,0x82,0x19,
+ 0xab,0xdb,0x7d,0xea,0xd2,0x3d,0x43,0xb1,0x7b,0x60,0xdb,0xe2,0x57,0xdc,
+ 0x76,0x46,0x6a,0xf2,0xb1,0x9d,0x07,0x45,0xd9,0x7e,0xfc,0x04,0xab,0x7d,
+ 0xb3,0x56,0x2b,0xaf,0x5a,0x33,0xcf,0x40,0xdc,0x72,0x54,0x34,0xbf,0x07,
+ 0x80,0x18,0xd3,0x42,0xa7,0xcf,0x9c,0x98,0x01,0xf8,0xf9,0x7c,0x30,0x27,
+ 0xa9,0xed,0x88,0x0d,0x78,0x2b,0xd5,0xa9,0x5a,0xfe,0xdd,0x58,0x24,0xb9,
+ 0x18,0x03,0xf3,0x0b,0xa6,0x89,0xd0,0x2d,0x63,0xb8,0x91,0x18,0xe2,0x4e,
+ 0xde,0x00,0x76,0x9f,0xab,0x25,0x1f,0x00,0xc3,0x9a,0x51,0x3e,0x13,0x65,
+ 0xcc,0xcd,0x1e,0x4b,0x8a,0x89,0xa1,0x47,0x7e,0xa1,0xd5,0xeb,0xec,0xf4,
+ 0xf4,0x9b,0x08,0xd5,0x84,0x90,0x46,0x9a,0xd6,0x23,0x08,0xd4,0x6c,0x93,
+ 0x73,0x19,0x2a,0x1e,0xe6,0xfd,0xdb,0xf2,0xbc,0x3d,0xd7,0x12,0xac,0xeb,
+ 0x90,0x45,0xfd,0x61,0xe5,0xf2,0xbd,0xdf,0xef,0xce,0xd1,0xe5,0x72,0xe9,
+ 0x03,0x63,0xca,0xed,0x32,0xfd,0xaa,0xe2,0x62,0xf6,0x9d,0x8f,0x91,0x9f,
+ 0xcf,0x57,0x4c,0x01,0x80,0xd7,0x05,0x50,0x64,0x91,0x6a,0x7a,0x6f,0xe6,
+ 0x0c,0x08,0x7b,0x60,0x1d,0xfd,0x62,0x3c,0x1a,0xac,0x9b,0x3e,0xc1,0x8e,
+ 0x60,0xc6,0x14,0x95,0x62,0xee,0xb0,0xd3,0x33,0x52,0xa4,0x2b,0x0b,0xe4,
+ 0xfa,0xfd,0x86,0x40,0xed,0xcf,0x09,0x77,0x20,0x69,0xfd,0xc4,0xba,0xba,
+ 0xc6,0xb9,0x74,0xf9,0x06,0x19,0xbd,0x7d,0xb0,0xc5,0x60,0x8a,0x67,0x45,
+ 0xe0,0x6d,0x47,0x2d,0x12,0xe1,0xe3,0xf1,0x78,0x3e,0x9f,0xc2,0x2b,0xf7,
+ 0x56,0x55,0x71,0x70,0x7e,0x96,0x1c,0x25,0xe6,0xd7,0x6b,0x8e,0x31,0xf2,
+ 0x32,0x46,0xba,0xae,0x66,0xdd,0xa8,0x41,0xb7,0x34,0x4f,0x36,0x00,0x24,
+ 0x43,0x46,0x58,0xbe,0x2f,0x91,0xac,0x49,0x4b,0x90,0xf3,0x45,0x1f,0x8c,
+ 0x57,0x77,0xb6,0xaa,0x76,0xfa,0x87,0x99,0xbc,0xd5,0xed,0xc6,0x18,0x17,
+ 0xf6,0xd3,0x16,0xe2,0xf8,0xb0,0xe5,0x3a,0x02,0x1f,0xeb,0xb9,0x0f,0xa2,
+ 0xec,0x32,0xea,0xe0,0x8b,0x1a,0xa4,0xfe,0x49,0x0b,0x8f,0x2e,0xc2,0xfd,
+ 0xfe,0xb8,0xdd,0xae,0x88,0x28,0xb2,0x1f,0xa7,0x2c,0x3e,0x9c,0x9f,0x85,
+ 0x65,0x29,0x90,0x13,0xaa,0xad,0x18,0x22,0x00,0x90,0x43,0x42,0x87,0x84,
+ 0xab,0xc8,0x45,0xdb,0x17,0x9d,0x5f,0x2a,0x02,0x5d,0x9d,0xb3,0xe9,0xcc,
+ 0x78,0x31,0x2e,0xab,0x88,0x54,0x47,0xfc,0xfb,0x06,0x3b,0x13,0x4d,0x8c,
+ 0x71,0xb7,0xd1,0x50,0x7a,0xc0,0x3a,0x9c,0x97,0x11,0x2a,0x8e,0xe0,0xe9,
+ 0x6c,0xb6,0xd6,0x1f,0x1a,0x85,0x6d,0x37,0x42,0x16,0x27,0x6e,0x84,0xfe,
+ 0xdb,0x66,0xa4,0xdd,0x87,0x61,0xbb,0x0d,0xf0,0xf5,0x7a,0x5d,0xaf,0x57,
+ 0xe5,0x93,0x1c,0x41,0xec,0xf4,0x9b,0xb9,0x39,0xcc,0x9e,0x5c,0x4a,0xfc,
+ 0x7a,0x3d,0x43,0x88,0xcc,0x40,0x8e,0x08,0xdd,0xba,0x91,0xdb,0xc8,0x7e,
+ 0x15,0xbb,0x10,0x56,0x75,0x4e,0x95,0xdd,0x15,0x0b,0xb5,0xc9,0xdf,0x56,
+ 0xd0,0xae,0x50,0xf4,0xc3,0x60,0xbe,0xb5,0x6c,0xcb,0x4a,0x93,0x74,0x58,
+ 0xce,0x2e,0x83,0x19,0x21,0x8d,0xc9,0x5e,0x99,0xf1,0x8f,0x8d,0x74,0x30,
+ 0x13,0xa7,0xf2,0x28,0xa8,0x8d,0xb4,0x25,0xcc,0xea,0x13,0x5c,0xfd,0x28,
+ 0x85,0x30,0xdf,0xef,0x37,0x5d,0xfe,0x60,0x3f,0xe4,0x08,0x9a,0xaa,0x13,
+ 0x84,0xae,0x0f,0x69,0x89,0xf3,0x65,0xf5,0x1a,0xb9,0x75,0x27,0xeb,0x6a,
+ 0x9e,0x96,0x8b,0xe5,0xb1,0x5e,0x5d,0xed,0x74,0x16,0x0e,0xc6,0x46,0xb2,
+ 0x95,0xe0,0x49,0x83,0xbb,0xd2,0x6d,0x43,0x7b,0xbc,0xa9,0x05,0x0e,0x26,
+ 0xc1,0xba,0x68,0xdb,0xdf,0xc6,0x68,0x2d,0x8f,0x52,0xfd,0x49,0x36,0x96,
+ 0xd7,0x01,0xa8,0x6c,0x32,0x96,0x1c,0xa9,0xb8,0x98,0x76,0x41,0x8e,0x1c,
+ 0xc7,0xc6,0xad,0xfb,0x7a,0xbd,0x6e,0xb7,0x9b,0xd5,0xfb,0x91,0x76,0x59,
+ 0xbf,0x5e,0x69,0xe3,0x61,0x72,0x9e,0x19,0xe6,0x79,0x8e,0x21,0x29,0x4d,
+ 0x3f,0x21,0xc1,0xe2,0xef,0x8d,0xed,0xc2,0xdd,0x26,0x67,0x7b,0x4d,0x4b,
+ 0xc7,0x35,0xa2,0x4b,0xa5,0x65,0x2d,0xbb,0x76,0x87,0x7b,0x59,0xeb,0x2a,
+ 0x97,0x12,0x7d,0x7f,0x7f,0x4b,0x53,0x41,0x09,0xdd,0x06,0x31,0x68,0xe5,
+ 0x37,0x59,0xa1,0xa6,0x33,0xd4,0xb9,0x0b,0xaf,0xc0,0x5e,0x67,0xa8,0xd9,
+ 0x6a,0x53,0x26,0x22,0x92,0x4b,0xbe,0xe6,0xd7,0xf5,0x76,0x95,0x95,0xb8,
+ 0x9d,0x85,0x26,0xd0,0xa5,0x5a,0xa9,0x1e,0x53,0xd5,0x7b,0x06,0x78,0xcd,
+ 0xaf,0x14,0x22,0x00,0xe0,0xd2,0x94,0x41,0xdd,0xdf,0xbe,0x44,0x1e,0xb0,
+ 0x90,0x86,0xb6,0x04,0xc0,0xb5,0x33,0xd1,0x87,0x35,0xb4,0xe9,0x8b,0x87,
+ 0xf6,0xb2,0x66,0xbf,0xc8,0xcc,0xe7,0xf3,0x79,0x69,0x84,0x67,0x6b,0x13,
+ 0x0e,0x07,0x07,0xcb,0x90,0x78,0xb0,0x4f,0x60,0x33,0xb4,0x9a,0xdf,0xcd,
+ 0x8f,0xd1,0x21,0xc8,0x42,0xc9,0x1b,0x1d,0x51,0x0c,0xe1,0x76,0xbb,0x23,
+ 0xc2,0xf9,0x7c,0xea,0xa3,0x42,0x46,0x10,0x85,0xb9,0xd2,0x13,0x11,0x39,
+ 0x00,0x9c,0xc3,0x9c,0x96,0xc6,0xb9,0x23,0x72,0x8b,0xf6,0xe2,0xd6,0xf3,
+ 0x39,0x68,0x87,0x4b,0xe1,0xf7,0x1d,0xa9,0xdb,0x3c,0x1e,0xba,0x3b,0x73,
+ 0x3b,0x30,0x51,0xf9,0xc6,0x7b,0x7f,0xb9,0x5c,0xce,0xe7,0x33,0xe9,0x74,
+ 0x59,0x8b,0x35,0x7c,0x04,0xd8,0x55,0x36,0x9a,0xfa,0x99,0x86,0x92,0xde,
+ 0xb7,0x66,0x82,0xd6,0xf5,0x17,0xf1,0x30,0xf6,0x96,0x0d,0x8b,0xa2,0x79,
+ 0xce,0x51,0x08,0xf3,0xe3,0x71,0x47,0xc4,0xcb,0xe5,0xd2,0x7a,0x94,0x23,
+ 0xf5,0xa5,0xea,0x73,0x24,0x22,0x72,0x94,0x58,0xe8,0x03,0x23,0x80,0x54,
+ 0xf5,0xdc,0x52,0xda,0xdb,0x5c,0x3d,0xa4,0x46,0x89,0x5a,0xfb,0xd1,0xa5,
+ 0x52,0x0e,0xf2,0x30,0x54,0x39,0xbb,0xe1,0x88,0x57,0x40,0x6e,0xfe,0x7c,
+ 0x3e,0xeb,0x5e,0x53,0xfa,0x70,0x85,0x55,0xf1,0x1a,0x65,0x1f,0xa9,0x92,
+ 0xe7,0xf4,0x23,0x6d,0xfb,0x2b,0x52,0xa5,0x61,0x06,0x4e,0x4b,0xd1,0xbe,
+ 0x1b,0x37,0x64,0x36,0x9f,0xe4,0x53,0x5d,0xaf,0x57,0x91,0x7d,0x56,0x48,
+ 0xe9,0xd4,0x97,0x46,0x9a,0x52,0xeb,0x0e,0x00,0x9f,0x18,0x74,0x49,0x24,
+ 0x11,0x3a,0x72,0x8b,0xbf,0x67,0x16,0xf6,0xf8,0x72,0xbb,0xd8,0x5e,0xc5,
+ 0x97,0x1f,0xb4,0x74,0xdd,0xc6,0xe1,0xda,0x98,0xc9,0xfc,0xd7,0x21,0x73,
+ 0xbe,0xfd,0xde,0x7b,0xff,0xf5,0xf5,0x25,0x6c,0x83,0xa2,0xea,0x54,0x35,
+ 0x26,0x83,0x22,0xcf,0xd8,0x4b,0xe5,0x59,0xf8,0xed,0xcb,0xd9,0xdb,0x2d,
+ 0x39,0x3c,0xf4,0xfc,0xee,0x05,0x23,0x75,0x1a,0xc5,0x26,0xa4,0xa6,0x15,
+ 0x31,0xf2,0x92,0x7e,0xe8,0x4a,0x14,0xe2,0x62,0x8c,0xf7,0xfb,0x0d,0xd6,
+ 0xc5,0xbd,0xd5,0xdb,0x7e,0xb7,0x99,0xbb,0xef,0x32,0x7b,0x06,0x9c,0xc3,
+ 0x1c,0x39,0x2d,0x1c,0xa0,0x6e,0x59,0xd5,0x8a,0x84,0x5c,0xc3,0xce,0xf2,
+ 0xb2,0x8e,0x93,0xef,0xb7,0xab,0xc4,0x25,0xd5,0x44,0x97,0xa4,0x29,0x49,
+ 0xb4,0x27,0x2c,0xdf,0xe8,0xde,0xa1,0xe0,0x46,0xe3,0x46,0x01,0x48,0x15,
+ 0x49,0x46,0x13,0xa5,0x09,0xae,0x54,0xc9,0xbe,0xac,0x06,0x77,0x94,0xbe,
+ 0x85,0xa3,0xd2,0x91,0x77,0xa1,0xa5,0x86,0x75,0x67,0x8e,0xbc,0xdc,0x6e,
+ 0xd3,0x28,0x59,0x43,0xc4,0xf1,0x98,0xa4,0x00,0x57,0xd6,0x4a,0xa1,0xdf,
+ 0x4e,0xde,0xfb,0x10,0xe6,0xaa,0x80,0x6a,0xd9,0xa0,0x94,0xfa,0x29,0x84,
+ 0x70,0xbf,0xdf,0xbf,0xbf,0xbf,0x04,0xb7,0x33,0x68,0x12,0x47,0x6a,0x7f,
+ 0xeb,0x03,0x75,0xc0,0x29,0xcc,0x81,0x60,0x42,0x2f,0x19,0x86,0x64,0x5b,
+ 0x24,0x78,0xcc,0xd6,0x39,0xfd,0xfa,0xfe,0x45,0xe4,0xd8,0x64,0xa4,0xd9,
+ 0xbb,0xc8,0xce,0xd6,0x05,0xf4,0xb1,0x17,0xa4,0x34,0x64,0xcb,0x8d,0x43,
+ 0x4d,0xda,0x8b,0x95,0x4e,0x61,0xa3,0x62,0xd6,0x4d,0x93,0x60,0xc6,0xe7,
+ 0xc1,0xb0,0xe2,0x8d,0x2f,0xe1,0x84,0x62,0x8d,0x01,0x00,0x84,0x10,0x99,
+ 0x83,0xad,0x1e,0x28,0xf9,0xd8,0x46,0xaf,0xba,0x40,0x89,0x51,0x0a,0x47,
+ 0xf6,0xcc,0x89,0x31,0xd0,0x1d,0x60,0xce,0xb9,0x18,0x22,0x67,0xcf,0x31,
+ 0x3f,0x8b,0xf2,0x91,0xe4,0x4a,0x09,0x11,0x43,0x98,0x6f,0xb7,0xf4,0x8f,
+ 0x5f,0x7f,0x5d,0x2e,0xe7,0xe7,0xf3,0x35,0x42,0x83,0x33,0x38,0xe9,0xbd,
+ 0xfe,0x15,0xa5,0x94,0xe6,0x10,0x3c,0x80,0x73,0x08,0x08,0x8e,0x08,0x10,
+ 0x63,0x88,0x96,0x49,0x32,0xbb,0xbe,0x73,0x04,0xc0,0xd1,0x44,0xd3,0x88,
+ 0xdb,0xa2,0x77,0xb1,0x79,0x4b,0x81,0xa8,0x78,0x6b,0x5d,0x33,0x66,0x23,
+ 0xaa,0x2a,0x63,0x8a,0xb2,0x18,0x59,0xca,0x57,0x7b,0x94,0x7d,0xa6,0xeb,
+ 0x9d,0x14,0x73,0xd0,0xd9,0x67,0xcf,0xc8,0x2a,0xba,0x32,0x5d,0x69,0xfe,
+ 0x2d,0x5b,0xa8,0xb4,0x17,0x9e,0xfd,0xa2,0xb4,0xab,0x65,0x37,0xf5,0xae,
+ 0x33,0x06,0xfa,0x21,0x6d,0xa7,0x4c,0xdd,0xa7,0x44,0x09,0xc9,0x11,0xc6,
+ 0x10,0x6f,0xf7,0xeb,0xf7,0xf7,0xaf,0xf3,0xf9,0x5c,0x2e,0xf1,0xfd,0x6c,
+ 0xe6,0xd7,0x7e,0x2f,0x4b,0x17,0x5e,0xcf,0xc7,0xe9,0x7c,0x21,0x42,0x09,
+ 0xfb,0xf7,0xb0,0xaa,0x8a,0x49,0x7f,0xbd,0x5e,0x2b,0xa9,0xb4,0x7e,0x80,
+ 0xbc,0x66,0x57,0xe6,0x6f,0x5a,0x66,0xcf,0xa4,0x5e,0x5d,0xce,0xa2,0xc0,
+ 0xe5,0x56,0x9c,0xe8,0xb3,0x93,0xa2,0x7b,0x62,0xa0,0x98,0x9f,0xed,0x70,
+ 0x55,0x77,0xa8,0x9e,0xaa,0x68,0x40,0x31,0xec,0x31,0x46,0xe7,0x08,0xc9,
+ 0x55,0x59,0xb9,0x60,0x4f,0xf8,0x84,0xa8,0xfb,0x4e,0xd9,0x94,0xc8,0xb0,
+ 0xac,0xf3,0x4b,0x3d,0x85,0x81,0x18,0xd9,0x11,0x85,0x10,0xee,0xb7,0xdb,
+ 0xf7,0xf7,0xb7,0xac,0x80,0x53,0xe0,0xc3,0x48,0x53,0xaa,0xdf,0x91,0x32,
+ 0xb4,0xf3,0x0b,0x46,0x83,0x08,0x63,0xe2,0x8c,0x46,0xa4,0xa8,0x0a,0x68,
+ 0x77,0x7f,0x13,0x34,0x22,0x41,0x6d,0xf4,0xb3,0x5c,0xb3,0x95,0xb1,0x55,
+ 0x64,0x7e,0x5d,0x46,0x4e,0xf5,0xb9,0x75,0x1a,0xd0,0x39,0x89,0x71,0xb6,
+ 0xc5,0x7b,0xa4,0x0b,0x34,0x22,0xfe,0xf2,0x09,0x9a,0xdc,0xc6,0x69,0xb9,
+ 0xd0,0xde,0x86,0x38,0x9d,0x10,0x82,0x14,0x64,0x88,0xdc,0xae,0x38,0xb8,
+ 0xb7,0xf0,0x65,0x7f,0x9c,0x10,0x99,0x91,0x99,0x1d,0x41,0x98,0xe7,0x9f,
+ 0x9f,0x9f,0xef,0x5f,0xbf,0xa4,0x97,0x53,0x8e,0x61,0x67,0x70,0x50,0x18,
+ 0x1b,0x11,0x59,0x21,0x24,0xec,0x84,0x63,0x09,0x29,0x25,0xf1,0x71,0x6c,
+ 0xa9,0xa2,0x61,0x3f,0x24,0x6a,0x9b,0x20,0xad,0xfe,0x56,0xab,0x93,0x59,
+ 0xee,0x02,0xc8,0x88,0xe1,0x15,0xab,0x73,0xd8,0x80,0xae,0x2c,0xf8,0xa8,
+ 0xee,0xbb,0xed,0xf3,0x6f,0xbe,0x85,0xee,0xb6,0x1d,0xe8,0x95,0x8e,0x92,
+ 0xb5,0x1e,0x59,0x5a,0x97,0x95,0x12,0x93,0x20,0xc7,0xbe,0x54,0x2a,0x23,
+ 0xd6,0x72,0x6a,0x7e,0x8f,0x8e,0x42,0x08,0xb7,0xeb,0x35,0xc5,0x20,0x7b,
+ 0xbf,0xaa,0x87,0xf8,0xdd,0x25,0x75,0x31,0x46,0x4e,0x91,0x63,0xf4,0xde,
+ 0xd1,0xd2,0x38,0xe6,0xfd,0xbe,0xf9,0xcd,0x84,0x08,0xba,0x44,0xc8,0x17,
+ 0x6d,0x9e,0xb6,0x7f,0x14,0xf5,0x2e,0x6a,0xa7,0xe5,0xaa,0xd1,0xb1,0xc4,
+ 0x7d,0xb6,0xfc,0xda,0xea,0xa2,0x6d,0x40,0x8c,0xc3,0xd2,0xcf,0x38,0x81,
+ 0xf2,0xb8,0xc6,0xdb,0xe1,0x34,0x4b,0xdb,0x58,0x64,0xd5,0x69,0x85,0x9b,
+ 0x79,0x5b,0xbd,0xcf,0x74,0xdd,0xa2,0xdf,0x10,0xb4,0x3d,0x26,0xfd,0x73,
+ 0x40,0x00,0xe7,0x30,0x84,0xf9,0x7a,0xbb,0xa6,0x18,0x5b,0x7b,0xbf,0xde,
+ 0x6d,0xe6,0x8a,0x74,0xbc,0xa0,0x74,0x08,0x00,0x68,0x9e,0x43,0x75,0xda,
+ 0x2d,0xad,0x2b,0x6e,0x74,0x7d,0x5f,0x63,0x75,0x60,0xbd,0xc6,0x70,0x48,
+ 0xec,0xa0,0x5b,0x00,0xc6,0x5b,0x91,0x94,0xed,0x32,0x6c,0x69,0xfc,0xdf,
+ 0xfe,0x65,0x7a,0xcc,0xdb,0x8e,0x19,0xab,0x6a,0x6b,0xce,0x2a,0xa8,0xe7,
+ 0xdd,0x2e,0xb4,0xcc,0xb4,0x6f,0x40,0x08,0x8b,0x7b,0xb3,0xb0,0x18,0x20,
+ 0x60,0x24,0xa4,0xf0,0x9a,0x7f,0x7e,0x7e,0xcb,0x56,0x44,0x69,0xe5,0x0d,
+ 0x96,0x98,0xca,0x27,0x98,0x52,0x82,0xb4,0xc0,0x26,0xc5,0x73,0x8b,0xde,
+ 0xf6,0x63,0x46,0xcd,0xce,0xcb,0x66,0xe6,0x21,0x8b,0x64,0xcb,0xaf,0xb7,
+ 0xe6,0xf7,0xfa,0x0d,0x68,0x2a,0x6d,0xdd,0xc7,0xa4,0x9c,0x6f,0xfd,0x56,
+ 0x86,0xd3,0xb2,0x6e,0xbe,0x3c,0x88,0xf3,0x1c,0x74,0x49,0x5d,0x1e,0xc6,
+ 0x6b,0x9f,0x07,0x0d,0xf2,0x71,0x8d,0x02,0x99,0x19,0x65,0x1a,0x86,0x04,
+ 0x42,0x4d,0x31,0x84,0xdb,0xcf,0xef,0x94,0x72,0xbd,0x1f,0x9f,0xf9,0x5d,
+ 0x5b,0xc6,0xc9,0x79,0x2f,0x61,0xbc,0xf4,0x89,0x62,0x88,0x2d,0xe3,0x6c,
+ 0x71,0xb4,0x76,0x2e,0xa2,0xcc,0x9c,0x5b,0xbf,0x7b,0xf8,0xe4,0x4b,0x66,
+ 0xfe,0x7e,0x03,0x9a,0xaa,0x46,0x38,0xdb,0xd3,0xfa,0x9f,0x50,0x77,0xfb,
+ 0x76,0x6a,0xed,0x33,0xef,0x6b,0x10,0x89,0x29,0x84,0xc0,0x0c,0xde,0x4f,
+ 0xba,0x0e,0xb5,0x8c,0xeb,0x8d,0xa2,0xaf,0xe3,0x4e,0x4b,0x21,0x10,0x10,
+ 0x68,0xf9,0x97,0xa3,0x39,0x84,0xeb,0xcf,0x8f,0xf8,0xfb,0x6c,0x13,0xe9,
+ 0xc8,0x38,0x58,0x58,0xd2,0x74,0x26,0x27,0x58,0x1c,0x06,0xa2,0x18,0x62,
+ 0x58,0x41,0x6c,0xad,0xda,0x97,0x56,0x3b,0xaa,0x3b,0x5f,0xca,0x28,0x6a,
+ 0x84,0x95,0xcf,0x4a,0x34,0xab,0x51,0xf6,0x1b,0xd0,0xd4,0xda,0x17,0x51,
+ 0x46,0x9e,0x7f,0x8b,0x77,0x2f,0x2f,0xae,0xe9,0xa9,0x72,0xdc,0x66,0xb2,
+ 0x07,0x80,0x18,0x53,0x88,0x21,0xa5,0xe4,0x1c,0x4d,0xde,0x6d,0x53,0x0c,
+ 0x68,0x95,0xbe,0x44,0xbe,0xe8,0xbf,0x60,0x2d,0xa7,0xca,0x3e,0x37,0x9c,
+ 0xe7,0xfb,0xef,0x7f,0xff,0x2f,0x73,0x14,0x9b,0x3f,0xd8,0x23,0x31,0xde,
+ 0x3a,0x4d,0xde,0xcb,0x90,0xa5,0x23,0x4c,0x31,0x85,0x18,0xb7,0x70,0xac,
+ 0xc2,0x98,0xc2,0x36,0xa0,0x2b,0xb1,0x9d,0x23,0xf0,0x8a,0xb2,0xe5,0x9a,
+ 0x03,0x67,0x8d,0xbc,0x0e,0xe9,0x61,0xa8,0x7a,0x7c,0xc6,0xdd,0xfc,0xdf,
+ 0x62,0x0f,0x64,0xe8,0x5c,0x54,0xbf,0xc9,0xa1,0x2b,0x38,0x88,0x98,0x9c,
+ 0xf7,0x6b,0x84,0x6f,0x5d,0x3d,0x5a,0x8d,0x57,0x17,0x09,0x9b,0xe2,0xb3,
+ 0x3d,0x7a,0x8e,0xa6,0x10,0x6f,0x3f,0xbf,0x7f,0x52,0x5a,0xe2,0xfc,0x43,
+ 0xd7,0x6e,0x0e,0x14,0x7b,0xe7,0x10,0x89,0x65,0x66,0x16,0x20,0xec,0x71,
+ 0x8b,0x58,0xe0,0x07,0xf5,0x04,0x97,0xe4,0x2b,0x55,0xb0,0xec,0xe0,0x9c,
+ 0x72,0x95,0x4a,0x29,0x73,0xed,0x2d,0x7a,0x18,0x6a,0xa5,0x8f,0x23,0x7c,
+ 0x8c,0x6f,0xad,0x4b,0x69,0x11,0x6b,0x2d,0xce,0x65,0x1d,0x2b,0x51,0xee,
+ 0x97,0x2c,0x64,0x65,0x66,0x60,0x58,0x0d,0xbe,0x27,0xc2,0x2d,0xb0,0x33,
+ 0xad,0x7d,0xd6,0xff,0xf3,0xae,0xa0,0xbf,0x81,0x77,0x69,0x09,0xfe,0x9c,
+ 0xfb,0x0e,0xe1,0xe7,0x7a,0xbd,0x72,0x0a,0x76,0xa7,0x7b,0x07,0xb8,0x11,
+ 0x53,0x62,0x4e,0xde,0x11,0x92,0x5b,0x31,0x42,0x18,0x22,0xc7,0x98,0x34,
+ 0xea,0xda,0x6b,0xd8,0x8e,0x03,0x40,0x83,0xf9,0x6c,0x17,0xe6,0x21,0x02,
+ 0xac,0x05,0x75,0xcf,0x9e,0x67,0xb9,0x58,0xa2,0x73,0xe5,0xfa,0x04,0xde,
+ 0xe1,0x1e,0xa5,0xc3,0xb4,0x7e,0xd0,0x48,0xe8,0x09,0xd5,0x8d,0xa8,0x92,
+ 0x95,0x66,0x9f,0x41,0x64,0x1f,0x62,0x48,0x31,0xca,0xa4,0xb4,0x9f,0x26,
+ 0xb7,0xec,0xc6,0xde,0xd7,0xec,0x64,0x8e,0x59,0x8e,0xc9,0xba,0x5f,0x7b,
+ 0x2d,0x9a,0x33,0xc3,0x52,0x5f,0x13,0xe0,0x8c,0x77,0xdf,0x21,0x5c,0x7f,
+ 0x7e,0x7e,0x8b,0xec,0x85,0x87,0xa2,0xb5,0x7f,0x36,0x84,0xc0,0x29,0x12,
+ 0x20,0x92,0x43,0x40,0x47,0x08,0x00,0x21,0x26,0x29,0x8b,0x6a,0x5c,0x54,
+ 0x23,0xae,0xdf,0x96,0x4b,0x64,0x0d,0x11,0xf8,0xb3,0x89,0xd5,0x4c,0xf1,
+ 0xec,0xf2,0xa5,0xc3,0x2b,0x53,0x0b,0x08,0x3b,0x12,0xd9,0x8d,0x8b,0xbc,
+ 0x4f,0xc3,0x68,0xcb,0x71,0x31,0x86,0x72,0xae,0x58,0xef,0x44,0x86,0xb2,
+ 0xe6,0x39,0x28,0x6d,0x95,0x66,0xf2,0x6b,0xff,0x92,0xf3,0x1a,0x8f,0x1c,
+ 0x02,0xd0,0xd1,0x27,0x75,0x90,0x04,0x08,0x9e,0xbe,0x62,0x0c,0xd7,0x9f,
+ 0x6b,0x8a,0x41,0x86,0x55,0xab,0x59,0x50,0x08,0x01,0x80,0x21,0x25,0x72,
+ 0x32,0x2f,0x01,0x80,0x18,0xe3,0xe2,0x13,0xd3,0xd2,0x8e,0xe3,0xb2,0x61,
+ 0xa8,0x40,0x1d,0x68,0x4c,0x6e,0x7c,0x46,0x3c,0x53,0x6a,0x60,0x99,0xc4,
+ 0xf7,0xd1,0x98,0x94,0x9d,0x05,0x9b,0xca,0x57,0x51,0xd5,0x1f,0xcf,0xea,
+ 0x1d,0x62,0xb9,0xa6,0x69,0x22,0x72,0xf3,0x1c,0x42,0x98,0xa5,0xd3,0x50,
+ 0x46,0x2e,0xb2,0x59,0x2e,0xc6,0x18,0x42,0x14,0x0a,0x02,0x12,0x51,0x18,
+ 0xa9,0xab,0x4f,0xdf,0x7f,0x5c,0xd6,0x97,0x68,0x7e,0x27,0x03,0x12,0xce,
+ 0x4d,0x31,0x86,0xeb,0xf5,0x9a,0x52,0x1e,0xeb,0x2d,0xd6,0x48,0x8a,0xe4,
+ 0x31,0x92,0x73,0xb8,0x60,0xad,0x28,0x44,0x0e,0x5a,0xa4,0x5b,0xcf,0x52,
+ 0xb5,0x0c,0x2c,0x31,0x44,0x99,0x2b,0xbd,0x4b,0x12,0xdc,0x21,0x08,0xcd,
+ 0xe1,0x81,0x0d,0x31,0xed,0x1a,0xaa,0xd5,0xa8,0x41,0x23,0x91,0xce,0xe6,
+ 0xf5,0x3f,0x11,0x79,0x49,0x7c,0xa5,0x95,0xd4,0x94,0xd2,0xf3,0xf9,0xd2,
+ 0x9d,0x1a,0xa5,0xb3,0x07,0x80,0x94,0xe2,0xb2,0xe1,0x1e,0xc9,0x4f,0x27,
+ 0x47,0x1e,0xf7,0x52,0xdf,0x2b,0x3d,0x6f,0x0d,0x52,0x5e,0x5b,0x62,0xb8,
+ 0x42,0xa9,0x16,0xb2,0x23,0x17,0x63,0xb8,0xfe,0xfe,0x2d,0x75,0x3d,0xb5,
+ 0xf9,0xcb,0x33,0x4d,0x89,0xd3,0x62,0x0f,0xbc,0x23,0x44,0x17,0xd6,0x29,
+ 0x57,0x5b,0x4d,0x29,0xf7,0x48,0x30,0xa7,0xcb,0x65,0xab,0x14,0xc9,0xae,
+ 0x4d,0x68,0x8c,0xb9,0xb7,0xea,0xb2,0xfd,0x38,0xc9,0x42,0x8c,0xb2,0x32,
+ 0x70,0xa7,0xce,0xbf,0x0b,0xee,0xf2,0x2a,0x74,0xb7,0x7c,0xfb,0xee,0xe2,
+ 0x9d,0x3e,0xcd,0xbb,0x40,0xbc,0x85,0x97,0x40,0xee,0x5b,0xe9,0xcc,0x8b,
+ 0xb2,0x8f,0x3c,0x32,0xe9,0x4c,0x2f,0x4f,0x9f,0x84,0x4f,0x65,0x19,0x5d,
+ 0x37,0x81,0xdd,0xaa,0x8c,0xbb,0x0e,0xbe,0x6d,0xee,0x88,0xd6,0x13,0x09,
+ 0xd5,0x4a,0xe2,0x78,0xbb,0xfd,0x88,0xcd,0x17,0xbd,0x5f,0xc3,0x8e,0x28,
+ 0x33,0xdb,0xce,0x39,0x40,0x12,0x6c,0xea,0xfe,0xe0,0x82,0xa9,0xc8,0xda,
+ 0x8d,0xba,0x27,0xef,0x27,0x4b,0x6d,0xa2,0xab,0xc6,0x2d,0xec,0xae,0xe5,
+ 0xda,0xab,0xb1,0x76,0x35,0xf5,0x10,0x2b,0xd8,0xd9,0xfe,0x5d,0xd9,0x5e,
+ 0xd0,0xcf,0x10,0xf6,0x00,0xa0,0xb7,0xcb,0x73,0xd0,0xdd,0xd4,0xae,0x2a,
+ 0xe2,0xd7,0x4e,0xa2,0x56,0xb2,0x24,0xad,0x2f,0x4b,0x3a,0x06,0xf0,0x8a,
+ 0x6b,0x35,0x37,0xa4,0x94,0xc8,0x2d,0x80,0xd7,0x02,0xa8,0xb1,0xb5,0x4a,
+ 0x76,0x26,0xdf,0x34,0x70,0x57,0xa3,0x8f,0xde,0xf9,0x18,0xe3,0xed,0x76,
+ 0x4d,0x71,0x16,0xfd,0x5e,0x6e,0x09,0x68,0xf2,0x13,0x2d,0x52,0x8f,0x21,
+ 0x86,0x15,0x47,0xd5,0xeb,0xe5,0x7b,0xef,0x74,0xe7,0x92,0xad,0xd0,0x65,
+ 0x0b,0xae,0x0f,0x17,0xe4,0x1c,0xee,0x61,0xc9,0xfa,0x5b,0x83,0x2b,0xfb,
+ 0xa8,0x4c,0x0f,0x64,0x57,0x48,0x59,0x3c,0x6f,0x6d,0x46,0xfc,0x00,0xa3,
+ 0x67,0xd5,0x65,0x9a,0x26,0xef,0x9c,0xe4,0x72,0x16,0x39,0xf9,0x7a,0xbd,
+ 0x74,0x5d,0x59,0x2d,0xf0,0xa4,0xb5,0xea,0x27,0x50,0xb2,0x94,0x00,0x10,
+ 0x05,0xf4,0x08,0x56,0xf3,0x37,0x23,0x6f,0x5b,0x3a,0x66,0xa2,0x5d,0xda,
+ 0x78,0x48,0x08,0x84,0xce,0xbb,0x18,0xe2,0xcf,0xf5,0x27,0xc5,0xb0,0xc6,
+ 0x19,0xec,0xa7,0x89,0xbc,0x97,0x42,0x82,0xe4,0x93,0xeb,0xcd,0x57,0xc6,
+ 0x72,0xc5,0x97,0x7b,0xef,0xa6,0xe9,0x34,0x4d,0x93,0x42,0xd7,0xd5,0x0e,
+ 0x6b,0x63,0xa2,0xdc,0x25,0xfc,0xae,0xd4,0x6d,0x35,0x6c,0x70,0xe1,0x92,
+ 0xfe,0xd0,0x97,0x0a,0x2d,0x6c,0xd9,0xd5,0xda,0xef,0x5b,0x05,0xe4,0x56,
+ 0xae,0xbf,0x5b,0x66,0xed,0xbd,0x28,0x56,0x86,0x8d,0x21,0xc2,0x94,0x16,
+ 0xb2,0x10,0xc1,0x0a,0xea,0x9a,0x76,0x73,0x4b,0xd2,0x17,0x61,0x44,0x0e,
+ 0x71,0xa1,0xa4,0x14,0x56,0x13,0x80,0xc4,0x4a,0x5d,0x91,0x45,0xf9,0xdb,
+ 0xdc,0x8b,0xa9,0xf1,0x23,0xad,0x51,0x02,0xa3,0x77,0x9c,0xd2,0xfd,0x76,
+ 0x9b,0x4e,0x13,0xa2,0x98,0x6b,0x0f,0xc0,0x21,0x46,0xcb,0x55,0x01,0x06,
+ 0x19,0xa2,0x6d,0x37,0x1d,0x45,0x9a,0xa6,0x93,0x73,0xce,0x82,0x10,0x15,
+ 0xeb,0xa0,0x1e,0xad,0x55,0x08,0x19,0x69,0x18,0x56,0x3b,0x34,0x59,0xf9,
+ 0xab,0x1f,0x2a,0x52,0xd5,0x6e,0x64,0x92,0xf8,0xcc,0xd4,0x77,0x72,0x7d,
+ 0x35,0xf2,0x8a,0x1e,0x2c,0x2e,0xbb,0xe4,0xee,0xf3,0x3c,0x57,0x4b,0xb9,
+ 0xf2,0xd0,0xd6,0x58,0x06,0x38,0x49,0x11,0x28,0xa5,0xc4,0x31,0x41,0x62,
+ 0x5c,0x49,0xd9,0x71,0xe7,0xdd,0x1b,0x7d,0xd7,0x85,0xc6,0x42,0xe0,0xd3,
+ 0x42,0x16,0x8e,0x18,0x42,0x92,0xdb,0x60,0xe6,0x10,0x62,0x8c,0x31,0x31,
+ 0x67,0xe8,0xaf,0xfd,0x30,0xc9,0x22,0xf5,0xd3,0x69,0x72,0xce,0xc5,0x98,
+ 0xca,0x7d,0x0f,0x5a,0xb0,0x12,0x67,0x5f,0xd6,0xed,0x5b,0x1b,0x14,0x3a,
+ 0xea,0x6e,0x5b,0x3e,0xd0,0xa0,0xad,0x2b,0xcf,0x93,0xaf,0x62,0x8c,0x34,
+ 0xaa,0xca,0x16,0x90,0x7f,0x60,0xe4,0x5b,0x26,0x48,0xa8,0xbd,0x84,0x3a,
+ 0xa5,0x35,0x56,0x21,0x88,0x2b,0x71,0xf6,0x82,0xce,0xb3,0xfb,0x29,0x61,
+ 0x3f,0x89,0xa8,0x2c,0xb0,0xb0,0x07,0x5e,0x03,0x10,0x90,0x25,0x2b,0xb2,
+ 0x8a,0x2e,0xcd,0x9b,0x85,0xf8,0x8a,0x90,0x12,0xe8,0xd5,0x92,0x74,0x32,
+ 0x52,0x8c,0x0c,0x90,0x8d,0x39,0x5a,0x9c,0x85,0xb5,0xd5,0xce,0xb9,0xd3,
+ 0x69,0x72,0xce,0x8b,0x3d,0xaf,0x12,0xd5,0xe9,0xe0,0x8a,0x94,0x29,0xb3,
+ 0xa7,0x54,0x96,0x3a,0x0e,0x27,0x6c,0x44,0x40,0xfa,0xe7,0x61,0x77,0x67,
+ 0x39,0x70,0x2d,0x20,0xa9,0xda,0xa8,0xcf,0x1a,0xb5,0xfd,0x12,0xb4,0x94,
+ 0xe7,0x4e,0xa7,0x93,0x42,0x69,0xdb,0x9e,0x82,0xc4,0x02,0xbd,0x5e,0x2f,
+ 0x09,0xfe,0xab,0x81,0xeb,0x3a,0x7b,0x83,0xd9,0xf2,0x83,0x95,0x76,0x16,
+ 0x01,0x08,0xd0,0x01,0x12,0x80,0x03,0x20,0x00,0x02,0x94,0x7f,0x10,0x90,
+ 0x18,0x09,0x76,0x52,0xdf,0x70,0xf0,0xa9,0x80,0x33,0x97,0xdb,0x78,0xb5,
+ 0x31,0x7a,0x3a,0x9d,0x54,0xea,0xd0,0x18,0xe4,0xd0,0xe7,0x99,0x41,0x9e,
+ 0xfb,0x55,0xed,0xce,0x0b,0x54,0xe3,0x4b,0x38,0x5e,0xd5,0xc1,0x2b,0xc9,
+ 0x5b,0x13,0x59,0x96,0x75,0x8b,0xc7,0xd5,0xbd,0x4f,0xd9,0x20,0xec,0x4d,
+ 0xc2,0xe4,0xa7,0xf3,0x28,0x9d,0x4b,0x89,0xa4,0x65,0x04,0x84,0x88,0xa6,
+ 0xc9,0x67,0x41,0x6c,0x86,0xc2,0x33,0x73,0x46,0xa9,0xd8,0x6f,0xbb,0x16,
+ 0x78,0x57,0xca,0x12,0x58,0x99,0x2c,0x4c,0x5f,0x67,0xb5,0xde,0x6b,0x9a,
+ 0x54,0x62,0x99,0xf5,0xee,0xac,0xd4,0xcf,0xe7,0x93,0x80,0x6e,0x2d,0xa2,
+ 0x19,0x1a,0x83,0x1c,0x72,0x93,0xaf,0xd7,0x2b,0x23,0x7e,0x6a,0x11,0x12,
+ 0x74,0x10,0x60,0xb6,0xbc,0x58,0x6d,0xb2,0x54,0xab,0x40,0x95,0x7d,0xd1,
+ 0x5a,0xbc,0x7b,0x37,0x94,0xeb,0x94,0x6b,0x60,0x3f,0x7d,0x28,0x8a,0x5b,
+ 0x0e,0x06,0x74,0x64,0x2f,0xaf,0x17,0x2a,0x7b,0x5d,0x5f,0xd2,0x4a,0x55,
+ 0xd5,0xf7,0x77,0xbb,0x09,0xb8,0xeb,0xf0,0xac,0x9d,0xde,0x0c,0x21,0xd9,
+ 0xed,0x9a,0x6c,0x90,0xb7,0xf3,0xf9,0xec,0x9c,0x0f,0x21,0xea,0xd3,0xef,
+ 0x48,0xdd,0x56,0xf7,0x64,0xa0,0x49,0xb1,0x53,0x96,0x5c,0xbb,0x93,0xbf,
+ 0x41,0x7b,0xf0,0x3d,0x33,0xcf,0xad,0xe9,0x4c,0x6a,0x1d,0xa8,0xea,0xa4,
+ 0xd6,0x07,0xc8,0x9c,0x8c,0x97,0x41,0x22,0x79,0xe7,0x9d,0x38,0xb9,0x77,
+ 0x71,0x5a,0xcc,0xfc,0x7c,0x3e,0xc5,0x3b,0x2a,0xae,0xb4,0xf5,0xbe,0x1d,
+ 0x82,0x09,0x30,0xe2,0xce,0xe0,0xcc,0x55,0x3a,0x1a,0x73,0x86,0xf2,0xf4,
+ 0x44,0x16,0xa7,0x49,0x0e,0x2c,0x10,0xb1,0xc3,0x47,0x51,0x62,0x0f,0x65,
+ 0xda,0x44,0x69,0xef,0x5a,0x2b,0x5e,0xfb,0x74,0x73,0xe5,0xa6,0xaa,0x4e,
+ 0x58,0xe6,0x5b,0x8d,0x48,0x11,0x8c,0xee,0xad,0xfe,0xc3,0x72,0x8d,0xc6,
+ 0x3e,0x12,0x9f,0x5b,0x7c,0xfb,0x5b,0x3d,0x1e,0xf9,0x20,0xcf,0xe7,0x33,
+ 0xa5,0x24,0xf5,0x35,0x9d,0xd9,0x1b,0x75,0x3a,0xca,0x4b,0xbd,0xc6,0xfb,
+ 0x32,0xa7,0x57,0x4b,0x56,0x39,0x7b,0x86,0xf6,0x1b,0xf1,0x15,0xd3,0x74,
+ 0x3a,0x9d,0x26,0x09,0xe0,0x2d,0x8e,0xbd,0xd5,0x15,0xcd,0x70,0xb4,0x99,
+ 0x3d,0x50,0xd6,0x43,0x4d,0xfa,0xcb,0xd6,0x0b,0xb4,0xb1,0xd8,0xd9,0xde,
+ 0xf0,0x16,0x18,0x7a,0x9b,0x9d,0x2b,0xa5,0x6e,0x23,0xf9,0x41,0x66,0xad,
+ 0x8e,0xe1,0xb5,0x8d,0x6a,0x69,0xa9,0x65,0x84,0xa4,0xe3,0x27,0x09,0x11,
+ 0xc5,0x73,0xbf,0xe6,0xa5,0x9e,0x2f,0x0a,0xa7,0x9e,0xb5,0xa4,0x05,0xa8,
+ 0x5e,0xae,0x63,0x8a,0x0f,0x39,0x26,0xf4,0xf7,0xa4,0x44,0x23,0x27,0xaf,
+ 0xca,0x95,0xd8,0xd2,0x75,0xcb,0x14,0x24,0xd5,0x3d,0x09,0x5f,0x74,0xe8,
+ 0x49,0x00,0x86,0x55,0xd9,0x57,0xb9,0x0e,0xf4,0xe2,0x72,0x68,0x60,0x80,
+ 0xc0,0x99,0x3a,0x31,0xa4,0xdd,0xf5,0xfb,0x56,0x24,0x9f,0xfd,0x8a,0xb6,
+ 0xda,0x54,0x2d,0xca,0x4a,0xf0,0xa0,0xec,0x53,0x5a,0x72,0x6b,0x47,0x4e,
+ 0xee,0x50,0x2d,0xbf,0xf7,0xde,0x4f,0xbe,0x9c,0x8d,0x2d,0x0c,0x7c,0xb3,
+ 0x3e,0x9d,0xb5,0x5b,0xaa,0x47,0x79,0xf3,0x1b,0x6b,0x25,0x5f,0x6a,0x8b,
+ 0x55,0x36,0x3d,0x38,0x5a,0xcd,0x2a,0xf5,0x7f,0x2d,0x3c,0x5b,0xad,0x93,
+ 0x73,0xac,0xa7,0xa1,0x5a,0x67,0x6b,0xdd,0x6a,0x26,0xfb,0xaa,0x77,0xf0,
+ 0x9d,0x20,0xdc,0x0e,0x53,0x7e,0x90,0xbf,0xe9,0xb2,0xa7,0x25,0xd6,0x4d,
+ 0x31,0xc5,0xf4,0x7c,0x3e,0x89,0x96,0xaa,0x08,0x1c,0xad,0x58,0x6a,0x35,
+ 0x3a,0xb3,0x0f,0x26,0x05,0x66,0x19,0xba,0x10,0x3f,0x52,0x2f,0x0a,0x19,
+ 0xcc,0x86,0x21,0xb1,0x80,0xfd,0xd4,0x4b,0x6b,0xd7,0xf4,0x2e,0x98,0xd7,
+ 0x1b,0x98,0xe7,0x59,0x10,0xd6,0x5a,0x95,0xeb,0x38,0x75,0xfb,0x91,0xc5,
+ 0x55,0x49,0xbb,0x56,0x0b,0x79,0x60,0x66,0x9b,0xe5,0xe7,0x3a,0xe6,0x5d,
+ 0x6d,0xe1,0x67,0x5f,0x62,0x7b,0x64,0x84,0xea,0x90,0xca,0xd7,0x97,0xfe,
+ 0xc3,0x52,0xcc,0x6a,0x67,0xe9,0x30,0x95,0x2f,0x6d,0xa3,0x88,0x5c,0xcf,
+ 0x2f,0x21,0xa1,0xc3,0x10,0xc2,0xf5,0x7a,0xfb,0xfe,0xfe,0xd6,0x1a,0x51,
+ 0x7f,0x35,0x76,0x66,0x45,0x2c,0x4a,0x33,0x5b,0x3c,0xbf,0x36,0xa8,0x16,
+ 0x6a,0x8c,0x8d,0xf8,0x1d,0x96,0x2d,0x13,0x96,0x22,0xd7,0x5e,0x79,0x4d,
+ 0x5c,0x99,0x01,0x74,0x27,0xd2,0x2a,0xc2,0x0d,0x3b,0xb9,0xa6,0x78,0x64,
+ 0xc9,0x17,0xb5,0xc0,0xa0,0xb3,0xc0,0x7a,0x57,0x55,0xd7,0xae,0x52,0x97,
+ 0xc4,0x24,0x2a,0xa0,0x68,0xcf,0x5b,0xad,0xe7,0x40,0x04,0x29,0xa7,0xb9,
+ 0xba,0x0c,0xbd,0x9c,0x3c,0x87,0x75,0x94,0xb3,0xe3,0x7a,0xb6,0x65,0x44,
+ 0x2d,0xf3,0x28,0x7e,0xd4,0xd2,0x6d,0x0d,0x21,0x27,0x53,0x92,0x02,0xbb,
+ 0x72,0xb6,0x67,0x6d,0x8c,0xc7,0xe3,0x71,0x3e,0x9f,0x0f,0xf5,0xde,0x94,
+ 0x42,0x97,0x02,0xbe,0x64,0x76,0x55,0xf8,0x8a,0x05,0x58,0x4a,0x91,0x75,
+ 0x9b,0x52,0x23,0xcc,0x30,0x49,0x19,0x08,0x42,0xd5,0x9a,0x97,0x6d,0x43,
+ 0xf9,0x23,0x55,0xee,0x96,0xb2,0x2f,0x62,0xf7,0xaa,0x88,0xfc,0xf4,0x23,
+ 0xb7,0x84,0xa4,0x52,0xd7,0x2e,0x94,0x85,0x64,0x65,0x0f,0x53,0x1c,0x99,
+ 0xbc,0x6c,0x3f,0x9f,0x05,0xd5,0x17,0xdb,0xd2,0x45,0xa7,0x99,0xeb,0x3b,
+ 0x05,0xa3,0xac,0x62,0x6f,0xc3,0xc5,0x4e,0x1b,0x51,0x78,0x26,0xe5,0x83,
+ 0xd9,0x4c,0xdd,0x2e,0xcc,0x91,0xcb,0x0a,0xc4,0x71,0xc5,0xac,0xa5,0xb2,
+ 0xb9,0xa9,0x46,0xd8,0x3e,0x6e,0x7b,0xbc,0x46,0x12,0xa7,0x10,0x02,0x12,
+ 0xa6,0x98,0x74,0x2d,0x06,0x11,0xea,0xbb,0x2d,0x1d,0xbc,0xb4,0xc9,0x1e,
+ 0x8d,0xf3,0xd6,0xa7,0x62,0x21,0xf1,0x76,0xe8,0xd3,0x1e,0x3e,0xed,0x23,
+ 0x6b,0x40,0x53,0xea,0x83,0xa4,0xec,0xa2,0x12,0xf2,0x7a,0x05,0x65,0x64,
+ 0x5b,0x29,0xec,0x2f,0xce,0xf3,0x2c,0xd8,0x10,0x65,0xaa,0xaf,0x6a,0xbc,
+ 0x1e,0x68,0x6b,0xd2,0x5a,0xb5,0x3f,0xdf,0x5a,0x79,0xc2,0xcc,0xb4,0x7b,
+ 0x04,0xb9,0x73,0xad,0x52,0xf4,0xe9,0x70,0xb6,0xb6,0x23,0xf3,0x59,0xbd,
+ 0x35,0x5f,0x90,0x70,0xe6,0xeb,0xeb,0x4b,0x65,0x9f,0x61,0x4f,0x55,0x82,
+ 0x65,0x35,0x43,0x0b,0x1d,0x25,0x27,0x80,0xbd,0x19,0x29,0xef,0x8b,0x2d,
+ 0x25,0x4f,0x19,0x70,0x25,0xc6,0x44,0x24,0xec,0x15,0xe0,0x3c,0x29,0x22,
+ 0x36,0x46,0x31,0xc0,0xf7,0xf3,0xf9,0x57,0x95,0x42,0xa7,0x6a,0x5d,0xd5,
+ 0xfb,0x88,0x68,0x89,0x88,0x81,0x53,0xdc,0x46,0x21,0x75,0x49,0xb0,0x4c,
+ 0x6b,0x4b,0x5e,0x23,0x51,0x61,0xe7,0x82,0xfa,0xb7,0x62,0xf3,0x15,0x9c,
+ 0x52,0xad,0x73,0x6b,0x16,0xa0,0x11,0x62,0x67,0xd2,0xdb,0x43,0x7b,0x26,
+ 0x92,0x0b,0xdb,0x6e,0x6d,0x5d,0xd9,0x58,0xd3,0x1e,0xab,0xe2,0x4c,0xaa,
+ 0xfd,0x7b,0x2b,0xbf,0xe7,0xf3,0xa9,0x7a,0x9f,0x53,0x67,0x21,0xc8,0xf0,
+ 0x43,0x39,0x6c,0xd5,0x6a,0xea,0x58,0x2d,0x11,0x19,0x78,0xef,0xa5,0x5b,
+ 0x2a,0x83,0x4e,0x3a,0xad,0x27,0xc1,0x9a,0x5e,0x27,0xc6,0xc8,0xcb,0xfa,
+ 0x29,0x96,0xea,0x9b,0x73,0x67,0x45,0x7a,0x65,0xd1,0x65,0x07,0xfe,0xa6,
+ 0x42,0x92,0xdf,0xb5,0x35,0x50,0x0d,0x75,0x55,0xd7,0x75,0x22,0xac,0x3f,
+ 0x80,0xac,0x61,0xe3,0x3c,0xcf,0x36,0x7d,0x28,0x4f,0x4c,0x09,0x9f,0xe9,
+ 0x0c,0x06,0xf9,0xce,0xd2,0xdc,0xaa,0x17,0xb1,0x40,0x71,0x7b,0xd6,0x6c,
+ 0xed,0xa9,0x0f,0xd2,0xb2,0x1e,0x28,0xb3,0xf9,0xa2,0x88,0x42,0x78,0x44,
+ 0x48,0x65,0xd3,0xba,0x24,0xbf,0x83,0x3a,0x3b,0x38,0x1b,0x53,0x9c,0xb2,
+ 0x8f,0x62,0x68,0x4a,0x76,0x91,0xc1,0x8a,0x84,0xdf,0xa4,0xdb,0xee,0x1a,
+ 0xd7,0x23,0x50,0x4d,0xbb,0x75,0xed,0x88,0x8a,0x4d,0x99,0xab,0xc4,0xd4,
+ 0xb5,0xa4,0xde,0xda,0xf8,0xaa,0xe6,0xa4,0x5c,0xb9,0x5b,0x2d,0x99,0x58,
+ 0x86,0x91,0x6a,0xfd,0xc7,0xb7,0xfc,0xb4,0x65,0xc3,0x5f,0xd9,0xa7,0x70,
+ 0x37,0x02,0xb1,0xd6,0x76,0x74,0x38,0xdb,0x56,0xd0,0xfa,0x2d,0x7c,0x3d,
+ 0xb0,0x22,0x7b,0x66,0x56,0x9b,0x4f,0x04,0x6b,0x1a,0xb1,0x2b,0x1b,0xdb,
+ 0x70,0xe9,0xad,0x82,0xcf,0xea,0x4a,0x10,0x00,0x8b,0xa4,0x3a,0x4b,0xb7,
+ 0x14,0xa6,0xc5,0x2a,0x98,0x91,0xd5,0xf2,0x59,0xf3,0x4d,0x2f,0x28,0x65,
+ 0x99,0x65,0xcb,0xda,0xda,0xf3,0xd4,0xe2,0xcc,0xb8,0xd4,0x6d,0x6d,0x4e,
+ 0x98,0xda,0x33,0x4c,0x83,0xed,0xf6,0x56,0x03,0x85,0xf2,0x9e,0x7d,0xb5,
+ 0x20,0x60,0xbb,0xfa,0xab,0x47,0x5c,0x1d,0xf0,0x02,0x6e,0x22,0x93,0xa6,
+ 0x53,0x5c,0x9d,0xd9,0x78,0x71,0xd7,0x16,0x07,0xc5,0x88,0xd9,0xe0,0x2b,
+ 0x8b,0x25,0xab,0xe1,0xee,0x21,0x08,0x40,0x6b,0x20,0xfb,0xbb,0xda,0x89,
+ 0x7b,0x7f,0x9d,0x3c,0x50,0xea,0xc8,0x06,0x8e,0x06,0x4b,0xb6,0xd0,0x12,
+ 0x51,0x72,0x1c,0xa1,0x99,0x29,0x37,0x0e,0xb5,0x64,0x53,0x42,0xa7,0xb5,
+ 0x44,0xb1,0xe7,0x5e,0x73,0xb6,0xd7,0xc7,0xcc,0x92,0xfd,0x67,0x30,0x90,
+ 0xec,0x9e,0x7d,0xb5,0xba,0xa4,0x56,0xce,0x96,0x91,0x4d,0x32,0xca,0x44,
+ 0x6c,0x86,0x60,0xf6,0xb1,0x95,0x72,0xb3,0x35,0xfa,0x45,0xa5,0xec,0x75,
+ 0x05,0x17,0x22,0xca,0xe1,0x29,0xf9,0x71,0xe1,0xfd,0xaf,0xfd,0x59,0x44,
+ 0x8b,0xae,0x2f,0xab,0x5e,0x6a,0x24,0x2d,0x93,0x73,0xf5,0xce,0x0f,0xb7,
+ 0xf1,0x96,0x56,0x57,0x75,0x5d,0x63,0xf8,0x11,0x56,0x91,0xf2,0xca,0xd6,
+ 0xdc,0x12,0xa1,0x73,0x5e,0x9d,0x91,0x2e,0x01,0xaa,0x16,0xdc,0x7a,0x1a,
+ 0x5f,0xca,0xde,0x9a,0x3b,0x8b,0x13,0x52,0x2f,0xa0,0x1d,0x85,0xb2,0x16,
+ 0x2e,0x79,0x51,0x15,0x8a,0x53,0x54,0xf7,0x16,0xd0,0x74,0x99,0x5f,0x94,
+ 0x89,0xc3,0x48,0x9b,0x38,0xd3,0x95,0xda,0x26,0xd2,0xed,0xdb,0xec,0x82,
+ 0x0a,0x9b,0x69,0xc2,0x3d,0xba,0x3b,0x4e,0xcb,0x91,0x01,0xe9,0x22,0x02,
+ 0x80,0x98,0xe8,0x8c,0x0d,0xa4,0x73,0xe5,0x4e,0xfb,0x60,0x6d,0x58,0x6c,
+ 0xfb,0x8b,0xac,0x87,0xd5,0x76,0x5f,0xb5,0x41,0xac,0x57,0xf6,0x9d,0xa6,
+ 0xbb,0x55,0xbb,0x72,0x22,0x57,0xe7,0xd4,0x4b,0x74,0x4a,0x06,0x3f,0xed,
+ 0x94,0xf4,0xcb,0x79,0xec,0x6a,0x41,0x6a,0x5c,0xea,0x50,0x4c,0x2a,0xd5,
+ 0x18,0x56,0x2a,0x52,0x2f,0x37,0xcf,0x96,0x71,0x4f,0xe9,0x89,0x5b,0xb2,
+ 0x51,0x63,0x23,0x52,0x97,0x30,0xbe,0x23,0xf5,0x4e,0x7a,0xd2,0x80,0xfd,
+ 0x2c,0xb6,0x5d,0x1c,0xc7,0xca,0x1e,0xb2,0xae,0xe7,0x6d,0xdf,0xf3,0xf6,
+ 0x01,0x3b,0x15,0xff,0x6a,0xb6,0x60,0xc2,0xe6,0xb4,0x1f,0x3d,0xae,0xcb,
+ 0x2f,0xad,0x5f,0xd0,0x5c,0x06,0x90,0xcf,0x7f,0xfc,0xf9,0xd2,0x74,0x7d,
+ 0xc4,0x0a,0x6d,0x2e,0xe0,0xf6,0xdc,0x02,0xb1,0x6b,0xa2,0x55,0xd2,0x4e,
+ 0x76,0x96,0xd6,0xb7,0xea,0xf3,0x36,0xfd,0x69,0x01,0x29,0x5b,0x61,0x5d,
+ 0x7f,0x83,0x82,0xe2,0x38,0x6c,0x2f,0x47,0x53,0x59,0x1b,0xf4,0x55,0x13,
+ 0x10,0xea,0xd4,0xff,0x06,0xa0,0x54,0x9b,0x5c,0xab,0x02,0xb3,0x8d,0xb8,
+ 0x52,0x39,0x14,0x26,0xdb,0xe8,0x80,0x1d,0xe3,0x90,0xfa,0x4a,0x6f,0xab,
+ 0xaa,0x5c,0xe4,0x70,0x50,0x5b,0xd7,0x23,0x3c,0x8c,0x2d,0xd0,0x63,0xab,
+ 0x31,0xda,0xe2,0x9f,0x17,0xd8,0x08,0xac,0x94,0xba,0xfd,0x91,0xa8,0xc1,
+ 0x2b,0x97,0x86,0xf3,0xf9,0x7c,0xa6,0x18,0x15,0x99,0x62,0x99,0x95,0x3a,
+ 0x57,0xf6,0xd0,0x5d,0x65,0xf0,0x01,0xf2,0xa2,0x35,0x64,0x5f,0xee,0x38,
+ 0xaf,0x0e,0x7b,0x66,0x35,0xb8,0xce,0xd2,0x82,0x91,0xfb,0x31,0xd5,0x43,
+ 0x34,0xed,0x96,0xa6,0x82,0xa6,0x94,0xa4,0xc1,0x3b,0x12,0x76,0x75,0x64,
+ 0x63,0xcb,0xba,0xcf,0xe7,0x53,0x30,0x23,0xe5,0x52,0x80,0x7e,0x40,0xd7,
+ 0xfa,0xb0,0x65,0x8d,0xf6,0x35,0xcf,0x9e,0x19,0x11,0xbc,0x77,0xc2,0xd4,
+ 0xa2,0x2c,0xb1,0xad,0x50,0x91,0x3a,0x0f,0xb1,0x05,0x67,0xe8,0x4b,0xa5,
+ 0xea,0xaa,0x3b,0xb5,0xe5,0x2c,0x23,0xb2,0x3e,0xa2,0xaa,0x22,0xe5,0x30,
+ 0x65,0x55,0xea,0xc5,0x91,0xca,0xa5,0x5e,0x7d,0xa0,0x0a,0x47,0xeb,0xef,
+ 0x5a,0x3b,0x9c,0x6d,0xce,0x30,0x04,0xd2,0x8c,0x29,0x71,0x82,0xad,0x2b,
+ 0xf7,0xe7,0x1d,0xcb,0x2d,0x43,0xcc,0x02,0x43,0x62,0xe5,0x52,0x83,0x82,
+ 0xce,0x23,0x1f,0x8b,0x86,0xb1,0xed,0x92,0x7d,0xa9,0x8f,0xd0,0x29,0x54,
+ 0xd3,0x2d,0xfb,0x55,0x5e,0xdf,0x2e,0xde,0x54,0x87,0x72,0x68,0xf9,0xf7,
+ 0x44,0x45,0x41,0xdb,0xca,0xfd,0x5e,0x8e,0x7d,0x4c,0xe5,0x98,0x70,0x35,
+ 0x71,0x6f,0xc9,0xde,0xc6,0xad,0x16,0x54,0x29,0x36,0xbf,0x65,0xde,0x3f,
+ 0xd8,0x9b,0x61,0x90,0xa8,0x92,0xca,0x47,0xc5,0x6f,0x65,0x4b,0x0f,0x4b,
+ 0x3f,0x5b,0x5f,0x83,0xd9,0xda,0x0d,0xd9,0x61,0x73,0xee,0x2b,0xd3,0xb8,
+ 0x9b,0x28,0x09,0x3d,0xd5,0x4c,0xe9,0x8a,0xbc,0x43,0x72,0xed,0x92,0x81,
+ 0xbf,0x85,0x3d,0x2d,0x7b,0x0a,0x2a,0xf8,0x96,0xf5,0x86,0x81,0xed,0xa9,
+ 0x55,0xc3,0x23,0x2d,0x0c,0x43,0x8d,0xd7,0x0c,0x15,0x47,0xf6,0x66,0x64,
+ 0x1a,0xb2,0xe6,0x59,0xa0,0xcb,0xb1,0xaa,0xf1,0xd3,0x2e,0xaa,0xef,0x03,
+ 0x5b,0x47,0x9e,0xef,0xc7,0x18,0xdc,0xc1,0x03,0x61,0x01,0x0e,0xef,0x02,
+ 0x00,0x15,0x9e,0xd1,0x8f,0x15,0x68,0x87,0xc6,0xc3,0xd2,0xf0,0xf4,0xc1,
+ 0x93,0xd5,0x87,0x9b,0x45,0xa6,0xca,0xec,0xa5,0x63,0x21,0x1d,0x34,0xd5,
+ 0xe0,0x42,0xef,0x1d,0x62,0x9a,0x08,0x80,0x63,0x8a,0xf3,0xfc,0x8a,0x29,
+ 0x66,0xbc,0x62,0xd9,0x3d,0xd3,0xe1,0x81,0x6a,0x19,0xf9,0x16,0xc2,0x77,
+ 0x9c,0xf7,0xec,0x5d,0x9c,0xae,0x36,0x25,0xab,0xe9,0x43,0x0b,0xf5,0x56,
+ 0xa5,0xf5,0xaf,0x44,0xe0,0x6b,0xa2,0x51,0x36,0xe5,0x3e,0x90,0x4d,0x66,
+ 0x8a,0x6d,0x8f,0x43,0xe3,0x7c,0xd5,0xfb,0xce,0xea,0xc3,0xce,0xa3,0x68,
+ 0x90,0x95,0x10,0x00,0x11,0x12,0xb4,0x59,0x74,0x2a,0xe4,0x47,0xe3,0x52,
+ 0xff,0x2c,0x05,0x68,0xd9,0xc3,0xc3,0x08,0x51,0x24,0x27,0x8a,0xd2,0xff,
+ 0xdd,0x56,0xc8,0x66,0xc5,0x59,0xd2,0xed,0xb5,0xa8,0x01,0xab,0x8f,0x78,
+ 0x44,0xf6,0xe5,0x18,0xb3,0xf5,0x89,0xda,0x8c,0xcf,0xc0,0x83,0x87,0xbc,
+ 0x86,0xfd,0xed,0xce,0x66,0x87,0x25,0x64,0x05,0x8c,0xf2,0xca,0x1e,0xda,
+ 0x4b,0xe2,0x3b,0xea,0x78,0x48,0xb1,0x32,0xa2,0xf4,0x65,0x18,0xd1,0x9f,
+ 0x8e,0xb0,0x1b,0x59,0x0e,0xfb,0xf1,0x59,0x50,0x5d,0xb2,0x8f,0xec,0xde,
+ 0x7d,0xdd,0x14,0x27,0x4d,0x94,0xcc,0xe5,0x43,0x9b,0x2d,0xae,0x7a,0x94,
+ 0x5b,0xa3,0x4f,0x59,0xac,0x77,0xb9,0x5c,0x4e,0xa7,0x93,0x54,0x60,0x46,
+ 0x02,0x3a,0x18,0xa0,0x59,0xd6,0xfe,0x7d,0x4c,0xac,0xf4,0x22,0xd5,0x2b,
+ 0xfb,0x0f,0x28,0xea,0x5a,0x80,0xfe,0x3f,0xf1,0xe5,0x9d,0x89,0x2f,0xf1,
+ 0xee,0x92,0x0b,0x55,0x51,0x18,0xfd,0x31,0x33,0xd1,0xb0,0x82,0xe3,0x31,
+ 0xe9,0x7a,0x55,0x1b,0xcc,0x2b,0x9a,0xbd,0xba,0x3b,0x67,0x30,0xa0,0x83,
+ 0xee,0x74,0xa3,0xf6,0x3f,0x1f,0x8f,0x87,0xac,0x80,0x7b,0x3e,0x9f,0xad,
+ 0x12,0xf5,0xbb,0x53,0xd3,0x19,0x50,0xb3,0x53,0x30,0x25,0xe8,0x0e,0xe5,
+ 0x1e,0x4a,0xfd,0x4f,0x0c,0x7e,0xbf,0x92,0x6f,0x8b,0xde,0x55,0x60,0x5a,
+ 0xdf,0x89,0xb4,0x26,0xd0,0xb4,0x4e,0x5c,0x46,0x06,0xba,0x53,0xd9,0xce,
+ 0xf0,0x0e,0xd6,0xd1,0x46,0xb4,0x33,0x2b,0x6c,0x8b,0xec,0x63,0x8c,0xd9,
+ 0x08,0xf0,0xc8,0x62,0xac,0xce,0x09,0xcb,0x9a,0x02,0xad,0x7b,0xf6,0x23,
+ 0x52,0xef,0xeb,0x25,0xfc,0x19,0x31,0x4e,0x6b,0xf3,0x67,0x06,0xa6,0xe8,
+ 0x57,0x2e,0x5b,0xbf,0x98,0x2d,0xdc,0x28,0x97,0xad,0x94,0x37,0x60,0x11,
+ 0x1f,0x55,0xa9,0x77,0x1c,0xf0,0xe1,0xca,0x75,0x7b,0x1b,0x3a,0x47,0x21,
+ 0x5b,0x5e,0x07,0x97,0xb9,0x1f,0x6e,0x50,0x68,0x0d,0xd9,0x64,0x57,0xa6,
+ 0x81,0x82,0xfc,0xc1,0x78,0xe6,0xdf,0xfe,0x95,0x35,0x78,0x0c,0xcb,0x59,
+ 0x3a,0xb4,0xa8,0xfd,0x66,0x60,0xb5,0x85,0x6a,0x57,0xe2,0xda,0x6a,0x52,
+ 0xcb,0x41,0x8e,0xac,0x2b,0x6b,0x2d,0x10,0xcc,0x5e,0x20,0xb2,0xbf,0xdd,
+ 0x6e,0xb0,0x32,0x3f,0x1c,0xba,0x8f,0xc1,0x66,0x2e,0x74,0x37,0x91,0xe6,
+ 0x05,0x9c,0x56,0xb9,0x0a,0x8e,0xa6,0x21,0x07,0x03,0xec,0xc3,0x68,0xb1,
+ 0x3c,0xaa,0x87,0x31,0x5d,0xff,0xaf,0x5a,0x87,0x75,0xa4,0xa3,0xff,0xe7,
+ 0x01,0x5d,0x3f,0x07,0xb6,0x57,0x96,0x10,0x4f,0xd7,0x21,0x57,0xf1,0x17,
+ 0x7d,0x4b,0xd9,0x21,0x3e,0xaf,0xb3,0x5e,0x8d,0x87,0x8b,0x23,0xf9,0xcc,
+ 0x5b,0x7d,0x94,0x8e,0x91,0x57,0x88,0xa3,0xce,0xdd,0xb5,0xd4,0xfd,0x5d,
+ 0x17,0xd3,0x9a,0x3b,0xff,0xac,0x8e,0x36,0x18,0x76,0x55,0x0b,0xf8,0x59,
+ 0xea,0x21,0x23,0xd6,0x5a,0xcf,0x3f,0xcc,0xda,0xdf,0x6a,0x13,0x97,0x1f,
+ 0x87,0xaa,0xf3,0x8b,0x9d,0x49,0xca,0x77,0xf7,0x73,0xb6,0xee,0xbe,0xea,
+ 0xb4,0xca,0xbb,0xd4,0x59,0xb8,0xff,0x90,0x5b,0x19,0x6c,0x87,0xf7,0x89,
+ 0x85,0x0f,0x65,0x93,0x5d,0xd9,0x3a,0x17,0x5d,0x1d,0x9b,0x12,0xdf,0x6e,
+ 0xb7,0x94,0x92,0xac,0x43,0x86,0xe1,0x95,0x58,0x1f,0x90,0x21,0x23,0x22,
+ 0x2d,0x44,0x9d,0x2b,0xbf,0x19,0x16,0xbd,0x9d,0xb7,0xd4,0xab,0x92,0x22,
+ 0x8f,0x19,0x92,0xec,0x16,0xb5,0x62,0xd3,0xf7,0xee,0x7f,0xbb,0xec,0x07,
+ 0x03,0x3a,0xe8,0x4e,0x20,0x43,0x9b,0xb0,0x24,0x6b,0x57,0x2a,0x4c,0x99,
+ 0x88,0x84,0xa2,0xf7,0xf9,0x7c,0x6a,0x9c,0xff,0xee,0x95,0x0f,0xc3,0xed,
+ 0x25,0x88,0x89,0x71,0x9a,0x26,0x8f,0x9c,0xa4,0xc1,0x93,0x88,0x9c,0x5b,
+ 0x96,0xdd,0x56,0x37,0x58,0x0e,0x1a,0xf9,0x71,0x61,0x77,0xaa,0x40,0x56,
+ 0x1b,0x3a,0xb0,0xf6,0xc3,0x02,0xd1,0x88,0x2f,0x87,0xc6,0x3e,0x87,0x43,
+ 0xd7,0xde,0x09,0xe3,0x5b,0xc1,0x36,0xec,0x67,0x42,0xec,0x84,0x82,0xbc,
+ 0x43,0x8c,0xf1,0x7e,0xbf,0xcb,0x7a,0x44,0x71,0xfc,0x87,0x57,0x1e,0x91,
+ 0xbd,0x7d,0x14,0x31,0xc6,0xdb,0xf5,0xc7,0xdf,0xef,0x0f,0xef,0x1d,0x12,
+ 0x71,0x4a,0xd1,0xf9,0x55,0xed,0x1d,0x39,0xaf,0x53,0x6b,0xea,0x71,0xfb,
+ 0xc1,0xd1,0x08,0x2d,0xdf,0x48,0x15,0x48,0x86,0xee,0x74,0xaa,0xb2,0xaa,
+ 0xee,0x1d,0xa3,0x32,0xd8,0xc5,0x19,0x69,0x5a,0x7f,0x4c,0x27,0x7d,0x28,
+ 0xf5,0x6c,0x3d,0xd1,0xda,0x82,0x42,0x01,0x35,0xdd,0x6e,0xd7,0xaf,0xaf,
+ 0xef,0xaf,0xaf,0xaf,0xc7,0xe3,0x51,0x8d,0xbe,0x5b,0xb6,0x64,0xe4,0x9e,
+ 0x85,0x40,0xd6,0x03,0xb9,0x98,0x78,0x22,0x42,0x27,0x33,0x1f,0x0c,0x0c,
+ 0x09,0x13,0x84,0x79,0x61,0x7f,0xd3,0x15,0xa0,0x88,0x48,0x02,0xea,0x20,
+ 0x4d,0x76,0x55,0x1d,0xcb,0x26,0xf4,0x07,0x55,0x20,0x30,0x7c,0x1e,0x9d,
+ 0xdc,0xbd,0xe3,0x50,0xde,0xe2,0x62,0x1c,0x61,0x66,0x1e,0xc9,0x5f,0x0e,
+ 0x29,0x8a,0x5a,0x4b,0xe4,0xb2,0x31,0x2b,0xb3,0x14,0x21,0xde,0xef,0xf7,
+ 0x7f,0xfc,0xe3,0x1f,0x97,0xcb,0x45,0x78,0x5f,0x60,0x60,0xa9,0x58,0xeb,
+ 0x9e,0xeb,0x54,0xbb,0x44,0xc4,0x29,0x85,0x30,0x9f,0x2f,0xe7,0xf5,0x85,
+ 0xc0,0xc0,0x28,0x73,0x27,0x32,0xf8,0xb7,0x12,0x43,0xea,0xf2,0xeb,0x65,
+ 0x0e,0x9b,0x08,0xd1,0xad,0x64,0x51,0xac,0xc3,0xe8,0x7d,0x7f,0x5c,0xd6,
+ 0x52,0xaa,0x31,0xdd,0x60,0xd2,0xf5,0x99,0xd7,0x6f,0xf1,0x0e,0x1e,0xd6,
+ 0x6a,0x6c,0x9e,0xf9,0x56,0x24,0x54,0x4e,0x29,0x29,0x69,0xfa,0x56,0x28,
+ 0xc4,0x6d,0x95,0x42,0x4a,0xf1,0x7e,0xbf,0xfd,0xfa,0xf5,0x0f,0x59,0x83,
+ 0x9e,0x31,0xe2,0xbd,0x9b,0x64,0x95,0xf7,0xec,0x89,0x08,0x88,0x52,0x4a,
+ 0xaf,0xe7,0xeb,0x74,0x3e,0x39,0xe7,0x01,0xd7,0x60,0x8a,0x19,0x00,0x79,
+ 0xe1,0x81,0x5b,0xfe,0x97,0x20,0xa5,0x10,0xd7,0xb1,0x46,0x60,0x96,0x2d,
+ 0x1d,0xe8,0x1c,0x21,0xe2,0xe4,0xfd,0x72,0x4c,0x56,0xf5,0x6d,0xcd,0x24,
+ 0x94,0x91,0xa7,0x5d,0x37,0x5d,0x76,0x1d,0x0e,0x67,0xb2,0x3e,0x68,0x18,
+ 0x56,0xab,0x5d,0xad,0x1a,0xe7,0x67,0x9b,0x48,0xab,0xdb,0x00,0xe5,0x13,
+ 0x39,0xe7,0x90,0x10,0x10,0x93,0x36,0x8e,0x59,0x80,0xf1,0xcb,0xeb,0x62,
+ 0x94,0x7a,0xfe,0xb9,0xa5,0xf7,0x23,0xf7,0xdc,0x0a,0x42,0xfd,0xf6,0x70,
+ 0x13,0xcc,0x73,0x80,0x09,0xbd,0x77,0xce,0x7b,0x48,0x29,0xa4,0x28,0x8b,
+ 0x92,0xd7,0xcb,0x88,0xde,0x23,0x23,0xaf,0x1c,0xed,0xb2,0xba,0x21,0x01,
+ 0x40,0x8c,0x01,0x00,0x63,0x98,0x17,0x4a,0x79,0x24,0x29,0xba,0x69,0x4a,
+ 0x36,0x48,0x8d,0x2a,0xaa,0x90,0x6d,0xc2,0xca,0x57,0x46,0x18,0x38,0xde,
+ 0x67,0xd9,0x3c,0x0c,0x2c,0xe8,0x6a,0xd5,0x88,0x46,0x56,0xcb,0xb7,0x28,
+ 0x6b,0x14,0x07,0x26,0xf9,0xfa,0x7e,0xab,0xc1,0xee,0x70,0xd3,0x3a,0x94,
+ 0xf8,0x7a,0xbd,0xa6,0xe9,0x94,0xe9,0xfd,0x5b,0x98,0xcc,0xea,0x49,0x35,
+ 0x63,0xd2,0x8e,0x80,0x61,0x9e,0x5f,0x44,0x17,0x72,0x48,0xe4,0x3d,0x40,
+ 0x84,0xc4,0x29,0x42,0x02,0xc3,0x03,0xb3,0x5b,0x01,0x81,0x28,0xfb,0x7f,
+ 0xb6,0xc5,0x5f,0x89,0x13,0x01,0x69,0xf9,0x53,0xa6,0x87,0xb2,0x35,0x4c,
+ 0xbb,0xec,0x62,0x95,0xa2,0x8e,0xba,0x49,0x63,0xb4,0x3a,0xa1,0x6d,0xb9,
+ 0x21,0xaa,0xb3,0x67,0x83,0xa4,0x8c,0x1d,0xf8,0x7a,0xc7,0xb5,0xb7,0x02,
+ 0x3a,0x1d,0x5c,0x2a,0x2f,0x6b,0x11,0x7f,0xc2,0x6f,0x1c,0xe3,0x72,0xdb,
+ 0xa2,0xc4,0xde,0x3b,0xab,0xca,0xcc,0xba,0x85,0x96,0xa6,0xc9,0x3b,0x47,
+ 0x8f,0xc7,0x1c,0xc2,0xf5,0xd7,0xaf,0xbf,0xb4,0x8f,0x07,0x6d,0x0a,0xb5,
+ 0xf1,0xaa,0xe2,0x36,0x24,0x25,0xe4,0xbe,0xcc,0xf0,0x7a,0x3d,0xa7,0xe9,
+ 0x04,0x0e,0x80,0x9c,0x5b,0x9c,0x4e,0x5c,0x57,0x7a,0xad,0x52,0x37,0x66,
+ 0x80,0x95,0x4d,0x54,0xae,0xb4,0x62,0x55,0x33,0x2e,0x0c,0x45,0xcc,0x59,
+ 0x54,0x05,0xac,0xdb,0x68,0x94,0x61,0x4b,0x09,0x23,0xaa,0xe4,0xac,0x32,
+ 0x27,0x6c,0xf9,0x73,0x3e,0x88,0xe9,0x5a,0x59,0x5f,0xeb,0x09,0x66,0xa5,
+ 0xd3,0xb2,0x14,0x03,0x66,0x4e,0x56,0xcc,0x95,0x1e,0x74,0xfd,0xf9,0xda,
+ 0x95,0x59,0x09,0x4f,0x57,0x9e,0x0b,0x8b,0x2a,0x5b,0x95,0x81,0x9d,0x17,
+ 0x52,0x9d,0x69,0xdd,0xc9,0xc7,0xd7,0xeb,0xf5,0xd7,0xaf,0xef,0xaf,0xaf,
+ 0x2f,0x39,0x2e,0x23,0xf7,0xdc,0xaf,0x2a,0xfa,0xe2,0xf3,0xb8,0x94,0x60,
+ 0x9e,0x67,0xe6,0xe4,0x9d,0x03,0x44,0x87,0x14,0x31,0xe1,0x36,0x77,0xc4,
+ 0xdb,0xfc,0xe1,0x4a,0xdc,0xbe,0x4a,0x7d,0x63,0x92,0x92,0x2c,0x00,0xf6,
+ 0xa1,0x7e,0xc9,0xb8,0x2b,0xf2,0x16,0xf4,0xb1,0x48,0x5d,0x31,0xed,0x65,
+ 0xdf,0x5d,0x37,0x12,0xae,0x15,0x8f,0xf4,0xf1,0x9a,0x9c,0x96,0x9b,0xec,
+ 0x48,0xbd,0x4a,0x29,0xb3,0xdb,0xb3,0xe1,0x7d,0x46,0x1b,0x60,0x3b,0x40,
+ 0xd9,0x98,0xb7,0x5a,0x02,0x1b,0x12,0xc1,0x42,0xda,0x00,0x84,0x4b,0x83,
+ 0x38,0xc4,0x80,0x48,0x00,0x89,0x39,0x49,0x7e,0x2f,0x7a,0x9f,0x5d,0xed,
+ 0x30,0xf1,0x29,0x83,0x50,0x2a,0x1d,0x1e,0x22,0x31,0xe0,0xfc,0x7a,0x85,
+ 0x10,0x39,0x31,0x22,0xe0,0xb2,0xe9,0x69,0xe5,0x84,0x4c,0xfb,0x85,0x0f,
+ 0xa0,0x6b,0x1f,0xb6,0x7d,0x50,0x84,0xe0,0x36,0x4e,0xee,0xfc,0x9e,0x04,
+ 0x1c,0x62,0xf7,0xcb,0xed,0xcd,0x1d,0x67,0xd1,0x80,0xe6,0xf7,0x1d,0xac,
+ 0xf4,0xc7,0x6d,0xc0,0x8f,0x2b,0x74,0x36,0x37,0x3b,0x9f,0xcf,0x97,0xcb,
+ 0x45,0x1b,0x6e,0xb2,0x2b,0x49,0x16,0x15,0x64,0xe4,0x8b,0x60,0x49,0xb4,
+ 0x8a,0x4d,0x25,0xfa,0x2e,0xd2,0xa4,0x90,0xbd,0x39,0x22,0xa6,0x94,0xf8,
+ 0x7a,0xbd,0x01,0xb0,0x62,0xb4,0x3f,0x70,0xed,0x3b,0x20,0x46,0x99,0x20,
+ 0x12,0x11,0x90,0x7f,0xbe,0x5e,0xf3,0x3c,0xc7,0xc4,0x84,0xb8,0xac,0xdd,
+ 0xda,0x96,0xb9,0x66,0xd3,0x67,0x76,0xf5,0x1f,0x2e,0x3e,0x7f,0xbb,0x60,
+ 0x6e,0xae,0x11,0x81,0x39,0x95,0x63,0xb6,0x0a,0xa8,0x55,0xdf,0xdf,0x4a,
+ 0xbb,0x4b,0x9c,0xc5,0x67,0x55,0xc5,0x56,0x0a,0xd7,0xe2,0xa5,0x69,0x25,
+ 0x6f,0xca,0x3f,0x13,0xed,0x92,0xd9,0x81,0x89,0xc4,0xec,0xc4,0xdb,0x41,
+ 0xd2,0xc5,0x30,0x10,0x3a,0xb7,0x8d,0x17,0xfe,0xfb,0xdf,0xbf,0x63,0x0c,
+ 0x5f,0x5f,0x5f,0x0a,0x35,0xe8,0xd7,0x97,0x5a,0xa6,0xce,0xb7,0x12,0x0f,
+ 0x79,0xf7,0x79,0x0e,0xcc,0xe0,0x26,0x47,0x80,0x89,0x08,0x65,0xe1,0xc7,
+ 0x12,0xea,0xa3,0x35,0xef,0xfb,0x21,0xf4,0x85,0x3e,0x2a,0xdb,0xfa,0xad,
+ 0x03,0x6c,0xf2,0x8f,0x6e,0xc3,0xd8,0x4d,0xf9,0xc6,0x98,0xd6,0x58,0xa2,
+ 0x7a,0xeb,0x19,0x13,0xdc,0xb8,0x5a,0x67,0x55,0xbf,0xc3,0x22,0xf4,0x5b,
+ 0xeb,0x57,0xde,0x85,0xa8,0x94,0x1b,0xdb,0x4d,0x70,0x67,0x4f,0x33,0xac,
+ 0xfc,0x7a,0x92,0xcb,0x00,0x73,0xba,0xdd,0xee,0x5f,0x5f,0xa0,0xbc,0xef,
+ 0x9d,0x20,0xb4,0x73,0x58,0xa9,0x13,0x19,0x21,0x11,0x10,0xbe,0xc2,0x2b,
+ 0x86,0x98,0x20,0xad,0x1b,0x23,0x68,0xa7,0xed,0xfb,0x0d,0x9f,0x9b,0x72,
+ 0xec,0x26,0x39,0xb2,0x0f,0x0c,0xfb,0xe8,0x60,0xf7,0xb7,0x31,0x25,0x4e,
+ 0xbd,0xc8,0x3c,0x5b,0xfc,0x3d,0x22,0x30,0x5b,0x32,0xd3,0xc9,0xfe,0xc1,
+ 0x0a,0x5d,0xbf,0xf9,0x96,0x49,0xb1,0x55,0x47,0x6b,0x39,0xe3,0xda,0xc6,
+ 0x62,0xdc,0xcf,0xea,0x32,0x2e,0x8b,0x53,0xc4,0xe0,0x2f,0x2e,0xef,0x7a,
+ 0xfd,0x01,0x83,0xd1,0x6e,0x9d,0xb3,0x4e,0x83,0xe7,0xff,0x03,0x6e,0x81,
+ 0xc2,0x4c,0x3e,0x77,0xa0,0xd5,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,
+ 0xae,0x42,0x60,0x82
+};
+
+static const unsigned int qtlogo_png_len = 12615;
+static const unsigned char qtlogo_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x08,0x02,0x00,0x00,
+ 0x00,0xff,0x80,0x02,0x03,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
+ 0x00,0xb1,0x8f,0x0b,0xfc,0x61,0x05,0x00,0x00,0x00,0x38,0x74,0x45,0x58,
+ 0x74,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x00,0x58,0x56,0x20,0x56,
+ 0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x2e,0x31,0x30,0x61,0x20,0x20,
+ 0x52,0x65,0x76,0x3a,0x20,0x31,0x32,0x2f,0x32,0x39,0x2f,0x39,0x34,0x20,
+ 0x28,0x50,0x4e,0x47,0x20,0x70,0x61,0x74,0x63,0x68,0x20,0x31,0x2e,0x32,
+ 0x29,0xdd,0x15,0x2e,0x49,0x00,0x00,0x30,0xba,0x49,0x44,0x41,0x54,0x78,
+ 0xda,0xed,0xbd,0x69,0x93,0x64,0x69,0x71,0x2e,0xf8,0xb8,0xbf,0xcb,0x39,
+ 0x27,0x22,0xd7,0xaa,0xca,0xda,0xf7,0xea,0xae,0xea,0x95,0x86,0xa6,0xbb,
+ 0x69,0x16,0x81,0x04,0x02,0xd1,0x92,0x35,0xf7,0x22,0x24,0x5d,0x06,0x8d,
+ 0x74,0xaf,0x5d,0x69,0xc6,0xec,0x7e,0x98,0x2f,0x63,0xf3,0x1b,0xc6,0xe6,
+ 0xcb,0xd8,0x7c,0x1f,0x93,0xc9,0x46,0x17,0x2d,0x98,0x04,0x08,0x84,0xd8,
+ 0xe1,0x22,0x10,0x34,0xa8,0x1b,0x04,0xbd,0x43,0x37,0xd5,0x5d,0x5d,0x7b,
+ 0x55,0xee,0x19,0xcb,0x59,0xde,0xf7,0x75,0x9f,0x0f,0x27,0x22,0x33,0xb2,
+ 0x2a,0xab,0x51,0x17,0x42,0x63,0x83,0xdd,0xb0,0xb4,0xb2,0xb4,0x8a,0xc8,
+ 0x88,0x38,0x1e,0xee,0xfe,0xba,0x3f,0xfe,0x3c,0x1e,0xf4,0x5f,0xbf,0x33,
+ 0x8f,0x5f,0xe8,0x4d,0xed,0x2d,0xee,0xa0,0x9b,0xfe,0x87,0x01,0x69,0xff,
+ 0x66,0x7c,0x2f,0x4f,0xdc,0x2b,0x80,0x02,0x00,0x45,0x40,0x40,0x0a,0x08,
+ 0xc0,0x50,0xda,0xfe,0xb0,0x5f,0xe0,0xcd,0xfe,0xc2,0x5f,0x81,0xe2,0x4e,
+ 0x46,0x01,0xf4,0xe6,0x2b,0x1c,0x5b,0x8a,0x64,0x7c,0xaf,0x4c,0x5a,0x1d,
+ 0x00,0x48,0xf0,0xff,0xdd,0xed,0x17,0x6d,0x2c,0x01,0xa5,0x91,0x0b,0xdc,
+ 0x60,0xac,0x6d,0xbe,0x33,0x36,0x1f,0xc9,0xc8,0x40,0xaf,0x67,0x94,0xd6,
+ 0xad,0xf0,0x6f,0xe6,0x50,0xff,0x86,0x9e,0x75,0x4b,0x8f,0x53,0x00,0x50,
+ 0xd9,0xf2,0x20,0xe2,0x09,0x17,0xe3,0x9b,0x4c,0x3c,0x61,0x6b,0xfd,0xe5,
+ 0xf4,0x2c,0xde,0x9e,0xb3,0xe4,0xc6,0xdf,0x69,0xf2,0xba,0xd3,0x38,0x01,
+ 0xf1,0x36,0x8f,0x1b,0x45,0xe1,0x4d,0xfe,0xd8,0x7a,0x22,0x85,0xed,0x4f,
+ 0xfb,0xff,0x6f,0x63,0xf1,0x44,0x2e,0xe7,0xed,0x21,0x26,0x50,0x1a,0xdb,
+ 0x6b,0xec,0x5c,0x3a,0x69,0x56,0xb9,0xf1,0x3c,0xd8,0xca,0x65,0x13,0x31,
+ 0xfb,0x4b,0x17,0x86,0xb7,0x8e,0x1c,0xa5,0x9b,0x62,0x10,0x13,0x16,0xdc,
+ 0x6e,0x0e,0x1a,0x3b,0x9d,0xd2,0xbf,0x7d,0xda,0xfa,0xc5,0x27,0x78,0xf0,
+ 0x2d,0x2c,0xc5,0xdb,0xa3,0x6c,0xbb,0x1f,0xa9,0xec,0x60,0xc1,0x6d,0xd6,
+ 0xe4,0xf1,0xc3,0xf8,0x97,0xc7,0xb3,0x88,0x13,0x11,0x11,0x91,0x08,0x44,
+ 0x44,0x55,0x0d,0x39,0x63,0x0c,0x40,0x31,0xc6,0x94,0x54,0x55,0x0d,0xb7,
+ 0xff,0x03,0x45,0x52,0x55,0x22,0x25,0x1a,0x45,0x9d,0x88,0x88,0x88,0x22,
+ 0x79,0xef,0x9b,0xa6,0x51,0x4d,0xd6,0x5a,0x22,0x8a,0x51,0x88,0x28,0xcb,
+ 0xb2,0x10,0xea,0x5f,0xaa,0x30,0x8c,0x31,0x8a,0x08,0x00,0x66,0xcb,0xcc,
+ 0xa2,0x31,0xd6,0x11,0x00,0x11,0x1b,0xc3,0xd6,0x66,0xcc,0x0c,0x40,0x44,
+ 0x52,0x02,0x33,0x8b,0x8c,0x8c,0x48,0x44,0xc6,0x58,0xef,0x8d,0x31,0xa6,
+ 0xaa,0x2a,0x15,0x6b,0x4c,0xe6,0xac,0x05,0xa0,0x12,0x44,0x24,0x34,0x09,
+ 0xc4,0xbf,0x34,0x09,0x1e,0x79,0xde,0x69,0x9a,0xa6,0x69,0x1a,0x55,0x35,
+ 0xc6,0x18,0x63,0x54,0x35,0xa2,0x89,0x31,0x32,0x01,0x64,0x62,0xaa,0x25,
+ 0x48,0x4a,0x29,0xa5,0xa4,0xaa,0x9d,0xce,0x14,0x48,0x41,0x80,0x92,0x2a,
+ 0x89,0x10,0x94,0x25,0x29,0x93,0x17,0x48,0x0c,0x22,0x49,0x54,0x93,0x88,
+ 0x10,0x2b,0x00,0x36,0xbf,0x44,0x09,0xbe,0x2c,0x07,0x6d,0x64,0x19,0x33,
+ 0x72,0x20,0x40,0x99,0xd9,0xb9,0xd1,0x55,0xaa,0x2a,0x00,0x66,0x6e,0xe3,
+ 0xab,0xae,0x6b,0x66,0x6b,0xd8,0x59,0x67,0x55,0x4c,0x4a,0xda,0x24,0x49,
+ 0x31,0x66,0x59,0xc6,0x64,0x5c,0xe6,0x98,0xa1,0x08,0x29,0x35,0x31,0xa6,
+ 0x24,0x89,0x8d,0xf9,0xa5,0x31,0x96,0x34,0xa1,0x76,0xce,0x38,0x67,0x01,
+ 0x84,0x50,0x85,0x26,0x8a,0x80,0x88,0xb2,0xac,0x20,0x22,0xa8,0x61,0x22,
+ 0x10,0x00,0x56,0x55,0x28,0x2c,0x83,0x99,0x99,0x2d,0xa9,0x05,0x88,0xa0,
+ 0xd0,0x08,0x24,0x80,0x15,0xb1,0xae,0x4b,0xd1,0x9a,0x38,0x38,0x8f,0xac,
+ 0x43,0xcc,0x26,0x34,0x09,0x6a,0x7e,0x49,0x3c,0xab,0x28,0x1c,0xb1,0x42,
+ 0x55,0x44,0x09,0xd6,0xbb,0xdc,0x9a,0xc2,0xda,0xbc,0x2a,0x93,0xaa,0x23,
+ 0x64,0xc6,0x64,0x86,0x33,0x55,0x84,0x26,0x85,0x90,0x54,0x29,0x0a,0x54,
+ 0x89,0xd9,0x5a,0x6b,0xb3,0x2c,0x9b,0x99,0x72,0xce,0xf3,0x60,0xb8,0x62,
+ 0x5c,0x04,0x55,0x21,0xf5,0x44,0x07,0x64,0x1a,0xd1,0xb2,0xaa,0x2a,0xc3,
+ 0xc5,0x2f,0x8b,0x67,0x91,0x2a,0x52,0x68,0x82,0x24,0x32,0xdc,0xc9,0xb3,
+ 0x59,0x67,0x66,0x34,0x75,0x62,0xe3,0x32,0xea,0xae,0xae,0x34,0x57,0x2e,
+ 0xad,0x5e,0xbd,0xbc,0xb4,0xb4,0xd8,0x5b,0xba,0xde,0x5f,0x5c,0xac,0x36,
+ 0xd6,0x11,0x03,0x54,0x40,0x04,0xe7,0x50,0x14,0x98,0x9e,0xc9,0xa7,0xa6,
+ 0x5d,0xde,0xd1,0xd3,0x77,0x1d,0xda,0xb3,0x2f,0xdf,0xbb,0x3f,0x9f,0xdd,
+ 0x55,0xe4,0xdd,0x46,0x69,0xd0,0x1f,0x2c,0xf5,0xfb,0x2b,0xb3,0xb3,0xff,
+ 0x76,0x61,0x48,0x6f,0x1c,0xa2,0x11,0x21,0xb0,0x42,0x08,0xac,0x13,0xb5,
+ 0xd2,0xa8,0x0d,0x9e,0xa8,0x24,0x49,0x01,0x90,0x4a,0x08,0x22,0xb1,0xc8,
+ 0xdd,0x9e,0xdc,0xed,0xab,0x86,0xfe,0xf2,0x85,0xfe,0xb5,0x2b,0x83,0xef,
+ 0x7c,0xeb,0xd9,0xa5,0xeb,0xb8,0x72,0x19,0x83,0xb5,0x31,0x24,0x23,0x63,
+ 0x18,0x46,0x27,0x4a,0xf6,0xb6,0xff,0x31,0x00,0x50,0xcc,0xe0,0xd0,0x11,
+ 0x1c,0x3d,0x81,0xd3,0x77,0xef,0xba,0xeb,0x9e,0xc3,0x07,0x0f,0xcf,0xe7,
+ 0x5d,0xac,0x6d,0x5c,0x01,0xd5,0xa0,0x00,0x0a,0xa0,0x08,0x4a,0xe3,0x7a,
+ 0xd5,0x6e,0x03,0x36,0xb6,0xde,0x1b,0xef,0x54,0x09,0xca,0x2f,0xc2,0x58,
+ 0x22,0x9c,0x94,0x84,0x94,0x15,0x4c,0x6a,0xa0,0xb6,0x4d,0x19,0x06,0x06,
+ 0x24,0xd6,0xa0,0xae,0x07,0x75,0x33,0x9c,0x99,0xed,0x58,0xcb,0xcb,0x4b,
+ 0xbd,0xcc,0x4c,0x4f,0x77,0x0e,0x3b,0xda,0xbf,0x7c,0x8d,0x9f,0xf9,0xc1,
+ 0xb5,0xa7,0xbe,0xfb,0xda,0x8b,0xcf,0xad,0xad,0x2c,0x82,0x68,0x7b,0xad,
+ 0x3a,0xfa,0x9d,0x55,0xcc,0x18,0x5a,0x90,0x6d,0xa5,0x3f,0x4d,0xfc,0x30,
+ 0xe6,0xf7,0xe0,0xfe,0x37,0xe5,0x77,0x3f,0x70,0xe4,0xed,0xef,0x3e,0xdd,
+ 0x99,0xaf,0x95,0x57,0x7b,0xc3,0x4b,0x49,0xd7,0xba,0x53,0x96,0xd9,0x0e,
+ 0x07,0x8d,0x77,0x33,0x31,0x30,0x93,0xb5,0xd6,0x86,0x58,0xd6,0xcd,0xc0,
+ 0x39,0x3b,0x3d,0xdd,0xad,0x06,0xd5,0x76,0x03,0xc8,0xc4,0xc7,0x8c,0xd7,
+ 0xb7,0xda,0x1b,0x33,0x96,0x90,0x80,0x82,0x92,0x8c,0x3a,0x64,0x35,0x80,
+ 0x25,0x31,0x00,0x2c,0xf3,0x60,0xd0,0x2b,0x72,0x57,0x14,0x59,0xaf,0x37,
+ 0x18,0x0e,0x87,0xb3,0x33,0xbb,0x76,0xcd,0x1c,0x9a,0xf2,0xc7,0x5e,0x7c,
+ 0xf6,0xfa,0xb7,0xbf,0xf9,0xc2,0xf7,0xbf,0xb7,0x76,0xe1,0x15,0x54,0x7d,
+ 0x40,0x1c,0xa3,0x48,0x69,0x02,0xc9,0x9b,0x30,0x9b,0xea,0x76,0xe8,0x4a,
+ 0x5b,0xbf,0x62,0x85,0x32,0xd8,0x79,0x22,0x8e,0x4d,0xa8,0x44,0xe1,0x73,
+ 0x4c,0xcd,0xa1,0xbb,0x1b,0xef,0x7a,0xdf,0xc2,0xaf,0xfe,0xfa,0x7d,0x0b,
+ 0x07,0x30,0x6c,0x2e,0x0e,0xab,0xeb,0xcc,0x30,0xc6,0x38,0xdb,0x01,0x6c,
+ 0x8c,0x31,0xa5,0xe4,0x1c,0x65,0x59,0x56,0xd5,0xc3,0x8d,0x8d,0x8d,0xd9,
+ 0xa9,0xe9,0xb1,0x27,0xeb,0x4d,0x7e,0xf7,0xaf,0x6e,0x2c,0xa8,0xf2,0xe8,
+ 0x32,0x48,0x0d,0x46,0x91,0x28,0xa4,0x89,0x19,0x04,0x54,0xa5,0x30,0xba,
+ 0xf3,0xb3,0x47,0x38,0x75,0x17,0xaf,0xc8,0x57,0x3e,0xf7,0xfc,0x2b,0x2f,
+ 0xad,0xfd,0xf8,0x85,0xd8,0xdf,0x00,0x12,0x98,0x60,0xa8,0x10,0x21,0x15,
+ 0x1a,0x75,0xc2,0x94,0x80,0xb8,0xd9,0x6b,0xeb,0x8d,0xee,0x66,0xa0,0x0e,
+ 0xb0,0x80,0x51,0x28,0x00,0xcb,0x44,0x1c,0x42,0x1c,0x8e,0x22,0xd4,0x21,
+ 0x9f,0xc6,0xb1,0x93,0x78,0xe4,0x9d,0xfb,0x1e,0x7d,0xd7,0xc9,0x23,0xc7,
+ 0xa7,0xea,0xb8,0xb4,0xba,0x76,0x99,0x6d,0xc8,0x73,0xc7,0x46,0x9a,0xa6,
+ 0x22,0x72,0xde,0x15,0x29,0x9a,0xe1,0x70,0x98,0x17,0x0c,0x4a,0xdb,0xbd,
+ 0x09,0xbf,0x90,0x30,0x14,0x02,0x20,0x4a,0x9b,0xe9,0x7b,0x13,0x03,0x50,
+ 0x67,0xc8,0xb9,0x2c,0x54,0x5a,0x97,0xae,0xe3,0x8f,0xb2,0xec,0x79,0xfa,
+ 0xa9,0x73,0x5f,0xfb,0xd2,0x73,0x4f,0x7d,0x1b,0xd2,0x00,0x80,0x61,0x58,
+ 0xe3,0x00,0x1b,0x9a,0x24,0x2a,0x4c,0x9b,0x08,0x84,0x4c,0xbe,0x6f,0xd5,
+ 0x9b,0xda,0x6c,0xb5,0x80,0xf1,0xae,0x1b,0x42,0x12,0x00,0x10,0x43,0x30,
+ 0x86,0xd8,0x08,0x18,0xc6,0xbb,0x41,0x7f,0x05,0x06,0xc5,0x3c,0x1e,0x7c,
+ 0xc4,0x3c,0xfc,0xf6,0x13,0xf7,0x3d,0x70,0xe8,0xd0,0xb1,0xe2,0xea,0xe2,
+ 0x8f,0xc1,0x3d,0xe3,0x02,0x51,0x12,0xe1,0x14,0xd9,0x99,0xb9,0x3c,0xcf,
+ 0xcb,0x6a,0x65,0x27,0xf0,0x16,0xbf,0x20,0x63,0x41,0x37,0xcd,0x44,0x02,
+ 0x24,0x46,0x04,0x49,0x6c,0x92,0x44,0x57,0xf8,0x03,0xdd,0xec,0xd8,0xf5,
+ 0x0b,0xf8,0x6f,0x5f,0x7e,0xfe,0xeb,0x5f,0xb9,0xb6,0x78,0x19,0x26,0x39,
+ 0x43,0xd3,0xcc,0x2a,0xda,0xc4,0x54,0x8b,0x8c,0xde,0x28,0xf3,0x04,0xee,
+ 0x4e,0x93,0x49,0xd1,0x8c,0xff,0x33,0x4d,0x98,0xcc,0x40,0x09,0x30,0xcc,
+ 0x99,0xaa,0xaa,0x4e,0x9e,0x02,0x1e,0x4c,0xc6,0x87,0x94,0x36,0xc0,0x98,
+ 0xdb,0x8f,0xf7,0x3f,0xb6,0xef,0xbd,0x1f,0xb8,0x77,0xe1,0x60,0x0a,0x7a,
+ 0x25,0xea,0x92,0xa2,0x22,0x32,0x4c,0x0e,0xd2,0x25,0xa2,0x28,0x03,0x20,
+ 0xbe,0x1e,0xa6,0x74,0xeb,0x9b,0xf9,0xf0,0x1f,0xbd,0x81,0x3a,0x85,0x00,
+ 0x05,0x83,0x0c,0xb5,0xbf,0x52,0x02,0x09,0x51,0x04,0xa8,0x1c,0xa4,0x5d,
+ 0xb3,0x27,0x8c,0x1e,0x7a,0xf1,0x99,0xf5,0x2f,0x7e,0xe6,0xd9,0xaf,0x7e,
+ 0x71,0x65,0x7d,0x19,0x48,0xd0,0x34,0x95,0xc4,0xc5,0x94,0x92,0x44,0xc3,
+ 0x6c,0x1d,0xd8,0xe8,0x38,0xbb,0x4f,0xe2,0x7c,0x04,0x52,0x28,0xab,0xe6,
+ 0x80,0xdb,0x4a,0xe6,0xb4,0x79,0x17,0x88,0xd9,0x5a,0x12,0x49,0xed,0x91,
+ 0x49,0x44,0x04,0x03,0x18,0x28,0x34,0x31,0x60,0x90,0x9a,0xaa,0xc4,0x95,
+ 0xab,0x83,0xe7,0x9f,0x7f,0xf5,0xd8,0xb1,0x85,0xa9,0xe9,0xee,0xec,0xec,
+ 0x54,0x8c,0xb1,0xae,0x4b,0x36,0x44,0x8c,0xaa,0xee,0x1b,0xa3,0xa3,0x76,
+ 0x6a,0xf3,0x67,0xdb,0xe8,0x84,0xfe,0xd5,0x8c,0x05,0xb0,0x82,0x69,0xf4,
+ 0x22,0xca,0x94,0x88,0x02,0x29,0x48,0xb3,0xcc,0xee,0xb7,0x7a,0xe4,0x99,
+ 0x7f,0x5a,0xfb,0xeb,0x8f,0xff,0xf0,0x7b,0xdf,0x6a,0x42,0x09,0x06,0xbc,
+ 0x75,0x86,0x7c,0x92,0x06,0x08,0x40,0x14,0x6d,0x00,0x15,0x51,0x49,0x20,
+ 0x78,0xc0,0x00,0x16,0xea,0xa0,0x6e,0x94,0x9b,0xd4,0x2b,0x32,0xc0,0x8d,
+ 0xeb,0x05,0x86,0xb6,0x8e,0xc6,0x45,0xa7,0xeb,0x9c,0x13,0x49,0x29,0x05,
+ 0x40,0x8c,0x65,0xeb,0x98,0x38,0x89,0x36,0x40,0x03,0x24,0x30,0x03,0x04,
+ 0x49,0x55,0x1f,0x4b,0xd7,0xb0,0xbc,0x74,0xd9,0xb2,0xdb,0xb3,0x7b,0xc1,
+ 0x5a,0xd3,0x34,0x43,0x91,0x9a,0xa8,0x02,0x6a,0x36,0x34,0x4e,0x87,0xe3,
+ 0x19,0xd2,0x36,0x93,0xd1,0x76,0x2f,0xdb,0x76,0x0e,0xdc,0x46,0x51,0x4a,
+ 0x5b,0x33,0x18,0xc8,0xe8,0x4c,0x4c,0xb3,0xb9,0x3d,0xf6,0x8f,0x5f,0x3f,
+ 0xf7,0xc9,0x8f,0x9f,0xbb,0xf4,0x2a,0x10,0xe1,0x9d,0x6d,0x42,0xac,0x63,
+ 0xb0,0xa6,0x76,0xb6,0x7d,0x55,0x27,0xc2,0x29,0xa5,0xd1,0xe1,0x3f,0x09,
+ 0x37,0x4f,0xce,0x29,0x34,0xed,0x74,0x48,0x51,0x55,0xd5,0x44,0x24,0x29,
+ 0x02,0x20,0x66,0xe7,0x5c,0x8c,0x4d,0x8c,0x35,0x0c,0x46,0x87,0x4c,0x8a,
+ 0xa3,0x84,0x0f,0x41,0x4c,0x3f,0xfc,0x2e,0xaa,0xf2,0xd5,0xcc,0x4f,0xdf,
+ 0xff,0xe0,0xae,0xe9,0x69,0x6a,0xe4,0x4a,0xd4,0x25,0x90,0x8c,0x47,0x47,
+ 0xb7,0x83,0x82,0xbd,0x51,0xcf,0x22,0xcb,0x8e,0x41,0x31,0x0e,0xac,0x55,
+ 0x89,0xa9,0x1a,0x6a,0x66,0x0f,0x78,0x3a,0xfe,0xd5,0xcf,0xbd,0xfc,0xf7,
+ 0x9f,0xbc,0x70,0xf1,0x2c,0x28,0x81,0xd4,0x49,0xa2,0xcc,0x03,0xaa,0x3e,
+ 0x73,0x75,0x53,0x8b,0x28,0xc4,0x5a,0xee,0x26,0xb5,0x40,0x4e,0x70,0xa3,
+ 0xf9,0x0c,0x27,0xe2,0xa8,0xa8,0x15,0x49,0x91,0x94,0x12,0xfb,0xa8,0x26,
+ 0x82,0x23,0x38,0x82,0x12,0x38,0xb1,0xb5,0xc6,0x39,0x6b,0xb3,0xd8,0x84,
+ 0x51,0xd8,0x2a,0xc5,0x98,0x44,0xd5,0xe5,0x99,0xa6,0x00,0x55,0x68,0x7b,
+ 0x4a,0x10,0xb1,0x81,0x38,0x08,0x20,0xb2,0xba,0x84,0x17,0x9e,0xbb,0xd6,
+ 0xc9,0xe5,0xbe,0xfb,0xee,0x04,0xca,0x7e,0x7f,0x69,0x7a,0x36,0x93,0x64,
+ 0x63,0x54,0xc3,0x96,0x89,0x01,0x6a,0xea,0x66,0x30,0x18,0xe6,0x79,0xb1,
+ 0x53,0x18,0xea,0x0d,0xb0,0xe5,0x1b,0x36,0x16,0xc1,0xf6,0xfb,0xbd,0xac,
+ 0x30,0x59,0xe6,0xab,0x61,0xdc,0x35,0x7b,0xc2,0xc8,0xa1,0x6f,0x7f,0xe3,
+ 0xfc,0xdf,0x7f,0xf2,0xb5,0xf3,0x67,0x81,0x88,0xcc,0xcf,0x10,0x19,0x55,
+ 0x21,0x92,0x94,0x54,0x01,0x82,0x55,0x25,0x85,0x49,0xca,0x96,0x9c,0xb3,
+ 0x86,0x59,0x80,0x4a,0x69,0x28,0x14,0xc1,0x62,0x32,0xd8,0x0c,0x36,0x87,
+ 0xc9,0x31,0xb3,0x80,0xa9,0x79,0x4c,0xcf,0x63,0x6a,0x0e,0xae,0x80,0x00,
+ 0x31,0x24,0x91,0x90,0x52,0x05,0x4a,0xe4,0x92,0xcf,0x3c,0xc8,0x68,0x12,
+ 0xc0,0x89,0xc2,0x32,0x5b,0xc7,0xd6,0x59,0x22,0x26,0x62,0x66,0x4b,0xe4,
+ 0x54,0x0d,0xe0,0x0c,0xa3,0xa9,0xa5,0xd7,0x5f,0x07,0x97,0x07,0x0f,0x2d,
+ 0xec,0xde,0xd3,0x59,0x5a,0x5e,0xca,0x7c,0x17,0x30,0x44,0x9c,0x92,0x10,
+ 0x71,0x9e,0x17,0xde,0x67,0xde,0x67,0x29,0xc9,0xeb,0x27,0xac,0xdb,0x09,
+ 0x43,0x06,0x75,0xf2,0xc2,0x50,0x48,0x41,0x73,0xbf,0x3b,0xd5,0xf3,0xcf,
+ 0x3d,0xb5,0xf2,0xe9,0xbf,0x38,0x7b,0xf1,0xa7,0x40,0x62,0x86,0x97,0x98,
+ 0xa2,0x94,0x80,0xc4,0xd8,0x22,0x7f,0xb0,0xc6,0x7a,0xeb,0x63,0x4c,0x82,
+ 0x18,0xb5,0x8e,0xb1,0x06,0x45,0x18,0xf8,0x02,0x33,0x73,0x58,0xd8,0x87,
+ 0xc3,0x47,0x71,0xfc,0xc4,0xa1,0xa3,0xc7,0x0e,0xce,0xef,0xe9,0xfa,0xae,
+ 0xb2,0x25,0x26,0x1f,0x83,0xf6,0x7b,0xcd,0xca,0x72,0x6f,0x79,0xa9,0xdf,
+ 0xdf,0x48,0xdf,0x7b,0xe2,0xec,0xf5,0xab,0x58,0x5f,0x44,0x13,0x4a,0x08,
+ 0xc8,0x4f,0x69,0xf2,0x10,0x13,0x53,0x6d,0x84,0x88,0x52,0x8c,0x15,0x90,
+ 0x8c,0x65,0xa2,0x44,0x44,0xaa,0x04,0xc9,0x42,0x15,0x7e,0xf2,0x1c,0x9a,
+ 0x78,0x71,0x6a,0x3a,0x7b,0xc7,0x7b,0x8e,0x76,0x7c,0x64,0x24,0x67,0x23,
+ 0x11,0x52,0xac,0x25,0x01,0xd6,0x12,0x69,0x5d,0x87,0xed,0x4d,0x8f,0xec,
+ 0x78,0x3e,0xbe,0x61,0x63,0x95,0x55,0x7f,0x76,0x66,0xae,0xd7,0x5f,0x83,
+ 0xf8,0xb9,0xa9,0xa3,0xcf,0xfc,0x60,0xf5,0x53,0x9f,0x78,0xe1,0xe2,0x2b,
+ 0x20,0x31,0xde,0xcd,0x49,0x6a,0xa2,0x54,0x13,0x2f,0xc6,0xce,0xe6,0x31,
+ 0x4a,0x42,0x69,0x0c,0x24,0x55,0x6d,0x18,0xe5,0x5d,0x1c,0x3b,0x89,0xd3,
+ 0x77,0x77,0x1e,0x7e,0xf4,0xf4,0x5d,0xf7,0x1c,0x9e,0x9d,0xf7,0x31,0x0d,
+ 0x86,0xe5,0x7a,0x1d,0x57,0xd4,0x34,0x64,0x60,0x8c,0x33,0xec,0xe6,0xf7,
+ 0xbb,0xc3,0xa7,0x32,0x49,0x1d,0x4d,0xf9,0x23,0xef,0xda,0xbf,0xb2,0x18,
+ 0xcf,0xbe,0xb4,0xfc,0xa3,0x1f,0x9c,0x7f,0xfe,0xe9,0x26,0x0d,0xfb,0x50,
+ 0x9e,0x99,0x3d,0xb8,0xb1,0x56,0x43,0x8d,0xa8,0xb6,0x0d,0xa4,0x48,0x24,
+ 0x6a,0x21,0x32,0xab,0xca,0x86,0x7d,0x4a,0xcd,0xab,0x2f,0xe3,0x0b,0x9f,
+ 0x3d,0x9b,0x65,0xd9,0xbb,0x7e,0xf5,0xcd,0x57,0x57,0x9f,0x17,0xea,0x13,
+ 0x11,0xb3,0x03,0x10,0x82,0xa4,0x24,0xaa,0x62,0xad,0x05,0xfd,0x8c,0xea,
+ 0xf4,0x8d,0x1a,0x4b,0x9a,0x66,0xb8,0xd1,0x23,0x43,0xd3,0xb9,0x3f,0x70,
+ 0xfd,0x02,0x7d,0xeb,0x2b,0x2f,0xbd,0xf0,0x23,0x20,0x02,0xea,0x44,0x52,
+ 0x94,0x0a,0x08,0x9d,0xcc,0x02,0x68,0x1a,0x21,0x93,0x35,0x31,0x39,0x4b,
+ 0xc6,0xc5,0xaa,0x89,0xf0,0x70,0x39,0x1e,0x7a,0x1b,0x1e,0x78,0xf0,0xe0,
+ 0xdb,0xdf,0x75,0xaf,0x2f,0x2a,0x97,0x35,0x31,0xbd,0x72,0x65,0x79,0x3d,
+ 0x49,0xe5,0x3c,0x65,0x1d,0x47,0xd6,0x44,0x09,0x4d,0x08,0xb1,0x69,0x44,
+ 0x84,0x88,0x08,0x8e,0x29,0x3b,0x74,0x6a,0xff,0xd1,0x53,0xb3,0x77,0xbf,
+ 0xe9,0xce,0x07,0x1f,0x39,0xfa,0xfc,0xd3,0x8b,0x3f,0xfa,0xfe,0x6b,0x3f,
+ 0x7e,0x61,0x63,0x63,0xf1,0x22,0xc0,0x84,0xae,0x77,0x0e,0xc4,0x21,0x54,
+ 0x31,0x35,0x0a,0x21,0x18,0x45,0x43,0xb0,0x44,0x64,0x2d,0x04,0x78,0xfa,
+ 0x49,0x4c,0xe5,0x3f,0x3d,0x71,0xec,0x2e,0x37,0x3b,0x17,0xa5,0xac,0xeb,
+ 0xda,0x79,0x9b,0xe7,0x5e,0x44,0xc8,0x18,0xe7,0x4d,0xd3,0x94,0x3b,0xcd,
+ 0x80,0xe9,0xe7,0xc9,0x59,0xd2,0xe9,0xb8,0x5e,0xaf,0x5a,0xd8,0x75,0x5a,
+ 0xc3,0xc2,0xe7,0x3f,0xfd,0xa3,0xaf,0x7d,0x69,0x10,0x4b,0x64,0xce,0xa5,
+ 0x04,0x45,0x1c,0x99,0xcd,0x72,0x8c,0x31,0x89,0x32,0x3b,0x08,0x94,0x62,
+ 0x48,0xd1,0x64,0x38,0x76,0x0a,0x1f,0xf8,0xad,0xce,0x07,0x1f,0xbf,0xe7,
+ 0xad,0x8f,0x1e,0x0c,0x7a,0x51,0xcd,0x52,0xc2,0xaa,0x52,0x8f,0x6d,0x63,
+ 0x5d,0x60,0x9b,0x94,0x9a,0x26,0x96,0x49,0x1b,0x45,0xc3,0x2c,0xd6,0xb5,
+ 0x3f,0xc9,0xd8,0x54,0xd5,0xeb,0xfd,0xe1,0x72,0x4c,0x83,0x85,0xbd,0xd3,
+ 0xf7,0xdc,0x77,0xfc,0xf8,0xc9,0x05,0xa5,0xe5,0xe5,0x95,0x6a,0xd8,0x57,
+ 0x91,0x26,0xc6,0xd2,0x18,0x22,0x70,0x12,0x01,0x34,0xcb,0x7c,0x4a,0xc1,
+ 0x58,0x0e,0x21,0xa4,0xa8,0x79,0x4e,0xa1,0xc1,0xda,0x4a,0x8a,0xa9,0x7f,
+ 0xdf,0x5b,0x0e,0xe4,0x5d,0x84,0x10,0x53,0x4c,0xce,0xf9,0x76,0x38,0x60,
+ 0xad,0x4d,0x29,0x8c,0xcb,0xba,0x84,0x1b,0x0b,0x09,0xba,0x2d,0x63,0x91,
+ 0xe4,0x39,0x1b,0xee,0x64,0x7a,0xe8,0x07,0x4f,0x5c,0xf9,0xf4,0x27,0xce,
+ 0xad,0x2f,0x81,0x81,0x18,0x25,0xf3,0x42,0x14,0x45,0x14,0x80,0x26,0x4e,
+ 0xda,0x22,0xc6,0x32,0x33,0x33,0x37,0xac,0x7b,0x2e,0xc7,0xdb,0xde,0x99,
+ 0xff,0xde,0xef,0xdf,0xf7,0x6b,0x1f,0xb8,0x73,0xd7,0xbe,0xaa,0x5f,0x9f,
+ 0x75,0xf9,0x80,0x5d,0xcd,0x9c,0x8c,0x61,0x63,0x2c,0x93,0x57,0xe1,0x94,
+ 0x10,0x55,0x94,0x98,0x4d,0x6e,0x6c,0x46,0x54,0x80,0x9c,0x88,0x4d,0x02,
+ 0xb0,0xb1,0xce,0x28,0xd7,0x65,0xbd,0x56,0xc5,0xa5,0xce,0x4c,0xbc,0xf3,
+ 0xde,0xdd,0xbf,0xf2,0x9e,0x33,0x2b,0x4b,0x57,0x86,0xfd,0x54,0x56,0x48,
+ 0x31,0xb6,0x33,0x24,0x80,0x5a,0x63,0xa9,0xc6,0x36,0x20,0x09,0xde,0x30,
+ 0x95,0x03,0xb9,0xb6,0xb8,0x71,0xec,0x4e,0xd9,0x7b,0xb0,0xc8,0xb3,0xbc,
+ 0xae,0x1a,0x10,0x89,0xa8,0x48,0xda,0x3a,0xfb,0x46,0xe4,0x1c,0x8c,0x43,
+ 0x72,0xab,0x72,0x9d,0x34,0x96,0x6c,0x27,0xfa,0xd0,0x4d,0xc3,0xbe,0xf6,
+ 0x6c,0x96,0x7e,0xbf,0xbf,0x30,0x7b,0xea,0xea,0x85,0xfc,0x93,0x7f,0xf9,
+ 0xe4,0x4b,0xcf,0xc1,0x10,0x9c,0xe1,0x16,0x42,0x48,0xa3,0x78,0x67,0x63,
+ 0x32,0x66,0x4b,0xaa,0xc6,0x4b,0xbf,0x1a,0xf8,0x29,0xbc,0xf7,0x83,0x0b,
+ 0x1f,0xfd,0xc3,0x77,0x9f,0xb9,0x7f,0x66,0xa5,0xf7,0xe3,0xa5,0xb5,0xb3,
+ 0x79,0x37,0x55,0xa1,0x97,0xb4,0x51,0x90,0xa8,0xa6,0xa4,0x49,0x14,0x30,
+ 0x30,0x04,0x12,0x30,0x08,0x4e,0x95,0x55,0x49,0x92,0x4a,0x12,0x51,0x09,
+ 0x21,0x18,0xc3,0xc6,0x20,0x49,0x9d,0x64,0x68,0x5c,0xe9,0xf3,0xa6,0x28,
+ 0xcc,0x3d,0xf7,0xdc,0x3b,0x1c,0xae,0xbd,0x76,0xbe,0x4c,0x11,0xc6,0x90,
+ 0xa4,0x16,0x8c,0x26,0x9f,0xd9,0x26,0x04,0xe7,0x0c,0xb3,0x09,0x41,0x09,
+ 0x4e,0xc5,0x96,0x65,0xac,0x64,0xfd,0x8e,0x3b,0x16,0x76,0xef,0x9a,0xab,
+ 0x9b,0x1e,0x50,0x93,0x89,0xce,0xb2,0x75,0x24,0x12,0xc6,0xe5,0xde,0xd8,
+ 0x3a,0x44,0x13,0xd8,0xd0,0x96,0xb1,0x64,0xd4,0x01,0xa0,0xed,0xf2,0x19,
+ 0x20,0x85,0x7a,0xef,0xb2,0xcc,0xd5,0x75,0xa5,0x2a,0x3e,0x33,0x31,0x95,
+ 0xce,0x78,0x8a,0x9d,0x7d,0x73,0x6f,0xfe,0xcb,0x3f,0x7d,0xf2,0x6b,0x9f,
+ 0xaf,0x1c,0x5c,0x0a,0x39,0x33,0x2b,0xa2,0x8c,0x6d,0x9b,0x67,0xdd,0x26,
+ 0x24,0x66,0x37,0x35,0x3d,0xd3,0xaf,0xfa,0x76,0x0e,0x1f,0xfb,0xa3,0xfd,
+ 0xff,0xee,0xf7,0xde,0x3a,0xb5,0xab,0x3f,0x68,0xce,0xdb,0xbc,0xce,0x0a,
+ 0x47,0x4c,0x6c,0x32,0x66,0x0f,0x32,0x20,0x02,0x11,0xb1,0x01,0x19,0x90,
+ 0x8a,0x69,0xd8,0xa8,0x77,0x5d,0x66,0x13,0x42,0x65,0x1d,0x39,0xaf,0x31,
+ 0x35,0x45,0x5e,0x54,0x65,0x70,0xb6,0x20,0x38,0x90,0xaa,0xa6,0xa6,0x19,
+ 0x4e,0xcd,0x78,0xe2,0xf2,0xa1,0x47,0xdf,0x94,0xe5,0xd5,0xb3,0xcf,0xad,
+ 0xa7,0x5a,0xf2,0xce,0x4c,0x4c,0x9c,0x52,0x8a,0x29,0x10,0x8b,0xa8,0x2a,
+ 0x84,0x89,0x55,0x89,0x60,0x89,0xc2,0xc5,0xd7,0x50,0xe4,0xe1,0xe1,0x47,
+ 0xee,0xaa,0x9b,0xeb,0x8a,0x35,0xe3,0x03,0x24,0xb0,0x21,0xd5,0x9a,0x36,
+ 0x3d,0x46,0x1d,0x60,0x85,0xda,0xba,0x87,0x6f,0xc8,0x59,0x3a,0x11,0x9c,
+ 0x6d,0x75,0x4b,0x44,0x0a,0x68,0x4a,0x31,0xa5,0xe4,0x33,0xc7,0x4c,0x75,
+ 0x3d,0x54,0xb1,0xd3,0xd9,0xb1,0xd7,0x5e,0x0e,0x5f,0xff,0xc2,0xd9,0x2b,
+ 0x17,0xd4,0xd1,0x4c,0x14,0x4a,0xa9,0x66,0x56,0x55,0x58,0x0b,0x55,0x13,
+ 0xa3,0x00,0x2a,0x5a,0x57,0x75,0xbf,0x98,0xc5,0x47,0xff,0xd3,0xbe,0x87,
+ 0xde,0xb9,0x77,0xe1,0x20,0xd5,0x69,0xb1,0x4e,0x4b,0x51,0xca,0x98,0x62,
+ 0x4c,0xc9,0x18,0xbf,0xe5,0xbf,0xd4,0xfa,0x3f,0x83,0xc4,0x38,0xa9,0xaa,
+ 0x61,0x08,0xed,0x15,0x6a,0x39,0x6c,0x52,0xe4,0x22,0xdb,0x63,0x69,0xcf,
+ 0x6b,0xaf,0xae,0x4f,0x77,0x0e,0xce,0xcf,0xed,0xed,0xf5,0x7a,0x3e,0x33,
+ 0x45,0xc7,0xaf,0xac,0x5e,0x23,0xdb,0x44,0x29,0xf7,0xee,0x39,0xd8,0xed,
+ 0xf0,0xd9,0x57,0xd6,0xaa,0x7e,0x69,0xac,0xd5,0x94,0x88,0x5a,0x16,0x45,
+ 0x1b,0x86,0x9b,0x4d,0x28,0xa9,0xa4,0xa9,0x2e,0x1f,0x3d,0x3e,0x3b,0xb7,
+ 0x8b,0x9b,0xb4,0x4a,0x54,0x77,0x8a,0x6e,0x68,0xaa,0x09,0x0b,0x18,0xc0,
+ 0x62,0xd4,0x8e,0x0a,0x4d,0x14,0x5f,0xe6,0xc3,0x7f,0xd4,0x9d,0xe0,0x16,
+ 0xd0,0x38,0x06,0x89,0x18,0xaa,0x12,0x42,0xa3,0xaa,0x79,0x96,0x03,0xa8,
+ 0xab,0x8a,0x64,0x6a,0x26,0xbf,0xeb,0x0b,0x7f,0xfb,0xa3,0x6f,0x7f,0xa3,
+ 0x0c,0x15,0xbc,0xf3,0x31,0x06,0x20,0x1a,0x43,0x80,0x12,0x59,0xc3,0x99,
+ 0x48,0x02,0x45,0x18,0x35,0x19,0xde,0xf7,0xd8,0xbe,0xc7,0x7f,0xe7,0x4d,
+ 0x7b,0x0e,0x42,0xa8,0x57,0x56,0xcb,0xe0,0xca,0x79,0x32,0x86,0x8d,0xe1,
+ 0xad,0x86,0x66,0xd3,0xcd,0x89,0x00,0x58,0xc3,0x4c,0xdc,0xed,0x14,0x86,
+ 0xb8,0x2e,0x43,0x66,0xe6,0xa6,0xb2,0xe3,0x71,0xb0,0xf7,0xcb,0x9f,0x7d,
+ 0xf1,0x8b,0x9f,0xed,0x0d,0xd6,0x37,0x8e,0x1c,0xbc,0xa3,0xc8,0xf3,0x72,
+ 0x38,0x08,0xcd,0x30,0xcf,0x8c,0xa0,0x51,0x95,0x23,0x87,0x8e,0x1f,0x3c,
+ 0x78,0x64,0x6d,0x6d,0xf9,0x95,0x73,0x03,0x0d,0x81,0x2c,0x8d,0x09,0x39,
+ 0x04,0x30,0xb5,0xe4,0x14,0x6a,0x11,0xa0,0x54,0x56,0xa1,0x3b,0x3d,0xbc,
+ 0xe7,0xbe,0x13,0x09,0x43,0x55,0xe9,0x4e,0x75,0x07,0x83,0x21,0x1b,0x86,
+ 0x1a,0x10,0x8d,0xed,0x25,0x4a,0x0a,0xda,0x56,0xa7,0x9a,0x0f,0xff,0x51,
+ 0x67,0x9c,0xd8,0xb6,0x19,0x4b,0x45,0x89,0x48,0x24,0x32,0xb3,0x73,0x2e,
+ 0xc5,0xa4,0x6a,0x0b,0x7f,0x60,0xfd,0xfa,0xcc,0x27,0xff,0xe2,0xf9,0x2b,
+ 0x17,0x61,0x08,0x44,0x9c,0x52,0x00,0x12,0x33,0x11,0xb2,0x98,0xd4,0x50,
+ 0x66,0x5d,0x4a,0x48,0xe4,0xf0,0xc8,0x3b,0xdc,0x47,0xfe,0x87,0x47,0x67,
+ 0xf6,0x0c,0xea,0x74,0xad,0xac,0x97,0x41,0x95,0xf3,0xb0,0x96,0xd8,0x58,
+ 0x66,0xd3,0x1e,0x05,0xe3,0x84,0x3a,0xf6,0x2c,0x28,0x1b,0x02,0x34,0xcb,
+ 0xf2,0xd0,0x48,0x6c,0xfc,0xde,0xdd,0x77,0xd7,0xfd,0x85,0x6f,0x7e,0xf5,
+ 0x95,0xbf,0xf9,0x8b,0xcb,0x57,0x5e,0xc5,0xa5,0x8b,0x31,0xf3,0x7a,0xe6,
+ 0xcc,0xe9,0xf9,0x5d,0xd3,0x83,0xc1,0xfa,0xf4,0x4c,0xa7,0x49,0xfd,0x2c,
+ 0xb3,0xc3,0xc1,0x30,0xcf,0xf3,0x23,0x87,0x8f,0xac,0xac,0x5c,0xbc,0x74,
+ 0x3e,0x7a,0x2f,0x12,0x75,0xd4,0x8a,0x83,0xb7,0xb5,0x30,0x9a,0xaa,0x1a,
+ 0x4d,0x2c,0xdf,0xfc,0xe0,0xf1,0x99,0xb9,0x4c,0xb4,0x26,0xd2,0x98,0x1a,
+ 0x22,0x03,0x30,0x88,0x36,0x91,0x7b,0x25,0x05,0xe9,0x4e,0xc6,0xc2,0x64,
+ 0xe7,0xcd,0x00,0x89,0x24,0x6b,0x0d,0x91,0x32,0xb3,0x88,0x88,0xb0,0x77,
+ 0x53,0xb9,0x39,0xfc,0xe4,0x37,0x57,0xbf,0xf1,0xe5,0xab,0xa1,0x42,0xe6,
+ 0x6d,0x68,0x1a,0x63,0x20,0xaa,0x44,0x50,0x71,0x0a,0xab,0x0a,0x36,0x95,
+ 0x30,0x4e,0x9e,0xc6,0xef,0x7c,0xec,0xfe,0xd3,0xf7,0x4d,0x57,0x72,0xa9,
+ 0x8e,0x4b,0xa0,0xda,0x79,0x02,0x24,0x84,0x90,0x22,0x44,0x98,0x88,0xc7,
+ 0x36,0x1a,0xdb,0x0b,0x0c,0x12,0x66,0x19,0x0c,0xfa,0xc3,0x41,0xb0,0x3c,
+ 0x37,0xdb,0x3d,0xbe,0xb1,0x3c,0xf5,0xf5,0x2f,0xbc,0xf2,0xc9,0xbf,0x7c,
+ 0xb1,0x77,0x0d,0x10,0xae,0x06,0x7a,0xf6,0xec,0x9a,0x73,0xd5,0x99,0xbb,
+ 0x4e,0x3a,0x4f,0xd7,0x17,0x2f,0x1a,0x9f,0x9c,0xc7,0xca,0xca,0xb5,0x24,
+ 0xe5,0xc9,0x93,0xc7,0xbc,0x77,0x67,0x7f,0x7a,0x75,0x6d,0x09,0xa4,0x0a,
+ 0x6d,0x81,0x0d,0xa6,0x49,0xd8,0x1a,0xcc,0x2c,0xeb,0x1b,0x38,0x75,0x6a,
+ 0xe6,0xf8,0xa9,0xfd,0x40,0xd5,0x1f,0x2e,0x67,0x99,0x95,0x2d,0x6a,0xd8,
+ 0x28,0x39,0x28,0xb5,0x16,0xd1,0x9f,0x8d,0x75,0xa9,0x82,0x88,0xac,0xb5,
+ 0xc4,0x08,0x21,0x11,0xac,0x33,0x33,0xd5,0xc0,0x3f,0xf9,0xc4,0x2b,0x55,
+ 0x1f,0x86,0x00,0xb5,0xa2,0x20,0x16,0x63,0xa0,0x4a,0xa2,0xc6,0xc0,0x2b,
+ 0x52,0x88,0xea,0x0b,0x3c,0xfa,0xae,0xa9,0x37,0x3f,0xbc,0x77,0xa3,0x7c,
+ 0x99,0x6d,0x8f,0x4c,0x63,0x9d,0x1a,0xab,0x31,0xc6,0x18,0x41,0xe4,0x0c,
+ 0xbb,0x89,0xd6,0x7f,0x8c,0x94,0x92,0x02,0x12,0x53,0xcd,0x6c,0x9d,0x99,
+ 0x9b,0xed,0x1e,0x6f,0x06,0x0b,0x5f,0xf8,0xec,0x33,0x9f,0xf8,0xf3,0xe7,
+ 0xd6,0xaf,0x01,0x32,0x87,0x38,0x67,0x79,0xbe,0xbf,0x84,0xbf,0xfa,0xf8,
+ 0xb9,0xcf,0x7d,0xfa,0xc9,0xaa,0x3f,0xb3,0x7b,0xee,0x4e,0x8d,0xdd,0xba,
+ 0x4e,0xdd,0x29,0x4b,0x76,0x7d,0xa3,0x7c,0xf9,0xbe,0x37,0xef,0x7e,0xef,
+ 0x07,0x0e,0x8d,0x5c,0x8a,0xb6,0x03,0x18,0x23,0x0c,0x83,0xbd,0xf5,0x4d,
+ 0x89,0x7f,0x7e,0xea,0x5c,0x6f,0x8d,0x9c,0x9d,0xa9,0xca,0x68,0x2d,0xdf,
+ 0xc8,0x20,0x1b,0x3f,0x78,0xd2,0x44,0xbc,0x0d,0xc0,0x6d,0x83,0x82,0x04,
+ 0x80,0x31,0x06,0xda,0xfa,0x94,0x88,0xc0,0x9a,0x8e,0xa6,0xfc,0xf2,0x85,
+ 0xfe,0x0b,0xcf,0xae,0x43,0x9c,0xe5,0x6e,0x8c,0x02,0x40,0x04,0xaa,0x50,
+ 0x25,0x80,0x9d,0x73,0x40,0x00,0xe3,0x2d,0x0f,0xe1,0x6d,0xef,0xbc,0xc3,
+ 0x64,0x2b,0x65,0x73,0x89,0x4c,0xdd,0x22,0x93,0x2a,0xa4,0x4a,0xd6,0x64,
+ 0x79,0xd6,0xb5,0x36,0x1b,0x1f,0xbb,0x37,0xa2,0x31,0x9a,0xa4,0xf0,0xd3,
+ 0xb3,0x9d,0xe3,0x2b,0x57,0xf2,0xaf,0xfc,0xdd,0x4f,0xbe,0xf8,0xb7,0x17,
+ 0x86,0xcb,0x30,0xa6,0x93,0x65,0x1d,0x00,0x96,0x7d,0x51,0x74,0x9a,0x0d,
+ 0x7c,0xf1,0xb3,0x17,0xbe,0xfd,0xf5,0xb3,0x0e,0x47,0x72,0x7b,0x54,0xc2,
+ 0x54,0x51,0x74,0x7d,0xa6,0x1b,0x83,0xf3,0xc5,0x4c,0xff,0xc1,0x47,0x8e,
+ 0xde,0xf7,0x60,0x6b,0xac,0xe6,0x26,0x7a,0x57,0xfb,0x9e,0x19,0x82,0x17,
+ 0x9e,0xdd,0xb8,0x74,0x61,0x83,0x51,0x58,0x6b,0x45,0xd2,0x4d,0xac,0x26,
+ 0xb9,0x19,0x0b,0xe4,0x1d,0xa8,0x52,0x2d,0x8e,0x6b,0x9c,0x88,0xb4,0x64,
+ 0x0d,0x82,0xb1,0xa6,0x48,0x21,0xbf,0x76,0x65,0xb8,0xb6,0x0c,0x46,0xa1,
+ 0xca,0x31,0x0a,0x14,0x29,0x41,0x12,0x54,0x99,0x60,0x14,0x11,0x14,0x3b,
+ 0xd3,0x78,0xeb,0x23,0x87,0x8f,0x9f,0x9a,0x5b,0xef,0x9f,0xef,0x4e,0x83,
+ 0x8d,0x30,0x33,0x33,0x8f,0x86,0xf5,0x6c,0x45,0x50,0x95,0xcd,0x66,0xe1,
+ 0x06,0x4a,0x5b,0x35,0x9d,0x3a,0x43,0xd3,0xa1,0x9a,0x1e,0xac,0x4d,0x7d,
+ 0xff,0xbb,0x97,0x3f,0xf5,0x89,0x17,0xd7,0xae,0xc1,0xb9,0x3c,0xd5,0xa9,
+ 0x6e,0xfa,0x40,0x53,0x0d,0xfb,0x65,0xaf,0x82,0xe0,0xca,0x39,0xfc,0xe5,
+ 0x9f,0xbd,0xf2,0xd9,0xbf,0xfe,0xc1,0x4c,0x76,0x87,0xe3,0x7d,0x75,0x69,
+ 0x62,0x8c,0xd6,0x85,0x28,0x2b,0x73,0xbb,0xf1,0xfe,0x0f,0x3e,0x30,0xce,
+ 0xbd,0x61,0x62,0x7a,0x24,0xe3,0x8e,0x2d,0x42,0x70,0xed,0x0a,0xae,0x5d,
+ 0xd9,0x80,0x66,0x59,0x96,0xc5,0xd4,0xdc,0xc4,0x23,0xdc,0x01,0x84,0xe0,
+ 0xf1,0xc7,0x3b,0xb6,0xd7,0xb8,0x84,0x65,0xe6,0x18,0x53,0x4c,0xa1,0xa5,
+ 0x6c,0x94,0xc3,0xc8,0x98,0xf9,0xc7,0x6f,0x3e,0x43,0x84,0x94,0x34,0x06,
+ 0x61,0x32,0xcc,0xcc,0xc4,0x4c,0x9e,0xe1,0x15,0xa9,0x09,0x7d,0x30,0x8e,
+ 0x1c,0xc7,0xdb,0xde,0x71,0x77,0x6f,0x70,0xd9,0x79,0x89,0xa9,0x0e,0x21,
+ 0x18,0xe3,0x54,0x29,0x25,0x75,0x2e,0x23,0xa2,0x18,0xa3,0xb1,0x4a,0x2c,
+ 0xa2,0xb5,0x75,0xea,0xb3,0x51,0xbb,0x6f,0x8d,0x23,0xed,0x58,0x1c,0xf2,
+ 0xe9,0xe4,0x3f,0x7c,0xe9,0xa5,0x3f,0xff,0x93,0x67,0xd7,0xaf,0x81,0x35,
+ 0x8b,0x15,0x11,0x03,0xd2,0xb7,0xbe,0x06,0x4a,0x40,0x10,0xc1,0x82,0xfe,
+ 0x22,0x3e,0xfe,0x27,0x17,0x3e,0xf9,0x57,0xdf,0xe5,0x74,0x60,0xd7,0xec,
+ 0xc9,0xba,0x62,0x55,0x2d,0xeb,0x35,0xc1,0xda,0x83,0x0f,0x9f,0x3c,0x7d,
+ 0x37,0x94,0xc0,0x36,0xaa,0x06,0x66,0x56,0x55,0x11,0x51,0x4d,0x44,0x02,
+ 0x48,0x96,0x15,0xde,0xe1,0xdb,0xdf,0x7a,0x5a,0xd2,0x28,0x15,0x88,0x24,
+ 0x91,0xa8,0x9a,0x54,0x47,0x56,0x1b,0xc3,0xd6,0x37,0x34,0xd2,0x37,0xce,
+ 0x85,0x46,0xa4,0x2a,0x22,0x6a,0x67,0x30,0x44,0xac,0x6a,0x57,0x97,0x9b,
+ 0xa5,0xeb,0x93,0xfe,0x3c,0xe6,0x57,0xb7,0xa0,0x30,0x44,0xd1,0xb8,0x1c,
+ 0xa7,0xef,0xee,0x66,0x45,0x93,0x4c,0xa5,0x10,0x66,0xbb,0xd3,0xf8,0x37,
+ 0x81,0x24,0xa5,0x46,0x11,0xea,0xa6,0x56,0x85,0x24,0x22,0x58,0x65,0x36,
+ 0x3a,0x6f,0xe5,0xf8,0xdf,0xff,0xfd,0x0f,0x3f,0xff,0x99,0x8b,0x6b,0x8b,
+ 0x60,0x38,0x46,0x47,0x59,0x8c,0x4d,0xa2,0x31,0x49,0x60,0x0b,0xe7,0x72,
+ 0xa8,0xad,0xab,0x0a,0x14,0xd1,0xe0,0x2b,0x5f,0xb8,0x38,0x68,0xae,0xbd,
+ 0xf7,0x03,0xc7,0x17,0x0e,0x1c,0xae,0xc2,0xd5,0x94,0xea,0xce,0x14,0xc5,
+ 0x72,0xe3,0xce,0xbb,0x66,0x5f,0x79,0x79,0x5d,0x03,0x40,0x31,0x89,0x42,
+ 0x99,0x08,0x44,0xa3,0xe6,0x46,0x12,0x85,0x88,0xd5,0x15,0xac,0xae,0xf4,
+ 0xfd,0x8c,0x1f,0xa7,0x4e,0xc2,0xeb,0x12,0xa1,0x79,0x3b,0x17,0x78,0xcb,
+ 0x15,0x53,0x54,0x66,0x6b,0x46,0x84,0x1e,0x26,0xf8,0x2b,0x97,0x56,0xaf,
+ 0x5c,0xc2,0x78,0x32,0x9a,0x30,0x1a,0xb5,0x9a,0xf6,0xc4,0x61,0x10,0x18,
+ 0x33,0xf3,0x78,0xf8,0x6d,0x67,0x6c,0x56,0x11,0x47,0x28,0x31,0xb9,0x89,
+ 0xa7,0x15,0x50,0x02,0x05,0x50,0x03,0x0a,0x3e,0x23,0x50,0xc8,0x32,0x97,
+ 0x67,0x85,0x24,0x47,0xda,0xcd,0xec,0x5e,0x4a,0xfb,0xbf,0xf8,0x99,0xb3,
+ 0x9f,0xff,0xf4,0xc5,0xc5,0x4b,0xb0,0x06,0xd6,0x14,0x31,0x85,0x94,0xa2,
+ 0x88,0xc4,0x90,0x88,0x60,0xad,0x49,0x29,0xd5,0x55,0x0d,0x18,0xa6,0x0e,
+ 0x1b,0x5c,0xbb,0x88,0x17,0x5f,0x08,0x1b,0x6b,0xc1,0x99,0x19,0xa8,0x53,
+ 0x88,0xf5,0x91,0x4c,0xff,0xa1,0xb7,0x9d,0x9e,0xdb,0x0d,0x25,0x80,0xd0,
+ 0xf2,0xe2,0x5a,0xe6,0x53,0x1b,0x5b,0x2d,0x63,0x67,0xf1,0x3a,0xae,0x5c,
+ 0x5e,0xb1,0xa6,0x50,0x9d,0xc0,0xca,0x27,0xfd,0x66,0xbb,0x0f,0xed,0x28,
+ 0x73,0x10,0x00,0xaa,0x64,0x5b,0x8e,0x9d,0x2a,0x11,0x59,0x9b,0x5f,0xbd,
+ 0xbc,0x3e,0x58,0x6f,0x4d,0x9f,0xb6,0x47,0x38,0x8f,0xe8,0x90,0x8c,0x85,
+ 0x7d,0xb8,0xeb,0xde,0xa3,0x31,0xf5,0x40,0x01,0x60,0x82,0xbb,0x49,0x49,
+ 0x31,0x52,0x92,0xb0,0x81,0x2a,0x41,0xbd,0x4a,0x6e,0x30,0x3f,0x3f,0x7d,
+ 0x2a,0x56,0xbb,0x9f,0xf8,0xc6,0x2b,0x7f,0xf9,0x67,0x2f,0x2c,0x5e,0x02,
+ 0x12,0x32,0x3f,0xd5,0x34,0x75,0x5b,0x58,0xc4,0x10,0x00,0x38,0xeb,0x45,
+ 0x10,0x43,0x00,0xd4,0x79,0xa3,0x68,0x24,0x61,0x7e,0x2f,0xde,0xfa,0xd0,
+ 0xec,0xdc,0xdc,0xdc,0xc6,0x46,0x0f,0x60,0x66,0x2e,0xab,0x55,0xf0,0xf0,
+ 0xcc,0xdd,0x07,0x76,0x2f,0x40,0x74,0x1b,0x72,0x20,0xe3,0xa6,0x8c,0xc9,
+ 0x43,0xb1,0xbe,0x86,0xcb,0x17,0x57,0xad,0xe9,0x4a,0x32,0x5b,0x47,0xf3,
+ 0xd6,0x45,0xdd,0x08,0x2b,0xf3,0x04,0xf6,0xbc,0xed,0xaa,0x8c,0x31,0x6d,
+ 0x85,0xa5,0xaa,0x50,0x36,0xec,0x97,0x16,0x7b,0xe3,0x23,0x42,0x80,0x78,
+ 0x03,0x95,0x58,0x24,0x1a,0x8b,0x23,0x47,0xb3,0xd9,0x39,0x5f,0xd5,0x3d,
+ 0xd1,0x08,0xb0,0xc8,0x66,0xf7,0x30,0x79,0x86,0x08,0x80,0xa6,0x8e,0x92,
+ 0x4c,0x7f,0x23,0x56,0x03,0xdf,0xcd,0x8e,0x97,0x1b,0xbb,0xbe,0xf5,0xb5,
+ 0x73,0x1f,0xff,0xd3,0x57,0xca,0x0d,0x40,0x2c,0x94,0x07,0xbd,0x21,0x20,
+ 0xd6,0x88,0x69,0x8b,0x4a,0xb5,0xa4,0x36,0x36,0x04,0xb5,0xdd,0x6e,0x96,
+ 0xd2,0x50,0x29,0xba,0x0e,0x3e,0xfa,0x07,0x27,0xde,0xf3,0xbe,0x7b,0xe7,
+ 0x77,0xe7,0x21,0x56,0xd6,0x78,0x55,0x2d,0xab,0x0d,0xb6,0xf5,0xec,0xbc,
+ 0xdd,0x7f,0x10,0xaa,0xdb,0xd2,0xf4,0x78,0xde,0x68,0x8d,0xf1,0x50,0x20,
+ 0xe1,0xea,0xe5,0x75,0x46,0x57,0xa2,0xbb,0x69,0xae,0x33,0x11,0x10,0x3f,
+ 0x13,0xfc,0x6b,0x03,0x30,0xa5,0xc0,0x6c,0x41,0x50,0x31,0x4b,0xd7,0xfb,
+ 0xe3,0x27,0x94,0xcd,0x21,0xe2,0x44,0xb1,0x27,0xc6,0xe2,0xc4,0xc9,0x83,
+ 0x51,0x06,0x49,0x2a,0x8b,0x28,0x62,0x24,0x31,0x33,0x8f,0x4e,0x16,0xd2,
+ 0x1b,0xce,0x5b,0x82,0xb5,0xdc,0x99,0x9f,0x39,0x55,0x6e,0xcc,0x7e,0xfe,
+ 0x33,0xff,0xfc,0x77,0x9f,0xba,0xda,0xbb,0x0e,0x63,0x00,0x35,0x49,0x04,
+ 0x40,0x91,0xe7,0x21,0x84,0x24,0x81,0x89,0x89,0x51,0x55,0x0d,0x60,0xbc,
+ 0x33,0x65,0x35,0x10,0xc2,0x81,0x23,0xf8,0x8d,0xc7,0x8f,0xbd,0xe3,0x3d,
+ 0x27,0xdc,0xd4,0x46,0x0a,0x83,0xa2,0x63,0xad,0x93,0xa6,0x4c,0xc4,0x42,
+ 0xdc,0x24,0xed,0x1f,0x3b,0xb1,0x87,0xed,0x92,0x44,0x10,0x8c,0x2a,0x8d,
+ 0x2f,0x9b,0x09,0x96,0x46,0x53,0xb8,0xb8,0x78,0xbd,0xa7,0x29,0x57,0xf1,
+ 0xa4,0xad,0xfe,0xe0,0xc6,0x3a,0x63,0xf2,0x1a,0x6f,0x4e,0xc0,0x93,0xc3,
+ 0x61,0x49,0x29,0x59,0x6b,0x55,0x28,0x84,0xb4,0xb8,0x58,0x8d,0x1d,0x73,
+ 0x7c,0x20,0x90,0x4c,0x8c,0xdb,0x85,0x19,0x47,0x8f,0x1d,0x2c,0xcb,0x9e,
+ 0xf3,0x04,0xd2,0xd1,0xd4,0xab,0x4d,0x6a,0x94,0xb6,0x73,0x66,0xd8,0x5a,
+ 0xa7,0xc9,0x64,0x76,0xf7,0x60,0xdd,0x7f,0xeb,0xeb,0x2f,0xb4,0x96,0xea,
+ 0x76,0x8a,0x41,0xaf,0x04,0x6a,0x10,0xf2,0x2c,0x27,0xe2,0x98,0x52,0x5b,
+ 0x64,0xa4,0x16,0xd3,0xa2,0x3c,0xc6,0xa6,0xb5,0xd4,0x47,0xfe,0xc3,0x7d,
+ 0xbf,0xfa,0xc1,0x13,0x29,0x3f,0x37,0x0c,0x57,0x35,0xaa,0xf7,0x46,0x24,
+ 0x31,0xc3,0x79,0x4a,0x52,0x37,0x61,0x70,0xf2,0xd4,0x61,0x9f,0x2d,0x55,
+ 0x15,0x98,0x39,0xc9,0xa8,0x15,0x21,0x18,0x85,0x09,0x41,0x99,0x9c,0x68,
+ 0x5c,0x59,0x46,0x0c,0x06,0xea,0x81,0x66,0xbb,0xb8,0x41,0x76,0x82,0x95,
+ 0xb7,0xc8,0x2a,0x80,0xba,0xd1,0xe7,0xdf,0xa2,0x4c,0x29,0xaa,0x2a,0x91,
+ 0x01,0x10,0x9a,0xb8,0xb1,0x7e,0xd3,0x33,0x6c,0x5d,0x7f,0x02,0x89,0x32,
+ 0x76,0x2d,0x4c,0x55,0xe1,0x9a,0xef,0x98,0xa4,0x08,0x75,0x82,0xb1,0xba,
+ 0xcd,0xa1,0x36,0xff,0xde,0xa4,0xe0,0x8d,0xce,0xa7,0xe1,0xde,0x27,0xbe,
+ 0x79,0xf6,0x13,0xff,0xcf,0xb9,0xde,0x22,0xba,0x9d,0x62,0xd0,0x6f,0x98,
+ 0x21,0x11,0x04,0xaa,0xaa,0x96,0x1d,0x09,0x82,0x11,0x49,0x4c,0x5e,0x54,
+ 0xd8,0x86,0x90,0x1a,0xdf,0xc5,0x07,0x1f,0x3f,0xf5,0x6b,0x1f,0x3c,0xd1,
+ 0xab,0x5f,0x8a,0xb2,0xe8,0x0a,0x09,0x49,0xfb,0x65,0xd9,0xc9,0xad,0xb5,
+ 0x36,0x02,0x29,0x86,0x86,0x07,0xfb,0xf6,0xcf,0x79,0x8f,0xaa,0x75,0x26,
+ 0x51,0x66,0x88,0x82,0x19,0x29,0xc5,0x28,0x15,0xa0,0x50,0x0c,0x7a,0x48,
+ 0x71,0x02,0x3e,0x56,0x0b,0xd0,0x98,0xdb,0x73,0xe3,0xd8,0xd5,0x82,0x02,
+ 0x94,0x40,0x76,0xe4,0x02,0xaa,0xa0,0x06,0x88,0x49,0x2a,0x63,0xa9,0xdb,
+ 0x9d,0x6e,0xea,0x64,0x19,0x00,0x87,0x1a,0x10,0xa8,0x12,0xc6,0xb8,0x85,
+ 0xc2,0x41,0x2d,0xa0,0x40,0x60,0x87,0xce,0x2c,0x6c,0x11,0xd5,0x36,0xec,
+ 0xa8,0x69,0x92,0x18,0x62,0x4e,0x89,0x6b,0x6b,0xd9,0xa8,0x07,0x00,0x4a,
+ 0x31,0x35,0x9a,0xc4,0xd0,0x4c,0x66,0x77,0x49,0x75,0xf8,0x6b,0x5f,0x78,
+ 0xf5,0x13,0x1f,0xff,0x69,0x6f,0x05,0xd6,0xa2,0x2e,0x4b,0x26,0x68,0x34,
+ 0xa4,0x6e,0xdc,0xfd,0xca,0x38,0xa1,0x3a,0x51,0x9e,0x99,0xce,0x36,0x06,
+ 0xcb,0x73,0x0b,0xf8,0x83,0x3f,0xbe,0xe3,0xd1,0xf7,0xec,0xeb,0x87,0x1f,
+ 0xb8,0x4e,0xcd,0xd6,0x57,0x75,0xf0,0xde,0x67,0x39,0xc5,0x38,0x84,0x92,
+ 0x71,0xf9,0xb0,0x6c,0xc8,0xaf,0x67,0x53,0xb3,0xc6,0x03,0x40,0x52,0x00,
+ 0xa2,0x2c,0x10,0x24,0x09,0xc4,0x6d,0xaa,0x0f,0x00,0x42,0x83,0x18,0x61,
+ 0xbc,0x21,0x66,0xc0,0xaa,0xe6,0x00,0x80,0x06,0x94,0x54,0xb9,0xc5,0x11,
+ 0x27,0xc3,0x50,0xb6,0x14,0x33,0xea,0x47,0x0c,0x13,0x52,0x36,0xa2,0x0a,
+ 0x4d,0x4a,0x64,0x88,0x8c,0x6c,0x32,0xcb,0xb6,0x09,0x8e,0x68,0x7c,0xc0,
+ 0x25,0x01,0x8c,0x05,0x5b,0x25,0x23,0x51,0x6a,0x25,0x81,0x69,0xf9,0x08,
+ 0x5a,0x96,0x65,0x66,0xc1,0xcc,0xc3,0x61,0xcf,0x18,0x57,0xf8,0xe9,0x50,
+ 0x4d,0x59,0xdd,0xf5,0xe5,0xcf,0xfd,0xf0,0xf3,0x9f,0xbe,0xd0,0x5b,0x06,
+ 0xc4,0x02,0x56,0xa8,0x92,0x04,0x52,0x03,0xb8,0xf1,0x8b,0xc9,0xb8,0x34,
+ 0xe3,0xa9,0x62,0x6e,0xa3,0xb7,0x38,0xb7,0x9b,0x7f,0xf7,0x3f,0x3c,0xfc,
+ 0x8e,0x5f,0x39,0xe0,0xbb,0x17,0xca,0x38,0x30,0x2e,0x36,0x51,0x53,0x92,
+ 0x36,0xe4,0xeb,0x26,0x32,0x73,0x27,0xf7,0x9d,0xa9,0x42,0x42,0x32,0x0e,
+ 0xa3,0xca,0x47,0x15,0x44,0xdb,0x06,0x83,0x14,0xda,0xa7,0x97,0x04,0x11,
+ 0xb1,0xcc,0x0a,0xd9,0x76,0xe2,0x51,0x44,0xfb,0x01,0xdf,0xa8,0x09,0x19,
+ 0x25,0x3f,0x9d,0x1c,0x9c,0x19,0x63,0x54,0x49,0x04,0x04,0x03,0x25,0x15,
+ 0x1a,0xf1,0x5e,0xb6,0x55,0x22,0x09,0x14,0x47,0xd1,0x28,0x60,0x02,0xb3,
+ 0x35,0xc6,0x85,0x10,0x54,0xd5,0x18,0xc7,0xe4,0xbd,0x9d,0x6d,0x5b,0x8a,
+ 0x3c,0xcf,0x25,0x39,0x92,0xd9,0x8c,0xef,0x40,0x7d,0xf2,0xab,0x9f,0x7f,
+ 0xf9,0x8b,0x7f,0x77,0xe1,0xfa,0xe5,0x11,0xa3,0x26,0xa6,0x46,0x05,0xa3,
+ 0x83,0x0f,0x09,0x08,0x40,0x33,0x22,0x3f,0x22,0x01,0xb1,0x55,0x52,0x34,
+ 0xb5,0xa4,0x68,0x67,0xa6,0x0e,0xe4,0x6e,0xcf,0xb0,0x4f,0x75,0xa5,0xc4,
+ 0xd1,0xb8,0x86,0x4d,0x30,0x16,0x0c,0x6a,0xaa,0x50,0x96,0x8d,0x08,0x08,
+ 0xd6,0x18,0xc7,0x5b,0xa7,0xbd,0x41,0x1a,0xf9,0x89,0x6a,0x6b,0xbd,0x91,
+ 0x19,0x53,0xd4,0x51,0x39,0x49,0x13,0xc7,0xdf,0x48,0x9f,0xc5,0xdb,0x73,
+ 0x96,0xd2,0x4e,0x75,0x10,0xda,0x2a,0x4e,0x04,0x86,0x19,0x60,0x22,0x72,
+ 0xee,0x26,0x68,0x7e,0xc4,0x1b,0x90,0x4d,0xbc,0x3f,0x06,0x35,0xec,0x62,
+ 0x13,0x8d,0x53,0x26,0xab,0x60,0x11,0xca,0x7c,0xa1,0xc2,0x55,0x93,0xba,
+ 0xc5,0xfe,0x99,0xce,0xb1,0xd5,0xab,0xc5,0x53,0x4f,0x5c,0xfa,0xd4,0x5f,
+ 0xbd,0xb6,0xbe,0x0c,0x67,0xc9,0xd9,0xce,0xb0,0x5f,0x02,0xf0,0xae,0x88,
+ 0xed,0x60,0xb6,0xa5,0x04,0x51,0x1a,0xc1,0x06,0x14,0xa0,0x52,0xc7,0x61,
+ 0xe6,0xb3,0xe1,0xa0,0xfe,0xdb,0x4f,0x7d,0xc7,0x64,0x4b,0xef,0xfe,0xf5,
+ 0xe3,0x53,0xf9,0xd1,0xb2,0xb9,0xc8,0x2e,0x28,0x2a,0x25,0x32,0xd6,0x75,
+ 0x3a,0x1d,0xa0,0x12,0x91,0x94,0xd4,0x93,0x0f,0x8d,0x8e,0x23,0x46,0xc1,
+ 0x04,0x61,0xa6,0x11,0xb9,0x4c,0x95,0x89,0x46,0x27,0x78,0x2b,0xfd,0xd8,
+ 0x56,0x67,0x91,0xe2,0xd6,0x6a,0x23,0xbe,0x49,0xdc,0xd6,0x22,0x97,0x23,
+ 0x78,0x4b,0x95,0xac,0xf5,0x45,0x41,0x13,0x59,0x9d,0xc7,0x25,0x6f,0xdc,
+ 0xf4,0xc7,0xba,0x42,0xbf,0xd7,0x10,0x99,0x76,0xde,0xd7,0x22,0x0d,0x75,
+ 0x5d,0xa5,0x94,0x7a,0x1b,0x65,0x35,0x34,0xdd,0xec,0x70,0xb9,0x31,0xf7,
+ 0xad,0xaf,0x9d,0xff,0xf3,0x3f,0x7d,0x7e,0xed,0x3a,0x1c,0x15,0xac,0x33,
+ 0xc3,0x7e,0x24,0xd8,0x6e,0x67,0x9a,0xc9,0xa5,0x4d,0x4c,0x85,0x12,0x90,
+ 0x26,0x88,0x41,0x89,0x10,0x52,0x4a,0x4c,0x76,0x75,0x09,0x7f,0xf5,0xf1,
+ 0x9f,0x7c,0xf3,0x6b,0x3f,0x76,0x38,0x36,0x3f,0x7d,0xba,0xad,0xda,0x9b,
+ 0x6a,0x10,0x9a,0xd2,0x58,0xed,0x74,0xf2,0x4e,0x96,0x67,0x36,0x63,0xf8,
+ 0xde,0x5a,0xd9,0x34,0x9b,0xec,0x9f,0xf6,0x23,0x77,0x2a,0x44,0x60,0x26,
+ 0xa7,0x4a,0x20,0x14,0x05,0xac,0x63,0xdd,0x3c,0xd3,0x49,0xc6,0x54,0x37,
+ 0x9e,0x68,0x9c,0x7f,0x56,0x9d,0xd5,0xbe,0x33,0x25,0x52,0x21,0x55,0xc9,
+ 0x73,0x3f,0x35,0x5d,0x80,0x86,0x5b,0x69,0x6b,0x34,0x62,0xd3,0x71,0x19,
+ 0x81,0xe1,0x00,0x2b,0xcb,0xbd,0xc3,0xa7,0xb2,0x56,0xd9,0xa4,0xaa,0xa2,
+ 0xd1,0x79,0x1a,0xf4,0x9b,0xc2,0xce,0x2f,0xec,0x3a,0xb3,0x7a,0x3d,0xff,
+ 0xc2,0x67,0x9f,0xfe,0xe2,0xdf,0x9e,0xdf,0x58,0x84,0xa1,0x1c,0xd2,0xa9,
+ 0x43,0x0d,0x58,0xe7,0x10,0x42,0x68,0x42,0xd8,0x3a,0xb6,0x95,0xc7,0x6e,
+ 0xb5,0x79,0xf0,0xc6,0x98,0xc8,0xbb,0x42,0xa9,0xdf,0x5f,0xd7,0xcf,0x7e,
+ 0xea,0x35,0x55,0x7e,0xec,0xdf,0xbf,0x29,0x2f,0x36,0xbc,0x35,0xd5,0x70,
+ 0x58,0x0e,0x6b,0xc9,0x88,0xc8,0x40,0x00,0xf5,0x0e,0xee,0xda,0xd5,0xb5,
+ 0x41,0x7f,0x93,0x49,0xcd,0x00,0x49,0x82,0xb6,0x4d,0x18,0x19,0x91,0x1a,
+ 0x84,0x99,0x59,0xeb,0xbd,0x4d,0x29,0x8d,0x03,0x2e,0xbd,0x0e,0xd2,0xc7,
+ 0x3b,0xe1,0x33,0xa3,0x46,0xda,0x18,0x63,0x8c,0x4d,0x49,0x45,0x24,0x2f,
+ 0xfc,0xd4,0xb4,0xdf,0x86,0xea,0x6f,0xe9,0x1a,0x5a,0x3d,0x49,0xd6,0x0c,
+ 0xb1,0xbc,0xd4,0x97,0x64,0x88,0x1c,0x11,0x89,0x46,0x91,0x60,0x9d,0x3a,
+ 0xe7,0x3b,0xd9,0xc1,0xfe,0xea,0xec,0x3f,0x7c,0xf9,0xfc,0xdf,0x7d,0xf2,
+ 0xfc,0xea,0x55,0x78,0x5f,0x40,0x8d,0x68,0x2b,0x18,0x83,0x08,0x9a,0xd0,
+ 0x00,0x89,0xa9,0x4d,0x13,0x2d,0xc2,0x69,0xb6,0xf7,0x1b,0x42,0xd0,0x26,
+ 0x44,0xd2,0x4e,0x66,0xb0,0x78,0x19,0x9f,0xf9,0xeb,0x57,0xff,0xfe,0xd3,
+ 0xcf,0x6c,0x2c,0x66,0x46,0xf6,0x14,0xd9,0x02,0xc1,0xc7,0xa6,0x4e,0x61,
+ 0x18,0x9a,0x41,0x68,0x2a,0x82,0xbf,0x7a,0x65,0x35,0x94,0xf0,0xce,0x11,
+ 0x98,0xda,0x39,0xa6,0x08,0xc0,0xcc,0x23,0x65,0x0c,0x18,0x33,0xb3,0x45,
+ 0x9e,0xfb,0x18,0x9b,0xb1,0xec,0x31,0x8e,0x3c,0x4b,0x69,0x0c,0x4f,0xf2,
+ 0xcf,0x46,0x4a,0x45,0xc0,0x6c,0x98,0xad,0xaa,0x8a,0x44,0xeb,0x34,0xcb,
+ 0x37,0x87,0x40,0x0c,0xd8,0x76,0x04,0xb2,0xa5,0x94,0x63,0x0b,0x45,0x7f,
+ 0x23,0x69,0xca,0x99,0x32,0x22,0x56,0x4d,0x8a,0x54,0xd7,0x75,0xa7,0x98,
+ 0x0b,0xd5,0xf4,0x37,0xbe,0xf2,0xe2,0xa7,0x3e,0xf1,0x4c,0x7f,0x11,0xce,
+ 0x4d,0x35,0x35,0x11,0x2b,0x71,0x70,0x8e,0x40,0x31,0xa6,0xc6,0xb0,0xf1,
+ 0xde,0xb6,0x4d,0xd2,0x98,0xc0,0xc5,0x23,0x63,0x69,0xab,0xd4,0xc8,0x00,
+ 0x65,0xd8,0x18,0xb8,0xae,0xac,0x01,0x06,0xeb,0xf8,0xb3,0x3f,0x79,0xf5,
+ 0xc7,0xcf,0xf6,0x57,0xaf,0xe7,0x24,0xbb,0xbd,0x9d,0xf7,0xae,0xeb,0x9c,
+ 0xcb,0x72,0x93,0x65,0x19,0x24,0x5b,0x5f,0x6d,0x20,0x30,0x5c,0x6c,0xe6,
+ 0x23,0xd5,0xd4,0xa6,0x17,0x6e,0x1b,0x7f,0x8b,0xa2,0x0b,0xeb,0x54,0xb6,
+ 0x0e,0x7b,0x19,0xe9,0x6b,0x77,0xf2,0x21,0xde,0x3e,0x43,0xdd,0xba,0x39,
+ 0xe7,0xaa,0xaa,0x52,0x55,0xef,0xbd,0x75,0xd4,0x1f,0xac,0xdc,0x75,0xef,
+ 0x91,0xf6,0x42,0x14,0x06,0x30,0xde,0x15,0x10,0x03,0xe1,0xa2,0x28,0x88,
+ 0x88,0xc9,0x40,0xf1,0xc4,0xb7,0xcf,0xae,0x2e,0x37,0x53,0x9d,0x7d,0x90,
+ 0xac,0xed,0x01,0x9c,0xcd,0x19,0x53,0x5f,0xfc,0xdc,0x3f,0xfd,0xd7,0x3f,
+ 0x7d,0x61,0xf5,0x32,0x98,0x77,0x59,0x9a,0x43,0xa2,0x18,0x2a,0x50,0xd9,
+ 0xc4,0x0d,0xd5,0xda,0x30,0x1b,0x4b,0x21,0x04,0x66,0x56,0xa4,0x4e,0xd1,
+ 0xb1,0xc6,0x2b,0xd8,0x70,0xa1,0xc2,0x9a,0x60,0x0d,0xd5,0x75,0x20,0x1a,
+ 0xb5,0x2c,0x8c,0x4c,0x53,0xd6,0x94,0x40,0xc4,0xff,0xf5,0xbf,0xbf,0xfc,
+ 0xe4,0x37,0xaf,0xce,0x17,0xa7,0x33,0x5e,0xa8,0xfa,0xf0,0x36,0xaf,0xab,
+ 0x60,0x38,0x43,0xcc,0x9e,0x7a,0x62,0x99,0x14,0x29,0xb4,0x09,0x49,0x08,
+ 0x62,0x18,0xd6,0xd8,0x18,0x63,0x8c,0x0d,0x08,0x22,0xb8,0xe7,0xde,0x13,
+ 0xc3,0x72,0xdd,0x67,0x66,0x8b,0xe2,0x30,0x1a,0x9d,0xf0,0xad,0x20,0x9a,
+ 0xed,0x1d,0xa3,0x52,0x2b,0x3b,0x6a,0x31,0x33,0x22,0x15,0x69,0xc0,0xd5,
+ 0xec,0x3c,0x67,0x53,0xa3,0x21,0x9c,0x42,0x43,0x48,0x80,0x21,0x6e,0x89,
+ 0x51,0xd4,0x94,0x35,0x14,0xd7,0xaf,0x62,0x65,0xa9,0x31,0x98,0x0f,0xb5,
+ 0x27,0xb8,0x2c,0xcb,0xea,0x2a,0xbd,0xf8,0xc2,0xd9,0xef,0x3e,0xd1,0x1b,
+ 0xae,0x01,0xc6,0x4a,0x83,0x72,0x38,0x04,0x28,0xef,0x64,0x0a,0x61,0x03,
+ 0xe7,0xad,0x75,0xdc,0x34,0x51,0x95,0x44,0x64,0x66,0x26,0x1b,0x94,0x8b,
+ 0x21,0xf5,0xf3,0xcc,0x31,0xb7,0x64,0x49,0x17,0x1a,0x33,0xae,0xad,0x37,
+ 0xdf,0x27,0x43,0x7d,0x8b,0xfa,0xfc,0xcd,0x5f,0x5c,0xf9,0xab,0x8f,0xff,
+ 0x43,0x2c,0xe7,0xe7,0x67,0x4e,0x84,0xaa,0xc3,0x98,0x4a,0xc1,0xfd,0xf4,
+ 0xa5,0xab,0x1b,0x6b,0x50,0xc1,0x08,0xde,0x23,0xd9,0x1c,0x2c,0x88,0x8a,
+ 0x75,0x04,0x42,0x31,0x8d,0x5d,0x0b,0xde,0xfa,0x94,0xa4,0x06,0x6d,0xca,
+ 0x3c,0x70,0x93,0xb4,0xfb,0x96,0x4d,0xd0,0xa8,0xf2,0x52,0x55,0x63,0x58,
+ 0x24,0xb2,0x11,0xd1,0x5a,0x31,0xdc,0x77,0xa0,0x7b,0xe8,0x08,0x40,0x70,
+ 0xde,0x00,0x22,0x10,0x66,0x67,0x4d,0x16,0x42,0x90,0x94,0x00,0xb0,0x45,
+ 0x6f,0x19,0x2f,0xbf,0xb8,0x1c,0xca,0x69,0xd2,0xd9,0x96,0x02,0x63,0x6d,
+ 0x76,0xfc,0xd8,0xc9,0x87,0x1f,0x29,0xe6,0xf6,0x02,0x1a,0x4d,0x26,0x79,
+ 0xc7,0x01,0x5a,0x0d,0x6b,0x15,0x78,0xe7,0x88,0xa8,0xa9,0x23,0x60,0x2c,
+ 0x77,0xbd,0xf7,0x1b,0xfd,0xb5,0xb9,0xdd,0xd2,0x9d,0x89,0x55,0xd3,0x4f,
+ 0x52,0x39,0x9b,0x01,0x9e,0x90,0x43,0xdd,0x98,0xc5,0x1c,0xb6,0xc4,0x27,
+ 0x0a,0x6d,0xd0,0x5f,0xc4,0x27,0xff,0xe2,0xca,0xd7,0xbe,0xf0,0x0c,0xe2,
+ 0x3e,0x47,0x07,0x53,0x39,0x9d,0xf3,0xfe,0x1f,0x7c,0xef,0xa7,0x6b,0x4b,
+ 0xad,0x6d,0x95,0x90,0x18,0x4a,0x34,0x32,0x16,0xa0,0xcc,0x02,0xc6,0x81,
+ 0x43,0x38,0x70,0x68,0x8a,0xb8,0xd2,0x1b,0xf8,0xcb,0x3a,0x56,0xc0,0xec,
+ 0xec,0x59,0x37,0x55,0x16,0x63,0xcf,0x12,0x36,0x2a,0x5a,0x29,0x0d,0x77,
+ 0xef,0x75,0xa7,0x4e,0x13,0x08,0xc4,0xd1,0x32,0x01,0xa2,0x4a,0x31,0x4a,
+ 0x68,0xe2,0x38,0x72,0x73,0x08,0x7e,0xf8,0xfd,0xd7,0xae,0x5c,0x6c,0xa6,
+ 0x8b,0x23,0x12,0x7d,0xd3,0x34,0x21,0x84,0xdd,0x7b,0xa6,0x1f,0xff,0xf7,
+ 0xbf,0xfa,0xef,0x3e,0x72,0x22,0x9f,0x43,0x92,0x35,0x76,0x7d,0x50,0x09,
+ 0x12,0x6b,0x73,0x11,0x6e,0xea,0x40,0x44,0x79,0xe6,0x44,0xeb,0x26,0x56,
+ 0xd3,0xbb,0xf0,0xbb,0xbf,0xff,0xf6,0x8f,0xfd,0xc7,0x77,0xef,0x39,0x80,
+ 0x84,0x24,0xe8,0x3b,0x4b,0x4c,0x66,0xab,0xa4,0x18,0xe5,0xe0,0x38,0xca,
+ 0x1b,0xc9,0x77,0x8a,0x7c,0xb0,0x82,0xcf,0x7e,0x72,0xf1,0x4b,0x7f,0xf7,
+ 0x5c,0xdd,0x5b,0x38,0xb4,0xf7,0xa1,0xfe,0x5a,0xf1,0xcc,0x3f,0x0f,0x24,
+ 0x8c,0x74,0xc7,0x40,0x04,0xb5,0x93,0x2d,0x88,0x08,0x91,0x8a,0x06,0x10,
+ 0x4e,0xdc,0x81,0xdd,0x7b,0xb3,0x3a,0xac,0x59,0xb7,0x59,0x88,0xf2,0x18,
+ 0x30,0xbc,0x11,0x0d,0xdd,0xa4,0xa1,0xeb,0x4d,0xb8,0x17,0x6f,0xc2,0xcf,
+ 0xaa,0x81,0x4c,0x23,0x18,0x64,0x9d,0x70,0xfa,0xee,0x83,0x20,0x34,0x61,
+ 0x48,0x1c,0x0d,0x61,0xc4,0x48,0x07,0x88,0x19,0x90,0x18,0x80,0x84,0xe7,
+ 0x7e,0xd4,0xbc,0xf0,0xf4,0x92,0xa5,0xbd,0x86,0x3b,0x92,0x00,0xe8,0xe5,
+ 0xab,0x67,0xc9,0xad,0x3c,0xfe,0xdb,0x6f,0xf9,0xe8,0x1f,0x9e,0xa0,0x2e,
+ 0x86,0xd5,0x80,0x73,0x31,0x96,0x99,0x7c,0x53,0x09,0xd4,0x16,0x1d,0xd7,
+ 0xc4,0xbe,0x50,0xd3,0x99,0xc1,0x1f,0xfc,0xd1,0x99,0xf7,0x3e,0x76,0xf8,
+ 0x23,0x1f,0x7b,0xd3,0xef,0x7c,0xec,0x9e,0xa9,0x79,0x24,0x80,0xcc,0x30,
+ 0x69,0xb5,0x55,0x5e,0xb7,0x2d,0xc4,0xf8,0xa8,0xb1,0xc6,0x0f,0x37,0x22,
+ 0x14,0xeb,0x8b,0xf8,0xf8,0xff,0x7d,0xfe,0xc9,0x6f,0x5e,0x37,0xe1,0x8e,
+ 0xef,0x7f,0xe7,0xf2,0xe5,0xf3,0x80,0xb4,0xda,0x82,0xc4,0x48,0xa4,0x81,
+ 0xc5,0x02,0x1c,0x53,0xf2,0xde,0x86,0x28,0x60,0x9c,0xb9,0x7b,0x8f,0xf5,
+ 0x55,0x59,0xaf,0x39,0xb7,0x3d,0x43,0xa9,0xdd,0x31,0x67,0x99,0x0f,0xff,
+ 0x71,0xb6,0x35,0xe3,0x1c,0x01,0x9b,0xed,0xa9,0x47,0xed,0xf1,0x4f,0x2c,
+ 0x40,0x03,0x08,0x21,0xb7,0x98,0x7b,0xea,0x89,0x2b,0x65,0x0f,0x2a,0xd1,
+ 0x5a,0xd7,0xd2,0x66,0x8c,0x61,0x9f,0xb9,0x18,0xa3,0x26,0x65,0x9f,0x4b,
+ 0x13,0x6c,0x1e,0x8f,0x1e,0xdf,0x33,0x35,0x17,0xc8,0x0e,0x55,0x93,0xcf,
+ 0x4c,0x55,0x0e,0xe7,0xe6,0xa7,0x4f,0x9f,0x39,0x51,0x14,0xbd,0xab,0x57,
+ 0x37,0x7a,0x6b,0x30,0xa4,0xa1,0x51,0x28,0xfb,0xcc,0x37,0xcd,0x40,0x08,
+ 0x87,0x8e,0xe1,0xc3,0xbf,0x77,0xe6,0x5d,0xef,0xdb,0x5b,0xcc,0xac,0x5a,
+ 0x3f,0xdc,0xbb,0x7f,0x66,0x7a,0x5a,0xcf,0xbf,0xb6,0xda,0xdb,0x50,0xc3,
+ 0x32,0x71,0xb4,0xdf,0x20,0x56,0x61,0x55,0x18,0x47,0x4c,0x12,0x2b,0x5c,
+ 0xbf,0xba,0x76,0xed,0xca,0xf2,0x53,0xdf,0xfb,0xf1,0x95,0x0b,0x09,0x02,
+ 0xc3,0x20,0x16,0xb4,0x10,0x26,0x8c,0x82,0x09,0x70,0x9e,0x42,0x4a,0xfb,
+ 0x0f,0xe3,0x43,0xbf,0x7b,0xe7,0xd4,0x5c,0x39,0xac,0x16,0x8b,0x8e,0x8d,
+ 0x6d,0xeb,0x48,0x02,0x18,0x68,0x06,0xb0,0x52,0x0b,0x47,0xe8,0xe4,0x44,
+ 0xda,0x4d,0x38,0x94,0x1b,0xfd,0x01,0x29,0x93,0x69,0x85,0x0c,0x22,0xb5,
+ 0xf3,0x29,0xa5,0xd8,0x54,0xd8,0x3d,0x7b,0xe2,0xfc,0xd9,0xeb,0x57,0x2e,
+ 0x36,0x29,0xc1,0x39,0x17,0xa3,0x12,0x19,0x6b,0x39,0xa6,0x46,0xa1,0x50,
+ 0x26,0xd3,0xd1,0x54,0xf7,0xcb,0x41,0xc2,0xd2,0x99,0xfb,0xe6,0x7d,0x51,
+ 0xd5,0xcd,0x70,0x6a,0xba,0xd3,0xd4,0x83,0xf5,0xf5,0x65,0xe7,0x70,0xe2,
+ 0xc4,0xf1,0x6e,0x41,0xcf,0x3f,0xbf,0xd2,0x0c,0x01,0x49,0xd6,0x16,0xa0,
+ 0x94,0x34,0x1e,0x3e,0x81,0xdf,0xfe,0xbd,0xfb,0x7f,0xfd,0xb7,0x4e,0xd6,
+ 0x78,0x31,0xd1,0xa5,0x95,0xf5,0xd7,0xf2,0x82,0xcf,0x9c,0xb9,0xdb,0x59,
+ 0x79,0xed,0xd5,0x95,0xa6,0x86,0x6a,0x1a,0x53,0xa8,0xc6,0x39,0x45,0x2d,
+ 0x88,0x54,0xa2,0x2b,0x32,0x09,0x90,0xc6,0x18,0x9a,0x5d,0x5d,0x2e,0x5f,
+ 0x78,0xee,0xca,0xea,0x72,0x42,0x20,0x26,0x9f,0x24,0x81,0x94,0x09,0xa2,
+ 0x00,0x1c,0xc1,0x19,0xa6,0x84,0xca,0x58,0x3c,0xfc,0xf6,0xb9,0xf7,0xfd,
+ 0xe6,0x9d,0x83,0xfa,0xbc,0xcb,0x12,0x28,0x8a,0x6c,0x9e,0x03,0x0c,0xf5,
+ 0x00,0x29,0x45,0x50,0xa2,0x5b,0x17,0xa5,0x5b,0x05,0xc4,0x18,0xe1,0x27,
+ 0x11,0x61,0xb6,0xaa,0x54,0x56,0x1b,0x33,0x73,0xf6,0xde,0xfb,0x0f,0x4f,
+ 0xcf,0x01,0x04,0x6a,0x8f,0x58,0x25,0xd1,0x98,0x52,0x95,0xe7,0xb6,0x15,
+ 0x3c,0x75,0xa7,0x16,0xd6,0xaf,0xe3,0x3b,0xdf,0x58,0xad,0x37,0x66,0xa8,
+ 0xd9,0xbd,0x77,0xcf,0xb1,0xa5,0xa5,0x25,0x36,0x61,0xf7,0x5e,0xb7,0xda,
+ 0xfb,0xa9,0xc9,0xaf,0xbf,0xf7,0xb1,0x7b,0x3e,0xf2,0xd1,0xc3,0xdc,0x01,
+ 0x2c,0xc4,0xf6,0x83,0x56,0xae,0x8b,0xf7,0xff,0xd6,0xf1,0x5f,0x7b,0xec,
+ 0x64,0x29,0x3f,0xf5,0x9d,0xda,0xf8,0xe0,0x8a,0x6a,0x18,0x2e,0xd9,0xee,
+ 0xd2,0x6f,0xfe,0xf6,0x03,0x8f,0xff,0xce,0x9d,0x81,0xa0,0x06,0xca,0xa2,
+ 0x04,0x05,0x43,0xad,0x8e,0xb3,0x2d,0x1b,0x0a,0xe5,0x90,0x88,0x00,0x97,
+ 0x84,0xf2,0x6c,0x17,0x83,0x63,0x03,0x82,0x6f,0xd9,0x42,0x29,0x61,0x3c,
+ 0x41,0x15,0x66,0x36,0xce,0xc7,0x04,0x5b,0xe0,0xd8,0x1d,0x73,0x73,0xbb,
+ 0xf2,0x41,0xdd,0x2b,0x8a,0xa2,0x0e,0x6d,0x80,0xc7,0xf1,0x54,0x25,0x4e,
+ 0xb4,0xd3,0x93,0x61,0xf8,0x9f,0xf3,0x2d,0xa6,0x11,0xb5,0xcd,0x91,0x02,
+ 0xa2,0x63,0x1a,0x1c,0xb3,0x11,0x21,0xe6,0x2c,0xcb,0x8a,0x72,0x58,0x1f,
+ 0x3b,0x72,0xe7,0x77,0xfe,0xf1,0xa5,0xb5,0x15,0xe4,0xce,0x37,0x8d,0x35,
+ 0x70,0x22,0x25,0x48,0x62,0x8c,0x3e,0xe3,0x14,0xa8,0xa9,0x1b,0xe6,0x34,
+ 0xec,0xeb,0xb5,0x2b,0xe7,0xee,0xbf,0xff,0x01,0xa5,0xca,0xf8,0x86,0x4c,
+ 0x0a,0xd2,0x67,0x57,0x57,0x4d,0x5f,0x90,0x1e,0x78,0xe0,0x3e,0xe7,0x06,
+ 0x97,0xae,0x6d,0x0c,0x07,0xd8,0x73,0x04,0x7f,0xf8,0x3f,0xdf,0xf1,0xce,
+ 0xf7,0x1d,0xa1,0xce,0x79,0x31,0x2b,0x62,0x4c,0x10,0x4b,0xce,0x90,0xa3,
+ 0x32,0x6e,0xc0,0xc5,0xbd,0xfb,0x67,0xef,0xbc,0x6b,0xf6,0xbb,0xdf,0xb9,
+ 0x3e,0xae,0x19,0x3d,0xc8,0xa8,0x8a,0x52,0x68,0xdf,0x27,0x01,0xaa,0x42,
+ 0x10,0x42,0x4c,0xa9,0x04,0x12,0x01,0x02,0x95,0x51,0x37,0x36,0xde,0x0e,
+ 0x04,0x24,0x95,0xa8,0x0a,0x8e,0x0f,0xbe,0x93,0x3f,0xf0,0xf8,0x5d,0xd9,
+ 0x74,0x8f,0x6c,0x35,0x18,0xd4,0xd6,0xe5,0x3a,0x3a,0x3a,0x6a,0x50,0x1c,
+ 0xf3,0x3e,0x0c,0xc1,0x6c,0xf2,0x96,0x36,0x89,0x21,0xb4,0xa5,0x9b,0xd8,
+ 0x6a,0x31,0x26,0xc5,0x44,0xed,0xf0,0x43,0x09,0x66,0xaa,0x33,0x57,0x0e,
+ 0xd6,0x5f,0xfe,0x71,0x39,0xe8,0x05,0xcb,0x85,0xaa,0x51,0xd4,0xad,0x3f,
+ 0x3a,0xc7,0x12,0x0c,0x93,0x75,0xd6,0xa5,0x58,0x97,0x43,0xf4,0x7b,0xcb,
+ 0x6f,0x7d,0xe4,0xfe,0x90,0x2a,0x45,0xf2,0x99,0x71,0x99,0x8a,0xd6,0x49,
+ 0xea,0x28,0xe1,0xd4,0x1d,0xa7,0xa2,0x5e,0xa3,0xac,0x79,0xdb,0xbb,0xa6,
+ 0x1f,0xfd,0x95,0x53,0xbb,0xf6,0xa7,0x5a,0x2e,0x57,0x61,0x3d,0x46,0x1b,
+ 0x82,0x2a,0x62,0x4c,0x75,0xd2,0xca,0x67,0x28,0xba,0x59,0x77,0xaa,0x7b,
+ 0xe0,0x40,0x7e,0xf6,0xd5,0x95,0x7a,0x88,0xe9,0xb9,0xa2,0xae,0x2a,0x90,
+ 0xe6,0x53,0x79,0x0c,0xb1,0x85,0x48,0xc6,0x53,0xac,0x34,0x8e,0x0c,0x72,
+ 0xce,0x32,0xb7,0xdd,0xd4,0x28,0x01,0xb7,0x0d,0xb9,0x2b,0x58,0x6c,0x7a,
+ 0xf7,0x07,0x66,0xde,0xfa,0x8e,0x85,0x32,0x5c,0x6a,0x42,0xaf,0xdb,0x9d,
+ 0x11,0xd1,0x31,0xa3,0x6f,0x33,0x7d,0x8f,0x09,0x45,0x5b,0x13,0xd2,0x37,
+ 0x2c,0x74,0x32,0xde,0x64,0xfb,0xf7,0x1e,0x79,0xe1,0xd9,0x73,0x8b,0xd7,
+ 0xe1,0x6d,0xa6,0xe2,0x74,0x64,0x56,0x31,0x26,0x53,0x61,0x55,0xb2,0xc6,
+ 0xc5,0x54,0x57,0xa5,0xbe,0x76,0xbe,0xb2,0x76,0xb8,0xb0,0xe7,0xe0,0x91,
+ 0x43,0xc7,0xca,0xe1,0x60,0x65,0xf9,0x5a,0x96,0x51,0xb7,0xe3,0x62,0x1c,
+ 0xec,0xdb,0x37,0x37,0x3b,0xeb,0xee,0xbc,0x73,0xe6,0xee,0x7b,0x8e,0xec,
+ 0xda,0x63,0x9a,0x66,0xa5,0xaa,0xd6,0x45,0x35,0xcb,0x0a,0x66,0x58,0x4b,
+ 0xc6,0x50,0x8a,0x8d,0x26,0x58,0x6b,0x8b,0xa2,0x78,0xe0,0xfe,0xfb,0x9a,
+ 0xb0,0xf8,0x93,0x97,0xfa,0x65,0xbf,0x69,0xeb,0xec,0xd1,0x26,0x8d,0x5b,
+ 0x30,0xfd,0x53,0x4a,0xe3,0xcd,0x1b,0x23,0xf2,0x00,0x11,0x19,0xa7,0x31,
+ 0xa5,0xfb,0x1f,0xc6,0x6f,0x7c,0xe8,0x8e,0x7d,0x87,0x53,0xaf,0x7c,0x0d,
+ 0x5c,0x79,0x97,0xa5,0xa4,0xe3,0x19,0x28,0x8d,0xf5,0xc2,0x34,0xb2,0xfe,
+ 0xf6,0x04,0xff,0x46,0x8c,0xa5,0x54,0x55,0x83,0x3d,0xbb,0xf6,0x6f,0xac,
+ 0x97,0x67,0x5f,0xee,0x95,0x83,0x9a,0x60,0x89,0x58,0x37,0xc5,0x5b,0x42,
+ 0x02,0x55,0x51,0x63,0x8c,0x48,0x90,0x84,0x67,0x9f,0xd9,0xe8,0x76,0x71,
+ 0xe8,0xe0,0xd1,0xa2,0xe8,0x88,0xd6,0x40,0x02,0x35,0x49,0xea,0xd5,0xd5,
+ 0xc5,0xb9,0x5d,0xc5,0xbe,0x03,0xb3,0xc6,0xd7,0xc3,0x6a,0x29,0xca,0xd0,
+ 0x18,0x01,0xab,0x77,0x0e,0x94,0xac,0x63,0xef,0x5b,0xba,0x61,0xdd,0x84,
+ 0x4a,0x11,0x24,0x35,0x27,0x4f,0x1d,0xe9,0x76,0x86,0xaf,0x5d,0xe8,0x57,
+ 0x25,0xac,0x83,0x04,0x03,0xf5,0x44,0xfa,0xfa,0x63,0x64,0x22,0x6a,0x19,
+ 0x1b,0xaa,0x2a,0x04,0x78,0x7c,0xe4,0xf7,0x8f,0x3d,0xf8,0xe8,0xee,0x41,
+ 0x7d,0x8e,0xec,0xc0,0x79,0xaa,0xaa,0xc4,0xe4,0xda,0x51,0xc3,0x44,0xbd,
+ 0xa9,0xdb,0xc4,0x50,0xb7,0xe5,0x59,0x12,0xe3,0x90,0x08,0x0b,0xbb,0x8f,
+ 0x2d,0x5d,0xbf,0x7a,0xee,0x95,0xa8,0x12,0x5a,0x21,0x0e,0xa3,0xa5,0xcd,
+ 0x25,0x1d,0xe5,0x11,0xf6,0x3e,0x77,0xd6,0xc6,0x26,0xbc,0x7a,0x6e,0x7d,
+ 0x7d,0x7d,0xf5,0xc8,0xe1,0x63,0x27,0x4e,0x1e,0x57,0xc4,0xfe,0x60,0x83,
+ 0x38,0x25,0xa9,0x9c,0x4f,0xa2,0xfd,0x26,0xae,0xb3,0x6d,0xa6,0x67,0x9c,
+ 0xcf,0x38,0xa6,0x20,0x5a,0xd7,0xa1,0x4c,0xa1,0xb1,0xd6,0x38,0xe7,0x00,
+ 0x81,0x44,0x6b,0x52,0x39,0x5c,0x9f,0x9e,0xc9,0xce,0x9c,0x39,0xe3,0x7d,
+ 0xf5,0xfc,0xd3,0xeb,0x61,0x08,0x67,0xa6,0x54,0xfc,0x78,0xe2,0x7b,0xd3,
+ 0x24,0xc6,0xda,0xb6,0xae,0x36,0xc6,0x8c,0xfb,0x64,0xc0,0xe0,0x1d,0xef,
+ 0xc7,0x7b,0x1f,0x3b,0x3c,0xb7,0x50,0x6d,0x0c,0xce,0xfb,0x0c,0xc6,0xd8,
+ 0x50,0xb3,0xe1,0xac,0xc5,0xdf,0x46,0x92,0x74,0xa2,0x09,0x5e,0xdf,0x6d,
+ 0xeb,0x0d,0x49,0xf2,0x1c,0x55,0x55,0x1d,0xdc,0x7f,0xbc,0xae,0xf0,0xd2,
+ 0x4f,0x96,0x86,0x03,0x55,0x6d,0x18,0xce,0x18,0x83,0x16,0xc2,0x42,0x6a,
+ 0x91,0xdb,0x94,0x34,0xc6,0x54,0x74,0x67,0xca,0x5e,0x75,0xee,0xb5,0xc1,
+ 0xca,0xca,0x25,0xe7,0xdc,0x9e,0x3d,0x7b,0x67,0x67,0xe7,0xac,0xb5,0xc6,
+ 0x72,0x4c,0x31,0xc4,0x9a,0x59,0x8c,0x45,0x92,0x90,0x52,0xb2,0x86,0xc0,
+ 0x9a,0x24,0x35,0x75,0x90,0x04,0x6b,0x9c,0xaa,0xa8,0x04,0x63,0x91,0x65,
+ 0x5c,0x95,0xa5,0x2a,0x1d,0x3c,0x70,0x7c,0xef,0xae,0x99,0x2b,0x97,0xaf,
+ 0xaf,0x2d,0x37,0xce,0xe5,0x22,0xcd,0x8e,0xc6,0x1a,0x6b,0x38,0xe1,0x9c,
+ 0x6b,0x87,0x60,0x59,0x96,0xcd,0xee,0x4e,0xff,0xe5,0x7f,0x7d,0xcf,0xec,
+ 0xc2,0x20,0xe9,0x2a,0xdb,0x20,0x2a,0x2a,0xd6,0xbb,0x29,0xdd,0xd4,0x9a,
+ 0x6e,0xae,0x2e,0xa3,0x4d,0xe0,0x41,0x6f,0xdf,0xb3,0xac,0xd1,0x14,0xc5,
+ 0xfb,0x6c,0x66,0x66,0x56,0xd2,0xe0,0xca,0x95,0xb2,0x1c,0x82,0x59,0x52,
+ 0x02,0x93,0x05,0x25,0x22,0x25,0x12,0x20,0xb5,0x40,0x5a,0x8c,0x6a,0x9c,
+ 0x95,0x3a,0x5e,0x3c,0x17,0xce,0x9e,0xbd,0x1c,0xea,0x98,0xbb,0x59,0x46,
+ 0x87,0x34,0x27,0xf5,0xce,0x66,0x86,0x39,0x84,0xa6,0x1c,0x96,0x92,0xa2,
+ 0x75,0x96,0x0c,0x39,0x9b,0xa9,0x90,0x2a,0x1c,0x1b,0x15,0x49,0xb1,0xb1,
+ 0xc6,0xa4,0x18,0x99,0x6d,0xac,0xe4,0xf0,0x81,0x53,0xf7,0xdd,0xfd,0xf0,
+ 0xf2,0x62,0xff,0xb9,0x67,0x2f,0x3b,0xa3,0x49,0xc2,0x2d,0xc8,0x78,0x3a,
+ 0x39,0x5a,0x27,0xa2,0x4e,0xa7,0x33,0xbb,0x3b,0xfd,0xc6,0x87,0xee,0x33,
+ 0xf9,0x46,0x92,0x7a,0xd4,0xa5,0xab,0xb1,0x36,0x4f,0x51,0x88,0x30,0x3e,
+ 0x1f,0x74,0x9c,0xe3,0x6f,0xa4,0xb8,0xbf,0x61,0x25,0x6b,0x55,0x56,0xde,
+ 0xf9,0xc1,0xa0,0x3c,0x7c,0xf8,0xf0,0xec,0xec,0xec,0x73,0xcf,0x5d,0x58,
+ 0xbc,0x0e,0x26,0x95,0x24,0x44,0xed,0xc4,0x3f,0x1a,0x03,0xeb,0xc8,0x58,
+ 0x58,0x6b,0x53,0x4c,0x2a,0x02,0xa6,0x2c,0xc7,0xea,0x75,0x3c,0xf3,0xc3,
+ 0xf5,0xcb,0x97,0x2f,0x4c,0x77,0xf7,0xec,0x5b,0x38,0x96,0xb9,0x69,0x6b,
+ 0xf2,0x14,0x89,0xe0,0x8a,0x7c,0xd6,0x98,0xa2,0xa9,0x52,0x5d,0x37,0xce,
+ 0x17,0x86,0x73,0x26,0xef,0x4c,0x07,0xea,0x34,0x79,0x67,0x67,0xbc,0x9d,
+ 0x87,0xcc,0x74,0xb3,0xc3,0x2b,0xd7,0xf1,0xf5,0x2f,0xff,0xf0,0x9f,0x9e,
+ 0x78,0x71,0x75,0x29,0x86,0x26,0x8d,0xb1,0xef,0x1b,0x6f,0xde,0xfb,0xd4,
+ 0xb6,0xf7,0xcc,0x21,0x84,0x94,0x52,0x8c,0xd1,0xf8,0x78,0xf4,0xe4,0xd4,
+ 0x81,0x43,0x7b,0x98,0x68,0x38,0xac,0x8a,0xa2,0x60,0xe6,0xba,0xae,0x15,
+ 0xc2,0x64,0xc6,0x13,0xab,0x31,0x62,0x7e,0xd3,0xd1,0xf1,0xc6,0x34,0xd2,
+ 0xa4,0x70,0xec,0x0c,0x73,0xbf,0x37,0x64,0x74,0x67,0xba,0xc7,0xce,0xfe,
+ 0x78,0xf8,0x89,0x3f,0x7b,0xe6,0xfb,0xdf,0x05,0x02,0x5a,0xfa,0x38,0x41,
+ 0x15,0x23,0xa6,0xb4,0xf7,0x14,0xa2,0x6e,0x81,0xd9,0x6d,0x5b,0xc7,0x80,
+ 0xc1,0x9b,0xde,0x82,0x53,0xa7,0xe7,0xdf,0xf2,0xf0,0x89,0x3b,0xcf,0x1c,
+ 0x98,0x9e,0xe5,0x24,0x55,0x5d,0x97,0x01,0x83,0x88,0x15,0xe2,0xc8,0xec,
+ 0x99,0x32,0x83,0x8c,0x29,0x27,0x78,0xd2,0x3c,0xd5,0xfe,0xa5,0x17,0xaf,
+ 0x3e,0xf9,0x9d,0x97,0x9e,0xfb,0x51,0xef,0xea,0x45,0xd4,0x03,0x68,0x28,
+ 0x04,0xac,0xa8,0x9d,0xa3,0x10,0xc2,0x58,0x55,0x92,0x5a,0x0c,0x6e,0x3c,
+ 0xfb,0xb8,0x81,0x32,0x20,0x28,0xf0,0x87,0x7f,0x7c,0xfc,0xb1,0xc7,0xdf,
+ 0x4a,0x6e,0x69,0x7d,0xf8,0x53,0x97,0x95,0xd6,0x49,0x08,0xc1,0x9a,0xce,
+ 0x18,0x69,0x90,0x09,0x54,0x83,0xc7,0x68,0xc7,0xed,0x18,0x8b,0x59,0x32,
+ 0xef,0x4c,0x4c,0x65,0x68,0x52,0xee,0xe7,0x53,0xbd,0xeb,0xa9,0xef,0x2c,
+ 0x7d,0xf5,0xf3,0xe7,0x9e,0xfd,0x01,0x58,0xc1,0x28,0x88,0x0c,0xb3,0x82,
+ 0x9a,0x24,0x21,0x46,0x90,0x69,0xfd,0xda,0x8e,0x37,0x0e,0x08,0xa8,0x06,
+ 0x47,0x25,0x64,0x5d,0xec,0x5a,0xc0,0x9e,0xbd,0xd8,0xbb,0x0f,0x47,0x8f,
+ 0xef,0x3d,0x76,0xec,0xc8,0xc2,0xde,0x19,0x5b,0x34,0xc6,0x8b,0x31,0x2e,
+ 0x06,0xf4,0xd6,0xca,0x6b,0x57,0xd7,0xae,0x5e,0x59,0x5d,0x5f,0x8d,0x4f,
+ 0x7f,0x7f,0x6d,0x7d,0x05,0xab,0x8b,0xd0,0x38,0x96,0xfb,0xa3,0x0b,0x48,
+ 0xc2,0xd0,0x5a,0xb4,0xa6,0xa1,0xb1,0x20,0xac,0x75,0xa8,0x1d,0x8c,0xc5,
+ 0xa2,0x8c,0xf9,0x03,0xf8,0xcd,0x0f,0x9d,0x7a,0xec,0x43,0x6f,0x9a,0xda,
+ 0xb5,0xb6,0xb4,0xf6,0x22,0x99,0xfe,0xfc,0xfc,0x6c,0xbf,0xd7,0x6c,0xa1,
+ 0x40,0x5c,0x8f,0xab,0x53,0x40,0xfd,0x26,0x80,0xfe,0x46,0x55,0x61,0xcc,
+ 0x94,0x85,0x3a,0x19,0xcf,0xc6,0x36,0x41,0xd6,0xe6,0xe6,0xe7,0x1e,0x7e,
+ 0xfb,0xf1,0xdc,0xcf,0x5f,0xb9,0xf4,0xc3,0xde,0x0a,0x9a,0xaa,0x74,0xdc,
+ 0x55,0x45,0xd3,0x28,0xc0,0x74,0x73,0xea,0x55,0x03,0x64,0x10,0xb6,0xae,
+ 0x49,0x15,0x16,0x2f,0xe3,0xda,0x25,0x3c,0x07,0x18,0x73,0x3d,0xcb,0xae,
+ 0x7b,0x0f,0x9b,0x81,0x19,0xc6,0x40,0x15,0x4d,0x83,0x41,0x1f,0x55,0x6f,
+ 0x0b,0xef,0x25,0x05,0xc1,0x32,0x0c,0x91,0x49,0x3a,0x68,0xef,0x50,0xa5,
+ 0xcd,0xe6,0x6c,0x32,0x5b,0xed,0x94,0xc9,0x60,0x98,0x57,0x2f,0xcb,0xe7,
+ 0x3e,0x7d,0xd6,0x5a,0xfe,0xc0,0xe3,0x77,0xec,0x9e,0x3b,0xd1,0x2b,0x5f,
+ 0xdd,0xd8,0xd8,0x60,0xf6,0x40,0x84,0xda,0x2d,0xea,0xad,0xf2,0x0d,0xc2,
+ 0xb0,0x37,0x5a,0x67,0x19,0x6f,0x3b,0xa1,0x09,0xa2,0x0d,0xb3,0x2a,0x62,
+ 0x4a,0xd1,0xd9,0x7c,0xf7,0xee,0xdd,0xde,0xcb,0xc6,0xc6,0xda,0xd2,0x12,
+ 0x92,0x04,0xe7,0x28,0x46,0x05,0xc8,0xd9,0x4c,0x74,0x3c,0x59,0x6a,0xcf,
+ 0xe3,0xd1,0xa9,0x0c,0x89,0x90,0x24,0x12,0x47,0x9e,0x22,0x01,0xa1,0x42,
+ 0xd5,0xc7,0xb0,0x87,0xc1,0x2a,0x7a,0x2b,0xe8,0xaf,0xa2,0xdc,0x40,0xac,
+ 0x60,0xd9,0x79,0xdb,0x45,0xcc,0x0c,0x77,0x0c,0x15,0x96,0x33,0x1a,0x31,
+ 0x91,0x23,0x71,0xbb,0xf6,0x8e,0xda,0x14,0x6e,0x8c,0x71,0xce,0xb5,0x19,
+ 0x7d,0x67,0x93,0x11,0x81,0x32,0xe3,0x51,0xf6,0xe4,0x95,0xd7,0x56,0xa6,
+ 0x67,0xaa,0xc3,0x47,0xf6,0x58,0xdf,0x34,0xb1,0xcf,0x3c,0x52,0x15,0x8c,
+ 0xb6,0x0a,0x60,0x73,0x19,0xa3,0xb9,0xed,0x04,0xcf,0x9a,0xd8,0x59,0x2b,
+ 0x1a,0x45,0xc5,0x30,0xd5,0x75,0x15,0x42,0xd5,0xed,0x66,0xf7,0xdd,0x7f,
+ 0x9a,0xb8,0xb9,0xbe,0xb8,0xba,0xbe,0x01,0x68,0x2a,0x0a,0xc7,0xf0,0x21,
+ 0x08,0xc1,0x90,0x9a,0xb1,0x91,0x84,0x90,0x08,0x89,0xa0,0xed,0x6a,0x31,
+ 0x28,0x11,0x98,0xd5,0x31,0x2c,0xc3,0x02,0x96,0x69,0x1a,0xc8,0x01,0x0f,
+ 0x58,0x08,0x43,0xad,0xa4,0x91,0x22,0x5a,0x34,0x89,0xc6,0xa4,0x15,0xb4,
+ 0x51,0x0d,0x4c,0xca,0x96,0x5a,0x98,0x88,0x99,0xdb,0x92,0xbd,0xad,0xd7,
+ 0x43,0x08,0x3b,0x27,0x7e,0x82,0xa6,0x60,0x33,0xab,0x94,0xea,0x01,0x5e,
+ 0xbd,0xb8,0xc1,0xf6,0xc2,0xbe,0x83,0xdd,0xa9,0x69,0x9f,0xa4,0x1e,0x2d,
+ 0xeb,0xdd,0xaa,0xda,0x5b,0xfa,0x27,0xdd,0x76,0xbb,0x83,0xa6,0xaa,0xa6,
+ 0xba,0x1d,0x22,0x84,0x26,0x58,0xcb,0xc6,0x40,0x74,0x48,0xa6,0x62,0x1b,
+ 0x0e,0x1d,0xde,0xb3,0x77,0x5f,0xbe,0xbe,0xbe,0x7c,0xe5,0x32,0x42,0x93,
+ 0x08,0x4a,0xb0,0x63,0x8d,0x07,0xc6,0xbd,0x5b,0xdc,0xdc,0x52,0xd7,0xce,
+ 0x84,0x0c,0x7b,0x22,0x56,0x85,0x68,0x82,0x92,0xca,0x78,0xbe,0xae,0x13,
+ 0xa3,0x5c,0x08,0x93,0x1a,0xab,0x96,0x85,0x49,0x99,0xa4,0xbd,0x3f,0xc9,
+ 0x26,0xf2,0x36,0xca,0x56,0xed,0x7c,0x37,0xa5,0x74,0x2b,0x63,0x81,0x34,
+ 0x85,0x64,0x33,0x48,0x42,0x59,0x62,0x76,0x8f,0xde,0xf7,0xc0,0x3c,0xb8,
+ 0x24,0xbe,0x69,0x3d,0xc1,0x08,0xf5,0xd7,0xdb,0x36,0x96,0x1a,0x86,0x6a,
+ 0x92,0xc4,0xed,0xb6,0x43,0x62,0x21,0x53,0x0a,0x7a,0xab,0x1b,0x57,0xe7,
+ 0x77,0xdb,0x43,0x87,0xf6,0xcf,0xce,0xe6,0xa1,0x59,0x5b,0x5f,0xd5,0xa6,
+ 0x16,0xc3,0x5e,0xa4,0xc5,0x33,0xda,0x1e,0x35,0x8d,0x5d,0xbd,0x4d,0xc6,
+ 0x48,0x22,0x22,0x49,0xb4,0x01,0x45,0x9f,0xa9,0xcf,0xd9,0x3a,0x82,0x51,
+ 0xc2,0xa8,0x52,0x63,0x23,0xd6,0x26,0xeb,0xda,0x8d,0x80,0x49,0x54,0x14,
+ 0xc2,0xad,0x8f,0xc3,0x68,0x1b,0x23,0xb4,0x95,0xda,0xb3,0x2c,0xeb,0x74,
+ 0x3a,0x31,0xc6,0x5b,0x84,0xa1,0xb4,0x25,0x94,0x44,0x70,0x81,0x33,0xf7,
+ 0xe3,0xfd,0x8f,0x1d,0x3e,0x7e,0xc7,0x4c,0xd5,0xac,0x1a,0xdb,0xce,0x44,
+ 0xdc,0x38,0x63,0x4c,0xf6,0xd5,0xb7,0x5b,0x67,0x4d,0x4f,0x17,0xcb,0xab,
+ 0xcb,0x31,0xa5,0xa9,0xe9,0xe9,0x24,0xa1,0xaa,0xfb,0xe0,0x06,0x8c,0xb9,
+ 0x5d,0xf9,0xf2,0xca,0xb2,0x28,0xee,0xba,0xfb,0xde,0x3b,0x4f,0x9f,0x8e,
+ 0xa9,0x77,0xf5,0x7a,0xaf,0x3f,0x08,0x34,0x22,0x89,0x6d,0x82,0xd7,0x6d,
+ 0xbd,0x07,0x11,0x55,0x88,0x61,0xcb,0xdc,0x26,0x69,0x15,0x55,0x91,0x14,
+ 0x42,0x94,0x14,0x55,0x22,0x28,0x51,0x8b,0x47,0x25,0x4d,0x09,0xce,0x6e,
+ 0xf1,0xe6,0x44,0x41,0x6c,0x8d,0x7a,0x80,0x05,0x0a,0x56,0xe3,0x46,0x8c,
+ 0xcc,0xd9,0xdd,0x69,0x76,0x77,0x32,0x3e,0x0e,0xcb,0xb1,0xd6,0x85,0xc6,
+ 0x4b,0x3b,0xc6,0xa2,0xaa,0x99,0x3d,0x68,0x14,0xc7,0x4e,0xe1,0x3f,0xfd,
+ 0x4f,0x8f,0x3e,0xf4,0xe8,0xf1,0xde,0xf0,0x22,0x99,0xb6,0x46,0xa5,0x51,
+ 0xc9,0x4e,0xe3,0x49,0x3b,0xe9,0x36,0x41,0xeb,0x1b,0x5d,0x36,0x46,0x37,
+ 0x13,0xda,0x46,0x47,0x2c,0x13,0x72,0xd2,0x4e,0x6c,0x72,0x83,0x39,0xc6,
+ 0xd4,0xf3,0xcf,0xfd,0xf4,0x2b,0x5f,0x38,0xff,0xd4,0x37,0xda,0x12,0x6c,
+ 0x44,0xe6,0xdc,0x7a,0x61,0x1a,0x8d,0x3c,0x27,0x9e,0xd9,0xb1,0x91,0x24,
+ 0x09,0x04,0x26,0x10,0x41,0x05,0x2d,0x70,0xd0,0x76,0x2d,0xa3,0x9d,0xa5,
+ 0xaa,0x04,0x43,0x44,0x0c,0x56,0x42,0x02,0xb9,0x3c,0x85,0xd0,0xc0,0xe1,
+ 0x1d,0xef,0xc5,0xef,0x7e,0xf4,0x3d,0xb3,0xb3,0xb3,0x3f,0x79,0xe1,0xd2,
+ 0xff,0xf9,0x7f,0xfc,0x20,0xb6,0xa7,0xa5,0x3a,0xa4,0x00,0x33,0x22,0x2f,
+ 0xb9,0x29,0x84,0x06,0x77,0xbf,0x05,0x7f,0xfc,0x5f,0xde,0x75,0xf2,0x74,
+ 0xd1,0x2b,0xcf,0x29,0x6f,0xe4,0x05,0xd5,0x75,0x7d,0x03,0x45,0x78,0xe2,
+ 0xf8,0xe6,0xdb,0xd3,0x48,0x63,0xa4,0x4e,0xda,0x84,0x09,0x49,0xdb,0xa6,
+ 0x81,0x39,0x67,0xf6,0xd6,0x3a,0x85,0x08,0x55,0xdd,0x19,0x3a,0x78,0x64,
+ 0xf6,0xae,0xbb,0x0f,0x14,0x59,0x98,0x9a,0xe2,0xc1,0xb0,0xa9,0x6a,0x00,
+ 0x92,0x79,0xe3,0x9c,0x53,0x81,0xe8,0x24,0xfa,0x61,0x09,0x5e,0xe1,0x54,
+ 0xc1,0x26,0x6d,0x89,0x87,0xc0,0x86,0x33,0x6b,0xbd,0xb5,0xbe,0x09,0xa2,
+ 0xaa,0x4c,0x6c,0x2c,0x13,0x09,0x51,0x52,0x8a,0x30,0x51,0x29,0x8a,0x4d,
+ 0xf7,0x3f,0x8c,0x8f,0xfc,0xfe,0xb1,0xf7,0x3e,0x76,0x78,0x76,0x61,0x60,
+ 0xb2,0xde,0x81,0x43,0xbb,0x3b,0x45,0x3a,0x77,0x7e,0xbd,0xee,0xc3,0x17,
+ 0x36,0xeb,0x64,0xa1,0x0e,0x60,0x74,0xe6,0x50,0x57,0x78,0xfb,0x7b,0xf1,
+ 0xd1,0x3f,0x78,0xe4,0xe8,0xc9,0xbc,0x0c,0x17,0x9a,0xb4,0x3c,0x66,0x35,
+ 0xd1,0xf6,0x41,0x97,0x4e,0xa4,0x30,0xfa,0x39,0x8c,0x85,0xc9,0x22,0xa0,
+ 0x55,0xf6,0xa1,0xae,0x43,0x4a,0xc2,0xcc,0xaa,0x34,0x1c,0x0c,0xcb,0x72,
+ 0xc8,0x4c,0xdd,0x4e,0xfe,0xe0,0x5b,0x4f,0x1f,0x3d,0x3e,0x3d,0x3d,0x57,
+ 0x09,0x86,0x83,0x01,0xca,0x4a,0x62,0x0c,0x2a,0x29,0xcb,0x72,0x26,0xcf,
+ 0x64,0xad,0xe9,0x7a,0x37,0xe5,0x6c,0x07,0xea,0x5b,0xd0,0x5f,0x55,0x46,
+ 0xf4,0x13,0xb5,0x44,0x86,0x88,0xdb,0xf9,0x91,0x73,0xec,0x1c,0x40,0x41,
+ 0x21,0x4a,0xb0,0x0e,0xae,0x83,0x07,0xdf,0xc9,0xef,0xfe,0xc0,0xcc,0x6f,
+ 0x7c,0xe8,0x8e,0x07,0x1f,0xdd,0x3d,0xb7,0x50,0x25,0x5d,0x4d,0x5a,0x33,
+ 0xd1,0x3d,0x77,0xbf,0x49,0xa4,0x7a,0xe5,0xd5,0xd5,0xaa,0x9f,0x92,0x06,
+ 0x5f,0x70,0x0a,0x1a,0x80,0xbb,0xdf,0x8c,0x8f,0xfe,0xc1,0x23,0x6f,0x79,
+ 0xe8,0x58,0xd9,0x5c,0x6b,0xe2,0x52,0x5e,0x10,0x20,0x31,0x26,0x66,0x3b,
+ 0x81,0x34,0xdc,0xf0,0xef,0x6d,0xae,0xb1,0xbb,0x15,0x5b,0x97,0x01,0x96,
+ 0x04,0x63,0xbc,0xb3,0x59,0x8c,0xa8,0xab,0xa8,0x4a,0xa4,0x3c,0x55,0xe4,
+ 0x8e,0xbb,0xa9,0x99,0x5e,0xbc,0x9a,0x7e,0xfc,0xec,0xf2,0xd3,0xff,0x7c,
+ 0xe1,0xa5,0x17,0xfb,0x8b,0xd7,0xc0,0x84,0x11,0xcb,0x7d,0x1c,0xa1,0x4c,
+ 0x4e,0x55,0x15,0xd5,0x0e,0x33,0x60,0x82,0x75,0x88,0x69,0x0c,0x5e,0x1a,
+ 0x1c,0x3d,0x86,0xd3,0x67,0x76,0x1d,0x3c,0xd6,0x7d,0xeb,0x3b,0x0e,0xef,
+ 0x3d,0x82,0xbc,0x3b,0xdc,0x18,0x5c,0xac,0x9a,0xe5,0x2c,0xcb,0x48,0xa7,
+ 0xca,0xbe,0xdb,0x33,0x7b,0x6f,0xd9,0x9b,0xf9,0xd2,0xe7,0x9e,0xfe,0xf4,
+ 0xdf,0xbc,0x32,0x5c,0x05,0x14,0xb6,0xc0,0xe1,0x63,0xf8,0x5f,0xfe,0xb7,
+ 0x77,0x1f,0x3e,0x61,0x94,0x7b,0x1b,0xfd,0x4b,0x79,0x27,0xe5,0x05,0x35,
+ 0x4d,0x23,0x32,0xf1,0xf5,0x11,0x24,0xb7,0x5a,0x3f,0x76,0x1b,0xc6,0xda,
+ 0x71,0x39,0x34,0xb2,0xac,0x88,0x41,0x42,0x88,0xed,0x2c,0x8f,0xc8,0x49,
+ 0x52,0x42,0x2a,0x87,0x4b,0xcc,0x5c,0x64,0x0b,0x53,0xc5,0x21,0x4b,0x0b,
+ 0xab,0x4b,0xe9,0xdc,0x2b,0x8b,0x97,0x2f,0xae,0x3f,0xf9,0xbd,0x17,0x57,
+ 0x57,0x70,0xfd,0x1a,0x36,0xd6,0x47,0xcc,0xa5,0x6d,0x3f,0x37,0xec,0xf9,
+ 0x33,0x00,0xd0,0x9d,0xc5,0x91,0x63,0x38,0x76,0x12,0x27,0x4e,0xed,0x3a,
+ 0x75,0xe7,0x81,0x13,0x27,0x0f,0x2c,0xec,0x9b,0x5e,0xde,0xb8,0xd8,0xaf,
+ 0xae,0x34,0xe9,0xba,0xf5,0xc1,0x18,0x15,0x61,0x48,0xe1,0xcc,0x6c,0x7f,
+ 0x83,0xf6,0xcc,0xdf,0x31,0x58,0xcf,0xbf,0xfd,0x0f,0x2f,0xfc,0xed,0xa7,
+ 0x2e,0x5c,0xbf,0x88,0xbb,0xee,0xc7,0x47,0xff,0xc7,0x87,0x1e,0x78,0x68,
+ 0x77,0xbf,0x3a,0x17,0xa5,0x6f,0x6c,0x00,0x85,0x24,0x0d,0x93,0x71,0x2e,
+ 0x8b,0x61,0x02,0x9e,0xfe,0x57,0x32,0xd6,0x04,0xbf,0x6b,0xfb,0x93,0x36,
+ 0x4d,0xcc,0xf3,0x5c,0x12,0xea,0xba,0x21,0x32,0x44,0xa4,0x42,0xd6,0xa1,
+ 0xc8,0x62,0x08,0x75,0x6c,0x1c,0xb4,0xf0,0x66,0x2e,0xf3,0x73,0xde,0x4e,
+ 0x33,0xe5,0x4d,0xad,0xab,0x2b,0xfd,0x2b,0x97,0xd7,0x2e,0x5f,0x5c,0xbe,
+ 0x7a,0x79,0x7d,0xf1,0x7a,0x6f,0x65,0x09,0x83,0x3e,0x9a,0x7a,0x94,0xd7,
+ 0xad,0x43,0x51,0x60,0x66,0xd6,0xce,0xcc,0x16,0x45,0x17,0xf7,0xdc,0x7b,
+ 0x62,0xf7,0xde,0xec,0xe0,0xe1,0xe9,0x5d,0x0b,0xde,0xb8,0xb2,0x6a,0x56,
+ 0xfb,0x83,0xe5,0x32,0x0c,0xba,0xdd,0xa2,0x0a,0x7d,0x70,0x3f,0xcb,0xc9,
+ 0x18,0x13,0x03,0xab,0x58,0x6b,0x8a,0xd0,0x68,0x68,0xec,0xae,0xd9,0xe3,
+ 0xd5,0xc0,0x7f,0xf5,0xcb,0xdf,0x3d,0xf7,0x6a,0x7c,0xf4,0xed,0x87,0xdf,
+ 0xf6,0xf6,0x7b,0x7b,0xe5,0xab,0x4d,0x5c,0xc9,0x0b,0xe3,0x33,0x1e,0x0c,
+ 0x7a,0xa2,0xa9,0xdd,0x69,0x62,0x8d,0xdf,0xbe,0x72,0x49,0x6e,0x26,0x1a,
+ 0xfd,0x1c,0xc6,0xda,0xae,0x6e,0xe9,0xf7,0xfb,0x73,0x73,0x73,0xc6,0x98,
+ 0x18,0xc4,0x5a,0x2b,0x22,0x4d,0x13,0xac,0x35,0xa1,0xda,0xe8,0x74,0x3a,
+ 0x45,0xd1,0x8d,0x01,0xbd,0x5e,0x7f,0x38,0xa8,0x98,0xed,0xa8,0x29,0x21,
+ 0x6f,0x4d,0x61,0x4d,0x97,0xd1,0x55,0xf1,0xb1,0x71,0x29,0x22,0x46,0x88,
+ 0x88,0x24,0x80,0xc4,0x18,0x93,0x65,0x2e,0xcb,0x9c,0xf3,0xa8,0x9b,0xbe,
+ 0xa0,0x8c,0xa9,0x17,0xa5,0x27,0x28,0x41,0xb5,0xb1,0x4a,0xc6,0x54,0xa5,
+ 0x76,0xa6,0xba,0xa0,0x7a,0x58,0xf6,0x54,0x50,0x14,0x5d,0x66,0x5b,0x55,
+ 0x55,0x51,0xb8,0xe1,0xb0,0x82,0x66,0xde,0x4e,0xf7,0x7b,0x81,0xe0,0xe6,
+ 0x77,0x4d,0x97,0xd5,0x06,0xb8,0x4c,0xa9,0x31,0x2d,0xc6,0x3f,0xaa,0x5d,
+ 0xb9,0xa9,0xa3,0xf7,0x7e,0x2c,0x4b,0xda,0xce,0x94,0x9c,0xf8,0xf6,0x95,
+ 0xdb,0x33,0xd6,0x0e,0xab,0x18,0x5b,0x60,0xa4,0xae,0xeb,0x94,0x52,0xa7,
+ 0xd3,0x69,0xb7,0x24,0x5b,0x6b,0x0d,0x21,0x85,0x3a,0x84,0x44,0x44,0xce,
+ 0x39,0x6b,0x59,0x55,0x92,0x84,0xb6,0x6e,0x50,0x25,0x49,0x46,0xa2,0x53,
+ 0xf1,0x50,0x0f,0x25,0x6b,0x6d,0x8b,0x05,0xb7,0xd4,0xb0,0x94,0x52,0x4a,
+ 0x21,0xa5,0x56,0x37,0x91,0x88,0x85,0x4d,0x64,0x56,0x50,0x54,0x6d,0xb7,
+ 0x57,0xe4,0x00,0x8f,0xa5,0x6f,0x9b,0x8c,0xc3,0xa0,0x1a,0x66,0x67,0x67,
+ 0x37,0x36,0x36,0x54,0x69,0xaa,0x3b,0x57,0xd7,0x4d,0x5d,0x57,0x00,0xa6,
+ 0x67,0xba,0x2d,0x03,0xc3,0x5a,0x6b,0xad,0xad,0xaa,0x4a,0x12,0xba,0xdd,
+ 0x6e,0x08,0x61,0x9b,0x4f,0xfd,0xeb,0x19,0x6b,0xe7,0x65,0x22,0xdb,0x43,
+ 0x7d,0x93,0xc2,0x3e,0xae,0xeb,0xb6,0xeb,0x7c,0x27,0xc4,0xa3,0x2d,0xe9,
+ 0x6b,0x44,0x2f,0x18,0xcb,0x57,0x26,0x15,0x6b,0xb4,0x6d,0x3f,0xcc,0xb6,
+ 0xe7,0x6f,0x09,0xb5,0x9b,0x0b,0xdc,0xe4,0x06,0x2d,0xc3,0xc4,0xf5,0xdf,
+ 0xc0,0x11,0xa5,0x1b,0xb5,0x0f,0x3b,0x88,0x33,0x7f,0xde,0x2d,0x47,0xb2,
+ 0xfd,0xbb,0x24,0x5e,0xe7,0x61,0xba,0x4d,0x85,0xa1,0xdb,0xbf,0xc6,0xa3,
+ 0x2d,0x0e,0xb6,0xf4,0x7d,0x0a,0x0a,0xe3,0x0b,0xb0,0x37,0x52,0x81,0x69,
+ 0x3b,0x6e,0x39,0xb9,0x57,0x6d,0x34,0xad,0xe2,0x31,0x69,0x7a,0xbc,0x2f,
+ 0xae,0x55,0x41,0x2a,0x8f,0x96,0x7a,0x52,0x82,0xca,0xa8,0xd7,0xdb,0x32,
+ 0xe5,0x24,0x3d,0x59,0x6e,0xfc,0x84,0x76,0x52,0xa4,0xd8,0xdb,0xac,0x18,
+ 0x6e,0x36,0xd9,0x4e,0x0a,0xcf,0x91,0x5b,0xe8,0x78,0xb8,0xb7,0xe5,0xd2,
+ 0x06,0x23,0xf5,0xfd,0xf6,0xcf,0x53,0x5b,0x8d,0x03,0x43,0x37,0x57,0x72,
+ 0xa6,0xed,0x5f,0xe1,0x84,0x91,0x75,0xc6,0xd4,0xd7,0x56,0xab,0x37,0x9e,
+ 0x2f,0x8c,0x77,0x50,0x8e,0x94,0x07,0x3c,0x16,0x80,0x8c,0x97,0x0e,0x2b,
+ 0xdf,0xa8,0x66,0xda,0x39,0x6e,0xc6,0x5b,0x08,0xe8,0x5f,0xa6,0x0a,0xfb,
+ 0x59,0xe5,0x95,0x8c,0xc6,0xfd,0x37,0xda,0xeb,0x86,0x48,0x1c,0x07,0x88,
+ 0xee,0x5c,0x70,0xdc,0xc4,0x6b,0xa5,0xd7,0x11,0x5e,0xed,0xf0,0x55,0x1f,
+ 0x23,0xc6,0xb4,0x80,0xda,0x4d,0x76,0x69,0xe2,0x5b,0x56,0xe4,0x26,0xee,
+ 0xe7,0x38,0x2c,0x48,0x6e,0xbd,0x15,0x9d,0x6e,0x0a,0x61,0xfc,0x3c,0x61,
+ 0xb8,0xf9,0x25,0x5d,0x9b,0x42,0xba,0x5b,0x87,0xe4,0x78,0x25,0xeb,0xd6,
+ 0x6e,0xa0,0x71,0x12,0xa1,0x1d,0x75,0xed,0x14,0x81,0x06,0xa4,0x13,0x5f,
+ 0x31,0xb3,0xf9,0x3c,0x66,0xeb,0x78,0xd9,0xe4,0x4f,0x51,0x04,0xd1,0xc4,
+ 0xf2,0xe9,0x49,0x39,0x7f,0x18,0xaf,0x2a,0x90,0x4d,0xcd,0x0c,0x30,0x99,
+ 0x28,0x27,0xbe,0x6d,0xeb,0xe6,0x05,0xd5,0xa3,0xbd,0xbc,0x3a,0x99,0xe0,
+ 0x6f,0xcf,0xb3,0x26,0x3f,0xbd,0x1d,0x29,0xcf,0x0c,0x95,0xf1,0x98,0x84,
+ 0x6e,0x55,0xe3,0xed,0x54,0xe5,0x6e,0x92,0x58,0x78,0xbb,0x5a,0x66,0x33,
+ 0x3d,0x9b,0x6d,0xe9,0x4f,0x2d,0xe0,0xc7,0x4b,0x5a,0x5b,0x0e,0x97,0x19,
+ 0x0b,0xdb,0x5a,0x4d,0x0b,0x4f,0xe0,0xc2,0x37,0x27,0x26,0xdc,0xc4,0x8e,
+ 0x9c,0xb0,0x14,0xb7,0xad,0xb5,0xdf,0xcc,0x72,0xb7,0x65,0xac,0x16,0x15,
+ 0x6a,0x53,0xcf,0x36,0x07,0xd6,0x9b,0x71,0x68,0xa1,0x30,0xe1,0x7a,0x3c,
+ 0xb1,0x18,0x68,0x92,0x94,0xb6,0x19,0x2f,0xa4,0x3a,0xa2,0x47,0xed,0xb0,
+ 0x49,0x61,0x04,0x33,0x6d,0xd7,0x2d,0xb7,0xcb,0x71,0x29,0x4c,0xc4,0x29,
+ 0x8f,0x72,0x19,0x25,0xa8,0x01,0xb5,0xb3,0x12,0xfc,0x8b,0xbf,0x17,0x44,
+ 0x47,0x96,0xa2,0x6a,0xec,0xc5,0xe6,0xb6,0x8d,0xc5,0x13,0xcb,0x6b,0x27,
+ 0x15,0x3c,0xba,0x53,0x6e,0xdf,0x14,0x46,0xf1,0xa6,0xba,0x60,0x64,0x08,
+ 0xdd,0x41,0x00,0xb3,0x2d,0xb9,0x6e,0x7d,0xd4,0xbc,0x5d,0xdf,0x28,0xdb,
+ 0x5f,0x97,0x77,0xfa,0xd6,0x36,0xde,0x96,0x80,0x76,0x7e,0x2d,0xdd,0x09,
+ 0x1a,0xe4,0xed,0x30,0x16,0xff,0x3c,0x39,0x8b,0x47,0xe4,0xc4,0x1b,0xf9,
+ 0xbb,0xb7,0x2c,0x4f,0x58,0x6f,0x95,0xb0,0xd3,0xc4,0x1b,0xde,0x74,0x55,
+ 0xda,0xce,0x8a,0x91,0xd7,0x6b,0xe0,0x75,0x3c,0xe3,0xbb,0xb9,0x14,0x68,
+ 0x85,0xa6,0xd0,0xad,0x0f,0xec,0x86,0x90,0xdf,0x61,0x65,0xf7,0xc4,0x42,
+ 0x36,0x25,0xc0,0x8f,0x5a,0xeb,0x89,0xa3,0xe0,0xb6,0x3c,0xeb,0x67,0x20,
+ 0x10,0xff,0x72,0xac,0xe2,0x5f,0xe5,0x4f,0xe4,0x75,0x3f,0xd7,0x5b,0x3d,
+ 0x46,0x5e,0xf7,0xd9,0x6e,0xf0,0x89,0x9f,0x25,0x47,0xf9,0xef,0xb7,0x7f,
+ 0xa1,0x9b,0xfc,0xf7,0xdb,0xce,0xb7,0xff,0x17,0xf0,0xc3,0x93,0x96,0x33,
+ 0xe5,0xd9,0x1c,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
+ 0x82
+};
+
+#include <qcstring.h>
+#include <qdict.h>
+static struct Embed {
+ unsigned int size;
+ const unsigned char *data;
+ const char *name;
+} embed_vec[] = {
+ { 601, arrow_xbm_data, "arrow.xbm" },
+ { 601, cross_xbm_data, "cross.xbm" },
+ { 598, hand_xbm_data, "hand.xbm" },
+ { 604, hsplit_xbm_data, "hsplit.xbm" },
+ { 601, ibeam_xbm_data, "ibeam.xbm" },
+ { 592, no_xbm_data, "no.xbm" },
+ { 607, sizeall_xbm_data, "sizeall.xbm" },
+ { 601, sizeb_xbm_data, "sizeb.xbm" },
+ { 601, sizef_xbm_data, "sizef.xbm" },
+ { 601, sizeh_xbm_data, "sizeh.xbm" },
+ { 601, sizev_xbm_data, "sizev.xbm" },
+ { 607, uparrow_xbm_data, "uparrow.xbm" },
+ { 604, vsplit_xbm_data, "vsplit.xbm" },
+ { 598, wait_xbm_data, "wait.xbm" },
+ { 767, small_book_xpm_data, "small/book.xpm" },
+ { 3100, small_databrowser_xpm_data, "small/databrowser.xpm" },
+ { 3100, small_datatable_xpm_data, "small/datatable.xpm" },
+ { 3164, small_dataview_xpm_data, "small/dataview.xpm" },
+ { 4330, small_editdelete_xpm_data, "small/editdelete.xpm" },
+ { 2428, small_editlower_xpm_data, "small/editlower.xpm" },
+ { 2365, small_editraise_xpm_data, "small/editraise.xpm" },
+ { 1483, small_form_xpm_data, "small/form.xpm" },
+ { 3981, small_home_xpm_data, "small/home.xpm" },
+ { 5406, small_image_xpm_data, "small/image.xpm" },
+ { 3179, small_layout_xpm_data, "small/layout.xpm" },
+ { 3621, small_left_xpm_data, "small/left.xpm" },
+ { 1131, small_newform_xpm_data, "small/newform.xpm" },
+ { 2434, small_print_xpm_data, "small/print.xpm" },
+ { 3634, small_right_xpm_data, "small/right.xpm" },
+ { 495, small_adjustsize_png_data, "small/adjustsize.png" },
+ { 648, small_buttongroup_png_data, "small/buttongroup.png" },
+ { 817, small_checkbox_png_data, "small/checkbox.png" },
+ { 585, small_closebutton_png_data, "small/closebutton.png" },
+ { 549, small_combobox_png_data, "small/combobox.png" },
+ { 553, small_connecttool_png_data, "small/connecttool.png" },
+ { 1133, small_customwidget_png_data, "small/customwidget.png" },
+ { 505, small_dateedit_png_data, "small/dateedit.png" },
+ { 965, small_datepicker_png_data, "small/datepicker.png" },
+ { 1074, small_datetimeedit_png_data, "small/datetimeedit.png" },
+ { 1024, small_dial_png_data, "small/dial.png" },
+ { 744, small_editbreaklayout_png_data, "small/editbreaklayout.png" },
+ { 485, small_editcopy_png_data, "small/editcopy.png" },
+ { 649, small_editcut_png_data, "small/editcut.png" },
+ { 520, small_editgrid_png_data, "small/editgrid.png" },
+ { 706, small_edithlayout_png_data, "small/edithlayout.png" },
+ { 809, small_edithlayoutsplit_png_data, "small/edithlayoutsplit.png" },
+ { 902, small_editpaste_png_data, "small/editpaste.png" },
+ { 690, small_editslots_png_data, "small/editslots.png" },
+ { 289, small_editvlayout_png_data, "small/editvlayout.png" },
+ { 355, small_editvlayoutsplit_png_data, "small/editvlayoutsplit.png" },
+ { 1408, small_exec_png_data, "small/exec.png" },
+ { 313, small_filenew_png_data, "small/filenew.png" },
+ { 681, small_fileopen_png_data, "small/fileopen.png" },
+ { 328, small_filesave_png_data, "small/filesave.png" },
+ { 400, small_frame_png_data, "small/frame.png" },
+ { 439, small_groupbox_png_data, "small/groupbox.png" },
+ { 837, small_help_png_data, "small/help.png" },
+ { 613, small_iconview_png_data, "small/iconview.png" },
+ { 1155, small_konsole_png_data, "small/konsole.png" },
+ { 953, small_label_png_data, "small/label.png" },
+ { 558, small_lcdnumber_png_data, "small/lcdnumber.png" },
+ { 461, small_lineedit_png_data, "small/lineedit.png" },
+ { 287, small_line_png_data, "small/line.png" },
+ { 386, small_listbox_png_data, "small/listbox.png" },
+ { 759, small_listview_png_data, "small/listview.png" },
+ { 454, small_multilineedit_png_data, "small/multilineedit.png" },
+ { 587, small_ordertool_png_data, "small/ordertool.png" },
+ { 1229, small_pixlabel_png_data, "small/pixlabel.png" },
+ { 586, small_pointer_png_data, "small/pointer.png" },
+ { 609, small_progress_png_data, "small/progress.png" },
+ { 408, small_pushbutton_png_data, "small/pushbutton.png" },
+ { 586, small_radiobutton_png_data, "small/radiobutton.png" },
+ { 592, small_redo_png_data, "small/redo.png" },
+ { 834, small_richtextedit_png_data, "small/richtextedit.png" },
+ { 408, small_scrollbar_png_data, "small/scrollbar.png" },
+ { 843, small_searchfind_png_data, "small/searchfind.png" },
+ { 1053, small_shellscript_png_data, "small/shellscript.png" },
+ { 729, small_slider_png_data, "small/slider.png" },
+ { 715, small_spacer_png_data, "small/spacer.png" },
+ { 455, small_spinbox_png_data, "small/spinbox.png" },
+ { 294, small_statusbar_png_data, "small/statusbar.png" },
+ { 483, small_table_png_data, "small/table.png" },
+ { 572, small_tabwidget_png_data, "small/tabwidget.png" },
+ { 514, small_textbrowser_png_data, "small/textbrowser.png" },
+ { 497, small_textedit_png_data, "small/textedit.png" },
+ { 498, small_textview_png_data, "small/textview.png" },
+ { 1520, small_timeedit_png_data, "small/timeedit.png" },
+ { 1462, small_timer_png_data, "small/timer.png" },
+ { 1262, small_toolbutton_png_data, "small/toolbutton.png" },
+ { 572, small_undo_png_data, "small/undo.png" },
+ { 733, small_disabled_editcut_xpm_data, "small/disabled/editcut.xpm" },
+ { 899, small_disabled_editslots_xpm_data, "small/disabled/editslots.xpm" },
+ { 931, small_disabled_layout_xpm_data, "small/disabled/layout.xpm" },
+ { 733, small_disabled_left_xpm_data, "small/disabled/left.xpm" },
+ { 733, small_disabled_right_xpm_data, "small/disabled/right.xpm" },
+ { 659, small_disabled_adjustsize_png_data, "small/disabled/adjustsize.png" },
+ { 836, small_disabled_connecttool_png_data, "small/disabled/connecttool.png" },
+ { 1126, small_disabled_editbreaklayout_png_data, "small/disabled/editbreaklayout.png" },
+ { 931, small_disabled_editcopy_png_data, "small/disabled/editcopy.png" },
+ { 735, small_disabled_editgrid_png_data, "small/disabled/editgrid.png" },
+ { 601, small_disabled_edithlayout_png_data, "small/disabled/edithlayout.png" },
+ { 754, small_disabled_edithlayoutsplit_png_data, "small/disabled/edithlayoutsplit.png" },
+ { 901, small_disabled_editpaste_png_data, "small/disabled/editpaste.png" },
+ { 617, small_disabled_editvlayout_png_data, "small/disabled/editvlayout.png" },
+ { 752, small_disabled_editvlayoutsplit_png_data, "small/disabled/editvlayoutsplit.png" },
+ { 587, small_disabled_filesave_png_data, "small/disabled/filesave.png" },
+ { 531, small_disabled_redo_png_data, "small/disabled/redo.png" },
+ { 1013, small_disabled_searchfind_png_data, "small/disabled/searchfind.png" },
+ { 541, small_disabled_undo_png_data, "small/disabled/undo.png" },
+ { 1447, mini_down_xpm_data, "mini/down.xpm" },
+ { 991, mini_form_xpm_data, "mini/form.xpm" },
+ { 510, mini_image_xpm_data, "mini/image.xpm" },
+ { 1405, mini_left_xpm_data, "mini/left.xpm" },
+ { 180, mini_resetproperty_xpm_data, "mini/resetproperty.xpm" },
+ { 1573, mini_right_xpm_data, "mini/right.xpm" },
+ { 1378, mini_up_xpm_data, "mini/up.xpm" },
+ { 15068, background_png_data, "background.png" },
+ { 12615, qtlogo_png_data, "qtlogo.png" },
+ { 0, 0, 0 }
+};
+
+static const QByteArray& qembed_findData( const char* name )
+{
+ static QDict<QByteArray> dict;
+ QByteArray* ba = dict.find( name );
+ if ( !ba ) {
+ for ( int i = 0; embed_vec[i].data; i++ ) {
+ if ( strcmp(embed_vec[i].name, name) == 0 ) {
+ ba = new QByteArray;
+ ba->setRawData( (char*)embed_vec[i].data,
+ embed_vec[i].size );
+ dict.insert( name, ba );
+ break;
+ }
+ }
+ if ( !ba ) {
+ static QByteArray dummy;
+ return dummy;
+ }
+ }
+ return *ba;
+}
+
+#endif
diff --git a/kommander/editor/pics/kfontcombo.png b/kommander/editor/pics/kfontcombo.png
new file mode 100644
index 00000000..87835d6c
--- /dev/null
+++ b/kommander/editor/pics/kfontcombo.png
Binary files differ
diff --git a/kommander/editor/pics/kommandersplash.png b/kommander/editor/pics/kommandersplash.png
new file mode 100644
index 00000000..cbc8f863
--- /dev/null
+++ b/kommander/editor/pics/kommandersplash.png
Binary files differ
diff --git a/kommander/editor/pics/large/adjustsize.xpm b/kommander/editor/pics/large/adjustsize.xpm
new file mode 100644
index 00000000..26afadb6
--- /dev/null
+++ b/kommander/editor/pics/large/adjustsize.xpm
@@ -0,0 +1,187 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 149 2",
+" c #181800000000",
+". c #212108080808",
+"X c #292900000000",
+"o c #292908080808",
+"O c #292918181818",
+"+ c #313108080000",
+"@ c #4a4a08080000",
+"# c #424218181818",
+"$ c #525208080000",
+"% c #525210100000",
+"& c #636310100808",
+"* c #737318180808",
+"= c #7b7b10100000",
+"- c #7b7b21211010",
+"; c #7b7b29291818",
+": c #6b6b39393131",
+"> c #737329292121",
+", c #737339393131",
+"< c #636342423939",
+"1 c #7b7b42423131",
+"2 c #5a5a4a4a4242",
+"3 c #7b7b5a5a5252",
+"4 c #7b7b6b6b6363",
+"5 c #7b7b73737373",
+"6 c #7b7b7b7b7b7b",
+"7 c #848421211010",
+"8 c #848429291818",
+"9 c #8c8c29291818",
+"0 c #949421211010",
+"q c #8c8c39392929",
+"w c #848439393131",
+"e c #949431312121",
+"r c #949439392929",
+"t c #a5a521210808",
+"y c #a5a529291818",
+"u c #adad31311818",
+"i c #bdbd31311818",
+"p c #a5a539392929",
+"a c #b5b539392121",
+"s c #bdbd39392929",
+"d c #949442423131",
+"f c #adad4a4a3939",
+"g c #b5b542422929",
+"h c #bdbd42422929",
+"j c #bdbd42423131",
+"k c #bdbd4a4a3131",
+"l c #8c8c4a4a4242",
+"z c #848452524a4a",
+"x c #84845a5a5252",
+"c c #8c8c5a5a5252",
+"v c #949452524a4a",
+"b c #9c9c52524242",
+"n c #949463635a5a",
+"m c #84846b6b6363",
+"M c #8c8c6b6b6363",
+"N c #8c8c6b6b6b6b",
+"B c #8c8c73736b6b",
+"V c #8c8c7b7b7b7b",
+"C c #9c9c73736b6b",
+"Z c #949473737373",
+"A c #9c9c7b7b7373",
+"S c #a5a552524a4a",
+"D c #a5a55a5a5252",
+"F c #b5b552524242",
+"G c #bdbd52524242",
+"H c #bdbd5a5a4a4a",
+"J c #adad63635a5a",
+"K c #a5a57b7b7373",
+"L c #adad7b7b7b7b",
+"P c #b5b56b6b6363",
+"I c #d6d631311818",
+"U c #c6c639392929",
+"Y c #c6c642422929",
+"T c #c6c642423131",
+"R c #c6c64a4a3131",
+"E c #c6c64a4a3939",
+"W c #cece42423131",
+"Q c #cece4a4a3131",
+"! c #cece4a4a3939",
+"~ c #cece52523939",
+"^ c #d6d64a4a3131",
+"/ c #d6d64a4a3939",
+"( c #d6d652523939",
+") c #dede52523939",
+"_ c #e7e742422121",
+"` c #cece52524242",
+"' c #d6d652524242",
+"] c #dede52524242",
+"[ c #dede5a5a4242",
+"{ c #c6c66b6b5a5a",
+"} c #cece63635252",
+"| c #dede63635252",
+" . c #c6c673736363",
+".. c #c6c673736b6b",
+"X. c #cece7b7b6b6b",
+"o. c #d6d673736363",
+"O. c #e7e75a5a4242",
+"+. c #e7e75a5a4a4a",
+"@. c #ffff5a5a4242",
+"#. c #e7e763634a4a",
+"$. c #efef63634a4a",
+"%. c #e7e76b6b5252",
+"&. c #efef6b6b5252",
+"*. c #ffff6b6b5252",
+"=. c #f7f773735a5a",
+"-. c #ffff73735a5a",
+";. c #ffff7b7b6363",
+":. c #949484847b7b",
+">. c #adad84847b7b",
+",. c #b5b584847b7b",
+"<. c #bdbd8c8c7b7b",
+"1. c #cece8c8c7b7b",
+"2. c #ffff84846b6b",
+"3. c #ffff8c8c6b6b",
+"4. c #ffff9c9c7b7b",
+"5. c #949484848484",
+"6. c #94948c8c8c8c",
+"7. c #9c9c8c8c8c8c",
+"8. c #9c9c94949494",
+"9. c Gray61",
+"0. c #a5a584848484",
+"q. c #adad8c8c8484",
+"w. c #adad94948c8c",
+"e. c #a5a59c9c9c9c",
+"r. c #adad9c9c9494",
+"t. c #adad9c9c9c9c",
+"y. c #bdbd8c8c8484",
+"u. c #b5b594948c8c",
+"i. c #bdbd94948c8c",
+"p. c #b5b594949494",
+"a. c #b5b59c9c9c9c",
+"s. c #bdbd9c9c9494",
+"d. c #bdbda5a59c9c",
+"f. c #a5a5a5a5a5a5",
+"g. c #adada5a5a5a5",
+"h. c #adadadada5a5",
+"j. c Gray68",
+"k. c #b5b5a5a5a5a5",
+"l. c #b5b5adadadad",
+"z. c #bdbda5a5a5a5",
+"x. c #bdbdadada5a5",
+"c. c Gray71",
+"v. c #bdbdb5b5b5b5",
+"b. c Gray74",
+"n. c #c6c694948484",
+"m. c #c6c694948c8c",
+"M. c #c0c0c0c0c0c0",
+"N. c #c6c6c6c6c6c6",
+"B. c None",
+/* pixels */
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.y.=.#.w.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B. .$.( M B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.K ] T N B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.>.) h V B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.w.( j 8.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.p.] g 8.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.b.<.1.} ' R H ..K b.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.C U ( ~ ~ ! y 3 B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.b.b T ~ ! a , c.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.j.p T h ; f.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.e.e 8 6.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.g.g.N.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.b.i.r.N.B.B.B.B.B.v.u.q.t.b.B.B.B.B.B.z.y.b.B.B.B.B.B.",
+"B.B.B.B.B.b.X.^ L b.B.B.B.t.Y _ I 0 c b.B.B.b.s.2.o.b.B.B.B.B.B.",
+"k.i.a.x.v.v.{ ) ( J c.B.c.h @.3.*.i = 4 B.b.n.;.O.G l.v.x.d.m.k.",
+"| &.#.#.+.%.' ! ~ ^ S b.0.I -.4.=.a * # v.<.-.( E R ( #.#.+.) d ",
+"` ) Q Y j h Q ~ ! h 9 j.A t ^ [ j 9 & o e.H ^ ! R ! h g s h Y q ",
+"C w z m V :.F Q g - 6.B.7.* 0 0 7 & + O b.f.q s Q k 5 5.B x 1 N ",
+"b.b.b.B.B.B.P u > 9.B.B.b.< $ % @ X 6 B.B.j.l a F b.B.B.b.b.b.",
+"B.B.B.B.B.B.n : j.B.B.B.B.c.2 . . . 5 b.B.B.B.b.M w b.B.B.B.B.B.",
+"B.B.B.B.B.B.c.v.B.B.B.B.B.B.b.j.e.c.N.B.B.B.B.B.b.c.b.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.b.1.{ h.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.b.n.=.) f c.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.a.-.( ! T D b.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.l.=.[ Q R Q U A B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.,.[ E R ! R j r c.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.v.c.t.k s M c.c.b.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.b.` h Z B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.l.~ Y M B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.a./ Y v b.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.w.W Y d b.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.g.q 8 x b.B.B.B.B.B.B.B.B.B.B.B.B.B."
+};
diff --git a/kommander/editor/pics/large/buttongroup.xpm b/kommander/editor/pics/large/buttongroup.xpm
new file mode 100644
index 00000000..ee18a3ab
--- /dev/null
+++ b/kommander/editor/pics/large/buttongroup.xpm
@@ -0,0 +1,79 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 41 1",
+" c #060606060606",
+". c #0e0e0e0e0e0e",
+"X c #1e1e00000000",
+"o c #161616161616",
+"O c #1e1e1e1e1e1e",
+"+ c #262600000000",
+"@ c Gray15",
+"# c #282828282626",
+"$ c Gray18",
+"% c Gray21",
+"& c #3e3e3e3e3e3e",
+"* c #4e4e00000000",
+"= c #5e5e00000000",
+"- c #6c6c00000000",
+"; c #464646464646",
+": c #4e4e4e4e4e4e",
+"> c #565656565656",
+", c Gray37",
+"< c Gray40",
+"1 c Gray43",
+"2 c #767676767676",
+"3 c Gray",
+"4 c #000000008686",
+"5 c #000000008e8e",
+"6 c #000000009696",
+"7 c #000000009c9c",
+"8 c #00000000a4a4",
+"9 c #00000000aeae",
+"0 c #00000000b6b6",
+"q c #00000000bcbc",
+"w c #aaaa00000000",
+"e c #bebe00000000",
+"r c #c6c600000000",
+"t c #cccc00000000",
+"y c #d4d400000000",
+"u c Red",
+"i c #848484848484",
+"p c Gray55",
+"a c Gray59",
+"s c #c0c0c0c0c0c0",
+"d c None",
+/* pixels */
+"ddddddaOo.........$ddddddddddddd",
+"ddaaaa% 1iiiapp3ipadd",
+"daaaip@ <3221222221id",
+"dp311< $&&&&;:,1<1<d",
+"d31<O,< oaaaaaai1$11,d",
+"d32&1ddaaaaaaaaaaaddddddddda:1>d",
+"d22Oaddddddddddddddddddddddd:2,d",
+"d12.adae:add1:::::::::::>idd>1<d",
+"d12.ddruw%daqqqqqqqqqqqqq$dd>2,d",
+"d22.dawe*.daqqq0000009989$dd<2,d",
+"d12.dd# $da6554444444446$dd<2,d",
+"d12.dda>,addi122222222221add,2,d",
+"d12.dddddddddddddddddddddddd>2,d",
+"d12.dddddddddddddddddddddddd>2>d",
+"d22.ddd:,add1,,<,,pddddddddd,2>d",
+"d22.ddeur$daqqqqqq;ddddddddd,2>d",
+"d22.dawt=.aaq99998;ddddddddd,2:d",
+"d22.dd$X $da865556;ddddddddd,2:d",
+"d22 dda:>add1,:::,pddddddddd,2,d",
+"d12.dddddddddddddddddddddddd,2,d",
+"d12oaddddddddddddddddddddddd,2>d",
+"d12oada>>add2,<,<,<,<,<,,add>2:d",
+"d32@adtur@ddqqqqqqqqqqqqq;dd,2>d",
+"d22@adwy-.aa9998999988876&dd,1,d",
+"d22Oad%+ @dd7767666666666;dd>2,d",
+"d12@ada,,add<>>>>>>>>>>>:ida<1>d",
+"d31%3dddddddddddddddddddddda<1,d",
+"d22:>ddddddddddddddddddddddp21,d",
+"d211@,paadaadaaddddddddaaaai21>d",
+"di1<2112223323211111112333i3<11d",
+"da,11111121211221222221111111:pd",
+"dda<>>,>:>,<,,>:::::>::>,>:>,3dd"
+};
diff --git a/kommander/editor/pics/large/checkbox.xpm b/kommander/editor/pics/large/checkbox.xpm
new file mode 100644
index 00000000..7baf3ccb
--- /dev/null
+++ b/kommander/editor/pics/large/checkbox.xpm
@@ -0,0 +1,67 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 29 1",
+" c #272727272727",
+". c Gray18",
+"X c #373737373737",
+"o c #3f3f3f3f3f3f",
+"O c Gray28",
+"+ c Gray31",
+"@ c Gray34",
+"# c #5f5f5f5f5f5f",
+"$ c #676767676767",
+"% c Gray42",
+"& c #777777777777",
+"* c Gray50",
+"= c Gray52",
+"- c Gray56",
+"; c #929292929292",
+": c #9f9f9f9f9f9f",
+"> c #a7a7a7a7a7a7",
+", c #afafafafafaf",
+"< c #b4b4b4b4b4b4",
+"1 c Gray75",
+"2 c #c0c0c0c0c0c0",
+"3 c Gray78",
+"4 c #cbcbcbcbcbcb",
+"5 c #d5d5d5d5d5d5",
+"6 c #dadadadadada",
+"7 c Gray89",
+"8 c Gray97",
+"9 c Gray100",
+"0 c None",
+/* pixels */
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000>&$##@@#@@+@@@#:00000000",
+"0000000,&$++OoOoOOOOOO@o:0000000",
+"0000000&@.+-::>>>>::;#XO@0000000",
+"0000000#O@+<999999994#&OO0000000",
+"0000000@o,1o,9999993+<8@o0000000",
+"0000000@o<9<o,99993O,98$X0000000",
+"0000000@o199>X,993O:998$X0000000",
+"0000000+o1999,X=>+:9998$X0000000",
+"0000000+o19999*Xo$99998$X0000000",
+"0000000@o19999;oX$99998$X0000000",
+"0000000@o<9996++$X<9999#X0000000",
+"0000000@o<995@=88>o<998#X0000000",
+"0000000#X,97@=9999:X198$X0000000",
+"0000000#o:7@-999999,X19#o0000000",
+"0000000#o*$=99999999>X<#o0000000",
+"0000000&oO&9999999999:$o+0000000",
+"0000000>.o#%====*=*=&%O -0000000",
+"00000000;+X..........Xo*10000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000"
+};
diff --git a/kommander/editor/pics/large/combobox.xpm b/kommander/editor/pics/large/combobox.xpm
new file mode 100644
index 00000000..e82d7b7d
--- /dev/null
+++ b/kommander/editor/pics/large/combobox.xpm
@@ -0,0 +1,192 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 154 2",
+" c Gray0",
+". c #737300002929",
+"X c #424200006363",
+"o c #424200007b7b",
+"O c Gray39",
+"+ c #6b6b6b6b6363",
+"@ c Gray42",
+"# c #737373736b6b",
+"$ c #73737b7b6b6b",
+"% c #7b7b7b7b6b6b",
+"& c Gray45",
+"* c #7b7b7b7b7373",
+"= c #7b7b7b7b7b7b",
+"- c #181800008c8c",
+"; c #08080808b5b5",
+": c #08080808bdbd",
+"> c #10100000adad",
+", c #18181818a5a5",
+"< c #18181818adad",
+"1 c #10101010b5b5",
+"2 c #18181818bdbd",
+"3 c #313100009c9c",
+"4 c #393900009494",
+"5 c #21210000bdbd",
+"6 c #292929298c8c",
+"7 c #292929299494",
+"8 c #313131318c8c",
+"9 c #393939399494",
+"0 c #29292929adad",
+"q c #21212121bdbd",
+"w c #29292929b5b5",
+"e c #00000000cece",
+"r c #08080808c6c6",
+"t c #08080808cece",
+"y c #00000000d6d6",
+"u c #00000000dede",
+"i c #08080808d6d6",
+"p c #08080808dede",
+"a c #10101010c6c6",
+"s c #10101010cece",
+"d c #18181818cece",
+"f c #10101010d6d6",
+"g c #10101010dede",
+"h c #18181818d6d6",
+"j c #00000000e7e7",
+"k c #00000000efef",
+"l c #08080808e7e7",
+"z c #00000000f7f7",
+"x c Blue",
+"c c #00000808ffff",
+"v c #08080808ffff",
+"b c #10100000f7f7",
+"n c #10101010e7e7",
+"m c #18181818efef",
+"M c #10101010ffff",
+"N c #21210000c6c6",
+"B c #21210000cece",
+"V c #29290000cece",
+"C c #21212121c6c6",
+"Z c #21212121cece",
+"A c #21212929cece",
+"S c #21212121d6d6",
+"D c #21212121dede",
+"F c #29292929dede",
+"G c #29292929e7e7",
+"H c #21212121ffff",
+"J c #21212929ffff",
+"K c #29292929ffff",
+"L c #31313131efef",
+"P c #39393939ffff",
+"I c #39394242ffff",
+"U c #39394a4affff",
+"Y c #4a4a4a4a9494",
+"T c #42424242b5b5",
+"R c #52525252b5b5",
+"E c #5a5a5a5abdbd",
+"W c #6b6b6b6b9494",
+"Q c #7b7b7b7b8484",
+"! c #7b7b7b7b9c9c",
+"~ c #63636b6ba5a5",
+"^ c #63636b6badad",
+"/ c #7b7b7b7bb5b5",
+"( c #4a4a4a4acece",
+") c #4a4a4a4affff",
+"_ c #52525a5affff",
+"` c #5a5a5a5affff",
+"' c #6b6b6b6bc6c6",
+"] c #6b6b6b6bcece",
+"[ c #6b6b6b6bd6d6",
+"{ c #73737373cece",
+"} c #63636363ffff",
+"| c #63636b6bffff",
+" . c #6b6b6b6bffff",
+".. c #7b7b7b7be7e7",
+"X. c #9c9c00001010",
+"o. c #bdbd00001818",
+"O. c #a5a500003131",
+"+. c #bdbd00002121",
+"@. c #efef00000000",
+"#. c #f7f700000000",
+"$. c Red",
+"%. c #848484847b7b",
+"&. c #8c8c8c8c7b7b",
+"*. c #8c8c8c8c8484",
+"=. c Gray55",
+"-. c #949494948484",
+";. c #949494948c8c",
+":. c Gray58",
+">. c #9c9c9c9c9494",
+",. c #84848484bdbd",
+"<. c #94949494bdbd",
+"1. c #9c9c9c9cb5b5",
+"2. c #a5a5a5a59c9c",
+"3. c #a5a5a5a5a5a5",
+"4. c Gray68",
+"5. c #a5a5a5a5b5b5",
+"6. c #adadadadb5b5",
+"7. c Gray74",
+"8. c #84848484c6c6",
+"9. c #8c8c8c8ccece",
+"0. c #94949494cece",
+"q. c #94949494d6d6",
+"w. c #9c9c9c9cd6d6",
+"e. c #84848484ffff",
+"r. c #8c8c8c8cffff",
+"t. c #94949494ffff",
+"y. c #a5a5a5a5dede",
+"u. c #adadadadd6d6",
+"i. c #b5b5b5b5c6c6",
+"p. c #bdbdbdbdcece",
+"a. c #b5b5b5b5d6d6",
+"s. c #bdbdbdbdd6d6",
+"d. c #adadadade7e7",
+"f. c #bdbdbdbde7e7",
+"g. c #bdbdbdbdffff",
+"h. c #c0c0c0c0c0c0",
+"j. c #d6d6d6d6cece",
+"k. c #dedededed6d6",
+"l. c Gray87",
+"z. c #ceced6d6ffff",
+"x. c #dedededef7f7",
+"c. c #dedededeffff",
+"v. c #efefefefdede",
+"b. c #e7e7e7e7e7e7",
+"n. c #e7e7e7e7efef",
+"m. c #efefefeff7f7",
+"M. c #efefefefffff",
+"N. c #efeff7f7e7e7",
+"B. c #f7f7f7f7e7e7",
+"V. c #ffffffffefef",
+"C. c Gray97",
+"Z. c #fffffffff7f7",
+"A. c Gray100",
+"S. c None",
+/* pixels */
+"W A m l l l l l v v v v v v v v l l l l l l l p v v v n f Z Y 4.",
+"f x k h F F F D A A Z Z Z Z Z Z Z Z S S d d g x B N N N V V b Y ",
+"p x w v.V.V.V.Z.Z.Z.Z.V.Z.Z.V.Z.V.Z.V.V.V.Z.m.L o.$.$.$.#.#.4 q ",
+"p x R Z.M.r.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.d.A.U o $.$.$.$.X.k 2 ",
+"p x E Z.g.z x x z x z x z z z x z x z x z 6 V.) z +.$.$.@.- x 2 ",
+"p x E Z.n.{ [ ] ] ] ] ' ' ' ' ' ] ] ] ] ] 1.A.) x 3 $.$.. z x t ",
+"p x ( Z.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.P x x O.@.> x x t ",
+"l x M _ } } } } } } } } } } } } | } } } ` _ _ c x x 5 X x x x t ",
+"< i i y u x x x k k k k k k k z k k k k k k j k j j j k z x x t ",
+"4.3.3.2.Q j z T 9.y.u.u.a.a.f.f.s.s.s.p.p.S.p.i.6.6.5.<...v x t ",
+"S.S.S.S.S.g y j.B.2.*.*.*.*.*.*.*.*.*.*.=.=.*.*.=.=.>.N.A.K x t ",
+"S.S.S.S.7.S t C.# = A.P x t ",
+"S.S.S.S.7.q s Z.@ + A.I x t ",
+"S.S.S.S.7.C a Z.@ + A.P x t ",
+"S.S.S.S.7.q h A.@ = A.I x t ",
+"S.S.S.S.7.q Z Z.k.-.&.% % % % % % % % % % % % % % &.-.k.A.P x t ",
+"S.S.S.S.7.q S V.c.t.t.r.r.r.r.r.r.r.r.r.r.r.r.r.r.t.t.x.A.P x t ",
+"S.S.S.S.7.q S V. .x x x x x x x x x x x x x x x x x k / A.P x t ",
+"S.S.S.S.7.q F Z. .x x x x x x x x x x x x x x x x x j ^ A.I x t ",
+"S.S.S.S.7.q G V. .x x x x x x x x x x x x x x x x x k ~ A.P x t ",
+"S.S.S.S.7.q D Z.{ k k k k k k k j k j k k j k k k k e ! A.P x t ",
+"S.S.S.S.7.q F V.l.w.0.9.8.8.,.,.,.,.,.,.,.,.8.8.9.0.0.b.A.P x t ",
+"S.S.S.S.7.q Z C.l.>.*.&.% $ * $ # # # # # * $ % %.-.;.l.A.I x t ",
+"S.S.S.S.7.q S A.@ * A.I x t ",
+"S.S.S.S.7.q h Z.@ O A.P x t ",
+"S.S.S.S.7.q a Z.@ + A.P x t ",
+"S.S.S.S.7.q t A.& %.A.P x r ",
+"S.S.S.S.7.q p b.b.3.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.2.b.A.K x 1 ",
+"S.S.S.S.7.q x q.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.z.v x 2 ",
+"S.S.S.S.7.0 x x H J P P P I I I P P P P I I I P P P J H M x x , ",
+"S.S.S.S.S.9 x x x x x x x x x x x x x x x x x x x x x x x x x 8 ",
+"S.S.S.S.S.:.7 < ; r t t t r t t t t t t t t r r t t r : 1 , 8 :."
+};
diff --git a/kommander/editor/pics/large/connecttool.xpm b/kommander/editor/pics/large/connecttool.xpm
new file mode 100644
index 00000000..8a13ff93
--- /dev/null
+++ b/kommander/editor/pics/large/connecttool.xpm
@@ -0,0 +1,187 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 149 2",
+" c #101021217b7b",
+". c #181829297b7b",
+"X c #292931317b7b",
+"o c #39394a4a7b7b",
+"O c #7b7b08080808",
+"+ c #7b7b18181818",
+"@ c #7b7b21212121",
+"# c #000008089494",
+"$ c #00001010a5a5",
+"% c #00001818b5b5",
+"& c #00001818bdbd",
+"* c #101021218484",
+"= c #181829299c9c",
+"- c #10102929adad",
+"; c #18182929adad",
+": c #21213131adad",
+"> c #21213939bdbd",
+", c #00001818efef",
+"< c #00002121d6d6",
+"1 c #00002121dede",
+"2 c #10102929d6d6",
+"3 c #10103131cece",
+"4 c #18183939c6c6",
+"5 c #00002121e7e7",
+"6 c #00002121efef",
+"7 c #00002929efef",
+"8 c #00002121f7f7",
+"9 c #00002929f7f7",
+"0 c #00002929ffff",
+"q c #08082929f7f7",
+"w c #08083131f7f7",
+"e c #08083131ffff",
+"r c #10103131efef",
+"t c #10103131f7f7",
+"y c #10103939ffff",
+"u c #18183939ffff",
+"i c #29294242bdbd",
+"p c #31314242b5b5",
+"a c #31314242bdbd",
+"s c #31314a4abdbd",
+"d c #39394a4abdbd",
+"f c #39395252bdbd",
+"g c #18184242ffff",
+"h c #21214242efef",
+"j c #21214a4affff",
+"k c #29295252ffff",
+"l c #31315252ffff",
+"z c #39396363ffff",
+"x c #4a4a52528c8c",
+"c c #52525a5a8484",
+"v c #4a4a5a5abdbd",
+"b c #52526363b5b5",
+"n c #7b7b7b7b9494",
+"m c #6b6b7373b5b5",
+"M c #42425252d6d6",
+"N c #4a4a6363d6d6",
+"B c #52527373ffff",
+"V c #63637b7bffff",
+"C c #7b7b8484b5b5",
+"Z c #73739494ffff",
+"A c #73739c9cffff",
+"S c #7b7ba5a5ffff",
+"D c #848408080808",
+"F c #9c9c08080808",
+"G c #848431312929",
+"H c #848439393939",
+"J c #8c8c39393131",
+"K c #a5a508080808",
+"L c #adad08080808",
+"P c #b5b508080808",
+"I c #bdbd10101010",
+"U c #b5b531313131",
+"Y c #84844a4a4242",
+"T c #949442424242",
+"R c #94944a4a4a4a",
+"E c #9c9c4a4a4a4a",
+"W c #949452525252",
+"Q c #94945a5a5a5a",
+"! c #9c9c5a5a5a5a",
+"~ c #9c9c6b6b6b6b",
+"^ c #adad73737373",
+"/ c #bdbd63636363",
+"( c #bdbd73737373",
+") c #c6c610101010",
+"_ c #c6c618181818",
+"` c #cece10101010",
+"' c #cece18181818",
+"] c #d6d610101010",
+"[ c #dede10101010",
+"{ c #dede18181818",
+"} c #c6c621212121",
+"| c #cece21212121",
+" . c #cece31313131",
+".. c #dede31313131",
+"X. c #e7e710101010",
+"o. c #e7e718181818",
+"O. c #efef10101010",
+"+. c #efef18181818",
+"@. c #f7f710101010",
+"#. c #f7f718181818",
+"$. c #ffff18181818",
+"%. c #efef21212121",
+"&. c #e7e731313131",
+"*. c #f7f721212121",
+"=. c #ffff21212121",
+"-. c #ffff29292929",
+";. c #cece52525252",
+":. c #d6d642424242",
+">. c #dede42424242",
+",. c #d6d65a5a5a5a",
+"<. c #cece63636363",
+"1. c #ffff4a4a4a4a",
+"2. c #ffff5a5a5a5a",
+"3. c #ffff63636363",
+"4. c #ffff6b6b6b6b",
+"5. c #ffff73737373",
+"6. c #8c8c84849494",
+"7. c #9c9c84848484",
+"8. c #94948c8c9c9c",
+"9. c #8c8c9494b5b5",
+"0. c #94949494adad",
+"q. c #9c9c9c9cadad",
+"w. c #94949494b5b5",
+"e. c #94949c9cb5b5",
+"r. c #9c9ca5a5b5b5",
+"t. c #9c9ca5a5bdbd",
+"y. c #adad8c8c8c8c",
+"u. c #adad94949494",
+"i. c #adad9c9c9c9c",
+"p. c #bdbd8c8c8c8c",
+"a. c #a5a5a5a5adad",
+"s. c #adada5a5a5a5",
+"d. c #adadadada5a5",
+"f. c Gray68",
+"g. c #a5a5adadb5b5",
+"h. c #b5b5adadadad",
+"j. c Gray71",
+"k. c #b5b5bdbdbdbd",
+"l. c #bdbdb5b5b5b5",
+"z. c Gray74",
+"x. c #8484adadffff",
+"c. c #bdbdc6c6c6c6",
+"v. c #ffffa5a5a5a5",
+"b. c #ffffb5b5b5b5",
+"n. c #ffffbdbdbdbd",
+"m. c #c0c0c0c0c0c0",
+"M. c #c6c6c6c6c6c6",
+"N. c #ffffc6c6c6c6",
+"B. c None",
+/* pixels */
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.l./ .| | ' | ' _ } U ! y.z.B.B.e.v d s a s d i p f b m 0.z.B.",
+"z.,.3.5.5.5.4.4.3.2.1.%.[ L R j.k.h l l k j u y w t w 7 5 % x z.",
+"( 1.b.n.n.n.N.N.n.b.v.4.-.{ L G i.N V Z Z S x.x.A V B z j 7 # n ",
+">.$.#.*.#.*.*.=.*.*.#.*.%.+.{ L @ 6.3 , 8 7 q r t t w q 7 6 % o ",
+"&.#.+.+.+.+.+.o.+.X.o.o.o.o.o.' P J 6.4 5 5 5 5 5 5 5 5 5 1 & X ",
+"..#.+.o.o.o.o.o.o.o.o.o.o.o.o.o.{ K G 8.i 5 5 5 5 5 5 5 1 1 & . ",
+"..#.o.o.o.o.o.{ o.o.o.{ o.o.o.o.o.' K Y a.> 5 1 5 1 5 1 5 < & . ",
+">.+.o.o.o.o.{ o.o.o.{ o.o.{ { o.o.o.` O i.q.< 5 1 5 1 5 1 1 & ",
+":.#.+.o.o.o.o.o.{ { o.{ { X.o.{ { { ' D s.z.2 5 5 1 5 1 1 1 & * ",
+";.#.o.o.o.{ o.{ o.[ o.{ o.{ { [ { ] I Y B.w.9 6 5 1 5 5 1 < & * ",
+"<.@.o.o.{ o.{ X.{ o.{ { [ { { { ' I + h.t.r e 7 5 5 1 5 1 1 & ",
+"( O.o.o.o.[ { o.{ { [ o.{ { [ _ L @ f.9.9 g w 5 5 5 1 5 1 < & . ",
+"p.+.o.{ { { { { [ { { { { { ` K + d.r.q g u 5 5 5 1 5 1 1 1 % X ",
+"h.{ X.{ [ { ' { { { ' [ ' ` K @ s.g.q y t 5 5 5 1 5 1 5 1 < $ c ",
+"c.^ ) ) ) ) ) ) ) ` ` ) ) F H f.B.M 0 q 5 1 5 1 5 1 1 1 < & . f.",
+"B.c.u.~ Q W E R T T R W Q 7.z.B.M.C s : ; = - - - - - - = x a.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.",
+"B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B."
+};
diff --git a/kommander/editor/pics/large/customwidget.xpm b/kommander/editor/pics/large/customwidget.xpm
new file mode 100644
index 00000000..bc56d75a
--- /dev/null
+++ b/kommander/editor/pics/large/customwidget.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 3 1",
+" c #a1a1c4c41010",
+". c #c0c0c0c0c0c0",
+"X c None",
+/* pixels */
+"XXXXXXXXXXXX XXXXXXXXXXXXX",
+"XXXXXXXXX XXXXXXXXXX",
+"XXXXXXX XXXXXXXX",
+"XXXXXX XXXXXX",
+"XXXXX XXXXX",
+"XXXX XXXX",
+"XXX XXXXXXXX XXX",
+"XX XXXXXXXXXXXX XXX",
+"XX XXXXXXXXXXXXXX XX",
+"XX XXXXXXXXXX XXXX XX",
+"X XXXXXXXXXX XXXX X",
+"X XXXXXXXXX XXX X",
+"X XXXXXXXXX XXX X",
+" XXXXXXXX XXX ",
+" XXXXXXXX XXXX ",
+" XXXXXX XXXXX ",
+" XXXXXX XXXXXX ",
+" XXXX XXXX ",
+"X XXXX XXX ",
+"X XXX XX X",
+"X XXX X",
+"X XXXX XX X",
+"XX XXXX XXXX X",
+"XX XXXXXXXXXX XX",
+"XXX XXXXXXXXXX XX",
+"XXX XXXXXXXX XX",
+"XXXX X",
+"XXXXX ",
+"XXXXXX ",
+"XXXXXXXX X X",
+"XXXXXXXXXX XXXX XXX",
+"XXXXXXXXXXXXX XXXXXXXX XXX"
+};
diff --git a/kommander/editor/pics/large/datepicker.xpm b/kommander/editor/pics/large/datepicker.xpm
new file mode 100644
index 00000000..f815c73e
--- /dev/null
+++ b/kommander/editor/pics/large/datepicker.xpm
@@ -0,0 +1,121 @@
+/* XPM */
+static char *datepicker[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 93 2",
+" c black",
+". c gray1",
+"X c #060606",
+"o c gray3",
+"O c #0B0B0B",
+"+ c #131313",
+"@ c #151515",
+"# c #191919",
+"$ c gray10",
+"% c #1B1B1B",
+"& c #1D1D1D",
+"* c #280000",
+"= c #002129",
+"- c #00222B",
+"; c #00232B",
+": c #00232C",
+"> c #00242D",
+", c gray14",
+"< c gray15",
+"1 c #3A3A3A",
+"2 c #3C3C3C",
+"3 c #0F3944",
+"4 c #205766",
+"5 c #485356",
+"6 c gray36",
+"7 c #596061",
+"8 c #6C6C6C",
+"9 c gray44",
+"0 c #C01D1D",
+"q c #C83939",
+"w c #D05555",
+"e c #D87272",
+"r c #0061AC",
+"t c #7F8B8E",
+"y c #5595CB",
+"u c #72A7D4",
+"i c #808080",
+"p c gray53",
+"a c #8E8E8E",
+"s c #929292",
+"d c #929EA1",
+"f c #AAAAAA",
+"g c #A3AFB2",
+"h c #A7ADB2",
+"j c #A6B2B5",
+"k c #A7B3B6",
+"l c #A9B5B8",
+"z c #B0B1B0",
+"x c #B1B1B0",
+"c c #B1B1B1",
+"v c #B2B2B2",
+"b c #B6B6B6",
+"n c #B0B6BB",
+"m c #B9B9B9",
+"M c #B9BABB",
+"N c #BFB8BF",
+"B c #DF8E8E",
+"V c #E7AAAA",
+"C c #8DB7D8",
+"Z c #8EB8DC",
+"A c #B8BFC5",
+"S c #AACAE5",
+"D c #C2C3C4",
+"F c #C8CFD0",
+"G c #CAD4DC",
+"H c gray82",
+"J c #D0D6D7",
+"K c #D1D8D9",
+"L c #D2D9DA",
+"P c gainsboro",
+"I c #EAC1C1",
+"U c #EFC7C7",
+"Y c #E7D2D2",
+"T c #EFDADA",
+"R c #C7DCEE",
+"E c #DDE9F3",
+"W c #E1E2E3",
+"Q c gray90",
+"! c #E6E6E6",
+"~ c gray91",
+"^ c #E9E9E9",
+"/ c gray92",
+"( c #EEEEEE",
+") c #F7E3E3",
+"_ c #E3EDF6",
+"` c #F3F3F3",
+"' c #F4F4F4",
+"] c gray98",
+"[ c #FBFBFB",
+"{ c gray99",
+"} c #FEFEFE",
+"| c gray100",
+" . c None",
+/* pixels */
+" . . .3 > > > > > > > > > > > > > > 3 . . .",
+" .4 > 5 1 < % $ $ $ $ $ $ $ $ # @ , 8 > 4 .",
+" .> 5 8 , + | 2 o o o o | 2 o o X & m d > .",
+"3 5 8 m & O P 6 P 6 i s ( } l 3 ",
+"> 7 a ( s p z i i i 9 N i i i m | | K > ",
+"> 8 f ] | | . ] I T ' * Y / ^ ( | | [ > ",
+"> 8 b | | | | | | w w | | 0 V | | | | | ` > ",
+"> 8 b | | r r | | w w | U q V | r r | | W : ",
+"> 8 b | r r r | | w B U e e V | r r r E A - ",
+"> 8 b C r r r | | w ) e q V V | r r r C h = ",
+"> 8 b | C r r | | w | w e V V | r r C | D = ",
+"> 8 b x x C C x | U | U ) ) ) x C C x x ~ ; ",
+"> 8 b | | | | x | _ _ | _ S _ x | | | | G ; ",
+"> 8 b | | | | x | y S | y S y x | | | | n = ",
+"> 8 b x x x x x R Z S x R | y x x x x x M = ",
+"> 8 b | | | | x | S S | | R u x | | | | H - ",
+"> 8 b | | | | x | S S | _ u | x | | | | Q : ",
+"> 7 v { | | | x | S S | y S S x | | | | F > ",
+"3 5 c x x x x x x _ _ x S S S x x x x ! j 3 ",
+" .> t | | | | x | | | | | | | x | | ^ g > .",
+" .4 > l L | | x | | | | | | | x } J k > 3 .",
+" . . .3 > > > > > > > > > > > > > > 3 . . ."
+};
diff --git a/kommander/editor/pics/large/dial.xpm b/kommander/editor/pics/large/dial.xpm
new file mode 100644
index 00000000..fe28e2a1
--- /dev/null
+++ b/kommander/editor/pics/large/dial.xpm
@@ -0,0 +1,51 @@
+/* XPM */
+static char *dial[]={
+"32 32 16 1",
+"h c #764cf3",
+"# c None",
+"m c #3e05e9",
+"n c #6f56bb",
+"g c #8b68f2",
+"a c None",
+"i c #c4b6ec",
+"j c #472d93",
+"b c #d3d6da",
+"c c #a4a4a5",
+". c None",
+"f c #353535",
+"e c #606060",
+"l c #b19dee",
+"d c #8a7eab",
+"k c #4203fe",
+"..........#abcdeeedcba#.........",
+"........#abdefffffffedca#.......",
+"......#aceffffeecdeefffecb#.....",
+".....#acfffedbbbbbbbcefffdb#....",
+"....#acffecbbbghhhgibbceffdb#...",
+"...#bcffdbbigcjkkkkkhlbbcffdb#..",
+"..#bcffebihkmcemkkkkkkhibcffdb#.",
+"..acffebihkkkccjkkkkkkkkibdffca.",
+"..befebihkkkkcbemkkkkkkkkibefeb.",
+".#bffcbhkkkkkcbcjkkkkkkkkhbcffc#",
+".acffbikkkkkkdbbemkkkkkkkklbefea",
+"#befebgkkkkkkdbbcjkkkkkkkkhbcffb",
+"acffcbkkkkkkkdbbbemkkkkkkkklbefd",
+"adfeblkkkkkkknbbbcjkkkkkkkkgbdfe",
+"befebgkkkkkkknbbbbemkkkkkkkhbcfe",
+"befcbhkkkkkkknbbbbcjkkkkkkkkbcff",
+"befdbhkkkkkkkmccccdjkkkkkkkhbcff",
+"befebgkkkkkkkkmmmkkkkkkkkkkhbcfe",
+"acfebikkkkkkkkkkkkkkkkkkkkklbefe",
+"#bffcbhkkkkkkkkkkkkkkkkkkkkbbffc",
+"#befeblkkkkkkkkkkkkkkkkkkkgbcfeb",
+".acffbbhkkkkkkkkkkkkkkkkkkibefca",
+".#befdbikkkkkkkkkkkkkkkkklbcffb#",
+"..acffcblkkkkkkkkkkkkkkkgbbefea.",
+"..#befecblkkkkkkkkkkkkkgbbefeb#.",
+"...abefecbihkkkkkkkkkhlbbefeca..",
+"....abefecbbigkkkkkgibbcefeca...",
+".....#beffecbbbiiibbbceffeca....",
+"......#beffffdcbbbcdefffeca.....",
+".......#acdfffffefffffecb#......",
+".........#abcefffffecba#........",
+"...........#abbbbbbaa#.........."};
diff --git a/kommander/editor/pics/large/disabled/adjustsize.xpm b/kommander/editor/pics/large/disabled/adjustsize.xpm
new file mode 100644
index 00000000..1cc64ae8
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/adjustsize.xpm
@@ -0,0 +1,51 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 13 1",
+" c #767676767676",
+". c Gray49",
+"X c Gray53",
+"o c Gray56",
+"O c #979797979797",
+"+ c #9f9f9f9f9f9f",
+"@ c #a7a7a7a7a7a7",
+"# c #afafafafafaf",
+"$ c #b7b7b7b7b7b7",
+"% c Gray75",
+"& c #c0c0c0c0c0c0",
+"* c #c5c5c5c5c5c5",
+"= c None",
+/* pixels */
+"===========%%%%*%$$%%===========",
+"===========%%%%%$##%%===========",
+"===========%%$$$@@$%%===========",
+"==========%*%$#@@+#%*%==========",
+"=========*%%%$##+@#%%%*=========",
+"=========%%%$$##@@##%%%=========",
+"========%*%$$$##@++@$%*%========",
+"=========%%$#@@@@Oo+#%%=========",
+"=========*%$#+++Ooo@#%%=========",
+"====%*%%%%%%$@+OooO#%%%%*%*%====",
+"===%%%%%%%%%$#+ooO#$%%*%%%%%%===",
+"%%%*%%%%%%*%%$#+O@#%%%%%%%%%%*%%",
+"%%%%%%$$$%%%%$#@+@#$%%%%%%%%%%%%",
+"%%%%%$$$#$$$$@@#@++@$%%**%$%%%$$",
+"$%$%$%$$#@###@#%$Oo+#%**%$$$$##@",
+"$$$$$$##@++@+@$*$+Xo@#$$#@@@#@+X",
+"@#@@@@@++oO++O@#@o.XO@@@+++++OX.",
+"@++++++OooO@+OooX..o+@OOoOO++Ooo",
+"##@##@OXoO@#@OX....O@#+OoO+#@#@@",
+"%$$%$#+O+#$$$@Oo.XO@$$#@OO#$%$$%",
+"%%%%%$#@#$%%%$@+++@$%%%$##$%%%%%",
+"%%*%%%$%%%%%%%%$#@$$%%%%%$%%%%%%",
+"====%%%%%%%*%%%%#@@$%%%%%%%%%===",
+"=====%%%%%*%%**$@++#$%%%%%%%====",
+"=========%%%%%%#@OO+#%%%========",
+"=========%%%$$#@OOO+#%%*========",
+"=========%%%%$@+OO+#$%%%========",
+"=========%%%%$#+OO@$%%%%========",
+"==========%%%$#+OO#$%%%=========",
+"===========%%$@OoO@%%%==========",
+"===========%%$@oXo@$%%==========",
+"===========%%#+. X@%%%=========="
+};
diff --git a/kommander/editor/pics/large/disabled/connecttool.xpm b/kommander/editor/pics/large/disabled/connecttool.xpm
new file mode 100644
index 00000000..8d2f32b2
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/connecttool.xpm
@@ -0,0 +1,57 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 19 1",
+" c #373737373737",
+". c #3f3f3f3f3f3f",
+"X c Gray28",
+"o c Gray31",
+"O c Gray34",
+"+ c #5f5f5f5f5f5f",
+"@ c #676767676767",
+"# c #6f6f6f6f6f6f",
+"$ c #777777777777",
+"% c Gray",
+"& c Gray53",
+"* c #8e8e8e8e8e8e",
+"= c #979797979797",
+"- c #9f9f9f9f9f9f",
+"; c #a4a4a4a4a4a4",
+": c Gray68",
+"> c #b6b6b6b6b6b6",
+", c #c0c0c0c0c0c0",
+"< c None",
+/* pixels */
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"><<><<><<><<><<<><<><<><<><<><<>",
+"<><>>>>>>>>>>>><<>>>>>>>>>>>>><<",
+">>>:::::::;::>>>>>:;;;;;-;;;:>>>",
+">:;-====***&*=;::-&&%%$%$$$%&*-:",
+";-----=-==*%$$&*=&$#####@@@++@$=",
+"=*=------=*&$##$$$####$##@+OOoO#",
+"%&&&*****&%%##@@@@@++++++OOoXXXo",
+"$$$$$$$$$$$###@+++++OooXXXXXX...",
+"$$#$##########@@@++@+oXXXXX... ",
+"$##########@###@@@++#+oX..X... ",
+"$$###@##@#@##@##@++#$$OXX.... ",
+"$########@#@##@@#@@#&%+X.X.... ",
+"%$###@#@#@#@@@#@@+@$&$+oX.X... ",
+"%$##@#@#@#@##@@@+@#%$#OXX..X. ",
+"&$##@#@@#@#@@@@++#$$#OoX.X.... ",
+"*%##@@@@@@@@@@++#$$@OoXX...X....",
+"-&#@@@@@@@@@@+@$%%#OooXX.X....o+",
+":=%$##@#@@#@@#%*=&#OooXXoXXXXO@&",
+">:=*&%%%%%%%&*-:;=%#@@@@@@@@#$*;",
+">>>;;;;;;;;;;:>>>:--=========-:>",
+"<>>>>>>>>>>>>><><>>>>>>>>>>>>>><",
+"<<<<<<<<<><<<<<<<<<<><><>>>><<<>",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
+};
diff --git a/kommander/editor/pics/large/disabled/editbreaklayout.xpm b/kommander/editor/pics/large/disabled/editbreaklayout.xpm
new file mode 100644
index 00000000..c43703c3
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/editbreaklayout.xpm
@@ -0,0 +1,54 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 16 1",
+" c #565656565656",
+". c #5f5f5f5f5f5f",
+"X c #676767676767",
+"o c #6f6f6f6f6f6f",
+"O c #777777777777",
+"+ c Gray50",
+"@ c Gray53",
+"# c Gray56",
+"$ c #979797979797",
+"% c #9f9f9f9f9f9f",
+"& c #a7a7a7a7a7a7",
+"* c #afafafafafaf",
+"= c #b7b7b7b7b7b7",
+"- c Gray75",
+"; c Gray78",
+": c #cdcdcdcdcdcd",
+/* pixels */
+";;;;;:;:;:;:;;----;;:;:;:;:;;;;;",
+"-;;::;:::::::;----;;:::::;:::;;-",
+";;;:;;;;;::::;----;::::::;;;::;;",
+"--;-=**--;;;;------;;;;;-==-;;;-",
+"-=*&%##$**==*=======*==*&&&&***-",
+"=%$@OOO+#$$$%%&==*%%$%%%$##@@#&*",
+"*$OoXXXoOO+++#%*=%#@++@##@OXXO#*",
+"*@oX.XXXXXoXO+%**%@OoO+@@oX .o#&",
+"*$@+OooXXX.Xo@%==&@+O+@@oXXoO@$*",
+"=*&%$#OoXXXo+$&==*%#@@+OXo@$%&*=",
+"--===&$+XXXoO#&==*&$#@OXO#%*==--",
+"-----=&$OoXoo+#&&&$$@oXo#&=-----",
+";-;;;;-*$+oXXo+#$%$@ooO#*=;;;;-;",
+"-;;;;;;-*%@oooo+##+ooO$*-;;;;;;-",
+"-;;;:;;;-=%@oXoO@+oXO$*-;;;;;;;;",
+";--;---;--*#+OOOOoXX@&=-;-;-;---",
+"-********&&$@@+OoX.o@%*********-",
+"=%$#$$#$#$###@OXXXXoO@##$#$#$$%*",
+"*$+++O+O++@#@OoXXXXXooOOOOO+++#*",
+"*#+OOOOoO+@@OooO+OoXXXXXXOOOO+#*",
+"=%$###@++@@Ooo+$%@OoXXXXo+@##$%=",
+"-=**&%$$#@OXo@%*=&#OoXXXO#%&**=-",
+"--==*&%#@OXo@%*-==&#OXXoo+#&*=--",
+"--=*&%$@OXo@&=---==&#OoXoO+$&=--",
+"--=&%#@OXO#&--------*$OoXoo@$=--",
+";--&%@oXO#*-;;----;;-*$+oXoO$*-;",
+"-;-*$+XO#*-;;;----;;;;*$+oo+%=-;",
+"-==*$OO@%*=--===-===-==&#OO#%=--",
+"=*&$#++#$&&&%&*==*&&&%%%#@@#%%*=",
+"*$@@@++@@@@@##%=*&#@@@@@+++@@@$*",
+"&@OooooXooooo+$**$+ooooooooooO@&",
+"%+.. . ... .o#**$O. . . ..+&"
+};
diff --git a/kommander/editor/pics/large/disabled/editcopy.xpm b/kommander/editor/pics/large/disabled/editcopy.xpm
new file mode 100644
index 00000000..8138eabd
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/editcopy.xpm
@@ -0,0 +1,69 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 31 1",
+" c #0e0e0e0e0e0e",
+". c #151515151515",
+"X c Gray12",
+"o c #272727272727",
+"O c #2f2f2f2f2f2f",
+"+ c #373737373737",
+"@ c #3f3f3f3f3f3f",
+"# c #464646464646",
+"$ c Gray31",
+"% c #565656565656",
+"& c #5d5d5d5d5d5d",
+"* c Gray40",
+"= c #6f6f6f6f6f6f",
+"- c Gray46",
+"; c Gray",
+": c #818181818181",
+"> c Gray56",
+", c #959595959595",
+"< c #9f9f9f9f9f9f",
+"1 c #a7a7a7a7a7a7",
+"2 c #afafafafafaf",
+"3 c #b7b7b7b7b7b7",
+"4 c Gray75",
+"5 c #c0c0c0c0c0c0",
+"6 c #c6c6c6c6c6c6",
+"7 c #cececececece",
+"8 c Gray84",
+"9 c #dddddddddddd",
+"0 c #e6e6e6e6e6e6",
+"q c Gray93",
+"w c None",
+/* pixels */
+"33233233233344wwwwwwwwwwwwwwwwww",
+"::::::::::>,134wwwwwwwwwwwwwwwww",
+"@#$$$%$%$$#%;134wwwwwwwwwwwwwwww",
+".o#%&&&&%#Oo$-134wwwwwwwwwwwwwww",
+" @;123321;@Xo$;<34wwwwwwwwwwwwww",
+".#<8000q81$oO+$;134444444wwwwwww",
+".$20qqqq02%@$#@$;<23333344wwwwww",
+".$18643682&#&%+O$->>>>><244wwwww",
+".$14>==,41*@##++@%&*&&&*:134wwww",
+".$13,==>44;%@@%&*=-==&##&:144www",
+".$173113762;%&>234342>%+#*:144ww",
+".$1741<121<;%*29qqq092*@#$*:144w",
+".$13>=&*&*&$#=30qqqq03=%*%$*:134",
+".$14>=*&*&&$#*38633683=&=*##&:24",
+".$1731<<<<,-&=24>-=,43-%%%#+#=<3",
+".$1741<<<<,-&=24>==>64,-==*%#&>3",
+".$13>=&*&&&%#=3741137742121:&&,3",
+".$<4>=*&*&&$#*3741<1221<1362=*>3",
+".#<431<<<<,;%=24>=&*&&&*=>42=*>3",
+" +-<<<<<<<,-%=24>=**&***=>42=*>3",
+".o#%&&&&&%%$#=3731<<<<<<1473=*>3",
+"@#$$$$$$$$$#@*3741<<<<<<1373=*,3",
+"::::::::::;*$=24>=&*&&*&=>42=*>3",
+"33333333332:&=24>=**&*&*=>42=*>3",
+"44444444442,*=1631<<1<1<1361=*>3",
+"wwwwwwwww43>&&>121111111121>&&>3",
+"wwwwwwwww43,&$&====-===-===&$*,3",
+"wwwwwwwww43<-&&&**********&&&-<3",
+"wwwwwwwww442<,,,>,>>>,>>>,,>,<24",
+"wwwwwwwwww4433333333333333333344",
+"wwwwwwwwwww44444444444444444444w",
+"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww"
+};
diff --git a/kommander/editor/pics/large/disabled/editgrid.xpm b/kommander/editor/pics/large/disabled/editgrid.xpm
new file mode 100644
index 00000000..55f7ca93
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/editgrid.xpm
@@ -0,0 +1,49 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 11 1",
+" c Gray53",
+". c Gray56",
+"X c #979797979797",
+"o c #9f9f9f9f9f9f",
+"O c #a7a7a7a7a7a7",
+"+ c #afafafafafaf",
+"@ c #b7b7b7b7b7b7",
+"# c Gray75",
+"$ c #c0c0c0c0c0c0",
+"% c Gray78",
+"& c None",
+/* pixels */
+"&&###@#@OXX+@##&&&###@@@OXX+##&&",
+"&&##@@#@O..O###&&&##@@#+O.XO@##&",
+"#####@@@OXXO@#%######@@@O..+##%#",
+"#%###@#@O..O#####%##@@@@O.XO@###",
+"#######@OXXO@########@#@OXX+@###",
+"#%#%####+oo+#%#%#%#####@Ooo@##%#",
+"#%%%%%%#++@#%%%%%%%%%%##++@#%%#%",
+"##%%%%##@@##%#%#%#%%####@@######",
+"+O+O+O+@@++O++++++O++++@++O+O+OO",
+"X....XO+Oo...........oO+Oo......",
+"... XO+O. ........XO+O. ...",
+"+OOoOO+@+X .oOOOOOOOOO@@O. XoOOO",
+"@@@@@+@@+. o+@@@@@@@@@@@O..O@@@#",
+"####@@#@+X.o@#######@@@@OX.O@###",
+"#####@@@OX.O@########@@@O.XO###%",
+"&&###@#@+X.o@##&&&##@@#@OX.O@##&",
+"&&###@#@+X.o@##&&&###@@@O.XO###&",
+"&&###@@@+X.o@##&&&##@@@@OX.O@##&",
+"#######@+X.o@########@#@O..O####",
+"#####@@@+X.o@#######@@@@OX.O@###",
+"####@##@+o.o+#######@@@@OXXO@###",
+"########+Oo+@##########@+oo+####",
+"@##%%#%#@++##%#%%%%%%#%#@++##%#%",
+"@@%######@@############@@@@####@",
+"+OOOOO++@+OOOOOOOOoOOO+@++oOoOoO",
+"OXX...oO+o. .........Xo++X......",
+"Oo....o+Oo ........XO+OX ...X",
+"@+OOOO+@+X .oOO+O+O+OO@@O. XOO++",
+"##@#@@@@+o.X+@#@#@@@@@@@+X.o@@@#",
+"#####@@@+o.o+########@@@OX.O@###",
+"&&###@@@+o.o+##&&&##@@#@OX.O###&",
+"&&#%#@@@+oXo+##&&&###@@@OXXO@##&"
+};
diff --git a/kommander/editor/pics/large/disabled/editpaste.xpm b/kommander/editor/pics/large/disabled/editpaste.xpm
new file mode 100644
index 00000000..150c4fb2
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/editpaste.xpm
@@ -0,0 +1,69 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 31 1",
+" c #070707070707",
+". c Gray6",
+"X c Gray9",
+"o c Gray12",
+"O c #272727272727",
+"+ c #2f2f2f2f2f2f",
+"@ c #373737373737",
+"# c #3e3e3e3e3e3e",
+"$ c Gray28",
+"% c Gray31",
+"& c Gray34",
+"* c #5f5f5f5f5f5f",
+"= c #676767676767",
+"- c #6f6f6f6f6f6f",
+"; c #777777777777",
+": c Gray50",
+"> c #818181818181",
+", c Gray56",
+"< c #939393939393",
+"1 c #9f9f9f9f9f9f",
+"2 c #afafafafafaf",
+"3 c #b6b6b6b6b6b6",
+"4 c #bebebebebebe",
+"5 c #c0c0c0c0c0c0",
+"6 c Gray78",
+"7 c Gray81",
+"8 c #d3d3d3d3d3d3",
+"9 c #dddddddddddd",
+"0 c #e7e7e7e7e7e7",
+"q c #efefefefefef",
+"w c None",
+/* pixels */
+"wwwwwwww443333333344wwwwwwwwwwww",
+"w444444431<>>>>>><144444444wwwww",
+"443333321:&$$%$$$&:123333344wwww",
+"41<>>>>:-$Oo+##+oO$-:>>>><134www",
+"1:*%$$$#+oXO%;;%OXX+#$$$%*:144ww",
+"-%++@@+OX.O%:,,:%OXXO+@@+@%:144w",
+"+O@$&%$+o+%:>;;>:%Oo+$%&$@@*<34w",
+"Xo$=-=$++%:1>==>1>%++%*-=$+$,34w",
+".O%-;*@O#-<1<>><1<-#+@*;-&@$>24w",
+" O&-;&@O$=>>::::>:=$O+&;-&@$>34w",
+".O&;-*+O+#$$$$$$$$#+O@*-;&@$>24w",
+" O&-;=$++@@@@@@@@@@++#*;-&@$>34w",
+".O&;;-**&&&&%%%%%%%%&*---&@$>34w",
+".O&;::;;;;--**&&*&*&&****$+$>34w",
+" O&;;:::;:;=%$$%%%%%%%%$#+O$>24w",
+".O&-::::::;=$#*==--=--=&#OO$>34w",
+".O&;::;:::;*%&,24434432,%++$;144",
+".O&-:::::;;=%=290qqqq092=#$$=>14",
+" O&;::::::;*%-30qqq0qq03-&=&%=>1",
+".O&;;:::::;=%-3974444793;&==$#*:",
+".O&;:::;:;;*%-261>;;>163;&*&$@#$",
+".O&-::::::;*%-261:;;:166,;--=%#+",
+" O&;::::::;=%-376222248842122>%+",
+".O%-;:;::;;*%=3842212233223462*+",
+"Xo$=-;;-;--*$-261:;;;;;;;;:142=+",
+"+O@$&&&&&*&$$=241:;;;;;;;;:162=+",
+"-$@+@@@@@@@+@=1742221212122461*@",
+"1:&$$$$$$$##@&<12221222122122,%+",
+"31<,>>>>>>:-%$*----;---;--;--*$+",
+"44333333322<-**=============**&&",
+"w444444444421<,,,,,,,,,,,,,,,,,,",
+"wwwwwwwwww4433333333333333333333"
+};
diff --git a/kommander/editor/pics/large/disabled/editslots.xpm b/kommander/editor/pics/large/disabled/editslots.xpm
new file mode 100644
index 00000000..25c68514
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/editslots.xpm
@@ -0,0 +1,65 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 27 1",
+" c #373737373737",
+". c #3f3f3f3f3f3f",
+"X c #464646464646",
+"o c #4e4e4e4e4e4e",
+"O c Gray34",
+"+ c #5f5f5f5f5f5f",
+"@ c #676767676767",
+"# c #6f6f6f6f6f6f",
+"$ c #777777777777",
+"% c Gray50",
+"& c Gray53",
+"* c Gray56",
+"= c #979797979797",
+"- c #9f9f9f9f9f9f",
+"; c #a7a7a7a7a7a7",
+": c #afafafafafaf",
+"> c #b7b7b7b7b7b7",
+", c Gray75",
+"< c #c0c0c0c0c0c0",
+"1 c Gray78",
+"2 c Gray81",
+"3 c #d7d7d7d7d7d7",
+"4 c #dfdfdfdfdfdf",
+"5 c #e7e7e7e7e7e7",
+"6 c #efefefefefef",
+"7 c Gray97",
+"8 c None",
+/* pixels */
+"88888888888888888888888888888888",
+"88888888888888888888888888888888",
+"88888888888888888888888888888888",
+"88888888888888888888888888888888",
+"8888888,1,,,1,888888888888888888",
+"8888881,,,,,,,,88,1,,,,1,8888888",
+"88888,,,,1,,>,,,1,,,,,,,1,188888",
+"8888,1,,11,>;:,,,,,,>,>>,,,,8888",
+"8881,,11221;=;>,,,>>>::>>>,,1888",
+"88,,,112331;&->>>,>,>>:;;:>,,,88",
+"8,1,,123442-&=:,>,122,>;--;>,1,8",
+"1,,,1235552;*=:>,245431:-**;>,,1",
+",,,,1245663:=-:>2466652>-&&*:>,,",
+"1,1,1345664,-;;,2577763>-&$%->,,",
+"11,123456641:;;>2577752>-%@#=>,,",
+",,,113455542,;;>1456641:*$++&;>,",
+">::>,2344542,:-;>23431>-%@OO$=;:",
+"::::>,233332,:--;>,,,:-&#OXo$=-;",
+">>>:::,1121,,:=*=--;-=%#+XX+&;:>",
+",,>>:;;:>::>>:-*%%&&%$#OX.X$->>,",
+",,,>:==*===-;:;*$##@@Oo...@*:,,,",
+"8,,,:-&%%$$&-::-%@OooX. .+&;>,,8",
+"88,,>;*%@@+#*;>:-%@OoXoo#&;>,,88",
+"881,,>;&$+O+%;>>:-*%$#$&=:>,1888",
+"888,,,>;=%$$*:,,,>:;-;;:>,,,8888",
+"8888,,,>>;--;>,,,,,,>>>,,,,88888",
+"888888,,,>>>>,,88,,,,,,,,8888888",
+"8888888,,,,,,,888888888888888888",
+"88888888888888888888888888888888",
+"88888888888888888888888888888888",
+"88888888888888888888888888888888",
+"88888888888888888888888888888888"
+};
diff --git a/kommander/editor/pics/large/disabled/editvlayout.xpm b/kommander/editor/pics/large/disabled/editvlayout.xpm
new file mode 100644
index 00000000..fbc382f4
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/editvlayout.xpm
@@ -0,0 +1,55 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 17 1",
+" c #5b5b5b5b5b5b",
+". c #676767676767",
+"X c #6f6f6f6f6f6f",
+"o c #777777777777",
+"O c Gray50",
+"+ c Gray53",
+"@ c #8e8e8e8e8e8e",
+"# c Gray59",
+"$ c #9f9f9f9f9f9f",
+"% c #a7a7a7a7a7a7",
+"& c #acacacacacac",
+"* c Gray71",
+"= c Gray75",
+"- c #c0c0c0c0c0c0",
+"; c Gray78",
+": c #cdcdcdcdcdcd",
+"> c None",
+/* pixels */
+">>>>>>;=;;;;;;;;;;;;;;;;;=>>>>>>",
+">>>>>>===;;;;;:;;;;;:;;==;>>>>>>",
+">>>>>>;=;;::::::::::::;;;=>>>>>>",
+">>>>>>=;==;;;;;;;;;;;;;===>>>>>>",
+">>>>>>===**************===>>>>>>",
+">>>>>>==*%$$$$$$$$$$$$%*==>>>>>>",
+">>>>>>==&#+OOOOOOOOOO+#&==>>>>>>",
+">>>>>>=*%+oooXoXoXoXoo+%==>>>>>>",
+">>>>>>;=&#+OOOOOOOOOO+#&*;>>>>>>",
+">>>>>>==*&%%%%%%%%%%%%&*==>>>>>>",
+">>>>>>>==*=****=**=***===>>>>>>>",
+">>>>>>=;==;=;;;;=;==;;==;=>>>>>>",
+">>>>>>;==;;;;;;;;;;;;;;===>>>>>>",
+">>>>>>==;;;;:::;;;;:;;;=;=>>>>>>",
+">>>>>>=;=;:::;:;:::;;;;==;>>>>>>",
+">>>>>>==;====;=;====;=====>>>>>>",
+">>>>>>==**&&&&&&&&&&&&**==>>>>>>",
+">>>>>>==*$##@#@#@#@#@#$*==>>>>>>",
+">>>>>>=*&#OOoOoOoOOoOO#&==>>>>>>",
+">>>>>>==&@OoOoooooooOO#&==>>>>>>",
+">>>>>>;=&%#@#@#@###@##%*==>>>>>>",
+">>>>>>===*&&*&*&&&*&&**==>>>>>>>",
+">>>>>>===================;>>>>>>",
+">>>>>>;==;;;;;;;;;;;;;;;==>>>>>>",
+">>>>>>==;;;;=;;=;;=;;=;===>>>>>>",
+">>>>>>==;;;;;;;:;;:;;;;;=;>>>>>>",
+">>>>>>;===;:;:;;;;;;:;;===>>>>>>",
+">>>>>>====*=*=*=====*=*===>>>>>>",
+">>>>>>==*%%$%$%$$$$$%%&*==>>>>>>",
+">>>>>>==&#@+++++++++++$&==>>>>>>",
+">>>>>>==%+XXXX.XXXXXXX+%==>>>>>>",
+">>>>>>=*$O. .o%*=>>>>>>"
+};
diff --git a/kommander/editor/pics/large/disabled/layout.xpm b/kommander/editor/pics/large/disabled/layout.xpm
new file mode 100644
index 00000000..f204e0ff
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/layout.xpm
@@ -0,0 +1,52 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 14 1",
+" c #676767676767",
+". c #6d6d6d6d6d6d",
+"X c #777777777777",
+"o c Gray50",
+"O c Gray53",
+"+ c Gray56",
+"@ c #979797979797",
+"# c #9f9f9f9f9f9f",
+"$ c #a7a7a7a7a7a7",
+"% c #afafafafafaf",
+"& c #b7b7b7b7b7b7",
+"* c Gray75",
+"= c Gray78",
+"- c Gray81",
+/* pixels */
+"***=*==*==*==*******==*==*==*=**",
+"====-==-==-===**&**=============",
+"*=-----------=****=-----------==",
+"===------=-===**&*==============",
+"*******&**&**&&*&&&&******&*&*&*",
+"&%$$$#$$$$$#$$%&&%$$$$#$$$$$#$%&",
+"%#+OO+OOOOO+O+#%&$@+OO+OOOOOO+#%",
+"%+ooXXXXXoXXXO@%%#OXXXXXXXXXXo+%",
+"&@OooooooooooO#%&$+ooooooooooO@%",
+"&%$#########$$%&&%$$###$####$#%&",
+"*&&&&&&&&&&&&&&***&&&&&&&&&&&&&*",
+"********************************",
+"****=*=*=*=****&****=*=**=******",
+"**=---=-=-=-==&***===-=-==-=-=*=",
+"*=-----------=*&**=----------===",
+"**==---=--=-=*&*&*=============*",
+"**&**&&**&*&&&&&&&&&&*&&&&&&&&&*",
+"&$$##$######$$$&&%$$##$$#$###$%&",
+"%#++OOOOOOOOO+#%%$++OOOOOOOOO+#&",
+"&@OooooooooooO#%&#+ooooooooooO@%",
+"&$@++++++++++@$&&$#++++++++++@$%",
+"*&%$$$$$$$$$$%&&*&%$$$$$$$$$%$&*",
+"*&&&&&&&&&&&&&&**&*&&&&&&&&&&&&*",
+"*&*&*&*&*&*&*&&****&********&***",
+"***=========***&***===*==*===***",
+"**=----------=&***==-------====*",
+"*==----------=*&**=----------===",
+"**==-==-=====*&&***===========**",
+"*%&&&&&%&&&&%%%&&&%&%&%&%&&%&%&*",
+"&$#@@@#@@@@#@#$&&$#@#@@@#@@#@#$&",
+"%#OooooooooooO@%%#+oXoooXooXoO#%",
+"&@X X+$%@X .+%"
+};
diff --git a/kommander/editor/pics/large/disabled/left.xpm b/kommander/editor/pics/large/disabled/left.xpm
new file mode 100644
index 00000000..6c32a0f5
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/left.xpm
@@ -0,0 +1,59 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 21 1",
+" c Gray34",
+". c #5f5f5f5f5f5f",
+"X c #676767676767",
+"o c #6f6f6f6f6f6f",
+"O c #777777777777",
+"+ c Gray50",
+"@ c Gray53",
+"# c Gray56",
+"$ c #979797979797",
+"% c #9f9f9f9f9f9f",
+"& c #a7a7a7a7a7a7",
+"* c #afafafafafaf",
+"= c #b7b7b7b7b7b7",
+"- c Gray75",
+"; c #c0c0c0c0c0c0",
+": c Gray78",
+"> c Gray81",
+", c Gray84",
+"< c #dfdfdfdfdfdf",
+"1 c #e7e7e7e7e7e7",
+"2 c None",
+/* pixels */
+"22222222222222222222222222222222",
+"222222222-:---:-2222222222222222",
+"22222222---------222222222222222",
+"2222222:---====---22222222222222",
+"222222:--====**=--22222222222222",
+"2222:---===:::==--22222222222222",
+"222----=-->,,>==--22222222222222",
+"22:---=-:,<1<:=---222222-:---:-2",
+"2---==-:<11<>=*=---:---:-------:",
+":---==:<11<>-**=---------=------",
+"--==-><11<:-=&%*=----====*=*=**=",
+"-=*-><1<,--**%%%***=*==****=*%%$",
+"==-><1<>-=**&%$$&***===--:--=%@+",
+"*=><1<,-=*&&&%%%*=---::::::-&#oX",
+"&-,<,>-=*&&&%&&**=------==*&$@X.",
+"%->>:-*&&&%&%&%&&*****&&&&%$#O. ",
+"$&===*&&&%&%&%%%$%$$%$%%$$$#@o. ",
+"+@#$%%&%%%%%%%##@+@@@@#@#@@@+o. ",
+"@+O+@#$%%%%%%$@OooooOoOOOOOOoX..",
+"%@OoO+##$%$%%#+oooooooXXXXXXXX.X",
+"=&@OooO@##$$$#@@##$#@+OOooooooO+",
+"-=&#+oXo+@#$$$$%&=**&&%%$$$###$&",
+"--=*$+oXo+@###%*=----=====***==-",
+"---=*$+oXoO+@#$*----------------",
+"2---=*%@OXooO+#*=-222-:---------",
+"222:--*%#OXXXo#&--22222222222222",
+"2222---=&#OXXo@*--22222222222222",
+"22222---=&$@O@%*--22222222222222",
+"222222----*&&&*=--22222222222222",
+"22222222---===---222222222222222",
+"222222222-------2222222222222222",
+"22222222222222222222222222222222"
+};
diff --git a/kommander/editor/pics/large/disabled/redo.xpm b/kommander/editor/pics/large/disabled/redo.xpm
new file mode 100644
index 00000000..a4425f9c
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/redo.xpm
@@ -0,0 +1,52 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 14 1",
+" c Gray12",
+". c #272727272727",
+"X c #2f2f2f2f2f2f",
+"o c Gray21",
+"O c #3e3e3e3e3e3e",
+"+ c Gray28",
+"@ c #4e4e4e4e4e4e",
+"# c Gray34",
+"$ c #5d5d5d5d5d5d",
+"% c Gray40",
+"& c #6d6d6d6d6d6d",
+"* c #808080808080",
+"= c #c0c0c0c0c0c0",
+"- c None",
+/* pixels */
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"-------***********--------------",
+"------**&%%%%%%%**---------*----",
+"-----**$##$$$$$##%**-----****---",
+"----**#@$*******$#&***---*&**---",
+"---**$@%**-----**%#$&*-**$@%*---",
+"---*&@$*---------*%##%&&$Oo#*---",
+"---*%#**----------**$@++o.X#*---",
+"---*$$*------------*&+o...X#*---",
+"---*%%*------------**+.. X#*---",
+"---*&$*-----------**%o. .X@*---",
+"---*&%**----------*%O.. . X#*---",
+"----*%&**--------*&+oXXXXXo%*---",
+"----*&%**-------**&##@@@@@$**---",
+"-----*&%**--------**********----",
+"------***-----------------------",
+"--------**----------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------"
+};
diff --git a/kommander/editor/pics/large/disabled/right.xpm b/kommander/editor/pics/large/disabled/right.xpm
new file mode 100644
index 00000000..a95b4f27
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/right.xpm
@@ -0,0 +1,57 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 19 1",
+" c #5f5f5f5f5f5f",
+". c Gray40",
+"X c #6f6f6f6f6f6f",
+"o c #777777777777",
+"O c Gray50",
+"+ c Gray53",
+"@ c Gray56",
+"# c #979797979797",
+"$ c #9f9f9f9f9f9f",
+"% c #a7a7a7a7a7a7",
+"& c #afafafafafaf",
+"* c #b7b7b7b7b7b7",
+"= c Gray75",
+"- c #c0c0c0c0c0c0",
+"; c Gray78",
+": c Gray81",
+"> c #d5d5d5d5d5d5",
+", c gainsboro",
+"< c None",
+/* pixels */
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<=;===;=<<<<<<<<<",
+"<<<<<<<<<<<<<<<=======;=<<<<<<<<",
+"<<<<<<<<<<<<<<=;==**&**=;<<<<<<<",
+"<<<<<<<<<<<<<<;==**&%%*===<<<<<<",
+"<<<<<<<<<<<<<<=====*%$%&*=;=<<<<",
+"<<<<<<<<<<<<<<====:;*$$$&*=;=<<<",
+"<=;===;=<<<<<<==*=;:=*$#$%&==;<<",
+";=======;===;====*;;;=&$##&&===<",
+"======*=========***====&$$#%&*==",
+"*****&*&***====*&&**====&%##$&==",
+"%&***&&&&&****=**%&******&$@@$%*",
+"$*:::;==*=*======*&&&*****&$@@#%",
+"@*>,>:::;;;;;:::;=*&&&&**&&%$@++",
+"@*:>::;;;;;;:;::;=*&&&&&&&&%$@oo",
+"@&;;;==*=*****=***&&&&&&%%$$#+o.",
+"@%==*&&&%%&%%%%%%%&&%&%%%$$@+X. ",
+"O$&&%$$###@#@@@@#$%%%%%%$#@OX. .",
+"O@##@++OOOOoooooO+$%%%%$#@OX. X+",
+"+OOoXX.XXXoooooooO#$%$$#@o. X+$",
+"$@OoXXooO+@##$$$@@#$$$@+o. X+%*",
+"&%##@#$$%%&&****%$###@+X. o@%*=",
+"=**&*&****======*&$@+OX .o#%*==",
+"=================&#+oX .O#&*===",
+"<========<<<<<==*%+o. XO#&====<",
+"<<<<<<<<<<<<<<===%O. X+%**==<<<",
+"<<<<<<<<<<<<<<==*%O. o@%*=;=<<<<",
+"<<<<<<<<<<<<<<;=*&@O+#%*===<<<<<",
+"<<<<<<<<<<<<<<===*&%%&*==<<<<<<<",
+"<<<<<<<<<<<<<<<===**====<<<<<<<<",
+"<<<<<<<<<<<<<<<<=======<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
+};
diff --git a/kommander/editor/pics/large/disabled/undo.xpm b/kommander/editor/pics/large/disabled/undo.xpm
new file mode 100644
index 00000000..b49b97db
--- /dev/null
+++ b/kommander/editor/pics/large/disabled/undo.xpm
@@ -0,0 +1,52 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 14 1",
+" c Gray12",
+". c #272727272727",
+"X c #2f2f2f2f2f2f",
+"o c Gray21",
+"O c #3e3e3e3e3e3e",
+"+ c Gray28",
+"@ c #4e4e4e4e4e4e",
+"# c Gray34",
+"$ c #5d5d5d5d5d5d",
+"% c Gray40",
+"& c #6d6d6d6d6d6d",
+"* c #808080808080",
+"= c #c0c0c0c0c0c0",
+"- c None",
+/* pixels */
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------***********-------",
+"----*---------**%%%%%%%&**------",
+"----***-----**%##$$$$$##$**-----",
+"---*&***---**%#$*******$@#**----",
+"---*%+%****&$#%**-----**%@#**---",
+"---*#oO%**%@#%*---------*$@&*---",
+"---*@X.o+++$***---------**#&*---",
+"---*#X..XX+**------------*$%*---",
+"---*$X X+&-------------*%$*---",
+"---*#X . .o#**-----------*$%*---",
+"---*@X. ..o&**---------**$&*---",
+"---*$oXXXXXo@&*---------*&%*----",
+"---**$@#@@###&*--------*&%&*----",
+"----**********--------**%&*-----",
+"----------------------****------",
+"------------------------*-------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------",
+"--------------------------------"
+};
diff --git a/kommander/editor/pics/large/editbreaklayout.xpm b/kommander/editor/pics/large/editbreaklayout.xpm
new file mode 100644
index 00000000..687571f9
--- /dev/null
+++ b/kommander/editor/pics/large/editbreaklayout.xpm
@@ -0,0 +1,250 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 212 2",
+" c #101000000000",
+". c #181800000000",
+"X c #181808080000",
+"o c #181808080808",
+"O c #212100000000",
+"+ c #292900000000",
+"@ c #292918181818",
+"# c #313100000000",
+"$ c #313108080000",
+"% c #393908080000",
+"& c #313110100808",
+"* c #393918181010",
+"= c #313129292121",
+"- c #313129292929",
+"; c #393931313131",
+": c #4a4a08080000",
+"> c #525208080000",
+", c #525210100000",
+"< c #5a5a10100000",
+"1 c #5a5a18180808",
+"2 c #525221211818",
+"3 c #5a5a39393131",
+"4 c #636310100000",
+"5 c #6b6b10100000",
+"6 c #6b6b10100808",
+"7 c #737318180808",
+"8 c #7b7b10100000",
+"9 c #7b7b18180808",
+"0 c #636329292121",
+"q c #636342423939",
+"w c #525242424242",
+"e c #5a5a52524a4a",
+"r c #5a5a52525252",
+"t c #63635a5a5a5a",
+"y c #6b6b52525252",
+"u c #7b7b5a5a5252",
+"i c #6b6b63635a5a",
+"p c #6b6b63636363",
+"a c #73736b6b6b6b",
+"s c #7b7b73737373",
+"d c #848418180808",
+"f c #8c8c18180000",
+"g c #8c8c18180808",
+"h c #949418180808",
+"j c #9c9c21210808",
+"k c #9c9c21211010",
+"l c #9c9c29291010",
+"z c #9c9c39392929",
+"x c #a5a521210808",
+"c c #adad21210808",
+"v c #adad21211010",
+"b c #b5b529291010",
+"n c #bdbd29291010",
+"m c #bdbd31312121",
+"M c #b5b54a4a3939",
+"N c #84845a5a5a5a",
+"B c #8c8c6b6b6b6b",
+"V c #a5a55a5a4a4a",
+"C c #adad63635252",
+"Z c #b5b563635252",
+"A c #a5a56b6b6363",
+"S c #c6c629291010",
+"D c #cece29291010",
+"F c #d6d629290808",
+"G c #d6d631311818",
+"H c #dede31311818",
+"J c #dede39391818",
+"K c #c6c639392121",
+"L c #dede39392121",
+"P c #e7e729290808",
+"I c #e7e739391818",
+"U c #efef31311010",
+"Y c #f7f731311010",
+"T c #f7f739391010",
+"R c #f7f739391818",
+"E c #ffff39391010",
+"W c #ffff39391818",
+"Q c #e7e739392121",
+"! c #d6d64a4a3131",
+"~ c #d6d652523939",
+"^ c #efef42422121",
+"/ c #f7f742422929",
+"( c #f7f74a4a2929",
+") c #ffff42422121",
+"_ c #ffff4a4a2121",
+"` c #ffff4a4a2929",
+"' c #f7f74a4a3131",
+"] c #ffff4a4a3131",
+"[ c #ffff52522929",
+"{ c #f7f752523131",
+"} c #f7f75a5a3939",
+"| c #ffff52523131",
+" . c #ffff5a5a3131",
+".. c #ffff5a5a3939",
+"X. c #f7f763633939",
+"o. c #ffff63633939",
+"O. c #ffff6b6b3939",
+"+. c #c6c65a5a4a4a",
+"@. c #cece52524242",
+"#. c #c6c663635252",
+"$. c #dede6b6b5252",
+"%. c #dede73735a5a",
+"&. c #cece73736363",
+"*. c #cece7b7b6b6b",
+"=. c #efef6b6b4a4a",
+"-. c #e7e76b6b5252",
+";. c #efef6b6b5252",
+":. c #e7e773735a5a",
+">. c #f7f763634242",
+",. c #f7f76b6b4a4a",
+"<. c #ffff63634242",
+"1. c #ffff6b6b4242",
+"2. c #ffff6b6b4a4a",
+"3. c #ffff73734242",
+"4. c #ffff73734a4a",
+"5. c #ffff7b7b4242",
+"6. c #ffff7b7b4a4a",
+"7. c #ffff73735252",
+"8. c #ffff7b7b5252",
+"9. c #ffff7b7b5a5a",
+"0. c #b5b584847b7b",
+"q. c #c6c684847373",
+"w. c #c6c68c8c7b7b",
+"e. c #d6d684846b6b",
+"r. c #ffff84845252",
+"t. c #ffff84845a5a",
+"y. c #ffff8c8c5a5a",
+"u. c #f7f78c8c6b6b",
+"i. c #ffff84846363",
+"p. c #ffff8c8c6363",
+"a. c #ffff8c8c6b6b",
+"s. c #ffff94946363",
+"d. c #ffff94946b6b",
+"f. c #ffff9c9c6b6b",
+"g. c #ffff94947373",
+"h. c #ffff9c9c7373",
+"j. c #ffff9c9c7b7b",
+"k. c #ffffa5a57373",
+"l. c #ffffa5a57b7b",
+"z. c #ffffadad7b7b",
+"x. c #848484848484",
+"c. c #8c8c84848484",
+"v. c Gray55",
+"b. c Gray58",
+"n. c #9c9c94949494",
+"m. c Gray61",
+"M. c #a5a584848484",
+"N. c #a5a59c9c9c9c",
+"B. c #adad9c9c9494",
+"V. c #adad9c9c9c9c",
+"C. c #b5b58c8c8484",
+"Z. c #b5b58c8c8c8c",
+"A. c #bdbd8c8c8484",
+"S. c #b5b594948c8c",
+"D. c #b5b594949494",
+"F. c #b5b59c9c9494",
+"G. c #b5b59c9c9c9c",
+"H. c #bdbd9c9c9494",
+"J. c #b5b5a5a59c9c",
+"K. c #bdbda5a59c9c",
+"L. c #a5a5a5a5a5a5",
+"P. c Gray68",
+"I. c #b5b5a5a5a5a5",
+"U. c #b5b5adada5a5",
+"Y. c #b5b5adadadad",
+"T. c #bdbdadada5a5",
+"R. c #bdbdadadadad",
+"E. c #bdbdb5b5adad",
+"W. c Gray71",
+"Q. c #bdbdb5b5b5b5",
+"!. c #bdbdbdbdb5b5",
+"~. c Gray74",
+"^. c #bdbdc6c6c6c6",
+"/. c #c6c68c8c8484",
+"(. c #cece8c8c8484",
+"). c #c6c694948484",
+"_. c #c6c694948c8c",
+"`. c #c6c69c9c9494",
+"'. c #c6c6a5a59c9c",
+"]. c #c6c6adad9c9c",
+"[. c #c6c6adada5a5",
+"{. c #c6c6bdbdadad",
+"}. c #c6c6bdbdbdbd",
+"|. c #ffffa5a58484",
+" X c #ffffadad8484",
+".X c #ffffb5b58484",
+"XX c #ffffb5b58c8c",
+"oX c #ffffb5b59494",
+"OX c #ffffbdbd9494",
+"+X c #ffffbdbd9c9c",
+"@X c #c6c6c6c6bdbd",
+"#X c #ffffc6c69494",
+"$X c #ffffd6d6a5a5",
+"%X c #ffffd6d6adad",
+"&X c NavajoWhite",
+"*X c #ffffd6d6b5b5",
+"=X c #ffffdedeb5b5",
+"-X c #ffffe7e7bdbd",
+";X c #c0c0c0c0c0c0",
+":X c #c6c6c6c6c6c6",
+">X c #dedededec6c6",
+",X c #dedededecece",
+"<X c #e7e7dedec6c6",
+"1X c #ffffe7e7c6c6",
+"2X c #ffffefefc6c6",
+"3X c #fffff7f7cece",
+"4X c #ffffffffcece",
+"5X c #fffff7f7d6d6",
+"6X c #ffffffffd6d6",
+"7X c #ffffffffe7e7",
+"8X c #ffffffffefef",
+"9X c None",
+/* pixels */
+"9X9X9X9X9X9X9X9X9X9X9XE._.Q.9X9X9X9X9XA.+.I.@X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9XE.).%.} r.[.9X9X9X9X!.;._ Y #.G.~.9X9X9X9X9X9X9X",
+"9X9X9X9X9XE._.$.X.8.l.$X4X,X~.9X9X9X'.h.t.<._ T @.D.~.9X9X9X9X9X",
+"9X9XQ.).$.X.6.z.%X3X6X7X5X%XQ.9X9XQ.u.j.|.h.t.1.[ E ~ S.~.9X9X9X",
+"9X9X).6.z.%X3X7X6X5X=XXXd.2./.9X9Xq.] 4.p.j.|.j.p.2.[ E ! C.9X9X",
+"9X9XQ.3X6X7X3X=XoXa.2.{ L S z ~.Y.l n Q ] 1.i.h.l.l.p.2.[ *.9X9X",
+"9X9X~.>X-XXXa.2.{ L S k 9 < # m.c.% 4 h n L ( 2.t.g.|.l.p.Q.9X9X",
+"9X9X9XK.2.' L S j 9 1 % O . = n.^.n.w & < h b H / <.9.g.'.9X9X9X",
+"9X9X9XQ.m x 9 , % O . - a L.~.9X9X9X:XN.e & < g b G ( =.Q.9X9X9X",
+"9X9X9X9Xu # O X ; a L.:X9X9X9X9X9X9X9X9X9XP.t & , d c 0.9X9X9X9X",
+"9X9X9X9Xb.= a L.~.9X9XR.(.!.9X9X9X9X9XA.#.Y.9XW.a & 0 Q.9X9X9X9X",
+"9X9X9X9X~.~.9X9XE.).-.o.y.T.9X9X9X9X~.;.) Y #.J.9XW.L.9X9X9X9X9X",
+"9X9X9X9X9XQ._.-.o.r.z.&X6X,X~.9X9X9X].h.t.1._ R @.F.}.9X9X9X9X9X",
+"9X9XQ._.%.X.6.z.%X3X7X7X3X%XQ.9X9XQ.u.j.l.h.i.1._ W ~ Z.~.9X9X9X",
+"9X9Xw.6.k.$X3X7X7X3X*XXXp.<./.9X9Xq.] 2.p.j.l.j.p.1.` E ! C.9X9X",
+"9X9XQ.2X6X7X5X=XXXa.2.( L n z ~.Y.k n I ] 2.i.h.l.l.a.4.[ &.9X9X",
+"9X9X~.>X-XOXg.2.{ L S k 7 > + b.c.% 4 k b J ( 2.t.g.l.l.a.E.9X9X",
+"9X9X9XK.7.| Q S k 9 , $ O X ; n.~.m.w % 4 h b H ( <.9.g.'.9X9X9X",
+"9X9X9XQ.K k 9 1 % O X ; s L.}.9X9X9X~.L.r * < g v G / ,.Q.9X9X9X",
+"9X9X9X9XN % O . - a P.!.~.9X9X9X9X9X9X9X~.B r * < d c 0.9X9X9X9X",
+"9X9X9X9Xm.@ p N.^.}.`.>.K.9X9X9X9X9X9X^.w.U C L.a & 0 ~.9X9X9X9X",
+"9X9X9X9X~.~.9X^.`.=.5.#X<X~.9X9X9X9X9X`.1.` U M W.W.L.9X9X9X9X9X",
+"9X9X9X9X9X9XK.$.3..X2X8X7X{.9X9X9X9XH.p.a.4.| Y m V.9X9X9X9X9X9X",
+"9X9X9X9XR.%.O.k.1X7X8X-X X7.Y.9X9XD.( 2.p.a.9. .R F M.9X9X9X9X9X",
+"9X9XR.*.o.f.-X7X8X2XXX9.' D V 9Xn.h D ( <.i.d.9.o.) F A ~.9X9X9X",
+"9X9Xe.s.&X7X8X3XOXi.| G k 6 % v.L.2 f S ^ <.9.d.i.<._ P V W.9X9X",
+"9X9XY.5X8X5X+Xa...J v 7 : . o x.9XW.3 8 n I ..9.a.a.2.` P Z 9X9X",
+"9X9X9X@X%Xd.<.Q b 9 : O o i W.9X9X9X~.y 5 v H | 7.p.a.7.} Y.9X9X",
+"9X9X9X~.:.^ n d , O o r P.9X9X9X9X9X9X~.s 4 x G ` 2.p.u.Y.9X9X9X",
+"9X9X9X9XB.g < + w N.^.9X9X9X9X9X9X9X9X9Xv.1 h D / ,.U.9X9X9X9X",
+"9X9X9X9X^.y ; n.^.9X9X9X9X9X9X9X9X9X9X9X9Xm.0 f S G.9X9X9X9X9X",
+"9X9X9X9X9XP.c.~.9X9X9X9X9X9X9X9X9X9X9X9X9X9X9XP.q n.9X9X9X9X9X9X"
+};
diff --git a/kommander/editor/pics/large/editcopy.xpm b/kommander/editor/pics/large/editcopy.xpm
new file mode 100644
index 00000000..d9f4a9d5
--- /dev/null
+++ b/kommander/editor/pics/large/editcopy.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 5 1",
+" c Gray0",
+". c #000000008080",
+"X c #c0c0c0c0c0c0",
+"o c Gray100",
+"O c None",
+/* pixels */
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+" OOOOOOOOOOOOOOOOOOOO",
+" OOOOOOOOOOOOOOOOOOO",
+" oooooooo OOOOOOOOOOOOOOOOOO",
+" oooooooo OOOOOOOOOOOOOOOOO",
+" oooooooo o OOOOOOOOOOOOOOOO",
+" oooooooo oo OOOOOOOOOOOOOOO",
+" oo oo ............OOOOOOOO",
+" oo oo .............OOOOOOO",
+" oooooooooo..oooooooo....OOOOOO",
+" oooooooooo..oooooooo.....OOOOO",
+" oo ..oooooooo..o...OOOO",
+" oo ..oooooooo..oo...OOO",
+" oooooooooo..oo oo........OO",
+" oooooooooo..oo oo........OO",
+" oo ..oooooooooooooo..OO",
+" oo ..oooooooooooooo..OO",
+" oooooooooo..oo oo..OO",
+" oooooooooo..oo oo..OO",
+" ..oooooooooooooo..OO",
+" ..oooooooooooooo..OO",
+"OOOOOOOOOOOO..oo oo..OO",
+"OOOOOOOOOOOO..oo oo..OO",
+"OOOOOOOOOOOO..oooooooooooooo..OO",
+"OOOOOOOOOOOO..oooooooooooooo..OO",
+"OOOOOOOOOOOO..................OO",
+"OOOOOOOOOOOO..................OO",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
+};
diff --git a/kommander/editor/pics/large/editcut.xpm b/kommander/editor/pics/large/editcut.xpm
new file mode 100644
index 00000000..fcae0bd0
--- /dev/null
+++ b/kommander/editor/pics/large/editcut.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 4 1",
+" c Gray0",
+". c #000000008080",
+"X c #c0c0c0c0c0c0",
+"o c None",
+/* pixels */
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooo oooooo oooooooooooo",
+"oooooooooo oooooo oooooooooooo",
+"oooooooooo oooooo oooooooooooo",
+"oooooooooo oooooo oooooooooooo",
+"oooooooooo oooo oooooooooooo",
+"oooooooooo oooo oooooooooooo",
+"ooooooooooo oooo ooooooooooooo",
+"ooooooooooo oo ooooooooooooo",
+"ooooooooooo oo ooooooooooooo",
+"oooooooooooo oo oooooooooooooo",
+"oooooooooooo oooooooooooooo",
+"oooooooooooo oooooooooooooo",
+"ooooooooooooo ooooooooooooooo",
+"oooooooooooooo oooooooooooooooo",
+"ooooooooooooo. .ooooooooooooooo",
+"ooooooooooooo. ..oooooooooooooo",
+"oooooooooooo..oo......oooooooooo",
+"ooooooooooo...oo.......ooooooooo",
+"oooooooo......oo...oo...oooooooo",
+"ooooooo.......oo..oooo..oooooooo",
+"oooooo...oo...oo..oooo..oooooooo",
+"oooooo..oooo..oo..oooo..oooooooo",
+"oooooo..oooo..oo..oooo..oooooooo",
+"oooooo..oooo..oo...oo...oooooooo",
+"oooooo..oooo..ooo......ooooooooo",
+"oooooo...oo...oooo....oooooooooo",
+"ooooooo......ooooooooooooooooooo",
+"oooooooo....oooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo"
+};
diff --git a/kommander/editor/pics/large/editdelete.xpm b/kommander/editor/pics/large/editdelete.xpm
new file mode 100644
index 00000000..2221114f
--- /dev/null
+++ b/kommander/editor/pics/large/editdelete.xpm
@@ -0,0 +1,226 @@
+/* XPM */
+static char * editdelete_xpm[] = {
+"22 22 201 2",
+" c None",
+". c #454545",
+"+ c #8B8B8B",
+"@ c #282828",
+"# c #464646",
+"$ c #6F6F6F",
+"% c #F7F7F7",
+"& c #FDFDFD",
+"* c #5A5A5A",
+"= c #C2C2C2",
+"- c #424242",
+"; c #F0F0F0",
+"> c #D7D7D7",
+", c #CDCDCD",
+"' c #EBEBEB",
+") c #CFCFCF",
+"! c #AAAAAA",
+"~ c #E5E5E5",
+"{ c #686868",
+"] c #F5F5F5",
+"^ c #C9C9C9",
+"/ c #313131",
+"( c #F4F4F4",
+"_ c #DCDCDC",
+": c #E0E0E0",
+"< c #E3E3E3",
+"[ c #D0D0D0",
+"} c #656363",
+"| c #B5B5B5",
+"1 c #A8A8A8",
+"2 c #252525",
+"3 c #F1F1F1",
+"4 c #B8B8B8",
+"5 c #E7E7E7",
+"6 c #B9B9B9",
+"7 c #D2D2D2",
+"8 c #B3B3B3",
+"9 c #E8E8E8",
+"0 c #9E9D9D",
+"a c #7A797A",
+"b c #676767",
+"c c #4E4E4E",
+"d c #161616",
+"e c #A5A4A4",
+"f c #B4B4B4",
+"g c #DFDFDF",
+"h c #8F8E8E",
+"i c #9F9F9E",
+"j c #F2F0EE",
+"k c #E7E2DF",
+"l c #D1CBC6",
+"m c #ACA39D",
+"n c #211F1E",
+"o c #F2F2F2",
+"p c #C1C1C1",
+"q c #D8D7D7",
+"r c #BEBEBE",
+"s c #EEEEEE",
+"t c #D1D1D1",
+"u c #C8C6C5",
+"v c #CCC8C4",
+"w c #D1CBC5",
+"x c #DCD2CA",
+"y c #E4D7CD",
+"z c #2E2B29",
+"A c #EFEEEE",
+"B c #E2DEDC",
+"C c #D7D2CE",
+"D c #D6CEC8",
+"E c #DBD1C8",
+"F c #E4D6CC",
+"G c #E6D6C8",
+"H c #2E2A27",
+"I c #ECECEC",
+"J c #A4A3A3",
+"K c #CDCDCC",
+"L c #A1A09F",
+"M c #BEBBB9",
+"N c #E4DED8",
+"O c #BAB3AD",
+"P c #9D958E",
+"Q c #B6ACA2",
+"R c #BAACA1",
+"S c #E3D0C0",
+"T c #2D2926",
+"U c #939291",
+"V c #C5C2C0",
+"W c #95918E",
+"X c #9E9893",
+"Y c #B8AFA7",
+"Z c #8F867F",
+"` c #978D83",
+" . c #CFBEAF",
+".. c #E1CCB9",
+"+. c #2D2824",
+"@. c #F3F3F3",
+"#. c #D1D0CF",
+"$. c #DFDBD8",
+"%. c #CEC8C2",
+"&. c #C5BEB7",
+"*. c #D3C8BE",
+"=. c #C3B6AC",
+"-. c #D1C1B4",
+";. c #D4C2B3",
+">. c #D2BDAB",
+",. c #DFC5B0",
+"'. c #2C2723",
+"). c #000000",
+"!. c #6E6E6E",
+"~. c #EFEDEC",
+"{. c #C5C1BE",
+"]. c #D8D1CC",
+"^. c #C4BBB4",
+"/. c #BAB0A7",
+"(. c #CABCB1",
+"_. c #B7A89C",
+":. c #C8B6A7",
+"<. c #CCB8A5",
+"[. c #C8B19D",
+"}. c #DBBFA7",
+"|. c #28231E",
+"1. c #333333",
+"2. c #6E6E6F",
+"3. c #808080",
+"4. c #6D6C6B",
+"5. c #E9E4E0",
+"6. c #99938F",
+"7. c #9B948E",
+"8. c #A39991",
+"9. c #9E9289",
+"0. c #AEA094",
+"a. c #BAA99A",
+"b. c #9A897B",
+"c. c #9D8A7A",
+"d. c #AC9582",
+"e. c #D9B99E",
+"f. c #38332E",
+"g. c #999999",
+"h. c #505050",
+"i. c #2D2D2D",
+"j. c #A4A4A4",
+"k. c #5E5E5F",
+"l. c #4B4B4B",
+"m. c #6C6A67",
+"n. c #F2EAE2",
+"o. c #F6EAE1",
+"p. c #F4E6DB",
+"q. c #F2E2D3",
+"r. c #F1DECD",
+"s. c #EFD8C5",
+"t. c #EDD4BE",
+"u. c #EBCFB7",
+"v. c #EACAB0",
+"w. c #E8C5A8",
+"x. c #D7B496",
+"y. c #2D2621",
+"z. c #818181",
+"A. c #7A7A7A",
+"B. c #707070",
+"C. c #4D4D4D",
+"D. c #444444",
+"E. c #4A4A4A",
+"F. c #575552",
+"G. c #B2AAA3",
+"H. c #B1A69E",
+"I. c #B0A399",
+"J. c #AD9D90",
+"K. c #AC998A",
+"L. c #AA9685",
+"M. c #A9927F",
+"N. c #A88F7A",
+"O. c #A68B73",
+"P. c #A3856C",
+"Q. c #25201B",
+"R. c #595959",
+"S. c #3A3A3A",
+"T. c #434343",
+"U. c #3F3F3F",
+"V. c #292929",
+"W. c #040404",
+"X. c #2B2B2B",
+"Y. c #545454",
+"Z. c #6D6D6D",
+"`. c #3D3D3D",
+" + c #212121",
+".+ c #898989",
+"++ c #272727",
+"@+ c #010101",
+"#+ c #787878",
+"$+ c #6A6A6A",
+"%+ c #606060",
+"&+ c #0B0B0B",
+"*+ c #555555",
+"=+ c #525252",
+"-+ c #868686",
+";+ c #515151",
+">+ c #0C0C0C",
+",+ c #777777",
+"'+ c #7C7C7C",
+")+ c #343434",
+"!+ c #171717",
+" ",
+" . + + + + + + + @ # ",
+" $ % & & & & & & * = - ",
+" $ ; > , ' ) ! ~ { ] ^ / ",
+" $ ( _ ' : < [ ; } | [ 1 2 ",
+" $ 3 4 5 6 7 8 9 0 a b c d ",
+" $ ' e f g ^ h i j k l m n ",
+" $ o p q r s t u v w x y z ",
+" $ ( 7 < [ A B C D E F G H ",
+" $ I J K L M N O P Q R S T ",
+" $ s 0 U V W X Y Z ` ...+. ",
+" $ @.#.$.%.&.*.=.-.;.>.,.'. ",
+" ).!.~.{.].^./.(._.:.<.[.}.|.). ",
+" 1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i. ",
+" ).j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.# z.A. ",
+" B.C.D.E.F.G.H.I.0.J.K.L.M.N.O.P.Q.- R.$ S.",
+" A.T.U.V.).).).).).).).).).).).).W.X.Y.Z.`.",
+" +.+++@+).).).).).).).).).).).).).W.. #+ ",
+" $+%+. ).).).).).).).).).).).).&+*+{ =+ ",
+" X.D.-+-+;+>+>+>+>+>+>+>+,+-+'+)+ ",
+" ).).D.A.A.A.A.A.A.A.!+).). ",
+" "};
diff --git a/kommander/editor/pics/large/editgrid.xpm b/kommander/editor/pics/large/editgrid.xpm
new file mode 100644
index 00000000..bbec2531
--- /dev/null
+++ b/kommander/editor/pics/large/editgrid.xpm
@@ -0,0 +1,206 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 168 2",
+" c #292910100808",
+". c #313108080808",
+"X c #393908080000",
+"o c #313110100808",
+"O c #393910100808",
+"+ c #313110101010",
+"@ c #393918181818",
+"# c #393921211818",
+"$ c #313121212121",
+"% c #393929292121",
+"& c #393929292929",
+"* c #424208080000",
+"= c #4a4a08080000",
+"- c #424218181010",
+"; c #525208080000",
+": c #5a5a08080000",
+"> c #525210100000",
+", c #5a5a10100000",
+"< c #525218181010",
+"1 c #5a5a18181010",
+"2 c #424221211818",
+"3 c #5a5a21211818",
+"4 c #424229292121",
+"5 c #424229292929",
+"6 c #4a4a29292929",
+"7 c #424231312929",
+"8 c #4a4a31312929",
+"9 c #424231313131",
+"0 c #4a4a31313131",
+"q c #4a4a39393131",
+"w c #525239393939",
+"e c #636310100000",
+"r c #636310100808",
+"t c #6b6b10100808",
+"y c #6b6b18180808",
+"u c #737318180808",
+"i c #7b7b18180808",
+"p c #636321211010",
+"a c #737321211010",
+"s c #6b6b29292121",
+"d c #636331312929",
+"f c #7b7b31312121",
+"g c #525242424242",
+"h c #52524a4a4242",
+"j c #52524a4a4a4a",
+"k c #5a5a42424242",
+"l c #5a5a4a4a4a4a",
+"z c #5a5a52524a4a",
+"x c #5a5a52525252",
+"c c #63634a4a4242",
+"v c #6b6b5a5a5a5a",
+"b c #6b6b63636363",
+"n c #73736b6b6b6b",
+"m c #848421211010",
+"M c #8c8c21211010",
+"N c #8c8c29291818",
+"B c #9c9c29291818",
+"V c #949431311818",
+"C c #9c9c31311818",
+"Z c #949439392929",
+"A c #9c9c39392121",
+"S c #9c9c39392929",
+"D c #a5a529291010",
+"F c #a5a529291818",
+"G c #adad29291818",
+"H c #a5a531311818",
+"J c #b5b529291010",
+"K c #b5b531311818",
+"L c #bdbd31311818",
+"P c #a5a531312121",
+"I c #a5a539392929",
+"U c #adad39392121",
+"Y c #adad39392929",
+"T c #b5b539392121",
+"R c #b5b539392929",
+"E c #bdbd31312121",
+"W c #bdbd39392121",
+"Q c #a5a542423131",
+"! c #adad4a4a3939",
+"~ c #b5b542422929",
+"^ c #bdbd42422929",
+"/ c #b5b542423131",
+"( c #b5b54a4a3939",
+") c #bdbd42423131",
+"_ c #9c9c5a5a5252",
+"` c #9c9c63635252",
+"' c #9c9c63635a5a",
+"] c #9c9c6b6b6363",
+"[ c #9c9c73736b6b",
+"{ c #9c9c7b7b7373",
+"} c #a5a54a4a4242",
+"| c #adad4a4a4242",
+" . c #b5b552524242",
+".. c #a5a563635a5a",
+"X. c #adad6b6b5a5a",
+"o. c #b5b56b6b5a5a",
+"O. c #adad6b6b6363",
+"+. c #a5a573736b6b",
+"@. c #adad73736b6b",
+"#. c #a5a573737373",
+"$. c #a5a57b7b7373",
+"%. c #a5a57b7b7b7b",
+"&. c #b5b573736b6b",
+"*. c #bdbd73736363",
+"=. c #c6c639392121",
+"-. c #cece39392121",
+";. c #c6c642422929",
+":. c #c6c642423131",
+">. c #c6c64a4a3131",
+",. c #c6c64a4a3939",
+"<. c #cece4a4a3131",
+"1. c #cece4a4a3939",
+"2. c #d6d642422929",
+"3. c #d6d64a4a3131",
+"4. c #d6d64a4a3939",
+"5. c #dede4a4a3131",
+"6. c #dede4a4a3939",
+"7. c #dede52523939",
+"8. c #e7e752523939",
+"9. c #efef52523939",
+"0. c #efef5a5a3939",
+"q. c #cece5a5a4242",
+"w. c #d6d65a5a4242",
+"e. c #d6d65a5a4a4a",
+"r. c #dede52524242",
+"t. c #dede5a5a4242",
+"y. c #dede63634a4a",
+"u. c #dede63635252",
+"i. c #e7e75a5a4242",
+"p. c #efef5a5a4242",
+"a. c #e7e763634a4a",
+"s. c #efef63634a4a",
+"d. c #efef63635252",
+"f. c #f7f763634242",
+"g. c #f7f763634a4a",
+"h. c #ffff63634a4a",
+"j. c #f7f773735a5a",
+"k. c #ffff73735a5a",
+"l. c #efef7b7b6363",
+"z. c #efef7b7b6b6b",
+"x. c #ffff7b7b6363",
+"c. c #a5a584847b7b",
+"v. c #b5b584847b7b",
+"b. c #ffff84846b6b",
+"n. c #f7f784847373",
+"m. c #8c8c84848484",
+"M. c Gray55",
+"N. c #9c9c8c8c8c8c",
+"B. c Gray58",
+"V. c #a5a584848484",
+"C. c #a5a58c8c8484",
+"Z. c #adad94948c8c",
+"A. c #a5a59c9c9c9c",
+"S. c #adad94949494",
+"D. c #b5b58c8c8484",
+"F. c #a5a5a5a59c9c",
+"G. c #adada5a59c9c",
+"H. c #b5b5a5a59c9c",
+"J. c #a5a5a5a5a5a5",
+"K. c #adada5a5a5a5",
+"L. c Gray68",
+"P. c #b5b5a5a5a5a5",
+"I. c #b5b5adadadad",
+"U. c Gray71",
+"Y. c Gray74",
+"T. c #c6c69c9c9494",
+"R. c #c0c0c0c0c0c0",
+"E. c None",
+/* pixels */
+"E.E.E.E.E.{ ;.u./ p k E.E.E.E.E.E.E.E.E.E.[ ,.u.I 3 v E.E.E.E.E.",
+"E.E.E.E.E.+.=.i.Y r 9 Y.E.E.E.E.E.E.E.E.E.' -.a.P ; l E.E.E.E.E.",
+"E.E.E.E.E.+.E a.~ r 8 Y.E.E.E.E.E.E.E.E.E.' ;.i.P : z Y.E.E.E.E.",
+"E.E.E.E.E.#.=.i.~ r 7 Y.E.E.E.E.E.E.E.E.E.] -.a.P > l E.E.E.E.E.",
+"E.E.E.E.E.c.L i.~ e & E.E.E.E.E.E.E.E.E.E.[ -.i.P , j E.E.E.E.E.",
+"D.*.&.&.&.| K a.~ r < &.*.&.&.&.&.&.&.&.&.Q ;.a.P ; s &.&.&.&.v.",
+"y.p.0.p.0.0.7.i.R N 7.9.p.0.0.9.0.0.9.0.0.9.7.t.H f 8.9.0.9.9.t.",
+"n.b.b.b.b.b.b.d.,.j.b.b.b.b.x.b.b.x.b.x.b.x.x.a.,.x.x.x.x.x.x.z.",
+" .~ ~ ) R ^ R >.,.~ / ^ R R ^ R R ~ R ~ R R R >.:.~ R ~ R ~ R ! ",
+"d ; ; > ; = y 1.) y > > r > r > r > r > r = m t.P r > r > r > 3 ",
+"n $ % % & # F i.) u & & & & & & & & & & 2 ^ i.U r & & & & g ",
+"Y.Y.Y.Y.Y.S.J i.) u + U.Y.E.E.E.E.E.E.E.E.[ =.i.U r w Y.Y.E.E.Y.",
+"E.E.E.E.E.Z.G 7.>.u - U.E.E.E.E.E.E.E.E.E.$.=.i.I , w Y.E.E.E.E.",
+"E.E.E.E.E.S.G i.) u o L.E.E.E.E.E.E.E.E.E.$.W i.U r q E.E.E.E.E.",
+"E.E.E.E.E.G.G 7.>.a o L.E.E.E.E.E.E.E.E.E.$.W i.Y r 0 Y.E.E.E.E.",
+"E.E.E.E.E.A.G 7.>.i . L.E.E.E.E.E.E.E.E.E.c.E i.Y e q Y.E.E.E.E.",
+"E.E.E.E.E.G.G 7.>.a o K.E.E.E.E.E.E.E.E.E.%.L i.U r 8 Y.E.E.E.E.",
+"E.E.E.E.E.P.G 7.>.i O J.E.E.E.E.E.E.E.E.E.c.W t.Y y 0 Y.E.E.E.E.",
+"E.E.E.E.E.P.F 7.1.a . F.E.E.E.E.E.E.E.E.E.V.L i.Y e 6 Y.E.E.E.E.",
+"E.E.E.E.E.P.F 7.>.m O A.E.E.E.E.E.E.E.E.E.C.L t.T r 4 Y.E.E.E.E.",
+"E.E.E.E.E.I.D 6.>.i . J.E.E.E.E.E.E.E.E.E.N.K i.Y e 5 Y.E.E.E.E.",
+"I.@.@.@.@...D 4.1.a = _ @.O.O.O.O.O.O.O.O.} L r.R , 1 X.o.X.o.@.",
+"T.f.f.f.f.g.s.r.>.V w.h.f.g.g.f.g.f.f.g.f.g.p.t.U S s.h.g.g.g.g.",
+"H.x.x.b.x.x.x.j.<.u.x.x.x.x.x.x.x.x.x.l.x.x.l.a.>.j.k.j.j.j.j.l.",
+"Z.P P P P P P Y >.U P P P P A F A F A F H C B ^ ) C B A B A B S ",
+"N.= = = = * = ~ 4.a > * = = = O = O = = = * y r.R r * = * = * = ",
+"L.l h h j j a 5.1.M X 9 j j l l l l z x j w H 8.R y o x x x x b ",
+"E.Y.E.E.Y.Y.A 3.1.M O M.E.E.E.E.E.E.E.E.E.S.L t.R y 2 Y.E.E.E.E.",
+"E.E.E.E.E.Y.S 2.1.M * m.E.E.E.E.E.E.E.E.E.S.G 7.R y 2 Y.E.E.E.E.",
+"E.E.E.E.E.Y.Z 2.1.N * m.E.E.E.E.E.E.E.E.E.S.K 7.~ t @ Y.E.E.E.E.",
+"E.E.E.E.E.Y.Q ;.4.M X m.E.E.E.E.E.E.E.E.E.S.K 8.R u O U.E.E.E.E.",
+"E.E.E.E.E.Y.` 1.q.Z 4 B.E.E.E.E.E.E.E.E.E.K.! e.( d c Y.E.E.E.E."
+};
diff --git a/kommander/editor/pics/large/edithlayout.xpm b/kommander/editor/pics/large/edithlayout.xpm
new file mode 100644
index 00000000..4370cac8
--- /dev/null
+++ b/kommander/editor/pics/large/edithlayout.xpm
@@ -0,0 +1,103 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 65 1",
+" c #26260a0a0606",
+". c #2f2f08080202",
+"X c #252512120f0f",
+"o c #2d2d13130f0f",
+"O c #272715151212",
+"+ c #2c2c1f1f1d1d",
+"@ c #303009090303",
+"# c #373713130e0e",
+"$ c #333327272525",
+"% c #41410c0c0202",
+"& c #51510f0f0404",
+"* c #515110100505",
+"= c #545418180e0e",
+"- c #404035353333",
+"; c #4b4b3a3a3737",
+": c #636314140707",
+"> c #636315150808",
+", c #66661e1e1212",
+"< c #707019190a0a",
+"1 c #7a7a1f1f0f0f",
+"2 c #727222221414",
+"3 c #767632322626",
+"4 c #707042423939",
+"5 c #8e8e21210f0f",
+"6 c #818127271818",
+"7 c #818128281919",
+"8 c #8a8a23231212",
+"9 c #8d8d29291919",
+"0 c #9c9c23230f0f",
+"q c #9c9c25251212",
+"w c #9a9a2a2a1717",
+"e c #9b9b2d2d1a1a",
+"r c #818130302323",
+"t c #999934342323",
+"y c #adad27271111",
+"u c #adad28281212",
+"i c #aaaa2e2e1a1a",
+"p c #baba30301a1a",
+"a c #a7a736362323",
+"s c #a5a53a3a2828",
+"d c #a8a834342121",
+"f c #b4b438382424",
+"g c #b7b73e3e2a2a",
+"h c #b3b344443232",
+"j c #c7c73f3f2929",
+"k c #c9c93c3c2626",
+"l c #c3c342422d2d",
+"z c #c4c44f4f3b3b",
+"x c #cece4c4c3737",
+"c c #d5d547473030",
+"v c #d4d448483131",
+"b c #d7d755553f3f",
+"n c #dede51513939",
+"m c #cfcf57574343",
+"M c #d5d555554040",
+"N c #dede5c5c4747",
+"B c #dede5e5e4848",
+"V c #dfdf62624c4c",
+"C c #e7e75f5f4747",
+"Z c #e6e65f5f4848",
+"A c #e7e761614949",
+"S c #eaea60604747",
+"D c #e9e960604848",
+"F c #c0c0c0c0c0c0",
+"G c None",
+/* pixels */
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"sgBVms3=;GGGqlAVzr7+4GGVtbABs7,$",
+"9ibAxe<@;GGV0jCNg8*.GGG4yvAMd1%o",
+"9pnZxe<%;GGG9kCNg8>#4GGVuvDbd1*#",
+"9pnZx9<%;GGV6kCNg8>.4GG4evDba1&O",
+"9pnZxe<%;GGG5kCCg8>#GGGVwvDbd1*#",
+"9pnZxe<%;GGV0knNg8>X4GG4uvDbi1*O",
+"9pnZxe<%;GGG9kCCg8>+4GGVuvDba1*#",
+"9pnZxe<%;GGV6kCNg8>@GGG4evDba1&O",
+"9pnZxe<%;GGG5kCNg8> 4GGVwvDbi1*#",
+"9pnZxe<%;GGV0knCg8:$4GG4uvDbd1*O",
+"9pnZxe<%;GGG9kCNg8: GGGVuvDbd1*#",
+"9pnZxe<%;GGV6kCNg8>.4GG4evDba1&O",
+"8pnCxe<%-GGG5kCCf8:o4GGBwcSbi1&o",
+"sgBVms6$4GGVtlVVzr2+GGG4dmVBh7,$",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG"
+};
diff --git a/kommander/editor/pics/large/editlower.xpm b/kommander/editor/pics/large/editlower.xpm
new file mode 100644
index 00000000..b243115c
--- /dev/null
+++ b/kommander/editor/pics/large/editlower.xpm
@@ -0,0 +1,144 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 106 2",
+" c #b5b552523939",
+". c #84847b7b7b7b",
+"X c #bdbd73736b6b",
+"o c #c6c652523939",
+"O c #cece52523939",
+"+ c #d6d65a5a3939",
+"@ c #dede5a5a3939",
+"# c #efef5a5a3939",
+"$ c #ffff63633939",
+"% c #d6d65a5a4242",
+"& c #cece6b6b5a5a",
+"* c #d6d66b6b5252",
+"= c #d6d66b6b5a5a",
+"- c #dede73735a5a",
+"; c #c6c673736363",
+": c #c6c67b7b6b6b",
+"> c #cece7b7b7373",
+", c #dede7b7b6363",
+"< c #efef5a5a4242",
+"1 c #efef63634242",
+"2 c #e7e76b6b5252",
+"3 c #e7e773735a5a",
+"4 c #efef73735252",
+"5 c #efef73735a5a",
+"6 c #f7f763634242",
+"7 c #f7f76b6b4a4a",
+"8 c #ffff63634242",
+"9 c #ffff6b6b4242",
+"0 c #ffff6b6b4a4a",
+"q c #ffff73734a4a",
+"w c #f7f773735252",
+"e c #f7f773735a5a",
+"r c #ffff73735252",
+"t c #ffff7b7b5a5a",
+"y c #efef7b7b6363",
+"u c #bdbd8c8c7b7b",
+"i c #c6c684847b7b",
+"p c #c6c68c8c7b7b",
+"a c #cece84847373",
+"s c #cece8c8c7b7b",
+"d c #dede84847373",
+"f c #e7e784846b6b",
+"g c #ffff84846363",
+"h c #ffff8c8c6b6b",
+"j c #ffff8c8c7373",
+"k c #8c8c84848484",
+"l c #94948c8c8c8c",
+"z c #949494948c8c",
+"x c Gray58",
+"c c #9c9c94949494",
+"v c Gray61",
+"b c #adad94948c8c",
+"n c #b5b58c8c8484",
+"m c #bdbd94948c8c",
+"M c #b5b59c9c9494",
+"N c #bdbd9c9c9c9c",
+"B c #bdbda5a59c9c",
+"V c #a5a5a5a5a5a5",
+"C c #adada5a5a5a5",
+"Z c Gray68",
+"A c #b5b5a5a5a5a5",
+"S c #b5b5adadadad",
+"D c #b5b5b5b5adad",
+"F c #bdbdb5b5adad",
+"G c Gray71",
+"H c #bdbdb5b5b5b5",
+"J c #bdbdbdbdb5b5",
+"K c Gray74",
+"L c #c6c68c8c8484",
+"P c #cece9c9c8c8c",
+"I c #c6c69c9c9494",
+"U c #d6d694948c8c",
+"Y c #c6c6a5a59c9c",
+"T c #ceceadada5a5",
+"R c #c6c6b5b5adad",
+"E c #c6c6bdbdbdbd",
+"W c #dedeb5b5a5a5",
+"Q c #e7e7bdbdb5b5",
+"! c #e7e7c6c6b5b5",
+"~ c #e7e7c6c6bdbd",
+"^ c #e7e7cecebdbd",
+"/ c #ffffcecebdbd",
+"( c #c0c0c0c0c0c0",
+") c #c6c6c6c6c6c6",
+"_ c #cecec6c6c6c6",
+"` c #cecececec6c6",
+"' c #cececececece",
+"] c #d6d6cececece",
+"[ c Gray84",
+"{ c #deded6d6d6d6",
+"} c #e7e7cecec6c6",
+"| c #e7e7d6d6cece",
+" . c #e7e7deded6d6",
+".. c #e7e7dededede",
+"X. c #ffffd6d6c6c6",
+"o. c #ffffdeded6d6",
+"O. c #efefe7e7dede",
+"+. c #f7f7efefe7e7",
+"@. c #f7f7efefefef",
+"#. c #ffffefefe7e7",
+"$. c #f7f7f7f7efef",
+"%. c #fffff7f7efef",
+"&. c #fffff7f7f7f7",
+"*. c #fffffffff7f7",
+"=. c Gray100",
+"-. c None",
+/* pixels */
+": % * = & ; X : > i u n b m I N B A S R K E K -.-.-.-.-.-.-.-.-.",
+"3 0 0 0 0 9 8 9 0 9 8 8 8 6 6 6 6 # # < 6 Z -.-.-.-.-.-.-.-.-.",
+"f q 0 q 0 q 0 0 0 0 q 0 q 0 0 0 0 q q q q v -.-.-.-.-.-.-.-.-.",
+"d 0 0 0 0 0 0 0 q 0 0 0 0 0 q 0 q 0 0 0 q o v -.-.-.-.-.-.-.-.-.",
+"s 9 0 0 0 0 0 0 0 0 q 0 0 0 0 0 0 0 0 0 q o c -.-.-.-.-.-.-.-.-.",
+"L 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 O x -.-.-.-.-.-.-.-.-.",
+"U 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 q + x -.-.-.-.-.-.-.-.-.",
+"P 0 0 9 0 0 9 0 0 9 0 0 9 0 0 9 0 0 9 0 0 @ l -.-.-.-.-.-.-.-.-.",
+"M 0 9 0 0 9 0 0 9 0 0 9 0 0 9 0 0 9 0 0 0 < k -.-.-.-.-.-.-.-.-.",
+"Y 0 0 0 0 0 0 0 0 9 9 9 9 9 0 9 9 0 9 9 9 1 . -.-.-.-.-.-.-.-.-.",
+"T 0 0 9 9 0 9 9 0 0 5 e w 7 0 7 9 7 8 6 9 # . -.) -.-.-.-.-.-.-.",
+"S 0 9 0 0 9 0 0 8 h O.O. . .| | } ^ ~ ! Q W F J H H G D S Z S Z ",
+"F 7 9 9 0 9 0 9 $ j =.*.=.*.=.*.=.=.=.=.=.=.*.*.*.*.%.&.%.%.$.l ",
+"E w 8 0 9 0 9 0 8 g %.*.&.&.*.&.%.*.&.%.*.%.&.&.&.&.*.%.*.*.&.l ",
+"K 5 9 8 0 9 8 9 8 t %.*.%.%.%.%.*.%.%.&.%.*.%.%.%.%.%.&.%.&.*.z ",
+"K - 8 0 9 8 0 9 8 r #.&.%.*.&.*.&.%.&.*.%.&.%.*.&.*.&.*.%.%.*.l ",
+"E , 9 8 9 0 9 8 8 r #.*.%.%.%.%.%.*.%.%.%.&.%.&.%.%.%.%.&.*.*.l ",
+"-.f 9 0 8 9 0 9 8 0 o.*.&.%.&.%.&.%.%.&.%.%.&.%.%.&.%.&.%.%.=.l ",
+"-.a 8 8 9 8 8 8 8 9 o.*.&.%.&.%.%.&.%.%.&.%.%.&.%.%.%.%.%.%.*.v ",
+"-.p 8 9 8 8 9 9 9 8 X.*.%.%.%.%.&.%.%.%.%.%.%.%.%.%.&.%.&.%.*.V ",
+"-.Y 3 y 5 2 4 w 7 8 / *.%.&.%.%.%.%.&.%.&.%.%.%.&.%.%.%.%.%.=.V ",
+"-.E K ) K K K E K F [ *.%.%.%.&.%.%.%.%.%.%.%.%.%.%.%.%.%.%.*.V ",
+"-.-.-.-.-.-.-.-.-.-.] &.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.=.V ",
+"-.-.-.-.-.-.-.-.-.-._ *.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.*.C ",
+"-.-.-.-.-.-.-.-.-.-._ *.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.=.V ",
+"-.-.-.-.-.-.-.-.-.-.] %.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.*.V ",
+"-.-.-.-.-.-.-.-.-.-.' %.%.%.%.%.%.%.%.%.%.@.%.%.@.%.%.@.%.%.*.C ",
+"-.-.-.-.-.-.-.-.-.-.E %.%.@.%.@.%.@.%.@.%.%.%.%.%.%.%.%.%.%.*.V ",
+"-.-.-.-.-.-.-.-.-.-.J &.%.%.%.%.%.%.%.%.%.@.%.@.%.@.%.%.@.%.*.C ",
+"-.-.-.-.-.-.-.-.-.-._ %.%.%.%.%.%.@.%.%.%.%.#.%.%.#.@.%.#.$.*.S ",
+"-.-.-.-.-.-.-.-.-.-.) O.O.+.+.+.+.@.%.#.$.@.%.%.%.%.%.%.%.%.*.F ",
+"-.-.-.-.-.-.-.-.-.-.K K ) K G K ) ` G K _ ] ' E ' { { ' | ..O.H "
+};
diff --git a/kommander/editor/pics/large/editpaste.xpm b/kommander/editor/pics/large/editpaste.xpm
new file mode 100644
index 00000000..612bb258
--- /dev/null
+++ b/kommander/editor/pics/large/editpaste.xpm
@@ -0,0 +1,46 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 8 1",
+" c Gray0",
+". c #000000008080",
+"X c #808080800000",
+"o c Yellow",
+"O c #808080808080",
+"+ c #c0c0c0c0c0c0",
+"@ c Gray100",
+"# c None",
+/* pixels */
+"################################",
+"################################",
+"########## ##############",
+"######### #############",
+"## oo ######",
+"# oooo #####",
+" XOXOX oo oo OXOXO ####",
+" XOXOX oo oo OXOXO ####",
+" OXOX ++++++++++ OXOX ####",
+" XOXO ++++++++++++ XOXO ####",
+" OXOX OXOX ####",
+" XOXO XOXO ####",
+" OXOXOXOXOXOXOXOXOXOXOXOX ####",
+" XOXOXOXOXOXOXOXOXOXOXOXO ####",
+" OXOXOXOXOX.............. ####",
+" XOXOXOXOXO............... ####",
+" OXOXOXOXOX..@@@@@@@@@@....####",
+" XOXOXOXOXO..@@@@@@@@@@.....###",
+" OXOXOXOXOX..@@@@@@@@@@..@...##",
+" XOXOXOXOXO..@@@@@@@@@@..@@...#",
+" OXOXOXOXOX..@@......@@........",
+" XOXOXOXOXO..@@......@@........",
+" OXOXOXOXOX..@@@@@@@@@@@@@@@@..",
+" XOXOXOXOXO..@@@@@@@@@@@@@@@@..",
+" OXOXOXOXOX..@@............@@..",
+" OXOXOXOXO..@@............@@..",
+"# ..@@@@@@@@@@@@@@@@..",
+"## ..@@@@@@@@@@@@@@@@..",
+"############....................",
+"############....................",
+"################################",
+"################################"
+};
diff --git a/kommander/editor/pics/large/editraise.xpm b/kommander/editor/pics/large/editraise.xpm
new file mode 100644
index 00000000..0ab21ec7
--- /dev/null
+++ b/kommander/editor/pics/large/editraise.xpm
@@ -0,0 +1,149 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 111 2",
+" c #b5b552523939",
+". c #bdbd52523939",
+"X c #8c8c5a5a4a4a",
+"o c #84845a5a5252",
+"O c #949452524242",
+"+ c #9c9c52524242",
+"@ c #848463635a5a",
+"# c #848463636363",
+"$ c #84846b6b6363",
+"% c #84846b6b6b6b",
+"& c #b5b55a5a4242",
+"* c #b5b55a5a4a4a",
+"= c #adad63635252",
+"- c #bdbd73736b6b",
+"; c #c6c652523939",
+": c #d6d64a4a3131",
+"> c #d6d652523939",
+", c #dede52523939",
+"< c #efef52523131",
+"1 c #efef5a5a3939",
+"2 c #f7f75a5a3939",
+"3 c #ffff5a5a3939",
+"4 c #ffff63633939",
+"5 c #d6d65a5a4242",
+"6 c #cece6b6b5a5a",
+"7 c #d6d663634a4a",
+"8 c #dede73735a5a",
+"9 c #c6c673736363",
+"0 c #cece7b7b7373",
+"q c #dede7b7b6363",
+"w c #efef6b6b5252",
+"e c #e7e773735252",
+"r c #efef73735252",
+"t c #f7f763634242",
+"y c #f7f76b6b4a4a",
+"u c #ffff63634242",
+"i c #ffff6b6b4242",
+"p c #ffff6b6b4a4a",
+"a c #f7f76b6b5252",
+"s c #ffff73734a4a",
+"d c #f7f773735252",
+"f c #e7e77b7b6363",
+"g c #e7e77b7b6b6b",
+"h c #9c9c84847b7b",
+"j c #bdbd84847b7b",
+"k c #c6c684847373",
+"l c #c6c68c8c7b7b",
+"z c #dede84846b6b",
+"x c #d6d684847373",
+"c c #e7e784847373",
+"v c #94948c8c8c8c",
+"b c #949494948c8c",
+"n c Gray58",
+"m c #adad94948c8c",
+"M c #b5b58c8c8484",
+"N c #bdbd94948c8c",
+"B c #bdbd9c9c9494",
+"V c #bdbd9c9c9c9c",
+"C c #a5a5a5a59c9c",
+"Z c #bdbda5a59c9c",
+"A c #a5a5a5a5a5a5",
+"S c #adada5a5a5a5",
+"D c Gray68",
+"F c #b5b5a5a5a5a5",
+"G c #b5b5adadadad",
+"H c #b5b5b5b5adad",
+"J c Gray71",
+"K c #bdbdb5b5b5b5",
+"L c Gray74",
+"P c #cece94948484",
+"I c #c6c69c9c9494",
+"U c #d6d69c9c8c8c",
+"Y c #c6c6adada5a5",
+"T c #c6c6b5b5b5b5",
+"R c #c6c6bdbdbdbd",
+"E c #efef9c9c8c8c",
+"W c #ffffa5a58c8c",
+"Q c #ffffadad9494",
+"! c #ffffadad9c9c",
+"~ c #ffffb5b5a5a5",
+"^ c #ffffbdbdadad",
+"/ c #c6c6c6c6bdbd",
+"( c #ffffc6c6b5b5",
+") c #ffffcecebdbd",
+"_ c #c0c0c0c0c0c0",
+"` c #c6c6c6c6c6c6",
+"' c #cecececec6c6",
+"] c #cececececece",
+"[ c #d6d6c6c6c6c6",
+"{ c #d6d6cececece",
+"} c #d6d6d6d6cece",
+"| c #deded6d6cece",
+" . c #deded6d6d6d6",
+".. c #efefd6d6cece",
+"X. c #e7e7deded6d6",
+"o. c #e7e7dededede",
+"O. c #ffffd6d6c6c6",
+"+. c #ffffdeded6d6",
+"@. c #e7e7e7e7dede",
+"#. c #efefe7e7dede",
+"$. c #e7e7e7e7e7e7",
+"%. c #e7e7efefe7e7",
+"&. c #efefe7e7e7e7",
+"*. c #f7f7efefe7e7",
+"=. c #f7f7efefefef",
+"-. c #f7f7f7f7efef",
+";. c #fffff7f7efef",
+":. c #fffff7f7f7f7",
+">. c #fffffffff7f7",
+",. c Gray100",
+"<. c None",
+/* pixels */
+"6 5 7 6 6 9 - - 0 k j M m N I V Z F G T K R <.<.<.<.<.<.<.<.<.<.",
+"d p p p i i i i i p u u 4 2 2 1 1 1 < 1 , h <.<.<.<.<.<.<.<.<.<.",
+"8 s p s p p p p p p p p p s s p s p s d t % <.<.<.<.<.<.<.<.<.<.",
+"f p p p p p p p p p p s p p p p p p p p t $ <.<.<.<.<.<.<.<.<.<.",
+"c i p p p p s p s p p p p p p p p p p p i # <.<.<.<.<.<.<.<.<.<.",
+"x p p p p p p p p p p p p p p p p p p p i @ <.<.<.<.<.<.<.<.<.<.",
+"l i p p p p p p p p p i p p i p p i p p p o <.<.<.<.<.<.<.<.<.<.",
+"P i p i p p i p p i p p p p p p i p p p i o <.<.<.<.<.<.<.<.<.<.",
+"U p p p p i p p i p p i p i p i p p i i p X L <.<.<.<.<.<.<.<.<.",
+"I i p i p p i p p i p i p i p p i p p p i O <.<.<.<.<.<.<.<.<.<.",
+"V p i p i i p i p i p i p p i p i p i i p + D H G J J J H J K L ",
+"Y p p i p p p i p p i p p i p i p p i p u = %.:.;.-.*.&.#.@. .b ",
+"Y i u p u i u p u i p u i p u p u i u p i * %.>.>.:.>.>.>.>.>.v ",
+"G y i p i p i p p u p i p u i p p i p u i & $.>.;.;.;.;.:.:.>.v ",
+"K y i u p u p u i p u i u p i u i u i p u @.>.:.>.:.:.;.;.>.b ",
+"R d u p i i i i p u p i p u p i p i p u i @.>.;.;.;.;.;.:.>.v ",
+"L w i i u p u p u i i u i i u u p u i i p o.>.:.;.:.;.:.;.>.v ",
+"L e u i i u i u i u i p u i i u u i u u i . X.>.;.:.;.:.;.>.>.n ",
+"L f i u i u i u p i u u u u p i u p i i u ; | >.;.;.;.;.;.:.>.C ",
+"` f u p u i u i u u u i p i u u i u u u i ; | >.;.;.:.;.;.;.>.A ",
+"L q u u u u u u u i u u u u u i u u i u u > { >.;.:.;.;.;.;.,.C ",
+"L B x z g 8 e r a p t p i u u u 4 3 3 3 4 : [ >.;.;.;.;.;.;.,.C ",
+"<.<.<.<.<.L L L R H G ..+.O.) ( ^ ~ ! Q W E #.:.;.;.;.;.;.;.,.S ",
+"<.<.<.<.<.<.<.<.<.<.R @.>.:.>.>.>.,.>.,.>.>.;.;.;.;.;.;.;.;.,.C ",
+"<.<.<.<.<.<.<.<.<.<.` o.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.>.A ",
+"<.<.<.<.<.<.<.<.<.<.L #.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.,.C ",
+"<.<.<.<.<.<.<.<.<.<.L .;.;.;.=.;.;.=.;.;.=.;.;.=.;.;.=.;.;.>.S ",
+"<.<.<.<.<.<.<.<.<.<.L } ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.,.C ",
+"<.<.<.<.<.<.<.<.<.<.` ] :.;.=.;.=.;.;.=.;.;.=.;.;.=.;.;.=.;.>.S ",
+"<.<.<.<.<.<.<.<.<.<.<.X.;.;.;.;.;.;.=.;.=.*.;.=.*.;.=.*.;.=.>.G ",
+"<.<.<.<.<.<.<.<.<.<.<.' #.&.*.*.*.*.;.*.;.;.;.>.;.;.;.;.;.;.>.H ",
+"<.<.<.<.<.<.<.<.<.<.<.L L L L J L ' ` K / ] { R ' | .{ | .&.K "
+};
diff --git a/kommander/editor/pics/large/editslots.xpm b/kommander/editor/pics/large/editslots.xpm
new file mode 100644
index 00000000..729adb8f
--- /dev/null
+++ b/kommander/editor/pics/large/editslots.xpm
@@ -0,0 +1,264 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 226 2",
+" c #181808080000",
+". c #080821212929",
+"X c #181829292929",
+"o c #292910100000",
+"O c #313110100000",
+"+ c #393918180000",
+"@ c #393918180808",
+"# c #313121212121",
+"$ c #393931312929",
+"% c #000031314242",
+"& c #080842425252",
+"* c #181842424a4a",
+"= c #000052526b6b",
+"- c #080863637b7b",
+"; c #313142424a4a",
+": c #4a4a21210000",
+"> c #525229290000",
+", c #636329290000",
+"< c #6b6b29290000",
+"1 c #6b6b31310000",
+"2 c #7b7b31310000",
+"3 c #6b6b4a4a3131",
+"4 c #73734a4a3131",
+"5 c #42424a4a5252",
+"6 c #5a5a52524a4a",
+"7 c #42425a5a6363",
+"8 c #636363635a5a",
+"9 c #73736b6b6363",
+"0 c #73737b7b7b7b",
+"q c #7b7b73737373",
+"w c #7b7b7b7b7373",
+"e c #00006b6b8484",
+"r c #08086b6b8484",
+"t c #000073739494",
+"y c #08088c8c9c9c",
+"u c #08088484adad",
+"i c #08088c8cadad",
+"p c #08089494b5b5",
+"a c #18188484a5a5",
+"s c #1818a5a5bdbd",
+"d c #31319c9cadad",
+"f c #31319c9cb5b5",
+"g c #08089c9cc6c6",
+"h c #1010a5a5cece",
+"j c #1010adadd6d6",
+"k c #1010bdbdefef",
+"l c #1818bdbde7e7",
+"z c #2929a5a5c6c6",
+"x c #3131bdbdd6d6",
+"c c #1010c6c6efef",
+"v c #1010ceceffff",
+"b c #1818c6c6f7f7",
+"n c #1818ceceffff",
+"m c #1010d6d6ffff",
+"M c #1818e7e7ffff",
+"N c #1818efefffff",
+"B c #1818ffffffff",
+"V c #3131c6c6c6c6",
+"C c #3939c6c6c6c6",
+"Z c #2121dedeefef",
+"A c #3939dedee7e7",
+"S c #2121e7e7e7e7",
+"D c #2121efefffff",
+"F c #2121ffffffff",
+"G c #2929ffffffff",
+"H c #3939efefefef",
+"J c #3131f7f7ffff",
+"K c #3131ffffffff",
+"L c #3939ffffffff",
+"P c #4242a5a5b5b5",
+"I c #5a5ab5b5b5b5",
+"U c #6b6b84848c8c",
+"Y c #737384848c8c",
+"T c #7b7b84848484",
+"R c #7373a5a5adad",
+"E c #7373adadb5b5",
+"W c #7b7bb5b5bdbd",
+"Q c #7b7bbdbdc6c6",
+"! c #4a4ad6d6d6d6",
+"~ c #4a4ad6d6dede",
+"^ c #5252d6d6dede",
+"/ c #5252dededede",
+"( c #4242e7e7efef",
+") c #4a4affffffff",
+"_ c #5252ffffffff",
+"` c #6363dededede",
+"' c #6b6bdededede",
+"] c #7b7bc6c6c6c6",
+"[ c #7373c6c6d6d6",
+"{ c #6b6befefefef",
+"} c #6363ffffffff",
+"| c #7373f7f7ffff",
+" . c #7373ffffffff",
+".. c #848439390000",
+"X. c #949442420000",
+"o. c #9c9c42420000",
+"O. c #94945a5a1818",
+"+. c #a5a542420000",
+"@. c #adad42420000",
+"#. c #adad4a4a0000",
+"$. c #b5b54a4a0000",
+"%. c #b5b552520000",
+"&. c #bdbd52520000",
+"*. c #adad6b6b3939",
+"=. c #8c8c63634a4a",
+"-. c #94946b6b4242",
+";. c #84847b7b7b7b",
+":. c #adad73734a4a",
+">. c #c6c65a5a0808",
+",. c #d6d65a5a0000",
+"<. c #dede63630808",
+"1. c #d6d66b6b1818",
+"2. c #e7e763630000",
+"3. c #efef6b6b0808",
+"4. c #e7e773731818",
+"5. c #f7f763630000",
+"6. c #f7f76b6b1010",
+"7. c #ffff73730808",
+"8. c #ffff7b7b0000",
+"9. c #f7f773731010",
+"0. c #ffff7b7b1010",
+"q. c #ffff7b7b1818",
+"w. c #bdbd9c9c3939",
+"e. c #b5b58c8c7373",
+"r. c #d6d68c8c2929",
+"t. c #d6d68c8c3131",
+"y. c #ffff84840808",
+"u. c #ffff8c8c0808",
+"i. c #ffff84841818",
+"p. c #ffff8c8c1010",
+"a. c #ffff8c8c1818",
+"s. c #ffff94940808",
+"d. c #ffff9c9c0808",
+"f. c #ffff94941818",
+"g. c #ffff9c9c1010",
+"h. c #efef84842121",
+"j. c #efef94942929",
+"k. c #ffff94942121",
+"l. c #ffff94942929",
+"z. c #ffff9c9c3131",
+"x. c #ffffa5a50808",
+"c. c #ffffa5a52121",
+"v. c #ffffa5a52929",
+"b. c #ffffa5a53131",
+"n. c #ffffadad3939",
+"m. c #ffffb5b52929",
+"M. c #ffffbdbd2121",
+"N. c #ffffbdbd3131",
+"B. c #d6d694945252",
+"V. c #d6d694945a5a",
+"C. c #cece9c9c6363",
+"Z. c #c6c69c9c7b7b",
+"A. c #ffffb5b54242",
+"S. c #ffffc6c63131",
+"D. c #ffffcece3131",
+"F. c #ffffc6c64a4a",
+"G. c #ffffc6c65252",
+"H. c #ffffd6d64242",
+"J. c #ffffdede4a4a",
+"K. c #ffffd6d65252",
+"L. c #ffffd6d65a5a",
+"P. c #ffffdede5a5a",
+"I. c #f7f7d6d66363",
+"U. c #ffffe7e76363",
+"Y. c #ffffe7e76b6b",
+"T. c #ffffefef6b6b",
+"R. c #fffff7f76363",
+"E. c #fffff7f77373",
+"W. c #ffffffff7373",
+"Q. c #84848c8c8c8c",
+"!. c #94948c8c8484",
+"~. c #94948c8c8c8c",
+"^. c #9c9c94948c8c",
+"/. c #9c9c9c9c9494",
+"(. c Gray61",
+"). c #8c8c9c9ca5a5",
+"_. c #9494a5a5a5a5",
+"`. c #9c9ca5a5a5a5",
+"'. c #9494bdbdbdbd",
+"]. c #a5a59c9c9494",
+"[. c #b5b5a5a59494",
+"{. c #bdbda5a59494",
+"}. c #a5a5a5a5a5a5",
+"|. c Gray68",
+" X c #a5a5bdbdbdbd",
+".X c #adadb5b5b5b5",
+"XX c #adadbdbdbdbd",
+"oX c #bdbdadada5a5",
+"OX c Gray71",
+"+X c #b5b5bdbdbdbd",
+"@X c #bdbdb5b5b5b5",
+"#X c Gray74",
+"$X c #8c8cbdbdc6c6",
+"%X c #8484c6c6c6c6",
+"&X c #8484ffffffff",
+"*X c #8c8cffffffff",
+"=X c #9494efefefef",
+"-X c #9c9ce7e7e7e7",
+";X c #9494ffffffff",
+":X c #9c9cffffffff",
+">X c #adadffffffff",
+",X c #b5b5ffffffff",
+"<X c #bdbdffffffff",
+"1X c #c6c6a5a58484",
+"2X c #c6c6adad9c9c",
+"3X c #c6c6b5b5adad",
+"4X c #c6c6bdbdbdbd",
+"5X c #ffffffff8484",
+"6X c #ffffffff8c8c",
+"7X c #ffffffff9494",
+"8X c #ffffffff9c9c",
+"9X c #ffffffffadad",
+"0X c #ffffffffbdbd",
+"qX c #c0c0c0c0c0c0",
+"wX c #c6c6c6c6c6c6",
+"eX c #c6c6ffffffff",
+"rX c #ceceffffffff",
+"tX c #d6d6ffffffff",
+"yX c #dedeffffffff",
+"uX c #ffffffffc6c6",
+"iX c #ffffffffcece",
+"pX c #ffffffffd6d6",
+"aX c #ffffffffdede",
+"sX c #e7e7ffffffff",
+"dX c Gray100",
+"fX c None",
+/* pixels */
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfX#X%X^ Z U fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfX'.H B G S ; #XfXfXfXfX#X2XZ.Z.{.@XfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfX] B K ) _ C X #XfXfX#X1Xj.s.s.u.8.4.e.#XfXfXfXfXfXfX",
+"fXfXfXfXfX'.F L } &X;XI . OXfX#XB.d.M.D.S.m.f.y.5.*.OXfXfXfXfXfX",
+"fXfXfXfXOXG K } ;X<XrXE & |.fXC.x.H.U.W.W.P.N.f.7.,.-.#XfXfXfXfX",
+"fXfXfXfXQ F ) &X<XyXsXW e .XoXs.m.R.8X0X9X5XK.c.0.2.o.^.fXfXfXfX",
+"fXfXfXwXA G _ ;XeXsXdXQ p |.V.g.H.6XuXaXiX8XU.b.0.<.@.4 #XfXfXfX",
+"XX X.X$XN G _ *X<XtXsX[ l }.h.f.J.6X0XpXuX7XL.b.0.<.+.> [.3X3X@X",
+":X;X;X| M G ) .:X>X,X' ( /.9.f.S.T.8X9X8XE.F.k.6.>.X.: w.P.L.I.",
+"P f d z m F L _ . .&X` { ].3.p.v.G.T.E.Y.G.z.q.<.#...+ O.t.r.t.",
+"|.(.`._.c M G L ) _ _ / =X}.1.7.a.v.n.A.n.l.q.<.&.X., o q !.;.~.",
+"fXfXfX4Xz v n D J J J ~ -X.X:.2.7.0.i.i.i.9.<.&.o.2 + # #XfXfXfX",
+"fXfXfXfXR j k b n b b x ' OX(.#.,.<.<.6.<.>.%.X.2 : w fXfXfXfX",
+"fXfXfXfXOXa g j j j h s ! @X#X=.X.$.%.#.+.o...1 : $ #XfXfXfXfX",
+"fXfXfXfXfX).t u i u a y V #XfX+X3 < 2 ..2 1 > O # |.fXfXfXfXfX",
+"fXfXfXfXfX4XY = - r - - d #XfXfX#X9 @ O O o 6 OXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXQ.* % % % 7 4XfXfXfXfX|.T 9 8 ;.}.fXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXOXT 5 X 0 fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX",
+"fXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX"
+};
diff --git a/kommander/editor/pics/large/editvlayout.xpm b/kommander/editor/pics/large/editvlayout.xpm
new file mode 100644
index 00000000..9e1b618e
--- /dev/null
+++ b/kommander/editor/pics/large/editvlayout.xpm
@@ -0,0 +1,89 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 51 1",
+" c #1e1e05050202",
+". c #262606060000",
+"X c #25250e0e0b0b",
+"o c #272710100d0d",
+"O c #242415151313",
+"+ c #2d2d1f1f1d1d",
+"@ c #36360b0b0303",
+"# c #333327272525",
+"$ c #353529292727",
+"% c #4a4a0f0f0505",
+"& c #4e4e17170e0e",
+"* c #4f4f19191010",
+"= c #5a5a13130707",
+"- c #45453a3a3838",
+"; c #666616160909",
+": c #68681e1e1212",
+"> c #78781c1c0d0d",
+", c #696920201414",
+"< c #797925251717",
+"1 c #4a4a40403e3e",
+"2 c #7c7c44443b3b",
+"3 c #4c4c42424040",
+"4 c #8b8b25251414",
+"5 c #8a8a2d2d1e1e",
+"6 c #9b9b2d2d1b1b",
+"7 c #959535352424",
+"8 c #94943b3b2c2c",
+"9 c #a2a22f2f1b1b",
+"0 c #b7b72a2a1212",
+"q c #b2b231311b1b",
+"w c #aeae37372424",
+"e c #adad38382525",
+"r c #aaaa3d3d2c2c",
+"t c #c7c749493434",
+"y c #c2c24d4d3a3a",
+"u c #d7d746462e2e",
+"i c #eded52523838",
+"p c #d3d35b5b4848",
+"a c #dcdc57574141",
+"s c #e6e66a6a5555",
+"d c #efef68685151",
+"f c #fdfd66664b4b",
+"g c #f6f676765e5e",
+"h c #ffff75755b5b",
+"j c #f6f67e7e6767",
+"k c #f6f67f7f6868",
+"l c #ffff7f7f6666",
+"z c #f6f683836c6c",
+"x c #ffff83836a6a",
+"c c #c0c0c0c0c0c0",
+"v c None",
+/* pixels */
+"vvvvvvvvvtqqqqqqqqqqqqrvvvvvvvvv",
+"vvvvvvvvvaiiiiiiiiiiiiivvvvvvvvv",
+"vvvvvvvvvzlllllllllllxzvvvvvvvvv",
+"vvvvvvvvvklhlhlhlhlhlhkvvvvvvvvv",
+"vvvvvvvvvyttttttttttttyvvvvvvvvv",
+"vvvvvvvvv8<444444444448vvvvvvvvv",
+"vvvvvvvvv,============,vvvvvvvvv",
+"vvvvvvvvv+............+vvvvvvvvv",
+"vvvvvvvvv311111111111-3vvvvvvvvv",
+"vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv",
+"vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv",
+"vvvvvvvvvzvzvzvzvzvzvzvvvvvvvvvv",
+"vvvvvvvvvr090909090900wvvvvvvvvv",
+"vvvvvvvvvgffffffffffffgvvvvvvvvv",
+"vvvvvvvvvzxxxxxxxxxxxxzvvvvvvvvv",
+"vvvvvvvvvgddddddddddddsvvvvvvvvv",
+"vvvvvvvvvreeeeeeeeeeeervvvvvvvvv",
+"vvvvvvvvv7:>>>>>>>>>>>5vvvvvvvvv",
+"vvvvvvvvv*%%%%%%%%%%%&*vvvvvvvvv",
+"vvvvvvvvv+ +vvvvvvvvv",
+"vvvvvvvvvz3z3v2z3v2z3z2vvvvvvvvv",
+"vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv",
+"vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv",
+"vvvvvvvvvsppppppppppppsvvvvvvvvv",
+"vvvvvvvvvyuuruuuruuuruyvvvvvvvvv",
+"vvvvvvvvvjghhhghhhghhhjvvvvvvvvv",
+"vvvvvvvvvzllllllllllllzvvvvvvvvv",
+"vvvvvvvvvpaaaaaaaaaaaapvvvvvvvvv",
+"vvvvvvvvv86666666666668vvvvvvvvv",
+"vvvvvvvvv5;;;;;;;;;;;;5vvvvvvvvv",
+"vvvvvvvvv*@@@@@@@@@@@@*vvvvvvvvv",
+"vvvvvvvvv$ooOOOOOOOOOX#vvvvvvvvv"
+};
diff --git a/kommander/editor/pics/large/filenew.xpm b/kommander/editor/pics/large/filenew.xpm
new file mode 100644
index 00000000..0cb2496e
--- /dev/null
+++ b/kommander/editor/pics/large/filenew.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 4 1",
+" c Gray0",
+". c #c0c0c0c0c0c0",
+"X c Gray100",
+"o c None",
+/* pixels */
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooo oooooooooooo",
+"oooo ooooooooooo",
+"oooo XXXXXXXXXXXX oooooooooo",
+"oooo XXXXXXXXXXXX ooooooooo",
+"oooo XXXXXXXXXXXX X oooooooo",
+"oooo XXXXXXXXXXXX XX ooooooo",
+"oooo XXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo XXXXXXXXXXXXXXXXXX oooooo",
+"oooo oooooo",
+"oooo oooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo"
+};
diff --git a/kommander/editor/pics/large/fileopen.xpm b/kommander/editor/pics/large/fileopen.xpm
new file mode 100644
index 00000000..dc66dca4
--- /dev/null
+++ b/kommander/editor/pics/large/fileopen.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 6 1",
+" c Gray0",
+". c #808080800000",
+"X c Yellow",
+"o c #c0c0c0c0c0c0",
+"O c Gray100",
+"+ c None",
+/* pixels */
+"++++++++++++++++++++++++++++++++",
+"++++++++++++++++++++++++++++++++",
+"++++++++++++++++++ ++++++++",
+"+++++++++++++++++ +++++++",
+"++++++++++++++++ ++++ ++ ++",
+"++++++++++++++++ ++++++ + ++",
+"+++++++++++++++++++++++++ ++",
+"++++++++++++++++++++++++++ ++",
+"++ ++++++++++++++++ ++",
+"+ +++++++++++++++ ++",
+" OXOX ++++++++++",
+" OXOXOX ++++++++++",
+" XOXOXOXOXOXOXOXOXO ++++++++++",
+" OXOXOXOXOXOXOXOXOX ++++++++++",
+" XOXOXOXOXOXOXOXOXO ++++++++++",
+" OXOXOXOXOXOXOXOXOX ++++++++++",
+" XOXOXOXO ",
+" OXOXOXO ",
+" XOXOXO ................. +",
+" OXOXO ................. ++",
+" XOXO ................. +++",
+" OXO ................. ++++",
+" XO ................. +++++",
+" O ................. ++++++",
+" ................. +++++++",
+" ................. ++++++++",
+" +++++++++",
+" ++++++++++",
+"++++++++++++++++++++++++++++++++",
+"++++++++++++++++++++++++++++++++",
+"++++++++++++++++++++++++++++++++",
+"++++++++++++++++++++++++++++++++"
+};
diff --git a/kommander/editor/pics/large/filesave.xpm b/kommander/editor/pics/large/filesave.xpm
new file mode 100644
index 00000000..c882806f
--- /dev/null
+++ b/kommander/editor/pics/large/filesave.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 4 1",
+" c Gray0",
+". c #808080800000",
+"X c #c0c0c0c0c0c0",
+"o c None",
+/* pixels */
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oo oo",
+"oo oo",
+"oo .. XXXXXXXXXXXXXXXX XX oo",
+"oo .. XXXXXXXXXXXXXXXX XX oo",
+"oo .. XXXXXXXXXXXXXXXX oo",
+"oo .. XXXXXXXXXXXXXXXX oo",
+"oo .. XXXXXXXXXXXXXXXX .. oo",
+"oo .. XXXXXXXXXXXXXXXX .. oo",
+"oo .. XXXXXXXXXXXXXXXX .. oo",
+"oo .. XXXXXXXXXXXXXXXX .. oo",
+"oo .. XXXXXXXXXXXXXXXX .. oo",
+"oo .. XXXXXXXXXXXXXXXX .. oo",
+"oo .. XXXXXXXXXXXXXXXX .. oo",
+"oo .. XXXXXXXXXXXXXXXX .. oo",
+"oo ... ... oo",
+"oo .... .... oo",
+"oo ........................ oo",
+"oo ........................ oo",
+"oo .... .. oo",
+"oo .... .. oo",
+"oo .... XXXX .. oo",
+"oo .... XXXX .. oo",
+"oo .... XXXX .. oo",
+"oo .... XXXX .. oo",
+"oo .... XXXX .. oo",
+"oo .... XXXX .. oo",
+"ooo oo",
+"oooo oo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo"
+};
diff --git a/kommander/editor/pics/large/form.xpm b/kommander/editor/pics/large/form.xpm
new file mode 100644
index 00000000..bb59212e
--- /dev/null
+++ b/kommander/editor/pics/large/form.xpm
@@ -0,0 +1,91 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 53 1",
+" c #42429c9cffff",
+". c #4a4a9c9cf7f7",
+"X c #52529c9cf7f7",
+"o c #4a4aa5a5ffff",
+"O c #5252a5a5f7f7",
+"+ c #5252a5a5ffff",
+"@ c #5252adadffff",
+"# c #5a5aa5a5f7f7",
+"$ c #5a5aa5a5ffff",
+"% c #5a5aadadffff",
+"& c #5a5ab5b5ffff",
+"* c #6363adadf7f7",
+"= c #6363adadffff",
+"- c #6b6bb5b5efef",
+"; c #6363b5b5ffff",
+": c #b5b5bdbdbdbd",
+"> c Gray74",
+", c #bdbdc6c6bdbd",
+"< c #9c9cc6c6e7e7",
+"1 c #9c9ccecef7f7",
+"2 c #bdbdc6c6c6c6",
+"3 c #a5a5ceceefef",
+"4 c #a5a5cecef7f7",
+"5 c #a5a5ceceffff",
+"6 c #a5a5d6d6ffff",
+"7 c #adadd6d6ffff",
+"8 c #adaddedeffff",
+"9 c #c6c6c6c6c6c6",
+"0 c #c6c6cecec6c6",
+"q c #c6c6cececece",
+"w c #cececececece",
+"e c #ceced6d6cece",
+"r c #ceced6d6d6d6",
+"t c #cecededed6d6",
+"y c #d6d6deded6d6",
+"u c #d6d6dededede",
+"i c #d6d6e7e7dede",
+"p c #dedee7e7dede",
+"a c #dedee7e7e7e7",
+"s c #dedeefefe7e7",
+"d c #e7e7efefe7e7",
+"f c #e7e7efefefef",
+"g c #efefefefefef",
+"h c #e7e7f7f7efef",
+"j c #efeff7f7efef",
+"k c #efeff7f7f7f7",
+"l c #efeffffff7f7",
+"z c #f7f7f7f7efef",
+"x c #f7f7ffffefef",
+"c c #f7f7fffff7f7",
+"v c #f7f7ffffffff",
+"b c #fffffffff7f7",
+"n c Gray100",
+/* pixels */
+"-;*;*;*=*=*=*=#=#%#%#%#$#$#$#$O*",
+"*&%&%%%%%%%@%@%@%+%+++++++oooooX",
+"-&%%%%%%%%%%@$%+@++++++++o++++o#",
+"#++@+@o+oooooooooooooo o o .",
+"3876767667647464544144414141111<",
+"dnbbbbbbbcbccbxcxccxczxzjzjzjzdp",
+"hvlvllllllllljljkjhjhhhhhfhdddja",
+"fclclclkljkkjkhkjhkhfhfhfhdfffsp",
+"flllklklkkjkjkjkhhhhhfhfdffsdsfu",
+"dlcklkljlkhkhhhhjhghfhfdhsdfsdsu",
+"alkljljkkjkjhkhjfhhfhdhfdffsfsfy",
+"pklkkkkjhkhhhjhhhhfffhdsfssdsdsr",
+"ulkjkhjkhhjkhhffffhdddfdsdfssade",
+"uljkhkhhjhhhfhhhhdfhfsdfsssdasse",
+"ylkhjhkhhjfhhffdfhsdsfssddassaau",
+"rkhhkhhhhfhffhdhfdfsfdsdsasaaasy",
+"ykhjhhghfhfhdfddsfsdssdassaspspr",
+"phjhghhffhdhfdffdsdfsassaasaapsr",
+"uhfhhffhfdffsfdssdsadssaaspapaae",
+"ujhffhdfdhdsfssfdsassaaaspapaipq",
+"yhfhdfhdfsfsdsdssasaaspspapaips0",
+"rhdfhsdfsdsdsdsassaspsapaiaiaia2",
+"efhdsdfsdsfssadsaaspaapapaipiip9",
+"whfsffsdsdsadsaapapappapiiipipir",
+"qfsdsssssasaaasasapapaiiapiuiuie",
+"0hsdsdadasasspappaiaiiaiuipiuiuq",
+",fdsassasaspaspaappiaipipuiuiuiq",
+"qdsasaasaspaapiaiiapipiuiuiuiui9",
+"ysasaspapapapiaipaiiuiuiuiuiyui,",
+"rasapsaspapiapiaiipiiuiuiuyuyui>",
+"wsspaappaiapiapipuiuiiuiuuiyuyi>",
+"0apiiiiuiiuiuyuyuyuyyyyyyttrttu:"
+};
diff --git a/kommander/editor/pics/large/frame.xpm b/kommander/editor/pics/large/frame.xpm
new file mode 100644
index 00000000..7984aca6
--- /dev/null
+++ b/kommander/editor/pics/large/frame.xpm
@@ -0,0 +1,58 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 20 1",
+" c #0e0e0e0e0e0e",
+". c #161616161616",
+"X c Gray12",
+"o c #272727272727",
+"O c #2f2f2f2f2f2f",
+"+ c #373737373737",
+"@ c #3f3f3f3f3f3f",
+"# c Gray28",
+"$ c Gray31",
+"% c #555555555555",
+"& c #5f5f5f5f5f5f",
+"* c #676767676767",
+"= c #6f6f6f6f6f6f",
+"- c #777777777777",
+"; c Gray50",
+": c Gray53",
+"> c #8d8d8d8d8d8d",
+", c #939393939393",
+"< c #c0c0c0c0c0c0",
+"1 c None",
+/* pixels */
+"1,,,,>,,,,,>>:::;::::::;:::--:>1",
+",,>--=====*******************=*;",
+":-&*%#@++OO++OOOOOOOO+O++@#%&&*&",
+"-**.#;:,,,,,,,,,,,,,,,,,,>:&+&*$",
+"=*#$111111111111111111111111-&*#",
+"==o;111111111111111111111111,%*$",
+"==.>1111111111111111111111111$*%",
+"== ,1111111111111111111111111$*&",
+"== ,1111111111111111111111111%*$",
+"== ,1111111111111111111111111%=%",
+"==.,1111111111111111111111111%*%",
+"*=.,1111111111111111111111111%=$",
+"== ,1111111111111111111111111%*#",
+"*=.,1111111111111111111111111%*#",
+"**.,1111111111111111111111111**#",
+"*= ,1111111111111111111111111&*#",
+"*= ,1111111111111111111111111$*@",
+"*=.,1111111111111111111111111$*#",
+"&=.,111111111111111111111111,%*%",
+"=*X,1111111111111111111111111&*$",
+"-*X,1111111111111111111111111%*#",
+"=*X>1111111111111111111111111%*#",
+"==X:111111111111111111111111,&*#",
+"**o:111111111111111111111111,&*%",
+"==O;111111111111111111111111,**%",
+";*+=111111111111111111111111,**$",
+"**#&111111111111111111111111:&*%",
+"=*%o111111111111111111111111=**%",
+";**@O=;:,,,,,,,,,,1,,1,,,,>;:**$",
+":*&*=**==-----=---=;---;==-;*&&=",
+",$&&*********&*********&**&**&#,",
+"1,=%%$$%$#@#$$$$#@@@@@#@@$$@$%>1"
+};
diff --git a/kommander/editor/pics/large/groupbox.xpm b/kommander/editor/pics/large/groupbox.xpm
new file mode 100644
index 00000000..4241ece5
--- /dev/null
+++ b/kommander/editor/pics/large/groupbox.xpm
@@ -0,0 +1,60 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 22 1",
+" c #060606060606",
+". c Gray6",
+"X c Gray9",
+"o c Gray12",
+"O c #272727272727",
+"+ c #2f2f2f2f2f2f",
+"@ c #373737373737",
+"# c #3f3f3f3f3f3f",
+"$ c Gray28",
+"% c Gray31",
+"& c Gray34",
+"* c #5f5f5f5f5f5f",
+"= c #676767676767",
+"- c #6f6f6f6f6f6f",
+"; c #777777777777",
+": c Gray50",
+"> c Gray53",
+", c #8d8d8d8d8d8d",
+"< c #959595959595",
+"1 c #9f9f9f9f9f9f",
+"2 c #c0c0c0c0c0c0",
+"3 c None",
+/* pixels */
+"333333<o..........+3333333333333",
+"331111# ;,,,1<<>>,133",
+"311<,<+ ->::;:::::;>3",
+"3,>;;-. @$$$$%&=;-;-3",
+"3>;-O*= X11111<>-@;;=3",
+"3>:$-3311111111111333333333<&;*3",
+"3::o133333333333333333333333&:=3",
+"3;:X133333333333333333333333&;-3",
+"3::X333333333333333333333333*:=3",
+"3;:X333333333333333333333333=:=3",
+"3;:X333333333333333333333333-:=3",
+"3;:o133333333333333333333333=:=3",
+"3;:X333333333333333333333333*:*3",
+"3;:X333333333333333333333333*:*3",
+"3::X333333333333333333333333*:*3",
+"3::X333333333333333333333333=:*3",
+"3::X333333333333333333333333*:&3",
+"3::X333333333333333333333333=:&3",
+"3::X333333333333333333333333=:=3",
+"3;:o133333333333333333333333=:=3",
+"3;:o133333333333333333333333*:*3",
+"3;:o133333333333333333333333*:&3",
+"3::O133333333333333333333333*:*3",
+"3::O133333333333333333333333=:=3",
+"3::+133333333333333333333333*;=3",
+"3;:+,33333333333333333333331=:*3",
+"3::#:33333333333333333333331-;=3",
+"3;:&&3333333333333333333333,:;*3",
+"3:;;+=<1113113133333333111<,:;*3",
+"3>;-;;;;:::>:;;;;;;;;;:::>,>-;-3",
+"31=;;;;;;:;:::::;:::::;:;;;;;&,3",
+"33<-*&=*&*=-=**&&&&&*&&&=*&**:33"
+};
diff --git a/kommander/editor/pics/large/help.xpm b/kommander/editor/pics/large/help.xpm
new file mode 100644
index 00000000..4f3a1ff7
--- /dev/null
+++ b/kommander/editor/pics/large/help.xpm
@@ -0,0 +1,182 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 144 2",
+" c #212100002121",
+". c #313100003131",
+"X c #393900003131",
+"o c #393900003939",
+"O c #313118182929",
+"+ c #393910103939",
+"@ c #424218183939",
+"# c #424221213939",
+"$ c #424239393939",
+"% c #4a4a08084a4a",
+"& c #4a4a10104242",
+"* c #5a5a00005252",
+"= c #5a5a08085252",
+"- c #525218184a4a",
+"; c #424231314242",
+": c #4a4a39394a4a",
+"> c #525239394a4a",
+", c #636318185a5a",
+"< c #6b6b00006363",
+"1 c #6b6b18186363",
+"2 c #737300006b6b",
+"3 c #6b6b31316b6b",
+"4 c #737339397373",
+"5 c #525242425252",
+"6 c #5a5a42425a5a",
+"7 c #6b6b4a4a6b6b",
+"8 c #7b7b7b7b7b7b",
+"9 c #848400007373",
+"0 c #848400007b7b",
+"q c #84846b6b7b7b",
+"w c #8c8c08088484",
+"e c #8c8c18188484",
+"r c #9c9c00008c8c",
+"t c #949410108c8c",
+"y c #848431318484",
+"u c #9c9c21219494",
+"i c #9c9c39399494",
+"p c #a5a508089c9c",
+"a c #adad0808a5a5",
+"s c #adad1010a5a5",
+"d c #b5b51010adad",
+"f c #b5b51818adad",
+"g c #bdbd1010adad",
+"h c #bdbd1010b5b5",
+"j c #b5b53939adad",
+"k c #848442428484",
+"l c #8c8c73738c8c",
+"z c #8c8c7b7b8c8c",
+"x c #94947b7b9494",
+"c c #bdbd5252b5b5",
+"v c #adad7b7badad",
+"b c #b5b57b7badad",
+"n c #cece1818c6c6",
+"m c #d6d60808c6c6",
+"M c #d6d61818cece",
+"N c #dede1818cece",
+"B c #dede1010d6d6",
+"V c #dede1818d6d6",
+"C c #cece2929cece",
+"Z c #d6d62929cece",
+"A c #dede2929d6d6",
+"S c #dede3131dede",
+"D c #dede3939d6d6",
+"F c #e7e71010d6d6",
+"G c #e7e71010dede",
+"H c #e7e71818dede",
+"J c #efef1818e7e7",
+"K c #f7f71818efef",
+"L c #ffff1818f7f7",
+"P c #e7e72929dede",
+"I c #e7e73131dede",
+"U c #efef2121e7e7",
+"Y c #efef2929e7e7",
+"T c #e7e73131e7e7",
+"R c #e7e73939e7e7",
+"E c #efef3131efef",
+"W c #f7f72121efef",
+"Q c #f7f72929f7f7",
+"! c #ffff2121f7f7",
+"~ c #ffff2929f7f7",
+"^ c #ffff2929ffff",
+"/ c #f7f73131f7f7",
+"( c #f7f73939f7f7",
+") c #ffff3131ffff",
+"_ c #ffff3939f7f7",
+"` c #ffff3939ffff",
+"' c #c6c64a4abdbd",
+"] c #d6d64242cece",
+"[ c #d6d64a4acece",
+"{ c #dede5252dede",
+"} c #cece6363cece",
+"| c #c6c67373c6c6",
+" . c #cece7373cece",
+".. c #e7e74242e7e7",
+"X. c #efef4242efef",
+"o. c #e7e75252e7e7",
+"O. c #efef5252efef",
+"+. c #ffff4242ffff",
+"@. c #ffff4a4affff",
+"#. c #ffff5252ffff",
+"$. c #ffff5a5affff",
+"%. c #ffff6363ffff",
+"&. c #ffff6b6bffff",
+"*. c #ffff7373ffff",
+"=. c #ffff7b7bffff",
+"-. c #848484848484",
+";. c Gray55",
+":. c #94948c8c9494",
+">. c #9c9c84849c9c",
+",. c #9c9c8c8c9494",
+"<. c #9c9c8c8c9c9c",
+"1. c #9c9c94949c9c",
+"2. c Gray61",
+"3. c #a5a58484a5a5",
+"4. c #a5a59c9ca5a5",
+"5. c #bdbd8c8cbdbd",
+"6. c #b5b59494b5b5",
+"7. c #b5b59c9cb5b5",
+"8. c #bdbd9494b5b5",
+"9. c #bdbd9494bdbd",
+"0. c #bdbd9c9cbdbd",
+"q. c #a5a5a5a5a5a5",
+"w. c #adada5a5adad",
+"e. c Gray68",
+"r. c #b5b5a5a5b5b5",
+"t. c #b5b5adadb5b5",
+"y. c #bdbdadadbdbd",
+"u. c Gray71",
+"i. c #b5b5bdbdb5b5",
+"p. c #bdbdb5b5bdbd",
+"a. c Gray74",
+"s. c #c6c68484bdbd",
+"d. c #ffff8484ffff",
+"f. c #ffff8c8cffff",
+"g. c #ffff9494ffff",
+"h. c #ffff9c9cffff",
+"j. c #ffffa5a5ffff",
+"k. c #ffffadadffff",
+"l. c #ffffb5b5ffff",
+"z. c #c0c0c0c0c0c0",
+"x. c #c6c6c6c6c6c6",
+"c. c #ffffc6c6ffff",
+"v. c #ffffceceffff",
+"b. c None",
+/* pixels */
+"b.b.b.b.b.b.b.b.b.b.a.0.| [ D S Z ] ' b 7.a.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.a.5...` &.f.g.f.=.&.+.! F j 3.a.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.y.{ #.=.j.l.l.j.h.f.d.*.$.+.L B i w.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.t.O.&.f.f.&.%.%.$.$.$.$.$.@.@.X.W G t 4.b.b.b.b.b.b.",
+"b.b.b.b.b.p.o.d.v.v.j.*.#.( T S I E _ $.%.%.#.) F e e.b.b.b.b.b.",
+"b.b.b.b.b.| %.l.k.=.#.P w 3 q z z -.k f _ $.&.#.^ m 4 a.b.b.b.b.",
+"b.b.b.b.r.` f.h.%.` d X 8 a.b.b.b.b.a.2.y A @.$.+.U r :.b.b.b.b.",
+"b.b.b.b.| @.f.&.@.h ;.b.b.b.b.b.b.b.b.e.u W @.#.~ a 7 b.b.b.b.",
+"b.b.b.b.R $.=.#.~ * $ a.b.b.b.b.b.b.b.b.b.v K #.#.` d - b.b.b.b.",
+"b.b.b.b.c C X._ Z o ;.b.b.b.b.b.b.b.b.b.b.6.L #.#.` g & b.b.b.b.",
+"b.b.b.b.a.q.:.x l 1.x.b.b.b.b.b.b.b.b.b.b.8.^ %.$.` s @ b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.u.R #.=.#.Q 9 5 b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.y.R %.l.*.+.n X :.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.r.Y *.c.f.+.V * : a.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.7./ g.v.d.+.U 2 O e.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.5.^ k.c.*.` ~ p + q.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.6.) k.l.$.) W p & q.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.t.E =.=.#.+.H < $ e.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.} ) @.@.#.~ 0 $ u.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.p.Q #.=.%.+.s ; u.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.9.` f.=.@.d # u.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.s.$.g.@.M . 8 b.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b. .%.%.+.N * -.b.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b N Q +.Y = q.b.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.a.1.>.3.<.e.b.b.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.p.7.7.u.b.b.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.8.Q L K s ,.b.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.p.X.h.h.*.U , i.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.0.` l.c.d.M % e.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.r.! #.$.) g + e.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.a.C L J N 0 > a.b.b.b.b.b.b.b.b.b.b.b.",
+"b.b.b.b.b.b.b.b.b.b.b.b.b.b.q.k 1 , 6 e.b.b.b.b.b.b.b.b.b.b.b.b."
+};
diff --git a/kommander/editor/pics/large/home.xpm b/kommander/editor/pics/large/home.xpm
new file mode 100644
index 00000000..f70e0e4f
--- /dev/null
+++ b/kommander/editor/pics/large/home.xpm
@@ -0,0 +1,250 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 212 2",
+" c Gray0",
+". c #080808080000",
+"X c #101008080000",
+"o c #101010100000",
+"O c #101010100808",
+"+ c #181810100000",
+"@ c #181818180000",
+"# c #181818180808",
+"$ c #181818181010",
+"% c #212118180000",
+"& c #212118180808",
+"* c #292921210000",
+"= c #212121211010",
+"- c #212121211818",
+"; c #292921211010",
+": c #292929291010",
+"> c #292929291818",
+", c #313129290000",
+"< c #313129291818",
+"1 c #393931310000",
+"2 c #393931310808",
+"3 c Gray13",
+"4 c #292929292121",
+"5 c #313129292929",
+"6 c #313131313131",
+"7 c #393939393131",
+"8 c #393939393939",
+"9 c #424239393939",
+"0 c #4a4a42420000",
+"q c #4a4a42421010",
+"w c #4a4a52521818",
+"e c #525242420000",
+"r c #52524a4a0000",
+"t c #52524a4a0808",
+"y c #5a5a4a4a0000",
+"u c #5a5a52520808",
+"i c #5a5a52521010",
+"p c #4a4a42423939",
+"a c #4a4a4a4a3939",
+"s c #636352520808",
+"d c #6b6b5a5a0000",
+"f c #63635a5a1010",
+"g c #737363630000",
+"h c #737363630808",
+"j c #73736b6b1010",
+"k c #7b7b73731818",
+"l c #636363632121",
+"z c #636373732929",
+"x c #6b6b73732121",
+"c c #6b6b73732929",
+"v c #6b6b73733131",
+"b c #737373732929",
+"n c #73737b7b2929",
+"m c #7b7b7b7b2121",
+"M c #7b7b7b7b2929",
+"N c #42424a4a4242",
+"B c #4a4a4a4a4242",
+"V c #4a4a52525252",
+"C c #4a4a5a5a5252",
+"Z c #52524a4a4a4a",
+"A c #5a5a52524a4a",
+"S c Gray32",
+"D c #52525a5a5252",
+"F c #5a5a5a5a5252",
+"G c #5a5a5a5a5a5a",
+"H c #525263635a5a",
+"J c #5a5a63635a5a",
+"K c #525263636363",
+"L c #63635a5a5252",
+"P c #63635a5a5a5a",
+"I c #636363635a5a",
+"U c #6b6b63635a5a",
+"Y c #7b7b7b7b5a5a",
+"T c Gray39",
+"R c #63636b6b6b6b",
+"E c #6b6b63636363",
+"W c #6b6b6b6b6363",
+"Q c #73736b6b6363",
+"! c #737373736b6b",
+"~ c Gray45",
+"^ c #73737b7b7373",
+"/ c #7b7b73737373",
+"( c #7b7b7b7b7373",
+") c #7b7b7b7b7b7b",
+"_ c #7b7b84843131",
+"` c #7b7b84844a4a",
+"' c #7b7b84847b7b",
+"] c #848473730808",
+"[ c #8c8c7b7b0808",
+"{ c #848473731010",
+"} c #8c8c7b7b1010",
+"| c #94947b7b0808",
+" . c #84847b7b2121",
+".. c #84847b7b2929",
+"X. c #84847b7b7373",
+"o. c #84847b7b7b7b",
+"O. c #94947b7b7373",
+"+. c #94948c8c1010",
+"@. c #94948c8c1818",
+"#. c #9c9c8c8c1010",
+"$. c #9c9c8c8c1818",
+"%. c #9c9c94941818",
+"&. c #848484842121",
+"*. c #848484842929",
+"=. c #848484843131",
+"-. c #94948c8c2929",
+";. c #9c9c8c8c2929",
+":. c #a5a594940000",
+">. c #a5a594941818",
+",. c #adad9c9c1010",
+"<. c #adad9c9c1818",
+"1. c #a5a59c9c2929",
+"2. c #b5b5a5a51818",
+"3. c #b5b5a5a52929",
+"4. c #bdbdadad2929",
+"5. c #bdbda5a53939",
+"6. c #bdbdadad3131",
+"7. c #848484844a4a",
+"8. c #949494944242",
+"9. c #94949c9c4a4a",
+"0. c #9c9c9c9c4a4a",
+"q. c #94949c9c5a5a",
+"w. c #9c9c9c9c5252",
+"e. c #9c9c9c9c5a5a",
+"r. c #8c8c8c8c6363",
+"t. c #8c8c8c8c7b7b",
+"y. c #94949c9c6363",
+"u. c #9c9c9c9c6b6b",
+"i. c #9c9ca5a56b6b",
+"p. c #9c9ca5a57373",
+"a. c #b5b5a5a54242",
+"s. c #b5b5a5a54a4a",
+"d. c #bdbdadad4242",
+"f. c #b5b5adad5252",
+"g. c #a5a5a5a57373",
+"h. c #a5a5adad7b7b",
+"j. c #adadadad7b7b",
+"k. c #c6c6b5b51010",
+"l. c #cecebdbd3131",
+"z. c #dedec6c60808",
+"x. c #d6d6c6c61010",
+"c. c #dedecece1010",
+"v. c #d6d6c6c63131",
+"b. c #dedecece3131",
+"n. c #e7e7cece0808",
+"m. c #efefdede1010",
+"M. c #e7e7d6d62121",
+"N. c #efefdede2121",
+"B. c #efefdede2929",
+"V. c #e7e7d6d63131",
+"C. c #e7e7d6d63939",
+"Z. c #e7e7dede3939",
+"A. c #f7f7e7e72929",
+"S. c #f7f7e7e73939",
+"D. c #848484848484",
+"F. c #8c8c84848484",
+"G. c #8c8c8c8c8484",
+"H. c #8c8c94948c8c",
+"J. c #94948c8c8484",
+"K. c #949494948484",
+"L. c #949494948c8c",
+"P. c #9c9c94948c8c",
+"I. c Gray58",
+"U. c #94949c9c9494",
+"Y. c #9c9c9c9c9494",
+"T. c Gray61",
+"R. c #9494a5a59c9c",
+"E. c #9c9ca5a59c9c",
+"W. c #8c8cadada5a5",
+"Q. c #9c9ca5a5a5a5",
+"!. c #9c9cbdbdb5b5",
+"~. c #a5a594948c8c",
+"^. c #a5a59c9c8c8c",
+"/. c #a5a59c9c9494",
+"(. c #a5a59c9c9c9c",
+"). c #adad9c9c9494",
+"_. c #a5a5a5a58484",
+"`. c #adadadad8484",
+"'. c #a5a5a5a59c9c",
+"]. c #adada5a59c9c",
+"[. c #b5b5a5a59494",
+"{. c #b5b5a5a59c9c",
+"}. c #b5b5adad9c9c",
+"|. c #bdbda5a59c9c",
+" X c #a5a5a5a5a5a5",
+".X c #a5a5adada5a5",
+"XX c #a5a5adadadad",
+"oX c #adadadada5a5",
+"OX c Gray68",
+"+X c #a5a5b5b5adad",
+"@X c #adadb5b5adad",
+"#X c #a5a5bdbdb5b5",
+"$X c #b5b5adada5a5",
+"%X c #b5b5b5b5adad",
+"&X c #bdbdb5b5adad",
+"*X c Gray71",
+"=X c #b5b5bdbdb5b5",
+"-X c #b5b5bdbdbdbd",
+";X c Gray74",
+":X c #a5a5c6c6bdbd",
+">X c #b5b5cecec6c6",
+",X c #bdbdcecec6c6",
+"<X c #c6c6c6c6bdbd",
+"1X c #c0c0c0c0c0c0",
+"2X c #c6c6cececece",
+"3X c #ceced6d6cece",
+"4X c #c6c6deded6d6",
+"5X c #ceced6d6d6d6",
+"6X c #cecedededede",
+"7X c #dedeefefe7e7",
+"8X c #dedeefefefef",
+"9X c None",
+/* pixels */
+"9X9X9X9X9X9X9X9X9X9X9X9X9X9X9XoXT.9X9X9X9X9X9X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9X9X9X9X9X9X;X Xo.*X9X9X9X9X9X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9X9X9X9X9X9X].4XE.! ;X9X9X9X9X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9X9X9X9X9X%XY.7X*XB I.9X9X9X9X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9X9X9X9X;XT..X2X'.P S OX9X9X9X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9X9X9X9XU.R.:XY.G.G C T ;X9X9X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9X9X9XOXY.!.XXY.L.W J V D.9X9X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9X9X;XoXoX.X+X;X X( ~ F 8 OX9X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9X9XT.^.[./.-X8X.XX.Q L p S ;X9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9XOX^./.(.Y.,X8X/.O.! T A 6 ) 9X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X;XG.H.:X=X@X+X%XoX$XU F J H 6 X9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9XI.' W.2X<X.X@XG.G.G.I S D K S N ;X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9XOXL.oX#X>XE.Q..X/.H.H.^ I R T C 5 ~ 9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X;XF./.]./.~.'.@X,X3XJ.&XI.E ( U Z 5 3 X9X9X9X9X9X9X",
+"9X9X9X9X9X9X(.J.~.[.J.P.$XY.5X6XJ.'.P.L W Q Z 9 5 8 *X9X9X9X9X9X",
+"9X9X9X9X9X;XG.P..XOX{.]..X@X7X3X).|.].! E W I D B 4 I.9X9X9X9X9X",
+"9X9X9X9X9X;X*X X#X.X}.U.'.Q.+X'.oXoXH./ L B a R E.%X;X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X;X< # O $ - - - > ; = & @ + X ! 9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X;X;.:.@.j s t 2 @ + o . X o o ! 9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X;X6.m.A.S.S.Z.v.4.$.{ u 1 + o / 9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X;X5.x.M.V.C.C.b.l.4.,.[ d 1 + ( 9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X;Xd.c.M.V.Z.C.C.v.2.<.} h r * / 9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9Xs.z.M.V.C.3.1.3.4.<.{ d r % ( 9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9Xf.n.N.V.i o . + f $.] d y * ( 9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X9Xf.c.B.>.. X + o o j | h y % ( 9X9X9X9X9X9X9X9X",
+"9X9X9X9X9X9X9X9X;Xa.z.A.@.X + o + X u } d 0 , 7 W R ( 9X9X9X9X9X",
+"9X9X9X9X9X9X9X9XK.#.c.B.>.. . X . u +.h r , . 4 9X9X9X9X9X",
+"9X9X9X9X9X9X9X'.z #.c.N.%.. . # : j [ h e * X : w Y 9X9X9X9X9X",
+"9X9X9X9X9X9X%Xv c .k.N.>.. : w z M &.[ g u q l =.*.t.9X9X9X9X9X",
+"9X9X9X9X9X;X` x b b M -.*.l n c c b m k x b .._ b b Y.9X9X9X9X9X",
+"9X9X9X9X9Xr.n n M =..._ n _ =.n n n c c n ..M =.M v oX9X9X9X9X9X",
+"9X9X9X9X9X`.j._.h.h.p.g.u.u.i.y.y.e.e.q.w.w.9.0.8.7.;X9X9X9X9X9X"
+};
diff --git a/kommander/editor/pics/large/iconview.xpm b/kommander/editor/pics/large/iconview.xpm
new file mode 100644
index 00000000..61d9dafd
--- /dev/null
+++ b/kommander/editor/pics/large/iconview.xpm
@@ -0,0 +1,142 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 104 2",
+" c Gray3",
+". c #080810101010",
+"X c #101008081010",
+"o c #101010100808",
+"O c #101010101010",
+"+ c #101010101818",
+"@ c #101018181818",
+"# c #181818181010",
+"$ c #181818181818",
+"% c Gray13",
+"& c Gray16",
+"* c #313131313131",
+"= c #393939393939",
+"- c Gray26",
+"; c Gray29",
+": c Gray32",
+"> c #5a5a5a5a5a5a",
+", c Gray39",
+"< c #6b6b63636b6b",
+"1 c Gray42",
+"2 c Gray45",
+"3 c #7b7b7b7b7b7b",
+"4 c Blue",
+"5 c #08080808ffff",
+"6 c #10101010f7f7",
+"7 c #6b6b6b6bd6d6",
+"8 c #73737373cece",
+"9 c Green",
+"0 c #1010f7f71010",
+"q c #1818f7f71818",
+"w c #2121f7f72121",
+"e c #5a5acece5a5a",
+"r c #5a5ae7e75a5a",
+"t c #6363c6c66b6b",
+"y c #6b6bc6c66b6b",
+"u c #6363dede6363",
+"i c #6363e7e76363",
+"p c Red",
+"a c #f7f718181818",
+"s c #efef21212121",
+"d c #c6c67b7b7b7b",
+"f c #cece7b7b7b7b",
+"g c #dede63636363",
+"h c #e7e75a5a5a5a",
+"j c #dede3939dede",
+"k c Magenta",
+"l c #ffff0808ffff",
+"z c #d6d64242d6d6",
+"x c #d6d64a4ad6d6",
+"c c #dede4242dede",
+"v c #dededede3939",
+"b c Yellow",
+"n c #f7f7f7f71010",
+"m c #f7f7f7f71818",
+"M c #efefefef2929",
+"N c #efefefef3131",
+"B c #dededede4242",
+"V c #dededede4a4a",
+"C c #d6d6d6d65252",
+"Z c #dededede6363",
+"A c #d6d6d6d67b7b",
+"S c #e7e7e7e76363",
+"D c #848484848484",
+"F c Gray55",
+"G c #8c8c94949494",
+"H c Gray58",
+"J c #9c9c94949c9c",
+"K c Gray61",
+"L c #9c9cbdbd9c9c",
+"P c #bdbd9c9c9c9c",
+"I c #bdbd9c9cbdbd",
+"U c #a5a5a5a5a5a5",
+"Y c Gray68",
+"T c #adadadadbdbd",
+"R c #a5a5bdbda5a5",
+"E c #adadb5b5b5b5",
+"W c #bdbda5a5a5a5",
+"Q c #b5b5adadb5b5",
+"! c #b5b5b5b5adad",
+"~ c Gray71",
+"^ c #b5b5b5b5bdbd",
+"/ c #bdbdb5b5b5b5",
+"( c Gray74",
+") c #84848484cece",
+"_ c #8c8c8c8cc6c6",
+"` c #adadadadc6c6",
+"' c #bdbdbdbdc6c6",
+"] c #9c9cc6c69c9c",
+"[ c #9c9ccece9c9c",
+"{ c #adadc6c6adad",
+"} c #bdbdc6c6bdbd",
+"| c #c6c68c8c8c8c",
+" . c #c6c6a5a5a5a5",
+".. c #c6c6bdbdbdbd",
+"X. c #cece8484cece",
+"o. c #c6c69c9cc6c6",
+"O. c #c6c6adadc6c6",
+"+. c #c6c6b5b5c6c6",
+"@. c #c6c6bdbdc6c6",
+"#. c #cececece8c8c",
+"$. c #c6c6c6c6bdbd",
+"%. c #c0c0c0c0c0c0",
+"&. c #c6c6c6c6c6c6",
+"*. c None",
+/* pixels */
+"*.Y H , : ; = = = * * * & & % % % % & % % & & & & * * = - > K ( ",
+"Y & O O O O O O O O O O O O O O O O O H ",
+"1 O O O O . O O + # $ + $ $ $ + $ $ O $ $ O $ O O O O ; ",
+"- O O O 1 G K U Y ~ Y Y Y Y Y Y ~ Y Y Y Y Y ~ Y U K H < O O & ",
+"* O 3 *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.1 O % ",
+"& O . U .h g g g g / *.&.#.Z Z Z S A $.*.L r u u u i ~ H X $ ",
+"% O Y f p p p p p P *.( B b b b b M $.*.y 9 9 9 9 9 [ K X O $ ",
+"% O @ ~ f p p p p p P *.' B b b b b M $.*.t 9 9 9 9 9 ] U O $ ",
+"% @ ( f p p p p p P *.$.v b b b b M ( *.t 9 9 9 9 9 R U O O % ",
+"% O $ ( d p p p p p P *.' v b b b b N ( *.e 9 9 9 9 9 { U X % ",
+"% o O ^ | a a s a s W *.' C m m M n V $.*.y 0 q w q w R U O % ",
+"% . $ ~ *./ ( ( ( ( ..*.*.$.( ( ( ( ( *.*.( } ( ( ( ( *.J O O % ",
+"% o $ E *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.K O & ",
+"% . $ ! *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.K O * ",
+"% X O Q *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.K O * ",
+"& O # E ( ` ` ` ` ` ' *.} +.O.O.O.O.+.*.*.*.*.*.*.*.*.*.H O * ",
+"& # ^ 7 4 5 5 4 6 T *.@.z k l l k c } *.*.*.*.*.*.*.*.F O = ",
+"& O o / 7 4 4 4 4 5 T *.( j k k k k c } *.*.*.*.*.*.*.*.H O = ",
+"* O O ~ 7 4 4 4 4 5 ` *.( j k k k k z @.*.*.*.*.*.*.*.*.H O - ",
+"* # ~ 8 4 4 4 4 5 T *.( j k k k k x } *.*.*.*.*.*.*.*.D O - ",
+"= # ~ 8 4 4 4 4 5 T *.( j k k k k x @.*.*.*.*.*.*.*.*.D : ",
+"= . O Y T ) _ ) _ _ ( *.@.I X.X.X.X.o.*.*.*.*.*.*.*.*.*.F ; ",
+"= o O U *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.3 O : ",
+"- O U *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.3 > ",
+"; O K *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.2 > ",
+"; X H *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*., 1 ",
+": F *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.> 1 ",
+"> , *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.( & 2 ",
+"1 O , F K U U Y Y Y Y Y Y Y Y Y Y Y Y Y ~ Y U K D : % D ",
+"F O O O $ $ $ % $ $ $ $ $ $ $ $ $ $ $ O O O O $ O O K ",
+"~ % O O O O O O O O O O O O O = ( ",
+"*.Y > - * & & & % % $ $ $ $ $ $ $ $ $ $ $ $ $ $ % % & * - , Y *."
+};
diff --git a/kommander/editor/pics/large/image.xpm b/kommander/editor/pics/large/image.xpm
new file mode 100644
index 00000000..3ea1d3e4
--- /dev/null
+++ b/kommander/editor/pics/large/image.xpm
@@ -0,0 +1,267 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 229 2",
+" c #080800000000",
+". c Gray3",
+"X c #101010101010",
+"o c #101010101818",
+"O c #101018181818",
+"+ c #181818181818",
+"@ c #181818182121",
+"# c #181821212121",
+"$ c #212118181818",
+"% c Gray13",
+"& c #292921212121",
+"* c Gray16",
+"= c #292929293131",
+"- c #212131313939",
+"; c #313131312929",
+": c #393931312929",
+"> c #393931313131",
+", c #393939393131",
+"< c #393942424242",
+"1 c #424239393131",
+"2 c #424239393939",
+"3 c #4a4a39393131",
+"4 c #4a4a42423939",
+"5 c #4a4a4a4a3939",
+"6 c #52524a4a3939",
+"7 c #5a5a4a4a3939",
+"8 c #73735a5a3939",
+"9 c Gray26",
+"0 c #424242424a4a",
+"q c Gray29",
+"w c #4a4a52525a5a",
+"e c #52524a4a4242",
+"r c #52524a4a4a4a",
+"t c #5a5a52524242",
+"y c Gray32",
+"u c #5a5a52525252",
+"i c #5a5a5a5a6363",
+"p c #525263637373",
+"a c #5a5a6b6b7b7b",
+"s c #636352524242",
+"d c #63635a5a4a4a",
+"f c #6b6b52524242",
+"g c #63635a5a5a5a",
+"h c #6b6b63634a4a",
+"j c #6b6b6b6b4a4a",
+"k c #737363634a4a",
+"l c #73736b6b4a4a",
+"z c #7b7b63634242",
+"x c #737363635a5a",
+"c c #7b7b6b6b5a5a",
+"v c #7b7b73735252",
+"b c #7b7b7b7b5252",
+"n c Gray39",
+"m c #636363636b6b",
+"M c #6b6b63636363",
+"N c Gray42",
+"B c #6b6b6b6b7373",
+"V c #73736b6b6b6b",
+"C c #7b7b73736b6b",
+"Z c Gray45",
+"A c #737373737b7b",
+"S c #73737b7b7b7b",
+"D c #7b7b7b7b7373",
+"F c #7b7b7b7b7b7b",
+"G c #73737b7b8484",
+"H c #7b7b84848c8c",
+"J c #84846b6b4a4a",
+"K c #84847b7b5a5a",
+"L c #9c9c7b7b5252",
+"P c #8c8c73736363",
+"I c #84847b7b7373",
+"U c #848484845252",
+"Y c #848484845a5a",
+"T c #8c8c84845a5a",
+"R c #9c9c84845a5a",
+"E c #848484846363",
+"W c #8c8c84846363",
+"Q c #8c8c84847373",
+"! c #94948c8c6363",
+"~ c #94948c8c6b6b",
+"^ c #9c9c8c8c7b7b",
+"/ c #9c9c94946363",
+"( c #9c9c9c9c6b6b",
+") c #9c9c9c9c7373",
+"_ c #adad8c8c5252",
+"` c #b5b594945a5a",
+"' c #a5a59c9c6363",
+"] c #adad9c9c7373",
+"[ c #bdbd9c9c7373",
+"{ c #adada5a56b6b",
+"} c #a5a5a5a57373",
+"| c #adadadad7b7b",
+" . c #b5b5a5a56b6b",
+".. c #bdbdadad7373",
+"X. c #bdbdb5b57b7b",
+"o. c #ceceadad6b6b",
+"O. c #ceceadad7373",
+"+. c #cecebdbd7b7b",
+"@. c #dedea5a57b7b",
+"#. c #efefa5a57b7b",
+"$. c #e7e7b5b57b7b",
+"%. c #e7e7bdbd7373",
+"&. c #f7f7adad6b6b",
+"*. c #ffffadad6b6b",
+"=. c #f7f7adad7373",
+"-. c #ffffb5b57373",
+";. c #e7e7c6c67b7b",
+":. c #efefcece7b7b",
+">. c #ffffc6c67b7b",
+",. c #ffffd6d67b7b",
+"<. c #848484848484",
+"1. c #84848c8c8c8c",
+"2. c #8c8c84848484",
+"3. c Gray55",
+"4. c #84848c8c9c9c",
+"5. c #94948c8c8484",
+"6. c #94948c8c8c8c",
+"7. c #949494948c8c",
+"8. c #9c9c94948c8c",
+"9. c #949494949c9c",
+"0. c #9c9c94949494",
+"q. c #9c9c9c9c9494",
+"w. c Gray61",
+"e. c #94949c9ca5a5",
+"r. c #9c9c9c9ca5a5",
+"t. c #9c9c9c9cadad",
+"y. c #9c9ca5a59c9c",
+"u. c #9494a5a5bdbd",
+"i. c #a5a59c9c8c8c",
+"p. c #a5a59c9c9c9c",
+"a. c #adad9c9c9494",
+"s. c #adada5a59c9c",
+"d. c #b5b5a5a59494",
+"f. c #b5b5adad9c9c",
+"g. c #a5a5a5a5a5a5",
+"h. c #a5a5adadadad",
+"j. c #adada5a5a5a5",
+"k. c Gray68",
+"l. c #a5a5adadb5b5",
+"z. c #b5b5adadadad",
+"x. c #bdbdb5b5a5a5",
+"c. c #bdbdb5b5adad",
+"v. c Gray71",
+"b. c #bdbdb5b5b5b5",
+"n. c Gray74",
+"m. c #adadbdbdc6c6",
+"M. c #adadbdbdcece",
+"N. c #bdbdbdbdc6c6",
+"B. c #bdbdc6c69c9c",
+"V. c #bdbdc6c6c6c6",
+"C. c #bdbdc6c6cece",
+"Z. c #b5b5c6c6d6d6",
+"A. c #c6c6adad8c8c",
+"S. c #ceceadad9494",
+"D. c #cecebdbd9c9c",
+"F. c #d6d6adad9494",
+"G. c #d6d6b5b58484",
+"H. c #dedeb5b58c8c",
+"J. c #dedeb5b59494",
+"K. c #c6c6bdbda5a5",
+"L. c #c6c6bdbdadad",
+"P. c #c6c6bdbdbdbd",
+"I. c #e7e7b5b58c8c",
+"U. c #f7f7bdbd8484",
+"Y. c #cececece8c8c",
+"T. c #c6c6c6c69494",
+"R. c #d6d6cece9c9c",
+"E. c #dedecece9c9c",
+"W. c #cecec6c6a5a5",
+"Q. c #d6d6c6c6b5b5",
+"!. c #d6d6d6d6a5a5",
+"~. c #d6d6dedeadad",
+"^. c #dedededea5a5",
+"/. c #efefcece8c8c",
+"(. c #e7e7d6d69c9c",
+"). c #efefdede9c9c",
+"_. c #f7f7cece8c8c",
+"`. c #ffffc6c68484",
+"'. c #ffffcece8484",
+"]. c #f7f7d6d68484",
+"[. c #f7f7dede8c8c",
+"{. c #ffffd6d68c8c",
+"}. c #efefc6c6a5a5",
+"|. c #e7e7dedea5a5",
+" X c #efefe7e79c9c",
+".X c #e7e7e7e7a5a5",
+"XX c #efefe7e7a5a5",
+"oX c #efefe7e7adad",
+"OX c #efefefefadad",
+"+X c #efefefefbdbd",
+"@X c #f7f7e7e7adad",
+"#X c #f7f7efefa5a5",
+"$X c #f7f7f7f7adad",
+"%X c #fffff7f7adad",
+"&X c #f7f7f7f7b5b5",
+"*X c #c0c0c0c0c0c0",
+"=X c #c6c6c6c6c6c6",
+"-X c #c6c6cececece",
+";X c #cecececec6c6",
+":X c #cececececece",
+">X c #cecececed6d6",
+",X c #d6d6cecec6c6",
+"<X c #dedececec6c6",
+"1X c #d6d6d6d6cece",
+"2X c Gray84",
+"3X c #d6d6d6d6dede",
+"4X c #dedededed6d6",
+"5X c Gray87",
+"6X c #dedee7e7e7e7",
+"7X c #dedee7e7efef",
+"8X c #e7e7dedecece",
+"9X c #efefdedec6c6",
+"0X c #efefe7e7dede",
+"qX c #ffffefefc6c6",
+"wX c #f7f7efefdede",
+"eX c #ffffffffcece",
+"rX c #ffffffffd6d6",
+"tX c #e7e7e7e7e7e7",
+"yX c #efefefefefef",
+"uX c #efefefeff7f7",
+"iX c #efeff7f7f7f7",
+"pX c #f7f7efefe7e7",
+"aX c #f7f7efefefef",
+"sX c #f7f7f7f7e7e7",
+"dX c Gray97",
+"fX c #f7f7ffffffff",
+"gX c #fffffffff7f7",
+"hX c Gray100",
+"jX c None",
+/* pixels */
+"jXL.$.|.oXOXoXoXoXoX.X XXXOXOX&XXX X X/.U.U./.#X#X#X&X$X&X$X^.jX",
+"jXL.>.+.! { } R.+XeXrX+XrXrX+XqXrXrXrXqX}.}.@XoX~.!.B.| } XoXjX",
+"jXd.{.v o 9 q w.=X>Xl.3.b.C.a D ;X-X=X5XfX7XfXuXuXuX>Xt.B Y.OXjX",
+"jXS.{.b @ * * q g D p.g.k.k.6.0.v.g.v.,XgXhXhXhXhXhXhXfX6X.X!.jX",
+"jXF.'.v @ % & d.5XyXhXhXhXhXhXhXhXhXhXhXhXhXhXhXhXhXhXhXhXOX^.jX",
+"jXF.`.l @ % ; 5.z.0XtX2X2X:Xn.h.w.3.A <.c.aXhXhXhXhXhXhXhX@XE.jX",
+"jXS.-.k # * % % h P.5XtXtXyXtXtX6X5X=Xr.F m N 0.b.4XdXhXhX%X^.jX",
+"jXD.*.f # * % > y 2.w.z.n.pXhXhXhXhXhXhXhX7Xp X + & , g D R.(.jX",
+"jXF.-.s % % % % $ % X % % 2 n 5.gXhXhX3X0.S g 0 * * X X . . XjX",
+"jXJ.`.s + x V.w r j.S Q 4X-Xl.u wXhXhXiXtXuXC.1.c.3XG 0 @ { #XjX",
+"jXF.'.s O c hXiX>XP.aXhXhXhXhX1.9XhXhXhXhXhXhXhXhXhXhXhXZ.T.OXjX",
+"jXF.>.t # : x.5XaXhXhXhXhXhXZ.r <XhXhXhXhXhXhXhXhXhXhXhXiX~.XXjX",
+"jXH.>.7 % % 1 V s.-XV.1XhXiXa 4 W.hXhXhXhXhXhXhXhXhXhXhXZ.X.).jX",
+"jXI.&.6 % % % r 8.P.n.3.8Xu.= 9 Q.hXfX3X5XhXhXhXhXhXhXhXu.] XjX",
+"jXJ.*.e % & ^ b.0XhXhX3X6Xa > $ 1 F p.9.L.gXhXhXhXhXhXhXa ' #XjX",
+"jX@.>.5 O 3 sXhXhXfXV.g.v.w.1.3.B I 0XhXhXhXhXfXyX5XdXM.- / #XjX",
+"jX#.>., : a.gX6X1.i y 9 M 1.Z f.hXhXhXhXhXhXdXaXyX6XH * o { #XjX",
+"jXU.:.h <XhXhXhXm.3.0.c.tXhX3X3.,XyXm.1.i y M 7.z.n.e.w o ( $XjX",
+"jX#.[.D.yX3XtXyXuX4.^ hXhXhXiXt.0.G g > C p.P.gXhXhXhXM.o / $XjX",
+"jX=.[.r < g q.n.l.i x.hXhXhXhXhXfXhXhX6X>Xt.q q.N.G i < o ( &XjX",
+"jXU._.5 : d 8.y.D L.sXgXyXsXhXhXhXhXhX6Xm 2 j f.v.y.N y * ) &XjX",
+"jXR L T T T W T E W Y U Y E W W T T U z 8 z J ~ ~ ~ K j j W } jX",
+"jXk.h.k.k.g.k.g.j.k.9 3.k.p.& $ g.k.n B k.p.g.r.g.g.g.g.j.jX",
+"jXjXjXjXjXjXjXjXjXn...8 n.jXV.; : n.jXj.` ^ jXjXjXjXjXjXjXjXjXjX",
+"jXjXjXjXjXjXjXjXjXc.].Q jXjXP.; > n.jXn.:.+.n.jXjXjXjXjXjXjXjXjX",
+"jXjXjXjXjXjXjXjXjXK.o.0.jXjXN.: : n.jXjXA.:.j.jXjXjXjXjXjXjXjXjX",
+"jXjXjXjXjXjXjXjXn.).R v.jXjXP.: > n.jXjXs.,.i.jXjXjXjXjXjXjXjXjX",
+"jXjXjXjXjXjXjXjXc.[.Q jXjXjXV.; > n.jXjXv.:.[ n.jXjXjXjXjXjXjXjX",
+"jXjXjXjXjXjXjXjXK.;.0.jXjXjXP.: > n.jXjX=XA.%.k.jXjXjXjXjXjXjXjX",
+"jXjXjXjXjXjXjXn.E._ k.jXjXjXN.; , n.jXjXjXf.].a.jXjXjXjXjXjXjXjX",
+"jXjXjXjXjXjXjXv.[.P n.jXjXjX=X: > n.jXjXjXz.:.] jXjXjXjXjXjXjXjX",
+"jXjXjXjXjXjXjXx.%.2.jXjXjXjXn., 2 n.jXjXjXn.G.O.n.jXjXjXjXjXjXjX"
+};
diff --git a/kommander/editor/pics/large/label.xpm b/kommander/editor/pics/large/label.xpm
new file mode 100644
index 00000000..dd8c5ee4
--- /dev/null
+++ b/kommander/editor/pics/large/label.xpm
@@ -0,0 +1,105 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 67 1",
+" c #000008081010",
+". c #101010101818",
+"X c #000000003131",
+"o c #000000003939",
+"O c #000008083131",
+"+ c #000008083939",
+"@ c #080810103131",
+"# c #080810103939",
+"$ c #181818183939",
+"% c #212121213939",
+"& c #292929293131",
+"* c #393939393939",
+"= c #000000004242",
+"- c #000008084242",
+"; c #000008084a4a",
+": c #080808084242",
+"> c #080810104a4a",
+", c #181818184a4a",
+"< c #181818185252",
+"1 c #181821214242",
+"2 c #181821215252",
+"3 c #212121215252",
+"4 c #212129295252",
+"5 c #292929295252",
+"6 c #313131314242",
+"7 c #313131314a4a",
+"8 c #313131315a5a",
+"9 c #313139395a5a",
+"0 c #313139396363",
+"q c #393942425a5a",
+"w c #393942426363",
+"e c Gray26",
+"r c #424242424a4a",
+"t c #4a4a4a4a5252",
+"y c #4a4a4a4a5a5a",
+"u c #5a5a5a5a5a5a",
+"i c #424242426363",
+"p c #42424a4a6b6b",
+"a c #4a4a4a4a6b6b",
+"s c #5a5a5a5a6363",
+"d c #5a5a5a5a7373",
+"f c #5a5a63637b7b",
+"g c Gray39",
+"h c Gray42",
+"j c #6b6b6b6b7373",
+"k c #6b6b6b6b7b7b",
+"l c Gray45",
+"z c #6b6b6b6b8484",
+"x c #7b7b7b7b8484",
+"c c #7b7b84848c8c",
+"v c #848484848484",
+"b c #848484848c8c",
+"n c Gray55",
+"m c #848484849494",
+"M c #8c8c8c8c9494",
+"N c Gray58",
+"B c #949494949c9c",
+"V c #9c9c9c9ca5a5",
+"C c #a5a5a5a59c9c",
+"Z c #a5a5a5a5a5a5",
+"A c #a5a5a5a5adad",
+"S c Gray68",
+"D c Gray71",
+"F c #b5b5b5b5bdbd",
+"G c Gray74",
+"H c #c0c0c0c0c0c0",
+"J c None",
+/* pixels */
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJJxtGJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJG8OSJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJB;-jJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJd-;%GJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJD<;>#NJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJc->>=yJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJG08w->#SJJJJJJJJJJJJ",
+"JJJJJJJJJJJJA-bm=>+xJJJJJJJJJJJJ",
+"JJJJJJJJJJJGa>GD2--6DJJJJJJJJJJJ",
+"JJJJJJJJJJJV-dJJb->XlJJJJJJJJJJJ",
+"JJJJJJJJJJJf-BJJF,;-%GJJJJJJJJJJ",
+"JJJJJJJJJJD<4GJJJf->@NJJJJJJJJJJ",
+"JJJJJJJJJJm-mJJJJA::=yJJJJJJJJJJ",
+"JJJJJJJJJG8wJJJJJJa-:#DJJJJJJJJJ",
+"JJJJJJJJJS>7gggggg7->OxJJJJJJJJJ",
+"JJJJJJJJJz=+O++++O+::-6GJJJJJJJJ",
+"JJJJJJJJD,iMMMMMMMBp--#NJJJJJJJJ",
+"JJJJJJJJB-BJJJJJJJJB-:osJJJJJJJJ",
+"JJJJJJJF82GJJJJJJJJGi--$ZJJJJJJJ",
+"JJJJJJJMokJJJJJJJJJJV::XrGJJJJJJ",
+"JJJJJJG9-VJJJJJJJJJJG4--@CJJJJJJ",
+"JJJJJGb-#nGJJJJJJJJJGi-:+rSJJJJJ",
+"JJJJn&O-o enJJJJJJGh*@---X.uJJJJ",
+"JJJJq,45531vJJJJJJG7,5555547JJJJ",
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ",
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ"
+};
diff --git a/kommander/editor/pics/large/layout.xpm b/kommander/editor/pics/large/layout.xpm
new file mode 100644
index 00000000..9c4becda
--- /dev/null
+++ b/kommander/editor/pics/large/layout.xpm
@@ -0,0 +1,167 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 129 2",
+" c #212100000000",
+". c #212108080000",
+"X c #292900000000",
+"o c #292910101010",
+"O c #292918181010",
+"+ c #292918181818",
+"@ c #313108080000",
+"# c #4a4a08080000",
+"$ c #4a4a21211818",
+"% c #525239393939",
+"& c #636310100000",
+"* c #636310100808",
+"= c #6b6b10100808",
+"- c #6b6b18180808",
+"; c #737321211818",
+": c #737331312121",
+"> c #737339393131",
+", c #52524a4a4a4a",
+"< c #737352524a4a",
+"1 c #73735a5a5a5a",
+"2 c #6b6b63635a5a",
+"3 c #6b6b63636363",
+"4 c #73736b6b6b6b",
+"5 c #7b7b63636363",
+"6 c #7b7b6b6b6b6b",
+"7 c #737373736b6b",
+"8 c #7b7b73737373",
+"9 c #848418180808",
+"0 c #949421211010",
+"q c #949429291010",
+"w c #9c9c21211010",
+"e c #9c9c29291818",
+"r c #9c9c31312121",
+"t c #adad31311818",
+"y c #b5b529291010",
+"u c #b5b531311818",
+"i c #adad31312121",
+"p c #bdbd39392121",
+"a c #bdbd39392929",
+"s c #9c9c42423131",
+"d c #adad4a4a3939",
+"f c #bdbd42422929",
+"g c #848452524a4a",
+"h c #949452524242",
+"j c #9c9c5a5a5252",
+"k c #84846b6b6b6b",
+"l c #8c8c73736b6b",
+"z c #8c8c73737373",
+"x c #949473736b6b",
+"c c #9c9c73736b6b",
+"v c #9c9c73737373",
+"b c #adad5a5a5252",
+"n c #adad63635252",
+"m c #bdbd63635252",
+"M c #bdbd6b6b5a5a",
+"N c #a5a573736b6b",
+"B c #a5a57b7b7373",
+"V c #b5b573736b6b",
+"C c #cece31311010",
+"Z c #d6d629291010",
+"A c #c6c639392121",
+"S c #cece4a4a3131",
+"D c #d6d64a4a3131",
+"F c #d6d64a4a3939",
+"G c #d6d652523939",
+"H c #dede52523939",
+"J c #e7e74a4a2929",
+"K c #e7e74a4a3131",
+"L c #efef52523939",
+"P c #f7f752523131",
+"I c #f7f752523939",
+"U c #cece5a5a4a4a",
+"Y c #d6d652524242",
+"T c #dede5a5a4a4a",
+"R c #dede6b6b5252",
+"E c #c6c673736363",
+"W c #cece7b7b6b6b",
+"Q c #ffff63634a4a",
+"! c #f7f76b6b5252",
+"~ c #f7f76b6b5a5a",
+"^ c #ffff6b6b5252",
+"/ c #f7f773735a5a",
+"( c #ffff73735252",
+") c #ffff73735a5a",
+"_ c #ffff7b7b5a5a",
+"` c #ffff7b7b6363",
+"' c #ffff7b7b6b6b",
+"] c #9c9c84847b7b",
+"[ c #adad84847b7b",
+"{ c #b5b584847b7b",
+"} c #bdbd84847b7b",
+"| c #c6c684847b7b",
+" . c #dede84847373",
+".. c #dede8c8c7b7b",
+"X. c #e7e784847373",
+"o. c #f7f784846b6b",
+"O. c #ffff84846363",
+"+. c #ffff84846b6b",
+"@. c #ffff8c8c6b6b",
+"#. c #f7f784847373",
+"$. c #ffff8c8c7373",
+"%. c #94948c8c8c8c",
+"&. c #9c9c8c8c8c8c",
+"*. c #949494948c8c",
+"=. c Gray58",
+"-. c #9c9c94949494",
+";. c Gray61",
+":. c #a5a58c8c8c8c",
+">. c #adad94948c8c",
+",. c #adad9c9c9494",
+"<. c #adad9c9c9c9c",
+"1. c #b5b58c8c8484",
+"2. c #b5b594948c8c",
+"3. c #b5b594949494",
+"4. c #b5b59c9c9494",
+"5. c #bdbd9c9c9494",
+"6. c #bdbd9c9c9c9c",
+"7. c #bdbda5a59c9c",
+"8. c #b5b5adada5a5",
+"9. c #b5b5adadadad",
+"0. c #bdbdb5b5b5b5",
+"q. c Gray74",
+"w. c #c6c694948c8c",
+"e. c #cece94948c8c",
+"r. c #c6c69c9c9494",
+"t. c #dede94948484",
+"y. c #efef94948484",
+"u. c #c0c0c0c0c0c0",
+"i. c None",
+/* pixels */
+"i.n t i i i i i i i i i i t { i.i.,.t i i i i i i i i i i t d i.",
+"i.T K K K K K K K K K K K J | i.i.4.K K K K K K K J K J J J H i.",
+"i.o.O.+.O.O.O.O.` O.` O.` ` e.i.i.6.` _ ` _ _ _ ` _ ) ` ) ) ` i.",
+"i.#.+.' +.' +.' +.` +.` ` O.e.i.i.<.` ` ` ` ` ` ` ` ` ` ) ` ` i.",
+"i.U H Y G G Y G Y G Y G Y G } i.i.4.G G G F G F F F G F G F Y i.",
+"i.s e e e e e e e e e e e w ] i.i.>.e e e e e e e e e e e e r i.",
+"i.: - - - - - - - - - - - = x i.i.&.- - - * - * - * - * - * ; i.",
+"i.% @ @ @ @ @ @ @ @ @ @ @ @ 5 i.i.&.@ @ @ @ @ @ @ @ @ @ @ @ $ i.",
+"i.2 o + + + + + + + + + + O 8 i.i.-.O + + + + + + + + + + O , i.",
+"i.q.q.q.q.q.q.q.q.q.q.q.q.q.q.i.i.q.q.q.q.i.q.i.q.i.q.i.q.q.q.i.",
+"i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.",
+"i.q.9.9.9.9.9.9.9.9.9.9.9.9.q.i.i.q.9.9.9.9.9.9.9.9.9.9.9.9.0.i.",
+"i.V y u u u u u u u u u u y [ i.i.3.y u u u u u u u u u u y b i.",
+"i.W I L I L L I L L I L L P 1.i.i.4.I L L L L L L L L L L P R i.",
+"i.t.+.@.@.+.@.+.+.+.+.+.+.O.2.i.i.7.` O.` O.` ` ` ` ` ` ` ` #.i.",
+"i...` ` ` ` ` ` ` ` ` ` ` ` 1.i.i.6.) ` ` ` ) ` ) ) ) ) ) / o.i.",
+"i.E G G G G G G G F G F F D [ i.i.3.F S S S F S F F S F S S m i.",
+"i.j 0 e e e e e e q e q e 0 z i.i.:.q e e e q e q e q e e 0 s i.",
+"i.g & * * * * * * * * * * & l i.i.&.* * * * * * * * * * * * > i.",
+"i.1 X . X . . X . X X 6 i.i.%.X . . . . % i.",
+"i.;.3 7 4 4 4 4 4 4 4 4 7 3 ;.i.i.8.4 7 8 7 8 7 8 7 8 7 8 4 =.i.",
+"i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.",
+"i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.",
+"i.9.c B B B B B B B B B B N <.i.i.9.N B B N N B N B N B N N ,.i.",
+"i.} Z C C C C C C C C C C Z B i.i.2.C C C C C C C C C C C Z M i.",
+"i.e.( ) ^ ) ) ^ ) ) ^ ) ^ ^ { i.i.5.^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ Q .i.",
+"i.r.$.$.$.$.$.$.$.$.$.$.@.$.1.i.i.7.+.+.+.+.+.+.+.+.' +.` O.y.i.",
+"i.w.) / / / ~ ~ ~ ! ~ ! ~ ) { i.i.5.~ ! ! ! ! ! ! ! ! ! ! ! X.i.",
+"i.[ A a f a f f f f a f a p v i.i.>.a a a a a a a p a p a p b i.",
+"i.c 9 0 9 ; 9 0 9 ; 9 9 0 9 l i.i.:.9 9 ; 9 9 9 ; 9 ; 9 ; 9 h i.",
+"i.z # # * # # # # # # # # # k i.i.&.# # # # # # # # # # # # < i.",
+"i.%.. O O + O + + + O + + . 8 i.i.*.O O + O + + O + + + + . 4 i."
+};
diff --git a/kommander/editor/pics/large/lcdnumber.xpm b/kommander/editor/pics/large/lcdnumber.xpm
new file mode 100644
index 00000000..007e8c93
--- /dev/null
+++ b/kommander/editor/pics/large/lcdnumber.xpm
@@ -0,0 +1,154 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 116 2",
+" c #000000001818",
+". c #000000002121",
+"X c #000000002929",
+"o c #080808082929",
+"O c #000000003131",
+"+ c #000000003939",
+"@ c #080808083131",
+"# c #181818182121",
+"$ c #101010103131",
+"% c #101010103939",
+"& c #181818183131",
+"* c #212121213131",
+"= c #212121213939",
+"- c #292921213939",
+"; c #292929293131",
+": c #292929293939",
+"> c #000000004242",
+", c #000000004a4a",
+"< c #080808084a4a",
+"1 c #000000005252",
+"2 c #000000005a5a",
+"3 c #080800005252",
+"4 c #080800005a5a",
+"5 c #080808085252",
+"6 c #080808085a5a",
+"7 c #101008084a4a",
+"8 c #101010104242",
+"9 c #181818184242",
+"0 c #101010105252",
+"q c #101010105a5a",
+"w c #181818185a5a",
+"e c #000000006363",
+"r c #000000006b6b",
+"t c #080800006363",
+"y c #080800006b6b",
+"u c #080808086363",
+"i c #080808086b6b",
+"p c #000000007373",
+"a c #000000007b7b",
+"s c #080808087373",
+"d c #080808087b7b",
+"f c #101010106363",
+"g c #101010106b6b",
+"h c #181818186b6b",
+"j c #101010107b7b",
+"k c #181810107373",
+"l c #181818187373",
+"z c #181818187b7b",
+"x c #212121214242",
+"c c #292929294242",
+"v c #212121215252",
+"b c #313131314242",
+"n c #313131314a4a",
+"m c #393939394a4a",
+"M c #212121216b6b",
+"N c #292929296363",
+"B c #424242424a4a",
+"V c #424242425252",
+"C c #4a4a42425a5a",
+"Z c #4a4a4a4a5252",
+"A c #4a4a4a4a5a5a",
+"S c Gray32",
+"D c #5a5a5a5a5a5a",
+"F c #424242426363",
+"G c #525252526363",
+"H c #5a5a5a5a6363",
+"J c Gray39",
+"K c #636363636b6b",
+"L c Gray42",
+"P c #6b6b6b6b7373",
+"I c #6b6b6b6b7b7b",
+"U c Gray45",
+"Y c #7b7b7b7b7373",
+"T c #7b7b7b7b7b7b",
+"R c #000000008c8c",
+"E c #080808088484",
+"W c #080808089494",
+"Q c #080808089c9c",
+"! c #181818188484",
+"~ c #10100808a5a5",
+"^ c #292929299494",
+"/ c #313131319c9c",
+"( c #393931319c9c",
+") c #29292929a5a5",
+"_ c #31313131adad",
+"` c #4a4a4a4a9c9c",
+"' c #525252528c8c",
+"] c #5a5a5a5a9c9c",
+"[ c #6b6b6b6b8484",
+"{ c #6b6b6b6b8c8c",
+"} c #6b6b6b6b9494",
+"| c #737373738c8c",
+" . c #7b7b7b7b8484",
+".. c #7b7b7b7b8c8c",
+"X. c #737373739494",
+"o. c #7b7b7b7b9c9c",
+"O. c #848484848484",
+"+. c #848484848c8c",
+"@. c Gray55",
+"#. c #848484849494",
+"$. c #848484849c9c",
+"%. c #8c8c8c8c9494",
+"&. c Gray58",
+"*. c #949494949c9c",
+"=. c #9c9c9c9c9494",
+"-. c Gray61",
+";. c #9c9c9c9ca5a5",
+":. c #a5a59c9cadad",
+">. c #a5a5a5a5a5a5",
+",. c Gray68",
+"<. c Gray71",
+"1. c #b5b5bdbdbdbd",
+"2. c Gray74",
+"3. c #c0c0c0c0c0c0",
+"4. c #c6c6c6c6c6c6",
+"5. c None",
+/* pixels */
+"5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.2.o./ z z l k l h F <.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.*.W d i u u u u u , m 5.5.",
+"<.{ ,.5.5.5.5.5.5.5.5.5.:.| 2.5.5.5.5.,.- O > < > < + O H X.2.",
+"] R n 2.5.5.5.5.5.5.5.1.) e +.5.5.5.5.5.<.O.Y L L L U T -.] a K ",
+"! d + >.5.5.5.5.5.5.5.-.E 2 A 2.5.5.5.5.5.5.5.5.5.5.5.5.<.j y 9 ",
+"h i > &.5.5.5.5.5.5.5.*.i u n 2.5.5.5.5.5.5.5.5.5.5.5.5.>.q u % ",
+"f i < O.5.5.5.5.5.5.5.%.u u c 2.5.5.5.5.5.5.5.5.5.5.5.5.>.6 6 % ",
+"w i + O.5.5.5.5.5.5.5.%.u 6 c 2.5.5.5.5.5.5.5.5.5.5.5.5.>.5 6 % ",
+"w i + O.5.5.5.5.5.5.5.-.u 6 x 2.5.5.5.5.5.5.5.5.5.5.5.5.>.0 6 % ",
+"N u > T 5.5.5.5.5.5.5.-.6 2 = 2.5.5.5.5.5.5.5.5.5.5.5.5.:.0 6 % ",
+"N u + T 5.5.5.5.5.5.5.>.6 3 = 2.5.5.5.5.5.5.5.5.5.5.5.5.,.< 5 % ",
+"C 1 X @.5.5.5.5.5.5.5.<.7 , : 2.5.5.5.5.5.5.5.5.5.5.5.5.2.8 > & ",
+"%.X # *.$.| [ [ { [ | -.V U 5.5.5.5.5.<.$.[ [ X.X.[ [ *.J J ",
+"4.O.I _ W d s s s s i 5 K T 2.5.5.5.5.1.( Q s r e e e u , G T 2.",
+"5.5.%.> 1 5 3 3 5 5 < X S ,.5.5.5.5.2.%.8 > , < , < > > X m 5.5.",
+"5.5.2.T n - = = = : b D } j &.5.5.2.` M Y A m b b b m B J <.5.5.",
+"5.5.5.5.2.2.2.2.2.2.2.4.^ p c 2.5.;.Q 1 P 5.2.4.2.2.2.2.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.<.g u % <.5.*.i 1 V 5.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.<.q 6 @ ,.5.*.6 1 V 2.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.<.w 6 % ,.5.%.6 , m 2.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.2.0 4 @ >.5.+.6 1 m 2.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.2.w 6 @ >.5.%.6 < n 2.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.2.w 5 @ >.5.&.3 , b 4.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.2.v < o ,.5.;.< > m 5.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.2.H X ; 2.5.2.& . L >.#. ...%.#...-.2.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.5.<.Z >.5.5.5.-.D ' ~ d i i t e 6 , P 2.5.",
+"5.5.5.5.5.5.5.5.5.5.5.5.5.4.5.5.5.5.5.<.q 1 < < , < > < X & 2.5.",
+"5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.=.b & $ & & & * Z >.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.",
+"5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5."
+};
diff --git a/kommander/editor/pics/large/left.xpm b/kommander/editor/pics/large/left.xpm
new file mode 100644
index 00000000..c467bccc
--- /dev/null
+++ b/kommander/editor/pics/large/left.xpm
@@ -0,0 +1,181 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 143 2",
+" c #00001010f7f7",
+". c #18183131dede",
+"X c #00002121efef",
+"o c #00002121f7f7",
+"O c #00002121ffff",
+"+ c #00002929ffff",
+"@ c #08082929f7f7",
+"# c #00003131ffff",
+"$ c #08083131ffff",
+"% c #08083939ffff",
+"& c #10102929e7e7",
+"* c #18183131e7e7",
+"= c #10103939ffff",
+"- c #29293939c6c6",
+"; c #29293939d6d6",
+": c #21213939e7e7",
+"> c #39394a4abdbd",
+", c #10104242ffff",
+"< c #18184242ffff",
+"1 c #18184a4affff",
+"2 c #29294242cece",
+"3 c #21214242dede",
+"4 c #29294242dede",
+"5 c #39394a4adede",
+"6 c #31315252dede",
+"7 c #21214a4affff",
+"8 c #21215252ffff",
+"9 c #29295252ffff",
+"0 c #29295a5affff",
+"q c #31315252e7e7",
+"w c #31315a5affff",
+"e c #31316363ffff",
+"r c #39396363ffff",
+"t c #39396b6bffff",
+"y c #5a5a6363adad",
+"u c #63636b6bbdbd",
+"i c #6b6b7373bdbd",
+"p c #42425252d6d6",
+"a c #42425252dede",
+"s c #4a4a5a5ad6d6",
+"d c #52526363c6c6",
+"f c #52526363cece",
+"g c #52527373d6d6",
+"h c #52527b7bdede",
+"j c #42426363efef",
+"k c #42426b6bffff",
+"l c #42427373ffff",
+"z c #4a4a7373ffff",
+"x c #4a4a7b7bffff",
+"c c #52527373e7e7",
+"v c #52527b7bf7f7",
+"b c #63637b7bc6c6",
+"n c #63637b7bcece",
+"m c #6b6b7373c6c6",
+"M c #63637b7bd6d6",
+"N c #73737b7bcece",
+"B c #73738484b5b5",
+"V c #7b7b8484b5b5",
+"C c #7b7b8c8cbdbd",
+"Z c #7b7b9494bdbd",
+"A c #4a4a8484ffff",
+"S c #5a5a8484efef",
+"D c #52528484ffff",
+"F c #5a5a8484ffff",
+"G c #5a5a8c8cffff",
+"H c #6b6b8484cece",
+"J c #63638484dede",
+"K c #73738484c6c6",
+"L c #73738c8ccece",
+"P c #73738c8cd6d6",
+"I c #63638c8cefef",
+"U c #63638c8cffff",
+"Y c #63639494ffff",
+"T c #6b6b9494ffff",
+"R c #6b6b9c9cffff",
+"E c #73739c9ce7e7",
+"W c #7b7ba5a5e7e7",
+"Q c #7373a5a5ffff",
+"! c #7373adadffff",
+"~ c #7b7badadffff",
+"^ c #7b7bb5b5ffff",
+"/ c #848484849c9c",
+"( c #84848484adad",
+") c #8c8c9494adad",
+"_ c #84849494bdbd",
+"` c #8c8c9494b5b5",
+"' c #8c8c9c9cbdbd",
+"] c #94949494a5a5",
+"[ c #94949494bdbd",
+"{ c #94949c9cbdbd",
+"} c #9c9ca5a5adad",
+"| c #9c9ca5a5b5b5",
+" . c #a5a5a5a5b5b5",
+".. c #a5a5a5a5bdbd",
+"X. c #adadadadb5b5",
+"o. c Gray71",
+"O. c #b5b5b5b5bdbd",
+"+. c Gray74",
+"@. c #84848c8cc6c6",
+"#. c #84849c9cc6c6",
+"$. c #8c8c9c9ccece",
+"%. c #94949494c6c6",
+"&. c #8c8ca5a5efef",
+"*. c #8484adadffff",
+"=. c #8c8cadadf7f7",
+"-. c #8484b5b5ffff",
+";. c #8484bdbdffff",
+":. c #8c8cbdbdffff",
+">. c #9c9cbdbdf7f7",
+",. c #b5b5bdbdc6c6",
+"<. c #bdbdbdbdc6c6",
+"1. c #9494c6c6ffff",
+"2. c #9494ceceffff",
+"3. c #9c9cc6c6ffff",
+"4. c #9c9cceceffff",
+"5. c #9c9cd6d6ffff",
+"6. c #a5a5ceceffff",
+"7. c #adadc6c6ffff",
+"8. c #a5a5d6d6ffff",
+"9. c #adadd6d6ffff",
+"0. c #b5b5ceceffff",
+"q. c #b5b5d6d6ffff",
+"w. c #b5b5dedeffff",
+"e. c #bdbdd6d6ffff",
+"r. c #bdbde7e7ffff",
+"t. c #c0c0c0c0c0c0",
+"y. c #ceced6d6ffff",
+"u. c #c6c6e7e7ffff",
+"i. c #c6c6efefffff",
+"p. c #cecee7e7ffff",
+"a. c #ceceefefffff",
+"s. c #c6c6f7f7ffff",
+"d. c #cecef7f7ffff",
+"f. c #d6d6efefffff",
+"g. c #dedeefefffff",
+"h. c #d6d6f7f7ffff",
+"j. c #dedef7f7ffff",
+"k. c #dedeffffffff",
+"l. c #e7e7ffffffff",
+"z. c #efefffffffff",
+"x. c #f7f7ffffffff",
+"c. c Gray100",
+"v. c None",
+/* pixels */
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.<.` E c ` v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.O.b =.c.y.@.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.O.K 7.c.c.f.$.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.` W g.c.x.a.1.$.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.+.) >.c.c.z.s.5.*.$.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.B &.c.c.z.w.5.1.R ' v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.o.` 0.c.c.z.r.1.:.:.Q Z v.v.v.v.v.v.v.v.v.v.+.+.,.,.,.v.v.",
+"v.v. .g q.c.c.a.5.:.-.*.~ ~ J .v.v.v.+.+.,.` C H f h S S J n X.",
+"v.<.J p.c.c.d.4.-.*.~ ~ ~ ~ l q M P H b c I =.3.q.f.j.h.d.4.8 f ",
+"+.n e.c.x.d.8.;.-.~ ~ Q Q ~ U ^ 2.6.w.i.l.j.h.h.a.u.9.1.:.Y < a ",
+"b 6.c.k.r.2.-.*.~ Q Q Q Q Q Q :.3.8.8.4.1.:.;.-.^ Q ! Q Y l , 4 ",
+"I x.i.5.4.-.*.~ Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q R R R U k = 3 ",
+"v 8.1.:.-.^ ~ Q Q Q Q Q Q R Q R R Q R Q R R R R T R Y Y G t $ 4 ",
+"6 e Y Q Q ~ Q Q R R R Q Q R R Y U G G U Y Y Y U Y G U G D r % 4 ",
+"] & < k D Y R Q R Q R R R Q F 7 < < 1 7 w r l l z x x l k e $ 5 ",
+"+./ @ = e x U T R T R R Q Q r X . & X o O + $ = = 1 8 9 7 + p ",
+"v.v.B @ = w l G Y T Y R T Q j y ] +...] V m > - . X X @ @ + & ( ",
+"v.v.+.} s $ 1 r x G Y Y Y Y L v.v.v.v.v.v.v.+.+.O.X.| [ %.{ X.+.",
+"v.v.v.v.O.2 O < e z G U Y G #.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.o.d $ , w x G G A @.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.+.u & = 0 k x t i v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.<. .; # < 9 < i v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.} . + $ # N v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.} u : * _ v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v."
+};
diff --git a/kommander/editor/pics/large/line.xpm b/kommander/editor/pics/large/line.xpm
new file mode 100644
index 00000000..93e0439e
--- /dev/null
+++ b/kommander/editor/pics/large/line.xpm
@@ -0,0 +1,45 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 7 1",
+" c #060606060505",
+". c #010101010a0a",
+"X c #090908083b3b",
+"o c #1d1d1d1d2121",
+"O c #0a0a0a0a4747",
+"+ c #c0c0c0c0c0c0",
+"@ c None",
+/* pixels */
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"oooooooooooooooooooooooooooooooo",
+"O@OO@OO@O@O@O@O@OO@OO@OO@O@O@O@O",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXO",
+"................................",
+". .",
+"o..............................o",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
+};
diff --git a/kommander/editor/pics/large/lineedit.xpm b/kommander/editor/pics/large/lineedit.xpm
new file mode 100644
index 00000000..1677865b
--- /dev/null
+++ b/kommander/editor/pics/large/lineedit.xpm
@@ -0,0 +1,135 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 97 2",
+" c Gray0",
+". c Gray8",
+"X c #191919191919",
+"o c #2f2f2f2f2f2f",
+"O c #373737373737",
+"+ c #000000004b4b",
+"@ c #000000005757",
+"# c #000000005f5f",
+"$ c #000000006464",
+"% c #000000006b6b",
+"& c #000000007373",
+"* c #000000007d7d",
+"= c #41413e3e3c3c",
+"- c #464646464646",
+"; c Gray30",
+": c #525252524d4d",
+"> c Gray34",
+", c #5f5f5f5f5a5a",
+"< c #646464645c5c",
+"1 c #707069695555",
+"2 c #666664646464",
+"3 c #696966666161",
+"4 c Gray43",
+"5 c #000005058484",
+"6 c #000000008e8e",
+"7 c #000000009696",
+"8 c #14141e1e8484",
+"9 c #00000000a5a5",
+"0 c #00000000aaaa",
+"q c #00000000b2b2",
+"w c #00000a0ab2b2",
+"e c #00000202cdcd",
+"r c #00000000d7d7",
+"t c #00000000dfdf",
+"y c #00000000e6e6",
+"u c #00000000eeee",
+"i c #00000000f5f5",
+"p c Blue",
+"a c #00000c0cffff",
+"s c #19193737e9e9",
+"d c #11115555ffff",
+"f c #25254646eeee",
+"g c #32325f5fffff",
+"h c #39396161ffff",
+"j c #5f5f6666b4b4",
+"k c #6e6e6e6e8484",
+"l c #757570708282",
+"z c #46466e6effff",
+"x c #50507a7affff",
+"c c #70707878c3c3",
+"v c #55558282ffff",
+"b c #7d7d8989eeee",
+"n c #73739898ffff",
+"m c #8e8e8e8e8e8e",
+"M c Gray59",
+"N c #9d9d9d9d9d9d",
+"B c #98989696a3a3",
+"V c #a5a5a5a5a5a5",
+"C c #afafafafafaf",
+"Z c #b2b2aaaaafaf",
+"A c #b2b2afafb7b7",
+"S c #b2b2afafb9b9",
+"D c #bebebebebebe",
+"F c #87879191ebeb",
+"G c #8e8e9898fafa",
+"H c #9d9da3a3dada",
+"J c #9d9dafafffff",
+"K c #bebebebec1c1",
+"L c #a5a5bebeffff",
+"P c #b9b9c1c1e4e4",
+"I c #b4b4c6c6ffff",
+"U c #c1c1bebebebe",
+"Y c #c6c6c1c1b9b9",
+"T c #c0c0c0c0c0c0",
+"R c #c3c3c3c3c3c3",
+"E c #cdcdcdcdcdcd",
+"W c #dcdcd5d5c6c6",
+"Q c #dfdfdadacdcd",
+"! c #d7d7d7d7d7d7",
+"~ c gainsboro",
+"^ c #c3c3cbcbfdfd",
+"/ c #c1c1d5d5ffff",
+"( c #cbcbdcdcffff",
+") c #d7d7e1e1ffff",
+"_ c #dcdce6e6ffff",
+"` c #dfdfe9e9ffff",
+"' c #f3f3eeeedcdc",
+"] c #fafaf0f0cbcb",
+"[ c #ffffffffd7d7",
+"{ c #ffffffffdfdf",
+"} c #e4e4eeeeffff",
+"| c #eeeef5f5ffff",
+" . c #ffffffffe6e6",
+".. c Gray96",
+"X. c #fffffffff5f5",
+"o. c Gray100",
+"O. c None",
+/* pixels */
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"A 4 = O X o X X . . . . X X X X X X X X . X X X O 2 C ",
+"; - ",
+"X D o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.~ X ",
+"X o.o.o.o.o.o.o.o.o.o.| p 7 .o.o.o.o... o.o.M X ",
+". o o.o.o.o.o.o.o.o.o.o.) p # ] o.o.o.o.o.N m o 4 m C o.o.R . ",
+". - o.o.o.o.o.o.o.o.o.o.) p # [ o.o.o.o.o.o.o.E o.o.o.o.o.E ",
+" > o.o.o./ v g J o.o.o.) p # ] n h ^ o.o.o.o.R o.o.o.o.o.E ",
+" , o.( p i i p p t K o.) p 6 y u i i r X.o.o.R o.o.o.o.o.! ",
+" 2 o.p q & H F i y % X.) p i * j b p r 8 o.o.R o.o.o.o.o.~ ",
+". 3 o.u $ { o.o.o.p # [ _ p 7 l o.o.^ p $ ' o.R o.o.o.o.o.~ ",
+" 2 o.X.X.o.I z a p # ] ` p @ [ o.o.o.p * A o.R o.o.o.o.o.~ . ",
+" 4 o.( a p i y e p $ [ _ p @ .o.o.o.p 9 k o.R o.o.o.o.o.! ",
+" < | p e q e c P p # ] ` p # { o.o.o.p 5 B o.R o.o.o.o.o.! ",
+". 1 n y + { o.o.L p # [ } p $ ] o.o.o.p @ Q o.R o.o.o.o.o.! ",
+" 1 x y & X.o.| p p # ] ` p t w o.o.d t + o.o.E o.o.o.o.o.! ",
+"X = } p u p p u 7 y % W } p 9 t p p u $ Y K C = m V D o.o.E . ",
+"X . o.G p u e 9 Z f 0 S o.y 5 s u e 7 U o. o.o.C . ",
+"X o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.= X ",
+"- X = : < 2 , , > > > > , , , , > > > , , 2 4 4 > ; o = ",
+"C > o X X . . . . . . . . . X o ; V ",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O."
+};
diff --git a/kommander/editor/pics/large/listbox.xpm b/kommander/editor/pics/large/listbox.xpm
new file mode 100644
index 00000000..13ff67ef
--- /dev/null
+++ b/kommander/editor/pics/large/listbox.xpm
@@ -0,0 +1,121 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 83 1",
+" c Gray0",
+". c #080808080000",
+"X c Gray3",
+"o c #080808081010",
+"O c #101008080808",
+"+ c #101010101010",
+"@ c #101010101818",
+"# c #181818181818",
+"$ c #080810102929",
+"% c Gray13",
+"& c Gray16",
+"* c #313131313131",
+"= c #393939393939",
+"- c #101018184242",
+"; c #101018185252",
+": c #101021216b6b",
+"> c #181829297b7b",
+", c #212131316363",
+"< c #212131317373",
+"1 c #424239393939",
+"2 c #424242423939",
+"3 c #4a4a42423939",
+"4 c Gray26",
+"5 c Gray29",
+"6 c #52524a4a4242",
+"7 c #525252524a4a",
+"8 c Gray32",
+"9 c #5a5a5a5a5a5a",
+"0 c Gray39",
+"q c Gray42",
+"w c Gray45",
+"e c #7b7b7b7b7b7b",
+"r c #101029298484",
+"t c #10103131b5b5",
+"y c #10103131cece",
+"u c #00002121e7e7",
+"i c #00002121efef",
+"p c #08082929e7e7",
+"a c #08083131efef",
+"s c #08083131f7f7",
+"d c #18183939efef",
+"f c #18183939f7f7",
+"g c #18183939ffff",
+"h c #18184242ffff",
+"j c #31315252dede",
+"k c #21214242ffff",
+"l c #21214a4affff",
+"z c #31315a5affff",
+"x c #6b6b8484f7f7",
+"c c #73738c8cefef",
+"v c #73738484f7f7",
+"b c #73738c8cf7f7",
+"n c #7b7b8c8cf7f7",
+"m c #7b7b9494f7f7",
+"M c #848484848484",
+"N c Gray55",
+"B c Gray58",
+"V c Gray61",
+"C c #a5a59c9c9c9c",
+"Z c #a5a5a5a59c9c",
+"A c #a5a5a5a5a5a5",
+"S c #adadadada5a5",
+"D c Gray68",
+"F c Gray71",
+"G c Gray74",
+"H c #94949c9cdede",
+"J c #9c9ca5a5dede",
+"K c #9494a5a5ffff",
+"L c #b5b5bdbde7e7",
+"P c #b5b5bdbdf7f7",
+"I c #bdbdc6c6f7f7",
+"U c #bdbdcecef7f7",
+"Y c #c6c6c6c6c6c6",
+"T c #cececececece",
+"R c Gray84",
+"E c Gray87",
+"W c #ceced6d6ffff",
+"Q c #e7e7e7e7e7e7",
+"! c #efefefefefef",
+"~ c #efefefefffff",
+"^ c Gray97",
+"/ c #f7f7f7f7ffff",
+"( c Gray100",
+/* pixels */
+"N0095544==&&&&%%%%%&%&&*=212377e",
+"5X+*====44=444444444==**+@,<>:$5",
+"5 w!FFFFDFDDDDDDDDDDDD^(0ojzkh;4",
+"4 BA=4444=========*==*G(e rkhtO4",
+"4 BF*=4==444=4====4===T(e @yd-.4",
+"= q^TTTYYGGGGGGGYGYTTR!^0 O;rO+=",
+"=++#%%%%#%##############@OXXXXO=",
+"*+&8899000qqwwqqq009985#X*qew4o*",
+"&X0(((((((((((((((((((!* w(((AX*",
+"&X0((((((((((((((((((((= w(^^AX&",
+"& q(F0q00000999999900T(4 qYN8BX%",
+"&Xq(M*=4============&A(4 qw45M+%",
+"&Xw(M*==============&V(5 q8&=MX%",
+"&Xw(V*44444=4444=4===G(8 eB8MVX%",
+"%Xw(!YGFFFFFDDDFFFGGY^(8 e(((DX%",
+"&Xw(F5999888888888885Y(8 e(((A %",
+"%Xe(N*===4==========&A(8 e(((AX%",
+"& e(N&==============&V(9 e(((A %",
+"&Xw(F7777777667677777T(9 e(((AX%",
+"*Xw(~UIIPLPPPPPLPPIIU/(9 e(((D &",
+"=Xw(KgllkkhkhkhhhkfhdL(8 e(((A *",
+"= w(nsffffffddfdddddpH(8 e(((A *",
+"= q(miaadadadadaadaauJ(8 e(((AX=",
+"4 q(WcnbxvxxxxxvbvbncQ(5 e(((V =",
+"4 0(QSSZZZZCVVCZCZZZS!(5 e(((V 4",
+"6 9(V&*=************&D(4 e(((V 4",
+"5 9(B*1==2==========&V(4 e(((V 4",
+"8 8(A%**************&F(= e(((V 5",
+"9 8(!FFFFFFFDDFFFFFFG!(* e(((V 9",
+"9X*VDYYTTTRRERRTTTYYGDB% 4GTY0 9",
+"0XXX XXX++X+++++++XXX X+X +XXX9",
+"N45===**&%%#%######%#%%%&&**===N"
+};
diff --git a/kommander/editor/pics/large/listview.xpm b/kommander/editor/pics/large/listview.xpm
new file mode 100644
index 00000000..de987cc4
--- /dev/null
+++ b/kommander/editor/pics/large/listview.xpm
@@ -0,0 +1,148 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 110 2",
+" c Gray0",
+". c Gray3",
+"X c #101010100808",
+"o c #101010101010",
+"O c #101010101818",
+"+ c #181818181818",
+"@ c Gray13",
+"# c Gray16",
+"$ c #313131313131",
+"% c #393939393939",
+"& c #424231311010",
+"* c #424242422929",
+"= c #5a5a52523131",
+"- c Gray26",
+"; c #424242424a4a",
+": c Gray29",
+"> c Gray32",
+", c #5a5a5a5a5a5a",
+"< c #73736b6b5252",
+"1 c Gray39",
+"2 c Gray42",
+"3 c Gray45",
+"4 c #737373737b7b",
+"5 c #7b7b7b7b7b7b",
+"6 c #7b7b84848484",
+"7 c #84847b7b5a5a",
+"8 c #b5b59c9c3131",
+"9 c #bdbd9c9c3131",
+"0 c #8c8c84846b6b",
+"q c #9c9c94947b7b",
+"w c #b5b59c9c5a5a",
+"e c #bdbd9c9c5a5a",
+"r c #a5a594946b6b",
+"t c #adad9c9c6363",
+"y c #a5a594947373",
+"u c #adad9c9c7373",
+"i c #adad9c9c7b7b",
+"p c #b5b59c9c6363",
+"a c #bdbda5a54242",
+"s c #b5b5a5a57b7b",
+"d c #f7f7bdbd3131",
+"f c #c6c6a5a54242",
+"g c #c6c6a5a54a4a",
+"h c #cecea5a54242",
+"j c #ceceb5b55a5a",
+"k c #d6d6bdbd5252",
+"l c #f7f7c6c63131",
+"z c #f7f7c6c63939",
+"x c #ffffcece3939",
+"c c #dedecece4a4a",
+"v c #efefd6d64a4a",
+"b c #efefdede5252",
+"n c #f7f7cece4242",
+"m c #ffffcece4242",
+"M c #ffffd6d64242",
+"N c #ffffdede4242",
+"B c #ffffdede4a4a",
+"V c #e7e7d6d66363",
+"C c #ffffe7e74a4a",
+"Z c #ffffe7e75252",
+"A c #ffffefef5252",
+"S c #ffffefef5a5a",
+"D c #fffff7f75a5a",
+"F c #fffff7f76363",
+"G c #ffffffff6363",
+"H c #ffffffff6b6b",
+"J c #fffff7f77373",
+"K c #ffffffff7373",
+"L c #ffffffff7b7b",
+"P c #848484848484",
+"I c Gray55",
+"U c #949494948484",
+"Y c #949494948c8c",
+"T c #9c9c94948c8c",
+"R c Gray58",
+"E c #9c9c94949494",
+"W c Gray61",
+"Q c #9c9ca5a5a5a5",
+"! c #a5a59c9c8484",
+"~ c #adad9c9c8484",
+"^ c #a5a59c9c9494",
+"/ c #a5a59c9c9c9c",
+"( c #a5a5a5a59c9c",
+") c #b5b5adad8c8c",
+"_ c #bdbdb5b59494",
+"` c #bdbdb5b59c9c",
+"' c #bdbdbdbd9494",
+"] c #bdbdbdbd9c9c",
+"[ c #a5a5a5a5a5a5",
+"{ c #adadadada5a5",
+"} c Gray68",
+"| c #b5b5adada5a5",
+" . c #b5b5b5b5a5a5",
+".. c #b5b5b5b5adad",
+"X. c #bdbdb5b5a5a5",
+"o. c #bdbdb5b5adad",
+"O. c #bdbdbdbda5a5",
+"+. c #bdbdbdbdadad",
+"@. c Gray71",
+"#. c #bdbdbdbdb5b5",
+"$. c Gray74",
+"%. c #c6c6bdbd8c8c",
+"&. c #c6c6bdbd9494",
+"*. c #c6c6bdbda5a5",
+"=. c #d6d6cece8c8c",
+"-. c #d6d6cece9494",
+";. c #d6d6d6d69494",
+":. c #c0c0c0c0c0c0",
+">. c #c6c6c6c6c6c6",
+",. c None",
+/* pixels */
+",.} R 2 > : % $ $ $ # # # @ @ + + + @ @ + @ + @ @ # # $ - , W ,.",
+"[ % + . . . . . . . . . . . W ",
+"2 o . . . . : ",
+"- . . ; P Y E [ W ( [ [ W W W W W W W R W [ W I P 5 - # ",
+"$ . , ,.#.-.-.;.-.-.=...,.,.,.,.,.,.,.,.,.,.,.,.,.,.>.> + ",
+"# . R ,.' L K K K H F ! ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.R o ",
+"@ . W ,.&.K H H H G S q ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.W o ",
+"@ . . [ ,.&.H H F F F S q ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.[ . o ",
+"+ . . @.,.' H F F F F S q ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.} . . ",
+"+ . . @.,.%.H G F F F Z q ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.} . o ",
+"+ o } ,.| a f 9 9 f 8 ( ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.} . o ",
+"+ . . @.,.$.$.@.- $ @.@.>.,.,.$.+.O.*.*.O.O.#.,.,.,.,.,.} . . ",
+"+ o @.,.,.,.,.; % ,.,.,.,.,.o.J H H F F D s ,.,.,.,.,.} . o ",
+"+ . @.,.,.,.,.> @ P P P P 6 0 F S S S S A t ,.,.,.,.,.[ . o ",
+"+ . } ,.,.,.,.> . @ + + + O * F S S Z Z Z w ,.,.,.,.,.} . o ",
+"+ . . @.,.,.,.,.: $ $.$.$.$.>.` F S Z Z Z C p ,.,.,.,.,.} . o ",
+"o o } ,.,.,.,.> $ ,.,.,.,.,._ S A S Z Z C t ,.,.,.,.,.} . o ",
+"+ . @.,.,.,.,.> $ ,.,.,.,.,. .b m n m n x u ,.,.,.,.,.} . + ",
+"+ . } ,.,.,.,.> $ ,.,.,.,.,.$./ E < & U T @.,.,.,.,.,.} + ",
+"+ . } ,.,.,.,.> $ ,.,.,.,.,.,.,.,.6 O $.,.,.,.,.,.,.,.[ . + ",
+"@ . } ,.,.,.,.> $ $.*.X.] ` X.` $.P o X.O.` ] ` ` +.,.Q @ ",
+"@ . } ,.,.,.,.> % | H F F F F A ) P X V D D S S A j ,./ @ ",
+"# } ,.,.,.,.I O 7 D S Z Z Z B i Q o c A Z B B C f ,.[ @ ",
+"# . [ ,.,.,.,.>.4 = S Z Z Z Z N r ,.Y c Z B B B B h ,.[ # ",
+"# W ,.,.,.,.,.,._ D Z Z B B N y ,.$.b C B B B M h ,.R # ",
+"$ R ,.,.,.,.,.,.` A Z B Z B N y ,.#.v Z B M M N g ,.I $ ",
+"% I ,.,.,.,.,.,.| v z z z z d ~ ,.$.k z d z z l e ,.5 % ",
+"- 1 ,.,.,.,.,.,.$.{ / { { / ( $.,.,.@.^ ( { / / @.,., - ",
+"> . P } @.$.$.$.$.>.,.,.,.,.,.$.$.$.$.,.,.,.$.@.} P $ > ",
+"3 . o + # # $ $ $ # # # # # # $ # # # @ + . . . . 3 ",
+"} . . } ",
+",.[ , $ @ @ o o o o o . o . o . . . o . o o o o o + @ # % , [ ,."
+};
diff --git a/kommander/editor/pics/large/multilineedit.xpm b/kommander/editor/pics/large/multilineedit.xpm
new file mode 100644
index 00000000..e87a5713
--- /dev/null
+++ b/kommander/editor/pics/large/multilineedit.xpm
@@ -0,0 +1,108 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 70 1",
+" c #040404040404",
+". c Gray5",
+"X c #111111111111",
+"o c Gray24",
+"O c #000000007d7d",
+"+ c #414141414141",
+"@ c #4e4e4e4e4e4e",
+"# c Gray34",
+"$ c #5b5b5b5b5b5b",
+"% c Gray39",
+"& c #6c6c6c6c6c6c",
+"* c Gray44",
+"= c Gray49",
+"- c #000000008a8a",
+"; c #00000000a4a4",
+": c #00000000bebe",
+"> c #343434348282",
+", c #00000000c3c3",
+"< c #00000000d4d4",
+"1 c #00000000d8d8",
+"2 c #00000000e1e1",
+"3 c #00000000f6f6",
+"4 c #04040404ffff",
+"5 c #00000d0dffff",
+"6 c #09091a1affff",
+"7 c #16161616ffff",
+"8 c #11111e1effff",
+"9 c #16162323ffff",
+"0 c #1e1e2727ffff",
+"q c #1a1a3434ffff",
+"w c #30303030cbcb",
+"e c #27272727ffff",
+"r c #34343434ffff",
+"t c #38383838ffff",
+"y c #6c6c7070baba",
+"u c #52525f5fffff",
+"i c #4e4e6868ffff",
+"p c #57576363ffff",
+"a c #5f5f6363ffff",
+"s c #5b5b6868ffff",
+"d c #63637979ffff",
+"f c #75757979ffff",
+"g c #79797d7dffff",
+"h c #68688686ffff",
+"j c #7d7d8f8fffff",
+"k c #868686868686",
+"l c #939393939393",
+"z c Gray61",
+"x c #a0a0a0a0a0a0",
+"c c #a9a9a9a9a9a9",
+"v c #bebebebebebe",
+"b c #86868686e5e5",
+"n c #82828f8fffff",
+"m c #93939393ffff",
+"M c #9797adadffff",
+"N c #adadadadffff",
+"B c #adadb6b6ffff",
+"V c #bebec7c7ffff",
+"C c #b1b1d0d0ffff",
+"Z c #c0c0c0c0c0c0",
+"A c Gray83",
+"S c #cbcbd0d0ffff",
+"D c #d4d4d4d4ffff",
+"F c #ddddd8d8f6f6",
+"G c #d4d4e5e5ffff",
+"H c #e9e9e9e9e9e9",
+"J c #e9e9eeeeffff",
+"K c #eeeefbfbffff",
+"L c Gray100",
+"P c None",
+/* pixels */
+"v*oXXXX................XXXXXoo&v",
+"& . . . $",
+"o &HLLLLLLLLLLLLLLLLLLLLLLHl X",
+"X kLLLLLLLLLLLLLLLLLLLLLLLLLLL X",
+". LLLLLLLLLLLLLLL65LLLLLLLLLLL .",
+". LLLLLLLLLLLLLLL44LLLLLLLLLLL .",
+". LLLLLLLLLLLLLLL44LLLLLLLLLLL .",
+". LLLL444fLLLC44a44LLLd444LLLL .",
+". LLL444444Lh444444LL444444LLL .",
+". LL44DLL44L44LLN44Ln47LLB44LL .",
+". LL44LLLLLL44LLL44L44qspi44LL .",
+"X LL44LLLLLB4tLLL44L44444444LL .",
+"X LL44LLLLpS44LLL44L44LLLLLLLL X",
+"X LL44GLL44L44LLK44Lr40LLJ44LL X",
+"X LLL444444Ln444444LL444444LLL X",
+"X LLLL444aLLLS44er7LLLe444LLLL X",
+"X.LLLLLLLLLLLLLLLLLLLLLLLLLLLL X",
+"o LLLLLLLLLLL42LLLLL. vLLL X",
+"X LLLLLLLLLLL4,LLLLLLLk LLLLLL o",
+"o LLLLLLnLLLL4,LLBLLLLc LLLLLL X",
+"o LLLM44444LL444444NLLc LLLLLL o",
+"o LLL4;LL44OL444LS41LLx LLLLLL X",
+"o LLL4FLLL4OL44bLLr4wLz LLLLLL o",
+"o HLLL44444-L4;LLLL4<Lz LLLLLL o",
+"o ALL4444V4;L4;LLLL42Lz LLLLLL o",
+"@ cL44>LLG4OL44yLL84mLz LLLLLL o",
+"@ kL44;Lj44OL443gu44LL@ LLLLLL o",
+"# oLL444444:L934444L LLLL +",
+"% LLLLLLLLLLLLLLLLLLLLLLLLLLL #",
+"= LLLLLLLLLLLLLLLLLLLLLLLLLL %",
+"x. +&=kk=*&%#$#####@oo. l",
+"PkoXX................ ...XXXXokP"
+};
diff --git a/kommander/editor/pics/large/newform.xpm b/kommander/editor/pics/large/newform.xpm
new file mode 100644
index 00000000..d8e9bc4b
--- /dev/null
+++ b/kommander/editor/pics/large/newform.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * newform_xpm[] = {
+"34 26 6 1",
+" c None",
+". c #FFFFFF",
+"+ c #000000",
+"@ c #0000FF",
+"# c #C0C0C0",
+"$ c #808080",
+"..................................",
+".+++++++++++++++++++++++++++++++..",
+".+@@@@@@@@@@@@@@@@@@@@@@@+#+#+#+$.",
+".+++++++++++++++++++++++++++++++$.",
+".+.............................+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+.$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$.",
+".+++++++++++++++++++++++++++++++$.",
+"..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.",
+".................................."};
diff --git a/kommander/editor/pics/large/ordertool.xpm b/kommander/editor/pics/large/ordertool.xpm
new file mode 100644
index 00000000..71c05d6d
--- /dev/null
+++ b/kommander/editor/pics/large/ordertool.xpm
@@ -0,0 +1,157 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 119 2",
+" c Gray0",
+". c Gray3",
+"X c #101010101010",
+"o c #181818181818",
+"O c Gray13",
+"+ c Gray16",
+"@ c #313131313131",
+"# c #393939393939",
+"$ c Gray26",
+"% c Gray29",
+"& c Gray32",
+"* c #5a5a5a5a5a5a",
+"= c Gray39",
+"- c Gray42",
+"; c Gray45",
+": c #7b7b7b7b7b7b",
+"> c #29293131adad",
+", c #29293131b5b5",
+"< c #31313131adad",
+"1 c #31313939a5a5",
+"2 c #31313939adad",
+"3 c #31313939b5b5",
+"4 c #31313939bdbd",
+"5 c #393942429c9c",
+"6 c #39394242a5a5",
+"7 c #39394242ffff",
+"8 c #39394a4affff",
+"9 c #424242429c9c",
+"0 c #525252529c9c",
+"q c #42424242a5a5",
+"w c #42424a4aa5a5",
+"e c #42424a4aadad",
+"r c #4a4a4a4ab5b5",
+"t c #4a4a4a4abdbd",
+"y c #4a4a5252adad",
+"u c #4a4a5252b5b5",
+"i c #52525252a5a5",
+"p c #52525a5aa5a5",
+"a c #52525a5aadad",
+"s c #5a5a5a5aa5a5",
+"d c #52525252b5b5",
+"f c #52525a5ab5b5",
+"g c #52525a5abdbd",
+"h c #5a5a6363adad",
+"j c #5a5a6363b5b5",
+"k c #63636363bdbd",
+"l c #63636b6bbdbd",
+"z c #6b6b6b6bb5b5",
+"x c #7b7b7b7bb5b5",
+"c c #4a4a5252dede",
+"v c #42424a4affff",
+"b c #4a4a5252e7e7",
+"n c #4a4a5a5aefef",
+"m c #42425252ffff",
+"M c #4a4a5252ffff",
+"N c #4a4a5a5affff",
+"B c #52525a5aefef",
+"V c #52525a5af7f7",
+"C c #52525a5affff",
+"Z c #5a5a6363c6c6",
+"A c #52526363efef",
+"S c #5a5a6363efef",
+"D c #52526363f7f7",
+"F c #52526363ffff",
+"G c #5a5a6363f7f7",
+"H c #5a5a6363ffff",
+"J c #5a5a6b6bffff",
+"K c #63636b6bdede",
+"L c #7b7b7b7bcece",
+"P c #7b7b7b7bd6d6",
+"I c #63636b6befef",
+"U c #63636b6bffff",
+"Y c #63637373ffff",
+"T c #6b6b7373ffff",
+"R c #6b6b7b7bffff",
+"E c #73737b7bffff",
+"W c #7b7b8484bdbd",
+"Q c #7b7b8484c6c6",
+"! c #7b7b8484cece",
+"~ c #73738484dede",
+"^ c #7b7b8484e7e7",
+"/ c #73738484ffff",
+"( c #7b7b8484ffff",
+") c #7b7b8c8cffff",
+"_ c #848484848484",
+"` c Gray55",
+"' c #84848c8c9c9c",
+"] c Gray58",
+"[ c Gray61",
+"{ c #84848484adad",
+"} c #84848c8ca5a5",
+"| c #8c8c8c8cadad",
+" . c #84848484bdbd",
+".. c #84848c8cbdbd",
+"X. c #8c8c8c8cb5b5",
+"o. c #9c9c9c9cb5b5",
+"O. c #a5a5a5a5a5a5",
+"+. c #a5a5a5a5adad",
+"@. c Gray68",
+"#. c #a5a5a5a5b5b5",
+"$. c #adadadadb5b5",
+"%. c #adadadadbdbd",
+"&. c Gray71",
+"*. c #b5b5b5b5bdbd",
+"=. c Gray74",
+"-. c #84848484c6c6",
+";. c #84848c8cffff",
+":. c #84849494ffff",
+">. c #8c8c9494ffff",
+",. c #8c8c9c9cffff",
+"<. c #94949c9cffff",
+"1. c #9494a5a5ffff",
+"2. c #9c9ca5a5ffff",
+"3. c #bdbdbdbdc6c6",
+"4. c #a5a5adadffff",
+"5. c #a5a5b5b5ffff",
+"6. c #c0c0c0c0c0c0",
+"7. c #c6c6c6c6c6c6",
+"8. c None",
+/* pixels */
+"8.8.@.+ X =.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.",
+"8.O.+ . &.8.8.8.8.8.8.8.8.$.-.! L P P P P P P P P ! L ! W #.8.",
+"[ X . &.8.8.8.8.8.8.8.*.^ 5.1.2.1.2.1.1.2.1.1.<.,.>.;.E t 8.",
+"` . . &.8.8.8.8.8.8.8.&.S >.) ( ) ( ( / / / E / E R T H 3 8.",
+"=.O._ . &.8.8.8.8.8.8.8.$.G ;.E R R T T T T T T Y Y U U C 4 8.",
+"8.8.` . &.8.8.8.8.8.8.8.%.S ) E T T T Y T Y Y Y U U U J N , 8.",
+"8.8.` . &.8.8.8.8.8.8.8.$.S ( R T Y Y Y U U U U U U J H N , 8.",
+"8.8.] . &.8.8.8.8.8.8.8.$.B E Y Y U H U U J U J H H H F M < 8.",
+"8.8.&.. . &.8.8.8.8.8.8.8.*.c H C M m m v m v m v v m v m 8 1 8.",
+"8.8.=.& % =.8.8.8.8.8.8.8.=.| h h s s 0 0 0 0 0 0 0 p s s s ' 8.",
+"8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.7.=.=.7.=.7.=.=.7.=.7.3.=.8.8.8.",
+"8.] $ @ # ; =.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.",
+"[ . = 8.8.8.8.8.8.8.%.X... . .Q Q .Q .Q . . ...X.#.8.",
+"% O ] # o =.8.8.8.8.8.=.~ 4.<.1.1.<.1.<.1.<.,.,.>.:.) T u 8.",
+"- O ; 8.- X =.8.8.8.8.8.$.I :.) ( ( ( ( / / E ( / E R T H 3 8.",
+"8.=.8._ * 8.8.8.8.8.8.$.G ( R T T Y Y U T Y U U U U H N 2 8.",
+"8.8.: + &.8.8.8.8.8.8.%.A ( T Y Y U U U Y U U U J J H M > 8.",
+"8.- $ =.8.8.8.8.8.8.8.$.D / T U Y U U U J J J U J H F m < 8.",
+"` . & = - =.8.8.8.8.8.$.B R U U J J J J H H H H H H C m 1 8.",
+"o . &.8.8.8.8.8.&.b H C N M v M M m M m v m v m 7 6 8.",
+"$ @ # @ # @ % =.8.8.8.8.8.7.{ j a y w q 6 5 5 5 q 6 w w e y } 8.",
+"8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.7.=.=.=.=.=.=.=.=.=.=.=.8.8.8.",
+"8.O.& $ * O.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.",
+"@.o . [ 8.8.8.8.8.8.8.o.l l k Z Z Z Z Z Z Z Z k k z z +.8.",
+"% O = X - 8.8.8.8.8.8.=.K ) ( ( ( ( ( ( ( ( / E R R Y V i 8.",
+"= o - O.o - 8.8.8.8.8.8.$.I ,.;.;.;.:.) ) ;.) ) ;.( / R J q 8.",
+"8.8.$ _ 8.8.8.8.8.8.$.S / T Y Y U Y U J U U U J H H M 1 8.",
+"8.8.= o # 8.8.8.8.8.8.$.D E Y U U U U J U J J H H H F v 1 8.",
+"_ & ] 8.= . &.8.8.8.8.8.%.B R U U J J J H H H H H H H C 8 6 8.",
+"@ @ [ % o =.8.8.8.8.8.$.n T J J H H H H H F H F F C C v 5 8.",
+": - 8.8.8.8.8.8.&.b F C M M m m M m M m M m m m 7 9 8.",
+"8.; O X O = =.8.8.8.8.8.8.=.x g f u y y y e w e e e r u d u } 8."
+};
diff --git a/kommander/editor/pics/large/pixlabel.xpm b/kommander/editor/pics/large/pixlabel.xpm
new file mode 100644
index 00000000..96c69bf4
--- /dev/null
+++ b/kommander/editor/pics/large/pixlabel.xpm
@@ -0,0 +1,204 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 166 2",
+" c #000008084a4a",
+". c #b5b5b5b5d6d6",
+"X c #c6c6bdbdd6d6",
+"o c #bdbdb5b5d6d6",
+"O c #c6c6c6c6d6d6",
+"+ c #cecec6c6d6d6",
+"@ c #d6d6ceced6d6",
+"# c #cecececed6d6",
+"$ c #b5b5adadd6d6",
+"% c #d6d6cecedede",
+"& c #bdbdbdbdd6d6",
+"* c #adadadadd6d6",
+"= c #a5a5a5a5d6d6",
+"- c #bdbdbdbdcece",
+"; c #c6c6bdbdcece",
+": c #adada5a5d6d6",
+"> c #c6c6c6c6cece",
+", c #b5b5a5a5d6d6",
+"< c #deded6d6d6d6",
+"1 c #dedececed6d6",
+"2 c #d6d6c6c6d6d6",
+"3 c #ceceb5b5dede",
+"4 c #efefd6d6dede",
+"5 c #9c9c9c9cd6d6",
+"6 c #f7f7d6d6dede",
+"7 c #f7f7cecee7e7",
+"8 c #ffffdededede",
+"9 c #e7e7cecedede",
+"0 c #ffffdedee7e7",
+"q c #ffffefefefef",
+"w c #fffff7f7efef",
+"e c #dedececedede",
+"r c #ffffe7e7efef",
+"t c Gray100",
+"y c #ffffefefffff",
+"u c #cecec6c6c6c6",
+"i c #c6c6c6c6c6c6",
+"p c #cecec6c6dede",
+"a c #adadb5b5b5b5",
+"s c #fffff7f7f7f7",
+"d c #f7f7deded6d6",
+"f c #bdbdadad7373",
+"g c #84848c8c3939",
+"h c #7b7b8c8c4242",
+"j c #9c9ca5a58c8c",
+"k c #adadb5b5adad",
+"l c #8c8c9c9c6b6b",
+"z c #73738c8c4a4a",
+"x c #848494947373",
+"c c #848494946b6b",
+"v c #6b6b84843131",
+"b c #636373733131",
+"n c #fffffffff7f7",
+"m c #ffffefefb5b5",
+"M c #cecea5a54a4a",
+"N c #8c8c84842929",
+"B c #7b7b84843131",
+"V c #6b6b7b7b2929",
+"C c #636373732929",
+"Z c #5a5a6b6b2121",
+"A c #5a5a73732121",
+"S c #5a5a7b7b2121",
+"D c #5a5a7b7b2929",
+"F c #cecebdbddede",
+"G c #fffff7f7bdbd",
+"H c #f7f7bdbd4a4a",
+"J c #b5b58c8c3939",
+"K c #73737b7b3131",
+"L c #6b6b7b7b3131",
+"P c #5a5a73732929",
+"I c #5a5a6b6b2929",
+"U c #bdbdbdbddede",
+"Y c #b5b5b5b5dede",
+"T c #adada5a5dede",
+"R c #bdbdadaddede",
+"E c #d6d6b5b5e7e7",
+"W c #e7e7adad6b6b",
+"Q c #bdbd84843939",
+"! c #8c8c73733131",
+"~ c #737373733131",
+"^ c #525263632929",
+"/ c #52526b6b2929",
+"( c #94949c9c9494",
+") c #8c8c9c9c7373",
+"_ c #a5a5adad9c9c",
+"` c #bdbdb5b5bdbd",
+"' c #cecebdbdadad",
+"] c #dedebdbdadad",
+"[ c #94947b7b3131",
+"{ c #7b7b73733131",
+"} c #6b6b6b6b2929",
+"| c #63636b6b2929",
+" . c #63637b7b2929",
+".. c #7b7b8c8c6363",
+"X. c #63637b7b2121",
+"o. c #73738c8c3131",
+"O. c #8c8c9c9c5252",
+"+. c #848494944242",
+"@. c #7b7b8c8c3939",
+"#. c #7b7b7b7b3131",
+"$. c #73736b6b2929",
+"%. c #9c9ca5a59c9c",
+"&. c #6b6b7b7b5252",
+"*. c #6b6b8c8c3131",
+"=. c #7b7b94943131",
+"-. c #7b7b94943939",
+";. c #7b7b8c8c3131",
+":. c #6b6b73732929",
+">. c #52526b6b2121",
+",. c #4a4a63631818",
+"<. c #525263632121",
+"1. c #5a5a6b6b3131",
+"2. c #4a4a63632121",
+"3. c #4a4a5a5a3939",
+"4. c #4a4a5a5a2929",
+"5. c #737384843131",
+"6. c #4a4a5a5a2121",
+"7. c #42424a4a3939",
+"8. c #42424a4a3131",
+"9. c #424252522929",
+"0. c #5a5a63633131",
+"q. c #52525a5a3939",
+"w. c #5a5a63633939",
+"e. c #52525a5a3131",
+"r. c #4a4a52522929",
+"t. c #393942422929",
+"y. c #313139392121",
+"u. c #292931312121",
+"i. c #292929291818",
+"p. c #292939391818",
+"a. c #313139391818",
+"s. c #39394a4a2121",
+"d. c #393942423939",
+"f. c #424242423939",
+"g. c #393942423131",
+"h. c #39394a4a3131",
+"j. c #39394a4a2929",
+"k. c #4a4a52523131",
+"l. c #5a5a5a5a3131",
+"z. c #42424a4a2929",
+"x. c #212129291818",
+"c. c #181821211818",
+"v. c #181821211010",
+"b. c #212121211818",
+"n. c #212131311818",
+"m. c #4a4a52523939",
+"M. c #393942422121",
+"N. c #52525a5a4a4a",
+"B. c #4a4a52524242",
+"V. c #4a4a5a5a4242",
+"C. c #525263634a4a",
+"Z. c #424252523131",
+"A. c #525263633939",
+"S. c #292931311818",
+"D. c #5a5a63634a4a",
+"F. c #424252523939",
+"G. c #525252523131",
+"H. c #5a5a63635252",
+"J. c #52525a5a4242",
+"K. c #424242422929",
+"L. c #101010101010",
+"P. c #5a5a6b6b5252",
+"I. c #525263634242",
+"U. c #5a5a63634242",
+"Y. c #5a5a6b6b4242",
+"T. c #63636b6b4242",
+/* pixels */
+" ",
+" ",
+" . X o O + o . + @ + # X X + + + + # X $ o o + # O o O % ",
+" . & . & & * & O O X X . * + + & X + + O O # # O $ = & X ",
+" # . * - . . ; * : . ; & X + + X + # # + O > @ > = * - - ",
+" O . > O - . - * . . & + X + @ @ + + # ; X - - O = * - . ",
+" O > & - O ; & > X > + o , + < 1 + + + & O . = ; * = & O ",
+" & > . * & > . = $ # 2 o 3 1 4 1 2 2 X $ $ : 5 - > * - # ",
+" & # > - - X & : . + 2 1 4 6 7 8 9 2 + ; & - X > O - & & ",
+" X O O O > > & > + X 1 9 0 q w 0 6 4 e 1 # # O # O O # & ",
+" - * * - & > O + + X 1 6 r t t y r 6 u i p p X ; & & - a ",
+" * = . - $ & X > + 2 e 8 s t t t d f g h j k l z x c v b ",
+" X - > O ; - O @ @ 1 < 0 n t t m M N B V V C Z A A S b D ",
+" . . - & & > X . X 1 F 9 s t G H J g K L C P I I P P b v ",
+" = 5 5 > X U Y T $ + R E r s W Q ! ~ L C I I ^ / I P P b ",
+" . . 5 * - ( ) _ ; ; ` ' ' ] [ { { } | I I I I P I P P . ",
+" p O . . ..A X.o.O.+.@.K #.{ $.$.} | I I I P C C P P D b ",
+" %...c &.A .v *.o.=.-.;.:.| | | :.L C C P P b b b .D b ",
+" I >.,.<.P b b v o.-.-.g -.:.C K L L b C I I P P D 1.P b ",
+" <.2.2./ / P .b v v o.-.-.@.@.;.v .P I / / / / I P P P ",
+" 3.4.<.2.<./ P .b b *.o.o.5.v b 1.^ ^ <.6.<.<.^ / P P P ",
+" 7.8.9.9.6.<./ I P b 1.0.q.w.w.e.r.t.y.u.i.u.p.a.s.4./ I ",
+" 7.d.f.g.h.h.j.8.8.8.8.k.e.e.l.w.k.z.y.u.u.x.x.c.v.b.n.y. ",
+" f.d.7.7.7.7.7.g.h.8.m.q.w.w.w.w.k.k.t.M.y.u.x.x.x.x.c.b. ",
+" N.B.B.V.C.B.7.g.g.8.Z.k.q.A.w.A.e.z.j.t.y.u.u.u.u.S.S.n. ",
+" D.C.C.V.F.g.g.g.g.g.8.8.k.G.k.r.z.M.y.y.u.n.x.x.x.c.c.x. ",
+" H.C.J.V.m.F.m.F.k.8.8.8.k.k.k.z.t.K.t.y.b.v.x.x.v.L.a.b ",
+" P.P.H.C.J.N.I.J.A.q.m.k.k.k.z.K.z.z.K.t.y.x.c.v.L.S.D v ",
+" P.H.D.N.D.D.D.D.U.U.Y.w.e.k.k.k.k.k.z.y.x.u.i.c.x.P b D ",
+" D.D.C.J.V.J.V.3.A.U.T.T.U.k.r.k.q.k.Z.k.t.y.y.M.P .D C ",
+" ",
+" "
+};
diff --git a/kommander/editor/pics/large/pointer.xpm b/kommander/editor/pics/large/pointer.xpm
new file mode 100644
index 00000000..57af144d
--- /dev/null
+++ b/kommander/editor/pics/large/pointer.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * pointer_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . ",
+" .. ",
+" ... ",
+" .... ",
+" ..... ",
+" ...... ",
+" ....... ",
+" ..... ",
+" ..... ",
+" . ... ",
+" ... ",
+" ... ",
+" ... ",
+" ",
+" ",
+" ",
+" "};
diff --git a/kommander/editor/pics/large/print.xpm b/kommander/editor/pics/large/print.xpm
new file mode 100644
index 00000000..c412d1b2
--- /dev/null
+++ b/kommander/editor/pics/large/print.xpm
@@ -0,0 +1,155 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 117 2",
+" c Gray0",
+". c #000000000808",
+"X c #080800000808",
+"o c Gray3",
+"O c #080808081010",
+"+ c #101008081010",
+"@ c #101010101010",
+"# c #101010101818",
+"$ c #181818181818",
+"% c #181818182121",
+"& c #212118182121",
+"* c Gray13",
+"= c #212121212929",
+"- c #292921212929",
+"; c Gray16",
+": c #292929293131",
+"> c #313129293131",
+", c #313131313131",
+"< c #313131313939",
+"1 c #393931313939",
+"2 c #393939393939",
+"3 c #393939394242",
+"4 c #424239394242",
+"5 c Gray26",
+"6 c #424242424a4a",
+"7 c #4a4a42424a4a",
+"8 c Gray29",
+"9 c #4a4a4a4a5252",
+"0 c #52524a4a5252",
+"q c Gray32",
+"w c #525252525a5a",
+"e c #5a5a5a5a5a5a",
+"r c #5a5a5a5a6363",
+"t c #63635a5a6363",
+"y c Gray39",
+"u c #636363636b6b",
+"i c #6b6b63636b6b",
+"p c Gray42",
+"a c #6b6b6b6b7373",
+"s c #73736b6b7373",
+"d c Gray45",
+"f c #737373737b7b",
+"g c #7b7b73738484",
+"h c #7b7b7b7b8484",
+"j c Green",
+"k c #1818ffff1010",
+"l c #3131ffff3131",
+"z c #3939ffff4242",
+"x c #4a4affff4a4a",
+"c c #7b7bffff7b7b",
+"v c #7b7befef8484",
+"b c #84847b7b8484",
+"n c #84847b7b8c8c",
+"m c #848484848484",
+"M c #848484848c8c",
+"N c #8c8c84848c8c",
+"B c Gray55",
+"V c #8c8c84849494",
+"C c #8c8c8c8c9494",
+"Z c #94948c8c9494",
+"A c #94948c8c9c9c",
+"S c Gray58",
+"D c #949494949c9c",
+"F c #9c9c94949c9c",
+"G c Gray61",
+"H c #9c9c9494a5a5",
+"J c #9c9c9c9ca5a5",
+"K c #8c8cbdbd9494",
+"L c #9c9cbdbd9c9c",
+"P c #a5a59c9ca5a5",
+"I c #a5a59c9cadad",
+"U c #a5a5a5a5a5a5",
+"Y c #a5a5a5a5adad",
+"T c #adada5a5adad",
+"R c Gray68",
+"E c #adada5a5b5b5",
+"W c #adadadadb5b5",
+"Q c #b5b5adadb5b5",
+"! c #b5b5adadbdbd",
+"~ c Gray71",
+"^ c #b5b5b5b5bdbd",
+"/ c #bdbdb5b5bdbd",
+"( c Gray74",
+") c #bdbdb5b5c6c6",
+"_ c #bdbdbdbdc6c6",
+"` c #8c8cffff8c8c",
+"' c #a5a5ffffa5a5",
+"] c #bdbdffffbdbd",
+"[ c #c6c6b5b5c6c6",
+"{ c #c6c6b5b5cece",
+"} c #c6c6bdbdc6c6",
+"| c #c6c6bdbdcece",
+" . c #c0c0c0c0c0c0",
+".. c #c6c6c6c6c6c6",
+"X. c #c6c6c6c6cece",
+"o. c #cecec6c6cece",
+"O. c #cececececece",
+"+. c #cecec6c6d6d6",
+"@. c #cecececed6d6",
+"#. c #d6d6ceced6d6",
+"$. c #d6d6cecedede",
+"%. c Gray84",
+"&. c #d6d6d6d6dede",
+"*. c #deded6d6dede",
+"=. c Gray87",
+"-. c #deded6d6e7e7",
+";. c #cecef7f7cece",
+":. c #d6d6ffffd6d6",
+">. c #e7e7e7e7e7e7",
+",. c #efefefefefef",
+"<. c #e7e7ffffe7e7",
+"1. c #f7f7efeff7f7",
+"2. c Gray97",
+"3. c #f7f7f7f7ffff",
+"4. c #fffff7f7ffff",
+"5. c Gray100",
+"6. c None",
+/* pixels */
+"6.6.6.6.6.6.6.6.6.( U ( O.O.%.%.%.O.O.....( ( ~ ~ 6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6...O.%.O.O...............O.O...R 6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6.~ ,.2.5.2.5.5.5.5.5.5.5.5.5.2...6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6.( ~ ( ~ ~ ( ~ ( ~ ~ ~ ~ R R R ( 6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6.........O.O.O.O.%.%.%.%.%.%...( 6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6.R ~ R R ~ R R R U U U G G G S ( 6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6.R ( ..( ( ( ( ( ( ( ( ( ....( 6.6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6...O.O.%.%.%.%.%.%.%.%.%.%.%.( 6.6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6.U U U U G U U G U U R R R ~ U 6.6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6.R O...........O.O.O...O.O.O.R 6.6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6...%.%.%.O.O.O.........( ( ~ ~ 6.6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.6.R U U U U R R R ~ ~ ~ ~ ( ( ~ 6.6.6.6.6.6.6.6.",
+"6.6.6.6.6.6.6.6.~ ( 2.,.,.,.>.>.>.>.=.=.=.%.=.G U U ( 6.6.6.6.6.",
+"6.6.6.6.6.6.6.U s ( 2.,.,.2.2.2.2.2.2.2.2.2.5.F r r 7 m 6.6.6.6.",
+"6.6.6.6.6.( S a u f m m m M m M m m B S G G U f t 6 - & y ~ 6.6.",
+"6.6.6.6.( D N M b b b h b h b h b b h b n n b i 5 ; = % $ 4 R 6.",
+"6.6.6.( S } -.&.$.#.+.+.@.+.o.o.X._ { _ K L ) D 9 = & * & # q 6.",
+"6.6.( S | 3.5.5.5.5.5.5.5.5.5.5.5.5.<.z j j v [ n 2 * & % @ & 6.",
+"6.6.G @.4.5.5.5.5.5.5.5.5.5.5.5.5.5.c k x j z $.E a : * $ X % 6.",
+"6.G &.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.] l l j ' 4.>.I w & O X % 6.",
+"6.I 1.,.,.,.,.1.3.5.4.5.5.5.5.5.5.5.5.:.` ;.4.2.3.*.h & . X $ 6.",
+"6.N / _ ) ! Q ^ ^ / / ) _ X.o.| } } } { { / W E Y F u @ X o $ 6.",
+"6.N W ! Q W E T T Y Y I Y P I U I I Y P P P J F Z M t # . X $ 6.",
+"6.M W Q W T Y Y Y P I P P I J I J P J P J H H F D n t # X X $ 6.",
+"6.M T E T Y P P J I J P J P J J P J J H G F F D V b r @ X . & 6.",
+"6.C P Y I J P J P J J J J G H G H F H F H F D Z M g t $ . y 6.",
+"6.C J J P J J H J F H F F H F H F G F F D D Z C N h t $ = R 6.",
+"6.B P I J H J F F F F F F F F D F D D D D A Z C N b t # X B 6.6.",
+"6.F b C B C Z C V C V V C N V C C Z Z Z Z A Z C N n t O p 6.6.6.",
+"6.^ d - - : > , < 1 2 3 3 4 5 6 7 7 9 9 0 q w 0 0 6 > e ( 6.6.6.",
+"6.6.6.G 7 O X O O + O X o O + o O O + O O o O . o d ( 6.6.6.6.",
+"6.6.6.6.( B e q q 9 8 7 5 5 3 4 2 , < ; & & % $ , D 6.6.6.6.6.6."
+};
diff --git a/kommander/editor/pics/large/progress.xpm b/kommander/editor/pics/large/progress.xpm
new file mode 100644
index 00000000..924ef598
--- /dev/null
+++ b/kommander/editor/pics/large/progress.xpm
@@ -0,0 +1,145 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 107 2",
+" c #000000002929",
+". c #000008082929",
+"X c #080808082929",
+"o c #000000003131",
+"O c #000008083131",
+"+ c #000008083939",
+"@ c #080808083131",
+"# c #080808083939",
+"$ c #080810103131",
+"% c #080810103939",
+"& c #101010103131",
+"* c #101010103939",
+"= c #101018183131",
+"- c #101018183939",
+"; c #181818183939",
+": c #181821213939",
+"> c #101010104242",
+", c #101018184242",
+"< c #181818184242",
+"1 c #181818184a4a",
+"2 c #181821214242",
+"3 c #212121214a4a",
+"4 c #212129294a4a",
+"5 c #212121215252",
+"6 c #212129295252",
+"7 c #292929295252",
+"8 c #292931314a4a",
+"9 c #313131314a4a",
+"0 c #313131315252",
+"q c #393939395a5a",
+"w c #313139396363",
+"e c #393939396363",
+"r c #393942426363",
+"t c #393942426b6b",
+"y c #424242425252",
+"u c #424242426363",
+"i c #424242426b6b",
+"p c #42424a4a6363",
+"a c #4a4a52526363",
+"s c #4a4a52526b6b",
+"d c #525252527373",
+"f c #52525a5a7b7b",
+"g c #10101010cece",
+"h c #10101010d6d6",
+"j c #10101818dede",
+"k c #00000000e7e7",
+"l c #08080808f7f7",
+"z c #08081010f7f7",
+"x c #08081010ffff",
+"c c #10101818efef",
+"v c #18181818e7e7",
+"b c #18181818f7f7",
+"n c #18181818ffff",
+"m c #18182121ffff",
+"M c #21212121e7e7",
+"N c #21212121efef",
+"B c #21212929efef",
+"V c #21212929f7f7",
+"C c #21212929ffff",
+"Z c #29292929f7f7",
+"A c #29293131ffff",
+"S c #5a5a63638484",
+"D c #42424242ffff",
+"F c #42424a4affff",
+"G c #4a4a5252ffff",
+"H c #7b7b8c8cb5b5",
+"J c #94949c9c9c9c",
+"K c Gray61",
+"L c #8c8c9494a5a5",
+"P c #9c9ca5a5adad",
+"I c #a5a5a5a5a5a5",
+"U c #a5a5a5a5adad",
+"Y c #84848c8ccece",
+"T c #84848c8cd6d6",
+"R c #84849494c6c6",
+"E c #8c8c9494cece",
+"W c #8c8c9494d6d6",
+"Q c #94949494dede",
+"! c #9494a5a5cece",
+"~ c #9c9ca5a5d6d6",
+"^ c #9c9cadadd6d6",
+"/ c #adadbdbdc6c6",
+"( c #adadb5b5dede",
+") c #adadbdbddede",
+"_ c #a5a5adade7e7",
+"` c #adadbdbde7e7",
+"' c #b5b5c6c6c6c6",
+"] c #b5b5c6c6cece",
+"[ c #bdbdc6c6cece",
+"{ c #bdbdcececece",
+"} c #b5b5c6c6e7e7",
+"| c #bdbdcecee7e7",
+" . c #bdbdceceefef",
+".. c #bdbdd6d6efef",
+"X. c #c0c0c0c0c0c0",
+"o. c #cecededeefef",
+"O. c #cecee7e7efef",
+"+. c #d6d6efeff7f7",
+"@. c #e7e7efeff7f7",
+"#. c #e7e7f7f7f7f7",
+"$. c #e7e7fffff7f7",
+"%. c #e7e7ffffffff",
+"&. c #efeff7f7f7f7",
+"*. c #efeff7f7ffff",
+"=. c #efefffffffff",
+"-. c #f7f7ffffffff",
+";. c None",
+/* pixels */
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+"U s q 7 5 3 1 < % # # % * # > # , > > > , > , > % * > > < 3 u I ",
+"q o $ = : - : : : < : : : ; : : : ; ; ; ; - ; ; * - & O o q ",
+"1 9 H E R ' ~ E E [ ! T E { ! Y E { { { { { { { { { { ' s 4 ",
+", . d D A M ( G C M } G C V .F n V +.$.#.#.$.#.#.$.#.$.-.P o 2 ",
+"* . f m x h ^ C l j ) A l v } C l v o.#.#.#.#.#.#.#.#.#.%./ o < ",
+"> X f C l h ^ A l j ) Z l v ) C l v O.$.#.+.#.+.#.#.+.#.=./ O < ",
+"> S V z h ! A z h ) A z j } Z z j o.#.#.#.#.#.+.#.#.#.=.] @ ; ",
+"* X S n z h ! A l h ) Z l v ) Z l v o.$.#.+.#.#.#.#.#.#.=.[ O < ",
+"% X S C z g ^ C l h ) Z z j } V l j O.#.#.#.#.+.#.#.+.$.=.] O < ",
+"* O S b z h ^ Z z h ) Z z j } V l M o.$.#.+.#.#.#.#.#.#.=.[ O ; ",
+"* X f V z g ! A z h ) Z l j } V l j o.$.#.#.#.$.+.#.#.#.=.] # - ",
+"> X f b z h ^ V l h ) Z l j } V l v O.$.#.#.#.#.#.$.#.#.=.[ O ; ",
+"* . f c k g ) N k g | B k j ..N k j +.&.%.$.$.%.$.#.$.%.-.' o < ",
+"> a E W ^ @._ Q ( *.` Q ( *.` Q ( *.=.=.=.=.#.=.%.#.#.&.L o 2 ",
+"8 o + 0 p p r s s s i s s s u s s s i r u r r t r e e w 6 + o 9 ",
+"J y 8 ; ; * & @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ & @ & & ; ; ; 8 y K ",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.",
+";.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;."
+};
diff --git a/kommander/editor/pics/large/project.xpm b/kommander/editor/pics/large/project.xpm
new file mode 100644
index 00000000..68040ba4
--- /dev/null
+++ b/kommander/editor/pics/large/project.xpm
@@ -0,0 +1,50 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 12 1",
+" c Gray0",
+". c Gray19",
+"X c #585858",
+"o c #ffa858",
+"O c #808080",
+"+ c #a0a0a4",
+"@ c #ffdca8",
+"# c #c0c0c0",
+"$ c gainsboro",
+"% c #ffffc0",
+"& c Gray100",
+"* c None",
+/* pixels */
+"********************************",
+"*************** **************",
+"************** #&# *************",
+"************** $&$ *************",
+"******* ***. ### .*** .******",
+"****** $&# X O$&&&$O X #&$ *****",
+"***** +$$++$&#OXXXO#&$$+$$+ ****",
+"***** X#+$&+XXOO+OOXX+&$+#X ****",
+"***** XX#$OXOoooo@oo+XO$#XX ****",
+"****** $OX+oo@o@o@@o+XO$ *****",
+"****** $+O+oo@o@@@@%@@+X+$ *****",
+"**X O$O+oo@@@X.X@@%@o+O#O X*",
+"** $&$+$Ooo@o@X.+.X@@%@oO$+$&$ *",
+"* #$$#+$Oo@@%@O#*#O@%@%oO&+#&$# ",
+"* +$$$+$+oo%@%@O.O@%&%@o+$+$$$+ ",
+"* .OO+X#$Oo@%@%@@@&&%%@O#$X+OO. ",
+"** XXX.O##Oo@%%%&&&%%@O+&+.XXX *",
+"*** +$+Oo@%%%&%@@O#$# **",
+"****** OO#$#O+o@@@o++$&#OO *****",
+"***** X#+O#$&#+OOO+$&$#O+#O ****",
+"*****.$&$+OO#$$$$&$$#+O+$&$ ****",
+"**** $$&&$O.XO+$$$+OX.O$$&$$.***",
+"**** +$$+OX ..OOOOO.. XO+$$+ ***",
+"**** X+OOX **.#$$$#.** XOO+X ***",
+"***** XX *** O$&&O *** XX ****",
+"****** ***** O$&$O ***** *****",
+"************** +++ *************",
+"************** XXX *************",
+"*************** **************",
+"********************************",
+"********************************",
+"********************************"
+};
diff --git a/kommander/editor/pics/large/pushbutton.xpm b/kommander/editor/pics/large/pushbutton.xpm
new file mode 100644
index 00000000..5ad0bcd4
--- /dev/null
+++ b/kommander/editor/pics/large/pushbutton.xpm
@@ -0,0 +1,72 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 34 1",
+" c #070707070707",
+". c #0e0e0e0e0e0e",
+"X c Gray9",
+"o c Gray12",
+"O c #272727272727",
+"+ c #2f2f2f2f2f2f",
+"@ c #373737373737",
+"# c #3f3f3f3f3f3f",
+"$ c #464646464646",
+"% c Gray31",
+"& c Gray34",
+"* c #5f5f5f5f5f5f",
+"= c #676767676767",
+"- c #6f6f6f6f6f6f",
+"; c #777777777777",
+": c Gray50",
+"> c Gray53",
+", c Gray56",
+"< c #979797979797",
+"1 c #9f9f9f9f9f9f",
+"2 c #a7a7a7a7a7a7",
+"3 c #afafafafafaf",
+"4 c #b7b7b7b7b7b7",
+"5 c Gray75",
+"6 c #c0c0c0c0c0c0",
+"7 c #c5c5c5c5c5c5",
+"8 c Gray81",
+"9 c Gray84",
+"0 c #dfdfdfdfdfdf",
+"q c #e7e7e7e7e7e7",
+"w c #efefefefefef",
+"e c #f6f6f6f6f6f6",
+"r c Gray100",
+"t c None",
+/* pixels */
+"tttttttttttttttttttttttttttttttt",
+"tttttttttttttttttttttttttttttttt",
+"tttttttttttttttttttttttttttttttt",
+"tttttttttttttttttttttttttttttttt",
+"tt5332332323333323222223211235tt",
+"t48qqwwwwqwqqqq00000999887743<2t",
+"47rreewwwweewwqqq0009987554321-3",
+"17q97555444444455433332222111<-;",
+"145533333333222222221211211<<,-*",
+"<34322221:;>12111<,<11111>><<,-*",
+",333222:o o-111- -2111# &1<,;&",
+"123222= o*;=O &21- =111# &<<,>;%",
+"13222> O<2121@ :2- =21% %1<<,,-$",
+"<2323% ;21<11> $3- =2* $1<<<,>;%",
+"13222@ <1<1<11Oo1- -; @1<<<<,>;%",
+"<2221oX<11<1<1#.1- $. %1<<<,,>;%",
+"<2221Xo<1<<<11# <- +# ;1<<,,>-%",
+"<2221O <<1<1<1+X1- o,,XX,<<<,>;%",
+",2222$ :2<<<1,.@2- *21= %1<,,>-%",
+",2211> O<1111% -2- *1<1+ -1,,>;$",
+"122112* +:,:$ @<1- *1<<> X><,>-%",
+"<121<<1= #<<1- &1<<1& +,,>-%",
+"<1111<<1>*%&:<<<<>=:<,,<,==,,>=&",
+"<12<<<<,<<1<<,<,,<<<,,<,,<<,>>*&",
+"1,1<<<,,,,,,,,,>,>,,,,,,,,,,>>&-",
+"4:,,,>,>,>>:>:>::>::::>>>:>>>-#1",
+"t<====-=========*=====*===*&&$;5",
+"tt2:*%$####@@@@@#@@@#@##$$%*;1tt",
+"tttttttttttttttttttttttttttttttt",
+"tttttttttttttttttttttttttttttttt",
+"tttttttttttttttttttttttttttttttt",
+"tttttttttttttttttttttttttttttttt"
+};
diff --git a/kommander/editor/pics/large/radiobutton.xpm b/kommander/editor/pics/large/radiobutton.xpm
new file mode 100644
index 00000000..17ef6339
--- /dev/null
+++ b/kommander/editor/pics/large/radiobutton.xpm
@@ -0,0 +1,67 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 29 1",
+" c #2a2a2a2a2a2a",
+". c #373737373737",
+"X c #3f3f3f3f3f3f",
+"o c Gray28",
+"O c Gray31",
+"+ c Gray34",
+"@ c #5f5f5f5f5f5f",
+"# c Gray40",
+"$ c Gray43",
+"% c #777777777777",
+"& c Gray50",
+"* c Gray53",
+"= c #8e8e8e8e8e8e",
+"- c #979797979797",
+"; c #989898989898",
+": c #a4a4a4a4a4a4",
+"> c #afafafafafaf",
+", c #b4b4b4b4b4b4",
+"< c Gray75",
+"1 c #c0c0c0c0c0c0",
+"2 c #c6c6c6c6c6c6",
+"3 c Gray81",
+"4 c #d7d7d7d7d7d7",
+"5 c #dfdfdfdfdfdf",
+"6 c #e2e2e2e2e2e2",
+"7 c #efefefefefef",
+"8 c Gray96",
+"9 c Gray100",
+"0 c None",
+/* pixels */
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"000000000000>=%###*>000000000000",
+"0000000000,*+O@%%#oo%,0000000000",
+"000000000,#.%489996:o+>000000000",
+"00000000,#X<94:*%=,96#O,00000000",
+"00000000&X<9:#+O++O#58@$00000000",
+"0000000>X*9-+++++O+o+73X:0000000",
+"0000000&o5<+++++O+O+X*9*%0000000",
+"0000000@$9%++++O+OOOoo8<+0000000",
+"0000000o=7@+O+OOOOOOOX45o0000000",
+"0000000X-6@O+OOOOOOoo.36O0000000",
+"0000000O*8+OOOOOOOOOo.75+0000000",
+"0000000%@9*oOOOOOooo.@9>#0000000",
+"0000000:.25XoOOoooOX 39$-0000000",
+"0000000<##9<X.oooo :9,@<0000000",
+"00000000>o=94$X. .@394O:00000000",
+"000000000:o*79733799<O;000000000",
+"0000000000>@O-3774>$O:0000000000",
+"00000000000<;$OOOO@-<00000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000",
+"00000000000000000000000000000000"
+};
diff --git a/kommander/editor/pics/large/redo.xpm b/kommander/editor/pics/large/redo.xpm
new file mode 100644
index 00000000..1ee1f563
--- /dev/null
+++ b/kommander/editor/pics/large/redo.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 4 1",
+" c #000000008080",
+". c #808080808080",
+"X c #c0c0c0c0c0c0",
+"o c None",
+/* pixels */
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"ooooooo. ooooooooooooooo",
+"oooooo. ooooooooo oooo",
+"ooooo. ooooooo ooooooo oooo",
+"oooo. ooooooooo oooo oooo",
+"oooo ooooooooooo oo oooo",
+"oooo oooooooooooooo oooo",
+"oooo ooooooooooooooo oooo",
+"oooo ooooooooooooooo oooo",
+"oooo oooooooooooooo oooo",
+"oooo ooooooooooooo oooo",
+"oooo. ooooooooooo oooo",
+"ooooo. ooooooooo oooo",
+"oooooo .ooooooooooooooooooooooo",
+"ooooooo .oooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo"
+};
diff --git a/kommander/editor/pics/large/right.xpm b/kommander/editor/pics/large/right.xpm
new file mode 100644
index 00000000..a8410132
--- /dev/null
+++ b/kommander/editor/pics/large/right.xpm
@@ -0,0 +1,181 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 143 2",
+" c #00001818e7e7",
+". c #00001818efef",
+"X c #00001818ffff",
+"o c #10102121d6d6",
+"O c #10102121dede",
+"+ c #10102929d6d6",
+"@ c #18183131cece",
+"# c #00002121efef",
+"$ c #00002121ffff",
+"% c #00002929ffff",
+"& c #08082929ffff",
+"* c #08083131ffff",
+"= c #10102929e7e7",
+"- c #10103939f7f7",
+"; c #10103939ffff",
+": c #21213131c6c6",
+"> c #21213131cece",
+", c #21213939dede",
+"< c #29293939dede",
+"1 c #31314242bdbd",
+"2 c #10104242ffff",
+"3 c #18184242ffff",
+"4 c #21214242dede",
+"5 c #39394a4ac6c6",
+"6 c #39395252d6d6",
+"7 c #21214242e7e7",
+"8 c #21214a4aefef",
+"9 c #29294a4ae7e7",
+"0 c #21214a4affff",
+"q c #21215252ffff",
+"w c #29295252ffff",
+"e c #29295a5affff",
+"r c #39395a5ae7e7",
+"t c #31315a5affff",
+"y c #31316363ffff",
+"u c #39396363f7f7",
+"i c #39396363ffff",
+"p c #39396b6bffff",
+"a c #42424a4ab5b5",
+"s c #42425252b5b5",
+"d c #52525a5abdbd",
+"f c #52526b6bbdbd",
+"g c #5a5a6363bdbd",
+"h c #5a5a6b6bbdbd",
+"j c #63636b6bb5b5",
+"k c #63636b6bbdbd",
+"l c #6b6b7373b5b5",
+"z c #6b6b7373bdbd",
+"x c #73737b7bb5b5",
+"c c #42425a5acece",
+"v c #4a4a6363cece",
+"b c #42426363dede",
+"n c #4a4a7373dede",
+"m c #52526b6bc6c6",
+"M c #52526b6bcece",
+"N c #42426b6be7e7",
+"B c #42426b6befef",
+"V c #4a4a6b6be7e7",
+"C c #42426b6bffff",
+"Z c #42427373ffff",
+"A c #4a4a7373ffff",
+"S c #4a4a7b7bffff",
+"D c #52527b7be7e7",
+"F c #5a5a7b7bf7f7",
+"G c #7b7b8484b5b5",
+"H c #7b7b8c8cbdbd",
+"J c #52528484ffff",
+"K c #52528c8cffff",
+"L c #5a5a8484ffff",
+"P c #5a5a8c8cffff",
+"I c #73738484cece",
+"U c #7b7b9494c6c6",
+"Y c #73739494dede",
+"T c #7b7b9494d6d6",
+"R c #63638484efef",
+"E c #63638c8cffff",
+"W c #63639494ffff",
+"Q c #63639c9cffff",
+"! c #6b6b9c9cffff",
+"~ c #73738c8ce7e7",
+"^ c #73739494efef",
+"/ c #73739c9cf7f7",
+"( c #73739c9cffff",
+") c #7373a5a5ffff",
+"_ c #7b7ba5a5ffff",
+"` c #7b7badadffff",
+"' c #7b7bb5b5ffff",
+"] c #84848c8ca5a5",
+"[ c #84848c8cadad",
+"{ c #8c8c8c8cadad",
+"} c #84849494b5b5",
+"| c #94949494a5a5",
+" . c #94949494adad",
+".. c #94949c9cadad",
+"X. c #9c9c9c9cadad",
+"o. c #9c9ca5a5adad",
+"O. c #a5a5a5a5a5a5",
+"+. c #a5a5a5a5adad",
+"@. c Gray68",
+"#. c #a5a5a5a5b5b5",
+"$. c #a5a5adadb5b5",
+"%. c #adadadadb5b5",
+"&. c #adadadadbdbd",
+"*. c Gray71",
+"=. c #b5b5b5b5bdbd",
+"-. c Gray74",
+";. c #84849c9cd6d6",
+":. c #8c8ca5a5cece",
+">. c #8484adadffff",
+",. c #8484b5b5ffff",
+"<. c #8484bdbdffff",
+"1. c #8c8cb5b5ffff",
+"2. c #8c8cbdbdffff",
+"3. c #9494adade7e7",
+"4. c #b5b5b5b5c6c6",
+"5. c #b5b5bdbdc6c6",
+"6. c #bdbdbdbdc6c6",
+"7. c #9494c6c6ffff",
+"8. c #9494ceceffff",
+"9. c #9c9cc6c6ffff",
+"0. c #9c9cceceffff",
+"q. c #a5a5ceceffff",
+"w. c #a5a5d6d6ffff",
+"e. c #adaddedeffff",
+"r. c #b5b5dedeffff",
+"t. c #bdbddedeffff",
+"y. c #adade7e7ffff",
+"u. c #b5b5efefffff",
+"i. c #bdbde7e7ffff",
+"p. c #bdbdefefffff",
+"a. c #c0c0c0c0c0c0",
+"s. c #cecee7e7ffff",
+"d. c #c6c6f7f7ffff",
+"f. c #cecef7f7ffff",
+"g. c #ceceffffffff",
+"h. c #d6d6efefffff",
+"j. c #dedeefefffff",
+"k. c #d6d6f7f7ffff",
+"l. c #d6d6ffffffff",
+"z. c #e7e7ffffffff",
+"x. c #efefffffffff",
+"c. c #f7f7ffffffff",
+"v. c None",
+/* pixels */
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.-.Y N x -.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.O.j.r.p k %.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.X.h.l.0.Z v &.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.O.r.e.w.0.Q 8 x v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.o.e.8.0.w.0.W q [ -.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.o.7.7.7.7.0.0.) u z =.v.v.v.v.",
+"v.v.-.4.5.-.-.v.v.v.v.v.v.v.v.v.v.X.,.2.7.2.7.0.0.' Z c $.v.v.v.",
+"@.} ~ F D n M I H .4.-.-.v.v.v.#.m ` 2.1.2.2.7.7.7.<.p 4 #.v.v.",
+"f q.c.x.z.h.t.q.1._ ^ Y U T ;.:.3.1.,.,.,.,.1.,.1.2.7.>.Z 9 o.-.",
+"N y.g.d.p.i.r.p.d.d.f.k.k.k.j.x.x.s.>.` ,.,.,.,.,.,.,.2.2.K - { ",
+"B 0.u.w.0.0.0.7.9.0.7.0.w.e.e.e.0.2.,.,.` >.,.,.,.` ` ` ` _ y c ",
+"V 8.e.0.7.2.2.2.2.2.<.1.,.,.,.,.,.,.,.` >.' >.` ` ` ) ) ! ! Z 9 ",
+"V 2.w.7.1.,.>.` ` ` _ ` ` ` ` ` ` ` ` ` ` ` ` ` _ ) ! E J C 3 , ",
+"b ' 0.2.` ` ` ) ) ( ) ( ! ! ! ! ( ` >.` ` ` ` ) ) ! W S p 0 X 5 ",
+"6 Q ,.) W E L J S Z C y w 3 3 3 e L ` _ ` ` _ ) ! W J e 3 $ + .",
+"l q Z t 0 2 * $ $ # # O > 1 a a = ; ) ` ) ) ( ! W Z 0 * X + #.v.",
+"*.k = # O > a d G | &.-.-.-.-.#.s Q _ ) ! ! W A 0 * X o ] v.v.",
+"v.v.+.| ..=.-.-.v.v.v.v.v.v.v.v.v.+./ ( ! W P y 3 & X 5 #.-.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.-.^ P L J y ; % . s *.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.-.R J S t ; $ X g -.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.6.D i e ; % = j *.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.-.r ; * X @ +.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.-.7 $ X : X.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.-.h < h %.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.",
+"v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v."
+};
diff --git a/kommander/editor/pics/large/slider.xpm b/kommander/editor/pics/large/slider.xpm
new file mode 100644
index 00000000..9941817b
--- /dev/null
+++ b/kommander/editor/pics/large/slider.xpm
@@ -0,0 +1,133 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 95 2",
+" c #060606060202",
+". c #000000000d0d",
+"X c #0f0f0e0e0000",
+"o c Gray6",
+"O c #000000001717",
+"+ c #1c1c1c1c0e0e",
+"@ c #151515151515",
+"# c #010101012b2b",
+"$ c #000000003434",
+"% c #000000003a3a",
+"& c #121214143e3e",
+"* c #212121211414",
+"= c #262626261d1d",
+"- c #2d2d2d2d2222",
+"; c #373737372e2e",
+": c #353535353535",
+"> c Gray23",
+", c #010101015353",
+"< c #000000006767",
+"1 c #020202026e6e",
+"2 c #000000007f7f",
+"3 c #434343434343",
+"4 c #434344444a4a",
+"5 c #4c4c4b4b4545",
+"6 c Gray33",
+"7 c #6e6e6d6d6767",
+"8 c #000000008484",
+"9 c #000000008e8e",
+"0 c #000000009292",
+"q c #000000009f9f",
+"w c #00000000a4a4",
+"e c #00000000acac",
+"r c #03030303b7b7",
+"t c #00000000c6c6",
+"y c #00000000cece",
+"u c #00000000d7d7",
+"i c #00000000dfdf",
+"p c #09090d0ddada",
+"a c #0c0c1111dcdc",
+"s c #1b1b1d1dc1c1",
+"d c #1a1a1b1bd6d6",
+"f c #01010101e1e1",
+"g c #01010101e8e8",
+"h c #06060909e0e0",
+"j c #00000000f2f2",
+"k c #05050606fdfd",
+"l c #07070909ffff",
+"z c #09090c0cffff",
+"x c #0e0e1313ffff",
+"c c #14141d1de0e0",
+"v c #13131515ffff",
+"b c #1b1b1f1fffff",
+"n c #1d1d2b2beaea",
+"m c #15152323ffff",
+"M c #1c1c2323ffff",
+"N c #37373838e6e6",
+"B c #35353636ffff",
+"V c #3d3d4d4dcbcb",
+"C c #39394f4fd6d6",
+"Z c #28284141eded",
+"A c #3a3a5353ffff",
+"S c #45454f4f8d8d",
+"D c #54545c5c8080",
+"F c #5e5e67678080",
+"G c #61616a6a8585",
+"H c #59597373caca",
+"J c #4b4b6b6beded",
+"K c #46466161f1f1",
+"L c #45456767ffff",
+"P c #52526c6cf1f1",
+"I c #50506f6fffff",
+"U c #52527272ffff",
+"Y c Gray52",
+"T c Gray56",
+"R c Gray58",
+"E c #9d9d9d9d9d9d",
+"W c #90909797b8b8",
+"Q c #afafafafafaf",
+"! c #b7b7b7b7b7b7",
+"~ c #bebebebebebe",
+"^ c #84849a9ad4d4",
+"/ c #8d8d9898ffff",
+"( c #bfbfc7c7e4e4",
+") c #c0c0c0c0c0c0",
+"_ c #c5c5c5c5c5c5",
+"` c Gray81",
+"' c #d0d0d0d0d0d0",
+"] c #c0c0c4c4ffff",
+"[ c #c9c9d0d0ffff",
+"{ c #d6d6ddddffff",
+"} c #dadae2e2ffff",
+"| c #e6e6e6e6e6e6",
+" . c Gray95",
+".. c Gray100",
+"X. c None",
+/* pixels */
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"E W ^ H P P P P U P L K I J J J C C J P P K P P K A Z A Z C H R ",
+"H m k k z z z z z k k k k k k k k k k k k k k k k k k k k k k s ",
+"N k k k k k f w 0 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 w i k k k k k s ",
+"c k k k k k , & k k k k k p ",
+"n k k k k k $ o @ @ @ @ @ @ o o o o o o o o o 4 b k k k k p ",
+"n k k k k k $ T ~ ` ` ` ` ` ! | . . .| . . .| .B k k k k f ",
+"Z k k k e j # = ` ! ! ! Q Q Q R T .................B r t k k p ",
+"d k g , . g $ ; _ Q Q Q Q Q ! T T ................B 1 . w k h ",
+"c t # O g # ; ` Q Q Q Q Q Q R 6 ................B 2 2 y ",
+"d < O g $ ; _ ! Q Q Q E ! T 5 ................B 2 1 ",
+"n k 2 j % - _ Q Q Q Q Q Q R 3 ................B 2 , t ",
+"N k k r % g , * ~ Q Q Q Q Q Q R > ................B 2 O q k h ",
+"J k k k j k , + ! E E R R R E Y : ................B f i k k a ",
+"V k k k k k , @ ' 3 @ @ @ @ o . > ................B k k k k p ",
+"s k k k k k 1 X ..7 5 ................M k k k k p ",
+"V k k k k k p S [ ( F F F F D D D W } } { { { [ ] / l k k k k s ",
+"G k k k k k k x k x M b M M b b b v z z z z l k k k k k k k k s ",
+"E s s u p p f p p p p p p p p p p p p p p p p p p y y y s s s G ",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.",
+"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
+};
diff --git a/kommander/editor/pics/large/spacer.xpm b/kommander/editor/pics/large/spacer.xpm
new file mode 100644
index 00000000..cd4ec08e
--- /dev/null
+++ b/kommander/editor/pics/large/spacer.xpm
@@ -0,0 +1,248 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 210 2",
+" c Gray0",
+". c #080800000000",
+"X c #101000000000",
+"o c #101008080808",
+"O c #181800000000",
+"+ c #181808080000",
+"@ c #181808080808",
+"# c #101010100808",
+"$ c #181810101010",
+"% c #212108080000",
+"& c #212108080808",
+"* c #292900000000",
+"= c #292908080808",
+"- c #212110100808",
+"; c #292910100808",
+": c #212110101010",
+"> c #212118181818",
+", c #292910101010",
+"< c #292918181010",
+"1 c #292918181818",
+"2 c #313108080000",
+"3 c #393908080000",
+"4 c #313110101010",
+"5 c #313118181010",
+"6 c #313118181818",
+"7 c #393921211818",
+"8 c Gray16",
+"9 c #313121212121",
+"0 c #313129292929",
+"q c #393921212121",
+"w c #393929292929",
+"e c #424208080000",
+"r c #4a4a08080000",
+"t c #5a5a08080000",
+"y c #5a5a10100000",
+"u c #424221211818",
+"i c #424229292121",
+"p c #424229292929",
+"a c #4a4a29292929",
+"s c #424231313131",
+"d c #424239393939",
+"f c #4a4a39393939",
+"g c #525231313131",
+"h c #525239393131",
+"j c #525239393939",
+"k c #636318180808",
+"l c #6b6b10100000",
+"z c #737310100000",
+"x c #737318180808",
+"c c #7b7b18180808",
+"v c #7b7b31312121",
+"b c #636342423939",
+"n c #6b6b4a4a3131",
+"m c #737342422929",
+"M c Gray26",
+"N c Gray29",
+"B c #525242424242",
+"V c #52524a4a4a4a",
+"C c #5a5a42424242",
+"Z c #5a5a5a5a5a5a",
+"A c #636342424242",
+"S c #63634a4a4242",
+"D c #6b6b4a4a4a4a",
+"F c #636352524a4a",
+"G c #6b6b52524242",
+"H c #6b6b5a5a4a4a",
+"J c #63635a5a5a5a",
+"K c #6b6b52525252",
+"L c #737352524a4a",
+"P c #73735a5a4a4a",
+"I c #7b7b52524242",
+"U c #73735a5a5252",
+"Y c #6b6b63634a4a",
+"T c #7b7b63635a5a",
+"R c Gray39",
+"E c #6b6b63636363",
+"W c Gray42",
+"Q c #7b7b6b6b6b6b",
+"! c Gray45",
+"~ c #7b7b73737373",
+"^ c #848410100000",
+"/ c #848418180808",
+"( c #8c8c18180808",
+") c #949418180808",
+"_ c #8c8c21211010",
+"` c #8c8c29291818",
+"' c #949421211010",
+"] c #949429291818",
+"[ c #949431311818",
+"{ c #8c8c39392929",
+"} c #949439392929",
+"| c #a5a521210808",
+" . c #adad21210808",
+".. c #a5a529291010",
+"X. c #b5b521210808",
+"o. c #b5b529291010",
+"O. c #b5b531311818",
+"+. c #bdbd31311818",
+"@. c #b5b539392121",
+"#. c #8c8c42422929",
+"$. c #84844a4a3131",
+"%. c #b5b542422929",
+"&. c #b5b54a4a3131",
+"*. c #b5b552523939",
+"=. c #b5b55a5a3939",
+"-. c #bdbd52523131",
+";. c #94944a4a4242",
+":. c #9c9c52524242",
+">. c #9c9c63635a5a",
+",. c #84846b6b6363",
+"<. c #8c8c6b6b6363",
+"1. c #949473736b6b",
+"2. c #949473737373",
+"3. c #9c9c7b7b7373",
+"4. c #9c9c7b7b7b7b",
+"5. c #b5b563635a5a",
+"6. c #b5b573736363",
+"7. c #c6c621210808",
+"8. c #cece39391818",
+"9. c #d6d629291010",
+"0. c #d6d631311010",
+"q. c #dede31311010",
+"w. c #f7f739391818",
+"e. c #ffff39391010",
+"r. c #e7e739392121",
+"t. c #c6c642422121",
+"y. c #dede42422929",
+"u. c #ffff42422121",
+"i. c #ffff4a4a2121",
+"p. c #ffff52522929",
+"a. c #ffff5a5a3939",
+"s. c #ffff63633131",
+"d. c #ffff63633939",
+"f. c #c6c663635252",
+"g. c #d6d663634a4a",
+"h. c #d6d66b6b5252",
+"j. c #efef63634a4a",
+"k. c #e7e76b6b5252",
+"l. c #efef6b6b5252",
+"z. c #e7e773735a5a",
+"x. c #ffff63634242",
+"c. c #ffff73734a4a",
+"v. c #ffff7b7b4a4a",
+"b. c #efef7b7b6363",
+"n. c #9c9c84847b7b",
+"m. c #cece84847373",
+"M. c #d6d684846b6b",
+"N. c #dede84846b6b",
+"B. c #d6d684847373",
+"V. c #dede94947373",
+"C. c #ffff84845a5a",
+"Z. c #ffff8c8c5a5a",
+"A. c #efef8c8c6b6b",
+"S. c #e7e79c9c7b7b",
+"D. c #ffff8c8c6b6b",
+"F. c #f7f794947373",
+"G. c #848484848484",
+"H. c #8c8c84848484",
+"J. c Gray55",
+"K. c Gray58",
+"L. c #9c9c94949494",
+"P. c Gray61",
+"I. c #a5a584848484",
+"U. c #a5a58c8c8484",
+"Y. c #a5a58c8c8c8c",
+"T. c #adad8c8c8c8c",
+"R. c #a5a59c9c9c9c",
+"E. c #b5b594948c8c",
+"W. c #b5b594949494",
+"Q. c #bdbd9c9c9494",
+"!. c #a5a5a5a5a5a5",
+"~. c Gray68",
+"^. c #b5b5adada5a5",
+"/. c #b5b5adadadad",
+"(. c #bdbdadada5a5",
+"). c #b5b5b5b5adad",
+"_. c #bdbdb5b5adad",
+"`. c Gray71",
+"'. c #bdbdb5b5b5b5",
+"]. c Gray74",
+"[. c #c6c68c8c8484",
+"{. c #ceceadada5a5",
+"}. c #dedebdbdb5b5",
+"|. c #e7e7a5a58484",
+" X c #e7e7bdbd9c9c",
+".X c #efefb5b59494",
+"XX c #f7f7a5a58484",
+"oX c #f7f7adad8c8c",
+"OX c #ffffadad8484",
+"+X c #ffffbdbd8c8c",
+"@X c #f7f7bdbd9c9c",
+"#X c #f7f7c6c69c9c",
+"$X c #ffffc6c69c9c",
+"%X c #efefc6c6a5a5",
+"&X c #f7f7ceceadad",
+"*X c #ffffd6d6a5a5",
+"=X c #ffffd6d6adad",
+"-X c #f7f7d6d6b5b5",
+";X c #f7f7dedebdbd",
+":X c #ffffdedeb5b5",
+">X c #ffffe7e7b5b5",
+",X c #ffffe7e7bdbd",
+"<X c #c0c0c0c0c0c0",
+"1X c #c6c6c6c6c6c6",
+"2X c #f7f7efefc6c6",
+"3X c #f7f7f7f7cece",
+"4X c #fffff7f7c6c6",
+"5X c #ffffffffd6d6",
+"6X c #ffffffffdede",
+"7X c None",
+/* pixels */
+"7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X",
+"7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X",
+"7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X",
+"7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X",
+"/.y.+.L.7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XT.0.r.(.",
+"[.e.X.E 7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X>.q.e.[.",
+"m.i...N 1X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X].;.0.i.B.",
+"N.d.[ w ].7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X].{ 8.s.M.",
+"V.Z.#.> ].7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X].` t.v.V.",
+"|.OX$.$ '.7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X_._ -.F.S.",
+" X*XI o `.7X^.H.K.].7X7X7X7X7X!.K.).7X7X7X7X7X7X!.!.7X`.( -.+X.X",
+";X4XP o `.R.p & X V ].7X7X7XH.q % $ P.7X7X7X].Q 5 + R ^.' *.*X%X",
+"3X5XH @ L.j 5 . R 1X7XR.i - . > `.7X7XH.u & . D ' =.:X&X",
+"3X6XY o C L : . . . . ~.].K b + . . ! 7X`.C g . . O ^ =.>X-X",
+"2X5XH . T Q.< X + & X W !.1.4.& . + O > ].H.3.T X X + . t *.=X&X",
+"-X,XG X Q.I.X ! B S <.1 B {.,.o M 5 T i W F }.U X @ h C y &.$X@X",
+"#X$Xn 4 <.q > ].K.S 3.& a 2.< d `.s E.A X D 4.- Z W T W.k %.OXoX",
+"XXOXm , q . W 7X].w = % i q . K.7X~ 4 ; = h 7 X ~.`.6 p e %.D.F.",
+"A.C.m X X o ~.7X7XH.O & ; . 0 ].7X`.< O ; , . Z 7X7XJ X 2 @.c.b.",
+"z.x.v G.7X7X7X].M X . # ~.7X7X7XJ.X X . 8 `.7X7X`.8 * O.a.l.",
+"k.p.` H.7X7X7X7X7X'.~ R !.7X7X7X7X1XJ.V R `.7X7X7X7XR.y +.i.j.",
+"h.u./ o /.7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X^.' o.w.g.",
+"6.q./ o ~.7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X_._ .9.f.",
+"6.7.x @ `.7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X`.' ..X.5.",
+"4.| l : ].7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X].] ) ) 1.",
+"Y.z y 9 ].7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X].} c z n.",
+"!.e 3 f ].7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X1X:.r 3 L.",
+"].s > ~ 7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7XU.p f `.",
+"7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X",
+"7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X",
+"7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X",
+"7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X7X"
+};
diff --git a/kommander/editor/pics/large/spinbox.xpm b/kommander/editor/pics/large/spinbox.xpm
new file mode 100644
index 00000000..b79f32f4
--- /dev/null
+++ b/kommander/editor/pics/large/spinbox.xpm
@@ -0,0 +1,102 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 64 1",
+" c #000000002424",
+". c #0b0b0b0b3f3f",
+"X c #000000004141",
+"o c #000000005656",
+"O c #131316164c4c",
+"+ c #000000006363",
+"@ c #000000006f6f",
+"# c #08080c0c7070",
+"$ c #000000008787",
+"% c #000000008a8a",
+"& c #000000009595",
+"* c #000000009f9f",
+"= c #00000000a6a6",
+"- c #00000000aaaa",
+"; c #00000000b6b6",
+": c #17171f1fb4b4",
+"> c #27272e2e8484",
+", c #272730308181",
+"< c #00000000cece",
+"1 c #00000000d7d7",
+"2 c #00000000dada",
+"3 c #00000000e5e5",
+"4 c #00000000efef",
+"5 c #00000000f7f7",
+"6 c #00000606ffff",
+"7 c #00000c0cffff",
+"8 c #01011919ffff",
+"9 c #0f0f1b1bffff",
+"0 c #04042020ffff",
+"q c #0f0f2f2fffff",
+"w c #12122424ffff",
+"e c #16162c2cffff",
+"r c #1b1b3535ffff",
+"t c #1f1f3b3bffff",
+"y c #20203535e6e6",
+"u c #29293f3ff8f8",
+"i c #3e3e49498d8d",
+"p c #24244040ffff",
+"a c #2f2f4e4effff",
+"s c #2f2f5252ffff",
+"d c #30304f4fffff",
+"f c #37375151ffff",
+"g c #35355c5cffff",
+"h c #3e3e5858ffff",
+"j c #59596464b8b8",
+"k c #46466363ffff",
+"l c #4f4f6767ffff",
+"z c #57576b6be3e3",
+"x c #51516b6bffff",
+"c c #57577575ffff",
+"v c #59597676ffff",
+"b c #69697b7bc7c7",
+"n c #64647676e8e8",
+"m c #6d6d8686d8d8",
+"M c #75758181dada",
+"N c #72729090f5f5",
+"B c #7b7ba0a0ffff",
+"V c #9090bbbbffff",
+"C c #9d9dc4c4ffff",
+"Z c #aeaececefcfc",
+"A c #b4b4d3d3ffff",
+"S c #b8b8dbdbffff",
+"D c #c0c0c0c0c0c0",
+"F c None",
+/* pixels */
+"FFFFFFFFFFFFFFbMybFFFFFFFFFFFFFF",
+"FFFFFFFFFFFFFFbB4-bFFFFFFFFFFFFF",
+"FFFFFFFFFFFFFjZe75%FFFFFFFFFFFFF",
+"FFFFFFFFFFFFjAk7667,FFFFFFFFFFFF",
+"FFFFFFFFFFFbZN066664bFFFFFFFFFFF",
+"FFFFFFFFFFFbCt666665=FFFFFFFFFFF",
+"FFFFFFFFFFbSg76666665>FFFFFFFFFF",
+"FFFFFFFFFbAN8666666663jFFFFFFFFF",
+"FFFFFFFFFbVq6666666666;bFFFFFFFF",
+"FFFFFFFFjCa666666666665iFFFFFFFF",
+"FFFFFFFbNk6666666666666<jFFFFFFF",
+"FFFFFFFjm666666666666666$FFFFFFF",
+"FFFFFFjc96666666666666665iFFFFFF",
+"FFFFFF:966666666666666665#FFFFFF",
+"FFFFFFi$&****==--=****&%@,FFFFFF",
+"FFFFFFFbbjjjjjjjjjjjjjjbbFFFFFFF",
+"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
+"FFFFFFbbnzvxxvvvvxkhddyy:bFFFFFF",
+"FFFFFFilhfdddaasupprrww97#FFFFFF",
+"FFFFFFi666666666666666662OFFFFFF",
+"FFFFFFF*6666666666666666+bFFFFFF",
+"FFFFFFFj<66666666666666=iFFFFFFF",
+"FFFFFFFFi66666666666663 FFFFFFFF",
+"FFFFFFFFF;666666666666obFFFFFFFF",
+"FFFFFFFFFj16666666666-iFFFFFFFFF",
+"FFFFFFFFFFi6666666662.FFFFFFFFFF",
+"FFFFFFFFFFF:66666666.bFFFFFFFFFF",
+"FFFFFFFFFFFb1666666%iFFFFFFFFFFF",
+"FFFFFFFFFFFFi36666<.FFFFFFFFFFFF",
+"FFFFFFFFFFFFF>6664.bFFFFFFFFFFFF",
+"FFFFFFFFFFFFFF$66XbFFFFFFFFFFFFF",
+"FFFFFFFFFFFFFFb>OjFFFFFFFFFFFFFF"
+};
diff --git a/kommander/editor/pics/large/table.xpm b/kommander/editor/pics/large/table.xpm
new file mode 100644
index 00000000..c664d366
--- /dev/null
+++ b/kommander/editor/pics/large/table.xpm
@@ -0,0 +1,69 @@
+/* XPM */
+static char * table_xpm[] = {
+"32 32 34 1",
+" c None",
+". c #8C8C8C",
+"+ c #636363",
+"@ c #5A5A5A",
+"# c #4A4A4A",
+"$ c #424242",
+"% c #393939",
+"& c #292929",
+"* c #212121",
+"= c #313131",
+"- c #424239",
+"; c #423939",
+"> c #4A4239",
+", c #52524A",
+"' c #7B7B7B",
+") c #080808",
+"! c #101010",
+"~ c #101018",
+"{ c #213163",
+"] c #213173",
+"^ c #18297B",
+"/ c #10216B",
+"( c #081029",
+"_ c #000000",
+": c #BEC9D1",
+"< c #101852",
+"[ c #100808",
+"} c #080800",
+"| c #0019FF",
+"1 c #080810",
+"2 c #0098FF",
+"3 c #524A42",
+"4 c #525252",
+"5 c #181818",
+".++@##$$%%&&&&*****&*&&=%-;->,,'",
+"#)!=%%%%$$%$$$$$$$$$%%==!~{]^/(#",
+"#_:::::__::::::__:::::__::::::<$",
+"$_:::::__::::::__:::::__::::::[$",
+"$_:::::__::::::__:::::__::::::}$",
+"%_____________________________!%",
+"%!____________________________[%",
+"=)|||||__||||||__|||||__||||||1=",
+"&_|||||__||||||__|||||__||||||)=",
+"&_|||||__||||||__|||||__||||||)&",
+"&_|||||__||||||__|||||__||||||)*",
+"&_____________________________!*",
+"&!____________________________)*",
+"&)22222__222222__22222__222222)*",
+"*)22222__222222__22222__222222)*",
+"&)22222__222222__22222__222222_*",
+"*)22222__222222__22222__222222)*",
+"&______________________________*",
+"&)____________________________)*",
+"=)|||||__||||||__|||||__||||||_&",
+"%)|||||__||||||__|||||__||||||_=",
+"%_|||||__||||||__|||||__||||||_=",
+"%_|||||__||||||__|||||__||||||)%",
+"$______________________________%",
+"$______________________________$",
+"3_22222__222222__22222__222222_$",
+"#_22222__222222__22222__222222_$",
+"4_22222__222222__22222__222222_#",
+"@_22222__222222__22222__222222_@",
+"@)22222__222222__22222__222222_@",
+"+)))_)))!!)!!!!!!!)))__)!)_!)))@",
+".$#%%%==&**5*555555*5***&&==%%%."};
diff --git a/kommander/editor/pics/large/tabwidget.xpm b/kommander/editor/pics/large/tabwidget.xpm
new file mode 100644
index 00000000..3b9eb98b
--- /dev/null
+++ b/kommander/editor/pics/large/tabwidget.xpm
@@ -0,0 +1,94 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 56 1",
+" c #101010101818",
+". c #181818181818",
+"X c #181818182121",
+"o c Gray13",
+"O c #212121212929",
+"+ c Gray16",
+"@ c #292929293131",
+"# c #313131313131",
+"$ c #313131313939",
+"% c #393939393939",
+"& c #393939394242",
+"* c Gray26",
+"= c #424242424a4a",
+"- c Gray29",
+"; c #4a4a4a4a5252",
+": c Gray32",
+"> c #525252525a5a",
+", c #5a5a5a5a5a5a",
+"< c #5a5a5a5a6363",
+"1 c Gray39",
+"2 c #636363636b6b",
+"3 c Gray42",
+"4 c #6b6b6b6b7373",
+"5 c Gray45",
+"6 c #737373737b7b",
+"7 c #7b7b7b7b7b7b",
+"8 c #7b7b7b7b8484",
+"9 c #848484848484",
+"0 c #848484848c8c",
+"q c Gray55",
+"w c #8c8c8c8c9494",
+"e c Gray58",
+"r c #949494949c9c",
+"t c Gray61",
+"y c #9c9c9c9ca5a5",
+"u c #a5a5a5a5a5a5",
+"i c #a5a5a5a5adad",
+"p c Gray68",
+"a c #adadadadb5b5",
+"s c Gray71",
+"d c Gray74",
+"f c #bdbdbdbdc6c6",
+"g c #c0c0c0c0c0c0",
+"h c #c6c6c6c6c6c6",
+"j c #c6c6c6c6cece",
+"k c #cececececece",
+"l c #cecececed6d6",
+"z c Gray84",
+"x c #d6d6d6d6dede",
+"c c Gray87",
+"v c #dedededee7e7",
+"b c #e7e7e7e7e7e7",
+"n c #efefefefefef",
+"m c Gray97",
+"M c Gray100",
+"N c None",
+/* pixels */
+"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN",
+"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN",
+"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN",
+"NNNNdewqwe0qq5weq9076qq99wpNNNNN",
+"NNNduvcczzkkf:aclkje:zxkzi:sNNNN",
+"NNNpdztew00qw,%wq0wq&>wqwq*8NNNN",
+"NNftny00099896@,0889<+69891%sNNN",
+"NNssb0q0998888=#99896@*0886$9NNN",
+"Ndtna9998887781+,8787;+5877:&dNN",
+"Nsymw8988778776&#87782+*8872+qNN",
+"Ntbl89898877877<+:8776=+4776*&dN",
+"dwMp888877767685*$7877<O*876,+eN",
+"psme897788787777<#:6674*#5884%:f",
+"qzl988887777878885wpw752;:>,>=@e",
+"5di978787887888900tpdkvnbczzkt-&",
+"4yu9878777787878898880etupadft=*",
+"2ui08778787787878888988767766,@&",
+"1tiq8877878777878797878888886>#%",
+"<rie7878777878777877787777775:$%",
+"<tie9787878777778778777878772-$#",
+",eur887777676868676767676666<-##",
+",wyr077878787776776767676765,=##",
+"17ye977776766767676666666665>*#$",
+"84rw076767667676666676565654:&+*",
+"q1ew867666676666675656655562;&+;",
+"e:0q966777667676666665665652-%o1",
+"p&12111<<11<1<<1,<,1<<,<<,<:&$.7",
+"s$oXoOO+@+++++++@+++++++OO+Oo. w",
+"he351,:-=**&&%%%%%%$%$$%%**;,37d",
+"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN",
+"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN",
+"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN"
+};
diff --git a/kommander/editor/pics/large/textbrowser.xpm b/kommander/editor/pics/large/textbrowser.xpm
new file mode 100644
index 00000000..39b70cb5
--- /dev/null
+++ b/kommander/editor/pics/large/textbrowser.xpm
@@ -0,0 +1,196 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 158 2",
+" c Gray0",
+". c #000000000808",
+"X c Gray3",
+"o c #080808081010",
+"O c #080808081818",
+"+ c #101010101010",
+"@ c #101010101818",
+"# c #181818181818",
+"$ c #080808082121",
+"% c #101010102121",
+"& c #181818182121",
+"* c #181818182929",
+"= c Gray13",
+"- c #212121212929",
+"; c Gray16",
+": c #212121213131",
+"> c #292929293131",
+", c #292929293939",
+"< c #313131313131",
+"1 c #313131313939",
+"2 c #393939393939",
+"3 c #313131314242",
+"4 c #313131314a4a",
+"5 c #393939394242",
+"6 c Gray26",
+"7 c #424242424a4a",
+"8 c Gray29",
+"9 c #4a4a4a4a5252",
+"0 c #4a4a4a4a5a5a",
+"q c Gray32",
+"w c #525252525a5a",
+"e c #5a5a5a5a5a5a",
+"r c #525252526b6b",
+"t c #5a5a5a5a6363",
+"y c Gray39",
+"u c Gray42",
+"i c #636363637373",
+"p c #6b6b6b6b7373",
+"a c Gray45",
+"s c #7b7b7b7b7b7b",
+"d c #00000000efef",
+"f c Blue",
+"g c #08080808ffff",
+"h c #08081010ffff",
+"j c #10101010ffff",
+"k c #18181818f7f7",
+"l c #18181818ffff",
+"z c #21212121f7f7",
+"x c #21212929f7f7",
+"c c #29293131efef",
+"v c #29293131ffff",
+"b c #31313939e7e7",
+"n c #31313939efef",
+"m c #31313131f7f7",
+"M c #39393939f7f7",
+"N c #39393939ffff",
+"B c #39394242dede",
+"V c #31314242f7f7",
+"C c #39394a4affff",
+"Z c #7b7b7b7b8484",
+"A c #42424a4ad6d6",
+"S c #42424242f7f7",
+"D c #42424a4af7f7",
+"F c #4a4a5252e7e7",
+"G c #4a4a5252efef",
+"H c #42425252ffff",
+"J c #4a4a5a5affff",
+"K c #52525252efef",
+"L c #5a5a5a5aefef",
+"P c #52525a5af7f7",
+"I c #52526363ffff",
+"U c #5a5a6363f7f7",
+"Y c #5a5a6b6bffff",
+"T c #6b6b6b6bd6d6",
+"R c #6b6b6b6bdede",
+"E c #73737373d6d6",
+"W c #6b6b6b6be7e7",
+"Q c #6b6b6b6befef",
+"! c #6b6b6b6bf7f7",
+"~ c #6b6b7373efef",
+"^ c #6b6b7b7bffff",
+"/ c #7b7b7b7befef",
+"( c #73737373f7f7",
+") c #7b7b8484e7e7",
+"_ c #73738484ffff",
+"` c #7b7b8484f7f7",
+"' c #7b7b8484ffff",
+"] c #848484848484",
+"[ c #848484848c8c",
+"{ c Gray55",
+"} c #8c8c8c8c9494",
+"| c Gray58",
+" . c #949494949c9c",
+".. c Gray61",
+"X. c #9c9c9c9ca5a5",
+"o. c #a5a5a5a5a5a5",
+"O. c #a5a5a5a5adad",
+"+. c Gray68",
+"@. c #a5a5a5a5b5b5",
+"#. c #adadadadb5b5",
+"$. c Gray71",
+"%. c #b5b5b5b5bdbd",
+"&. c Gray74",
+"*. c #8c8c8c8ccece",
+"=. c #84848484d6d6",
+"-. c #8c8c8c8cd6d6",
+";. c #8c8c9494cece",
+":. c #94949494cece",
+">. c #84848484efef",
+",. c #8c8c8c8cefef",
+"<. c #84848c8cf7f7",
+"1. c #8c8c9494efef",
+"2. c #8c8c9494f7f7",
+"3. c #94949494efef",
+"4. c #9c9c9c9cefef",
+"5. c #94949c9cf7f7",
+"6. c #9c9ca5a5f7f7",
+"7. c #9c9ca5a5ffff",
+"8. c #a5a5a5a5d6d6",
+"9. c #bdbdbdbdc6c6",
+"0. c #bdbdbdbddede",
+"q. c #a5a5a5a5e7e7",
+"w. c #a5a5a5a5efef",
+"e. c #a5a5adadf7f7",
+"r. c #a5a5adadffff",
+"t. c #a5a5b5b5ffff",
+"y. c #adadb5b5f7f7",
+"u. c #b5b5b5b5e7e7",
+"i. c #bdbdbdbde7e7",
+"p. c #bdbdbdbdefef",
+"a. c #c0c0c0c0c0c0",
+"s. c #c6c6c6c6c6c6",
+"d. c #cececececece",
+"f. c #cecececedede",
+"g. c Gray84",
+"h. c #dedededed6d6",
+"j. c Gray87",
+"k. c #c6c6c6c6e7e7",
+"l. c #c6c6cecee7e7",
+"z. c #c6c6ceceefef",
+"x. c #c6c6ceceffff",
+"c. c #d6d6d6d6e7e7",
+"v. c #dedededee7e7",
+"b. c #dedededeefef",
+"n. c #e7e7e7e7dede",
+"m. c #efefefefdede",
+"M. c #f7f7f7f7dede",
+"N. c #e7e7e7e7e7e7",
+"B. c #e7e7e7e7efef",
+"V. c #efefe7e7e7e7",
+"C. c #efefefefe7e7",
+"Z. c #efefefefefef",
+"A. c #f7f7f7f7e7e7",
+"S. c #f7f7f7f7efef",
+"D. c Gray97",
+"F. c #fffffffff7f7",
+"G. c Gray100",
+"H. c None",
+/* pixels */
+"H.O.r 4 , - * % O O O O O O o O O O O o O O O O O @ - : 1 0 .&.",
+"o.$ . # - < 2 5 5 6 6 6 8 8 8 9 8 8 8 8 7 6 6 6 5 5 1 > - . { ",
+"0 ] d.d.g.g.g.g.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.h.g.g.h.g.O.& > ",
+": 1 g.{ +.N.N.N.N.N.j.j.j.j.N.j.j.j.N.j.j.j.n.j.v.N.C.%.s Z.Z @ ",
+"& t { { Z.j.j.j.j.N.N.N.j.j.N.j.N.j.N.N.n.v.N.n.N.j.< ; Z.+.O ",
+"@ u { | G.N.N.N.Z.Z.N.Z.Z.j.N.j.Z.D.N.j.v.N.Z.Z.N.Z.; < G.9.o ",
+"& 5 6 2 s j.N.N.o.e 6 y +.N.N.N.s u d.N.N.j.Z a d.u + + u | & ",
+"& ; # # 6 j.N.e = 8 # ] Z.N.a q Z.S.s e j.6 X 2 ] * ",
+"@ a | { D.Z.] u Z.Z.j.q &.Z.N.q +.9. 6 N.C.j.= 2 D.d.@ ",
+"@ a | ] D.N.2 X j.Z.N.Z.s. a Z.Z.g.# = ; # d.Z.N.v.# 2 D.s.% ",
+"@ a | ] Z.j.= < < < < < 8 N.N.Z.+. o.Z.N.N.n.# 2 D.d.@ ",
+"& a .. ] D.j.# + q q q q q e { j.N.Z... { Z.N.N.j.# 2 D.s.@ ",
+"- a .. s D.j.< # Z.D.Z.Z.Z.s.j.N.Z.s.+ 2 8 $.Z.N.j.+ 6 G.s.@ ",
+"- a +. a G.Z.u ] D.Z.D.{ ] Z.j.< X s.g.+ ; g.Z.j.= 2 G.9.# ",
+"- u s. # e g.j.= e | y = g.Z.u s Z.D.] q Z.N.2 8 [ - ",
+": y N.] ; # $.Z.g.u = X # y d.Z.d.6 e j.N.N.N.y 6 s.Z.+.6 ; p ; ",
+": y v.Z.j.j.N.N.N.Z.N.h.j.Z.N.N.j.N.N.N.j.N.N.N.N.j.N.Z.Z.D.$.* ",
+"> t j.n.N.N.n.n.m.N.N.N.C.m.N.n.N.n.C.m.M.m.m.A.C.C.N.N.N.D.$.* ",
+"1 e j.v.n.v.z.u.e.6.2.2.2.4.i.n.N.i.4.,./ ! ( / 3.i.N.n.N.D.#.- ",
+"1 q j.n.b.r.^ J C D D V V C H U M f f f f f f f f f M i.C.D.+.- ",
+"1 w j.B.7.b A E *.;.:.-.=.T b f f f z M G K G M z f f k d.F.o.> ",
+"5 q n.x.G *.n.m.C.C.C.C.m.M.L f h / n.n.N.m.V.n.v.u.K f W F.X.> ",
+"3 8 j.7.) n.N.j.N.j.N.N.N.N.m z I ` A.N.N.N.N.N.n.A.C.l S D.o.> ",
+"7 6 h.t.<.n.n.N.n.N.N.N.n.N.N n ! 1.M.n.N.N.n.N.M.C.w.f G F...> ",
+"9 5 g.y._ 3.c.v.N.N.n.N.N.C.( J v L p.l.v.c.c.k.4.P f f 4.F.} 1 ",
+"9 2 h.k.~ Y ^ 2.2.5.6.2.<.' J x d d f f g j g f f f f Q m.D.{ 5 ",
+"0 < d.m.0.R F D D D D V c c B *.>.M j f f f f j z K q.C.N.D.Z 5 ",
+"y - d.N.N.n.f.8.;.=.=.;.8.0.n.C.C.N.v.l.i.u.k.v.v.C.C.N.N.G.p 7 ",
+"p @ &.Z.N.N.N.C.A.C.A.S.A.C.N.N.C.N.C.C.C.A.C.C.N.C.N.N.Z.G.0 q ",
+"[ } G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.g.@ u ",
+"$.@ @ i | O.#.&.&.&.&.&.&.&.&.&.&.%.%.%.#.#.#.@.O.O. .[ p : o +.",
+"H.o.2 # O o o O o O o O O o O O O o O o @ O @ @ @ @ & - ; 7 o.H."
+};
diff --git a/kommander/editor/pics/large/textview.xpm b/kommander/editor/pics/large/textview.xpm
new file mode 100644
index 00000000..356f8bfe
--- /dev/null
+++ b/kommander/editor/pics/large/textview.xpm
@@ -0,0 +1,103 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 65 1",
+" c Gray0",
+". c Gray3",
+"X c #080808081010",
+"o c #080808081818",
+"O c #101010101010",
+"+ c #101010101818",
+"@ c #181818181818",
+"# c #181818182121",
+"$ c Gray13",
+"% c #212121212929",
+"& c Gray16",
+"* c #212121213131",
+"= c #292929293131",
+"- c #313131313131",
+"; c #313131313939",
+": c #393939393939",
+"> c #313131314242",
+", c #393939394242",
+"< c Gray26",
+"1 c #424242424a4a",
+"2 c #4a4a4a4a4242",
+"3 c Gray29",
+"4 c #4a4a4a4a5252",
+"5 c #525252524a4a",
+"6 c Gray32",
+"7 c #525252525a5a",
+"8 c #5a5a5a5a5a5a",
+"9 c #525252526363",
+"0 c #5a5a5a5a6363",
+"q c Gray39",
+"w c #636363636b6b",
+"e c Gray42",
+"r c #6b6b6b6b7373",
+"t c Gray45",
+"y c #7b7b7b7b7373",
+"u c #7b7b7b7b7b7b",
+"i c #7b7b7b7b8484",
+"p c #848484848484",
+"a c #848484848c8c",
+"s c Gray55",
+"d c #8c8c8c8c9494",
+"f c #949494948c8c",
+"g c Gray58",
+"h c #949494949c9c",
+"j c Gray61",
+"k c #9c9c9c9ca5a5",
+"l c #a5a5a5a5a5a5",
+"z c #a5a5a5a5adad",
+"x c Gray68",
+"c c #adadadadb5b5",
+"v c Gray71",
+"b c #b5b5b5b5bdbd",
+"n c Gray74",
+"m c #c0c0c0c0c0c0",
+"M c #c6c6c6c6c6c6",
+"N c #cececececece",
+"B c #cecececed6d6",
+"V c Gray84",
+"C c Gray87",
+"Z c #e7e7e7e7e7e7",
+"A c #efefefefefef",
+"S c #f7f7f7f7efef",
+"D c Gray97",
+"F c Gray100",
+"G c None",
+/* pixels */
+"Gz9>=%#+oXXXXXXXXXXXXXXXo+$%;4gn",
+"lo +$--::,<<<2333321<<<<:;-&#. a",
+"4 uNNNBNVVVVVVVVVVVVVVVVVVNVNl@=",
+"*-NplZCCCCCCCCCCCCCCVCCCCCZvyZuO",
+"#7s sZCCCVCCVCVCVCVCCCCCCCV&&AkX",
+"Oes sDCCCZZZZZCCCZACCCCZACA&-FbO",
+"+:: :uVCCj8:qlZCCueMCCCutMeOOes@",
+"#&@ @<VZ8 $3@ uZZt 6ZAu 8V: .-p#",
+"Ors pAZp qZZV3.vZC3 xn :CZC@:DM+",
+"+rf pAC:.VZCAM eAZN@$&OMZCC@:AM+",
+"+eg uAV$ ----- 3CCAl jACCC@-AM+",
+"#eg uAV@O666668pCCZj pACCCO<An+",
+"$tj uAC&@ZAZZZMVCZM.:< vACVO<Dn+",
+"$el tDZe pAAAp uAV-.MNO$VZC@:Dn@",
+"%en @8NV$ 8sq $NZe tAAp 6ZC: 3p$",
+"%qCp&@vZNe$.@8MAM<6CCCCq:MZx<&r&",
+"%8CZVVCCZZCVVAZCVCZCCCCZCCCZZAc#",
+"=8CCCCCCCCCCCCCCCCCCCCCCCCCCCSx#",
+"-6VCCCCCCCCCCCCCCCCCCCCCCCCCCAx%",
+";6VCCCCCCCCCCCCCCCCCCCCCCCCCZAl%",
+";5VCCCCCCCCCCCCCCCCCCCCCCCCCCAk&",
+";3VCCCCCCCCCCCCCCCCCCCCCCCCCZAj=",
+",2VCCCCCCCCCCCCCCCCCCCCCCCCCCAh=",
+",<VCCCCCCCCCCCCCCCCCCCCCCCCCCSh&",
+"4:BCCCCCCCCCCCCCCCCCCCCCCCCCZAd;",
+"3;NCCCCCCCCCCCCCCCCCCCCCCCCCCAa:",
+"4&NCCCCCCCCCCCCCCCCCCCCCCCCCZDu,",
+"0$MCCCCCCCCCCCZCZCZCCCCZCZCZCSe,",
+"rOnZCZCZCZZCZZCZCZCZCZZCCCZCZD46",
+"i sFFFFFFDFDDFFFFFFFFFDFFFFFFV+e",
+"v+Owskxvbvbnbvvvvcccczxzzkdar%.x",
+"Gl;@XXXXXOXXXOXXXXXXXOoOO+@$&<lG"
+};
diff --git a/kommander/editor/pics/large/toolbutton.xpm b/kommander/editor/pics/large/toolbutton.xpm
new file mode 100644
index 00000000..a61a4774
--- /dev/null
+++ b/kommander/editor/pics/large/toolbutton.xpm
@@ -0,0 +1,123 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 85 1",
+" c #181818181818",
+". c #313131313131",
+"X c #313131313939",
+"o c #393939393939",
+"O c #5a5a29290000",
+"+ c #636331310808",
+"@ c #636331311010",
+"# c #737331310000",
+"$ c #7b7b39390000",
+"% c #6b6b42422929",
+"& c Gray26",
+"* c Gray29",
+"= c #4a4a4a4a5252",
+"- c Gray32",
+"; c #5a5a5a5a5a5a",
+": c #737352524242",
+"> c #73735a5a4a4a",
+", c Gray39",
+"< c Gray42",
+"1 c #6b6b6b6b7373",
+"2 c #7b7b6b6b6363",
+"3 c Gray45",
+"4 c #7b7b7b7b7b7b",
+"5 c #73737b7b8484",
+"6 c #7b7b7b7b8484",
+"7 c #7b7b7b7b8c8c",
+"8 c #7b7b84848c8c",
+"9 c #848439390000",
+"0 c #8c8c5a5a3939",
+"q c #9c9c5a5a2929",
+"w c #a5a54a4a0000",
+"e c #b5b552520808",
+"r c #84847b7b7373",
+"t c #c6c65a5a0808",
+"y c #cece63631010",
+"u c #d6d673732121",
+"i c #d6d67b7b3131",
+"p c #8c8c84847b7b",
+"a c #adad94947b7b",
+"s c #b5b594947373",
+"d c #b5b594947b7b",
+"f c #cece8c8c5a5a",
+"g c #c6c694945a5a",
+"h c #d6d68c8c4242",
+"j c #848484848484",
+"k c Gray55",
+"l c #8c8c8c8c9494",
+"z c #8c8c94949494",
+"x c #94948c8c8c8c",
+"c c Gray58",
+"v c #949494949c9c",
+"b c #94949c9c9494",
+"n c #94949c9c9c9c",
+"m c #9c9c9c9c9494",
+"M c Gray61",
+"N c #94949c9ca5a5",
+"B c #a5a59c9c8c8c",
+"V c #adad9c9c8c8c",
+"C c #a5a5a5a59c9c",
+"Z c #a5a5a5a5a5a5",
+"A c #a5a5adadadad",
+"S c #adada5a5a5a5",
+"D c Gray68",
+"F c #a5a5adadb5b5",
+"G c #adadb5b5bdbd",
+"H c Gray71",
+"J c #b5b5b5b5bdbd",
+"K c Gray74",
+"L c #b5b5c6c6cece",
+"P c #c0c0c0c0c0c0",
+"I c #c6c6c6c6c6c6",
+"U c #cececececece",
+"Y c #c6c6ceced6d6",
+"T c Gray84",
+"R c Gray87",
+"E c #ceced6d6e7e7",
+"W c #d6d6dedeefef",
+"Q c #e7e7deded6d6",
+"! c #e7e7e7e7e7e7",
+"~ c #efefefefefef",
+"^ c #e7e7f7f7ffff",
+"/ c #efeff7f7ffff",
+"( c Gray97",
+") c Gray100",
+"_ c None",
+/* pixels */
+"________________________________",
+"________________________________",
+"________________________________",
+"_____KZMZZZZZDZDZDZZZZZZMMH_____",
+"____DIR!R!RRRRTTTTUTUUIIHDcM____",
+"___HK))))))))((~~!!RRUIKKDZ<D___",
+"___MK~!TUIIIIIIIIKKKHDDZMMc,3___",
+"___cDIIHHHDZZZDDADZMZZMZMMc<;___",
+"___MDHHDZZZJTEF87lMZMMMMMck<-___",
+"___MDHDDZZMG^/E856cMCMMccck<-___",
+"___MZDDZZNCMJ^/Y858vMMcMcck<*___",
+"___kDDZZZCMMcY^/L568cMccckk<*___",
+"___kZDZZMMMMMcE^^G786bmcccj<&___",
+"___kDDZZMMMMMbfQ/^5o=Mccckj<*___",
+"___kZZZZMMMMnVy0WWX 1MMcckk<&___",
+"___kZDZZMMMMNfeOSNo<cMccckj<*___",
+"___kDZZZMMMvmi9:nkcMMcccckj<&___",
+"___MZZZMMMmndy+rMMMcccMcckj<&___",
+"___MZZZMMMMNhw%cncccMcccccj<&___",
+"___MZZZMMMvBu#2NcMcMccccckj<&___",
+"___cZZZMMMnge@xMcccccccckkj<&___",
+"___cZZMMMvMi$>NcmcMcccccckj<*___",
+"___kMZMMMvst+pMccccccccckkj,*___",
+"___cMZMMcvaq:cccccckcckckkj,*___",
+"___ccZcccczlzczkkckckkkkkkj;-___",
+"___ZkMccckkkkkkkkjkkkkkkkkj-,___",
+"___K4ckkjjjjj444444444j4j43oM___",
+"____M;;;;,;;;;;;;;;;;;;--*o<K___",
+"_____Z<*&oo.o......o.oo&*;cK____",
+"________________________________",
+"________________________________",
+"________________________________"
+};
diff --git a/kommander/editor/pics/large/undo.xpm b/kommander/editor/pics/large/undo.xpm
new file mode 100644
index 00000000..a4f309ec
--- /dev/null
+++ b/kommander/editor/pics/large/undo.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 4 1",
+" c #000000008080",
+". c #808080808080",
+"X c #c0c0c0c0c0c0",
+"o c None",
+/* pixels */
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"ooooooooooooooo .ooooooo",
+"oooo ooooooooo .oooooo",
+"oooo ooooooo ooooooo .ooooo",
+"oooo oooo ooooooooo .oooo",
+"oooo oo ooooooooooo oooo",
+"oooo oooooooooooooo oooo",
+"oooo ooooooooooooooo oooo",
+"oooo ooooooooooooooo oooo",
+"oooo oooooooooooooo oooo",
+"oooo ooooooooooooo oooo",
+"oooo ooooooooooo .oooo",
+"oooo ooooooooo .ooooo",
+"ooooooooooooooooooooooo. oooooo",
+"oooooooooooooooooooooo. ooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo",
+"oooooooooooooooooooooooooooooooo"
+};
diff --git a/kommander/editor/pics/mini/down.xpm b/kommander/editor/pics/mini/down.xpm
new file mode 100644
index 00000000..0a0bae1d
--- /dev/null
+++ b/kommander/editor/pics/mini/down.xpm
@@ -0,0 +1,71 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 49 1",
+" c #06062d2dffff",
+". c #08082e2effff",
+"X c #1b1b3f3ff1f1",
+"o c #3d3d4e4ebbbb",
+"O c #2f2f5050e1e1",
+"+ c #26265151fbfb",
+"@ c #2b2b5959fefe",
+"# c #31315454e2e2",
+"$ c #37375e5ef3f3",
+"% c #3c3c6565eeee",
+"& c #3a3a6565ffff",
+"* c #44445b5bc2c2",
+"= c #48486060c5c5",
+"- c #50506f6fcccc",
+"; c #47477575ffff",
+": c #4d4d7d7dffff",
+"> c #53537c7cebeb",
+", c #6c6c8484baba",
+"< c #6e6e8787c7c7",
+"1 c #6b6b9292e2e2",
+"2 c #65659797ffff",
+"3 c #6c6c9d9dffff",
+"4 c #6c6ca1a1ffff",
+"5 c #7e7ea2a2eaea",
+"6 c #7676a6a6fefe",
+"7 c #7f7fafafffff",
+"8 c #8f8f9999b7b7",
+"9 c #9f9fa2a2b3b3",
+"0 c #8e8e9e9ec0c0",
+"q c #8282a9a9e8e8",
+"w c #8787b7b7ffff",
+"e c #8787b8b8ffff",
+"r c #8e8ebebeffff",
+"t c #a4a4b4b4cdcd",
+"y c #a6a6babaecec",
+"u c #9797c8c8ffff",
+"i c #9d9dceceffff",
+"p c #9f9fd3d3ffff",
+"a c #a2a2cecef6f6",
+"s c #a2a2d1d1ffff",
+"d c #b2b2c9c9eeee",
+"f c #b9b9cacaeeee",
+"g c #babad6d6f8f8",
+"h c #b5b5ebebffff",
+"j c #c0c0c0c0c0c0",
+"k c #dadafafaffff",
+"l c #e1e1fafaffff",
+"z c #f6f6ffffffff",
+"x c None",
+/* pixels */
+"xxxxx9yfdq8xxxxx",
+"xxxxx5zlks#9xxxx",
+"xxxxt1hpu2Oxxxxx",
+"xxxxx<uir:otxxxx",
+"xxxxx0wuw;-xxxxx",
+"xxxxx8wuw&,xxxxx",
+"xxxxxt5u7$9xxxxx",
+"xxxxxtqi7$9xxxxx",
+"xtxxx8aiw:,txxtx",
+"x<agywrwww655>*x",
+"x,%4eeww7w76& -x",
+"xx,@3www776;.=9x",
+"xxx,@37766: otxx",
+"xxxx,+262; o9xxx",
+"xxxxx,+::.otxxxx",
+"xxxxxx<OX-9xxxxx"
+};
diff --git a/kommander/editor/pics/mini/form.xpm b/kommander/editor/pics/mini/form.xpm
new file mode 100644
index 00000000..66bf2633
--- /dev/null
+++ b/kommander/editor/pics/mini/form.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * form_xpm[] = {
+"20 20 4 2",
+" c None",
+". c None",
+"+ c #000079",
+"@ c #FFFFFF",
+". . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . ",
+". . + + + + + + + + + + + + + + + + . . ",
+". . + . . + @ @ @ @ @ @ @ @ + . . + . . ",
+". . + + + + + + + + + + + + + + + + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . . ",
+". . + + + + + + + + + + + + + + + + . . ",
+". . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . "};
diff --git a/kommander/editor/pics/mini/image.xpm b/kommander/editor/pics/mini/image.xpm
new file mode 100644
index 00000000..2c1479da
--- /dev/null
+++ b/kommander/editor/pics/mini/image.xpm
@@ -0,0 +1,28 @@
+/* XPM */
+static const char *image_xpm[] = {
+"17 15 9 1",
+" c #7F7F7F",
+". c #FFFFFF",
+"X c #00B6FF",
+"o c #BFBFBF",
+"O c #FF6C00",
+"+ c #000000",
+"@ c #0000FF",
+"# c #6CFF00",
+"$ c #FFB691",
+" ..XX",
+" ........o .XXX",
+" .OOOOOOOo. XXX+",
+" .O@@@@@@+++XXX++",
+" .O@@@@@@O.XXX+++",
+" .O@@@@@@OXXX+++.",
+" .O######XXX++...",
+" .O#####XXX++....",
+" .O##$#$XX+o+....",
+" .O#$$$$$+.o+....",
+" .O##$$##O.o+....",
+" .OOOOOOOO.o+....",
+" ..........o+....",
+" ooooooooooo+....",
+"+++++++++++++...."
+};
diff --git a/kommander/editor/pics/mini/left.xpm b/kommander/editor/pics/mini/left.xpm
new file mode 100644
index 00000000..97e8c809
--- /dev/null
+++ b/kommander/editor/pics/mini/left.xpm
@@ -0,0 +1,69 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 47 1",
+" c #0f0f3c3cffff",
+". c #16163939efef",
+"X c #18183f3ffbfb",
+"o c #27273f3fd1d1",
+"O c #17174545ffff",
+"+ c #1d1d4343f2f2",
+"@ c #1d1d4c4cffff",
+"# c #30305656d8d8",
+"$ c #3a3a5252d4d4",
+"% c #20204747fcfc",
+"& c #2c2c5656ffff",
+"* c #34346262ffff",
+"= c #3b3b6b6bffff",
+"- c #63637777b8b8",
+"; c #4b4b6363c4c4",
+": c #48486767c9c9",
+"> c #51516d6dcdcd",
+", c #45457474ffff",
+"< c #4c4c7d7dffff",
+"1 c #7a7a8c8cbdbd",
+"2 c #56568585ffff",
+"3 c #5f5f8b8bfafa",
+"4 c #76768b8bc0c0",
+"5 c #67679797ffff",
+"6 c #6a6a9898f4f4",
+"7 c #6f6f9f9fffff",
+"8 c #7f7fa3a3e9e9",
+"9 c #7676a6a6ffff",
+"0 c #7676a8a8ffff",
+"q c #7e7eafafffff",
+"w c #7f7fb1b1ffff",
+"e c #8f8fa6a6e9e9",
+"r c #8383b1b1f5f5",
+"t c #8282b5b5ffff",
+"y c #9494c4c4fafa",
+"u c #9797cbcbffff",
+"i c #9f9fc6c6f1f1",
+"p c #9f9fd4d4ffff",
+"a c #bbbbe4e4ffff",
+"s c #c0c0c0c0c0c0",
+"d c #cecedcdcfdfd",
+"f c #c3c3e6e6ffff",
+"g c #d8d8e1e1f9f9",
+"h c #e6e6eaeafafa",
+"j c #e4e4f9f9ffff",
+"k c #eeeeffffffff",
+"l c None",
+/* pixels */
+"llllllllllllllll",
+"lllll4elllllllll",
+"lllleghellllllll",
+"lll1hkilllllllll",
+"ll1kkp01llllllll",
+"l4kkywq4le1e4e84",
+"1dky9q958iaafat#",
+"ijuq997qyyrt09,&",
+"6tw99777557755,o",
+"-%39779*X%&*=,*+",
+"l$@2577>11;$o.+;",
+"ll>O,571llllll1l",
+"lll:X<2lllllllll",
+"llll- @4llllllll",
+"lllll-.4llllllll",
+"llllllllllllllll"
+};
diff --git a/kommander/editor/pics/mini/resetproperty.xpm b/kommander/editor/pics/mini/resetproperty.xpm
new file mode 100644
index 00000000..43bdc1b0
--- /dev/null
+++ b/kommander/editor/pics/mini/resetproperty.xpm
@@ -0,0 +1,13 @@
+/* XPM */
+static char * resetproperty_xpm[] = {
+"7 6 4 1",
+" c None",
+". c #C00000",
+"+ c #FF0000",
+"@ c None",
+".+@@@+.",
+"@.+@+.@",
+"@@.+.@@",
+"@@+.+@@",
+"@+.@.+@",
+"+.@@@.+"};
diff --git a/kommander/editor/pics/mini/right.xpm b/kommander/editor/pics/mini/right.xpm
new file mode 100644
index 00000000..24bcaae6
--- /dev/null
+++ b/kommander/editor/pics/mini/right.xpm
@@ -0,0 +1,77 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 55 1",
+" c #02022525fefe",
+". c #06062a2afbfb",
+"X c #1c1c3c3ce5e5",
+"o c #22223737d6d6",
+"O c #3b3b5353cbcb",
+"+ c #26264a4aebeb",
+"@ c #2c2c4f4feeee",
+"# c #33335b5bf1f1",
+"$ c #32325a5afafa",
+"% c #35356565ffff",
+"& c #39396464ffff",
+"* c #3e3e6969fefe",
+"= c #49495d5dbcbc",
+"- c #62627777bbbb",
+"; c #68687d7db8b8",
+": c #40405d5dcaca",
+"> c #49496363c6c6",
+", c #50507171dfdf",
+"< c #4c4c7575e9e9",
+"1 c #5c5c7a7aeaea",
+"2 c #79798989afaf",
+"3 c #54548484ffff",
+"4 c #5d5d8e8efdfd",
+"5 c #6e6e8585c5c5",
+"6 c #67679696ffff",
+"7 c #6d6d9898f0f0",
+"8 c #6d6d9b9bfafa",
+"9 c #79799898e8e8",
+"0 c #6c6ca0a0ffff",
+"q c #7f7fa0a0e3e3",
+"w c #7676a6a6ffff",
+"e c #7c7ca8a8f2f2",
+"r c #7f7fafafffff",
+"t c #8888a2a2f0f0",
+"y c #8686b6b6ffff",
+"u c #8888b7b7ffff",
+"i c #8c8cb8b8f0f0",
+"p c #8f8fbfbfffff",
+"a c #9595c7c7ffff",
+"s c #9797c8c8ffff",
+"d c #9d9dcfcfffff",
+"f c #9f9fd2d2ffff",
+"g c #a2a2d0d0f0f0",
+"h c #a1a1d0d0ffff",
+"j c #a9a9dedeffff",
+"k c #b1b1d7d7f2f2",
+"l c #bebedbdbf5f5",
+"z c #bcbcd9d9fefe",
+"x c #adade2e2ffff",
+"c c #b9b9e5e5ffff",
+"v c #c0c0c0c0c0c0",
+"b c #ccccf0f0f2f2",
+"n c #cdcdf6f6ffff",
+"m c #e2e2ffffffff",
+"M c None",
+/* pixels */
+"MMMMMMMMMMMMMMMM",
+"MMMMMMMMMq2MMMMM",
+"MMMMMMMMMbr5MMMM",
+"MMMMMMMMMdj65MMM",
+"MMMMMMMMMqsdw5MM",
+"2tqq5qMM2yppa6-M",
+"imncllgkzyryyp4;",
+"exaasadharrrrr8<",
+"7fuyrww0rrrrw6*X",
+",03*%$@+&rrw8%.;",
+"2XoO>;22-8w8% =M",
+"MMMMMMMMM96$ >MM",
+"MMMMMMMMM1%.>MMM",
+"MMMMMMMMM# >MMMM",
+"MMMMMMMMM:-MMMMM",
+"MMMMMMMMMMMMMMMM"
+};
diff --git a/kommander/editor/pics/mini/up.xpm b/kommander/editor/pics/mini/up.xpm
new file mode 100644
index 00000000..29117588
--- /dev/null
+++ b/kommander/editor/pics/mini/up.xpm
@@ -0,0 +1,68 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 46 1",
+" c #16163636ebeb",
+". c #17173a3aecec",
+"X c #1a1a3f3ff3f3",
+"o c #1b1b4343fefe",
+"O c #3f3f5656d1d1",
+"+ c #2b2b5c5cffff",
+"@ c #31315f5fffff",
+"# c #36366767fefe",
+"$ c #3b3b6666ffff",
+"% c #3f3f6e6effff",
+"& c #69697b7bb8b8",
+"* c #4d4d6565cccc",
+"= c #51516c6ccece",
+"- c #55557272cece",
+"; c #58587171c7c7",
+": c #42426d6deded",
+"> c #47477777ffff",
+", c #4a4a7a7affff",
+"< c #64647b7bc0c0",
+"1 c #72728787bbbb",
+"2 c #50508585ffff",
+"3 c #5c5c8a8af7f7",
+"4 c #6a6a8989d7d7",
+"5 c #60608e8effff",
+"6 c #66669797ffff",
+"7 c #67679898ffff",
+"8 c #6a6a9b9bf4f4",
+"9 c #6e6e9e9effff",
+"0 c #7676a7a7ffff",
+"q c #7777a9a9ffff",
+"w c #7878a1a1f7f7",
+"e c #7e7eafafffff",
+"r c #8989bdbdffff",
+"t c #9090c6c6ffff",
+"y c #9696ccccffff",
+"u c #9999c9c9f9f9",
+"i c #9d9dd1d1ffff",
+"p c #b2b2c6c6f4f4",
+"a c #bfbfe6e6fefe",
+"s c #c0c0c0c0c0c0",
+"d c #d1d1e0e0fcfc",
+"f c #dbdbf9f9ffff",
+"g c #e4e4ebebfcfc",
+"h c #e7e7ffffffff",
+"j c Gray100",
+"k c None",
+/* pixels */
+"kkkkkk1pw1kkkkkk",
+"kkkkk1gfi>;kkkkk",
+"kkkk1ghure>&kkkk",
+"kkk1ghte009@<kkk",
+"kk1jhr009999#&kk",
+"k1dhy00999999+&k",
+"k4auq09999763$.k",
+"k1k1k1>99$*kw11k",
+"kkkkkk:q7o1kkkkk",
+"kkkkkk3e6+1kkkkk",
+"kkkkk18e9@;kkkkk",
+"kkkkk1eq6$Okkkkk",
+"kkkkk1r06>.kkkkk",
+"kkkkk4e65,.kkkkk",
+"kkkkk-2%##X1kkkk",
+"kkkkk1... =kkkkk"
+};
diff --git a/kommander/editor/pics/mkimages b/kommander/editor/pics/mkimages
new file mode 100644
index 00000000..370c0551
--- /dev/null
+++ b/kommander/editor/pics/mkimages
@@ -0,0 +1,3 @@
+#!/bin/sh
+#qembed *.xbm *.xpm small/*.xbm small/*.xpm small/*.png small/disabled/*.xpm small/disabled/*.xbm small/disabled/*.png mini/*.xpm mini/*.xbm background.png qtlogo.png > images.h
+./qembed *.xbm small/*.xpm small/*.png small/disabled/*.xpm small/disabled/*.png mini/*.xpm background.png qtlogo.png> images.h
diff --git a/kommander/editor/pics/mkpics b/kommander/editor/pics/mkpics
new file mode 100644
index 00000000..015714d7
--- /dev/null
+++ b/kommander/editor/pics/mkpics
@@ -0,0 +1,2 @@
+#!/bin/sh
+qembed small/filenew.xpm small/fileopen.xpm small/filesave.xpm small/print.xpm small/editcut.xpm small/editcopy.xpm small/editpaste.xpm small/searchfind.xpm small/undo.xpm small/redo.xpm > ../plugins/wizards/images.h
diff --git a/kommander/editor/pics/no.xbm b/kommander/editor/pics/no.xbm
new file mode 100644
index 00000000..9dc36cfd
--- /dev/null
+++ b/kommander/editor/pics/no.xbm
@@ -0,0 +1,10 @@
+#define no_width 25
+#define no_height 25
+static unsigned char no_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,
+ 0x00,0x80,0xff,0x01,0x00,0xc0,0xc3,0x03,0x00,0xe0,0x00,0x07,0x00,0xf0,0x01,
+ 0x0e,0x00,0xb0,0x03,0x0c,0x00,0x38,0x07,0x1c,0x00,0x18,0x0e,0x18,0x00,0x18,
+ 0x1c,0x18,0x00,0x18,0x38,0x18,0x00,0x18,0x70,0x18,0x00,0x38,0xe0,0x1c,0x00,
+ 0x30,0xc0,0x0d,0x00,0x70,0x80,0x0f,0x00,0xe0,0x00,0x07,0x00,0xc0,0xc3,0x03,
+ 0x00,0x80,0xff,0x01,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/qtlogo.png b/kommander/editor/pics/qtlogo.png
new file mode 100644
index 00000000..4e1a1472
--- /dev/null
+++ b/kommander/editor/pics/qtlogo.png
Binary files differ
diff --git a/kommander/editor/pics/sizeall.xbm b/kommander/editor/pics/sizeall.xbm
new file mode 100644
index 00000000..77324ab7
--- /dev/null
+++ b/kommander/editor/pics/sizeall.xbm
@@ -0,0 +1,10 @@
+#define sizeall_width 25
+#define sizeall_height 25
+static unsigned char sizeall_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x38,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x40,0x10,0x04,0x00,0x60,0x10,0x0c,0x00,0x70,
+ 0x10,0x1c,0x00,0xf8,0xff,0x3f,0x00,0x70,0x10,0x1c,0x00,0x60,0x10,0x0c,0x00,
+ 0x40,0x10,0x04,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xfe,0x00,
+ 0x00,0x00,0x7c,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/sizeb.xbm b/kommander/editor/pics/sizeb.xbm
new file mode 100644
index 00000000..e8912e4e
--- /dev/null
+++ b/kommander/editor/pics/sizeb.xbm
@@ -0,0 +1,10 @@
+#define sizeb_width 25
+#define sizeb_height 25
+static unsigned char sizeb_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x07,0x00,0x00,0xc0,0x03,
+ 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x02,0x00,0x00,0x40,0x04,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x40,0x04,0x00,
+ 0x00,0x80,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x80,0x07,0x00,0x00,0xc0,0x07,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/sizef.xbm b/kommander/editor/pics/sizef.xbm
new file mode 100644
index 00000000..cf8dd754
--- /dev/null
+++ b/kommander/editor/pics/sizef.xbm
@@ -0,0 +1,10 @@
+#define sizef_width 25
+#define sizef_height 25
+static unsigned char sizef_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,
+ 0x03,0x00,0x00,0x80,0x03,0x00,0x00,0x40,0x03,0x00,0x00,0x20,0x02,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x04,0x00,0x00,0x20,0x02,0x00,0x00,
+ 0x60,0x01,0x00,0x00,0xe0,0x00,0x00,0x00,0xe0,0x01,0x00,0x00,0xe0,0x03,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/sizeh.xbm b/kommander/editor/pics/sizeh.xbm
new file mode 100644
index 00000000..1b2f05cf
--- /dev/null
+++ b/kommander/editor/pics/sizeh.xbm
@@ -0,0 +1,10 @@
+#define sizeh_width 25
+#define sizeh_height 25
+static unsigned char sizeh_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x04,0x00,0x60,0x00,0x0c,0x00,0x70,0x00,0x1c,0x00,0xf8,
+ 0xff,0x3f,0x00,0x70,0x00,0x1c,0x00,0x60,0x00,0x0c,0x00,0x40,0x00,0x04,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/sizev.xbm b/kommander/editor/pics/sizev.xbm
new file mode 100644
index 00000000..9b2483a7
--- /dev/null
+++ b/kommander/editor/pics/sizev.xbm
@@ -0,0 +1,10 @@
+#define sizev_width 25
+#define sizev_height 25
+static unsigned char sizev_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x1c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,
+ 0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x7f,0x00,
+ 0x00,0x00,0x3e,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/small/adjustsize.png b/kommander/editor/pics/small/adjustsize.png
new file mode 100644
index 00000000..6ade1e22
--- /dev/null
+++ b/kommander/editor/pics/small/adjustsize.png
Binary files differ
diff --git a/kommander/editor/pics/small/book.xpm b/kommander/editor/pics/small/book.xpm
new file mode 100644
index 00000000..f7f73a62
--- /dev/null
+++ b/kommander/editor/pics/small/book.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+/* Drawn by Mark Donohoe for the K Desktop Environment */
+/* See http://www.kde.org */
+static char*openbook[]={
+"22 22 4 1",
+"# c #000000",
+"a c #808080",
+"b c #ffffff",
+". c None",
+"......................",
+"......................",
+"......................",
+"......................",
+".....##...............",
+"....#ab#....###.......",
+"....#abb#.##bb#.......",
+"....#abbb#abbb###.....",
+"....#abbb#bbbb#a#.....",
+"....#abbb#abbb#a#.....",
+"....#abbb#bbbb#a#.....",
+"....#abbb#abbb#a#.....",
+"....#abbb#bbbb#a#.....",
+".....#abb#abb##a#.....",
+"......#ab#b##bba#.....",
+".......#a##aaaaa#.....",
+".......##a#######.....",
+"........##............",
+"......................",
+"......................",
+"......................",
+"......................"};
+
diff --git a/kommander/editor/pics/small/buttongroup.png b/kommander/editor/pics/small/buttongroup.png
new file mode 100644
index 00000000..d89e28fd
--- /dev/null
+++ b/kommander/editor/pics/small/buttongroup.png
Binary files differ
diff --git a/kommander/editor/pics/small/checkbox.png b/kommander/editor/pics/small/checkbox.png
new file mode 100644
index 00000000..ab6f53e0
--- /dev/null
+++ b/kommander/editor/pics/small/checkbox.png
Binary files differ
diff --git a/kommander/editor/pics/small/closebutton.png b/kommander/editor/pics/small/closebutton.png
new file mode 100644
index 00000000..63903b30
--- /dev/null
+++ b/kommander/editor/pics/small/closebutton.png
Binary files differ
diff --git a/kommander/editor/pics/small/combobox.png b/kommander/editor/pics/small/combobox.png
new file mode 100644
index 00000000..7d4890a7
--- /dev/null
+++ b/kommander/editor/pics/small/combobox.png
Binary files differ
diff --git a/kommander/editor/pics/small/connecttool.png b/kommander/editor/pics/small/connecttool.png
new file mode 100644
index 00000000..fca6748f
--- /dev/null
+++ b/kommander/editor/pics/small/connecttool.png
Binary files differ
diff --git a/kommander/editor/pics/small/customwidget.png b/kommander/editor/pics/small/customwidget.png
new file mode 100644
index 00000000..ab790e1f
--- /dev/null
+++ b/kommander/editor/pics/small/customwidget.png
Binary files differ
diff --git a/kommander/editor/pics/small/databrowser.xpm b/kommander/editor/pics/small/databrowser.xpm
new file mode 100644
index 00000000..6b6c11f7
--- /dev/null
+++ b/kommander/editor/pics/small/databrowser.xpm
@@ -0,0 +1,156 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 128 2",
+" c #c2c2d3",
+". c #9696a3",
+"X c #ababbb",
+"o c #dbdbef",
+"O c GhostWhite",
+"+ c #7d7d89",
+"@ c #7e7e89",
+"# c #61616a",
+"$ c #414147",
+"% c #dadaee",
+"& c #d8d8ec",
+"* c #71717b",
+"= c #46464c",
+"- c #47474e",
+"; c #efeffe",
+": c #acacbc",
+"> c #c1c1d3",
+", c #d9d9ed",
+"< c #ddddf1",
+"1 c #f6f6ff",
+"2 c #ddddf0",
+"3 c #f4f4ff",
+"4 c #a1a1ad",
+"5 c #606069",
+"6 c #82828e",
+"7 c #9897a3",
+"8 c #c2c2ca",
+"9 c #9494a1",
+"0 c #d5d5e9",
+"q c #61616b",
+"w c #f1f1fe",
+"e c #adadbc",
+"r c #f2f2ff",
+"t c #9f9fab",
+"y c #9595a3",
+"u c #606068",
+"i c #b0b0ba",
+"p c #706f77",
+"a c #45454b",
+"s c #e5e5f4",
+"d c #fefeff",
+"f c #9a9aa7",
+"g c #9797a5",
+"h c #f5f5ff",
+"j c #5c5c60",
+"k c #3f3f45",
+"l c #3d3d43",
+"z c #515157",
+"x c #828184",
+"c c #38383d",
+"v c #404046",
+"b c #9a9aa9",
+"n c #dadaed",
+"m c #7e7e8a",
+"M c #414146",
+"N c #4b4b50",
+"B c #4a4a50",
+"V c #f1f1ff",
+"C c #dcdcf0",
+"Z c #9e9eab",
+"A c #f3f3ff",
+"S c #f9f9ff",
+"D c #a5a5b0",
+"F c #59595f",
+"G c #e8e8eb",
+"H c #f7f7ff",
+"J c #62626b",
+"K c #adadbd",
+"L c #9696a4",
+"P c #00007b",
+"I c Gray0",
+"U c Gray100",
+"Y c None",
+"T c Gray0",
+"R c Gray0",
+"E c Gray0",
+"W c Gray0",
+"Q c Gray0",
+"! c Gray0",
+"~ c Gray0",
+"^ c Gray0",
+"/ c Gray0",
+"( c Gray0",
+") c Gray0",
+"_ c Gray0",
+"` c Gray0",
+"' c Gray0",
+"] c Gray0",
+"[ c Gray0",
+"{ c Gray0",
+"} c Gray0",
+"| c Gray0",
+" . c Gray0",
+".. c Gray0",
+"X. c Gray0",
+"o. c Gray0",
+"O. c Gray0",
+"+. c Gray0",
+"@. c Gray0",
+"#. c Gray0",
+"$. c Gray0",
+"%. c Gray0",
+"&. c Gray0",
+"*. c Gray0",
+"=. c Gray0",
+"-. c Gray0",
+";. c Gray0",
+":. c Gray0",
+">. c Gray0",
+",. c Gray0",
+"<. c Gray0",
+"1. c Gray0",
+"2. c Gray0",
+"3. c Gray0",
+"4. c Gray0",
+"5. c Gray0",
+"6. c Gray0",
+"7. c Gray0",
+"8. c Gray0",
+"9. c Gray0",
+"0. c Gray0",
+"q. c Gray0",
+"w. c Gray0",
+"e. c Gray0",
+"r. c Gray0",
+"t. c Gray0",
+"y. c Gray0",
+"u. c Gray0",
+/* pixels */
+"Y Y o o K K K K K K K K K K K Y Y Y Y Y Y Y ",
+"Y b . @ @ J J J J J J J J J p Y Y Y Y Y Y ",
+"Y X . . + + + + # # # $ c M Y Y Y Y Y Y ",
+"Y L U U O < X X X . @ q # - $ B Y Y Y Y Y Y ",
+"Y L U U U O O 2 X . m J - $ N Y Y Y Y Y Y ",
+"Y L U U U U S < I I I I I I I I I I I I I Y ",
+"Y L U U U U O 2 I U U U U U U U U U U U I Y ",
+"Y L U U U U O C I U U U U P U P U U U U I Y ",
+"Y L U U U U H o I U U U P P U P P U U U I Y ",
+"Y L U U U U 1 o I U U P P P U P P P U U I Y ",
+"Y L U U U U 1 o I U P P P P U P P P P U I Y ",
+"Y L U U U U h % I U P P P P U P P P P U I Y ",
+"Y L U U U U 3 % I U U P P P U P P P U U I Y ",
+"Y L U U U U 3 % I U U U P P U P P U U U I Y ",
+"Y L U U U U A n I U U U U P U P U U U U I Y ",
+"Y L U U U U r , I U U U U U U U U U U U I Y ",
+"Y L U U U U V , I I I I I I I I I I I I I Y ",
+"Y L U U U U w & > : L @ 5 = k j Y Y Y Y Y Y ",
+"Y L U U U U ; & > e L @ 5 = v z Y Y Y Y Y Y ",
+"Y L U U U d ; & : L + u a l F Y Y Y Y Y Y ",
+"Y D 4 i 8 G s 0 X L 6 * * * x Y Y Y Y Y Y ",
+"Y Y t 4 Z f g L L L L y 9 7 . Y Y Y Y Y Y Y "
+};
diff --git a/kommander/editor/pics/small/datatable.xpm b/kommander/editor/pics/small/datatable.xpm
new file mode 100644
index 00000000..182c3bc9
--- /dev/null
+++ b/kommander/editor/pics/small/datatable.xpm
@@ -0,0 +1,156 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 128 2",
+" c #c2c2d3",
+". c #9696a3",
+"X c #ababbb",
+"o c #dbdbef",
+"O c GhostWhite",
+"+ c #7d7d89",
+"@ c #7e7e89",
+"# c #61616a",
+"$ c #414147",
+"% c #dadaee",
+"& c #d8d8ec",
+"* c #71717b",
+"= c #46464c",
+"- c #47474e",
+"; c #efeffe",
+": c #acacbc",
+"> c #c1c1d3",
+", c #d9d9ed",
+"< c #ddddf1",
+"1 c #f6f6ff",
+"2 c #ddddf0",
+"3 c #f4f4ff",
+"4 c #a1a1ad",
+"5 c #606069",
+"6 c #82828e",
+"7 c #9897a3",
+"8 c #c2c2ca",
+"9 c #9494a1",
+"0 c #d5d5e9",
+"q c #61616b",
+"w c #f1f1fe",
+"e c #adadbc",
+"r c #f2f2ff",
+"t c #9f9fab",
+"y c #9595a3",
+"u c #606068",
+"i c #b0b0ba",
+"p c #706f77",
+"a c #45454b",
+"s c #e5e5f4",
+"d c #fefeff",
+"f c #9a9aa7",
+"g c #9797a5",
+"h c #f5f5ff",
+"j c #5c5c60",
+"k c #3f3f45",
+"l c #3d3d43",
+"z c #515157",
+"x c #828184",
+"c c #38383d",
+"v c #404046",
+"b c #9a9aa9",
+"n c #dadaed",
+"m c #7e7e8a",
+"M c #414146",
+"N c #4b4b50",
+"B c #4a4a50",
+"V c #f1f1ff",
+"C c #dcdcf0",
+"Z c #9e9eab",
+"A c #f3f3ff",
+"S c #f9f9ff",
+"D c #a5a5b0",
+"F c #59595f",
+"G c #e8e8eb",
+"H c #f7f7ff",
+"J c #62626b",
+"K c #adadbd",
+"L c #9696a4",
+"P c #868692",
+"I c Gray0",
+"U c Gray100",
+"Y c None",
+"T c Gray0",
+"R c Gray0",
+"E c Gray0",
+"W c Gray0",
+"Q c Gray0",
+"! c Gray0",
+"~ c Gray0",
+"^ c Gray0",
+"/ c Gray0",
+"( c Gray0",
+") c Gray0",
+"_ c Gray0",
+"` c Gray0",
+"' c Gray0",
+"] c Gray0",
+"[ c Gray0",
+"{ c Gray0",
+"} c Gray0",
+"| c Gray0",
+" . c Gray0",
+".. c Gray0",
+"X. c Gray0",
+"o. c Gray0",
+"O. c Gray0",
+"+. c Gray0",
+"@. c Gray0",
+"#. c Gray0",
+"$. c Gray0",
+"%. c Gray0",
+"&. c Gray0",
+"*. c Gray0",
+"=. c Gray0",
+"-. c Gray0",
+";. c Gray0",
+":. c Gray0",
+">. c Gray0",
+",. c Gray0",
+"<. c Gray0",
+"1. c Gray0",
+"2. c Gray0",
+"3. c Gray0",
+"4. c Gray0",
+"5. c Gray0",
+"6. c Gray0",
+"7. c Gray0",
+"8. c Gray0",
+"9. c Gray0",
+"0. c Gray0",
+"q. c Gray0",
+"w. c Gray0",
+"e. c Gray0",
+"r. c Gray0",
+"t. c Gray0",
+"y. c Gray0",
+"u. c Gray0",
+/* pixels */
+"Y Y o o K K K K K K K K K K K Y Y Y Y Y Y Y ",
+"Y b . @ @ J J J J J J J J J p Y Y Y Y Y Y ",
+"Y X . . + + + + # # # $ c M Y Y Y Y Y Y ",
+"Y L U U O < X X X . @ q # - $ B Y Y Y Y Y Y ",
+"Y L U U U O O 2 X . m J - $ N Y Y Y Y Y Y ",
+"Y L U U U U S < I I I I I I I I I I I I I Y ",
+"Y L U U U U O 2 I U U I U U U U U U U U I Y ",
+"Y L U U U U O C I U U I U U U U U U U U I Y ",
+"Y L U U U U H o I I I I I I I I I I I I I Y ",
+"Y L U U U U 1 o I U U I U U U U U U U U I Y ",
+"Y L U U U U 1 o I P P I P P P P P P P P I Y ",
+"Y L U U U U h % I U U I U U U U U U U U I Y ",
+"Y L U U U U 3 % I P P I P P P P P P P P I Y ",
+"Y L U U U U 3 % I U U I U U U U U U U U I Y ",
+"Y L U U U U A n I P P I P P P P P P P P I Y ",
+"Y L U U U U r , I U U I U U U U U U U U I Y ",
+"Y L U U U U V , I I I I I I I I I I I I I Y ",
+"Y L U U U U w & > : L @ 5 = k j Y Y Y Y Y Y ",
+"Y L U U U U ; & > e L @ 5 = v z Y Y Y Y Y Y ",
+"Y L U U U d ; & : L + u a l F Y Y Y Y Y Y ",
+"Y D 4 i 8 G s 0 X L 6 * * * x Y Y Y Y Y Y ",
+"Y Y t 4 Z f g L L L L y 9 7 . Y Y Y Y Y Y Y "
+};
diff --git a/kommander/editor/pics/small/dataview.xpm b/kommander/editor/pics/small/dataview.xpm
new file mode 100644
index 00000000..aeb8a9cc
--- /dev/null
+++ b/kommander/editor/pics/small/dataview.xpm
@@ -0,0 +1,156 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 128 2",
+" c #ababbb",
+". c #9696a3",
+"X c #c2c2d3",
+"o c #7e7e89",
+"O c #7d7d89",
+"+ c GhostWhite",
+"@ c #dbdbef",
+"# c #61616a",
+"$ c #71717b",
+"% c #dadaee",
+"& c #414147",
+"* c #d8d8ec",
+"= c Gray56",
+"- c #d9d9ed",
+"; c #ddddf0",
+": c Gray94",
+"> c #c1c1d3",
+", c #efeffe",
+"< c #46464c",
+"1 c #a1a1ad",
+"2 c #acacbc",
+"3 c #47474e",
+"4 c #f4f4ff",
+"5 c #f6f6ff",
+"6 c #606069",
+"7 c #ddddf1",
+"8 c #b2b2b2",
+"9 c #bcbcbc",
+"0 c gainsboro",
+"q c #38383d",
+"w c #9595a3",
+"e c #a5a5b0",
+"r c #717171",
+"t c #020202",
+"y c #7b7b7b",
+"u c #3e3e3e",
+"i c #b0b0ba",
+"p c #9a9aa7",
+"a c #fefeff",
+"s c Gray6",
+"d c #3f3f45",
+"f c #626262",
+"g c #7e7e8a",
+"h c Gray53",
+"j c #464646",
+"k c #7c7c7c",
+"l c Gray15",
+"z c #d5d5e9",
+"x c #dddddd",
+"c c #dcdcf0",
+"v c #828184",
+"b c #3d3d43",
+"n c Gray9",
+"m c #e9e9e9",
+"M c #59595f",
+"N c Gray4",
+"B c #353535",
+"V c #9797a5",
+"C c #5c5c60",
+"Z c Gray80",
+"A c #9897a3",
+"S c Gray93",
+"D c #0b0b0b",
+"F c #808080",
+"G c Gray95",
+"H c #f7f7ff",
+"J c #45454b",
+"K c #404046",
+"L c #c1c1c1",
+"P c #f3f3ff",
+"I c #585858",
+"U c Gray84",
+"Y c #909090",
+"T c #2a2a2a",
+"R c #4b4b50",
+"E c Gray23",
+"W c Gray96",
+"Q c #444444",
+"! c #f9f9ff",
+"~ c Gray35",
+"^ c #111111",
+"/ c Gray34",
+"( c Gray44",
+") c #e8e8eb",
+"_ c #e5e5f4",
+"` c #c2c2ca",
+"' c Gray74",
+"] c Gray52",
+"[ c #9e9eab",
+"{ c #f1f1fe",
+"} c #fefefe",
+"| c #f9f9f9",
+" . c #414146",
+".. c #f1f1ff",
+"X. c #9f9fab",
+"o. c #f2f2ff",
+"O. c #515157",
+"+. c #4a4a50",
+"@. c Gray5",
+"#. c Gray1",
+"$. c #606068",
+"%. c #dadaed",
+"&. c #686868",
+"*. c #706f77",
+"=. c #9a9aa9",
+"-. c #adadbc",
+";. c #f5f5ff",
+":. c #9494a1",
+">. c #61616b",
+",. c Gray77",
+"<. c #82828e",
+"1. c #62626b",
+"2. c #adadbd",
+"3. c #9696a4",
+"4. c Gray0",
+"5. c Gray100",
+"6. c None",
+"7. c Gray0",
+"8. c Gray0",
+"9. c Gray0",
+"0. c Gray0",
+"q. c Gray0",
+"w. c Gray0",
+"e. c Gray0",
+"r. c Gray0",
+"t. c Gray0",
+"y. c Gray0",
+"u. c Gray0",
+/* pixels */
+"6.6.@ @ 2.2.2.2.2.2.2.2.2.2.2.6.6.6.6.6.6.6.",
+"6.X =.. o o 1.1.1.1.1.1.1.1.1.*.6.6.6.6.6.6.",
+"6. X X . . O O O O # # # & q .6.6.6.6.6.6.",
+"6.3.5.5.+ 7 . o >.# 3 & +.6.6.6.6.6.6.",
+"6.3.5.5.5.+ + ; X . g 1.3 & R 6.6.6.6.6.6.",
+"6.3.5.5.5.5.! 7 4.4.4.4.4.4.4.4.4.4.4.4.4.6.",
+"6.3.5.5.5.5.+ ; 4.5.5.5.5.5.5.5.5.5.5.5.4.6.",
+"6.3.5.5.5.5.+ c 4.5.5.5.5.5.5.5.5.5.5.5.4.6.",
+"6.3.5.5.5.5.H @ 4.U F j l T ~ Y x : S 5.4.6.",
+"6.3.5.5.5.5.5 @ 4.N D @.4.4.u / n = ,.m 4.6.",
+"6.3.5.5.5.5.5 @ 4.4.Q f 4.4.s ^ ( : ] 8 4.6.",
+"6.3.5.5.5.5.;.% 4.#.I L E 4.t B 0 5.9 = 4.6.",
+"6.3.5.5.5.5.4 % 4.' r k h &.y Z W | G } 4.6.",
+"6.3.5.5.5.5.4 % 4.5.5.5.5.5.5.5.5.5.5.5.4.6.",
+"6.3.5.5.5.5.P %.4.5.5.5.5.5.5.5.5.5.5.5.4.6.",
+"6.3.5.5.5.5.o.- 4.5.5.5.5.5.5.5.5.5.5.5.4.6.",
+"6.3.5.5.5.5...- 4.4.4.4.4.4.4.4.4.4.4.4.4.6.",
+"6.3.5.5.5.5.{ * > 2 3.o 6 < d C 6.6.6.6.6.6.",
+"6.3.5.5.5.5., * > -.3.o 6 < K O.6.6.6.6.6.6.",
+"6.3.5.5.5.a , * X 2 3.O $.J b M 6.6.6.6.6.6.",
+"6.e 1 i ` ) _ z X 3.<.$ $ $ v 6.6.6.6.6.6.",
+"6.6.X.1 [ p V 3.3.3.3.w :.A . 6.6.6.6.6.6.6."
+};
diff --git a/kommander/editor/pics/small/dateedit.png b/kommander/editor/pics/small/dateedit.png
new file mode 100644
index 00000000..48286bec
--- /dev/null
+++ b/kommander/editor/pics/small/dateedit.png
Binary files differ
diff --git a/kommander/editor/pics/small/datepicker.png b/kommander/editor/pics/small/datepicker.png
new file mode 100644
index 00000000..4bcc6450
--- /dev/null
+++ b/kommander/editor/pics/small/datepicker.png
Binary files differ
diff --git a/kommander/editor/pics/small/datetimeedit.png b/kommander/editor/pics/small/datetimeedit.png
new file mode 100644
index 00000000..68a56737
--- /dev/null
+++ b/kommander/editor/pics/small/datetimeedit.png
Binary files differ
diff --git a/kommander/editor/pics/small/dial.png b/kommander/editor/pics/small/dial.png
new file mode 100644
index 00000000..260033c2
--- /dev/null
+++ b/kommander/editor/pics/small/dial.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/adjustsize.png b/kommander/editor/pics/small/disabled/adjustsize.png
new file mode 100644
index 00000000..56bbd3ec
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/adjustsize.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/connecttool.png b/kommander/editor/pics/small/disabled/connecttool.png
new file mode 100644
index 00000000..173da192
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/connecttool.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/editbreaklayout.png b/kommander/editor/pics/small/disabled/editbreaklayout.png
new file mode 100644
index 00000000..17412eff
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/editbreaklayout.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/editcopy.png b/kommander/editor/pics/small/disabled/editcopy.png
new file mode 100644
index 00000000..0392669a
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/editcopy.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/editcut.xpm b/kommander/editor/pics/small/disabled/editcut.xpm
new file mode 100644
index 00000000..846287d2
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/editcut.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 4 1",
+" c Gray100",
+". c #848284",
+"X c Gray0",
+"o c none",
+/* pixels */
+"ooooooo.ooooo.oooooooo",
+"ooooooo. oooo. ooooooo",
+"ooooooo. oooo. ooooooo",
+"ooooooo. ooo.. ooooooo",
+"ooooooo..ooo. ooooooo",
+"oooooooo. oo. oooooooo",
+"oooooooo..o.. oooooooo",
+"ooooooooo... oooooooo",
+"ooooooooo... ooooooooo",
+"oooooooooo. ooooooooo",
+"oooooooooo. oooooooooo",
+"ooooooooo.o.oooooooooo",
+"oooooooo.. ...oooooooo",
+"ooooooo.o. . .ooooooo",
+"oooooo.o . . oo.oooooo",
+"ooooo.o o. . ooo.ooooo",
+"oooo.o oo. . ooo. oooo",
+"oooo. ooo. o.ooo. oooo",
+"oooo. ooo. o. o.o oooo",
+"oooo. oo.o oo..o ooooo",
+"ooooo...o oooo oooooo",
+"oooooo ooooooooooooo"
+};
diff --git a/kommander/editor/pics/small/disabled/editgrid.png b/kommander/editor/pics/small/disabled/editgrid.png
new file mode 100644
index 00000000..1eb30e07
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/editgrid.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/edithlayout.png b/kommander/editor/pics/small/disabled/edithlayout.png
new file mode 100644
index 00000000..bb347268
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/edithlayout.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/edithlayoutsplit.png b/kommander/editor/pics/small/disabled/edithlayoutsplit.png
new file mode 100644
index 00000000..be482a4a
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/edithlayoutsplit.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/editpaste.png b/kommander/editor/pics/small/disabled/editpaste.png
new file mode 100644
index 00000000..90a56778
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/editpaste.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/editslots.xpm b/kommander/editor/pics/small/disabled/editslots.xpm
new file mode 100644
index 00000000..872b7974
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/editslots.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 16 1",
+" c Gray100",
+". c #fefefe",
+"X c Gray99",
+"o c #c89a6d",
+"O c #c89544",
+"+ c #c58d52",
+"@ c #848284",
+"# c Gray0",
+"$ c none",
+"% c Gray0",
+"& c Gray0",
+"* c Gray0",
+"= c Gray0",
+"- c Gray0",
+"; c Gray0",
+": c Gray0",
+/* pixels */
+"$$$$$$$$$$$$$$$$$$$$$$",
+"$$$$$$$$$$$$$$$$$$$$$$",
+"$$$$$$$$$$$$$$$$$$$$$$",
+"$$$$$$$$$$$$$$$$$$$$$$",
+"$$$$$$@@@$$$$$$$$$$$$$",
+"$$$$$@@ @ $$$$$$$$$$$$",
+"$$$$@@ @ $$$@@@$$$$$$",
+"$$$@@ $@ $@@@ @@@$$$$",
+"$$$@ $$@ $@ $ @ $$$",
+"$$@@ $$$@ @@ $$$$@@$$$",
+"@@@ $$$@ @ $$$$$@@@@",
+"@@@ $$$$@ @ $$$$$$@@@@",
+"$ @@$$$$@ @@$$$$$@@ ",
+"$$$@ $$$@ $@ $$$$@ $$",
+"$$$@@$$$@ $@@@$@@@ $$$",
+"$$$$@@$$@ $$ @@@ $$$",
+"$$$$$@@$@ $$$$ $$$$$",
+"$$$$$$@@@ $$$$$$$$$$$$",
+"$$$$$$$ $$$$$$$$$$$$",
+"$$$$$$$$$$$$$$$$$$$$$$",
+"$$$$$$$$$$$$$$$$$$$$$$",
+"$$$$$$$$$$$$$$$$$$$$$$"
+};
diff --git a/kommander/editor/pics/small/disabled/editvlayout.png b/kommander/editor/pics/small/disabled/editvlayout.png
new file mode 100644
index 00000000..a5de1cdc
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/editvlayout.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/editvlayoutsplit.png b/kommander/editor/pics/small/disabled/editvlayoutsplit.png
new file mode 100644
index 00000000..fdce42d8
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/editvlayoutsplit.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/filesave.png b/kommander/editor/pics/small/disabled/filesave.png
new file mode 100644
index 00000000..0f09208f
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/filesave.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/layout.xpm b/kommander/editor/pics/small/disabled/layout.xpm
new file mode 100644
index 00000000..ccb40df0
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/layout.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 14 1",
+" c #676767676767",
+". c #6f6f6f6f6f6f",
+"X c #777777777777",
+"o c Gray50",
+"O c Gray53",
+"+ c Gray56",
+"@ c #979797979797",
+"# c #9f9f9f9f9f9f",
+"$ c #a7a7a7a7a7a7",
+"% c #afafafafafaf",
+"& c #b7b7b7b7b7b7",
+"* c Gray75",
+"= c Gray78",
+"- c Gray81",
+/* pixels */
+"**=======****========*",
+"==-------=***-=--=--==",
+"=-=-=-===****=========",
+"&%%%%%%%%%&&%%%%%%%%%&",
+"%+OOOOOOO@%%#OOOOOOO+%",
+"%OXXXXXXX+%%+XXXXXXXO$",
+"&$#######$&&$#######$&",
+"*&&&*&*&*&***&*&*&*&&*",
+"**==*===******==*==***",
+"==-----=-***=-=--=-===",
+"*=-------*&**=--===-==",
+"&&&&&&&&&%&&&&&%&&&%&&",
+"%@+++++++@%%#+++++++@%",
+"%+oooXoXo+%%@oooooooO%",
+"&$#######$&&%#######$&",
+"*&&&&&&&&&**&&&&&&&&&*",
+"*********&************",
+"*=-------***=-------=*",
+"*=-------**&==-----===",
+"&&&&&&&&&%&&&&&&&&&&&*",
+"&#+++++++@%%#+++++++#%",
+"%O.......O$%O... ...o$"
+};
diff --git a/kommander/editor/pics/small/disabled/left.xpm b/kommander/editor/pics/small/disabled/left.xpm
new file mode 100644
index 00000000..2d1323f4
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/left.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 4 1",
+" c Gray100",
+". c #848284",
+"X c Gray0",
+"o c none",
+/* pixels */
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo",
+"oooooooo..oooooooooooo",
+"ooooooo...oooooooooooo",
+"oooooo....oooooooooooo",
+"ooooo.....oooooooooooo",
+"oooo... ..oooooooooooo",
+"ooo...o ..oooooooooooo",
+"oo...oo ..............",
+"o...ooo ..............",
+"...oooo ..",
+"...oooooooooooooooo ..",
+" ...oooo..............",
+" ...oo ..............",
+"o ...o .. o",
+"oo ... ..oooooooooooo",
+"ooo .....oooooooooooo",
+"oooo ....oooooooooooo",
+"ooooo ...oooooooooooo",
+"oooooo ..oooooooooooo",
+"ooooooo ooooooooooooo",
+"oooooooooooooooooooooo"
+};
diff --git a/kommander/editor/pics/small/disabled/redo.png b/kommander/editor/pics/small/disabled/redo.png
new file mode 100644
index 00000000..198368f0
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/redo.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/right.xpm b/kommander/editor/pics/small/disabled/right.xpm
new file mode 100644
index 00000000..c9414419
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/right.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 4 1",
+" c Gray100",
+". c #848284",
+"X c Gray0",
+"o c none",
+/* pixels */
+"oooooooooooooooooooooo",
+"oooooooooooooooooooooo",
+"oooooooooooo..oooooooo",
+"oooooooooooo...ooooooo",
+"oooooooooooo....oooooo",
+"oooooooooooo.....ooooo",
+"oooooooooooo.. ...oooo",
+"oooooooooooo.. o...ooo",
+".............. oo...oo",
+".............. ooo...o",
+".. oooo...",
+".. oooooooooooooooo...",
+"..............oooo... ",
+".............. oo... ",
+"o .. o... o",
+"oooooooooooo.. ... oo",
+"oooooooooooo..... ooo",
+"oooooooooooo.... oooo",
+"oooooooooooo... ooooo",
+"oooooooooooo.. oooooo",
+"ooooooooooooo ooooooo",
+"oooooooooooooooooooooo"
+};
diff --git a/kommander/editor/pics/small/disabled/searchfind.png b/kommander/editor/pics/small/disabled/searchfind.png
new file mode 100644
index 00000000..5da4456a
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/searchfind.png
Binary files differ
diff --git a/kommander/editor/pics/small/disabled/undo.png b/kommander/editor/pics/small/disabled/undo.png
new file mode 100644
index 00000000..387cbe94
--- /dev/null
+++ b/kommander/editor/pics/small/disabled/undo.png
Binary files differ
diff --git a/kommander/editor/pics/small/editbreaklayout.png b/kommander/editor/pics/small/editbreaklayout.png
new file mode 100644
index 00000000..badbb8e7
--- /dev/null
+++ b/kommander/editor/pics/small/editbreaklayout.png
Binary files differ
diff --git a/kommander/editor/pics/small/editcopy.png b/kommander/editor/pics/small/editcopy.png
new file mode 100644
index 00000000..2f931cb2
--- /dev/null
+++ b/kommander/editor/pics/small/editcopy.png
Binary files differ
diff --git a/kommander/editor/pics/small/editcut.png b/kommander/editor/pics/small/editcut.png
new file mode 100644
index 00000000..a911482d
--- /dev/null
+++ b/kommander/editor/pics/small/editcut.png
Binary files differ
diff --git a/kommander/editor/pics/small/editdelete.xpm b/kommander/editor/pics/small/editdelete.xpm
new file mode 100644
index 00000000..2221114f
--- /dev/null
+++ b/kommander/editor/pics/small/editdelete.xpm
@@ -0,0 +1,226 @@
+/* XPM */
+static char * editdelete_xpm[] = {
+"22 22 201 2",
+" c None",
+". c #454545",
+"+ c #8B8B8B",
+"@ c #282828",
+"# c #464646",
+"$ c #6F6F6F",
+"% c #F7F7F7",
+"& c #FDFDFD",
+"* c #5A5A5A",
+"= c #C2C2C2",
+"- c #424242",
+"; c #F0F0F0",
+"> c #D7D7D7",
+", c #CDCDCD",
+"' c #EBEBEB",
+") c #CFCFCF",
+"! c #AAAAAA",
+"~ c #E5E5E5",
+"{ c #686868",
+"] c #F5F5F5",
+"^ c #C9C9C9",
+"/ c #313131",
+"( c #F4F4F4",
+"_ c #DCDCDC",
+": c #E0E0E0",
+"< c #E3E3E3",
+"[ c #D0D0D0",
+"} c #656363",
+"| c #B5B5B5",
+"1 c #A8A8A8",
+"2 c #252525",
+"3 c #F1F1F1",
+"4 c #B8B8B8",
+"5 c #E7E7E7",
+"6 c #B9B9B9",
+"7 c #D2D2D2",
+"8 c #B3B3B3",
+"9 c #E8E8E8",
+"0 c #9E9D9D",
+"a c #7A797A",
+"b c #676767",
+"c c #4E4E4E",
+"d c #161616",
+"e c #A5A4A4",
+"f c #B4B4B4",
+"g c #DFDFDF",
+"h c #8F8E8E",
+"i c #9F9F9E",
+"j c #F2F0EE",
+"k c #E7E2DF",
+"l c #D1CBC6",
+"m c #ACA39D",
+"n c #211F1E",
+"o c #F2F2F2",
+"p c #C1C1C1",
+"q c #D8D7D7",
+"r c #BEBEBE",
+"s c #EEEEEE",
+"t c #D1D1D1",
+"u c #C8C6C5",
+"v c #CCC8C4",
+"w c #D1CBC5",
+"x c #DCD2CA",
+"y c #E4D7CD",
+"z c #2E2B29",
+"A c #EFEEEE",
+"B c #E2DEDC",
+"C c #D7D2CE",
+"D c #D6CEC8",
+"E c #DBD1C8",
+"F c #E4D6CC",
+"G c #E6D6C8",
+"H c #2E2A27",
+"I c #ECECEC",
+"J c #A4A3A3",
+"K c #CDCDCC",
+"L c #A1A09F",
+"M c #BEBBB9",
+"N c #E4DED8",
+"O c #BAB3AD",
+"P c #9D958E",
+"Q c #B6ACA2",
+"R c #BAACA1",
+"S c #E3D0C0",
+"T c #2D2926",
+"U c #939291",
+"V c #C5C2C0",
+"W c #95918E",
+"X c #9E9893",
+"Y c #B8AFA7",
+"Z c #8F867F",
+"` c #978D83",
+" . c #CFBEAF",
+".. c #E1CCB9",
+"+. c #2D2824",
+"@. c #F3F3F3",
+"#. c #D1D0CF",
+"$. c #DFDBD8",
+"%. c #CEC8C2",
+"&. c #C5BEB7",
+"*. c #D3C8BE",
+"=. c #C3B6AC",
+"-. c #D1C1B4",
+";. c #D4C2B3",
+">. c #D2BDAB",
+",. c #DFC5B0",
+"'. c #2C2723",
+"). c #000000",
+"!. c #6E6E6E",
+"~. c #EFEDEC",
+"{. c #C5C1BE",
+"]. c #D8D1CC",
+"^. c #C4BBB4",
+"/. c #BAB0A7",
+"(. c #CABCB1",
+"_. c #B7A89C",
+":. c #C8B6A7",
+"<. c #CCB8A5",
+"[. c #C8B19D",
+"}. c #DBBFA7",
+"|. c #28231E",
+"1. c #333333",
+"2. c #6E6E6F",
+"3. c #808080",
+"4. c #6D6C6B",
+"5. c #E9E4E0",
+"6. c #99938F",
+"7. c #9B948E",
+"8. c #A39991",
+"9. c #9E9289",
+"0. c #AEA094",
+"a. c #BAA99A",
+"b. c #9A897B",
+"c. c #9D8A7A",
+"d. c #AC9582",
+"e. c #D9B99E",
+"f. c #38332E",
+"g. c #999999",
+"h. c #505050",
+"i. c #2D2D2D",
+"j. c #A4A4A4",
+"k. c #5E5E5F",
+"l. c #4B4B4B",
+"m. c #6C6A67",
+"n. c #F2EAE2",
+"o. c #F6EAE1",
+"p. c #F4E6DB",
+"q. c #F2E2D3",
+"r. c #F1DECD",
+"s. c #EFD8C5",
+"t. c #EDD4BE",
+"u. c #EBCFB7",
+"v. c #EACAB0",
+"w. c #E8C5A8",
+"x. c #D7B496",
+"y. c #2D2621",
+"z. c #818181",
+"A. c #7A7A7A",
+"B. c #707070",
+"C. c #4D4D4D",
+"D. c #444444",
+"E. c #4A4A4A",
+"F. c #575552",
+"G. c #B2AAA3",
+"H. c #B1A69E",
+"I. c #B0A399",
+"J. c #AD9D90",
+"K. c #AC998A",
+"L. c #AA9685",
+"M. c #A9927F",
+"N. c #A88F7A",
+"O. c #A68B73",
+"P. c #A3856C",
+"Q. c #25201B",
+"R. c #595959",
+"S. c #3A3A3A",
+"T. c #434343",
+"U. c #3F3F3F",
+"V. c #292929",
+"W. c #040404",
+"X. c #2B2B2B",
+"Y. c #545454",
+"Z. c #6D6D6D",
+"`. c #3D3D3D",
+" + c #212121",
+".+ c #898989",
+"++ c #272727",
+"@+ c #010101",
+"#+ c #787878",
+"$+ c #6A6A6A",
+"%+ c #606060",
+"&+ c #0B0B0B",
+"*+ c #555555",
+"=+ c #525252",
+"-+ c #868686",
+";+ c #515151",
+">+ c #0C0C0C",
+",+ c #777777",
+"'+ c #7C7C7C",
+")+ c #343434",
+"!+ c #171717",
+" ",
+" . + + + + + + + @ # ",
+" $ % & & & & & & * = - ",
+" $ ; > , ' ) ! ~ { ] ^ / ",
+" $ ( _ ' : < [ ; } | [ 1 2 ",
+" $ 3 4 5 6 7 8 9 0 a b c d ",
+" $ ' e f g ^ h i j k l m n ",
+" $ o p q r s t u v w x y z ",
+" $ ( 7 < [ A B C D E F G H ",
+" $ I J K L M N O P Q R S T ",
+" $ s 0 U V W X Y Z ` ...+. ",
+" $ @.#.$.%.&.*.=.-.;.>.,.'. ",
+" ).!.~.{.].^./.(._.:.<.[.}.|.). ",
+" 1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i. ",
+" ).j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.# z.A. ",
+" B.C.D.E.F.G.H.I.0.J.K.L.M.N.O.P.Q.- R.$ S.",
+" A.T.U.V.).).).).).).).).).).).).W.X.Y.Z.`.",
+" +.+++@+).).).).).).).).).).).).).W.. #+ ",
+" $+%+. ).).).).).).).).).).).).&+*+{ =+ ",
+" X.D.-+-+;+>+>+>+>+>+>+>+,+-+'+)+ ",
+" ).).D.A.A.A.A.A.A.A.!+).). ",
+" "};
diff --git a/kommander/editor/pics/small/editgrid.png b/kommander/editor/pics/small/editgrid.png
new file mode 100644
index 00000000..f2b18e8a
--- /dev/null
+++ b/kommander/editor/pics/small/editgrid.png
Binary files differ
diff --git a/kommander/editor/pics/small/edithlayout.png b/kommander/editor/pics/small/edithlayout.png
new file mode 100644
index 00000000..68e3c76a
--- /dev/null
+++ b/kommander/editor/pics/small/edithlayout.png
Binary files differ
diff --git a/kommander/editor/pics/small/edithlayoutsplit.png b/kommander/editor/pics/small/edithlayoutsplit.png
new file mode 100644
index 00000000..86c2cfdb
--- /dev/null
+++ b/kommander/editor/pics/small/edithlayoutsplit.png
Binary files differ
diff --git a/kommander/editor/pics/small/editlower.xpm b/kommander/editor/pics/small/editlower.xpm
new file mode 100644
index 00000000..43ca1ebc
--- /dev/null
+++ b/kommander/editor/pics/small/editlower.xpm
@@ -0,0 +1,113 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 85 1",
+" c #dede5a5a3939",
+". c #ffff5a5a3939",
+"X c #ffff63633939",
+"o c #dede6b6b5252",
+"O c #d6d673735a5a",
+"+ c #cece73736363",
+"@ c #cece7b7b6b6b",
+"# c #c6c67b7b7373",
+"$ c #d6d673736363",
+"% c #e7e763634242",
+"& c #e7e763634a4a",
+"* c #efef63634242",
+"= c #efef7b7b5a5a",
+"- c #f7f76b6b4a4a",
+"; c #ffff63634242",
+": c #ffff6b6b4242",
+"> c #ffff6b6b4a4a",
+", c #ffff73734a4a",
+"< c #ffff73735252",
+"1 c #ffff7b7b5a5a",
+"2 c #949484847b7b",
+"3 c #bdbd84847b7b",
+"4 c #cece84847373",
+"5 c #cece8c8c7b7b",
+"6 c #d6d684847373",
+"7 c #dede8c8c7b7b",
+"8 c #e7e784846b6b",
+"9 c #efef84846363",
+"0 c #efef8c8c7373",
+"q c #efef94947b7b",
+"w c #ffff84846363",
+"e c #ffff8c8c7373",
+"r c #ffff94947b7b",
+"t c #94948c8c8c8c",
+"y c #9c9c8c8c8c8c",
+"u c #9c9c94949494",
+"i c Gray61",
+"p c #b5b594949494",
+"a c #bdbda5a59c9c",
+"s c #a5a5a5a5a5a5",
+"d c #adada5a5a5a5",
+"f c #b5b5adadadad",
+"g c #bdbdadada5a5",
+"h c #bdbdb5b5b5b5",
+"j c #bdbdbdbdb5b5",
+"k c Gray74",
+"l c #cece8c8c8484",
+"z c #c6c694948c8c",
+"x c #cece94948c8c",
+"c c #cece9c9c8c8c",
+"v c #c6c69c9c9494",
+"b c #c6c69c9c9c9c",
+"n c #d6d69c9c8c8c",
+"m c #cecea5a59c9c",
+"M c #c6c6adada5a5",
+"N c #c6c6b5b5adad",
+"B c #c6c6b5b5b5b5",
+"V c #c6c6bdbdbdbd",
+"C c #efef9c9c8484",
+"Z c #efef9c9c8c8c",
+"A c #efefa5a59494",
+"S c #c0c0c0c0c0c0",
+"D c #c6c6c6c6c6c6",
+"F c #cecec6c6c6c6",
+"G c #cecececec6c6",
+"H c #d6d6cececece",
+"J c #d6d6d6d6cece",
+"K c #deded6d6d6d6",
+"L c #dedededed6d6",
+"P c #e7e7deded6d6",
+"I c #e7e7dededede",
+"U c #efefe7e7dede",
+"Y c #ffffefefdede",
+"T c #e7e7e7e7e7e7",
+"R c #efefe7e7e7e7",
+"E c #efefefefe7e7",
+"W c #f7f7efefe7e7",
+"Q c #ffffefefe7e7",
+"! c #f7f7f7f7efef",
+"~ c #fffff7f7efef",
+"^ c Gray97",
+"/ c #fffff7f7f7f7",
+"( c #fffffffff7f7",
+") c Gray100",
+"_ c None",
+/* pixels */
+"+&oO+$@#345zpzvk______",
+"=,<>>>,>:>>::> i______",
+"8>>>,>>,>,>>>,%u______",
+"6:>>>>>>>>>>>>%t______",
+"7:>>>>>>>>>>>,*t______",
+"l:>>:>>:>>:>>>*y______",
+"x>:>>>:;XXXXXX.2______",
+"c:>>::1AZCCq009ykkkhhk",
+"a;:>:;r)))^^(^^!ERUITs",
+"m>:>:Xe((((((((((((()d",
+"g>:;:;w(/~~~/~/~~/~~)d",
+"f-;>:;1~(~//~~~~/~(~)s",
+"N-:;;;<Q(~~~/~/~~~~~)f",
+"Bo;:;;<Y/~/~~~~~~~~~(j",
+"VMmbvnnU(~~~~~~~~~~~)j",
+"______kT/~~~~~~~~~~~(k",
+"______DK(~~~~~~~~~~~)j",
+"______kI~~~~~~~~~~~~(k",
+"______kK~~~~~~~~~!~~(j",
+"______DG/~~~!~~!~~~~(V",
+"_______K~~~~~~~~~~~~(V",
+"_______kGDkHFDKJHPKLWF"
+};
diff --git a/kommander/editor/pics/small/editpaste.png b/kommander/editor/pics/small/editpaste.png
new file mode 100644
index 00000000..e395fc76
--- /dev/null
+++ b/kommander/editor/pics/small/editpaste.png
Binary files differ
diff --git a/kommander/editor/pics/small/editraise.xpm b/kommander/editor/pics/small/editraise.xpm
new file mode 100644
index 00000000..4e563adf
--- /dev/null
+++ b/kommander/editor/pics/small/editraise.xpm
@@ -0,0 +1,110 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 82 1",
+" c #adad5a5a4a4a",
+". c #b5b55a5a4242",
+"X c #bdbd5a5a4242",
+"o c #adad63634a4a",
+"O c #a5a563635252",
+"+ c #adad63635252",
+"@ c #d6d652523939",
+"# c #d6d65a5a3939",
+"$ c #dede52523939",
+"% c #e7e74a4a2929",
+"& c #ffff5a5a3131",
+"* c #ffff5a5a3939",
+"= c #ffff63633939",
+"- c #cece5a5a4242",
+"; c #d6d65a5a4242",
+": c #d6d66b6b5a5a",
+"> c #dede6b6b5252",
+", c #d6d673735a5a",
+"< c #cece73736363",
+"1 c #d6d673736363",
+"2 c #dede7b7b6363",
+"3 c #e7e763634a4a",
+"4 c #efef73735252",
+"5 c #f7f76b6b4a4a",
+"6 c #ffff63634242",
+"7 c #ffff6b6b4242",
+"8 c #ffff6b6b4a4a",
+"9 c #ffff73734a4a",
+"0 c #f7f773735252",
+"q c #bdbd84847b7b",
+"w c #c6c684847373",
+"e c #c6c68c8c7b7b",
+"r c #d6d684847373",
+"t c #dede8c8c7b7b",
+"y c #e7e784846b6b",
+"u c #bdbd8c8c8484",
+"i c #b5b594948c8c",
+"p c #bdbd9c9c9c9c",
+"a c #a5a5a5a5a5a5",
+"s c #adada5a5a5a5",
+"d c Gray68",
+"f c #bdbdadada5a5",
+"g c Gray71",
+"h c #bdbdb5b5b5b5",
+"j c #bdbdbdbdb5b5",
+"k c Gray74",
+"l c #bdbdc6c6c6c6",
+"z c #cece8c8c8484",
+"x c #c6c694948c8c",
+"c c #cece94948484",
+"v c #cece9c9c8c8c",
+"b c #cecea5a59c9c",
+"n c #c6c6adada5a5",
+"m c #c6c6adadadad",
+"M c #c6c6b5b5adad",
+"N c #c6c6bdbdbdbd",
+"B c #f7f7a5a58c8c",
+"V c #ffffadad9c9c",
+"C c #ffffb5b5a5a5",
+"Z c #c6c6c6c6bdbd",
+"A c #d6d6c6c6b5b5",
+"S c #ffffc6c6b5b5",
+"D c #ffffcecebdbd",
+"F c #c0c0c0c0c0c0",
+"G c #c6c6c6c6c6c6",
+"H c #cecec6c6c6c6",
+"J c #cecececec6c6",
+"K c #cececececece",
+"L c #d6d6cececece",
+"P c #dedececec6c6",
+"I c #deded6d6cece",
+"U c #deded6d6d6d6",
+"Y c #e7e7deded6d6",
+"T c #efefdeded6d6",
+"R c #ffffd6d6cece",
+"E c #e7e7e7e7dede",
+"W c #efefefefe7e7",
+"Q c #fffff7f7efef",
+"! c #fffff7f7f7f7",
+"~ c #fffffffff7f7",
+"^ c Gray100",
+"/ c None",
+/* pixels */
+",3>:<1<wqweuixfN//////",
+"09987988787666Ok//////",
+"28888888888999+h//////",
+"y7888888888888og//////",
+"r7888888878889 h//////",
+"t7887887888789.g//////",
+"z8787878787878Xgk/////",
+"c7878878878787-gHZNjkd",
+"v7878787787877;E^~~~^a",
+"p7686786868687#U~~!!^s",
+"b7777867777768@I~QQQ^s",
+"f8687686868687@I~!!Q^a",
+"n6766767676767$P~QQQ^g",
+"m6676676667687$P~QQQ~j",
+"g24058666=***&%A~QQQ^k",
+"kjNhgMmnRDSCCVBT!QQQ^j",
+"///////l~^~^^~^!QQQQ~j",
+"///////JQQQQQQQQQQQQ~k",
+"///////kQQQQQQQQQQQQ~j",
+"///////kQQQQQQQQQQQQ~N",
+"///////NQQQQQQQQQQQQ~Z",
+"///////kkGkGKZLUKUYUWH"
+};
diff --git a/kommander/editor/pics/small/editslots.png b/kommander/editor/pics/small/editslots.png
new file mode 100644
index 00000000..b86bddb6
--- /dev/null
+++ b/kommander/editor/pics/small/editslots.png
Binary files differ
diff --git a/kommander/editor/pics/small/editvlayout.png b/kommander/editor/pics/small/editvlayout.png
new file mode 100644
index 00000000..f4cd3f9c
--- /dev/null
+++ b/kommander/editor/pics/small/editvlayout.png
Binary files differ
diff --git a/kommander/editor/pics/small/editvlayoutsplit.png b/kommander/editor/pics/small/editvlayoutsplit.png
new file mode 100644
index 00000000..0180cf5a
--- /dev/null
+++ b/kommander/editor/pics/small/editvlayoutsplit.png
Binary files differ
diff --git a/kommander/editor/pics/small/exec.png b/kommander/editor/pics/small/exec.png
new file mode 100644
index 00000000..14dc7455
--- /dev/null
+++ b/kommander/editor/pics/small/exec.png
Binary files differ
diff --git a/kommander/editor/pics/small/filenew.png b/kommander/editor/pics/small/filenew.png
new file mode 100644
index 00000000..9520080e
--- /dev/null
+++ b/kommander/editor/pics/small/filenew.png
Binary files differ
diff --git a/kommander/editor/pics/small/fileopen.png b/kommander/editor/pics/small/fileopen.png
new file mode 100644
index 00000000..30052901
--- /dev/null
+++ b/kommander/editor/pics/small/fileopen.png
Binary files differ
diff --git a/kommander/editor/pics/small/filesave.png b/kommander/editor/pics/small/filesave.png
new file mode 100644
index 00000000..c137165b
--- /dev/null
+++ b/kommander/editor/pics/small/filesave.png
Binary files differ
diff --git a/kommander/editor/pics/small/form.xpm b/kommander/editor/pics/small/form.xpm
new file mode 100644
index 00000000..02880b55
--- /dev/null
+++ b/kommander/editor/pics/small/form.xpm
@@ -0,0 +1,67 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 39 1",
+" c #4a4a9f9fffff",
+". c #53539f9ff6f6",
+"X c #4f4fa4a4ffff",
+"o c #5656a7a7fefe",
+"O c #5757adadffff",
+"+ c #5e5eafafffff",
+"@ c #5e5eb2b2ffff",
+"# c #6161aeaef7f7",
+"$ c #6060afaff8f8",
+"% c #bdbdc5c5c1c1",
+"& c #c0c0c0c0c0c0",
+"* c #c6c6d0d0cccc",
+"= c #cdcdd7d7d3d3",
+"- c #d1d1dcdcd7d7",
+"; c #d4d4dfdfdbdb",
+": c #d7d7e4e4dfdf",
+"> c #dadae5e5dfdf",
+", c #cecee2e2e8e8",
+"< c #d2d2e7e7efef",
+"1 c #d4d4e8e8efef",
+"2 c #dddde7e7e2e2",
+"3 c #dfdfecece7e7",
+"4 c #d7d7ececf4f4",
+"5 c #dadaefeff6f6",
+"6 c #dcdcf0f0f7f7",
+"7 c #dedef0f0fafa",
+"8 c #e2e2eeeee7e7",
+"9 c #e4e4efefeaea",
+"0 c #e7e7f3f3eeee",
+"q c #e8e8f0f0e6e6",
+"w c #efeff7f7ecec",
+"e c #e0e0f1f1fdfd",
+"r c #ececf7f7f2f2",
+"t c #efeffcfcf6f6",
+"y c #f1f1fafaefef",
+"u c #f7f7fffff6f6",
+"i c #f9f9fffff7f7",
+"p c Gray100",
+"a c None",
+/* pixels */
+"#$$$$$$$$$$+#+.+.+.+.#",
+"#+++O+oOoooXXoXoX .",
+"#@++++++++o+ooooooooo.",
+"<e777757444544414<<4,;",
+"ypiuuuuuuuuyyyywwwwqw8",
+"wtuttttrrr6wr00000999>",
+"9tttrtrrrrw0w00090999:",
+"2utrtrrrw6w0009098999;",
+"2trrrr6w6w00090899338-",
+">trrrww0w000908993838-",
+";tw6w6009090998938333;",
+">w6w0w000999989833223-",
+"2rw009099998333322323=",
+">009090899188332323>2=",
+";090998988832322322>3*",
+"-0098198383323232>>>2*",
+"-08388833332222:>:2::=",
+"*08883332323222:>::::=",
+"*9833323322>22:>>>:::*",
+";9232323>>:2:::::;:;:*",
+"-323222>222:>:::;:;->a",
+"*2>:>:::;:;;;;-;----;%"
+};
diff --git a/kommander/editor/pics/small/frame.png b/kommander/editor/pics/small/frame.png
new file mode 100644
index 00000000..c070b9c4
--- /dev/null
+++ b/kommander/editor/pics/small/frame.png
Binary files differ
diff --git a/kommander/editor/pics/small/groupbox.png b/kommander/editor/pics/small/groupbox.png
new file mode 100644
index 00000000..4025b4dc
--- /dev/null
+++ b/kommander/editor/pics/small/groupbox.png
Binary files differ
diff --git a/kommander/editor/pics/small/help.png b/kommander/editor/pics/small/help.png
new file mode 100644
index 00000000..35394010
--- /dev/null
+++ b/kommander/editor/pics/small/help.png
Binary files differ
diff --git a/kommander/editor/pics/small/home.xpm b/kommander/editor/pics/small/home.xpm
new file mode 100644
index 00000000..f88530dc
--- /dev/null
+++ b/kommander/editor/pics/small/home.xpm
@@ -0,0 +1,160 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 132 2",
+" c Gray0",
+". c #080800000000",
+"X c #080808080000",
+"o c #080810100808",
+"O c #101010100000",
+"+ c #292921210000",
+"@ c #313129290000",
+"# c #393929290000",
+"$ c #393931310000",
+"% c #393939390808",
+"& c #393939391010",
+"* c #393931312929",
+"= c #313139393131",
+"- c #4a4a42420808",
+"; c #525252521818",
+": c #424242423131",
+"> c #424242423939",
+", c #42424a4a3131",
+"< c #52525a5a2121",
+"1 c #636352520000",
+"2 c #63635a5a0808",
+"3 c #6b6b5a5a0000",
+"4 c #6b6b5a5a1010",
+"5 c #737373731818",
+"6 c #63636b6b2121",
+"7 c #6b6b73732121",
+"8 c #737373732929",
+"9 c #73737b7b2929",
+"0 c #7b7b7b7b2121",
+"q c #7b7b7b7b2929",
+"w c #42424a4a4a4a",
+"e c #4a4a42424242",
+"r c Gray29",
+"t c #4a4a52525252",
+"y c #52524a4a4a4a",
+"u c #5a5a52524a4a",
+"i c Gray32",
+"p c #5a5a5a5a5252",
+"a c #525263635a5a",
+"s c #636363635a5a",
+"d c Gray39",
+"f c #63636b6b6363",
+"g c #6b6b6b6b6363",
+"h c Gray42",
+"j c #73736b6b6363",
+"k c #73736b6b6b6b",
+"l c #7b7b73736b6b",
+"z c Gray45",
+"x c #7b7b73737373",
+"c c #7b7b7b7b7373",
+"v c #7b7b7b7b7b7b",
+"b c #7b7b84847b7b",
+"n c #8c8c7b7b0808",
+"m c #84847b7b1818",
+"M c #8c8c7b7b1010",
+"N c #84847b7b7373",
+"B c #8c8c84841818",
+"V c #949484840808",
+"C c #848484842929",
+"Z c #848484843939",
+"A c #949484842121",
+"S c #a5a594942121",
+"D c #adad9c9c2121",
+"F c #b5b5a5a50808",
+"G c #b5b5a5a51818",
+"H c #b5b5a5a52121",
+"J c #bdbdadad2929",
+"K c #bdbdadad3131",
+"L c #8c8c94945252",
+"P c #949494944a4a",
+"I c #949494945252",
+"U c #94949c9c5a5a",
+"Y c #8c8c8c8c6b6b",
+"T c #848484847b7b",
+"R c #8c8c84847b7b",
+"E c #9c9c9c9c6363",
+"W c #9c9c9c9c6b6b",
+"Q c #a5a5a5a57373",
+"! c #cecebdbd2121",
+"~ c #c6c6b5b53131",
+"^ c #c6c6b5b53939",
+"/ c #cecec6c63131",
+"( c #d6d6c6c63131",
+") c #e7e7d6d61818",
+"_ c #f7f7dede1818",
+"` c #e7e7d6d63939",
+"' c #efefdede3131",
+"] c #efefdede3939",
+"[ c #f7f7e7e71818",
+"{ c #ffffe7e71818",
+"} c #848484848484",
+"| c #84848c8c8484",
+" . c #8c8c84848484",
+".. c #8c8c8c8c8484",
+"X. c Gray55",
+"o. c #94948c8c8484",
+"O. c #949494948484",
+"+. c #949494948c8c",
+"@. c #9c9c94948c8c",
+"#. c #9c9c9c9c8c8c",
+"$. c #9c9c9c9c9494",
+"%. c Gray61",
+"&. c #9c9ca5a59c9c",
+"*. c #9c9cadada5a5",
+"=. c #a5a594948c8c",
+"-. c #a5a59c9c9494",
+";. c #a5a59c9c9c9c",
+":. c #a5a5a5a59c9c",
+">. c #adada5a59c9c",
+",. c #b5b5a5a59c9c",
+"<. c #a5a5a5a5a5a5",
+"1. c #a5a5adada5a5",
+"2. c #a5a5adadadad",
+"3. c #adadadada5a5",
+"4. c Gray68",
+"5. c #adadb5b5adad",
+"6. c #a5a5bdbdb5b5",
+"7. c #adadb5b5b5b5",
+"8. c #b5b5adada5a5",
+"9. c Gray71",
+"0. c #b5b5bdbdb5b5",
+"q. c #bdbdb5b5b5b5",
+"w. c #bdbdbdbdb5b5",
+"e. c Gray74",
+"r. c #adadc6c6bdbd",
+"t. c #bdbdc6c6bdbd",
+"y. c #c0c0c0c0c0c0",
+"u. c #c6c6d6d6cece",
+"i. c #c6c6deded6d6",
+"p. c #cecededed6d6",
+"a. c #d6d6e7e7e7e7",
+"s. c None",
+/* pixels */
+"s.s.s.s.s.s.s.s.s.s.3.%.s.s.s.s.s.s.s.s.s.s.",
+"s.s.s.s.s.s.s.s.s.9.e.| 4.s.s.s.s.s.s.s.s.s.",
+"s.s.s.s.s.s.s.s.e.:.p.&.g e.s.s.s.s.s.s.s.s.",
+"s.s.s.s.s.s.s.s.<.2.5.R t } s.s.s.s.s.s.s.s.",
+"s.s.s.s.s.s.s.9.&.6.&. .d t %.s.s.s.s.s.s.s.",
+"s.s.s.s.s.s.e.;.>.1.i.&.l p y 9.s.s.s.s.s.s.",
+"s.s.s.s.s.s.%.-.-.3.a.>.N s e d e.s.s.s.s.s.",
+"s.s.s.s.s.4.| 6.t.2.:.:.N i a w X.s.s.s.s.s.",
+"s.s.s.s.e.+.*.r.5.1.%...b s f a = <.s.s.s.s.",
+"s.s.s.e.$.=.>.@.;.0.u.-.:.k j u * r 9.s.s.s.",
+"s.s.s.4.o.1.8.>.3.u.a.,.8.x g g y = } s.s.s.",
+"s.s.s.e.7.1.v k z b T R c s : * z 4.e.s.s.s.",
+"s.s.s.s.s.9.4 1 - $ + O O . O X c s.s.s.s.s.",
+"s.s.s.s.s.w.! [ ] ` / D M 2 @ O c s.s.s.s.s.",
+"s.s.s.s.s.e.~ ) ' ] ] ( H V 3 @ c s.s.s.s.s.",
+"s.s.s.s.s.e.~ ) ' K A S G M 1 @ v s.s.s.s.s.",
+"s.s.s.s.s.e.^ _ D O O 4 n 2 $ T s.s.s.s.s.",
+"s.s.s.s.s.q.J _ m O X @ M 3 # > h v s.s.s.",
+"s.s.s.s.e.Y F { B X % M 3 @ . O , s.s.s.",
+"s.s.s.t.O.6 B ) B o & < 0 n 2 - ; 9 Y s.s.s.",
+"s.s.s.#.7 9 q C C 8 9 9 9 5 8 q C q O.s.s.s.",
+"s.s.s.Q W W W E E U U L I L P P P Z :.s.s.s."
+};
diff --git a/kommander/editor/pics/small/iconview.png b/kommander/editor/pics/small/iconview.png
new file mode 100644
index 00000000..13b8f153
--- /dev/null
+++ b/kommander/editor/pics/small/iconview.png
Binary files differ
diff --git a/kommander/editor/pics/small/image.xpm b/kommander/editor/pics/small/image.xpm
new file mode 100644
index 00000000..f122e2b4
--- /dev/null
+++ b/kommander/editor/pics/small/image.xpm
@@ -0,0 +1,226 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 198 2",
+" c Gray3",
+". c #080808081010",
+"X c #101010101010",
+"o c #101018181818",
+"O c #181818181818",
+"+ c #181818182121",
+"@ c #181821212121",
+"# c #181821212929",
+"$ c #292921211010",
+"% c #292921211818",
+"& c Gray13",
+"* c #212121212929",
+"= c Gray16",
+"- c #313131313131",
+"; c #313139394242",
+": c #393942424242",
+"> c #424231312929",
+", c #424242423131",
+"< c #424242423939",
+"1 c #4a4a42423939",
+"2 c #4a4a4a4a3131",
+"3 c #4a4a4a4a3939",
+"4 c #63635a5a3939",
+"5 c #6b6b5a5a3939",
+"6 c #4a4a4a4a4242",
+"7 c Gray29",
+"8 c #52524a4a4a4a",
+"9 c #5a5a4a4a4242",
+"0 c #5a5a52524a4a",
+"q c #5a5a5a5a4242",
+"w c #5a5a5a5a4a4a",
+"e c Gray32",
+"r c #5a5a52525252",
+"t c #5a5a5a5a5252",
+"y c #5a5a5a5a5a5a",
+"u c #4a4a52526363",
+"i c #63635a5a5a5a",
+"p c #6b6b6b6b5252",
+"a c #737363635a5a",
+"s c #7b7b73735252",
+"d c Gray39",
+"f c #6b6b63636363",
+"g c #6b6b6b6b6363",
+"h c Gray42",
+"j c #6b6b73737b7b",
+"k c #73736b6b6363",
+"l c #73736b6b6b6b",
+"z c #737373736b6b",
+"x c #7b7b73737373",
+"c c #7b7b7b7b7b7b",
+"v c #6b6b73738484",
+"b c #84847b7b5a5a",
+"n c #a5a573735252",
+"m c #b5b57b7b5252",
+"M c #9c9c84845252",
+"N c #9c9c84845a5a",
+"B c #848484846b6b",
+"V c #8c8c84846b6b",
+"C c #949484847b7b",
+"Z c #94948c8c7b7b",
+"A c #9c9c8c8c7b7b",
+"S c #949494947373",
+"D c #9c9ca5a57b7b",
+"F c #adad84845a5a",
+"G c #bdbd8c8c5a5a",
+"H c #a5a58c8c6363",
+"J c #adad8c8c6363",
+"K c #adad9c9c6b6b",
+"L c #a5a59c9c7b7b",
+"P c #bdbda5a56b6b",
+"I c #b5b5a5a57373",
+"U c #bdbdadad7373",
+"Y c #cecea5a56b6b",
+"T c #ceceadad6b6b",
+"R c #c6c6adad7b7b",
+"E c #ceceadad7b7b",
+"W c #ceceb5b57373",
+"Q c #848484848484",
+"! c #848484848c8c",
+"~ c #8c8c8c8c8484",
+"^ c #8c8c8c8c9494",
+"/ c #8c8c94948c8c",
+"( c #8c8c94949c9c",
+") c #949494948c8c",
+"_ c #9c9c9c9c8c8c",
+"` c #949494949c9c",
+"' c #9c9c94949494",
+"] c Gray61",
+"[ c #9c9ca5a5adad",
+"{ c #9c9ca5a5b5b5",
+"} c #a5a594948484",
+"| c #a5a59c9c8c8c",
+" . c #a5a59c9c9494",
+".. c #a5a59c9c9c9c",
+"X. c #a5a5a5a58c8c",
+"o. c #a5a5a5a59c9c",
+"O. c #adada5a59c9c",
+"+. c #b5b5a5a58c8c",
+"@. c #bdbdadad9494",
+"#. c #b5b5b5b59c9c",
+"$. c #bdbdbdbd9c9c",
+"%. c #a5a5a5a5a5a5",
+"&. c #a5a5a5a5adad",
+"*. c #a5a5adadadad",
+"=. c #adadadada5a5",
+"-. c Gray68",
+";. c #adadadadb5b5",
+":. c #b5b5adada5a5",
+">. c #b5b5adadadad",
+",. c #b5b5b5b5adad",
+"<. c #bdbdb5b5a5a5",
+"1. c #bdbdbdbda5a5",
+"2. c Gray71",
+"3. c #b5b5bdbdb5b5",
+"4. c #bdbdb5b5b5b5",
+"5. c #bdbdbdbdb5b5",
+"6. c Gray74",
+"7. c #adadbdbdc6c6",
+"8. c #b5b5bdbdc6c6",
+"9. c #bdbdc6c6b5b5",
+"0. c #bdbdc6c6c6c6",
+"q. c #ceceb5b58484",
+"w. c #d6d6bdbd8484",
+"e. c #dedebdbd8484",
+"r. c #d6d6b5b59494",
+"t. c #dedeb5b59494",
+"y. c #c6c6bdbda5a5",
+"u. c #cecebdbda5a5",
+"i. c #efefb5b58484",
+"p. c #efefbdbd8484",
+"a. c #efefbdbd8c8c",
+"s. c #e7e7b5b59494",
+"d. c #efefbdbd9494",
+"f. c #f7f7bdbd8484",
+"g. c #f7f7bdbd8c8c",
+"h. c #c6c6c6c68c8c",
+"j. c #d6d6c6c68c8c",
+"k. c #deded6d68c8c",
+"l. c #deded6d69494",
+"z. c #c6c6c6c6adad",
+"x. c #dedededea5a5",
+"c. c #efefc6c68c8c",
+"v. c #e7e7c6c69494",
+"b. c #e7e7dede9494",
+"n. c #e7e7dede9c9c",
+"m. c #f7f7cece8c8c",
+"M. c #f7f7d6d69c9c",
+"N. c #e7e7dedeadad",
+"B. c #e7e7e7e7a5a5",
+"V. c #efefe7e7a5a5",
+"C. c #efefe7e7adad",
+"Z. c #efefefefa5a5",
+"A. c #efefefefb5b5",
+"S. c #f7f7efefadad",
+"D. c #f7f7efefb5b5",
+"F. c #f7f7f7f7b5b5",
+"G. c #f7f7f7f7bdbd",
+"H. c #c0c0c0c0c0c0",
+"J. c #c6c6c6c6c6c6",
+"K. c #c6c6c6c6cece",
+"L. c #c6c6cececece",
+"P. c #cecec6c6c6c6",
+"I. c #cecececec6c6",
+"U. c #cececececece",
+"Y. c #ceced6d6cece",
+"T. c #ceced6d6dede",
+"R. c #d6d6cecec6c6",
+"E. c #d6d6d6d6c6c6",
+"W. c #d6d6d6d6cece",
+"Q. c #deded6d6c6c6",
+"!. c #deded6d6cece",
+"~. c #dedededec6c6",
+"^. c Gray84",
+"/. c #d6d6dededede",
+"(. c #deded6d6d6d6",
+"). c #dedededed6d6",
+"_. c Gray87",
+"`. c #dedededee7e7",
+"'. c #e7e7e7e7dede",
+"]. c #efefe7e7d6d6",
+"[. c #efefe7e7dede",
+"{. c #f7f7f7f7d6d6",
+"}. c #ffffffffdede",
+"|. c #e7e7e7e7e7e7",
+" X c #e7e7e7e7efef",
+".X c #e7e7efefefef",
+"XX c #efefefefefef",
+"oX c #e7e7efeff7f7",
+"OX c #efefefeff7f7",
+"+X c #efeff7f7f7f7",
+"@X c #f7f7efefefef",
+"#X c Gray97",
+"$X c #f7f7f7f7ffff",
+"%X c #f7f7ffffffff",
+"&X c #fffff7f7f7f7",
+"*X c #fffffffff7f7",
+"=X c Gray100",
+"-X c None",
+/* pixels */
+"u.c.n.x.B.A.A.S.D.F.G.F.S.M.p.g.Z.V.B.n.Z.N.",
+"r.W < 0 Z R.W.=.E.;._ !.W.].[.[.[.'.Y./ D C.",
+"t.U @ + 6 Q %.2.0.2.-.J.K.`.=X=X=X=X=XOX~.x.",
+"s.P * O k ^.&X#XXX`.^.J.3.2.).=X=X=X=X=X}.n.",
+"t.G * & = k W.|.|.XX|.^.J.&.] Q ~ >.^.XX{.l.",
+"s.m * O O - 7 e l ..I.=X=X+XJ.j + X + s V.",
+"d.J % Q ! r c z -.*.x [.=XXX^.L.` 5.( : q n.",
+"v.J o C *X.X@X=X=X%X` Q.=X=X=X=X=X=X=X=XY.B.",
+"a.F @ = k ,.^.U.=X7.7 Q.=X=X=X=X=X=X=X$X9.l.",
+"g.n @ & r :._.0.U.u % ./.6.).=X=X=X=XoX~ k.",
+"i.N . a @X%X X6.-.j d i O.|.&X=X=X+X#X{ w b.",
+"f.M 8 !.%X] h y ) %.o.#X=X|.U.J.U.(.[ # 2 V.",
+"f.q.).#X#XT.! R.=X=X;...^ e f ~ P.|.|.v , Z.",
+"m.K : x 4.[ _ @X=X=X=X%X$X`.[ h =.8.c ; 3 N.",
+"Y N 4 b S V X.$.#.<.z.y.1.| 9 5 L | B w p h.",
+"&.%.%.%.%.%.~ $ Q %.< 1 %.g > ' ..] ] ] ] o.",
+"-X-X-X-X-X-X<.H 5.-X6 y -X>.T =.-X-X-X-X-X-X",
+"-X-X-X-X-X6.j.} -X-X8 i -X6.e.@.-X-X-X-X-X-X",
+"-X-X-X-X-X5.W %.-X-X8 i -X-X@.W 6.-X-X-X-X-X",
+"-X-X-X-X-Xy.I 2.-X-X8 i -X-X,.e.=.-X-X-X-X-X",
+"-X-X-X-X6.j.A -X-X-X8 i -X-X5.w.+.-X-X-X-X-X",
+"-X-X-X-X5.E ..-X-X-Xt g -X-X-X@.R 6.-X-X-X-X"
+};
diff --git a/kommander/editor/pics/small/konsole.png b/kommander/editor/pics/small/konsole.png
new file mode 100644
index 00000000..3e60f289
--- /dev/null
+++ b/kommander/editor/pics/small/konsole.png
Binary files differ
diff --git a/kommander/editor/pics/small/label.png b/kommander/editor/pics/small/label.png
new file mode 100644
index 00000000..5d7d7b4c
--- /dev/null
+++ b/kommander/editor/pics/small/label.png
Binary files differ
diff --git a/kommander/editor/pics/small/layout.xpm b/kommander/editor/pics/small/layout.xpm
new file mode 100644
index 00000000..03968e26
--- /dev/null
+++ b/kommander/editor/pics/small/layout.xpm
@@ -0,0 +1,121 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 93 2",
+" c #212108080000",
+". c #292908080000",
+"X c #313108080000",
+"o c #313108080808",
+"O c #313110100808",
+"+ c #313110101010",
+"@ c #313118181010",
+"# c #393918181010",
+"$ c #393921211818",
+"% c #424229292121",
+"& c #4a4a31312929",
+"* c #4a4a31313131",
+"= c #525239393131",
+"- c #636310100000",
+"; c #6b6b10100000",
+": c #6b6b10100808",
+"> c #6b6b18180808",
+", c #737318180808",
+"< c #636321211010",
+"1 c #6b6b21211010",
+"2 c #6b6b29291818",
+"3 c #737321211010",
+"4 c #737331312929",
+"5 c #7b7b31312929",
+"6 c #7b7b42423131",
+"7 c #636352524a4a",
+"8 c #737363636363",
+"9 c #b5b539392121",
+"0 c #b5b539392929",
+"q c #bdbd39392121",
+"w c #bdbd39392929",
+"e c #848442423939",
+"r c #adad42423131",
+"t c #bdbd42422929",
+"y c #b5b542423131",
+"u c #b5b54a4a3131",
+"i c #b5b54a4a3939",
+"p c #bdbd42423131",
+"a c #bdbd4a4a3131",
+"s c #bdbd4a4a3939",
+"d c #8c8c52524a4a",
+"f c #adad52524242",
+"g c #b5b552524242",
+"h c #b5b552524a4a",
+"j c #bdbd52524242",
+"k c #bdbd52524a4a",
+"l c #adad63635252",
+"z c #adad6b6b5a5a",
+"x c #bdbd63635252",
+"c c #adad73736363",
+"v c #b5b56b6b6363",
+"b c #b5b57b7b7373",
+"n c #c6c642422929",
+"m c #c6c642423131",
+"M c #cece42423131",
+"N c #dede6b6b5a5a",
+"B c #dede7b7b6b6b",
+"V c #f7f75a5a4242",
+"C c #ffff5a5a4242",
+"Z c #efef63634a4a",
+"A c #e7e76b6b5a5a",
+"S c #efef6b6b5a5a",
+"D c #ffff63634242",
+"F c #ffff63634a4a",
+"G c #ffff6b6b4a4a",
+"H c #ffff6b6b5252",
+"J c #f7f773735a5a",
+"K c #ffff73735252",
+"L c #ffff73735a5a",
+"P c #e7e773736363",
+"I c #e7e77b7b6363",
+"U c #efef7b7b6363",
+"Y c #f7f77b7b6363",
+"T c #f7f77b7b6b6b",
+"R c #ffff7b7b6363",
+"E c #b5b584847b7b",
+"W c #dede84847373",
+"Q c #e7e784846b6b",
+"! c #efef8c8c7b7b",
+"~ c #f7f784846b6b",
+"^ c #ffff84846363",
+"/ c #ffff84846b6b",
+"( c #f7f784847373",
+") c #a5a5a5a5a5a5",
+"_ c Gray68",
+"` c Gray71",
+"' c #bdbdb5b5b5b5",
+"] c Gray74",
+"[ c #dede94948484",
+"{ c #c6c6bdbdbdbd",
+"} c #c0c0c0c0c0c0",
+"| c #c6c6c6c6c6c6",
+" . c None",
+/* pixels */
+" .j q w w w w q q p ] ] g q q w q w q q s .",
+" .Y L K L K L K L J ] { P H H H H H H G J .",
+" .T R R R R R R R Y ] ] B R L J L J L J J .",
+" .u 0 0 0 0 0 0 9 r ' ] f 9 0 0 0 9 0 9 y .",
+" .2 : - > : - : : < ] ] 4 - : - > : : : < .",
+" .* O O + ] ] & % .",
+" .` ) _ _ ) _ ) ) _ ] | _ ) _ _ _ _ _ ) _ .",
+" . . . . . . . . . . . . . . . . . . . . . .",
+" .b g h h h h h g l ] ] z g g h g h g g c .",
+" .P F Z D G V G V Z ` | N D V V V V V V S .",
+" .! / / / / / ^ / U ` ] Q R ^ R ^ R R R ~ .",
+" .x n m m m t m n s ` ] h m m t m t n t j .",
+" .6 > > > > , > > 1 ` | 5 ; > > : > > : 5 .",
+" .7 . o X O o O . $ ` ] & o O o O o O . = .",
+" .` _ _ _ _ _ _ _ _ ] | _ _ _ _ _ _ _ _ ` .",
+" . . . . . . . . . . . . . . . . . . . . . .",
+" .E r i f i i i i f ' ] l i i i i i i r c .",
+" .W F Z F G Z F F Z ` ] A V Z Z D Z D C I .",
+" .[ / / / / / / / T ` | Q / R R R R R R ( .",
+" .v M m m m m m m a ` ] k n m n m n m t k .",
+" .d , , , , , , , 3 ` ] 5 , , , > , > , e .",
+" .8 . @ # @ # @ + $ ` ] = O + # # # # O 7 ."
+};
diff --git a/kommander/editor/pics/small/lcdnumber.png b/kommander/editor/pics/small/lcdnumber.png
new file mode 100644
index 00000000..64eda5e4
--- /dev/null
+++ b/kommander/editor/pics/small/lcdnumber.png
Binary files differ
diff --git a/kommander/editor/pics/small/left.xpm b/kommander/editor/pics/small/left.xpm
new file mode 100644
index 00000000..1936290c
--- /dev/null
+++ b/kommander/editor/pics/small/left.xpm
@@ -0,0 +1,141 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 113 2",
+" c #08082929efef",
+". c #00002929ffff",
+"X c #08082929f7f7",
+"o c #08083131ffff",
+"O c #10102929e7e7",
+"+ c #10102929ffff",
+"@ c #18183131e7e7",
+"# c #18183939e7e7",
+"$ c #10103131ffff",
+"% c #10103939ffff",
+"& c #21213939e7e7",
+"* c #10104242ffff",
+"= c #18184242ffff",
+"- c #29294242dede",
+"; c #31314242d6d6",
+": c #39395252dede",
+"> c #21214242e7e7",
+", c #29294242e7e7",
+"< c #21215252ffff",
+"1 c #29295252ffff",
+"2 c #29295a5affff",
+"3 c #31316363ffff",
+"4 c #39396363ffff",
+"5 c #39396b6bffff",
+"6 c #5a5a6b6bbdbd",
+"7 c #6b6b7373b5b5",
+"8 c #42425252c6c6",
+"9 c #4a4a5a5acece",
+"0 c #42425252d6d6",
+"q c #52526363c6c6",
+"w c #5a5a6b6bc6c6",
+"e c #42426363e7e7",
+"r c #42426b6bffff",
+"t c #42427373efef",
+"y c #42427373ffff",
+"u c #4a4a7373ffff",
+"i c #4a4a7b7bffff",
+"p c #7b7b8484b5b5",
+"a c #52528484ffff",
+"s c #5a5a8c8cffff",
+"d c #6b6b8c8cdede",
+"f c #7b7b8484c6c6",
+"g c #7b7b8c8cc6c6",
+"h c #7b7b8c8ccece",
+"j c #73738c8cd6d6",
+"k c #7b7b8c8cd6d6",
+"l c #7b7b9494d6d6",
+"z c #7b7b9c9cd6d6",
+"x c #63638484efef",
+"c c #63638c8cffff",
+"v c #6b6b9494efef",
+"b c #63639494ffff",
+"n c #63639c9cffff",
+"m c #6b6b9c9cffff",
+"M c #73739494e7e7",
+"N c #73739c9ce7e7",
+"B c #73739c9cf7f7",
+"V c #7373a5a5ffff",
+"C c #7b7badadffff",
+"Z c #7b7bb5b5ffff",
+"A c #84849494bdbd",
+"S c #8c8c9494bdbd",
+"D c #94949494adad",
+"F c #94949494b5b5",
+"G c #94949c9cbdbd",
+"H c #9c9c9c9cbdbd",
+"J c #9c9ca5a5b5b5",
+"K c Gray68",
+"L c #a5a5a5a5bdbd",
+"P c #adadadadb5b5",
+"I c #adadadadbdbd",
+"U c #b5b5b5b5bdbd",
+"Y c #b5b5bdbdbdbd",
+"T c Gray74",
+"R c #84849494c6c6",
+"E c #8c8c9c9cc6c6",
+"W c #8484a5a5efef",
+"Q c #8c8ca5a5e7e7",
+"! c #8484adadffff",
+"~ c #8c8cb5b5efef",
+"^ c #8484b5b5ffff",
+"/ c #8484bdbdffff",
+"( c #8c8cbdbdffff",
+") c #9c9cb5b5f7f7",
+"_ c #9c9cbdbdf7f7",
+"` c #adadadadc6c6",
+"' c #b5b5b5b5c6c6",
+"] c #b5b5bdbdc6c6",
+"[ c #bdbdbdbdc6c6",
+"{ c #adadbdbdefef",
+"} c #9494c6c6ffff",
+"| c #9494ceceffff",
+" . c #9c9cceceffff",
+".. c #a5a5d6d6ffff",
+"X. c #adaddedeffff",
+"o. c #bdbdcecef7f7",
+"O. c #b5b5dedeffff",
+"+. c #bdbdd6d6ffff",
+"@. c #adade7e7ffff",
+"#. c #bdbde7e7ffff",
+"$. c #c0c0c0c0c0c0",
+"%. c #cecededef7f7",
+"&. c #c6c6e7e7ffff",
+"*. c #c6c6efefffff",
+"=. c #cecee7e7ffff",
+"-. c #d6d6e7e7ffff",
+";. c #dedee7e7ffff",
+":. c #d6d6ffffffff",
+">. c #dedeffffffff",
+",. c #efefffffffff",
+"<. c #f7f7ffffffff",
+"1. c Gray100",
+"2. c None",
+/* pixels */
+"2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.G Q k U 2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.F ) 1.{ ' 2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.T E o.1.>.~ U 2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.T S -.1.:...N ] 2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.T R %.1.:. .( M U 2.2.2.2.2.2.2.2.2.2.2.",
+"2.U g ;.1.&.} ^ Z B F T [ Y ' H R g j M j L ",
+"[ h -.1.*./ C C C m t d l z W _ X.=.*.#.n 0 ",
+"A +.<.*.} ! C V V V C ..O.#.&.O.X. .( C 5 , ",
+"W ,.@.( C C V V V V C C ! C V V V m m b 2 > ",
+"c | ^ ! C V V V V V V V m m m m m b b s 1 # ",
+"q 1 s m V m m m V m u 4 5 y i a a s a a < , ",
+"K ; * u b m m m V b + O @ X $ = = < 1 % - ",
+"2.J - = r c b m m c 7 J I D f 6 8 ; - , - p ",
+"2.2.U 0 o 3 a b b v U 2.2.2.2.2.2.T U U U 2.",
+"2.2.2.P 9 o 3 s s x I 2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.Y w o 2 y e I 2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.T 7 . * , ` 2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.T p & : U 2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2."
+};
diff --git a/kommander/editor/pics/small/line.png b/kommander/editor/pics/small/line.png
new file mode 100644
index 00000000..5c64dfb5
--- /dev/null
+++ b/kommander/editor/pics/small/line.png
Binary files differ
diff --git a/kommander/editor/pics/small/lineedit.png b/kommander/editor/pics/small/lineedit.png
new file mode 100644
index 00000000..dafdfdf3
--- /dev/null
+++ b/kommander/editor/pics/small/lineedit.png
Binary files differ
diff --git a/kommander/editor/pics/small/listbox.png b/kommander/editor/pics/small/listbox.png
new file mode 100644
index 00000000..d467fc9f
--- /dev/null
+++ b/kommander/editor/pics/small/listbox.png
Binary files differ
diff --git a/kommander/editor/pics/small/listview.png b/kommander/editor/pics/small/listview.png
new file mode 100644
index 00000000..d71cc1c9
--- /dev/null
+++ b/kommander/editor/pics/small/listview.png
Binary files differ
diff --git a/kommander/editor/pics/small/multilineedit.png b/kommander/editor/pics/small/multilineedit.png
new file mode 100644
index 00000000..e2f08995
--- /dev/null
+++ b/kommander/editor/pics/small/multilineedit.png
Binary files differ
diff --git a/kommander/editor/pics/small/newform.xpm b/kommander/editor/pics/small/newform.xpm
new file mode 100644
index 00000000..d8e9bc4b
--- /dev/null
+++ b/kommander/editor/pics/small/newform.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * newform_xpm[] = {
+"34 26 6 1",
+" c None",
+". c #FFFFFF",
+"+ c #000000",
+"@ c #0000FF",
+"# c #C0C0C0",
+"$ c #808080",
+"..................................",
+".+++++++++++++++++++++++++++++++..",
+".+@@@@@@@@@@@@@@@@@@@@@@@+#+#+#+$.",
+".+++++++++++++++++++++++++++++++$.",
+".+.............................+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+..#.#.#.#.#.#.#.#.#.#.#.#.#.$+$.",
+".+.#.#.#.#.#.#.#.#.#.#.#.#.#.#$+$.",
+".+.$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$.",
+".+++++++++++++++++++++++++++++++$.",
+"..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.",
+".................................."};
diff --git a/kommander/editor/pics/small/ordertool.png b/kommander/editor/pics/small/ordertool.png
new file mode 100644
index 00000000..ad122839
--- /dev/null
+++ b/kommander/editor/pics/small/ordertool.png
Binary files differ
diff --git a/kommander/editor/pics/small/pixlabel.png b/kommander/editor/pics/small/pixlabel.png
new file mode 100644
index 00000000..32b90d82
--- /dev/null
+++ b/kommander/editor/pics/small/pixlabel.png
Binary files differ
diff --git a/kommander/editor/pics/small/pointer.png b/kommander/editor/pics/small/pointer.png
new file mode 100644
index 00000000..67e38a36
--- /dev/null
+++ b/kommander/editor/pics/small/pointer.png
Binary files differ
diff --git a/kommander/editor/pics/small/print.xpm b/kommander/editor/pics/small/print.xpm
new file mode 100644
index 00000000..8701d460
--- /dev/null
+++ b/kommander/editor/pics/small/print.xpm
@@ -0,0 +1,117 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 89 1",
+" c Gray0",
+". c #101008081010",
+"X c #101010101010",
+"o c #101010101818",
+"O c #181810101818",
+"+ c #181818181818",
+"@ c #181818182121",
+"# c #212118182121",
+"$ c Gray13",
+"% c #212121212929",
+"& c #292921212929",
+"* c Gray16",
+"= c #292929293131",
+"- c #313129293131",
+"; c #313131313131",
+": c #313131313939",
+"> c #393931313939",
+", c #393939393939",
+"< c #393939394242",
+"1 c #424239394242",
+"2 c Gray26",
+"3 c #4a4a4a4a5252",
+"4 c #5a5a52525a5a",
+"5 c #5a5a5a5a6363",
+"6 c #6b6b63636b6b",
+"7 c Gray42",
+"8 c #6b6b6b6b7373",
+"9 c #73736b6b7373",
+"0 c #7b7b73737b7b",
+"q c #7b7b73738484",
+"w c #0808ffff0808",
+"e c #2929ffff2929",
+"r c #3131ffff3131",
+"t c #5a5acece5a5a",
+"y c #6b6bffff6363",
+"u c #7b7bffff7b7b",
+"i c #84847b7b8484",
+"p c #84847b7b8c8c",
+"a c #8c8c7b7b9494",
+"s c #848484848c8c",
+"d c #8c8c84848c8c",
+"f c Gray55",
+"g c #8c8c84849494",
+"h c #8c8c8c8c9494",
+"j c #94948c8c9494",
+"k c #94948c8c9c9c",
+"l c Gray58",
+"z c #949494949c9c",
+"x c #9c9c94949c9c",
+"c c Gray61",
+"v c #9c9c9494a5a5",
+"b c #9c9c9c9ca5a5",
+"n c #a5a59c9ca5a5",
+"m c #a5a59c9cadad",
+"M c #adad9c9cadad",
+"N c #a5a5a5a5a5a5",
+"B c #a5a5a5a5adad",
+"V c #adada5a5adad",
+"C c Gray68",
+"Z c #adadadadb5b5",
+"A c #b5b5adadb5b5",
+"S c Gray71",
+"D c Gray74",
+"F c #9494c6c69494",
+"G c #9c9ccecea5a5",
+"H c #bdbdd6d6bdbd",
+"J c #c0c0c0c0c0c0",
+"K c #c6c6c6c6c6c6",
+"L c #cecec6c6cece",
+"P c #cececececece",
+"I c #cecececed6d6",
+"U c #d6d6ceced6d6",
+"Y c #d6d6cecedede",
+"T c Gray84",
+"R c #d6d6d6d6dede",
+"E c #deded6d6dede",
+"W c Gray87",
+"Q c #deded6d6e7e7",
+"! c #dedededee7e7",
+"~ c #d6d6ffffd6d6",
+"^ c #e7e7dedee7e7",
+"/ c #e7e7e7e7e7e7",
+"( c #e7e7e7e7efef",
+") c #efefe7e7efef",
+"_ c #efefefefefef",
+"` c #e7e7ffffe7e7",
+"' c Gray97",
+"] c Gray100",
+"[ c None",
+/* pixels */
+"[[[[[[SDPPPPKKDDCD[[[[",
+"[[[[[[D_/////___WD[[[[",
+"[[[[[[DKKKPPKKKKDK[[[[",
+"[[[[[[SDDDDSDDSSCD[[[[",
+"[[[[[KCKDKKKDDDKS[[[[[",
+"[[[[[DDSDDDDDDKKS[[[[[",
+"[[[[[DSKDDDDDKDKC[[[[[",
+"[[[[[KDDDDDDDDDDS[[[[[",
+"[[[[[CP/WWWWWWTWNNZ[[[",
+"[[[Dc9STPTPTPTWWj427S[",
+"[[Dziq0000000pag8<%@2N",
+"[DcE(!ERRRRUYGtFn2##O<",
+"Db)]]]]]]]]]~ewePa;@X#",
+"V']]]]]]]]]]`yru]Q0@ #",
+"BRILITRRW^!E!RHUILhO @",
+"jAZVBmBnmmNmnmMvzh6o #",
+"jZZmBnnnbnbbbbvxxg6o +",
+"lmmnbnbbbvcvxxxvjs6O 3",
+"jBnnvcvxvcvxvxzjhd8o+C",
+"lsdgfgdhgdhhjhjkhg6+l[",
+"S9%@$%&&&=--::>>:-:l[[",
+"[[C511,:;;;**%++.2c[[["
+};
diff --git a/kommander/editor/pics/small/progress.png b/kommander/editor/pics/small/progress.png
new file mode 100644
index 00000000..29416702
--- /dev/null
+++ b/kommander/editor/pics/small/progress.png
Binary files differ
diff --git a/kommander/editor/pics/small/pushbutton.png b/kommander/editor/pics/small/pushbutton.png
new file mode 100644
index 00000000..61f779ce
--- /dev/null
+++ b/kommander/editor/pics/small/pushbutton.png
Binary files differ
diff --git a/kommander/editor/pics/small/radiobutton.png b/kommander/editor/pics/small/radiobutton.png
new file mode 100644
index 00000000..10c1d8c3
--- /dev/null
+++ b/kommander/editor/pics/small/radiobutton.png
Binary files differ
diff --git a/kommander/editor/pics/small/redo.png b/kommander/editor/pics/small/redo.png
new file mode 100644
index 00000000..abdad26c
--- /dev/null
+++ b/kommander/editor/pics/small/redo.png
Binary files differ
diff --git a/kommander/editor/pics/small/richtextedit.png b/kommander/editor/pics/small/richtextedit.png
new file mode 100644
index 00000000..73573a8a
--- /dev/null
+++ b/kommander/editor/pics/small/richtextedit.png
Binary files differ
diff --git a/kommander/editor/pics/small/right.xpm b/kommander/editor/pics/small/right.xpm
new file mode 100644
index 00000000..76e2d033
--- /dev/null
+++ b/kommander/editor/pics/small/right.xpm
@@ -0,0 +1,141 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 113 2",
+" c #00001818f7f7",
+". c #00001818ffff",
+"X c #00002121f7f7",
+"o c #00002121ffff",
+"O c #00002929ffff",
+"+ c #10103131efef",
+"@ c #18183131e7e7",
+"# c #18183939e7e7",
+"$ c #10103131ffff",
+"% c #10103939ffff",
+"& c #29293939d6d6",
+"* c #31313939cece",
+"= c #10104242ffff",
+"- c #18184242ffff",
+"; c #39394a4ac6c6",
+": c #29295252ffff",
+"> c #29295a5affff",
+", c #31315252efef",
+"< c #31315a5affff",
+"1 c #31316363ffff",
+"2 c #39396b6bffff",
+"3 c #4a4a5a5abdbd",
+"4 c #63636b6bbdbd",
+"5 c #6b6b7373b5b5",
+"6 c #73737b7bbdbd",
+"7 c #42424a4ac6c6",
+"8 c #4a4a5252c6c6",
+"9 c #4a4a5a5acece",
+"0 c #52525a5ac6c6",
+"q c #52526363c6c6",
+"w c #52526b6bcece",
+"e c #5a5a6b6bc6c6",
+"r c #4a4a7373e7e7",
+"t c #4a4a7373efef",
+"y c #42427373ffff",
+"u c #4a4a7b7bffff",
+"i c #52527b7bffff",
+"p c #63637373c6c6",
+"a c #63637373cece",
+"s c #6b6b7b7bc6c6",
+"d c #7b7b8484b5b5",
+"f c #5a5a8484e7e7",
+"g c #5a5a8484efef",
+"h c #52528484f7f7",
+"j c #52528484ffff",
+"k c #5a5a8c8cffff",
+"l c #5a5a9494ffff",
+"z c #6b6b8484d6d6",
+"x c #6b6b8c8cd6d6",
+"c c #73738484c6c6",
+"v c #7b7b8c8ccece",
+"b c #63638484e7e7",
+"n c #63638c8cefef",
+"m c #6b6b8484e7e7",
+"M c #63639494ffff",
+"N c #6b6b9494ffff",
+"B c #6b6b9c9cffff",
+"V c #73739c9ce7e7",
+"C c #73739c9cffff",
+"Z c #7373a5a5ffff",
+"A c #7b7badadffff",
+"S c #84848484b5b5",
+"D c #84848c8cbdbd",
+"F c #8c8c9494b5b5",
+"G c #94949494b5b5",
+"H c #94949c9cb5b5",
+"J c #9c9c9c9cb5b5",
+"K c #9c9c9c9cbdbd",
+"L c #a5a5a5a5b5b5",
+"P c #adadadadb5b5",
+"I c #adadadadbdbd",
+"U c #b5b5b5b5bdbd",
+"Y c #b5b5bdbdbdbd",
+"T c Gray74",
+"R c #84849494c6c6",
+"E c #84849494cece",
+"W c #8c8ca5a5cece",
+"Q c #8c8cadadd6d6",
+"! c #9c9ca5a5c6c6",
+"~ c #9494adadd6d6",
+"^ c #9c9cadadd6d6",
+"/ c #9c9cbdbdd6d6",
+"( c #8c8cadadefef",
+") c #8484adadffff",
+"_ c #8484b5b5ffff",
+"` c #8c8cb5b5f7f7",
+"' c #8c8cb5b5ffff",
+"] c #8c8cbdbdffff",
+"[ c #9494bdbdffff",
+"{ c #a5a5bdbdd6d6",
+"} c #b5b5b5b5c6c6",
+"| c #bdbdbdbdc6c6",
+" . c #adadbdbdefef",
+".. c #8c8cc6c6ffff",
+"X. c #9494c6c6ffff",
+"o. c #9494ceceffff",
+"O. c #9c9cceceffff",
+"+. c #a5a5d6d6ffff",
+"@. c #adaddedeffff",
+"#. c #b5b5d6d6ffff",
+"$. c #adade7e7ffff",
+"%. c #b5b5e7e7ffff",
+"&. c #bdbde7e7ffff",
+"*. c #bdbdefefffff",
+"=. c #c0c0c0c0c0c0",
+"-. c #c6c6cececece",
+";. c #c6c6efefffff",
+":. c #ceceefefffff",
+">. c #c6c6f7f7ffff",
+",. c #cecef7f7ffff",
+"<. c #d6d6f7f7ffff",
+"1. c #e7e7ffffffff",
+"2. c None",
+/* pixels */
+"2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.T ! f G T 2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.Y -.;.t D 2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.T { *.o.h p T 2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.Y / O.+.O.u 6 T 2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.T Q X.X.o.O.k a U 2.2.",
+"P E m z c R K } T | T H V ] ] ] X.X.l 9 I 2.",
+"x <.1.:.#.O.` ( W ~ ^ .' A _ _ ] ] ] j w P ",
+"g >.%.$.@.%.%.&.;.,.<.;.[ A _ _ _ ) _ ] u q ",
+"n $.O.[ ] ] ] _ ] ] ] _ A ) A ) A A Z Z M , ",
+"g O.X._ _ A A A A A A A _ A A A A Z N j > # ",
+"r .._ Z B M k k u 2 2 k A A A A C B i : o 3 ",
+"e y 1 : - $ + @ & ; ; + k ) Z Z B u - o 7 U ",
+"L 9 & & 3 4 S J U T T F b Z C N j - o * L 2.",
+"2.Y P Y 2.2.2.2.2.2.2.T W M M y % o 8 P 2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.W j y = . 0 Y 2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.v < % X 4 P 2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.s O 5 | 2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.D & d T 2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.",
+"2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2."
+};
diff --git a/kommander/editor/pics/small/scrollbar.png b/kommander/editor/pics/small/scrollbar.png
new file mode 100644
index 00000000..466c58de
--- /dev/null
+++ b/kommander/editor/pics/small/scrollbar.png
Binary files differ
diff --git a/kommander/editor/pics/small/searchfind.png b/kommander/editor/pics/small/searchfind.png
new file mode 100644
index 00000000..3f369fdb
--- /dev/null
+++ b/kommander/editor/pics/small/searchfind.png
Binary files differ
diff --git a/kommander/editor/pics/small/shellscript.png b/kommander/editor/pics/small/shellscript.png
new file mode 100644
index 00000000..59de8cfe
--- /dev/null
+++ b/kommander/editor/pics/small/shellscript.png
Binary files differ
diff --git a/kommander/editor/pics/small/slider.png b/kommander/editor/pics/small/slider.png
new file mode 100644
index 00000000..525bd1ca
--- /dev/null
+++ b/kommander/editor/pics/small/slider.png
Binary files differ
diff --git a/kommander/editor/pics/small/spacer.png b/kommander/editor/pics/small/spacer.png
new file mode 100644
index 00000000..926e8afc
--- /dev/null
+++ b/kommander/editor/pics/small/spacer.png
Binary files differ
diff --git a/kommander/editor/pics/small/spinbox.png b/kommander/editor/pics/small/spinbox.png
new file mode 100644
index 00000000..7ae20630
--- /dev/null
+++ b/kommander/editor/pics/small/spinbox.png
Binary files differ
diff --git a/kommander/editor/pics/small/statusbar.png b/kommander/editor/pics/small/statusbar.png
new file mode 100644
index 00000000..ac08552d
--- /dev/null
+++ b/kommander/editor/pics/small/statusbar.png
Binary files differ
diff --git a/kommander/editor/pics/small/table.png b/kommander/editor/pics/small/table.png
new file mode 100644
index 00000000..4bbd9c2d
--- /dev/null
+++ b/kommander/editor/pics/small/table.png
Binary files differ
diff --git a/kommander/editor/pics/small/tabwidget.png b/kommander/editor/pics/small/tabwidget.png
new file mode 100644
index 00000000..1254bb63
--- /dev/null
+++ b/kommander/editor/pics/small/tabwidget.png
Binary files differ
diff --git a/kommander/editor/pics/small/textbrowser.png b/kommander/editor/pics/small/textbrowser.png
new file mode 100644
index 00000000..090e2f84
--- /dev/null
+++ b/kommander/editor/pics/small/textbrowser.png
Binary files differ
diff --git a/kommander/editor/pics/small/textedit.png b/kommander/editor/pics/small/textedit.png
new file mode 100644
index 00000000..823d0818
--- /dev/null
+++ b/kommander/editor/pics/small/textedit.png
Binary files differ
diff --git a/kommander/editor/pics/small/textview.png b/kommander/editor/pics/small/textview.png
new file mode 100644
index 00000000..ec2270c3
--- /dev/null
+++ b/kommander/editor/pics/small/textview.png
Binary files differ
diff --git a/kommander/editor/pics/small/timeedit.png b/kommander/editor/pics/small/timeedit.png
new file mode 100644
index 00000000..01b37888
--- /dev/null
+++ b/kommander/editor/pics/small/timeedit.png
Binary files differ
diff --git a/kommander/editor/pics/small/timer.png b/kommander/editor/pics/small/timer.png
new file mode 100644
index 00000000..e2e17452
--- /dev/null
+++ b/kommander/editor/pics/small/timer.png
Binary files differ
diff --git a/kommander/editor/pics/small/toolbutton.png b/kommander/editor/pics/small/toolbutton.png
new file mode 100644
index 00000000..25d240a1
--- /dev/null
+++ b/kommander/editor/pics/small/toolbutton.png
Binary files differ
diff --git a/kommander/editor/pics/small/undo.png b/kommander/editor/pics/small/undo.png
new file mode 100644
index 00000000..839a823f
--- /dev/null
+++ b/kommander/editor/pics/small/undo.png
Binary files differ
diff --git a/kommander/editor/pics/temp.tmp b/kommander/editor/pics/temp.tmp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kommander/editor/pics/temp.tmp
diff --git a/kommander/editor/pics/toolbox.png b/kommander/editor/pics/toolbox.png
new file mode 100644
index 00000000..2ab71dc7
--- /dev/null
+++ b/kommander/editor/pics/toolbox.png
Binary files differ
diff --git a/kommander/editor/pics/uparrow.xbm b/kommander/editor/pics/uparrow.xbm
new file mode 100644
index 00000000..dc0edccb
--- /dev/null
+++ b/kommander/editor/pics/uparrow.xbm
@@ -0,0 +1,10 @@
+#define uparrow_width 25
+#define uparrow_height 25
+static unsigned char uparrow_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0xfe,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/vsplit.xbm b/kommander/editor/pics/vsplit.xbm
new file mode 100644
index 00000000..bcd0e4b7
--- /dev/null
+++ b/kommander/editor/pics/vsplit.xbm
@@ -0,0 +1,10 @@
+#define vsplit_width 25
+#define vsplit_height 25
+static unsigned char vsplit_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x24,
+ 0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x24,0x00,0x00,0x10,0x24,0x08,0x00,0x18,
+ 0x24,0x18,0x00,0xfc,0xe7,0x3f,0x00,0x18,0x24,0x18,0x00,0x10,0x24,0x08,0x00,
+ 0x00,0x24,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x24,0x00,
+ 0x00,0x00,0x24,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pics/wait.xbm b/kommander/editor/pics/wait.xbm
new file mode 100644
index 00000000..e2fd6896
--- /dev/null
+++ b/kommander/editor/pics/wait.xbm
@@ -0,0 +1,10 @@
+#define wait_width 25
+#define wait_height 25
+static unsigned char wait_bits[] = {
+ 0x00,0x00,0x00,0x00,0xc0,0xff,0x07,0x00,0xc0,0x00,0x06,0x00,0xc0,0xff,0x07,
+ 0x00,0x80,0x00,0x02,0x00,0x80,0x00,0x02,0x00,0x80,0x54,0x02,0x00,0x80,0x28,
+ 0x02,0x00,0x80,0x11,0x03,0x00,0x00,0x83,0x01,0x00,0x00,0xd6,0x00,0x00,0x00,
+ 0x6c,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0xc6,0x00,0x00,0x00,0x93,0x01,0x00,
+ 0x80,0x01,0x03,0x00,0x80,0x10,0x02,0x00,0x80,0x28,0x02,0x00,0x80,0x54,0x02,
+ 0x00,0x80,0xaa,0x02,0x00,0xc0,0xff,0x07,0x00,0xc0,0x00,0x06,0x00,0xc0,0xff,
+ 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
diff --git a/kommander/editor/pixmapchooser.cpp b/kommander/editor/pixmapchooser.cpp
new file mode 100644
index 00000000..1a5a8535
--- /dev/null
+++ b/kommander/editor/pixmapchooser.cpp
@@ -0,0 +1,1105 @@
+/**********************************************************************
+** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qvariant.h> // HP-UX compiler needs this here
+
+#include "pixmapchooser.h"
+#include "formwindow.h"
+#if defined(DESIGNER) && !defined(RESOURCE)
+#include "pixmapfunction.h"
+#endif
+#include "metadatabase.h"
+#include "mainwindow.h"
+#ifndef KOMMANDER
+#include "pixmapcollectioneditor.h"
+#endif
+#ifndef KOMMANDER
+#include "pixmapcollection.h"
+#endif
+#ifndef KOMMANDER
+#include "project.h"
+#endif
+
+#include <qapplication.h>
+#include <qimage.h>
+#include <qpainter.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qiconview.h>
+
+#include <klocale.h>
+
+#if defined(DESIGNER)
+#include "pics/images.h"
+
+#ifdef Q_WS_MACX
+//logo is 40x40 on the mac, if it changes - please notify the Qt/Mac team
+static const char * const logo_xpm[] = {
+"40 40 543 2",
+" c None",
+". c #C9D98D",
+"+ c #A0BC30",
+"@ c #A4C132",
+"# c #ABC92F",
+"$ c #AAC733",
+"% c #8FA733",
+"& c #657821",
+"* c #3F4E17",
+"= c #2A360C",
+"- c #182306",
+"; c #121B06",
+"> c #141C06",
+", c #1D2608",
+"' c #2A350E",
+") c #405017",
+"! c #667C1C",
+"~ c #8FAA24",
+"{ c #A8C12D",
+"] c #728326",
+"^ c #313A14",
+"/ c #090B08",
+"( c #000003",
+"_ c #000001",
+": c #000002",
+"< c #000004",
+"[ c #000000",
+"} c #080D01",
+"| c #333E11",
+"1 c #6E8529",
+"2 c #A2C230",
+"3 c #ACC735",
+"4 c #7D8F2C",
+"5 c #2A300E",
+"6 c #000300",
+"7 c #000007",
+"8 c #010009",
+"9 c #020104",
+"0 c #020301",
+"a c #020300",
+"b c #010200",
+"c c #010101",
+"d c #020010",
+"e c #010010",
+"f c #000005",
+"g c #000503",
+"h c #28360C",
+"i c #789128",
+"j c #AAC835",
+"k c #A4BE36",
+"l c #515F1E",
+"m c #040800",
+"n c #00000C",
+"o c #02000D",
+"p c #040303",
+"q c #020200",
+"r c #020203",
+"s c #020202",
+"t c #000008",
+"u c #000105",
+"v c #000202",
+"w c #000201",
+"x c #020207",
+"y c #02020C",
+"z c #00000B",
+"A c #02010E",
+"B c #000013",
+"C c #030900",
+"D c #4C5E1B",
+"E c #A1BD33",
+"F c #9BB52F",
+"G c #333E10",
+"H c #010002",
+"I c #03020B",
+"J c #020109",
+"K c #030204",
+"L c #010104",
+"M c #020009",
+"N c #02000A",
+"O c #000009",
+"P c #000006",
+"Q c #04050B",
+"R c #020106",
+"S c #020307",
+"T c #040507",
+"U c #000104",
+"V c #34410D",
+"W c #99B236",
+"X c #9BB332",
+"Y c #2B360A",
+"Z c #020006",
+"` c #040301",
+" . c #030304",
+".. c #01010A",
+"+. c #020113",
+"@. c #010011",
+"#. c #010500",
+"$. c #0A0F05",
+"%. c #131C07",
+"&. c #0B1205",
+"*. c #020706",
+"=. c #010309",
+"-. c #030503",
+";. c #030402",
+">. c #2C350C",
+",. c #9DB52F",
+"'. c #A3BD2F",
+"). c #03000A",
+"!. c #030102",
+"~. c #020101",
+"{. c #030209",
+"]. c #02010B",
+"^. c #010301",
+"/. c #242C08",
+"(. c #5A6720",
+"_. c #81922B",
+":. c #93A732",
+"<. c #9AB530",
+"[. c #9CB734",
+"}. c #90AA32",
+"|. c #7E942C",
+"1. c #566820",
+"2. c #273310",
+"3. c #000403",
+"4. c #00000E",
+"5. c #020211",
+"6. c #03030B",
+"7. c #020205",
+"8. c #01000C",
+"9. c #33410B",
+"0. c #A7BF37",
+"a. c #ADC935",
+"b. c #4F5F18",
+"c. c #020103",
+"d. c #080401",
+"e. c #050205",
+"f. c #232C06",
+"g. c #768722",
+"h. c #A4BB2E",
+"i. c #D5E38D",
+"j. c #A2BE3A",
+"k. c #738833",
+"l. c #202C0A",
+"m. c #05030A",
+"n. c #020206",
+"o. c #030303",
+"p. c #505B20",
+"q. c #ACC934",
+"r. c #7C8E2B",
+"s. c #050900",
+"t. c #010201",
+"u. c #030200",
+"v. c #020001",
+"w. c #050207",
+"x. c #030004",
+"y. c #000203",
+"z. c #49531D",
+"A. c #A2B836",
+"B. c #9FBD30",
+"C. c #4E5A1C",
+"D. c #000200",
+"E. c #04040A",
+"F. c #040403",
+"G. c #010005",
+"H. c #040600",
+"I. c #7A9222",
+"J. c #ACCB2D",
+"K. c #A9C22F",
+"L. c #282F0B",
+"M. c #020304",
+"N. c #030109",
+"O. c #55671A",
+"P. c #AEC93D",
+"Q. c #A9C931",
+"R. c #546523",
+"S. c #00000A",
+"T. c #020204",
+"U. c #010300",
+"V. c #272F0B",
+"W. c #A7BE34",
+"X. c #728327",
+"Y. c #020108",
+"Z. c #030305",
+"`. c #030208",
+" + c #46511B",
+".+ c #ACC739",
+"++ c #93AC39",
+"@+ c #263605",
+"#+ c #566A1D",
+"$+ c #ADC93C",
+"%+ c #ACC840",
+"&+ c #44541E",
+"*+ c #010205",
+"=+ c #010206",
+"-+ c #020107",
+";+ c #010007",
+">+ c #030400",
+",+ c #728226",
+"'+ c #AAC732",
+")+ c #323A14",
+"!+ c #030401",
+"~+ c #01000D",
+"{+ c #242D06",
+"]+ c #A2B835",
+"^+ c #95AD3E",
+"/+ c #212C0F",
+"(+ c #010604",
+"_+ c #5F7327",
+":+ c #ABC934",
+"<+ c #A2BD3A",
+"[+ c #202C09",
+"}+ c #01010B",
+"|+ c #020105",
+"1+ c #333B14",
+"2+ c #ABC23C",
+"3+ c #8EA631",
+"4+ c #0A0C08",
+"5+ c #010008",
+"6+ c #010102",
+"7+ c #020011",
+"8+ c #030500",
+"9+ c #778823",
+"0+ c #96AD3A",
+"a+ c #232D0D",
+"b+ c #020212",
+"c+ c #000109",
+"d+ c #030800",
+"e+ c #5F7126",
+"f+ c #ABCB35",
+"g+ c #71862A",
+"h+ c #020401",
+"i+ c #090C03",
+"j+ c #8FA238",
+"k+ c #647822",
+"l+ c #02000B",
+"m+ c #232B08",
+"n+ c #A5BB30",
+"o+ c #96AC35",
+"p+ c #242C0A",
+"q+ c #020402",
+"r+ c #030403",
+"s+ c #000100",
+"t+ c #576D1D",
+"u+ c #A2BC37",
+"v+ c #232D0A",
+"w+ c #010004",
+"x+ c #677822",
+"y+ c #596620",
+"z+ c #CBDC71",
+"A+ c #96B034",
+"B+ c #232B0E",
+"C+ c #01020B",
+"D+ c #010109",
+"E+ c #030502",
+"F+ c #040603",
+"G+ c #010107",
+"H+ c #253704",
+"I+ c #B2CE3A",
+"J+ c #586721",
+"K+ c #425014",
+"L+ c #C3D771",
+"M+ c #29360C",
+"N+ c #020302",
+"O+ c #81912F",
+"P+ c #94AE38",
+"Q+ c #23300B",
+"R+ c #040408",
+"S+ c #010105",
+"T+ c #010207",
+"U+ c #242C0C",
+"V+ c #91AB33",
+"W+ c #D0E18D",
+"X+ c #7F922B",
+"Y+ c #010400",
+"Z+ c #010106",
+"`+ c #2A3408",
+" @ c #182406",
+".@ c #00000D",
+"+@ c #0B0F06",
+"@@ c #93A736",
+"#@ c #96AE38",
+"$@ c #000101",
+"%@ c #030308",
+"&@ c #232A0B",
+"*@ c #98AC37",
+"=@ c #94AB32",
+"-@ c #0C1204",
+";@ c #1B2307",
+">@ c #9EB62F",
+",@ c #010100",
+"'@ c #9AB431",
+")@ c #97AD37",
+"!@ c #242B0E",
+"~@ c #01000B",
+"{@ c #01010C",
+"]@ c #272C13",
+"^@ c #9CAF3B",
+"/@ c #131B07",
+"(@ c #151B07",
+"_@ c #9CB230",
+":@ c #ADC555",
+"<@ c #131C06",
+"[@ c #94AB38",
+"}@ c #252E0A",
+"|@ c #262914",
+"1@ c #9DAF46",
+"2@ c #9DBA30",
+"3@ c #141C07",
+"4@ c #010302",
+"5@ c #141906",
+"6@ c #9CB332",
+"7@ c #9EBB31",
+"8@ c #1D2609",
+"9@ c #010003",
+"0@ c #0B1105",
+"a@ c #91AA31",
+"b@ c #222C0D",
+"c@ c #05040A",
+"d@ c #232B0A",
+"e@ c #98AC3A",
+"f@ c #91AB2D",
+"g@ c #0B1204",
+"h@ c #1D2307",
+"i@ c #A0B834",
+"j@ c #A5C233",
+"k@ c #29340F",
+"l@ c #020705",
+"m@ c #7E942D",
+"n@ c #95AE3B",
+"o@ c #232E10",
+"p@ c #03040C",
+"q@ c #02020B",
+"r@ c #020400",
+"s@ c #222A0B",
+"t@ c #92AE2E",
+"u@ c #7D9327",
+"v@ c #030704",
+"w@ c #2A340D",
+"x@ c #A7BF35",
+"y@ c #BAD355",
+"z@ c #3E4E18",
+"A@ c #020110",
+"B@ c #566821",
+"C@ c #243503",
+"D@ c #020213",
+"E@ c #030501",
+"F@ c #030306",
+"G@ c #030207",
+"H@ c #010203",
+"I@ c #030206",
+"J@ c #202E0B",
+"K@ c #95AF37",
+"L@ c #59691D",
+"M@ c #43501A",
+"N@ c #ADC732",
+"O@ c #657A1D",
+"P@ c #000102",
+"Q@ c #01000E",
+"R@ c #010108",
+"S@ c #27330F",
+"T@ c #A3BE3D",
+"U@ c #586C1E",
+"V@ c #000404",
+"W@ c #00010A",
+"X@ c #050704",
+"Y@ c #262B13",
+"Z@ c #262B15",
+"`@ c #02010C",
+" # c #212E08",
+".# c #97AE3B",
+"+# c #ADC440",
+"@# c #232D06",
+"## c #030101",
+"$# c #6B7D21",
+"%# c #D5E48D",
+"&# c #8DA828",
+"*# c #02020A",
+"=# c #000106",
+"-# c #000401",
+";# c #748736",
+"># c #AECB3D",
+",# c #5E7227",
+"'# c #010204",
+")# c #252B0C",
+"!# c #9BAD3F",
+"~# c #A0B148",
+"{# c #232B0B",
+"]# c #020007",
+"^# c #020209",
+"/# c #2C3418",
+"(# c #646E34",
+"_# c #030600",
+":# c #030202",
+"<# c #050102",
+"[# c #0A1002",
+"}# c #90A727",
+"|# c #CFDE8D",
+"1# c #343D13",
+"2# c #02010D",
+"3# c #040509",
+"4# c #020308",
+"5# c #202B09",
+"6# c #9FBE2E",
+"7# c #ACCA34",
+"8# c #5E7026",
+"9# c #252C0D",
+"0# c #9AAE39",
+"a# c #9AAE3D",
+"b# c #22290D",
+"c# c #010306",
+"d# c #010209",
+"e# c #020004",
+"f# c #030201",
+"g# c #030100",
+"h# c #030009",
+"i# c #333C12",
+"j# c #AAC42F",
+"k# c #738429",
+"l# c #03020F",
+"m# c #4B591A",
+"n# c #A9C831",
+"o# c #A9C932",
+"p# c #576B1F",
+"q# c #263706",
+"r# c #91AB34",
+"s# c #92AC37",
+"t# c #202C0C",
+"u# c #6F8422",
+"v# c #A8BF33",
+"w# c #2B340C",
+"x# c #03010D",
+"y# c #516221",
+"z# c #AFC655",
+"A# c #95AE39",
+"B# c #202E09",
+"C# c #000204",
+"D# c #020102",
+"E# c #28360A",
+"F# c #7D8E2C",
+"G# c #040700",
+"H# c #03020C",
+"I# c #475520",
+"J# c #A3BD3C",
+"K# c #98AF3A",
+"L# c #2D3516",
+"M# c #010103",
+"N# c #0B0D05",
+"O# c #7E9627",
+"P# c #B0C833",
+"Q# c #4E5A17",
+"R# c #222B0B",
+"S# c #72852B",
+"T# c #A4BE35",
+"U# c #AFC544",
+"V# c #666F37",
+"W# c #171A0A",
+"X# c #93AB3A",
+"Y# c #A4BA2F",
+"Z# c #36400C",
+"`# c #040404",
+" $ c #28310B",
+".$ c #5C6C20",
+"+$ c #7F922A",
+"@$ c #93A833",
+"#$ c #9CB92D",
+"$$ c #90AA2C",
+"%$ c #59691F",
+"&$ c #222A07",
+"*$ c #040501",
+"=$ c #222D0D",
+"-$ c #93AA3F",
+";$ c #9DB03A",
+">$ c #2C340D",
+",$ c #000500",
+"'$ c #0D1205",
+")$ c #131A07",
+"!$ c #0B1203",
+"~$ c #010502",
+"{$ c #020008",
+"]$ c #010202",
+"^$ c #212D0D",
+"/$ c #94AE34",
+"($ c #9FB435",
+"_$ c #343F0C",
+":$ c #040207",
+"<$ c #020502",
+"[$ c #2D4102",
+"}$ c #A6BD33",
+"|$ c #4F5B1D",
+"1$ c #030701",
+"2$ c #020201",
+"3$ c #040502",
+"4$ c #030505",
+"5$ c #020100",
+"6$ c #040102",
+"7$ c #030007",
+"8$ c #090C04",
+"9$ c #16190A",
+"0$ c #0A1301",
+"a$ c #708727",
+"b$ c #ACC836",
+"c$ c #7B9223",
+"d$ c #29300D",
+"e$ c #7F9626",
+"f$ c #94AB39",
+"g$ c #212E0C",
+"h$ c #020603",
+"i$ c #101A01",
+"j$ c #7A912E",
+"k$ c #ADCB2F",
+"l$ c #B0CD3A",
+"m$ c #A6BD34",
+"n$ c #728225",
+"o$ c #0A0D03",
+"p$ c #0C1101",
+"q$ c #343D12",
+"r$ c #6F8421",
+"s$ c #94AB41",
+"t$ c #202C0D",
+"u$ c #0A1302",
+"v$ c #7A902F",
+"w$ c #B0CE37",
+"x$ c #ABC33C",
+"y$ c #8EA236",
+"z$ c #677821",
+"A$ c #425115",
+"B$ c #2A3409",
+"C$ c #151A07",
+"D$ c #141A06",
+"E$ c #1C2307",
+"F$ c #2B330D",
+"G$ c #43511B",
+"H$ c #6C7E22",
+"I$ c #ABC530",
+"J$ c #92AC32",
+"K$ c #314305",
+"L$ c #6F8625",
+"M$ c #ACCB30",
+"N$ c #9CB330",
+"O$ c #9CB432",
+"P$ c #A1B935",
+"Q$ c #A8BF36",
+"R$ c #ADC632",
+" ",
+" . + @ # ",
+" $ % & * = - ; > , ' ) ! ~ ",
+" { ] ^ / ( _ _ : < : [ ( ( : } | 1 2 ",
+" 3 4 5 6 [ 7 8 9 0 a b b c 8 d e 8 f g h i j ",
+" k l m n o p q q r s s t u v w x y z A B t C D E ",
+" F G [ H I J K L M N t 7 n O P P Q R S T U t < [ V W ",
+" X Y _ Z ` ...+.@.7 [ #.$.; %.&.*.: : t =.-.;.S z : >.,. ",
+" '.G < ).!.~.{.].P ^./.(._.:.<.[.}.|.1.2.3.4.5.6.7...8.[ 9.0. ",
+" a.b.[ M c.d.e.J [ f.g.h.i. j.k.l.( m.n.L x o.[ p.q. ",
+" r.s.t.u.v.w.x.y.z.A. B.C.D.f E.F.c G.H.I.J. ",
+" K.L.O M.b 7.N.y.O.P. Q.R.v S.T.U.R f V.W. ",
+" X.a Y.c Z.`.[ +.+ ++@+#+$+ %+&+[ *+=+-+;+>+,+ ",
+" '+)+_ !+0 ~+f {+]+ ^+/+O (+_+:+ <+[+: }+n.|+: 1+2+ ",
+" 3+4+5+b 6+7+8+9+ 0+a+: b+c+d+e+f+ g+h+7 n.r f i+j+ ",
+" k+( 8 r l+7 m+n+ o+p+< 6.q+r+< s+t+ u+v+[ w+6+: [ x+ ",
+" * [ 9 R d _ y+z+ A+B+[ C+D+E+F+G+[ H+ I+J+[ < 6+c : K+ ",
+" L+M+[ q |+e N+O+ P+Q+[ L R+S+7.T+[ U+V+W+ X+Y+< [ Z+z `+ ",
+" @_ a T..@+@@@ #@Q+$@D.T.%@( L : &@*@ =@-@f c 5+n ;@>@ ",
+" ; : ,@t O ; '@ )@!@[ h+G+~@;+~@{@]@^@ <+/@f U.w _ (@_@ ",
+" :@> _ c u P <@[. [@}@[ L .;+Z+c |+S.|@1@ 2@3@P 4@a [ 5@6@ ",
+" 7@8@[ 9@w < 0@a@ ^+b@P y c@`.P 6+Y+b ;+_ d@e@ f@g@t *+T.( h@i@ ",
+" j@k@: 8 w f l@m@ n@o@( p@q@x 9 8.5+b r@T.].[ s@t@ u@v@8.( `.< w@x@ ",
+" y@z@: A@x Q _ B@ C@7 D@E+E@F@S+8 7 G@H@I@l+M [ J@K@ L@< 8.~.G@[ M@N@ ",
+" O@P@Q@y R@: S@T@ U@V@W@-.X@x ( Y@Z@: `@N |+r t._ #.#+#@#f N.##I@[ $#%# ",
+" &#} 5+n *#=#-#;# >#,#C '#Y._ )#!#~#{#_ ]#q a s ^#[ /#(#_#:#<#x.f [#}# ",
+" |#1#: 2#3#4#n 5#6# 7#8#D.( 9#0# a#b#[ t.|+L c#d#n [ e#f#g#h#< i#j# ",
+" k#U.@.( r+l#: m#n# o#p#q#r# s#t#_ =+4@,@9@G._ r 6+c ( 6 u# ",
+" v#w#S.z 7.x#l+6 y#%+ z# A#B#[ C#6+c ,@c c s D#[ E# ",
+" F#G#O H#Z+8 ..y.I#J# K#L#8 G.c c c c o.M#N#O# ",
+" P#Q#[ Y.n.q .=#[ R#S#T# U#V#c : c c s c o.T.W#X# ",
+" Y#Z#[ J `#>+U.*+f -# $.$+$@$ #$$$u@%$&$*$~@T.,@c c o.s s [ =$-$ ",
+" ;$>$_ G@L U.=+Q@O [ [ ,$'$)$3@!$~$( 7 {$9 6+s o.o.s s s ]$[ ^$/$ ",
+" ($_$[ M M n.T.|+G@R ;+P n z 7 7 R@:$<#g#c c H L 6+s s ]$<$[ [$ ",
+" }$|$1$P P q 2$L R c 3$4$'#H@0 a 5$6$7$( [ 8$9$[ ]$]$t.s+0$a$ ",
+" b$c$d$D.[ f : H S+;+D.b r %@G@9 ( : w M+e$f$g$[ h$s+i$j$k$ ",
+" l$m$n$1+o$[ : z n [ [ ( f _ s+p$q$r$ s$t$[ u$v$w$ ",
+" x$y$z$A$B$;@C$D$E$F$G$H$}#I$ J$K$L$M$ ",
+" >@N$O$P$Q$R$ ",
+" "};
+#else
+static const char * const logo_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"21 16 213 2",
+" c white",
+". c #A3C511",
+"+ c #A2C511",
+"@ c #A2C611",
+"# c #A2C510",
+"$ c #A2C513",
+"% c #A2C412",
+"& c #A2C413",
+"* c #A2C414",
+"= c #A2C515",
+"- c #A2C50F",
+"; c #A3C510",
+"> c #A2C410",
+", c #A2C411",
+"' c #A2C314",
+") c #A2C316",
+"! c #A2C416",
+"~ c #A0C315",
+"{ c #A1C313",
+"] c #A1C412",
+"^ c #A2C40F",
+"/ c #A1C410",
+"( c #A0C510",
+"_ c #A0C511",
+": c #A1C414",
+"< c #9FC30E",
+"[ c #98B51B",
+"} c #5F7609",
+"| c #5C6E0E",
+"1 c #5B6E10",
+"2 c #5C6C14",
+"3 c #5A6E0A",
+"4 c #839E16",
+"5 c #A0C515",
+"6 c #A0C513",
+"7 c #A2C512",
+"8 c #A1C512",
+"9 c #A1C511",
+"0 c #A1C50F",
+"a c #91AE12",
+"b c #505E11",
+"c c #1F2213",
+"d c #070606",
+"e c #040204",
+"f c #040306",
+"g c #15160F",
+"h c #2F3A0D",
+"i c #859F1B",
+"j c #A1C215",
+"k c #A0C50F",
+"l c #A1C510",
+"m c #A0C110",
+"n c #839C1B",
+"o c #1E240A",
+"p c #050205",
+"q c #030304",
+"r c #323917",
+"s c #556313",
+"t c #56680B",
+"u c #536609",
+"v c #4A561B",
+"w c #0B0D04",
+"x c #030208",
+"y c #090A05",
+"z c #5F6F18",
+"A c #A0C117",
+"B c #91AF10",
+"C c #1E2209",
+"D c #030205",
+"E c #17190D",
+"F c #7D981C",
+"G c #9ABA12",
+"H c #A3C411",
+"I c #A3C713",
+"J c #95B717",
+"K c #7F9A18",
+"L c #8FAE1B",
+"M c #394413",
+"N c #040305",
+"O c #090807",
+"P c #6C7E19",
+"Q c #A6C614",
+"R c #A1C411",
+"S c #64761F",
+"T c #030105",
+"U c #070707",
+"V c #728513",
+"W c #A2C40C",
+"X c #A2C70B",
+"Y c #89A519",
+"Z c #313B11",
+"` c #101409",
+" . c #586A19",
+".. c #97B620",
+"+. c #1B2207",
+"@. c #282D11",
+"#. c #A6C41B",
+"$. c #A1C413",
+"%. c #A3C512",
+"&. c #2E370B",
+"*. c #030108",
+"=. c #21260F",
+"-. c #A5C21A",
+";. c #A0C60D",
+">. c #6D841A",
+",. c #0F1007",
+"'. c #040207",
+"). c #0E1009",
+"!. c #515F14",
+"~. c #A2C41B",
+"{. c #5E701B",
+"]. c #030203",
+"^. c #0B0B04",
+"/. c #87A111",
+"(. c #A0C411",
+"_. c #A0C316",
+":. c #212907",
+"<. c #222C0B",
+"[. c #A3C516",
+"}. c #9CBE1A",
+"|. c #5E6F1B",
+"1. c #0E0F0B",
+"2. c #040205",
+"3. c #181B0D",
+"4. c #93AE25",
+"5. c #A0C610",
+"6. c #617715",
+"7. c #030306",
+"8. c #070704",
+"9. c #809818",
+"0. c #A1C415",
+"a. c #475416",
+"b. c #030309",
+"c. c #12170B",
+"d. c #91B01E",
+"e. c #5C721F",
+"f. c #05050B",
+"g. c #33371D",
+"h. c #0E0F08",
+"i. c #040405",
+"j. c #758921",
+"k. c #46511B",
+"l. c #030207",
+"m. c #131409",
+"n. c #9FB921",
+"o. c #859D21",
+"p. c #080809",
+"q. c #030305",
+"r. c #46521C",
+"s. c #8EB017",
+"t. c #627713",
+"u. c #4D5F17",
+"v. c #97B71D",
+"w. c #77901D",
+"x. c #151708",
+"y. c #0D0D0B",
+"z. c #0C0B08",
+"A. c #455216",
+"B. c #A5C616",
+"C. c #A0C114",
+"D. c #556118",
+"E. c #050307",
+"F. c #050407",
+"G. c #363E17",
+"H. c #5D7309",
+"I. c #A2BF28",
+"J. c #A2C417",
+"K. c #A4C620",
+"L. c #60701D",
+"M. c #030103",
+"N. c #030303",
+"O. c #809A1B",
+"P. c #A0C310",
+"Q. c #A0C410",
+"R. c #A3C415",
+"S. c #9CB913",
+"T. c #6F801F",
+"U. c #1A210A",
+"V. c #1D1E0D",
+"W. c #1D220F",
+"X. c #1E210F",
+"Y. c #0F0F07",
+"Z. c #0E1007",
+"`. c #090906",
+" + c #2B360E",
+".+ c #97B813",
+"++ c #A2C50E",
+"@+ c #A5C517",
+"#+ c #90AD20",
+"$+ c #5D6C1A",
+"%+ c #394115",
+"&+ c #050704",
+"*+ c #040304",
+"=+ c #202807",
+"-+ c #5E6B21",
+";+ c #728D0C",
+">+ c #65791D",
+",+ c #29330F",
+"'+ c #7A911D",
+")+ c #A2C614",
+"!+ c #A1C513",
+"~+ c #A3C50E",
+"{+ c #A3C414",
+"]+ c #9CBD11",
+"^+ c #95B40C",
+"/+ c #94B50F",
+"(+ c #95B510",
+"_+ c #99B913",
+":+ c #A0C414",
+"<+ c #9ABC11",
+"[+ c #A0C314",
+"}+ c #A1C40F",
+"|+ c #A3C513",
+". + + @ + # # $ % & * = & - + + + + + # # ",
+"; > , > # > > $ ' ) ! ~ { ] ^ , - > , > # ",
+"+ + / ( _ : < [ } | 1 2 3 4 5 6 : 7 8 # # ",
+"+ 9 # ( 0 a b c d e e e f g h i j 9 k l + ",
+"+ + > m n o p q r s t u v w x y z A & # # ",
+"# % k B C D E F G H I J K L M N O P Q ] , ",
+"$ R > S T U V W , X Y Z ` ...+.T @.#.$.] ",
+"% %.* &.*.=.-.;.> >.,.'.).!.~.{.].^./.R 7 ",
+"7 (._.:.D <.[.}.|.1.2.2.3.4.5.6.7.8.9._ 8 ",
+". % 0.a.b.c.d.e.f.N g.h.2.i.j.k.l.m.n.$ # ",
+"; + ; o.p.q.r.s.t.u.v.w.x.2.y.z.].A.B.l : ",
+"# # R C.D.E.F.G.H.I.J.K.L.2.M.M.N.O.P.; l ",
+"# / Q.R.S.T.U.].8.V.W.X.Y.e Z.`.]. +.+++7 ",
+"+ + 9 / ; @+#+$+%+&+e *+=+-+;+>+,+'+)+, # ",
+"# + > % & !+~+{+]+^+/+(+_+) Q.:+<+[+$ R # ",
+"7 + > }+# % k |+8 + > + * $ _ / , 7 8 ] - "};
+#endif
+
+static ImageIconProvider *imageIconProvider = 0;
+static PixmapChooser *pixmapChooser = 0;
+#endif
+
+PixmapView::PixmapView( QWidget *parent )
+ : QScrollView( parent )
+{
+ viewport()->setBackgroundMode( PaletteBase );
+}
+
+void PixmapView::setPixmap( const QPixmap &pix )
+{
+ pixmap = pix;
+ resizeContents( pixmap.size().width(), pixmap.size().height() );
+ viewport()->repaint( false );
+}
+
+void PixmapView::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
+{
+ p->fillRect( cx, cy, cw, ch, colorGroup().brush( QColorGroup::Base ) );
+ p->drawPixmap( 0, 0, pixmap );
+}
+
+void PixmapView::previewUrl( const QUrl &u )
+{
+ if ( u.isLocalFile() ) {
+ QString path = u.path();
+ QPixmap pix( path );
+ if ( !pix.isNull() )
+ setPixmap( pix );
+ } else {
+ qWarning( "Previewing remot files not supported" );
+ }
+}
+
+QStringList qChoosePixmaps( QWidget *parent )
+{
+ if ( !imageIconProvider && !QFileDialog::iconProvider() )
+ QFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) );
+
+ QString filter;
+ QString all = qApp->translate( "qChoosePixmap", "All Pixmaps (" );
+ for ( uint i = 0; i < QImageIO::outputFormats().count(); i++ ) {
+ filter += qApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ).
+ arg( QImageIO::outputFormats().at( i ) ).
+ arg( "*." + QString( QImageIO::outputFormats().at( i ) ).lower() );
+ all += "*." + QString( QImageIO::outputFormats().at( i ) ).lower() + ";";
+ }
+ filter.prepend( all + qApp->translate( "qChoosePixmap", ")\n" ) );
+ filter += qApp->translate( "qChoosePixmap", "All Files (*)" );
+
+ QFileDialog fd( QString::null, filter, parent, 0, true );
+ fd.setMode( QFileDialog::ExistingFiles );
+ fd.setContentsPreviewEnabled( true );
+ PixmapView *pw = new PixmapView( &fd );
+ fd.setContentsPreview( pw, pw );
+ fd.setViewMode( QFileDialog::List );
+ fd.setPreviewMode( QFileDialog::Contents );
+ fd.setCaption( qApp->translate( "qChoosePixmap", "Choose Images" ) );
+ if ( fd.exec() == QDialog::Accepted )
+ return fd.selectedFiles();
+ return QStringList();
+}
+
+QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QString *fn )
+{
+#if defined(DESIGNER)
+ if ( !fw || fw->savePixmapInline() ) {
+ if ( !imageIconProvider && !QFileDialog::iconProvider() )
+ QFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) );
+
+ QString filter;
+ QString all = i18n( "All Pixmaps" );
+ all += " (";
+ for ( uint i = 0; i < QImageIO::outputFormats().count(); i++ ) {
+ filter += i18n( "%1-Pixmaps (%2)\n" ).
+ arg( QImageIO::outputFormats().at( i ) ).
+ arg( "*." + QString( QImageIO::outputFormats().at( i ) ).lower() );
+ all += "*." + QString( QImageIO::outputFormats().at( i ) ).lower() + ";";
+ }
+ filter.prepend( all + ")\n" );
+ filter += i18n( "All Files (*)" );
+
+ QFileDialog fd( QString::null, filter, parent, 0, true );
+ fd.setContentsPreviewEnabled( true );
+ PixmapView *pw = new PixmapView( &fd );
+ fd.setContentsPreview( pw, pw );
+ fd.setViewMode( QFileDialog::List );
+ fd.setPreviewMode( QFileDialog::Contents );
+ fd.setCaption( i18n( "Choose Pixmap" ) );
+ if ( fd.exec() == QDialog::Accepted ) {
+ QPixmap pix( fd.selectedFile() );
+ if ( fn )
+ *fn = fd.selectedFile();
+ MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() );
+ return pix;
+ }
+ }
+#ifndef KOMMANDER
+ else if ( fw && fw->savePixmapInProject() ) {
+ PixmapCollectionEditor dia( parent, 0, true );
+ dia.setProject( fw->project() );
+ dia.setChooserMode( true );
+ dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
+ if ( dia.exec() == QDialog::Accepted ) {
+ QPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) );
+ MetaDataBase::setPixmapKey( fw, pix.serialNumber(), dia.viewPixmaps->currentItem()->text() );
+ return pix;
+ }
+ }
+#endif
+ else {
+ PixmapFunction dia( parent, 0, true );
+ QObject::connect( dia.helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" );
+ dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) );
+ dia.editArguments->setFocus();
+ if ( dia.exec() == QDialog::Accepted ) {
+ QPixmap pix( PixmapChooser::loadPixmap( "image.xpm" ) );
+ MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() );
+ return pix;
+ }
+ }
+#else
+ Q_UNUSED( parent );
+ Q_UNUSED( fw );
+ Q_UNUSED( old );
+#endif
+ return QPixmap();
+}
+
+ImageIconProvider::ImageIconProvider( QWidget *parent, const char *name )
+ : QFileIconProvider( parent, name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
+{
+ fmts = QImage::inputFormats();
+}
+
+ImageIconProvider::~ImageIconProvider()
+{
+}
+
+const QPixmap * ImageIconProvider::pixmap( const QFileInfo &fi )
+{
+ QString ext = fi.extension().upper();
+ if ( fmts.contains( ext ) ) {
+ return &imagepm;
+ } else {
+ return QFileIconProvider::pixmap( fi );
+ }
+}
+
+PixmapChooser::PixmapChooser()
+{
+ // #### hardcoded at the moment
+ miniPixDir = "pics/mini/";
+ noSizePixDir = "pics/";
+ smallPixDir = "pics/small/";
+ largePixDir = "pics/large/";
+}
+
+QString PixmapChooser::pixmapPath( Size size ) const
+{
+ if ( size == Small )
+ return smallPixDir;
+ if ( size == Mini )
+ return miniPixDir;
+ if ( size == NoSize )
+ return noSizePixDir;
+ return largePixDir;
+}
+
+QPixmap PixmapChooser::loadPixmap( const QString &name, Size size )
+{
+#if defined(DESIGNER)
+ if ( !pixmapChooser )
+ pixmapChooser = new PixmapChooser;
+
+ if ( name == "logo" )
+ return QPixmap( logo_xpm );
+
+ if ( name[ 0 ] == '/' || name[ 0 ] == '\\' || name[ 1 ] == ':' )
+ return QPixmap( name );
+
+ QString lookup;
+ switch ( size ) {
+ case Small:
+ lookup = "small/";
+ break;
+ case Disabled:
+ lookup = "small/disabled/";
+ break;
+ case Large:
+ lookup = "large/";
+ break;
+ case Mini:
+ lookup = "mini/";
+ break;
+ default:
+ break;
+ }
+
+ QString lookup_png = lookup + QFileInfo( name ).baseName() + ".png";
+ lookup += name;
+
+ Embed *e = &embed_vec[ 0 ];
+ while ( e->name ) {
+ if ( QString( e->name ) == lookup ) {
+ QImage img;
+ img.loadFromData( (const uchar*)e->data, e->size );
+ QPixmap pix;
+ pix.convertFromImage( img );
+ return pix;
+ } else if ( QString( e->name ) == lookup_png ) {
+ QImage img;
+ img.loadFromData( (const uchar*)e->data, e->size );
+ QPixmap pix;
+ pix.convertFromImage( img );
+ return pix;
+ }
+ e++;
+ }
+
+ // fallback
+ return QPixmap( pixmapChooser->pixmapPath( size ) + name );
+#else
+ Q_UNUSED( name );
+ Q_UNUSED( size );
+ return QPixmap();
+#endif
+}
+#include "pixmapchooser.moc"
diff --git a/kommander/editor/pixmapchooser.h b/kommander/editor/pixmapchooser.h
new file mode 100644
index 00000000..22e5f94c
--- /dev/null
+++ b/kommander/editor/pixmapchooser.h
@@ -0,0 +1,86 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef PIXMAPCHOOSER_H
+#define PIXMAPCHOOSER_H
+
+#include <qfiledialog.h>
+#include <qscrollview.h>
+#include <qpixmap.h>
+#include <qurl.h>
+
+class FormWindow;
+
+class PixmapView : public QScrollView,
+ public QFilePreview
+{
+ Q_OBJECT
+
+public:
+ PixmapView( QWidget *parent );
+ void setPixmap( const QPixmap &pix );
+ void drawContents( QPainter *p, int, int, int, int );
+ void previewUrl( const QUrl &u );
+
+private:
+ QPixmap pixmap;
+
+};
+
+class ImageIconProvider : public QFileIconProvider
+{
+ Q_OBJECT
+
+public:
+ ImageIconProvider( QWidget *parent = 0, const char *name = 0 );
+ ~ImageIconProvider();
+
+ const QPixmap *pixmap( const QFileInfo &fi );
+
+private:
+ QStrList fmts;
+ QPixmap imagepm;
+
+};
+
+QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw = 0, const QPixmap &old = QPixmap(), QString *fn = 0 );
+QStringList qChoosePixmaps( QWidget *parent );
+
+
+class PixmapChooser
+{
+public:
+ enum Size { Mini, Small, Large, NoSize, Disabled };
+
+ PixmapChooser();
+ QString pixmapPath( Size size ) const;
+
+ static QPixmap loadPixmap( const QString &name, Size size = Small );
+
+private:
+ QString smallPixDir;
+ QString largePixDir;
+ QString miniPixDir;
+ QString noSizePixDir;
+
+};
+
+
+#endif
diff --git a/kommander/editor/pixmapfunction.ui b/kommander/editor/pixmapfunction.ui
new file mode 100644
index 00000000..a75869dc
--- /dev/null
+++ b/kommander/editor/pixmapfunction.ui
@@ -0,0 +1,923 @@
+<!DOCTYPE UI><UI>
+<class>PixmapFunction</class><comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget>
+ <class>QDialog</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>PixmapFunction</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>300</width>
+ <height>108</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Choose Pixmap</string>
+ </property>
+ <property stdset="1">
+ <name>sizeGripEnabled</name>
+ <bool>true</bool>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Enter arguments for loading the pixmap:</string>
+ </property>
+ <property>
+ <name>buddy</name>
+ <cstring>editArguments</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Frame9</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Sunken</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>StyledPanel</enum>
+ </property>
+ <property stdset="1">
+ <name>lineWidth</name>
+ <number>2</number>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>2</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>0</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>labelFunction</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>QPixmap(</string>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>233</red>
+ <green>233</green>
+ <blue>233</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>242</red>
+ <green>242</green>
+ <blue>242</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>242</red>
+ <green>242</green>
+ <blue>242</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>editArguments</cstring>
+ </property>
+ <property stdset="1">
+ <name>frame</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>233</red>
+ <green>233</green>
+ <blue>233</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>170</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>242</red>
+ <green>242</green>
+ <blue>242</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>170</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>242</red>
+ <green>242</green>
+ <blue>242</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>170</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>)</string>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>233</red>
+ <green>233</green>
+ <blue>233</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>242</red>
+ <green>242</green>
+ <blue>242</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>211</red>
+ <green>211</green>
+ <blue>211</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>242</red>
+ <green>242</green>
+ <blue>242</blue>
+ </color>
+ <color>
+ <red>105</red>
+ <green>105</green>
+ <blue>105</blue>
+ </color>
+ <color>
+ <red>140</red>
+ <green>140</green>
+ <blue>140</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer1</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout3</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>helpButton</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Help</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>buttonOk</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;OK</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>default</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Cancel</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>PixmapFunction</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>PixmapFunction</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+</UI>
diff --git a/kommander/editor/preferences.ui b/kommander/editor/preferences.ui
new file mode 100644
index 00000000..6bd5dac3
--- /dev/null
+++ b/kommander/editor/preferences.ui
@@ -0,0 +1,669 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Preferences</class>
+<comment>*********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*********************************************************************</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>Preferences</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>467</width>
+ <height>404</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Preferences</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Preferences&lt;/b&gt;&lt;p&gt;Change the preferences of Qt Designer. There is always one tab with general preferences. There may be additional tabs, depending on which plugins are installed.&lt;/p&gt;</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>tabWidget</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>pageGeneral</cstring>
+ </property>
+ <attribute name="title">
+ <string>General</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="QButtonGroup" row="0" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>Backgro&amp;und</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="StyledButton" row="0" column="1">
+ <property name="name">
+ <cstring>buttonColor</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="scale" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose a color</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select a color in the color dialog.</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioColor</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>Co&amp;lor</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Use a background color</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Use a background color.</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioPixmap</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Pixmap</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Use a background pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Use a background pixmap.</string>
+ </property>
+ </widget>
+ <widget class="StyledButton" row="1" column="1">
+ <property name="name">
+ <cstring>buttonPixmap</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="scale" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select a pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Choose a pixmap file.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QCheckBox" row="0" column="1">
+ <property name="name">
+ <cstring>checkBoxShowGrid</cstring>
+ </property>
+ <property name="text">
+ <string>Show &amp;grid</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Show Grid</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Customize the grid appearance for all forms.&lt;/b&gt;&lt;p&gt;When &lt;b&gt;Show Grid&lt;/b&gt; is checked, all forms show a grid.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="1" column="1">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Gr&amp;id</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string></string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkBoxGrid</cstring>
+ </property>
+ <property name="text">
+ <string>Sn&amp;ap to grid</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Snap to the grid</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Customize the grid-settings for all forms.&lt;/b&gt;&lt;p&gt;When &lt;b&gt;Snap to Grid&lt;/b&gt; is checked, the widgets snap to the grid using the the X/Y resolution.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout4</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="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>spinGridX</cstring>
+ </property>
+ <property name="maxValue">
+ <number>50</number>
+ </property>
+ <property name="minValue">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Grid resolution</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Customize the grid-settings for all forms.&lt;/b&gt;&lt;p&gt;When &lt;b&gt;Show Grid&lt;/b&gt; is checked, a grid is shown on all forms using the X/Y resolution.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>spinGridY</cstring>
+ </property>
+ <property name="maxValue">
+ <number>50</number>
+ </property>
+ <property name="minValue">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Grid resolution</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Customize the grid-settings for all forms.&lt;/b&gt;&lt;p&gt;When &lt;b&gt;Show Grid&lt;/b&gt; is checked, a grid is shown on all forms using the X/Y resolution.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>Grid-&amp;X:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>spinGridX</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>Label1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Grid-&amp;Y:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>spinGridY</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="3" 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>20</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>A splash screen is displayed when starting Qt Designer if this option is checked.</string>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>GroupBox5</cstring>
+ </property>
+ <property name="title">
+ <string>Ge&amp;neral</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkBoxWorkspace</cstring>
+ </property>
+ <property name="text">
+ <string>Restore last &amp;workspace on startup</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Restore last workspace</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The current workspace settings will be restored the next time you start Qt Designer if this option is checked.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkBoxSplash</cstring>
+ </property>
+ <property name="text">
+ <string>Show &amp;splash screen on startup</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Show Splashscreen</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>A splash screen is displayed when starting Qt Designer if this option is checked.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkAutoEdit</cstring>
+ </property>
+ <property name="text">
+ <string>Disable data&amp;base auto-edit in preview</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>Label3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Documentation path:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>editDocPath</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <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="QLineEdit">
+ <property name="name">
+ <cstring>editDocPath</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Enter the path to the documentation.&lt;/b&gt;&lt;p&gt;You may provide an $environment variable as the first part of the pathname.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QToolButton">
+ <property name="name">
+ <cstring>buttonDocPath</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select path</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Look for the documentation path.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox" row="2" column="1">
+ <property name="name">
+ <cstring>GroupBox3</cstring>
+ </property>
+ <property name="title">
+ <string>&amp;Toolbars</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkBoxBigIcons</cstring>
+ </property>
+ <property name="text">
+ <string>Show &amp;big icons</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Big Icons</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Big icons will be used in the toolbars if this is checked.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>checkBoxTextLabels</cstring>
+ </property>
+ <property name="text">
+ <string>Show text lab&amp;els</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Text Labels</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Text labels will be usin in the toolbars if this is checked.</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <widget class="QLayoutWidget">
+ <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="QPushButton">
+ <property name="name">
+ <cstring>helpButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <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="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>false</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>StyledButton</class>
+ <header location="local">styledbutton.h</header>
+ <sizehint>
+ <width>40</width>
+ <height>25</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ <signal>clicked()</signal>
+ <signal>changed()</signal>
+ <property type="Color">color</property>
+ <property type="Pixmap">pixmap</property>
+ <property type="Bool">scale</property>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="1112">789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>Preferences</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>Preferences</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>checkBoxGrid</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>spinGridX</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkBoxGrid</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>spinGridY</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>radioColor</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>buttonColor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>radioPixmap</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>buttonPixmap</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkBoxShowGrid</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GroupBox1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <slot access="protected" language="C++" returnType="void">init()</slot>
+ <slot access="protected" language="C++" returnType="void">destroy()</slot>
+</connections>
+<tabstops>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>radioColor</tabstop>
+ <tabstop>radioPixmap</tabstop>
+ <tabstop>buttonColor</tabstop>
+ <tabstop>buttonPixmap</tabstop>
+ <tabstop>checkBoxShowGrid</tabstop>
+ <tabstop>checkBoxGrid</tabstop>
+ <tabstop>spinGridX</tabstop>
+ <tabstop>spinGridY</tabstop>
+ <tabstop>checkBoxWorkspace</tabstop>
+ <tabstop>checkBoxSplash</tabstop>
+ <tabstop>checkAutoEdit</tabstop>
+ <tabstop>editDocPath</tabstop>
+ <tabstop>buttonDocPath</tabstop>
+ <tabstop>checkBoxBigIcons</tabstop>
+ <tabstop>checkBoxTextLabels</tabstop>
+ <tabstop>helpButton</tabstop>
+</tabstops>
+</UI>
diff --git a/kommander/editor/previewframe.cpp b/kommander/editor/previewframe.cpp
new file mode 100644
index 00000000..9ffd77af
--- /dev/null
+++ b/kommander/editor/previewframe.cpp
@@ -0,0 +1,52 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qvbox.h>
+#include <qpainter.h>
+
+#include "previewframe.h"
+
+PreviewFrame::PreviewFrame( QWidget *parent, const char *name )
+ : QVBox( parent, name )
+{
+ setMinimumSize(200, 200);
+ setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ setLineWidth(1);
+
+ PreviewWorkspace * w = new PreviewWorkspace( this );
+ w->setEraseColor(colorGroup().dark());
+ previewWidget = new PreviewWidget( w );
+ previewWidget->move( 10, 10 );
+}
+
+void PreviewFrame::setPreviewPalette(QPalette pal)
+{
+ previewWidget->setPalette(pal);
+}
+
+void PreviewWorkspace::paintEvent( QPaintEvent* )
+{
+ QPainter p ( this );
+ p.setPen( QPen( white ) );
+ p.drawText ( 0, height() / 2, width(), height(), AlignHCenter,
+ "The moose in the noose\nate the goose who was loose." );
+}
+
+#include "previewframe.moc"
diff --git a/kommander/editor/previewframe.h b/kommander/editor/previewframe.h
new file mode 100644
index 00000000..b8ff33a4
--- /dev/null
+++ b/kommander/editor/previewframe.h
@@ -0,0 +1,53 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __previewframe_h__
+#define __previewframe_h__
+
+#include <qvbox.h>
+#include <qworkspace.h>
+
+#include "previewwidgetimpl.h"
+
+class PreviewWorkspace : public QWorkspace
+{
+ Q_OBJECT
+public:
+ PreviewWorkspace( QWidget* parent = 0, const char* name = 0 )
+ : QWorkspace( parent, name ) {}
+ ~PreviewWorkspace() {}
+
+protected:
+ void paintEvent( QPaintEvent* );
+};
+
+class PreviewFrame : public QVBox
+{
+ Q_OBJECT
+
+public:
+ PreviewFrame( QWidget *parent = 0, const char *name = 0 );
+ void setPreviewPalette(QPalette);
+
+private:
+ PreviewWidget *previewWidget;
+};
+
+#endif
diff --git a/kommander/editor/previewwidget.ui b/kommander/editor/previewwidget.ui
new file mode 100644
index 00000000..317313cf
--- /dev/null
+++ b/kommander/editor/previewwidget.ui
@@ -0,0 +1,279 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>PreviewWidgetBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>PreviewWidgetBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>378</width>
+ <height>236</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>Preview Window</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <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="QLayoutWidget">
+ <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="QButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>ButtonGroup</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>RadioButton1</cstring>
+ </property>
+ <property name="text">
+ <string>RadioButton1</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>RadioButton2</cstring>
+ </property>
+ <property name="text">
+ <string>RadioButton2</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>RadioButton3</cstring>
+ </property>
+ <property name="text">
+ <string>RadioButton3</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup2</cstring>
+ </property>
+ <property name="title">
+ <string>ButtonGroup2</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>CheckBox1</cstring>
+ </property>
+ <property name="text">
+ <string>CheckBox1</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>CheckBox2</cstring>
+ </property>
+ <property name="text">
+ <string>CheckBox2</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QProgressBar">
+ <property name="name">
+ <cstring>ProgressBar1</cstring>
+ </property>
+ <property name="progress">
+ <number>50</number>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout5</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>LineEdit1</cstring>
+ </property>
+ <property name="text">
+ <string>LineEdit</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>ComboBox</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ComboBox1</cstring>
+ </property>
+ </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="QSpinBox">
+ <property name="name">
+ <cstring>SpinBox1</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>PushButton1</cstring>
+ </property>
+ <property name="text">
+ <string>PushButton</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QScrollBar">
+ <property name="name">
+ <cstring>ScrollBar1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QSlider">
+ <property name="name">
+ <cstring>Slider1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QTextView">
+ <property name="name">
+ <cstring>textView</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&lt;p&gt;
+&lt;a href="http://www.trolltech.com"&gt; http://www.trolltech.com &lt;/a&gt;
+&lt;/p&gt;
+&lt;p&gt;
+&lt;a href="http://www.kde.org"&gt; http://www.kde.org &lt;/a&gt;
+&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<connections>
+ <slot access="protected" language="C++" returnType="void">init()</slot>
+ <slot access="protected" language="C++" returnType="void">destroy()</slot>
+</connections>
+</UI>
diff --git a/kommander/editor/previewwidgetimpl.cpp b/kommander/editor/previewwidgetimpl.cpp
new file mode 100644
index 00000000..9febc180
--- /dev/null
+++ b/kommander/editor/previewwidgetimpl.cpp
@@ -0,0 +1,60 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qobjectlist.h"
+#include "previewwidgetimpl.h"
+
+PreviewWidget::PreviewWidget( QWidget *parent, const char *name )
+ : PreviewWidgetBase( parent, name )
+{
+ // install event filter on child widgets
+ QObjectList *l = queryList("QWidget");
+ QObjectListIt it(*l);
+ QObject * obj;
+ while ((obj = it.current()) != 0) {
+ ++it;
+ obj->installEventFilter(this);
+ ((QWidget*)obj)->setFocusPolicy(NoFocus);
+ }
+}
+
+void PreviewWidget::closeEvent(QCloseEvent *e)
+{
+ e->ignore();
+}
+
+bool PreviewWidget::eventFilter(QObject *, QEvent *e)
+{
+ switch ( e->type() ) {
+ case QEvent::MouseButtonPress:
+ case QEvent::MouseButtonRelease:
+ case QEvent::MouseButtonDblClick:
+ case QEvent::MouseMove:
+ case QEvent::KeyPress:
+ case QEvent::KeyRelease:
+ case QEvent::Enter:
+ case QEvent::Leave:
+ return true; // ignore;
+ default:
+ break;
+ }
+ return false;
+}
+#include "previewwidgetimpl.moc"
diff --git a/kommander/editor/previewwidgetimpl.h b/kommander/editor/previewwidgetimpl.h
new file mode 100644
index 00000000..142a7758
--- /dev/null
+++ b/kommander/editor/previewwidgetimpl.h
@@ -0,0 +1,37 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __previewwidgetimpl_h__
+#define __previewwidgetimpl_h__
+
+#include "previewwidget.h"
+
+class PreviewWidget : public PreviewWidgetBase
+{
+ Q_OBJECT
+
+public:
+ PreviewWidget( QWidget *parent = 0, const char *name = 0 );
+
+ void closeEvent(QCloseEvent *);
+ bool eventFilter(QObject *, QEvent *);
+};
+
+#endif
diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp
new file mode 100644
index 00000000..9dfb7759
--- /dev/null
+++ b/kommander/editor/propertyeditor.cpp
@@ -0,0 +1,3706 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qvariant.h> // HP-UX compiler needs this here
+
+#include "propertyeditor.h"
+#include "pixmapchooser.h"
+#include "formwindow.h"
+#include "command.h"
+#include "metadatabase.h"
+#include "widgetdatabase.h"
+#include "widgetfactory.h"
+#include "globaldefs.h"
+#include "defs.h"
+#include "asciivalidator.h"
+#include "paletteeditorimpl.h"
+#include "multilineeditorimpl.h"
+#include "mainwindow.h"
+#ifndef KOMMANDER
+#include "project.h"
+#endif
+#include "hierarchyview.h"
+
+#include <limits.h>
+
+#include <qpainter.h>
+#include <qpalette.h>
+#include <qapplication.h>
+#include <qheader.h>
+#include <qlineedit.h>
+#include <qstrlist.h>
+#include <qmetaobject.h>
+#include <qcombobox.h>
+#include <qpushbutton.h>
+#include <qhbox.h>
+#include <qfontdialog.h>
+#include <qspinbox.h>
+#include <qevent.h>
+#include <qobjectlist.h>
+#include <qlistbox.h>
+#include <qfontdatabase.h>
+#include <qcolor.h>
+#include <kcolordialog.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qsizepolicy.h>
+#include <qbitmap.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qaccel.h>
+#include <qworkspace.h>
+#include <qtimer.h>
+#include <qdragobject.h>
+#include <qdom.h>
+#include <qprocess.h>
+#include <qstyle.h>
+#include <qdatetimeedit.h>
+
+#include "pics/arrow.xbm"
+#include "pics/uparrow.xbm"
+#include "pics/cross.xbm"
+#include "pics/wait.xbm"
+#include "pics/ibeam.xbm"
+#include "pics/sizeh.xbm"
+#include "pics/sizev.xbm"
+#include "pics/sizeb.xbm"
+#include "pics/sizef.xbm"
+#include "pics/sizeall.xbm"
+#include "pics/vsplit.xbm"
+#include "pics/hsplit.xbm"
+#include "pics/hand.xbm"
+#include "pics/no.xbm"
+
+#include <klocale.h>
+
+static QFontDatabase *fontDataBase = 0;
+QString assistantPath();
+
+static void cleanupFontDatabase()
+{
+ delete fontDataBase;
+ fontDataBase = 0;
+}
+
+static QStringList getFontList()
+{
+ if ( !fontDataBase ) {
+ fontDataBase = new QFontDatabase;
+ qAddPostRoutine( cleanupFontDatabase );
+ }
+ return fontDataBase->families();
+}
+
+
+class PropertyWhatsThis : public QWhatsThis
+{
+public:
+ PropertyWhatsThis( PropertyList *l );
+ QString text( const QPoint &pos );
+ bool clicked( const QString& href );
+
+private:
+ PropertyList *propertyList;
+
+};
+
+PropertyWhatsThis::PropertyWhatsThis( PropertyList *l )
+ : QWhatsThis( l->viewport() ), propertyList( l )
+{
+}
+
+QString PropertyWhatsThis::text( const QPoint &pos )
+{
+ return propertyList->whatsThisAt( pos );
+}
+
+bool PropertyWhatsThis::clicked( const QString& href )
+{
+ if ( !href.isEmpty() ) {
+ QStringList lst;
+ lst << assistantPath() << (QString( "d:" ) + QString( href ));
+ QProcess proc( lst );
+ proc.start();
+ }
+ return false; // do not hide window
+}
+
+
+/*!
+ \class PropertyItem propertyeditor.h
+ \brief Base class for all property items
+
+ This is the base class for each property item for the
+ PropertyList. A simple property item has just a name and a value to
+ provide an editor for a datatype. But more complex datatypes might
+ provide an expandable item for editing single parts of the
+ datatype. See hasSubItems(), initChildren() for that.
+*/
+
+/*! If this item should be a child of another property item, specify
+ \a prop as the parent item.
+*/
+
+PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+ : QListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName )
+{
+ setSelectable( false );
+ open = false;
+ setText( 0, propertyName );
+ changed = false;
+ setText( 1, "" );
+ resetButton = 0;
+}
+
+PropertyItem::~PropertyItem()
+{
+ if ( resetButton )
+ delete resetButton->parentWidget();
+ resetButton = 0;
+}
+
+void PropertyItem::toggle()
+{
+}
+
+void PropertyItem::updateBackColor()
+{
+ if ( itemAbove() && this != listview->firstChild() ) {
+ if ( ( ( PropertyItem*)itemAbove() )->backColor == *backColor1 )
+ backColor = *backColor2;
+ else
+ backColor = *backColor1;
+ } else {
+ backColor = *backColor1;
+ }
+ if ( listview->firstChild() == this )
+ backColor = *backColor1;
+}
+
+QColor PropertyItem::backgroundColor()
+{
+ updateBackColor();
+ if ( (QListViewItem*)this == listview->currentItem() )
+ return *selectedBack;
+ return backColor;
+}
+
+/*! If a subclass is a expandable item, this is called when the child
+items should be created.
+*/
+
+void PropertyItem::createChildren()
+{
+}
+
+/*! If a subclass is a expandable item, this is called when the child
+items should be initialized.
+*/
+
+void PropertyItem::initChildren()
+{
+}
+
+void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+{
+ QColorGroup g( cg );
+ g.setColor( QColorGroup::Base, backgroundColor() );
+ g.setColor( QColorGroup::Foreground, Qt::black );
+ g.setColor( QColorGroup::Text, Qt::black );
+ int indent = 0;
+ if ( column == 0 ) {
+ indent = 20 + ( property ? 20 : 0 );
+ p->fillRect( 0, 0, width, height(), backgroundColor() );
+ p->save();
+ p->translate( indent, 0 );
+ }
+
+ if ( isChanged() && column == 0 ) {
+ p->save();
+ QFont f = p->font();
+ f.setBold( true );
+ p->setFont( f );
+ }
+
+ if ( !hasCustomContents() || column != 1 ) {
+ QListViewItem::paintCell( p, g, column, width - indent, align );
+ } else {
+ p->fillRect( 0, 0, width, height(), backgroundColor() );
+ drawCustomContents( p, QRect( 0, 0, width, height() ) );
+ }
+
+ if ( isChanged() && column == 0 )
+ p->restore();
+ if ( column == 0 )
+ p->restore();
+ if ( hasSubItems() && column == 0 ) {
+ p->save();
+ p->setPen( cg.foreground() );
+ p->setBrush( cg.base() );
+ p->drawRect( 5, height() / 2 - 4, 9, 9 );
+ p->drawLine( 7, height() / 2, 11, height() / 2 );
+ if ( !isOpen() )
+ p->drawLine( 9, height() / 2 - 2, 9, height() / 2 + 2 );
+ p->restore();
+ }
+ p->save();
+ p->setPen( QPen( cg.dark(), 1 ) );
+ p->drawLine( 0, height() - 1, width, height() - 1 );
+ p->drawLine( width - 1, 0, width - 1, height() );
+ p->restore();
+
+ if ( listview->currentItem() == this && column == 0 &&
+ !listview->hasFocus() && !listview->viewport()->hasFocus() )
+ paintFocus( p, cg, QRect( 0, 0, width, height() ) );
+}
+
+void PropertyItem::paintBranches( QPainter * p, const QColorGroup & cg,
+ int w, int y, int h )
+{
+ QColorGroup g( cg );
+ g.setColor( QColorGroup::Base, backgroundColor() );
+ QListViewItem::paintBranches( p, g, w, y, h );
+}
+
+void PropertyItem::paintFocus( QPainter *p, const QColorGroup &cg, const QRect &r )
+{
+ p->save();
+ QApplication::style().drawPrimitive(QStyle::PE_Panel, p, r, cg,
+ QStyle::Style_Sunken, QStyleOption(1,1) );
+ p->restore();
+}
+
+/*! Subclasses which are expandable items have to return true
+ here. Default is false.
+*/
+
+bool PropertyItem::hasSubItems() const
+{
+ return false;
+}
+
+/*! Returns the parent property item here if this is a child or 0
+ otherwise.
+ */
+
+PropertyItem *PropertyItem::propertyParent() const
+{
+ return property;
+}
+
+bool PropertyItem::isOpen() const
+{
+ return open;
+}
+
+void PropertyItem::setOpen( bool b )
+{
+ if ( b == open )
+ return;
+ open = b;
+
+ if ( !open ) {
+ children.setAutoDelete( true );
+ children.clear();
+ children.setAutoDelete( false );
+ qApp->processEvents();
+ listview->updateEditorSize();
+ return;
+ }
+
+ createChildren();
+ initChildren();
+ qApp->processEvents();
+ listview->updateEditorSize();
+}
+
+/*! Subclasses have to show the editor of the item here
+*/
+
+void PropertyItem::showEditor()
+{
+ createResetButton();
+ resetButton->parentWidget()->show();
+}
+
+/*! Subclasses have to hide the editor of the item here
+*/
+
+void PropertyItem::hideEditor()
+{
+ createResetButton();
+ resetButton->parentWidget()->hide();
+}
+
+/*! This is called to init the value of the item. Reimplement in
+ subclasses to init the editor
+*/
+
+void PropertyItem::setValue( const QVariant &v )
+{
+ val = v;
+}
+
+QVariant PropertyItem::value() const
+{
+ return val;
+}
+
+bool PropertyItem::isChanged() const
+{
+ return changed;
+}
+
+void PropertyItem::setChanged( bool b, bool updateDb )
+{
+ if ( propertyParent() )
+ return;
+ if ( changed == b )
+ return;
+ changed = b;
+ repaint();
+ if ( updateDb )
+ MetaDataBase::setPropertyChanged( listview->propertyEditor()->widget(), name(), changed );
+ updateResetButtonState();
+}
+
+QString PropertyItem::name() const
+{
+ return propertyName;
+}
+
+void PropertyItem::createResetButton()
+{
+ if ( resetButton ) {
+ resetButton->parentWidget()->lower();
+ return;
+ }
+ QHBox *hbox = new QHBox( listview->viewport() );
+ hbox->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ hbox->setLineWidth( 1 );
+ resetButton = new QPushButton( hbox );
+ resetButton->setPixmap( PixmapChooser::loadPixmap( "resetproperty.xpm", PixmapChooser::Mini ) );
+ resetButton->setFixedWidth( resetButton->sizeHint().width() );
+ hbox->layout()->setAlignment( Qt::AlignRight );
+ listview->addChild( hbox );
+ hbox->hide();
+ QObject::connect( resetButton, SIGNAL( clicked() ),
+ listview, SLOT( resetProperty() ) );
+ QToolTip::add( resetButton, i18n("Reset the property to its default value" ) );
+ QWhatsThis::add( resetButton, i18n("Click this button to reset the property to its default value" ) );
+ updateResetButtonState();
+}
+
+void PropertyItem::updateResetButtonState()
+{
+ if ( !resetButton )
+ return;
+ if ( propertyParent() || !WidgetFactory::canResetProperty( listview->propertyEditor()->widget(), name() ) )
+ resetButton->setEnabled( false );
+ else
+ resetButton->setEnabled( isChanged() );
+}
+
+/*! Call this to place/resize the item editor correctly (normally
+ call it from showEditor())
+*/
+
+void PropertyItem::placeEditor( QWidget *w )
+{
+ createResetButton();
+ QRect r = listview->itemRect( this );
+ if ( !r.size().isValid() ) {
+ listview->ensureItemVisible( this );
+#if defined(Q_WS_WIN)
+ listview->repaintContents( false );
+#endif
+ r = listview->itemRect( this );
+ }
+ r.setX( listview->header()->sectionPos( 1 ) );
+ r.setWidth( listview->header()->sectionSize( 1 ) - 1 );
+ r.setWidth( r.width() - resetButton->width() - 2 );
+ r = QRect( listview->viewportToContents( r.topLeft() ), r.size() );
+ w->resize( r.size() );
+ listview->moveChild( w, r.x(), r.y() );
+ resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() );
+ listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() );
+ resetButton->setFixedHeight( r.height() - 3 );
+}
+
+/*! This should be called by subclasses if the use changed the value
+ of the property and this value should be applied to the widget property
+*/
+
+void PropertyItem::notifyValueChange()
+{
+ if ( !propertyParent() ) {
+ listview->valueChanged( this );
+ setChanged( true );
+ if ( hasSubItems() )
+ initChildren();
+ } else {
+ propertyParent()->childValueChanged( this );
+ setChanged( true );
+ }
+}
+
+/*! If a subclass is a expandable item reimplement this as this is
+ always called if a child item changed its value. So update the
+ display of the item here then.
+*/
+
+void PropertyItem::childValueChanged( PropertyItem * )
+{
+}
+
+/*! When adding a child item, call this (normally from addChildren()
+*/
+
+void PropertyItem::addChild( PropertyItem *i )
+{
+ children.append( i );
+}
+
+int PropertyItem::childCount() const
+{
+ return children.count();
+}
+
+PropertyItem *PropertyItem::child( int i ) const
+{
+ // ARRRRRRRRG
+ return ( (PropertyItem*)this )->children.at( i );
+}
+
+/*! If the contents of the item is not displayable with a text, but
+ you want to draw it yourself (using drawCustomContents()), return
+ true here.
+*/
+
+bool PropertyItem::hasCustomContents() const
+{
+ return false;
+}
+
+/*!
+ \sa hasCustomContents()
+*/
+
+void PropertyItem::drawCustomContents( QPainter *, const QRect & )
+{
+}
+
+QString PropertyItem::currentItem() const
+{
+ return QString::null;
+}
+
+int PropertyItem::currentIntItem() const
+{
+ return -1;
+}
+
+void PropertyItem::setCurrentItem( const QString & )
+{
+}
+
+void PropertyItem::setCurrentItem( int )
+{
+}
+
+int PropertyItem::currentIntItemFromObject() const
+{
+ return -1;
+}
+
+QString PropertyItem::currentItemFromObject() const
+{
+ return QString::null;
+}
+
+void PropertyItem::setFocus( QWidget *w )
+{
+ if ( !qApp->focusWidget() ||
+ listview->propertyEditor()->formWindow() &&
+ ( !MainWindow::self->isAFormWindowChild( qApp->focusWidget() ) &&
+ !qApp->focusWidget()->inherits( "Editor" ) ) )
+ w->setFocus();
+}
+
+void PropertyItem::setText( int col, const QString &t )
+{
+ QString txt( t );
+ if ( col == 1 )
+ txt = txt.replace( QRegExp( "\n" ), " " );
+ QListViewItem::setText( col, txt );
+}
+
+// --------------------------------------------------------------
+
+PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool comment, bool multiLine, bool ascii, bool a )
+ : PropertyItem( l, after, prop, propName ), withComment( comment ),
+ hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a )
+{
+ lin = 0;
+ box = 0;
+}
+
+QLineEdit *PropertyTextItem::lined()
+{
+ if ( lin )
+ return lin;
+ if ( hasMultiLines ) {
+ box = new QHBox( listview->viewport() );
+ box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setLineWidth( 2 );
+ box->hide();
+ }
+
+ lin = 0;
+ if ( hasMultiLines )
+ lin = new QLineEdit( box );
+ else
+ lin = new QLineEdit( listview->viewport() );
+
+ if ( asciiOnly ) {
+ if ( PropertyItem::name() == "name" )
+ lin->setValidator( new AsciiValidator( lin, "ascii_validator" ) );
+ else
+ lin->setValidator( new AsciiValidator( QString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
+ "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9"
+ "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3"
+ "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc"
+ "\xbd\xbe\xbf"), lin, "ascii_validator" ) );
+ } if ( !hasMultiLines ) {
+ lin->hide();
+ } else {
+ button = new QPushButton( i18n("..."), box );
+ button->setFixedWidth( 20 );
+ connect( button, SIGNAL( clicked() ),
+ this, SLOT( getText() ) );
+ lin->setFrame( false );
+ }
+ connect( lin, SIGNAL( returnPressed() ),
+ this, SLOT( setValue() ) );
+ connect( lin, SIGNAL( textChanged( const QString & ) ),
+ this, SLOT( setValue() ) );
+ if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" )
+ connect( lin, SIGNAL( returnPressed() ),
+ listview->propertyEditor()->formWindow()->commandHistory(),
+ SLOT( checkCompressedCommand() ) );
+ lin->installEventFilter( listview );
+ return lin;
+}
+
+PropertyTextItem::~PropertyTextItem()
+{
+ delete (QLineEdit*)lin;
+ lin = 0;
+ delete (QHBox*)box;
+ box = 0;
+}
+
+void PropertyTextItem::setChanged( bool b, bool updateDb )
+{
+ PropertyItem::setChanged( b, updateDb );
+ if ( withComment && childCount() > 0 )
+ ( (PropertyTextItem*)PropertyItem::child( 0 ) )->lined()->setEnabled( b );
+}
+
+bool PropertyTextItem::hasSubItems() const
+{
+ return withComment;
+}
+
+void PropertyTextItem::childValueChanged( PropertyItem *child )
+{
+ if ( PropertyItem::name() != "name" )
+ MetaDataBase::setPropertyComment( listview->propertyEditor()->widget(),
+ PropertyItem::name(), child->value().toString() );
+ else
+ MetaDataBase::setExportMacro( listview->propertyEditor()->widget(), child->value().toString() );
+ listview->propertyEditor()->formWindow()->commandHistory()->setModified( true );
+}
+
+static QString to_string( const QVariant &v, bool accel )
+{
+ if ( !accel )
+ return v.toString();
+ return QAccel::keyToString( v.toInt() );
+}
+
+void PropertyTextItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !lin || lin->text().length() == 0 ) {
+ lined()->blockSignals( true );
+ lined()->setText( to_string( value(), accel ) );
+ lined()->blockSignals( false );
+ }
+
+ QWidget* w;
+ if ( hasMultiLines )
+ w = box;
+ else
+ w= lined();
+
+ placeEditor( w );
+ if ( !w->isVisible() || !lined()->hasFocus() ) {
+ w->show();
+ setFocus( lined() );
+ }
+}
+
+void PropertyTextItem::createChildren()
+{
+ PropertyTextItem *i = new PropertyTextItem( listview, this, this,
+ PropertyItem::name() == "name" ?
+ "export macro" : "comment", false, false,
+ PropertyItem::name() == "name" );
+ i->lined()->setEnabled( isChanged() );
+ addChild( i );
+}
+
+void PropertyTextItem::initChildren()
+{
+ if ( !childCount() )
+ return;
+ PropertyItem *item = PropertyItem::child( 0 );
+ if ( item ) {
+ if ( PropertyItem::name() != "name" )
+ item->setValue( MetaDataBase::propertyComment( listview->propertyEditor()->widget(),
+ PropertyItem::name() ) );
+ else
+ item->setValue( MetaDataBase::exportMacro( listview->propertyEditor()->widget() ) );
+ }
+}
+
+void PropertyTextItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ QWidget* w;
+ if ( hasMultiLines )
+ w = box;
+ else
+ w = lined();
+
+ w->hide();
+}
+
+void PropertyTextItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+ if ( lin ) {
+ lined()->blockSignals( true );
+ int oldCursorPos;
+ oldCursorPos = lin->cursorPosition();
+ lined()->setText( to_string( v, accel ) );
+ if ( oldCursorPos < (int)lin->text().length() )
+ lin->setCursorPosition( oldCursorPos );
+ lined()->blockSignals( false );
+ }
+ setText( 1, to_string( v, accel ) );
+ PropertyItem::setValue( v );
+}
+
+void PropertyTextItem::setValue()
+{
+ setText( 1, lined()->text() );
+ QVariant v;
+ if ( accel )
+ v = QAccel::stringToKey( lined()->text() );
+ else
+ v = lined()->text();
+ PropertyItem::setValue( v );
+ notifyValueChange();
+}
+
+void PropertyTextItem::getText()
+{
+ QString txt = TextEditor::getText( listview, value().toString() );
+ if ( !txt.isEmpty() ) {
+ setText( 1, txt );
+ PropertyItem::setValue( txt );
+ notifyValueChange();
+ lined()->blockSignals( true );
+ lined()->setText( txt );
+ lined()->blockSignals( false );
+ }
+}
+
+// --------------------------------------------------------------
+
+PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ lin = 0;
+}
+
+QLineEdit *PropertyDoubleItem::lined()
+{
+ if ( lin )
+ return lin;
+ lin = new QLineEdit( listview->viewport() );
+ lin->setValidator( new QDoubleValidator( lin, "double_validator" ) );
+
+ connect( lin, SIGNAL( returnPressed() ),
+ this, SLOT( setValue() ) );
+ connect( lin, SIGNAL( textChanged( const QString & ) ),
+ this, SLOT( setValue() ) );
+ lin->installEventFilter( listview );
+ return lin;
+}
+
+PropertyDoubleItem::~PropertyDoubleItem()
+{
+ delete (QLineEdit*)lin;
+ lin = 0;
+}
+
+void PropertyDoubleItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !lin ) {
+ lined()->blockSignals( true );
+ lined()->setText( QString::number( value().toDouble() ) );
+ lined()->blockSignals( false );
+ }
+ QWidget* w = lined();
+
+ placeEditor( w );
+ if ( !w->isVisible() || !lined()->hasFocus() ) {
+ w->show();
+ setFocus( lined() );
+ }
+}
+
+
+void PropertyDoubleItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ QWidget* w = lined();
+ w->hide();
+}
+
+void PropertyDoubleItem::setValue( const QVariant &v )
+{
+ if ( value() == v )
+ return;
+ if ( lin ) {
+ lined()->blockSignals( true );
+ int oldCursorPos;
+ oldCursorPos = lin->cursorPosition();
+ lined()->setText( QString::number( v.toDouble() ) );
+ if ( oldCursorPos < (int)lin->text().length() )
+ lin->setCursorPosition( oldCursorPos );
+ lined()->blockSignals( false );
+ }
+ setText( 1, QString::number( v.toDouble() ) );
+ PropertyItem::setValue( v );
+}
+
+void PropertyDoubleItem::setValue()
+{
+ setText( 1, lined()->text() );
+ QVariant v = lined()->text().toDouble();
+ PropertyItem::setValue( v );
+ notifyValueChange();
+}
+
+
+// --------------------------------------------------------------
+
+PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ lin = 0;
+}
+
+QDateEdit *PropertyDateItem::lined()
+{
+ if ( lin )
+ return lin;
+ lin = new QDateEdit( listview->viewport() );
+ QObjectList *l = lin->queryList( "QLineEdit" );
+ for ( QObject *o = l->first(); o; o = l->next() )
+ o->installEventFilter( listview );
+ delete l;
+ connect( lin, SIGNAL( valueChanged( const QDate & ) ),
+ this, SLOT( setValue() ) );
+ return lin;
+}
+
+PropertyDateItem::~PropertyDateItem()
+{
+ delete (QDateEdit*)lin;
+ lin = 0;
+}
+
+void PropertyDateItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !lin ) {
+ lined()->blockSignals( true );
+ lined()->setDate( value().toDate() );
+ lined()->blockSignals( false );
+ }
+ placeEditor( lin );
+ if ( !lin->isVisible() ) {
+ lin->show();
+ setFocus( lin );
+ }
+}
+
+void PropertyDateItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ if ( lin )
+ lin->hide();
+}
+
+void PropertyDateItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+
+ if ( lin ) {
+ lined()->blockSignals( true );
+ if ( lined()->date() != v.toDate() )
+ lined()->setDate( v.toDate() );
+ lined()->blockSignals( false );
+ }
+ setText( 1, v.toDate().toString( ::Qt::ISODate ) );
+ PropertyItem::setValue( v );
+}
+
+void PropertyDateItem::setValue()
+{
+ setText( 1, lined()->date().toString( ::Qt::ISODate ) );
+ QVariant v;
+ v = lined()->date();
+ PropertyItem::setValue( v );
+ notifyValueChange();
+}
+
+// --------------------------------------------------------------
+
+PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ lin = 0;
+}
+
+QTimeEdit *PropertyTimeItem::lined()
+{
+ if ( lin )
+ return lin;
+ lin = new QTimeEdit( listview->viewport() );
+ connect( lin, SIGNAL( valueChanged( const QTime & ) ),
+ this, SLOT( setValue() ) );
+ QObjectList *l = lin->queryList( "QLineEdit" );
+ for ( QObject *o = l->first(); o; o = l->next() )
+ o->installEventFilter( listview );
+ delete l;
+ return lin;
+}
+
+PropertyTimeItem::~PropertyTimeItem()
+{
+ delete (QTimeEdit*)lin;
+ lin = 0;
+}
+
+void PropertyTimeItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !lin ) {
+ lined()->blockSignals( true );
+ lined()->setTime( value().toTime() );
+ lined()->blockSignals( false );
+ }
+ placeEditor( lin );
+ if ( !lin->isVisible() ) {
+ lin->show();
+ setFocus( lin );
+ }
+}
+
+void PropertyTimeItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ if ( lin )
+ lin->hide();
+}
+
+void PropertyTimeItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+
+ if ( lin ) {
+ lined()->blockSignals( true );
+ if ( lined()->time() != v.toTime() )
+ lined()->setTime( v.toTime() );
+ lined()->blockSignals( false );
+ }
+ setText( 1, v.toTime().toString( ::Qt::ISODate ) );
+ PropertyItem::setValue( v );
+}
+
+void PropertyTimeItem::setValue()
+{
+ setText( 1, lined()->time().toString( ::Qt::ISODate ) );
+ QVariant v;
+ v = lined()->time();
+ PropertyItem::setValue( v );
+ notifyValueChange();
+}
+
+// --------------------------------------------------------------
+
+PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ lin = 0;
+}
+
+QDateTimeEdit *PropertyDateTimeItem::lined()
+{
+ if ( lin )
+ return lin;
+ lin = new QDateTimeEdit( listview->viewport() );
+ connect( lin, SIGNAL( valueChanged( const QDateTime & ) ),
+ this, SLOT( setValue() ) );
+ QObjectList *l = lin->queryList( "QLineEdit" );
+ for ( QObject *o = l->first(); o; o = l->next() )
+ o->installEventFilter( listview );
+ delete l;
+ return lin;
+}
+
+PropertyDateTimeItem::~PropertyDateTimeItem()
+{
+ delete (QDateTimeEdit*)lin;
+ lin = 0;
+}
+
+void PropertyDateTimeItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !lin ) {
+ lined()->blockSignals( true );
+ lined()->setDateTime( value().toDateTime() );
+ lined()->blockSignals( false );
+ }
+ placeEditor( lin );
+ if ( !lin->isVisible() ) {
+ lin->show();
+ setFocus( lin );
+ }
+}
+
+void PropertyDateTimeItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ if ( lin )
+ lin->hide();
+}
+
+void PropertyDateTimeItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+
+ if ( lin ) {
+ lined()->blockSignals( true );
+ if ( lined()->dateTime() != v.toDateTime() )
+ lined()->setDateTime( v.toDateTime() );
+ lined()->blockSignals( false );
+ }
+ setText( 1, v.toDateTime().toString( ::Qt::ISODate ) );
+ PropertyItem::setValue( v );
+}
+
+void PropertyDateTimeItem::setValue()
+{
+ setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) );
+ QVariant v;
+ v = lined()->dateTime();
+ PropertyItem::setValue( v );
+ notifyValueChange();
+}
+
+// --------------------------------------------------------------
+
+PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ comb = 0;
+}
+
+QComboBox *PropertyBoolItem::combo()
+{
+ if ( comb )
+ return comb;
+ comb = new QComboBox( false, listview->viewport() );
+ comb->hide();
+ comb->insertItem( i18n("False" ) );
+ comb->insertItem( i18n("True" ) );
+ connect( comb, SIGNAL( activated( int ) ),
+ this, SLOT( setValue() ) );
+ comb->installEventFilter( listview );
+ return comb;
+}
+
+PropertyBoolItem::~PropertyBoolItem()
+{
+ delete (QComboBox*)comb;
+ comb = 0;
+}
+
+void PropertyBoolItem::toggle()
+{
+ bool b = value().toBool();
+ setValue( QVariant( !b, 0 ) );
+ setValue();
+}
+
+void PropertyBoolItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !comb ) {
+ combo()->blockSignals( true );
+ if ( value().toBool() )
+ combo()->setCurrentItem( 1 );
+ else
+ combo()->setCurrentItem( 0 );
+ combo()->blockSignals( false );
+ }
+ placeEditor( combo() );
+ if ( !combo()->isVisible() || !combo()->hasFocus() ) {
+ combo()->show();
+ setFocus( combo() );
+ }
+}
+
+void PropertyBoolItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ combo()->hide();
+}
+
+void PropertyBoolItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+
+ if ( comb ) {
+ combo()->blockSignals( true );
+ if ( v.toBool() )
+ combo()->setCurrentItem( 1 );
+ else
+ combo()->setCurrentItem( 0 );
+ combo()->blockSignals( false );
+ }
+ QString tmp = i18n("True" );
+ if ( !v.toBool() )
+ tmp = i18n("False" );
+ setText( 1, tmp );
+ PropertyItem::setValue( v );
+}
+
+void PropertyBoolItem::setValue()
+{
+ if ( !comb )
+ return;
+ setText( 1, combo()->currentText() );
+ bool b = combo()->currentItem() == 0 ? (bool)false : (bool)true;
+ PropertyItem::setValue( QVariant( b, 0 ) );
+ notifyValueChange();
+}
+
+// --------------------------------------------------------------
+
+PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool s )
+ : PropertyItem( l, after, prop, propName ), signedValue( s )
+{
+ spinBx = 0;
+}
+
+QSpinBox *PropertyIntItem::spinBox()
+{
+ if ( spinBx )
+ return spinBx;
+ if ( signedValue )
+ spinBx = new QSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() );
+ else
+ spinBx = new QSpinBox( 0, INT_MAX, 1, listview->viewport() );
+ spinBx->hide();
+ spinBx->installEventFilter( listview );
+ QObjectList *ol = spinBx->queryList( "QLineEdit" );
+ if ( ol && ol->first() )
+ ol->first()->installEventFilter( listview );
+ delete ol;
+ connect( spinBx, SIGNAL( valueChanged( int ) ),
+ this, SLOT( setValue() ) );
+ return spinBx;
+}
+
+PropertyIntItem::~PropertyIntItem()
+{
+ delete (QSpinBox*)spinBx;
+ spinBx = 0;
+}
+
+void PropertyIntItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !spinBx ) {
+ spinBox()->blockSignals( true );
+ if ( signedValue )
+ spinBox()->setValue( value().toInt() );
+ else
+ spinBox()->setValue( value().toUInt() );
+ spinBox()->blockSignals( false );
+ }
+ placeEditor( spinBox() );
+ if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) {
+ spinBox()->show();
+ setFocus( spinBox() );
+ }
+}
+
+void PropertyIntItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ spinBox()->hide();
+}
+
+void PropertyIntItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+
+ if ( spinBx ) {
+ spinBox()->blockSignals( true );
+ if ( signedValue )
+ spinBox()->setValue( v.toInt() );
+ else
+ spinBox()->setValue( v.toUInt() );
+ spinBox()->blockSignals( false );
+ }
+
+ if ( signedValue )
+ setText( 1, QString::number( v.toInt() ) );
+ else
+ setText( 1, QString::number( v.toUInt() ) );
+ PropertyItem::setValue( v );
+}
+
+void PropertyIntItem::setValue()
+{
+ if ( !spinBx )
+ return;
+ setText( 1, QString::number( spinBox()->value() ) );
+ if ( signedValue )
+ PropertyItem::setValue( spinBox()->value() );
+ else
+ PropertyItem::setValue( (uint)spinBox()->value() );
+ notifyValueChange();
+}
+
+// --------------------------------------------------------------
+
+PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool e )
+ : PropertyItem( l, after, prop, propName ), editable( e )
+{
+ comb = 0;
+ oldInt = -1;
+}
+
+QComboBox *PropertyListItem::combo()
+{
+ if ( comb )
+ return comb;
+ comb = new QComboBox( editable, listview->viewport() );
+ comb->hide();
+ connect( comb, SIGNAL( activated( int ) ),
+ this, SLOT( setValue() ) );
+ comb->installEventFilter( listview );
+ if ( editable ) {
+ QObjectList *ol = comb->queryList( "QLineEdit" );
+ if ( ol && ol->first() )
+ ol->first()->installEventFilter( listview );
+ delete ol;
+ }
+ return comb;
+}
+
+PropertyListItem::~PropertyListItem()
+{
+ delete (QComboBox*)comb;
+ comb = 0;
+}
+
+void PropertyListItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !comb ) {
+ combo()->blockSignals( true );
+ combo()->clear();
+ combo()->insertStringList( value().toStringList() );
+ combo()->blockSignals( false );
+ }
+ placeEditor( combo() );
+ if ( !combo()->isVisible() || !combo()->hasFocus() ) {
+ combo()->show();
+ setFocus( combo() );
+ }
+}
+
+void PropertyListItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ combo()->hide();
+}
+
+void PropertyListItem::setValue( const QVariant &v )
+{
+ if ( comb ) {
+ combo()->blockSignals( true );
+ combo()->clear();
+ combo()->insertStringList( v.toStringList() );
+ combo()->blockSignals( false );
+ }
+ setText( 1, v.toStringList().first() );
+ PropertyItem::setValue( v );
+}
+
+void PropertyListItem::setValue()
+{
+ if ( !comb )
+ return;
+ setText( 1, combo()->currentText() );
+ QStringList lst;
+ for ( uint i = 0; i < combo()->listBox()->count(); ++i )
+ lst << combo()->listBox()->item( i )->text();
+ PropertyItem::setValue( lst );
+ notifyValueChange();
+ oldInt = currentIntItem();
+ oldString = currentItem();
+}
+
+QString PropertyListItem::currentItem() const
+{
+ return ( (PropertyListItem*)this )->combo()->currentText();
+}
+
+void PropertyListItem::setCurrentItem( const QString &s )
+{
+ if ( comb && currentItem().lower() == s.lower() )
+ return;
+
+ if ( !comb ) {
+ combo()->blockSignals( true );
+ combo()->clear();
+ combo()->insertStringList( value().toStringList() );
+ combo()->blockSignals( false );
+ }
+ for ( uint i = 0; i < combo()->listBox()->count(); ++i ) {
+ if ( combo()->listBox()->item( i )->text().lower() == s.lower() ) {
+ combo()->setCurrentItem( i );
+ setText( 1, combo()->currentText() );
+ break;
+ }
+ }
+ oldInt = currentIntItem();
+ oldString = currentItem();
+}
+
+void PropertyListItem::addItem( const QString &s )
+{
+ combo()->insertItem( s );
+}
+
+void PropertyListItem::setCurrentItem( int i )
+{
+ if ( comb && i == combo()->currentItem() )
+ return;
+
+ if ( !comb ) {
+ combo()->blockSignals( true );
+ combo()->clear();
+ combo()->insertStringList( value().toStringList() );
+ combo()->blockSignals( false );
+ }
+ combo()->setCurrentItem( i );
+ setText( 1, combo()->currentText() );
+ oldInt = currentIntItem();
+ oldString = currentItem();
+}
+
+int PropertyListItem::currentIntItem() const
+{
+ return ( (PropertyListItem*)this )->combo()->currentItem();
+}
+
+int PropertyListItem::currentIntItemFromObject() const
+{
+ return oldInt;
+}
+
+QString PropertyListItem::currentItemFromObject() const
+{
+ return oldString;
+}
+
+// --------------------------------------------------------------
+
+PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, Type t )
+ : PropertyItem( l, after, prop, propName ), typ( t )
+{
+ lin = 0;
+
+}
+
+QLineEdit *PropertyCoordItem::lined()
+{
+ if ( lin )
+ return lin;
+ lin = new QLineEdit( listview->viewport() );
+ lin->setReadOnly( true );
+ lin->installEventFilter( listview );
+ lin->hide();
+ return lin;
+}
+
+void PropertyCoordItem::createChildren()
+{
+ PropertyItem *i = this;
+ if ( typ == Rect || typ == Point ) {
+ i = new PropertyIntItem( listview, i, this, i18n("x" ), true );
+ addChild( i );
+ i = new PropertyIntItem( listview, i, this, i18n("y" ), true );
+ addChild( i );
+ }
+ if ( typ == Rect || typ == Size ) {
+ i = new PropertyIntItem( listview, i, this, i18n("width" ), true );
+ addChild( i );
+ i = new PropertyIntItem( listview, i, this, i18n("height" ), true );
+ addChild( i );
+ }
+}
+
+void PropertyCoordItem::initChildren()
+{
+ PropertyItem *item = 0;
+ for ( int i = 0; i < childCount(); ++i ) {
+ item = PropertyItem::child( i );
+ if ( item->name() == i18n("x" ) ) {
+ if ( typ == Rect )
+ item->setValue( val.toRect().x() );
+ else if ( typ == Point )
+ item->setValue( val.toPoint().x() );
+ } else if ( item->name() == i18n("y" ) ) {
+ if ( typ == Rect )
+ item->setValue( val.toRect().y() );
+ else if ( typ == Point )
+ item->setValue( val.toPoint().y() );
+ } else if ( item->name() == i18n("width" ) ) {
+ if ( typ == Rect )
+ item->setValue( val.toRect().width() );
+ else if ( typ == Size )
+ item->setValue( val.toSize().width() );
+ } else if ( item->name() == i18n("height" ) ) {
+ if ( typ == Rect )
+ item->setValue( val.toRect().height() );
+ else if ( typ == Size )
+ item->setValue( val.toSize().height() );
+ }
+ }
+}
+
+PropertyCoordItem::~PropertyCoordItem()
+{
+ delete (QLineEdit*)lin;
+ lin = 0;
+}
+
+void PropertyCoordItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !lin )
+ lined()->setText( text( 1 ) );
+ placeEditor( lined() );
+ if ( !lined()->isVisible() || !lined()->hasFocus() ) {
+ lined()->show();
+ setFocus( lined() );
+ }
+}
+
+void PropertyCoordItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ lined()->hide();
+}
+
+void PropertyCoordItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+
+ QString s;
+ if ( typ == Rect )
+ s = "[ " + QString::number( v.toRect().x() ) + ", " + QString::number( v.toRect().y() ) + ", " +
+ QString::number( v.toRect().width() ) + ", " + QString::number( v.toRect().height() ) + " ]";
+ else if ( typ == Point )
+ s = "[ " + QString::number( v.toPoint().x() ) + ", " +
+ QString::number( v.toPoint().y() ) + " ]";
+ else if ( typ == Size )
+ s = "[ " + QString::number( v.toSize().width() ) + ", " +
+ QString::number( v.toSize().height() ) + " ]";
+ setText( 1, s );
+ if ( lin )
+ lined()->setText( s );
+ PropertyItem::setValue( v );
+}
+
+bool PropertyCoordItem::hasSubItems() const
+{
+ return true;
+}
+
+void PropertyCoordItem::childValueChanged( PropertyItem *child )
+{
+ if ( typ == Rect ) {
+ QRect r = value().toRect();
+ if ( child->name() == i18n("x" ) )
+ r.setX( child->value().toInt() );
+ else if ( child->name() == i18n("y" ) )
+ r.setY( child->value().toInt() );
+ else if ( child->name() == i18n("width" ) )
+ r.setWidth( child->value().toInt() );
+ else if ( child->name() == i18n("height" ) )
+ r.setHeight( child->value().toInt() );
+ setValue( r );
+ } else if ( typ == Point ) {
+ QPoint r = value().toPoint();
+ if ( child->name() == i18n("x" ) )
+ r.setX( child->value().toInt() );
+ else if ( child->name() == i18n("y" ) )
+ r.setY( child->value().toInt() );
+ setValue( r );
+ } else if ( typ == Size ) {
+ QSize r = value().toSize();
+ if ( child->name() == i18n("width" ) )
+ r.setWidth( child->value().toInt() );
+ else if ( child->name() == i18n("height" ) )
+ r.setHeight( child->value().toInt() );
+ setValue( r );
+ }
+ notifyValueChange();
+}
+
+// --------------------------------------------------------------
+
+PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool isIconSet )
+ : PropertyItem( l, after, prop, propName ), iconSet( isIconSet )
+{
+ box = new QHBox( listview->viewport() );
+ box->hide();
+ pixPrev = new QLabel( box );
+ pixPrev->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum ) );
+ pixPrev->setBackgroundColor( pixPrev->colorGroup().color( QColorGroup::Base ) );
+ button = new QPushButton( "...", box );
+ button->setFixedWidth( 20 );
+ box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setLineWidth( 2 );
+ pixPrev->setFrameStyle( QFrame::NoFrame );
+ box->installEventFilter( listview );
+ connect( button, SIGNAL( clicked() ),
+ this, SLOT( getPixmap() ) );
+}
+PropertyPixmapItem::~PropertyPixmapItem()
+{
+ delete (QHBox*)box;
+}
+
+void PropertyPixmapItem::showEditor()
+{
+ PropertyItem::showEditor();
+ placeEditor( box );
+ if ( !box->isVisible() ) {
+ box->show();
+ listView()->viewport()->setFocus();
+ }
+}
+
+void PropertyPixmapItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ box->hide();
+}
+
+void PropertyPixmapItem::setValue( const QVariant &v )
+{
+ QString s;
+ if ( !iconSet )
+ pixPrev->setPixmap( v.toPixmap() );
+ else
+ pixPrev->setPixmap( v.toIconSet().pixmap() );
+ PropertyItem::setValue( v );
+ repaint();
+}
+
+void PropertyPixmapItem::getPixmap()
+{
+ QPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() );
+ if ( !pix.isNull() ) {
+ if ( !iconSet )
+ setValue( pix );
+ else
+ setValue( QIconSet( pix ) );
+ notifyValueChange();
+ }
+}
+
+bool PropertyPixmapItem::hasCustomContents() const
+{
+ return true;
+}
+
+void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r )
+{
+ QPixmap pix( (!iconSet ? value().toPixmap() : value().toIconSet().pixmap()) );
+ if ( !pix.isNull() ) {
+ p->save();
+ p->setClipRect( QRect( QPoint( (int)(p->worldMatrix().dx() + r.x()),
+ (int)(p->worldMatrix().dy() + r.y()) ),
+ r.size() ) );
+ p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix );
+ p->restore();
+ }
+}
+
+
+// --------------------------------------------------------------
+
+PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool children )
+ : PropertyItem( l, after, prop, propName ), withChildren( children )
+{
+ box = new QHBox( listview->viewport() );
+ box->hide();
+ colorPrev = new QFrame( box );
+ button = new QPushButton( "...", box );
+ button->setFixedWidth( 20 );
+ box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setLineWidth( 2 );
+ colorPrev->setFrameStyle( QFrame::Plain | QFrame::Box );
+ colorPrev->setLineWidth( 2 );
+ QPalette pal = colorPrev->palette();
+ QColorGroup cg = pal.active();
+ cg.setColor( QColorGroup::Foreground, cg.color( QColorGroup::Base ) );
+ pal.setActive( cg );
+ pal.setInactive( cg );
+ pal.setDisabled( cg );
+ colorPrev->setPalette( pal );
+ box->installEventFilter( listview );
+ connect( button, SIGNAL( clicked() ),
+ this, SLOT( getColor() ) );
+}
+
+void PropertyColorItem::createChildren()
+{
+ PropertyItem *i = this;
+ i = new PropertyIntItem( listview, i, this, i18n("Red" ), true );
+ addChild( i );
+ i = new PropertyIntItem( listview, i, this, i18n("Green" ), true );
+ addChild( i );
+ i = new PropertyIntItem( listview, i, this, i18n("Blue" ), true );
+ addChild( i );
+}
+
+void PropertyColorItem::initChildren()
+{
+ PropertyItem *item = 0;
+ for ( int i = 0; i < childCount(); ++i ) {
+ item = PropertyItem::child( i );
+ if ( item->name() == i18n("Red" ) )
+ item->setValue( val.toColor().red() );
+ else if ( item->name() == i18n("Green" ) )
+ item->setValue( val.toColor().green() );
+ else if ( item->name() == i18n("Blue" ) )
+ item->setValue( val.toColor().blue() );
+ }
+}
+
+PropertyColorItem::~PropertyColorItem()
+{
+ delete (QHBox*)box;
+}
+
+void PropertyColorItem::showEditor()
+{
+ PropertyItem::showEditor();
+ placeEditor( box );
+ if ( !box->isVisible() ) {
+ box->show();
+ listView()->viewport()->setFocus();
+ }
+}
+
+void PropertyColorItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ box->hide();
+}
+
+void PropertyColorItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+
+ QString s;
+ setText( 1, v.toColor().name() );
+ colorPrev->setBackgroundColor( v.toColor() );
+ PropertyItem::setValue( v );
+}
+
+bool PropertyColorItem::hasSubItems() const
+{
+ return withChildren;
+}
+
+void PropertyColorItem::childValueChanged( PropertyItem *child )
+{
+ QColor c( val.toColor() );
+ if ( child->name() == i18n("Red" ) )
+ c.setRgb( child->value().toInt(), c.green(), c.blue() );
+ else if ( child->name() == i18n("Green" ) )
+ c.setRgb( c.red(), child->value().toInt(), c.blue() );
+ else if ( child->name() == i18n("Blue" ) )
+ c.setRgb( c.red(), c.green(), child->value().toInt() );
+ setValue( c );
+ notifyValueChange();
+}
+
+void PropertyColorItem::getColor()
+{
+ QColor c = val.asColor();
+ if ( KColorDialog::getColor( c, listview ) == QDialog::Accepted ) {
+ setValue( c );
+ notifyValueChange();
+ }
+}
+
+bool PropertyColorItem::hasCustomContents() const
+{
+ return true;
+}
+
+void PropertyColorItem::drawCustomContents( QPainter *p, const QRect &r )
+{
+ p->save();
+ p->setPen( QPen( black, 1 ) );
+ p->setBrush( val.toColor() );
+ p->drawRect( r.x() + 2, r.y() + 2, r.width() - 5, r.height() - 5 );
+ p->restore();
+}
+
+// --------------------------------------------------------------
+
+PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ box = new QHBox( listview->viewport() );
+ box->hide();
+ lined = new QLineEdit( box );
+ button = new QPushButton( "...", box );
+ button->setFixedWidth( 20 );
+ box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setLineWidth( 2 );
+ lined->setFrame( false );
+ lined->setReadOnly( true );
+ box->setFocusProxy( lined );
+ box->installEventFilter( listview );
+ lined->installEventFilter( listview );
+ button->installEventFilter( listview );
+ connect( button, SIGNAL( clicked() ),
+ this, SLOT( getFont() ) );
+}
+
+void PropertyFontItem::createChildren()
+{
+ PropertyItem *i = this;
+ i = new PropertyListItem( listview, i, this, i18n("Family" ), false );
+ addChild( i );
+ i = new PropertyIntItem( listview, i, this, i18n("Point Size" ), true );
+ addChild( i );
+ i = new PropertyBoolItem( listview, i, this, i18n("Bold" ) );
+ addChild( i );
+ i = new PropertyBoolItem( listview, i, this, i18n("Italic" ) );
+ addChild( i );
+ i = new PropertyBoolItem( listview, i, this, i18n("Underline" ) );
+ addChild( i );
+ i = new PropertyBoolItem( listview, i, this, i18n("Strikeout" ) );
+ addChild( i );
+}
+
+void PropertyFontItem::initChildren()
+{
+ PropertyItem *item = 0;
+ for ( int i = 0; i < childCount(); ++i ) {
+ item = PropertyItem::child( i );
+ if ( item->name() == i18n("Family" ) ) {
+ ( (PropertyListItem*)item )->setValue( getFontList() );
+ ( (PropertyListItem*)item )->setCurrentItem( val.toFont().family() );
+ } else if ( item->name() == i18n("Point Size" ) )
+ item->setValue( val.toFont().pointSize() );
+ else if ( item->name() == i18n("Bold" ) )
+ item->setValue( QVariant( val.toFont().bold(), 0 ) );
+ else if ( item->name() == i18n("Italic" ) )
+ item->setValue( QVariant( val.toFont().italic(), 0 ) );
+ else if ( item->name() == i18n("Underline" ) )
+ item->setValue( QVariant( val.toFont().underline(), 0 ) );
+ else if ( item->name() == i18n("Strikeout" ) )
+ item->setValue( QVariant( val.toFont().strikeOut(), 0 ) );
+ }
+}
+
+PropertyFontItem::~PropertyFontItem()
+{
+ delete (QHBox*)box;
+}
+
+void PropertyFontItem::showEditor()
+{
+ PropertyItem::showEditor();
+ placeEditor( box );
+ if ( !box->isVisible() || !lined->hasFocus() ) {
+ box->show();
+ setFocus( lined );
+ }
+}
+
+void PropertyFontItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ box->hide();
+}
+
+void PropertyFontItem::setValue( const QVariant &v )
+{
+ if ( value() == v )
+ return;
+
+ setText( 1, v.toFont().family() + "-" + QString::number( v.toFont().pointSize() ) );
+ lined->setText( v.toFont().family() + "-" + QString::number( v.toFont().pointSize() ) );
+ PropertyItem::setValue( v );
+}
+
+void PropertyFontItem::getFont()
+{
+ bool ok = false;
+ QFont f = QFontDialog::getFont( &ok, val.toFont(), listview );
+ if ( ok && f != val.toFont() ) {
+ setValue( f );
+ notifyValueChange();
+ }
+}
+
+bool PropertyFontItem::hasSubItems() const
+{
+ return true;
+}
+
+void PropertyFontItem::childValueChanged( PropertyItem *child )
+{
+ QFont f = val.toFont();
+ if ( child->name() == i18n("Family" ) )
+ f.setFamily( ( (PropertyListItem*)child )->currentItem() );
+ else if ( child->name() == i18n("Point Size" ) )
+ f.setPointSize( child->value().toInt() );
+ else if ( child->name() == i18n("Bold" ) )
+ f.setBold( child->value().toBool() );
+ else if ( child->name() == i18n("Italic" ) )
+ f.setItalic( child->value().toBool() );
+ else if ( child->name() == i18n("Underline" ) )
+ f.setUnderline( child->value().toBool() );
+ else if ( child->name() == i18n("Strikeout" ) )
+ f.setStrikeOut( child->value().toBool() );
+ setValue( f );
+ notifyValueChange();
+}
+
+// --------------------------------------------------------------
+
+PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool wField )
+ : PropertyItem( l, after, prop, propName ), withField( wField )
+{
+ box = new QHBox( listview->viewport() );
+ box->hide();
+ lined = new QLineEdit( box );
+ button = new QPushButton( "...", box );
+ button->setFixedWidth( 20 );
+ box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setLineWidth( 2 );
+ lined->setFrame( false );
+ lined->setReadOnly( true );
+ box->setFocusProxy( lined );
+ box->installEventFilter( listview );
+ lined->installEventFilter( listview );
+ button->installEventFilter( listview );
+}
+
+void PropertyDatabaseItem::createChildren()
+{
+ PropertyItem *i = this;
+ i = new PropertyListItem( listview, i, this, i18n("Connection" ), true );
+ addChild( i );
+ i = new PropertyListItem( listview, i, this, i18n("Table" ), true );
+ addChild( i );
+ if ( withField ) {
+ i = new PropertyListItem( listview, i, this, i18n("Field" ), true );
+ addChild( i );
+ }
+}
+
+void PropertyDatabaseItem::initChildren()
+{
+#ifndef QT_NO_SQL
+ PropertyItem *item = 0;
+ QStringList lst = value().toStringList();
+ QString conn, table;
+ for ( int i = 0; i < childCount(); ++i ) {
+ item = PropertyItem::child( i );
+ if ( item->name() == i18n("Connection" ) ) {
+ QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList();
+ if ( !cl.isEmpty() )
+ item->setValue( cl );
+ else if ( lst.count() > 0 )
+ item->setValue( QStringList( lst[ 0 ] ) );
+ else if ( withField )
+ item->setValue( QStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
+ "database" ).toStringList()[ 0 ] ) );
+
+ if ( lst.count() > 0 && !lst[ 0 ].isEmpty() )
+ item->setCurrentItem( lst[ 0 ] );
+ else if ( !isChanged() && withField )
+ item->setCurrentItem( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
+ "database" ).toStringList()[ 0 ] );
+ else
+ item->setCurrentItem( 0 );
+ conn = item->currentItem();
+ } else if ( item->name() == i18n("Table" ) ) {
+ QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn );
+ if ( !cl.isEmpty() )
+ item->setValue( cl );
+ else if ( lst.count() > 1 )
+ item->setValue( QStringList( lst[ 1 ] ) );
+ else if ( withField ) {
+ QStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
+ if ( fakeLst.count() > 1 )
+ item->setValue( fakeLst[ 1 ] );
+ }
+
+ if ( lst.count() > 1 && !lst[ 1 ].isEmpty() )
+ item->setCurrentItem( lst[ 1 ] );
+ else if ( !isChanged() && withField ) {
+ QStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
+ if ( fakeLst.count() > 1 )
+ item->setCurrentItem( fakeLst[ 1 ] );
+ else
+ item->setCurrentItem( 0 );
+ } else
+ item->setCurrentItem( 0 );
+ table = item->currentItem();
+ } else if ( item->name() == i18n("Field" ) ) {
+ QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table );
+ if ( !cl.isEmpty() )
+ item->setValue( cl );
+ else if ( lst.count() > 2 )
+ item->setValue( QStringList( lst[ 2 ] ) );
+ if ( lst.count() > 2 && !lst[ 2 ].isEmpty() )
+ item->setCurrentItem( lst[ 2 ] );
+ else
+ item->setCurrentItem( 0 );
+ }
+ }
+#endif
+}
+
+PropertyDatabaseItem::~PropertyDatabaseItem()
+{
+ delete (QHBox*)box;
+}
+
+void PropertyDatabaseItem::showEditor()
+{
+ PropertyItem::showEditor();
+ placeEditor( box );
+ if ( !box->isVisible() || !lined->hasFocus() ) {
+ box->show();
+ setFocus( lined );
+ }
+}
+
+void PropertyDatabaseItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ box->hide();
+}
+
+void PropertyDatabaseItem::setValue( const QVariant &v )
+{
+ if ( value() == v )
+ return;
+
+ QStringList lst = v.toStringList();
+ QString s = lst.join( "." );
+ setText( 1, s );
+ lined->setText( s );
+ PropertyItem::setValue( v );
+}
+
+bool PropertyDatabaseItem::hasSubItems() const
+{
+ return true;
+}
+
+void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
+{
+#ifndef QT_NO_SQL
+ QStringList lst;
+ lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem()
+ << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem();
+ if ( withField )
+ lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem();
+ if ( c == PropertyItem::child( 0 ) ) { // if the connection changed
+ lst[ 0 ] = ( (PropertyListItem*)c )->currentItem();
+ PropertyItem::child( 1 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseTableList( lst[ 0 ] ) );
+ if ( withField )
+ PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) );
+ } else if ( withField && c == PropertyItem::child( 1 ) ) { // if the table changed
+ lst[ 1 ] = ( (PropertyListItem*)c )->currentItem();
+ if ( withField )
+ PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) );
+ }
+ lst.clear();
+ lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem()
+ << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem();
+ if ( withField )
+ lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem();
+ setValue( lst );
+ notifyValueChange();
+#else
+ Q_UNUSED( c );
+#endif
+}
+
+// --------------------------------------------------------------
+
+PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ lin = 0;
+}
+
+QLineEdit *PropertySizePolicyItem::lined()
+{
+ if ( lin )
+ return lin;
+ lin = new QLineEdit( listview->viewport() );
+ lin->hide();
+ lin->setReadOnly( true );
+ return lin;
+}
+
+void PropertySizePolicyItem::createChildren()
+{
+ QStringList lst;
+ lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored";
+
+ PropertyItem *i = this;
+ i = new PropertyListItem( listview, i, this, i18n("hSizeType" ), false );
+ i->setValue( lst );
+ addChild( i );
+ i = new PropertyListItem( listview, i, this, i18n("vSizeType" ), false );
+ i->setValue( lst );
+ addChild( i );
+ i = new PropertyIntItem( listview, i, this, i18n("horizontalStretch" ), true );
+ addChild( i );
+ i = new PropertyIntItem( listview, i, this, i18n("verticalStretch" ), true );
+ addChild( i );
+}
+
+void PropertySizePolicyItem::initChildren()
+{
+ PropertyItem *item = 0;
+ QSizePolicy sp = val.toSizePolicy();
+ for ( int i = 0; i < childCount(); ++i ) {
+ item = PropertyItem::child( i );
+ if ( item->name() == i18n("hSizeType" ) )
+ ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.horData() ) );
+ else if ( item->name() == i18n("vSizeType" ) )
+ ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.verData() ) );
+ else if ( item->name() == i18n("horizontalStretch" ) )
+ ( (PropertyIntItem*)item )->setValue( sp.horStretch() );
+ else if ( item->name() == i18n("verticalStretch" ) )
+ ( (PropertyIntItem*)item )->setValue( sp.verStretch() );
+ }
+}
+
+PropertySizePolicyItem::~PropertySizePolicyItem()
+{
+ delete (QLineEdit*)lin;
+}
+
+void PropertySizePolicyItem::showEditor()
+{
+ PropertyItem::showEditor();
+ placeEditor( lined() );
+ if ( !lined()->isVisible() || !lined()->hasFocus() ) {
+ lined()->show();
+ listView()->viewport()->setFocus();
+ }
+}
+
+void PropertySizePolicyItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ lined()->hide();
+}
+
+void PropertySizePolicyItem::setValue( const QVariant &v )
+{
+ if ( value() == v )
+ return;
+
+ QString s = QString( "%1/%2/%2/%2" );
+ s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ).
+ arg( size_type_to_string( v.toSizePolicy().verData() ) ).
+ arg( v.toSizePolicy().horStretch() ).
+ arg( v.toSizePolicy().verStretch() );
+ setText( 1, s );
+ lined()->setText( s );
+ PropertyItem::setValue( v );
+}
+
+void PropertySizePolicyItem::childValueChanged( PropertyItem *child )
+{
+ QSizePolicy sp = val.toSizePolicy();
+ if ( child->name() == i18n("hSizeType" ) )
+ sp.setHorData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) );
+ else if ( child->name() == i18n("vSizeType" ) )
+ sp.setVerData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) );
+ else if ( child->name() == i18n("horizontalStretch" ) )
+ sp.setHorStretch( ( ( PropertyIntItem*)child )->value().toInt() );
+ else if ( child->name() == i18n("verticalStretch" ) )
+ sp.setVerStretch( ( ( PropertyIntItem*)child )->value().toInt() );
+ setValue( sp );
+ notifyValueChange();
+}
+
+bool PropertySizePolicyItem::hasSubItems() const
+{
+ return true;
+}
+
+// --------------------------------------------------------------
+
+PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ box = new QHBox( listview->viewport() );
+ box->hide();
+ palettePrev = new QLabel( box );
+ button = new QPushButton( "...", box );
+ button->setFixedWidth( 20 );
+ box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setLineWidth( 2 );
+ palettePrev->setFrameStyle( QFrame::NoFrame );
+ box->installEventFilter( listview );
+ connect( button, SIGNAL( clicked() ),
+ this, SLOT( getPalette() ) );
+}
+PropertyPaletteItem::~PropertyPaletteItem()
+{
+ delete (QHBox*)box;
+}
+
+void PropertyPaletteItem::showEditor()
+{
+ PropertyItem::showEditor();
+ placeEditor( box );
+ if ( !box->isVisible() ) {
+ box->show();
+ listView()->viewport()->setFocus();
+ }
+}
+
+void PropertyPaletteItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ box->hide();
+}
+
+void PropertyPaletteItem::setValue( const QVariant &v )
+{
+ QString s;
+ palettePrev->setPalette( v.toPalette() );
+ PropertyItem::setValue( v );
+ repaint();
+}
+
+void PropertyPaletteItem::getPalette()
+{
+ if ( !listview->propertyEditor()->widget()->isWidgetType() )
+ return;
+ bool ok = false;
+ QWidget *w = (QWidget*)listview->propertyEditor()->widget();
+ if ( w->inherits( "QScrollView" ) )
+ w = ( (QScrollView*)w )->viewport();
+ QPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
+#if defined(QT_NON_COMMERCIAL)
+ w->backgroundMode(), listview->topLevelWidget(),
+#else
+ w->backgroundMode(), listview,
+#endif
+ "choose_palette", listview->propertyEditor()->formWindow() );
+ if ( !ok )
+ return;
+ setValue( pal );
+ notifyValueChange();
+}
+
+bool PropertyPaletteItem::hasCustomContents() const
+{
+ return true;
+}
+
+void PropertyPaletteItem::drawCustomContents( QPainter *p, const QRect &r )
+{
+ QPalette pal( value().toPalette() );
+ p->save();
+ p->setClipRect( QRect( QPoint( (int)(p->worldMatrix().dx() + r.x()),
+ (int)(p->worldMatrix().dy() + r.y()) ),
+ r.size() ) );
+ QRect r2( r );
+ r2.setX( r2.x() + 2 );
+ r2.setY( r2.y() + 2 );
+ r2.setWidth( r2.width() - 3 );
+ r2.setHeight( r2.height() - 3 );
+ p->setPen( QPen( black, 1 ) );
+ p->setBrush( pal.active().background() );
+ p->drawRect( r2 );
+ p->restore();
+}
+
+// --------------------------------------------------------------
+
+PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName )
+ : PropertyItem( l, after, prop, propName )
+{
+ comb = 0;
+}
+
+QComboBox *PropertyCursorItem::combo()
+{
+ if ( comb )
+ return comb;
+ comb = new QComboBox( false, listview->viewport() );
+ comb->hide();
+ QBitmap cur;
+
+ cur = QBitmap(arrow_width, arrow_height, arrow_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Arrow"), QObject::ArrowCursor);
+
+ cur = QBitmap(uparrow_width, uparrow_height, uparrow_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Up-Arrow"), QObject::UpArrowCursor );
+
+ cur = QBitmap(cross_width, cross_height, cross_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Cross"), QObject::CrossCursor );
+
+ cur = QBitmap(wait_width, wait_height, wait_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Waiting"), QObject::WaitCursor );
+
+ cur = QBitmap(ibeam_width, ibeam_height, ibeam_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("iBeam"), QObject::IbeamCursor );
+
+ cur = QBitmap(sizev_width, sizev_height, sizev_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Size Vertical"), QObject::SizeVerCursor );
+
+ cur = QBitmap(sizeh_width, sizeh_height, sizeh_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Size Horizontal"), QObject::SizeHorCursor );
+
+ cur = QBitmap(sizef_width, sizef_height, sizef_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Size Slash"), QObject::SizeBDiagCursor );
+
+ cur = QBitmap(sizeb_width, sizeb_height, sizeb_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Size Backslash"), QObject::SizeFDiagCursor );
+
+ cur = QBitmap(sizeall_width, sizeall_height, sizeall_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Size All"), QObject::SizeAllCursor );
+
+ cur = QBitmap( 25, 25, 1 );
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Blank"), QObject::BlankCursor );
+
+ cur = QBitmap(vsplit_width, vsplit_height, vsplit_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Split Vertical"), QObject::SplitVCursor );
+
+ cur = QBitmap(hsplit_width, hsplit_height, hsplit_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Split Horizontal"), QObject::SplitHCursor );
+
+ cur = QBitmap(hand_width, hand_height, hand_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Pointing Hand"), QObject::PointingHandCursor );
+
+ cur = QBitmap(no_width, no_height, no_bits, true);
+ cur.setMask( cur );
+ comb->insertItem( cur, i18n("Forbidden"), QObject::ForbiddenCursor );
+
+ connect( comb, SIGNAL( activated( int ) ),
+ this, SLOT( setValue() ) );
+ comb->installEventFilter( listview );
+ return comb;
+}
+
+PropertyCursorItem::~PropertyCursorItem()
+{
+ delete (QComboBox*)comb;
+}
+
+void PropertyCursorItem::showEditor()
+{
+ PropertyItem::showEditor();
+ if ( !comb ) {
+ combo()->blockSignals( true );
+ combo()->setCurrentItem( (int)value().toCursor().shape() );
+ combo()->blockSignals( false );
+ }
+ placeEditor( combo() );
+ if ( !combo()->isVisible() || !combo()->hasFocus() ) {
+ combo()->show();
+ setFocus( combo() );
+ }
+}
+
+void PropertyCursorItem::hideEditor()
+{
+ PropertyItem::hideEditor();
+ combo()->hide();
+}
+
+void PropertyCursorItem::setValue( const QVariant &v )
+{
+ if ( ( !hasSubItems() || !isOpen() )
+ && value() == v )
+ return;
+
+ combo()->blockSignals( true );
+ combo()->setCurrentItem( (int)v.toCursor().shape() );
+ combo()->blockSignals( false );
+ setText( 1, combo()->currentText() );
+ PropertyItem::setValue( v );
+}
+
+void PropertyCursorItem::setValue()
+{
+ if ( !comb )
+ return;
+ if ( QVariant( QCursor( combo()->currentItem() ) ) == val )
+ return;
+ setText( 1, combo()->currentText() );
+ PropertyItem::setValue( QCursor( combo()->currentItem() ) );
+ notifyValueChange();
+}
+
+// --------------------------------------------------------------
+
+/*!
+ \class PropertyList propertyeditor.h
+ \brief PropertyList is a QListView derived class which is used for editing widget properties
+
+ This class is used for widget properties. It has to be child of a
+ PropertyEditor.
+
+ To initialize it for editing a widget call setupProperties() which
+ iterates through the properties of the current widget (see
+ PropertyEditor::widget()) and builds the list.
+
+ To update the item values, refetchData() can be called.
+
+ If the value of an item has been changed by the user, and this
+ change should be applied to the widget's property, valueChanged()
+ has to be called.
+
+ To set the value of an item, setPropertyValue() has to be called.
+*/
+
+PropertyList::PropertyList( PropertyEditor *e )
+ : QListView( e ), editor( e )
+{
+ init_colors();
+
+ whatsThis = new PropertyWhatsThis( this );
+ showSorted = false;
+ header()->setMovingEnabled( false );
+ header()->setStretchEnabled( true );
+ setResizePolicy( QScrollView::Manual );
+ viewport()->setAcceptDrops( true );
+ viewport()->installEventFilter( this );
+ addColumn( i18n("Property" ) );
+ addColumn( i18n("Value" ) );
+ connect( header(), SIGNAL( sizeChange( int, int, int ) ),
+ this, SLOT( updateEditorSize() ) );
+ disconnect( header(), SIGNAL( sectionClicked( int ) ),
+ this, SLOT( changeSortColumn( int ) ) );
+ connect( header(), SIGNAL( sectionClicked( int ) ),
+ this, SLOT( toggleSort() ) );
+ connect( this, SIGNAL( pressed( QListViewItem *, const QPoint &, int ) ),
+ this, SLOT( itemPressed( QListViewItem *, const QPoint &, int ) ) );
+ connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
+ this, SLOT( toggleOpen( QListViewItem * ) ) );
+ setSorting( -1 );
+ setHScrollBarMode( AlwaysOff );
+ setVScrollBarMode( AlwaysOn );
+ setColumnWidthMode( 1, Manual );
+ mousePressed = false;
+ pressItem = 0;
+ header()->installEventFilter( this );
+}
+
+void PropertyList::toggleSort()
+{
+ showSorted = !showSorted;
+ editor->clear();
+ editor->setup();
+}
+
+void PropertyList::resizeEvent( QResizeEvent *e )
+{
+ QListView::resizeEvent( e );
+ if ( currentItem() )
+ ( ( PropertyItem* )currentItem() )->showEditor();
+}
+
+static QVariant::Type type_to_variant( const QString &s )
+{
+ if ( s == "Invalid " )
+ return QVariant::Invalid;
+ if ( s == "Map" )
+ return QVariant::Map;
+ if ( s == "List" )
+ return QVariant::List;
+ if ( s == "String" )
+ return QVariant::String;
+ if ( s == "StringList" )
+ return QVariant::StringList;
+ if ( s == "Font" )
+ return QVariant::Font;
+ if ( s == "Pixmap" )
+ return QVariant::Pixmap;
+ if ( s == "Brush" )
+ return QVariant::Brush;
+ if ( s == "Rect" )
+ return QVariant::Rect;
+ if ( s == "Size" )
+ return QVariant::Size;
+ if ( s == "Color" )
+ return QVariant::Color;
+ if ( s == "Palette" )
+ return QVariant::Palette;
+ if ( s == "ColorGroup" )
+ return QVariant::ColorGroup;
+ if ( s == "IconSet" )
+ return QVariant::IconSet;
+ if ( s == "Point" )
+ return QVariant::Point;
+ if ( s == "Image" )
+ return QVariant::Image;
+ if ( s == "Int" )
+ return QVariant::Int;
+ if ( s == "UInt" )
+ return QVariant::UInt;
+ if ( s == "Bool" )
+ return QVariant::Bool;
+ if ( s == "Double" )
+ return QVariant::Double;
+ if ( s == "CString" )
+ return QVariant::CString;
+ if ( s == "PointArray" )
+ return QVariant::PointArray;
+ if ( s == "Region" )
+ return QVariant::Region;
+ if ( s == "Bitmap" )
+ return QVariant::Bitmap;
+ if ( s == "Cursor" )
+ return QVariant::Cursor;
+ if ( s == "SizePolicy" )
+ return QVariant::SizePolicy;
+ if ( s == "Date" )
+ return QVariant::Date;
+ if ( s == "Time" )
+ return QVariant::Time;
+ if ( s == "DateTime" )
+ return QVariant::DateTime;
+ return QVariant::Invalid;
+}
+
+#ifndef QT_NO_SQL
+static bool parent_is_data_aware( QObject *o )
+{
+ if ( !o->inherits( "QWidget" ) )
+ return false;
+ QWidget *w = (QWidget*)o;
+ QWidget *p = w->parentWidget();
+ while ( p && !p->isTopLevel() ) {
+ if ( p->inherits( "QDesignerDataBrowser" ) || p->inherits( "QDesignerDataView" ) )
+ return true;
+ p = p->parentWidget();
+ }
+ return false;
+}
+#endif
+
+/*! Sets up the property list by adding an item for each designable
+property of the widget which is just edited.
+*/
+
+void PropertyList::setupProperties()
+{
+ if ( !editor->widget() )
+ return;
+ bool allProperties = !editor->widget()->inherits( "Spacer" );
+ QStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
+ PropertyItem *item = 0;
+ QMap<QString, bool> unique;
+ QObject *w = editor->widget();
+ QStringList valueSet;
+ bool parentHasLayout =
+ w->isWidgetType() &&
+ !editor->formWindow()->isMainContainer( (QWidget*)w ) && ( (QWidget*)w )->parentWidget() &&
+ WidgetFactory::layoutType( ( (QWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ const QMetaProperty* p =
+ editor->widget()->metaObject()->
+ property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties );
+ if ( !p )
+ continue;
+ if ( unique.contains( QString::fromLatin1( it.current() ) ) )
+ continue;
+ if ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) {
+ if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "maximumHeight" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "maximumWidth" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "geometry" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "minimumSize" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
+ continue;
+ }
+ unique.insert( QString::fromLatin1( it.current() ), true );
+ if ( editor->widget()->isWidgetType() &&
+ editor->formWindow()->isMainContainer( (QWidget*)editor->widget() ) ) {
+ if ( qstrcmp( p->name(), "geometry" ) == 0 )
+ continue;
+ } else { // hide some toplevel-only stuff
+ if ( qstrcmp( p->name(), "icon" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "iconText" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "caption" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "sizeIncrement" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "baseSize" ) == 0 )
+ continue;
+ if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
+ continue;
+ if ( w->inherits( "QLayoutWidget" ) || w->inherits( "Spacer" ) ) {
+ if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "maximumHeight" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "maximumWidth" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "geometry" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "minimumSize" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "enabled" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "paletteForegroundColor" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "paletteBackgroundColor" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "paletteBackgroundPixmap" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "palette" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "font" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "cursor" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "mouseTracking" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "focusPolicy" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "acceptDrops" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "autoMask" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "backgroundOrigin" ) == 0 )
+ continue;
+ }
+ }
+ if ( w->inherits( "QActionGroup" ) ) {
+ if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
+ continue;
+ }
+ if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "maximumHeight" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "maximumWidth" ) == 0 )
+ continue;
+ if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in Q_PROPERTY can take a function (isInButtonGroup() in this case)
+ if ( !editor->widget()->isWidgetType() ||
+ !editor->widget()->parent() ||
+ !editor->widget()->parent()->inherits( "QButtonGroup" ) )
+ continue;
+ }
+
+
+ if ( p->designable(w) ) {
+ if ( p->isSetType() ) {
+ if ( QString( p->name() ) == "alignment" ) {
+ QStringList lst;
+ lst << p->valueToKey( AlignAuto )
+ << p->valueToKey( AlignLeft )
+ << p->valueToKey( AlignHCenter )
+ << p->valueToKey( AlignRight )
+ << p->valueToKey( AlignJustify );
+ item = new PropertyListItem( this, item, 0, "hAlign", false );
+ item->setValue( lst );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
+ item->setChanged( true, false );
+ if ( !editor->widget()->inherits( "QMultiLineEdit" ) ) {
+ lst.clear();
+ lst << p->valueToKey( AlignTop )
+ << p->valueToKey( AlignVCenter )
+ << p->valueToKey( AlignBottom );
+ item = new PropertyListItem( this, item, 0, "vAlign", false );
+ item->setValue( lst );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
+ item->setChanged( true, false );
+ item = new PropertyBoolItem( this, item, 0, "wordwrap" );
+ if ( w->inherits( "QGroupBox" ) )
+ item->setVisible( false );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
+ item->setChanged( true, false );
+ }
+ } else {
+ qWarning( "Sets except 'alignment' not supported yet.... %s.", p->name() );
+ }
+ } else if ( p->isEnumType() ) {
+ QStrList l = p->enumKeys();
+ QStringList lst;
+ for ( uint i = 0; i < l.count(); ++i ) {
+ QString k = l.at( i );
+ // filter out enum-masks
+ if ( k[0] == 'M' && k[1].category() == QChar::Letter_Uppercase )
+ continue;
+ lst << l.at( i );
+ }
+ item = new PropertyListItem( this, item, 0, p->name(), false );
+ item->setValue( lst );
+ } else {
+ QVariant::Type t = QVariant::nameToType( p->type() );
+ if ( !addPropertyItem( item, p->name(), t ) )
+ continue;
+ }
+ }
+ if ( item && !p->isSetType() ) {
+ if ( valueSet.findIndex( item->name() ) == -1 ) {
+ setPropertyValue( item );
+ valueSet << item->name();
+ }
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) )
+ item->setChanged( true, false );
+ }
+ }
+
+ if ( !w->inherits( "QSplitter" ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) &&
+ w->isWidgetType() && WidgetFactory::layoutType( (QWidget*)w ) != WidgetFactory::NoLayout ) {
+ item = new PropertyIntItem( this, item, 0, "layoutSpacing", true );
+ setPropertyValue( item );
+ item->setChanged( true );
+ item = new PropertyIntItem( this, item, 0, "layoutMargin", true );
+ setPropertyValue( item );
+ item->setChanged( true );
+ }
+
+
+ if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( "QAction" ) &&
+ !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) {
+ item = new PropertyTextItem( this, item, 0, "toolTip", true, false );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
+ item->setChanged( true, false );
+ item = new PropertyTextItem( this, item, 0, "whatsThis", true, true );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) )
+ item->setChanged( true, false );
+ }
+
+#ifndef QT_NO_SQL
+ if ( !editor->widget()->inherits( "QDataTable" ) && !editor->widget()->inherits( "QDataBrowser" ) &&
+ !editor->widget()->inherits( "QDataView" ) && parent_is_data_aware( editor->widget() ) ) {
+ item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
+ item->setChanged( true, false );
+ }
+
+ if ( editor->widget()->inherits( "QDataTable" ) || editor->widget()->inherits( "QDataBrowser" ) || editor->widget()->inherits( "QDataView" ) ) {
+ item = new PropertyDatabaseItem( this, item, 0, "database", false );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
+ item->setChanged( true, false );
+ item = new PropertyBoolItem( this, item, 0, "frameworkCode" );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) )
+ item->setChanged( true, false );
+ }
+#endif
+
+ if ( w->inherits( "CustomWidget" ) ) {
+ MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget();
+ if ( cw ) {
+ for ( QValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
+ if ( unique.contains( QString( (*it).property ) ) )
+ continue;
+ unique.insert( QString( (*it).property ), true );
+ addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) );
+ setPropertyValue( item );
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) )
+ item->setChanged( true, false );
+ }
+ }
+ }
+
+ setCurrentItem( firstChild() );
+
+ if ( showSorted ) {
+ setSorting( 0 );
+ sort();
+ setSorting( -1 );
+ setCurrentItem( firstChild() );
+ qApp->processEvents();
+ }
+
+ updateEditorSize();
+ updateEditorSize();
+}
+
+bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t )
+{
+ switch ( t ) {
+ case QVariant::String:
+ item = new PropertyTextItem( this, item, 0, name, true,
+ editor->widget()->inherits( "QLabel" ) || editor->widget()->inherits( "QTextView" ) );
+ break;
+ case QVariant::CString:
+ item = new PropertyTextItem( this, item, 0,
+ name, name == "name" &&
+ editor->widget() == editor->formWindow()->mainContainer(),
+ false, true );
+ break;
+ case QVariant::Bool:
+ item = new PropertyBoolItem( this, item, 0, name );
+ break;
+ case QVariant::Font:
+ item = new PropertyFontItem( this, item, 0, name );
+ break;
+ case QVariant::Int:
+ if ( name == "accel" )
+ item = new PropertyTextItem( this, item, 0, name, false, false, false, true );
+ else
+ item = new PropertyIntItem( this, item, 0, name, true );
+ break;
+ case QVariant::Double:
+ item = new PropertyDoubleItem( this, item, 0, name );
+ break;
+ case QVariant::KeySequence:
+ item = new PropertyTextItem( this, item, 0, name, false, false, false, true );
+ break;
+ case QVariant::UInt:
+ item = new PropertyIntItem( this, item, 0, name, false );
+ break;
+ case QVariant::StringList:
+ item = new PropertyListItem( this, item, 0, name, true );
+ break;
+ case QVariant::Rect:
+ item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect );
+ break;
+ case QVariant::Point:
+ item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point );
+ break;
+ case QVariant::Size:
+ item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size );
+ break;
+ case QVariant::Color:
+ item = new PropertyColorItem( this, item, 0, name, true );
+ break;
+ case QVariant::Pixmap:
+ case QVariant::IconSet:
+ item = new PropertyPixmapItem( this, item, 0, name, t == QVariant::IconSet );
+ break;
+ case QVariant::SizePolicy:
+ item = new PropertySizePolicyItem( this, item, 0, name );
+ break;
+ case QVariant::Palette:
+ item = new PropertyPaletteItem( this, item, 0, name );
+ break;
+ case QVariant::Cursor:
+ item = new PropertyCursorItem( this, item, 0, name );
+ break;
+ case QVariant::Date:
+ item = new PropertyDateItem( this, item, 0, name );
+ break;
+ case QVariant::Time:
+ item = new PropertyTimeItem( this, item, 0, name );
+ break;
+ case QVariant::DateTime:
+ item = new PropertyDateTimeItem( this, item, 0, name );
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
+void PropertyList::paintEmptyArea( QPainter *p, const QRect &r )
+{
+ p->fillRect( r, *backColor2 );
+}
+
+void PropertyList::setCurrentItem( QListViewItem *i )
+{
+ if ( !i )
+ return;
+
+ if ( currentItem() )
+ ( (PropertyItem*)currentItem() )->hideEditor();
+ QListView::setCurrentItem( i );
+ ( (PropertyItem*)currentItem() )->showEditor();
+}
+
+void PropertyList::updateEditorSize()
+{
+ if ( currentItem() )
+ ( ( PropertyItem* )currentItem() )->showEditor();
+}
+
+/*! This has to be called if the value if \a i should be set as
+ property to the currently edited widget.
+*/
+
+void PropertyList::valueChanged( PropertyItem *i )
+{
+ if ( !editor->widget() )
+ return;
+ QString pn( i18n("Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
+ editor->widget(), editor,
+ i->name(), WidgetFactory::property( editor->widget(), i->name() ),
+ i->value(), i->currentItem(), i->currentItemFromObject() );
+ cmd->execute();
+ editor->formWindow()->commandHistory()->addCommand( cmd, true );
+}
+
+void PropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c )
+{
+ if ( !i )
+ return;
+ PropertyItem *pi = (PropertyItem*)i;
+ if ( !pi->hasSubItems() )
+ return;
+
+ if ( c == 0 && viewport()->mapFromGlobal( p ).x() < 20 )
+ toggleOpen( i );
+}
+
+void PropertyList::toggleOpen( QListViewItem *i )
+{
+ if ( !i )
+ return;
+ PropertyItem *pi = (PropertyItem*)i;
+ if ( pi->hasSubItems() ) {
+ pi->setOpen( !pi->isOpen() );
+ } else {
+ pi->toggle();
+ }
+}
+
+bool PropertyList::eventFilter( QObject *o, QEvent *e )
+{
+ if ( !o || !e )
+ return true;
+
+ PropertyItem *i = (PropertyItem*)currentItem();
+ if ( o != this &&e->type() == QEvent::KeyPress ) {
+ QKeyEvent *ke = (QKeyEvent*)e;
+ if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) &&
+ ( o != this || o != viewport() ) &&
+ !( ke->state() & ControlButton ) ) {
+ QApplication::sendEvent( this, (QKeyEvent*)e );
+ return true;
+ } else if ( ( !o->inherits( "QLineEdit" ) ||
+ ( o->inherits( "QLineEdit" ) && ( (QLineEdit*)o )->isReadOnly() ) ) &&
+ i && i->hasSubItems() ) {
+ if ( !i->isOpen() &&
+ ( ke->key() == Key_Plus ||
+ ke->key() == Key_Right ))
+ i->setOpen( true );
+ else if ( i->isOpen() &&
+ ( ke->key() == Key_Minus ||
+ ke->key() == Key_Left ) )
+ i->setOpen( false );
+ } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && o->inherits( "QComboBox" ) ) {
+ QKeyEvent ke2( QEvent::KeyPress, Key_Space, 0, 0 );
+ QApplication::sendEvent( o, &ke2 );
+ return true;
+ }
+ } else if ( e->type() == QEvent::FocusOut && o->inherits( "QLineEdit" ) && editor->formWindow() ) {
+ QTimer::singleShot( 100, editor->formWindow()->commandHistory(), SLOT( checkCompressedCommand() ) );
+ } else if ( o == viewport() ) {
+ QMouseEvent *me;
+ PropertyListItem* i;
+ switch ( e->type() ) {
+ case QEvent::MouseButtonPress:
+ me = (QMouseEvent*)e;
+ i = (PropertyListItem*) itemAt( me->pos() );
+ if( i && ( i->inherits("PropertyColorItem") || i->inherits("PropertyPixmapItem") ) ) {
+ pressItem = i;
+ pressPos = me->pos();
+ mousePressed = true;
+ }
+ break;
+ case QEvent::MouseMove:
+ me = (QMouseEvent*)e;
+ if ( me && me->state() & LeftButton && mousePressed) {
+
+ i = (PropertyListItem*) itemAt( me->pos() );
+ if( i && i == pressItem ) {
+
+ if(( pressPos - me->pos() ).manhattanLength() > QApplication::startDragDistance() ){
+ if ( i->inherits("PropertyColorItem") ) {
+ QColor col = i->value().asColor();
+ QColorDrag *drg = new QColorDrag( col, this );
+ QPixmap pix( 25, 25 );
+ pix.fill( col );
+ QPainter p( &pix );
+ p.drawRect( 0, 0, pix.width(), pix.height() );
+ p.end();
+ drg->setPixmap( pix );
+ mousePressed = false;
+ drg->dragCopy();
+ }
+ else if ( i->inherits("PropertyPixmapItem") ) {
+ QPixmap pix = i->value().asPixmap();
+ if( !pix.isNull() ) {
+ QImage img = pix.convertToImage();
+ QImageDrag *drg = new QImageDrag( img, this );
+ drg->setPixmap( pix );
+ mousePressed = false;
+ drg->dragCopy();
+ }
+ }
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ } else if ( o == header() ) {
+ if ( e->type() == QEvent::ContextMenu ) {
+ ((QContextMenuEvent *)e)->accept();
+ QPopupMenu menu( 0 );
+ menu.setCheckable( true );
+ const int cat_id = 1;
+ const int alpha_id = 2;
+ menu.insertItem( i18n("Sort &Categorized" ), cat_id );
+ int alpha = menu.insertItem( i18n("Sort &Alphabetically" ), alpha_id );
+ if ( showSorted )
+ menu.setItemChecked( alpha_id, true );
+ else
+ menu.setItemChecked( cat_id, true );
+ int res = menu.exec( ( (QContextMenuEvent*)e )->globalPos() );
+ if ( res != -1 ) {
+ bool newShowSorted = ( res == alpha );
+ if ( showSorted != newShowSorted ) {
+ showSorted = newShowSorted;
+ editor->clear();
+ editor->setup();
+ }
+ }
+ return true;
+ }
+ }
+
+ return QListView::eventFilter( o, e );
+}
+
+/*! This method re-initializes each item of the property list.
+*/
+
+void PropertyList::refetchData()
+{
+ QListViewItemIterator it( this );
+ for ( ; it.current(); ++it ) {
+ PropertyItem *i = (PropertyItem*)it.current();
+ if ( !i->propertyParent() )
+ setPropertyValue( i );
+ if ( i->hasSubItems() )
+ i->initChildren();
+ bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() );
+ if ( changed != i->isChanged() )
+ i->setChanged( changed, false );
+ }
+ updateEditorSize();
+}
+
+static void clearAlignList( QStrList &l )
+{
+ if ( l.count() == 1 )
+ return;
+ if ( l.find( "AlignAuto" ) != -1 )
+ l.remove( "AlignAuto" );
+ if ( l.find( "WordBreak" ) != -1 )
+ l.remove( "WordBreak" );
+}
+
+/*! This method initializes the value of the item \a i to the value
+ of the corresponding property.
+*/
+
+void PropertyList::setPropertyValue( PropertyItem *i )
+{
+ const QMetaProperty *p =
+ editor->widget()->metaObject()->
+ property( editor->widget()->metaObject()->findProperty( i->name(), true), true );
+ if ( !p ) {
+ if ( i->name() == "hAlign" ) {
+ int align = editor->widget()->property( "alignment" ).toInt();
+ p = editor->widget()->metaObject()->
+ property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
+ align &= ~AlignVertical_Mask;
+ QStrList l = p->valueToKeys( align );
+ clearAlignList( l );
+ ( (PropertyListItem*)i )->setCurrentItem( l.last() );
+ } else if ( i->name() == "vAlign" ) {
+ int align = editor->widget()->property( "alignment" ).toInt();
+ p = editor->widget()->metaObject()->
+ property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
+ align &= ~AlignHorizontal_Mask;
+ ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() );
+ } else if ( i->name() == "wordwrap" ) {
+ int align = editor->widget()->property( "alignment" ).toInt();
+ if ( align & WordBreak )
+ i->setValue( QVariant( true, 0 ) );
+ else
+ i->setValue( QVariant( false, 0 ) );
+ } else if ( i->name() == "layoutSpacing" ) {
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ } else if ( i->name() == "layoutMargin" ) {
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) {
+ i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) );
+ } else if ( editor->widget()->inherits( "CustomWidget" ) ) {
+ MetaDataBase::CustomWidget *cw = ( (CustomWidget*)editor->widget() )->customWidget();
+ if ( !cw )
+ return;
+ i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) );
+ }
+ return;
+ }
+ if ( p->isSetType() )
+ ;
+ else if ( p->isEnumType() )
+ ( (PropertyListItem*)i )->setCurrentItem( p->valueToKey( editor->widget()->property( i->name() ).toInt() ) );
+ else
+ i->setValue( editor->widget()->property( i->name() ) );
+}
+
+void PropertyList::setCurrentProperty( const QString &n )
+{
+ if ( currentItem() && currentItem()->text( 0 ) == n ||
+ currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() &&
+ ( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n )
+ return;
+
+ QListViewItemIterator it( this );
+ for ( ; it.current(); ++it ) {
+ if ( it.current()->text( 0 ) == n ) {
+ setCurrentItem( it.current() );
+ break;
+ }
+ }
+}
+
+PropertyEditor *PropertyList::propertyEditor() const
+{
+ return editor;
+}
+
+void PropertyList::resetProperty()
+{
+ if ( !currentItem() )
+ return;
+ PropertyItem *i = (PropertyItem*)currentItem();
+ if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) )
+ return;
+ QString pn( i18n("Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
+ editor->widget(), editor,
+ i->name(), i->value(),
+ WidgetFactory::defaultValue( editor->widget(), i->name() ),
+ WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ),
+ i->currentItem(), true );
+ cmd->execute();
+ editor->formWindow()->commandHistory()->addCommand( cmd, false );
+ if ( i->hasSubItems() )
+ i->initChildren();
+}
+
+void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e )
+{
+ PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
+ if( !i ) {
+ e->ignore();
+ return;
+ }
+
+ if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) )
+ e->accept();
+ else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) )
+ e->accept();
+ else
+ e->ignore();
+}
+
+void PropertyList::viewportDragMoveEvent ( QDragMoveEvent *e )
+{
+ PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
+ if( !i ) {
+ e->ignore();
+ return;
+ }
+
+ if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) )
+ e->accept();
+ else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) )
+ e->accept();
+ else
+ e->ignore();
+}
+
+void PropertyList::viewportDropEvent ( QDropEvent *e )
+{
+ PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
+ if( !i ) {
+ e->ignore();
+ return;
+ }
+
+ if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) ) {
+ QColor color;
+ QColorDrag::decode( e, color );
+ i->setValue( QVariant( color ) );
+ valueChanged( i );
+ e->accept();
+ }
+ else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) ) {
+ QImage img;
+ QImageDrag::decode( e, img );
+ QPixmap pm;
+ pm.convertFromImage( img );
+ i->setValue( QVariant( pm ) );
+ valueChanged( i );
+ e->accept();
+ }
+ else
+ e->ignore();
+}
+
+QString PropertyList::whatsThisAt( const QPoint &p )
+{
+ return whatsThisText( itemAt( p ) );
+}
+
+void PropertyList::showCurrentWhatsThis()
+{
+ if ( !currentItem() )
+ return;
+ QPoint p( 0, currentItem()->itemPos() );
+ p = viewport()->mapToGlobal( contentsToViewport( p ) );
+ QWhatsThis::display( whatsThisText( currentItem() ), p, viewport() );
+}
+
+QString PropertyList::whatsThisText( QListViewItem *i )
+{
+ if ( !i || !editor->widget() )
+ return QString::null;
+ readPropertyDocs();
+ if ( ( (PropertyItem*)i )->propertyParent() )
+ i = ( (PropertyItem*)i )->propertyParent();
+
+ const QMetaObject *mo = editor->widget()->metaObject();
+ QString prop = ( (PropertyItem*)i )->name();
+ while ( mo ) {
+ QString s;
+ s = QString( mo->className() ) + "::" + prop;
+ QMap<QString, QString>::Iterator it;
+ if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) {
+ return *it;
+ }
+ mo = mo->superClass();
+ }
+
+ return i18n("<p><b>QWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).arg( prop );
+}
+
+void PropertyList::readPropertyDocs()
+{
+ if ( !propertyDocs.isEmpty() )
+ return;
+
+ QString docFile = MainWindow::self->documentationPath() + "/propertydocs";
+ QFile f( docFile );
+ if ( !f.open( IO_ReadOnly ) )
+ return;
+ QDomDocument doc;
+ QString errMsg;
+ int errLine;
+ if ( !doc.setContent( &f, &errMsg, &errLine ) )
+ return;
+ QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+
+ for ( ; !e.isNull(); e = e.nextSibling().toElement() ) {
+ QDomElement n = e.firstChild().toElement();
+ QString name;
+ QString doc;
+ for ( ; !n.isNull(); n = n.nextSibling().toElement() ) {
+ if ( n.tagName() == "name" )
+ name = n.firstChild().toText().data();
+ else if ( n.tagName() == "doc" )
+ doc = n.firstChild().toText().data();
+ }
+ doc.insert( 0, "<p><b>" + name + "</b></p>" );
+ propertyDocs.insert( name, doc );
+ }
+}
+
+// ------------------------------------------------------------
+
+#ifndef KOMMANDER
+EventList::EventList( QWidget *parent, FormWindow *fw, PropertyEditor *e )
+ : HierarchyList( parent, fw, true ), editor( e )
+{
+ header()->hide();
+ removeColumn( 1 );
+ setRootIsDecorated( true );
+ connect( this, SIGNAL( itemRenamed( QListViewItem *, int, const QString & ) ),
+ this, SLOT( renamed( QListViewItem * ) ) );
+}
+
+void EventList::setup()
+{
+ clear();
+
+#ifndef KOMMANDER
+ if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
+#else
+ if ( MetaDataBase::hasEvents( "C++" ) ) {
+#endif
+ QValueList<MetaDataBase::EventDescription> events =
+#ifndef KOMMANDER
+ MetaDataBase::events( editor->widget(), formWindow->project()->language() );
+#else
+ MetaDataBase::events( editor->widget(), "C++" );
+#endif
+ if ( events.isEmpty() )
+ return;
+ for ( QValueList<MetaDataBase::EventDescription>::Iterator it = events.begin(); it != events.end(); ++it ) {
+ HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (*it).name,
+ QString::null, QString::null );
+ eventItem->setOpen( true );
+ QStringList funcs = MetaDataBase::eventFunctions( editor->widget(),
+ (*it).name,
+#ifndef KOMMANDER
+ formWindow->project()->language() );
+#else
+ "C++" );
+#endif
+ for ( QStringList::Iterator fit = funcs.begin(); fit != funcs.end(); ++fit ) {
+ HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem,
+ *fit, QString::null, QString::null );
+ item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) );
+ }
+#if 0 // ### for conversation from old to new
+ if ( !funcs.isEmpty() )
+ save( eventItem );
+#endif
+ }
+ } else {
+ QStrList sigs = editor->widget()->metaObject()->signalNames( true );
+ sigs.remove( "destroyed()" );
+ QStrListIterator it( sigs );
+ while ( it.current() ) {
+ HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this,
+ it.current(), QString::null, QString::null );
+ eventItem->setOpen( true );
+ QValueList<MetaDataBase::Connection> conns =
+ MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
+ for ( QValueList<MetaDataBase::Connection>::Iterator cit = conns.begin(); cit != conns.end(); ++cit ) {
+ if ( MetaDataBase::normalizeSlot( QString( (*cit).signal ) ) !=
+ MetaDataBase::normalizeSlot( QString( it.current() ) ) )
+ continue;
+ HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem,
+ (*cit).slot, QString::null, QString::null );
+ item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) );
+ }
+ ++it;
+ }
+ }
+}
+
+extern QListViewItem *newItem;
+
+void EventList::contentsMouseDoubleClickEvent( QMouseEvent *e )
+{
+ QListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
+ if ( !i || i->parent() )
+ return;
+ QString s;
+#ifndef KOMMANDER
+ if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
+#else
+ if ( MetaDataBase::hasEvents( "C++" ) ) {
+#endif
+ QString s1 = i->text( 0 );
+ int pt = s1.find( "(" );
+ if ( pt != -1 )
+ s1 = s1.left( pt );
+ s = QString( editor->widget()->name() ) + "_" + s1;
+ } else {
+ s = QString( editor->widget()->name() ) + "_" + i->text( 0 );
+ }
+
+ insertEntry( i, PixmapChooser::loadPixmap( "editslots.xpm" ), s );
+}
+
+void EventList::setCurrent( QWidget * )
+{
+}
+
+void EventList::objectClicked( QListViewItem *i )
+{
+ if ( !i || !i->parent() )
+ return;
+ formWindow->mainWindow()->editFunction( i->text( 0 ) );
+}
+
+void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos )
+{
+ if ( !i )
+ return;
+ QPopupMenu menu;
+ const int NEW_ITEM = 1;
+ const int DEL_ITEM = 2;
+ menu.insertItem( PixmapChooser::loadPixmap( "filenew" ), i18n("New Signal Handler" ), NEW_ITEM );
+ menu.insertItem( PixmapChooser::loadPixmap( "editcut" ), i18n("Delete Signal Handler" ), DEL_ITEM );
+ int res = menu.exec( pos );
+ if ( res == NEW_ITEM ) {
+ QString s;
+#ifndef KOMMANDER
+ if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
+#else
+ if ( MetaDataBase::hasEvents( "C++" ) ) {
+#endif
+ QString s1 = ( i->parent() ? i->parent() : i )->text( 0 );
+ int pt = s1.find( "(" );
+ if ( pt != -1 )
+ s1 = s1.left( pt );
+ s = QString( editor->widget()->name() ) + "_" + s1;
+ } else {
+ s = QString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 );
+ }
+ insertEntry( i->parent() ? i->parent() : i, PixmapChooser::loadPixmap( "editslots.xpm" ), s );
+ } else if ( res == DEL_ITEM && i->parent() ) {
+#ifndef KOMMANDER
+ if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
+#else
+ if ( MetaDataBase::hasEvents( "C++" ) ) {
+#endif
+ QListViewItem *p = i->parent();
+ delete i;
+ save( p );
+ } else {
+ MetaDataBase::Connection conn;
+ conn.sender = editor->widget();
+ conn.receiver = formWindow->mainContainer();
+ conn.signal = i->parent()->text( 0 );
+ conn.slot = i->text( 0 );
+ delete i;
+ RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n("Remove Connection" ),
+ formWindow,
+ conn );
+ formWindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+#ifndef KOMMANDER
+ editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
+#endif
+ }
+ }
+}
+
+void EventList::renamed( QListViewItem *i )
+{
+ if ( newItem == i )
+ newItem = 0;
+ if ( !i->parent() )
+ return;
+ QListViewItem *itm = i->parent()->firstChild();
+ bool del = false;
+ while ( itm ) {
+ if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) {
+ del = true;
+ break;
+ }
+ itm = itm->nextSibling();
+ }
+ i->setRenameEnabled( 0, false );
+ if ( del ) {
+ delete i;
+ } else {
+#ifndef KOMMANDER
+ if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
+#else
+ if ( MetaDataBase::hasEvents( "C++" ) ) {
+#endif
+
+ save( i->parent() );
+ editor->formWindow()->mainWindow()->
+#ifndef KOMMANDER
+ editFunction( i->text( 0 ), editor->formWindow()->project()->language(), true );
+#else
+ editFunction( i->text( 0 ), "C++", true );
+#endif
+ } else {
+ MetaDataBase::Connection conn;
+ conn.sender = editor->widget();
+ conn.receiver = formWindow->mainContainer();
+ conn.signal = i->parent()->text( 0 );
+ conn.slot = i->text( 0 );
+ AddConnectionCommand *cmd = new AddConnectionCommand( i18n("Add Connection" ),
+ formWindow,
+ conn );
+ formWindow->commandHistory()->addCommand( cmd );
+ // #### we should look if the specified slot already
+ // exists and if we can connect to this one
+#ifndef KOMMANDER
+ MetaDataBase::addSlot( formWindow, i->text( 0 ).latin1(), "virtual", "public",
+ formWindow->project()->language(), "void" );
+#else
+ MetaDataBase::addSlot( formWindow, i->text( 0 ).latin1(), "virtual", "public",
+ "C++", "void" );
+#endif
+ editor->formWindow()->mainWindow()->
+ editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ),
+#ifndef KOMMANDER
+ editor->formWindow()->project()->language(), true );
+#else
+ "C++", true );
+#endif
+
+ cmd->execute();
+#ifndef KOMMANDER
+ editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
+#endif
+ }
+ }
+}
+
+void EventList::save( QListViewItem *p )
+{
+ QStringList lst;
+ QListViewItem *i = p->firstChild();
+ while ( i ) {
+ lst << i->text( 0 );
+ i = i->nextSibling();
+ }
+
+#ifndef KOMMANDER
+ if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
+ if ( MetaDataBase::setEventFunctions( editor->widget(), formWindow,
+ formWindow->project()->language(), p->text( 0 ), lst ) )
+ editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
+ }
+#endif
+}
+#endif
+
+// --------------------------------------------------------------
+
+/*!
+ \class PropertyEditor propertyeditor.h
+ \brief PropertyEdior toplevel window
+
+ This is the toplevel window of the property editor which contains a
+ listview for editing properties.
+*/
+
+PropertyEditor::PropertyEditor( QWidget *parent )
+ : QTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+ WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
+{
+ setCaption( i18n("Property Editor" ) );
+ setIcon( PixmapChooser::loadPixmap( "logo" ) );
+ wid = 0;
+ formwindow = 0;
+ listview = new PropertyList( this );
+ addTab( listview, i18n("P&roperties" ) );
+#ifndef KOMMANDER
+ eList = new EventList( this, formWindow(), this );
+ addTab( eList, i18n("S&ignal Handlers" ) );
+#endif
+}
+
+QObject *PropertyEditor::widget() const
+{
+ return wid;
+}
+
+void PropertyEditor::setWidget( QObject *w, FormWindow *fw )
+{
+#ifndef KOMMANDER
+ eList->setFormWindow( fw );
+#endif
+ if ( w && w == wid ) {
+ bool ret = true;
+ if ( wid->isWidgetType() && WidgetFactory::layoutType( (QWidget*)wid ) != WidgetFactory::NoLayout ) {
+ QListViewItemIterator it( listview );
+ ret = false;
+ while ( it.current() ) {
+ if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) {
+ ret = true;
+ break;
+ }
+ ++it;
+ }
+ }
+ if ( ret )
+ return;
+ }
+
+ if ( !w || !fw ) {
+ setCaption( i18n("Property Editor" ) );
+ clear();
+ wid = 0;
+ formwindow = 0;
+ return;
+ }
+
+ wid = w;
+ formwindow = fw;
+ setCaption( i18n("Property Editor (%1)" ).arg( formwindow->name() ) );
+ listview->viewport()->setUpdatesEnabled( false );
+ listview->setUpdatesEnabled( false );
+ clear();
+ listview->viewport()->setUpdatesEnabled( true );
+ listview->setUpdatesEnabled( true );
+ setup();
+}
+
+void PropertyEditor::clear()
+{
+ listview->setContentsPos( 0, 0 );
+ listview->clear();
+#ifndef KOMMANDER
+ eList->setContentsPos( 0, 0 );
+ eList->clear();
+#endif
+}
+
+void PropertyEditor::setup()
+{
+ if ( !formwindow || !wid )
+ return;
+ listview->viewport()->setUpdatesEnabled( false );
+ listview->setupProperties();
+ listview->viewport()->setUpdatesEnabled( true );
+ listview->updateEditorSize();
+
+#ifndef KOMMANDER
+ eList->viewport()->setUpdatesEnabled( false );
+ eList->setup();
+ eList->viewport()->setUpdatesEnabled( true );
+#endif
+}
+
+void PropertyEditor::refetchData()
+{
+ listview->refetchData();
+}
+
+void PropertyEditor::emitWidgetChanged()
+{
+ if ( formwindow && wid )
+ formwindow->widgetChanged( wid );
+}
+
+void PropertyEditor::closed( FormWindow *w )
+{
+ if ( w == formwindow ) {
+ formwindow = 0;
+ wid = 0;
+ clear();
+ }
+}
+
+void PropertyEditor::closeEvent( QCloseEvent *e )
+{
+ emit hidden();
+ e->accept();
+}
+
+PropertyList *PropertyEditor::propertyList() const
+{
+ return listview;
+}
+
+FormWindow *PropertyEditor::formWindow() const
+{
+ return formwindow;
+}
+
+QString PropertyEditor::currentProperty() const
+{
+ if ( !wid )
+ return QString::null;
+ if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() )
+ return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name();
+ return ( (PropertyItem*)listview->currentItem() )->name();
+}
+
+QString PropertyEditor::classOfCurrentProperty() const
+{
+ if ( !wid )
+ return QString::null;
+ QObject *o = wid;
+ QString curr = currentProperty();
+ QMetaObject *mo = o->metaObject();
+ while ( mo ) {
+ QStrList props = mo->propertyNames( false );
+ if ( props.find( curr.latin1() ) != -1 )
+ return mo->className();
+ mo = mo->superClass();
+ }
+ return QString::null;
+}
+
+QMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const
+{
+ if ( !wid )
+ return 0;
+ return wid->metaObject();
+}
+
+void PropertyEditor::resetFocus()
+{
+ if ( listview->currentItem() )
+ ( (PropertyItem*)listview->currentItem() )->showEditor();
+}
+
+#ifndef KOMMANDER
+EventList *PropertyEditor::eventList() const
+{
+ return eList;
+}
+#endif
+#include "propertyeditor.moc"
diff --git a/kommander/editor/propertyeditor.h b/kommander/editor/propertyeditor.h
new file mode 100644
index 00000000..57911b7b
--- /dev/null
+++ b/kommander/editor/propertyeditor.h
@@ -0,0 +1,670 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef PROPERTYEDITOR_H
+#define PROPERTYEDITOR_H
+
+#include <qfeatures.h>
+#include <qvariant.h>
+#include <qlistview.h>
+#include <qptrlist.h>
+#include <qguardedptr.h>
+#include <qtabwidget.h>
+#include <qmodules.h>
+#include "hierarchyview.h"
+
+class PropertyList;
+class PropertyEditor;
+class QPainter;
+class QColorGroup;
+class QComboBox;
+class QLineEdit;
+class QPushButton;
+class QHBox;
+class QSpinBox;
+class QLabel;
+class FormWindow;
+class QCloseEvent;
+class QResizeEvent;
+class PropertyWhatsThis;
+class QDateEdit;
+class QTimeEdit;
+class QDateTimeEdit;
+
+class PropertyItem : public QListViewItem
+{
+public:
+ PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ ~PropertyItem();
+
+ void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
+ void paintBranches( QPainter * p, const QColorGroup & cg,
+ int w, int y, int h );
+ void paintFocus( QPainter *p, const QColorGroup &cg, const QRect &r );
+
+ virtual bool hasSubItems() const;
+ virtual void createChildren();
+ virtual void initChildren();
+
+ bool isOpen() const;
+ void setOpen( bool b );
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+ QVariant value() const;
+ QString name() const;
+ virtual void notifyValueChange();
+
+ virtual void setChanged( bool b, bool updateDb = TRUE );
+ bool isChanged() const;
+
+ virtual void placeEditor( QWidget *w );
+
+ virtual PropertyItem *propertyParent() const;
+ virtual void childValueChanged( PropertyItem *child );
+
+ void addChild( PropertyItem *i );
+ int childCount() const;
+ PropertyItem *child( int i ) const;
+
+ virtual bool hasCustomContents() const;
+ virtual void drawCustomContents( QPainter *p, const QRect &r );
+
+ void updateBackColor();
+
+ void setup() { QListViewItem::setup(); setHeight( QListViewItem::height() + 2 ); }
+
+ virtual QString currentItem() const;
+ virtual int currentIntItem() const;
+ virtual void setCurrentItem( const QString &s );
+ virtual void setCurrentItem( int i );
+ virtual int currentIntItemFromObject() const;
+ virtual QString currentItemFromObject() const;
+
+ void setFocus( QWidget *w );
+
+ virtual void toggle();
+ void setText( int col, const QString &txt );
+
+protected:
+ PropertyList *listview;
+ QVariant val;
+
+private:
+ QColor backgroundColor();
+ void createResetButton();
+ void updateResetButtonState();
+
+private:
+ bool open, changed;
+ PropertyItem *property;
+ QString propertyName;
+ QPtrList<PropertyItem> children;
+ QColor backColor;
+ QPushButton *resetButton;
+
+};
+
+class PropertyTextItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE );
+ ~PropertyTextItem();
+
+ virtual void createChildren();
+ virtual void initChildren();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+ virtual bool hasSubItems() const;
+ virtual void childValueChanged( PropertyItem *child );
+
+ virtual void setChanged( bool b, bool updateDb = TRUE );
+
+private slots:
+ void setValue();
+ void getText();
+
+private:
+ QLineEdit *lined();
+ QGuardedPtr<QLineEdit> lin;
+ QGuardedPtr<QHBox> box;
+ QPushButton *button;
+ bool withComment, hasMultiLines, asciiOnly, accel;
+
+};
+
+
+class PropertyBoolItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ ~PropertyBoolItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+ virtual void toggle();
+
+private slots:
+ void setValue();
+
+private:
+ QComboBox *combo();
+ QGuardedPtr<QComboBox> comb;
+
+};
+
+class PropertyIntItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool s );
+ ~PropertyIntItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+private slots:
+ void setValue();
+
+private:
+ QSpinBox *spinBox();
+ QGuardedPtr<QSpinBox> spinBx;
+ bool signedValue;
+
+};
+
+class PropertyDoubleItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName );
+ ~PropertyDoubleItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+private slots:
+ void setValue();
+
+private:
+ QLineEdit *lined();
+ QGuardedPtr<QLineEdit> lin;
+};
+
+class PropertyListItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool editable );
+ ~PropertyListItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+ QString currentItem() const;
+ int currentIntItem() const;
+ void setCurrentItem( const QString &s );
+ void setCurrentItem( int i );
+ int currentIntItemFromObject() const;
+ QString currentItemFromObject() const;
+ void addItem( const QString &s );
+
+private slots:
+ void setValue();
+
+private:
+ QComboBox *combo();
+ QGuardedPtr<QComboBox> comb;
+ int oldInt;
+ bool editable;
+ QString oldString;
+
+};
+
+class PropertyFontItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ ~PropertyFontItem();
+
+ virtual void createChildren();
+ virtual void initChildren();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+ virtual bool hasSubItems() const;
+ virtual void childValueChanged( PropertyItem *child );
+
+private slots:
+ void getFont();
+
+private:
+ QGuardedPtr<QLineEdit> lined;
+ QGuardedPtr<QPushButton> button;
+ QGuardedPtr<QHBox> box;
+
+};
+
+class PropertyCoordItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ enum Type { Rect, Size, Point };
+
+ PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, Type t );
+ ~PropertyCoordItem();
+
+ virtual void createChildren();
+ virtual void initChildren();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+ virtual bool hasSubItems() const;
+ virtual void childValueChanged( PropertyItem *child );
+
+private:
+ QLineEdit *lined();
+ QGuardedPtr<QLineEdit> lin;
+ Type typ;
+
+};
+
+class PropertyColorItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool children );
+ ~PropertyColorItem();
+
+ virtual void createChildren();
+ virtual void initChildren();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+ virtual bool hasSubItems() const;
+ virtual void childValueChanged( PropertyItem *child );
+
+ virtual bool hasCustomContents() const;
+ virtual void drawCustomContents( QPainter *p, const QRect &r );
+
+private slots:
+ void getColor();
+
+private:
+ QGuardedPtr<QHBox> box;
+ QGuardedPtr<QFrame> colorPrev;
+ QGuardedPtr<QPushButton> button;
+ bool withChildren;
+
+};
+
+class PropertyPixmapItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName, bool isIconSet = FALSE );
+ ~PropertyPixmapItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+ virtual bool hasCustomContents() const;
+ virtual void drawCustomContents( QPainter *p, const QRect &r );
+
+private slots:
+ void getPixmap();
+
+private:
+ QGuardedPtr<QHBox> box;
+ QGuardedPtr<QLabel> pixPrev;
+ QPushButton *button;
+ bool iconSet;
+
+};
+
+
+class PropertySizePolicyItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName );
+ ~PropertySizePolicyItem();
+
+ virtual void createChildren();
+ virtual void initChildren();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+ virtual bool hasSubItems() const;
+ virtual void childValueChanged( PropertyItem *child );
+
+private:
+ QLineEdit *lined();
+ QGuardedPtr<QLineEdit> lin;
+
+};
+
+class PropertyPaletteItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName );
+ ~PropertyPaletteItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+ virtual bool hasCustomContents() const;
+ virtual void drawCustomContents( QPainter *p, const QRect &r );
+
+private slots:
+ void getPalette();
+
+private:
+ QGuardedPtr<QHBox> box;
+ QGuardedPtr<QLabel> palettePrev;
+ QGuardedPtr<QPushButton> button;
+
+};
+
+class PropertyCursorItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
+ const QString &propName );
+ ~PropertyCursorItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+private slots:
+ void setValue();
+
+private:
+ QComboBox *combo();
+ QGuardedPtr<QComboBox> comb;
+
+};
+
+
+class PropertyDatabaseItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName, bool wField );
+ ~PropertyDatabaseItem();
+
+ virtual void createChildren();
+ virtual void initChildren();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+ virtual bool hasSubItems() const;
+ virtual void childValueChanged( PropertyItem *child );
+
+private:
+ QGuardedPtr<QLineEdit> lined;
+ QGuardedPtr<QPushButton> button;
+ QGuardedPtr<QHBox> box;
+ bool withField;
+
+};
+
+class PropertyList : public QListView
+{
+ Q_OBJECT
+
+public:
+ PropertyList( PropertyEditor *e );
+
+ virtual void setupProperties();
+
+ virtual void setCurrentItem( QListViewItem *i );
+ virtual void valueChanged( PropertyItem *i );
+ virtual void refetchData();
+ virtual void setPropertyValue( PropertyItem *i );
+ virtual void setCurrentProperty( const QString &n );
+
+ PropertyEditor *propertyEditor() const;
+ QString whatsThisAt( const QPoint &p );
+ void showCurrentWhatsThis();
+
+public slots:
+ void updateEditorSize();
+ void resetProperty();
+ void toggleSort();
+
+private slots:
+ void itemPressed( QListViewItem *i, const QPoint &p, int c );
+ void toggleOpen( QListViewItem *i );
+ bool eventFilter( QObject *o, QEvent *e );
+
+protected:
+ void resizeEvent( QResizeEvent *e );
+ void paintEmptyArea( QPainter *p, const QRect &r );
+ bool addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t );
+
+ void viewportDragEnterEvent( QDragEnterEvent * );
+ void viewportDragMoveEvent ( QDragMoveEvent * );
+ void viewportDropEvent ( QDropEvent * );
+
+protected:
+ PropertyEditor *editor;
+
+private:
+ void readPropertyDocs();
+ QString whatsThisText( QListViewItem *i );
+
+private:
+ PropertyListItem* pressItem;
+ QPoint pressPos;
+ bool mousePressed;
+ bool showSorted;
+ QMap<QString, QString> propertyDocs;
+ PropertyWhatsThis *whatsThis;
+
+};
+
+class PropertyEditor : public QTabWidget
+{
+ Q_OBJECT
+
+public:
+ PropertyEditor( QWidget *parent );
+
+ QObject *widget() const;
+
+ void clear();
+ void setup();
+
+ void emitWidgetChanged();
+ void refetchData();
+
+ void closed( FormWindow *w );
+
+ PropertyList *propertyList() const;
+ FormWindow *formWindow() const;
+#ifndef KOMMANDER
+// EventList *eventList() const;
+#endif
+
+ QString currentProperty() const;
+ QString classOfCurrentProperty() const;
+ QMetaObject* metaObjectOfCurrentProperty() const;
+
+ void resetFocus();
+
+signals:
+ void hidden();
+
+public slots:
+ void setWidget( QObject *w, FormWindow *fw );
+
+protected:
+ void closeEvent( QCloseEvent *e );
+
+private:
+ QObject *wid;
+ PropertyList *listview;
+#ifndef KOMMANDER
+ EventList *eList;
+#endif
+ FormWindow *formwindow;
+
+};
+
+class PropertyDateItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ ~PropertyDateItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+private slots:
+ void setValue();
+
+private:
+ QDateEdit *lined();
+ QGuardedPtr<QDateEdit> lin;
+
+};
+
+class PropertyTimeItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ ~PropertyTimeItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+private slots:
+ void setValue();
+
+private:
+ QTimeEdit *lined();
+ QGuardedPtr<QTimeEdit> lin;
+
+};
+
+class PropertyDateTimeItem : public QObject,
+ public PropertyItem
+{
+ Q_OBJECT
+
+public:
+ PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ ~PropertyDateTimeItem();
+
+ virtual void showEditor();
+ virtual void hideEditor();
+
+ virtual void setValue( const QVariant &v );
+
+private slots:
+ void setValue();
+
+private:
+ QDateTimeEdit *lined();
+ QGuardedPtr<QDateTimeEdit> lin;
+
+};
+
+#endif
diff --git a/kommander/editor/qcompletionedit.cpp b/kommander/editor/qcompletionedit.cpp
new file mode 100644
index 00000000..bd4b876a
--- /dev/null
+++ b/kommander/editor/qcompletionedit.cpp
@@ -0,0 +1,185 @@
+#include "qcompletionedit.h"
+#include <qlistbox.h>
+#include <qsizegrip.h>
+#include <qapplication.h>
+#include <qvbox.h>
+
+QCompletionEdit::QCompletionEdit( QWidget *parent, const char *name )
+ : QLineEdit( parent, name ), aAdd( false ), caseSensitive( false )
+{
+ popup = new QVBox( 0, 0, WType_Popup );
+ popup->setFrameStyle( QFrame::Box | QFrame::Plain );
+ popup->setLineWidth( 1 );
+ popup->hide();
+
+ listbox = new QListBox( popup );
+ listbox->setFrameStyle( QFrame::NoFrame );
+ listbox->setLineWidth( 1 );
+ listbox->installEventFilter( this );
+ listbox->setHScrollBarMode( QScrollView::AlwaysOn );
+ listbox->setVScrollBarMode( QScrollView::AlwaysOn );
+ listbox->setCornerWidget( new QSizeGrip( listbox, "completion sizegrip" ) );
+ connect( this, SIGNAL( textChanged( const QString & ) ),
+ this, SLOT( textDidChange( const QString & ) ) );
+ popup->setFocusProxy( listbox );
+ installEventFilter( this );
+}
+
+bool QCompletionEdit::autoAdd() const
+{
+ return aAdd;
+}
+
+QStringList QCompletionEdit::completionList() const
+{
+ return compList;
+}
+
+void QCompletionEdit::setCompletionList( const QStringList &l )
+{
+ compList = l;
+}
+
+void QCompletionEdit::setAutoAdd( bool add )
+{
+ aAdd = add;
+}
+
+void QCompletionEdit::textDidChange( const QString &text )
+{
+ if ( text.isEmpty() ) {
+ popup->close();
+ return;
+ }
+ updateListBox();
+ placeListBox();
+}
+
+void QCompletionEdit::placeListBox()
+{
+ if ( listbox->count() == 0 ) {
+ popup->close();
+ return;
+ }
+
+ popup->resize( QMAX( listbox->sizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ),
+ listbox->sizeHint().height() + listbox->horizontalScrollBar()->height() + 4 );
+
+ QPoint p( mapToGlobal( QPoint( 0, 0 ) ) );
+ if ( p.y() + height() + popup->height() <= QApplication::desktop()->height() )
+ popup->move( p.x(), p.y() + height() );
+ else
+ popup->move( p.x(), p.y() - listbox->height() );
+ popup->show();
+ listbox->setCurrentItem( 0 );
+ listbox->setSelected( 0, true );
+ setFocus();
+}
+
+void QCompletionEdit::updateListBox()
+{
+ listbox->clear();
+ if ( compList.isEmpty() )
+ return;
+ for ( QStringList::Iterator it = compList.begin(); it != compList.end(); ++it ) {
+ if ( caseSensitive && (*it).left( text().length() ) == text() ||
+ !caseSensitive && (*it).left( text().length() ).lower() == text().lower() )
+ listbox->insertItem( *it );
+ }
+}
+
+bool QCompletionEdit::eventFilter( QObject *o, QEvent *e )
+{
+ if ( o == popup || o == listbox || o == listbox->viewport() ) {
+ if ( e->type() == QEvent::KeyPress ) {
+ QKeyEvent *ke = (QKeyEvent*)e;
+ if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) {
+ if ( ke->key() == Key_Tab && listbox->count() > 1 &&
+ listbox->currentItem() < (int)listbox->count() - 1 ) {
+ listbox->setCurrentItem( listbox->currentItem() + 1 );
+ return true;
+ }
+ popup->close();
+ setFocus();
+ blockSignals( true );
+ setText( listbox->currentText() );
+ blockSignals( false );
+ emit chosen( text() );
+ return true;
+ } else if ( ke->key() == Key_Left || ke->key() == Key_Right ||
+ ke->key() == Key_Up || ke->key() == Key_Down ||
+ ke->key() == Key_Home || ke->key() == Key_End ||
+ ke->key() == Key_Prior || ke->key() == Key_Next ) {
+ return false;
+ } else if ( ke->key() == Key_Escape ) {
+ popup->close();
+ setFocus();
+ } else if ( ke->key() != Key_Shift && ke->key() != Key_Control &&
+ ke->key() != Key_Alt ) {
+ updateListBox();
+ if ( listbox->count() == 0 || text().length() == 0 ) {
+ popup->close();
+ setFocus();
+ }
+ QApplication::sendEvent( this, e );
+ return true;
+ }
+ } else if ( e->type() == QEvent::MouseButtonDblClick ) {
+ popup->close();
+ setFocus();
+ blockSignals( true );
+ setText( listbox->currentText() );
+ blockSignals( false );
+ emit chosen( text() );
+ return true;
+ }
+ } else if ( o == this ) {
+ if ( e->type() == QEvent::KeyPress ) {
+ QKeyEvent *ke = (QKeyEvent*)e;
+ if ( ke->key() == Key_Up ||
+ ke->key() == Key_Down ||
+ ke->key() == Key_Prior ||
+ ke->key() == Key_Next ||
+ ke->key() == Key_Return ||
+ ke->key() == Key_Enter ||
+ ke->key() == Key_Tab ||
+ ke->key() == Key_Escape ) {
+ QApplication::sendEvent( listbox, e );
+ return true;
+ }
+ }
+ }
+ return QLineEdit::eventFilter( o, e );
+}
+
+void QCompletionEdit::addCompletionEntry( const QString &entry )
+{
+ if ( compList.find( entry ) == compList.end() ) {
+ compList << entry;
+ compList.sort();
+ }
+}
+
+void QCompletionEdit::removeCompletionEntry( const QString &entry )
+{
+ QStringList::Iterator it = compList.find( entry );
+ if ( it != compList.end() )
+ compList.remove( it );
+}
+
+void QCompletionEdit::setCaseSensitive( bool b )
+{
+ caseSensitive = b;
+}
+
+bool QCompletionEdit::isCaseSensitive() const
+{
+ return caseSensitive;
+}
+
+void QCompletionEdit::clear()
+{
+ QLineEdit::clear();
+ compList.clear();
+}
+#include "qcompletionedit.moc"
diff --git a/kommander/editor/qcompletionedit.h b/kommander/editor/qcompletionedit.h
new file mode 100644
index 00000000..fa7e8b23
--- /dev/null
+++ b/kommander/editor/qcompletionedit.h
@@ -0,0 +1,53 @@
+#ifndef QCOMPLETIONEDIT_H
+#define QCOMPLETIONEDIT_H
+
+#include <qlineedit.h>
+#include <qstringlist.h>
+
+class QListBox;
+class QVBox;
+
+class QCompletionEdit : public QLineEdit
+{
+ Q_OBJECT
+ Q_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd )
+ Q_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive )
+
+public:
+ QCompletionEdit( QWidget *parent = 0, const char *name = 0 );
+
+ bool autoAdd() const;
+ QStringList completionList() const;
+ bool eventFilter( QObject *o, QEvent *e );
+ bool isCaseSensitive() const;
+
+public slots:
+ void setCompletionList( const QStringList &l );
+ void setAutoAdd( bool add );
+ void clear();
+ void addCompletionEntry( const QString &entry );
+ void removeCompletionEntry( const QString &entry );
+ void setCaseSensitive( bool b );
+
+signals:
+ void chosen( const QString &text );
+
+private slots:
+ void textDidChange( const QString &text );
+
+private:
+ void placeListBox();
+ void updateListBox();
+
+private:
+ bool aAdd;
+ QStringList compList;
+ QListBox *listbox;
+ QVBox *popup;
+ bool caseSensitive;
+
+};
+
+
+
+#endif
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp
new file mode 100644
index 00000000..99fab90a
--- /dev/null
+++ b/kommander/editor/resource.cpp
@@ -0,0 +1,2858 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qmenudata.h>
+#include "resource.h"
+#include "defs.h"
+#include "metadatabase.h"
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "qdom.h"
+#include "widgetdatabase.h"
+#include "widgetfactory.h"
+#include "layout.h"
+#include "domtool.h"
+#include "command.h"
+#include "pixmapchooser.h"
+#ifndef QT_NO_SQL
+#include "database.h"
+#endif
+#include "actiondnd.h"
+#ifndef KOMMANDER
+#include "project.h"
+#include "pixmapcollection.h"
+#endif
+#include "formfile.h"
+
+#include <qfeatures.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qobject.h>
+#include <qwidget.h>
+#include <qobjectlist.h>
+#include <qmetaobject.h>
+#include <qworkspace.h>
+#include <qtabwidget.h>
+#include <qapplication.h>
+#include <qbuffer.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qlistbox.h>
+#include <qcombobox.h>
+#include <qwidgetstack.h>
+#include <qtabbar.h>
+#include <qheader.h>
+#include <qlistview.h>
+#include <qiconview.h>
+#include <qlabel.h>
+#include <qwizard.h>
+#include <qtextcodec.h>
+#include <qregexp.h>
+#include <zlib.h>
+#include <qdatetime.h>
+#ifndef QT_NO_TABLE
+#include <qtable.h>
+#endif
+
+#include <klocale.h>
+
+static QString makeIndent( int indent )
+{
+ QString s;
+ s.fill( ' ', indent * 4 );
+ return s;
+}
+
+static QString entitize( const QString &s, bool attribute = false )
+{
+ QString s2 = s;
+ s2 = s2.replace( QRegExp( "&" ), "&amp;" );
+ s2 = s2.replace( QRegExp( ">" ), "&gt;" );
+ s2 = s2.replace( QRegExp( "<" ), "&lt;" );
+ if ( attribute ) {
+ s2 = s2.replace( QRegExp( "\"" ), "&quot;" );
+ s2 = s2.replace( QRegExp( "'" ), "&apos;" );
+ }
+ return s2;
+}
+
+static QString mkBool( bool b )
+{
+ return b? "true" : "false";
+}
+
+/*!
+ \class Resource resource.h
+ \brief Class for saving/loading, etc. forms
+
+ This class is used for saving and loading forms, code generation,
+ transferring data of widgets over the clipboard, etc..
+
+*/
+
+
+Resource::Resource()
+{
+ mainwindow = 0;
+ formwindow = 0;
+ toplevel = 0;
+ copying = false;
+ pasting = false;
+ hadGeometry = false;
+#ifndef KOMMANDER
+ langIface = 0;
+#endif
+ hasFunctions = false;
+}
+
+Resource::Resource( MainWindow* mw )
+ : mainwindow( mw )
+{
+ formwindow = 0;
+ toplevel = 0;
+ copying = false;
+ pasting = false;
+ hadGeometry = false;
+#ifndef KOMMANDER
+ langIface = 0;
+#endif
+ hasFunctions = false;
+}
+
+Resource::~Resource()
+{
+#ifndef KOMMANDER
+ if ( langIface )
+ langIface->release();
+#endif
+}
+
+void Resource::setWidget( FormWindow *w )
+{
+ formwindow = w;
+ toplevel = w;
+}
+
+QWidget *Resource::widget() const
+{
+ return toplevel;
+}
+
+bool Resource::load( FormFile *ff )
+{
+ if ( !ff || ff->absFileName().isEmpty() )
+ return false;
+ currFileName = ff->absFileName();
+ mainContainerSet = false;
+
+ QFile f( ff->absFileName() );
+ f.open( IO_ReadOnly );
+
+ bool b = load( ff, &f );
+ f.close();
+
+ return b;
+}
+
+bool Resource::load( FormFile *ff, QIODevice* dev )
+{
+ QDomDocument doc;
+ QString errMsg;
+ int errLine;
+ QTextStream stream(dev);
+ QString content = stream.read();
+ if (content.startsWith("#!"))
+ {
+ content = content.mid(content.find('\n'));
+ }
+ if ( !doc.setContent( content) ) {
+ // qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ return false;
+ }
+
+ DomTool::fixDocument( doc );
+
+ toplevel = formwindow = new FormWindow( ff, mainwindow->qWorkspace(), 0 );
+#ifndef KOMMANDER
+ formwindow->setProject( MainWindow::self->currProject() );
+#endif
+ formwindow->setMainWindow( mainwindow );
+ MetaDataBase::addEntry( formwindow );
+
+#ifndef KOMMANDER
+ if (!langIface) {
+ langIface = MetaDataBase::languageInterface( mainwindow->currProject()->language() );
+ if ( langIface )
+ langIface->addRef();
+ }
+#endif
+
+ QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+
+ QDomElement forwards = e;
+ while ( forwards.tagName() != "forwards" && !forwards.isNull() )
+ forwards = forwards.nextSibling().toElement();
+
+ QDomElement includes = e;
+ while ( includes.tagName() != "includes" && !includes.isNull() )
+ includes = includes.nextSibling().toElement();
+
+ QDomElement variables = e;
+ while ( variables.tagName() != "variables" && !variables.isNull() )
+ variables = variables.nextSibling().toElement();
+
+ QDomElement eltSignals = e;
+ while ( eltSignals.tagName() != "signals" && !eltSignals.isNull() )
+ eltSignals = eltSignals.nextSibling().toElement();
+
+ QDomElement eltSlots = e;
+ while ( eltSlots.tagName() != "slots" && !eltSlots.isNull() )
+ eltSlots = eltSlots.nextSibling().toElement();
+
+ QDomElement connections = e;
+ while ( connections.tagName() != "connections" && !connections.isNull() )
+ connections = connections.nextSibling().toElement();
+
+ QDomElement imageCollection = e;
+ images.clear();
+ while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
+ imageCollection = imageCollection.nextSibling().toElement();
+
+ QDomElement customWidgets = e;
+ while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() )
+ customWidgets = customWidgets.nextSibling().toElement();
+
+ QDomElement tabOrder = e;
+ while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() )
+ tabOrder = tabOrder.nextSibling().toElement();
+
+ QDomElement actions = e;
+ while ( actions.tagName() != "actions" && !actions.isNull() )
+ actions = actions.nextSibling().toElement();
+
+ QDomElement toolbars = e;
+ while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() )
+ toolbars = toolbars.nextSibling().toElement();
+
+ QDomElement menubar = e;
+ while ( menubar.tagName() != "menubar" && !menubar.isNull() )
+ menubar = menubar.nextSibling().toElement();
+
+ QDomElement functions = e;
+ while ( functions.tagName() != "functions" && !functions.isNull() )
+ functions = functions.nextSibling().toElement();
+
+
+ QDomElement widget;
+ while ( !e.isNull() ) {
+ if ( e.tagName() == "widget" ) {
+ widget = e;
+ } else if ( e.tagName() == "include" ) { // compatibility with 2.x
+ MetaDataBase::Include inc;
+ inc.location = "global";
+ if ( e.attribute( "location" ) == "local" )
+ inc.location = "local";
+ inc.implDecl = "in declaration";
+ if ( e.attribute( "impldecl" ) == "in implementation" )
+ inc.implDecl = "in implementation";
+ inc.header = e.firstChild().toText().data();
+ if ( inc.header.right( 5 ) != ".ui.h" )
+ metaIncludes.append( inc );
+ } else if ( e.tagName() == "comment" ) {
+ metaInfo.comment = e.firstChild().toText().data();
+ } else if ( e.tagName() == "forward" ) { // compatibility with old betas
+ metaForwards << e.firstChild().toText().data();
+ } else if ( e.tagName() == "variable" ) { // compatibility with old betas
+ metaVariables << e.firstChild().toText().data();
+ } else if ( e.tagName() == "author" ) {
+ metaInfo.author = e.firstChild().toText().data();
+ } else if ( e.tagName() == "version" ) {
+ metaInfo.version = e.firstChild().toText().data();
+ } else if ( e.tagName() == "license" ) {
+ metaInfo.license = e.firstChild().toText().data();
+ } else if ( e.tagName() == "exportmacro" ) {
+ exportMacro = e.firstChild().toText().data();
+ } else if ( e.tagName() == "layoutdefaults" ) {
+ formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", QString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
+ formwindow->setLayoutDefaultMargin( e.attribute( "margin", QString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
+ }
+
+ e = e.nextSibling().toElement();
+ }
+
+ if ( !imageCollection.isNull() )
+ loadImageCollection( imageCollection );
+ if ( !customWidgets.isNull() )
+ loadCustomWidgets( customWidgets, this );
+
+#if defined (QT_NON_COMMERCIAL)
+ bool previewMode = MainWindow::self->isPreviewing();
+ QWidget *w = (QWidget*)createObject( widget, !previewMode ? (QWidget*)formwindow : MainWindow::self);
+ if ( !w )
+ return false;
+ if ( previewMode )
+ w->reparent( MainWindow::self, Qt::WType_TopLevel, w->pos(), true );
+#else
+ if ( !createObject( widget, formwindow) )
+ return false;
+#endif
+
+ if ( !forwards.isNull() ) {
+ for ( QDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ if ( n.tagName() == "forward" )
+ metaForwards << n.firstChild().toText().data();
+ }
+
+ if ( !includes.isNull() ) {
+ for ( QDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ if ( n.tagName() == "include" ) {
+ if ( n.tagName() == "include" ) {
+ MetaDataBase::Include inc;
+ inc.location = "global";
+ if ( n.attribute( "location" ) == "local" )
+ inc.location = "local";
+ inc.implDecl = "in declaration";
+ if ( n.attribute( "impldecl" ) == "in implementation" )
+ inc.implDecl = "in implementation";
+ inc.header = n.firstChild().toText().data();
+ if ( inc.header.right( 5 ) != ".ui.h" )
+ metaIncludes.append( inc );
+ }
+ }
+ }
+
+ if ( !variables.isNull() ) {
+ for ( QDomElement n = variables.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ if ( n.tagName() == "variable" )
+ metaVariables << n.firstChild().toText().data();
+ }
+ if ( !eltSignals.isNull() ) {
+ for ( QDomElement n = eltSignals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ if ( n.tagName() == "signal" )
+ metaSignals << n.firstChild().toText().data();
+ }
+ if ( !eltSlots.isNull() ) {
+ for ( QDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ if ( n.tagName() == "slot" ) {
+ MetaDataBase::Slot slot;
+ slot.specifier = n.attribute( "specifier", "virtual" );
+ if ( slot.specifier.isEmpty() )
+ slot.specifier = "virtual";
+ slot.access = n.attribute( "access", "public" );
+ if ( slot.access.isEmpty() )
+ slot.access = "public";
+ slot.language = n.attribute( "language", "C++" );
+ slot.returnType = n.attribute( "returnType", "void" );
+ if ( slot.returnType.isEmpty() )
+ slot.returnType = "void";
+ slot.slot = n.firstChild().toText().data();
+ if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) )
+ MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier,
+ slot.access, slot.language, slot.returnType );
+ else
+ MetaDataBase::changeSlotAttributes( formwindow, slot.slot,
+ slot.specifier, slot.access,
+ slot.language, slot.returnType );
+ }
+ }
+ if ( !actions.isNull() )
+ loadActions( actions );
+ if ( !toolbars.isNull() )
+ loadToolBars( toolbars );
+ if ( !menubar.isNull() )
+ loadMenuBar( menubar );
+
+ if ( !connections.isNull() )
+ loadConnections( connections );
+ if ( !tabOrder.isNull() )
+ loadTabOrder( tabOrder );
+
+ if ( formwindow ) {
+ MetaDataBase::setIncludes( formwindow, metaIncludes );
+ MetaDataBase::setForwards( formwindow, metaForwards );
+ MetaDataBase::setSignalList( formwindow, metaSignals );
+ MetaDataBase::setMetaInfo( formwindow, metaInfo );
+ MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro );
+ }
+
+
+ if ( mainwindow && formwindow )
+ {
+ mainwindow->insertFormWindow( formwindow );
+ }
+
+ if ( formwindow ) {
+ formwindow->killAccels( formwindow );
+ if ( formwindow->layout() )
+ formwindow->layout()->activate();
+ if ( hadGeometry )
+ formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize().
+ expandedTo( formwindow->minimumSizeHint() ) ) );
+ else
+ formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) );
+ }
+
+ return true;
+}
+
+bool Resource::save( const QString& filename, bool formCodeOnly )
+{
+ if ( !formwindow || filename.isEmpty() )
+ return false;
+ currFileName = filename;
+
+ QFile f( filename );
+ if ( !f.open( IO_WriteOnly | IO_Translate ) )
+ return false;
+ bool b = save( &f );
+ f.close();
+ return b;
+}
+
+bool Resource::save( QIODevice* dev )
+{
+ if ( !formwindow )
+ return false;
+
+
+ QTextStream ts( dev );
+ ts.setCodec( QTextCodec::codecForName( "UTF-8" ) );
+ if ( formwindow->mainContainer()->property("useShebang").toBool() )
+ ts << formwindow->mainContainer()->property("shebang").toString() << endl;
+ ts << "<!DOCTYPE UI><UI version=\"3.0\" stdsetdef=\"1\">" << endl;
+ saveMetaInfoBefore( ts, 0 );
+ saveObject( formwindow->mainContainer(), 0, ts, 0 );
+ if ( formwindow->mainContainer()->inherits( "QMainWindow" ) ) {
+ saveMenuBar( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
+ saveToolBars( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
+ }
+ if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
+ saveCustomWidgets( ts, 0 );
+ if ( formwindow->mainContainer()->inherits( "QMainWindow" ) )
+ saveActions( formwindow->actionList(), ts, 0 );
+ if ( !images.isEmpty() )
+ saveImageCollection( ts, 0 );
+ if ( !MetaDataBase::connections( formwindow ).isEmpty() || !MetaDataBase::slotList( formwindow ).isEmpty() )
+ saveConnections( ts, 0 );
+ saveTabOrder( ts, 0 );
+ saveMetaInfoAfter( ts, 0 );
+ ts << "</UI>" << endl;
+ images.clear();
+
+ return true;
+}
+
+QString Resource::copy()
+{
+ if ( !formwindow )
+ return QString::null;
+
+ copying = true;
+ QString s;
+ QTextOStream ts( &s );
+
+ ts << "<!DOCTYPE UI-SELECTION><UI-SELECTION>" << endl;
+ QWidgetList widgets = formwindow->selectedWidgets();
+ QWidgetList tmp( widgets );
+ for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ QWidget *p = w->parentWidget();
+ bool save = true;
+ while ( p ) {
+ if ( tmp.findRef( p ) != -1 ) {
+ save = false;
+ break;
+ }
+ p = p->parentWidget();
+ }
+ if ( save )
+ saveObject( w, 0, ts, 0 );
+ }
+ if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
+ saveCustomWidgets( ts, 0 );
+ if ( !images.isEmpty() )
+ saveImageCollection( ts, 0 );
+ ts << "</UI-SELECTION>" << endl;
+
+ return s;
+}
+
+
+void Resource::paste( const QString &cb, QWidget *parent )
+{
+ if ( !formwindow )
+ return;
+ mainContainerSet = true;
+
+ pasting = true;
+ QBuffer buf( QCString( cb.utf8() ) );
+ buf.open( IO_ReadOnly );
+ QDomDocument doc;
+ QString errMsg;
+ int errLine;
+ if ( !doc.setContent( &buf, &errMsg, &errLine ) ) {
+ // qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ }
+
+ QDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
+
+ QDomElement imageCollection = firstWidget;
+ images.clear();
+ while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
+ imageCollection = imageCollection.nextSibling().toElement();
+
+ QDomElement customWidgets = firstWidget;
+ while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() )
+ customWidgets = customWidgets.nextSibling().toElement();
+
+ if ( !imageCollection.isNull() )
+ loadImageCollection( imageCollection );
+ if ( !customWidgets.isNull() )
+ loadCustomWidgets( customWidgets, this );
+
+ QWidgetList widgets;
+ formwindow->clearSelection( false );
+ formwindow->setPropertyShowingBlocked( true );
+ formwindow->clearSelection( false );
+ while ( !firstWidget.isNull() ) {
+ if ( firstWidget.tagName() == "widget" ) {
+ QWidget *w = (QWidget*)createObject( firstWidget, parent, 0 );
+ if ( !w )
+ continue;
+ widgets.append( w );
+ int x = w->x() + formwindow->grid().x();
+ int y = w->y() + formwindow->grid().y();
+ if ( w->x() + w->width() > parent->width() )
+ x = QMAX( 0, parent->width() - w->width() );
+ if ( w->y() + w->height() > parent->height() )
+ y = QMAX( 0, parent->height() - w->height() );
+ if ( x != w->x() || y != w->y() )
+ w->move( x, y );
+ formwindow->selectWidget( w );
+ } else if ( firstWidget.tagName() == "spacer" ) {
+ QWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
+ if ( !w )
+ continue;
+ widgets.append( w );
+ int x = w->x() + formwindow->grid().x();
+ int y = w->y() + formwindow->grid().y();
+ if ( w->x() + w->width() > parent->width() )
+ x = QMAX( 0, parent->width() - w->width() );
+ if ( w->y() + w->height() > parent->height() )
+ y = QMAX( 0, parent->height() - w->height() );
+ if ( x != w->x() || y != w->y() )
+ w->move( x, y );
+ formwindow->selectWidget( w );
+ }
+ firstWidget = firstWidget.nextSibling().toElement();
+ }
+ formwindow->setPropertyShowingBlocked( false );
+ formwindow->emitShowProperties();
+ buf.close();
+
+ PasteCommand *cmd = new PasteCommand( i18n("Paste" ), formwindow, widgets );
+ formwindow->commandHistory()->addCommand( cmd );
+}
+
+void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream &ts, int indent )
+{
+ if ( obj && obj->isWidgetType() && ( (QWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) )
+ return;
+ QString closeTag;
+ if ( obj->isWidgetType() ) {
+ const char* className = WidgetFactory::classNameOf( obj );
+ if ( obj->isA( "CustomWidget" ) )
+ usedCustomWidgets << QString( className );
+ if ( obj != formwindow && !formwindow->widgets()->find( (QWidget*)obj ) )
+ return; // we don't know anything about this thing
+
+ QString attributes;
+ if ( grid ) {
+ QDesignerGridLayout::Item item = grid->items[ (QWidget*)obj ];
+ attributes += QString(" row=\"") + QString::number(item.row) + "\"";
+ attributes += QString(" column=\"") + QString::number(item.column) + "\"";
+ if ( item.rowspan * item.colspan != 1 ) {
+ attributes += QString(" rowspan=\"") + QString::number(item.rowspan) + "\"";
+ attributes += QString(" colspan=\"") + QString::number(item.colspan) + "\"";
+ }
+ }
+
+ if ( qstrcmp( className, "Spacer" ) == 0 ) {
+ closeTag = makeIndent( indent ) + "</spacer>\n";
+ ts << makeIndent( indent ) << "<spacer" << attributes << ">" << endl;
+ ++indent;
+ } else {
+ closeTag = makeIndent( indent ) + "</widget>\n";
+ if ( qstrcmp( className, "KmdrMainWindow" ) == 0 ) {
+ ts << makeIndent( indent ) << "<widget class=\"QMainWindow\"" << attributes << ">" << endl;
+ } else {
+ ts << makeIndent( indent ) << "<widget class=\"" << className << "\"" << attributes << ">" << endl;
+ }
+ ++indent;
+ }
+ if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) )
+ saveItems( obj, ts, indent );
+ saveObjectProperties( obj, ts, indent );
+ } else {
+ // test for other objects we created. Nothing so far.
+ return;
+ }
+
+ if ( obj->inherits( "QTabWidget" ) ) {
+ QTabWidget* tw = (QTabWidget*) obj;
+ QObjectList* tmpl = tw->queryList( "QWidgetStack" );
+ QWidgetStack *ws = (QWidgetStack*)tmpl->first();
+ QTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
+ for ( int i = 0; i < tb->count(); ++i ) {
+ QTab *t = tb->tabAt( i );
+ if ( !t )
+ continue;
+ QWidget *w = ws->widget( t->identifier() );
+ if ( !w )
+ continue;
+ if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
+ continue; // we don't know this widget
+ ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ++indent;
+ ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<cstring>" << entitize( w->name() ) << "</cstring>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+
+ ts << makeIndent( indent ) << "<attribute name=\"title\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</attribute>" << endl;
+ saveChildrenOf( w, ts, indent );
+ --indent;
+ ts << makeIndent( indent ) << "</widget>" << endl;
+ }
+ delete tmpl;
+ } else
+ if ( ::qt_cast<QToolBox*>(obj) ) {
+ QToolBox* tb = (QToolBox*)obj;
+ for ( int i = 0; i < tb->count(); ++i ) {
+ QWidget *w = tb->item( i );
+ if ( !w )
+ continue;
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
+ continue; // we don't know this widget
+ ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ++indent;
+ ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<cstring>" << entitize( w->name() ) << "</cstring>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl;
+ indent++;
+ saveEnumProperty( w, "backgroundMode", QVariant::Invalid, ts, indent );
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<string>" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "</string>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</attribute>" << endl;
+ saveChildrenOf( w, ts, indent );
+ --indent;
+ ts << makeIndent( indent ) << "</widget>" << endl;
+ }
+ }
+ else if ( obj->inherits( "QWizard" ) ) {
+ QWizard* wiz = (QWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) {
+ QWidget *w = wiz->page( i );
+ if ( !w )
+ continue;
+ if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
+ continue; // we don't know this widget
+ ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ++indent;
+ ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<cstring>" << entitize( w->name() ) << "</cstring>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+
+ ts << makeIndent( indent ) << "<attribute name=\"title\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<string>" << entitize( wiz->title( w ) ) << "</string>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</attribute>" << endl;
+ saveChildrenOf( w, ts, indent );
+ --indent;
+ ts << makeIndent( indent ) << "</widget>" << endl;
+ }
+ } else if ( obj->inherits( "QMainWindow" ) ) {
+ saveChildrenOf( ( (QMainWindow*)obj )->centralWidget(), ts, indent );
+ } else {
+ saveChildrenOf( obj, ts, indent );
+ }
+
+ indent--;
+ ts << closeTag;
+}
+
+void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
+{
+ if ( obj->inherits( "QListBox" ) || obj->inherits( "QComboBox" ) ) {
+ QListBox *lb = 0;
+ if ( obj->inherits( "QListBox" ) )
+ lb = (QListBox*)obj;
+ else
+ lb = ( (QComboBox*)obj )->listBox();
+
+ QListBoxItem *i = lb->firstItem();
+ for ( ; i; i = i->next() ) {
+ ts << makeIndent( indent ) << "<item>" << endl;
+ indent++;
+ QStringList text;
+ text << i->text();
+ QPtrList<QPixmap> pixmaps;
+ if ( i->pixmap() )
+ pixmaps.append( i->pixmap() );
+ saveItem( text, pixmaps, ts, indent );
+ indent--;
+ ts << makeIndent( indent ) << "</item>" << endl;
+ }
+ } else if ( obj->inherits( "QIconView" ) ) {
+ QIconView *iv = (QIconView*)obj;
+
+ QIconViewItem *i = iv->firstItem();
+ for ( ; i; i = i->nextItem() ) {
+ ts << makeIndent( indent ) << "<item>" << endl;
+ indent++;
+ QStringList text;
+ text << i->text();
+ QPtrList<QPixmap> pixmaps;
+ if ( i->pixmap() )
+ pixmaps.append( i->pixmap() );
+ saveItem( text, pixmaps, ts, indent );
+ indent--;
+ ts << makeIndent( indent ) << "</item>" << endl;
+ }
+ } else if ( obj->inherits( "QListView" ) ) {
+ QListView *lv = (QListView*)obj;
+ int i;
+ for ( i = 0; i < lv->header()->count(); ++i ) {
+ ts << makeIndent( indent ) << "<column>" << endl;
+ indent++;
+ QStringList l;
+ l << lv->header()->label( i );
+ QPtrList<QPixmap> pix;
+ pix.setAutoDelete( true );
+ if ( lv->header()->iconSet( i ) )
+ pix.append( new QPixmap( lv->header()->iconSet( i )->pixmap() ) );
+ saveItem( l, pix, ts, indent );
+ ts << makeIndent( indent ) << "<property name=\"clickable\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<bool>" << mkBool( lv->header()->isClickEnabled( i ) )<< "</bool>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ ts << makeIndent( indent ) << "<property name=\"resizeable\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<bool>" << mkBool( lv->header()->isResizeEnabled( i ) ) << "</bool>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</column>" << endl;
+ }
+ saveItem( lv->firstChild(), ts, indent - 1 );
+ }
+#ifndef QT_NO_TABLE
+ else if ( obj->inherits( "QTable" ) ) {
+ QTable *table = (QTable*)obj;
+ int i;
+ QMap<QString, QString> columnFields = MetaDataBase::columnFields( table );
+ bool isDataTable = table->inherits( "QDataTable" );
+ for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
+ if ( !table->horizontalHeader()->label( i ).isNull() &&
+ table->horizontalHeader()->label( i ).toInt() != i + 1 ||
+ table->horizontalHeader()->iconSet( i ) ||
+ isDataTable ) {
+ ts << makeIndent( indent ) << "<column>" << endl;
+ indent++;
+ QStringList l;
+ l << table->horizontalHeader()->label( i );
+ QPtrList<QPixmap> pix;
+ pix.setAutoDelete( true );
+ if ( table->horizontalHeader()->iconSet( i ) )
+ pix.append( new QPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
+ saveItem( l, pix, ts, indent );
+ if ( table->inherits( "QDataTable" ) && !columnFields.isEmpty() ) {
+ ts << makeIndent( indent ) << "<property name=\"field\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</column>" << endl;
+ }
+ }
+ for ( i = 0; i < table->verticalHeader()->count(); ++i ) {
+ if ( !table->verticalHeader()->label( i ).isNull() &&
+ table->verticalHeader()->label( i ).toInt() != i + 1 ||
+ table->verticalHeader()->iconSet( i ) ) {
+ ts << makeIndent( indent ) << "<row>" << endl;
+ indent++;
+ QStringList l;
+ l << table->verticalHeader()->label( i );
+ QPtrList<QPixmap> pix;
+ pix.setAutoDelete( true );
+ if ( table->verticalHeader()->iconSet( i ) )
+ pix.append( new QPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) );
+ saveItem( l, pix, ts, indent );
+ indent--;
+ ts << makeIndent( indent ) << "</row>" << endl;
+ }
+ }
+ }
+#endif
+}
+
+void Resource::saveItem( QListViewItem *i, QTextStream &ts, int indent )
+{
+ QListView *lv = i->listView();
+ while ( i ) {
+ ts << makeIndent( indent ) << "<item>" << endl;
+ indent++;
+
+ QPtrList<QPixmap> pixmaps;
+ QStringList textes;
+ for ( int c = 0; c < lv->columns(); ++c ) {
+ pixmaps.append( i->pixmap( c ) );
+ textes << i->text( c );
+ }
+ saveItem( textes, pixmaps, ts, indent );
+
+ if ( i->firstChild() )
+ saveItem( i->firstChild(), ts, indent );
+
+ indent--;
+ ts << makeIndent( indent ) << "</item>" << endl;
+ i = i->nextSibling();
+ }
+}
+
+void Resource::savePixmap( const QPixmap &p, QTextStream &ts, int indent, const QString &tagname )
+{
+ if ( p.isNull() ) {
+ ts << makeIndent( indent ) << "<" + tagname + "></" + tagname + ">" << endl;
+ return;
+ }
+
+ if ( formwindow && formwindow->savePixmapInline() )
+ ts << makeIndent( indent ) << "<" + tagname + ">" << saveInCollection( p ) << "</" + tagname + ">" << endl;
+#ifndef KOMMANDER
+ else if ( formwindow && formwindow->savePixmapInProject() )
+ ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() )
+ << "</" + tagname + ">" << endl;
+#endif
+ else
+ ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() )
+ << "</" + tagname + ">" << endl;
+}
+
+QPixmap Resource::loadPixmap( const QDomElement &e, const QString &/*tagname*/ )
+{
+ QString arg = e.firstChild().toText().data();
+
+ if ( formwindow && formwindow->savePixmapInline() ) {
+ QImage img = loadFromCollection( arg );
+ QPixmap pix;
+ pix.convertFromImage( img );
+ MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
+ return pix;
+ }
+#ifndef KOMMANDER
+ else if ( formwindow && formwindow->savePixmapInProject() ) {
+ QPixmap pix;
+ if ( mainwindow && mainwindow->currProject() )
+ pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg );
+ }
+#endif
+ else
+ {
+ QPixmap pix;
+ pix = PixmapChooser::loadPixmap( "image.xpm" );
+ MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
+ return pix;
+ }
+ QPixmap pix = PixmapChooser::loadPixmap( "image.xpm" );
+ MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
+ return pix;
+}
+
+void Resource::saveItem( const QStringList &text, const QPtrList<QPixmap> &pixmaps, QTextStream &ts, int indent )
+{
+ QStringList::ConstIterator it = text.begin();
+ for ( ; it != text.end(); ++it ) {
+ ts << makeIndent( indent ) << "<property name=\"text\">" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<string>" << entitize( *it ) << "</string>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ }
+
+ for ( int i = 0; i < (int)pixmaps.count(); ++i ) {
+ QPixmap *p = ( (QPtrList<QPixmap>)pixmaps ).at( i );
+ ts << makeIndent( indent ) << "<property name=\"pixmap\">" << endl;
+ indent++;
+ if ( p )
+ savePixmap( *p, ts, indent );
+ else
+ savePixmap( QPixmap(), ts, indent );
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ }
+}
+
+void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
+{
+ const QObjectList *l = obj->children();
+ if ( !l )
+ return; // no children to save
+
+ QString closeTag;
+ // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer
+ QLayout *layout = 0;
+ QDesignerGridLayout* grid = 0;
+ if ( !obj->inherits( "QSplitter" ) &&
+ WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
+ obj->isWidgetType() &&
+ WidgetFactory::layoutType( (QWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
+ WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (QWidget*)obj, layout );
+ switch ( lay ) {
+ case WidgetFactory::HBox:
+ closeTag = makeIndent( indent ) + "</hbox>";
+ ts << makeIndent( indent ) << "<hbox>" << endl;
+ ++indent;
+ break;
+ case WidgetFactory::VBox:
+ closeTag = makeIndent( indent ) + "</vbox>";
+ ts << makeIndent( indent ) << "<vbox>" << endl;
+ ++indent;
+ break;
+ case WidgetFactory::Grid:
+ closeTag = makeIndent( indent ) + "</grid>";
+ ts << makeIndent( indent ) << "<grid>" << endl;
+ ++indent;
+ grid = (QDesignerGridLayout*) layout;
+ break;
+ default:
+ break;
+ }
+
+ // save properties of layout
+ if ( lay != WidgetFactory::NoLayout )
+ saveObjectProperties( layout, ts, indent );
+
+ }
+
+ for ( QPtrListIterator<QObject> it ( *l ); it.current(); ++it )
+ saveObject( it.current(), grid, ts, indent );
+ if ( !closeTag.isEmpty() ) {
+ indent--;
+ ts << closeTag << endl;
+ }
+}
+
+void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
+{
+ QStringList saved;
+ QStringList changed;
+ changed = MetaDataBase::changedProperties( w );
+ if ( w->isWidgetType() ) {
+ if ( w->inherits( "Spacer" ) ) {
+ if ( !changed.contains( "sizeHint" ) )
+ changed << "sizeHint";
+ if ( !changed.contains( "geometry" ) )
+ changed << "geometry";
+ }
+ } else if ( w->inherits( "QLayout" ) ) { // #### should be cleaner (RS)
+ changed << "margin" << "spacing";
+ }
+
+ if ( w == formwindow->mainContainer() ) {
+ if ( changed.findIndex( "geometry" ) == -1 )
+ changed << "geometry";
+ if ( changed.findIndex( "caption" ) == -1 )
+ changed << "caption";
+ }
+
+ if ( changed.isEmpty() )
+ return;
+
+ bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (QWidget*)w )->parentWidget() &&
+ WidgetFactory::layoutType( ( (QWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+
+ QStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
+ for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ if ( changed.find( QString::fromLatin1( it.current() ) ) == changed.end() )
+ continue;
+ if ( saved.find( QString::fromLatin1( it.current() ) ) != saved.end() )
+ continue;
+ saved << QString::fromLatin1( it.current() );
+ const QMetaProperty* p = w->metaObject()->
+ property( w->metaObject()->findProperty( it.current(), true ), true );
+ if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
+ continue;
+ if ( w->inherits( "QLabel" ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
+ ( !( (QLabel*)w )->pixmap() || ( (QLabel*)w )->pixmap()->isNull() ) )
+ continue;
+ if ( w->inherits( "QDesignerMenuBar" ) &&
+ ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
+ qstrcmp( p->name(), "itemText" ) == 0 ) )
+ continue;
+ if ( qstrcmp( p->name(), "name" ) == 0 )
+ knownNames << w->property( "name" ).toString();
+ ts << makeIndent( indent ) << "<property";
+ ts << " name=\"" << it.current() << "\"";
+ if ( !p->stdSet() )
+ ts << " stdset=\"0\"";
+ ts << ">" << endl;
+ indent++;
+ if ( p->isSetType() ) {
+ saveSetProperty( w, it.current(), QVariant::nameToType( p->type() ), ts, indent );
+ } else if ( p->isEnumType() ) {
+ saveEnumProperty( w, it.current(), QVariant::nameToType( p->type() ), ts, indent );
+ } else {
+ saveProperty( w, it.current(), w->property( p->name() ), QVariant::nameToType( p->type() ), ts, indent );
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ }
+
+ if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) {
+ QMap<QString, QVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
+ for ( QMap<QString, QVariant>::Iterator fake = fakeProperties->begin();
+ fake != fakeProperties->end(); ++fake ) {
+ if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) {
+ if ( w->inherits( "CustomWidget" ) ) {
+ MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget();
+ if ( cw && !cw->hasProperty( fake.key().latin1() ) && fake.key() != "toolTip" && fake.key() != "whatsThis" )
+ continue;
+ }
+
+ ts << makeIndent( indent ) << "<property name=\"" << fake.key() << "\" stdset=\"0\">" << endl;
+ indent++;
+ saveProperty( w, fake.key(), *fake, (*fake).type(), ts, indent );
+ indent--;
+ ts << makeIndent( indent ) << "</property>" << endl;
+ }
+ }
+ }
+}
+
+void Resource::saveSetProperty( QObject *w, const QString &name, QVariant::Type, QTextStream &ts, int indent )
+{
+ const QMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
+ QStrList l( p->valueToKeys( w->property( name ).toInt() ) );
+ QString v;
+ for ( uint i = 0; i < l.count(); ++i ) {
+ v += l.at( i );
+ if ( i < l.count() - 1 )
+ v += "|";
+ }
+ ts << makeIndent( indent ) << "<set>" << v << "</set>" << endl;
+}
+
+void Resource::saveEnumProperty( QObject *w, const QString &name, QVariant::Type, QTextStream &ts, int indent )
+{
+ const QMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
+ ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
+}
+
+void Resource::saveProperty( QObject *w, const QString &name, const QVariant &value, QVariant::Type t, QTextStream &ts, int indent )
+{
+ if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || name == "layoutMargin" || name =="layoutSpacing" )
+ return;
+ int num, unum;
+ double dob;
+ QString comment;
+ if ( w && formwindow->widgets()->find( (QWidget*)w ) )
+ comment = MetaDataBase::propertyComment( w, name );
+ switch ( t ) {
+ case QVariant::String:
+ ts << makeIndent( indent ) << "<string>" << entitize( value.toString() ) << "</string>" << endl;
+ if ( !comment.isEmpty() )
+ ts << makeIndent( indent ) << "<comment>" << entitize( comment ) << "</comment>" << endl;
+ break;
+ case QVariant::CString:
+ ts << makeIndent( indent ) << "<cstring>" << entitize( value.toCString() ).latin1() << "</cstring>" << endl;
+ break;
+ case QVariant::Bool:
+ ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl;
+ break;
+ case QVariant::Int:
+ num = value.toInt();
+ if ( w && w->inherits( "QLayout" ) ) {
+ if ( name == "spacing" )
+ num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) );
+ else if ( name == "margin" )
+ num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) );
+ }
+ ts << makeIndent( indent ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ break;
+ case QVariant::Double:
+ dob = value.toDouble();
+ ts << makeIndent( indent ) << "<number>" << QString::number( dob ) << "</number>" << endl;
+ break;
+ case QVariant::KeySequence:
+ num = value.toInt();
+ ts << makeIndent( indent ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ break;
+ case QVariant::UInt:
+ unum = value.toUInt();
+ if ( w && w->inherits( "QLayout" ) ) {
+ if ( name == "spacing" )
+ num = MetaDataBase::spacing( WidgetFactory::layoutParent( (QLayout*)w ) );
+ else if ( name == "margin" )
+ num = MetaDataBase::margin( WidgetFactory::layoutParent( (QLayout*)w ) );
+ }
+ ts << makeIndent( indent ) << "<number>" << QString::number( unum ) << "</number>" << endl;
+ break;
+ case QVariant::Rect: {
+ QVariant v( value );
+ ts << makeIndent( indent ) << "<rect>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<x>" << QString::number( v.toRect().x() ) << "</x>" << endl;
+ ts << makeIndent( indent ) << "<y>" << QString::number( v.toRect().y() ) << "</y>" << endl;
+ ts << makeIndent( indent ) << "<width>" << QString::number( v.toRect().width() ) << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << QString::number( v.toRect().height() ) << "</height>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</rect>" << endl;
+ } break;
+ case QVariant::Point: {
+ QVariant v( value );
+ ts << makeIndent( indent ) << "<point>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<x>" << QString::number( v.toPoint().x() ) << "</x>" << endl;
+ ts << makeIndent( indent ) << "<y>" << QString::number( v.toPoint().y() ) << "</y>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</point>" << endl;
+ } break;
+ case QVariant::Size: {
+ QVariant v( value );
+ ts << makeIndent( indent ) << "<size>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<width>" << QString::number( v.toSize().width() ) << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << QString::number( v.toSize().height() ) << "</height>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</size>" << endl;
+ } break;
+ case QVariant::Color: {
+ QVariant v( value );
+ ts << makeIndent( indent ) << "<color>" << endl;
+ indent++;
+ saveColor( ts, indent, v.toColor() );
+ indent--;
+ ts << makeIndent( indent ) << "</color>" << endl;
+ } break;
+ case QVariant::Font: {
+ QVariant v( value );
+ ts << makeIndent( indent ) << "<font>" << endl;
+ QFont f( qApp->font() );
+ if ( w && w->isWidgetType() && ((QWidget*)w)->parentWidget() )
+ f = ((QWidget*)w)->parentWidget()->font();
+ QFont f2( v.toFont() );
+ indent++;
+ if ( f.family() != f2.family() )
+ ts << makeIndent( indent ) << "<family>" << f2.family() << "</family>" << endl;
+ if ( f.pointSize() != f2.pointSize() )
+ ts << makeIndent( indent ) << "<pointsize>" << QString::number( f2.pointSize() ) << "</pointsize>" << endl;
+ if ( f.bold() != f2.bold() )
+ ts << makeIndent( indent ) << "<bold>" << QString::number( (int)f2.bold() ) << "</bold>" << endl;
+ if ( f.italic() != f2.italic() )
+ ts << makeIndent( indent ) << "<italic>" << QString::number( (int)f2.italic() ) << "</italic>" << endl;
+ if ( f.underline() != f2.underline() )
+ ts << makeIndent( indent ) << "<underline>" << QString::number( (int)f2.underline() ) << "</underline>" << endl;
+ if ( f.strikeOut() != f2.strikeOut() )
+ ts << makeIndent( indent ) << "<strikeout>" << QString::number( (int)f2.strikeOut() ) << "</strikeout>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</font>" << endl;
+ } break;
+ case QVariant::SizePolicy: {
+ QSizePolicy sp( value.toSizePolicy() );
+ ts << makeIndent( indent ) << "<sizepolicy>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<hsizetype>" << (int)sp.horData() << "</hsizetype>" << endl;
+ ts << makeIndent( indent ) << "<vsizetype>" << (int)sp.verData() << "</vsizetype>" << endl;
+ ts << makeIndent( indent ) << "<horstretch>" << (int)sp.horStretch() << "</horstretch>" << endl;
+ ts << makeIndent( indent ) << "<verstretch>" << (int)sp.verStretch() << "</verstretch>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</sizepolicy>" << endl;
+ break;
+ }
+ case QVariant::Pixmap:
+ savePixmap( value.toPixmap(), ts, indent );
+ break;
+ case QVariant::IconSet:
+ savePixmap( value.toIconSet().pixmap(), ts, indent, "iconset" );
+ break;
+ case QVariant::Image:
+ ts << makeIndent( indent ) << "<image>" << saveInCollection( value.toImage() ) << "</image>" << endl;
+ break;
+ case QVariant::Palette: {
+ QPalette p( value.toPalette() );
+ ts << makeIndent( indent ) << "<palette>" << endl;
+ indent++;
+
+ ts << makeIndent( indent ) << "<active>" << endl;
+ indent++;
+ saveColorGroup( ts, indent, p.active() );
+ indent--;
+ ts << makeIndent( indent ) << "</active>" << endl;
+
+ ts << makeIndent( indent ) << "<disabled>" << endl;
+ indent++;
+ saveColorGroup( ts, indent, p.disabled() );
+ indent--;
+ ts << makeIndent( indent ) << "</disabled>" << endl;
+
+ ts << makeIndent( indent ) << "<inactive>" << endl;
+ indent++;
+ saveColorGroup( ts, indent, p.inactive() );
+ indent--;
+ ts << makeIndent( indent ) << "</inactive>" << endl;
+
+ indent--;
+ ts << makeIndent( indent ) << "</palette>" << endl;
+ } break;
+ case QVariant::Cursor:
+ ts << makeIndent( indent ) << "<cursor>" << value.toCursor().shape() << "</cursor>" << endl;
+ break;
+ case QVariant::StringList: {
+ QStringList lst = value.toStringList();
+ uint i = 0;
+ ts << makeIndent( indent ) << "<stringlist>" << endl;
+ indent++;
+ if ( !lst.isEmpty() ) {
+ for ( i = 0; i < lst.count(); ++i )
+ ts << makeIndent( indent ) << "<string>" << entitize( lst[ i ] ) << "</string>" << endl;
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</stringlist>" << endl;
+ } break;
+ case QVariant::Date: {
+ QDate d = value.toDate();
+ ts << makeIndent( indent ) << "<date>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<year>" << d.year() << "</year>" << endl;
+ ts << makeIndent( indent ) << "<month>" << d.month() << "</month>" << endl;
+ ts << makeIndent( indent ) << "<day>" << d.day() << "</day>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</date>" << endl;
+ break;
+ }
+ case QVariant::Time: {
+ QTime t = value.toTime();
+ ts << makeIndent( indent ) << "<time>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<hour>" << t.hour() << "</hour>" << endl;
+ ts << makeIndent( indent ) << "<minute>" << t.minute() << "</minute>" << endl;
+ ts << makeIndent( indent ) << "<second>" << t.second() << "</second>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</time>" << endl;
+ break;
+ }
+ case QVariant::DateTime: {
+ QDateTime dt = value.toDateTime();
+ ts << makeIndent( indent ) << "<datetime>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<year>" << dt.date().year() << "</year>" << endl;
+ ts << makeIndent( indent ) << "<month>" << dt.date().month() << "</month>" << endl;
+ ts << makeIndent( indent ) << "<day>" << dt.date().day() << "</day>" << endl;
+ ts << makeIndent( indent ) << "<hour>" << dt.time().hour() << "</hour>" << endl;
+ ts << makeIndent( indent ) << "<minute>" << dt.time().minute() << "</minute>" << endl;
+ ts << makeIndent( indent ) << "<second>" << dt.time().second() << "</second>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</datetime>" << endl;
+ break;
+ }
+ default:
+ qWarning( "saving the property %s of type %d not supported yet", name.latin1(), (int)t );
+ }
+}
+
+void Resource::saveColorGroup( QTextStream &ts, int indent, const QColorGroup &cg )
+{
+ for( int r = 0 ; r < QColorGroup::NColorRoles ; r++ ) {
+ ts << makeIndent( indent ) << "<color>" << endl;
+ indent++;
+ saveColor( ts, indent, cg.color( (QColorGroup::ColorRole)r ) );
+ indent--;
+ ts << makeIndent( indent ) << "</color>" << endl;
+ QPixmap* pm = cg.brush( (QColorGroup::ColorRole)r ).pixmap();
+ if ( pm && !pm->isNull() )
+ savePixmap( *pm, ts, indent );
+ }
+}
+
+void Resource::saveColor( QTextStream &ts, int indent, const QColor &c )
+{
+ ts << makeIndent( indent ) << "<red>" << QString::number( c.red() ) << "</red>" << endl;
+ ts << makeIndent( indent ) << "<green>" << QString::number( c.green() ) << "</green>" << endl;
+ ts << makeIndent( indent ) << "<blue>" << QString::number( c.blue() ) << "</blue>" << endl;
+}
+
+QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* layout )
+{
+ lastItem = 0;
+ QDomElement n = e.firstChild().toElement();
+ QWidget *w = 0; // the widget that got created
+ QObject *obj = 0; // gets the properties
+
+ int row = e.attribute( "row" ).toInt();
+ int col = e.attribute( "column" ).toInt();
+ int rowspan = e.attribute( "rowspan" ).toInt();
+ int colspan = e.attribute( "colspan" ).toInt();
+ if ( rowspan < 1 )
+ rowspan = 1;
+ if ( colspan < 1 )
+ colspan = 1;
+
+ QString className = e.attribute( "class", "QWidget" );
+
+ if ( !className.isNull() ) {
+ obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
+ if ( !obj )
+ return 0;
+ if ( !mainContainerSet ) {
+ if ( formwindow )
+ formwindow->setMainContainer( (QWidget*)obj );
+ mainContainerSet = true;
+ }
+ w = (QWidget*)obj;
+ if ( w->inherits( "QMainWindow" ) )
+ w = ( (QMainWindow*)w )->centralWidget();
+ if ( layout ) {
+ switch ( WidgetFactory::layoutType( layout ) ) {
+ case WidgetFactory::HBox:
+ ( (QHBoxLayout*)layout )->addWidget( w );
+ break;
+ case WidgetFactory::VBox:
+ ( (QVBoxLayout*)layout )->addWidget( w );
+ break;
+ case WidgetFactory::Grid:
+ ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ col, col + colspan - 1 );
+ break;
+ default:
+ break;
+ }
+ }
+
+ if ( !toplevel )
+ toplevel = w;
+ layout = 0;
+
+ if ( w && formwindow ) {
+ if ( !parent || ( !parent->inherits( "QToolBox" ) && !parent->inherits( "QTabWidget" ) && !parent->inherits( "QWizard" ) ) )
+ formwindow->insertWidget( w, pasting );
+ else if ( parent && ( parent->inherits( "QToolBox" ) || parent->inherits( "QTabWidget" ) || parent->inherits( "QWizard" ) ) )
+ MetaDataBase::addEntry( w );
+ if (w->inherits("Dialog"))
+ dynamic_cast<Dialog*>(w)->setUseInternalParser(false);
+ }
+ }
+
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "spacer" ) {
+ createSpacer( n, w, layout, Qt::Horizontal );
+ } else if ( n.tagName() == "widget" ) {
+ createObject( n, w, layout );
+ } else if ( n.tagName() == "hbox" ) {
+ layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox );
+ obj = layout;
+ n = n.firstChild().toElement();
+ continue;
+ } else if ( n.tagName() == "grid" ) {
+ layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid );
+ obj = layout;
+ n = n.firstChild().toElement();
+ continue;
+ } else if ( n.tagName() == "vbox" ) {
+ layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox );
+ obj = layout;
+ n = n.firstChild().toElement();
+ continue;
+ } else if ( n.tagName() == "property" && obj ) {
+ setObjectProperty( obj, n.attribute( "name" ), n.firstChild().toElement() );
+ } else if ( n.tagName() == "attribute" && w ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( parent->inherits( "QTabWidget" ) ) {
+ if ( attrib == "title" )
+ ( (QTabWidget*)parent )->insertTab( w, v.toString() );
+ } else
+ if ( parent->inherits( "QToolBox" ) ) {
+ if ( attrib == "label" )
+ ( (QToolBox*)parent )->addItem( w, v.toString() );
+ } else if ( parent->inherits( "QWizard" ) ) {
+ if ( attrib == "title" )
+ ( (QWizard*)parent )->addPage( w, v.toString() );
+ }
+ } else if ( n.tagName() == "item" ) {
+ createItem( n, w );
+ } else if ( n.tagName() == "column" || n.tagName() =="row" ) {
+ createColumn( n, w );
+ } else if ( n.tagName() == "event" ) {
+ // qDebug("Resource : Tag == event");
+#ifndef KOMMANDER
+ MetaDataBase::setEventFunctions( obj, formwindow, MainWindow::self->currProject()->language(),
+ n.attribute( "name" ), QStringList::split( ',', n.attribute( "functions" ) ), false );
+#endif
+ }
+
+ n = n.nextSibling().toElement();
+ }
+
+ return w;
+}
+
+void Resource::createColumn( const QDomElement &e, QWidget *widget )
+{
+ if ( !widget )
+ return;
+
+ if ( widget->inherits( "QListView" ) && e.tagName() == "column" ) {
+ QListView *lv = (QListView*)widget;
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ bool hasPixmap = false;
+ QString txt;
+ bool clickable = true, resizeable = true;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( attrib == "text" )
+ txt = v.toString();
+ else if ( attrib == "pixmap" ) {
+ pix = loadPixmap( n.firstChild().toElement().toElement() );
+ hasPixmap = !pix.isNull();
+ } else if ( attrib == "clickable" )
+ clickable = v.toBool();
+ else if ( attrib == "resizeable" )
+ resizeable = v.toBool();
+ }
+ n = n.nextSibling().toElement();
+ }
+ lv->addColumn( txt );
+ int i = lv->header()->count() - 1;
+ if ( hasPixmap ) {
+ lv->header()->setLabel( i, pix, txt );
+ }
+ if ( !clickable )
+ lv->header()->setClickEnabled( clickable, i );
+ if ( !resizeable )
+ lv->header()->setResizeEnabled( resizeable, i );
+ }
+#ifndef QT_NO_TABLE
+ else if ( widget->inherits( "QTable" ) ) {
+ QTable *table = (QTable*)widget;
+ bool isRow;
+ if ( ( isRow = e.tagName() == "row" ) )
+ table->setNumRows( table->numRows() + 1 );
+ else
+ table->setNumCols( table->numCols() + 1 );
+
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ bool hasPixmap = false;
+ QString txt;
+ QString field;
+ QMap<QString, QString> fieldMap = MetaDataBase::columnFields( table );
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( attrib == "text" )
+ txt = v.toString();
+ else if ( attrib == "pixmap" ) {
+ hasPixmap = !n.firstChild().firstChild().toText().data().isEmpty();
+ if ( hasPixmap )
+ pix = loadPixmap( n.firstChild().toElement() );
+ } else if ( attrib == "field" )
+ field = v.toString();
+ }
+ n = n.nextSibling().toElement();
+ }
+
+ int i = isRow ? table->numRows() - 1 : table->numCols() - 1;
+ QHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader();
+ if ( hasPixmap )
+ h->setLabel( i, pix, txt );
+ else
+ h->setLabel( i, txt );
+ if ( !isRow && !field.isEmpty() )
+ fieldMap.insert( txt, field );
+ MetaDataBase::setColumnFields( table, fieldMap );
+ }
+#endif
+}
+
+void Resource::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap )
+{
+ QDomElement n = e;
+ hasPixmap = false;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( attrib == "text" )
+ txt = v.toString();
+ else if ( attrib == "pixmap" ) {
+ pix = loadPixmap( n.firstChild().toElement() );
+ hasPixmap = !pix.isNull();
+ }
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void Resource::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i )
+{
+ if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) )
+ return;
+
+ if ( widget->inherits( "QListBox" ) || widget->inherits( "QComboBox" ) ) {
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ bool hasPixmap = false;
+ QString txt;
+ loadItem( n, pix, txt, hasPixmap );
+ QListBox *lb = 0;
+ if ( widget->inherits( "QListBox" ) )
+ lb = (QListBox*)widget;
+ else
+ lb = ( (QComboBox*)widget)->listBox();
+ if ( hasPixmap ) {
+ new QListBoxPixmap( lb, pix, txt );
+ } else {
+ new QListBoxText( lb, txt );
+ }
+ } else if ( widget->inherits( "QIconView" ) ) {
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ bool hasPixmap = false;
+ QString txt;
+ loadItem( n, pix, txt, hasPixmap );
+
+ QIconView *iv = (QIconView*)widget;
+ new QIconViewItem( iv, txt, pix );
+ } else if ( widget->inherits( "QListView" ) ) {
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ QValueList<QPixmap> pixmaps;
+ QStringList textes;
+ QListViewItem *item = 0;
+ QListView *lv = (QListView*)widget;
+ if ( i )
+ item = new QListViewItem( i, lastItem );
+ else
+ item = new QListViewItem( lv, lastItem );
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( attrib == "text" )
+ textes << v.toString();
+ else if ( attrib == "pixmap" ) {
+ QString s = v.toString();
+ if ( s.isEmpty() ) {
+ pixmaps << QPixmap();
+ } else {
+ pix = loadPixmap( n.firstChild().toElement() );
+ pixmaps << pix;
+ }
+ }
+
+ } else if ( n.tagName() == "item" ) {
+ item->setOpen( true );
+ createItem( n, widget, item );
+ }
+
+ n = n.nextSibling().toElement();
+ }
+
+ for ( int i = 0; i < lv->columns(); ++i ) {
+ item->setText( i, textes[ i ] );
+ item->setPixmap( i, pixmaps[ i ] );
+ }
+ lastItem = item;
+ }
+}
+
+QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout *layout, Qt::Orientation o )
+{
+ QDomElement n = e.firstChild().toElement();
+ int row = e.attribute( "row" ).toInt();
+ int col = e.attribute( "column" ).toInt();
+ int rowspan = e.attribute( "rowspan" ).toInt();
+ int colspan = e.attribute( "colspan" ).toInt();
+ if ( rowspan < 1 )
+ rowspan = 1;
+ if ( colspan < 1 )
+ colspan = 1;
+
+ Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"),
+ parent, "spacer", false);
+ spacer->setOrientation( o );
+ spacer->setInteraciveMode( false );
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" )
+ setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() );
+ n = n.nextSibling().toElement();
+ }
+ spacer->setInteraciveMode( true );
+ if ( formwindow )
+ formwindow->insertWidget( spacer, pasting );
+ if ( layout ) {
+ if ( layout->inherits( "QBoxLayout" ) )
+ ( (QBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
+ else
+ ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
+ spacer->alignment() );
+ }
+ return spacer;
+}
+
+/*!
+ Attention: this function has to be in sync with Uic::setObjectProperty(). If you change one, change both.
+*/
+void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomElement &e )
+{
+ const QMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
+
+ if ( !obj->inherits( "QLayout" ) ) {// no layouts in metadatabase... (RS)
+ if ( obj->inherits( "CustomWidget" ) ) {
+ MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
+ if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
+ return;
+ }
+ MetaDataBase::setPropertyChanged( obj, prop, true );
+ }
+
+ QVariant defVarient;
+ if ( e.tagName() == "font" ) {
+ QFont f( qApp->font() );
+ if ( obj->isWidgetType() && ( (QWidget*)obj )->parentWidget() )
+ f = ( (QWidget*)obj )->parentWidget()->font();
+ defVarient = QVariant( f );
+ }
+
+ QString comment;
+ QVariant v( DomTool::elementToVariant( e, defVarient, comment ) );
+
+ if ( !comment.isEmpty() ) {
+ MetaDataBase::addEntry( obj );
+ MetaDataBase::setPropertyComment( obj, prop, comment );
+ }
+
+ if ( e.tagName() == "pixmap" ) {
+ QPixmap pix = loadPixmap( e );
+ if ( pix.isNull() )
+ return;
+ v = QVariant( pix );
+ } else if ( e.tagName() == "iconset" ) {
+ QPixmap pix = loadPixmap( e, "iconset" );
+ if ( pix.isNull() )
+ return;
+ v = QVariant( QIconSet( pix ) );
+ } else if ( e.tagName() == "image" ) {
+ v = QVariant( loadFromCollection( v.toString() ) );
+ }
+
+ if ( !p ) {
+ MetaDataBase::setFakeProperty( obj, prop, v );
+ if ( obj->isWidgetType() ) {
+ if ( prop == "database" && obj != toplevel ) {
+ QStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
+ if ( lst.count() > 2 )
+ dbControls.insert( obj->name(), lst[ 2 ] );
+ else if ( lst.count() == 2 )
+ dbTables.insert( obj->name(), lst );
+ }
+ return;
+ }
+ }
+
+
+ if ( e.tagName() == "palette" ) {
+ QDomElement n = e.firstChild().toElement();
+ QPalette p;
+ while ( !n.isNull() ) {
+ QColorGroup cg;
+ if ( n.tagName() == "active" ) {
+ cg = loadColorGroup( n );
+ p.setActive( cg );
+ } else if ( n.tagName() == "inactive" ) {
+ cg = loadColorGroup( n );
+ p.setInactive( cg );
+ } else if ( n.tagName() == "disabled" ) {
+ cg = loadColorGroup( n );
+ p.setDisabled( cg );
+ }
+ n = n.nextSibling().toElement();
+ }
+ v = QPalette( p );
+ } else if ( e.tagName() == "enum" && p && p->isEnumType() ) {
+ QString key( v.toString() );
+ v = QVariant( p->keyToValue( key ) );
+ } else if ( e.tagName() == "set" && p && p->isSetType() ) {
+ QString keys( v.toString() );
+ QStringList lst = QStringList::split( '|', keys );
+ QStrList l;
+ for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ l.append( *it );
+ v = QVariant( p->keysToValue( l ) );
+ }
+
+ if ( prop == "caption" ) {
+ QCString s1 = v.toCString();
+ QString s2 = v.toString();
+ if ( !s1.isEmpty() )
+ formwindow->setCaption( s1 );
+ else if ( !s2.isEmpty() )
+ formwindow->setCaption( s2 );
+ }
+ if ( prop == "icon" ) {
+ formwindow->setIcon( v.toPixmap() );
+ }
+
+ if ( prop == "geometry" ) {
+ if ( obj == toplevel ) {
+ hadGeometry = true;
+ toplevel->resize( v.toRect().size() );
+ return;
+ } else if ( obj == formwindow->mainContainer() ) {
+ hadGeometry = true;
+ formwindow->resize( v.toRect().size() );
+ return;
+ }
+ }
+
+ if ( obj->inherits( "QLayout" ) ) {
+ if ( prop == "spacing" ) {
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() );
+ return;
+ }
+ if ( prop == "margin" ) {
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() );
+ return;
+ }
+ }
+
+ if ( prop == "name" ) {
+ if ( pasting ) {
+ QString s = v.toString();
+ formwindow->unify( (QWidget*)obj, s, true );
+ obj->setName( s );
+ return;
+ } else if ( formwindow && obj == formwindow->mainContainer() ) {
+ formwindow->setName( v.toCString() );
+ }
+ }
+
+ if ( prop == "sizePolicy" ) {
+ QSizePolicy sp = v.toSizePolicy();
+ sp.setHeightForWidth( ( (QWidget*)obj )->sizePolicy().hasHeightForWidth() );
+ }
+
+ obj->setProperty( prop, v );
+}
+
+
+QString Resource::saveInCollection( const QImage &img )
+{
+ QString imgName = "none";
+ QValueList<Image>::Iterator it = images.begin();
+ for ( ; it != images.end(); ++it ) {
+ if ( img == ( *it ).img ) {
+ imgName = ( *it ).name;
+ break;
+ }
+ }
+
+ if ( imgName == "none" ) {
+ Image i;
+ imgName = "image" + QString::number( images.count() );
+ i.name = imgName;
+ i.img = img;
+ images.append( i );
+ }
+ return imgName;
+}
+
+void Resource::saveImageData( const QImage &img, QTextStream &ts, int indent )
+{
+ QByteArray ba;
+ QBuffer buf( ba );
+ buf.open( IO_WriteOnly | IO_Translate );
+ QImageIO iio( &buf, "XPM" );
+ iio.setImage( img );
+ iio.write();
+ buf.close();
+ ulong len = ba.size() * 2;
+ QByteArray bazip( len );
+ ::compress( (uchar*) bazip.data(), &len, (uchar*) ba.data(), ba.size() );
+ QString res;
+ ts << makeIndent( indent ) << "<data format=\"XPM.GZ\" length=\"" << ba.size() << "\">";
+ static const char hexchars[] = "0123456789abcdef";
+ for ( int i = 0; i < (int)len; ++i ) {
+ uchar s = (uchar) bazip[i];
+ ts << hexchars[s >> 4];
+ ts << hexchars[s & 0x0f];
+ }
+ ts << "</data>" << endl;
+}
+
+void Resource::saveImageCollection( QTextStream &ts, int indent )
+{
+ ts << makeIndent( indent ) << "<images>" << endl;
+ indent++;
+
+ QValueList<Image>::Iterator it = images.begin();
+ for ( ; it != images.end(); ++it ) {
+ ts << makeIndent( indent ) << "<image name=\"" << (*it).name << "\">" << endl;
+ indent++;
+ saveImageData( (*it).img, ts, indent );
+ indent--;
+ ts << makeIndent( indent ) << "</image>" << endl;
+ }
+
+ indent--;
+ ts << makeIndent( indent ) << "</images>" << endl;
+}
+
+static QImage loadImageData( QDomElement &n2 )
+{
+ QImage img;
+ QString data = n2.firstChild().toText().data();
+ char *ba = new char[ data.length() / 2 ];
+ for ( int i = 0; i < (int)data.length() / 2; ++i ) {
+ char h = data[ 2 * i ].latin1();
+ char l = data[ 2 * i + 1 ].latin1();
+ uchar r = 0;
+ if ( h <= '9' )
+ r += h - '0';
+ else
+ r += h - 'a' + 10;
+ r = r << 4;
+ if ( l <= '9' )
+ r += l - '0';
+ else
+ r += l - 'a' + 10;
+ ba[ i ] = r;
+ }
+ QString format = n2.attribute( "format", "PNG" );
+ if ( format == "XPM.GZ" ) {
+ ulong len = n2.attribute( "length" ).toULong();
+ if ( len < data.length() * 5 )
+ len = data.length() * 5;
+ QByteArray baunzip( len );
+ ::uncompress( (uchar*) baunzip.data(), &len, (uchar*) ba, data.length()/2 );
+ img.loadFromData( (const uchar*)baunzip.data(), len, "XPM" );
+ } else {
+ img.loadFromData( (const uchar*)ba, data.length() / 2, format );
+ }
+ delete [] ba;
+
+ return img;
+}
+
+void Resource::loadImageCollection( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "image" ) {
+ Image img;
+ img.name = n.attribute( "name" );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "data" )
+ img.img = loadImageData( n2 );
+ n2 = n2.nextSibling().toElement();
+ }
+ images.append( img );
+ n = n.nextSibling().toElement();
+ }
+ }
+}
+
+QImage Resource::loadFromCollection( const QString &name )
+{
+ QValueList<Image>::Iterator it = images.begin();
+ for ( ; it != images.end(); ++it ) {
+ if ( ( *it ).name == name )
+ return ( *it ).img;
+ }
+ return QImage();
+}
+
+void Resource::saveConnections( QTextStream &ts, int indent )
+{
+ ts << makeIndent( indent ) << "<connections>" << endl;
+ indent++;
+ QValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
+ QValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
+ for ( ; it != connections.end(); ++it ) {
+ MetaDataBase::Connection conn = *it;
+ if ( ( knownNames.findIndex( QString( conn.sender->name() ) ) == -1 &&
+ qstrcmp( conn.sender->name(), "this" ) != 0 ) ||
+ ( knownNames.findIndex( QString( conn.receiver->name() ) ) == -1 &&
+ qstrcmp( conn.receiver->name(), "this" ) != 0 ) )
+ continue;
+ if ( formwindow->isMainContainer( (QWidget*)(*it).receiver ) &&
+ !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeSlot( (*it).slot ).latin1() ) )
+ continue;
+
+ if ( conn.sender->inherits( "CustomWidget" ) ) {
+ MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.sender )->customWidget();
+ if ( cw && !cw->hasSignal( conn.signal ) )
+ continue;
+ }
+
+ if ( conn.receiver->inherits( "CustomWidget" ) && !formwindow->isMainContainer( conn.receiver ) ) {
+ MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.receiver )->customWidget();
+ if ( cw && !cw->hasSlot( MetaDataBase::normalizeSlot( conn.slot ).latin1() ) )
+ continue;
+ }
+
+ ts << makeIndent( indent ) << "<connection>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<sender>" << entitize( conn.sender->name() ) << "</sender>" << endl;
+ ts << makeIndent( indent ) << "<signal>" << entitize( conn.signal ) << "</signal>" << endl;
+ ts << makeIndent( indent ) << "<receiver>" << entitize( conn.receiver->name() ) << "</receiver>" << endl;
+ ts << makeIndent( indent ) << "<slot>" << entitize( MetaDataBase::normalizeSlot( conn.slot ) ) << "</slot>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</connection>" << endl;
+ }
+
+#ifndef KOMMANDER
+ QString lang = formwindow->project()->language();
+ LanguageInterface *iface = langIface;
+ if ( iface && MetaDataBase::hasEvents( lang ) ) {
+ QObjectList *l = formwindow->queryList( "QWidget" );
+ l->append( formwindow );
+ QPtrList<QAction> lst = formwindow->actionList();
+ for ( QAction *a = lst.first(); a; a = lst.next() )
+ l->append( a );
+ for ( QObject *o = l->first(); o; o = l->next() ) {
+ if ( !MetaDataBase::hasObject( o ) )
+ continue;
+ QMap<QString, QStringList> eventFunctions = MetaDataBase::eventFunctions( o );
+ QMap<QString, QStringList>::ConstIterator it = eventFunctions.begin();
+ for ( ; it != eventFunctions.end(); ++it ) {
+ QString sls = (*it).join( "," );
+ MetaDataBase::Connection conn;
+ conn.sender = o;
+ conn.signal = it.key();
+ conn.slot = sls;
+ langConnections[ lang ].append( conn );
+ }
+ }
+ delete l;
+ }
+#endif
+
+ indent--;
+ ts << makeIndent( indent ) << "</connections>" << endl;
+}
+
+void Resource::loadConnections( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "connection" ) {
+ QString lang = n.attribute( "language", "C++" );
+ QDomElement n2 = n.firstChild().toElement();
+ MetaDataBase::Connection conn;
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "sender" ) {
+ conn.sender = 0;
+ QString name = n2.firstChild().toText().data();
+ if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ conn.sender = toplevel;
+ } else {
+ if ( name == "this" )
+ name = toplevel->name();
+ QObjectList *l = toplevel->queryList( 0, name, false );
+ if ( l ) {
+ if ( l->first() )
+ conn.sender = l->first();
+ delete l;
+ }
+ if ( !conn.sender )
+ conn.sender = formwindow->findAction( name );
+ }
+ } else if ( n2.tagName() == "signal" ) {
+ conn.signal = n2.firstChild().toText().data();
+ } else if ( n2.tagName() == "receiver" ) {
+ QString name = n2.firstChild().toText().data();
+ if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ conn.receiver = toplevel;
+ } else {
+ QObjectList *l = toplevel->queryList( 0, name, false );
+ if ( l ) {
+ if ( l->first() )
+ conn.receiver = l->first();
+ delete l;
+ }
+ }
+ } else if ( n2.tagName() == "slot" ) {
+ conn.slot = n2.firstChild().toText().data();
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ if ( formwindow ) {
+ if ( conn.sender == formwindow )
+ conn.sender = formwindow->mainContainer();
+ if ( conn.receiver == formwindow )
+ conn.receiver = formwindow->mainContainer();
+ }
+ if ( conn.sender && conn.receiver ) {
+#ifndef KOMMANDER
+ if ( lang == "C++" ) {
+ MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
+ conn.sender, conn.signal, conn.receiver, conn.slot );
+ }
+ else if ( MetaDataBase::hasEvents( lang ) ) {
+ MetaDataBase::setEventFunctions( conn.sender, formwindow, lang, conn.signal,
+ QStringList::split( ',', conn.slot ), false );
+ }
+#else
+ MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
+ conn.sender, conn.signal, conn.receiver, conn.slot );
+#endif
+ }
+ } else if ( n.tagName() == "slot" ) { // compatibility with 2.x
+ MetaDataBase::Slot slot;
+ slot.specifier = n.attribute( "specifier", "virtual" );
+ if ( slot.specifier.isEmpty() )
+ slot.specifier = "virtual";
+ slot.access = n.attribute( "access", "public" );
+ if ( slot.access.isEmpty() )
+ slot.access = "public";
+ slot.language = n.attribute( "language", "C++" );
+ slot.returnType = n.attribute( "returnType", "void" );
+ if ( slot.returnType.isEmpty() )
+ slot.returnType = "void";
+ slot.slot = n.firstChild().toText().data();
+ if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) )
+ MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier,
+ slot.access, slot.language, slot.returnType );
+ else
+ MetaDataBase::changeSlotAttributes( formwindow, slot.slot,
+ slot.specifier, slot.access,
+ slot.language, slot.returnType );
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void Resource::saveCustomWidgets( QTextStream &ts, int indent )
+{
+ ts << makeIndent( indent ) << "<customwidgets>" << endl;
+ indent++;
+
+ QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
+ if ( usedCustomWidgets.findIndex( w->className ) == -1 )
+ continue;
+ ts << makeIndent( indent ) << "<customwidget>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<class>" << w->className << "</class>" << endl;
+ ts << makeIndent( indent ) << "<header location=\""
+ << ( w->includePolicy == MetaDataBase::CustomWidget::Local ? "local" : "global" )
+ << "\">" << w->includeFile << "</header>" << endl;
+ ts << makeIndent( indent ) << "<sizehint>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<width>" << w->sizeHint.width() << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << w->sizeHint.height() << "</height>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</sizehint>" << endl;
+ ts << makeIndent( indent ) << "<container>" << (int)w->isContainer << "</container>" << endl;
+ ts << makeIndent( indent ) << "<sizepolicy>" << endl;
+ indent++;
+ ts << makeIndent( indent ) << "<hordata>" << (int)w->sizePolicy.horData() << "</hordata>" << endl;
+ ts << makeIndent( indent ) << "<verdata>" << (int)w->sizePolicy.verData() << "</verdata>" << endl;
+ ts << makeIndent( indent ) << "<horstretch>" << (int)w->sizePolicy.horStretch() << "</horstretch>" << endl;
+ ts << makeIndent( indent ) << "<verstretch>" << (int)w->sizePolicy.verStretch() << "</verstretch>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</sizepolicy>" << endl;
+ ts << makeIndent( indent ) << "<pixmap>" << saveInCollection( w->pixmap->convertToImage() ) << "</pixmap>" << endl;
+ if ( !w->lstSignals.isEmpty() ) {
+ for ( QValueList<QCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ ts << makeIndent( indent ) << "<signal>" << entitize( *it ) << "</signal>" << endl;
+ }
+ if ( !w->lstSlots.isEmpty() ) {
+ for ( QValueList<MetaDataBase::Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ ts << makeIndent( indent ) << "<slot access=\"" << (*it).access << "\" specifier=\""
+ << (*it).specifier << "\">" << entitize( (*it).slot ) << "</slot>" << endl;
+ }
+ if ( !w->lstProperties.isEmpty() ) {
+ for ( QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
+ ts << makeIndent( indent ) << "<property type=\"" << (*it).type << "\">" << entitize( (*it).property ) << "</property>" << endl;
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</customwidget>" << endl;
+ }
+
+
+ indent--;
+ ts << makeIndent( indent ) << "</customwidgets>" << endl;
+}
+
+void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
+{
+ QDomElement n = e.firstChild().toElement();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "customwidget" ) {
+ QDomElement n2 = n.firstChild().toElement();
+ MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget;
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "class" ) {
+ w->className = n2.firstChild().toText().data();
+ } else if ( n2.tagName() == "header" ) {
+ w->includeFile = n2.firstChild().toText().data();
+ QString s = n2.attribute( "location" );
+ if ( s != "local" )
+ w->includePolicy = MetaDataBase::CustomWidget::Global;
+ else
+ w->includePolicy = MetaDataBase::CustomWidget::Local;
+ } else if ( n2.tagName() == "sizehint" ) {
+ QDomElement n3 = n2.firstChild().toElement();
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "width" )
+ w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "height" )
+ w->sizeHint.setHeight( n3.firstChild().toText().data().toInt() );
+ n3 = n3.nextSibling().toElement();
+ }
+ } else if ( n2.tagName() == "sizepolicy" ) {
+ QDomElement n3 = n2.firstChild().toElement();
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "hordata" )
+ w->sizePolicy.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "verdata" )
+ w->sizePolicy.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "horstretch" )
+ w->sizePolicy.setHorStretch( n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "verstretch" )
+ w->sizePolicy.setVerStretch( n3.firstChild().toText().data().toInt() );
+ n3 = n3.nextSibling().toElement();
+ }
+ } else if ( n2.tagName() == "pixmap" ) {
+ QPixmap pix;
+ if ( r ) {
+ pix = r->loadPixmap( n2 );
+ } else {
+ QDomElement n3 = n2.firstChild().toElement();
+ QImage img;
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "data" ) {
+ img = loadImageData( n3 );
+ }
+ n3 = n3.nextSibling().toElement();
+ }
+ pix.convertFromImage( img );
+ }
+ w->pixmap = new QPixmap( pix );
+ } else if ( n2.tagName() == "signal" ) {
+ w->lstSignals.append( n2.firstChild().toText().data().latin1() );
+ } else if ( n2.tagName() == "container" ) {
+ w->isContainer = (bool)n2.firstChild().toText().data().toInt();
+ } else if ( n2.tagName() == "slot" ) {
+ MetaDataBase::Slot slot;
+ slot.slot = n2.firstChild().toText().data().latin1();
+ slot.access = n2.attribute( "access" );
+ w->lstSlots.append( slot );
+ } else if ( n2.tagName() == "property" ) {
+ MetaDataBase::Property property;
+ property.property = n2.firstChild().toText().data().latin1();
+ property.type = n2.attribute( "type" );
+ w->lstProperties.append( property );
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ MetaDataBase::addCustomWidget( w );
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void Resource::saveTabOrder( QTextStream &ts, int indent )
+{
+ QWidgetList l = MetaDataBase::tabOrder( toplevel );
+ if ( l.isEmpty() )
+ return;
+
+ ts << makeIndent( indent ) << "<tabstops>" << endl;
+ indent++;
+
+ for ( QWidget *w = l.first(); w; w = l.next() ) {
+ if ( w->testWState( Qt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 )
+ continue;
+ ts << makeIndent( indent ) << "<tabstop>" << w->name() << "</tabstop>" << endl;
+ }
+
+ indent--;
+ ts << makeIndent( indent ) << "</tabstops>" << endl;
+}
+
+void Resource::loadTabOrder( const QDomElement &e )
+{
+ QWidget *last = 0;
+ QDomElement n = e.firstChild().toElement();
+ QWidgetList widgets;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "tabstop" ) {
+ QString name = n.firstChild().toText().data();
+ if ( name.isEmpty() )
+ continue;
+ QObjectList *l = toplevel->queryList( 0, name, false );
+ if ( l ) {
+ if ( l->first() ) {
+ QWidget *w = (QWidget*)l->first();
+ widgets.append( w );
+ if ( last )
+ toplevel->setTabOrder( last, w );
+ last = w;
+ }
+ delete l;
+ }
+ }
+ n = n.nextSibling().toElement();
+ }
+
+ if ( !widgets.isEmpty() )
+ MetaDataBase::setTabOrder( toplevel, widgets );
+}
+
+void Resource::saveMetaInfoBefore( QTextStream &ts, int indent )
+{
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(formwindow);
+ QString cn = formwindow->name();
+ ts << makeIndent(indent) << "<class>" << entitize(cn) << "</class>" << endl;
+ if (!info.comment.isEmpty())
+ ts << makeIndent(indent) << "<comment>" << entitize(info.comment) << "</comment>" << endl;
+ if (!info.author.isEmpty())
+ ts << makeIndent(indent) << "<author>" << entitize(info.author) << "</author>" << endl;
+ if (!info.license.isEmpty())
+ ts << makeIndent(indent) << "<license>" << entitize(info.license) << "</license>" << endl;
+ if (!info.version.isEmpty())
+ ts << makeIndent(indent) << "<version>" << entitize(info.version) << "</version>" << endl;
+}
+
+void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
+{
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
+ QValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
+ QString extensionInclude;
+ bool needExtensionInclude = false;
+ if ( !includes.isEmpty() || needExtensionInclude ) {
+ ts << makeIndent( indent ) << "<includes>" << endl;
+ indent++;
+
+ for ( QValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
+ ts << makeIndent( indent ) << "<include location=\"" << (*it).location
+ << "\" impldecl=\"" << (*it).implDecl << "\">" << (*it).header << "</include>" << endl;
+ if ( needExtensionInclude )
+ needExtensionInclude = (*it).header != extensionInclude;
+ }
+
+ if ( needExtensionInclude )
+ ts << makeIndent( indent ) << "<include location=\"local\" impldecl=\"in implementation\">"
+ << extensionInclude << "</include>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</includes>" << endl;
+ }
+
+ QStringList forwards = MetaDataBase::forwards( formwindow );
+ if ( !forwards.isEmpty() ) {
+ ts << makeIndent( indent ) << "<forwards>" << endl;
+ indent++;
+ for ( QStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 )
+ ts << makeIndent( indent ) << "<forward>" << entitize( *it2 ) << "</forward>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</forwards>" << endl;
+ }
+ QStringList sigs = MetaDataBase::signalList( formwindow );
+ if ( !sigs.isEmpty() ) {
+ ts << makeIndent( indent ) << "<signals>" << endl;
+ indent++;
+ for ( QStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 )
+ ts << makeIndent( indent ) << "<signal>" << entitize( *it3 ) << "</signal>" << endl;
+ indent--;
+ ts << makeIndent( indent ) << "</signals>" << endl;
+
+ QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ if ( !slotList.isEmpty() ) {
+ ts << makeIndent( indent ) << "<slots>" << endl;
+ indent++;
+#ifndef KOMMANDER
+ QString lang = formwindow->project()->language();
+#endif
+ QValueList<MetaDataBase::Slot>::Iterator it = slotList.begin();
+ for ( ; it != slotList.end(); ++it ) {
+ MetaDataBase::Slot slot = *it;
+ ts << makeIndent( indent ) << "<slot";
+ if ( slot.access != "public" )
+ ts << " access=\"" << slot.access << "\"";
+ if ( slot.specifier != "virtual" )
+ ts << " specifier=\"" << slot.specifier << "\"";
+ if ( slot.language != "C++" )
+ ts << " language=\"" << slot.language<< "\"";
+ if ( slot.returnType != "void" )
+ ts << " returnType=\"" << entitize( slot.returnType ) << "\"";
+ ts << ">" << entitize( slot.slot ) << "</slot>" << endl;
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</slots>" << endl;
+ }
+ }
+
+ if ( formwindow && formwindow->savePixmapInline() )
+ ;
+ else
+ ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl;
+ if ( !( exportMacro = MetaDataBase::exportMacro( formwindow->mainContainer() ) ).isEmpty() )
+ ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl;
+ if ( formwindow )
+ ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing()
+ << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl;
+}
+
+QColorGroup Resource::loadColorGroup( const QDomElement &e )
+{
+ QColorGroup cg;
+ int r = -1;
+ QDomElement n = e.firstChild().toElement();
+ QColor col;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "color" ) {
+ r++;
+ cg.setColor( (QColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
+ } else if ( n.tagName() == "pixmap" ) {
+ QPixmap pix = loadPixmap( n );
+ cg.setBrush( (QColorGroup::ColorRole)r, QBrush( col, pix ) );
+ }
+ n = n.nextSibling().toElement();
+ }
+ return cg;
+}
+
+void Resource::saveChildActions( QAction *a, QTextStream &ts, int indent )
+{
+ if ( !a->children() )
+ return;
+ QObjectListIt it( *a->children() );
+ while ( it.current() ) {
+ QObject *o = it.current();
+ ++it;
+ if ( !o->inherits( "QAction" ) )
+ continue;
+ QAction *ac = (QAction*)o;
+ bool isGroup = ac->inherits( "QActionGroup" );
+ if ( isGroup )
+ ts << makeIndent( indent ) << "<actiongroup>" << endl;
+ else
+ ts << makeIndent( indent ) << "<action>" << endl;
+ indent++;
+ saveObjectProperties( ac, ts, indent );
+ indent--;
+ if ( isGroup ) {
+ indent++;
+ saveChildActions( ac, ts, indent );
+ indent--;
+ }
+ if ( isGroup )
+ ts << makeIndent( indent ) << "</actiongroup>" << endl;
+ else
+ ts << makeIndent( indent ) << "</action>" << endl;
+ }
+}
+
+void Resource::saveActions( const QPtrList<QAction> &actions, QTextStream &ts, int indent )
+{
+ if ( actions.isEmpty() )
+ return;
+ ts << makeIndent( indent ) << "<actions>" << endl;
+ indent++;
+ QPtrListIterator<QAction> it( actions );
+ while ( it.current() ) {
+ QAction *a = it.current();
+ bool isGroup = a->inherits( "QActionGroup" );
+ if ( isGroup )
+ ts << makeIndent( indent ) << "<actiongroup>" << endl;
+ else
+ ts << makeIndent( indent ) << "<action>" << endl;
+ indent++;
+ saveObjectProperties( a, ts, indent );
+ indent--;
+ if ( isGroup ) {
+ indent++;
+ saveChildActions( a, ts, indent );
+ indent--;
+ }
+ if ( isGroup )
+ ts << makeIndent( indent ) << "</actiongroup>" << endl;
+ else
+ ts << makeIndent( indent ) << "</action>" << endl;
+ ++it;
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</actions>" << endl;
+}
+
+void Resource::loadChildAction( QObject *parent, const QDomElement &e )
+{
+ QDomElement n = e;
+ QAction *a = 0;
+ if ( n.tagName() == "action" ) {
+ a = new QDesignerAction( parent );
+ MetaDataBase::addEntry( a );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "property" ) {
+ setObjectProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
+ } else if ( n2.tagName() == "event" ) {
+ // qDebug("Resource::loadChildAction : Tag == Event");
+#ifndef KOMMANDER
+ MetaDataBase::setEventFunctions( a, formwindow, MainWindow::self->currProject()->language(),
+ n2.attribute( "name" ),
+ QStringList::split( ',', n2.attribute( "functions" ) ), false );
+#endif
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ if ( !parent->inherits( "QAction" ) )
+ formwindow->actionList().append( a );
+ } else if ( n.tagName() == "actiongroup" ) {
+ a = new QDesignerActionGroup( parent );
+ MetaDataBase::addEntry( a );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "property" ) {
+ setObjectProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
+ } else if ( n2.tagName() == "action" ||
+ n2.tagName() == "actiongroup" ) {
+ loadChildAction( a, n2 );
+ } else if ( n2.tagName() == "event" ) {
+ // qDebug("Resource::loadChildAction : Tag == Event");
+#ifndef KOMMANDER
+ MetaDataBase::setEventFunctions( a, formwindow, MainWindow::self->currProject()->language(),
+ n2.attribute( "name" ),
+ QStringList::split( ',', n2.attribute( "functions" ) ), false );
+#endif
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ if ( !parent->inherits( "QAction" ) )
+ formwindow->actionList().append( a );
+ }
+}
+
+void Resource::loadActions( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "action" ) {
+ loadChildAction( formwindow, n );
+ } else if ( n.tagName() == "actiongroup" ) {
+ loadChildAction( formwindow, n );
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void Resource::saveToolBars( QMainWindow *mw, QTextStream &ts, int indent )
+{
+ ts << makeIndent( indent ) << "<toolbars>" << endl;
+ indent++;
+
+ QPtrList<QToolBar> tbList;
+ for ( int i = 0; i <= (int)Qt::DockMinimized; ++i ) {
+ tbList = mw->toolBars( (Qt::Dock)i );
+ if ( tbList.isEmpty() )
+ continue;
+ for ( QToolBar *tb = tbList.first(); tb; tb = tbList.next() ) {
+ if ( tb->isHidden() )
+ continue;
+ ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
+ indent++;
+ saveObjectProperties( tb, ts, indent );
+ QPtrList<QAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
+ for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ if ( a->inherits( "QSeparatorAction" ) ) {
+ ts << makeIndent( indent ) << "<separator/>" << endl;
+ } else {
+ if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) {
+ QWidget *w = ( (QDesignerAction*)a )->widget();
+ ts << makeIndent( indent ) << "<widget class=\""
+ << WidgetFactory::classNameOf( w ) << "\">" << endl;
+ indent++;
+ saveObjectProperties( w, ts, indent );
+ const char *className = WidgetFactory::classNameOf( w );
+ if ( w->isA( "CustomWidget" ) )
+ usedCustomWidgets << QString( className );
+ if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) )
+ saveItems( w, ts, indent );
+ indent--;
+ ts << makeIndent( indent ) << "</widget>" << endl;
+ } else {
+ ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl;
+ }
+ }
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</toolbar>" << endl;
+ }
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</toolbars>" << endl;
+}
+
+void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
+{
+ if ( !mw->child( 0, "QMenuBar" ) )
+ return;
+ ts << makeIndent( indent ) << "<menubar>" << endl;
+ indent++;
+ saveObjectProperties( mw->menuBar(), ts, indent );
+
+ for ( int i = 0; i < (int)mw->menuBar()->count(); ++i ) {
+ ts << makeIndent( indent ) << "<item text=\"" << entitize( mw->menuBar()->text( mw->menuBar()->idAt( i ) ) )
+ << "\" name=\"" << entitize( mw->menuBar()->findItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl;
+ indent++;
+ QMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) );
+ if ( !m )
+ continue;
+ QPtrList<QAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions();
+ for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ if ( a->inherits( "QSeparatorAction" ) )
+ ts << makeIndent( indent ) << "<separator/>" << endl;
+ else
+ ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl;
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</item>" << endl;
+ }
+ indent--;
+ ts << makeIndent( indent ) << "</menubar>" << endl;
+}
+
+void Resource::loadToolBars( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ QMainWindow *mw = ( (QMainWindow*)formwindow->mainContainer() );
+ QDesignerToolBar *tb = 0;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "toolbar" ) {
+ Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
+ tb = new QDesignerToolBar( mw, dock );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "action" ) {
+ QAction *a = formwindow->findAction( n2.attribute( "name" ) );
+ if ( a ) {
+ a->addTo( tb );
+ tb->addAction( a );
+ }
+ } else if ( n2.tagName() == "separator" ) {
+ QAction *a = new QSeparatorAction( 0 );
+ a->addTo( tb );
+ tb->addAction( a );
+ } else if ( n2.tagName() == "widget" ) {
+ QWidget *w = (QWidget*)createObject( n2, tb );
+ QDesignerAction *a = new QDesignerAction( w, tb );
+ a->addTo( tb );
+ tb->addAction( a );
+ tb->installEventFilters( w );
+ } else if ( n2.tagName() == "property" ) {
+ setObjectProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void Resource::loadMenuBar( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ QMainWindow *mw = ( (QMainWindow*)formwindow->mainContainer() );
+ QDesignerMenuBar *mb = new QDesignerMenuBar( mw );
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "item" ) {
+ QDesignerPopupMenu *popup = new QDesignerPopupMenu( mw );
+ popup->setName( n.attribute( "name" ) );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "action" ) {
+ QAction *a = formwindow->findAction( n2.attribute( "name" ) );
+ if ( a ) {
+ a->addTo( popup );
+ popup->addAction( a );
+ }
+ } else if ( n2.tagName() == "separator" ) {
+ QAction *a = new QSeparatorAction( 0 );
+ a->addTo( popup );
+ popup->addAction( a );
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ mb->insertItem( n.attribute( "text" ), popup );
+ } else if ( n.tagName() == "property" ) {
+ setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+#ifndef KOMMANDER
+void Resource::saveFormCode()
+{
+#ifndef KOMMANDER
+ QString lang = formwindow->project()->language();
+#else
+ QString lang = "C++";
+#endif
+ LanguageInterface *iface = langIface;
+ if ( !iface )
+ return;
+ QMap<QString, QString> functionBodies = MetaDataBase::functionBodies( formwindow );
+ if ( langIface->supports( LanguageInterface::StoreFormCodeSeperate ) ) {
+ if ( formwindow->formFile()->hasTempFileName() ||
+ formwindow->formFile()->code().isEmpty() ||
+ !formwindow->formFile()->hasFormCode() )
+ return;
+#ifndef KOMMANDER
+ QFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
+#else
+ QFile f( formwindow->formFile()->codeFile() );
+#endif
+ if ( f.open( IO_WriteOnly | IO_Translate ) ) {
+ QTextStream ts( &f );
+ ts << formwindow->formFile()->code();
+ }
+ } else {
+ QValueList<LanguageInterface::Function> funcs;
+ QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ QValueList<MetaDataBase::Slot>::Iterator sit = slotList.begin();
+ for ( ; sit != slotList.end(); ++sit ) {
+ MetaDataBase::Slot slot = *sit;
+ QMap<QString, QString>::Iterator it =
+ functionBodies.find( MetaDataBase::normalizeSlot( (*sit).slot ) );
+ LanguageInterface::Function func;
+ func.name = slot.slot;
+ func.body = *it;
+ func.comments = MetaDataBase::functionComments( formwindow, func.name );
+ func.returnType = slot.returnType;
+ funcs.append( func );
+ }
+
+ QValueList<LanguageInterface::Connection> conns;
+ QValueList<MetaDataBase::Connection> mconns = langConnections[ lang ];
+ for ( QValueList<MetaDataBase::Connection>::Iterator it = mconns.begin();
+ it != mconns.end(); ++it ) {
+ LanguageInterface::Connection conn;
+ conn.sender = (*it).sender->name();
+ conn.signal = (*it).signal;
+ conn.slot = (*it).slot;
+ conns.append( conn );
+ }
+
+ iface->saveFormCode( formwindow->name(), currFileName + iface->formCodeExtension(),
+ funcs, QStringList(), QStringList(), QStringList(),
+ MetaDataBase::variables( formwindow ), conns );
+ }
+}
+#endif
+
+ // compatibility with early 3.0 betas
+
+static QString make_function_pretty( const QString &s )
+{
+ QString res = s;
+ if ( res.find( ")" ) - res.find( "(" ) == 1 )
+ return res;
+ res.replace( QRegExp( "[(]" ), "( " );
+ res.replace( QRegExp( "[)]" ), " )" );
+ res.replace( QRegExp( "&" ), " &" );
+ res.replace( QRegExp( "[*]" ), " *" );
+ res.replace( QRegExp( "," ), ", " );
+ res.replace( QRegExp( ":" ), " : " );
+ res = res.simplifyWhiteSpace();
+ return res;
+}
+
+#ifndef KOMMANDER
+void Resource::loadFunctions( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ QMap<QString, QString> bodies;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "function" ) {
+ QString name = n.attribute( "name" );
+ QString body = n.firstChild().toText().data();
+ bodies.insert( name, body );
+ }
+ n = n.nextSibling().toElement();
+ }
+ MetaDataBase::setFunctionBodies( formwindow, bodies, QString::null, QString::null );
+ if ( !bodies.isEmpty() ) {
+ LanguageInterface *iface = langIface;
+ if ( !iface )
+ return;
+ QString code;
+ QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ for ( QValueList<MetaDataBase::Slot>::Iterator it = slotList.begin(); it != slotList.end(); ++it ) {
+#ifndef KOMMANDER
+ if ( (*it).language != formwindow->project()->language() )
+#else
+ if ( (*it).language != "C++" )
+#endif
+ continue;
+ QString sl( (*it).slot );
+ QString comments = MetaDataBase::functionComments( formwindow, sl );
+ if ( !comments.isEmpty() )
+ code += comments + "\n";
+ code += iface->createFunctionStart( formwindow->name(), make_function_pretty( sl ),
+ ( (*it).returnType.isEmpty() ?
+ QString( "void" ) :
+ (*it).returnType ) );
+ QMap<QString, QString>::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) );
+ if ( bit != bodies.end() )
+ code += "\n" + *bit + "\n\n";
+ else
+ code += "\n" + iface->createEmptyFunction() + "\n\n";
+ }
+ if ( !code.isEmpty() ) {
+ formwindow->formFile()->setCode( code );
+ hasFunctions = true;
+ }
+ }
+
+}
+
+void Resource::loadExtraSource()
+{
+#ifndef KOMMANDER
+ QString lang = MainWindow::self->currProject()->language();
+#else
+ QString lang = "C++";
+#endif
+ LanguageInterface *iface = langIface;
+ if ( hasFunctions || !iface )
+ return;
+ QValueList<LanguageInterface::Function> functions;
+ QStringList forwards;
+ QStringList includesImpl;
+ QStringList includesDecl;
+ QStringList vars;
+ QValueList<LanguageInterface::Connection> connections;
+
+ iface->loadFormCode( formwindow->name(), currFileName + iface->formCodeExtension(),
+ functions, forwards, includesImpl, includesDecl, vars, connections );
+
+ if ( iface->supports( LanguageInterface::StoreFormCodeSeperate ) ) {
+#ifndef KOMMANDER
+ QFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
+#else
+ QFile f( formwindow->formFile()->codeFile() );
+#endif
+ QString code;
+ if ( f.open( IO_ReadOnly ) ) {
+ QTextStream ts( &f );
+ code = ts.read();
+ }
+ formwindow->formFile()->setCode( code );
+ }
+
+ for ( QValueList<LanguageInterface::Connection>::Iterator cit = connections.begin();
+ cit != connections.end(); ++cit ) {
+ QObject *sender = 0;
+ QString name = (*cit).sender;
+ if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ sender = ( (FormWindow*)toplevel )->mainContainer();
+ } else {
+ if ( name == "this" )
+ name = toplevel->name();
+ QObjectList *l = toplevel->queryList( 0, name, false );
+ if ( l ) {
+ if ( l->first() )
+ sender = l->first();
+ delete l;
+ }
+ if ( !sender )
+ sender = formwindow->findAction( name );
+ }
+ MetaDataBase::setEventFunctions( sender, formwindow, lang, (*cit).signal,
+ QStringList::split( ',', (*cit).slot ), false );
+ }
+
+ QMap<QString, QString> bodies = MetaDataBase::functionBodies( formwindow );
+
+ for ( QValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
+ fit != functions.end(); ++fit ) {
+ if ( MetaDataBase::hasSlot( formwindow, (*fit).name.latin1() ) )
+ MetaDataBase::changeSlot( formwindow, (*fit).name.latin1(), (*fit).name.latin1() );
+ else
+ MetaDataBase::addSlot( formwindow, (*fit).name.latin1(), "virtual", "public", lang, (*fit).returnType );
+ MetaDataBase::setFunctionComments( formwindow, (*fit).name, (*fit).comments );
+ bodies.insert( MetaDataBase::normalizeSlot( (*fit).name ), (*fit).body );
+ }
+ MetaDataBase::setFunctionBodies( formwindow, bodies, QString::null, QString::null );
+
+ QStringList v = MetaDataBase::variables( formwindow );
+ QStringList::Iterator vit;
+ for ( vit = vars.begin(); vit != vars.end(); ++vit )
+ v << *vit;
+ MetaDataBase::setVariables( formwindow, v );
+
+ QStringList f = MetaDataBase::forwards( formwindow );
+ for ( vit = forwards.begin(); vit != forwards.end(); ++vit )
+ f << *vit;
+ MetaDataBase::setForwards( formwindow, f );
+
+ QValueList<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow );
+ for ( vit = includesImpl.begin(); vit != includesImpl.end(); ++vit ) {
+ MetaDataBase::Include inc;
+ inc.header = *vit;
+ inc.location = "in implementation";
+ incls << inc;
+ }
+ for ( vit = includesDecl.begin(); vit != includesDecl.end(); ++vit ) {
+ MetaDataBase::Include inc;
+ inc.header = *vit;
+ inc.location = "in declaration";
+ incls << inc;
+ }
+ MetaDataBase::setIncludes( formwindow, incls );
+}
+#endif
diff --git a/kommander/editor/resource.h b/kommander/editor/resource.h
new file mode 100644
index 00000000..710bd34b
--- /dev/null
+++ b/kommander/editor/resource.h
@@ -0,0 +1,159 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef RESOURCE_H
+#define RESOURCE_H
+
+#include <qstring.h>
+#include <qtextstream.h>
+#include <qvariant.h>
+#include <qvaluelist.h>
+#include <qimage.h>
+#include "actiondnd.h"
+
+#include "metadatabase.h"
+
+class QWidget;
+class QObject;
+class QLayout;
+class QStyle;
+class QPalette;
+class FormWindow;
+class MainWindow;
+class QDomElement;
+class QDesignerGridLayout;
+class QListViewItem;
+class QMainWindow;
+#ifndef KOMMANDER
+struct LanguageInterface;
+#endif
+class FormFile;
+
+class Resource
+{
+public:
+ struct Image {
+ QImage img;
+ QString name;
+ bool operator==( const Image &i ) const {
+ return ( i.name == name &&
+ i.img == img );
+ }
+ };
+
+ Resource();
+ Resource( MainWindow* mw );
+ ~Resource();
+
+ void setWidget( FormWindow *w );
+ QWidget *widget() const;
+
+ bool load( FormFile *ff );
+ bool load( FormFile *ff, QIODevice* );
+ QString copy();
+
+ bool save( const QString& filename, bool formCodeOnly = FALSE);
+ bool save( QIODevice* );
+ void paste( const QString &cb, QWidget *parent );
+
+ static void saveImageData( const QImage &img, QTextStream &ts, int indent );
+ static void loadCustomWidgets( const QDomElement &e, Resource *r );
+
+private:
+ void saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream &ts, int indent );
+ void saveChildrenOf( QObject* obj, QTextStream &ts, int indent );
+ void saveObjectProperties( QObject *w, QTextStream &ts, int indent );
+ void saveSetProperty( QObject *w, const QString &name, QVariant::Type t, QTextStream &ts, int indent );
+ void saveEnumProperty( QObject *w, const QString &name, QVariant::Type t, QTextStream &ts, int indent );
+ void saveProperty( QObject *w, const QString &name, const QVariant &value, QVariant::Type t, QTextStream &ts, int indent );
+ void saveProperty( const QVariant &value, QTextStream &ts, int indent );
+ void saveItems( QObject *obj, QTextStream &ts, int indent );
+ void saveItem( const QStringList &text, const QPtrList<QPixmap> &pixmaps, QTextStream &ts, int indent );
+ void saveItem( QListViewItem *i, QTextStream &ts, int indent );
+ void saveConnections( QTextStream &ts, int indent );
+ void saveCustomWidgets( QTextStream &ts, int indent );
+ void saveTabOrder( QTextStream &ts, int indent );
+ void saveColorGroup( QTextStream &ts, int indent, const QColorGroup &cg );
+ void saveColor( QTextStream &ts, int indent, const QColor &c );
+ void saveMetaInfoBefore( QTextStream &ts, int indent );
+ void saveMetaInfoAfter( QTextStream &ts, int indent );
+ void savePixmap( const QPixmap &p, QTextStream &ts, int indent, const QString &tagname = "pixmap" );
+ void saveActions( const QPtrList<QAction> &actions, QTextStream &ts, int indent );
+ void saveChildActions( QAction *a, QTextStream &ts, int indent );
+ void saveToolBars( QMainWindow *mw, QTextStream &ts, int indent );
+ void saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent );
+#ifndef KOMMANDER
+// void saveFormCode();
+#endif
+
+ QObject *createObject( const QDomElement &e, QWidget *parent, QLayout* layout = 0 );
+ QWidget *createSpacer( const QDomElement &e, QWidget *parent, QLayout *layout, Qt::Orientation o );
+ void createItem( const QDomElement &e, QWidget *widget, QListViewItem *i = 0 );
+ void createColumn( const QDomElement &e, QWidget *widget );
+ void setObjectProperty( QObject* widget, const QString &prop, const QDomElement &e);
+ QString saveInCollection( const QImage &img );
+ QString saveInCollection( const QPixmap &pix ) { return saveInCollection( pix.convertToImage() ); }
+ QImage loadFromCollection( const QString &name );
+ void saveImageCollection( QTextStream &ts, int indent );
+ void loadImageCollection( const QDomElement &e );
+ void loadConnections( const QDomElement &e );
+ void loadTabOrder( const QDomElement &e );
+ void loadItem( const QDomElement &n, QPixmap &pix, QString &txt, bool &hasPixmap );
+ void loadActions( const QDomElement &n );
+ void loadChildAction( QObject *parent, const QDomElement &e );
+ void loadToolBars( const QDomElement &n );
+ void loadMenuBar( const QDomElement &n );
+ QColorGroup loadColorGroup( const QDomElement &e );
+ QPixmap loadPixmap( const QDomElement &e, const QString &tagname = "pixmap" );
+#ifndef KOMMANDER
+// void loadFunctions( const QDomElement &e ); // compatibility with early 3.0 betas
+// void loadExtraSource();
+#endif
+
+private:
+ MainWindow *mainwindow;
+ FormWindow *formwindow;
+ QWidget* toplevel;
+ QValueList<Image> images;
+ bool copying, pasting;
+ bool mainContainerSet;
+ QStringList knownNames;
+ QStringList usedCustomWidgets;
+ QListViewItem *lastItem;
+
+ QValueList<MetaDataBase::Include> metaIncludes;
+ QStringList metaForwards;
+ QStringList metaVariables;
+ QStringList metaSignals;
+ MetaDataBase::MetaInfo metaInfo;
+ QMap<QString, QString> dbControls;
+ QMap<QString, QStringList> dbTables;
+ QString exportMacro;
+ bool hadGeometry;
+ QMap<QString, QValueList<MetaDataBase::Connection> > langConnections;
+ QString currFileName;
+#ifndef KOMMANDER
+ LanguageInterface *langIface;
+#endif
+ bool hasFunctions;
+
+};
+
+#endif
diff --git a/kommander/editor/sizehandle.cpp b/kommander/editor/sizehandle.cpp
new file mode 100644
index 00000000..937d33bc
--- /dev/null
+++ b/kommander/editor/sizehandle.cpp
@@ -0,0 +1,384 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qvariant.h> // HP-UX compiler needs this here
+
+#include "sizehandle.h"
+#include "formwindow.h"
+#include "widgetfactory.h"
+
+#include <qwidget.h>
+#include <qapplication.h>
+#include <qlabel.h>
+
+#include <klocale.h>
+
+SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s )
+ : QWidget( parent )
+{
+ active = true;
+ setBackgroundMode( active ? PaletteText : PaletteDark );
+ setFixedSize( 6, 6 );
+ widget = 0;
+ dir =d ;
+ setMouseTracking( false );
+ formWindow = parent;
+ sel = s;
+ updateCursor();
+}
+
+void SizeHandle::updateCursor()
+{
+ if ( !active ) {
+ setCursor( arrowCursor );
+ return;
+ }
+
+ switch ( dir ) {
+ case LeftTop:
+ setCursor( sizeFDiagCursor );
+ break;
+ case Top:
+ setCursor( sizeVerCursor );
+ break;
+ case RightTop:
+ setCursor( sizeBDiagCursor );
+ break;
+ case Right:
+ setCursor( sizeHorCursor );
+ break;
+ case RightBottom:
+ setCursor( sizeFDiagCursor );
+ break;
+ case Bottom:
+ setCursor( sizeVerCursor );
+ break;
+ case LeftBottom:
+ setCursor( sizeBDiagCursor );
+ break;
+ case Left:
+ setCursor( sizeHorCursor );
+ break;
+ }
+}
+
+void SizeHandle::setActive( bool a )
+{
+ active = a;
+ setBackgroundMode( active ? PaletteText : PaletteDark );
+ updateCursor();
+}
+
+void SizeHandle::setWidget( QWidget *w )
+{
+ widget = w;
+}
+
+void SizeHandle::paintEvent( QPaintEvent * )
+{
+ if ( ( (FormWindow*)parentWidget() )->currentWidget() != widget )
+ return;
+ QPainter p( this );
+ p.setPen( blue );
+ p.drawRect( 0, 0, width(), height() );
+}
+
+void SizeHandle::mousePressEvent( QMouseEvent *e )
+{
+ if ( !widget || e->button() != LeftButton || !active )
+ return;
+ oldPressPos = e->pos();
+ geom = origGeom = QRect( widget->pos(), widget->size() );
+}
+
+void SizeHandle::mouseMoveEvent( QMouseEvent *e )
+{
+ if ( !widget || ( e->state() & LeftButton ) != LeftButton || !active )
+ return;
+ QPoint rp = mapFromGlobal( e->globalPos() );
+ QPoint d = oldPressPos - rp;
+ oldPressPos = rp;
+ QPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() );
+ QRect pr = widget->parentWidget()->rect();
+
+ // ##### move code around a bit to reduce duplicated code here
+ switch ( dir ) {
+ case LeftTop: {
+ if ( checkPos.x() > pr.width() - 2 * width() || checkPos.y() > pr.height() - 2 * height() )
+ return;
+ int w = geom.width() + d.x();
+ geom.setWidth( w );
+ w = ( w / formWindow->grid().x() ) * formWindow->grid().x();
+ int h = geom.height() + d.y();
+ geom.setHeight( h );
+ h = ( h / formWindow->grid().y() ) * formWindow->grid().y();
+ int dx = widget->width() - w;
+ int dy = widget->height() - h;
+ trySetGeometry( widget, widget->x() + dx, widget->y() + dy, w, h );
+ } break;
+ case Top: {
+ if ( checkPos.y() > pr.height() - 2 * height() )
+ return;
+ int h = geom.height() + d.y();
+ geom.setHeight( h );
+ h = ( h / formWindow->grid().y() ) * formWindow->grid().y();
+ int dy = widget->height() - h;
+ trySetGeometry( widget, widget->x(), widget->y() + dy, widget->width(), h );
+ } break;
+ case RightTop: {
+ if ( checkPos.x() < 2 * width() || checkPos.y() > pr.height() - 2 * height() )
+ return;
+ int h = geom.height() + d.y();
+ geom.setHeight( h );
+ h = ( h / formWindow->grid().y() ) * formWindow->grid().y();
+ int dy = widget->height() - h;
+ int w = geom.width() - d.x();
+ geom.setWidth( w );
+ w = ( w / formWindow->grid().x() ) * formWindow->grid().x();
+ trySetGeometry( widget, widget->x(), widget->y() + dy, w, h );
+ } break;
+ case Right: {
+ if ( checkPos.x() < 2 * width() )
+ return;
+ int w = geom.width() - d.x();
+ geom.setWidth( w );
+ w = ( w / formWindow->grid().x() ) * formWindow->grid().x();
+ tryResize( widget, w, widget->height() );
+ } break;
+ case RightBottom: {
+ if ( checkPos.x() < 2 * width() || checkPos.y() < 2 * height() )
+ return;
+ int w = geom.width() - d.x();
+ geom.setWidth( w );
+ w = ( w / formWindow->grid().x() ) * formWindow->grid().x();
+ int h = geom.height() - d.y();
+ geom.setHeight( h );
+ h = ( h / formWindow->grid().y() ) * formWindow->grid().y();
+ tryResize( widget, w, h );
+ } break;
+ case Bottom: {
+ if ( checkPos.y() < 2 * height() )
+ return;
+ int h = geom.height() - d.y();
+ geom.setHeight( h );
+ h = ( h / formWindow->grid().y() ) * formWindow->grid().y();
+ tryResize( widget, widget->width(), h );
+ } break;
+ case LeftBottom: {
+ if ( checkPos.x() > pr.width() - 2 * width() || checkPos.y() < 2 * height() )
+ return;
+ int w = geom.width() + d.x();
+ geom.setWidth( w );
+ w = ( w / formWindow->grid().x() ) * formWindow->grid().x();
+ int dx = widget->width() - w;
+ int h = geom.height() - d.y();
+ geom.setHeight( h );
+ h = ( h / formWindow->grid().y() ) * formWindow->grid().y();
+ trySetGeometry( widget, widget->x() + dx, widget->y(), w, h );
+ } break;
+ case Left: {
+ if ( checkPos.x() > pr.width() - 2 * width() )
+ return;
+ int w = geom.width() + d.x();
+ geom.setWidth( w );
+ w = ( w / formWindow->grid().x() ) * formWindow->grid().x();
+ int dx = widget->width() - w;
+ trySetGeometry( widget, widget->x() + dx, widget->y(), w, widget->height() );
+ } break;
+ }
+
+ QPoint p = pos();
+ sel->updateGeometry();
+ oldPressPos += ( p - pos() );
+
+ formWindow->sizePreview()->setText( QString( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) );
+ formWindow->sizePreview()->adjustSize();
+ QRect lg( formWindow->mapFromGlobal( e->globalPos() ) + QPoint( 16, 16 ),
+ formWindow->sizePreview()->size() );
+ formWindow->checkPreviewGeometry( lg );
+ formWindow->sizePreview()->setGeometry( lg );
+ formWindow->sizePreview()->show();
+ formWindow->sizePreview()->raise();
+ if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
+ formWindow->updateChildSelections( widget );
+}
+
+void SizeHandle::mouseReleaseEvent( QMouseEvent *e )
+{
+ if ( e->button() != LeftButton || !active )
+ return;
+
+ formWindow->sizePreview()->hide();
+ if ( geom != widget->geometry() )
+ formWindow->commandHistory()->addCommand( new ResizeCommand( i18n("Resize" ),
+ formWindow,
+ widget, origGeom,
+ widget->geometry() ) );
+ formWindow->emitUpdateProperties( widget );
+}
+
+void SizeHandle::trySetGeometry( QWidget *w, int x, int y, int width, int height )
+{
+ int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() );
+ minw = QMAX( minw, 2 * formWindow->grid().x() );
+ int minh = QMAX( w->minimumSizeHint().height(), w->minimumSize().height() );
+ minh = QMAX( minh, 2 * formWindow->grid().y() );
+ if ( QMAX( minw, width ) > w->maximumWidth() ||
+ QMAX( minh, height ) > w->maximumHeight() )
+ return;
+ if ( width < minw && x != w->x() )
+ x -= minw - width;
+ if ( height < minh && y != w->y() )
+ y -= minh - height;
+ w->setGeometry( x, y, QMAX( minw, width ), QMAX( minh, height ) );
+}
+
+void SizeHandle::tryResize( QWidget *w, int width, int height )
+{
+ int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() );
+ minw = QMAX( minw, 16 );
+ int minh = QMAX( w->minimumSizeHint().height(), w->minimumSize().height() );
+ minh = QMAX( minh, 16 );
+ w->resize( QMAX( minw, width ), QMAX( minh, height ) );
+}
+
+// ------------------------------------------------------------------------
+
+WidgetSelection::WidgetSelection( FormWindow *parent, QPtrDict<WidgetSelection> *selDict )
+ : selectionDict( selDict )
+{
+ formWindow = parent;
+ for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) {
+ handles.insert( i, new SizeHandle( formWindow, (SizeHandle::Direction)i, this ) );
+ }
+ hide();
+}
+
+void WidgetSelection::setWidget( QWidget *w, bool updateDict )
+{
+ if ( !w ) {
+ hide();
+ if ( updateDict )
+ selectionDict->remove( wid );
+ wid = 0;
+ return;
+ }
+
+ wid = w;
+ bool active = !wid->parentWidget() || WidgetFactory::layoutType( wid->parentWidget() ) == WidgetFactory::NoLayout;
+ for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) {
+ SizeHandle *h = handles[ i ];
+ if ( h ) {
+ h->setWidget( wid );
+ h->setActive( active );
+ }
+ }
+ updateGeometry();
+ show();
+ if ( updateDict )
+ selectionDict->insert( w, this );
+}
+
+bool WidgetSelection::isUsed() const
+{
+ return wid != 0;
+}
+
+void WidgetSelection::updateGeometry()
+{
+ if ( !wid )
+ return;
+
+ QPoint p = wid->parentWidget()->mapToGlobal( wid->pos() );
+ p = formWindow->mapFromGlobal( p );
+ QRect r( p, wid->size() );
+
+ int w = 6;
+ int h = 6;
+
+ for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) {
+ SizeHandle *hndl = handles[ i ];
+ if ( !hndl )
+ continue;
+ switch ( i ) {
+ case SizeHandle::LeftTop:
+ hndl->move( r.x() - w / 2, r.y() - h / 2 );
+ break;
+ case SizeHandle::Top:
+ hndl->move( r.x() + r.width() / 2 - w / 2, r.y() - h / 2 );
+ break;
+ case SizeHandle::RightTop:
+ hndl->move( r.x() + r.width() - w / 2, r.y() - h / 2 );
+ break;
+ case SizeHandle::Right:
+ hndl->move( r.x() + r.width() - w / 2, r.y() + r.height() / 2 - h / 2 );
+ break;
+ case SizeHandle::RightBottom:
+ hndl->move( r.x() + r.width() - w / 2, r.y() + r.height() - h / 2 );
+ break;
+ case SizeHandle::Bottom:
+ hndl->move( r.x() + r.width() / 2 - w / 2, r.y() + r.height() - h / 2 );
+ break;
+ case SizeHandle::LeftBottom:
+ hndl->move( r.x() - w / 2, r.y() + r.height() - h / 2 );
+ break;
+ case SizeHandle::Left:
+ hndl->move( r.x() - w / 2, r.y() + r.height() / 2 - h / 2 );
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void WidgetSelection::hide()
+{
+ for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) {
+ SizeHandle *h = handles[ i ];
+ if ( h )
+ h->hide();
+ }
+}
+
+void WidgetSelection::show()
+{
+ for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) {
+ SizeHandle *h = handles[ i ];
+ if ( h ) {
+ h->show();
+ h->raise();
+ }
+ }
+}
+
+void WidgetSelection::update()
+{
+ for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) {
+ SizeHandle *h = handles[ i ];
+ if ( h )
+ h->update();
+ }
+}
+
+QWidget *WidgetSelection::widget() const
+{
+ return wid;
+}
+#include "sizehandle.moc"
diff --git a/kommander/editor/sizehandle.h b/kommander/editor/sizehandle.h
new file mode 100644
index 00000000..ccd6a6ef
--- /dev/null
+++ b/kommander/editor/sizehandle.h
@@ -0,0 +1,91 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef SIZEHANDLE_H
+#define SIZEHANDLE_H
+
+#include <qwidget.h>
+#include <qintdict.h>
+#include <qptrdict.h>
+
+class QMouseEvent;
+class FormWindow;
+class WidgetSelection;
+class QPaintEvent;
+
+class SizeHandle : public QWidget
+{
+ Q_OBJECT
+
+public:
+ enum Direction { LeftTop, Top, RightTop, Right, RightBottom, Bottom, LeftBottom, Left };
+
+ SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s );
+ void setWidget( QWidget *w );
+ void setActive( bool a );
+ void updateCursor();
+
+ void setEnabled( bool ) {}
+
+protected:
+ void paintEvent( QPaintEvent *e );
+ void mousePressEvent( QMouseEvent *e );
+ void mouseMoveEvent( QMouseEvent *e );
+ void mouseReleaseEvent( QMouseEvent *e );
+
+private:
+ void trySetGeometry( QWidget *w, int x, int y, int width, int height );
+ void tryResize( QWidget *w, int width, int height );
+
+private:
+ QWidget *widget;
+ Direction dir;
+ QPoint oldPressPos;
+ FormWindow *formWindow;
+ WidgetSelection *sel;
+ QRect geom, origGeom;
+ bool active;
+
+};
+
+class WidgetSelection
+{
+public:
+ WidgetSelection( FormWindow *parent, QPtrDict<WidgetSelection> *selDict );
+
+ void setWidget( QWidget *w, bool updateDict = TRUE );
+ bool isUsed() const;
+
+ void updateGeometry();
+ void hide();
+ void show();
+ void update();
+
+ QWidget *widget() const;
+
+protected:
+ QIntDict<SizeHandle> handles;
+ QWidget *wid;
+ FormWindow *formWindow;
+ QPtrDict<WidgetSelection> *selectionDict;
+
+};
+
+#endif
diff --git a/kommander/editor/styledbutton.cpp b/kommander/editor/styledbutton.cpp
new file mode 100644
index 00000000..9b77b941
--- /dev/null
+++ b/kommander/editor/styledbutton.cpp
@@ -0,0 +1,290 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qvariant.h> // HP-UX compiler needs this here
+#include "styledbutton.h"
+#include "formwindow.h"
+#include "pixmapchooser.h"
+#include <kcolordialog.h>
+#include <qpalette.h>
+#include <qlabel.h>
+#include <qpainter.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qapplication.h>
+#include <qdragobject.h>
+#include <qstyle.h>
+
+StyledButton::StyledButton(QWidget* parent, const char* name)
+ : QButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false )
+{
+ setMinimumSize( minimumSizeHint() );
+ setAcceptDrops( true );
+
+ connect( this, SIGNAL(clicked()), SLOT(onEditor()));
+
+ setEditor( ColorEditor );
+}
+
+StyledButton::StyledButton( const QBrush& b, QWidget* parent, const char* name, WFlags f )
+ : QButton( parent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 )
+{
+ col = b.color();
+ pix = b.pixmap();
+ setMinimumSize( minimumSizeHint() );
+}
+
+StyledButton::~StyledButton()
+{
+}
+
+void StyledButton::setEditor( EditorType e )
+{
+ if ( edit == e )
+ return;
+
+ edit = e;
+ update();
+}
+
+StyledButton::EditorType StyledButton::editor() const
+{
+ return edit;
+}
+
+void StyledButton::setColor( const QColor& c )
+{
+ col = c;
+ update();
+}
+
+void StyledButton::setPixmap( const QPixmap & pm )
+{
+ if ( !pm.isNull() ) {
+ delete pix;
+ pix = new QPixmap( pm );
+ } else {
+ delete pix;
+ pix = 0;
+ }
+ scalePixmap();
+}
+
+QColor StyledButton::color() const
+{
+ return col;
+}
+
+QPixmap* StyledButton::pixmap() const
+{
+ return pix;
+}
+
+bool StyledButton::scale() const
+{
+ return s;
+}
+
+void StyledButton::setScale( bool on )
+{
+ if ( s == on )
+ return;
+
+ s = on;
+ scalePixmap();
+}
+
+QSize StyledButton::sizeHint() const
+{
+ return QSize( 50, 25 );
+}
+
+QSize StyledButton::minimumSizeHint() const
+{
+ return QSize( 50, 25 );
+}
+
+void StyledButton::scalePixmap()
+{
+ delete spix;
+
+ if ( pix ) {
+ spix = new QPixmap( 6*width()/8, 6*height()/8 );
+ QImage img = pix->convertToImage();
+
+ spix->convertFromImage( s? img.smoothScale( 6*width()/8, 6*height()/8 ) : img );
+ } else {
+ spix = 0;
+ }
+
+ update();
+}
+
+void StyledButton::resizeEvent( QResizeEvent* e )
+{
+ scalePixmap();
+ QButton::resizeEvent( e );
+}
+
+void StyledButton::drawButton( QPainter *paint )
+{
+ style().drawPrimitive(QStyle::PE_ButtonBevel, paint, rect(), colorGroup(),
+ isDown() ? QStyle::Style_Sunken : QStyle::Style_Raised);
+ drawButtonLabel(paint);
+
+ if (hasFocus())
+ style().drawPrimitive(QStyle::PE_FocusRect, paint,
+ style().subRect(QStyle::SR_PushButtonFocusRect, this),
+ colorGroup(), QStyle::Style_Default);
+}
+
+void StyledButton::drawButtonLabel( QPainter *paint )
+{
+ QColor pen = isEnabled() ?
+ hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText()
+ : palette().disabled().buttonText();
+ paint->setPen( pen );
+
+ if(!isEnabled()) {
+ paint->setBrush( QBrush( colorGroup().button() ) );
+ }
+ else if ( edit == PixmapEditor && spix ) {
+ paint->setBrush( QBrush( col, *spix ) );
+ paint->setBrushOrigin( width()/8, height()/8 );
+ } else
+ paint->setBrush( QBrush( col ) );
+
+ paint->drawRect( width()/8, height()/8, 6*width()/8, 6*height()/8 );
+}
+
+void StyledButton::onEditor()
+{
+ switch (edit) {
+ case ColorEditor: {
+ QColor c = palette().active().background();
+ if ( KColorDialog::getColor( c, this ) == QDialog::Accepted ) {
+ setColor( c );
+ emit changed();
+ }
+ } break;
+ case PixmapEditor: {
+ QPixmap p;
+ if ( pixmap() )
+ p = qChoosePixmap( this, formWindow, *pixmap() );
+ else
+ p = qChoosePixmap( this, formWindow, QPixmap() );
+ if ( !p.isNull() ) {
+ setPixmap( p );
+ emit changed();
+ }
+ } break;
+ default:
+ break;
+ }
+}
+
+void StyledButton::mousePressEvent(QMouseEvent* e)
+{
+ QButton::mousePressEvent(e);
+ mousePressed = true;
+ pressPos = e->pos();
+}
+
+void StyledButton::mouseMoveEvent(QMouseEvent* e)
+{
+ QButton::mouseMoveEvent( e );
+#ifndef QT_NO_DRAGANDDROP
+ if ( !mousePressed )
+ return;
+ if ( ( pressPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() ) {
+ if ( edit == ColorEditor ) {
+ QColorDrag *drg = new QColorDrag( col, this );
+ QPixmap pix( 25, 25 );
+ pix.fill( col );
+ QPainter p( &pix );
+ p.drawRect( 0, 0, pix.width(), pix.height() );
+ p.end();
+ drg->setPixmap( pix );
+ mousePressed = false;
+ drg->dragCopy();
+ }
+ else if ( edit == PixmapEditor && pix && !pix->isNull() ) {
+ QImage img = pix->convertToImage();
+ QImageDrag *drg = new QImageDrag( img, this );
+ if(spix)
+ drg->setPixmap( *spix );
+ mousePressed = false;
+ drg->dragCopy();
+ }
+ }
+#endif
+}
+
+#ifndef QT_NO_DRAGANDDROP
+void StyledButton::dragEnterEvent( QDragEnterEvent *e )
+{
+ setFocus();
+ if ( edit == ColorEditor && QColorDrag::canDecode( e ) )
+ e->accept();
+ else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) )
+ e->accept();
+ else
+ e->ignore();
+}
+
+void StyledButton::dragLeaveEvent( QDragLeaveEvent * )
+{
+ if ( hasFocus() )
+ parentWidget()->setFocus();
+}
+
+void StyledButton::dragMoveEvent( QDragMoveEvent *e )
+{
+ if ( edit == ColorEditor && QColorDrag::canDecode( e ) )
+ e->accept();
+ else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) )
+ e->accept();
+ else
+ e->ignore();
+}
+
+void StyledButton::dropEvent( QDropEvent *e )
+{
+ if ( edit == ColorEditor && QColorDrag::canDecode( e ) ) {
+ QColor color;
+ QColorDrag::decode( e, color );
+ setColor(color);
+ emit changed();
+ e->accept();
+ }
+ else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) ) {
+ QImage img;
+ QImageDrag::decode( e, img );
+ QPixmap pm;
+ pm.convertFromImage(img);
+ setPixmap(pm);
+ emit changed();
+ e->accept();
+ } else {
+ e->ignore();
+ }
+}
+#endif // QT_NO_DRAGANDDROP
+#include "styledbutton.moc"
diff --git a/kommander/editor/styledbutton.h b/kommander/editor/styledbutton.h
new file mode 100644
index 00000000..a2927084
--- /dev/null
+++ b/kommander/editor/styledbutton.h
@@ -0,0 +1,97 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef STYLEDBUTTON_H
+#define STYLEDBUTTON_H
+
+#include <qbutton.h>
+#include <qpixmap.h>
+
+class QColor;
+class QBrush;
+class FormWindow;
+
+class StyledButton : public QButton
+{
+ Q_OBJECT
+
+ Q_PROPERTY( QColor color READ color WRITE setColor )
+ Q_PROPERTY( QPixmap pixmap READ pixmap WRITE setPixmap )
+ Q_PROPERTY( EditorType editor READ editor WRITE setEditor )
+ Q_PROPERTY( bool scale READ scale WRITE setScale )
+
+ Q_ENUMS( EditorType )
+
+public:
+ enum EditorType { ColorEditor, PixmapEditor };
+
+ StyledButton( QWidget* parent = 0, const char* name = 0 );
+ StyledButton( const QBrush& b, QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+ ~StyledButton();
+
+ void setEditor( EditorType );
+ EditorType editor() const;
+
+ void setColor( const QColor& );
+ void setPixmap( const QPixmap& );
+
+ QPixmap* pixmap() const;
+ QColor color() const;
+
+ void setScale( bool );
+ bool scale() const;
+
+ QSize sizeHint() const;
+ QSize minimumSizeHint() const;
+
+ void setFormWindow( FormWindow *fw ) { formWindow = fw; }
+
+public slots:
+ virtual void onEditor();
+
+signals:
+ void changed();
+
+protected:
+ void mousePressEvent(QMouseEvent*);
+ void mouseMoveEvent(QMouseEvent*);
+#ifndef QT_NO_DRAGANDDROP
+ void dragEnterEvent ( QDragEnterEvent * );
+ void dragMoveEvent ( QDragMoveEvent * );
+ void dragLeaveEvent ( QDragLeaveEvent * );
+ void dropEvent ( QDropEvent * );
+#endif // QT_NO_DRAGANDDROP
+ void drawButton( QPainter* );
+ void drawButtonLabel( QPainter* );
+ void resizeEvent( QResizeEvent* );
+ void scalePixmap();
+
+private:
+ QPixmap* pix;
+ QPixmap* spix; // the pixmap scaled down to fit into the button
+ QColor col;
+ EditorType edit;
+ bool s;
+ FormWindow *formWindow;
+ QPoint pressPos;
+ bool mousePressed;
+};
+
+#endif //STYLEDBUTTON_H
diff --git a/kommander/editor/tableeditor.ui b/kommander/editor/tableeditor.ui
new file mode 100644
index 00000000..26345a3f
--- /dev/null
+++ b/kommander/editor/tableeditor.ui
@@ -0,0 +1,813 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>TableEditorBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>TableEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>538</width>
+ <height>369</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit Table</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</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="QTable" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </column>
+ <row>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </row>
+ <property name="name">
+ <cstring>table</cstring>
+ </property>
+ <property name="numRows">
+ <number>1</number>
+ </property>
+ <property name="numCols">
+ <number>1</number>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <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="QPushButton">
+ <property name="name">
+ <cstring>buttonHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <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="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonApply</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Apply</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Apply all changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QTabWidget" row="0" column="1">
+ <property name="name">
+ <cstring>TabWidget</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>columns_tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Co&amp;lumns</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer row="4" column="2">
+ <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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QListBox" row="0" column="0" rowspan="6" colspan="1">
+ <property name="name">
+ <cstring>listColumns</cstring>
+ </property>
+ </widget>
+ <spacer row="3" 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>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>buttonColumnUp</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move up</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item up.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column of the list.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="5" column="1">
+ <property name="name">
+ <cstring>buttonColumnDown</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move down</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item down.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column of the list.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>buttonDeleteColumn</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete Column</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>buttonNewColumn</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New Column</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout6</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">
+ <property name="name">
+ <cstring>labelTable</cstring>
+ </property>
+ <property name="text">
+ <string>Table:</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="1">
+ <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="QLabel">
+ <property name="name">
+ <cstring>labelColumnPixmap</cstring>
+ </property>
+ <property name="text">
+ <string>Label4</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonDeleteColPixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Delete the selected item's pixmap.&lt;/b&gt;&lt;p&gt;The pixmap in the current column of the selected item will be deleted.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonChooseColPixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select a Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Select a pixmap file for the item.&lt;/b&gt;&lt;p&gt;The pixmap will be changed in the current column of the selected item.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Label:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>editColumnText</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>Label2</cstring>
+ </property>
+ <property name="text">
+ <string>Pixmap:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemChoosePixmap</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>labelFields</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Field:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>comboFields</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>editColumnText</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>comboFields</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>labelTableValue</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;no table&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>rows_tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Rows</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer row="4" column="2">
+ <property name="name">
+ <cstring>Spacer3_2</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" row="4" column="1">
+ <property name="name">
+ <cstring>buttonRowUp</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move up</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item up.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column of the list.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QListBox" row="0" column="0" rowspan="6" colspan="1">
+ <property name="name">
+ <cstring>listRows</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="5" column="1">
+ <property name="name">
+ <cstring>buttonRowDown</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Move down</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Move the selected item down.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column of the list.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>Spacer2_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>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>buttonNewRow</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New Row</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>buttonDeleteRow</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete Row</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout7_2</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">
+ <property name="name">
+ <cstring>TextLabel2_3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Label:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>editRowText</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>Label2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Pixmap:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>itemChoosePixmap</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="1">
+ <property name="name">
+ <cstring>Layout2_2</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>labelRowPixmap</cstring>
+ </property>
+ <property name="text">
+ <string>Label4</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonDeleteRowPixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Delete the selected item's pixmap.&lt;/b&gt;&lt;p&gt;The pixmap in the current column of the selected item will be deleted.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonChooseRowPixmap</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select a Pixmap</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Select a pixmap file for the item.&lt;/b&gt;&lt;p&gt;The pixmap will be changed in the current column of the selected item.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>editRowText</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="1040">789c5dcf4d73a2401006e0bbbf82726ed61609ca0c4c6ded0125dfd1985baab6f600338c280a46fc08a6f6bf2f3ddd26abc0619eb7677a9aab9ef3361d3bbdab4ebd4db673e5a83cd9383dbd5bad9adf7f7e7d76ba9e70dacfe78ed7fdd1e9ba8e72265599c17adaae99773df033cb9818225f2cc38132027887f4af8d01ee817dc935720d1c7827d648c1910f969273cd8123e4a93a21d2d95ba0ef098d631864409b6f2c13c195063e210389d55720ef0b8dd56764e021c7c8905acd2c93b66aa71a224389fffb0e14fd4062f51119d290115252ab2391c6585ab653a5f6de033294f8fbf74849175544eacc80c120e478b644267451434c90a9659a78d8aa2066585d00c33425ae80d25702b92352756ea91475ce90ba8f4c80299cb5177d58ea8c5a6d819a67b4595b66865a29602632628e3406b9011a73a26b1f96a40c575f19536dc7d959c6543e5f1466f95fd646aba22cabf5fb57c636f9a24ddaa75e52c6b6f90ea3aada2f313b7ccc1b1b1da3e128a67df09aaa1addb82963dfb3b8b7cdf18e9dcfe70e8b687f91b1fba25acf2eb2a289460f17d9a28c4c7c9e1d8ae8f1e9227b1e4feafa859d9f8de378fa8afbfefeecfc030f08f1a3</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="1085">789c5dd0cd6ee2301000e03b4f11911b5ad1189290a8da0324a5e90f29941e2aadf6e0d84ea10d1020849ad5befb7a3cceaa29e2e06f663c33ce55cf7a9dcfacde55e758d16acd2cb6a207abc74f9b8dfcf5fbe79f4e97f896fabb8145ba3f3addbec5ac74b715704ed5d9769c01cb73e0423368f80224c190e53e70091c389e83d98366e83942679f0c43cc7e0087c4f3307b63c8b1d559337459c6810f48df137aab49436c750f748917320f78418e4cf65993fa04b33572c4313b067a039f333de80e39e238680ff4d5d2581c69d2c0c3ad8e0db1f30619127cd1dcd00c7a4452824c80a321359d73cd8c129c1b1b0acc726030a414b31299f9989d1952a4d0ccc23073819f861c973c2133d3b904aacf6ceeda9a8c12bc5b219929de21f9005900a99bf9f8e9a8a159728a5477f5d77847367719305373b1788b14668d4c9337d95b2437ef5d03b9c84df10a28fc866fc05c9522fbf0b369c6b8d0c7ffb1fc6db57effb0bfc68acd7657ee0fedba63599dea73d18a7dca525ec6ed3aa16293a81d2bf232beb1bfc578d58a416731ad641da95381b1e3f496ca939432c9f3bb7b8c450f8fb39994b18c93493a36fda2a7b9aa8ae3e4b278b69b192aa822499dc2d6cddc68b94ff697f46c7fdd255ad6f5e2dbdbfac7c3cbd8ecf7f7baf30f538f0154</data>
+ </image>
+ <image name="image2">
+ <data format="XPM.GZ" length="409">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022630543251d2e253d856405bffcbc54105b19c856360003103711c6b53006ab440370316528264b4c198450c5808a94d1ed00aac214832b43124b544ec414d34b4c4c441103f11341120831309758313d0cf3b0840b7258d55a73010092c14eca</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonApply</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>applyClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>okClicked()</slot>
+ </connection>
+ <connection>
+ <sender>listColumns</sender>
+ <signal>currentChanged(QListBoxItem*)</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>currentColumnChanged(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>listColumns</sender>
+ <signal>selectionChanged(QListBoxItem*)</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>currentColumnChanged(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>editColumnText</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>columnTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>buttonNewColumn</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>newColumnClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonDeleteColumn</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>deleteColumnClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonColumnUp</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>columnUpClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonColumnDown</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>columnDownClicked()</slot>
+ </connection>
+ <connection>
+ <sender>comboFields</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>currentFieldChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>listRows</sender>
+ <signal>selectionChanged(QListBoxItem*)</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>currentRowChanged(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>listRows</sender>
+ <signal>currentChanged(QListBoxItem*)</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>currentRowChanged(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>buttonNewRow</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>newRowClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonDeleteRow</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>deleteRowClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonRowUp</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>rowUpClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonRowDown</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>rowDownClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonDeleteRowPixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>deleteRowPixmapClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonChooseRowPixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>chooseRowPixmapClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonDeleteColPixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>deleteColPixmapClicked()</slot>
+ </connection>
+ <connection>
+ <sender>editRowText</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>rowTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>buttonChooseColPixmap</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorBase</receiver>
+ <slot>chooseColPixmapClicked()</slot>
+ </connection>
+ <slot access="protected" language="C++" returnType="void">init()</slot>
+ <slot access="protected" language="C++" returnType="void">destroy()</slot>
+ <slot access="protected" language="C++" returnType="void">applyClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">chooseRowPixmapClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">columnTextChanged( const QString &amp; )</slot>
+ <slot access="protected" language="C++" returnType="void">columnUpClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">currentColumnChanged( QListBoxItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">currentFieldChanged( const QString &amp; )</slot>
+ <slot access="protected" language="C++" returnType="void">currentRowChanged( QListBoxItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">deleteColPixmapClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">deleteColumnClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">deleteRowClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">deleteRowPixmapClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">newColumnClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">newRowClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">chooseColPixmapClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">okClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">rowDownClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">rowTextChanged( const QString &amp; )</slot>
+ <slot access="protected" language="C++" returnType="void">rowUpClicked()</slot>
+ <slot access="protected" language="C++" returnType="void">columnDownClicked()</slot>
+</connections>
+<tabstops>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+ <tabstop>table</tabstop>
+ <tabstop>TabWidget</tabstop>
+ <tabstop>listColumns</tabstop>
+ <tabstop>buttonNewColumn</tabstop>
+ <tabstop>buttonDeleteColumn</tabstop>
+ <tabstop>comboFields</tabstop>
+ <tabstop>editColumnText</tabstop>
+ <tabstop>buttonDeleteColPixmap</tabstop>
+ <tabstop>buttonChooseColPixmap</tabstop>
+ <tabstop>buttonColumnUp</tabstop>
+ <tabstop>buttonColumnDown</tabstop>
+ <tabstop>buttonApply</tabstop>
+ <tabstop>listRows</tabstop>
+ <tabstop>buttonNewRow</tabstop>
+ <tabstop>buttonDeleteRow</tabstop>
+ <tabstop>editRowText</tabstop>
+ <tabstop>buttonDeleteRowPixmap</tabstop>
+ <tabstop>buttonChooseRowPixmap</tabstop>
+ <tabstop>buttonRowUp</tabstop>
+ <tabstop>buttonRowDown</tabstop>
+ <tabstop>buttonHelp</tabstop>
+</tabstops>
+</UI>
diff --git a/kommander/editor/tableeditorimpl.cpp b/kommander/editor/tableeditorimpl.cpp
new file mode 100644
index 00000000..d8cfc70d
--- /dev/null
+++ b/kommander/editor/tableeditorimpl.cpp
@@ -0,0 +1,464 @@
+#include "tableeditorimpl.h"
+#ifndef QT_NO_TABLE
+#include <qtable.h>
+#endif
+#include "formwindow.h"
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qheader.h>
+#include <qlistbox.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include "pixmapchooser.h"
+#include "command.h"
+#include <qvaluelist.h>
+#include <qtabwidget.h>
+#ifndef KOMMANDER
+#include "project.h"
+#endif
+#include "metadatabase.h"
+#include "mainwindow.h"
+
+#include <klocale.h>
+
+TableEditor::TableEditor( QWidget* parent, QWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl )
+ : TableEditorBase( parent, name, modal, fl ),
+#ifndef QT_NO_TABLE
+ editTable( (QTable*)editWidget ),
+#endif
+ formWindow( fw )
+{
+ connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+#ifndef QT_NO_TABLE
+ labelColumnPixmap->setText( "" );
+ labelRowPixmap->setText( "" );
+
+ if ( !editTable->inherits( "QDataTable" ) ) {
+ labelFields->hide();
+ comboFields->hide();
+ labelTable->hide();
+ labelTableValue->hide();
+ }
+#ifndef QT_NO_SQL
+ if ( editTable->inherits( "QDataTable" ) ) {
+ // ## why does this behave weird?
+ // TabWidget->removePage( rows_tab );
+ // rows_tab->hide();
+ // ## do this in the meantime...
+ TabWidget->setTabEnabled( rows_tab, false );
+ }
+
+ if ( formWindow->project() && editTable->inherits( "QDataTable" ) ) {
+ QStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
+ if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) {
+ QStringList fields;
+ fields << i18n( "<no field>" );
+ fields += formWindow->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] );
+ comboFields->insertStringList( fields );
+ }
+ if ( !lst[ 1 ].isEmpty() )
+ labelTableValue->setText( lst[ 1 ] );
+ }
+#endif
+
+ readFromTable();
+#endif
+}
+
+TableEditor::~TableEditor()
+{
+}
+
+void TableEditor::columnDownClicked()
+{
+ if ( listColumns->currentItem() == -1 ||
+ listColumns->currentItem() == (int)listColumns->count() - 1 ||
+ listColumns->count() < 2 )
+ return;
+ saveFieldMap();
+ int index = listColumns->currentItem() + 1;
+ QListBoxItem *i = listColumns->item( listColumns->currentItem() );
+ listColumns->takeItem( i );
+ listColumns->insertItem( i, index );
+ listColumns->setCurrentItem( i );
+ readColumns();
+ restoreFieldMap();
+ currentColumnChanged( i );
+}
+
+void TableEditor::columnTextChanged( const QString &s )
+{
+ if ( listColumns->currentItem() == -1 )
+ return;
+ listColumns->blockSignals( true );
+ listColumns->changeItem( s, listColumns->currentItem() );
+ listColumns->blockSignals( false );
+#ifndef QT_NO_TABLE
+ if ( table->horizontalHeader()->iconSet( listColumns->currentItem() ) )
+ table->horizontalHeader()->setLabel( listColumns->currentItem(),
+ *table->horizontalHeader()->iconSet( listColumns->currentItem() ), s );
+ else
+ table->horizontalHeader()->setLabel( listColumns->currentItem(), s );
+#endif
+}
+
+void TableEditor::columnUpClicked()
+{
+ if ( listColumns->currentItem() <= 0 ||
+ listColumns->count() < 2 )
+ return;
+ saveFieldMap();
+ int index = listColumns->currentItem() - 1;
+ QListBoxItem *i = listColumns->item( listColumns->currentItem() );
+ listColumns->takeItem( i );
+ listColumns->insertItem( i, index );
+ listColumns->setCurrentItem( i );
+ readColumns();
+ restoreFieldMap();
+ currentColumnChanged( i );
+}
+
+void TableEditor::currentColumnChanged( QListBoxItem *i )
+{
+ if ( !i )
+ return;
+ editColumnText->blockSignals( true );
+ editColumnText->setText( i->text() );
+ if ( i->pixmap() )
+ labelColumnPixmap->setPixmap( *i->pixmap() );
+ else
+ labelColumnPixmap->setText( "" );
+ editColumnText->blockSignals( false );
+
+#ifndef QT_NO_TABLE
+ if ( editTable->inherits( "QDataTable" ) ) {
+ QString s = *fieldMap.find( listColumns->index( i ) );
+ if ( s.isEmpty() )
+ comboFields->setCurrentItem( 0 );
+ else if ( comboFields->listBox()->findItem( s ) )
+ comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->findItem( s ) ) );
+ else
+ comboFields->lineEdit()->setText( s );
+ }
+#endif
+}
+
+void TableEditor::currentFieldChanged( const QString &s )
+{
+ if ( listColumns->currentItem() == -1 )
+ return;
+ fieldMap.remove( listColumns->currentItem() );
+ fieldMap.insert( listColumns->currentItem(), s );
+ editColumnText->blockSignals( true ); //## necessary
+ QString newColText = s.mid(0,1).upper() + s.mid(1);
+ editColumnText->setText( newColText );
+ columnTextChanged( newColText );
+ editColumnText->blockSignals( false );
+}
+
+void TableEditor::currentRowChanged( QListBoxItem *i )
+{
+ if ( !i )
+ return;
+ editRowText->blockSignals( true );
+ editRowText->setText( i->text() );
+ if ( i->pixmap() )
+ labelRowPixmap->setPixmap( *i->pixmap() );
+ else
+ labelRowPixmap->setText( "" );
+ editRowText->blockSignals( false );
+}
+
+void TableEditor::deleteColumnClicked()
+{
+ if ( listColumns->currentItem() == -1 )
+ return;
+#ifndef QT_NO_TABLE
+ table->setNumCols( table->numCols() - 1 );
+ delete listColumns->item( listColumns->currentItem() );
+ readColumns();
+ if ( listColumns->firstItem() ) {
+ listColumns->setCurrentItem( listColumns->firstItem() );
+ listColumns->setSelected( listColumns->firstItem(), true );
+ }
+#endif
+}
+
+void TableEditor::deleteRowClicked()
+{
+ if ( listRows->currentItem() == -1 )
+ return;
+#ifndef QT_NO_TABLE
+ table->setNumRows( table->numRows() - 1 );
+ delete listRows->item( listRows->currentItem() );
+ readRows();
+ if ( listRows->firstItem() ) {
+ listRows->setCurrentItem( listRows->firstItem() );
+ listRows->setSelected( listRows->firstItem(), true );
+ }
+#endif
+}
+
+void TableEditor::newColumnClicked()
+{
+#ifndef QT_NO_TABLE
+ table->setNumCols( table->numCols() + 1 );
+ QMap<QString, bool> m;
+ for ( int i = 0; i < table->numCols() - 1; ++i )
+ m.insert( table->horizontalHeader()->label( i ), true );
+ int n = table->numCols() - 1;
+ QString t = QString::number( n );
+ while ( m.find( t ) != m.end() )
+ t = QString::number( ++n );
+ table->horizontalHeader()->setLabel( table->numCols() - 1, t );
+ listColumns->insertItem( t );
+ QListBoxItem *item = listColumns->item( listColumns->count() - 1 );
+ listColumns->setCurrentItem( item );
+ listColumns->setSelected( item, true );
+ if ( editTable->inherits( "QDataTable" ) ) {
+ comboFields->setFocus();
+ } else {
+ editColumnText->setFocus();
+ editColumnText->selectAll();
+ }
+#endif
+}
+
+void TableEditor::newRowClicked()
+{
+#ifndef QT_NO_TABLE
+ table->setNumRows( table->numRows() + 1 );
+ QMap<QString, bool> m;
+ for ( int i = 0; i < table->numRows() - 1; ++i )
+ m.insert( table->verticalHeader()->label( i ), true );
+ int n = table->numRows() - 1;
+ QString t = QString::number( n );
+ while ( m.find( t ) != m.end() )
+ t = QString::number( ++n );
+ table->verticalHeader()->setLabel( table->numRows() - 1, t );
+ listRows->insertItem( t );
+ QListBoxItem *item = listRows->item( listRows->count() - 1 );
+ listRows->setCurrentItem( item );
+ listRows->setSelected( item, true );
+#endif
+}
+
+void TableEditor::okClicked()
+{
+ applyClicked();
+ accept();
+}
+
+void TableEditor::rowDownClicked()
+{
+ if ( listRows->currentItem() == -1 ||
+ listRows->currentItem() == (int)listRows->count() - 1 ||
+ listRows->count() < 2 )
+ return;
+ int index = listRows->currentItem() + 1;
+ QListBoxItem *i = listRows->item( listRows->currentItem() );
+ listRows->takeItem( i );
+ listRows->insertItem( i, index );
+ listRows->setCurrentItem( i );
+ readRows();
+}
+
+void TableEditor::rowTextChanged( const QString &s )
+{
+ if ( listRows->currentItem() == -1 )
+ return;
+#ifndef QT_NO_TABLE
+ listRows->changeItem( s, listRows->currentItem() );
+ if ( table->verticalHeader()->iconSet( listRows->currentItem() ) )
+ table->verticalHeader()->setLabel( listRows->currentItem(),
+ *table->verticalHeader()->iconSet( listRows->currentItem() ), s );
+ else
+ table->verticalHeader()->setLabel( listRows->currentItem(), s );
+#endif
+}
+
+void TableEditor::rowUpClicked()
+{
+ if ( listRows->currentItem() <= 0 ||
+ listRows->count() < 2 )
+ return;
+ int index = listRows->currentItem() - 1;
+ QListBoxItem *i = listRows->item( listRows->currentItem() );
+ listRows->takeItem( i );
+ listRows->insertItem( i, index );
+ listRows->setCurrentItem( i );
+ readRows();
+}
+
+void TableEditor::applyClicked()
+{
+ QValueList<PopulateTableCommand::Row> rows;
+ QValueList<PopulateTableCommand::Column> cols;
+
+ int i = 0;
+#ifndef QT_NO_TABLE
+ for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
+ PopulateTableCommand::Column col;
+ col.text = table->horizontalHeader()->label( i );
+ if ( table->horizontalHeader()->iconSet( i ) )
+ col.pix = table->horizontalHeader()->iconSet( i )->pixmap();
+ col.field = *fieldMap.find( i );
+ cols.append( col );
+ }
+ for ( i = 0; i < table->verticalHeader()->count(); ++i ) {
+ PopulateTableCommand::Row row;
+ row.text = table->verticalHeader()->label( i );
+ if ( table->verticalHeader()->iconSet( i ) )
+ row.pix = table->verticalHeader()->iconSet( i )->pixmap();
+ rows.append( row );
+ }
+ PopulateTableCommand *cmd = new PopulateTableCommand( i18n("Edit Rows and Columns of '%1' " ).arg( editTable->name() ),
+ formWindow, editTable, rows, cols );
+ cmd->execute();
+ formWindow->commandHistory()->addCommand( cmd );
+#endif
+}
+
+void TableEditor::chooseRowPixmapClicked()
+{
+ if ( listRows->currentItem() == -1 )
+ return;
+ QPixmap pix;
+ if ( listRows->item( listRows->currentItem() )->pixmap() )
+ pix = qChoosePixmap( this, formWindow, *listRows->item( listRows->currentItem() )->pixmap() );
+ else
+ pix = qChoosePixmap( this, formWindow, QPixmap() );
+
+ if ( pix.isNull() )
+ return;
+
+#ifndef QT_NO_TABLE
+ table->verticalHeader()->setLabel( listRows->currentItem(), pix, table->verticalHeader()->label( listRows->currentItem() ) );
+ listRows->changeItem( pix, listRows->currentText(), listRows->currentItem() );
+#endif
+}
+
+void TableEditor::deleteRowPixmapClicked()
+{
+ if ( listRows->currentItem() == -1 )
+ return;
+#ifndef QT_NO_TABLE
+ table->verticalHeader()->setLabel( listRows->currentItem(), QPixmap(), table->verticalHeader()->label( listRows->currentItem() ) );
+ listRows->changeItem( listRows->currentText(), listRows->currentItem() );
+#endif
+}
+
+void TableEditor::chooseColPixmapClicked()
+{
+ if ( listColumns->currentItem() == -1 )
+ return;
+ QPixmap pix;
+ if ( listColumns->item( listColumns->currentItem() )->pixmap() )
+ pix = qChoosePixmap( this, formWindow, *listColumns->item( listColumns->currentItem() )->pixmap() );
+ else
+ pix = qChoosePixmap( this, formWindow, QPixmap() );
+
+ if ( pix.isNull() )
+ return;
+#ifndef QT_NO_TABLE
+ table->horizontalHeader()->setLabel( listColumns->currentItem(), pix, table->horizontalHeader()->label( listColumns->currentItem() ) );
+ listColumns->changeItem( pix, listColumns->currentText(), listColumns->currentItem() );
+#endif
+}
+
+void TableEditor::deleteColPixmapClicked()
+{
+ if ( listColumns->currentItem() == -1 )
+ return;
+#ifndef QT_NO_TABLE
+ table->horizontalHeader()->setLabel( listColumns->currentItem(), QPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) );
+ listColumns->changeItem( listColumns->currentText(), listColumns->currentItem() );
+#endif
+}
+
+void TableEditor::readFromTable()
+{
+#ifndef QT_NO_TABLE
+ QHeader *cols = editTable->horizontalHeader();
+ table->setNumCols( cols->count() );
+ QMap<QString, QString> columnFields = MetaDataBase::columnFields( editTable );
+ for ( int i = 0; i < cols->count(); ++i ) {
+ if ( editTable->horizontalHeader()->iconSet( i ) ) {
+ table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ),
+ editTable->horizontalHeader()->label( i ) );
+ listColumns->insertItem( editTable->horizontalHeader()->iconSet( i )->pixmap(),
+ editTable->horizontalHeader()->label( i ) );
+ } else {
+ table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) );
+ listColumns->insertItem( editTable->horizontalHeader()->label( i ) );
+ }
+ QString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) );
+ fieldMap.insert( i, cf );
+ }
+
+ if ( listColumns->firstItem() ) {
+ listColumns->setCurrentItem( listColumns->firstItem() );
+ listColumns->setSelected( listColumns->firstItem(), true );
+ }
+
+ QHeader *rows = editTable->verticalHeader();
+ table->setNumRows( rows->count() );
+ for ( int j = 0; j < rows->count(); ++j ) {
+ if ( editTable->verticalHeader()->iconSet( j ) ) {
+ table->verticalHeader()->setLabel( j, *editTable->verticalHeader()->iconSet( j ),
+ editTable->verticalHeader()->label( j ) );
+ listRows->insertItem( editTable->verticalHeader()->iconSet( j )->pixmap(),
+ editTable->verticalHeader()->label( j ) );
+ } else {
+ table->verticalHeader()->setLabel( j, editTable->verticalHeader()->label( j ) );
+ listRows->insertItem( editTable->verticalHeader()->label( j ) );
+ }
+ }
+
+ if ( listRows->firstItem() ) {
+ listRows->setCurrentItem( listRows->firstItem() );
+ listRows->setSelected( listRows->firstItem(), true );
+ }
+#endif
+}
+
+void TableEditor::readColumns()
+{
+ int j = 0;
+#ifndef QT_NO_TABLE
+ for ( QListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) {
+ if ( i->pixmap() )
+ table->horizontalHeader()->setLabel( j, *i->pixmap(), i->text() );
+ else
+ table->horizontalHeader()->setLabel( j, i->text() );
+ }
+#endif
+}
+
+void TableEditor::readRows()
+{
+ int j = 0;
+#ifndef QT_NO_TABLE
+ for ( QListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) {
+ if ( i->pixmap() )
+ table->verticalHeader()->setLabel( j, *i->pixmap(), i->text() );
+ else
+ table->verticalHeader()->setLabel( j, i->text() );
+ }
+#endif
+}
+
+void TableEditor::saveFieldMap()
+{
+ tmpFieldMap.clear();
+ for ( QMap<int, QString>::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it )
+ tmpFieldMap.insert( listColumns->item( it.key() ), *it );
+}
+
+void TableEditor::restoreFieldMap()
+{
+ fieldMap.clear();
+ for ( QMap<QListBoxItem*, QString>::Iterator it = tmpFieldMap.begin(); it != tmpFieldMap.end(); ++it )
+ fieldMap.insert( listColumns->index( it.key() ), *it );
+}
+#include "tableeditorimpl.moc"
diff --git a/kommander/editor/tableeditorimpl.h b/kommander/editor/tableeditorimpl.h
new file mode 100644
index 00000000..8018bf92
--- /dev/null
+++ b/kommander/editor/tableeditorimpl.h
@@ -0,0 +1,56 @@
+#ifndef TABLEEDITOR_H
+#define TABLEEDITOR_H
+
+#include "tableeditor.h"
+#include <qmap.h>
+
+class QListBoxItem;
+class QTable;
+class FormWindow;
+
+class TableEditor : public TableEditorBase
+{
+ Q_OBJECT
+
+public:
+ TableEditor( QWidget* parent = 0, QWidget *editWidget = 0, FormWindow *fw = 0,
+ const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ~TableEditor();
+
+protected slots:
+ void columnDownClicked();
+ void columnTextChanged( const QString & );
+ void columnUpClicked();
+ void currentColumnChanged( QListBoxItem * );
+ void currentFieldChanged( const QString & );
+ void currentRowChanged( QListBoxItem * );
+ void deleteColumnClicked();
+ void deleteRowClicked();
+ void newColumnClicked();
+ void newRowClicked();
+ void okClicked();
+ void rowDownClicked();
+ void rowTextChanged( const QString & );
+ void rowUpClicked();
+ void applyClicked();
+ void chooseRowPixmapClicked();
+ void deleteRowPixmapClicked();
+ void chooseColPixmapClicked();
+ void deleteColPixmapClicked();
+
+private:
+ void readFromTable();
+ void readColumns();
+ void readRows();
+ void saveFieldMap();
+ void restoreFieldMap();
+
+private:
+ QTable *editTable;
+ FormWindow *formWindow;
+ QMap<int, QString> fieldMap;
+ QMap<QListBoxItem*, QString> tmpFieldMap;
+
+};
+
+#endif // TABLEEDITOR_H
diff --git a/kommander/editor/templates/Configuration_Dialog.ui b/kommander/editor/templates/Configuration_Dialog.ui
new file mode 100644
index 00000000..199f5b90
--- /dev/null
+++ b/kommander/editor/templates/Configuration_Dialog.ui
@@ -0,0 +1,156 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>MyDialog2</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>MyDialog2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>597</width>
+ <height>364</height>
+ </rect>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</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="QListBox" row="0" column="0">
+ <item>
+ <property name="text">
+ <string>New Item</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>listBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QTabWidget" row="0" column="1">
+ <property name="name">
+ <cstring>tabWidget</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Widget2</cstring>
+ </property>
+ <attribute name="title">
+ <string>Tab</string>
+ </attribute>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Widget3</cstring>
+ </property>
+ <attribute name="title">
+ <string>Tab</string>
+ </attribute>
+ </widget>
+ </widget>
+ <widget class="QLayoutWidget" row="1" 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>
+ <widget class="QPushButton">
+ <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>
+ <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="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="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog2</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog2</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui b/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui
new file mode 100644
index 00000000..77d77cb3
--- /dev/null
+++ b/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui
@@ -0,0 +1,114 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>MyDialog</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>MyDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>511</width>
+ <height>282</height>
+ </rect>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>240</y>
+ <width>476</width>
+ <height>33</height>
+ </rect>
+ </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>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>
+ <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="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="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/editor/templates/Dialog_with_Buttons_(Right).ui b/kommander/editor/templates/Dialog_with_Buttons_(Right).ui
new file mode 100644
index 00000000..fd2c01f0
--- /dev/null
+++ b/kommander/editor/templates/Dialog_with_Buttons_(Right).ui
@@ -0,0 +1,114 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>MyDialog</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>MyDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>592</width>
+ <height>470</height>
+ </rect>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout5</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>500</x>
+ <y>30</y>
+ <width>82</width>
+ <height>410</height>
+ </rect>
+ </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="QPushButton">
+ <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">
+ <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">
+ <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>
+ <spacer>
+ <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>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/editor/templates/Makefile.am b/kommander/editor/templates/Makefile.am
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kommander/editor/templates/Makefile.am
diff --git a/kommander/editor/templates/Tab_Dialog.ui b/kommander/editor/templates/Tab_Dialog.ui
new file mode 100644
index 00000000..a2ad9315
--- /dev/null
+++ b/kommander/editor/templates/Tab_Dialog.ui
@@ -0,0 +1,138 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>MyDialog1</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>MyDialog1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>528</width>
+ <height>368</height>
+ </rect>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>tabWidget</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Widget8</cstring>
+ </property>
+ <attribute name="title">
+ <string>Tab</string>
+ </attribute>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Widget9</cstring>
+ </property>
+ <attribute name="title">
+ <string>Tab</string>
+ </attribute>
+ </widget>
+ </widget>
+ <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>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>
+ <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="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="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog1</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog1</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/editor/templates/cpp_template b/kommander/editor/templates/cpp_template
new file mode 100644
index 00000000..6afef5d4
--- /dev/null
+++ b/kommander/editor/templates/cpp_template
@@ -0,0 +1,16 @@
+/***************************************************************************
+ |FILENAME| - description
+ -------------------
+ begin : |DATE|
+ copyright : (C) |YEAR| by |AUTHOR|
+ email : |EMAIL|
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
diff --git a/kommander/editor/templates/header_template b/kommander/editor/templates/header_template
new file mode 100644
index 00000000..6afef5d4
--- /dev/null
+++ b/kommander/editor/templates/header_template
@@ -0,0 +1,16 @@
+/***************************************************************************
+ |FILENAME| - description
+ -------------------
+ begin : |DATE|
+ copyright : (C) |YEAR| by |AUTHOR|
+ email : |EMAIL|
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
diff --git a/kommander/editor/timestamp.cpp b/kommander/editor/timestamp.cpp
new file mode 100644
index 00000000..b0d42e03
--- /dev/null
+++ b/kommander/editor/timestamp.cpp
@@ -0,0 +1,81 @@
+ /**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "timestamp.h"
+#include <qfile.h>
+#include <qfileinfo.h>
+
+class QTimer;
+
+TimeStamp::TimeStamp( QObject *parent, const QString &f )
+ : QObject( parent ), filename( f ), autoCheck( false )
+{
+ timer = new QTimer( this );
+ connect( timer, SIGNAL( timeout() ), this, SLOT( autoCheckTimeStamp() ) );
+ update();
+}
+
+void TimeStamp::setFileName( const QString &f )
+{
+ filename = f;
+ update();
+}
+
+QString TimeStamp::fileName() const
+{
+ return filename;
+}
+
+void TimeStamp::setAutoCheckEnabled( bool a )
+{
+ autoCheck = a;
+ if ( autoCheck )
+ timer->start( 5000 );
+ else
+ timer->stop();
+}
+
+void TimeStamp::update()
+{
+ QFile f( filename );
+ if ( !f.exists() )
+ return;
+ lastTimeStamp = QFileInfo( f ).lastModified();
+}
+
+bool TimeStamp::isUpToDate() const
+{
+ QFile f( filename );
+ if ( !f.exists() )
+ return true;
+ return lastTimeStamp == QFileInfo( f ).lastModified();
+}
+
+bool TimeStamp::isAutoCheckEnabled() const
+{
+ return autoCheck;
+}
+
+void TimeStamp::autoCheckTimeStamp()
+{
+ if ( !isUpToDate() )
+ emit timeStampChanged();
+}
+#include "timestamp.moc"
diff --git a/kommander/editor/timestamp.h b/kommander/editor/timestamp.h
new file mode 100644
index 00000000..06d50507
--- /dev/null
+++ b/kommander/editor/timestamp.h
@@ -0,0 +1,57 @@
+ /**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TIMESTAMP_H
+#define TIMESTAMP_H
+
+#include <qobject.h>
+#include <qdatetime.h>
+#include <qtimer.h>
+
+class TimeStamp : public QObject
+{
+ Q_OBJECT
+
+public:
+ TimeStamp( QObject *parent, const QString &f );
+
+ void setFileName( const QString &f );
+ QString fileName() const;
+ void setAutoCheckEnabled( bool a );
+ void update();
+
+ bool isUpToDate() const;
+ bool isAutoCheckEnabled() const;
+
+signals:
+ void timeStampChanged();
+
+private slots:
+ void autoCheckTimeStamp();
+
+private:
+ QDateTime lastTimeStamp;
+ QString filename;
+ bool autoCheck;
+ QTimer *timer;
+
+};
+
+#endif
diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp
new file mode 100644
index 00000000..4de615d0
--- /dev/null
+++ b/kommander/editor/widgetdatabase.cpp
@@ -0,0 +1,1029 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#if !defined(UIC)
+#include "pixmapchooser.h"
+#endif
+#ifndef KOMMANDER
+#include "widgetinterface.h"
+#endif
+#include "widgetdatabase.h"
+
+#include <qapplication.h>
+//#define NO_STATIC_COLORS
+#include "globaldefs.h"
+#include <qstrlist.h>
+#include <qdict.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qcleanuphandler.h>
+
+#include <qfeatures.h>
+
+#include <stdlib.h>
+
+#include <kommanderfactory.h>
+#include <klocale.h>
+
+const int dbsize = 300;
+const int dbcustom = 200;
+const int dbdictsize = 211;
+static WidgetDatabaseRecord* widget_db[ dbsize ];
+static QDict<int> *className2Id = 0;
+static int dbcount = 0;
+static int dbcustomcount = 200;
+static QStrList *wGroups;
+static QStrList *invisibleGroups;
+static bool whatsThisLoaded = false;
+#ifndef KOMMANDER
+static QPluginManager<WidgetInterface> *widgetPluginManager = 0;
+#endif
+static bool plugins_set_up = false;
+static bool was_in_setup = false;
+
+#ifndef KOMMANDER
+QCleanupHandler<QPluginManager<WidgetInterface> > cleanup_manager;
+#endif
+
+WidgetDatabaseRecord::WidgetDatabaseRecord()
+{
+ isForm = false;
+ isContainer = false;
+ iconSet = 0;
+ nameCounter = 0;
+}
+
+WidgetDatabaseRecord::~WidgetDatabaseRecord()
+{
+ delete iconSet;
+}
+
+
+/*!
+ \class WidgetDatabase widgetdatabase.h
+ \brief The WidgetDatabase class holds information about widgets
+
+ The WidgetDatabase holds information about widgets like toolTip(),
+ iconName(), ... It works Id-based, so all access functions take the
+ widget id as parameter. To get the id for a widget (classname), use
+ idFromClassName().
+
+ All access functions are static. Having multiple widgetdatabases in
+ one application doesn't make sense anyway and so you don't need more
+ than an instance of the widgetdatabase.
+
+ For creating widgets, layouts, etc. see WidgetFactory.
+*/
+
+/*!
+ Creates widget database. Does nothing.
+*/
+
+WidgetDatabase::WidgetDatabase()
+{
+}
+
+/*! Sets up the widget database. If the static widgetdatabase already
+ exists, the functions returns immediately.
+*/
+
+void WidgetDatabase::setupDataBase( int id )
+{
+ was_in_setup = true;
+#ifndef UIC
+ Q_UNUSED(id) if (dbcount)
+ return;
+#else
+ if (dbcount && id != -2)
+ return;
+ if (dbcount && !plugins_set_up)
+ {
+ setupPlugins();
+ return;
+ }
+ if (dbcount && plugins_set_up)
+ return;
+#endif
+
+ wGroups = new QStrList;
+ invisibleGroups = new QStrList;
+ invisibleGroups->append("Forms");
+ invisibleGroups->append("Temp");
+ className2Id = new QDict < int >(dbdictsize);
+ className2Id->setAutoDelete(true);
+
+ WidgetDatabaseRecord *r = 0;
+
+ /* Designer widgets */
+ r = new WidgetDatabaseRecord;
+ r->iconName = "pushbutton.xpm";
+ r->name = "QPushButton";
+ r->group = widgetGroup("Buttons");
+ r->toolTip = i18n("Push Button");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "toolbutton.xpm";
+ r->name = "QToolButton";
+ r->group = widgetGroup("Buttons");
+ r->toolTip = i18n("Tool Button");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "radiobutton.xpm";
+ r->name = "QRadioButton";
+ r->group = widgetGroup("Buttons");
+ r->toolTip = i18n("Radio Button");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "checkbox.xpm";
+ r->name = "QCheckBox";
+ r->group = widgetGroup("Buttons");
+ r->toolTip = i18n("Check Box");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "groupbox.xpm";
+ r->name = "QGroupBox";
+ r->group = widgetGroup("Containers");
+ r->toolTip = i18n("Group Box");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "buttongroup.xpm";
+ r->name = "QButtonGroup";
+ r->group = widgetGroup("Containers");
+ r->toolTip = i18n("Button Group");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "frame.xpm";
+ r->name = "QFrame";
+ r->group = widgetGroup("Containers");
+ r->toolTip = i18n("Frame");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "tabwidget.xpm";
+ r->name = "QTabWidget";
+ r->group = widgetGroup("Containers");
+ r->toolTip = i18n("Tabwidget");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "listbox.xpm";
+ r->name = "QListBox";
+ r->group = widgetGroup("Views");
+ r->toolTip = i18n("List Box");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "listview.xpm";
+ r->name = "QListView";
+ r->group = widgetGroup("Views");
+ r->toolTip = i18n("List View");
+ append(r);
+
+#if !defined(QT_NO_ICONVIEW) || defined(UIC)
+ r = new WidgetDatabaseRecord;
+ r->iconName = "iconview.xpm";
+ r->name = "QIconView";
+ r->group = widgetGroup("Views");
+ r->toolTip = i18n("Icon View");
+ append(r);
+#endif
+
+#if !defined(QT_NO_TABLE)
+ r = new WidgetDatabaseRecord;
+ r->iconName = "table.xpm";
+ r->name = "QTable";
+ r->group = widgetGroup("Views");
+ r->toolTip = i18n("Table");
+ append(r);
+#endif
+
+#if !defined(QT_NO_SQL)
+ r = new WidgetDatabaseRecord;
+ r->iconName = "datatable.xpm";
+ r->includeFile = "qdatatable.h";
+ r->name = "QDataTable";
+ r->group = widgetGroup("Database");
+ r->toolTip = i18n("Data Table");
+ append(r);
+#endif
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "lineedit.xpm";
+ r->name = "QLineEdit";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Line Edit");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "spinbox.xpm";
+ r->name = "QSpinBox";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Spin Box");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "dateedit.xpm";
+ r->name = "QDateEdit";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Date Edit");
+ r->includeFile = "qdatetimeedit.h";
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "timeedit.xpm";
+ r->name = "QTimeEdit";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Time Edit");
+ r->includeFile = "qdatetimeedit.h";
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "datetimeedit.xpm";
+ r->name = "QDateTimeEdit";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Date-Time Edit");
+ r->includeFile = "qdatetimeedit.h";
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "multilineedit.xpm";
+ r->name = "QMultiLineEdit";
+ r->group = widgetGroup("Temp");
+ r->toolTip = i18n("Multi Line Edit");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "richtextedit.xpm";
+ r->name = "QTextEdit";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Rich Text Edit");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "combobox.xpm";
+ r->name = "QComboBox";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Combo Box");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "slider.xpm";
+ r->name = "QSlider";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Slider");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "scrollbar.xpm";
+ r->name = "QScrollBar";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Scrollbar");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "dial.xpm";
+ r->name = "QDial";
+ r->group = widgetGroup("Input");
+ r->toolTip = i18n("Dial");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "label.xpm";
+ r->name = "QLabel";
+ r->group = widgetGroup("Temp");
+ r->toolTip = i18n("Label");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "lcdnumber.xpm";
+ r->name = "QLCDNumber";
+ r->group = widgetGroup("Display");
+ r->toolTip = i18n("LCD Number");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "progress.xpm";
+ r->name = "QProgressBar";
+ r->group = widgetGroup("Display");
+ r->toolTip = i18n("Progress Bar");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "textview.xpm";
+ r->name = "QTextView";
+ r->group = widgetGroup("Temp");
+ r->toolTip = i18n("Text View");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "textbrowser.xpm";
+ r->name = "QTextBrowser";
+ r->group = widgetGroup("Display");
+ r->toolTip = i18n("Text Browser");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "spacer.xpm";
+ r->name = "Spacer";
+ r->group = widgetGroup("Temp");
+ r->toolTip = i18n("Spacer");
+ r->whatsThis =
+ i18n("The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts.");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "QWidget";
+ r->isForm = true;
+ r->group = widgetGroup("Forms");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "QDialog";
+ r->group = widgetGroup("Forms");
+ r->isForm = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "QWizard";
+ r->group = widgetGroup("Forms");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "QDesignerWizard";
+ r->group = widgetGroup("Forms");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "QLayoutWidget";
+ r->group = widgetGroup("Temp");
+ r->includeFile = "";
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "QSplitter";
+ r->group = widgetGroup("Temp");
+ r->includeFile = "qsplitter.h";
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "tabwidget.xpm";
+ r->name = "QDesignerTabWidget";
+ r->group = widgetGroup("Temp");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "tabwidget.xpm";
+ r->name = "QDesignerWidget";
+ r->group = widgetGroup("Temp");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "tabwidget.xpm";
+ r->name = "QDesignerDialog";
+ r->group = widgetGroup("Temp");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "";
+ r->name = "QMainWindow";
+ r->includeFile = "qmainwindow.h";
+ r->group = widgetGroup("Temp");
+ r->isContainer = true;
+ append(r);
+
+#ifndef QT_NO_SQL
+ r = new WidgetDatabaseRecord;
+ r->name = "QDataBrowser";
+ r->includeFile = "qdatabrowser.h";
+ r->group = widgetGroup("Database");
+ r->toolTip = "Data Browser";
+ r->iconName = "databrowser.xpm";
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "QDataView";
+ r->includeFile = "qdataview.h";
+ r->group = widgetGroup("Database");
+ r->toolTip = "Data View";
+ r->iconName = "dataview.xpm";
+ r->isContainer = true;
+ append(r);
+#endif
+
+ r = new WidgetDatabaseRecord;
+ r->name = "Dialog";
+ r->group = widgetGroup("Forms");
+ r->isContainer = true;
+ r->isForm = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "Wizard";
+ r->group = widgetGroup("Forms");
+ r->isContainer = true;
+ r->isForm = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "EditorDialog";
+ r->group = widgetGroup("Temp");
+ r->isContainer = true;
+ r->isForm = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "EditorWizard";
+ r->group = widgetGroup("Temp");
+ r->isContainer = true;
+ r->isForm = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "EditorTabWidget";
+ r->group = widgetGroup("Temp");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "EditorToolBox";
+ r->group = widgetGroup("Temp");
+ r->isContainer = true;
+ append(r);
+
+
+ /* Kommandr widgets */
+ r = new WidgetDatabaseRecord;
+ r->iconName = "label.xpm";
+ r->name = "Label";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("Text Label");
+ r->whatsThis = i18n("The Text Label provides a widget to display static text.");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "pixlabel.xpm";
+ r->name = "PixmapLabel";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("Pixmap Label");
+ r->whatsThis = i18n("The Pixmap Label provides a widget to display pixmaps.");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "lineedit.xpm";
+ r->name = "LineEdit";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A line edit");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "TextEdit";
+ r->iconName = "textedit.png";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A rich text edit");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "TextBrowser";
+ r->iconName = "textbrowser.png";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("Text Browser");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "listbox.xpm";
+ r->name = "ListBox";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("List Box");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "combobox.xpm";
+ r->name = "ComboBox";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A combo box");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "TreeWidget";
+ r->iconName = "listview.png";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A tree widget");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "Table";
+ r->iconName = "table.xmp";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A table widget");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "pushbutton.xpm";
+ r->name = "ExecButton";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A button that when clicked, execute a command");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "closebutton.png";
+ r->name = "CloseButton";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A button that closes the dialog it is in");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "Konsole";
+ r->iconName = "konsole.png";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A listbox showing output of a script");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "FileSelector";
+ r->iconName = "lineedit.xpm";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A widget made up of a line edit and push button, for selecting files and folders");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "checkbox.xpm";
+ r->name = "CheckBox";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A check box");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "radiobutton.xpm";
+ r->name = "RadioButton";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A radio button");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "buttongroup.xpm";
+ r->name = "ButtonGroup";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A widget for grouping buttons together");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "groupbox.xpm";
+ r->name = "GroupBox";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A widget for grouping other widgets together");
+ r->isContainer = true;
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "tabwidget.xpm";
+ r->name = "TabWidget";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A widget with tabs");
+ r->isContainer = true;
+ append(r);
+
+
+// r = new WidgetDatabaseRecord;
+// r->iconName = "";
+// r->name = "ToolBox";
+// r->group = widgetGroup("Kommander");
+// r->toolTip = "";
+// r->isContainer = true;
+// append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "spinbox.xpm";
+ r->name = "SpinBoxInt";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A spin box");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "Slider";
+ r->iconName = "slider.png";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("Slider");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "RichTextEditor";
+ r->iconName = "richtextedit.xpm";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A small rich text editor");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "StatusBar";
+ r->iconName = "statusbar.png";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A status bar");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "ProgressBar";
+ r->iconName = "progress.png";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A progress bar");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "ScriptObject";
+ r->iconName = "shellscript.png";
+ r->group = widgetGroup( "Kommander" );
+ r->toolTip = i18n("A hidden script container");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->name = "Timer";
+ r->iconName = "timer.png";
+ r->group = widgetGroup( "Kommander" );
+ r->toolTip = i18n("A timer for running scripts periodically");
+ append(r);
+
+ r = new WidgetDatabaseRecord;
+ r->iconName = "datepicker.xpm";
+ r->name = "DatePicker";
+ r->group = widgetGroup("Kommander");
+ r->toolTip = i18n("A date selection widget");
+ append(r);
+
+#ifndef UIC
+ setupPlugins();
+#endif
+}
+
+void WidgetDatabase::setupPlugins()
+{
+ if (plugins_set_up)
+ return;
+ //qDebug("WidgetDatabase::setupPlugins");
+ plugins_set_up = true;
+ FeatureList widgets = KommanderFactory::featureList();
+ //qDebug("num features = %d", widgets.count());
+ for (FeatureList::Iterator it = widgets.begin(); it != widgets.end(); ++it)
+ {
+ if (hasWidget(it.key()))
+ continue;
+ WidgetDatabaseRecord *r = new WidgetDatabaseRecord;
+
+ QString grp = (*it).group;
+ if (grp.isEmpty())
+ grp = "Kommander";
+ r->group = widgetGroup(grp);
+ r->toolTip = (*it).toolTip;
+ r->iconSet = (*it).iconSet;
+ r->whatsThis = (*it).whatsThis;
+ r->isContainer = (*it).isContainer;
+ r->name = it.key();
+ append(r);
+ }
+}
+
+/*!
+ Returns the number of elements in the widget database.
+*/
+
+int WidgetDatabase::count()
+{
+ setupDataBase( -1 );
+ return dbcount;
+}
+
+/*!
+ Returns the id at which the ids of custom widgets start.
+*/
+
+int WidgetDatabase::startCustom()
+{
+ setupDataBase( -1 );
+ return dbcustom;
+}
+
+/*!
+ Returns the iconset which represents the class registered as \a id.
+*/
+
+QIconSet WidgetDatabase::iconSet( int id )
+{
+ setupDataBase( id );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return QIconSet();
+#if !defined(UIC) && !defined(RESOURCE)
+ if ( !r->iconSet )
+ r->iconSet = new QIconSet( PixmapChooser::loadPixmap( r->iconName, PixmapChooser::Small ),
+ PixmapChooser::loadPixmap( r->iconName, PixmapChooser::Large ) );
+ return *r->iconSet;
+#else
+ return QIconSet();
+#endif
+}
+
+/*!
+ Returns the classname of the widget which is registered as \a id.
+*/
+
+QString WidgetDatabase::className( int id )
+{
+ setupDataBase( id );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return QString::null;
+ return r->name;
+}
+
+/*!
+ Returns the group the widget registered as \a id belongs to.
+*/
+
+QString WidgetDatabase::group( int id )
+{
+ setupDataBase( id );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return QString::null;
+ return r->group;
+}
+
+/*!
+ Returns the tooltip text of the widget which is registered as \a id.
+*/
+
+QString WidgetDatabase::toolTip( int id )
+{
+ setupDataBase( id );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return QString::null;
+ return r->toolTip;
+}
+
+/*!
+ Returns the what's this? text of the widget which is registered as \a id.
+*/
+
+QString WidgetDatabase::whatsThis( int id )
+{
+ setupDataBase( id );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return QString::null;
+ return r->whatsThis;
+}
+
+/*!
+ Returns the include file if the widget which is registered as \a id.
+*/
+
+QString WidgetDatabase::includeFile( int id )
+{
+ setupDataBase( id );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return QString::null;
+ if ( r->includeFile.isNull() )
+ return r->name.lower() + ".h";
+ return r->includeFile;
+}
+
+/*! Returns whether the widget registered as \a id is a form.
+*/
+bool WidgetDatabase::isForm( int id )
+{
+ setupDataBase( id );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return false;
+ return r->isForm;
+}
+
+/*! Returns whether the widget registered as \a id can have children.
+*/
+
+bool WidgetDatabase::isContainer( int id )
+{
+ setupDataBase( id );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return false;
+ return r->isContainer || r->isForm;
+}
+
+QString WidgetDatabase::createWidgetName( int id )
+{
+ setupDataBase( id );
+ QString n = className( id );
+ if ( n == "QLayoutWidget" )
+ n = "Layout";
+ if ( n[ 0 ] == 'Q' )
+ n = n.mid( 1 );
+ WidgetDatabaseRecord *r = at( id );
+ if ( !r )
+ return n;
+ n += QString::number( ++r->nameCounter );
+ return n;
+}
+
+/*! Returns the id for \a name or -1 if \a name is unknown.
+ */
+int WidgetDatabase::idFromClassName( const QString &name )
+{
+ setupDataBase( -1 );
+ if ( name.isEmpty() )
+ return 0;
+ int *i = className2Id->find( name );
+ if ( i )
+ return *i;
+ if ( name == "FormWindow" )
+ return idFromClassName( "QLayoutWidget" );
+#ifdef UIC
+ setupDataBase( -2 );
+ i = className2Id->find( name );
+ if ( i )
+ return *i;
+#endif
+ return -1;
+}
+
+bool WidgetDatabase::hasWidget( const QString &name )
+{
+ return className2Id->find( name ) != 0;
+}
+
+WidgetDatabaseRecord *WidgetDatabase::at( int index )
+{
+ if ( index < 0 )
+ return 0;
+ if ( index >= dbcustom && index < dbcustomcount )
+ return widget_db[ index ];
+ if ( index < dbcount )
+ return widget_db[ index ];
+ return 0;
+}
+
+void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r )
+{
+ if ( index < 0 || index >= dbsize )
+ return;
+ widget_db[ index ] = r;
+ className2Id->insert( r->name, new int( index ) );
+ if ( index < dbcustom )
+ dbcount = QMAX( dbcount, index );
+}
+
+void WidgetDatabase::append( WidgetDatabaseRecord *r )
+{
+ if ( !was_in_setup )
+ setupDataBase( -1 );
+ insert( dbcount++, r );
+}
+
+QString WidgetDatabase::widgetGroup( const QString &g )
+{
+ if ( wGroups->find( g ) == -1 )
+ wGroups->append( g );
+ return g;
+}
+
+bool WidgetDatabase::isGroupEmpty( const QString &grp )
+{
+ WidgetDatabaseRecord *r = 0;
+ for ( int i = 0; i < dbcount; ++i ) {
+ if ( !( r = widget_db[ i ] ) )
+ continue;
+ if ( r->group == grp )
+ {
+ // FIXME
+ if(r->group == "Kommander")
+ return false;
+
+ if(r->name[0] != 'Q')
+ return false;
+ }
+ }
+ return true;
+}
+
+QString WidgetDatabase::widgetGroup( int i )
+{
+ setupDataBase( -1 );
+ if ( i >= 0 && i < (int)wGroups->count() )
+ return wGroups->at( i );
+ return QString::null;
+}
+
+int WidgetDatabase::numWidgetGroups()
+{
+ setupDataBase( -1 );
+ return wGroups->count();
+}
+
+bool WidgetDatabase::isGroupVisible( const QString &g )
+{
+ setupDataBase( -1 );
+ return invisibleGroups->find( g ) == -1;
+}
+
+int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r )
+{
+ insert( dbcustomcount++, r );
+ return dbcustomcount - 1;
+}
+
+bool WidgetDatabase::isCustomWidget( int id )
+{
+ if ( id >= dbcustom && id < dbcustomcount )
+ return true;
+ return false;
+}
+
+bool WidgetDatabase::isWhatsThisLoaded()
+{
+ return whatsThisLoaded;
+}
+
+void WidgetDatabase::loadWhatsThis( const QString &docPath )
+{
+ QString whatsthisFile = docPath + "/whatsthis";
+ QFile f( whatsthisFile );
+ if ( !f.open( IO_ReadOnly ) )
+ return;
+ QTextStream ts( &f );
+ while ( !ts.atEnd() ) {
+ QString s = ts.readLine();
+ QStringList l = QStringList::split( " | ", s );
+ int id = idFromClassName( l[ 1 ] );
+ WidgetDatabaseRecord *r = at( id );
+ if ( r )
+ r->whatsThis = l[ 0 ];
+ }
+ whatsThisLoaded = true;
+}
+
+
+// ### Qt 3.1: make these publically accessible via QWidgetDatabase API
+#ifndef KOMMANDER
+#if defined(UIC)
+bool dbnounload = false;
+QStringList *dbpaths = 0;
+#endif
+
+QPluginManager<WidgetInterface> *widgetManager()
+{
+ if ( !widgetPluginManager ) {
+#ifndef KOMMANDER
+ widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), "/designer" );
+#else
+ widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), "" );
+#endif
+
+ cleanup_manager.add( &widgetPluginManager );
+#if defined(UIC)
+ if ( dbnounload )
+ widgetPluginManager->setAutoUnload( false );
+ if ( dbpaths ) {
+ QStringList::ConstIterator it = dbpaths->begin();
+ for ( ; it != dbpaths->end(); ++it )
+ widgetPluginManager->addLibraryPath( *it );
+ }
+#endif
+ }
+ return widgetPluginManager;
+}
+#endif
diff --git a/kommander/editor/widgetdatabase.h b/kommander/editor/widgetdatabase.h
new file mode 100644
index 00000000..ad1f123c
--- /dev/null
+++ b/kommander/editor/widgetdatabase.h
@@ -0,0 +1,87 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef WIDGETDATABASE_H
+#define WIDGETDATABASE_H
+
+#include <qiconset.h>
+#include <qstring.h>
+#ifndef KOMMANDER
+#include "widgetinterface.h" // up here for GCC 2.7.* compatibility
+#include <private/qpluginmanager_p.h>
+
+
+extern QPluginManager<WidgetInterface> *widgetManager();
+#endif
+
+struct WidgetDatabaseRecord
+{
+ WidgetDatabaseRecord();
+ ~WidgetDatabaseRecord();
+ QString iconName, name, group, toolTip, whatsThis, includeFile;
+ uint isContainer : 1;
+ uint isForm : 1;
+ QIconSet *iconSet;
+ int nameCounter;
+};
+
+class WidgetDatabase : public Qt
+{
+public:
+ WidgetDatabase();
+ static void setupDataBase( int id );
+ static void setupPlugins();
+
+ static int count();
+ static int startCustom();
+
+ static QIconSet iconSet( int id );
+ static QString className( int id );
+ static QString group( int id );
+ static QString toolTip( int id );
+ static QString whatsThis( int id );
+ static QString includeFile( int id );
+ static bool isForm( int id );
+ static bool isContainer( int id );
+
+ static int idFromClassName( const QString &name );
+ static QString createWidgetName( int id );
+
+ static WidgetDatabaseRecord *at( int index );
+ static void insert( int index, WidgetDatabaseRecord *r );
+ static void append( WidgetDatabaseRecord *r );
+
+ static QString widgetGroup( const QString &g );
+ static QString widgetGroup( int i );
+ static int numWidgetGroups();
+ static bool isGroupVisible( const QString &g );
+ static bool isGroupEmpty( const QString &grp );
+
+ static int addCustomWidget( WidgetDatabaseRecord *r );
+ static bool isCustomWidget( int id );
+
+ static bool isWhatsThisLoaded();
+ static void loadWhatsThis( const QString &docPath );
+
+ static bool hasWidget( const QString &name );
+
+};
+
+#endif
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
new file mode 100644
index 00000000..0dbab517
--- /dev/null
+++ b/kommander/editor/widgetfactory.cpp
@@ -0,0 +1,1928 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <klocale.h>
+#include <kommanderfactory.h>
+
+#include "kmdrmainwindow.h"
+#include <qvariant.h> // HP-UX compiler need this here
+#include "widgetfactory.h"
+#include "widgetdatabase.h"
+#include "metadatabase.h"
+#include "mainwindow.h"
+#include "formwindow.h"
+#include "pixmapchooser.h"
+#include "layout.h"
+#include "listboxeditorimpl.h"
+#include "listvieweditorimpl.h"
+#include "iconvieweditorimpl.h"
+#include "multilineeditorimpl.h"
+#ifndef KOMMANDER
+#include "widgetinterface.h"
+#endif
+#ifndef QT_NO_TABLE
+#include "tableeditorimpl.h"
+#endif
+
+#include <qfeatures.h>
+
+#include <qpixmap.h>
+#include <qgroupbox.h>
+#include <qiconview.h>
+#ifndef QT_NO_TABLE
+#include <qtable.h>
+#endif
+#ifndef QT_NO_SQL
+#include <qdatatable.h>
+#endif
+#include <qdatetimeedit.h>
+#include <qlineedit.h>
+#include <qspinbox.h>
+#include <qmultilineedit.h>
+#include <qtextedit.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qwidgetstack.h>
+#include <qcombobox.h>
+#include <qtabbar.h>
+#include <qlistbox.h>
+#include <qlistview.h>
+#include <qobjectlist.h>
+#include <qlcdnumber.h>
+#include <qslider.h>
+#include <qdial.h>
+#include <qprogressbar.h>
+#include <qtextview.h>
+#include <qtextbrowser.h>
+#include <qframe.h>
+#include <qmetaobject.h>
+#include <qwizard.h>
+#include <qvaluelist.h>
+#include <qtimer.h>
+#include <qscrollbar.h>
+#include <qmainwindow.h>
+#include <qmenubar.h>
+#include <qapplication.h>
+#include <qsplitter.h>
+#ifndef QT_NO_SQL
+#include "database.h"
+#endif
+
+//#define NO_STATIC_COLORS
+#include "globaldefs.h"
+
+/* KOMMANDER INCLUDES */
+#include <lineedit.h>
+#include <dialog.h>
+#include <execbutton.h>
+#include <closebutton.h>
+#include <textedit.h>
+#include <fileselector.h>
+#include <textedit.h>
+#include <radiobutton.h>
+#include <groupbox.h>
+#include <buttongroup.h>
+#include <checkbox.h>
+#include <combobox.h>
+#include <spinboxint.h>
+#include <wizard.h>
+#include <tabwidget.h>
+#include <subdialog.h>
+#include <listbox.h>
+#include <scriptobject.h>
+#include <richtexteditor.h>
+#include <treewidget.h>
+#include <slider.h>
+#include <datepicker.h>
+#include <popupmenu.h>
+#include "toolbox.h"
+#include "fontdialog.h"
+#include "aboutdialog.h"
+
+FormWindow *find_formwindow( QWidget *w )
+{
+ if ( !w )
+ return 0;
+ for (;;) {
+ if ( w->inherits( "FormWindow" ) )
+ return (FormWindow*)w;
+ if ( !w->parentWidget() )
+ return 0;
+ w = w->parentWidget();
+ }
+}
+
+void QLayoutWidget::paintEvent( QPaintEvent* )
+{
+ QPainter p ( this );
+ p.setPen( red );
+ p.drawRect( rect() );
+}
+
+
+QDesignerTabWidget::QDesignerTabWidget( QWidget *parent, const char *name )
+ : QTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+{
+ tabBar()->setAcceptDrops( true );
+ tabBar()->installEventFilter( this );
+}
+
+int QDesignerTabWidget::currentPage() const
+{
+ return tabBar()->currentTab();
+}
+
+void QDesignerTabWidget::setCurrentPage( int i )
+{
+ tabBar()->setCurrentTab( i );
+}
+
+QString QDesignerTabWidget::pageTitle() const
+{
+ return ((QTabWidget*)this)->tabLabel( QTabWidget::currentPage() );
+}
+
+void QDesignerTabWidget::setPageTitle( const QString& title )
+{
+ changeTab( QTabWidget::currentPage(), title );
+}
+
+void QDesignerTabWidget::setPageName( const QCString& name )
+{
+ if ( QTabWidget::currentPage() )
+ QTabWidget::currentPage()->setName( name );
+}
+
+QCString QDesignerTabWidget::pageName() const
+{
+ if ( !QTabWidget::currentPage() )
+ return 0;
+ return QTabWidget::currentPage()->name();
+}
+
+int QDesignerTabWidget::count() const
+{
+ return tabBar()->count();
+}
+
+bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )
+{
+ if ( o != tabBar() ) return false;
+
+ switch ( e->type() ) {
+ case QEvent::MouseButtonPress: {
+ mousePressed = true;
+ QMouseEvent *me = (QMouseEvent*)e;
+ pressPoint = me->pos();
+ }
+ break;
+ case QEvent::MouseMove: {
+ QMouseEvent *me = (QMouseEvent*)e;
+ if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > QApplication::startDragDistance() ) {
+ QTextDrag *drg = new QTextDrag( QString::number( (long) this ) , this );
+ mousePressed = false;
+ dragPage = QTabWidget::currentPage();
+ dragLabel = QTabWidget::tabLabel( dragPage );
+
+ int index = indexOf( dragPage );
+
+ removePage( dragPage );
+ if ( !drg->dragMove() ) {
+ insertTab( dragPage, dragLabel, index );
+ showPage( dragPage );
+ }
+ if ( dropIndicator )
+ dropIndicator->hide();
+ }
+ }
+ break;
+ case QEvent::DragLeave: {
+ if ( dropIndicator )
+ dropIndicator->hide();
+ }
+ break;
+ case QEvent::DragMove: {
+ QDragEnterEvent *de = (QDragEnterEvent*) e;
+ if ( QTextDrag::canDecode( de ) ) {
+ QString text;
+ QTextDrag::decode( de, text );
+ if ( text == QString::number( (long)this ) )
+ de->accept();
+ else
+ return false;
+ }
+
+ int index = 0;
+ QRect rect;
+ for ( ; index < tabBar()->count(); index++ ) {
+ if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {
+ rect = tabBar()->tabAt( index )->rect();
+ break;
+ }
+ }
+
+ if ( index == tabBar()->count() -1 ) {
+ QRect rect2 = rect;
+ rect2.setLeft( rect2.left() + rect2.width() / 2 );
+ if ( rect2.contains( de->pos() ) )
+ index++;
+ }
+
+ if ( ! dropIndicator ) {
+ dropIndicator = new QWidget( this );
+ dropIndicator->setBackgroundColor( red );
+ }
+
+ QPoint pos;
+ if ( index == tabBar()->count() )
+ pos = tabBar()->mapToParent( QPoint( rect.x() + rect.width(), rect.y() ) );
+ else
+ pos = tabBar()->mapToParent( QPoint( rect.x(), rect.y() ) );
+
+ dropIndicator->setGeometry( pos.x(), pos.y() , 3, rect.height() );
+ dropIndicator->show();
+ }
+ break;
+ case QEvent::Drop: {
+ QDragEnterEvent *de = (QDragEnterEvent*) e;
+ if ( QTextDrag::canDecode( de ) ) {
+ QString text;
+ QTextDrag::decode( de, text );
+ if ( text == QString::number( (long)this ) ) {
+
+ int newIndex = 0;
+ for ( ; newIndex < tabBar()->count(); newIndex++ ) {
+ if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) )
+ break;
+ }
+
+ if ( newIndex == tabBar()->count() -1 ) {
+ QRect rect2 = tabBar()->tabAt( newIndex )->rect();
+ rect2.setLeft( rect2.left() + rect2.width() / 2 );
+ if ( rect2.contains( de->pos() ) )
+ newIndex++;
+ }
+
+ int oldIndex = 0;
+ for ( ; oldIndex < tabBar()->count(); oldIndex++ ) {
+ if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) )
+ break;
+ }
+
+ FormWindow *fw = find_formwindow( this );
+ MoveTabPageCommand *cmd =
+ new MoveTabPageCommand( i18n("Move Tab Page" ), fw, this,
+ dragPage, dragLabel, newIndex, oldIndex );
+ fw->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ de->accept();
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ return false;
+}
+
+int QDesignerWizard::currentPageNum() const
+{
+ for ( int i = 0; i < pageCount(); ++i ) {
+ if ( page( i ) == currentPage() )
+ return i;
+ }
+ return 0;
+}
+
+void QDesignerWizard::setCurrentPage( int i )
+{
+ if ( i < currentPageNum() ) {
+ while ( i < currentPageNum() ) {
+ if ( currentPageNum() == 0 )
+ break;
+ back();
+ }
+
+ } else {
+ while ( i > currentPageNum() ) {
+ if ( currentPageNum() == pageCount() - 1 )
+ break;
+ next();
+ }
+ }
+}
+
+QString QDesignerWizard::pageTitle() const
+{
+ return title( currentPage() );
+}
+
+void QDesignerWizard::setPageTitle( const QString& title )
+{
+ setTitle( currentPage(), title );
+}
+
+void QDesignerWizard::setPageName( const QCString& name )
+{
+ if ( QWizard::currentPage() )
+ QWizard::currentPage()->setName( name );
+}
+
+QCString QDesignerWizard::pageName() const
+{
+ if ( !QWizard::currentPage() )
+ return 0;
+ return QWizard::currentPage()->name();
+}
+
+int QDesignerWizard::pageNum( QWidget *p )
+{
+ for ( int i = 0; i < pageCount(); ++i ) {
+ if ( page( i ) == p )
+ return i;
+ }
+ return -1;
+}
+
+void QDesignerWizard::addPage( QWidget *p, const QString &t )
+{
+ QWizard::addPage( p, t );
+ if ( removedPages.find( p ) )
+ removedPages.remove( p );
+}
+
+void QDesignerWizard::removePage( QWidget *p )
+{
+ QWizard::removePage( p );
+ removedPages.insert( p, p );
+}
+
+void QDesignerWizard::insertPage( QWidget *p, const QString &t, int index )
+{
+ QWizard::insertPage( p, t, index );
+ if ( removedPages.find( p ) )
+ removedPages.remove( p );
+}
+
+QMap< int, QMap< QString, QVariant> > *defaultProperties = 0;
+QMap< int, QStringList > *changedProperties = 0;
+
+/*!
+ \class WidgetFactory widgetfactory.h
+ \brief Set of static functions for creating widgets, layouts and do other stuff
+
+ The widget factory offers functions to create widgets, create and
+ delete layouts find out other details - all based on the
+ WidgetDatabase's data. So the functions that use ids use the same
+ ids as in the WidgetDatabase.
+*/
+
+
+void WidgetFactory::saveDefaultProperties( QWidget *w, int id )
+{
+ QMap< QString, QVariant> propMap;
+ QStrList lst = w->metaObject()->propertyNames( true );
+ for ( uint i = 0; i < lst.count(); ++i ) {
+ QVariant var = w->property( lst.at( i ) );
+ if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 )
+ var = QVariant( QPixmap() );
+ else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 )
+ var = QVariant( QIconSet() );
+ propMap.replace( lst.at( i ), var );
+ }
+ defaultProperties->replace( id, propMap );
+}
+
+static void saveChangedProperties( QWidget *w, int id )
+{
+ QStringList l = MetaDataBase::changedProperties( w );
+ changedProperties->insert( id, l );
+}
+
+EditorTabWidget::EditorTabWidget( QWidget *parent, const char *name )
+ : TabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+{
+ tabBar()->setAcceptDrops( true );
+ tabBar()->installEventFilter( this );
+}
+
+int EditorTabWidget::currentPage() const
+{
+ return tabBar()->currentTab();
+}
+
+void EditorTabWidget::setCurrentPage( int i )
+{
+ tabBar()->setCurrentTab( i );
+}
+
+QString EditorTabWidget::pageTitle() const
+{
+ return ((QTabWidget*)this)->tabLabel( QTabWidget::currentPage() );
+}
+
+void EditorTabWidget::setPageTitle( const QString& title )
+{
+ changeTab( QTabWidget::currentPage(), title );
+}
+
+void EditorTabWidget::setPageName( const QCString& name )
+{
+ if ( QTabWidget::currentPage() )
+ QTabWidget::currentPage()->setName( name );
+}
+
+QCString EditorTabWidget::pageName() const
+{
+ if ( !QTabWidget::currentPage() )
+ return 0;
+ return QTabWidget::currentPage()->name();
+}
+
+int EditorTabWidget::count() const
+{
+ return tabBar()->count();
+}
+
+bool EditorTabWidget::eventFilter( QObject *o, QEvent *e )
+{
+ if ( o != tabBar() ) return false;
+
+ switch ( e->type() ) {
+ case QEvent::MouseButtonPress: {
+ mousePressed = true;
+ QMouseEvent *me = (QMouseEvent*)e;
+ pressPoint = me->pos();
+ }
+ break;
+ case QEvent::MouseMove: {
+ QMouseEvent *me = (QMouseEvent*)e;
+ if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > QApplication::startDragDistance() ) {
+ QTextDrag *drg = new QTextDrag( QString::number( (long) this ) , this );
+ mousePressed = false;
+ dragPage = QTabWidget::currentPage();
+ dragLabel = QTabWidget::tabLabel( dragPage );
+
+ int index = indexOf( dragPage );
+
+ removePage( dragPage );
+ if ( !drg->dragMove() ) {
+ insertTab( dragPage, dragLabel, index );
+ showPage( dragPage );
+ }
+ if ( dropIndicator )
+ dropIndicator->hide();
+ }
+ }
+ break;
+ case QEvent::DragLeave: {
+ if ( dropIndicator )
+ dropIndicator->hide();
+ }
+ break;
+ case QEvent::DragMove: {
+ QDragEnterEvent *de = (QDragEnterEvent*) e;
+ if ( QTextDrag::canDecode( de ) ) {
+ QString text;
+ QTextDrag::decode( de, text );
+ if ( text == QString::number( (long)this ) )
+ de->accept();
+ else
+ return false;
+ }
+
+ int index = 0;
+ QRect rect;
+ for ( ; index < tabBar()->count(); index++ ) {
+ if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {
+ rect = tabBar()->tabAt( index )->rect();
+ break;
+ }
+ }
+
+ if ( index == tabBar()->count() -1 ) {
+ QRect rect2 = rect;
+ rect2.setLeft( rect2.left() + rect2.width() / 2 );
+ if ( rect2.contains( de->pos() ) )
+ index++;
+ }
+
+ if ( ! dropIndicator ) {
+ dropIndicator = new QWidget( this );
+ dropIndicator->setBackgroundColor( red );
+ }
+
+ QPoint pos;
+ if ( index == tabBar()->count() )
+ pos = tabBar()->mapToParent( QPoint( rect.x() + rect.width(), rect.y() ) );
+ else
+ pos = tabBar()->mapToParent( QPoint( rect.x(), rect.y() ) );
+
+ dropIndicator->setGeometry( pos.x(), pos.y() , 3, rect.height() );
+ dropIndicator->show();
+ }
+ break;
+ case QEvent::Drop: {
+ QDragEnterEvent *de = (QDragEnterEvent*) e;
+ if ( QTextDrag::canDecode( de ) ) {
+ QString text;
+ QTextDrag::decode( de, text );
+ if ( text == QString::number( (long)this ) ) {
+
+ int newIndex = 0;
+ for ( ; newIndex < tabBar()->count(); newIndex++ ) {
+ if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) )
+ break;
+ }
+
+ if ( newIndex == tabBar()->count() -1 ) {
+ QRect rect2 = tabBar()->tabAt( newIndex )->rect();
+ rect2.setLeft( rect2.left() + rect2.width() / 2 );
+ if ( rect2.contains( de->pos() ) )
+ newIndex++;
+ }
+
+ int oldIndex = 0;
+ for ( ; oldIndex < tabBar()->count(); oldIndex++ ) {
+ if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) )
+ break;
+ }
+
+ FormWindow *fw = find_formwindow( this );
+ MoveTabPageCommand *cmd =
+ new MoveTabPageCommand( i18n("Move Tab Page" ), fw, this,
+ dragPage, dragLabel, newIndex, oldIndex );
+ fw->commandHistory()->addCommand( cmd );
+ cmd->execute();
+ de->accept();
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ return false;
+}
+
+
+EditorToolBox::EditorToolBox( QWidget *parent, const char *name )
+ : ToolBox( parent, name )
+{
+ setAcceptDrops( true );
+}
+
+int EditorToolBox::currentPage() const
+{
+ return currentIndex();
+}
+
+void EditorToolBox::setCurrentPage( int i )
+{
+ setCurrentItem( item( i ) );
+}
+
+QString EditorToolBox::pageTitle() const
+{
+ return itemLabel( currentIndex() );
+}
+
+void EditorToolBox::setPageTitle( const QString& title )
+{
+ setItemLabel( currentIndex(), title );
+}
+
+void EditorToolBox::setPageName( const QCString& name )
+{
+ if ( currentItem() )
+ currentItem()->setName( name );
+}
+
+QCString EditorToolBox::pageName() const
+{
+ if ( !currentItem() )
+ return 0;
+ return currentItem()->name();
+}
+
+int EditorToolBox::count() const
+{
+ return QToolBox::count();
+}
+
+
+
+/*! Creates a widget of the type which is registered as \a id as
+ child of \a parent. The \a name is optional. If \a init is true, the
+ widget is initialized with some defaults, else the plain widget is
+ created.
+*/
+
+QWidget *WidgetFactory::create( int id, QWidget *parent, const char *name, bool init, const QRect *r, Qt::Orientation orient )
+{
+ QString n = WidgetDatabase::className(id);
+ //qDebug("Trying to create '%s'", n.latin1());
+ if (n.isEmpty())
+ return 0;
+
+ if (!defaultProperties)
+ {
+ defaultProperties = new QMap < int, QMap < QString, QVariant > >();
+ changedProperties = new QMap < int, QStringList > ();
+ }
+
+ QWidget *w = 0;
+ QString str = WidgetDatabase::createWidgetName(id);
+ const char *s = str.latin1();
+ w = createWidget(n, parent, name ? name : s, init, r, orient);
+ //qDebug("Trying to create '%s', widget (id=%d) - %s", s, id, w ? "successful" : "failure");
+ if (!w && WidgetDatabase::isCustomWidget(id))
+ w = createCustomWidget(parent, name ? name : s, MetaDataBase::customWidget(id));
+ if (!w)
+ return 0;
+ MetaDataBase::addEntry(w);
+
+ if (!defaultProperties->contains(id))
+ saveDefaultProperties(w, id);
+ if (!changedProperties->contains(id))
+ saveChangedProperties(w, id);
+
+ return w;
+}
+
+/*! Creates a layout on the widget \a widget of the type \a type
+ which can be \c HBox, \c VBox or \c Grid.
+*/
+
+QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutType type )
+{
+ int spacing = MainWindow::self->currentLayoutDefaultSpacing();
+ int margin = 0;
+
+ if ( widget && !widget->inherits( "QLayoutWidget" ) &&
+ ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
+ widget && widget->parentWidget() && widget->parentWidget()->inherits( "FormWindow" ) ) )
+ margin = MainWindow::self->currentLayoutDefaultMargin();
+
+ if ( !layout && widget && widget->inherits( "QTabWidget" ) )
+ widget = ((QTabWidget*)widget)->currentPage();
+
+ if ( !layout && widget && widget->inherits( "QToolBox" ) )
+ widget = ((QToolBox*)widget)->currentItem();
+
+ if ( !layout && widget && widget->inherits( "QWizard" ) )
+ widget = ((QWizard*)widget)->currentPage();
+
+ if ( !layout && widget && widget->inherits( "QMainWindow" ) )
+ widget = ((QMainWindow*)widget)->centralWidget();
+
+ if ( !layout && widget && widget->inherits( "QWidgetStack" ) )
+ widget = ((QWidgetStack*)widget)->visibleWidget();
+
+ MetaDataBase::addEntry( widget );
+
+ if ( !layout && widget && widget->inherits( "QGroupBox" ) ) {
+ QGroupBox *gb = (QGroupBox*)widget;
+ gb->setColumnLayout( 0, Qt::Vertical );
+ gb->layout()->setMargin( 0 );
+ gb->layout()->setSpacing( 0 );
+ QLayout *l;
+ switch ( type ) {
+ case HBox:
+ l = new QHBoxLayout( gb->layout() );
+ MetaDataBase::setMargin( gb, margin );
+ MetaDataBase::setSpacing( gb, spacing );
+ l->setAlignment( AlignTop );
+ MetaDataBase::addEntry( l );
+ return l;
+ case VBox:
+ l = new QVBoxLayout( gb->layout(), spacing );
+ MetaDataBase::setMargin( gb, margin );
+ MetaDataBase::setSpacing( gb, spacing );
+ l->setAlignment( AlignTop );
+ MetaDataBase::addEntry( l );
+ return l;
+ case Grid:
+ l = new QDesignerGridLayout( gb->layout() );
+ MetaDataBase::setMargin( gb, margin );
+ MetaDataBase::setSpacing( gb, spacing );
+ l->setAlignment( AlignTop );
+ MetaDataBase::addEntry( l );
+ return l;
+ default:
+ return 0;
+ }
+ } else {
+ if ( layout ) {
+ QLayout *l;
+ switch ( type ) {
+ case HBox:
+ l = new QHBoxLayout( layout );
+ MetaDataBase::addEntry( l );
+ l->setSpacing( spacing );
+ l->setMargin( margin );
+ MetaDataBase::addEntry( l );
+ return l;
+ case VBox:
+ l = new QVBoxLayout( layout );
+ MetaDataBase::addEntry( l );
+ l->setSpacing( spacing );
+ l->setMargin( margin );
+ MetaDataBase::addEntry( l );
+ return l;
+ case Grid: {
+ l = new QDesignerGridLayout( layout );
+ MetaDataBase::addEntry( l );
+ l->setSpacing( spacing );
+ l->setMargin( margin );
+ MetaDataBase::addEntry( l );
+ return l;
+ }
+ default:
+ return 0;
+ }
+ } else {
+ QLayout *l;
+ switch ( type ) {
+ case HBox:
+ l = new QHBoxLayout( widget );
+ MetaDataBase::addEntry( l );
+ if ( widget ) {
+ MetaDataBase::setMargin( widget, margin );
+ MetaDataBase::setSpacing( widget, spacing );
+ } else {
+ l->setMargin( margin );
+ l->setSpacing( margin );
+ }
+ MetaDataBase::addEntry( l );
+ return l;
+ case VBox:
+ l = new QVBoxLayout( widget );
+ MetaDataBase::addEntry( l );
+ if ( widget ) {
+ MetaDataBase::setMargin( widget, margin );
+ MetaDataBase::setSpacing( widget, spacing );
+ } else {
+ l->setMargin( margin );
+ l->setSpacing( margin );
+ }
+ MetaDataBase::addEntry( l );
+ return l;
+ case Grid: {
+ l = new QDesignerGridLayout( widget );
+ MetaDataBase::addEntry( l );
+ if ( widget ) {
+ MetaDataBase::setMargin( widget, margin );
+ MetaDataBase::setSpacing( widget, spacing );
+ } else {
+ l->setMargin( margin );
+ l->setSpacing( margin );
+ }
+ MetaDataBase::addEntry( l );
+ return l;
+ }
+ default:
+ return 0;
+ }
+ }
+ }
+}
+
+void WidgetFactory::deleteLayout( QWidget *widget )
+{
+ if ( !widget )
+ return;
+
+ if ( widget->inherits( "QTabWidget" ) )
+ widget = ((QTabWidget*)widget)->currentPage();
+ if ( widget->inherits( "QWizard" ) )
+ widget = ((QWizard*)widget)->currentPage();
+ if ( widget->inherits( "QMainWindow" ) )
+ widget = ((QMainWindow*)widget)->centralWidget();
+ if ( widget->inherits( "QWidgetStack" ) )
+ widget = ((QWidgetStack*)widget)->visibleWidget();
+ delete widget->layout();
+}
+
+/*! Factory functions for creating a widget of the type \a className
+ as child of \a parent with the name \a name.
+
+ If \a init is true, some initial default properties are set. This
+ has to be in sync with the initChangedProperties() function!
+*/
+
+QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, const char *name, bool init,
+ const QRect *r, Qt::Orientation orient )
+{
+ if (className == "QPushButton")
+ {
+ QPushButton *b = 0;
+ if (init)
+ {
+ b = new QDesignerPushButton(parent, name);
+ b->setText(QString::fromLatin1(name));
+ } else
+ {
+ b = new QDesignerPushButton(parent, name);
+ }
+ QWidget *w = find_formwindow(b);
+ b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits("QDialog"));
+ return b;
+ } else if (className == "QToolButton")
+ {
+ if (init)
+ {
+ QDesignerToolButton *tb = new QDesignerToolButton(parent, name);
+ tb->setText("...");
+ return tb;
+ }
+ return new QDesignerToolButton(parent, name);
+ } else if (className == "QCheckBox")
+ {
+ if (init)
+ {
+ QDesignerCheckBox *cb = new QDesignerCheckBox(parent, name);
+ cb->setText(QString::fromLatin1(name));
+ return cb;
+ }
+ return new QDesignerCheckBox(parent, name);
+ } else if (className == "QRadioButton")
+ {
+ if (init)
+ {
+ QDesignerRadioButton *rb = new QDesignerRadioButton(parent, name);
+ rb->setText(QString::fromLatin1(name));
+ return rb;
+ }
+ return new QDesignerRadioButton(parent, name);
+ } else if (className == "QGroupBox")
+ {
+ if (init)
+ return new QGroupBox(QString::fromLatin1(name), parent, name);
+ return new QGroupBox(parent, name);
+ } else if (className == "QButtonGroup")
+ {
+ if (init)
+ return new QButtonGroup(QString::fromLatin1(name), parent, name);
+ return new QButtonGroup(parent, name);
+ } else if (className == "QIconView")
+ {
+#if !defined(QT_NO_ICONVIEW)
+ QIconView *iv = new QIconView(parent, name);
+ if (init)
+ (void) new QIconViewItem(iv, i18n("New Item"));
+ return iv;
+#else
+ return 0;
+#endif
+ } else if (className == "QTable")
+ {
+#if !defined(QT_NO_TABLE)
+ if (init)
+ return new QTable(3, 3, parent, name);
+ return new QTable(parent, name);
+#else
+ return 0;
+#endif
+#ifndef QT_NO_SQL
+ } else if (className == "QDataTable")
+ {
+ return new QDataTable(parent, name);
+#endif //QT_NO_SQL
+ } else if (className == "QDateEdit")
+ {
+ return new QDateEdit(parent, name);
+ } else if (className == "QTimeEdit")
+ {
+ return new QTimeEdit(parent, name);
+ } else if (className == "QDateTimeEdit")
+ {
+ return new QDateTimeEdit(parent, name);
+ } else if (className == "QListBox")
+ {
+ QListBox *lb = new QListBox(parent, name);
+ if (init)
+ {
+ lb->insertItem(i18n("New Item"));
+ lb->setCurrentItem(0);
+ }
+ return lb;
+ } else if (className == "QListView")
+ {
+ QListView *lv = new QListView(parent, name);
+ lv->setSorting(-1);
+ if (init)
+ {
+ lv->addColumn(i18n("Column 1"));
+ lv->setCurrentItem(new QListViewItem(lv, i18n("New Item")));
+ }
+ return lv;
+ } else if (className == "QLineEdit")
+ return new QLineEdit(parent, name);
+ else if (className == "QSpinBox")
+ return new QSpinBox(parent, name);
+ else if (className == "QSplitter")
+ return new QSplitter(parent, name);
+ else if (className == "QMultiLineEdit")
+ return new QMultiLineEdit(parent, name);
+ else if (className == "QTextEdit")
+ return new QTextEdit(parent, name);
+ else if (className == "QLabel")
+ {
+ QDesignerLabel *l = new QDesignerLabel(parent, name);
+ if (init)
+ {
+ l->setText(QString::fromLatin1(name));
+ MetaDataBase::addEntry(l);
+ MetaDataBase::setPropertyChanged(l, "text", true);
+ }
+ return l;
+ } else if (className == "QLayoutWidget")
+ return new QLayoutWidget(parent, name);
+ else if (className == "QTabWidget")
+ {
+ QTabWidget *tw = new QDesignerTabWidget(parent, name);
+ if (init)
+ {
+ FormWindow *fw = find_formwindow(parent);
+ QWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new QWidget(tw, "tab");
+ tw->addTab(w, i18n("Tab 1"));
+ MetaDataBase::addEntry(w);
+ w = fw ? new QDesignerWidget(fw, tw, "tab") : new QWidget(tw, "tab");
+ tw->addTab(w, i18n("Tab 2"));
+ MetaDataBase::addEntry(tw);
+ MetaDataBase::addEntry(w);
+ }
+ return tw;
+ } else if (className == "QComboBox")
+ {
+ return new QComboBox(false, parent, name);
+ } else if (className == "QWidget")
+ {
+ if (parent &&
+ (parent->inherits("FormWindow") || parent->inherits("QWizard")
+ || parent->inherits("QTabWidget") || parent->inherits("QToolBox") || parent->inherits("QMainWindow")))
+ {
+ FormWindow *fw = find_formwindow(parent);
+ if (fw)
+ {
+ QDesignerWidget *dw = new QDesignerWidget(fw, parent, name);
+ MetaDataBase::addEntry(dw);
+ return dw;
+ }
+ }
+ return new QWidget(parent, name);
+ } else if (className == "QDialog")
+ {
+ QDialog *dia = 0;
+ if (parent && parent->inherits("FormWindow"))
+ dia = new QDesignerDialog((FormWindow *) parent, parent, name);
+ else
+ dia = new QDialog(parent, name);
+ if (parent && !parent->inherits("MainWindow"))
+ dia->reparent(parent, QPoint(0, 0), true);
+ return dia;
+ } else if (className == "QWizard")
+ {
+ QWizard *wiz = new QDesignerWizard(parent, name);
+ if (parent && !parent->inherits("MainWindow"))
+ {
+ wiz->reparent(parent, QPoint(0, 0), true);
+ }
+ if (init && parent && parent->inherits("FormWindow"))
+ {
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
+ MetaDataBase::addEntry(dw);
+ wiz->addPage(dw, i18n("Page"));
+ QTimer::singleShot(0, wiz, SLOT(next()));
+ }
+ return wiz;
+ } else if (className == "Spacer")
+ {
+ Spacer *s = new Spacer(parent, name);
+ MetaDataBase::addEntry(s);
+ MetaDataBase::setPropertyChanged(s, "orientation", true);
+ MetaDataBase::setPropertyChanged(s, "sizeType", true);
+ if (!r)
+ return s;
+ if (!r->isValid() || r->width() < 2 && r->height() < 2)
+ s->setOrientation(orient);
+ else if (r->width() < r->height())
+ s->setOrientation(Qt::Vertical);
+ else
+ s->setOrientation(Qt::Horizontal);
+ return s;
+ } else if (className == "QLCDNumber")
+ return new QLCDNumber(parent, name);
+ else if (className == "QProgressBar")
+ return new QProgressBar(parent, name);
+ else if (className == "QTextView")
+ return new QTextView(parent, name);
+ else if (className == "QTextBrowser")
+ return new QTextBrowser(parent, name);
+ else if (className == "QDial")
+ return new QDial(parent, name);
+ else if (className == "QSlider")
+ {
+ QSlider *s = new QSlider(parent, name);
+ if (!r)
+ return s;
+ if (!r->isValid() || r->width() < 2 && r->height() < 2)
+ s->setOrientation(orient);
+ else if (r->width() > r->height())
+ s->setOrientation(Qt::Horizontal);
+ MetaDataBase::addEntry(s);
+ MetaDataBase::setPropertyChanged(s, "orientation", true);
+ return s;
+ } else if (className == "QScrollBar")
+ {
+ QScrollBar *s = new QScrollBar(parent, name);
+ if (!r)
+ return s;
+ if (!r->isValid() || r->width() < 2 && r->height() < 2)
+ s->setOrientation(orient);
+ else if (r->width() > r->height())
+ s->setOrientation(Qt::Horizontal);
+ MetaDataBase::addEntry(s);
+ MetaDataBase::setPropertyChanged(s, "orientation", true);
+ return s;
+ } else if (className == "QFrame")
+ {
+ if (!init)
+ return new QFrame(parent, name);
+ QFrame *f = new QFrame(parent, name);
+ f->setFrameStyle(QFrame::StyledPanel | QFrame::Raised);
+ return f;
+ } else if (className == "Line")
+ {
+ Line *l = new Line(parent, name);
+ MetaDataBase::addEntry(l);
+ MetaDataBase::setPropertyChanged(l, "orientation", true);
+ MetaDataBase::setPropertyChanged(l, "frameShadow", true);
+ MetaDataBase::setPropertyChanged(l, "frameShape", true);
+ if (!r)
+ return l;
+ if (!r->isValid() || r->width() < 2 && r->height() < 2)
+ l->setOrientation(orient);
+ else if (r->width() < r->height())
+ l->setOrientation(Qt::Vertical);
+ return l;
+ } else if (className == "QMainWindow")
+ {
+ QMainWindow *mw = new KmdrMainWindow(parent, name, 0);
+ mw->setDockEnabled(Qt::DockMinimized, false);
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, mw, "central widget");
+ mw->setDockMenuEnabled(false);
+ MetaDataBase::addEntry(dw);
+ mw->setCentralWidget(dw);
+ (void) mw->statusBar();
+ dw->show();
+ return mw;
+ }
+#ifndef QT_NO_SQL
+ else if (className == "QDataBrowser")
+ {
+ QWidget *w = new QDesignerDataBrowser(parent, name);
+ if (parent)
+ w->reparent(parent, QPoint(0, 0), true);
+ return w;
+ } else if (className == "QDataView")
+ {
+ QWidget *w = new QDesignerDataView(parent, name);
+ if (parent)
+ w->reparent(parent, QPoint(0, 0), true);
+ return w;
+ }
+#endif
+#ifdef KOMMANDER
+
+ if (className == "LineEdit")
+ return new LineEdit(parent, name);
+ else if (className == "ListView")
+ {
+ QListView *lv = new QListView(parent, name);
+ lv->setSorting(-1);
+ if (init)
+ {
+ lv->addColumn(i18n("Column 1"));
+ lv->setCurrentItem(new QListViewItem(lv, i18n("New Item")));
+ }
+ return lv;
+ }
+ else if (className == "Dialog")
+ {
+ QDialog *dia = 0;
+ if (parent && parent->inherits("FormWindow"))
+ dia = new EditorDialog((FormWindow *) parent, parent, name);
+ else
+ dia = new Dialog(parent, name, false);
+
+ if (parent)
+ dia->reparent(parent, QPoint(0, 0), true);
+ return dia;
+ }
+ else if (className == "Wizard")
+ {
+ //qDebug("Creating Wizard...");
+ QWizard *wiz;
+ if (parent && parent->inherits("FormWindow"))
+ wiz = new QDesignerWizard(parent, name);
+ else
+ wiz = new Wizard(parent, name);
+ if (parent)
+ wiz->reparent(parent, QPoint(0, 0), true);
+ if (init && parent && parent->inherits("FormWindow"))
+ {
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
+ MetaDataBase::addEntry(dw);
+ wiz->addPage(dw, i18n("Page 1"));
+ wiz->addPage(dw, i18n("Page 2"));
+ QTimer::singleShot(0, wiz, SLOT(next()));
+ }
+ return wiz;
+ }
+ else if (className == "TabWidget")
+ {
+ QTabWidget *tw = new EditorTabWidget(parent, name);
+ if (init)
+ {
+ FormWindow *fw = find_formwindow(parent);
+ QWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new QWidget(tw, "tab");
+ tw->addTab(w, i18n("Tab 1"));
+ MetaDataBase::addEntry(w);
+ w = fw ? new QDesignerWidget(fw, tw, "tab") : new QWidget(tw, "tab");
+ tw->addTab(w, i18n("Tab 2"));
+ MetaDataBase::addEntry(tw);
+ MetaDataBase::addEntry(w);
+ }
+ return tw;
+ } else if (className == "ToolBox")
+ {
+ QToolBox *tw = new EditorToolBox(parent, name);
+ if (init)
+ {
+ FormWindow *fw = find_formwindow(parent);
+ QWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new QWidget(tw, "toolbox");
+ tw->addItem(w, i18n("Page 1"));
+ MetaDataBase::addEntry(w);
+ w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new QWidget(tw, "toolbox");
+ tw->addItem(w, i18n("Page 2"));
+ MetaDataBase::addEntry(tw);
+ MetaDataBase::addEntry(w);
+ }
+ return tw;
+ }
+ else if (className == "ExecButton")
+ return new ExecButton(parent, name);
+ else if (className == "CloseButton")
+ return new CloseButton(parent, name);
+ else if (className == "SubDialog")
+ return new SubDialog(parent, name);
+ else if (className == "FileSelector")
+ return new FileSelector(parent, name);
+ else if (className == "TextEdit")
+ return new TextEdit(parent, name);
+ else if (className == "RadioButton")
+ return new RadioButton(parent, name);
+ else if (className == "ButtonGroup")
+ return new ButtonGroup(parent, name);
+ else if (className == "GroupBox")
+ return new GroupBox(parent, name);
+ else if (className == "CheckBox")
+ return new CheckBox(parent, name);
+ else if (className == "ComboBox")
+ return new ComboBox(parent, name);
+ else if (className == "SpinBoxInt")
+ return new SpinBoxInt(parent, name);
+ else if (className == "ListBox")
+ return new ListBox(parent, name);
+ else if (className == "ScriptObject")
+ return new ScriptObject(parent, name);
+ else if (className == "RichTextEditor")
+ return new RichTextEditor(parent, name);
+ else if (className == "DatePicker")
+ return new DatePicker(parent, name);
+ else if (className == "PopupMenu")
+ return new PopupMenu(parent, name);
+ else if (className == "FontDialog")
+ return new FontDialog(parent, name);
+ else if (className == "AboutDialog")
+ return new AboutDialog(parent, name);
+ else if (className == "TreeWidget")
+ {
+ QListView *lv = new TreeWidget(parent, name);
+ lv->setSorting(-1);
+ if (init)
+ {
+ lv->addColumn(i18n("Column 1"));
+ lv->setCurrentItem(new QListViewItem(lv, i18n("New Item")));
+ }
+ return lv;
+ } else if (className == "Slider")
+ {
+ Slider *s = new Slider(parent, name);
+ if (!r)
+ return s;
+ if (!r->isValid() || r->width() < 2 && r->height() < 2)
+ s->setOrientation(orient);
+ else if (r->width() > r->height())
+ s->setOrientation(Qt::Horizontal);
+ MetaDataBase::addEntry(s);
+ MetaDataBase::setPropertyChanged(s, "orientation", true);
+ return s;
+ }
+#endif
+
+ QWidget *w = KommanderFactory::createWidget(className, parent, name);
+ return w;
+}
+
+
+
+/*! Find out which type the layout of the widget is. Returns \c HBox,
+ \c VBox, \c Grid or \c NoLayout. \a layout points to this
+ QWidget::layout() of \a w or to 0 after the function call.
+*/
+
+WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w, QLayout *&layout )
+{
+ layout = 0;
+
+ if ( w && w->inherits( "QTabWidget" ) )
+ w = ((QTabWidget*)w)->currentPage();
+ if ( w->inherits( "QToolBox" ) )
+ w = ((QToolBox*)w)->currentItem();
+ if ( w && w->inherits( "QWizard" ) )
+ w = ((QWizard*)w)->currentPage();
+ if ( w && w->inherits( "QMainWindow" ) )
+ w = ((QMainWindow*)w)->centralWidget();
+ if ( w && w->inherits( "QWidgetStack" ) )
+ w = ((QWidgetStack*)w)->visibleWidget();
+
+ if ( w && w->inherits( "QSplitter" ) )
+ return ( (QSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
+
+ if ( !w || !w->layout() )
+ return NoLayout;
+ QLayout *lay = w->layout();
+
+ if ( w->inherits( "QGroupBox" ) ) {
+ QObjectList *l = lay->queryList( "QLayout" );
+ if ( l && l->first() )
+ lay = (QLayout*)l->first();
+ delete l;
+ }
+ layout = lay;
+
+ if ( lay->inherits( "QHBoxLayout" ) )
+ return HBox;
+ else if ( lay->inherits( "QVBoxLayout" ) )
+ return VBox;
+ else if ( lay->inherits( "QGridLayout" ) )
+ return Grid;
+ return NoLayout;
+}
+
+/*!
+ \overload
+*/
+WidgetFactory::LayoutType WidgetFactory::layoutType( QLayout *layout )
+{
+ if ( layout->inherits( "QHBoxLayout" ) )
+ return HBox;
+ else if ( layout->inherits( "QVBoxLayout" ) )
+ return VBox;
+ else if ( layout->inherits( "QGridLayout" ) )
+ return Grid;
+ return NoLayout;
+}
+
+/*!
+ \overload
+*/
+WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w )
+{
+ QLayout *l = 0;
+ return layoutType( w, l );
+}
+
+
+QWidget *WidgetFactory::layoutParent( QLayout *layout )
+{
+ QObject *o = layout;
+ while ( o ) {
+ if ( o->isWidgetType() )
+ return (QWidget*)o;
+ o = o->parent();
+ }
+ return 0;
+}
+
+/*! Returns the widget into which children should be inserted when \a
+ w is a container known to the designer.
+
+ Usually that is \a w itself, sometimes it is different (e.g. a
+ tabwidget is known to the designer as a container but the child
+ widgets should be inserted into the current page of the
+ tabwidget. So in this case this function returns the current page of
+ the tabwidget.)
+ */
+QWidget* WidgetFactory::containerOfWidget( QWidget *w )
+{
+ if ( !w )
+ return w;
+ if ( w->inherits( "QTabWidget" ) )
+ return ((QTabWidget*)w)->currentPage();
+ if ( w->inherits( "QToolBox" ) )
+ return ((QToolBox*)w)->currentItem();
+ if ( w->inherits( "QWizard" ) )
+ return ((QWizard*)w)->currentPage();
+ if ( w->inherits( "QWidgetStack" ) )
+ return ((QWidgetStack*)w)->visibleWidget();
+ if ( w->inherits( "QMainWindow" ) )
+ return ((QMainWindow*)w)->centralWidget();
+ return w;
+}
+
+/*! Returns the actual designer widget of the container \a w. This is
+ normally \a w itself, but might be a parent or grand parent of \a w
+ (e.g. when working with a tabwidget and \a w is the container which
+ contains and layouts childs, but the actual widget known to the
+ designer is the tabwidget which is the parent of \a w. So this
+ function returns the tabwidget then.)
+*/
+
+QWidget* WidgetFactory::widgetOfContainer( QWidget *w )
+{
+ if ( w->parentWidget() && w->parentWidget()->inherits( "QWidgetStack" ) )
+ w = w->parentWidget();
+ while ( w ) {
+ if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
+ w && w->parentWidget() && w->parentWidget()->inherits( "FormWindow" ) )
+ return w;
+ w = w->parentWidget();
+ }
+ return w;
+}
+
+/*!
+ Returns whether \a o is a passive interactor or not.
+ */
+bool WidgetFactory::isPassiveInteractor( QObject* o )
+{
+ if ( QApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things
+ return true;
+
+ if ( o->inherits( "QTabBar" ) || ::qt_cast<QToolBox*>(o->parent()) )
+ return true;
+ else if ( o->inherits( "QSizeGrip" ) )
+ return true;
+ else if ( o->inherits( "QToolButton" ) && o->parent() && o->parent()->inherits( "QTabBar" ) )
+ return true;
+ else if ( o->parent() && o->parent()->inherits( "QWizard" ) && o->inherits( "QPushButton" ) )
+ return true;
+ else if ( o->parent() && o->parent()->inherits( "QMainWindow" ) && o->inherits( "QMenuBar" ) )
+ return true;
+ else if ( o->inherits( "QDockWindowHandle" ) )
+ return true;
+ else if ( o->inherits( "QHideDock" ) )
+ return true;
+
+ return false;
+}
+
+
+/*!
+ Returns the class name of object \a o that should be used for externally (i.e. for saving)
+ */
+const char* WidgetFactory::classNameOf( QObject* o )
+{
+ if (o->inherits("QDesignerTabWidget"))
+ return "QTabWidget";
+#ifdef KOMMANDER
+ else if (o->inherits("EditorTabWidget"))
+ return "TabWidget";
+ else if (o->inherits("EditorToolBox"))
+ return "ToolBox";
+#endif
+ else if (o->inherits("QDesignerDialog"))
+ return "QDialog";
+ else if (o->inherits("QDesignerWidget"))
+ return "QWidget";
+ else if (o->inherits("CustomWidget"))
+ return ((CustomWidget *) o)->realClassName().latin1();
+ else if (o->inherits("QDesignerLabel"))
+ return "QLabel";
+ else if (o->inherits("QDesignerWizard"))
+ return "QWizard";
+ else if (o->inherits("EditorWizard"))
+ return "Wizard";
+ else if (o->inherits("QDesignerPushButton"))
+ return "QPushButton";
+ else if (o->inherits("QDesignerToolButton"))
+ return "QToolButton";
+ else if (o->inherits("QDesignerRadioButton"))
+ return "QRadioButton";
+ else if (o->inherits("QDesignerCheckBox"))
+ return "QCheckBox";
+ else if (o->inherits("QDesignerMenuBar"))
+ return "QMenuBar";
+ else if (o->inherits("QDesignerToolBar"))
+ return "QToolBar";
+#ifndef QT_NO_SQL
+ else if (o->inherits("QDesignerDataBrowser"))
+ return "QDataBrowser";
+ else if (o->inherits("QDesignerDataView"))
+ return "QDataView";
+#endif
+ else if (o->inherits("EditorDialog"))
+ return "Dialog";
+ return o->className();
+}
+
+/*! As some properties are set by default when creating a widget this
+ functions markes this properties as changed. Has to be in sync with
+ createWidget()!
+*/
+
+void WidgetFactory::initChangedProperties( QObject *o )
+{
+ MetaDataBase::setPropertyChanged( o, "name", true );
+ if ( !o->inherits( "QDesignerToolBar" ) && !o->inherits( "QDesignerMenuBar" ) )
+ MetaDataBase::setPropertyChanged( o, "geometry", true );
+
+ if ( o->inherits( "QPushButton" ) || o->inherits("QRadioButton") || o->inherits( "QCheckBox" ) || o->inherits( "QToolButton" ) )
+ MetaDataBase::setPropertyChanged( o, "text", true );
+ else if (::qt_cast<QToolButton*>(o) && ::qt_cast<QToolBox*>(widgetOfContainer((QWidget*)o->parent()))) {
+ MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
+ MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
+ MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
+ MetaDataBase::setPropertyChanged( o, "textPosition", TRUE );
+ } else if ( o->inherits( "QGroupBox" ) )
+ MetaDataBase::setPropertyChanged( o, "title", true );
+ else if ( o->isA( "QFrame" ) ) {
+ MetaDataBase::setPropertyChanged( o, "frameShadow", true );
+ MetaDataBase::setPropertyChanged( o, "frameShape", true );
+ } else if ( o->inherits( "QTabWidget" ) || o->inherits( "QWizard" ) ) {
+ MetaDataBase::setPropertyChanged( o, "pageTitle", true );
+ MetaDataBase::setPropertyChanged( o, "pageName", true );
+#ifndef QT_NO_TABLE
+ } else if ( o->inherits( "QTable" ) && !o->inherits( "QDataTable" ) ) {
+ MetaDataBase::setPropertyChanged( o, "numRows", true );
+ MetaDataBase::setPropertyChanged( o, "numCols", true );
+ QTable *t = (QTable*)o;
+ for ( int i = 0; i < 3; ++i ) {
+ t->horizontalHeader()->setLabel( i, QString::number( i + 1 ) );
+ t->verticalHeader()->setLabel( i, QString::number( i + 1 ) );
+ }
+#endif
+ } else if ( ::qt_cast<QToolBox*>(o) ) {
+ MetaDataBase::setPropertyChanged( o, "currentIndex", true );
+ MetaDataBase::setPropertyChanged( o, "itemName", true );
+ MetaDataBase::setPropertyChanged( o, "itemLabel", true );
+ MetaDataBase::setPropertyChanged( o, "itemIconSet", true );
+ MetaDataBase::setPropertyChanged( o, "itemToolTip", true );
+ MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true );
+ } else if ( o->inherits( "QSplitter" ) ) {
+ MetaDataBase::setPropertyChanged( o, "orientation", true );
+ } else if ( o->inherits( "QDesignerToolBar" ) ) {
+ MetaDataBase::setPropertyChanged( o, "label", true );
+ } else if ( o->inherits( "QDesignerMenuBar" ) ) {
+ MetaDataBase::setPropertyChanged( o, "itemName", true );
+ MetaDataBase::setPropertyChanged( o, "itemNumber", true );
+ MetaDataBase::setPropertyChanged( o, "itemText", true );
+ }
+}
+
+bool WidgetFactory::hasSpecialEditor( int id )
+{
+ QString className = WidgetDatabase::className(id);
+
+ if (className == "TextEdit" || className == "ComboBox" || className == "ListBox" || className ==
+ "TreeWidget" || className == "TextBrowser")
+ return true;
+
+ if (className.mid(1) == "ListBox")
+ return true;
+ if (className.mid(1) == "ComboBox")
+ return true;
+ if (className.mid(1) == "ListView")
+ return true;
+ if (className.mid(1) == "IconView")
+ return true;
+ if (className == "QTextEdit" || className == "QMultiLineEdit")
+ return true;
+ if (className.contains("Table"))
+ return true;
+
+ return false;
+}
+
+bool WidgetFactory::hasItems( int id )
+{
+ QString className = WidgetDatabase::className(id);
+
+ if (className == "ComboBox" || className == "ListBox" || className == "TreeWidget")
+ return true;
+ if (className.mid(1) == "ListBox" || className.mid(1) == "ListView" ||
+ className.mid(1) == "IconView" || className.mid(1) == "ComboBox" ||
+ className.contains("Table"))
+ return true;
+
+ return false;
+}
+
+void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw )
+{
+ QString className = WidgetDatabase::className(id);
+
+#ifdef KOMMANDER
+ if (className == "ComboBox")
+ {
+ if (!editWidget->inherits("QComboBox"))
+ return;
+
+ QComboBox *cb = (QComboBox *) editWidget;
+
+ ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
+ e->exec();
+ delete e;
+
+ cb->update();
+
+ return;
+ }
+ if (className == "TextEdit" || className == "TextBrowser")
+ {
+ MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
+ e->exec();
+ delete e;
+ return;
+ }
+ if (className == "TreeWidget")
+ {
+ if (!editWidget->inherits("QListView"))
+ return;
+ QListView *lv = (QListView *) editWidget;
+ ListViewEditor *e = new ListViewEditor(parent, lv, fw);
+ e->exec();
+ delete e;
+ return;
+ }
+ if (className == "ListBox")
+ {
+ if (!editWidget->inherits("QListBox"))
+ return;
+ ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
+ e->exec();
+ delete e;
+ return;
+ }
+#endif
+ if (className.mid(1) == "ListBox")
+ {
+ if (!editWidget->inherits("QListBox"))
+ return;
+ ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
+ e->exec();
+ delete e;
+ return;
+ }
+
+ if (className.mid(1) == "ComboBox")
+ {
+ if (!editWidget->inherits("QComboBox"))
+ return;
+ QComboBox *cb = (QComboBox *) editWidget;
+ ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
+ e->exec();
+ delete e;
+ cb->update();
+ return;
+ }
+
+ if (className.mid(1) == "ListView")
+ {
+ if (!editWidget->inherits("QListView"))
+ return;
+ QListView *lv = (QListView *) editWidget;
+ ListViewEditor *e = new ListViewEditor(parent, lv, fw);
+ e->exec();
+ delete e;
+ return;
+ }
+
+ if (className.mid(1) == "IconView")
+ {
+ if (!editWidget->inherits("QIconView"))
+ return;
+ IconViewEditor *e = new IconViewEditor(parent, editWidget, fw);
+ e->exec();
+ delete e;
+ return;
+ }
+
+ if (className == "QMultiLineEdit" || className == "QTextEdit")
+ {
+ MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
+ e->exec();
+ delete e;
+ return;
+ }
+#ifndef QT_NO_TABLE
+ if (className.contains("Table"))
+ {
+ TableEditor *e = new TableEditor(parent, editWidget, fw);
+ e->exec();
+ delete e;
+ return;
+ }
+#endif
+}
+
+bool WidgetFactory::canResetProperty( QObject *w, const QString &propName )
+{
+ if ( propName == "name" || propName == "geometry" )
+ return false;
+ QStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
+ return l.findIndex( propName ) == -1;
+}
+
+bool WidgetFactory::resetProperty( QObject *w, const QString &propName )
+{
+ const QMetaProperty *p = w->metaObject()->property( w->metaObject()->
+ findProperty( propName, true ), true );
+ if (!p )
+ return false;
+ return p->reset( w );
+}
+
+QVariant WidgetFactory::defaultValue( QObject *w, const QString &propName )
+{
+ if ( propName == "wordwrap" ) {
+ int v = defaultValue( w, "alignment" ).toInt();
+ return QVariant( ( v & WordBreak ) == WordBreak, 0 );
+ } else if ( propName == "toolTip" || propName == "whatsThis" ) {
+ return QVariant( QString::fromLatin1( "" ) );
+ } else if ( w->inherits( "CustomWidget" ) ) {
+ return QVariant();
+ } else if ( propName == "frameworkCode" ) {
+ return QVariant( true, 0 );
+ } else if ( propName == "layoutMargin" ) {
+ if ( w->inherits( "QLayoutWidget" ) )
+ return QVariant( 0 );
+ else if ( MainWindow::self->formWindow() )
+ return QVariant( MainWindow::self->formWindow()->layoutDefaultMargin() );
+ } else if ( propName == "layoutSpacing" ) {
+ if ( MainWindow::self->formWindow() )
+ return QVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() );
+ }
+
+ return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName );
+}
+
+QString WidgetFactory::defaultCurrentItem( QObject *w, const QString &propName )
+{
+ const QMetaProperty *p = w->metaObject()->
+ property( w->metaObject()->findProperty( propName, true ), true );
+ if ( !p ) {
+ int v = defaultValue( w, "alignment" ).toInt();
+ if ( propName == "hAlign" ) {
+ if ( ( v & AlignAuto ) == AlignAuto )
+ return "AlignAuto";
+ if ( ( v & AlignLeft ) == AlignLeft )
+ return "AlignLeft";
+ if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignHCenter ) == AlignHCenter )
+ return "AlignHCenter";
+ if ( ( v & AlignRight ) == AlignRight )
+ return "AlignRight";
+ if ( ( v & AlignJustify ) == AlignJustify )
+ return "AlignJustify";
+ } else if ( propName == "vAlign" ) {
+ if ( ( v & AlignTop ) == AlignTop )
+ return "AlignTop";
+ if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignVCenter ) == AlignVCenter )
+ return "AlignVCenter";
+ if ( ( v & AlignBottom ) == AlignBottom )
+ return "AlignBottom";
+ }
+ return QString::null;
+
+ }
+ return p->valueToKey( defaultValue( w, propName ).toInt() );
+}
+
+QWidget *WidgetFactory::createCustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *w )
+{
+ if ( !w )
+ return 0;
+ return new CustomWidget( parent, name, w );
+}
+
+QVariant WidgetFactory::property( QObject *w, const char *name )
+{
+ QVariant v = w->property( name );
+ if ( v.isValid() )
+ return v;
+ return MetaDataBase::fakeProperty( w, name );
+}
+
+void QDesignerLabel::updateBuddy()
+{
+
+ if ( myBuddy.isEmpty() )
+ return;
+
+ QObjectList *l = topLevelWidget()->queryList( "QWidget", myBuddy, false, true );
+ if ( !l || !l->first() ) {
+ delete l;
+ return;
+ }
+
+ QLabel::setBuddy( (QWidget*)l->first() );
+ delete l;
+}
+
+void QDesignerWidget::paintEvent( QPaintEvent *e )
+{
+ formwindow->paintGrid( this, e );
+}
+
+void QDesignerDialog::paintEvent( QPaintEvent *e )
+{
+ formwindow->paintGrid( this, e );
+}
+
+void EditorDialog::paintEvent( QPaintEvent *e )
+{
+ formwindow->paintGrid( this, e );
+}
+
+QSizePolicy QLayoutWidget::sizePolicy() const
+{
+ return sp;
+}
+
+bool QLayoutWidget::event( QEvent *e )
+{
+ if ( e && ( e->type() == QEvent::ChildInserted ||
+ e->type() == QEvent::ChildRemoved ||
+ e->type() == QEvent::LayoutHint ||
+ e->type() == QEvent::Reparent ) )
+ updateSizePolicy();
+ return QWidget::event( e );
+}
+
+/*
+ This function must be called on QLayoutWidget creation and whenever
+ the QLayoutWidget's parent layout changes (e.g., from a QHBoxLayout
+ to a QVBoxLayout), because of the (illogical) way layouting works.
+*/
+void QLayoutWidget::updateSizePolicy()
+{
+ if ( !children() || children()->count() == 0 ) {
+ sp = QWidget::sizePolicy();
+ return;
+ }
+
+ /*
+ QSizePolicy::MayShrink & friends are private. Here we assume the
+ following:
+
+ Fixed = 0
+ Maximum = MayShrink
+ Minimum = MayGrow
+ Preferred = MayShrink | MayGrow
+ */
+
+ int ht = (int) QSizePolicy::Preferred;
+ int vt = (int) QSizePolicy::Preferred;
+
+ if ( layout() ) {
+ /*
+ parentLayout is set to the parent layout if there is one and if it is
+ top level, in which case layouting is illogical.
+ */
+ QLayout *parentLayout = 0;
+ if ( parent() && parent()->isWidgetType() ) {
+ parentLayout = ((QWidget *)parent())->layout();
+ if ( parentLayout && parentLayout->mainWidget()->inherits("QLayoutWidget") )
+ parentLayout = 0;
+ }
+
+ QObjectListIt it( *children() );
+ QObject *o;
+
+ if ( layout()->inherits("QVBoxLayout") ) {
+ if ( parentLayout && parentLayout->inherits("QHBoxLayout") )
+ vt = QSizePolicy::Minimum;
+ else
+ vt = QSizePolicy::Fixed;
+
+ while ( ( o = it.current() ) ) {
+ ++it;
+ if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) )
+ continue;
+ QWidget *w = (QWidget*)o;
+
+ if ( !w->sizePolicy().mayGrowHorizontally() )
+ ht &= ~QSizePolicy::Minimum;
+ if ( !w->sizePolicy().mayShrinkHorizontally() )
+ ht &= ~QSizePolicy::Maximum;
+ if ( w->sizePolicy().mayGrowVertically() )
+ vt |= QSizePolicy::Minimum;
+ if ( w->sizePolicy().mayShrinkVertically() )
+ vt |= QSizePolicy::Maximum;
+ }
+ } else if ( layout()->inherits("QHBoxLayout") ) {
+ if ( parentLayout && parentLayout->inherits("QVBoxLayout") )
+ ht = QSizePolicy::Minimum;
+ else
+ ht = QSizePolicy::Fixed;
+
+ while ( ( o = it.current() ) ) {
+ ++it;
+ if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) )
+ continue;
+ QWidget *w = (QWidget*)o;
+
+ if ( w->sizePolicy().mayGrowHorizontally() )
+ ht |= QSizePolicy::Minimum;
+ if ( w->sizePolicy().mayShrinkHorizontally() )
+ ht |= QSizePolicy::Maximum;
+ if ( !w->sizePolicy().mayGrowVertically() )
+ vt &= ~QSizePolicy::Minimum;
+ if ( !w->sizePolicy().mayShrinkVertically() )
+ vt &= ~QSizePolicy::Maximum;
+ }
+ } else if ( layout()->inherits("QGridLayout") ) {
+ ht = QSizePolicy::Fixed;
+ vt = QSizePolicy::Fixed;
+ if ( parentLayout ) {
+ if ( parentLayout->inherits("QVBoxLayout") )
+ ht = QSizePolicy::Minimum;
+ else if ( parentLayout->inherits("QHBoxLayout") )
+ vt = QSizePolicy::Minimum;
+ }
+
+ while ( ( o = it.current() ) ) {
+ ++it;
+ if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) )
+ continue;
+ QWidget *w = (QWidget*)o;
+
+ if ( w->sizePolicy().mayGrowHorizontally() )
+ ht |= QSizePolicy::Minimum;
+ if ( w->sizePolicy().mayShrinkHorizontally() )
+ ht |= QSizePolicy::Maximum;
+ if ( w->sizePolicy().mayGrowVertically() )
+ vt |= QSizePolicy::Minimum;
+ if ( w->sizePolicy().mayShrinkVertically() )
+ vt |= QSizePolicy::Maximum;
+ }
+ }
+ if ( layout()->expanding() & QSizePolicy::Horizontally )
+ ht = QSizePolicy::Expanding;
+ if ( layout()->expanding() & QSizePolicy::Vertically )
+ vt = QSizePolicy::Expanding;
+
+ layout()->invalidate();
+ }
+
+ sp = QSizePolicy( (QSizePolicy::SizeType) ht, (QSizePolicy::SizeType) vt );
+ updateGeometry();
+}
+
+void CustomWidget::paintEvent( QPaintEvent *e )
+{
+ if ( parentWidget() && parentWidget()->inherits( "FormWindow" ) ) {
+ ( (FormWindow*)parentWidget() )->paintGrid( this, e );
+ } else {
+ QPainter p( this );
+ p.fillRect( rect(), colorGroup().dark() );
+ p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2,
+ ( height() - cusw->pixmap->height() ) / 2,
+ *cusw->pixmap );
+ }
+}
+
+
+#include "widgetfactory.moc"
diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h
new file mode 100644
index 00000000..03d2b2f1
--- /dev/null
+++ b/kommander/editor/widgetfactory.h
@@ -0,0 +1,473 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef WIDGETFACTORY_H
+#define WIDGETFACTORY_H
+
+#include <qvariant.h>
+#include <qiconset.h>
+#include <qstring.h>
+#include <qintdict.h>
+#include <qtabwidget.h>
+#include <qpixmap.h>
+#include <qsize.h>
+#include <qpainter.h>
+#include <qevent.h>
+#include <qobjectlist.h>
+#include <qlabel.h>
+#include <qwizard.h>
+#include <qptrdict.h>
+#include <qpushbutton.h>
+#include <qtoolbutton.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qbuttongroup.h>
+
+#include "metadatabase.h"
+#ifndef KOMMANDER
+#include "qwidgetfactory.h"
+#include "ewidgetfactory.h"
+#else
+#include "kommanderfactory.h"
+#endif
+
+/* KOMMANDER INCLUDES */
+#include <dialog.h>
+#include <wizard.h>
+#include <tabwidget.h>
+#include "toolbox.h"
+
+class QWidget;
+class QLayout;
+class FormWindow;
+
+class WidgetFactory : public Qt
+{
+ friend class CustomWidgetFactory;
+
+public:
+ enum LayoutType {
+ HBox,
+ VBox,
+ Grid,
+ NoLayout
+ };
+
+ static QWidget *create( int id, QWidget *parent, const char *name = 0, bool init = TRUE,
+ const QRect *rect = 0, Qt::Orientation orient = Qt::Horizontal );
+ static QLayout *createLayout( QWidget *widget, QLayout* layout, LayoutType type );
+ static void deleteLayout( QWidget *widget );
+
+ static LayoutType layoutType( QWidget *w );
+ static LayoutType layoutType( QWidget *w, QLayout *&layout );
+ static LayoutType layoutType( QLayout *layout );
+ static QWidget *layoutParent( QLayout *layout );
+
+ static QWidget* containerOfWidget( QWidget *w );
+ static QWidget* widgetOfContainer( QWidget *w );
+
+ static bool isPassiveInteractor( QObject* o );
+ static const char* classNameOf( QObject* o );
+
+ static void initChangedProperties( QObject *o );
+
+ static bool hasSpecialEditor( int id );
+ static bool hasItems( int id );
+ static void editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw );
+
+ static bool canResetProperty( QObject *w, const QString &propName );
+ static bool resetProperty( QObject *w, const QString &propName );
+ static QVariant defaultValue( QObject *w, const QString &propName );
+ static QString defaultCurrentItem( QObject *w, const QString &propName );
+
+ static QVariant property( QObject *w, const char *name );
+ static void saveDefaultProperties( QWidget *w, int id );
+
+private:
+ static QWidget *createWidget( const QString &className, QWidget *parent, const char *name, bool init,
+ const QRect *r = 0, Qt::Orientation orient = Qt::Horizontal );
+ static QWidget *createCustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *w );
+
+};
+
+
+class QDesignerTabWidget : public QTabWidget
+{
+ Q_OBJECT
+ Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+public:
+ QDesignerTabWidget( QWidget *parent, const char *name );
+
+ int currentPage() const;
+ void setCurrentPage( int i );
+ QString pageTitle() const;
+ void setPageTitle( const QString& title );
+ QCString pageName() const;
+ void setPageName( const QCString& name );
+
+ int count() const;
+ QTabBar *tabBar() const { return QTabWidget::tabBar(); }
+
+ bool eventFilter( QObject*, QEvent* );
+
+private:
+ QPoint pressPoint;
+ QWidget *dropIndicator;
+ QWidget *dragPage;
+ QString dragLabel;
+ bool mousePressed;
+};
+
+class EditorTabWidget : public TabWidget
+{
+ Q_OBJECT
+ Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+public:
+ EditorTabWidget( QWidget *parent, const char *name );
+
+ int currentPage() const;
+ void setCurrentPage( int i );
+ QString pageTitle() const;
+ void setPageTitle( const QString& title );
+ QCString pageName() const;
+ void setPageName( const QCString& name );
+
+ int count() const;
+ QTabBar *tabBar() const { return QTabWidget::tabBar(); }
+
+ bool eventFilter( QObject*, QEvent* );
+
+private:
+ QPoint pressPoint;
+ QWidget *dropIndicator;
+ QWidget *dragPage;
+ QString dragLabel;
+ bool mousePressed;
+};
+
+class EditorToolBox : public ToolBox
+{
+ Q_OBJECT
+ Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+public:
+ EditorToolBox( QWidget *parent, const char *name );
+
+ int currentPage() const;
+ void setCurrentPage( int i );
+ QString pageTitle() const;
+ void setPageTitle( const QString& title );
+ QCString pageName() const;
+ void setPageName( const QCString& name );
+
+ int count() const;
+};
+
+class QDesignerWizard : public QWizard
+{
+ Q_OBJECT
+ Q_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true )
+ Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+public:
+ QDesignerWizard( QWidget *parent, const char *name ) : QWizard( parent, name ) {}
+
+ int currentPageNum() const;
+ void setCurrentPage( int i );
+ QString pageTitle() const;
+ void setPageTitle( const QString& title );
+ QCString pageName() const;
+ void setPageName( const QCString& name );
+ int pageNum( QWidget *page );
+ void addPage( QWidget *p, const QString & );
+ void removePage( QWidget *p );
+ void insertPage( QWidget *p, const QString &t, int index );
+ bool isPageRemoved( QWidget *p ) { return (removedPages.find( p ) != 0); }
+
+ void reject() {}
+
+private:
+ struct Page
+ {
+ Page( QWidget *a, const QString &b ) : p( a ), t( b ) {}
+ Page() : p( 0 ), t( QString::null ) {}
+ QWidget *p;
+ QString t;
+ };
+ QPtrDict<QWidget> removedPages;
+
+};
+
+class QLayoutWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ QLayoutWidget( QWidget *parent, const char *name ) : QWidget( parent, name ), sp( QWidget::sizePolicy() ) {}
+
+ QSizePolicy sizePolicy() const;
+ void updateSizePolicy();
+
+protected:
+ void paintEvent( QPaintEvent * );
+ bool event( QEvent * );
+ QSizePolicy sp;
+
+};
+
+
+class CustomWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *cw )
+ : QWidget( parent, name ), cusw( cw ) {
+ alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" );
+ setSizePolicy( cw->sizePolicy );
+ if ( !alwaysExpand )
+ setBackgroundMode( PaletteDark );
+ }
+
+ QSize sizeHint() const {
+ QSize sh = cusw->sizeHint;
+ if ( sh.isValid() )
+ return sh;
+ return QWidget::sizeHint();
+ }
+
+ QString realClassName() { return cusw->className; }
+ MetaDataBase::CustomWidget *customWidget() const { return cusw; }
+
+protected:
+ void paintEvent( QPaintEvent *e );
+
+ MetaDataBase::CustomWidget *cusw;
+ bool alwaysExpand;
+
+};
+
+
+class Line : public QFrame
+{
+ Q_OBJECT
+
+ Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
+ Q_OVERRIDE( int frameWidth DESIGNABLE false )
+ Q_OVERRIDE( Shape frameShape DESIGNABLE false )
+ Q_OVERRIDE( QRect frameRect DESIGNABLE false )
+ Q_OVERRIDE( QRect contentsRect DESIGNABLE false )
+public:
+ Line( QWidget *parent, const char *name )
+ : QFrame( parent, name, WMouseNoMask ) {
+ setFrameStyle( HLine | Sunken );
+ }
+
+ void setOrientation( Orientation orient ) {
+ if ( orient == Horizontal )
+ setFrameShape( HLine );
+ else
+ setFrameShape( VLine );
+ }
+ Orientation orientation() const {
+ return frameShape() == HLine ? Horizontal : Vertical;
+ }
+};
+
+class QDesignerLabel : public QLabel
+{
+ Q_OBJECT
+
+ Q_PROPERTY( QCString buddy READ buddyWidget WRITE setBuddyWidget )
+
+public:
+ QDesignerLabel( QWidget *parent = 0, const char *name = 0 )
+ : QLabel( parent, name ) { myBuddy = 0; }
+
+ void setBuddyWidget( const QCString &b ) {
+ myBuddy = b;
+ updateBuddy();
+ }
+ QCString buddyWidget() const {
+ return myBuddy;
+ };
+
+protected:
+ void showEvent( QShowEvent *e ) {
+ QLabel::showEvent( e );
+ updateBuddy();
+ }
+
+
+private:
+ void updateBuddy();
+
+ QCString myBuddy;
+
+};
+
+class QDesignerWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ QDesignerWidget( FormWindow *fw, QWidget *parent, const char *name )
+ : QWidget( parent, name, WResizeNoErase ), formwindow( fw ) {}
+
+protected:
+ void paintEvent( QPaintEvent *e );
+
+private:
+ FormWindow *formwindow;
+
+};
+
+class QDesignerDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ QDesignerDialog( FormWindow *fw, QWidget *parent, const char *name )
+ : QDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
+
+protected:
+ void paintEvent( QPaintEvent *e );
+
+private:
+ FormWindow *formwindow;
+
+};
+
+class QDesignerToolButton : public QToolButton
+{
+ Q_OBJECT
+ Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+
+public:
+ QDesignerToolButton( QWidget *parent, const char *name )
+ : QToolButton( parent, name ) {}
+
+ bool isInButtonGroup() const {
+ return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ }
+ int buttonGroupId() const {
+ return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ }
+ void setButtonGroupId( int id ) {
+ if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
+ ( (QButtonGroup*)parentWidget() )->remove( this );
+ ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ }
+ }
+};
+
+class QDesignerRadioButton : public QRadioButton
+{
+ Q_OBJECT
+ Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+
+public:
+ QDesignerRadioButton( QWidget *parent, const char *name )
+ : QRadioButton( parent, name ) {}
+
+ bool isInButtonGroup() const {
+ return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ }
+ int buttonGroupId() const {
+ return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ }
+ void setButtonGroupId( int id ) {
+ if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
+ ( (QButtonGroup*)parentWidget() )->remove( this );
+ ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ }
+ }
+
+};
+
+class QDesignerPushButton : public QPushButton
+{
+ Q_OBJECT
+ Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+
+public:
+ QDesignerPushButton( QWidget *parent, const char *name )
+ : QPushButton( parent, name ) {}
+
+ bool isInButtonGroup() const {
+ return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ }
+ int buttonGroupId() const {
+ return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ }
+ void setButtonGroupId( int id ) {
+ if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
+ ( (QButtonGroup*)parentWidget() )->remove( this );
+ ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ }
+ }
+
+};
+
+class QDesignerCheckBox : public QCheckBox
+{
+ Q_OBJECT
+ Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+
+public:
+ QDesignerCheckBox( QWidget *parent, const char *name )
+ : QCheckBox( parent, name ) {}
+
+ bool isInButtonGroup() const {
+ return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ }
+ int buttonGroupId() const {
+ return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ }
+ void setButtonGroupId( int id ) {
+ if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
+ ( (QButtonGroup*)parentWidget() )->remove( this );
+ ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ }
+ }
+
+};
+
+class EditorDialog : public Dialog
+{
+ Q_OBJECT
+
+public:
+ EditorDialog( FormWindow *fw, QWidget *parent, const char *name )
+ : Dialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) { }
+
+protected:
+ void paintEvent( QPaintEvent *e );
+
+private:
+ FormWindow *formwindow;
+
+};
+#endif
diff --git a/kommander/editor/widgetinterface.h b/kommander/editor/widgetinterface.h
new file mode 100644
index 00000000..bf6bcd55
--- /dev/null
+++ b/kommander/editor/widgetinterface.h
@@ -0,0 +1,29 @@
+ /**********************************************************************
+** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef WIDGETINTERFACE_H
+#define WIDGETINTERFACE_H
+
+#include <private/qwidgetinterface_p.h>
+
+#define WidgetInterface QWidgetFactoryInterface
+#define IID_Widget IID_QWidgetFactory
+
+#endif
diff --git a/kommander/editor/wizardeditor.ui b/kommander/editor/wizardeditor.ui
new file mode 100644
index 00000000..c73e2628
--- /dev/null
+++ b/kommander/editor/wizardeditor.ui
@@ -0,0 +1,320 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>WizardEditorBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>WizardEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>369</width>
+ <height>245</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Wizard Page Editor</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout19</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>Layout14</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>pagesLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Wizard pages:</string>
+ </property>
+ </widget>
+ <widget class="QListBox">
+ <property name="name">
+ <cstring>listBox</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout18</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="QPushButton">
+ <property name="name">
+ <cstring>buttonAdd</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonRemove</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name" stdset="0">
+ <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>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonUp</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonDown</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <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>buttonHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name" stdset="0">
+ <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="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and apply all the changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonApply</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Apply</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Apply all changes.</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Close the dialog and discard any changes.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="1040">789c5dcf4d73a2401006e0bbbf82726ed61609ca0c4c6ded0125dfd1985baab6f600338c280a46fc08a6f6bf2f3ddd26abc0619eb7677a9aab9ef3361d3bbdab4ebd4db673e5a83cd9383dbd5bad9adf7f7e7d76ba9e70dacfe78ed7fdd1e9ba8e72265599c17adaae99773df033cb9818225f2cc38132027887f4af8d01ee817dc935720d1c7827d648c1910f969273cd8123e4a93a21d2d95ba0ef098d631864409b6f2c13c195063e210389d55720ef0b8dd56764e021c7c8905acd2c93b66aa71a224389fffb0e14fd4062f51119d290115252ab2391c6585ab653a5f6de033294f8fbf74849175544eacc80c120e478b644267451434c90a9659a78d8aa2066585d00c33425ae80d25702b92352756ea91475ce90ba8f4c80299cb5177d58ea8c5a6d819a67b4595b66865a29602632628e3406b9011a73a26b1f96a40c575f19536dc7d959c6543e5f1466f95fd646aba22cabf5fb57c636f9a24ddaa75e52c6b6f90ea3aada2f313b7ccc1b1b1da3e128a67df09aaa1addb82963dfb3b8b7cdf18e9dcfe70e8b687f91b1fba25acf2eb2a289460f17d9a28c4c7c9e1d8ae8f1e9227b1e4feafa859d9f8de378fa8afbfefeecfc030f08f1a3</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="1085">789c5dd0cd6ee2301000e03b4f11911b5ad1189290a8da0324a5e90f29941e2aadf6e0d84ea10d1020849ad5befb7a3cceaa29e2e06f663c33ce55cf7a9dcfacde55e758d16acd2cb6a207abc74f9b8dfcf5fbe79f4e97f896fabb8145ba3f3addbec5ac74b715704ed5d9769c01cb73e0423368f80224c190e53e70091c389e83d98366e83942679f0c43cc7e0087c4f3307b63c8b1d559337459c6810f48df137aab49436c750f748917320f78418e4cf65993fa04b33572c4313b067a039f333de80e39e238680ff4d5d2581c69d2c0c3ad8e0db1f30619127cd1dcd00c7a4452824c80a321359d73cd8c129c1b1b0acc726030a414b31299f9989d1952a4d0ccc23073819f861c973c2133d3b904aacf6ceeda9a8c12bc5b219929de21f9005900a99bf9f8e9a8a159728a5477f5d77847367719305373b1788b14668d4c9337d95b2437ef5d03b9c84df10a28fc866fc05c9522fbf0b369c6b8d0c7ffb1fc6db57effb0bfc68acd7657ee0fedba63599dea73d18a7dca525ec6ed3aa16293a81d2bf232beb1bfc578d58a416731ad641da95381b1e3f496ca939432c9f3bb7b8c450f8fb39994b18c93493a36fda2a7b9aa8ae3e4b278b69b192aa822499dc2d6cddc68b94ff697f46c7fdd255ad6f5e2dbdbfac7c3cbd8ecf7f7baf30f538f0154</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonHelp</sender>
+ <signal>clicked()</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>helpClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonApply</sender>
+ <signal>clicked()</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>applyClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonUp</sender>
+ <signal>clicked()</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>upClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonDown</sender>
+ <signal>clicked()</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>downClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonAdd</sender>
+ <signal>clicked()</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>addClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonRemove</sender>
+ <signal>clicked()</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>removeClicked()</slot>
+ </connection>
+ <connection>
+ <sender>listBox</sender>
+ <signal>selected(int)</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>itemSelected(int)</slot>
+ </connection>
+ <connection>
+ <sender>listBox</sender>
+ <signal>highlighted(int)</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>itemHighlighted(int)</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>okClicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>WizardEditorBase</receiver>
+ <slot>cancelClicked()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot access="protected">init()</slot>
+ <slot access="protected">destroy()</slot>
+ <slot access="protected">addClicked()</slot>
+ <slot access="protected">applyClicked()</slot>
+ <slot access="protected">cancelClicked()</slot>
+ <slot access="protected">downClicked()</slot>
+ <slot access="protected">helpClicked()</slot>
+ <slot access="protected">itemHighlighted(int)</slot>
+ <slot access="protected">itemSelected(int)</slot>
+ <slot access="protected">okClicked()</slot>
+ <slot access="protected">removeClicked()</slot>
+ <slot access="protected">upClicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/editor/wizardeditorimpl.cpp b/kommander/editor/wizardeditorimpl.cpp
new file mode 100644
index 00000000..12f8d33f
--- /dev/null
+++ b/kommander/editor/wizardeditorimpl.cpp
@@ -0,0 +1,220 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "wizardeditorimpl.h"
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "pixmapchooser.h"
+#include "command.h"
+
+#include <qwizard.h>
+#include <qlistbox.h>
+#include <qpushbutton.h>
+#include <kinputdialog.h>
+
+#include <klocale.h>
+
+WizardEditor::WizardEditor( QWidget *parent, QWizard *w, FormWindow *fw )
+ : WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w )
+{
+ connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ fillListBox();
+}
+
+WizardEditor::~WizardEditor()
+{
+ commands.setAutoDelete( true );
+}
+
+void WizardEditor::okClicked()
+{
+ applyClicked();
+ accept();
+}
+
+void WizardEditor::cancelClicked()
+{
+ reject();
+}
+
+void WizardEditor::applyClicked()
+{
+ if ( commands.isEmpty() ) return;
+
+ // schedule macro command
+ MacroCommand* cmd = new MacroCommand( i18n("Edit Wizard Pages" ), formwindow, commands );
+ formwindow->commandHistory()->addCommand( cmd );
+ cmd->execute();
+
+ // clear command list
+ commands.clear();
+
+ // fix wizard buttons
+ for ( int i = 0; i < wizard->pageCount(); i++ ) {
+
+ QWidget * page = wizard->page( i );
+ if ( i == 0 ) { // first page
+
+ wizard->setBackEnabled( page, false );
+ wizard->setNextEnabled( page, true );
+ }
+ else if ( i == wizard->pageCount() - 1 ) { // last page
+
+ wizard->setBackEnabled( page, true );
+ wizard->setNextEnabled( page, false );
+ }
+ else {
+
+ wizard->setBackEnabled( page, true );
+ wizard->setNextEnabled( page, true );
+ }
+ wizard->setFinishEnabled( page, false );
+ }
+
+ // update listbox
+ int index = listBox->currentItem();
+ fillListBox();
+ listBox->setCurrentItem( index );
+
+ // show current page
+ wizard->showPage( wizard->page( 0 ) );
+}
+
+void WizardEditor::helpClicked()
+{
+
+}
+
+void WizardEditor::addClicked()
+{
+ int index = listBox->currentItem() + 1;
+ // update listbox
+ listBox->insertItem( i18n( "Page" ), index );
+
+ // schedule add command
+ AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wizard->name() ),
+ formwindow, wizard, "Page", index, false);
+ commands.append( cmd );
+
+ // update buttons
+ updateButtons();
+}
+
+void WizardEditor::removeClicked()
+{
+ if (listBox->count() < 2 ) return;
+
+ int index = listBox->currentItem();
+
+ // update listbox
+ listBox->removeItem( index);
+
+ // schedule remove command
+ DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" )
+ .arg( listBox->text( index ) ).arg( wizard->name() ),
+ formwindow, wizard, index, false );
+ commands.append( cmd );
+
+ // update buttons
+ updateButtons();
+}
+
+void WizardEditor::upClicked()
+{
+ int index1 = listBox->currentItem();
+ int index2 = index1 - 1;
+
+ // swap listbox items
+ QString item1 = listBox->text( index1 );
+ listBox->removeItem( index1 );
+ listBox->insertItem( item1, index2 );
+ listBox->setCurrentItem( index2 );
+
+ // schedule swap command
+ SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 )
+ .arg( wizard->name() ), formwindow, wizard, index1, index2);
+ commands.append( cmd );
+
+ // update buttons
+ updateButtons();
+}
+
+void WizardEditor::downClicked()
+{
+ int index1 = listBox->currentItem();
+ int index2 = index1 + 1;
+
+ // swap listbox items
+ QString item1 = listBox->text( index1 );
+ listBox->removeItem( index1 );
+ listBox->insertItem( item1, index2 );
+ listBox->setCurrentItem( index2 );
+
+ // schedule swap command
+ SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 )
+ .arg( wizard->name() ), formwindow, wizard, index2, index1);
+ commands.append( cmd );
+
+ // update buttons
+ updateButtons();
+}
+
+void WizardEditor::fillListBox()
+{
+ listBox->clear();
+
+ if ( !wizard ) return;
+ for ( int i = 0; i < wizard->pageCount(); i++ )
+ listBox->insertItem( wizard->title( wizard->page( i ) ) );
+
+ updateButtons();
+}
+
+void WizardEditor::itemHighlighted( int )
+{
+ updateButtons();
+}
+
+void WizardEditor::itemSelected( int index )
+{
+ if ( index < 0 ) return;
+
+ bool ok = false;
+ QString text = KInputDialog::getText( i18n("Page Title"), i18n("New page title:" ), listBox->text( index ), &ok, this );
+ if ( ok ) {
+ QString pn( i18n("Rename page %1 of %2" ).arg( listBox->text( index ) ).arg( wizard->name() ) );
+ RenameWizardPageCommand *cmd = new RenameWizardPageCommand( pn, formwindow, wizard, index, text );
+ commands.append( cmd );
+ listBox->changeItem( text, index );
+ }
+}
+
+void WizardEditor::updateButtons()
+{
+ int index = listBox->currentItem();
+
+ buttonUp->setEnabled( index > 0 );
+ buttonDown->setEnabled( index < (int)listBox->count() - 1 );
+ buttonRemove->setEnabled( index >= 0 );
+
+ if ( listBox->count() < 2 )
+ buttonRemove->setEnabled( false );
+}
+#include "wizardeditorimpl.moc"
diff --git a/kommander/editor/wizardeditorimpl.h b/kommander/editor/wizardeditorimpl.h
new file mode 100644
index 00000000..3a9f909e
--- /dev/null
+++ b/kommander/editor/wizardeditorimpl.h
@@ -0,0 +1,64 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef WIZARDEDITORIMPL_H
+#define WIZARDEDITORIMPL_H
+
+class QWizard;
+class FormWindow;
+
+#include <qptrlist.h>
+
+#include "wizardeditor.h"
+#include "command.h"
+
+class WizardEditor : public WizardEditorBase
+{
+ Q_OBJECT
+
+public:
+ WizardEditor( QWidget *parent, QWizard *wizard, FormWindow *fw );
+ ~WizardEditor();
+
+protected slots:
+ void okClicked();
+ void applyClicked();
+ void cancelClicked();
+ void helpClicked();
+
+ void addClicked();
+ void removeClicked();
+ void upClicked();
+ void downClicked();
+
+ void itemHighlighted( int );
+ void itemSelected( int );
+
+private:
+ void updateButtons();
+ void fillListBox();
+
+private:
+ FormWindow *formwindow;
+ QWizard *wizard;
+ QPtrList<Command> commands;
+};
+
+#endif
diff --git a/kommander/editor/workspace.cpp b/kommander/editor/workspace.cpp
new file mode 100644
index 00000000..c5c6420e
--- /dev/null
+++ b/kommander/editor/workspace.cpp
@@ -0,0 +1,787 @@
+/**********************************************************************
+** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qvariant.h> // HP-UX compiler needs this here
+#include <qlistview.h>
+#include "workspace.h"
+#include "formwindow.h"
+#include "mainwindow.h"
+#include "pixmapchooser.h"
+#include "globaldefs.h"
+#include "command.h"
+#ifndef KOMMANDER
+#include "project.h"
+#include "pixmapcollection.h"
+#include "sourcefile.h"
+#include "sourceeditor.h"
+#endif
+#include "formfile.h"
+
+#include <qheader.h>
+#include <qfileinfo.h>
+#include <qapplication.h>
+#include <qpainter.h>
+#include <qpen.h>
+#include <qobjectlist.h>
+#include <qworkspace.h>
+#include <qpopupmenu.h>
+#include <qtextstream.h>
+#include "qcompletionedit.h"
+
+#include <kurldrag.h>
+#include <klocale.h>
+
+static const char * const folderxpm[]={
+ "16 16 6 1",
+ ". c None",
+ "b c #ffff00",
+ "d c #000000",
+ "* c #999999",
+ "a c #cccccc",
+ "c c #ffffff",
+ "................",
+ "................",
+ "..*****.........",
+ ".*ababa*........",
+ "*abababa******..",
+ "*cccccccccccc*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "**************d.",
+ ".dddddddddddddd.",
+ "................"};
+
+static const char * const file_xpm[]={
+ "16 16 5 1",
+ ". c #7f7f7f",
+ "# c None",
+ "c c #000000",
+ "b c #bfbfbf",
+ "a c #ffffff",
+ "################",
+ "..........######",
+ ".aaaaaaaab.#####",
+ ".aaaaaaaaba.####",
+ ".aaaaaaaacccc###",
+ ".aaaaaaaaaabc###",
+ ".aaaaaaaaaabc###",
+ ".aaaaaaaaaabc###",
+ ".aaaaaaaaaabc###",
+ ".aaaaaaaaaabc###",
+ ".aaaaaaaaaabc###",
+ ".aaaaaaaaaabc###",
+ ".aaaaaaaaaabc###",
+ ".aaaaaaaaaabc###",
+ ".bbbbbbbbbbbc###",
+ "ccccccccccccc###"};
+
+static QPixmap *folderPixmap = 0;
+static QPixmap *filePixmap = 0;
+static QPixmap* formPixmap = 0;
+
+#ifndef KOMMANDER
+WorkspaceItem::WorkspaceItem( QListView *parent, Project* p )
+#else
+WorkspaceItem::WorkspaceItem( QListView *parent )
+#endif
+ : QListViewItem( parent )
+{
+ init();
+#ifndef KOMMANDER
+ project = p;
+#endif
+ t = ProjectType;
+ setPixmap( 0, *folderPixmap );
+ setExpandable( false );
+}
+
+#ifndef KOMMANDER
+WorkspaceItem::WorkspaceItem( QListViewItem *parent, SourceFile* sf )
+ : QListViewItem( parent )
+{
+ init();
+ sourceFile = sf;
+ t = SourceFileType;
+ setPixmap( 0, *filePixmap );
+}
+#endif
+
+WorkspaceItem::WorkspaceItem( QListViewItem *parent, FormFile* ff, Type type )
+ : QListViewItem( parent )
+{
+ init();
+ formFile = ff;
+ t = type;
+ if ( type == FormFileType ) {
+ setPixmap( 0, *formPixmap );
+ QObject::connect( ff, SIGNAL( somethingChanged(FormFile*) ), listView(), SLOT( update(FormFile*) ) );
+#ifndef KOMMANDER
+ if ( formFile->supportsCodeFile() )
+ (void) new WorkspaceItem( this, formFile, FormSourceType );
+ } else if ( type == FormSourceType ) {
+ setPixmap( 0, *filePixmap );
+#endif
+ }
+}
+
+WorkspaceItem::WorkspaceItem( QListView *parent, FormFile* ff, Type type )
+ : QListViewItem( parent )
+{
+ init();
+ formFile = ff;
+ t = type;
+ if ( type == FormFileType ) {
+ setPixmap( 0, *formPixmap );
+ QObject::connect( ff, SIGNAL( somethingChanged(FormFile*) ), listView(), SLOT( update(FormFile*) ) );
+#ifndef KOMMANDER
+ if ( formFile->supportsCodeFile() )
+ (void) new WorkspaceItem( this, formFile, FormSourceType );
+ } else if ( type == FormSourceType ) {
+ setPixmap( 0, *filePixmap );
+#endif
+ }
+}
+
+
+void WorkspaceItem::init()
+{
+ autoOpen = false;
+ useOddColor = false;
+#ifndef KOMMANDER
+ project = 0;
+ sourceFile = 0;
+#endif
+ formFile = 0;
+}
+
+void WorkspaceItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+{
+ QColorGroup g( cg );
+ g.setColor( QColorGroup::Base, backgroundColor() );
+ g.setColor( QColorGroup::Foreground, Qt::black );
+
+#ifndef KOMMANDER
+ if ( type() == FormSourceType && !formFile->hasFormCode() ) {
+ g.setColor( QColorGroup::Text, listView()->palette().disabled().color( QColorGroup::Text) );
+ g.setColor( QColorGroup::HighlightedText, listView()->palette().disabled().color( QColorGroup::Text) );
+ } else {
+#endif
+ g.setColor( QColorGroup::Text, Qt::black );
+#ifndef KOMMANDER
+ }
+#endif
+ p->save();
+
+ if ( isModified() ) {
+ QFont f = p->font();
+ f.setBold( true );
+ p->setFont( f );
+ }
+
+ QListViewItem::paintCell( p, g, column, width, align );
+ p->setPen( QPen( cg.dark(), 1 ) );
+ if ( column == 0 )
+ p->drawLine( 0, 0, 0, height() - 1 );
+ if ( listView()->firstChild() != this ) {
+ if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) {
+ int d = depth() - itemBelow()->depth();
+ p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 );
+ }
+ }
+ p->drawLine( 0, height() - 1, width, height() - 1 );
+ p->drawLine( width - 1, 0, width - 1, height() );
+ p->restore();
+}
+
+QString WorkspaceItem::text( int column ) const
+{
+ if ( column != 0 )
+ return QListViewItem::text( column );
+ switch( t ) {
+#ifndef KOMMANDER
+ case ProjectType:
+ if ( project->isDummy() )
+ return i18n("<No Project>" );
+ return project->makeRelative( project->fileName() );
+#endif
+ case FormFileType:
+ return formFile->formName() + ": " + formFile->fileName();
+#ifndef KOMMANDER
+ case FormSourceType:
+ return formFile->codeFile();
+ case SourceFileType:
+ return sourceFile->fileName();
+#endif
+ }
+
+ return QString::null; // shut up compiler
+}
+
+void WorkspaceItem::fillCompletionList( QStringList& completion )
+{
+ switch( t ) {
+ case ProjectType:
+ break;
+ case FormFileType:
+ completion += formFile->formName();
+ completion += formFile->fileName();
+ break;
+#ifndef KOMMANDER
+ case FormSourceType:
+ completion += formFile->codeFile();
+ break;
+ case SourceFileType:
+ completion += sourceFile->fileName();
+ break;
+#endif
+ }
+}
+
+bool WorkspaceItem::checkCompletion( const QString& completion )
+{
+ switch( t ) {
+ case ProjectType:
+ break;
+ case FormFileType:
+ return completion == formFile->formName()
+ || completion == formFile->fileName();
+#ifndef KOMMANDER
+ case FormSourceType:
+ return completion == formFile->codeFile();
+ case SourceFileType:
+ return completion == sourceFile->fileName();
+#endif
+ }
+ return false;
+}
+
+
+bool WorkspaceItem::isModified() const
+{
+#ifndef KOMMANDER
+ switch( t ) {
+ case ProjectType:
+ return project->isModified();
+ case FormFileType:
+ return formFile->isModified( FormFile::WFormWindow );
+ case FormSourceType:
+ return formFile->isModified( FormFile::WFormCode );
+ case SourceFileType:
+ return sourceFile->isModified();
+ }
+ return false; // shut up compiler
+#else
+ return formFile->isModified();
+#endif
+}
+
+QString WorkspaceItem::key( int column, bool ) const
+{
+ QString key = text( column );
+ if ( t == FormFileType )
+ key.prepend( "0" );
+ else
+ key.prepend( "a" );
+ return key;
+}
+
+QColor WorkspaceItem::backgroundColor()
+{
+ bool b = useOddColor;
+ if ( t == FormSourceType && parent() )
+ b = ( ( WorkspaceItem*)parent() )->useOddColor;
+ return b ? *backColor2 : *backColor1;
+}
+
+
+void WorkspaceItem::setOpen( bool b )
+{
+ QListViewItem::setOpen( b );
+ autoOpen = false;
+}
+
+void WorkspaceItem::setAutoOpen( bool b )
+{
+ QListViewItem::setOpen( b );
+ autoOpen = b;
+}
+
+Workspace::Workspace( QWidget *parent, MainWindow *mw )
+ : QListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+ WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ),
+#ifndef KOMMANDER
+ project( 0 ), completionDirty( false )
+#else
+ completionDirty( false )
+#endif
+{
+ init_colors();
+
+ setDefaultRenameAction( Accept );
+ blockNewForms = false;
+ bufferEdit = 0;
+ header()->setStretchEnabled( true );
+ header()->hide();
+ setSorting( 0 );
+ setResizePolicy( QScrollView::Manual );
+#ifndef KOMMANDER
+ setIcon( PixmapChooser::loadPixmap( "logo" ) );
+#endif
+ QPalette p( palette() );
+ p.setColor( QColorGroup::Base, QColor( *backColor2 ) );
+ (void)*selectedBack; // hack
+ setPalette( p );
+ addColumn( i18n("Files" ) );
+ setAllColumnsShowFocus( true );
+ connect( this, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ),
+ this, SLOT( itemClicked( int, QListViewItem *, const QPoint& ) ) ),
+ connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
+ this, SLOT( itemDoubleClicked( QListViewItem * ) ) ),
+ connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
+ this, SLOT( rmbClicked( QListViewItem *, const QPoint& ) ) ),
+ setHScrollBarMode( AlwaysOff );
+ setVScrollBarMode( AlwaysOn );
+ viewport()->setAcceptDrops( true );
+ setAcceptDrops( true );
+ setColumnWidthMode( 1, Manual );
+
+ if ( !folderPixmap ) {
+ folderPixmap = new QPixmap( folderxpm );
+ filePixmap = new QPixmap( file_xpm );
+ formPixmap = new QPixmap( PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) );
+ }
+
+#ifdef KOMMANDER
+ makeConnections(mw);
+#endif
+}
+
+
+#ifndef KOMMANDER
+void Workspace::projectDestroyed( QObject* o )
+{
+ if ( o == project ) {
+ project = 0;
+ clear();
+ }
+}
+#endif
+
+#ifndef KOMMANDER
+void Workspace::setCurrentProject( Project *pro )
+{
+ if ( project == pro )
+ return;
+ if ( project ) {
+ disconnect( project, SIGNAL( sourceFileAdded(SourceFile*) ), this, SLOT( sourceFileAdded(SourceFile*) ) );
+ disconnect( project, SIGNAL( sourceFileRemoved(SourceFile*) ), this, SLOT( sourceFileRemoved(SourceFile*) ) );
+ disconnect( project, SIGNAL( formFileAdded(FormFile*) ), this, SLOT( formFileAdded(FormFile*) ) );
+ disconnect( project, SIGNAL( formFileRemoved(FormFile*) ), this, SLOT( formFileRemoved(FormFile*) ) );
+ disconnect( project, SIGNAL( projectModified() ), this, SLOT( update() ) );
+ }
+ project = pro;
+ connect( project, SIGNAL( sourceFileAdded(SourceFile*) ), this, SLOT( sourceFileAdded(SourceFile*) ) );
+ connect( project, SIGNAL( sourceFileRemoved(SourceFile*) ), this, SLOT( sourceFileRemoved(SourceFile*) ) );
+ connect( project, SIGNAL( formFileAdded(FormFile*) ), this, SLOT( formFileAdded(FormFile*) ) );
+ connect( project, SIGNAL( formFileRemoved(FormFile*) ), this, SLOT( formFileRemoved(FormFile*) ) );
+ connect( project, SIGNAL( destroyed(QObject*) ), this, SLOT( projectDestroyed(QObject*) ) );
+ connect( project, SIGNAL( projectModified() ), this, SLOT( update() ) );
+ clear();
+
+ if ( bufferEdit )
+ bufferEdit->clear();
+
+ projectItem = new WorkspaceItem( this, project );
+
+ projectItem->setOpen( true );
+
+ for ( QPtrListIterator<SourceFile> sources = project->sourceFiles();
+ sources.current(); ++sources ) {
+ SourceFile* f = sources.current();
+ (void) new WorkspaceItem( projectItem, f );
+ }
+
+ for ( QPtrListIterator<FormFile> forms = project->formFiles();
+ forms.current(); ++forms ) {
+ FormFile* f = forms.current();
+ (void) new WorkspaceItem( projectItem, f );
+ }
+
+ updateColors();
+ completionDirty = true;
+}
+#endif
+
+#ifdef KOMMANDER
+void Workspace::makeConnections(MainWindow *)
+{
+ // FIXME
+}
+#endif
+
+#ifndef KOMMANDER
+void Workspace::sourceFileAdded( SourceFile* sf )
+{
+ (void) new WorkspaceItem( projectItem, sf );
+ Q_UNUSED(sf);
+ updateColors();
+}
+#endif
+
+#ifndef KOMMANDER
+void Workspace::sourceFileRemoved( SourceFile* sf )
+{
+ delete findItem( sf );
+ updateColors();
+}
+#endif
+
+void Workspace::formFileAdded( FormFile* ff )
+{
+#ifndef KOMMANDER
+ (void) new WorkspaceItem( projectItem, ff );
+#else
+ (void) new WorkspaceItem( this, ff );
+#endif
+ updateColors();
+}
+
+void Workspace::formFileRemoved( FormFile* ff )
+{
+ delete findItem( ff );
+ updateColors();
+}
+
+
+void Workspace::update()
+{
+ completionDirty = true;
+ triggerUpdate();
+}
+
+void Workspace::update( FormFile* ff )
+{
+ QListViewItem* i = findItem( ff );
+ if ( i ) {
+ i->repaint();
+ if ( (i = i->firstChild()) )
+ i->repaint();
+ }
+}
+
+
+void Workspace::activeFormChanged( FormWindow *fw )
+{
+ WorkspaceItem *i = findItem( fw->formFile() );
+ if ( i ) {
+ setCurrentItem( i );
+ setSelected( i, true );
+ if ( !i->isOpen() )
+ i->setAutoOpen( true );
+ }
+
+ closeAutoOpenItems();
+
+}
+
+#ifndef KOMMANDER
+void Workspace::activeEditorChanged( SourceEditor *se )
+{
+ if ( !se->object() )
+ return;
+
+ if ( se->formWindow() ) {
+ WorkspaceItem *i = findItem( se->formWindow()->formFile() );
+ if ( i && i->firstChild() ) {
+ if ( !i->isOpen() )
+ i->setAutoOpen( true );
+ setCurrentItem( i->firstChild() );
+ setSelected( i->firstChild(), true );
+ }
+ } else {
+ WorkspaceItem *i = findItem( se->sourceFile() );
+ if ( i ) {
+ setCurrentItem( i );
+ setSelected( i, true );
+ }
+ }
+
+ closeAutoOpenItems();
+}
+#endif
+
+WorkspaceItem *Workspace::findItem( FormFile* ff)
+{
+ QListViewItemIterator it( this );
+ for ( ; it.current(); ++it ) {
+ if ( ( (WorkspaceItem*)it.current() )->formFile == ff )
+ return (WorkspaceItem*)it.current();
+ }
+ return 0;
+}
+
+#ifndef KOMMANDER
+WorkspaceItem *Workspace::findItem( SourceFile *sf )
+{
+ QListViewItemIterator it( this );
+ for ( ; it.current(); ++it ) {
+ if ( ( (WorkspaceItem*)it.current() )->sourceFile == sf )
+ return (WorkspaceItem*)it.current();
+ }
+ return 0;
+}
+#endif
+
+void Workspace::closeAutoOpenItems()
+{
+ QListViewItemIterator it( this );
+ for ( ; it.current(); ++it ) {
+ WorkspaceItem* i = (WorkspaceItem*) it.current();
+ WorkspaceItem* ip = (WorkspaceItem*) i->parent();
+ if ( i->type() == WorkspaceItem::FormSourceType ) {
+ if ( !i->isSelected() && !ip->isSelected()
+ && ip->isAutoOpen() ) {
+ ip->setAutoOpen( false );
+ }
+ }
+ }
+}
+
+
+void Workspace::closeEvent( QCloseEvent *e )
+{
+ e->accept();
+}
+
+void Workspace::itemDoubleClicked( QListViewItem *i )
+{
+ if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType )
+ i->setOpen( true );
+}
+
+void Workspace::itemClicked( int button, QListViewItem *i, const QPoint& )
+{
+ if ( !i || button != LeftButton )
+ return;
+
+ closeAutoOpenItems();
+
+ WorkspaceItem* wi = (WorkspaceItem*)i;
+#ifndef KOMMANDER
+ if ( wi->type() == WorkspaceItem::SourceFileType )
+ mainWindow->editSource( wi->sourceFile );
+ switch( wi->type() ) {
+ case WorkspaceItem::ProjectType:
+ break; // ### TODO
+ case WorkspaceItem::FormFileType:
+ wi->formFile->showFormWindow();
+ break;
+ case WorkspaceItem::FormSourceType:
+ wi->formFile->showEditor();
+ break;
+ case WorkspaceItem::SourceFileType:
+ mainWindow->editSource( wi->sourceFile );
+ break;
+ }
+#else
+ wi->formFile->showFormWindow();
+#endif
+}
+
+void Workspace::contentsDropEvent( QDropEvent *e )
+{
+ if (!KURLDrag::canDecode(e))
+ {
+ e->ignore();
+ return;
+ }
+
+ KURL::List files;
+ KURLDrag::decode(e, files);
+ if (files.isEmpty())
+ return;
+
+ for (KURL::List::Iterator it = files.begin(); it != files.end(); ++it)
+ {
+ if (!(*it).isLocalFile())
+ continue;
+ QString fn = (*it).path();
+ mainWindow->fileOpen(fn);
+ }
+}
+
+void Workspace::contentsDragEnterEvent( QDragEnterEvent *e )
+{
+ if ( !KURLDrag::canDecode( e ) )
+ e->ignore();
+ else
+ e->accept();
+}
+
+void Workspace::contentsDragMoveEvent( QDragMoveEvent *e )
+{
+ if ( !KURLDrag::canDecode( e ) )
+ e->ignore();
+ else
+ e->accept();
+}
+
+void Workspace::rmbClicked( QListViewItem *i, const QPoint& pos )
+{
+ if ( !i )
+ return;
+ WorkspaceItem* wi = (WorkspaceItem*)i;
+ enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM, OPEN_FORM_SOURCE };
+ QPopupMenu menu( this );
+ switch ( wi->type() ) {
+#ifndef KOMMANDER
+ case WorkspaceItem::SourceFileType:
+ menu.insertItem( i18n("&Open Source File..." ), OPEN_SOURCE );
+ menu.insertSeparator();
+ menu.insertItem( PixmapChooser::loadPixmap( "editcut" ),
+ i18n("&Remove Source File From Project" ), REMOVE_SOURCE );
+ break;
+#endif
+ case WorkspaceItem::FormFileType:
+ menu.insertItem( i18n("&Open Form..." ), OPEN_FORM );
+ menu.insertSeparator();
+ menu.insertItem( PixmapChooser::loadPixmap( "editcut" ),
+#ifndef KOMMANDER
+ i18n("&Remove Form From Project" ), REMOVE_FORM );
+#else
+ i18n("&Remove Form" ), REMOVE_FORM );
+#endif
+ break;
+ case WorkspaceItem::FormSourceType:
+ menu.insertItem( i18n("&Open Form Source..." ), OPEN_FORM_SOURCE );
+ menu.insertSeparator();
+ menu.insertItem( PixmapChooser::loadPixmap( "editcut" ),
+#ifndef KOMMANDER
+ i18n("&Remove Form From Project" ), REMOVE_FORM );
+#else
+ i18n("&Remove Form" ), REMOVE_FORM );
+#endif
+ break;
+#ifndef KOMMANDER
+ case WorkspaceItem::ProjectType:
+ MainWindow::self->popupProjectMenu( pos );
+ return;
+#endif
+ default:
+ return;
+ }
+ switch ( menu.exec( pos ) ) {
+#ifndef KOMMANDER
+ case REMOVE_SOURCE:
+ project->removeSourceFile( wi->sourceFile );
+ break;
+#endif
+ case OPEN_SOURCE:
+ itemClicked( LeftButton, i, pos );
+ break;
+#ifndef KOMMANDER
+ case REMOVE_FORM: // FIXME
+ project->removeFormFile( wi->formFile );
+ break;
+#endif
+ case OPEN_FORM:
+ itemClicked( LeftButton, i, pos );
+ break;
+ case OPEN_FORM_SOURCE:
+ itemClicked( LeftButton, i, pos );
+ break;
+ default:
+ break;
+ }
+}
+
+bool Workspace::eventFilter( QObject *o, QEvent * e )
+{
+ // Reggie, on what type of events do we have to execute updateBufferEdit()
+ if ( o ==bufferEdit && e->type() != QEvent::ChildRemoved )
+ updateBufferEdit();
+ return QListView::eventFilter( o, e );
+}
+
+void Workspace::setBufferEdit( QCompletionEdit *edit )
+{
+ bufferEdit = edit;
+ connect( bufferEdit, SIGNAL( chosen( const QString & ) ),
+ this, SLOT( bufferChosen( const QString & ) ) );
+ bufferEdit->installEventFilter( this );
+}
+
+void Workspace::updateBufferEdit()
+{
+ if ( !bufferEdit || !completionDirty )
+ return;
+ completionDirty = false;
+#ifndef KOMMANDER
+ QStringList completion = MainWindow::self->projectFileNames();
+ while ( it.current() ) {
+ ( (WorkspaceItem*)it.current())->fillCompletionList( completion );
+ ++it;
+ }
+ completion.sort();
+ bufferEdit->setCompletionList( completion );
+#endif
+}
+
+void Workspace::bufferChosen( const QString &buffer )
+{
+ if ( bufferEdit )
+ bufferEdit->setText( "" );
+
+#ifndef KOMMANDER
+ if ( MainWindow::self->projectFileNames().contains( buffer ) ) {
+ MainWindow::self->setCurrentProjectByFilename( buffer );
+ return;
+ }
+#endif
+
+ QListViewItemIterator it( this );
+ while ( it.current() ) {
+ if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) {
+ itemClicked( LeftButton, it.current(), QPoint() );
+ break;
+ }
+ ++it;
+ }
+}
+
+void Workspace::updateColors()
+{
+ QListViewItem* i = firstChild();
+ if ( i )
+ i = i->firstChild();
+ bool b = true;
+ while ( i ) {
+ WorkspaceItem* wi = ( WorkspaceItem*) i;
+ i = i->nextSibling();
+ wi->useOddColor = b;
+ b = !b;
+ }
+}
+#include "workspace.moc"
diff --git a/kommander/editor/workspace.h b/kommander/editor/workspace.h
new file mode 100644
index 00000000..e1c0ae8e
--- /dev/null
+++ b/kommander/editor/workspace.h
@@ -0,0 +1,170 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef WORKSPACE_H
+#define WORKSPACE_H
+
+#include <qlistview.h>
+
+class FormWindow;
+class QResizeEvent;
+class QCloseEvent;
+class QDropEvent;
+class QDragMoveEvent;
+class QDragEnterEvent;
+class MainWindow;
+#ifndef KOMMANDER
+class Project;
+class SourceFile;
+#endif
+class FormFile;
+class QCompletionEdit;
+#ifndef KOMMANDER
+ class SourceEditor;
+#endif
+
+class WorkspaceItem : public QListViewItem
+{
+public:
+ enum Type { ProjectType, FormFileType, FormSourceType, SourceFileType };
+
+#ifndef KOMMANDER
+ //WorkspaceItem( QListView *parent, Project* p );
+#else
+ WorkspaceItem(QListView *parent);
+#endif
+#ifndef KOMMANDER
+// WorkspaceItem( QListViewItem *parent, SourceFile* sf );
+#endif
+ WorkspaceItem( QListViewItem *parent, FormFile* ff, Type t = FormFileType );
+ WorkspaceItem( QListView *parent, FormFile* ff, Type t = FormFileType );
+
+ void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
+
+ Type type() const { return t; }
+
+ bool isModified() const;
+
+ QString text( int ) const;
+
+ void fillCompletionList( QStringList& completion );
+ bool checkCompletion( const QString& completion );
+
+ QString key( int, bool ) const; // column sorting key
+
+#ifndef KOMMANDER
+ Project* project;
+#endif
+#ifndef KOMMANDER
+ SourceFile* sourceFile;
+#endif
+ FormFile* formFile;
+
+ void setOpen( bool );
+
+ void setAutoOpen( bool );
+ bool isAutoOpen() const { return isOpen() && autoOpen; }
+
+ bool useOddColor;
+
+private:
+ void init();
+ bool autoOpen;
+ QColor backgroundColor();
+ Type t;
+};
+
+class Workspace : public QListView
+{
+ Q_OBJECT
+
+public:
+ Workspace( QWidget *parent , MainWindow *mw );
+
+#ifndef KOMMANDER
+ void setCurrentProject( Project *pro );
+#endif
+#ifdef KOMMANDER
+ void makeConnections(MainWindow *);
+#endif
+ void contentsDropEvent( QDropEvent *e );
+ void contentsDragEnterEvent( QDragEnterEvent *e );
+ void contentsDragMoveEvent( QDragMoveEvent *e );
+
+ void setBufferEdit( QCompletionEdit *edit );
+
+public slots:
+
+ void update();
+ void update( FormFile* );
+
+ void activeFormChanged( FormWindow *fw );
+#ifndef KOMMANDER
+// void activeEditorChanged( SourceEditor *se );
+#endif
+
+protected:
+ void closeEvent( QCloseEvent *e );
+ bool eventFilter( QObject *, QEvent * );
+
+
+private slots:
+ void itemClicked( int, QListViewItem *i, const QPoint& pos );
+ void itemDoubleClicked( QListViewItem *i );
+ void rmbClicked( QListViewItem *i, const QPoint& pos );
+ void bufferChosen( const QString &buffer );
+
+#ifndef KOMMANDER
+// void projectDestroyed( QObject* );
+#endif
+
+#ifndef KOMMANDER
+// void sourceFileAdded( SourceFile* );
+ // void sourceFileRemoved( SourceFile* );
+#endif
+
+ void formFileAdded( FormFile* );
+ void formFileRemoved( FormFile* );
+
+private:
+ WorkspaceItem *findItem( FormFile *ff );
+#ifndef KOMMANDER
+ WorkspaceItem *findItem( SourceFile *sf );
+#endif
+
+ void closeAutoOpenItems();
+
+private:
+ MainWindow *mainWindow;
+#ifndef KOMMANDER
+ Project *project;
+#endif
+#ifndef KOMMANDER
+ WorkspaceItem *projectItem;
+#endif
+ QCompletionEdit *bufferEdit;
+ bool blockNewForms;
+ void updateBufferEdit();
+ bool completionDirty;
+ void updateColors();
+
+};
+
+#endif
diff --git a/kommander/examples/Makefile.am b/kommander/examples/Makefile.am
new file mode 100644
index 00000000..92e9f07a
--- /dev/null
+++ b/kommander/examples/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS=current old tutorial
diff --git a/kommander/examples/current/Makefile.am b/kommander/examples/current/Makefile.am
new file mode 100644
index 00000000..c58b4c7d
--- /dev/null
+++ b/kommander/examples/current/Makefile.am
@@ -0,0 +1,3 @@
+execkmdrdir = ${kde_datadir}/kmdr-editor/editor/current
+
+execkmdr_SCRIPTS = a1.kmdr b1.kmdr editor-poc.kmdr keyvaluecombo.kmdr kpartmwframe.kmdr kpartpart.kmdr passvariables.kmdr tableselect.kmdr
diff --git a/kommander/examples/current/a1.kmdr b/kommander/examples/current/a1.kmdr
new file mode 100755
index 00000000..e8b99ac3
--- /dev/null
+++ b/kommander/examples/current/a1.kmdr
@@ -0,0 +1,258 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Form2</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>441</width>
+ <height>230</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>a1 - calling dialog</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>debug(env("HOME"))
+debug("pid="+pid)</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="useInternalParser">
+ <bool>true</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="Label" row="0" column="0">
+ <property name="name">
+ <cstring>Label52</cstring>
+ </property>
+ <property name="text">
+ <string>data1</string>
+ </property>
+ </widget>
+ <widget class="StatusBar" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>StatusBar8</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout37</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="Label">
+ <property name="name">
+ <cstring>Label24</cstring>
+ </property>
+ <property name="text">
+ <string>#1</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit7</cstring>
+ </property>
+ <property name="text">
+ <string>7</string>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>Label25</cstring>
+ </property>
+ <property name="text">
+ <string>#2</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit8</cstring>
+ </property>
+ <property name="text">
+ <string>Hello World</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="LineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>LineEdit78</cstring>
+ </property>
+ <property name="text">
+ <string>Send me</string>
+ </property>
+ </widget>
+ <widget class="Label" row="1" column="0">
+ <property name="name">
+ <cstring>Label52_2</cstring>
+ </property>
+ <property name="text">
+ <string>data2</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>LineEdit79</cstring>
+ </property>
+ <property name="text">
+ <string>and again</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout83</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>Spacer21</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton36</cstring>
+ </property>
+ <property name="text">
+ <string>Call b&amp;1 with parameters</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>b = dialog("b1.kmdr", LineEdit7.text+" \""+LineEdit8.text+"\"")
+StatusBar8.setText("Returned: "+b)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer22</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>46</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout84</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>Spacer88</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>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton128</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Call b1 with named parameters</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>b = dialog("b1.kmdr", "data1=\""+LineEdit78.text+"\" data2=\""+LineEdit79.text+"\"")
+StatusBar8.setText("Returned: "+b)</string>
+ </stringlist>
+ </property>
+ <property name="blockGUI">
+ <enum>None</enum>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer89</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/current/b1.kmdr b/kommander/examples/current/b1.kmdr
new file mode 100755
index 00000000..09725243
--- /dev/null
+++ b/kommander/examples/current/b1.kmdr
@@ -0,0 +1,135 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Form3</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form3</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>364</width>
+ <height>140</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>b1 receiver for a1</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>if str_length(_ARGS) == 0 then
+ StatusBar9.insertItem("data1="+_data1, 0)
+ StatusBar9.insertItem("data2="+_data2, 1)
+else
+ StatusBar9.insertItem("ARGCOUNT="+_ARGCOUNT, 0)
+ StatusBar9.insertItem("ARG1="+_ARG1, 1)
+ StatusBar9.insertItem("ARG2="+_ARG2, 2)
+endif
+//message_info(parentPid)</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="useInternalParser">
+ <bool>true</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="Label" row="0" column="0">
+ <property name="name">
+ <cstring>Label53</cstring>
+ </property>
+ <property name="text">
+ <string>Value</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="0" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>LineEdit79</cstring>
+ </property>
+ <property name="text">
+ <string>Return me</string>
+ </property>
+ </widget>
+ <widget class="CloseButton" row="1" column="2">
+ <property name="name">
+ <cstring>CloseButton2</cstring>
+ </property>
+ <property name="text">
+ <string>Retur&amp;n</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo(LineEdit79.text)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Spacer90</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>111</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="StatusBar" row="2" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>StatusBar9</cstring>
+ </property>
+ </widget>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>Spacer91</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>50</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton" row="1" column="3">
+ <property name="name">
+ <cstring>ExecButton69</cstring>
+ </property>
+ <property name="text">
+ <string>DC&amp;OP</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>//message_info("parentPid = "+parentPid+"\npid = "+pid)
+dcop("kmdr-executor-"+parentPid, "KommanderIf", "setText(QString,QString)", "StatusBar8", "Hello")
+</string>
+ </stringlist>
+ </property>
+ <property name="blockGUI">
+ <enum>None</enum>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/current/editor-poc.kmdr b/kommander/examples/current/editor-poc.kmdr
new file mode 100755
index 00000000..d9b14fd1
--- /dev/null
+++ b/kommander/examples/current/editor-poc.kmdr
@@ -0,0 +1,1068 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KEdemo</class>
+<widget class="QMainWindow">
+ <property name="name">
+ <cstring>KEdemo</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Kommander Editor Demo - Kommander</string>
+ </property>
+ <property name="icon">
+ <pixmap>image0</pixmap>
+ </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="ScriptObject" row="1" column="0">
+ <property name="name">
+ <cstring>ScriptFileOpen</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+_file["name"] = input_openfile("", "*.rtf", "Kommander Edit")
+file_read(_file["name"])
+_file["dirty"] = false</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="2" column="0">
+ <property name="name">
+ <cstring>ScriptFileSave</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+if str_isEmpty(_file["name"]) then
+ _file["name"] = input_savefile("", "*.rtf", "Kommander Edit")
+endif
+file_write(_file["name"], TextEdit5.text)
+array_clear("_file")</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="3" column="0">
+ <property name="name">
+ <cstring>ScriptFileDirty</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+_file["dirty"] = true</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="4" column="0">
+ <property name="name">
+ <cstring>ScriptFind</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Input.text("Kommander Edit", "Text to find", "")</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="5" column="0">
+ <property name="name">
+ <cstring>ScriptFont</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+FontDialog1.execute
+TextEdit5.setFamily(FontDialog1.family)
+TextEdit5.setPointSize(FontDialog1.pointSize)
+TextEdit5.setBold(FontDialog1.bold)
+TextEdit5.setItalic(FontDialog1.italic)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="1" column="8">
+ <property name="name">
+ <cstring>ScriptInitialize</cstring>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+//initialize the window
+//comment out the next two line to see how the hidden checkboxes work around the limitatons of using a MainWindow to hold state information.
+CheckBoxB.setVisible(false)
+CheckBoxI.setVisible(false)
+//our quick help
+TextEdit3.setVisible(false)
+AboutDialog2.initialize("Kommander Editor Demo", "", "0.1", "Copyright 2008")
+AboutDialog2.setLicense("GPL_V2")
+AboutDialog2.addAuthor("Eric Laffoon", "Project Lead", "eric@kdewebdev.org", "http://kommander.kdewebdev.org")
+AboutDialog2.setDescription("This is a demo of what can be done with kommander 1.3\nYou are running "+_VERSION+" now. This is not intended to\nbe of use for any specific tasks. We hope you enjoy it.")
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="4" column="8">
+ <property name="name">
+ <cstring>ScriptLink3</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+message_info("You clicked link #2 at "+Self.Item(0)+" "+Self.Item(1), "Kommander Edit Demo")
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="3" column="8">
+ <property name="name">
+ <cstring>ScriptLink2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+message_info("You clicked link #1 at "+Self.Item(0)+" "+Self.Item(1), "Kommander Edit Demo")
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="5" column="8">
+ <property name="name">
+ <cstring>ScriptHelpAbout</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+AboutDialog2.execute
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="2" column="8">
+ <property name="name">
+ <cstring>ScriptLink1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+// first let's honor bold and italic toggles
+if CheckBoxB.checked then
+ TextEdit5.setBold(true)
+endif
+if CheckBoxI.checked then
+ TextEdit5.setItalic(true)
+endif
+debug(Self.Item(0)+" "+Self.Item(1))
+//find yourself
+inlink = false
+ch = 0 // character count
+lc = -1 // line count
+cc = 0 // col count
+a = TextEdit5.text
+debug("a="+a)
+maxc = str_length(a)
+while chrs &lt; maxc do
+ //debug("link test = "+str_mid(a, ch, 2)+" pos="+ch)
+ if str_mid(a, ch, 2) == "&lt;a" then
+ inlink = true
+ lb = str_toint(str_find(a, "\"", ch)+1)
+ le = str_toint(str_find(a, "\"", lb))
+ linkscript = str_mid(a, lb, le-lb)
+ //debug("link data - "+lb+" "+le+" "+linkscript)
+ elseif str_mid(a, ch, 3) == "&lt;p&gt;" then
+ lc = lc + 1
+ cc = 0
+ endif
+ ck1 = str_toint(str_find(a, "&gt;", ch))+1
+ ck2 = str_find(a, "&lt;", ck1)
+ if ck1 == -1 || ck2 == -1 then
+ break
+ endif
+ ckt = str_toint(ck2) - str_toint(ck1)
+ //debug("ck1="+ck1+" ck2="+ck2+" ckt="+ckt)
+ cp = cc
+ cc = cc + ckt
+ if inlink == true then
+ //debug("examining link at row"+lc+" between col "+cp+" and col "+cc)
+ if (Self.Item(0) == lc &amp;&amp;Self.Item(1) &gt;= cp &amp;&amp; Self.Item(1) &lt;= cc) then
+ debug("call "+linkscript)
+ if widgetExists(linkscript) then
+ linkscript.execute(Self.Item(0),Self.Item(1))
+ elseif str_left(linkscript, 4) == "http" then
+ exec("konqueror --profile webbrowsing "+linkscript)
+ endif
+ break
+ endif
+ inlink = false
+ endif
+ ch = ck2
+ //debug(ch)
+end
+debug("Clicked at: "+Self.Item(0)+" "+Self.Item(1))
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="TextEdit" row="0" column="0" rowspan="1" colspan="9">
+ <property name="name">
+ <cstring>TextEdit5</cstring>
+ </property>
+ <property name="textFormat">
+ <enum>RichText</enum>
+ </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:Sans Serif"&gt;
+&lt;p&gt;Test this &lt;a href="ScriptLink2"&gt;link&lt;/a&gt; text.&lt;br /&gt;Add a new line with Ctrl-Enter or Enter. Note the links are correctly parsed.&lt;/p&gt;
+&lt;p&gt;New paragraph. Look! &lt;a href="ScriptLink3"&gt;another internal link&lt;/a&gt; to try out.&lt;/p&gt;
+&lt;p&gt;Although this widget does not give visual feedback on links it does allow them to execute scripts or call a web site as you can see below. &lt;/p&gt;
+&lt;p&gt;Functionality on this window may be incomplete. It is for demo purposes only. Look for new examples and tools on our &lt;a href="http://kommander.kdewebdev.org"&gt;website&lt;/a&gt;.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;
+</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="5" column="1">
+ <property name="name">
+ <cstring>CheckBoxB</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>B</string>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="5" column="2">
+ <property name="name">
+ <cstring>CheckBoxI</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>I</string>
+ </property>
+ </widget>
+ <widget class="TextEdit" row="2" column="4" rowspan="2" colspan="4">
+ <property name="name">
+ <cstring>TextEdit3</cstring>
+ </property>
+ <property name="textFormat">
+ <enum>PlainText</enum>
+ </property>
+ <property name="text">
+ <string>&lt;!DOCTYPE UI&gt;&lt;UI version="3.0" stdsetdef="1"&gt;
+&lt;class&gt;kihelp&lt;/class&gt;
+&lt;widget class="Dialog"&gt;
+ &lt;property name="name"&gt;
+ &lt;cstring&gt;kihelp&lt;/cstring&gt;
+ &lt;/property&gt;
+ &lt;property name="geometry"&gt;
+ &lt;rect&gt;
+ &lt;x&gt;0&lt;/x&gt;
+ &lt;y&gt;0&lt;/y&gt;
+ &lt;width&gt;641&lt;/width&gt;
+ &lt;height&gt;396&lt;/height&gt;
+ &lt;/rect&gt;
+ &lt;/property&gt;
+ &lt;property name="caption"&gt;
+ &lt;string&gt;Editor Quick Help&lt;/string&gt;
+ &lt;/property&gt;
+ &lt;property name="icon"&gt;
+ &lt;pixmap&gt;image0&lt;/pixmap&gt;
+ &lt;/property&gt;
+ &lt;property name="associations" stdset="0"&gt;
+ &lt;stringlist&gt;
+ &lt;string&gt;&lt;/string&gt;
+ &lt;string&gt;@Array.setValue(help, "Proof of concept", "&amp;lt;center&amp;gt;&amp;lt;h2&amp;gt;Kommander MainWindow frames!&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;As Kommander took on functionality an attempt was made to make a MainWindow Kommander widget. Sadly it was a huge time loss for two developers who both gave up after days of trying. The problem was with the editor. However you can use a Qt Designer generated UI file renamed to a *.kmdr file. Into this frame you can place your widgets and make a working application where nearly everything works.&amp;lt;/p&amp;gt;")
+@Array.setValue(help, "Known limitations", "&amp;lt;center&amp;gt;&amp;lt;h2&amp;gt;Known limitations&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;As of this writing what is known not to work on the Kommander side is the settings read and write. There is no Initialize or Destroy section as there is no Kommander Text, however there are signals for this on the window, so the functionality is intact. On the MainWindow side it is not possible to talk to any Actions as these are QActions from Designer and KActions are not derived from QActions in KDE 3x. This means a DCOP call to list actions or set states will not work. It is also not possible to talk to the Statusbar. Also submenus on the menubar and dropdown actions on the Toolbar will not work. Given that this is an unsupported use of Kommander it everything that does work makes it suitable for probably most small application uses.. &amp;lt;/p&amp;gt;")
+@Array.setValue(help, "Rolling your own", "&amp;lt;center&amp;gt;&amp;lt;h2&amp;gt;Rolling your own&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;It is our intention to have a template in the 1.3 release of a MainWindow, but if you have Qt Designer for Qt 3x you can easily start a window design, save it, rename to *.kmdr and open in Kommander. Remember not to add widgets in Designer as Kommander will not recognize them.&amp;lt;/p&amp;gt;")
+@Array.setValue(help, "Using Actions", "&amp;lt;center&amp;gt;&amp;lt;h2&amp;gt;Using Actions&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;If you want to get the goodies, menus, toolbars and accelerator keys, you need to use actions. Kommander has an Action editor on the window menu under Views. There you can add actions and there is a shortcut to connecting them with signals and slots. To get everything working select an Action and look in the properties menu for settings like name, text and icon. For menus and toolbars try right clicking on them for context menus. Now from the Action View drag an Action to the menu or toolbar. See the visual feedback? Just connect your Action to a script and you have three different ways to call it.&amp;lt;/p&amp;gt;
+")
+@Array.setValue(help, "Link examples", "&amp;lt;center&amp;gt;&amp;lt;h2&amp;gt;Link examples&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;This demo shows examples of linking. Links will show in the TextEdit widget, but they don't do anything. In the TextBrowser they open web pages and email links, but of course you can't edit in the TextBrowser. If you don't mind writing some script you can set up your own link handling, which I've done here. Note that it will follow links anywhere in the editor. If the link is a widget name it assumes it to be a script and calls it. If not it looks to see if it is a web link and calls that&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;It would be easy to extend this script to accept link parameters and process emails. You could also make a reference to other text objects, tab widget tabs, pretty much anything you can think of.&amp;lt;/p&amp;gt;")
+@Array.setValue(help, "How this help works", "&amp;lt;center&amp;gt;&amp;lt;h2&amp;gt;How this help works&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;Do you wonder where this help came from? It is possible to use KDE help if you write DocBook, make it and install it. This quick help is fast and can contain &amp;lt;i&amp;gt;rich text&amp;lt;/i&amp;gt;. To look at the dialog copy the text in the hidden TextEdit (set to text mode so as not to muck things up with rich text interperting XML) and paste it to a text editor like KWrite. Save it as a Kommander file and open it in the Kommander Editor.&amp;lt;/p&amp;gt;")
+
+@ListBox1.setCurrentItem(0)
+@ScriptObject1.execute
+
+@if(@String.length(@global(helppage) &amp;gt; 0))
+ @ListBox1.setSelection(@global(helppage))
+ @ScriptObject1.execute
+@endif
+&lt;/string&gt;
+ &lt;string&gt;&lt;/string&gt;
+ &lt;/stringlist&gt;
+ &lt;/property&gt;
+ &lt;grid&gt;
+ &lt;property name="name"&gt;
+ &lt;cstring&gt;unnamed&lt;/cstring&gt;
+ &lt;/property&gt;
+ &lt;property name="margin"&gt;
+ &lt;number&gt;11&lt;/number&gt;
+ &lt;/property&gt;
+ &lt;property name="spacing"&gt;
+ &lt;number&gt;6&lt;/number&gt;
+ &lt;/property&gt;
+ &lt;widget class="QSplitter" row="0" column="0" rowspan="2" colspan="2"&gt;
+ &lt;property name="name"&gt;
+ &lt;cstring&gt;Splitter5&lt;/cstring&gt;
+ &lt;/property&gt;
+ &lt;property name="orientation"&gt;
+ &lt;enum&gt;Horizontal&lt;/enum&gt;
+ &lt;/property&gt;
+ &lt;widget class="ListBox"&gt;
+ &lt;item&gt;
+ &lt;property name="text"&gt;
+ &lt;string&gt;Proof of concept&lt;/string&gt;
+ &lt;/property&gt;
+ &lt;/item&gt;
+ &lt;item&gt;
+ &lt;property name="text"&gt;
+ &lt;string&gt;Known limitations&lt;/string&gt;
+ &lt;/property&gt;
+ &lt;/item&gt;
+ &lt;item&gt;
+ &lt;property name="text"&gt;
+ &lt;string&gt;Rolling your own&lt;/string&gt;
+ &lt;/property&gt;
+ &lt;/item&gt;
+ &lt;item&gt;
+ &lt;property name="text"&gt;
+ &lt;string&gt;Using Actions&lt;/string&gt;
+ &lt;/property&gt;
+ &lt;/item&gt;
+ &lt;item&gt;
+ &lt;property name="text"&gt;
+ &lt;string&gt;Link examples&lt;/string&gt;
+ &lt;/property&gt;
+ &lt;/item&gt;
+ &lt;item&gt;
+ &lt;property name="text"&gt;
+ &lt;string&gt;How this help works&lt;/string&gt;
+ &lt;/property&gt;
+ &lt;/item&gt;
+ &lt;property name="name"&gt;
+ &lt;cstring&gt;ListBox1&lt;/cstring&gt;
+ &lt;/property&gt;
+ &lt;property name="sizePolicy"&gt;
+ &lt;sizepolicy&gt;
+ &lt;hsizetype&gt;1&lt;/hsizetype&gt;
+ &lt;vsizetype&gt;7&lt;/vsizetype&gt;
+ &lt;horstretch&gt;0&lt;/horstretch&gt;
+ &lt;verstretch&gt;0&lt;/verstretch&gt;
+ &lt;/sizepolicy&gt;
+ &lt;/property&gt;
+ &lt;property name="associations" stdset="0"&gt;
+ &lt;stringlist&gt;
+ &lt;string&gt;&lt;/string&gt;
+ &lt;/stringlist&gt;
+ &lt;/property&gt;
+ &lt;/widget&gt;
+ &lt;widget class="TextBrowser"&gt;
+ &lt;property name="name"&gt;
+ &lt;cstring&gt;TextBrowser1&lt;/cstring&gt;
+ &lt;/property&gt;
+ &lt;property name="sizePolicy"&gt;
+ &lt;sizepolicy&gt;
+ &lt;hsizetype&gt;7&lt;/hsizetype&gt;
+ &lt;vsizetype&gt;1&lt;/vsizetype&gt;
+ &lt;horstretch&gt;0&lt;/horstretch&gt;
+ &lt;verstretch&gt;0&lt;/verstretch&gt;
+ &lt;/sizepolicy&gt;
+ &lt;/property&gt;
+ &lt;/widget&gt;
+ &lt;/widget&gt;
+ &lt;widget class="ScriptObject" row="1" column="1"&gt;
+ &lt;property name="name"&gt;
+ &lt;cstring&gt;ScriptObject1&lt;/cstring&gt;
+ &lt;/property&gt;
+ &lt;property name="populationText"&gt;
+ &lt;string&gt;&lt;/string&gt;
+ &lt;/property&gt;
+ &lt;property name="associations" stdset="0"&gt;
+ &lt;stringlist&gt;
+ &lt;string&gt;@TextBrowser1.setText(@Array.value(help, @ListBox1.selection))&lt;/string&gt;
+ &lt;/stringlist&gt;
+ &lt;/property&gt;
+ &lt;/widget&gt;
+ &lt;/grid&gt;
+&lt;/widget&gt;
+&lt;images&gt;
+ &lt;image name="image0"&gt;
+ &lt;data format="XPM.GZ" length="6350"&gt;789ca598d94f1fc911c7dff7af40db6faba877a667baa747511e8c01e3030c06cc11e5a1aa7a86cbdc603051fef734f5ad9fed5d2952a4f521fba3beeaae1a7eff6de9606b63e9b7df7fb9bba7fb53599213ba5dfaad3c5c5c7cfbe7bffef1ef5f7e0d61a9fee9425e0abffeed975fb7ef976469f3ea727a013f56708dfe7a61597069b372068729f6cabbe0dcc8acbc622c4599c1a10dad72f1ca5d1370bfc77d5dcb01e70770176252de51eebb1c21df96720c6d87f51edcd3202fec5e29a7c01dee3b541e43dfa9b2ee4699dbd88e2a0f2997861a5d97040ed441dfa83c776d8ff5a3176e9b466cff6be5b6ded7aabe07ca5d37f6f4c2f400ee1bc84f1f95fb2859d7654f39a6766495c729a7b66d3a5dc77d431fa2ca2b9f9573ecb2ae975999dafa80ae5f1a0f0df6ef83fb79507bf927701e65d0f39372b507cef3837102fb2be3a1d1fd1efb4b65f87f193c3454f4fcaaf294a3e8ba6b5e3834ed88f3a528b72d352a0fef1b33e4f5df9443655d776aefd02d582e94fb568c3be3b9813ddf2a577b6695df6d1bf3a8f662514eed64fa7c521e6a38ea79867c39b48dfa9f8e95c705fb1f0c79d55f8142d7a8feee1a9cbaacfafb013c24d8c7df29f398912fee8db2c431e17d562ea137ff41be52eda9f2ca15784c05f10e7da7ba5fe5e3afc6b1d1789333f0200cff6e2acf21415f4fc643837cd5f8ace99971de6bfe756d65bc770aee52d0f8e77be550d7555efe0c4e09f1e95ae52e8c382fe7e0ae4680aeef832345e4eb2a788cd08f351fbb18b8d1fc70deb858bee1be983bc67b9aef55ba453c6d1b4b8b7a73094e7d823d37c15944f575b7ca43985ae4f7163813d6f98b71417c7bd82b6766c8ff9d8bbe479a9fdd1826e8ef173c9bfc199c02e4f167e09c08f1fb4e9916e749c0718c6a0f817e9ce70279b5fe75656c0bce6bfdeea6b1401e79569ec750903fa7c65dd1f749fdd7b75d84bd68cf3899bc1d38ce51f7b3c64f1f6a81837f37c0fdd4e9fb45e3b9efbb01f6a457c6638bf7efc07966c4eb9a721c09fef7e0347403de3b048f52501fd51ffdd091f94beb479fc75c50bfb5fef463c7886f5f8ca5457d5a07f78dc973021e479ca76cccd6dfde1897a2f92cd7df19f9f200e66e02639d3a8b57ff15cc11eb1c94b9ea83fc1fc1d4a27ffa4730e709f9a9fda697b117f873dd7886bd44fb5b5f16e759e3a79faa01105ff7604eb8af683cf573df427fd27c8c4ddfc05ea2fe8b6dead0cfbcde17bb61863fc4836998d05fb53ebdb4e309f5f69371467cb1d6c318fb8c7940b41fc594ad3e8bda230ebdc59fc3f9816982fce7606967f85bf329e6aa2fcedf1a0f93dadbad19cf13f255e3258e6326f81ffa513fb6e89fc7600a45f38b5be3cee23119cf13ea9dc67be47a5edff747e034637e21cdafda0c09eb0c798426d88b36c1dc9a7c9067ea6dde7207e03a5ea01fdc1bd714d3f31a4f351bfb80fe7e011ed3a8f672cf606a102facf1949a7ec67d740fe61efef26aff3a8d7419f553e33d853a70a1bf6b7ca5eaff84fa7c09e63a10eafe689c2dbe351f534fc4e87f9b6066cb8ff7c613e291d4be29d6fc80fe97c684fda4fd28a52a0fe6870b70951ff1a5f99e061a11ffe2c0dfe5db302e33fa81ceaf29c7087bf30c1e53863c03b8ca83fa087dc6d8e37dbf0c669970df0765926646bdd478484c05eb0c7b72f537e261c738435fdf8317e77d671c26d85ffb7d7a891f5d27e823d59ee8075a8f53a9fae2fd2be31efa5334a609fd17f217e9cc7eda4fd2944a07be06d7fbd0efcf8c05e7a9372e789fb51ea5991bab072acfd04446fcc83b6369e1ff67e3a9457e9d825313109f5bc66d40fdd1fe31b4291beb7b43a8e7f57eeac0d2c05e148c5bc48fcbc619f6259d67872ece013c82ebf8827ab307ce92d45fa4fd63e853ead01fb51e0fb1be8f7e7108ce39a1be607fa49170ff07f0c29feec27898314f6bbd1952b4fc746aef614813be47dc399832a17edc81a5b7fcb9361e511f59fd33e4dabe21df93710c88e7b7e0fa3ee4d37a338ca9833dbc185bbde1c9389abd9e8d5340fdb835ce01f322de1f47ca8807cdf781d380fa4f2b0b0e88cf2fe03aeec1deb65fac5f11e247aaffd01fb4df0ea59e473eed826b3d417d867da6349a7c37c6847ac94fc605eb04f9a76a3fdc8ff89917e769d7d8ced3155826f88f35bf7293d8d64f8ca780786fc143d3a17e1b2fdea31b63863f44e325b7f53eb59fc77dede2bc4ce04c09f6d57a9043ae21a8f2ec81ab3de0ff75b0c80c7be1fe2e31fce1ee8d05f9e4eec0436bf1cee05a2f50ff347e725fc73bc4db7be301f2b947b044f467a7f37dfd9a317b91379e218f837e491af45fa7f3681eaaff11af3a0fe43c04c4179f82c5fa0d69bdafd3fae23eed8f99eb38827eb40c9638213ebf804b67fb35de6b3a0c01f543f3af0e2f09f586b51ee56960e4a3877c53e94d9fcbef8cefd7c138ce9897609f3a3d05f8e7192cd6df58e51fdb41ccde6b6059f40fad7f6390d1ea19f6f7b9ef313fbc06978cf748eb6ffd5a0ce66f9d6fea746cf313a93feab8dbf69837b57fd66c8df6f31331ce3df245fd33723d8ff96ad378b07eba62cc33ea95c6d72839a19ed2b231c11f74042ec9eedb3266c8ef57bf33ecadf5b54ebb56df48e38b9a2c3de637adb7d48e8dfdfca50117abaf7edf58709f68fda0900bf4753be0ba8efea7f580fa3ce1e73f746e3cf78897042ec5f455fd292e5834fe285579b05ffb130d63077fc9a371847d49e7833abd14bcef3e1acf33fa81e63351b507f24feb35f1d4d8bafabf7eac36789f35bfa88cf58341d7b57ed15426bb7f024f2dce93f6a33add2e58e781fa315d2750dd1fc153b0f7745eaa5f3b61c63ca1f5f4659a34d678abd3d382757eaa5f1fc6dbf7ffffefbfb6df3b4ffa2f7bf1c54ff57fb33ffe5ffbfdb13ff1a7fecc9ffb2ffec25ffa2b7fed6ffcadbff3f7fec17ff58ffee90ffbbff967ffca2ffbd77ec5affa35ffc6affbb7fe9d7fef3ff80dbfe93ffaadc57ebfed3ff91dbfebf7fc67bfef0ffca13ff28d6f7df09def7df4c90f3efb11fb9d77ce916327aeb8c9cdeed89db85377e6cedd1777e12edd95bb76377e5cc8ef6edd9dbb770feeab7b744fee5bfdfbec5eb965f7daadb855b7e6deb875f7f6677ddd3bf7de7d701b6eb3defed16db96df7c9edb85db7e73ebb7d77e00eddd18ffdae71ad0bae73bd8b2eb9c1e55a1e3cd5982426a15207cb998e7feca7133aa5333aa72f7441977445d77443b77447f7f4405fe9919ee81b3dd3abeffb97e935add02aadd11b5aa7b7f48eded307daa04dfa485bb44d9f68877669effbfecfb44f07744847d4504b813aea2952a297196964cf8e8999e587beb5384d3cf3319ff0299ff1397fe10bbee42bbee61bbee53bbee7871ff2f3577ee427fec6cffc8a97f935aff02aaff11b5ee7b7fc8edff307dee0cd9ff67fe42ddee64fbcc3bbbcc79f799f0ff8908fea44d372e08e7bae9f873fdb9f07ae9fbfe2c509098b4891496639961339953339972f72f1f37eb9942bb9961bb9953bb99707f92a8ff224dfe4595ed513cbf2fa8ff12c2bb22a6bf246d6e52d277927efe5836cc8a67c942dd9964fb2f3a7fdbbb2279f655f0ee4508ea491568274527bb8241924cbf8e77cf1a31f8b2faed40c2b5c84e652eaffa632ffa5fcfdcfdf7ff92f64b3cec5&lt;/data&gt;
+ &lt;/image&gt;
+&lt;/images&gt;
+&lt;connections&gt;
+ &lt;connection&gt;
+ &lt;sender&gt;ListBox1&lt;/sender&gt;
+ &lt;signal&gt;selectionChanged()&lt;/signal&gt;
+ &lt;receiver&gt;ScriptObject1&lt;/receiver&gt;
+ &lt;slot&gt;execute()&lt;/slot&gt;
+ &lt;/connection&gt;
+&lt;/connections&gt;
+&lt;layoutdefaults spacing="6" margin="11"/&gt;
+&lt;/UI&gt;
+</string>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="4" column="6">
+ <property name="name">
+ <cstring>ScriptHelp</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+file_write(".tmphelp.kmdr", TextEdit3.text)
+//this would be a potential exploit if we weren't doing it
+//to get rid of a nag for a file we know is good because we just wrote it
+exec("chmod u+x .tmphelp.kmdr")
+dialog(".tmphelp.kmdr")</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="4" column="5">
+ <property name="name">
+ <cstring>ScriptSetColor</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+color = input_color("")
+//how to handle it? str_replace section?
+TextEdit5.setColor(color)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Timer" row="4" column="4">
+ <property name="name">
+ <cstring>Timer1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+</string>
+ </stringlist>
+ </property>
+ <property name="interval">
+ <number>1000</number>
+ </property>
+ <property name="singleShot">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="FontDialog" row="4" column="3">
+ <property name="name">
+ <cstring>FontDialog1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="AboutDialog" row="4" column="7">
+ <property name="name">
+ <cstring>AboutDialog2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<menubar>
+ <property name="name">
+ <cstring>MenuBar</cstring>
+ </property>
+ <item text="&amp;File" name="fileMenu">
+ <action name="fileNewAction"/>
+ <action name="fileOpenAction"/>
+ <action name="fileSaveAction"/>
+ <action name="fileSaveAsAction"/>
+ <separator/>
+ <action name="filePrintAction"/>
+ <separator/>
+ <action name="fileExitAction"/>
+ </item>
+ <item text="&amp;Edit" name="editMenu">
+ <action name="editUndoAction"/>
+ <action name="editRedoAction"/>
+ <separator/>
+ <action name="editCutAction"/>
+ <action name="editCopyAction"/>
+ <action name="editPasteAction"/>
+ <separator/>
+ <action name="editFindAction"/>
+ </item>
+ <item text="F&amp;ormat" name="PopupMenu_2">
+ <action name="formatBold"/>
+ <action name="formatItalic"/>
+ <separator/>
+ <action name="setFont"/>
+ <action name="setColor"/>
+ <separator/>
+ </item>
+ <item text="&amp;Help" name="helpMenu">
+ <action name="helpContentsAction"/>
+ <separator/>
+ <action name="helpAboutAction"/>
+ </item>
+</menubar>
+<toolbars>
+ <toolbar dock="2">
+ <property name="name">
+ <cstring>toolBar</cstring>
+ </property>
+ <property name="label">
+ <string>Tools</string>
+ </property>
+ <action name="fileNewAction"/>
+ <action name="fileOpenAction"/>
+ <action name="fileSaveAction"/>
+ <separator/>
+ <action name="editUndoAction"/>
+ <action name="editRedoAction"/>
+ <separator/>
+ <action name="editCutAction"/>
+ <action name="editCopyAction"/>
+ <action name="editPasteAction"/>
+ <action name="editFindAction"/>
+ <action name="helpAboutAction"/>
+ </toolbar>
+ <toolbar dock="2">
+ <property name="name">
+ <cstring>Toolbar_2</cstring>
+ </property>
+ <property name="label">
+ <string>Toolbar_2</string>
+ </property>
+ <action name="formatBold"/>
+ <action name="formatItalic"/>
+ <action name="setFont"/>
+ <action name="setColor"/>
+ </toolbar>
+</toolbars>
+<actions>
+ <action>
+ <property name="name">
+ <cstring>fileNewAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image2</iconset>
+ </property>
+ <property name="text">
+ <string>New</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;New</string>
+ </property>
+ <property name="accel">
+ <number>272629838</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileOpenAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image3</iconset>
+ </property>
+ <property name="text">
+ <string>Open</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Open...</string>
+ </property>
+ <property name="accel">
+ <number>272629839</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileSaveAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image4</iconset>
+ </property>
+ <property name="text">
+ <string>Save</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Save</string>
+ </property>
+ <property name="accel">
+ <number>272629843</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileSaveAsAction</cstring>
+ </property>
+ <property name="text">
+ <string>Save As</string>
+ </property>
+ <property name="menuText">
+ <string>Save &amp;As...</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>filePrintAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image5</iconset>
+ </property>
+ <property name="text">
+ <string>Print</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Print...</string>
+ </property>
+ <property name="accel">
+ <number>272629840</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileExitAction</cstring>
+ </property>
+ <property name="text">
+ <string>Exit</string>
+ </property>
+ <property name="menuText">
+ <string>E&amp;xit</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editUndoAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image6</iconset>
+ </property>
+ <property name="text">
+ <string>Undo</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Undo</string>
+ </property>
+ <property name="accel">
+ <number>272629850</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editRedoAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image7</iconset>
+ </property>
+ <property name="text">
+ <string>Redo</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Redo</string>
+ </property>
+ <property name="accel">
+ <number>272629849</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editCutAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image8</iconset>
+ </property>
+ <property name="text">
+ <string>Cut</string>
+ </property>
+ <property name="menuText">
+ <string>Cu&amp;t</string>
+ </property>
+ <property name="accel">
+ <number>272629848</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editCopyAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image9</iconset>
+ </property>
+ <property name="text">
+ <string>Copy</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Copy</string>
+ </property>
+ <property name="accel">
+ <number>272629827</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editPasteAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image10</iconset>
+ </property>
+ <property name="text">
+ <string>Paste</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Paste</string>
+ </property>
+ <property name="accel">
+ <number>272629846</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editFindAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image11</iconset>
+ </property>
+ <property name="text">
+ <string>Find</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Find...</string>
+ </property>
+ <property name="accel">
+ <number>272629830</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>helpContentsAction</cstring>
+ </property>
+ <property name="text">
+ <string>Contents</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Contents...</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>helpIndexAction</cstring>
+ </property>
+ <property name="text">
+ <string>Index</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Index...</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>helpAboutAction</cstring>
+ </property>
+ <property name="text">
+ <string>About</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;About</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>menuTest_MenuAction</cstring>
+ </property>
+ <property name="text">
+ <string>Test Menu</string>
+ </property>
+ <property name="menuText">
+ <string>Test Menu</string>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>formatBold</cstring>
+ </property>
+ <property name="toggleAction">
+ <bool>true</bool>
+ </property>
+ <property name="iconSet">
+ <iconset>image12</iconset>
+ </property>
+ <property name="text">
+ <string>bold</string>
+ </property>
+ <property name="menuText">
+ <string>Bold</string>
+ </property>
+ <property name="accel">
+ <number>272629826</number>
+ </property>
+ </action>
+ <actiongroup>
+ <property name="name">
+ <cstring>format</cstring>
+ </property>
+ <property name="text">
+ <string>ActionGroup</string>
+ </property>
+ <property name="menuText">
+ <string>Format</string>
+ </property>
+ <property name="usesDropDown">
+ <bool>false</bool>
+ </property>
+ </actiongroup>
+ <action>
+ <property name="name">
+ <cstring>formatItalic</cstring>
+ </property>
+ <property name="toggleAction">
+ <bool>true</bool>
+ </property>
+ <property name="iconSet">
+ <iconset>image13</iconset>
+ </property>
+ <property name="text">
+ <string>Italic</string>
+ </property>
+ <property name="accel">
+ <number>272629833</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>setFont</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image14</iconset>
+ </property>
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>setColor</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image15</iconset>
+ </property>
+ <property name="text">
+ <string>Set Color</string>
+ </property>
+ </action>
+</actions>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="4190">789c8d96594f9d490e86eff32b507c178ddcdfbe683417ac4920104802015a73e15abe0061095b08b4e6bf8fcf6b7314e844ea5320788e5dae2a6f557fbc5ad8dfde5c78f5c78beb1bb9398e0bf148ae165ea5dbb3b3fb3ffffb9fbf5ebcacaa05fd29c77aa17af9af172f776e16e2c2d6c5799e8190021545d5480dae9d3be3c0ce83b4908fce22dd8c69db39480f5e71ce32820f8deb5a22f8d2b913ac4fd9398412f61be71c6c3f7bc64d17608f77c165d31bcb0f70550799c01bc6cd1802f4df3a8bb1d8fca64ea100df83bbb68a589fcdde3067db8f342960ff7c61dc76d1f6f7191c1ee5f2151c5b89f0177f01a73646f847da1997455bb8be187765c4fea800575d1b137819dcb695eb0fe04ee7dbf9de80c7ae30fbb46adc9709ebd31538f66d1aa07f3ee3aae84234ff4fc67d4ac63be0b2af6d3e63bf553514d9fcd581eb768a0d38801b5dcffcb50e1e87946d3df8b70a6399058cf35671acb2c5c3f47337448b2fe25d973adff2ad02575d1f916f7c66dc57e61f4ee04eed613d41bed6a1af23f2814c1e7b49487e423cea3416d9e2770a9e86dafc23fd8c9b34f4c9f2eb137826c779f9db8c5b4da709f3690ddc8d29637ff20096b1357fd17b705636ffc05e3b8d92b11f46be7612cac9fc8b7cd5640feeef7733ee6ba96d3e95e04692fbf3081cc260f3f90e1ce5d1ff9d7168b3e513f6df6795dbf9606fd084b6f8cb897128b3e5db3e583768fb61f48b6118fb68f28fc6d225ab0ff873907130397f770e160f79e46cfea403635dcffc7fe7fce8dfd7e038468fe7e83c793ce09f21cde5d1d9e5746d1c3af707ea73c8aa0f7f08ea67982426cce7c5198fc598cc1ed7c63adffc85fa19ab315bfdf095f3942cde4bc67a1ec457b0ffb196d2e4f2c1b9b67aa123e73e597f407e8f8d0c968f64fa4da8cd1e211e63abf32d7f2e9d079bcfa897b17f94cba273ebfab69ffed19edc82b5bb9bbf04f53f8ed2faf951dfa3e8feac1e37c149d7b37c78308eb5e517a31f8e53183cbfa12fa5fad7ce07ff48a56cf141fca496ecf5b7056e94cd3fb02fad4c5e8fb86fa40b85efe7d8b93439afcc19f521e8a7d287cee71f387b3e93cd1f4265fa5439eb05017df40b4ddfcaeddf38d7a6cfa81f4dd7d6f551efa2f596ac5fad397b7dc8a1736f72417f971c3cfeb4e73c583d32e21d8a20969f84fb280c61329635e3e8fd994f9c3dff08f74518556ef7eba573e9e747bf0ba26cf2e45cb91cf91e427ccc3fe44348b1f1fe89fb2616b1f37847e7d1fb21fc15eb28ce17ce215bfcd13f6213a3cb510fb19b33fa55d4ee614c5b73b678da7a2195769f30f237a6d458ff22ac9f8ad479ff43bea72af5d9fc8bf593367c67d45b6ad3684cc8e7d42771463f4d83b607f3f796739eac9ed00f92a4982d5ea8e714d2e472e4679a72654cf047d6e838e37ec865ae27f30feecb5ce7d619f7656e7263fd51b2b3cbf9da7998cc7fb8df73ab72eba7bb73b67abf76ee267b2fe0bece9db2adb7e1ecf608f7531e94ed7d70eb1c26ebafd9394ef6fe43fde7318f6eff74ce660ffd294b1667bcbf72507b560f787f68b38dceb87f72cac9d623f4f3ac1f67dc1f79ca93adcfbdf1544f167fbc0fa64287d53bfaffa4d13066f40bd5ae27bbbf50af53a3c3f209f7d7d4eab07e87fb68ea74186fcfd9f205f538f53a2cbf26e771b2fe8a7e340d3a8c514f2a7539d5cee272d4b3d223a3df4c518731fa893687e48c7e3bc12160f4bb099f19efdcfcf3f13b7d26a6dfe9b3fc423b70fcd50cd3e7f4d49e52e6e9f11bfef237fda399fe5c4e6afb58c7097fe5533ee373be78a6ff8d2f55eb6abe97638c6bbee15bfece77fce3e979f99e1f7851ed91ef65a6bdc4cbbcc2abbcc6aff90dbf7da2bfce1bfc8e37794bb54fdcfa7bdee61dfec01ff5bb4fbcfbd49fbcc79f61797f6efd800fb9e0527f2baeb979a6df72871df56e7fe0511da0ab9150a04889f2cffa34d1173ad219c734d35da6132ee82b9dd2199dd3854efc46974fe34b5774cd8b74c35b74cbabf49deee807dd13d1032dd2312dd132ad3cd15fa5357aad67d615e884dea8e65b5aa70d7a479ba47ea0f7b4fd347f68873eccce4c1fe9935a5fa45dd5dca3cfbaca3aedd3011d3ed32fa8d41d555453432dac77d4ebdf5dfd6fd0070a0bfdac2f228196f854f4253c6b2e44f24557b9a74d3992635e9493a7fa3ae3ab9cca999ccb857c53ad4bb9926bb991db596ec977b9931fcff35feee54116654996654556654d5e43f78dbc9575a1e7f6316343dec9a66cc97bd9961df9201fe593ecce747f5d5fb2279f655f0ee4500a7d4355fa4efaa9327e558ffa726aa5935e664f6efe67f5fbbbf1f27fff7ef17f0cf105fc</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="4846">789c8596c972e4380e86eff5148ec2ad62022d517b4cccc1e97d5fcb5bc71c0089f2bea79db63be6dd47899fa9ec74bbbb2aebf2992089e507a8df7ecc9dec6ecdfdf8eddbf3508697f55c7d214f733f9a97dbdbf7dffffb9f3fbe7d776e6efc3f49e7dcf77f7dfbbe379cabe7b6efeffc1878b303d234eafe191f194bcf03e37ac2ba0ace92c04fc64d9606fbf1e15467fdfe1be366c2723be6c6e5137b6f9cf7e71b17d3fbb6edfc2a9bec2f67d7291e73d9fb4f91b1efd9f65745cfefc66dcfd76396b2f7b7b0fba2dedf9fe67f99d5c19fc74ffe7dcc321fdb79d3f53bdb9f6465e0ad4ff1bcd97a9bbbb09fc6eca7f78f66cf17cb6731cda758bc497fffc9a7fbe7ed3ecd26e76fd87dd3f3f5533cd043d9fb57a19e99045e37aeb336e46fc7eed73e9f968faaf787ccdf6a9a1fab9ff4fad095593d49f2c99fc6eecb27f7939badb7587e2b1757c17e63d67fbdb4fd2e2bc2fdade96d5aef53f3a7cf27a33e533daecf9ec70bc6bd7ef41d9c6561fdc5eeebf5c6d07b9f6f363de974ddeae79328f827a6bfeeba32b266151758a2cce23f336e3aae8dcddf2a9db05e18e75d3e2a5b377d5553fbab90ffc09c9b3f49948778d6e05f1aeacba69f5a27eb62f136495e47ad9d97ccea4ff6437dca28351e04aee0bf402fb58b62dbaf0fe65f164bd4d83afa3573ad033ff6f1a8718cfe75a11fc5ea21b1f3716efe987e2529cbaab0759b4f923a89616ff5973c2e225ba74bf44be92bcb87dc430f491e83e7c1599bc19fdad8279dc7c6e7962fe772e45bac3e9ae5dd48b3f347c8671917c8ff2ef49414b1cd5fc2bca9e22c4a6c3fd6abb470a837fab7495c88af44ff3a077d30fad3b9aea2b67e1bd887fabc82bb1ff2fd0c7de619eaa3cb986f79d01fa5c6ddfd888f8e50ff38f4271d639ebb18fe92c5dfc4ddcfec39edd9ea456c9c6649827c9b3e9b4c1b457d0e31ffb3c659fef41e9ca709f472042e4ae497cdffa68a27fdbc0e4e6ae447d16f55593863ce8ca54853e4dff4dd34711af449e032cbd16fd7e0aa2c63db7f1658a10fde07378dc7fe03639f47a897a4811367f16b1bb84c505fdcef0b9fc1fe155c4a8efc3970e3bdadb3f543d3e63ec3fe0d70d741c69c80ebaa36ff75c9e6495c4dde67eb7fefaa34c6794d9837a19ff91aec823d2f82fb78adbe7e3c9e2d1e7e057705b2fcca9e715e38d45707602962f87b0aae4bb17c710cee7e38dfde1f5f4cea49ebe034d4936a70375ec1c1be4c73d46705dcfd701eeccbb809f1dc81bbf3507fccdbb2a833d4ef03ac5181f3f1fe564592c25fd3a797224aa03fc4ab75a1e81fd3b76fa476f06719ec9bd69810bfcfe3c8fa5d915f2f93f9857ab545e4507febff36aa530147e0ee877eb3f7bd8df32ab6fbc9de9bd6e5ea2cff7c00d656301fecfc36e97e88cfeadfa645817ea38dc09543fe76c0ddfda5addbf75c9be51ae69507977182f5367019f2b50aae0bb17949369fdabc931bfcb90057556efbc5de9fb62872c42fcb8135b1fce979e006fa92077099a4a8ef08ac6d65f7f11bb8aec4fc952db0ef9e78f307fe95ddf70bee873f652e31eaf51cb8467e2570e71ffad5072ec3fbb4082e1df2c11f60290ae8a30637aec43c45bc55773eeafb0eeef285fd36ff5a515f81d77a46bdecfba11d7fa0201f1cb846bff125b816e84717022bde577e085c233ffc046e62cc637e0c9c28fcc57a5d3629fcb9027782477e36c1de2bde1bebc7b69b7fe1fb05feb4b942ff7418b889b10e7db54516f4950516cc6f3a08ec916f823eda32823e24d8777ab4f368d033fa65217086fa4813384f10df7ecf980f778125851ef602d729f28df8da2a4a518fc59ea1df97c04906bddd07ae33c4b714b801cb6acfc81fead38a14d0db55cfc807ead36af7c960f50deb8d24961f1d05aef1bda221bf3ef8a3c13f5fe2bdd1d709e37cbd0eac05fc3b0edcbd80b64e817d85f7e606dc46d0934ae058f03e9c044e15efbb062e6a7c5f4513f616cfdef0573f261656aeb9f9b53d7b6ef99c2ff892aff8fa57f67cc3b77cc7f7fcc08ffcc4cfff6ccf437ee1571ef11bbf773b3e78fe9fec79c00bbcc84bbccc2bbcca6bbcce1b7f6fcf9bbcc5dbbcc3bbbcc7fb7cc087fc938f3edbf3319f84df299f71c4313b4e38e58c732ef686b3f65c72454c44424a3535e4a9a573baa04bbaa2ebb1c59fede9866ee98eeee9811ee9899e69482fdd8e571ad11bbdc3666a4f1f344f035aa0455aa2655aa1555aa375daa04ddaa2edc999137bdaa15ddaa37ddb714087f4938ee8984ee894ce289a7a0c7b8ac9855f4229659453412555c242227fcec76cbca2524b235e5a39970bb9942bb9969bbfb3975bb9937b79904779926719ca0b3dc8ab8cbeb6973779970f9997812cc8a22cc9b2acc8aaac7d6d2febb2219bb225dbb223bbb227fb7230ce951c7e652f3fe5488ee5444ee54c2289c54922a964dd0762f7467c615f292ba9c8896a37e61bf532d256cff562d67a62af977aa5d7e31d7aa3b77ad79d30d27b7dd0c7cf2ab47e7dd2671dea8bbeea48dfd42a2f2319e8c75f556bf6f33ad0055dd4255dd6155d1dff5d3fbeb20ef66bbaae1bbaa95bbafd95cd8cfdfffefdedffce33908e</data>
+ </image>
+ <image name="image2">
+ <data format="XPM.GZ" length="3278">789cbdd6494f5c391007f03b9fa295ba45a3cadbfd9e4673604980b043584773f01a206c810602d17cf771d7bf9a0cd124e13432979f5cf6b3cb65376f5e8f0e36d746afdfccdc8cedf8c48ffcb1bd1ebd0eb7e7e70f7ffef5c7d799575535ca7f65dd8daa57bfcdbcda1a8ffc68fdf2224e6073fc88fa34b4439a9817d5de19f1dac443310498b6c45ded8b42c607b119ca3e48fcdcc4b69834f10771d9bb7e103f885b5779317d14f7a66aacf49378b0c175d2bf29765d6ab01e2b8e6ef088df9dd85526b55efc45ec7d994af1c9c4bef1436864be0db1317dedc4857830aec6fade89f30409f9b85187d48bdf8a7d36fa17c4d1c724f9e455710a85f65f4c1c8a5027d90faf884b5b0eadf81e0e0dfae95a5c995863bf3b701e2ff9a5b1b8ee8a02fb3d86f3787cffbdb8b5ce62bdcb7068b11e92fd04d317b514036fc0ae73d8ff91b8b75d8ff555ea7c24e24d380cbabf73b10b4ebf2fe7194288fa3d39cf1073fea51ea89f38164351cbfa6819f6958365fdb11c4c27e747b5b8f246d7f7198e35be47f2fd580f7d8bf84fb08b16ebbb83a3d1fc1f881bdbb638ff33b533c8c7351c355fdc88dbc1d4c837e2dbd8697f129b3c3fdcaa6d927c5127ee43e3918f523c58d322fe168e9a3f5a12bb5846d4c3a95aeb918ed511f35b7cdf871ef781e4bec5e02b8bfd5cc1715aaf7beaa4f526f725465736c807c351cf8fd7c529f880f3477e53eec67ab0fe942a5d8f9c772a5cddca7de30e4ed3fb10c5f976aa8dbad2f9e4fea5caf6b8efd6c2ceb658af51bb16f5b0a54e384f9e8573433e4f9e8cef0dea5a2df9ce52d3a2bac57ed8a93bb5bc17a9f1752bf7d1623f4d6c02ee5b0fe786f9f6c56d8e477d37ea56c7339c338afa1ac3695a7fdbe2cedb4ece932a7568b13fab4ea827ba8793d6271d8a8deff53e79b5d7f7b254a70ef96de150c016fb37b9e17dbf7c32e697fb94fa3c1eef6b7a32f67b07e78678f9bd48f935eef07bb2a71e3a9ce7299cf47d21793f930d16f333c6e7dba5fd3b6aa7f99a17bba949de8be483efd05fc3b132f8fd59513b83fadf550735eac54f66146faba7f711e71fa231924f3a52bb1ee7b5ae0e301faa738aa51ff90da9d4fe47b5de5792df9b94af638f7c2ec0a950afa91bf5fc93f11eacaa3bed9f551bfc1ed3a3bad7fe07f500f3be7afa9ee3fc537203eae9eac9d8ef9c3a0e18efd5fa5e6c8d278de907cda21fed59bc63af2d70e4c41ff9984f9e8ff841bce753fec4677c9ee32ffe3de287f19e2ff98a3fe7f86bbef936e227f19ec77c9be3eff89ebfe4de875fc63ff26c8e9f36e2b95fc47b9ecf2df202bfe577bcf88278cf4bbcccef79855779ed05f1ebbcc19bbcc5dbbcc31f78f7bbf83dde7f161df9800ff9880b2eb9e29a9befe2db9cf38e4d5e43cf03319f119125479e02454af4f1793c1d734f2779d62ec75ed1297da2333aa70bbaa42bfa4cd77443cfe36fe98e2fe93ecfbe94bfd2d1177aa0479aa5b9dce66981ded2bb67f18b39e3f3b9764e65d498966899ded30aadd21aadd3066dd2d67fe6e791b669874fe98e3ed02eedd13e1dd0211d51f1d37ceee75125555453432d7564a8ff55fe69b0cc8f96accdffbb791b5e70beb9d9fc8f461ee55f540fdf46fdeff179473f6d12fff7ef33ff008c9a2542</data>
+ </image>
+ <image name="image3">
+ <data format="XPM.GZ" length="5646">789cad974b6f16cb1186f7fc0a8bdea1a8cf5c7b6614658101db180c36d8d838caa2aa67da177cbfdb47f9ef69bf6fcd07ac721445b079dc35d5d575fffe78b5b4b7b9b1f4ea8f17d73772731497e2a15c2dbd1a6f4f4f1ffff9af7ffcf9e265552d3dffef9ba5eae5df5ebcdcba598a4b9fcecfa66790b7195c51946decc1c7c65d1cc0ef8c87189e393e19abb6cfac8d7124cbdeccb1c0f9a6f1a4f85e1f8d9376e071c111df1fcd4c7b74225785d2be37c65514f077e3dace578c1be5f98f058fb0ffc0b8e5fdb23b734ce013e3a0faccae9a99ef71b571477bdd07e39efaddfacc91e797c6839dcfef890aff3b7b7f352aeef73bc693dd178d532ce18f965c0f11f6c74363b5f82d83cb7c3fec976fe4ba1ee17fd95930fd4ffd75ad23ec512537e5d48005dc343559b6c1a11e47fa93f1ecea92f175a57135c27e7f07eeb3fbf91eda3fb6d558431fec2ff37b8c5f83cba61ae1bff800cee1b57cd902d76d3d2299e33db8a947c63be2beb26f2afa5b604f39b432c2fe780b9626d0dff2446eab89fabf18f7d42f5fc1b1d589f1827fcab199f3e13d39ab03c71bf0d468c4f74afd533bd2ffcaf7a43ab29efc0539948c8743fd5545dbd15ff11a5c3529a2bedc1b72b68ff990c8a1b0783ae392f62af2b56a1a61fec823395466ef15b86d6babf77d72a8a82fa21eab2eeb67fc578ddb11f211f95df56d67f986faaa86d04cd4776a1c46c607efadb23f596f0efda31a83d8f93938e5fb60affbf8cc7511e208fdf10c5ce50464be7c217745023bbca7aec3c4fc9144eebac47e857ca99bec4fea3b25e7f7e03c9e18778c5744ffa84318c88efa4257587e225e751794fef2c8ef7ae86abbffc13824f8cf15c663623e20df6be9f21ff03deab58e5dcbfa52e4733db603fde157c85db07a453e37e522fe1e5c7589fa3dfcdbd46dcf7ea337e42013eb13f5dcb4adb01ef49adc95ac07b74a1e9ac47a590387be613f70fbe421f0dc517fd795563f13b98f89fd70853ccb0beab9e9fb86f60ae2df489726c61ffdbd89c360fad78c235911ef26753ded15c4b72d7a49e8876e035cf689f9a8e8376dd7f713f367200f55e2bc403f6e8759bfc7fc6b3558bff0f0771b876662be63beb569e813583f3f7328ba96f3c9a17f86dc90980f1efe09d5d0f37b8ff7863a8cec170ef9169aa19ef0bda2be422ef789fdec8e3c4cbccfa1de43e807e683f3c6c27c729fc0d9dff48fbf368ed4e7e18f205d13e10fff76c1cccf40cef6303e3d384a48fc1ef323e47cb4feb44c1e0afad75f1927b3dfe473bad13ee47f48c39c4f17c63131dff9fe2425bf77e8a75d2e20b3e73339ebe3fb617fd7483151fff9cca60ff1e8727be5bc748fe441cc3ff067d7f525fba1df30ee6d7e3d908769c2f71ef9928f2beb9f81aca5e553071e32d35f981f9df4b5e5c73d39bf8ff13e206779e6c33be3d6f211fdb81bfb39bfeec8529b7f6fc95a5b7dc09fdd240dfb9fbb350e167fde9f7adb171cfa6b5f667fb2df2b592d5e1ef3a47f5e77589f7be4f9dca19ff68d4cac67877ed6b75a597d9f19ab9da3dff6410b3b47bef659bddd87fed10fc33c0f76c91a98ff82f8f4a293f517ec377dde06acbf22feb9387389421fe231e475c3e6f119597bf60b41ff1e9ab1b2fb317f86104beba794cff1e7bcf27b64992c7fb7c9d91dd487fd60e8b33dec37c8bfdc5eacbf08f5c7c57dc8af2149c379e7900f92b75fe69bc33e2265ecf81eb921cfdf2bfc2f793bb67ab8268f35d9a39f4a2d62f30bf34c72c3b5f98d79216134ff3bcc579138f2be8878884ab4f98dfacb545a7d21ff651a2d9e11f5a18596b6af2c93636ffec4feac794132fb117fadb4e27e2157e4d1ea574f8cc5ecc3fcd0bc0db0de14fbba366afef3bbe4c9e697225fb4d7dede1f8dc5f663479eedf1ebc6769f629fd4a891fdd663feeb180b8bcf26796c6d1e20be3ae5f511fd430af2accfbf379e4c3ffa7f6e6676bfd4c6261f518fb188a5ed07d017cb58725e7ae447ac626ffde00339aba77e728881f9ead7c8a9b4fb902fb15bd883f91efbac8ff1427cf2f8b5f91191cf51f2cf19e4b7c25fd93d6afbf43179d627984f3979e67c5f35b6f73acca3388e15fbb7225ff3f230cf6ff86bccf1e6fc8cceb831ffa3be3315960fa8cf316f77d6ef0663eb0f1ef93fe606ca7ea747e4d93e857fc6611c688f5c92d3bcef503e4f5bd68722dfc638dafc8ade78e4f7fec0d8f633c5fbc79419fddef7e4c9fa8d83bd99e6f8a19f4ef554d35e5f2d98efefc9c9fabfc77c9b9a29d01f1ef53cb593f5435927a7799fe27d61b27d5557164c7f2d2f98f307f53e75b33f14fd77cadd8af678d4eb24397f590f986753de66cc1efc9e999ef39ff141ff9a524e17f2eb05737fe5fb52b2f84a653ce72bfa6f3e2d6c3e5c18cfe7d80f72742bd3bfb560fa0bfb45fae93fd463ceceb91fec1bcfef45bd6532f6a8ff945f6fe7c8c73424db5f15ef4d92e6fa473f4971f6bf473f4d480830ea3ba539fe5b377ffddfff53de3b2f5e7dfc6bf27ef4934ffec01ffe77797f94f51efb1ffec49ffa337ffebbbcbff097feca5ffb1b7febefb2f4bd7ff08ffec9bfcef2cbfe8d7febdffd26bfe257fd9a7fefd7fd07ffd16ff84ffeb3dff45b26ffc57ff5db7ee717f96f26bfebf7fc77bfef0b5ffe225fe51b6adffc22df423ef8cef759b6f84d7e70de39274e5d74a3e3fc4dcff2eec01d9af442de1db963f7c39db85377e6cedd85bb84fc15e4afdd8dbb7577eede3db847f7e45ebb65f7c6bd75efdc8a5b756beebd5b771f20ff11f21bee93fbec36dd96fbe2beba6db7e3beb95db7e7be67e97d57b8d2558ebf8f1bc8b72eb8cef56e102f79ba3fcff3fc033c17a91cc8a11cc9b1fc9013d4cfa95f953339970bb9942bb9961bb9953bb99707799427792dcbf246deca3b59a17f6435cbafc97b59970ff25136e4937c964dd9922ff255b66547bec96e96df93ef26bf2f859452e58da49156f20f0fe96550af4e455523e575d489f29af4400ff5488ff5879ee8a99ee9b95ee8a55ee9b5dee8addee9bd3ee8e31c2f7dd2d7ba4ccfeb1b7dabef744557754ddfebba7ed08fbaa19ff4b36e2ee4b7f4cbcf48e957ddd61dfda6bbbaa7df75ff798fc9bb49adcd423eff345cc817dae54d62883e6222c698c7c0944bfbe067fec4c378148fe38f78124fe3593c8f17f1325ec5eb78136fe35dbc8f0ff1313efd8ff5fbefbfbff80f5aae600a</data>
+ </image>
+ <image name="image4">
+ <data format="XPM.GZ" length="5534">789ca597498f1cb91185effa158de14d3038b92713860fbdab57f5a2a525c387086666effba2560ffcdf1df51e2ba1f25c067695d0c20706c9e08b85acdfdf2f9d1cec2dbdfffddde3933c9dc7a578260f4beffbe7ebeb9ffffcd73ffe78f75b512ccdfeb5ed52f1dbdfdefd76f8b41497f66f6f8619c447039755595df6e0077093b58905dc1ac35e3f83bb4caa0cbc06d62c5625f80adc67435563fefd8cf32ccfc85227ceab00fe082ef2b212d83b709977159c9557709d3715fc910b70c8bb9afb7f024b5172dc71fd98f775053e008f455637b05f4ddcd558dfbdcdb8288ab2ee307e09ae8aa1867fee0cdc146d1d67ec73b014da607fa9c86555534f0f56639cc71f8187626ca08feccfb8cc4a21c71e9c9745037fe31dd83e69fc165c9735c7fd56e2a6a1bfc7e0a6ca1bf81b6fc06dd93638af7f4b1c1af82f3fc855d650ef6b705776697e9c58c18867a9a5a6fd56c855dbf0bcd0abeccb9ef6724eae9a66c438e255598271ff88f12a377f31dfdf272e5ae6cf45e29e1c156c016911af887854f6e1fa0efa577535b6386f3c053755d3e6587f8d5c0f81fb8fe05005ae2f25b92e5b9c2f0e60adb465fe203fab58372df5db030f75d7627f8f7855635d901dd6ab8b260fccb72fe0aa6e03f3ed67e221607d7901d7668ffa70c88fba69aa007ffc3ab86d62c77862ff3a347dd7c21ee7ad63d304c453ce12b701f1707b8925c03fe57a7d53d0dea1be9aa2193be8e176c1656b0588fd907f266748f3912f4dd348477db3c463c7f315e0d056f4d7ed80a50d1dfd6bc0435b76c8373d018f6d9bce9327960efe7be8d366a110eaf9155cccc7dd36b8b471ee8ffc6eab9009ead36f243601b03ffa415bdb7cf40b7f9878a4bdcbc8214f8c7c6943a884f982f8b56af638bffb4e0ead207eba09ee43109c4737120bf7f7f46f08a3305f78be31a830defb89d3b87f265bc3a53dea3f6436ce7edc818b507460b94cdc502ff70d5c8641a8e7077065cc7e867e11ea500be2adb7e42e17ea83f386666eafb46fba92fe6800b7767eea8ff88610a230bfb85fe85a653e217f82ccf57027646b37d0535b701ffa14efa389e1bf1e4e0c7fdc33b91385bdd09fc198fb7d4fac8af878f4b330d397e7799b98fa727dcbe6c48867977583223e02ffbadc98f98bf37685d9b33f2e4f4c7d0ee6acbcafce26a65ec8676bb723d7f7885f577555da7f397150f647c4a3abbb3acd7f224ba98897e2feebac9a527e9ccf39cdff3831e37d3a31fb0bfa6f679f64ff3a31f5dd9998f57448968afb7bae2fd246d60ff7d7b95e6e832c21b27e1e137764453fef6217533eec4f4cbdc789a197fb429656592fdcafeffa741eeadfdbfad04b517fdd60fef0beda9e98fd1dfda71b2d1eac17ae6fd912791fe07d24d99c15fd5e72c9933ec5c4ec77bb13b3dee6e3155971dfc8ec41c1fadd9a33f5f363e232f983fc9172cefa3231efd3cdc46364fde37eb5ddb2887e24e86f524b9df41a12b79cefd6c99ad35ee9af7513eaadfd9c192f7923dbfadcef73e234df23bfa49dafaf7b73e6f904fdc1da41a09efe38b1a4fcb9236b15b93fea5d3a8b27fb31ea5bec43766b64ad23f457c453a2c4541fbb734ef18b13337e9b13f33e3a226b1ba937ea4d7ae969effbc443daff96ac2132dec82f194c1fdeefab89bbc8f72afa898c2a6441bfd66c1e2fd58999ef9f126ba49e88a7e6a637eb656762d6e7c6c4ec973789e7f3517ff6bc2ba9977f4ddcf78c0ffab33d872a9edf2f27ae933fc78907da3bf477b5eceae90fe2a38d363cbf3c4fcc786e4fcc7a9089a9c7fac4cc574d9ce2e1f17b41ed0226bb4bb2fd0060bda35e35d838eb03fdd6d42f7ae60f594c7ff6db2b72b4272cec911f6a1ffaa36ece3c9fac4d4c7b491cb99f5b21c78ae3caf8461be77df23431cf7b3a31e3b33567eaaba867ed2d3efc7d84fea4a3e9cd7eed27a6deab13339fd1df631ead45621cfd2516a607d743fdc6cafc65bf5899987aa33fc73af689d1ff6213879efd13f914dbd8f6ac27f497186220eb8789999fc8676be75d5a0ff966c55af4bc3f51ffd13e5cdfd33eda0f0e8c0be26b837dcf7e8b7a8c83f9c37ce67986be1a182fe46b1ce3c8f90efef599adc7fe8bf7549ff7f9c0fc87dee64dc171bf93380cd0dba39fd8ec6ee07b1ef9d25bb4b9be877e7ddbf703f5c079ecf91206e8ed5713f703f5467edbf5d5717d41bdd9f1e2c078a1bff4fdb4ded1c4d413f9d7dbe9b89e831e433e5403f57d485c0fd4f37162e61ff2dbac93bdc3796c340cd40bfe0d8d5d9864ec37b4838cac7fce0f839205fd66e8267b9f388efcfd00bd0719fa91f9c7719dcff721f130526ff44b0bef9818ef2f9b9d8dac3fbc7fcc3a1f99ffe84763615ff65fec3756f6a5dea8f7715620ec8fd86f9c09c8f7ccb789197fd4eb88cf8c0f9ffefaf77fb5f7ce8b571f7def073ffa537fe6cffd85bff457fedadff85b7fe7ef17ecc53ff847ffe49ffd8bff61ff2f7e5ffd4fffb660bfec57fcaa8dacf975bff127fb4dffc16f2dd86ffb1dbf6b237b7edf7ffc93fd813ff4470bf6c7fe93ff6c235ffc577ff25fd6dffc779ff97cc1bef0a5af7ced1bdffae03be79d73e2d445d7bbc18deed49dfd6aefcedd85bb7457eedaddb85b77e7eedd837b744feed9bdb81feed5fd740be775cb6ec5adba35b76e761b66b7e93eb82db7ed76dcaedb73fbeea33b58b03fb4958fdcb1fb647f3fbb2feeab3b71dfdc7797b9dc15ae7495ab17ec1bd7ba63ffe4823d84bdcc5e2776a1ccde0832caa99cc9b95cfc6a2f97e64b2b57722d37667d2b77722f0ff268d64ff22c2ff2435e17ec7fba7b799365599155599375d9904df9205bb22d3bb22b7bb22f1f17ec0ffc811cca911ccb27f92c5fe4ab9cc837f96eafd87cf6b2944a16fcb7d75d6b2fb04ebdce6e46bbbcecbeb182d4533dd373bdd04bbdfad55eaff5466ff54eeff5411ff5499ff5457fe8abfed4375dd6155dd5b505fb75ddd04dfda05bbaad3bbaab7bb2abfbfa510ff4508ff4583fe9e705fb2ffa554ff49b7eb7774fae85bd4eecfd317b03d8bdde451f5d945fed6797e7ac615a973f8d67f13c5ec4cb7815afe34dbc8d77f13e3ec4c7ffa71effb2fdbffffeee3f83ce47d1</data>
+ </image>
+ <image name="image5">
+ <data format="XPM.GZ" length="2509">789c7d944973db461085effa152cf54d956a932089a55239c896572d96bcc4b253390033186ea2488aa416a7f2dfd3db0cbd44e6d340f8f8def43406209e1c742ecf4f3b074ff6d69b7a33711d37ae6f3a077e3b9f3ffcf5f71fffeced675987fecab293edffb6b77fb1e9b8ced9e2ba65c08c00baf2117e2f5c86d02d99e196b9d7ed963df53f2ab3c47789258fa7c26564688d4bf30f23673de113e6ac1719ae9459e27f4d5c893f17ae126f8d2be3ebc87d9dff4e3904f317ccfd5ef23f28b3c45f26963c7e510ec1fc9570157dd81857967f883c90cd8635f3208b8c0b6596f863e17a500fd597fe8744c35afc1be33aef8bff5ad9b5e637cc7993f7f346fca571637c1fb9d0f99f9543b07ab2df453ff9723d0551a1f3d791cb8170573904f3a5bf725034e66f133be96fa44c1246799e4a573495e461a29cfcbbc8e64f8d9df96564f5519e876a1019668975fda05c593d5c25d67a6f945d6ef3bdb08b3ed491eba1e467c6561fcf229bff4ad9b5c6c7ccf530fa8089bdf8136596703fb1f800c23ee5ff548e3e7a636f3c8ddc68bd8ab91926066596b05c5fe359c285b2cf8de5f7ed7296f050b825d6f74763dc1a0f227bcdbf60f679e29789353f5666093f4facfe857208e63f156e93df8bdc16c223e358ff28b2f939735b240eca2ce1678983f0a57208e6bf150ec96f8d83f127e650b084cf85e5a32fdf9d10b0c6c6e44835c9631dfd9ff235b618925ad1e89779278af5750df7681ea40316d8111eef876a79ad977ae773d8257ec8efead629fdeb3ca4ba9ae6e11fcdbbef6aa72b7934ef695702eddf4e631a13d2f4c73cd599e115f533a639bbc173e6788d0b5cf23a314fe915dee01a37df698bb77887f7f8805ff190e64c342fb59fe2333ca2e373d30b7c89aff035bec1634a9e904ef1417faf78866ff1fc275de03b7c4fa3a1553e50fd8f78a2ef0bfcf43fe973bcc4cff805bb74d6a3de0e31b37c9f561fe090c6583a19612e9d1dd179417db1575237191eeafb172b9cd22a7d409a7bcc8f0c4e68f01900ef44090db8547f4ee9a966456732445083078f779a8756dfdf52f19b1cd59c699254e31c46d0703f30b6fa5239a5d27faabc22b78409de838316bdd51fd1377730a531a12bd363c949aa3d936f1a6821e8fda566aef8fe011d612eba860569495a9196721ebe7d7ed0c30dac491b58d2bd21c116b634bf25ddd2fd9dd9f3f6efef7bff0111915e41</data>
+ </image>
+ <image name="image6">
+ <data format="XPM.GZ" length="1472">789cb5d35b53da401407f0773e4546de980ee6c2ee26d3e9838004150183ac974e1f92bd7841501045ecf4bb37e7ec914aeb431fda330cc38f3fd9ffce26ecd6bcf3e1b157dbad3c2ef3e58df2d475bef06afa693a5d7ffdf6e57b65270cbdf2c58417ec7caaecd43de5f5ef67063ecbf273d5f71b4ac7c01151eb1c18128d56c06c43bc7648b4c6070e1c996f42606fc306302586068b8e8891c1a2ce8658d422360c169d1199c5a2d58658f442e4168be644613970418c2df63637c4de0931b1d87b47cc2df65e220356580b34c88829478b644c3b3e237999e2ca0532e1be4b03a4e6a16315180482567e40863c727b3e46469cbb34778ce9da3192f1d8d147263c77bc40169c56be452a2edc599d03c3a05c18d343642402c77d241354a4913137ee2e9c2213c15c7a822c046db28bb48276b5064691c86d01ec2385302e3d40ea987adbc0068b85e31e52c4dc26c057206309fdf811c883c4370cf884348972cfc61228929cb63145ea3c3011f01e18ebc2b7f847b802268d821e51852c0fd23dde33a455d47b03cc0bd570d75e0315d374ecf50fe73f25d5bcfa7152144a171f25c65e5ddfdc9a3f93c9dd74369bdd3f4c7e4fe68bc725ccd3f37c3b59bdac5fddec35575b49ebc5daa2dd6eef5bdb6cb5de279d72d2eec1c1617ad4e9d0f769fab6ebde71bfdf37830105835eef2d19a627dd6e77926559bd9ec10c3767309a9f96339e67520ece5672f4eb74a45c9cd35c2ca47c7fa252f62ec7beef07f31082adb396526669f926fff62efc9be4c7e7ca4f48a042fa</data>
+ </image>
+ <image name="image7">
+ <data format="XPM.GZ" length="2205">789ccdd3d94ee3301406e0fb3e4544eed0e8a7d9ec44a3b96029db1468d9613417496cb396b2b46ca379f7b18f4f8a8a60e0129d4ae9979ce4771c7b6e3638ec6d04b373adbb51393aab83fab4bc0d66d5783078faf5fbc79fd64c1c07f6278a209ef9d69ae98f823ad81c5e6987b0b208dbedb45639196ca54a72cdd6aa76463131dd8f946d749b9c79676d4d6148264ec9c7ec480bf2013bd6948f7d76a2291fdb13fbfc1e3bd53ebfcfce8ccfff39b1cfefb285f1f94b6c697c7e879d1b9fbf3cb1cf1fb10be3f3c7ecd2f8fc3b729455c690afc84956b387e42c536c439699619f900bd1f60e4b722522be1e92954cd89a6cdc03c8d41f45b2c95f27c722e1f7cbc989107cbdf2ce63f613598ad444e4985df078283f2a44c9fd876423345b38c79168de67839cd9eb19b94d9693f19f9273a1f9fb3d924ba1f8fbef902bd98c57928dccd95bce49645d90f7c8996ce63b224bd98cef88acf2663e779dd32c97ec15b2edd70959914d21b59f8f7be72ccb53559137bd8be67903b2c833bf5ff0402e73e1f71316c9755ef0fe79761622d7ca7f9f3567999609afb755b22c9bf1d1fe93859d203f9fd764552825c967ce795de69c3f4f56a5d67ebc0bce369cd7172e9dcbb232bcff6e9cab5ac59c7feb5cdb09e3fe7372a10ae3e7e7c2595786d74f7ff4f9fadafd0851a2b25543d151bfdf0f83139ce20ce7b8e0bac4c09e336ff5e30a435ce306b7afeada9ebf7bdd8f11c6b8c7031eed718c273c631e0b5c8b184ff763091daa652c53963d5aad60956a0debe84cf5ff44174bd3ef659fd1c50636a9b6d09deaefa1ffaa7b9baa871decdadab3fffc99edb7e61ffb38b04f776f728823aa21a98783b7bf178eed1d6d44531523c1f17bdf17293208c849e52890fe6f3d8440118636c556588655888fd68feda9ed730586f65ff599f54677745eba3f5e9faef7a5fbabef974ff4fffddefa0778e750c2</data>
+ </image>
+ <image name="image8">
+ <data format="XPM.GZ" length="3982">789c9596596f1c370c80dffd2b8cf02d289899d9198d84a20f8e6fc7f711db29fa405dbeeff559f4bf574b72174de276518f0dcfb7a444f1d47efa387bb4bd31fbf1d3ccc390866761369cd2fdecc7f87875f5fafb1fbffd39f3a16966cb6f6dabd9e6c32f331f7686b36176f3e63a8d00a800b4b18d7dcb0c23ee4c677a3f62ac98a9a33e337f63f69d579e1fb1694d6b0df32e7332c9cafe9723eeeb2e76a27fc83c30d1b23dfcc25c7e5cc7fcc46c7beb783f4066d73bd78f98ae9853dbd5c4fa47ccb9cf2eb0fc7ac4b66e7b956f0adbda45deef82b9e9a3e360e096b06d1c9f975698bbd6cb7a3a540ebadf6761db51c5f23d66d346d5e7f3583b66d860766d52e6f8596ab3ea73fcad2ffaec1fde32071b88fd278ea74d5da3f6b7856d22cb72d93f7703953f8ed80ddc80247fcbccad6b49e233c7dc757d2d72f6d7196788e343fbcc7dd7d59c0f5a5476a24febcaa4eb5799adb39ee301b2bfebbcea8b9cca7af60fae94c7f27be5a0fcc61cc68cafccc9252ff5e999b3a9547e21ecb297f32e8c98aab19cee985bd3a8fd4a791c2f27ec8cd6ef9b30b55ef275cc6cba5c73bdd0a6b0a96b3e0f3d333b338e27c7873c792ff55e33074335c71fcf852904a91fce97af4c14396565ad17ba61aecda092fd1e847d1d062ce7fef24dd197fd4f985bdf0689c757e6aeace7fc2208fb2e88bfc71396f8f0f9bcf14dc7fb01c7dff7e57cec3fdc0af703b527e7b5de06c7f20133f59dc821289b9ae5d84c58fc95fd8a41f18fe47c7ebc1e399f3ef81024bea7131639f7bb8f3e2a3f4f58fa9dfbd7274395d4c38b706fb5dff6262ce7e1fe0e55efa4fef14eb83c12ffc83c088328f383fb25747daca57fce9493307ae1d045c9d701b331a1e2fe05b167c6fab02d6c6b5dcff321f4a18f322f657f175c94f9c8f33350df8a7f28fb7bdbe87e5c3f215aa3fe5e0a8718a5beb93e42b6bee6f987f7c221478917ef1fab3e6bfdb17eaccb7ee22fcf97382872b1f7226c9dca1f9493d8a7f3094bbe3684cb23f705e72fb6e3f5b8c35cae8f28f67be6de557a5ecb4c360ac39893f29ab073b5ac578e94a47f13b32ffa35ebdf4d58d62f3107971a996f623f8eed13f75b4c4ee73df27c8b39e624f9e5fe48950b9a8f2761aa1be9a796794056fd5d122e8fecc7f334b5e5e17c80612ee357cfc7f32599b23fd7173c0a1335c21cbfd4fb46cfcff329595b462433fb9f8848cfcffd9bbc6fb47ff97e4fd1579a4f546ef5bc43e69c7296fae67acf956d2ab1c7f1c9b5efc43e2e0a9747faeb65c272dff179736343c5f9a03561d755523f6c2f97db4dfc45231c6c23fef03cc81d35528f34afacf30fce8463d5c8bce27acfc68ff3cbf3a9b4432bfd0f9bca24f30b5684cb7ab1c7f747f9f2a1f9c01be1f248fcf83ec9e4929c1fb684c340e3c9f9cede05cdc7aa70348df8cbf33707b23abf4e857dd4f3483c63ec1a99f77c1fe654c2c7f58741789420968bfd5ce229fe1e29f7c2b4adec94657da64a392abb4ae2a3ecb3de874fc2c5bef4d39e701c34727f77caa4f16ac7acfdb0af1cc41f5850ce2a3f98b0ec27f1c8a9d57cec2a1b5d3f9cb0d4abda4f4ef597957d23f3f041b89893f99494b3c46f67f8de838084fec74fff533f60fc1ffa8409f3844ef0748afe59d13fd7f70bbcc4ab29fad7788317fc768b7765edfd14fd071ce263f9ff84cf45fb055fa7e8bfe11c7ec6795cc0455cc2655c99a2bf8a6bf805d78bee066ee2d6d4f86c172f5f710723eee2eefbf1c43ddcc703fccaef877854627a8cdfb07a2ffe586383036cb143833d5a7478060800f45ebec043800809329cc0291a388373b880cbefb5ffa17f05d77003b7e5ed0eeeb1830718c2233cc173795eded17f853798e3b7cf300f0bb0084bb00c2bb05afed6f0e027fd2fb00e1bfc760b9bb005dbb003bbe5d9837d3880af3fe91fc2111cc337a8a086061b18400b1d18e8c196afe648f0bd7eb92c3c1c95efb0e512a58c75f9e4844ee98c65e77441973fe85fd135ddd02dddd1bd48e88186f4c86f8ff444cfd3f24b2ff44a6fe5ff1c7da6795a98aabf484bb44c2bb44a6bf485d6a7ea6fd0266dd1767976e85feae787157bb44f07f4950ee968a2ffd7af337f039acbe337</data>
+ </image>
+ <image name="image9">
+ <data format="XPM.GZ" length="1202">789c6dd24b4fc2401405e03dbfa2a13b62005b041be3c2172a46e3d2c4b89867799487501030fe77ef3d9d2134740e0bbe9cd09c696835828ff7d7a0d1aaad72918f54a086621934f47a3add7d7e5dffd6ea5114d0274e82f3fa59adde0c54f0369f19fe2ee87b28628a65ce98ca28a3bbcc1553b72997cc2518510433043b14c57c00bb147004f6289a790f263a31d83005a596059f0e8c99dfa0d1c674988fa0d5d65c30fb4cd3a660e4331851307203c6948439003b146c7e01bb148cdc8297143003130a36af4141c1bbba012505efca80f4b26c9bb90769b4c58d2c48c746cc05d3b629b8d1183ca7e0463b30a2e0461330a6f49873b043c10573f08282f616ec52d06ab04791cc1f30a180435050705f054a0aee7b072a0aee9b8286c394200efe45a13ba279748a464aa9b4b1a5ead0a4436bc391a86ad4d80a3a55cdc466d3594523d3f9e27bb9aa6c725bda78b46dbd296df44dfab3c8b6a58dbe51bbc5fea6b4d135e9ed646cf7a58daeb9cb7d73d8e81a9d4fe8717ee3fd437868f2f9cefd8637f61f9f7c93e6fe69d8b879eebb46b8e3376e071bd7f8e337662fa74db171bd1d9c34c5c6aaa6d8989d366ee3e96fc4d169d6ffae6aff9c383860</data>
+ </image>
+ <image name="image10">
+ <data format="XPM.GZ" length="2942">789c75964953dc481085effc8a0ee78d9848b754da2a26e680590c66c766194fcca1548b019bc5d080c131ff7db2f3154d771bf37cf9a4575999a527b5df2e0e4ef6b6078b6f176e476e74e607fed4dd0c16c3ddc5c5e33ffffef573e14d590ee45f51d483f2cd1f0b6ff647033fd8b9ba8c63a023016afbca9695f2c709d763e6a41cda605be55e39b6d176ca4b63eeaace7443e527e55aae14ca4e59fe1c98946d6733df2bbbaee950ff56b9efda0ef52f33f74e9be7af1346bfc763b6c3ba29757fda532e6a5b1ae5adcc0ef3d09a72d914a5557eca5c955ef9bbb269ea12e77396b93598af53ae9acea09f42b96e9cd17e382ab7b6755a8fbdb20cec82f295b26d6383f9ce955d9b1aed87d1afb7be6f94ff560e6d61c0fa7c5cdb3a83f5db63ee8bce985e7943b9ef82c17ee3874dbef25540ffebca8d1d1af4b792b9a9705fcfc777deb449b95596868253be56f69d2dc1cb605b19f08fcc2dead329d8fba0fdd117e5e863407f9b630e4391ee475a3f94a18ce8e744d90413352fa4e717ea50479cb7d60b8d2d4accdf284b6023f2abfb076917f7e9111cba88f3d4e71bac35f9bee63db8e0a2e691749ed0873eea79d383b20f3e223f9f9463e70be46d151c62443dcd771c8a701e3a6f2c4498ff4ed988506f57b912217f87cab52d0accbf0216e1f9d4ca4d6c12f2bfaf2cf92b500ff5e585c57dd6fea5dda6417ebf4f18fd7e00c72e613fcd57b436e0fd62d4b7d1265d4f9ab7e8a24b98ffbd72ef4c897c1e80639ff0bebe53f6ce96e8ff181c7dbeafdf9318fa26e7fd021c439e4ff31cc7dbe1f9dc82fb9c3f8ae01813def71be5e4db0a791982634a5a9fb47e1af6b541febe657615e65f078bb09f7e7f52e1e595523ecf1c2b3ccf0a2c425ef47b99cabeafb09fcb1c2ad423b02f2af4cf99fb0afd04b008df07ab6c4255e3bc2ec122dc2f95abe06abcdf37e0683ae461072cc2fb8a796b11bebf7b13c6facfca4d480df65b068b30afe63f75b16ee03f028b34bf8cfd6cec5b9cff2e58847c6b3e9213210f9abfd4a7618b7a9affe445b8aff94a21a616f557c1493ec8ca2673c87ecd9b3c6e8bf9f931b3ef90779f39663fce5bfff063f92ca689dccbd5694dfbb967cf212b72fa9d9fbff0299ff1397f15dfb7ac0bbee42bb97afa8aff9abff30ddff288efa634e27bb9fac0d7bff87ff0a3e8491cb35a92abef78f917ff0aaf8ad664c5acd6e4ea7b5effc5bfc11fe6b439a7ad19ff36efcc69339fd22eeff13e1fbcacc0ef1d7f9ad3b3ff908ff858fd275881df4bfe3ca717ff2e0fc5bf05657fc1e59c9efd46fc95f86b6eb89df83bb663490c881cf5d43ffbc9f321058a94e80b9d3efbe98ccee92b7da38b674dea4b4774c9077445d79819ffffa01bbaa5d18be097ea723e7447f7f4403fe871e27fa2257a37adb15fdc869629724d2bb262951e26fe357a3fabdccf2ead4bef1bf441566cd2fdc4bf45dbb352bfa11d391b394dda903d76a7fc7bb43f2bede74026cd7e99417698f83fd2273a9c96d6df1bfb734733fefd111dd1f1b4b4fea59cfcbad43fd67e66fcf312bf9cfbeffa79c5bff5bac4ffdf9f0bff0341cdbcc7</data>
+ </image>
+ <image name="image11">
+ <data format="XPM.GZ" length="4734">789c75985953dd3a12c7dff329a8e82d35d5d7cbb125d7d43c9070d80204424848a6e6a15bb259c2be935bf3dd47ee7f1fdf0506f3f243bdabd596f9edddd2e1eef6d2bbdfdedcdef1dd495c8ac77cb3f42edd9f9f3ffffb3ffffafdcddbaa5ad25fbf54bdfdc79bb77b774b7169e7f2a21f41d632b82636d1f3c87c3c72eb5befcb91dd0fe5aeed7cadeba3b2f3b32c10956f955b1f8c6f8c3baff6f95e39f810d4b9ac2a73dbfba0ebd7601f83577f413966567977a09c7cea5a9517e521cc42527b2b23876ad6959dca77ca75a83bb52773e5301b4ad1f51d700858e713650edca93db7623c30fc6b7c41f233287f351e3af8db0677056b7de44939862234bafec13876b05782bbd2e4b59e213585c54fe0902c7ec497ba8a67cab0377433d675d2fde9eaae863d3737f666df29cf7cef0b5d3f05774da7fbed6ae54cacfb2def27d6fd14c8fbc65b7c5be02e98fcb27164f4d3a572d7a452eb25bf94b91b44fdcba01c1b317bb760ae18fd77a5dc7783f97f1c998b566ae4f753b9e49675bf183ccb0d8afc6ec0dc89ee377d526ed89bbcf607b76d05ffacf9e5552fa8a7d637b74310ed37e78c9368fdddbeb27064cd8f1f94130f82f89f95072e515fd6fd96a2b5fea4ef606944fb9f347e2945a2e6475a7fa9a6f5c2b815f547a7c61c719ef47c49ed63adf9d31558ea88f35b193790775a0f994927ba5f74a11c6215d59f209e2e9415fc25b00c51fb998f9459a2e95f2e18f6690e8e45d4fce9cc780666ad9f882f4aacdf80b37fec87f6ff683dea7ed13938b651fb81b45f24c51af21495fb3cc0307ff47ccbe07d8579f2051ccb887e288d1be365e3007fc223c722cc2cff5d707ee0efc4d827ad2fe97e67ebadad6bbfe76cbce5bf63cc11f350e3cdd107f867edb7d8f860f53802e707f977c69dc5db4f8cf5276306bb556389e84fc4d3e6fdc4bc9d19870afbb7028eade533187709e7898d2398f43ce6ec22ec3bedcf9c4d4ce8d73be364fa0bee13fa4326463c883f0f8084fdba304eb04f87c63d58903ffbb6d0f8dd1538cb239f07e301fe9cf667ae86e9d33d381509e70df54aa94ee83f7dffc4de77b0cff0df8754617e683fc6c1dbfb846bb0b41dea8d7a0dd93fe6c935389509fdef8ceb04fb7a3e52112acc4b3a00a7d6eaa3f54d958f05f27f06a7b6d7fab2ee47b63633fea69ccf37e2711fc193bdcfca6d284aece731383f385fde588cb72746bd61dfa7d463be68bfa62ef509f9ebfc4a1c6ab3aff9666de9b11fdf8d73c9757d0bdc173de6fbccb80493d6338ddb0b7b5fc1791dfdb43731e633e24f8b78dc1ab8af7abc8f115f3fe97f33aea14f6b13ebfc27ed8734f433d3d7fecdd136bdd6d3e9fc18bd639dbe18e70b8e72a35c65c6f9f868ecc1a2f51fbdf5a8ef99b1efd18fc93880dda672f666f1ad1b77bdf697e8fcccab7ec0f9bb37e65efb55f47cf52d17b5e6cfcb136bfc7204ee83e99f1833ecd3a6711eb9aaaffd31463b607e6c18e703aeebfafec9d1f380fd6f8c23f45d344e96bff6e7980de2e5c17861af374ec6da0f593a0eb89f6e192763d45b32a33f5ae3bec7795bf00016d43b725be3bee98d7d8dfbe29e71be60aa3ee28d4361f542fe6961df1d1a9b7dde5cf080fbc51338ebe33c1d1b97c6f097ad99fd5df0c29fdc4e8cf939189756ef47e3ca58df07d99ad9a77de31af5723a5fb23593979b89d1efbd718d7a52653c03b3de2f863215f63db0019ef4d78dcd1fffc158d7f99aa517f60e26c679d0793e7ab7fa3d183703ee276b13435ee77ba676c0fc9d1b7bb0c05f9bea80fb75346e707fe7d6b8c5f709ff9818f374d7d8079caf07e31edf2b54838780fc786562c4a3f322471306bcdf67c61de277da8fa3b4c5abef93bcca03eec7fafe1b647ce1a83d9daf43ea4387f3d318771deee73231fafdcc5818ef0f9d0f83fe8cbc77373ee488492852a29e063ac25ffffe2ce4e9984ee8947ed2199de7e7226b5dd2d5ff93a76bbaa15bbaa37b7aa0477aa267fa45cbf49e3ebc264f2b34a7555aa375daa04dfa485b596f3b6bedd0a757e577b3f7bd2cfd99f6f3f325eb1cd057fa4687f49d7ebc225f5099ad6f504535cda8a1967cd6692950e7e8a5bc738e9db848954baea74d37b823779cb53fbb1377fa8afc4fbacbf2e2cec6f8ddb13b7717ee529f2b77ed6e5ec8dfba51fe9e36b28f7df7e01edd937b76bfdcb27bef3eb89517f273b74a8d5bcb1a6d8e63dff56e3dcb6fb84df7d16db9ed17f23bee5396cff1b8a8f2eb6ed7ed65f9cf6edf7d7945fec07d75dfb2f5b1fed943cef750e5bfbb1fae70e5cbfd7595abdd2c5b8f3987c6b52aef5dc81f85f49a3c3b66fdbe4ab93e4d7eed0c7cc4c77cc2a7fc93cff8fc15f90bbee42bbee61bbee53bbee7077ee4277ee65fbccceff9c32bf22b3ce7555ee375dee04dfec85bbccd3bfc8977798f3ff3fe0bf92f597ece0793fcd72cff8d0ff93bffc81a05972fe457ccfe7a961f35aaac51e7efd2267fb9faf1df0d2fe4e77f91dfe66d2119bfacf2c7d1787d92e14ff2f3c9fa14bf1cc9b19cc8a9fc943339970bb9fc435eaee45aae173ee4466e4de764ef4eeee45e1ee4519e202fcff24b96fff6bcb7476b292b329755597bfbdf7fbef91f1bb499a7</data>
+ </image>
+ <image name="image12">
+ <data format="XPM.GZ" length="5758">789c5d98596f24bb0d85dfe75718576f8380b7d7ea6a0479f0d2deddded7200fa4aaca6b7b6d2fed8bfcf74887a78c243e98c17c234a22456a29fff97be9e2606fe9f79fbfdee63abf8d4bf1465f977e57efb3d9e29ffffac75fbffee8f5967adda5de78b0d4fbe36fbffe389c2fc5a5e9d3639d219c26089d6116f80c3cce028fc05516783d736f90052ec1455666fd043759e0fbccfd220bf68760cd02af80ab2cf001b8c9022f671e74b2c003301cc0f877e07e16dafbe07116daafc1310b7c04aeb2c01f9987832c70032eb2c073f0280be34fc09a85f6025c658187998b6e16f80d8c05c86cb7e02a0bed18afa8b3d08ef947dd2cb4239ed1200bfc0e2eb3e0cf063866a13fe219d55960e4a3ec64a17f0fdccf423bc62b0759e01a8c1fd823ffe5380bf321ded2b260bf005759687f04d759e059e671a76c4ae4d3ae9db330fe17b8dbb2b59c8476e41be9f47a7b000fb3c027e0220bf6c7e0d10f6f82f103467d8d350bfd9fc0310bf323df3ac8ca2c013c2aac8ffcebba7316faaf823120fa7f83f103fb1bb06581e1bf5659e88f7ad13a0b8cfab46e16f83973ec64617c8c17350b8cfaaf7a59181ff585f2f2fd067faa711618fbb18a59e87f0e6e74dc453d44d46bddd181b32d3b67a1ff1ab89f85f5d9030f62eca23d6e8387a592af9db5eaf87970e89c8576d47b5d94e6eda172ae06be5e82f3a51ec5c2f78ba873d5edf87a215f75598d7cbd64e49c85f15fc1e332faf9651de7aaebf5246fe401dbbbe4b4c131fe36b9343f5fce9ddbf143242761be2db0964d07eb1bdd3f5573960eb972b6a9b38d38ff3a5969effe68f2cfed7be4423dbf976435f86b1e0f0a0af3a3fe6b1bf7e8cf06b9dfc1fac67572419e9047e435f298bc4a36f20ab9222f931bf2b7732a07e7057940fe220fc99fe492fc416ee77f27b7ebe9f9352bb83ecfe4767d8d5c3babaf97a572f5f62b726f807ad25d729ff68c2f72fdf5853c224772e91cba64fa17f6c8f42730bec8fa08be3faca23f219039bff5c93c6fb46d57f3fc33fe36dfe18d9c84feb8cfeb38e6fa8bc7178df9b703e758f87d28be5eb162feedc8f967bc437212d8e3ab527d79fb84cc7cda1399f5654a663ef582cc7ad21d32eb4997c9ac27f5fc566d3da991194fe890397fd825339ef041e6fca12147b290d31188f5f07c57693ffafa717ee37b48189f35e447e7545fce33729ffc401e92efc9dcff72471efbf926b76423df902bf235b9215fb43c427d08e36bcf4ba9c97d72451e922379e46c839615e79d0dc9a5df77ca78533dfa7de8e74dd5d647d8222761fffafc75aa473f2f2bf280ecf1d53674964bf2c8ef07bb20f37d6a3e5f2e283fcfa76465fb2b392aee47737fead61f29c8e907ed780fd74deb8fed920bf21ab9243f92395f7c2147b60772e5ace7e486f65e4f8d76d8be4de6fae837b94ffb2732fdd396b95e91fea47af77625d3df7045e6fac519d9d8be43a6fff1814cffc33bb966fb3d99f104cf6f638c27de91198f8cc93db6df92199fd03f6bd7ff92cc7884feb5f917ae97d17fdb27d37fd922d37fdb20d37fd924d37f63fe22fd17da47fa6f914cff659d4cff95fe47fa2f1332eb47583fb1cdcf2ab98da765d693ac90199f5664c623cbe4361ed64b6cf3e1fba1a9daf55f905bffbfc8f437dc90dbfdf7496efdff20b7f55f90c77cafb13edafda7ed7c66de7f4e667e74ab65f3f72ce34b078abf2f7be47ae8f73df35b35857f0f755af6f7bafa7dd4e4172cecb9dfea9e8f1f2ec8dcef81f598857a447ed36553faf79b9d90b5f0f36fe49ce2f5fb7fcdb9eefa7b515fc93d724deef33dd9230fc8fb64be37e5b4e5e8ef7971cec2fc780f37dd4afdfb41cfc8e94981f1be9cd3787efe9fb5ece3855b32df8f72d272f4f7ad9247fe7d24c72d7bbb1c904b3fefe5a8e5e8eb7d481e3b8717e71fffb7c94960ac7fd34bf1201f517ed8cffb96199f6e38b7fd839193d01fe76dd34ff791cfb743367f2fd98c9c9e50e05572e3ac6c6fc7d3293909e3fb7c83f47d80f8a292399f769d5b7b199293d0eef91eb61c16e42430cecba66859fae42430eee366d472382627617caf9ff2874fc849605fef7116d8eb49b3b01e3e9efdf00339098cf33e1d2f49609c4f69fb25653e9c4b1015932895d4d2c8b5dcc8addcc9bd3cc84c1ee5499ee5455e251cce69ff267379970ff9942f59c8b72ccb8aacca9a4c645d366453b6645b7664d7ed652f594f655f0ee4103a4a3a864e924ee54ccee5422ee54a900fe9a6b17bd24f1a50fdffd1500a194929e32058cf201f41ffcfe647c14284aa5007ff5ebd0e37e136b5dca53ff7e121ccc263d2537896517809afe12de935ccc37bf8807d8a327c25db05c6fb0ecb6125ac86b53009eb61236c86ada4cdb01d76c22eecf7c234ec8745d21d7a1c84c370148ec349380d67e13c5c4097e12af8f77957be430ff68b3c4be8874118a67f156114ca304e3ebda868fe0d85bf9f63fa74acdd3e2ba5fd5a6ff456eff45e1f82e94c67e9ef477dd267d8bfc8aabea6551bd2fe4de7faae1ffaa95f21e6ffcfd2857eeb32ec577455d7fecb7e927aaceb866ea6b8fba907d655b7745b7760bf2b13ddd369b6d714771a7ba2073ad5433d4a3ad693a4533dd373bd80fda55e6927b5777d0eed695f0799349d809a5ead4963130bbc5f2c7d9a5509a66e9f3e6b1abb96a1ddd8ad4eecceee931e6c668ff604fb677bb1d7e4ef54a7f666737bb70ffbb42f5bd8b72d27db95a47b5bb5359bc07edd366c5337f20cba615b616cdbe95ffb29c6132d7fec776cd7f6603fb57d3b086f7668477614dc7e967ceba728c7769c7c7948fd4eecd4ce607f6e17766957e973a96b3debdbc08656d8c84a1b4789f937431663acd2f3bbf1fd15afe34dbc8d77f13e3ec459b88a8ff149bfe3b39ec79714e55af2e43459bffeecc710dfe23cbec78ff819bfe2227ec7e5b81257e35a9cc4f5b81137e356dcc6fefdf7df7ffd07fa3a7226</data>
+ </image>
+ <image name="image13">
+ <data format="XPM.GZ" length="5118">789c5dd8598fe3c80d07f0f7f9148de1db20e0dab22d5908f2d0edbeeffb0af2404a564f1feed37d2ef2ddc322ffd5c966082ce6b74555b14aa5b2347ffc5a38dfdf59f8f5c78f97b9ccaf9b85e6b73c2ffc6a5f67b3cf7ffeeb1f7ffef859140b457fa1180d178a9f7ffbf1f360bed02cec3edc4f1368d740832a85fbcb2d29dcf7ee3685bb4a1e9629dc0fc9a35e8a6499ba8b14ee997b9cc2fde6ae53f8f58bc9a5fff1f675f73885fbd52d29dc6bee2685fb2eb9ea57bdcac7a73d7797c25d26d745ddaffb9edf735729bcfddc2d29dc8d5b53b835598a14c94ceeaa54acd799db3b708f93b548e1e3f5dd650a6fdf496e8a14de7ee0ee52b82f93db5e0acfff743729bcddef47db66ebb5bb93ba3f707b7fd39e0cc3ece34d874dd3f7fed4efdf74341678252c6dcfc7d7657739d63075e17628be1eecf39b564d59fa7e6009b7fd9eef27590da7f0eb5fdce3b6525f7f8ef1c7297cbc7d773d6e7ade9fcec26dbf1e7afe0b3c44fb3d3c9291f7bf068fd5e74bd3700acff7fb3f9571d78bf53a0c8b86b907b7688ff98856319ee07a15e4f7c3564fe43fc0b6417d7cf4df8a7a7d3a726b5d207f080f7abe9e3a804bb8802bb80fd7700f56f8126ee10bb883cfc376bbc367f0103e8547f0093c868fe13cfe119cd7ef39ac6558d0bf623d65179ec24b61db8eb11e7770318cfd83fe9a01f2af61acb734701526ac5f3386517f83fa6813463df406633f10fa6f510f118cf1f511ae24f633d6dfee6fdcefa7f054a6717ea0fe147efd6f775363fd793bacf9fec77c9aa61cc6f3a4e136dfff369cfba365d8c2dba3ded6f697b7cb08c6fd945318fb4b7660dc4f5984b19fe409c67e92df30f693447d6dde4f54c0980f1dc3189f3660cc875e618c4fe85f1a98613bc27c3d508f3d7fb17e8f701bcf273fc01d1ce7436bfb2b3c8307f01d3c826f613cef7c03d7719ef135ac30eab5fd14be823bf83cbbf2fdc1717eb6f97ce4293c805b7804377015d6a76c89f3f2191ec7ef8de0fedb7e8cfd19e7799bf707adc2167efdc43db5fd18e7e3123c84237faaa3305fc0157e1f6ee03ada257e0fd2868af37a1716b4e3fab689df4f8af37e9aebe112b63fde7fac67f75d0fc325fa1bc263f804c678ba073768df865bf80bee901ff576d243fb238cf511d463fb3bf27760d4270263bd14e3d97e8ff7813e8c7ae908c6fae916ac685f8751bf6ec2a89fe6f014ed1b30e643a857311f457f8af9700d17685f83313fbe84f3fadfc2980fa3de7cff19f529ea5785513fa33ecdeb5fc1a89f737da85fe2f9e91ad4cfa8afc9f703f7b741fdbc0aa37e99c0a89f5760ec1f5e86311fb981f37cf2f5d84fbc04e7fb83fdd7603ebc08e7f9607f35f97e60bddabcfe9f70aeff0346bd847adafcfcbdc3b9fe3718fb495fe01aef67af707efe3a5835aec7fe69f3f3f190adf17ebd0fdb89eef9053c1dc5ef3dd6bfed4a7fde65395bc2a827bd817afe195c44ff7400e379a70bd8c2e7e3eb693f36e3d2df17b58325be07741eb6f9c6fbc06d78da8ff74169e102ef872378009fc243781bc6fb249f64c7fb395d8653f8f8bebe5dbfb537461fef13b6570acf7f0f5b7f71fe9f66a3bf5b18ef8b7c9cddc4fbabc0557c8ff05176b4f33e3c8ef39e0fb39b58ef03b80ed36338d74f356ce1f3f1fdd415369f387fdfbf1ddf235b30e6271cced7530b5bf8f5be9fbb81fd1ec5f7600d6bbc2fc9316caf50ee01dc856916cefdd104b6f0fefdf9ea86f6feeff3d34f388fb712cef93c822dbc3df6cf289b3e600bb7bf1f7465360f600bb73ffff67109d3126ce1fdc7fa8dbffd015bb8fd3cb49f1f0bb79f9f767c5bf87cfcfdc08e43580e610b77ec07ff6074fbf3698f9f45f2c19c8985951b6e79ca1d5ff16fbee61bbee53b9ef13d3ff0233ff133d3c11cf92f3ce7577ee377fee04ffee2455ee2092ff30aaff21aaff3066ff2166f473eef58f62eeff13e1f781c5a1c791c5b9cf0299ff1395ff025fbfde0bef55df0c0628818fc25465c72c563ae897d3d89df48fe9a434a0dfed6d2d4a3a32bfaedf9d77443b7d672f79d3da37b7a48e3d0233dd1b3c513bdd09c5e3dff8d3fe8ddda3ebef33fe98b16698926b44c2bb46ab1426bb44e1b9ebf495bb44d1f163e02ddd10eedd29e799f4b3a401cd2111d7bfe097fd1a9e77fc4287466fd9f5b55177469f16871493dea53ecef010d6914f9b8a6a48ac696530bdb7c6716ad90489cefd2f0445a5bb5d177fe9e4c69c772673449ff3f856d9e2bf1f5916bb991dbffcd973b99c97dcafdef1ac8833cca93e73ff38abc44abcc3dff55dedc77b424eff261f12e9ff2258b9ebf241359a689acc418b22a6bb22e2b36d692656ec8a6c5866cc9b6ec78feaeecc9becd6b82fc0359a73dfbfbc0b30fe5c8e2508ee5444e3dff4ccee5c266374963c85c2ea5277d997bfea6e5a67f99399281e03c9752ec4dd9576e62ffddb755afed6fff9f5f2b2bf9f326aadad81e5956fba6b07b9ff2675ecfbb6cd867dda1c5a63d7c57eaeba9d77aa3b77aa733bdd7077dd4277dd6179debabbee9bb7ee8a77ee9a22ee94497e3f9d2155dd5355dd70dddd42d3ad26ddd912bdd952fddb3590ead922bcbdeff7e1e490ff4508ff4584ff454cff45c2ff4d23ecffa5ae840873ad2522b7f7efffdf71fff014e3ad5c6</data>
+ </image>
+ <image name="image14">
+ <data format="XPM.GZ" length="3534">789c9595db52dc480c86ef798aa9e88eda52c667bbb6f602c8011218ce04d8da0b796c33c01c60188ea97df76dfd6a9b6c05b2acffa4f0579235dd925afd7eb977bcb3d55b7ebf74b390c5f9b0371cc9bcb75cdd4e268f7ffef5c7f7a57761d873ff82c4fd79f7dbd23b1ef786bdc16c5a2bd0b503eae301df820315f80e1caa94650a8e54b07f03c72af009385381bf82f32efeb16727c41b834505fb2ab86c59269e9d60bf02d72af0817210aac00370a20233b850211ef61b880af66df05005fb025cab603f02372af09e32d281fdc80c8c07f64370a402ef82e376ff827c86990af67b70a3027f568e0215f80b1801c18fe05485787370ae82fd125ca86047be2251c1be06ae54e04fe04605ff1b6594d3ea85f871a942f39c82abf6f7b80faee32a463c0ec08d0af1d04f495f85785b601408fe21387211906f4e8c55e0141cabc019180fe26d80d336bf9c1babc031388f8731eacb85b10adf6f824505de514ebbf3c011386cf7472be0a43b1f336315f823585460f46f96f4abbe7dffc15885f8e8a7ace8cec7d45805c67eb261b71ee42f0f3bff21386dfb9716c62a7005ce5460014bf73d81bbf8f400ae54f83df4535e7776f4078e93edff029cabe08f7a1755e77f6eac029f816b15fcd1df1275fe0d1805811df994acb38f8c55b0e3bc49375f18fd2c5d3e19f348248a23f48f201f520681b7635ec8f3fe4f3d479e6b6315fc9fc0cffb433f89ce238bb70f6eba79187a4ecdbe8bfa94fdb61f18e7b92cda79c9e8afb2ece2e33c94cff1311f86a10e68ec07f5a9fa81b70bea51c541e319f9af929679621c16a1cd07e4b34ac3763ea13e55d631ea51e51d231f5511b6f9c33cab24cc43ab3fe665550779608cf95f3561125a3d715fd4fd76fe0afab70e83cac7433fd6515447d61fe8d73a6ee711979e83d8e607f65b275119d97cb2784967af3c87b15d7e587f9dba76b0f9d278760f18fbaf331d38e091e734b6798bfba4cedb7cf3b971ec04c6f9a9cbc83da81ffaa17eee97c0b3ef07c27c72c569ebb36bac03108c79d124ed7a04fb6f8ab0ed4fccc3a60cc47f8f79d60cbbf5af1b276582fc08f2dbd47a23e17bb337ddfa9e3cbb810dee7bcebd3d326ecf0fa59e4bcf63cfed7d2ac661e2edb6fea63d8f7c6cdcdd2f07c6ed7a79db582f3cf08ee72245fff286711665665ff55c66f6fdbde73ab37e5a3376ed6afdb0f0ec2e34f0dcb313f8c6b8e81796df2bcf7161eb9f79760b025f7b760f78eab92c4a3bff4c2c5cf2902baeb9e1331e399d3b5df0258f7f949d579e4233bec2df6b9ef30dde167cfb82ff1ddff3033ff213aff02aaff107fec89ff833aff3067f79c1ff2b6ff21678c0dbbcc3bbbc07dae7033e7cc1ff88bf798f011ff3099f729f03a790238e39e19433ce9d0a62bb5f48fcf7032a694815d54e0d9dd1086fe774e148df2e11fff9f70634a6094d69465774ed34a71b5ad0ad7bbba37b7aa0c79ffc9f68c579afd2358f9dd71a7da08ffa0efa449f7ff25fa70dfa425fbdc73d6dd296f93b1ed0f6cffeeeff0eed7aff3d17f3b2f3772b7c21fe3aed5bb69cfd800ee9a8f5eff2f9baff373aa693ffe1eff59a3f9d52df2978b37f489153fc46ff3d4a2875ca28775fecfdda9f0a6171b7329e5286ffe52f95d4d2c8998ce45c2ee452fd652c13a7e9abf9f9975ce42399394ddeec7f29574e3face8357f3a91b9ebce2d150772238b5ffbcb9803f5955bb9d5b32377deffefdf97fe01ef181ec6</data>
+ </image>
+ <image name="image15">
+ <data format="XPM.GZ" length="1442">789c75d4494fe3301c87e17b3f45d4dcd028c48e9744a339b05396b217c2680e8ee3500a2d10ca3a9aef3efeff52985153dc1ef2e86d1c3b96babc145c1cee074bcb9dc7a9995edbc00e4d1d2c954fe3f1dbcf5f3f7e77ba9c07fe2b65c0badf3add28b041ff6ee2e8fad25f873106710432ff012744c6198f33e23951c4cc35f500d45c34ec8325970d73a28ae9438c419198b8229e80859f8c137b441d0bc124f1191442324dbc038d2858491c8285b00c5bd800ad281966de21a642c61c530d4025538ea92ca83d15b104ad2c9a7a45ccb8621c0f7a0785e20d6fc04ce9046bbe072b651343744423954b2c71a5a14e12acea1a345a8b843826fa8756a220d6a04e63811d9d81269512e77508bad4366ff2946859c6146a0826a99158c62328b3446219b7a0ca84c4160ce832a570a04fc4526495c654fba0fce07a43c334d67c01fae768dcbb4d74d2d834251e83aa88533c7713cc0a9781bb6061b9c1a1bc11abb8d0195efb0be8cfd3e0c5ee81b2ccac204e4165ab023f5e6b585a8b5777346369b1c157d054cce17cb73e89353f80ce4a83a90ab02a93028b5c9d515b6cbf6ae8b8c5a144cd084d616cf439fe9530a4542e288e5265aeda65384bd7ad321ade20dd8ee74b34b9bba7f4503f8673c527baabaea64ff3259a3cdf87f5edcbeb5babf8f4ee56cceada7aabf8b4f15e6f6e6d87ad124d7a1b3bf5eede7ebb44fd83decee1d1f182e2dbc9f3e9d9605189a25eff7c70b1b0f8fb46838f924797ff8f5114cf4a9ee7f3b73525cfdb0925cf1724fc7bcd8daf4bfe7541eafef9def90b50383f80</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>setColor</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptSetColor</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>TextEdit5</sender>
+ <signal>textChanged()</signal>
+ <receiver>ScriptFileDirty</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>setFont</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptFont</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>helpContentsAction</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptHelp</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>editUndoAction</sender>
+ <signal>activated()</signal>
+ <receiver>TextEdit5</receiver>
+ <slot>undo()</slot>
+ </connection>
+ <connection>
+ <sender>KEdemo</sender>
+ <signal>initialize()</signal>
+ <receiver>ScriptInitialize</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>TextEdit5</sender>
+ <signal>clicked(int,int)</signal>
+ <receiver>ScriptLink1</receiver>
+ <slot>execute(int,int)</slot>
+ </connection>
+ <connection>
+ <sender>formatBold</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextEdit5</receiver>
+ <slot>setBold(bool)</slot>
+ </connection>
+ <connection>
+ <sender>helpAboutAction</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptHelpAbout</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>editCopyAction</sender>
+ <signal>activated()</signal>
+ <receiver>TextEdit5</receiver>
+ <slot>copy()</slot>
+ </connection>
+ <connection>
+ <sender>editFindAction</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptFind</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>editPasteAction</sender>
+ <signal>activated()</signal>
+ <receiver>TextEdit5</receiver>
+ <slot>paste()</slot>
+ </connection>
+ <connection>
+ <sender>fileOpenAction</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptFileOpen</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>fileSaveAction</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptFileSave</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>setColor</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptSetColor</receiver>
+ <slot>adjustSize()</slot>
+ </connection>
+ <connection>
+ <sender>editRedoAction</sender>
+ <signal>activated()</signal>
+ <receiver>TextEdit5</receiver>
+ <slot>redo()</slot>
+ </connection>
+ <connection>
+ <sender>formatBold</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CheckBoxB</receiver>
+ <slot>setChecked(bool)</slot>
+ </connection>
+ <connection>
+ <sender>formatItalic</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextEdit5</receiver>
+ <slot>setItalic(bool)</slot>
+ </connection>
+ <connection>
+ <sender>formatItalic</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CheckBoxI</receiver>
+ <slot>setChecked(bool)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/current/keyvaluecombo.kmdr b/kommander/examples/current/keyvaluecombo.kmdr
new file mode 100644
index 00000000..9815c333
--- /dev/null
+++ b/kommander/examples/current/keyvaluecombo.kmdr
@@ -0,0 +1,388 @@
+<!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>398</width>
+ <height>341</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Key=&gt;Value ComboBox</string>
+ </property>
+ <property name="icon">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>_a[1] = "red"
+_a[3] = "blue"
+_a[5] = "green"
+foreach i in _a do
+ ListBox1.insertItem(i+"\t"+_a[i], -1)
+end
+ScriptObject36.execute
+AboutDialog1.initialize("Key Value Combo", "", "0.1", "Copyright 2008")
+AboutDialog1.addAuthor("Eric Laffoon", "Designer", "eric@kdewevdev.org", "http://kittyhooch.com")
+AboutDialog1.setBugAddress("eric@kdewebdev.org")
+AboutDialog1.setHomepage("http://kdewebdev.org")
+AboutDialog1.setLicense("GPL_V2")
+AboutDialog1.setDescription("This demonstrates how to make a ComboBox \n behave as a key value pair. It's \nparticularly useful for databases.")
+
+PopupMenu1.insertMenuItem("Make new list", "PopupMenu1", 1)
+PopupMenu1.insertMenuItem("Remove Item", "PopupMenu1", 2)
+PopupMenu1.insertMenuItem("Move Item up", "PopupMenu1", 3)
+PopupMenu1.insertMenuItem("Move Item down", "PopupMenu1", 4)
+PopupMenu1.insertSeparator(5)
+PopupMenu1.insertMenuItem("Remove Item from both", "PopupMenu1", 6)
+PopupMenu1.insertMenuItem("Insert Item in same location", "PopupMenu1", 7)
+PopupMenu1.insertSeparator(8)
+PopupMenu1.insertMenuItem("Quick Help", "PopupMenu1", 9)
+PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10)
+
+</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="useInternalParser">
+ <bool>true</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="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout27</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="Label">
+ <property name="name">
+ <cstring>Label18</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Select value</string>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <property name="name">
+ <cstring>ComboBox10</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout30</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="ListBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>ListBox1</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Right click for menu</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="2">
+ <property name="name">
+ <cstring>Layout24</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="Label">
+ <property name="name">
+ <cstring>Label17</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>value</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout23</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="Label">
+ <property name="name">
+ <cstring>Label16</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Key</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="ExecButton" row="0" column="1">
+ <property name="name">
+ <cstring>ExecButton28</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>ListBox1.insertItem(LineEdit1.text+"\t"+LineEdit2.text, -1)</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>Layout31</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="StatusBar">
+ <property name="name">
+ <cstring>StatusBar5</cstring>
+ </property>
+ </widget>
+ <widget class="AboutDialog">
+ <property name="name">
+ <cstring>AboutDialog1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject36</cstring>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>array_clear("_a")
+array_clear("_b")
+c = ListBox1.count-1
+ComboBox10.clear
+for i = 0 to c do
+ array_indexedFromString("x", ListBox1.item(i))
+ if str_length(_a[x[0]]) &gt; 0 then
+ message_error(x[0]+" is a duplicate key. Value \""+x[1]+"\" will not be inserted.")
+ else
+ _a[x[0]] = x[1]
+ _b[i] = x[0]
+ ComboBox10.insertItem(_a[_b[i]], i)
+ endif
+end</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject35</cstring>
+ </property>
+ <property name="pixmap">
+ <pixmap>image3</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>i = Self.Item(0)
+StatusBar5.insertItem("index: "+i, 0)
+StatusBar5.insertItem("key: "+_b[i], 1)
+StatusBar5.insertItem("value from key: "+_a[_b[i]], 2)
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="PopupMenu">
+ <property name="name">
+ <cstring>PopupMenu1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>m = Self.Item(0)
+if m == 1 then //new list
+ ScriptObject36.execute
+elseif m == 2 then // remove
+ ListBox1.removeItem(ListBox1.currentItem)
+elseif m == 3 then // move up
+ i = str_toint(ListBox1.currentItem)
+ val = ListBox1.item(i)
+ ListBox1.removeItem(i)
+ ListBox1.insertItem(val, i-1)
+elseif m == 4 then //move down
+ i = str_toint(ListBox1.currentItem)
+ val = ListBox1.item(i)
+ ListBox1.removeItem(i)
+ ListBox1.insertItem(val, i+1)
+elseif m == 6 then //remove both
+ ListBox1.removeItem(ListBox1.currentItem)
+ i = ListBox1.currentItem
+ ComboBox10.removeItem(i)
+ array_indexedRemoveElements("_b", i)
+elseif m == 7 then //insert in postion
+ i = ListBox1.currentItem
+ array_indexedFromString("x", ListBox1.selection)
+ if str_length(_a[x[0]]) &gt; 0 then
+ message_error(x[0]+" is a duplicate key. Value \""+x[1]+"\" will not be inserted.")
+ else
+ ComboBox10.insertItem(x[1], i)
+ _a[x[0]] = x[1]
+ array_indexedInsertElements("_b", i, x[0])
+ endif
+elseif m == 9 then //help
+ message_info("Look in the dialog initialization first. Middle click in design mode. Make sure you click on an item when doing specific things in the menu. You can recreate the arrays or add or remove from them using the menus. Look at the menu widget and the script with the check on it to see how it's done.\nThe values you see in the StatusBar are generated from arrays and never access the ComboBox. All information is generated from arrays and the ComboBox index.\nDon't forget to try adding items with duplicate keys and duplicate values and see what happens.")
+elseif m == 10 then //help about
+ AboutDialog1.execute
+else
+ message_error("Unrecognized menu action "+m)
+endif</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="6350">789ca598d94f1fc911c7dff7af40db6faba877a667baa747511e8c01e3030c06cc11e5a1aa7a86cbdc603051fef734f5ad9fed5d2952a4f521fba3beeaae1a7eff6de9606b63e9b7df7fb9bba7fb53599213ba5dfaad3c5c5c7cfbe7bffef1ef5f7e0d61a9fee9425e0abffeed975fb7ef976469f3ea727a013f56708dfe7a61597069b372068729f6cabbe0dcc8acbc622c4599c1a10dad72f1ca5d1370bfc77d5dcb01e70770176252de51eebb1c21df96720c6d87f51edcd3202fec5e29a7c01dee3b541e43dfa9b2ee4699dbd88e2a0f2997861a5d97040ed441dfa83c776d8ff5a3176e9b466cff6be5b6ded7aabe07ca5d37f6f4c2f400ee1bc84f1f95fb2859d7654f39a6766495c729a7b66d3a5dc77d431fa2ca2b9f9573ecb2ae975999dafa80ae5f1a0f0df6ef83fb79507bf927701e65d0f39372b507cef3837102fb2be3a1d1fd1efb4b65f87f193c3454f4fcaaf294a3e8ba6b5e3834ed88f3a528b72d352a0fef1b33e4f5df9443655d776aefd02d582e94fb568c3be3b9813ddf2a577b6695df6d1bf3a8f662514eed64fa7c521e6a38ea79867c39b48dfa9f8e95c705fb1f0c79d55f8142d7a8feee1a9cbaacfafb013c24d8c7df29f398912fee8db2c431e17d562ea137ff41be52eda9f2ca15784c05f10e7da7ba5fe5e3afc6b1d1789333f0200cff6e2acf21415f4fc643837cd5f8ace99971de6bfe756d65bc770aee52d0f8e77be550d7555efe0c4e09f1e95ae52e8c382fe7e0ae4680aeef832345e4eb2a788cd08f351fbb18b8d1fc70deb858bee1be983bc67b9aef55ba453c6d1b4b8b7a73094e7d823d37c15944f575b7ca43985ae4f7163813d6f98b71417c7bd82b6766c8ff9d8bbe479a9fdd1826e8ef173c9bfc199c02e4f167e09c08f1fb4e9916e749c0718c6a0f817e9ce70279b5fe75656c0bce6bfdeea6b1401e79569ec750903fa7c65dd1f749fdd7b75d84bd68cf3899bc1d38ce51f7b3c64f1f6a81837f37c0fdd4e9fb45e3b9efbb01f6a457c6638bf7efc07966c4eb9a721c09fef7e0347403de3b048f52501fd51ffdd091f94beb479fc75c50bfb5fef463c7886f5f8ca5457d5a07f78dc973021e479ca76cccd6dfde1897a2f92cd7df19f9f200e66e02639d3a8b57ff15cc11eb1c94b9ea83fc1fc1d4a27ffa4730e709f9a9fda697b117f873dd7886bd44fb5b5f16e759e3a79faa01105ff7604eb8af683cf573df427fd27c8c4ddfc05ea2fe8b6dead0cfbcde17bb61863fc4836998d05fb53ebdb4e309f5f69371467cb1d6c318fb8c7940b41fc594ad3e8bda230ebdc59fc3f9816982fce7606967f85bf329e6aa2fcedf1a0f93dadbad19cf13f255e3258e6326f81ffa513fb6e89fc7600a45f38b5be3cee23119cf13ea9dc67be47a5edff747e034637e21cdafda0c09eb0c798426d88b36c1dc9a7c9067ea6dde7207e03a5ea01fdc1bd714d3f31a4f351bfb80fe7e011ed3a8f672cf606a102facf1949a7ec67d740fe61efef26aff3a8d7419f553e33d853a70a1bf6b7ca5eaff84fa7c09e63a10eafe689c2dbe351f534fc4e87f9b6066cb8ff7c613e291d4be29d6fc80fe97c684fda4fd28a52a0fe6870b70951ff1a5f99e061a11ffe2c0dfe5db302e33fa81ceaf29c7087bf30c1e53863c03b8ca83fa087dc6d8e37dbf0c669970df0765926646bdd478484c05eb0c7b72f537e261c738435fdf8317e77d671c26d85ffb7d7a891f5d27e823d59ee8075a8f53a9fae2fd2be31efa5334a609fd17f217e9cc7eda4fd2944a07be06d7fbd0efcf8c05e7a9372e789fb51ea5991bab072acfd04446fcc83b6369e1ff67e3a9457e9d825313109f5bc66d40fdd1fe31b4291beb7b43a8e7f57eeac0d2c05e148c5bc48fcbc619f6259d67872ece013c82ebf8827ab307ce92d45fa4fd63e853ead01fb51e0fb1be8f7e7108ce39a1be607fa49170ff07f0c29feec27898314f6bbd1952b4fc746aef614813be47dc399832a17edc81a5b7fcb9361e511f59fd33e4dabe21df93710c88e7b7e0fa3ee4d37a338ca9833dbc185bbde1c9389abd9e8d5340fdb835ce01f322de1f47ca8807cdf781d380fa4f2b0b0e88cf2fe03aeec1deb65fac5f11e247aaffd01fb4df0ea59e473eed826b3d417d867da6349a7c37c6847ac94fc605eb04f9a76a3fdc8ff89917e769d7d8ced3155826f88f35bf7293d8d64f8ca780786fc143d3a17e1b2fdea31b63863f44e325b7f53eb59fc77dede2bc4ce04c09f6d57a9043ae21a8f2ec81ab3de0ff75b0c80c7be1fe2e31fce1ee8d05f9e4eec0436bf1cee05a2f50ff347e725fc73bc4db7be301f2b947b044f467a7f37dfd9a317b91379e218f837e491af45fa7f3681eaaff11af3a0fe43c04c4179f82c5fa0d69bdafd3fae23eed8f99eb38827eb40c9638213ebf804b67fb35de6b3a0c01f543f3af0e2f09f586b51ee56960e4a3877c53e94d9fcbef8cefd7c138ce9897609f3a3d05f8e7192cd6df58e51fdb41ccde6b6059f40fad7f6390d1ea19f6f7b9ef313fbc06978cf748eb6ffd5a0ce66f9d6fea746cf313a93feab8dbf69837b57fd66c8df6f31331ce3df245fd33723d8ff96ad378b07eba62cc33ea95c6d72839a19ed2b231c11f74042ec9eedb3266c8ef57bf33ecadf5b54ebb56df48e38b9a2c3de637adb7d48e8dfdfca50117abaf7edf58709f68fda0900bf4753be0ba8efea7f580fa3ce1e73f746e3cf78897042ec5f455fd292e5834fe285579b05ffb130d63077fc9a371847d49e7833abd14bcef3e1acf33fa81e63351b507f24feb35f1d4d8bafabf7eac36789f35bfa88cf58341d7b57ed15426bb7f024f2dce93f6a33add2e58e781fa315d2750dd1fc153b0f7745eaa5f3b61c63ca1f5f4659a34d678abd3d382757eaa5f1fc6dbf7ffffefbfb6df3b4ffa2f7bf1c54ff57fb33ffe5ffbfdb13ff1a7fecc9ffb2ffec25ffa2b7fed6ffcadbff3f7fec17ff58ffee90ffbbff967ffca2ffbd77ec5affa35ffc6affbb7fe9d7fef3ff80dbfe93ffaadc57ebfed3ff91dbfebf7fc67bfef0ffca13ff28d6f7df09def7df4c90f3efb11fb9d77ce916327aeb8c9cdeed89db85377e6cedd1777e12edd95bb76377e5cc8ef6edd9dbb770feeab7b744fee5bfdfbec5eb965f7daadb855b7e6deb875f7f6677ddd3bf7de7d701b6eb3defed16db96df7c9edb85db7e73ebb7d77e00eddd18ffdae71ad0bae73bd8b2eb9c1e55a1e3cd5982426a15207cb998e7feca7133aa5333aa72f7441977445d77443b77447f7f4405fe9919ee81b3dd3abeffb97e935add02aadd11b5aa7b7f48eded307daa04dfa485bb44d9f68877669effbfecfb44f07744847d4504b813aea2952a297196964cf8e8999e587beb5384d3cf3319ff0299ff1397fe10bbee42bbee61bbee53bbee7871ff2f3577ee427fec6cffc8a97f935aff02aaff11b5ee7b7fc8edff307dee0cd9ff67fe42ddee64fbcc3bbbcc79f799f0ff8908fea44d372e08e7bae9f873fdb9f07ae9fbfe2c509098b4891496639961339953339972f72f1f37eb9942bb9961bb9953bb99707f92a8ff224dfe4595ed513cbf2fa8ff12c2bb22a6bf246d6e52d277927efe5836cc8a67c942dd9964fb2f3a7fdbbb2279f655f0ee4508ea491568274527bb8241924cbf8e77cf1a31f8b2faed40c2b5c84e652eaffa632ffa5fcfdcfdf7ff92f64b3cec5</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="417">789c65cecf4a03311006f0fb3e45d8dc1649773766db223e82d2a3201ef26fb25b680b5a0f22be7bf3cd547b7008617e99907cab4ebdec9e54b76a3ecefebc441567ffaebaf479387cbdbe3d7e37ed30aaeb6aef9ad6a8a89e4fc78c7eaebdeeb94062a6c1093338f6d60a0b6827779d26d05b226160baca09f4609888ec3da8c154a79b00ee41eac9650746e640eb6cc18539d2364b6063b40fc1ebdab0a34f5c3e8ac19c71c0d6981161d71ce566cf496f0ee232731571bd5f84721fef15a6bcc7ff95f2f79f597ef3eccdbfbc3f0fcd05558f6aff</data>
+ </image>
+ <image name="image2">
+ <data format="XPM.GZ" length="2573">789ccdd4c94e1b411006e03b4f61513714fd999e7d14e510b22f10d60412e5d0b3b1180301033651de3dedeebfc8c2964ba4a8b1e5cf2e66aaaa6bfae1c2606b6569b0f070ee746cc77bcda0d9b5278385f66c349a7efef2f8dbdc7c1c0fdc5fe5dee71fcccdaf8e07cd60f9e8b09b41260e1245591d45de2774435fd02d7d189cc7f4573aa58774498fe88abea4f57a3b7447ef071711ddd0397d4e17c1c868cdbfa6993f22baa73f0597bc3eb669436fd25a9fa513febe4c67f412cdfcf09ed6fcded0ec073668f603af69cbfb1dd3ac078bb4d6f39466fff08466ffc0fd2cb5de57c195d6c7fdad581fb87f95d6774a733f71446bbd9c874aebe37e555a0ff7bf623dd8a3b51ece43a5f5709e2aada7a335ff36d8ea7ef5b4d693d37aff2ab8d6f99bd23a7facafd67c4c70a3f37646ebf54b9af5ca98d6ebefd23acfec57cbff17d6d3eafc1ed0badf42b35e61bf3aee87b0de8efd17f6a3d3e713b4ee7f11dceb3ca6dec6cd9bf10ecf93b9eadf5670d3f3f715efd8cd8f3f2c109ecfc4eabc7c086e8b28f18ebd5377bfd4fb9977e6e625f34e82bb9cfe18dc7774e85f6e75be427f4b371fa577e89775f7b7deebde75d545b577e85f6775de566736a6494da8c73fbf26b13a6f2fbd539b9890af7fde4c612b53784f694bfbf3c49456e7f15d709b9890dfdaccae5d651cfcdcbb6a8ab8f27eeb5df7451cf2f5e757dcd579eccf5ff8f330c9db2cc9bdfdfca55153a7e17e2f66cea2de645138bcff7efd3ff1105884fa1bb4f7c476e8b1e3d66e383fdcdabf35761f431cb888110e433e38c2b17b7dbd21f604a718e30ce7eef70bcd1f134c71892758fc2d76114ff10ccff1022f5dc4ab9ff5e235dee02ddeb9f725c62ee33d56b08a35f7fd3a36feec0f36f1011fb1856d7c42e45e1b3088dd3709526c5eef2732e428dc2adda74d54829944c44a7d53ffa5915a5abf3ae9c32718f75d73db7ec98eeccadecfe5eeb12337f4f82a7e885e0e7461284319dd350f72e8723ae23a76ba61377e9f1f39915319cb999cbb4f17f7cf9b4c5c165397f54426b74fd2aff172e9d61db1d7e2efbcf29ff17fb7fe79fcf747733f00356088d2</data>
+ </image>
+ <image name="image3">
+ <data format="XPM.GZ" length="4142">789c8597595315c912c7dffd1484f9664ce49cdebbe3c67d90d50de4282078631eb2360105140e224ecc77bfd9ffac3e23e08c9d3cf08bccaacacaade0f7272b87bbdb2b4f7e7f74b590c5895ff1c772b9f2245c9f9dddfeef8ffffef9e87159aee84f31cc56cac7bf3d7a3c5facf8959d8bf338021d29d00cdfc8720b2e542ae8e7e072949199c0d528b0b7f5f528b06f963c80df2c5960df82db51a0df5d72009bbe53817ff21ddcab789cbfbb64d8cb97890bf3ff39d88d023e9db8e8c1761f3f0af6337d9885ac7fb664f3ff1b38cd5281fdf8e3c863788a068cf38ab2284bdc9f6fc05dd195f08fdf83fba237a643b0145261bda66a6457b8cae27101f685373df7e054a4cae2e7976cf9c3fee54c39813f1897b30afe12ee53d6655d233eb4056ecbb6b6fd709f3294a1b1fb07702c63637ae4b34c65aa3a30d657755537603e59b2d9235ed5500d2de227f0af72a3c0fe353856b1b3780958bd6f0ad87723a39c2c9f88575da8d87dea893b9c4fd84f8faf3acb37eaa36e55101ffe3a716ffb6f82877a68917f7a3b718ffa263b5f6ae92d3f1b6057bbd6f6433c9ba22907ab77d46753a958bdae83eba636ffe43358bfdef27533f160fdf3142c8d74761efaa5892ac8a7e0be4d6a526bf1fb34f2d82e1de2cdc7130f60c27e6dd55683e5730dac5f6f8c7cb55ddb89c5e30aacd912e819f96ba595def27b94d90bfc6107f6adefadff5e80938addbf1ab92b552c5fefc04dd73a8bef0cdc769d43fc6415dc77bdf9cfd7e0a0ed6ef306f5dca5be70163ff4dbd8eecef6dfcc5c9a9ee18fb65b61f1a5f3cc95b77a2ac1ad0af22ff0a71f3f8b1ff2d50f8a56cf2eb338bb3feaa3973e7acb47028761e6adde8b9187b1012cff37137bebe79dcc7d0013d68fe517900f467f0f8d9627e6016f6576c1f281fed474f5dee657cc3c78ab17d4c7d0a91efef0197818c4f623cccbc10dc1ecf925d80f31fb8f7ce9782a9cd5e302ac05ea2dfea837e9a4cbe7215fa201c91c330fc1ea1bfd278332e2cfb69fb859447e05fd2b4e9cb3fbdd660ec1f2bb074eae3066e453c7651badff185cba2aa07e69277313ec7ec887b66f637a467fb9c649b4f30670ab62f3683e71de0ffeb84ec5e287fa7683f3d1e629ea57dd8fd1f4b8af8bbe8ce6ff49e6ca58e01f9e1ff307f5e86bef12e2c598ffbed176b3fd31ffb5ddba68f582f7d7773e26f317f3c76bf633a39fbd8459e6c3cc45b2fbbe023b65f82b0760fdecbeb20d8e3e06eb4fd447a84701635e86364cf139cb1c92bd77e89fd0697959fda13f431f62b2fe427f8641ed6d7e6f649ef4974bb6fa36767196f5a8afe063952cbfa8e71062992cdeeb99277d9bb936967d700c395f729139457b3f0f8c6391ec7ea799a7f5889f5e3659fdd295b18e6b5b8f791b674bbecedc6646fdc762c9a8cff1b9b5f3783b7367f124f4b33e977db6c7f9b18e4366e4479f0bc9fea13f63abebad5eb633673de1bd8d5d7499f1fe471d67395ec86f1c3420a647bca2c498f5785fd47a966cdea33fe318408b4769ac7ab3af3217793fcc2fdd2db3983f49d9eeeb3397d91ef35777cb2ce877a5291f94798a37fa59b539be8cbf5f54db65c67baada1c4f46fda936b3a4cc39be82f747b59919f35129c793f17e24af62f5bfba64d3ef67cef114f44b4201417fb064b3dfcb3cc51bf5a49459ce33a7ac47bda734f17c3109130b3bf61c3872e20f7ccc277cfab77ebef8d19e3ff2273ee373bee0cffc852ff98a177ccd5ff9e61fecbff12d7fe7a7bcca6bbcaeb2c61bbcc95bfc8c9f3fb4e717fc925fa9c5fa1d59e36ddee1d7bcfbc07ece6ff82deff1fe1d39e0777cc847fcfeae3dcfb8e0922bddbfbe270db7dc71cfc35d7b62221272e4ef49a048893e3cb03fa6133ad5151fefc9273aa373bab86b3f5fd067fa429774450b95eb2ce36fa7f4956ee81bdddeb3ff4e4f69552dd674cd29adab9cea6fd7b4419bb4c5f430fef48c9ed30b7a49af7e906ddaa1d7b44bf39fd8bfa1b7b447fb1ad5a5d001bda3433afa597e75c57b9a51a11129b378aaa8a6e6e7f5a0f62d75d4d3200cd1375e5f71fff7eef7ede70b09a26349b3a6221fe4584ee4f45fed3fca273993f351785d2ee4b37cf9a77a86fda55cc94273772cd7f2556ee49bdcfeabfd77792aabb226ebb2219bb225cf7ef4e627f6cfe585bc9457b22d3bf25a76e9e817f67379236f654ff6e540dec9e12fed8fe4bdccf46fb1522afd87a4f9953d56b4baa693f968fbc0feafff3cfa3f5814f320</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>ListBox1</sender>
+ <signal>contextMenuRequested(int,int)</signal>
+ <receiver>PopupMenu1</receiver>
+ <slot>popup(int,int)</slot>
+ </connection>
+ <connection>
+ <sender>ComboBox10</sender>
+ <signal>activated(int)</signal>
+ <receiver>ScriptObject35</receiver>
+ <slot>execute(int)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>LineEdit1</tabstop>
+ <tabstop>LineEdit2</tabstop>
+ <tabstop>ExecButton28</tabstop>
+ <tabstop>ComboBox10</tabstop>
+ <tabstop>ListBox1</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/current/kpartmwframe.kmdr b/kommander/examples/current/kpartmwframe.kmdr
new file mode 100755
index 00000000..134f28af
--- /dev/null
+++ b/kommander/examples/current/kpartmwframe.kmdr
@@ -0,0 +1,618 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KKPdemo</class>
+<widget class="QMainWindow">
+ <property name="name">
+ <cstring>KKPdemo</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Kommander KPart Demo - Kommander</string>
+ </property>
+ <property name="icon">
+ <pixmap>image0</pixmap>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <widget class="GroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>1</number>
+ </property>
+ <property name="spacing">
+ <number>1</number>
+ </property>
+ <widget class="KPartImport" row="0" column="0">
+ <property name="name">
+ <cstring>KPartImport1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <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>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptFileOpen</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+debug("opening")
+url = _KDDIR+"/kpartpart.kmdr"
+KPartImport1.openURL(url)
+_loadup = 2
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject12</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+if widgetExists("ScriptObject13") then
+ TextBrowser1.setText("This text was written by a script on the parent frame window. It could have been a dialog, but we chose to illustrate with a MainWindow for this demo.")
+ ScriptObject13.execute
+else
+ message_error("You do not have the KPart child dialog loaded")
+endif</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="AboutDialog">
+ <property name="name">
+ <cstring>AboutDialog2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptInitialize</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+KPartImport1.loadPart("libkommander_part", "true")
+debug("loaded")
+AboutDialog2.initialize("Kommander KPart Demo", "kommander.png", "0.1", "Copyright 2008")
+AboutDialog2.setLicense("GPL_V2")
+AboutDialog2.addAuthor("Eric Laffoon", "Project Lead", "eric@kdewebdev.org", "http://kommander.kdewebdev.org")
+AboutDialog2.setDescription("This is a demo of what can be done with kommander 1.3\nYou are running "+_VERSION+" now. This is not intended to\nbe of use for any specific tasks. We hope you enjoy it.")
+
+Timer2.execute
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptHelpAbout</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+AboutDialog2.execute
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Timer">
+ <property name="name">
+ <cstring>Timer2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!kommander
+if widgetExists("kpmessage") then
+ if !str_isEmpty(kpmessage.text) then
+ kpmessage.clear
+ ScriptObject19.execute
+ endif
+endif
+if _loadup &gt; 0 then
+ _loadup = _loadup - 1
+ if _loadup == 0 then
+ ScriptObject93.execute
+ endif
+endif</string>
+ </stringlist>
+ </property>
+ <property name="interval">
+ <number>100</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<menubar>
+ <property name="name">
+ <cstring>MenuBar</cstring>
+ </property>
+ <item text="&amp;Functions" name="fileMenu">
+ <action name="fileOpenAction"/>
+ <action name="Action"/>
+ </item>
+ <item text="&amp;Help" name="helpMenu">
+ <action name="helpContentsAction"/>
+ <action name="helpIndexAction"/>
+ <separator/>
+ <action name="helpAboutAction"/>
+ </item>
+</menubar>
+<toolbars>
+ <toolbar dock="2">
+ <property name="name">
+ <cstring>toolBar</cstring>
+ </property>
+ <property name="label">
+ <string>Tools</string>
+ </property>
+ <action name="fileOpenAction"/>
+ <action name="Action"/>
+ <separator/>
+ <action name="helpAboutAction"/>
+ </toolbar>
+</toolbars>
+<actions>
+ <action>
+ <property name="name">
+ <cstring>fileNewAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image1</iconset>
+ </property>
+ <property name="text">
+ <string>New</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;New</string>
+ </property>
+ <property name="accel">
+ <number>272629838</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileOpenAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image2</iconset>
+ </property>
+ <property name="text">
+ <string>Open</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Open...</string>
+ </property>
+ <property name="accel">
+ <number>272629839</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileSaveAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image3</iconset>
+ </property>
+ <property name="text">
+ <string>Save</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Save</string>
+ </property>
+ <property name="accel">
+ <number>272629843</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileSaveAsAction</cstring>
+ </property>
+ <property name="text">
+ <string>Save As</string>
+ </property>
+ <property name="menuText">
+ <string>Save &amp;As...</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>filePrintAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image4</iconset>
+ </property>
+ <property name="text">
+ <string>Print</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Print...</string>
+ </property>
+ <property name="accel">
+ <number>272629840</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileExitAction</cstring>
+ </property>
+ <property name="text">
+ <string>Exit</string>
+ </property>
+ <property name="menuText">
+ <string>E&amp;xit</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editUndoAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image5</iconset>
+ </property>
+ <property name="text">
+ <string>Undo</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Undo</string>
+ </property>
+ <property name="accel">
+ <number>272629850</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editRedoAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image6</iconset>
+ </property>
+ <property name="text">
+ <string>Redo</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Redo</string>
+ </property>
+ <property name="accel">
+ <number>272629849</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editCutAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image7</iconset>
+ </property>
+ <property name="text">
+ <string>Cut</string>
+ </property>
+ <property name="menuText">
+ <string>Cu&amp;t</string>
+ </property>
+ <property name="accel">
+ <number>272629848</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editCopyAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image8</iconset>
+ </property>
+ <property name="text">
+ <string>Copy</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Copy</string>
+ </property>
+ <property name="accel">
+ <number>272629827</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editPasteAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image9</iconset>
+ </property>
+ <property name="text">
+ <string>Paste</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Paste</string>
+ </property>
+ <property name="accel">
+ <number>272629846</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editFindAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image10</iconset>
+ </property>
+ <property name="text">
+ <string>Find</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Find...</string>
+ </property>
+ <property name="accel">
+ <number>272629830</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>helpContentsAction</cstring>
+ </property>
+ <property name="text">
+ <string>Contents</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Contents...</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>helpIndexAction</cstring>
+ </property>
+ <property name="text">
+ <string>Index</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Index...</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>helpAboutAction</cstring>
+ </property>
+ <property name="text">
+ <string>About</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;About</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>menuTest_MenuAction</cstring>
+ </property>
+ <property name="text">
+ <string>Test Menu</string>
+ </property>
+ <property name="menuText">
+ <string>Test Menu</string>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>formatBold</cstring>
+ </property>
+ <property name="toggleAction">
+ <bool>true</bool>
+ </property>
+ <property name="iconSet">
+ <iconset>image11</iconset>
+ </property>
+ <property name="text">
+ <string>bold</string>
+ </property>
+ <property name="menuText">
+ <string>Bold</string>
+ </property>
+ <property name="accel">
+ <number>272629826</number>
+ </property>
+ </action>
+ <actiongroup>
+ <property name="name">
+ <cstring>format</cstring>
+ </property>
+ <property name="text">
+ <string>ActionGroup</string>
+ </property>
+ <property name="menuText">
+ <string>Format</string>
+ </property>
+ <property name="usesDropDown">
+ <bool>false</bool>
+ </property>
+ </actiongroup>
+ <action>
+ <property name="name">
+ <cstring>formatItalic</cstring>
+ </property>
+ <property name="toggleAction">
+ <bool>true</bool>
+ </property>
+ <property name="iconSet">
+ <iconset>image12</iconset>
+ </property>
+ <property name="text">
+ <string>Italic</string>
+ </property>
+ <property name="accel">
+ <number>272629833</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>setFont</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image13</iconset>
+ </property>
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>setColor</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image14</iconset>
+ </property>
+ <property name="text">
+ <string>Set Color</string>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>Action</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>image0</iconset>
+ </property>
+ <property name="text">
+ <string>Talk to KPart</string>
+ </property>
+ </action>
+</actions>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="4638">789c8597c9721c390e86ef7e0a8571734ca033997b4ccc418bb5d9da7775cc01cc646adf4b52491df3eec3c28fca6a77cb6da52e5f1020b193f5db97b9e3ed8db92fbf7d7a1ac9e8a29d6bcfe571ee4bf77c73f3f6fb7ffff3c7a7cfcecde97f3ae73effebd3e79dd15c3bb779771b26201c81aa36897fca17cadd94299d709d0d9c28e783fca6719de4ca63e32629949d7211d7f570393116ac13f4fdb0df37e5d62569afeb90efa27cab7caa1c06f9ab09372e6dccbe37e599bddf95f3a9be57ff9a2295a453fd75b0eb9db217e532eed7e8faedc05ef7db50ae86fd71fe103f7a559ed9abf168fac1de63b06b8dd55e495d484b9557ff25abeba6d2f53be5dc49aaf25c2917c37917c6769eb4ca655a25aa4f97caf5549e8f9467f69e83ebd0a83eab7d32e45faec1599962ff5770d117881f29872c4654f5cb096b3aa1df293b57229e5c28674969f6687efcac9e0e958bb22bb1aef1f6e560ff81f2107fff06ce7bf3e7055ca715e2bfa55c6755aaf5eedfc1c5d47fd8d3a44592e9f9b0a7c92ba7f5e9e7c15379867d329cffa8ec0b67eb0bca437cfd185c64761eceef32877cfb4b70919bfea2f2502ffe015c14b6aef5d10ef1a512ec1cfa8b6b65e76245e8fab57148b49fbc071795e93f83e387f533e5aca8edbc91f2506f92810b316e94cb2933f69be5e70a5c16361f7694ebc2eadfbf82cba93d3a2fda187fab278d7feba7f54207e0d4e229cbca6d61f967f83b9b5f8760975a7ee14f5f4ef37533e16e16cf5e398d1fcecf06d6fe17cd57e74acb97a8bfb13d5ac497351e5d5e6419fa4fe3d915bef3ca1c94877a966d70d139ed0f7f0e2ef30cf373175cd5d63fb06fd6cf4fca4d6af1e37570d65a7d41bea92ba7ccb9b254798efe5855eed21cf921d8dfd54589790d7be20675aafa27c6dee605ec8b7f01f9d57eeb4299a07fe4d438731a3fcfc675867c7c0557a1803cfc09b594887f0aee42d075d6fba2ebcb50407f051c6f0c6576e0b669d10f3a9fc2905faff321a48dd58fbf57764d9e627f9d5761369fc4781adf2bb0337d5e020ff1d07c8749bbabbf8cf38a98508dbfe83c0b65e5501ffe092c550a7f0ec06d2d1a4f4ec0f1c3fedabfa19ae69bd6c0b9e59b6c3d362c18f657755e227f2be0f8613fbd2f429d76e6cf2d38ee87fa40fceaaa2d905ff8132fec0afb6b3e43536539ecdd57962ac950afdaefc1b79587bed65fe8a475b067191cba5e99f4fe09a14c13cceb67b04cef4b9d07a1af1287fad0fee9933617f029387e1a4fd2fbae4fcb26457d6bfff7aef40efdb807f6bda05eb41efb2c7ef04fe3d3e75585fea475e3c6217e5be0787eadeb9acfbe283dee1beac0759a613d18d716af55705b89dea7a4f77b5fc6f2833de7e0a629555fb41ffaaa2ae1bf2c18fb4ce3e7c9b8437dc90db8ce72e4f715ecfb46cfe331b86d04efc13570884f00b547eba5afe37cc5f9b0bf2e2545be1e8d5bc457eec1d13ef4b337aef1be927770ed100f3696aa827e0dee5c8dfb4beba56fe2fec8ef1b38c60bfafa3eeac58706bc3630f2a5f5d84f1e1098c7b5718b7ee30b702ba81f3f32f6781ff2bd718bf830fcf55d6af3fcc138f3b017dcd65d0e7b2ec1b1e0e11ff2dd86e0f1bed5faefe37cb4f7b1ceebbe2f3dea9ff68cbb14ebd8bfaf0aabafcc5830df69d73820de847aeeeb04f52189719ae97e343f30fa65c1b8407e448ccb0cfeed0c8cf970632c39ea61dbb8cd517f8be026c9918f19a37e1f8db302f5766bdc16f06fc9b803cb8c113fe4bf17a9506f6703231ec85fefe3134ff38b7eee3bc9f0de37fdaec57bd65f8383d9e3cdbf50e33ef2b753c6febe33f615ecb37c8578432a17c6a1d1787bf44fdf27d66fa5712ab81ff68d738fdf1f9571d5e2fd7d34e5a0feec8c7ef531b1b0e796bb5fcb73e09ecff89c2ff892af7e25cfd77cc3b77cc7f7fcc08ffcf4cff23ce2677ee1571ef35bd478e7f97f92e7055ee425fecacbbcc2abbcc6ebfcede7f2fc9d377893b7789b777897f7789f0ff8f0aff27c347cc77cc2a79c70ca8e33ceb9e07267f4a33c575c73434c44429e5aea28504f67744e17743991f8b33c5dd135ddd02dddd13d3dd0233dd1286a3cd30bbdd2183233797aa3779aa7055aa425fa4acbb442abb446ebf48dbed3c674cfa93c6dd2166dd38e6aecd21eedd3011dd2111dd3099dce2c863c25c39792a38c722aa8a48a6a6a28fd733c7ef45758280e412fad7412a4973339978b9fc9cba55cc9b5dcc8addcc9bd3cc823ddc993f0c7f232926779915719cb9bbccbbc2cc8a22cc9d78fe56559566455d6645dbec977d9904dd99ac44ab63f92971dd9953dd99703399423399693e8c9a924928afb503e935c8af8bcdc9778874823da1e3efea6fb517a2aef7dbc0cba89868f33db9f4d22e5cffdc55fa521ef2ffd95bff637fed6dff97bff60911dff5ddae41ffd931ff967ffe25ffdd88f4dfe0369937ff3effacdfbf99ff5ce20ffbf7f7ffa3f863e6316</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="3278">789cbdd6494f5c391007f03b9fa295ba45a3cadbfd9e4673604980b043584773f01a206c810602d17cf771d7bf9a0cd124e13432979f5cf6b3cb65376f5e8f0e36d746afdfccdc8cedf8c48ffcb1bd1ebd0eb7e7e70f7ffef5c7d799575535ca7f65dd8daa57bfcdbcda1a8ffc68fdf2224e6073fc88fa34b4439a9817d5de19f1dac443310498b6c45ded8b42c607b119ca3e48fcdcc4b69834f10771d9bb7e103f885b5779317d14f7a66aacf49378b0c175d2bf29765d6ab01e2b8e6ef088df9dd85526b55efc45ec7d994af1c9c4bef1436864be0db1317dedc4857830aec6fade89f30409f9b85187d48bdf8a7d36fa17c4d1c724f9e455710a85f65f4c1c8a5027d90faf884b5b0eadf81e0e0dfae95a5c995863bf3b701e2ff9a5b1b8ee8a02fb3d86f3787cffbdb8b5ce62bdcb7068b11e92fd04d317b514036fc0ae73d8ff91b8b75d8ff555ea7c24e24d380cbabf73b10b4ebf2fe7194288fa3d39cf1073fea51ea89f38164351cbfa6819f6958365fdb11c4c27e747b5b8f246d7f7198e35be47f2fd580f7d8bf84fb08b16ebbb83a3d1fc1f881bdbb638ff33b533c8c7351c355fdc88dbc1d4c837e2dbd8697f129b3c3fdcaa6d927c5127ee43e3918f523c58d322fe168e9a3f5a12bb5846d4c3a95aeb918ed511f35b7cdf871ef781e4bec5e02b8bfd5cc1715aaf7beaa4f526f725465736c807c351cf8fd7c529f880f3477e53eec67ab0fe942a5d8f9c772a5cddca7de30e4ed3fb10c5f976aa8dbad2f9e4fea5caf6b8efd6c2ceb658af51bb16f5b0a54e384f9e8573433e4f9e8cef0dea5a2df9ce52d3a2bac57ed8a93bb5bc17a9f1752bf7d1623f4d6c02ee5b0fe786f9f6c56d8e477d37ea56c7339c338afa1ac3695a7fdbe2cedb4ece932a7568b13fab4ea827ba8793d6271d8a8deff53e79b5d7f7b254a70ef96de150c016fb37b9e17dbf7c32e697fb94fa3c1eef6b7a32f67b07e78678f9bd48f935eef07bb2a71e3a9ce7299cf47d21793f930d16f333c6e7dba5fd3b6aa7f99a17bba949de8be483efd05fc3b132f8fd59513b83fadf550735eac54f66146faba7f711e71fa231924f3a52bb1ee7b5ae0e301faa738aa51ff90da9d4fe47b5de5792df9b94af638f7c2ec0a950afa91bf5fc93f11eacaa3bed9f551bfc1ed3a3bad7fe07f500f3be7afa9ee3fc537203eae9eac9d8ef9c3a0e18efd5fa5e6c8d278de907cda21fed59bc63af2d70e4c41ff9984f9e8ff841bce753fec4677c9ee32ffe3de287f19e2ff98a3fe7f86bbef936e227f19ec77c9be3eff89ebfe4de875fc63ff26c8e9f36e2b95fc47b9ecf2df202bfe577bcf88278cf4bbcccef79855779ed05f1ebbcc19bbcc5dbbcc31f78f7bbf83dde7f161df9800ff9880b2eb9e29a9befe2db9cf38e4d5e43cf03319f119125479e02454af4f1793c1d734f2779d62ec75ed1297da2333aa70bbaa42bfa4cd77443cfe36fe98e2fe93ecfbe94bfd2d1177aa0479aa5b9dce66981ded2bb67f18b39e3f3b9764e65d498966899ded30aadd21aadd3066dd2d67fe6e791b669874fe98e3ed02eedd13e1dd0211d51f1d37ceee75125555453432d7564a8ff55fe69b0cc8f96accdffbb791b5e70beb9d9fc8f461ee55f540fdf46fdeff179473f6d12fff7ef33ff008c9a2542</data>
+ </image>
+ <image name="image2">
+ <data format="XPM.GZ" length="5646">789cad974b6f16cb1186f7fc0a8bdea1a8cf5c7b6614658101db180c36d8d838caa2aa67da177cbfdb47f9ef69bf6fcd07ac721445b079dc35d5d575fffe78b5b4b7b9b1f4ea8f17d73772731497e2a15c2dbd1a6f4f4f1ffff9af7ffcf9e265552d3dffef9ba5eae5df5ebcdcba598a4b9fcecfa66790b7195c51946decc1c7c65d1cc0ef8c87189e393e19abb6cfac8d7124cbdeccb1c0f9a6f1a4f85e1f8d9376e071c111df1fcd4c7b74225785d2be37c65514f077e3dace578c1be5f98f058fb0ffc0b8e5fdb23b734ce013e3a0faccae9a99ef71b571477bdd07e39efaddfacc91e797c6839dcfef890aff3b7b7f352aeef73bc693dd178d532ce18f965c0f11f6c74363b5f82d83cb7c3fec976fe4ba1ee17fd95930fd4ffd75ad23ec512537e5d48005dc343559b6c1a11e47fa93f1ecea92f175a57135c27e7f07eeb3fbf91eda3fb6d558431fec2ff37b8c5f83cba61ae1bff800cee1b57cd902d76d3d2299e33db8a947c63be2beb26f2afa5b604f39b432c2fe780b9626d0dff2446eab89fabf18f7d42f5fc1b1d589f1827fcab199f3e13d39ab03c71bf0d468c4f74afd533bd2ffcaf7a43ab29efc0539948c8743fd5545dbd15ff11a5c3529a2bedc1b72b68ff990c8a1b0783ae392f62af2b56a1a61fec823395466ef15b86d6babf77d72a8a82fa21eab2eeb67fc578ddb11f211f95df56d67f986faaa86d04cd4776a1c46c607efadb23f596f0efda31a83d8f93938e5fb60affbf8cc7511e208fdf10c5ce50464be7c217745023bbca7aec3c4fc9144eebac47e857ca99bec4fea3b25e7f7e03c9e18778c5744ffa84318c88efa4257587e225e751794fef2c8ef7ae86abbffc13824f8cf15c663623e20df6be9f21ff03deab58e5dcbfa52e4733db603fde157c85db07a453e37e522fe1e5c7589fa3dfcdbd46dcf7ea337e42013eb13f5dcb4adb01ef49adc95ac07b74a1e9ac47a590387be613f70fbe421f0dc517fd795563f13b98f89fd70853ccb0beab9e9fb86f60ae2df489726c61ffdbd89c360fad78c235911ef26753ded15c4b72d7a49e8876e035cf689f9a8e8376dd7f713f367200f55e2bc403f6e8759bfc7fc6b3558bff0f0771b876662be63beb569e813583f3f7328ba96f3c9a17f86dc90980f1efe09d5d0f37b8ff7863a8cec170ef9169aa19ef0bda2be422ef789fdec8e3c4cbccfa1de43e807e683f3c6c27c729fc0d9dff48fbf368ed4e7e18f205d13e10fff76c1cccf40cef6303e3d384a48fc1ef323e47cb4feb44c1e0afad75f1927b3dfe473bad13ee47f48c39c4f17c63131dff9fe2425bf77e8a75d2e20b3e73339ebe3fb617fd7483151fff9cca60ff1e8727be5bc748fe441cc3ff067d7f525fba1df30ee6d7e3d908769c2f71ef9928f2beb9f81aca5e553071e32d35f981f9df4b5e5c73d39bf8ff13e206779e6c33be3d6f211fdb81bfb39bfeec8529b7f6fc95a5b7dc09fdd240dfb9fbb350e167fde9f7adb171cfa6b5f667fb2df2b592d5e1ef3a47f5e77589f7be4f9dca19ff68d4cac67877ed6b75a597d9f19ab9da3dff6410b3b47bef659bddd87fed10fc33c0f76c91a98ff82f8f4a293f517ec377dde06acbf22feb9387389421fe231e475c3e6f119597bf60b41ff1e9ab1b2fb317f86104beba794cff1e7bcf27b64992c7fb7c9d91dd487fd60e8b33dec37c8bfdc5eacbf08f5c7c57dc8af2149c379e7900f92b75fe69bc33e2265ecf81eb921cfdf2bfc2f793bb67ab8268f35d9a39f4a2d62f30bf34c72c3b5f98d79216134ff3bcc579138f2be8878884ab4f98dfacb545a7d21ff651a2d9e11f5a18596b6af2c93636ffec4feac794132fb117fadb4e27e2157e4d1ea574f8cc5ecc3fcd0bc0db0de14fbba366afef3bbe4c9e697225fb4d7dede1f8dc5f663479eedf1ebc6769f629fd4a891fdd663feeb180b8bcf26796c6d1e20be3ae5f511fd430af2accfbf379e4c3ffa7f6e6676bfd4c6261f518fb188a5ed07d017cb58725e7ae447ac626ffde00339aba77e728881f9ead7c8a9b4fb902fb15bd883f91efbac8ff1427cf2f8b5f91191cf51f2cf19e4b7c25fd93d6afbf43179d627984f3979e67c5f35b6f73acca3388e15fbb7225ff3f230cf6ff86bccf1e6fc8cceb831ffa3be3315960fa8cf316f77d6ef0663eb0f1ef93fe606ca7ea747e4d93e857fc6611c688f5c92d3bcef503e4f5bd68722dfc638dafc8ade78e4f7fec0d8f633c5fbc79419fddef7e4c9fa8d83bd99e6f8a19f4ef554d35e5f2d98efefc9c9fabfc77c9b9a29d01f1ef53cb593f5435927a7799fe27d61b27d5557164c7f2d2f98f307f53e75b33f14fd77cadd8af678d4eb24397f590f986753de66cc1efc9e999ef39ff141ff9a524e17f2eb05737fe5fb52b2f84a653ce72bfa6f3e2d6c3e5c18cfe7d80f72742bd3bfb560fa0bfb45fae93fd463ceceb91fec1bcfef45bd6532f6a8ff945f6fe7c8c73424db5f15ef4d92e6fa473f4971f6bf473f4d480830ea3ba539fe5b377ffddfff53de3b2f5e7dfc6bf27ef4934ffec01ffe77797f94f51efb1ffec49ffa337ffebbbcbff097feca5ffb1b7febefb2f4bd7ff08ffec9bfcef2cbfe8d7febdffd26bfe257fd9a7fefd7fd07ffd16ff84ffeb3dff45b26ffc57ff5db7ee717f96f26bfebf7fc77bfef0b5ffe225fe51b6adffc22df423ef8cef759b6f84d7e70de39274e5d74a3e3fc4dcff2eec01d9af442de1db963f7c39db85377e6cedd85bb84fc15e4afdd8dbb7577eede3db847f7e45ebb65f7c6bd75efdc8a5b756beebd5b771f20ff11f21bee93fbec36dd96fbe2beba6db7e3beb95db7e7be67e97d57b8d2558ebf8f1bc8b72eb8cef56e102f79ba3fcff3fc033c17a91cc8a11cc9b1fc9013d4cfa95f953339970bb9942bb9961bb9953bb99707799427792dcbf246deca3b59a17f6435cbafc97b59970ff25136e4937c964dd9922ff255b66547bec96e96df93ef26bf2f859452e58da49156f20f0fe96550af4e455523e575d489f29af4400ff5488ff5879ee8a99ee9b95ee8a55ee9b5dee8addee9bd3ee8e31c2f7dd2d7ba4ccfeb1b7dabef744557754ddfebba7ed08fbaa19ff4b36e2ee4b7f4cbcf48e957ddd61dfda6bbbaa7df75ff798fc9bb49adcd423eff345cc817dae54d62883e6222c698c7c0944bfbe067fec4c378148fe38f78124fe3593c8f17f1325ec5eb78136fe35dbc8f0ff1313efd8ff5fbefbfbff80f5aae600a</data>
+ </image>
+ <image name="image3">
+ <data format="XPM.GZ" length="5534">789ca597498f1cb91185effa158de14d3038b92713860fbdab57f5a2a525c387086666effba2560ffcdf1df51e2ba1f25c067695d0c20706c9e08b85acdfdf2f9d1cec2dbdfffddde3933c9dc7a578260f4beffbe7ebeb9ffffcd73ffe78f75b512ccdfeb5ed52f1dbdfdefd76f8b41497f66f6f8619c447039755595df6e0077093b58905dc1ac35e3f83bb4caa0cbc06d62c5625f80adc67435563fefd8cf32ccfc85227ceab00fe082ef2b212d83b709977159c9557709d3715fc910b70c8bb9afb7f024b5172dc71fd98f775053e008f455637b05f4ddcd558dfbdcdb8288ab2ee307e09ae8aa1867fee0cdc146d1d67ec73b014da607fa9c86555534f0f56639cc71f8187626ca08feccfb8cc4a21c71e9c9745037fe31dd83e69fc165c9735c7fd56e2a6a1bfc7e0a6ca1bf81b6fc06dd93638af7f4b1c1af82f3fc855d650ef6b705776697e9c58c18867a9a5a6fd56c855dbf0bcd0abeccb9ef6724eae9a66c438e255598271ff88f12a377f31dfdf272e5ae6cf45e29e1c156c016911af887854f6e1fa0efa577535b6386f3c053755d3e6587f8d5c0f81fb8fe05005ae2f25b92e5b9c2f0e60adb465fe203fab58372df5db030f75d7627f8f7855635d901dd6ab8b260fccb72fe0aa6e03f3ed67e221607d7901d7668ffa70c88fba69aa007ffc3ab86d62c77862ff3a347dd7c21ee7ad63d304c453ce12b701f1707b8925c03fe57a7d53d0dea1be9aa2193be8e176c1656b0588fd907f266748f3912f4dd348477db3c463c7f315e0d056f4d7ed80a50d1dfd6bc0435b76c8373d018f6d9bce9327960efe7be8d366a110eaf9155cccc7dd36b8b471ee8ffc6eab9009ead36f243601b03ffa415bdb7cf40b7f9878a4bdcbc8214f8c7c6943a884f982f8b56af638bffb4e0ead207eba09ee43109c4737120bf7f7f46f08a3305f78be31a830defb89d3b87f265bc3a53dea3f6436ce7edc818b507460b94cdc502ff70d5c8641a8e7077065cc7e867e11ea500be2adb7e42e17ea83f386666eafb46fba92fe6800b7767eea8ff88610a230bfb85fe85a653e217f82ccf57027646b37d0535b701ffa14efa389e1bf1e4e0c7fdc33b91385bdd09fc198fb7d4fac8af878f4b330d397e7799b98fa727dcbe6c48867977583223e02ffbadc98f98bf37685d9b33f2e4f4c7d0ee6acbcafce26a65ec8676bb723d7f7885f577555da7f397150f647c4a3abbb3acd7f224ba98897e2feebac9a527e9ccf39cdff3831e37d3a31fb0bfa6f679f64ff3a31f5dd9998f57448968afb7bae2fd246d60ff7d7b95e6e832c21b27e1e137764453fef6217533eec4f4cbdc789a197fb429656592fdcafeffa741eeadfdbfad04b517fdd60fef0beda9e98fd1dfda71b2d1eac17ae6fd912791fe07d24d99c15fd5e72c9933ec5c4ec77bb13b3dee6e3155971dfc8ec41c1fadd9a33f5f363e232f983fc9172cefa3231efd3cdc46364fde37eb5ddb2887e24e86f524b9df41a12b79cefd6c99ad35ee9af7513eaadfd9c192f7923dbfadcef73e234df23bfa49dafaf7b73e6f904fdc1da41a09efe38b1a4fcb9236b15b93fea5d3a8b27fb31ea5bec43766b64ad23f457c453a2c4541fbb734ef18b13337e9b13f33e3a226b1ba937ea4d7ae969effbc443daff96ac2132dec82f194c1fdeefab89bbc8f72afa898c2a6441bfd66c1e2fd58999ef9f126ba49e88a7e6a637eb656762d6e7c6c4ec973789e7f3517ff6bc2ba9977f4ddcf78c0ffab33d872a9edf2f27ae933fc78907da3bf477b5eceae90fe2a38d363cbf3c4fcc786e4fcc7a9089a9c7fac4cc574d9ce2e1f17b41ed0226bb4bb2fd0060bda35e35d838eb03fdd6d42f7ae60f594c7ff6db2b72b4272cec911f6a1ffaa36ece3c9fac4d4c7b491cb99f5b21c78ae3caf8461be77df23431cf7b3a31e3b33567eaaba867ed2d3efc7d84fea4a3e9cd7eed27a6deab13339fd1df631ead45621cfd2516a607d743fdc6cafc65bf5899987aa33fc73af689d1ff6213879efd13f914dbd8f6ac27f497186220eb8789999fc8676be75d5a0ff966c55af4bc3f51ffd13e5cdfd33eda0f0e8c0be26b837dcf7e8b7a8c83f9c37ce67986be1a182fe46b1ce3c8f90efef599adc7fe8bf7549ff7f9c0fc87dee64dc171bf93380cd0dba39fd8ec6ee07b1ef9d25bb4b9be877e7ddbf703f5c079ecf91206e8ed5713f703f5467edbf5d5717d41bdd9f1e2c078a1bff4fdb4ded1c4d413f9d7dbe9b89e831e433e5403f57d485c0fd4f37162e61ff2dbac93bdc3796c340cd40bfe0d8d5d9864ec37b4838cac7fce0f839205fd66e8267b9f388efcfd00bd0719fa91f9c7719dcff721f130526ff44b0bef9818ef2f9b9d8dac3fbc7fcc3a1f99ffe84763615ff65fec3756f6a5dea8f7715620ec8fd86f9c09c8f7ccb789197fd4eb88cf8c0f9ffefaf77fb5f7ce8b571f7def073ffa537fe6cffd85bff457fedadff85b7fe7ef17ecc53ff847ffe49ffd8bff61ff2f7e5ffd4fffb660bfec57fcaa8dacf975bff127fb4dffc16f2dd86ffb1dbf6b237b7edf7ffc93fd813ff4470bf6c7fe93ff6c235ffc577ff25fd6dffc779ff97cc1bef0a5af7ced1bdffae03be79d73e2d445d7bbc18deed49dfd6aefcedd85bb7457eedaddb85b77e7eedd837b744feed9bdb81feed5fd740be775cb6ec5adba35b76e761b66b7e93eb82db7ed76dcaedb73fbeea33b58b03fb4958fdcb1fb647f3fbb2feeab3b71dfdc7797b9dc15ae7495ab17ec1bd7ba63ffe4823d84bdcc5e2776a1ccde0832caa99cc9b95cfc6a2f97e64b2b57722d37667d2b77722f0ff268d64ff22c2ff2435e17ec7fba7b799365599155599375d9904df9205bb22d3bb22b7bb22f1f17ec0ffc811cca911ccb27f92c5fe4ab9cc837f96eafd87cf6b2944a16fcb7d75d6b2fb04ebdce6e46bbbcecbeb182d4533dd373bdd04bbdfad55eaff5466ff54eeff5411ff5499ff5457fe8abfed4375dd6155dd5b505fb75ddd04dfda05bbaad3bbaab7bb2abfbfa510ff4508ff4583fe9e705fb2ffa554ff49b7eb7774fae85bd4eecfd317b03d8bdde451f5d945fed6797e7ac615a973f8d67f13c5ec4cb7815afe34dbc8d77f13e3ec4c7ffa71effb2fdbffffeee3f83ce47d1</data>
+ </image>
+ <image name="image4">
+ <data format="XPM.GZ" length="2509">789c7d944973db461085effa152cf54d956a932089a55239c896572d96bcc4b253390033186ea2488aa416a7f2dfd3db0cbd44e6d340f8f8def43406209e1c742ecf4f3b074ff6d69b7a33711d37ae6f3a077e3b9f3ffcf5f71fffeced675987fecab293edffb6b77fb1e9b8ced9e2ba65c08c00baf2117e2f5c86d02d99e196b9d7ed963df53f2ab3c47789258fa7c26564688d4bf30f23673de113e6ac1719ae9459e27f4d5c893f17ae126f8d2be3ebc87d9dff4e3904f317ccfd5ef23f28b3c45f26963c7e510ec1fc9570157dd81857967f883c90cd8635f3208b8c0b6596f863e17a500fd597fe8744c35afc1be33aef8bff5ad9b5e637cc7993f7f346fca571637c1fb9d0f99f9543b07ab2df453ff9723d0551a1f3d791cb8170573904f3a5bf725034e66f133be96fa44c1246799e4a573495e461a29cfcbbc8e64f8d9df96564f5519e876a1019668975fda05c593d5c25d67a6f945d6ef3bdb08b3ed491eba1e467c6561fcf229bff4ad9b5c6c7ccf530fa8089bdf8136596703fb1f800c23ee5ff548e3e7a636f3c8ddc68bd8ab91926066596b05c5fe359c285b2cf8de5f7ed7296f050b825d6f74763dc1a0f227bcdbf60f679e29789353f5666093f4facfe857208e63f156e93df8bdc16c223e358ff28b2f939735b240eca2ce1678983f0a57208e6bf150ec96f8d83f127e650b084cf85e5a32fdf9d10b0c6c6e44835c9631dfd9ff235b618925ad1e89779278af5750df7681ea40316d8111eef876a79ad977ae773d8257ec8efead629fdeb3ca4ba9ae6e11fcdbbef6aa72b7934ef695702eddf4e631a13d2f4c73cd599e115f533a639bbc173e6788d0b5cf23a314fe915dee01a37df698bb77887f7f8805ff190e64c342fb59fe2333ca2e373d30b7c89aff035bec1634a9e904ef1417faf78866ff1fc275de03b7c4fa3a1553e50fd8f78a2ef0bfcf43fe973bcc4cff805bb74d6a3de0e31b37c9f561fe090c6583a19612e9d1dd179417db1575237191eeafb172b9cd22a7d409a7bcc8f0c4e68f01900ef44090db8547f4ee9a966456732445083078f779a8756dfdf52f19b1cd59c699254e31c46d0703f30b6fa5239a5d27faabc22b78409de838316bdd51fd1377730a531a12bd363c949aa3d936f1a6821e8fda566aef8fe011d612eba860569495a9196721ebe7d7ed0c30dac491b58d2bd21c116b634bf25ddd2fd9dd9f3f6efef7bff0111915e41</data>
+ </image>
+ <image name="image5">
+ <data format="XPM.GZ" length="1472">789cb5d35b53da401407f0773e4546de980ee6c2ee26d3e9838004150183ac974e1f92bd7841501045ecf4bb37e7ec914aeb431fda330cc38f3fd9ffce26ecd6bcf3e1b157dbad3c2ef3e58df2d475bef06afa693a5d7ffdf6e57b65270cbdf2c58417ec7caaecd43de5f5ef67063ecbf273d5f71b4ac7c01151eb1c18128d56c06c43bc7648b4c6070e1c996f42606fc306302586068b8e8891c1a2ce8658d422360c169d1199c5a2d58658f442e4168be644613970418c2df63637c4de0931b1d87b47cc2df65e220356580b34c88829478b644c3b3e237999e2ca0532e1be4b03a4e6a16315180482567e40863c727b3e46469cbb34778ce9da3192f1d8d147263c77bc40169c56be452a2edc599d03c3a05c18d343642402c77d241354a4913137ee2e9c2213c15c7a822c046db28bb48276b5064691c86d01ec2385302e3d40ea987adbc0068b85e31e52c4dc26c057206309fdf811c883c4370cf884348972cfc61228929cb63145ea3c3011f01e18ebc2b7f847b802268d821e51852c0fd23dde33a455d47b03cc0bd570d75e0315d374ecf50fe73f25d5bcfa7152144a171f25c65e5ddfdc9a3f93c9dd74369bdd3f4c7e4fe68bc725ccd3f37c3b59bdac5fddec35575b49ebc5daa2dd6eef5bdb6cb5de279d72d2eec1c1617ad4e9d0f769fab6ebde71bfdf37830105835eef2d19a627dd6e77926559bd9ec10c3767309a9f96339e67520ece5672f4eb74a45c9cd35c2ca47c7fa252f62ec7beef07f31082adb396526669f926fff62efc9be4c7e7ca4f48a042fa</data>
+ </image>
+ <image name="image6">
+ <data format="XPM.GZ" length="2205">789ccdd3d94ee3301406e0fb3e4544eed0e8a7d9ec44a3b96029db1468d9613417496cb396b2b46ca379f7b18f4f8a8a60e0129d4ae9979ce4771c7b6e3638ec6d04b373adbb51393aab83fab4bc0d66d5783078faf5fbc79fd64c1c07f6278a209ef9d69ae98f823ad81c5e6987b0b208dbedb45639196ca54a72cdd6aa76463131dd8f946d749b9c79676d4d6148264ec9c7ec480bf2013bd6948f7d76a2291fdb13fbfc1e3bd53ebfcfce8ccfff39b1cfefb285f1f94b6c697c7e879d1b9fbf3cb1cf1fb10be3f3c7ecd2f8fc3b729455c690afc84956b387e42c536c439699619f900bd1f60e4b722522be1e92954cd89a6cdc03c8d41f45b2c95f27c722e1f7cbc989107cbdf2ce63f613598ad444e4985df078283f2a44c9fd876423345b38c79168de67839cd9eb19b94d9693f19f9273a1f9fb3d924ba1f8fbef902bd98c57928dccd95bce49645d90f7c8996ce63b224bd98cef88acf2663e779dd32c97ec15b2edd70959914d21b59f8f7be72ccb53559137bd8be67903b2c833bf5ff0402e73e1f71316c9755ef0fe79761622d7ca7f9f3567999609afb755b22c9bf1d1fe93859d203f9fd764552825c967ce795de69c3f4f56a5d67ebc0bce369cd7172e9dcbb232bcff6e9cab5ac59c7feb5cdb09e3fe7372a10ae3e7e7c2595786d74f7ff4f9fadafd0851a2b25543d151bfdf0f83139ce20ce7b8e0bac4c09e336ff5e30a435ce306b7afeada9ebf7bdd8f11c6b8c7031eed718c273c631e0b5c8b184ff763091daa652c53963d5aad60956a0debe84cf5ff44174bd3ef659fd1c50636a9b6d09deaefa1ffaa7b9baa871decdadab3fffc99edb7e61ffb38b04f776f728823aa21a98783b7bf178eed1d6d44531523c1f17bdf17293208c849e52890fe6f3d8440118636c556588655888fd68feda9ed730586f65ff599f54677745eba3f5e9faef7a5fbabef974ff4fffddefa0778e750c2</data>
+ </image>
+ <image name="image7">
+ <data format="XPM.GZ" length="3982">789c9596596f1c370c80dffd2b8cf02d289899d9198d84a20f8e6fc7f711db29fa405dbeeff559f4bf574b72174de276518f0dcfb7a444f1d47efa387bb4bd31fbf1d3ccc390866761369cd2fdecc7f87875f5fafb1fbffd39f3a16966cb6f6dabd9e6c32f331f7686b36176f3e63a8d00a800b4b18d7dcb0c23ee4c677a3f62ac98a9a33e337f63f69d579e1fb1694d6b0df32e7332c9cafe9723eeeb2e76a27fc83c30d1b23dfcc25c7e5cc7fcc46c7beb783f4066d73bd78f98ae9853dbd5c4fa47ccb9cf2eb0fc7ac4b66e7b956f0adbda45deef82b9e9a3e360e096b06d1c9f975698bbd6cb7a3a540ebadf6761db51c5f23d66d346d5e7f3583b66d860766d52e6f8596ab3ea73fcad2ffaec1fde32071b88fd278ea74d5da3f6b7856d22cb72d93f7703953f8ed80ddc80247fcbccad6b49e233c7dc757d2d72f6d7196788e343fbcc7dd7d59c0f5a5476a24febcaa4eb5799adb39ee301b2bfebbcea8b9cca7af60fae94c7f27be5a0fcc61cc68cafccc9252ff5e999b3a9547e21ecb297f32e8c98aab19cee985bd3a8fd4a791c2f27ec8cd6ef9b30b55ef275cc6cba5c73bdd0a6b0a96b3e0f3d333b338e27c7873c792ff55e33074335c71fcf852904a91fce97af4c14396565ad17ba61aecda092fd1e847d1d062ce7fef24dd197fd4f985bdf0689c757e6aeace7fc2208fb2e88bfc71396f8f0f9bcf14dc7fb01c7dff7e57cec3fdc0af703b527e7b5de06c7f20133f59dc821289b9ae5d84c58fc95fd8a41f18fe47c7ebc1e399f3ef81024bea7131639f7bb8f3e2a3f4f58fa9dfbd7274395d4c38b706fb5dff6262ce7e1fe0e55efa4fef14eb83c12ffc83c088328f383fb25747daca57fce9493307ae1d045c9d701b331a1e2fe05b167c6fab02d6c6b5dcff321f4a18f322f657f175c94f9c8f33350df8a7f28fb7bdbe87e5c3f215aa3fe5e0a8718a5beb93e42b6bee6f987f7c221478917ef1fab3e6bfdb17eaccb7ee22fcf97382872b1f7226c9dca1f9493d8a7f3094bbe3684cb23f705e72fb6e3f5b8c35cae8f28f67be6de557a5ecb4c360ac39893f29ab073b5ac578e94a47f13b32ffa35ebdf4d58d62f3107971a996f623f8eed13f75b4c4ee73df27c8b39e624f9e5fe48950b9a8f2761aa1be9a796794056fd5d122e8fecc7f334b5e5e17c80612ee357cfc7f32599b23fd7173c0a1335c21cbfd4fb46cfcff329595b462433fb9f8848cfcffd9bbc6fb47ff97e4fd1579a4f546ef5bc43e69c7296fae67acf956d2ab1c7f1c9b5efc43e2e0a9747faeb65c272dff179736343c5f9a03561d755523f6c2f97db4dfc45231c6c23fef03cc81d35528f34afacf30fce8463d5c8bce27acfc68ff3cbf3a9b4432bfd0f9bca24f30b5684cb7ab1c7f747f9f2a1f9c01be1f248fcf83ec9e4929c1fb684c340e3c9f9cede05cdc7aa70348df8cbf33707b23abf4e857dd4f3483c63ec1a99f77c1fe654c2c7f58741789420968bfd5ce229fe1e29f7c2b4adec94657da64a392abb4ae2a3ecb3de874fc2c5bef4d39e701c34727f77caa4f16ac7acfdb0af1cc41f5850ce2a3f98b0ec27f1c8a9d57cec2a1b5d3f9cb0d4abda4f4ef597957d23f3f041b89893f99494b3c46f67f8de838084fec74fff533f60fc1ffa8409f3844ef0748afe59d13fd7f70bbcc4ab29fad7788317fc768b7765edfd14fd071ce263f9ff84cf45fb055fa7e8bfe11c7ec6795cc0455cc2655c99a2bf8a6bf805d78bee066ee2d6d4f86c172f5f710723eee2eefbf1c43ddcc703fccaef877854627a8cdfb07a2ffe586383036cb143833d5a7478060800f45ebec043800809329cc0291a388373b880cbefb5ffa17f05d77003b7e5ed0eeeb1830718c2233cc173795eded17f853798e3b7cf300f0bb0084bb00c2bb05afed6f0e027fd2fb00e1bfc760b9bb005dbb003bbe5d9837d3880af3fe91fc2111cc337a8a086061b18400b1d18e8c196afe648f0bd7eb92c3c1c95efb0e512a58c75f9e4844ee98c65e77441973fe85fd135ddd02dddd1bd48e88186f4c86f8ff444cfd3f24b2ff44a6fe5ff1c7da6795a98aabf484bb44c2bb44a6bf485d6a7ea6fd0266dd1767976e85feae787157bb44f07f4950ee968a2ffd7af337f039acbe337</data>
+ </image>
+ <image name="image8">
+ <data format="XPM.GZ" length="1202">789c6dd24b4fc2401405e03dbfa2a13b62005b041be3c2172a46e3d2c4b89867799487501030fe77ef3d9d2134740e0bbe9cd09c696835828ff7d7a0d1aaad72918f54a086621934f47a3add7d7e5dffd6ea5114d0274e82f3fa59adde0c54f0369f19fe2ee87b28628a65ce98ca28a3bbcc1553b72997cc2518510433043b14c57c00bb147004f6289a790f263a31d83005a596059f0e8c99dfa0d1c674988fa0d5d65c30fb4cd3a660e4331851307203c6948439003b146c7e01bb148cdc8297143003130a36af4141c1bbba012505efca80f4b26c9bb90769b4c58d2c48c746cc05d3b629b8d1183ca7e0463b30a2e0461330a6f49873b043c10573f08282f616ec52d06ab04791cc1f30a180435050705f054a0aee7b072a0aee9b8286c394200efe45a13ba279748a464aa9b4b1a5ead0a4436bc391a86ad4d80a3a55cdc466d3594523d3f9e27bb9aa6c725bda78b46dbd296df44dfab3c8b6a58dbe51bbc5fea6b4d135e9ed646cf7a58daeb9cb7d73d8e81a9d4fe8717ee3fd437868f2f9cefd8637f61f9f7c93e6fe69d8b879eebb46b8e3376e071bd7f8e337662fa74db171bd1d9c34c5c6aaa6d8989d366ee3e96fc4d169d6ffae6aff9c383860</data>
+ </image>
+ <image name="image9">
+ <data format="XPM.GZ" length="2942">789c75964953dc481085effc8a0ee78d9848b754da2a26e680590c66c766194fcca1548b019bc5d080c131ff7db2f3154d771bf37cf9a4575999a527b5df2e0e4ef6b6078b6f176e476e74e607fed4dd0c16c3ddc5c5e33ffffef573e14d590ee45f51d483f2cd1f0b6ff647033fd8b9ba8c63a023016afbca9695f2c709d763e6a41cda605be55e39b6d176ca4b63eeaace7443e527e55aae14ca4e59fe1c98946d6733df2bbbaee950ff56b9efda0ef52f33f74e9be7af1346bfc763b6c3ba29757fda532e6a5b1ae5adcc0ef3d09a72d914a5557eca5c955ef9bbb269ea12e77396b93598af53ae9acea09f42b96e9cd17e382ab7b6755a8fbdb20cec82f295b26d6383f9ce955d9b1aed87d1afb7be6f94ff560e6d61c0fa7c5cdb3a83f5db63ee8bce985e7943b9ef82c17ee3874dbef25540ffebca8d1d1af4b792b9a9705fcfc777deb449b95596868253be56f69d2dc1cb605b19f08fcc2dead329d8fba0fdd117e5e863407f9b630e4391ee475a3f94a18ce8e744d90413352fa4e717ea50479cb7d60b8d2d4accdf284b6023f2abfb076917f7e9111cba88f3d4e71bac35f9bee63db8e0a2e691749ed0873eea79d383b20f3e223f9f9463e70be46d151c62443dcd771c8a701e3a6f2c4498ff4ed988506f57b912217f87cab52d0accbf0216e1f9d4ca4d6c12f2bfaf2cf92b500ff5e585c57dd6fea5dda6417ebf4f18fd7e00c72e613fcd57b436e0fd62d4b7d1265d4f9ab7e8a24b98ffbd72ef4c897c1e80639ff0bebe53f6ce96e8ff181c7dbeafdf9318fa26e7fd021c439e4ff31cc7dbe1f9dc82fb9c3f8ae01813def71be5e4db0a791982634a5a9fb47e1af6b541febe657615e65f078bb09f7e7f52e1e595523ecf1c2b3ccf0a2c425ef47b99cabeafb09fcb1c2ad423b02f2af4cf99fb0afd04b008df07ab6c4255e3bc2ec122dc2f95abe06abcdf37e0683ae461072cc2fb8a796b11bebf7b13c6facfca4d480df65b068b30afe63f75b16ee03f028b34bf8cfd6cec5b9cff2e58847c6b3e9213210f9abfd4a7618b7a9affe445b8aff94a21a616f557c1493ec8ca2673c87ecd9b3c6e8bf9f931b3ef90779f39663fce5bfff063f92ca689dccbd5694dfbb967cf212b72fa9d9fbff0299ff1397f15dfb7ac0bbee42bb97afa8aff9abff30ddff288efa634e27bb9fac0d7bff87ff0a3e8491cb35a92abef78f917ff0aaf8ad664c5acd6e4ea7b5effc5bfc11fe6b439a7ad19ff36efcc69339fd22eeff13e1fbcacc0ef1d7f9ad3b3ff908ff858fd275881df4bfe3ca717ff2e0fc5bf05657fc1e59c9efd46fc95f86b6eb89df83bb663490c881cf5d43ffbc9f321058a94e80b9d3efbe98ccee92b7da38b674dea4b4774c9077445d79819ffffa01bbaa5d18be097ea723e7447f7f4403fe871e27fa2257a37adb15fdc869629724d2bb262951e26fe357a3fabdccf2ead4bef1bf441566cd2fdc4bf45dbb352bfa11d391b394dda903d76a7fc7bb43f2bede74026cd7e99417698f83fd2273a9c96d6df1bfb734733fefd111dd1f1b4b4fea59cfcbad43fd67e66fcf312bf9cfbeffa79c5bff5bac4ffdf9f0bff0341cdbcc7</data>
+ </image>
+ <image name="image10">
+ <data format="XPM.GZ" length="4734">789c75985953dd3a12c7dff329a8e82d35d5d7cbb125d7d43c9070d80204424848a6e6a15bb259c2be935bf3dd47ee7f1fdf0506f3f243bdabd596f9edddd2e1eef6d2bbdfdedcdef1dd495c8ac77cb3f42edd9f9f3ffffb3ffffafdcddbaa5ad25fbf54bdfdc79bb77b774b7169e7f2a21f41d632b82636d1f3c87c3c72eb5befcb91dd0fe5aeed7cadeba3b2f3b32c10956f955b1f8c6f8c3baff6f95e39f810d4b9ac2a73dbfba0ebd7601f83577f413966567977a09c7cea5a9517e521cc42527b2b23876ad6959dca77ca75a83bb52773e5301b4ad1f51d700858e713650edca93db7623c30fc6b7c41f233287f351e3af8db0677056b7de44939862234bafec13876b05782bbd2e4b59e213585c54fe0902c7ec497ba8a67cab0377433d675d2fde9eaae863d3737f666df29cf7cef0b5d3f05774da7fbed6ae54cacfb2def27d6fd14c8fbc65b7c5be02e98fcb27164f4d3a572d7a452eb25bf94b91b44fdcba01c1b317bb760ae18fd77a5dc7783f97f1c998b566ae4f753b9e49675bf183ccb0d8afc6ec0dc89ee377d526ed89bbcf607b76d05ffacf9e5552fa8a7d637b74310ed37e78c9368fdddbeb27064cd8f1f94130f82f89f95072e515fd6fd96a2b5fea4ef606944fb9f347e2945a2e6475a7fa9a6f5c2b815f547a7c61c719ef47c49ed63adf9d31558ea88f35b193790775a0f994927ba5f74a11c6215d59f209e2e9415fc25b00c51fb998f9459a2e95f2e18f6690e8e45d4fce9cc780666ad9f882f4aacdf80b37fec87f6ff683dea7ed13938b651fb81b45f24c51af21495fb3cc0307ff47ccbe07d8579f2051ccb887e288d1be365e3007fc223c722cc2cff5d707ee0efc4d827ad2fe97e67ebadad6bbfe76cbce5bf63cc11f350e3cdd107f867edb7d8f860f53802e707f977c69dc5db4f8cf5276306bb556389e84fc4d3e6fdc4bc9d19870afbb7028eade533187709e7898d2398f43ce6ec22ec3bedcf9c4d4ce8d73be364fa0bee13fa4326463c883f0f8084fdba304eb04f87c63d58903ffbb6d0f8dd1538cb239f07e301fe9cf667ae86e9d33d381509e70df54aa94ee83f7dffc4de77b0cff0df8754617e683fc6c1dbfb846bb0b41dea8d7a0dd93fe6c935389509fdef8ceb04fb7a3e52112acc4b3a00a7d6eaa3f54d958f05f27f06a7b6d7fab2ee47b63633fea69ccf37e2711fc193bdcfca6d284aece731383f385fde588cb72746bd61dfa7d463be68bfa62ef509f9ebfc4a1c6ab3aff9666de9b11fdf8d73c9757d0bdc173de6fbccb80493d6338ddb0b7b5fc1791dfdb43731e633e24f8b78dc1ab8af7abc8f115f3fe97f33aea14f6b13ebfc27ed8734f433d3d7fecdd136bdd6d3e9fc18bd639dbe18e70b8e72a35c65c6f9f868ecc1a2f51fbdf5a8ef99b1efd18fc93880dda672f666f1ad1b77bdf697e8fcccab7ec0f9bb37e65efb55f47cf52d17b5e6cfcb136bfc7204ee83e99f1833ecd3a6711eb9aaaffd31463b607e6c18e703aeebfafec9d1f380fd6f8c23f45d344e96bff6e7980de2e5c17861af374ec6da0f593a0eb89f6e192763d45b32a33f5ae3bec7795bf00016d43b725be3bee98d7d8dfbe29e71be60aa3ee28d4361f542fe6961df1d1a9b7dde5cf080fbc51338ebe33c1d1b97c6f097ad99fd5df0c29fdc4e8cf939189756ef47e3ca58df07d99ad9a77de31af5723a5fb23593979b89d1efbd718d7a52653c03b3de2f863215f63db0019ef4d78dcd1fffc158d7f99aa517f60e26c679d0793e7ab7fa3d183703ee276b13435ee77ba676c0fc9d1b7bb0c05f9bea80fb75346e707fe7d6b8c5f709ff9818f374d7d8079caf07e31edf2b54838780fc786562c4a3f322471306bcdf67c61de277da8fa3b4c5abef93bcca03eec7fafe1b647ce1a83d9daf43ea4387f3d318771deee73231fafdcc5818ef0f9d0f83fe8cbc77373ee488492852a29e063ac25ffffe2ce4e9984ee8947ed2199de7e7226b5dd2d5ff93a76bbaa15bbaa37b7aa0477aa267fa45cbf49e3ebc264f2b34a7555aa375daa04dfa485b596f3b6bedd0a757e577b3f7bd2cfd99f6f3f325eb1cd057fa4687f49d7ebc225f5099ad6f504535cda8a1967cd6692950e7e8a5bc738e9db848954baea74d37b823779cb53fbb1377fa8afc4fbacbf2e2cec6f8ddb13b7717ee529f2b77ed6e5ec8dfba51fe9e36b28f7df7e01edd937b76bfdcb27bef3eb89517f273b74a8d5bcb1a6d8e63dff56e3dcb6fb84df7d16db9ed17f23bee5396cff1b8a8f2eb6ed7ed65f9cf6edf7d7945fec07d75dfb2f5b1fed943cef750e5bfbb1fae70e5cbfd7595abdd2c5b8f3987c6b52aef5dc81f85f49a3c3b66fdbe4ab93e4d7eed0c7cc4c77cc2a7fc93cff8fc15f90bbee42bbee61bbee53bbee7077ee4277ee65fbccceff9c32bf22b3ce7555ee375dee04dfec85bbccd3bfc8977798f3ff3fe0bf92f597ece0793fcd72cff8d0ff93bffc81a05972fe457ccfe7a961f35aaac51e7efd2267fb9faf1df0d2fe4e77f91dfe66d2119bfacf2c7d1787d92e14ff2f3c9fa14bf1cc9b19cc8a9fc943339970bb9fc435eaee45aae173ee4466e4de764ef4eeee45e1ee4519e202fcff24b96fff6bcb7476b292b329755597bfbdf7fbef91f1bb499a7</data>
+ </image>
+ <image name="image11">
+ <data format="XPM.GZ" length="5758">789c5d98596f24bb0d85dfe75718576f8380b7d7ea6a0479f0d2deddded7200fa4aaca6b7b6d2fed8bfcf74887a78c243e98c17c234a22456a29fff97be9e2606fe9f79fbfdee63abf8d4bf1465f977e57efb3d9e29ffffac75fbffee8f5967adda5de78b0d4fbe36fbffe389c2fc5a5e9d3639d219c26089d6116f80c3cce028fc05516783d736f90052ec1455666fd043759e0fbccfd220bf68760cd02af80ab2cf001b8c9022f671e74b2c003301cc0f877e07e16dafbe07116daafc1310b7c04aeb2c01f9987832c70032eb2c073f0280be34fc09a85f6025c658187998b6e16f80d8c05c86cb7e02a0bed18afa8b3d08ef947dd2cb4239ed1200bfc0e2eb3e0cf063866a13fe219d55960e4a3ec64a17f0fdccf423bc62b0759e01a8c1fd823ffe5380bf321ded2b260bf005759687f04d759e059e671a76c4ae4d3ae9db330fe17b8dbb2b59c8476e41be9f47a7b000fb3c027e0220bf6c7e0d10f6f82f103467d8d350bfd9fc0310bf323df3ac8ca2c013c2aac8ffcebba7316faaf823120fa7f83f103fb1bb06581e1bf5659e88f7ad13a0b8cfab46e16f83973ec64617c8c17350b8cfaaf7a59181ff585f2f2fd067faa711618fbb18a59e87f0e6e74dc453d44d46bddd181b32d3b67a1ff1ab89f85f5d9030f62eca23d6e8387a592af9db5eaf87970e89c8576d47b5d94e6eda172ae06be5e82f3a51ec5c2f78ba873d5edf87a215f75598d7cbd64e49c85f15fc1e332faf9651de7aaebf5246fe401dbbbe4b4c131fe36b9343f5fce9ddbf143242761be2db0964d07eb1bdd3f5573960eb972b6a9b38d38ff3a5969effe68f2cfed7be4423dbf976435f86b1e0f0a0af3a3fe6b1bf7e8cf06b9dfc1fac67572419e9047e435f298bc4a36f20ab9222f931bf2b7732a07e7057940fe220fc99fe492fc416ee77f27b7ebe9f9352bb83ecfe4767d8d5c3babaf97a572f5f62b726f807ad25d729ff68c2f72fdf5853c224772e91cba64fa17f6c8f42730bec8fa08be3faca23f219039bff5c93c6fb46d57f3fc33fe36dfe18d9c84feb8cfeb38e6fa8bc7178df9b703e758f87d28be5eb162feedc8f967bc437212d8e3ab527d79fb84cc7cda1399f5654a663ef582cc7ad21d32eb4997c9ac27f5fc566d3da991194fe890397fd825339ef041e6fca12147b290d31188f5f07c57693ffafa717ee37b48189f35e447e7545fce33729ffc401e92efc9dcff72471efbf926b76423df902bf235b9215fb43c427d08e36bcf4ba9c97d72451e922379e46c839615e79d0dc9a5df77ca78533dfa7de8e74dd5d647d8222761fffafc75aa473f2f2bf280ecf1d53674964bf2c8ef07bb20f37d6a3e5f2e283fcfa76465fb2b392aee47737fead61f29c8e907ed780fd74deb8fed920bf21ab9243f92395f7c2147b60772e5ace7e486f65e4f8d76d8be4de6fae837b94ffb2732fdd396b95e91fea47af77625d3df7045e6fac519d9d8be43a6fff1814cffc33bb966fb3d99f104cf6f638c27de91198f8cc93db6df92199fd03f6bd7ff92cc7884feb5f917ae97d17fdb27d37fd922d37fdb20d37fd924d37f63fe22fd17da47fa6f914cff659d4cff95fe47fa2f1332eb47583fb1cdcf2ab98da765d693ac90199f5664c623cbe4361ed64b6cf3e1fba1a9daf55f905bffbfc8f437dc90dbfdf7496efdff20b7f55f90c77cafb13edafda7ed7c66de7f4e667e74ab65f3f72ce34b078abf2f7be47ae8f73df35b35857f0f755af6f7bafa7dd4e4172cecb9dfea9e8f1f2ec8dcef81f598857a447ed36553faf79b9d90b5f0f36fe49ce2f5fb7fcdb9eefa7b515fc93d724deef33dd9230fc8fb64be37e5b4e5e8ef7971cec2fc780f37dd4afdfb41cfc8e94981f1be9cd3787efe9fb5ece3855b32df8f72d272f4f7ad9247fe7d24c72d7bbb1c904b3fefe5a8e5e8eb7d481e3b8717e71fffb7c94960ac7fd34bf1201f517ed8cffb96199f6e38b7fd839193d01fe76dd34ff791cfb743367f2fd98c9c9e50e05572e3ac6c6fc7d3293909e3fb7c83f47d80f8a292399f769d5b7b199293d0eef91eb61c16e42430cecba66859fae42430eee366d472382627617caf9ff2874fc849605fef7116d8eb49b3b01e3e9efdf00339098cf33e1d2f49609c4f69fb25653e9c4b1015932895d4d2c8b5dcc8addcc9bd3cc84c1ee5499ee5455e251cce69ff267379970ff9942f59c8b72ccb8aacca9a4c645d366453b6645b7664d7ed652f594f655f0ee4103a4a3a864e924ee54ccee5422ee54a900fe9a6b17bd24f1a50fdffd1500a194929e32058cf201f41ffcfe647c14284aa5007ff5ebd0e37e136b5dca53ff7e121ccc263d2537896517809afe12de935ccc37bf8807d8a327c25db05c6fb0ecb6125ac86b53009eb61236c86ada4cdb01d76c22eecf7c234ec8745d21d7a1c84c370148ec349380d67e13c5c4097e12af8f77957be430ff68b3c4be8874118a67f156114ca304e3ebda868fe0d85bf9f63fa74acdd3e2ba5fd5a6ff456eff45e1f82e94c67e9ef477dd267d8bfc8aabea6551bd2fe4de7faae1ffaa95f21e6ffcfd2857eeb32ec577455d7fecb7e927aaceb866ea6b8fba907d655b7745b7760bf2b13ddd369b6d714771a7ba2073ad5433d4a3ad693a4533dd373bd80fda55e6927b5777d0eed695f0799349d809a5ead4963130bbc5f2c7d9a5509a66e9f3e6b1abb96a1ddd8ad4eecceee931e6c668ff604fb677bb1d7e4ef54a7f666737bb70ffbb42f5bd8b72d27db95a47b5bb5359bc07edd366c5337f20cba615b616cdbe95ffb29c6132d7fec776cd7f6603fb57d3b086f7668477614dc7e967ceba728c7769c7c7948fd4eecd4ce607f6e17766957e973a96b3debdbc08656d8c84a1b4789f937431663acd2f3bbf1fd15afe34dbc8d77f13e3ec459b88a8ff149bfe3b39ec79714e55af2e43459bffeecc710dfe23cbec78ff819bfe2227ec7e5b81257e35a9cc4f5b81137e356dcc6fefdf7df7ffd07fa3a7226</data>
+ </image>
+ <image name="image12">
+ <data format="XPM.GZ" length="5118">789c5dd8598fe3c80d07f0f7f9148de1db20e0dab22d5908f2d0edbeeffb0af2404a564f1feed37d2ef2ddc322ffd5c966082ce6b74555b14aa5b2347ffc5a38dfdf59f8f5c78f97b9ccaf9b85e6b73c2ffc6a5f67b3cf7ffeeb1f7ffef859140b457fa1180d178a9f7ffbf1f360bed02cec3edc4f1368d740832a85fbcb2d29dcf7ee3685bb4a1e9629dc0fc9a35e8a6499ba8b14ee997b9cc2fde6ae53f8f58bc9a5fff1f675f73885fbd52d29dc6bee2685fb2eb9ea57bdcac7a73d7797c25d26d745ddaffb9edf735729bcfddc2d29dc8d5b53b835598a14c94ceeaa54acd799db3b708f93b548e1e3f5dd650a6fdf496e8a14de7ee0ee52b82f93db5e0acfff743729bcddef47db66ebb5bb93ba3f707b7fd39e0cc3ece34d874dd3f7fed4efdf74341678252c6dcfc7d7657739d63075e17628be1eecf39b564d59fa7e6009b7fd9eef27590da7f0eb5fdce3b6525f7f8ef1c7297cbc7d773d6e7ade9fcec26dbf1e7afe0b3c44fb3d3c9291f7bf068fd5e74bd3700acff7fb3f9571d78bf53a0c8b86b907b7688ff98856319ee07a15e4f7c3564fe43fc0b6417d7cf4df8a7a7d3a726b5d207f080f7abe9e3a804bb8802bb80fd7700f56f8126ee10bb883cfc376bbc367f0103e8547f0093c868fe13cfe119cd7ef39ac6558d0bf623d65179ec24b61db8eb11e7770318cfd83fe9a01f2af61acb734701526ac5f3386517f83fa6813463df406633f10fa6f510f118cf1f511ae24f633d6dfee6fdcefa7f054a6717ea0fe147efd6f775363fd793bacf9fec77c9aa61cc6f3a4e136dfff369cfba365d8c2dba3ded6f697b7cb08c6fd945318fb4b7660dc4f5984b19fe409c67e92df30f693447d6dde4f54c0980f1dc3189f3660cc875e618c4fe85f1a98613bc27c3d508f3d7fb17e8f701bcf273fc01d1ce7436bfb2b3c8307f01d3c826f613cef7c03d7719ef135ac30eab5fd14be823bf83cbbf2fdc1717eb6f97ce4293c805b7804377015d6a76c89f3f2191ec7ef8de0fedb7e8cfd19e7799bf707adc2167efdc43db5fd18e7e3123c84237faaa3305fc0157e1f6ee03ada257e0fd2868af37a1716b4e3fab689df4f8af37e9aebe112b63fde7fac67f75d0fc325fa1bc263f804c678ba073768df865bf80bee901ff576d243fb238cf511d463fb3bf27760d4270263bd14e3d97e8ff7813e8c7ae908c6fae916ac685f8751bf6ec2a89fe6f014ed1b30e643a857311f457f8af9700d17685f83313fbe84f3fadfc2980fa3de7cff19f529ea5785513fa33ecdeb5fc1a89f737da85fe2f9e91ad4cfa8afc9f703f7b741fdbc0aa37e99c0a89f5760ec1f5e86311fb981f37cf2f5d84fbc04e7fb83fdd7603ebc08e7f9607f35f97e60bddabcfe9f70aeff0346bd847adafcfcbdc3b9fe3718fb495fe01aef67af707efe3a5835aec7fe69f3f3f190adf17ebd0fdb89eef9053c1dc5ef3dd6bfed4a7fde65395bc2a827bd817afe195c44ff7400e379a70bd8c2e7e3eb693f36e3d2df17b58325be07741eb6f9c6fbc06d78da8ff74169e102ef872378009fc243781bc6fb249f64c7fb395d8653f8f8bebe5dbfb537461fef13b6570acf7f0f5b7f71fe9f66a3bf5b18ef8b7c9cddc4fbabc0557c8ff05176b4f33e3c8ef39e0fb39b58ef03b80ed36338d74f356ce1f3f1fdd415369f387fdfbf1ddf235b30e6271cced7530b5bf8f5be9fbb81fd1ec5f7600d6bbc2fc9316caf50ee01dc856916cefdd104b6f0fefdf9ea86f6feeff3d34f388fb712cef93c822dbc3df6cf289b3e600bb7bf1f7465360f600bb73ffff67109d3126ce1fdc7fa8dbffd015bb8fd3cb49f1f0bb79f9f767c5bf87cfcfdc08e43580e610b77ec07ff6074fbf3698f9f45f2c19c8985951b6e79ca1d5ff16fbee61bbee53b9ef13d3ff0233ff133d3c11cf92f3ce7577ee377fee04ffee2455ee2092ff30aaff21aaff3066ff2166f473eef58f62eeff13e1f781c5a1c791c5b9cf0299ff1395ff025fbfde0bef55df0c0628818fc25465c72c563ae897d3d89df48fe9a434a0dfed6d2d4a3a32bfaedf9d77443b7d672f79d3da37b7a48e3d0233dd1b3c513bdd09c5e3dff8d3fe8ddda3ebef33fe98b16698926b44c2bb46ab1426bb44e1b9ebf495bb44d1f163e02ddd10eedd29e799f4b3a401cd2111d7bfe097fd1a9e77fc4287466fd9f5b55177469f16871493dea53ecef010d6914f9b8a6a48ac696530bdb7c6716ad90489cefd2f0445a5bb5d177fe9e4c69c772673449ff3f856d9e2bf1f5916bb991dbffcd973b99c97dcafdef1ac8833cca93e73ff38abc44abcc3dff55dedc77b424eff261f12e9ff2258b9ebf241359a689acc418b22a6bb22e2b36d692656ec8a6c5866cc9b6ec78feaeecc9becd6b82fc0359a73dfbfbc0b30fe5c8e2508ee5444e3dff4ccee5c266374963c85c2ea5277d997bfea6e5a67f99399281e03c9752ec4dd9576e62ffddb755afed6fff9f5f2b2bf9f326aadad81e5956fba6b07b9ff2675ecfbb6cd867dda1c5a63d7c57eaeba9d77aa3b77aa733bdd7077dd4277dd6179debabbee9bb7ee8a77ee9a22ee94497e3f9d2155dd5355dd70dddd42d3ad26ddd912bdd952fddb3590ead922bcbdeff7e1e490ff4508ff4584ff454cff45c2ff4d23ecffa5ae840873ad2522b7f7efffdf71fff014e3ad5c6</data>
+ </image>
+ <image name="image13">
+ <data format="XPM.GZ" length="3534">789c9595db52dc480c86ef798aa9e88eda52c667bbb6f602c8011218ce04d8da0b796c33c01c60188ea97df76dfd6a9b6c05b2acffa4f0579235dd925afd7eb977bcb3d55b7ebf74b390c5f9b0371cc9bcb75cdd4e268f7ffef5c7f7a57761d873ff82c4fd79f7dbd23b1ef786bdc16c5a2bd0b503eae301df820315f80e1caa94650a8e54b07f03c72af009385381bf82f32efeb16727c41b834505fb2ab86c59269e9d60bf02d72af0817210aac00370a20233b850211ef61b880af66df05005fb025cab603f02372af09e32d281fdc80c8c07f64370a402ef82e376ff827c86990af67b70a3027f568e0215f80b1801c18fe05485787370ae82fd125ca86047be2251c1be06ae54e04fe04605ff1b6594d3ea85f871a942f39c82abf6f7b80faee32a463c0ec08d0af1d04f495f85785b601408fe21387211906f4e8c55e0141cabc019180fe26d80d336bf9c1babc031388f8731eacb85b10adf6f824505de514ebbf3c011386cf7472be0a43b1f336315f823585460f46f96f4abbe7dffc15885f8e8a7ace8cec7d45805c67eb261b71ee42f0f3bff21386dfb9716c62a7005ce5460014bf73d81bbf8f400ae54f83df4535e7776f4078e93edff029cabe08f7a1755e77f6eac029f816b15fcd1df1275fe0d1805811df994acb38f8c55b0e3bc49375f18fd2c5d3e19f348248a23f48f201f520681b7635ec8f3fe4f3d479e6b6315fc9fc0cffb433f89ce238bb70f6eba79187a4ecdbe8bfa94fdb61f18e7b92cda79c9e8afb2ece2e33c94cff1311f86a10e68ec07f5a9fa81b70bea51c541e319f9af929679621c16a1cd07e4b34ac3763ea13e55d631ea51e51d231f5511b6f9c33cab24cc43ab3fe665550779608cf95f3561125a3d715fd4fd76fe0afab70e83cac7433fd6515447d61fe8d73a6ee711979e83d8e607f65b275119d97cb2784967af3c87b15d7e587f9dba76b0f9d278760f18fbaf331d38e091e734b6798bfba4cedb7cf3b971ec04c6f9a9cbc83da81ffaa17eee97c0b3ef07c27c72c569ebb36bac03108c79d124ed7a04fb6f8ab0ed4fccc3a60cc47f8f79d60cbbf5af1b276582fc08f2dbd47a23e17bb337ddfa9e3cbb810dee7bcebd3d326ecf0fa59e4bcf63cfed7d2ac661e2edb6fea63d8f7c6cdcdd2f07c6ed7a79db582f3cf08ee72245fff286711665665ff55c66f6fdbde73ab37e5a3376ed6afdb0f0ec2e34f0dcb313f8c6b8e81796df2bcf7161eb9f79760b025f7b760f78eab92c4a3bff4c2c5cf2902baeb9e1331e399d3b5df0258f7f949d579e4233bec2df6b9ef30dde167cfb82ff1ddff3033ff213aff02aaff107fec89ff833aff3067f79c1ff2b6ff21678c0dbbcc3bbbc07dae7033e7cc1ff88bf798f011ff3099f729f03a790238e39e19433ce9d0a62bb5f48fcf7032a694815d54e0d9dd1086fe774e148df2e11fff9f70634a6094d69465774ed34a71b5ad0ad7bbba37b7aa0c79ffc9f68c579afd2358f9dd71a7da08ffa0efa449f7ff25fa70dfa425fbdc73d6dd296f93b1ed0f6cffeeeff0eed7aff3d17f3b2f3772b7c21fe3aed5bb69cfd800ee9a8f5eff2f9baff373aa693ffe1eff59a3f9d52df2978b37f489153fc46ff3d4a2875ca28775fecfdda9f0a6171b7329e5286ffe52f95d4d2c8998ce45c2ee452fd652c13a7e9abf9f9975ce42399394ddeec7f29574e3face8357f3a91b9ebce2d150772238b5ffbcb9803f5955bb9d5b32377deffefdf97fe01ef181ec6</data>
+ </image>
+ <image name="image14">
+ <data format="XPM.GZ" length="1442">789c75d4494fe3301c87e17b3f45d4dcd028c48e9744a339b05396b217c2680e8ee3500a2d10ca3a9aef3efeff52985153dc1ef2e86d1c3b96babc145c1cee074bcb9dc7a9995edbc00e4d1d2c954fe3f1dbcf5f3f7e77ba9c07fe2b65c0badf3add28b041ff6ee2e8fad25f873106710432ff012744c6198f33e23951c4cc35f500d45c34ec8325970d73a28ae9438c419198b8229e80859f8c137b441d0bc124f1191442324dbc038d2858491c8285b00c5bd800ad281966de21a642c61c530d4025538ea92ca83d15b104ad2c9a7a45ccb8621c0f7a0785e20d6fc04ce9046bbe072b651343744423954b2c71a5a14e12acea1a345a8b843826fa8756a220d6a04e63811d9d81269512e77508bad4366ff2946859c6146a0826a99158c62328b3446219b7a0ca84c4160ce832a570a04fc4526495c654fba0fce07a43c334d67c01fae768dcbb4d74d2d834251e83aa88533c7713cc0a9781bb6061b9c1a1bc11abb8d0195efb0be8cfd3e0c5ee81b2ccac204e4165ab023f5e6b585a8b5777346369b1c157d054cce17cb73e89353f80ce4a83a90ab02a93028b5c9d515b6cbf6ae8b8c5a144cd084d616cf439fe9530a4542e288e5265aeda65384bd7ad321ade20dd8ee74b34b9bba7f4503f8673c527baabaea64ff3259a3cdf87f5edcbeb5babf8f4ee56cceada7aabf8b4f15e6f6e6d87ad124d7a1b3bf5eede7ebb44fd83decee1d1f182e2dbc9f3e9d9605189a25eff7c70b1b0f8fb46838f924797ff8f5114cf4a9ee7f3b73525cfdb0925cf1724fc7bcd8daf4bfe7541eafef9def90b50383f80</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>helpAboutAction</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptHelpAbout</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>fileOpenAction</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptFileOpen</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>KKPdemo</sender>
+ <signal>initialize()</signal>
+ <receiver>ScriptInitialize</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>Action</sender>
+ <signal>activated()</signal>
+ <receiver>ScriptObject12</receiver>
+ <slot>execute()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/current/kpartpart.kmdr b/kommander/examples/current/kpartpart.kmdr
new file mode 100755
index 00000000..928ecdc6
--- /dev/null
+++ b/kommander/examples/current/kpartpart.kmdr
@@ -0,0 +1,171 @@
+<!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>502</width>
+ <height>412</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Form1</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>//createWidget("kpmessage", "LineEdit", "Form1")
+</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="useInternalParser">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>6</number>
+ </property>
+ <property name="spacing">
+ <number>4</number>
+ </property>
+ <widget class="TextBrowser" row="0" column="0">
+ <property name="name">
+ <cstring>TextBrowser1</cstring>
+ </property>
+ <property name="text">
+ <string>You can click the test button to insert text
+If you are loaded in the parent frame you can click the rocket icon on the toolbar or use the function menu to select "Talk to KPart".
+
+Any Kommander program can be run as a KPart. You need the KPart plugin to load KParts. Note that running Kommander programs as KParts is not without risks. For one thing you loose DCOP in the parent and the old parser ceases to work. Additionally since all widgets are accecssible from the parent and duplicate widget name can cause a Kommander lock up.
+
+Because of all this and the fact that the Actions on the unsupported MainWindow are incompatible it is impossible for the child to talk with the parent. On this dialog we use a timer on the parent polling the child for requests every 100 ms. It's a crude hack but it does yield acceptable behavior.
+
+This demo is intended to run both kpartwmframe.kmdr and kpartpart.kmdr. </string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout70</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>75</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton4</cstring>
+ </property>
+ <property name="text">
+ <string>Re&amp;quest Parent</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>if !widgetExists("kpmessage") then
+ createWidget("kpmessage", "LineEdit", "Form1")
+endif
+if _LOADED == true then
+ kpmessage.setText("You have mail")
+else
+ message_info("this only works when loaded as a KPart in it's parent window")
+endif
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Test &amp;Child</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>TextBrowser1.setText("This text was inserted by the KPart child cialog")</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject13</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>message_info("We just got a message from our parent frame!", "Parent called Child")</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject19</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>message_info("Request Granted")</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject93</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>_LOADED = true</string>
+ </stringlist>
+ </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>40</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/current/passvariables.kmdr b/kommander/examples/current/passvariables.kmdr
new file mode 100644
index 00000000..2d3b9e03
--- /dev/null
+++ b/kommander/examples/current/passvariables.kmdr
@@ -0,0 +1,416 @@
+<!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>553</width>
+ <height>325</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Variable passing demo with PHP</string>
+ </property>
+ <property name="icon">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>AboutDialog1.initialize("Variable passing demo", "", "0.1", "Copyright 2008")
+AboutDialog1.addAuthor("Eric Laffoon", "Designer", "eric@kdewebdev.org", "http://kittyhooch.com")
+AboutDialog1.setHomepage("http://kommander.kdewebdev.org")
+AboutDialog1.setBugAddress("eric@kdewebdev.org")
+AboutDialog1.setDescription("Demo of passing arguments to and from scripts,
+You can also pass an echo to stdout back from
+your script by calling your script with
+echo(ScriptObject.execute)")
+AboutDialog1.setLicense("GPL_V2")
+PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 1)
+if str_length(exec("ls -1 /usr/bin/php")) == 0 then
+ message_error("This dialog requires command line PHP installed as /usr/bin/php in order to show the external script functions with PHP. if it is installed elsewhere you could edit the PHP script sheebang in the dialog or create a symlink on your system.", "PHP not detected")
+endif</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="useInternalParser">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <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="Label" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Label8</cstring>
+ </property>
+ <property name="text">
+ <string>Value to pass back</string>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ExecButton3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Pass I&amp;nternally</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>ret = ScriptObject2.execute(LineEdit7.text, LineEdit1.text, LineEdit2.text)
+LineEdit6.setText(ret)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label" row="4" column="0">
+ <property name="name">
+ <cstring>Label9</cstring>
+ </property>
+ <property name="text">
+ <string>Set</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="Label" row="6" column="0">
+ <property name="name">
+ <cstring>Label6_2</cstring>
+ </property>
+ <property name="text">
+ <string>Pass back</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="3" column="4" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ExecButton72</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>P&amp;ass to PHP Script</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>// test for PHP
+pt = exec("php --version")
+if str_contains(pt, "Zend") then
+ php = ScriptObjectPHP.execute(LineEdit7.text,LineEdit1.text,LineEdit2.text)
+ LineEdit4.setText(php)
+else
+ message_error("It looks like PHP CLI is not installed and on your path")
+endif</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label" row="6" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Label6</cstring>
+ </property>
+ <property name="text">
+ <string>Pass back</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="Label" row="4" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Label5</cstring>
+ </property>
+ <property name="text">
+ <string>Set with @</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="Label" row="5" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Label37</cstring>
+ </property>
+ <property name="text">
+ <string>Return</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="4" column="5" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>LineEdit3</cstring>
+ </property>
+ </widget>
+ <widget class="Label" row="5" column="0">
+ <property name="name">
+ <cstring>Label37_2</cstring>
+ </property>
+ <property name="text">
+ <string>Return</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="5" column="5" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>LineEdit4</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="6" column="5" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>LineEdit5</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="5" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>LineEdit6</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="4" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>LineEdit8</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="6" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>LineEdit9</cstring>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="3" column="2">
+ <property name="name">
+ <cstring>ScriptObject2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>LineEdit8.setText("Kommander "+_VERSION)
+LineEdit9.setText(Self.Item(0))
+x = Self.Item(1)/Self.Item(2)
+return(x)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject" row="3" column="6">
+ <property name="name">
+ <cstring>ScriptObjectPHP</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#!/usr/bin/php
+&lt;?php
+@LineEdit3.setText(Kommander @global(VERSION))
+@LineEdit5.setText(@Self.Item(0))
+echo round(@Self.Item(1)/@Self.Item(2),5)
+?&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>Label12</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Numbers to pass to scripts</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="2" column="2" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>LineEdit7</cstring>
+ </property>
+ <property name="text">
+ <string>Pass back</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>right click on dialog for about dialog</string>
+ </property>
+ </widget>
+ <spacer row="3" 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>108</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="7">
+ <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>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>71</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="Label">
+ <property name="name">
+ <cstring>Label35</cstring>
+ </property>
+ <property name="text">
+ <string>op 1</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>22</string>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>Label36</cstring>
+ </property>
+ <property name="text">
+ <string>/ op 2</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>7</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>71</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="AboutDialog" row="0" column="5">
+ <property name="name">
+ <cstring>AboutDialog1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="PopupMenu" row="0" column="4">
+ <property name="name">
+ <cstring>PopupMenu1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>AboutDialog1.execute</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="6350">789ca598d94f1fc911c7dff7af40db6faba877a667baa747511e8c01e3030c06cc11e5a1aa7a86cbdc603051fef734f5ad9fed5d2952a4f521fba3beeaae1a7eff6de9606b63e9b7df7fb9bba7fb53599213ba5dfaad3c5c5c7cfbe7bffef1ef5f7e0d61a9fee9425e0abffeed975fb7ef976469f3ea727a013f56708dfe7a61597069b372068729f6cabbe0dcc8acbc622c4599c1a10dad72f1ca5d1370bfc77d5dcb01e70770176252de51eebb1c21df96720c6d87f51edcd3202fec5e29a7c01dee3b541e43dfa9b2ee4699dbd88e2a0f2997861a5d97040ed441dfa83c776d8ff5a3176e9b466cff6be5b6ded7aabe07ca5d37f6f4c2f400ee1bc84f1f95fb2859d7654f39a6766495c729a7b66d3a5dc77d431fa2ca2b9f9573ecb2ae975999dafa80ae5f1a0f0df6ef83fb79507bf927701e65d0f39372b507cef3837102fb2be3a1d1fd1efb4b65f87f193c3454f4fcaaf294a3e8ba6b5e3834ed88f3a528b72d352a0fef1b33e4f5df9443655d776aefd02d582e94fb568c3be3b9813ddf2a577b6695df6d1bf3a8f662514eed64fa7c521e6a38ea79867c39b48dfa9f8e95c705fb1f0c79d55f8142d7a8feee1a9cbaacfafb013c24d8c7df29f398912fee8db2c431e17d562ea137ff41be52eda9f2ca15784c05f10e7da7ba5fe5e3afc6b1d1789333f0200cff6e2acf21415f4fc643837cd5f8ace99971de6bfe756d65bc770aee52d0f8e77be550d7555efe0c4e09f1e95ae52e8c382fe7e0ae4680aeef832345e4eb2a788cd08f351fbb18b8d1fc70deb858bee1be983bc67b9aef55ba453c6d1b4b8b7a73094e7d823d37c15944f575b7ca43985ae4f7163813d6f98b71417c7bd82b6766c8ff9d8bbe479a9fdd1826e8ef173c9bfc199c02e4f167e09c08f1fb4e9916e749c0718c6a0f817e9ce70279b5fe75656c0bce6bfdeea6b1401e79569ec750903fa7c65dd1f749fdd7b75d84bd68cf3899bc1d38ce51f7b3c64f1f6a81837f37c0fdd4e9fb45e3b9efbb01f6a457c6638bf7efc07966c4eb9a721c09fef7e0347403de3b048f52501fd51ffdd091f94beb479fc75c50bfb5fef463c7886f5f8ca5457d5a07f78dc973021e479ca76cccd6dfde1897a2f92cd7df19f9f200e66e02639d3a8b57ff15cc11eb1c94b9ea83fc1fc1d4a27ffa4730e709f9a9fda697b117f873dd7886bd44fb5b5f16e759e3a79faa01105ff7604eb8af683cf573df427fd27c8c4ddfc05ea2fe8b6dead0cfbcde17bb61863fc4836998d05fb53ebdb4e309f5f69371467cb1d6c318fb8c7940b41fc594ad3e8bda230ebdc59fc3f9816982fce7606967f85bf329e6aa2fcedf1a0f93dadbad19cf13f255e3258e6326f81ffa513fb6e89fc7600a45f38b5be3cee23119cf13ea9dc67be47a5edff747e034637e21cdafda0c09eb0c798426d88b36c1dc9a7c9067ea6dde7207e03a5ea01fdc1bd714d3f31a4f351bfb80fe7e011ed3a8f672cf606a102facf1949a7ec67d740fe61efef26aff3a8d7419f553e33d853a70a1bf6b7ca5eaff84fa7c09e63a10eafe689c2dbe351f534fc4e87f9b6066cb8ff7c613e291d4be29d6fc80fe97c684fda4fd28a52a0fe6870b70951ff1a5f99e061a11ffe2c0dfe5db302e33fa81ceaf29c7087bf30c1e53863c03b8ca83fa087dc6d8e37dbf0c669970df0765926646bdd478484c05eb0c7b72f537e261c738435fdf8317e77d671c26d85ffb7d7a891f5d27e823d59ee8075a8f53a9fae2fd2be31efa5334a609fd17f217e9cc7eda4fd2944a07be06d7fbd0efcf8c05e7a9372e789fb51ea5991bab072acfd04446fcc83b6369e1ff67e3a9457e9d825313109f5bc66d40fdd1fe31b4291beb7b43a8e7f57eeac0d2c05e148c5bc48fcbc619f6259d67872ece013c82ebf8827ab307ce92d45fa4fd63e853ead01fb51e0fb1be8f7e7108ce39a1be607fa49170ff07f0c29feec27898314f6bbd1952b4fc746aef614813be47dc399832a17edc81a5b7fcb9361e511f59fd33e4dabe21df93710c88e7b7e0fa3ee4d37a338ca9833dbc185bbde1c9389abd9e8d5340fdb835ce01f322de1f47ca8807cdf781d380fa4f2b0b0e88cf2fe03aeec1deb65fac5f11e247aaffd01fb4df0ea59e473eed826b3d417d867da6349a7c37c6847ac94fc605eb04f9a76a3fdc8ff89917e769d7d8ced3155826f88f35bf7293d8d64f8ca780786fc143d3a17e1b2fdea31b63863f44e325b7f53eb59fc77dede2bc4ce04c09f6d57a9043ae21a8f2ec81ab3de0ff75b0c80c7be1fe2e31fce1ee8d05f9e4eec0436bf1cee05a2f50ff347e725fc73bc4db7be301f2b947b044f467a7f37dfd9a317b91379e218f837e491af45fa7f3681eaaff11af3a0fe43c04c4179f82c5fa0d69bdafd3fae23eed8f99eb38827eb40c9638213ebf804b67fb35de6b3a0c01f543f3af0e2f09f586b51ee56960e4a3877c53e94d9fcbef8cefd7c138ce9897609f3a3d05f8e7192cd6df58e51fdb41ccde6b6059f40fad7f6390d1ea19f6f7b9ef313fbc06978cf748eb6ffd5a0ce66f9d6fea746cf313a93feab8dbf69837b57fd66c8df6f31331ce3df245fd33723d8ff96ad378b07eba62cc33ea95c6d72839a19ed2b231c11f74042ec9eedb3266c8ef57bf33ecadf5b54ebb56df48e38b9a2c3de637adb7d48e8dfdfca50117abaf7edf58709f68fda0900bf4753be0ba8efea7f580fa3ce1e73f746e3cf78897042ec5f455fd292e5834fe285579b05ffb130d63077fc9a371847d49e7833abd14bcef3e1acf33fa81e63351b507f24feb35f1d4d8bafabf7eac36789f35bfa88cf58341d7b57ed15426bb7f024f2dce93f6a33add2e58e781fa315d2750dd1fc153b0f7745eaa5f3b61c63ca1f5f4659a34d678abd3d382757eaa5f1fc6dbf7ffffefbfb6df3b4ffa2f7bf1c54ff57fb33ffe5ffbfdb13ff1a7fecc9ffb2ffec25ffa2b7fed6ffcadbff3f7fec17ff58ffee90ffbbff967ffca2ffbd77ec5affa35ffc6affbb7fe9d7fef3ff80dbfe93ffaadc57ebfed3ff91dbfebf7fc67bfef0ffca13ff28d6f7df09def7df4c90f3efb11fb9d77ce916327aeb8c9cdeed89db85377e6cedd1777e12edd95bb76377e5cc8ef6edd9dbb770feeab7b744fee5bfdfbec5eb965f7daadb855b7e6deb875f7f6677ddd3bf7de7d701b6eb3defed16db96df7c9edb85db7e73ebb7d77e00eddd18ffdae71ad0bae73bd8b2eb9c1e55a1e3cd5982426a15207cb998e7feca7133aa5333aa72f7441977445d77443b77447f7f4405fe9919ee81b3dd3abeffb97e935add02aadd11b5aa7b7f48eded307daa04dfa485bb44d9f68877669effbfecfb44f07744847d4504b813aea2952a297196964cf8e8999e587beb5384d3cf3319ff0299ff1397fe10bbee42bbee61bbee53bbee7871ff2f3577ee427fec6cffc8a97f935aff02aaff11b5ee7b7fc8edff307dee0cd9ff67fe42ddee64fbcc3bbbcc79f799f0ff8908fea44d372e08e7bae9f873fdb9f07ae9fbfe2c509098b4891496639961339953339972f72f1f37eb9942bb9961bb9953bb99707f92a8ff224dfe4595ed513cbf2fa8ff12c2bb22a6bf246d6e52d277927efe5836cc8a67c942dd9964fb2f3a7fdbbb2279f655f0ee4508ea491568274527bb8241924cbf8e77cf1a31f8b2faed40c2b5c84e652eaffa632ffa5fcfdcfdf7ff92f64b3cec5</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>Form1</sender>
+ <signal>contextMenuRequested(int,int)</signal>
+ <receiver>PopupMenu1</receiver>
+ <slot>popup(int,int)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/current/tableselect.kmdr b/kommander/examples/current/tableselect.kmdr
new file mode 100755
index 00000000..09dd6cd8
--- /dev/null
+++ b/kommander/examples/current/tableselect.kmdr
@@ -0,0 +1,502 @@
+<!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>838</width>
+ <height>561</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Table new feature demo</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>for i = 0 to 6 do
+ for j = 0 to 6 do
+ Table1.setCellText(i, j, str_upper(i) + str_lower(j))
+ end
+end
+PopupMenu1.insertMenuItem("Copy", "ExecButton85", 1)
+PopupMenu1.insertMenuItem("Paste", "ExecButton87", 2)
+PopupMenu1.insertMenuItem("About", "PopupMenu1", 3)
+
+AboutDialog9.initialize("Table Selection Demo", "help.png", "0.1", "(c) 2008")
+AboutDialog9.setDescription("This demonstrated using the new multi-select ability
+of the table. The spinboxes offer how it might have
+been done before. Now block copy and paste can be done.")
+AboutDialog9.addAuthor("Eric Laffoon", "Stop sleeping", "eric@kdewebdev.org", "http://kittyhooch.com")
+AboutDialog9.addAuthor("Andras Mantia", "Make Eric stop asking for it to make coffee", "amantia@kdewebdev.org", "http://kdewebdev.org")
+AboutDialog9.setLicense("GPL_V2")
+AboutDialog9.setBugAddress("eric@kdewebdev.org")</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="useInternalParser">
+ <bool>true</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="QLayoutWidget" row="1" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout2</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="3">
+ <property name="name">
+ <cstring>SpinBoxInt4</cstring>
+ </property>
+ <property name="maxValue">
+ <number>6</number>
+ </property>
+ </widget>
+ <widget class="Label" row="0" column="2">
+ <property name="name">
+ <cstring>Label4</cstring>
+ </property>
+ <property name="text">
+ <string>End row:</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="0" column="1">
+ <property name="name">
+ <cstring>SpinBoxInt3</cstring>
+ </property>
+ <property name="maxValue">
+ <number>6</number>
+ </property>
+ </widget>
+ <widget class="Label" row="0" column="0">
+ <property name="name">
+ <cstring>Label3</cstring>
+ </property>
+ <property name="text">
+ <string>End col:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <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="Label" row="0" column="2">
+ <property name="name">
+ <cstring>Label2</cstring>
+ </property>
+ <property name="text">
+ <string>Start row:</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="0" column="3">
+ <property name="name">
+ <cstring>SpinBoxInt2</cstring>
+ </property>
+ <property name="maxValue">
+ <number>6</number>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="0" column="1">
+ <property name="name">
+ <cstring>SpinBoxInt1</cstring>
+ </property>
+ <property name="maxValue">
+ <number>6</number>
+ </property>
+ </widget>
+ <widget class="Label" row="0" column="0">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>Start col:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="ScriptObject" row="1" column="2">
+ <property name="name">
+ <cstring>ScriptObject88</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>selection = Table1.selection
+topRow = str_section(selection, ",", 0)
+leftCol = str_section(selection, ",", 1)
+bottomRow = str_section(selection, ",", 2)
+rightCol = str_section(selection, ",", 3)
+result = 0
+for i = topRow to bottomRow do
+ for j = leftCol to rightCol do
+ result = result + str_todouble(Table1.cellText(i, j))
+ end
+end
+StatusBar7.setText("Selection total: "+result)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="TextBrowser" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>TextBrowser1</cstring>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="3" column="0">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Get range</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>TextBrowser1.clear
+for i = SpinBoxInt2.text to SpinBoxInt4.text do
+ for j = SpinBoxInt1.text to SpinBoxInt3.text do
+ result = result + "Cell value(" + i + ", " + j +") = " +Table1.cellText(i, j) + "\n"
+ end
+end
+TextBrowser1.setText(result)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="text">
+ <string>Get range &amp;from selection</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>selection = Table1.selection
+topRow = str_section(selection, ",", 0)
+leftCol = str_section(selection, ",", 1)
+bottomRow = str_section(selection, ",", 2)
+rightCol = str_section(selection, ",", 3)
+TextBrowser1.clear
+for i = topRow to bottomRow do
+ for j = leftCol to rightCol do
+ result = result + "Cell value(" + i + ", " + j +") = " +Table1.cellText(i, j) + "\n"
+ end
+end
+TextBrowser1.setText(result)
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="StatusBar" row="4" column="0" rowspan="1" colspan="7">
+ <property name="name">
+ <cstring>StatusBar7</cstring>
+ </property>
+ </widget>
+ <widget class="Table" row="0" column="0" rowspan="1" colspan="7">
+ <column>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>2</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>3</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>4</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>5</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>6</string>
+ </property>
+ </column>
+ <row>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>2</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>3</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>4</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>5</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>6</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>7</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>8</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>9</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>10</string>
+ </property>
+ </row>
+ <property name="name">
+ <cstring>Table1</cstring>
+ </property>
+ <property name="numRows">
+ <number>11</number>
+ </property>
+ <property name="numCols">
+ <number>7</number>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="1" column="5">
+ <property name="name">
+ <cstring>ExecButton85</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>//_CPrange = rows cols
+//_CPdata = a[0] = R0C0 - R0Cx for each row
+range = Table1.selection
+startrow = str_section(range, ",", 0)
+startcol = str_section(range, ",", 1)
+endrow = str_section(range, ",", 2)
+endcol = str_section(range, ",", 3)
+
+array_clear("_CPdata")
+_CPrange[0] = str_toint(endrow)-str_toint(startrow)
+_CPrange[1] = str_toint(endcol)-str_toint(startcol)
+//debug("range size: "+_CPrange[0]+" - "+_CPrange[1])
+c = 0
+for i=startrow to endrow do
+ row = ""
+ for k = startcol to endcol do
+ if k &gt; startcol then
+ row = row + "\t"
+ endif
+ row = row + Table1.cellText(i, k)
+ end
+ _CPdata[c] = row
+ c = c + 1
+ //debug("i="+i+" k="+k+" c="+c+" row="+row)
+end
+//debug("end copy")
+</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>copy range</string>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="1" column="6">
+ <property name="name">
+ <cstring>ExecButton87</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>//_CPrange = "rows cols"
+//_CPdata = a[0] = R0C0 - R0Cx for each row
+range = Table1.selection
+startrow = str_section(range, ",", 0)
+startcol = str_section(range, ",", 1)
+endrow = str_section(range, ",", 2)
+endcol = str_section(range, ",", 3)
+
+if startrow == endrow &amp;&amp; startcol == endcol then
+ endrow = str_toint(startrow) + str_toint(_CPrange[0])
+ endcol = str_toint(startcol) + str_toint(_CPrange[1])
+endif
+//debug("endrow="+endrow+" endcol="+endcol)
+c = 0
+r = 0
+for i=startrow to endrow do
+ //debug(i+"-"+_CPdata[c])
+ for k = startcol to endcol do
+ if _CPrange[0] == 0 &amp;&amp; _CPrange[1] == 0 then
+ val = _CPdata[0]
+ else
+ val = str_section(_CPdata[c], "\t", r)
+ endif
+ Table1.setCellText(i, k, val)
+ r = r + 1
+ //debug("r="+r)
+ end
+ c = c + 1
+ r = 0
+end
+//debug("end paste")
+</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>paste range</string>
+ </property>
+ </widget>
+ <widget class="PopupMenu" row="3" column="4">
+ <property name="name">
+ <cstring>PopupMenu1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>AboutDialog9.execute</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="AboutDialog" row="3" column="3">
+ <property name="name">
+ <cstring>AboutDialog9</cstring>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="1202">789c6dd24b4fc2401405e03dbfa2a13b62005b041be3c2172a46e3d2c4b89867799487501030fe77ef3d9d2134740e0bbe9cd09c696835828ff7d7a0d1aaad72918f54a086621934f47a3add7d7e5dffd6ea5114d0274e82f3fa59adde0c54f0369f19fe2ee87b28628a65ce98ca28a3bbcc1553b72997cc2518510433043b14c57c00bb147004f6289a790f263a31d83005a596059f0e8c99dfa0d1c674988fa0d5d65c30fb4cd3a660e4331851307203c6948439003b146c7e01bb148cdc8297143003130a36af4141c1bbba012505efca80f4b26c9bb90769b4c58d2c48c746cc05d3b629b8d1183ca7e0463b30a2e0461330a6f49873b043c10573f08282f616ec52d06ab04791cc1f30a180435050705f054a0aee7b072a0aee9b8286c394200efe45a13ba279748a464aa9b4b1a5ead0a4436bc391a86ad4d80a3a55cdc466d3594523d3f9e27bb9aa6c725bda78b46dbd296df44dfab3c8b6a58dbe51bbc5fea6b4d135e9ed646cf7a58daeb9cb7d73d8e81a9d4fe8717ee3fd437868f2f9cefd8637f61f9f7c93e6fe69d8b879eebb46b8e3376e071bd7f8e337662fa74db171bd1d9c34c5c6aaa6d8989d366ee3e96fc4d169d6ffae6aff9c383860</data>
+ </image>
+ <image name="image1">
+ <data format="XPM.GZ" length="2942">789c75964953dc481085effc8a0ee78d9848b754da2a26e680590c66c766194fcca1548b019bc5d080c131ff7db2f3154d771bf37cf9a4575999a527b5df2e0e4ef6b6078b6f176e476e74e607fed4dd0c16c3ddc5c5e33ffffef573e14d590ee45f51d483f2cd1f0b6ff647033fd8b9ba8c63a023016afbca9695f2c709d763e6a41cda605be55e39b6d176ca4b63eeaace7443e527e55aae14ca4e59fe1c98946d6733df2bbbaee950ff56b9efda0ef52f33f74e9be7af1346bfc763b6c3ba29757fda532e6a5b1ae5adcc0ef3d09a72d914a5557eca5c955ef9bbb269ea12e77396b93598af53ae9acea09f42b96e9cd17e382ab7b6755a8fbdb20cec82f295b26d6383f9ce955d9b1aed87d1afb7be6f94ff560e6d61c0fa7c5cdb3a83f5db63ee8bce985e7943b9ef82c17ee3874dbef25540ffebca8d1d1af4b792b9a9705fcfc777deb449b95596868253be56f69d2dc1cb605b19f08fcc2dead329d8fba0fdd117e5e863407f9b630e4391ee475a3f94a18ce8e744d90413352fa4e717ea50479cb7d60b8d2d4accdf284b6023f2abfb076917f7e9111cba88f3d4e71bac35f9bee63db8e0a2e691749ed0873eea79d383b20f3e223f9f9463e70be46d151c62443dcd771c8a701e3a6f2c4498ff4ed988506f57b912217f87cab52d0accbf0216e1f9d4ca4d6c12f2bfaf2cf92b500ff5e585c57dd6fea5dda6417ebf4f18fd7e00c72e613fcd57b436e0fd62d4b7d1265d4f9ab7e8a24b98ffbd72ef4c897c1e80639ff0bebe53f6ce96e8ff181c7dbeafdf9318fa26e7fd021c439e4ff31cc7dbe1f9dc82fb9c3f8ae01813def71be5e4db0a791982634a5a9fb47e1af6b541febe657615e65f078bb09f7e7f52e1e595523ecf1c2b3ccf0a2c425ef47b99cabeafb09fcb1c2ad423b02f2af4cf99fb0afd04b008df07ab6c4255e3bc2ec122dc2f95abe06abcdf37e0683ae461072cc2fb8a796b11bebf7b13c6facfca4d480df65b068b30afe63f75b16ee03f028b34bf8cfd6cec5b9cff2e58847c6b3e9213210f9abfd4a7618b7a9affe445b8aff94a21a616f557c1493ec8ca2673c87ecd9b3c6e8bf9f931b3ef90779f39663fce5bfff063f92ca689dccbd5694dfbb967cf212b72fa9d9fbff0299ff1397f15dfb7ac0bbee42bb97afa8aff9abff30ddff288efa634e27bb9fac0d7bff87ff0a3e8491cb35a92abef78f917ff0aaf8ad664c5acd6e4ea7b5effc5bfc11fe6b439a7ad19ff36efcc69339fd22eeff13e1fbcacc0ef1d7f9ad3b3ff908ff858fd275881df4bfe3ca717ff2e0fc5bf05657fc1e59c9efd46fc95f86b6eb89df83bb663490c881cf5d43ffbc9f321058a94e80b9d3efbe98ccee92b7da38b674dea4b4774c9077445d79819ffffa01bbaa5d18be097ea723e7447f7f4403fe871e27fa2257a37adb15fdc869629724d2bb262951e26fe357a3fabdccf2ead4bef1bf441566cd2fdc4bf45dbb352bfa11d391b394dda903d76a7fc7bb43f2bede74026cd7e99417698f83fd2273a9c96d6df1bfb734733fefd111dd1f1b4b4fea59cfcbad43fd67e66fcf312bf9cfbeffa79c5bff5bac4ffdf9f0bff0341cdbcc7</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>Table1</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>ScriptObject88</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>Table1</sender>
+ <signal>contextMenuRequested(int,int)</signal>
+ <receiver>PopupMenu1</receiver>
+ <slot>popup(int,int)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/Makefile.am b/kommander/examples/old/Makefile.am
new file mode 100644
index 00000000..4708d071
--- /dev/null
+++ b/kommander/examples/old/Makefile.am
@@ -0,0 +1,7 @@
+execkmdrdir = ${kde_datadir}/kmdr-editor/editor/old
+
+execkmdr_SCRIPTS = checkmail.kmdr execprogram.kmdr\
+ form1.kmdr form3.kmdr form5.kmdr populate.kmdr selectedwidgettext.kmdr simplelist.kmdr tidy.kmdr\
+ wizard.kmdr ex1.kmdr firstform.kmdr.kmdr form2.kmdr form4.kmdr newfile.kmdr resize.kmdr settings.kmdr \
+ tar.kmdr widgetgenerator.kmdr
+ \ No newline at end of file
diff --git a/kommander/examples/old/checkmail.kmdr b/kommander/examples/old/checkmail.kmdr
new file mode 100644
index 00000000..d4fda432
--- /dev/null
+++ b/kommander/examples/old/checkmail.kmdr
@@ -0,0 +1,44 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>mail</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>mail</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>155</width>
+ <height>47</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Mail Checker</string>
+ </property>
+ <property name="useInternalParser">
+ <bool>false</bool>
+ </property>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>133</width>
+ <height>29</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Check &amp;Mail</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@dcop("kmail", "KMailIface", "checkMail()", "")</string>
+ </stringlist>
+ </property>
+ </widget>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/ex1.kmdr b/kommander/examples/old/ex1.kmdr
new file mode 100644
index 00000000..a916ee22
--- /dev/null
+++ b/kommander/examples/old/ex1.kmdr
@@ -0,0 +1,105 @@
+<!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>169</width>
+ <height>168</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Sentence Generator</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="GroupBox">
+ <property name="name">
+ <cstring>sentenceGen</cstring>
+ </property>
+ <property name="title">
+ <string>Words</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@lineEditOne@lineEditTwo@lineEditThree@lineEditFour@lineEditFive</string>
+ </stringlist>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>lineEditOne</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>lineEditTwo</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>lineEditThree</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>lineEditFour</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>lineEditFive</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/execprogram.kmdr b/kommander/examples/old/execprogram.kmdr
new file mode 100644
index 00000000..1149a3e2
--- /dev/null
+++ b/kommander/examples/old/execprogram.kmdr
@@ -0,0 +1,104 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Form2</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>243</width>
+ <height>79</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Program Executor</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>FileSelector3</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <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>
+ <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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Run</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@FileSelector3</string>
+ </stringlist>
+ </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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/firstform.kmdr.kmdr b/kommander/examples/old/firstform.kmdr.kmdr
new file mode 100644
index 00000000..68993392
--- /dev/null
+++ b/kommander/examples/old/firstform.kmdr.kmdr
@@ -0,0 +1,88 @@
+<!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>412</width>
+ <height>161</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Text Editor</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TextEdit">
+ <property name="name">
+ <cstring>textEdit</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <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="FileSelector">
+ <property name="name">
+ <cstring>fileChooser</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>saveButton</cstring>
+ </property>
+ <property name="text">
+ <string>Save</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo '@textEdit' &gt; @fileChooser</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>closeButton</cstring>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/form1.kmdr b/kommander/examples/old/form1.kmdr
new file mode 100644
index 00000000..e44b1e14
--- /dev/null
+++ b/kommander/examples/old/form1.kmdr
@@ -0,0 +1,96 @@
+<!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>124</width>
+ <height>130</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Program Run Select</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="ButtonGroup">
+ <property name="name">
+ <cstring>programButtonGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Programs</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton2_2</cstring>
+ </property>
+ <property name="text">
+ <string>gvim</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>gvim</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton1</cstring>
+ </property>
+ <property name="text">
+ <string>gimp</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>gimp</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Start</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@programButtonGroup</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/form2.kmdr b/kommander/examples/old/form2.kmdr
new file mode 100644
index 00000000..060fda56
--- /dev/null
+++ b/kommander/examples/old/form2.kmdr
@@ -0,0 +1,118 @@
+<!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>335</width>
+ <height>165</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Form1</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout3</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="GroupBox">
+ <property name="name">
+ <cstring>GroupBox2</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>programBox</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Run</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@GroupBox2</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>
+ </vbox>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/form3.kmdr b/kommander/examples/old/form3.kmdr
new file mode 100644
index 00000000..2b1ffbb2
--- /dev/null
+++ b/kommander/examples/old/form3.kmdr
@@ -0,0 +1,62 @@
+<!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>185</width>
+ <height>91</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Form1</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox1</cstring>
+ </property>
+ <property name="text">
+ <string>Check me</string>
+ </property>
+ <property name="tristate">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>unchecked</string>
+ <string>semichecked</string>
+ <string>checked</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Run</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>gvim @CheckBox1</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/form4.kmdr b/kommander/examples/old/form4.kmdr
new file mode 100644
index 00000000..831c2878
--- /dev/null
+++ b/kommander/examples/old/form4.kmdr
@@ -0,0 +1,88 @@
+<!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>369</width>
+ <height>318</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Form1</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <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="TextEdit" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextEdit1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="1" column="0">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Run</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@LineEdit1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>TextEdit1</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>LineEdit1</receiver>
+ <slot>setWidgetText(const QString&amp;)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/form5.kmdr b/kommander/examples/old/form5.kmdr
new file mode 100644
index 00000000..7efeafda
--- /dev/null
+++ b/kommander/examples/old/form5.kmdr
@@ -0,0 +1,346 @@
+<!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>423</width>
+ <height>269</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Echo Demo</string>
+ </property>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>usetext</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>120</x>
+ <y>120</y>
+ <width>281</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>du -h</string>
+ <comment>Test</comment>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1_3</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>230</x>
+ <y>170</y>
+ <width>90</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Echo+Exec</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo @usetext; @usetext</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="WriteStdout" stdset="0">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>121</y>
+ <width>101</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Enter command:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>FileSelector1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>401</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1_2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>120</x>
+ <y>170</y>
+ <width>90</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Exec</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@usetext</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="WriteStdout" stdset="0">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton7</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>340</x>
+ <y>170</y>
+ <width>70</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>ls -l</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>ls -l</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="WriteStdout" stdset="0">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>7</y>
+ <width>231</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Select a file:</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>170</y>
+ <width>90</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Echo</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo @usetext</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="WriteStdout" stdset="0">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton7_2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>70</y>
+ <width>91</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Your File</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo You chose @FileSelector1</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>340</x>
+ <y>210</y>
+ <width>70</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo "Thanks for testing"</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Try "What's this" on me!</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Like you need someone to tell you what this is?
+Wow that is so like lame man!
+
+Ha ha. We got it all with Kommander!</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton5</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>230</x>
+ <y>210</y>
+ <width>91</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>test</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo "Thanks for testing"</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="WriteStdout" stdset="0">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton9</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>210</y>
+ <width>91</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Count Files</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo filecount: `ls | wc -l`</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton9_2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>120</x>
+ <y>210</y>
+ <width>91</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Change Str</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo "ls | wc -l"</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>false</bool>
+ </property>
+ </widget>
+</widget>
+<connections>
+ <connection>
+ <sender>ExecButton9</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>usetext</receiver>
+ <slot>setWidgetText(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>ExecButton9_2</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>usetext</receiver>
+ <slot>setText(const QString&amp;)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/newfile.kmdr b/kommander/examples/old/newfile.kmdr
new file mode 100644
index 00000000..f02ca8e8
--- /dev/null
+++ b/kommander/examples/old/newfile.kmdr
@@ -0,0 +1,934 @@
+<!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>425</width>
+ <height>518</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Quick Start</string>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>140</y>
+ <width>40</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>21</x>
+ <y>5</y>
+ <width>410</width>
+ <height>36</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Helvetica</family>
+ <pointsize>14</pointsize>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>HTML 4.01 Transitional - Quick Start</string>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBCVS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>60</y>
+ <width>171</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>CVS tag in comment</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;!-- $Id$ --&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBHTML</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>80</y>
+ <width>131</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>HTML tag</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;html&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LEBasedir</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>170</x>
+ <y>120</y>
+ <width>231</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBDTD</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>40</y>
+ <width>161</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Show DTD</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBStyleArea</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>260</y>
+ <width>131</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Style area</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string> &lt;style&gt;
+
+ &lt;/style&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBMetaChar</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>200</y>
+ <width>140</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Meta character set:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string> &lt;meta http-equiv="Content-Type" content="text/html; charset=@ComboMetachar"&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBStyle</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>240</y>
+ <width>140</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Linked style sheet:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string> &lt;link rel="stylesheet" type="text/css" href="@LEStyle"&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LEMetaAuthor</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>180</y>
+ <width>220</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LEMetaKeywords</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>220</y>
+ <width>220</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>limit to 8, seperate with commas</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LEStyle</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>240</y>
+ <width>220</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <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>utf8</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>utf16</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ComboMetachar</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>200</y>
+ <width>221</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBMetaKeywords</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>220</y>
+ <width>130</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Meta keywords:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string> &lt;meta name="KEYWORDS" content="@LEMetaKeywords"&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBMetaAuthor</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>180</y>
+ <width>130</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Meta author:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string> &lt;meta name="AUTHOR" content="@LEMetaAuthor"&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBBasedir</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>120</y>
+ <width>120</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Base directory:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string> &lt;base href="@LEBasedir"&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBHead</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>100</y>
+ <width>130</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Head area</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;head&gt;
+@CBBasedir
+@LETitle
+@CBMetaQuanta
+@CBMetaAuthor
+@CBMetaChar
+@CBMetaKeywords
+@CBStyle
+@CBStyleArea
+@CBJavascript</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LETitle</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>90</x>
+ <y>140</y>
+ <width>311</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string> &lt;title&gt;@widgetText&lt;/title&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBBodyClose</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>380</y>
+ <width>91</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>/Body</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;/body&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBHTMLClose</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>400</y>
+ <width>101</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>/HTML</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;/html&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBHeadClose</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>300</y>
+ <width>70</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>/head</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;/head&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBJavascript</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>280</y>
+ <width>140</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>JavaScript area</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string> &lt;script language="javascript"&gt;
+
+ &lt;/script&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBBody</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>320</y>
+ <width>111</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Body tag</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;body&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>170</x>
+ <y>480</y>
+ <width>81</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>&amp;Test</string>
+ </property>
+ <property name="on">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo '@CBDTD
+@CBCVS
+@CBHTML
+@CBHead
+@CBHeadClose
+@CBBody
+@CBPHPHeader
+@CBPHPFooter
+@CBBodyClose
+@CBHTMLClose'</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>170</x>
+ <y>430</y>
+ <width>80</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo '@CBDTD
+@CBCVS
+@CBHTML
+@CBHead
+@CBHeadClose
+@CBBody
+@CBPHPHeader
+@CBPHPFooter
+@CBBodyClose
+@CBHTMLClose'</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LEPHPFooter</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>360</y>
+ <width>221</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LEPHPHeader</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>340</y>
+ <width>220</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBPHPHeader</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>340</y>
+ <width>150</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>PHP header include:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>&lt;? include ("@LEPHPHeader") ?&gt;
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBPHPFooter</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>360</y>
+ <width>151</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>PHP footer include:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>
+&lt;? include ("@LEPHPFooter") ?&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CBMetaQuanta</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>160</y>
+ <width>120</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Meta Quanta</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string> &lt;meta name="GENERATOR" content="Quanta Plus"&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+</widget>
+<connections>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBHeadClose</receiver>
+ <slot>toggle()</slot>
+ </connection>
+ <connection>
+ <sender>CBBody</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBBodyClose</receiver>
+ <slot>toggle()</slot>
+ </connection>
+ <connection>
+ <sender>CBHTML</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBHTMLClose</receiver>
+ <slot>toggle()</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBMetaAuthor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBMetaQuanta</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBBasedir</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>LEBasedir</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>LETitle</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBMetaChar</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBMetaKeywords</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBStyle</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBStyleArea</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CBJavascript</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>LEMetaKeywords</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>LEStyle</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ComboMetachar</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>LEMetaAuthor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/populate.kmdr b/kommander/examples/old/populate.kmdr
new file mode 100644
index 00000000..a5c5090d
--- /dev/null
+++ b/kommander/examples/old/populate.kmdr
@@ -0,0 +1,111 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Populate_Dialog</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Populate_Dialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>484</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Population Dialog</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout2</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="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="LineEdit">
+ <property name="name">
+ <cstring>dirLineEdit</cstring>
+ </property>
+ <property name="text">
+ <string>~/</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>populateButton</cstring>
+ </property>
+ <property name="text">
+ <string>Update List</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>resultList</cstring>
+ </property>
+ <property name="populationText">
+ <string>@exec("ls -1 @dirLineEdit")</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+</widget>
+<connections>
+ <connection>
+ <sender>populateButton</sender>
+ <signal>clicked()</signal>
+ <receiver>resultList</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>dirLineEdit</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>resultList</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/resize.kmdr b/kommander/examples/old/resize.kmdr
new file mode 100644
index 00000000..27ff5309
--- /dev/null
+++ b/kommander/examples/old/resize.kmdr
@@ -0,0 +1,217 @@
+<!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>516</width>
+ <height>187</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Batch Image Resizer</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout2</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="FileSelector" row="0" column="1">
+ <property name="name">
+ <cstring>FileSelectorSrc</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="selectionType">
+ <enum>Directory</enum>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="1" column="1">
+ <property name="name">
+ <cstring>FileSelectorDst</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="selectionType">
+ <enum>Directory</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Source directory:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Destination directory:</string>
+ </property>
+ </widget>
+ </grid>
+ </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>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Width:</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt">
+ <property name="name">
+ <cstring>SpinBoxWidth</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Height:</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt">
+ <property name="name">
+ <cstring>SpinBoxHeight</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</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>141</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <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>
+ <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>251</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Resize</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>width=@SpinBoxWidth
+height=@SpinBoxHeight
+
+cd @FileSelectorSrc
+
+for file in *
+do
+ echo $file
+ convert -resize ${width}x${height} $file @FileSelectorDst/$file
+done
+</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/selectedwidgettext.kmdr b/kommander/examples/old/selectedwidgettext.kmdr
new file mode 100644
index 00000000..058b6d86
--- /dev/null
+++ b/kommander/examples/old/selectedwidgettext.kmdr
@@ -0,0 +1,105 @@
+<!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>210</width>
+ <height>100</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Selected Text Demo</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="ListBox">
+ <item>
+ <property name="text">
+ <string>gvim</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>xboard</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kate</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>commandListBox</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@selectedWidgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout1</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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Run</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@commandListBox</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer>
+ <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>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </hbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/settings.kmdr b/kommander/examples/old/settings.kmdr
new file mode 100644
index 00000000..1e028434
--- /dev/null
+++ b/kommander/examples/old/settings.kmdr
@@ -0,0 +1,264 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>settingsDialog</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>settingsDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>533</width>
+ <height>482</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Settings Dialog</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout7</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>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Enter any text you want in the widgets below - Kommander will remember it!</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>lineEdit</cstring>
+ </property>
+ <property name="populationText">
+ <string>@readSetting( "lineEditValue", "Default Line Edit Value" )</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="TextEdit">
+ <property name="name">
+ <cstring>textEdit</cstring>
+ </property>
+ <property name="populationText">
+ <string>@readSetting("textEditValue", "Default Text Edit Value")</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout6</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="QLayoutWidget">
+ <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="LineEdit">
+ <property name="name">
+ <cstring>dirLineEdit</cstring>
+ </property>
+ <property name="populationText">
+ <string>@readSetting("dirLineEdit", "~/")</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Update</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>ls -1 @dirLineEdit</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>listBox</cstring>
+ </property>
+ <property name="populationText">
+ <string>@readSetting("listBoxValue", "Default
+List
+Box
+Items")
+</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <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>
+ <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="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@writeSetting("lineEditValue", "@lineEdit" )
+@writeSetting("textEditValue", "@textEdit" )
+@writeSetting("listBoxValue", "@listBox" )
+@writeSetting("dirLineEdit", "@dirLineEdit")</string>
+ </stringlist>
+ </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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>settingsDialog</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>lineEdit</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>settingsDialog</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>textEdit</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>settingsDialog</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>listBox</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>ExecButton1</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>listBox</receiver>
+ <slot>setWidgetText(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>settingsDialog</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>dirLineEdit</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/simplelist.kmdr b/kommander/examples/old/simplelist.kmdr
new file mode 100644
index 00000000..42a32323
--- /dev/null
+++ b/kommander/examples/old/simplelist.kmdr
@@ -0,0 +1,214 @@
+<!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>372</width>
+ <height>189</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Form1</string>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>10</y>
+ <width>300</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Helvetica</family>
+ <pointsize>16</pointsize>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Simple List Short Demo</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton12</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>140</y>
+ <width>80</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Echo</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo ls @CheckBox17 @CheckBox18 @CheckBox19</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton12_2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>100</x>
+ <y>140</y>
+ <width>80</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Exec</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>ls @CheckBox17 @CheckBox18 @CheckBox19</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton12_3</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>190</x>
+ <y>140</y>
+ <width>80</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Echo+Exec</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo ls @CheckBox17 @CheckBox18 @CheckBox19;ls @CheckBox17 @CheckBox18 @CheckBox19</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton5</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>280</x>
+ <y>140</y>
+ <width>81</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo "Thanks for testing"</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox17</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>50</y>
+ <width>100</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string> Long</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="tristate">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>-l</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox18</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>70</y>
+ <width>101</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>-a</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox19</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>100</y>
+ <width>110</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Recursive</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>-R</string>
+ </stringlist>
+ </property>
+ </widget>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/tar.kmdr b/kommander/examples/old/tar.kmdr
new file mode 100644
index 00000000..37fcd10d
--- /dev/null
+++ b/kommander/examples/old/tar.kmdr
@@ -0,0 +1,479 @@
+<!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>513</width>
+ <height>557</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Tar</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="ButtonGroup">
+ <property name="name">
+ <cstring>mainChoice</cstring>
+ </property>
+ <property name="title">
+ <string>Main Choice</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Append to archive</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>A</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton2</cstring>
+ </property>
+ <property name="text">
+ <string>Create archive</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton3</cstring>
+ </property>
+ <property name="text">
+ <string>Find differences between archive and file system</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton4</cstring>
+ </property>
+ <property name="text">
+ <string>Delete from archive</string>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton5</cstring>
+ </property>
+ <property name="text">
+ <string>Append to the end of an archive</string>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton6</cstring>
+ </property>
+ <property name="text">
+ <string>List contents</string>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton7</cstring>
+ </property>
+ <property name="text">
+ <string>Update contents</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton8</cstring>
+ </property>
+ <property name="text">
+ <string>Extract archive</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout9</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="ButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup2</cstring>
+ </property>
+ <property name="title">
+ <string>Read Options</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox1</cstring>
+ </property>
+ <property name="text">
+ <string>Ignore failed read</string>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox2</cstring>
+ </property>
+ <property name="text">
+ <string>Keep existing files</string>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox3</cstring>
+ </property>
+ <property name="text">
+ <string>Extract all protection information</string>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox4</cstring>
+ </property>
+ <property name="text">
+ <string>Absolute path names</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="ButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup3</cstring>
+ </property>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ <property name="title">
+ <string>Write Options</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox5</cstring>
+ </property>
+ <property name="text">
+ <string>Dump files, not just symlinks</string>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox6</cstring>
+ </property>
+ <property name="text">
+ <string>Remove files after adding to archive</string>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox7</cstring>
+ </property>
+ <property name="text">
+ <string>Verbosely list files proceeded</string>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox8</cstring>
+ </property>
+ <property name="text">
+ <string>Compression</string>
+ </property>
+ </widget>
+ <widget class="ButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup4</cstring>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <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>30</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout7</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton9</cstring>
+ </property>
+ <property name="text">
+ <string>bzip</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="RadioButton">
+ <property name="name">
+ <cstring>RadioButton10</cstring>
+ </property>
+ <property name="text">
+ <string>gzip</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout5</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>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Archive name:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>outputName</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout6</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>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Files:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <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>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>103</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Execute</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>104</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</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>103</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/tidy.kmdr b/kommander/examples/old/tidy.kmdr
new file mode 100644
index 00000000..096dec40
--- /dev/null
+++ b/kommander/examples/old/tidy.kmdr
@@ -0,0 +1,1159 @@
+<!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>611</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="4">
+ <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>
+ <widget class="GroupBox">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>11</y>
+ <width>437</width>
+ <height>110</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Non Tidy Option</string>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>310</width>
+ <height>40</height>
+ </rect>
+ </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">
+ <property name="name">
+ <cstring>GUseDCOP</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>320</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Use DCOP to send active page from Quanta+ to tidy</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>GconfigF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>377</y>
+ <width>437</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>127</y>
+ <width>437</width>
+ <height>40</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Path to tidy (required):</string>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>GoutF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>309</y>
+ <width>437</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>GinputEN</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>211</y>
+ <width>437</width>
+ <height>24</height>
+ </rect>
+ </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">
+ <property name="name">
+ <cstring>GerrorEN</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>415</y>
+ <width>437</width>
+ <height>24</height>
+ </rect>
+ </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">
+ <property name="name">
+ <cstring>GconfigEN</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>347</y>
+ <width>437</width>
+ <height>24</height>
+ </rect>
+ </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">
+ <property name="name">
+ <cstring>GoutputEN</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>279</y>
+ <width>437</width>
+ <height>24</height>
+ </rect>
+ </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">
+ <property name="name">
+ <cstring>GinF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>241</y>
+ <width>437</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>GerrorF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>445</y>
+ <width>437</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>GmodF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>483</y>
+ <width>437</width>
+ <height>24</height>
+ </rect>
+ </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">
+ <property name="name">
+ <cstring>GtidyPath</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>173</y>
+ <width>437</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>454</x>
+ <y>173</y>
+ <width>89</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>/usr/bin</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo "/usr/bin/tidy"</string>
+ </stringlist>
+ </property>
+ </widget>
+ </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></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></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></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></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></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></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></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></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>Bah, encoding, schmencoding</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>238</red>
+ <green>238</green>
+ <blue>230</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>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>
+ <widget class="CloseButton" row="1" column="2">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Eject! Eject! Eject!</string>
+ </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>131</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" 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>121</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </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/kommander/examples/old/widgetgenerator.kmdr b/kommander/examples/old/widgetgenerator.kmdr
new file mode 100644
index 00000000..00ef6262
--- /dev/null
+++ b/kommander/examples/old/widgetgenerator.kmdr
@@ -0,0 +1,438 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>widgetGen</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>widgetGen</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>470</width>
+ <height>267</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Kommander Widget Source Generator</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" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout12</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>24</number>
+ </property>
+ <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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Save</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>
+classNameLower=$(echo '@className' | tr "A-Z" "a-z")
+classNameUpper=$(echo '@className' | tr "a-z" "A-Z")
+inheritClassHeader=$(echo '@inheritClassName' | tr "A-Z" "a-z")
+
+headerContent="/***************************************************************************
+ $classNameLower.h - @description
+ -------------------
+ begin : @dateStarted
+ copyright : (C) @author
+ email : @email
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_${classNameUpper}_H_
+#define _HAVE_${classNameUpper}_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include &lt;$inheritClassHeader.h&gt;
+#include &lt;qstring.h&gt;
+#include &lt;qstringlist.h&gt;
+
+/* OTHER INCLUDES */
+#include &lt;kommanderwidget.h&gt;
+
+class QWidget;
+
+class QShowEvent;
+class @className : public @inheritClassName, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ @className(QWidget *a_parent, const char *a_name);
+ ~@className();
+
+ virtual QString widgetText() const;
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(QStringList);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+
+ virtual QString populationText() const;
+ virtual void setPopulationText(QString);
+
+public slots:
+ virtual void setWidgetText(const QString &amp;);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString &amp;);
+protected:
+ void showEvent( QShowEvent *e );
+private:
+};
+
+#endif"
+
+cppContent="/***************************************************************************
+ $classNameLower.cpp - @description
+ -------------------
+ begin : @dateStarted
+ copyright : (C) @author
+ email : @email
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 &lt;klocale.h&gt;
+
+/* QT INCLUDES */
+#include &lt;qstring.h&gt;
+#include &lt;qwidget.h&gt;
+#include &lt;qstringlist.h&gt;
+#include &lt;$inheritClassHeader.h&gt;
+#include &lt;qevent.h&gt;
+
+/* OTHER INCLUDES */
+#include &lt;kommanderwidget.h&gt;
+#include \"$classNameLower.h\"
+
+@className::@className(QWidget *a_parent, const char *a_name)
+ : @inheritClassName(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states &lt;&lt; \"default\";
+ setStates(states);
+ setDisplayStates(states);
+}
+
+@className::~@className()
+{
+}
+
+QString @className::currentState() const
+{
+ return QString(\"default\");
+}
+
+bool @className::isKommanderWidget() const
+{
+ return TRUE;
+}
+
+QStringList @className::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void @className::setAssociatedText(QStringList a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void @className::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText( populationText() );
+ setWidgetText( txt );
+}
+
+QString @className::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void @className::setPopulationText(QString a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+void @className::setWidgetText(const QString &amp;a_text)
+{
+ //set the widget text of your widget here
+ emit widgetTextChanged(a_text);
+}
+
+QString @className::widgetText() const
+{
+ // implement your widget text here
+ return QString::null;
+}
+
+void @className::showEvent( QShowEvent *e )
+{
+ @inheritClassName::showEvent( e );
+ emit widgetOpened();
+}
+
+#include \"$classNameLower.moc\"
+"
+
+echo "$headerContent" &gt; @directory/$classNameLower.h
+echo "$cppContent" &gt; @directory/$classNameLower.cpp</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</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>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout37</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>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Author:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Email:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Description:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Date started:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Class name:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel7</cstring>
+ </property>
+ <property name="text">
+ <string>Base class name:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Directory to save in:</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>Layout36</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="LineEdit">
+ <property name="name">
+ <cstring>author</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>email</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>description</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>dateStarted</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>className</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>inheritClassName</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>directory</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/old/wizard.kmdr b/kommander/examples/old/wizard.kmdr
new file mode 100755
index 00000000..87f50c38
--- /dev/null
+++ b/kommander/examples/old/wizard.kmdr
@@ -0,0 +1,301 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Wizard1</class>
+<widget class="QWizard">
+ <property name="name">
+ <cstring>Wizard1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>473</width>
+ <height>346</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Demo Wizard</string>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>page</cstring>
+ </property>
+ <attribute name="title">
+ <string>Page 1</string>
+ </attribute>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>131</x>
+ <y>159</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, @CheckBox1.checked)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>131</x>
+ <y>70</y>
+ <width>199</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Select this t&amp;o enable Next</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>220</y>
+ <width>320</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Try the help button from any page!</string>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject8</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>200</x>
+ <y>160</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Message.info(Help was pressed for @LineEdit6.text, Help)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit6</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>100</y>
+ <width>141</width>
+ <height>31</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject60</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>34</x>
+ <y>114</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>page</cstring>
+ </property>
+ <attribute name="title">
+ <string>Page 2</string>
+ </attribute>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject1_2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>141</x>
+ <y>169</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, @CheckBox1_2.checked)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox1_2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>141</x>
+ <y>80</y>
+ <width>199</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Select this t&amp;o enable Next</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>page</cstring>
+ </property>
+ <attribute name="title">
+ <string>Page 3</string>
+ </attribute>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>ScriptObject2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>138</x>
+ <y>169</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@dcop(@dcopid, KommanderIf, enableWidget(QString,bool), finish, @CheckBox2.checked)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>138</x>
+ <y>80</y>
+ <width>204</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Select this t&amp;o enable finish</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </widget>
+</widget>
+<connections>
+ <connection>
+ <sender>CheckBox1</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>ScriptObject1</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox1</sender>
+ <signal>stateChanged(int)</signal>
+ <receiver>ScriptObject1</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>Wizard1</sender>
+ <signal>selected(const QString&amp;)</signal>
+ <receiver>ScriptObject1_2</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>Wizard1</sender>
+ <signal>selected(const QString&amp;)</signal>
+ <receiver>LineEdit6</receiver>
+ <slot>setText(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox2</sender>
+ <signal>stateChanged(int)</signal>
+ <receiver>ScriptObject2</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>Wizard1</sender>
+ <signal>helpClicked()</signal>
+ <receiver>ScriptObject8</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox1_2</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>ScriptObject1_2</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox1_2</sender>
+ <signal>stateChanged(int)</signal>
+ <receiver>ScriptObject1_2</receiver>
+ <slot>execute()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/Makefile.am b/kommander/examples/tutorial/Makefile.am
new file mode 100644
index 00000000..e654bdd2
--- /dev/null
+++ b/kommander/examples/tutorial/Makefile.am
@@ -0,0 +1,10 @@
+execkmdrdir = ${kde_datadir}/kmdr-editor/editor/tutorial
+
+execkmdr_SCRIPTS = append.kmdr calc.kmdr dcop.kmdr globals.kmdr loop.kmdr progressbar.kmdr slots.kmdr \
+ strings.kmdr tree.kmdr arrays.kmdr cmdline.kmdr dialogs.kmdr initialize.kmdr picview.kmdr settings.kmdr \
+ statusbar.kmdr table.kmdr widgets.kmdr
+
+
+tutorialdir = ${kde_datadir}/kmdr-editor/editor/tutorial
+tutorial_DATA = README
+
diff --git a/kommander/examples/tutorial/README b/kommander/examples/tutorial/README
new file mode 100644
index 00000000..658503e0
--- /dev/null
+++ b/kommander/examples/tutorial/README
@@ -0,0 +1,123 @@
+Those example illustrate various Kommander features.
+
+In the future they would be used together with Kommander tutorials.
+For now, only brief information is available
+
+
+* GLOBALS.KMDR
+Shows using global and setGlobal DCOP calls to provide global
+variables for script.
+Functions/concepts:
+- global
+- setGlobal
+- changeWidgetText
+
+* DCOP.KMDR
+Shows how to use both local and external DCOP calls to communicate
+with external application (here: KMail).
+Functions/concepts:
+- external DCOP
+- addListItem
+- enableWidget
+- @selectedWidgetText
+- @widgetText
+
+* SLOTS.KMDR
+Shows how to use connections/slots to handle events. Both population and
+standard slots are used.
+- slots/connections
+- populate()
+
+* SETTINGS.KMDR
+Shows how to use @readSetting and @writeSetting functions to write/restore
+widget content. Also, shows how to use populate() slot to initialize widget
+content.
+Functions/concepts:
+- @readSetting
+- @writeSetting
+- populate()
+- slots/connections
+- destroy
+
+* APPEND.KMDR
+Shows how you can append text to TextEdit, and how you can use it to display
+formatted text.
+Functions/concepts:
+- changeWidetText
+- RichTextEdit
+
+* CMDLINE.KMDR
+Shows how you can pass parameters to Kommander dialog via command-line.
+Also, shows how to change list content and button text.
+Functions/concepts:
+- command-line arguments
+- global
+- changeWidgetText
+- addListItem
+- clearList
+
+* INITIALIZE.KMDR
+Shows how you can use 'initialization' and 'destroy' scripts of main
+dialog to initialize and store some settings.
+Functions/concepts:
+- initialization
+- destroy
+- readSetting
+- writeSetting
+
+* ARRAY.KMDR
+Shows how to use assocative arrays to store and restore information
+associated with container items.
+Functions/concepts:
+- @Array functions
+
+* STRINGS.KMDR
+Shows how to use string-handling functions
+Functions/concepts:
+- @String functions
+- rich text editor
+
+* TREE.KMDR
+Shows how to use tree widget
+- tree widget
+- FileSelector
+- initialization
+- env
+
+* WIDGETS.KMDR
+Shows how to get widget information
+- type method
+- children method
+
+* STATUSBAR.KMDR
+Shows how to use statusbar widget
+- statusbar widget
+- populate
+
+* LOOP.KMDR
+Shows how to use internal loops
+- for
+- forEach
+
+* CALC.KMDR
+Shows how to use @expr function to do some calculations
+- expr
+- String.replace
+
+* PICVIEW.KMDR
+Shows how to use PixmapLabel widget using populate() function
+- PixmapLabel
+- populate
+- FileSelector
+- slots/connections
+
+* TABLE.KMDR
+Shows how to use Table widget
+- insertRow
+- insertColumn
+- currentRow
+- currentColumn
+- setColumnCaption
+- setRowCaption
+- removeRow
+- removeColumn
diff --git a/kommander/examples/tutorial/append.kmdr b/kommander/examples/tutorial/append.kmdr
new file mode 100644
index 00000000..fe22a4c3
--- /dev/null
+++ b/kommander/examples/tutorial/append.kmdr
@@ -0,0 +1,115 @@
+<!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>379</width>
+ <height>272</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Append date</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="TextEdit" row="0" column="0">
+ <property name="name">
+ <cstring>TextEdit1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <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>
+ <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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Insert date</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>DATE="Button pressed: &lt;i&gt;`date`&lt;/i&gt;"
+TEXT='@TextEdit1'"$DATE"
+dcop @dcopid KommanderIf changeWidgetText TextEdit1 "$TEXT"
+</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/arrays.kmdr b/kommander/examples/tutorial/arrays.kmdr
new file mode 100644
index 00000000..dd4b18c6
--- /dev/null
+++ b/kommander/examples/tutorial/arrays.kmdr
@@ -0,0 +1,204 @@
+<!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>386</width>
+ <height>206</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Program array</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>@Array.setValue(Programs, kcalc, KDE calculator)
+@Array.setValue(Programs, kwrite, Advanced editor)
+@Array.setValue(Programs, ark, Archive tool)
+@Array.setValue(Programs, kdict, Interface to online dictonaries)
+</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">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Programs:</string>
+ </property>
+ </widget>
+ <widget class="ListBox" row="1" column="0">
+ <item>
+ <property name="text">
+ <string>kwrite</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kcalc</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kdict</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ark</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ListBox1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@selectedWidgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="2" column="0">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ <property name="backgroundOrigin">
+ <enum>ParentOrigin</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string>@Array.value(Programs, @ListBox1)</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="3" 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>
+ <spacer>
+ <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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</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;Run</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@exec(ListBox1)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Run &amp;All</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Array.keys(Programs)</string>
+ </stringlist>
+ </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>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>ListBox1</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>LineEdit1</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/calc.kmdr b/kommander/examples/tutorial/calc.kmdr
new file mode 100644
index 00000000..5e0082f4
--- /dev/null
+++ b/kommander/examples/tutorial/calc.kmdr
@@ -0,0 +1,271 @@
+<!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>577</width>
+ <height>305</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Simple calculator</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="1">
+ <property name="name">
+ <cstring>Layout7</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>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>History:</string>
+ </property>
+ </widget>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>ListBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>250</width>
+ <height>32767</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>250</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="paletteBackgroundColor">
+ <color>
+ <red>233</red>
+ <green>233</green>
+ <blue>233</blue>
+ </color>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="text">
+ <string>Cl&amp;ear</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@ListBox1.clear
+@LineEdit2.setText("Sum: 0")</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout4</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="2" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Expression:</string>
+ </property>
+ </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>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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Calculate</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@ListBox1.insertItem(@expr(@LineEdit1.text), -1)
+@LineEdit1.clear
+@LineEdit2.setText("Sum: @expr(@String.replace(@ListBox1.text, "\n", "+"))")
+</string>
+ </stringlist>
+ </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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="LineEdit" row="3" column="0">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ </widget>
+ <spacer row="5" column="0">
+ <property name="name">
+ <cstring>Spacer3_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>91</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" 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>0</width>
+ <height>91</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>LineEdit1</tabstop>
+ <tabstop>ExecButton1</tabstop>
+ <tabstop>ExecButton2</tabstop>
+ <tabstop>ListBox1</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/cmdline.kmdr b/kommander/examples/tutorial/cmdline.kmdr
new file mode 100644
index 00000000..0db801d2
--- /dev/null
+++ b/kommander/examples/tutorial/cmdline.kmdr
@@ -0,0 +1,108 @@
+<!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>462</width>
+ <height>340</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Form1</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="ListBox" row="0" column="0" rowspan="1" colspan="3">
+ <item>
+ <property name="text">
+ <string>Usage: kmdr-executor cmdline.kmdr [BUTTON='title'] arg1 ...</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ListBox1</cstring>
+ </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>149</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton" row="1" column="1">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Read command line</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string># Put command-line arguments into list
+dcop @dcopid KommanderIf clearList ListBox1
+VALUE=`dcop @dcopid KommanderIf global ARGS`
+for i in $VALUE; do
+ dcop @dcopid KommanderIf addListItem ListBox1 "$i" 999
+done
+
+ARGS=`dcop @dcopid KommanderIf global ARGCOUNT`
+dcop @dcopid KommanderIf addListItem ListBox1 "Arguments count: $ARGS" 999
+
+
+# Read button text
+BUTTONTEXT=`dcop @dcopid KommanderIf global BUTTON`
+if [ "$BUTTONTEXT" ]; then
+ dcop @dcopid KommanderIf changeWidgetText ExecButton1 "$BUTTONTEXT"
+fi</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer row="1" column="2">
+ <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>148</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/dcop.kmdr b/kommander/examples/tutorial/dcop.kmdr
new file mode 100644
index 00000000..9ceae259
--- /dev/null
+++ b/kommander/examples/tutorial/dcop.kmdr
@@ -0,0 +1,139 @@
+<!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>399</width>
+ <height>247</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>KMail communication</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="ListBox" row="0" column="0">
+ <property name="name">
+ <cstring>AccountListBox</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@selectedWidgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <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>
+ <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="ExecButton">
+ <property name="name">
+ <cstring>AccountButton</cstring>
+ </property>
+ <property name="text">
+ <string>Get accounts</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string># Get list of accounts from KMail
+LIST=`dcop kmail KMailIface accounts`
+
+# Add each account to the list and enable 'Check Account' button
+if [ "$LIST" ]; then
+ for i in $LIST; do
+ dcop @dcopid KommanderIf addListItem AccountListBox "$i" 1000;
+ done
+ dcop @dcopid KommanderIf enableWidget CheckButton true
+fi
+</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>CheckButton</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Check account</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string># Get current account
+# Look at AccountListBox script to see how @AccountListBox is calculated
+
+dcop kmail KMailIface checkAccount @AccountListBox</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/dialogs.kmdr b/kommander/examples/tutorial/dialogs.kmdr
new file mode 100644
index 00000000..62c97bc0
--- /dev/null
+++ b/kommander/examples/tutorial/dialogs.kmdr
@@ -0,0 +1,198 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>DialogTest</class>
+<comment>This is my program</comment>
+<author>Michał Rudolf</author>
+<license>GPL</license>
+<version>0.1</version>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>DialogTest</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>428</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Test of Dialogs</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="useInternalParser">
+ <bool>true</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="ExecButton" row="1" column="0">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Run dialogs...</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>message_info("This is a demonstration of various KDE dialogs", "Demo")
+message_error("Cannot enter 3D mode")
+if message_question("Do you want to continue?") &lt;&gt; 1 then
+ debug("Cancelled")
+endif
+if message_warning("Are you sure you want to continue?") &lt;&gt; 1 then
+ debug("Aborted")
+endif
+
+
+echo("Hello world!")
+a = input_text("Input text", "Text", "Default text")
+LineEdit1.setText(a)
+
+a = input_color
+LineEdit2.setText(a)
+
+a = input_value("Input value", "Value", 10, 1, 100)
+LineEdit3.setText(a)
+
+a = input_openfile
+LineEdit4.setText(a)
+
+echo("This is a test too")
+a = input_savefile
+LineEdit5.setText(a)
+
+a = input_directory
+LineEdit6.setText(a)
+
+a = input_openfiles
+ListBox1.setText(a)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <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="Label" row="4" column="0">
+ <property name="name">
+ <cstring>Label6</cstring>
+ </property>
+ <property name="text">
+ <string>File to save:</string>
+ </property>
+ </widget>
+ <widget class="Label" row="1" column="0">
+ <property name="name">
+ <cstring>Label2</cstring>
+ </property>
+ <property name="text">
+ <string>Color:</string>
+ </property>
+ </widget>
+ <widget class="ListBox" row="6" column="1">
+ <property name="name">
+ <cstring>ListBox1</cstring>
+ </property>
+ </widget>
+ <widget class="Label" row="6" column="0">
+ <property name="name">
+ <cstring>Label5</cstring>
+ </property>
+ <property name="text">
+ <string>Files to open:</string>
+ </property>
+ </widget>
+ <widget class="Label" row="5" column="0">
+ <property name="name">
+ <cstring>Label7</cstring>
+ </property>
+ <property name="text">
+ <string>Directory:</string>
+ </property>
+ </widget>
+ <widget class="Label" row="2" column="0">
+ <property name="name">
+ <cstring>Label3</cstring>
+ </property>
+ <property name="text">
+ <string>Value:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ </widget>
+ <widget class="Label" row="3" column="0">
+ <property name="name">
+ <cstring>Label4</cstring>
+ </property>
+ <property name="text">
+ <string>File to open:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>LineEdit3</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="3" column="1">
+ <property name="name">
+ <cstring>LineEdit4</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="4" column="1">
+ <property name="name">
+ <cstring>LineEdit5</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>LineEdit2</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="5" column="1">
+ <property name="name">
+ <cstring>LineEdit6</cstring>
+ </property>
+ </widget>
+ <widget class="Label" row="0" column="0">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>Text:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/globals.kmdr b/kommander/examples/tutorial/globals.kmdr
new file mode 100644
index 00000000..71cfad17
--- /dev/null
+++ b/kommander/examples/tutorial/globals.kmdr
@@ -0,0 +1,96 @@
+<!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>250</width>
+ <height>122</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Global variables demo</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>Layout1</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="LineEdit">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Store current date</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@setGlobal(TEMPSIZE, "@exec(date)")</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="text">
+ <string>Restore date</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@LineEdit1.setText("@global(TEMPSIZE)")</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/initialize.kmdr b/kommander/examples/tutorial/initialize.kmdr
new file mode 100644
index 00000000..16ed360d
--- /dev/null
+++ b/kommander/examples/tutorial/initialize.kmdr
@@ -0,0 +1,120 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>InitializationDemo</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>InitializationDemo</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>461</width>
+ <height>108</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Initialization and Destroy</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>dcop @dcopid KommanderIf changeWidgetText OpenLabel "Opened: `date`"
+CLOSE="@readSetting("CloseLabel", "Previously closed: never")"
+dcop @dcopid KommanderIf changeWidgetText CloseLabel "$CLOSE"
+ </string>
+ <string>@writeSetting("CloseLabel", "Previously closed: @exec("date")")</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="2" 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>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="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>
+ <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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>OpenLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Opened:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>CloseLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Previously closed:</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/loop.kmdr b/kommander/examples/tutorial/loop.kmdr
new file mode 100644
index 00000000..4aa799f1
--- /dev/null
+++ b/kommander/examples/tutorial/loop.kmdr
@@ -0,0 +1,114 @@
+<!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>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Looooop!</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="ExecButton" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Enter loop!</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@forEach(i, @exec(ls))
+ @TreeWidget1.insertItem(@i\t@exec(wc -c "@i" | cut -f 1 -d ' '), -1)
+@end
+
+@for(olymp, 1900, 2006, 4)
+ @ListBox1.insertItem(@olymp, -1)
+@end</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="TreeWidget" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>File</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Size</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>TreeWidget1</cstring>
+ </property>
+ <property name="fullWidth">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>Layout1</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>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Olympiads:</string>
+ </property>
+ </widget>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>ListBox1</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/picview.kmdr b/kommander/examples/tutorial/picview.kmdr
new file mode 100644
index 00000000..be75af7b
--- /dev/null
+++ b/kommander/examples/tutorial/picview.kmdr
@@ -0,0 +1,148 @@
+<!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>618</width>
+ <height>436</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Picture viewer</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</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="Label" row="0" column="0">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>Directory:</string>
+ </property>
+ </widget>
+ <widget class="Label" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Label2</cstring>
+ </property>
+ <property name="text">
+ <string>Images:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="0" column="1">
+ <property name="name">
+ <cstring>FileSelector1</cstring>
+ </property>
+ <property name="selectionType">
+ <enum>Directory</enum>
+ </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>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>ListBox1</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>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="populationText">
+ <string>@exec(cd @FileSelector1.text &amp;&amp; find * -name "*.jpg" -o -name "*.png" -o -name "*.gif" -o -name "*.bmp")</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="PixmapLabel">
+ <property name="name">
+ <cstring>PixmapLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>2</hsizetype>
+ <vsizetype>2</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>Box</enum>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string>@FileSelector1.text/@ListBox1.selection</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>FileSelector1</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>ListBox1</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>ListBox1</sender>
+ <signal>highlighted(int)</signal>
+ <receiver>PixmapLabel1</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/progressbar.kmdr b/kommander/examples/tutorial/progressbar.kmdr
new file mode 100644
index 00000000..397410cb
--- /dev/null
+++ b/kommander/examples/tutorial/progressbar.kmdr
@@ -0,0 +1,192 @@
+<!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>565</width>
+ <height>390</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>ProgressBar Demo</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>@ProgressBar1.setVisible(false)</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="ProgressBar" row="3" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>ProgressBar1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="TreeWidget" row="2" column="0" rowspan="1" colspan="5">
+ <column>
+ <property name="text">
+ <string>Source Tree</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <item>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>TreeWidget1</cstring>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>false</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="rootIsDecorated">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="1" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>FileSelector1</cstring>
+ </property>
+ <property name="selectionType">
+ <enum>Directory</enum>
+ </property>
+ </widget>
+ <widget class="StatusBar" row="5" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>StatusBar1</cstring>
+ </property>
+ </widget>
+ <spacer row="4" column="0">
+ <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>191</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="4" column="2">
+ <property name="name">
+ <cstring>Spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>191</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ScriptObject" row="4" column="3">
+ <property name="name">
+ <cstring>progressLoop</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@# set up a loop using loop variable named "file"
+@forEach(file, @exec(cd @FileSelector1.text &amp;&amp; find * -maxdepth 0))
+ @# set the scale using the generated @[loopvar]_count
+ @ProgressBar1.setMaximum(@file_count)
+ @# show file name in statusbar
+ @StatusBar1.setText(@file)
+ @TreeWidget1.insertItems(@exec(cd @FileSelector1.text &amp;&amp; find @file -name "*"), -1)
+ @# use the generated @[loopvar]_index to update progressbar
+ @ProgressBar1.setText(@file_index)
+@end
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="4" column="1">
+ <property name="name">
+ <cstring>ExecButton25</cstring>
+ </property>
+ <property name="text">
+ <string>Get Source Tree</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@TreeWidget1.clear
+
+@if(@String.isEmpty(@FileSelector1.text))
+ @exec(kdialog --error "please select a directory, preferably not home as it will take time")
+@endif
+
+@if(!@String.isEmpty(@FileSelector1.text))
+ @ProgressBar1.setVisible(true)
+ @progressLoop.execute
+ @# this fails on kdewebdev 3.3.0 so leave off ".execute"
+ @ProgressBar1.setVisible(false)
+ @StatusBar1.setText("Source Tree Listed")
+@endif</string>
+ </stringlist>
+ </property>
+ <property name="blockGUI">
+ <enum>Button</enum>
+ </property>
+ </widget>
+ <widget class="Label" row="0" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>Label1</cstring>
+ </property>
+ <property name="text">
+ <string>Select a directory to list it's tree ($HOME NOT recommended for time reasons)</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/settings.kmdr b/kommander/examples/tutorial/settings.kmdr
new file mode 100644
index 00000000..3079d6f9
--- /dev/null
+++ b/kommander/examples/tutorial/settings.kmdr
@@ -0,0 +1,177 @@
+<!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>389</width>
+ <height>91</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Storing settings</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>@writeSetting("LastCommand", "@LineEdit1")</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>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="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Command:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ <property name="populationText">
+ <string>@readSetting("LastCommand", "kcalc")</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <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>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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Run</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@LineEdit1</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </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>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>LineEdit1</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>LineEdit1</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/slots.kmdr b/kommander/examples/tutorial/slots.kmdr
new file mode 100644
index 00000000..23ab2d09
--- /dev/null
+++ b/kommander/examples/tutorial/slots.kmdr
@@ -0,0 +1,200 @@
+<!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>396</width>
+ <height>386</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Archive viewer</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>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="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Archive name:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>FileSelector</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="selectionFilter">
+ <string>*.tar.gz</string>
+ <comment>Tar archives</comment>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout2</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>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>List of files:</string>
+ </property>
+ </widget>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>FileListBox</cstring>
+ </property>
+ <property name="populationText">
+ <string>@exec("tar tzf @FileSelector")</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@selectedWidgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" 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>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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>View</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>if [ "@FileSelector" -a "@FileListBox" ]; then
+ tar xzf "@FileSelector" -C /tmp "@FileListBox"
+ konqueror "/tmp/@FileListBox"
+fi
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>FileSelector</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>FileListBox</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>FileListBox</sender>
+ <signal>doubleClicked(QListBoxItem*)</signal>
+ <receiver>ExecButton1</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/statusbar.kmdr b/kommander/examples/tutorial/statusbar.kmdr
new file mode 100644
index 00000000..d4f96e05
--- /dev/null
+++ b/kommander/examples/tutorial/statusbar.kmdr
@@ -0,0 +1,99 @@
+<!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>536</width>
+ <height>225</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>StatusBar example</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>@StatusBar2.setText(Welcome in this StatusBar demo...)</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="StatusBar" row="2" column="0">
+ <property name="name">
+ <cstring>StatusBar2</cstring>
+ </property>
+ <property name="populationText">
+ <string>@ListBox1.selection selected.</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ListBox" row="0" column="0">
+ <item>
+ <property name="text">
+ <string>Some item</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Some other item</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Another Item</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>One more Item</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ListBox1</cstring>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="1" column="0">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Update status bar</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@StatusBar2.insertItem(This one was updated, 0)
+@StatusBar2.insertItem(User: @exec(whoami), 1)
+@StatusBar2.insertItem(@exec(date), 2)</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>ListBox1</sender>
+ <signal>clicked(QListBoxItem*,const QPoint&amp;)</signal>
+ <receiver>StatusBar2</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/strings.kmdr b/kommander/examples/tutorial/strings.kmdr
new file mode 100644
index 00000000..1ef6a953
--- /dev/null
+++ b/kommander/examples/tutorial/strings.kmdr
@@ -0,0 +1,206 @@
+<!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>522</width>
+ <height>447</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>String functions</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="TextEdit" row="1" column="0">
+ <property name="name">
+ <cstring>TextEdit1</cstring>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string>@Array.setValue(Bool, 1, yes)
+@Array.setValue(Bool, 0, no)
+
+&lt;h2&gt;Kommander string functions&lt;/h2&gt;
+&lt;b&gt;Length:&lt;/b&gt; @String.length("@LineEdit1")&lt;br&gt;
+&lt;b&gt;First 5 chars:&lt;/b&gt; @String.left("@LineEdit1", 5)&lt;br&gt;
+&lt;b&gt;Last 5 chars:&lt;/b&gt; @String.right("@LineEdit1", 5)&lt;br&gt;
+&lt;b&gt;Chars from 6th to 10th:&lt;/b&gt; @String.mid("@LineEdit1", 6, 5)&lt;br&gt;
+&lt;b&gt;Remove spaces:&lt;/b&gt; @String.remove("@LineEdit1", " ")&lt;br&gt;
+&lt;b&gt;Replace spaces with *&lt;/b&gt;: @String.replace("@LineEdit1", " ", *)&lt;br&gt;
+&lt;b&gt;Uppercase:&lt;/b&gt; @String.upper("@LineEdit1")&lt;br&gt;
+&lt;b&gt;Lowercase:&lt;/b&gt; @String.lower("@LineEdit1")&lt;br&gt;
+&lt;b&gt;Is a number?:&lt;/b&gt; @Array.value(Bool, @String.isNumber("@LineEdit1"))&lt;br&gt;
+&lt;b&gt;Is empty?&lt;/b&gt; @Array.value(Bool, @String.isEmpty("@LineEdit1"))&lt;br&gt;
+&lt;b&gt;Contains "Kommander"?:&lt;/b&gt; @String.contains("@LineEdit1", "Kommander")&lt;br&gt;
+&lt;b&gt;Position of "Kommander":&lt;/b&gt; @String.find("@LineEdit1", "Kommander")&lt;br&gt;
+&lt;b&gt;Compare with "Kommander":&lt;/b&gt;
+@execBegin
+if [ @String.compare("@LineEdit1", "Kommander") -lt 0 ];then
+ echo "Less than Kommander&lt;br&gt;"
+elif [ @String.compare("@LineEdit1", "Kommander") -gt 0 ];then
+ echo "Greater than Kommander &lt;br&gt;"
+elif [ @String.compare("@LineEdit1", "Kommander") -eq 0 ];then
+ echo "Equals Kommander &lt;br&gt;"
+fi
+@execEnd
+&lt;b&gt;Case insensitive match with "Kommander":&lt;/b&gt;
+@execBegin
+if [ @String.compare(@String.lower("@LineEdit1"), "kommander") -eq 0 ];then
+ echo "Match found&lt;br&gt;"
+else
+ echo "Match failed&lt;br&gt;"
+fi
+@execEnd</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="0" 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>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Enter str&amp;ing here:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>LineEdit1</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ <property name="text">
+ <string>I love Kommander!</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" 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>
+ <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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Test</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </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>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>ExecButton1</sender>
+ <signal>clicked()</signal>
+ <receiver>TextEdit1</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>LineEdit1</tabstop>
+ <tabstop>ExecButton1</tabstop>
+ <tabstop>TextEdit1</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/table.kmdr b/kommander/examples/tutorial/table.kmdr
new file mode 100644
index 00000000..a2c5986b
--- /dev/null
+++ b/kommander/examples/tutorial/table.kmdr
@@ -0,0 +1,258 @@
+<!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>629</width>
+ <height>313</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Table Demo</string>
+ </property>
+ <widget class="Table">
+ <column>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </column>
+ <row>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>2</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>3</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>4</string>
+ </property>
+ </row>
+ <property name="name">
+ <cstring>Table</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>400</width>
+ <height>240</height>
+ </rect>
+ </property>
+ <property name="resizePolicy">
+ <enum>AutoOneFit</enum>
+ </property>
+ <property name="numRows">
+ <number>5</number>
+ </property>
+ <property name="numCols">
+ <number>2</number>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout3</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>470</x>
+ <y>10</y>
+ <width>135</width>
+ <height>160</height>
+ </rect>
+ </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="ExecButton">
+ <property name="name">
+ <cstring>AddRowButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add row</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Table.insertRow(@Table.currentRow, 1)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>AddColButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add column</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Table.insertColumn(@Table.currentColumn, 1)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton5</cstring>
+ </property>
+ <property name="text">
+ <string>Remove row</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Table.removeRow(@Table.currentRow, 1)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton6</cstring>
+ </property>
+ <property name="text">
+ <string>Remove Column</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Table.removeColumn(@Table.currentColumn, 1)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer>
+ <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>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout4</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>270</y>
+ <width>585</width>
+ <height>28</height>
+ </rect>
+ </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="ExecButton">
+ <property name="name">
+ <cstring>GetButton</cstring>
+ </property>
+ <property name="text">
+ <string>Get text</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@CellText.setText(@Table.cellText(@Table.currentRow,
+ @Table.currentColumn))</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>CellText</cstring>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>SetButton</cstring>
+ </property>
+ <property name="text">
+ <string>Set text</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Table.setCellText(@Table.currentRow, @Table.currentColumn,
+ @CellText.text)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ColumnCaptionButton</cstring>
+ </property>
+ <property name="text">
+ <string>Set column name</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Table.setColumnCaption(@Table.currentColumn, @CellText.text)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>RowCaptionButton</cstring>
+ </property>
+ <property name="text">
+ <string>Set row name</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Table.setRowCaption(@Table.currentRow, @CellText.text)</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/tree.kmdr b/kommander/examples/tutorial/tree.kmdr
new file mode 100644
index 00000000..bed87709
--- /dev/null
+++ b/kommander/examples/tutorial/tree.kmdr
@@ -0,0 +1,170 @@
+<!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>600</width>
+ <height>528</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>File Tree</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>@FileSelector1.setText(@env(HOME))
+@TreeWidget1.setText(@readSetting(FileTree, ""))</string>
+ <string>@writeSetting(FileTree, @TreeWidget1.text)</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="2" 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>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Add files from selected directory</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@TreeWidget1.clear
+@TreeWidget1.insertItems(@exec(cd @FileSelector1.text &amp;&amp; find * -name "*.kmdr"), -1)</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="text">
+ <string>Remove selected file from the list</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@TreeWidget1.removeItem(@TreeWidget1.currentItem)</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="TreeWidget" row="0" column="0" rowspan="1" colspan="2">
+ <column>
+ <property name="text">
+ <string>File</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>TreeWidget1</cstring>
+ </property>
+ <property name="rootIsDecorated">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>NoColumn</enum>
+ </property>
+ <property name="fullWidth">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Select directory:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="1" column="1">
+ <property name="name">
+ <cstring>FileSelector1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="selectionType">
+ <enum>Directory</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <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="ExecButton">
+ <property name="name">
+ <cstring>ExecButton3</cstring>
+ </property>
+ <property name="text">
+ <string>Find file:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@TreeWidget1.setCurrentItem(@TreeWidget1.findItem(@LineEdit2.text))</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit2</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/examples/tutorial/widgets.kmdr b/kommander/examples/tutorial/widgets.kmdr
new file mode 100644
index 00000000..9e6781c6
--- /dev/null
+++ b/kommander/examples/tutorial/widgets.kmdr
@@ -0,0 +1,133 @@
+<!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>600</width>
+ <height>483</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Widgets and types</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="1" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Widgets</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="SpinBoxInt" row="1" column="0">
+ <property name="name">
+ <cstring>SpinBoxInt1</cstring>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="0" column="0">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ </widget>
+ <widget class="RichTextEditor" row="2" column="0">
+ <property name="name">
+ <cstring>RichTextEditor1</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="ExecButton" row="2" column="0">
+ <property name="name">
+ <cstring>WidgetShow</cstring>
+ </property>
+ <property name="text">
+ <string>Show widgets</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@WidgetList.setText(@Form1.children(true))</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ListBox" row="0" column="0">
+ <property name="name">
+ <cstring>WidgetList</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <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>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>WidgetType</cstring>
+ </property>
+ <property name="populationText">
+ <string>@exec(dcop @dcopid KommanderIf type "@WidgetList.selection")</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>WidgetList</sender>
+ <signal>highlighted(int)</signal>
+ <receiver>WidgetType</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/executor/Makefile.am b/kommander/executor/Makefile.am
new file mode 100644
index 00000000..7d9004fe
--- /dev/null
+++ b/kommander/executor/Makefile.am
@@ -0,0 +1,25 @@
+bin_PROGRAMS = kmdr-executor
+
+noinst_LTLIBRARIES = libinstance.la
+
+libinstance_la_SOURCES = instance.cpp dcopkommanderif.skel
+libinstance_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -no-undefined
+
+
+kmdr_executor_SOURCES = main.cpp
+kmdr_executor_LDADD = libinstance.la $(top_builddir)/kommander/widget/libkommanderwidget.la $(top_builddir)/kommander/widgets/libkommanderwidgets.la $(top_builddir)/kommander/factory/libkommanderfactory.la $(LIB_KIO)
+
+#KDE_ICON = kmdr_executor
+
+appsdir = $(kde_appsdir)/.hidden
+apps_DATA = kmdr-executor.desktop
+
+AM_CPPFLAGS = -I$(top_srcdir)/kommander/plugin -I$(top_srcdir)/kommander/widgets -I$(top_srcdir)/kommander/widget -I$(top_srcdir)/kommander/factory $(all_includes)
+
+
+METASOURCES = AUTO
+
+# the library search path.
+kmdr_executor_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+
+noinst_HEADERS = dcopkommanderif.h
diff --git a/kommander/executor/dcopkommanderif.h b/kommander/executor/dcopkommanderif.h
new file mode 100644
index 00000000..3ee8a552
--- /dev/null
+++ b/kommander/executor/dcopkommanderif.h
@@ -0,0 +1,82 @@
+/***************************************************************************
+ dcopkommanderif.h - description
+ -------------------
+ begin : Tue Jan 27 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 DCOPKOMMANDERIF_H
+#define DCOPKOMMANDERIF_H
+
+#include <dcopobject.h>
+#include <qstringlist.h>
+
+/* See widgets/specials.cpp for description. Deprecated methods are replaced by methods above. */
+
+class DCOPKommanderIf : virtual public DCOPObject
+{
+ K_DCOP
+
+ k_dcop:
+virtual void setEnabled(const QString& widgetName, bool enable) = 0;
+virtual void enableWidget(const QString& widgetName, bool enable) = 0; /* DEPRECATED */
+virtual void setVisible(const QString& widgetName, bool enable) = 0;
+virtual void setText(const QString& widgetName, const QString& text) = 0;
+virtual void changeWidgetText(const QString& widgetName, const QString& text) = 0; /* DEPRECATED */
+virtual QString text(const QString& widgetName) = 0;
+virtual void setSelection(const QString& widgetName, const QString& text) = 0;
+virtual void setCurrentListItem(const QString& widgetName, const QString& text) = 0; /* DEPRECATED */
+virtual QString selection(const QString& widgetName) = 0;
+virtual int currentItem(const QString &widgetName) = 0;
+virtual QString item(const QString &widgetName, int index) = 0;
+virtual int itemDepth(const QString &widgetName, int index) = 0;
+virtual QString itemPath(const QString &widgetName, int index) = 0;
+virtual void removeItem(const QString &widgetName, int index) = 0;
+virtual void removeListItem(const QString &widgetName, int index) = 0; /* DEPRECATED */
+virtual void insertItem(const QString &widgetName, const QString &item, int index) = 0;
+virtual void addListItem(const QString &widgetName, const QString &item, int index) = 0; /* DEPRECATED */
+virtual void setPixmap(const QString &widgetName, const QString &iconName, int index) = 0;
+virtual void insertItems(const QString &widgetName, const QStringList &items, int index) = 0;
+virtual void addListItems(const QString &widgetName, const QStringList &items, int index) = 0;/*DEPRECATED*/
+virtual void addUniqueItem(const QString &widgetName, const QString &item) = 0;
+virtual int findItem(const QString &widgetName, const QString &item) = 0;
+virtual void clear(const QString &widgetName) = 0;
+virtual void clearList(const QString &widgetName) = 0; /* DEPRECATED */
+virtual void setCurrentItem(const QString &widgetName, int index) = 0;
+virtual void setCurrentTab(const QString &widgetName, int index) = 0; /* DEPRECATED */
+virtual void insertTab(const QString &widgetName, const QString &label, int index) = 0;
+virtual bool checked(const QString &widgetName) = 0;
+virtual void setChecked(const QString &widgetName, bool checked) = 0;
+virtual void setAssociatedText(const QString &widgetName, const QString &text) = 0;
+virtual QStringList associatedText(const QString &widgetName) = 0;
+virtual QString type(const QString& widget) = 0;
+virtual QStringList children(const QString& parent, bool recursive) = 0;
+virtual QString global(const QString& variableName) = 0;
+virtual void setGlobal(const QString& variableName, const QString& value) = 0;
+virtual void setMaximum(const QString &widgetName, int value) = 0;
+virtual QString execute(const QString &widgetName) = 0;
+virtual void cancel(const QString &widgetName) = 0;
+virtual int count(const QString &widgetName) = 0;
+virtual int currentColumn(const QString &widgetName) = 0;
+virtual int currentRow(const QString &widgetName) = 0;
+virtual void insertRow(const QString &widgetName, int row, int count) = 0;
+virtual void insertColumn(const QString &widgetName, int column, int count) = 0;
+virtual void setCellText(const QString &widgetName, int row, int column, const QString& text) = 0;
+virtual QString cellText(const QString &widgetName, int row, int column) = 0;
+virtual void removeRow(const QString &widgetName, int row, int count) = 0;
+virtual void removeColumn(const QString &widgetName, int column, int count) = 0;
+virtual void setRowCaption(const QString &widgetName, int row, const QString& text) = 0;
+virtual void setColumnCaption(const QString &widgetName, int column, const QString& text) = 0;
+virtual int getWinID() = 0;
+virtual void setBusyCursor(bool busy) = 0;
+};
+
+#endif
diff --git a/kommander/executor/instance.cpp b/kommander/executor/instance.cpp
new file mode 100644
index 00000000..2ff4edfd
--- /dev/null
+++ b/kommander/executor/instance.cpp
@@ -0,0 +1,683 @@
+/***************************************************************************
+ instance.cpp - running instance of a dialog
+ -------------------
+ begin : Tue Aug 13 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2004 by Andras Mantia <amantia@kde.org>
+ (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. *
+ * *
+ ***************************************************************************/
+
+ /* KDE INCLUDES */
+#include <kapplication.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstandarddirs.h>
+
+/* QT INCLUDES */
+#include <qdialog.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qiodevice.h>
+#include <qlabel.h>
+#include <qmainwindow.h>
+#include <qobjectlist.h>
+#include <qstring.h>
+#include <qtabwidget.h>
+#include <qwidget.h>
+#include <qcursor.h>
+
+/* OTHER INCLUDES */
+#include "instance.h"
+#include "kommanderwidget.h"
+#include "kommanderwindow.h"
+#include "kommanderfactory.h"
+#include "kommanderversion.h"
+#include "specials.h"
+#include "specialinformation.h"
+#include "fileselector.h"
+
+Instance::Instance()
+ : DCOPObject("KommanderIf"), m_instance(0), m_textInstance(0), m_parent(0)
+{
+ SpecialInformation::registerSpecials();
+}
+
+Instance::Instance(QWidget *a_parent)
+ : DCOPObject("KommanderIf"), m_instance(0), m_textInstance(0),
+ m_parent(a_parent)
+{
+ SpecialInformation::registerSpecials();
+}
+
+void Instance::addCmdlineArguments(const QStringList& args)
+{
+ if (!m_textInstance)
+ return;
+ // Filter out variable arguments ('var=value')
+ QStringList stdArgs;
+ for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
+ {
+ int pos = (*it).find('=');
+ if (pos != -1)
+ m_textInstance->setGlobal((*it).left(pos), (*it).mid(pos+1));
+ else
+ stdArgs.append(*it);
+ }
+ int i = 0;
+ for (QStringList::ConstIterator it = stdArgs.begin(); it != stdArgs.end(); ++it)
+ m_textInstance->setGlobal(QString("_ARG%1").arg(++i), *it);
+ m_textInstance->setGlobal("_ARGS", stdArgs.join(" "));
+ m_textInstance->setGlobal("_ARGCOUNT", QString::number(stdArgs.count()));
+}
+
+
+
+Instance::~Instance()
+{
+ delete m_instance;
+}
+
+/** Builds the instance */
+bool Instance::build(const KURL& fname)
+{
+ delete m_instance;
+ m_instance = 0;
+ m_textInstance = 0;
+
+ if (!fname.isValid() || !isFileValid(fname))
+ return false; // Check if file is correct
+
+ // create the main instance, must inherit QDialog
+ KommanderFactory::loadPlugins();
+
+ if (fname.isValid())
+ m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast<QWidget*>(parent()));
+ else
+ {
+ QFile inputFile;
+ inputFile.open(IO_ReadOnly, stdin);
+ m_instance = KommanderFactory::create(&inputFile);
+ }
+
+ // check if build was successful
+ if (!m_instance)
+ {
+ KMessageBox::sorry(0, i18n("<qt>Unable to create dialog.</qt>"));
+ return false;
+ }
+
+ KommanderWindow* window = dynamic_cast<KommanderWindow*>((QWidget*)m_instance);
+ if (window)
+ window->setFileName(fname.path().local8Bit());
+
+ // FIXME : Should verify that all of the widgets in the dialog derive from KommanderWidget
+ m_textInstance = kommanderWidget(m_instance);
+
+ if (!m_textInstance) // Main dialog/window is not a Kommander widget - look for one
+ {
+ if (m_instance)
+ {
+ QObjectList* widgets = m_instance->queryList();
+ for (QObject* w = widgets->first(); w; w = widgets->next())
+ if (kommanderWidget(w))
+ {
+ m_textInstance = kommanderWidget(w);
+ break;
+ }
+ }
+ if (!m_textInstance)
+ {
+ qDebug("Warning: no Kommander widget present!");
+ return true;
+ }
+ }
+
+ if (fname.isValid())
+ {
+ m_textInstance->setGlobal("KDDIR", fname.directory());
+ m_textInstance->setGlobal("NAME", fname.fileName());
+ m_textInstance->setGlobal("_PID", QString().setNum(getpid()));
+ m_textInstance->setGlobal("VERSION", KOMMANDER_VERSION);
+ }
+ return true;
+}
+
+bool Instance::run()
+{
+ if (!isBuilt())
+ return false;
+
+ // Handle both dialogs and main windows
+ if (m_instance->inherits("QDialog"))
+ dynamic_cast<QDialog*>((QWidget*)m_instance)->exec();
+ else if (m_instance->inherits("QMainWindow"))
+ {
+ kapp->setMainWidget(m_instance);
+ dynamic_cast<QMainWindow*>((QWidget*)m_instance)->show();
+ kapp->exec();
+ }
+ else return false;
+ return true;
+}
+
+bool Instance::isBuilt() const
+{
+ return m_instance;
+}
+
+void Instance::setParent(QWidget *a_parent)
+{
+ m_parent = a_parent;
+}
+
+bool Instance::isFileValid(const KURL& fname) const
+{
+ if (!QFileInfo(fname.path()).exists())
+ {
+ KMessageBox::sorry(0, i18n("<qt>Kommander file<br><b>%1</b><br>does not "
+ "exist.</qt>").arg(fname.path()));
+ return false;
+ }
+
+ // Check whether extension is *.kmdr
+ if (!fname.fileName().endsWith(".kmdr"))
+ {
+ KMessageBox::error(0, i18n("<qt>This file does not have a <b>.kmdr</b> extension. As a security precaution "
+ "Kommander will only run Kommander scripts with a clear identity.</qt>"),
+ i18n("Wrong Extension"));
+ return false;
+ }
+
+ // Check whether file is not in some temporary directory.
+ QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ tmpDirs += KGlobal::dirs()->resourceDirs("cache");
+ tmpDirs.append("/tmp/");
+ tmpDirs.append("/var/tmp/");
+
+ bool inTemp = false;
+ for (QStringList::ConstIterator I = tmpDirs.begin(); I != tmpDirs.end(); ++I)
+ if (fname.directory(false).startsWith(*I))
+ inTemp = true;
+
+ if (inTemp)
+ {
+ if (KMessageBox::warningContinueCancel(0, i18n("<qt>This dialog is running from your <i>/tmp</i> directory. "
+ " This may mean that it was run from a KMail attachment or from a webpage. "
+ "<p>Any script contained in this dialog will have write access to all of your home directory; "
+ "<b>running such dialogs may be dangerous: </b>"
+ "<p>are you sure you want to continue?</qt>"), QString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
+ return false;
+ }
+ if (!QFileInfo(fname.path()).isExecutable())
+ {
+ if (KMessageBox::warningContinueCancel(0, i18n("<qt>The Kommander file <i>%1</i> does not have the <b>executable attribute</b> set and could possibly contain dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.<p>Are you sure you want to continue?</qt>").arg(fname.pathOrURL()), QString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
+ return false;
+ }
+ return true;
+}
+
+
+
+
+
+// Widget functions
+void Instance::setEnabled(const QString& widgetName, bool enable)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (child && child->inherits("QWidget"))
+ ((QWidget*)child)->setEnabled(enable);
+}
+
+void Instance::setVisible(const QString& widgetName, bool visible)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (child && child->inherits("QWidget"))
+ ((QWidget*)child)->setShown(visible);
+}
+
+void Instance::setText(const QString& widgetName, const QString& text)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::setText, text);
+ else if (child && child->inherits("QLabel"))
+ {
+ QLabel* label = (QLabel*)child;
+ if (label->pixmap())
+ {
+ QPixmap pixmap;
+ if (pixmap.load(text))
+ label->setPixmap(pixmap);
+ }
+ else
+ label->setText(text);
+ }
+}
+
+QString Instance::text(const QString& widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::text);
+ else if (child && child->inherits("QLabel"))
+ return ((QLabel*)child)->text();
+ return QString();
+}
+
+void Instance::setSelection(const QString& widgetName, const QString& text)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::setSelection, text);
+ else if (child && child->inherits("QLabel"))
+ ((QLabel*)child)->setText(text);
+}
+
+QString Instance::selection(const QString& widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::selection);
+ return QString();
+}
+
+int Instance::currentItem(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::currentItem).toInt();
+ return -1;
+}
+
+QString Instance::item(const QString &widgetName, int i)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::item, QString::number(i));
+ return QString();
+}
+
+void Instance::removeItem(const QString &widgetName, int index)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::removeItem, QString::number(index));
+}
+
+void Instance::insertItem(const QString &widgetName, const QString &item, int index)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(item);
+ args += QString::number(index);
+ kommanderWidget(child)->handleDCOP(DCOP::insertItem, args);
+ }
+}
+
+void Instance::insertItems(const QString &widgetName, const QStringList &items, int index)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(items.join("\n"));
+ args += QString::number(index);
+ kommanderWidget(child)->handleDCOP(DCOP::insertItems, args);
+ }
+}
+
+int Instance::findItem(const QString &widgetName, const QString& item)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::findItem, item).toInt();
+ return -1;
+}
+
+void Instance::addUniqueItem(const QString &widgetName, const QString &item)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::addUniqueItem, item);
+}
+
+int Instance::itemDepth(const QString &widgetName, int index)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::itemDepth, QString::number(index)).toInt();
+ return -1;
+}
+
+QString Instance::itemPath(const QString &widgetName, int index)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::itemPath, QString::number(index));
+ return QString();
+}
+
+
+void Instance::setPixmap(const QString &widgetName, const QString& iconName, int index)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(iconName);
+ args += QString::number(index);
+ kommanderWidget(child)->handleDCOP(DCOP::setPixmap, args);
+ }
+}
+
+void Instance::clear(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::clear);
+}
+
+void Instance::setCurrentItem(const QString &widgetName, int index)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::setCurrentItem, QString::number(index));
+}
+
+void Instance::setChecked(const QString &widgetName, bool checked)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::setChecked, checked ? "true" : "false");
+}
+
+bool Instance::checked(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::checked, widgetName) == "1";
+ return false;
+}
+
+void Instance::setAssociatedText(const QString &widgetName, const QString& text)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->setAssociatedText(QStringList::split('\n', text, true));
+}
+
+QStringList Instance::associatedText(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->associatedText();
+ return QString();
+}
+
+QString Instance::type(const QString& widget)
+{
+ QObject* child = stringToWidget(widget);
+ if (child && child->inherits("QWidget"))
+ return child->className();
+ return QString();
+}
+
+QStringList Instance::children(const QString& parent, bool recursive)
+{
+ QStringList matching;
+ QObject* child = stringToWidget(parent);
+ QObjectList* widgets;
+ if (!child)
+ child = m_instance;
+ if (child->inherits("QWidget"))
+ {
+ widgets = child->queryList("QWidget", 0, false, recursive);
+ for (QObject* w = widgets->first(); w; w = widgets->next())
+ if (w->name() && kommanderWidget(w))
+ matching.append(w->name());
+ }
+ return matching;
+}
+
+void Instance::setMaximum(const QString &widgetName, int value)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::setMaximum, QString::number(value));
+}
+
+QString Instance::execute(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::execute);
+ return "";
+}
+
+void Instance::cancel(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::cancel);
+}
+
+int Instance::count(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::count).toInt();
+ return -1;
+}
+
+int Instance::currentColumn(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::currentColumn).toInt();
+ return -1;
+}
+
+int Instance::currentRow(const QString &widgetName)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ return kommanderWidget(child)->handleDCOP(DCOP::currentRow).toInt();
+ return -1;
+}
+
+void Instance::insertRow(const QString &widgetName, int row, int count)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(QString::number(row));
+ args += QString::number(count);
+ kommanderWidget(child)->handleDCOP(DCOP::insertRow, args);
+ }
+}
+
+void Instance::insertColumn(const QString &widgetName, int column, int count)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(QString::number(column));
+ args += QString::number(count);
+ kommanderWidget(child)->handleDCOP(DCOP::insertColumn, args);
+ }
+}
+
+void Instance::setCellText(const QString &widgetName, int row, int column, const QString& text)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(QString::number(row));
+ args += QString::number(column);
+ args += text;
+ kommanderWidget(child)->handleDCOP(DCOP::setCellText, args);
+ }
+}
+
+QString Instance::cellText(const QString &widgetName, int row, int column)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(QString::number(row));
+ args += QString::number(column);
+ return kommanderWidget(child)->handleDCOP(DCOP::cellText, args);
+ }
+ else return QString();
+}
+
+void Instance::removeRow(const QString &widgetName, int row, int count)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(QString::number(row));
+ args += QString::number(count);
+ kommanderWidget(child)->handleDCOP(DCOP::removeRow, args);
+ }
+}
+
+void Instance::removeColumn(const QString &widgetName, int column, int count)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(QString::number(column));
+ args += QString::number(count);
+ kommanderWidget(child)->handleDCOP(DCOP::removeColumn, args);
+ }
+}
+
+void Instance::setRowCaption(const QString &widgetName, int row, const QString& text)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(QString::number(row));
+ args += text;
+ kommanderWidget(child)->handleDCOP(DCOP::setRowCaption, args);
+ }
+}
+
+void Instance::setColumnCaption(const QString &widgetName, int column, const QString& text)
+{
+ QObject* child = stringToWidget(widgetName);
+ if (kommanderWidget(child))
+ {
+ QStringList args(QString::number(column));
+ args += text;
+ kommanderWidget(child)->handleDCOP(DCOP::setColumnCaption, args);
+ }
+}
+
+
+
+
+
+
+
+
+
+
+QString Instance::global(const QString& variableName)
+{
+ return m_textInstance ? m_textInstance->global(variableName) : QString();
+}
+
+void Instance::setGlobal(const QString& variableName, const QString& value)
+{
+ if (m_textInstance)
+ m_textInstance->setGlobal(variableName, value);
+}
+
+QObject* Instance::stringToWidget(const QString& name)
+{
+ return m_instance->child(name);
+}
+
+KommanderWidget* Instance::kommanderWidget(QObject* object)
+{
+ return dynamic_cast<KommanderWidget*>(object);
+}
+
+
+/*** Deprecated methods: just call appropriate method ***/
+void Instance::changeWidgetText(const QString& widgetName, const QString& text)
+{
+ setText(widgetName, text);
+}
+
+void Instance::clearList(const QString &widgetName)
+{
+ clear(widgetName);
+}
+
+void Instance::setCurrentListItem(const QString& widgetName, const QString& item)
+{
+ setSelection(widgetName, item);
+}
+
+void Instance::setCurrentTab(const QString &widgetName, int index)
+{
+ setCurrentItem(widgetName, index);
+}
+
+void Instance::insertTab(const QString &widgetName, const QString &label, int index)
+{
+ QObject* child = stringToWidget(widgetName);
+ QStringList l;
+ l << label;
+ l << QString::number(index);
+ if (kommanderWidget(child))
+ kommanderWidget(child)->handleDCOP(DCOP::insertTab, l);
+}
+
+void Instance::addListItems(const QString &widgetName, const QStringList &items, int index)
+{
+ insertItems(widgetName, items, index);
+}
+
+void Instance::enableWidget(const QString& widgetName, bool enable)
+{
+ setEnabled(widgetName, enable);
+}
+
+void Instance::removeListItem(const QString &widgetName, int index)
+{
+ removeItem(widgetName, index);
+}
+
+void Instance::addListItem(const QString & widgetName, const QString & item, int index)
+{
+ insertItem(widgetName, item, index);
+}
+
+int Instance::getWinID()
+{
+ return m_instance->winId();
+}
+
+void Instance::setBusyCursor(bool busy)
+{
+ if (busy)
+ m_instance->setCursor(QCursor(Qt::WaitCursor));
+ else
+ m_instance->setCursor(QCursor(Qt::ArrowCursor));
+}
+
+
+#include "instance.moc"
diff --git a/kommander/executor/instance.h b/kommander/executor/instance.h
new file mode 100644
index 00000000..66b97455
--- /dev/null
+++ b/kommander/executor/instance.h
@@ -0,0 +1,137 @@
+/***************************************************************************
+ instance.h - description
+ -------------------
+ begin : Tue Aug 13 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2004 by Andras Mantia <amantia@kde.org>
+ (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 INSTANCE_H
+#define INSTANCE_H
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qobject.h>
+#include <qmap.h>
+#include <qguardedptr.h>
+
+/* KDE INCLUDES */
+#include <kurl.h>
+
+/* OTHER INCLUDES */
+#include "dcopkommanderif.h"
+
+/* FORWARD DECLARATIONS */
+class QWidget;
+class QDialog;
+class QFile;
+class KommanderWidget;
+
+
+
+class Instance : public QObject, virtual public DCOPKommanderIf
+{
+ Q_OBJECT
+
+public:
+ Instance();
+ Instance(QWidget*);
+ ~Instance();
+ /* passing global variables: two forms are accepted.
+ kdmr-executor file.kmdr COUNT=45 PATH=/tmp - this adds global variables 45 and PATH
+ kmdr-executor file.kmdr 45 /tmp - this adds global variables ARG1 and ARG2
+ ARGS holds space-separated list of all second-type variables (like Bash $@)
+ ARGCOUNT holds number of second-type arguments
+ */
+ virtual void addCmdlineArguments(const QStringList& args);
+
+ //DCOP methods. The documentation is in the widgets/specials.cpp file.
+ virtual void setEnabled(const QString& widgetName, bool enable);
+ virtual void enableWidget(const QString& widgetName, bool enable); /* DEPRECATED */
+ virtual void setVisible(const QString& widgetName, bool enable);
+ virtual void setText(const QString& widgetName, const QString& text);
+ virtual void changeWidgetText(const QString& widgetName, const QString& text); /* DEPRECATED */
+ virtual QString text(const QString& widgetName);
+ virtual void setSelection(const QString& widgetName, const QString& text);
+ virtual void setCurrentListItem(const QString& widgetName, const QString& text); /* DEPRECATED */
+ virtual QString selection(const QString& widgetName);
+ virtual int currentItem(const QString &widgetName);
+ virtual QString item(const QString &widgetName, int index);
+ virtual int itemDepth(const QString &widgetName, int index);
+ virtual QString itemPath(const QString &widgetName, int index);
+ virtual void removeItem(const QString &widgetName, int index);
+ virtual void removeListItem(const QString &widgetName, int index); /* DEPRECATED */
+ virtual void insertItem(const QString &widgetName, const QString &item, int index);
+ virtual void addListItem(const QString &widgetName, const QString &item, int index); /* DEPRECATED */
+ virtual void setPixmap(const QString &widgetName, const QString &iconName, int index);
+ virtual void insertItems(const QString &widgetName, const QStringList &items, int index);
+ virtual void addListItems(const QString &widgetName, const QStringList &items, int index);/*DEPRECATED*/
+ virtual void addUniqueItem(const QString &widgetName, const QString &item);
+ virtual int findItem(const QString &widgetName, const QString &item);
+ virtual void clear(const QString &widgetName);
+ virtual void clearList(const QString &widgetName); /* DEPRECATED */
+ virtual void setCurrentItem(const QString &widgetName, int index);
+ virtual void setCurrentTab(const QString &widgetName, int index); /* DEPRECATED */
+ virtual void insertTab(const QString &widgetName, const QString &label, int index);
+ virtual void setChecked(const QString &widgetName, bool checked);
+ virtual bool checked(const QString &widgetName);
+ virtual void setAssociatedText(const QString &widgetName, const QString &text);
+ virtual QStringList associatedText(const QString &widgetName);
+ virtual QString type(const QString& widget);
+ virtual QStringList children(const QString& parent, bool recursive);
+ virtual QString global(const QString& variableName);
+ virtual void setGlobal(const QString& variableName, const QString& value);
+ virtual void setMaximum(const QString &widgetName, int value);
+ virtual QString execute(const QString &widgetName);
+ virtual void cancel(const QString &widgetName);
+ virtual int count(const QString &widgetName);
+ virtual int currentColumn(const QString &widgetName);
+ virtual int currentRow(const QString &widgetName);
+ virtual void insertRow(const QString &widgetName, int row, int count);
+ virtual void insertColumn(const QString &widgetName, int column, int count);
+ virtual void setCellText(const QString &widgetName, int row, int column, const QString& text);
+ virtual QString cellText(const QString &widgetName, int row, int column);
+ virtual void removeRow(const QString &widgetName, int row, int count);
+ virtual void removeColumn(const QString &widgetName, int column, int count);
+ virtual void setRowCaption(const QString &widgetName, int row, const QString& text);
+ virtual void setColumnCaption(const QString &widgetName, int column, const QString& text);
+ virtual int getWinID();
+ virtual void setBusyCursor(bool busy);
+ QWidget *widget() { return m_instance;}
+
+public slots:
+ /** Sets the instance's parent */
+ void setParent(QWidget*);
+ /** Returns whether the instance is built */
+ bool isBuilt() const;
+ /** Builds the instance. Uses stdin if no filename is given */
+ bool build(const KURL& fname);
+ /** Executes the instance which was built before */
+ bool run();
+private:
+ /** Check if the file exists, has correct extension and is not in a temporary (insecure) directory */
+ bool isFileValid(const KURL& fname) const;
+ /* Dialog Instance */
+ QGuardedPtr<QWidget> m_instance;
+ /* Associated Text Instance */
+ KommanderWidget *m_textInstance;
+ /** The parent widget */
+ QWidget *m_parent;
+ /* Get object by name */
+ QObject* stringToWidget(const QString& name);
+ /* Cast to Kommander widget if possible */
+ KommanderWidget* kommanderWidget(QObject* object);
+};
+
+#endif
diff --git a/kommander/executor/kmdr-executor.desktop b/kommander/executor/kmdr-executor.desktop
new file mode 100644
index 00000000..88489c68
--- /dev/null
+++ b/kommander/executor/kmdr-executor.desktop
@@ -0,0 +1,82 @@
+# KDE Config File
+[Desktop Entry]
+Type=Application
+Exec=kmdr-executor %F
+Icon=kommander
+Comment=Executor for Kommander dialogs
+Comment[bg]=Изпълнение на диалогови прозорци
+Comment[ca]=Executor per a diàlegs de Kommander
+Comment[cs]=SpouÅ¡tÄ›Ä dialogů Kommanderu
+Comment[da]=Udfører Kommanders dialoger
+Comment[de]=Stellt Kommander-Dialoge dar
+Comment[el]=Εκτελεστής για διαλόγους Kommander
+Comment[en_GB]=Executor for Kommander dialogues
+Comment[es]=Lanzador de cuadros de diálogo de Kommander
+Comment[et]=Kommanderi dialoogide rakendaja
+Comment[eu]=Kommander-en elkarrizketen exekutatzailea
+Comment[fa]=مجری محاوره‌های Kommander
+Comment[fi]=Komentodialogien rakentaja
+Comment[fr]=Exécuteur de boîtes de dialogue de Kommander
+Comment[gl]=Executor para os diálogos de Kommander
+Comment[hi]=कमांडर संवादों हेतॠकारà¥à¤¯à¤ªà¤¾à¤²à¤•
+Comment[hu]=Megjelenítőprogram Kommander-párbeszédablakokhoz
+Comment[is]=Executor fyrir Kommander glugga
+Comment[it]=Esecutore per maschere di Kommander
+Comment[ja]=Kommander ダイアログ用㮠Executor
+Comment[ka]=Kommander-ის დიáƒáƒšáƒáƒ’ის შემსრულებელნი
+Comment[lt]=Kommander dialogų vykdyklė
+Comment[ms]=Pelaksana untuk dialog Kommander
+Comment[nds]=Föhrt Kommander-Dialogen ut
+Comment[ne]=आदेश संवादका लागि निरà¥à¤µà¤¾à¤¹à¤•
+Comment[nl]=Kommander-dialogen uitvoeren
+Comment[pl]=Uruchamianie z okien dialogowych Kommandera
+Comment[pt]=Executor dos diálogos do Kommander
+Comment[pt_BR]=Executor para diálogos do Kommander
+Comment[ru]=Выполнение диалогов Kommander
+Comment[sk]=SpúštaÄ pre Kommander dialógy
+Comment[sl]=Izvajalnik za pogovorna okna Kommanderja
+Comment[sr]=Извршавач за Kommander-ове дијалоге
+Comment[sr@Latn]=IzvrÅ¡avaÄ za Kommander-ove dijaloge
+Comment[sv]=Körning av Kommander-dialogrutor
+Comment[ta]=Kகடà¯à®Ÿà®³à¯ˆ உரையாடல௠நிகழà¯à®¤à¯à®¤à¯à®ªà®µà®°à¯
+Comment[tg]=Иҷрокунанда барои диалогҳои Kommander
+Comment[tr]=Kommander diyalogları için çalıştırıcı
+Comment[uk]=ЗапуÑкач Ð´Ð»Ñ Ð²Ñ–ÐºÐ¾Ð½ Kommander
+Comment[zh_CN]=Kommander 对è¯æ¡†æ‰§è¡Œå™¨
+Comment[zh_HK]=Kommander å°è©±ç›’çš„é‹è¡Œç¨‹å¼
+Comment[zh_TW]=Kommander å°è©±ç›’çš„é‹è¡Œç¨‹å¼
+Terminal=false
+Name=Kommander Executor
+Name[br]=Aozer Kommander
+Name[ca]=Executor Kommander
+Name[cs]=SpouÅ¡tÄ›Ä Kommanderu
+Name[de]=Kommander-Exekutor
+Name[el]=Εκτελεστής Kommander
+Name[eu]=Kommander exekutatzailea
+Name[fa]=مجری Kommander
+Name[fi]=Komennon suorittaja
+Name[fr]=Exécuteur de Kommander
+Name[gl]=Executor de Kommander
+Name[hi]=कमांडर कारà¥à¤¯à¤ªà¤¾à¤²à¤•
+Name[it]=Esecutore per Kommander
+Name[lt]=Kommander vykdyklÄ—
+Name[ms]=Pelaksana Kommander
+Name[nds]=Kommander-Executor
+Name[ne]=आदेश निरà¥à¤µà¤¾à¤¹à¤•
+Name[nl]=Kommander Uitvoerder
+Name[pl]=Kommander: uruchamianie
+Name[pt]=Executor do Kommander
+Name[pt_BR]=Executor do Kommander
+Name[ru]=Kommander
+Name[sk]=Kommander spúštaÄ
+Name[sl]=Izvajalnik Kommander
+Name[sr]=Kommander извршавач
+Name[sr@Latn]=Kommander izvrÅ¡avaÄ
+Name[ta]=Kகடà¯à®Ÿà®³à¯ˆ நிகழà¯à®¤à¯à®¤à¯à®ªà®µà®°à¯
+Name[tg]=Иҷрокунандаи Kommander
+Name[tr]=Kommander Çalıştırıcısı
+Name[uk]=ЗапуÑкач Kommander
+Name[zh_CN]=Kommander 执行器
+Name[zh_HK]=Kommander 執行器
+Name[zh_TW]=Kommander 執行器
+MimeType=application/x-kommander
diff --git a/kommander/executor/main.cpp b/kommander/executor/main.cpp
new file mode 100644
index 00000000..589ec1cd
--- /dev/null
+++ b/kommander/executor/main.cpp
@@ -0,0 +1,102 @@
+/***************************************************************************
+ main.cpp - description
+ -------------------
+ begin : Tue Aug 13 09:31:50 EST 2002
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optushome.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <kaboutdata.h>
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kurl.h>
+#include <kmessagebox.h>
+
+/* QT INCLUDES */
+#include <qapplication.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <cstdio>
+#include <cstdlib>
+#include "instance.h"
+#include <iostream>
+#include <kommanderversion.h>
+
+using std::cout;
+using std::endl;
+using std::cerr;
+
+
+static const char *description =
+ I18N_NOOP("Executor is a component of the Kommander dialog system that executes .kmdr files given as arguments or via stdin");
+// INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
+
+static KCmdLineOptions options[] =
+{
+ { "!stdin", I18N_NOOP("Read dialog from standard input"), 0},
+ { "c <catalog>", I18N_NOOP("Use given catalog for translation"), 0},
+ { "+[file]", I18N_NOOP("Dialog to open"), 0 },
+ KCmdLineLastOption
+};
+
+int main(int argc, char *argv[])
+{
+ KAboutData aboutData( "kmdr-executor", I18N_NOOP("Kommander Executor"),
+ KOMMANDER_VERSION, description, KAboutData::License_GPL,
+ "(c) 2002, Marc Britton, (C) 2008 Andras Mantia", 0, 0, "http://kommander.kdewebdev.org");
+ aboutData.addAuthor("Andras Mantia", I18N_NOOP("Current maintainer"), "amantia@kdewebdev.org");
+ aboutData.addAuthor("Michal Rudolf", I18N_NOOP("Previous maintainer"), "mrudolf@kdewebdev.org");
+ aboutData.addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au");
+ KCmdLineArgs::init( argc, argv, &aboutData );
+ KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ if (args->isSet("c"))
+ KLocale::setMainCatalogue(args->getOption("c"));
+ else if (args->count())
+ {
+ char buf[200];
+ QString baseFile = args->url(0).fileName();
+ int ext = baseFile.findRev('.');
+ if (ext != -1)
+ baseFile = baseFile.left(ext);
+ strcpy(buf, baseFile.latin1());
+ KLocale::setMainCatalogue(buf);
+ }
+ else
+ KLocale::setMainCatalogue("kommander");
+ KApplication app;
+
+ QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
+ if (!args->count())
+ {
+ KMessageBox::sorry(0, i18n("Error: no dialog given. Use --stdin option to read dialog from standard input.\n"));
+ return -1;
+ }
+ Instance instance;
+ if (!instance.build(args->isSet("stdin") ? QString() : args->url(0)))
+ return -1;
+
+ // Read command-line variables
+ QStringList cmdargs;
+ for (int i = !args->isSet("stdin"); i<args->count(); i++)
+ cmdargs.append(args->arg(i));
+ instance.addCmdlineArguments(cmdargs);
+
+ instance.run();
+ return 0;
+}
diff --git a/kommander/executor/register.cpp b/kommander/executor/register.cpp
new file mode 100644
index 00000000..e6c41b7f
--- /dev/null
+++ b/kommander/executor/register.cpp
@@ -0,0 +1,104 @@
+/***************************************************************************
+ register.cpp - registration of functions/specials for intance
+ -------------------
+ 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 "instance.h"
+#include <dcopinformation.h>
+#include <specialinformation.h>
+
+#include <klocale.h>
+
+void Instance::registerDCOP()
+{
+ DCOPInformation::insert("enableWidget(QString,bool)");
+ DCOPInformation::insert("changeWidgetText(QString,QString)");
+ DCOPInformation::insert("currentItem(QString)");
+ DCOPInformation::insert("item(QString,int)");
+ DCOPInformation::insert("removeListItem(QString,int)");
+ DCOPInformation::insert("addListItem(QString,QString,int)");
+ DCOPInformation::insert("addListItems(QString,QStringList,int)");
+ DCOPInformation::insert("addUniqueItem(QString,QString)");
+ DCOPInformation::insert("findItem(QString,QString)");
+ DCOPInformation::insert("clearList(QString)");
+ DCOPInformation::insert("setCurrentListItem(QString,QString)");
+ DCOPInformation::insert("setCurrentTab(QString,int)");
+ DCOPInformation::insert("insertTab(QString,QString,int)");
+ DCOPInformation::insert("setChecked(QString, bool)");
+ DCOPInformation::insert("setAssociatedText(QString,QString)");
+ DCOPInformation::insert("associatedText(QString)");
+ DCOPInformation::insert("global(QString)");
+ DCOPInformation::insert("setGlobal(QString,QString)");
+}
+
+void Instance::registerSpecials()
+{
+ /* global specials */
+ SpecialInformation::insert("widgetText", 0, 0);
+ SpecialInformation::insert("selectedWidgetText", 0, 0);
+ SpecialInformation::insert("null", 0, 0);
+ SpecialInformation::insert("pid", 0, 0);
+ SpecialInformation::insert("dcopid", 0, 0);
+ SpecialInformation::insert("parentPid", 0, 0);
+ SpecialInformation::insert("execBegin", 0, 1);
+ SpecialInformation::insert("env", 1, 1);
+ SpecialInformation::insert("exec", 1, 1);
+ SpecialInformation::insert("execBackground", 1, 1);
+ SpecialInformation::insert("global", 1, 1);
+ SpecialInformation::insert("dialog", 1, 2);
+ SpecialInformation::insert("readSetting", 2, 2);
+ SpecialInformation::insert("setGlobal", 2, 2);
+ SpecialInformation::insert("writeSetting", 2, 2);
+ SpecialInformation::insert("dcop", 4, 10);
+
+ /* array specials */
+ SpecialInformation::setCurrentObject("Array");
+ SpecialInformation::insert("values", 1, 1, i18n( "Return EOL-separated list of all values in the array.") );
+ SpecialInformation::insert("keys", 1, 1, i18n( "Return EOL-separated list of all keys in the array.") );
+ SpecialInformation::insert("clear", 1, 1, i18n( "Remove all elements from the array.") );
+ SpecialInformation::insert("count", 1, 1, i18n( "Return number of elements in the array.") );
+ SpecialInformation::insert("value", 2, 2, i18n( "Return the value associated with given key.") );
+ SpecialInformation::insert("remove", 2, 2, i18n( "Remove element with given key from the array.") );
+ SpecialInformation::insert("setValue", 3, 3, i18n( "Add element with given key and value to the array") );
+ SpecialInformation::insert("fromString", 2, 2, i18n( "Add all elements in the string to the array. "
+ "String should have <i>key>\\tvalue\\n</i> format.") );
+ SpecialInformation::insert("toString", 1, 1, i18n( "Return all elements in the array in "
+ "<i>key>\\tvalue\\n</i> format.") );
+ SpecialInformation::insertInternal("indexedFromString", 3, 3, i18n( "Create an integer indexed array - starting from 0 - from a string. Use the separator character to split the string.") );
+ SpecialInformation::insertInternal("indexedToString", 2, 2, i18n( "Create a string from an integer indexed array. Concatenate the elements with the separator character.") );
+ SpecialInformation::insertInternal("indexedRemoveElement", 2, 2, i18n( "Remove the element specified by the key from an indexed array and reindex the array.") );
+
+ SpecialInformation::setCurrentObject("String");
+ SpecialInformation::insert("length", 1, 1, i18n( "Return number of chars in the string.") );
+ SpecialInformation::insert("contains", 2, 2, i18n( "Check if the string contains given substring.") );
+ SpecialInformation::insert("find", 2, 2, i18n( "Return position of a substring in the string, "
+ "or -1 if it isn't found.") );
+ SpecialInformation::insert("left", 2, 2, i18n( "Return first n chars of the string.") );
+ SpecialInformation::insert("right", 2, 2, i18n( "Return last n chars of the string.") );
+ SpecialInformation::insert("mid", 3, 3, i18n( "Return substring of the string, starting from "
+ "given position.") );
+ SpecialInformation::insert("remove", 2, 2, i18n( "Replace all occurencies of given substring.") );
+ SpecialInformation::insert("replace", 3, 3, i18n( "Replace all occurencies of given substring "
+ "with given replacement.") );
+ SpecialInformation::insert("upper", 1, 1, i18n( "Convert the string to uppercase.") );
+ SpecialInformation::insert("lower", 1, 1, i18n( "Convert the string to lowercase.") );
+ SpecialInformation::insert("compare", 2, 2, i18n( "Compare two strings. Return 0 if they are equal, "
+ "-1 if the first one is lower, 1 if the first one is higher") );
+ SpecialInformation::insert("isEmpty", 1, 1, i18n( "Check if string is empty.") );
+ SpecialInformation::insert("isNumber", 1, 1, i18n( "Check if string is a valid number.") );
+
+ SpecialInformation::setCurrentObject("File");
+ SpecialInformation::insert("read", 1, 1, i18n( "Return content of given file.") );
+ SpecialInformation::insert("write", 2, 2, i18n( "Write given string to a file.") );
+ SpecialInformation::insert("append", 2, 2, i18n( "Append given string to the end of a file.") );
+}
diff --git a/kommander/executor/templates/cpp_template b/kommander/executor/templates/cpp_template
new file mode 100644
index 00000000..6afef5d4
--- /dev/null
+++ b/kommander/executor/templates/cpp_template
@@ -0,0 +1,16 @@
+/***************************************************************************
+ |FILENAME| - description
+ -------------------
+ begin : |DATE|
+ copyright : (C) |YEAR| by |AUTHOR|
+ email : |EMAIL|
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
diff --git a/kommander/executor/templates/header_template b/kommander/executor/templates/header_template
new file mode 100644
index 00000000..6afef5d4
--- /dev/null
+++ b/kommander/executor/templates/header_template
@@ -0,0 +1,16 @@
+/***************************************************************************
+ |FILENAME| - description
+ -------------------
+ begin : |DATE|
+ copyright : (C) |YEAR| by |AUTHOR|
+ email : |EMAIL|
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
diff --git a/kommander/factory/Makefile.am b/kommander/factory/Makefile.am
new file mode 100644
index 00000000..60eb0e6d
--- /dev/null
+++ b/kommander/factory/Makefile.am
@@ -0,0 +1,16 @@
+noinst_LTLIBRARIES = libkommanderfactory.la
+
+# set the include path for X, qt and KDE
+AM_CPPFLAGS = -I$(top_srcdir)/kommander/widget -I$(top_srcdir)/kommander/plugin $(all_includes)
+
+# the library search path.
+libkommanderfactory_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -no-undefined
+libkommanderfactory_la_LIBADD = $(top_builddir)/kommander/plugin/libkommanderplugin.la
+
+# which sources should be compiled for factory
+libkommanderfactory_la_SOURCES = kommanderfactory.cpp domtool.cpp
+include_HEADERS = kommanderfactory.h
+noinst_HEADERS = domtool.h
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
diff --git a/kommander/factory/domtool.cpp b/kommander/factory/domtool.cpp
new file mode 100644
index 00000000..d8c9fcd3
--- /dev/null
+++ b/kommander/factory/domtool.cpp
@@ -0,0 +1,412 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "domtool.h"
+
+#include <qsizepolicy.h>
+#include <qcolor.h>
+#include <qcursor.h>
+#include <qdatetime.h>
+#include <qrect.h>
+#include <qsize.h>
+#include <qfont.h>
+#include <qdom.h>
+
+/*!
+ \class DomTool domtool.h
+ \brief Tools for the dom
+
+ A collection of static functions used by Resource (part of the
+ designer) and Uic.
+
+*/
+
+
+/*!
+ Returns the contents of property \a name of object \a e as
+ variant or the variant passed as \a defValue if the property does
+ not exist.
+
+ \sa hasProperty()
+ */
+QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue )
+{
+ QDomElement n;
+ for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ if ( n.tagName() == "property" ) {
+ if ( n.attribute( "name" ) != name )
+ continue;
+ return elementToVariant( n.firstChild().toElement(), defValue );
+ }
+ }
+ return defValue;
+}
+
+/*!
+ Returns wheter object \a e defines property \a name or not.
+
+ \sa readProperty()
+ */
+bool DomTool::hasProperty( const QDomElement& e, const QString& name )
+{
+ QDomElement n;
+ for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ if ( n.tagName() == "property" ) {
+ if ( n.attribute( "name" ) != name )
+ continue;
+ return true;
+ }
+ }
+ return false;
+}
+
+QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type )
+{
+ QStringList result;
+ QDomElement n;
+ for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ if ( n.tagName() == "property" ) {
+ QDomElement n2 = n.firstChild().toElement();
+ if ( n2.tagName() == type )
+ result += n.attribute( "name" );
+ }
+ }
+ return result;
+}
+
+
+QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue )
+{
+ QString dummy;
+ return elementToVariant( e, defValue, dummy );
+}
+
+/*!
+ Interprets element \a e as variant and returns the result of the interpretation.
+ */
+QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment )
+{
+ QVariant v;
+ if ( e.tagName() == "rect" ) {
+ QDomElement n3 = e.firstChild().toElement();
+ int x = 0, y = 0, w = 0, h = 0;
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "x" )
+ x = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "y" )
+ y = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "width" )
+ w = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "height" )
+ h = n3.firstChild().toText().data().toInt();
+ n3 = n3.nextSibling().toElement();
+ }
+ v = QVariant( QRect( x, y, w, h ) );
+ } else if ( e.tagName() == "point" ) {
+ QDomElement n3 = e.firstChild().toElement();
+ int x = 0, y = 0;
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "x" )
+ x = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "y" )
+ y = n3.firstChild().toText().data().toInt();
+ n3 = n3.nextSibling().toElement();
+ }
+ v = QVariant( QPoint( x, y ) );
+ } else if ( e.tagName() == "size" ) {
+ QDomElement n3 = e.firstChild().toElement();
+ int w = 0, h = 0;
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "width" )
+ w = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "height" )
+ h = n3.firstChild().toText().data().toInt();
+ n3 = n3.nextSibling().toElement();
+ }
+ v = QVariant( QSize( w, h ) );
+ } else if ( e.tagName() == "color" ) {
+ v = QVariant( readColor( e ) );
+ } else if ( e.tagName() == "font" ) {
+ QDomElement n3 = e.firstChild().toElement();
+ QFont f( defValue.toFont() );
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "family" )
+ f.setFamily( n3.firstChild().toText().data() );
+ else if ( n3.tagName() == "pointsize" )
+ f.setPointSize( n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "bold" )
+ f.setBold( n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "italic" )
+ f.setItalic( n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "underline" )
+ f.setUnderline( n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "strikeout" )
+ f.setStrikeOut( n3.firstChild().toText().data().toInt() );
+ n3 = n3.nextSibling().toElement();
+ }
+ v = QVariant( f );
+ } else if ( e.tagName() == "string" ) {
+ v = QVariant( e.firstChild().toText().data() );
+ QDomElement n = e;
+ n = n.nextSibling().toElement();
+ if ( n.tagName() == "comment" )
+ comment = n.firstChild().toText().data();
+ } else if ( e.tagName() == "cstring" ) {
+ v = QVariant( QCString( e.firstChild().toText().data() ) );
+ } else if ( e.tagName() == "number" ) {
+ bool ok = true;
+ v = QVariant( e.firstChild().toText().data().toInt( &ok ) );
+ if ( !ok )
+ v = QVariant( e.firstChild().toText().data().toDouble() );
+ } else if ( e.tagName() == "bool" ) {
+ QString t = e.firstChild().toText().data();
+ v = QVariant( t == "true" || t == "1", 0 );
+ } else if ( e.tagName() == "pixmap" ) {
+ v = QVariant( e.firstChild().toText().data() );
+ } else if ( e.tagName() == "iconset" ) {
+ v = QVariant( e.firstChild().toText().data() );
+ } else if ( e.tagName() == "image" ) {
+ v = QVariant( e.firstChild().toText().data() );
+ } else if ( e.tagName() == "enum" ) {
+ v = QVariant( e.firstChild().toText().data() );
+ } else if ( e.tagName() == "set" ) {
+ v = QVariant( e.firstChild().toText().data() );
+ } else if ( e.tagName() == "sizepolicy" ) {
+ QDomElement n3 = e.firstChild().toElement();
+ QSizePolicy sp;
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "hsizetype" )
+ sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "vsizetype" )
+ sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "horstretch" )
+ sp.setHorStretch( n3.firstChild().toText().data().toInt() );
+ else if ( n3.tagName() == "verstretch" )
+ sp.setVerStretch( n3.firstChild().toText().data().toInt() );
+ n3 = n3.nextSibling().toElement();
+ }
+ v = QVariant( sp );
+ } else if ( e.tagName() == "cursor" ) {
+ v = QVariant( QCursor( e.firstChild().toText().data().toInt() ) );
+ } else if ( e.tagName() == "stringlist" ) {
+ QStringList lst;
+ QDomElement n;
+ for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ lst << n.firstChild().toText().data();
+ v = QVariant( lst );
+ } else if ( e.tagName() == "date" ) {
+ QDomElement n3 = e.firstChild().toElement();
+ int y, m, d;
+ y = m = d = 0;
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "year" )
+ y = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "month" )
+ m = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "day" )
+ d = n3.firstChild().toText().data().toInt();
+ n3 = n3.nextSibling().toElement();
+ }
+ v = QVariant( QDate( y, m, d ) );
+ } else if ( e.tagName() == "time" ) {
+ QDomElement n3 = e.firstChild().toElement();
+ int h, m, s;
+ h = m = s = 0;
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "hour" )
+ h = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "minute" )
+ m = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "second" )
+ s = n3.firstChild().toText().data().toInt();
+ n3 = n3.nextSibling().toElement();
+ }
+ v = QVariant( QTime( h, m, s ) );
+ } else if ( e.tagName() == "datetime" ) {
+ QDomElement n3 = e.firstChild().toElement();
+ int h, mi, s, y, mo, d ;
+ h = mi = s = y = mo = d = 0;
+ while ( !n3.isNull() ) {
+ if ( n3.tagName() == "hour" )
+ h = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "minute" )
+ mi = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "second" )
+ s = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "year" )
+ y = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "month" )
+ mo = n3.firstChild().toText().data().toInt();
+ else if ( n3.tagName() == "day" )
+ d = n3.firstChild().toText().data().toInt();
+ n3 = n3.nextSibling().toElement();
+ }
+ v = QVariant( QDateTime( QDate( y, mo, d ), QTime( h, mi, s ) ) );
+ }
+ return v;
+}
+
+
+/*! Returns the color which is returned in the dom element \a e.
+ */
+
+QColor DomTool::readColor( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ int r= 0, g = 0, b = 0;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "red" )
+ r = n.firstChild().toText().data().toInt();
+ else if ( n.tagName() == "green" )
+ g = n.firstChild().toText().data().toInt();
+ else if ( n.tagName() == "blue" )
+ b = n.firstChild().toText().data().toInt();
+ n = n.nextSibling().toElement();
+ }
+
+ return QColor( r, g, b );
+}
+
+/*!
+ Returns the contents of attribute \a name of object \a e as
+ variant or the variant passed as \a defValue if the attribute does
+ not exist.
+
+ \sa hasAttribute()
+ */
+QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue )
+{
+ QDomElement n;
+ for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ if ( n.tagName() == "attribute" ) {
+ if ( n.attribute( "name" ) != name )
+ continue;
+ return elementToVariant( n.firstChild().toElement(), defValue );
+ }
+ }
+ return defValue;
+}
+
+/*!
+ Returns wheter object \a e defines attribute \a name or not.
+
+ \sa readAttribute()
+ */
+bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
+{
+ QDomElement n;
+ for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ if ( n.tagName() == "attribute" ) {
+ if ( n.attribute( "name" ) != name )
+ continue;
+ return true;
+ }
+ }
+ return false;
+}
+
+static bool toBool( const QString& s )
+{
+ return s == "true" || s.toInt() != 0;
+}
+
+/*!
+ Convert Qt 2.x format to Qt 3.0 format if necessary
+*/
+void DomTool::fixDocument( QDomDocument& doc )
+{
+ QDomElement e;
+ QDomNode n;
+ QDomNodeList nl;
+ uint i = 0;
+
+ e = doc.firstChild().toElement();
+ if ( e.tagName() != "UI" )
+ return;
+ if ( e.hasAttribute("version") && e.attribute("version").toDouble() >= 3.0 )
+ return;
+
+ e.setAttribute( "version", 3.0 );
+
+ e.setAttribute("stdsetdef", 1 );
+ nl = doc.elementsByTagName( "property" );
+ uint nllen = nl.length();
+ for ( i = 0; i < nllen; i++ ) {
+ e = nl.item(i).toElement();
+ QString name;
+ QDomElement n2 = e.firstChild().toElement();
+ if ( n2.tagName() == "name" ) {
+ name = n2.firstChild().toText().data();
+ e.setAttribute( "name", name );
+ e.removeChild( n2 );
+ }
+ bool stdset = toBool( e.attribute( "stdset" ) );
+ if ( stdset || name == "toolTip" || name == "whatsThis" ||
+ name == "buddy" ||
+ e.parentNode().toElement().tagName() == "item" ||
+ e.parentNode().toElement().tagName() == "spacer" ||
+ e.parentNode().toElement().tagName() == "column"
+ )
+ e.removeAttribute( "stdset" );
+ else
+ e.setAttribute( "stdset", 0 );
+ }
+
+ nl = doc.elementsByTagName( "attribute" );
+ nllen = nl.length();
+ for ( i = 0; i < nllen; i++ ) {
+ e = nl.item(i).toElement();
+ QString name;
+ QDomElement n2 = e.firstChild().toElement();
+ if ( n2.tagName() == "name" ) {
+ name = n2.firstChild().toText().data();
+ e.setAttribute( "name", name );
+ e.removeChild( n2 );
+ }
+ }
+
+ nl = doc.elementsByTagName( "image" );
+ nllen = nl.length();
+ for ( i = 0; i < nllen; i++ ) {
+ e = nl.item(i).toElement();
+ QString name;
+ QDomElement n2 = e.firstChild().toElement();
+ if ( n2.tagName() == "name" ) {
+ name = n2.firstChild().toText().data();
+ e.setAttribute( "name", name );
+ e.removeChild( n2 );
+ }
+ }
+
+ nl = doc.elementsByTagName( "widget" );
+ nllen = nl.length();
+ for ( i = 0; i < nllen; i++ ) {
+ e = nl.item(i).toElement();
+ QString name;
+ QDomElement n2 = e.firstChild().toElement();
+ if ( n2.tagName() == "class" ) {
+ name = n2.firstChild().toText().data();
+ e.setAttribute( "class", name );
+ e.removeChild( n2 );
+ }
+ }
+
+}
+
diff --git a/kommander/factory/domtool.h b/kommander/factory/domtool.h
new file mode 100644
index 00000000..fac628a4
--- /dev/null
+++ b/kommander/factory/domtool.h
@@ -0,0 +1,45 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef DOMTOOL_H
+#define DOMTOOL_H
+
+#include <qvariant.h>
+#include <qnamespace.h>
+
+class QDomElement;
+class QDomDocument;
+
+class DomTool : public Qt
+{
+public:
+ static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue );
+ static bool hasProperty( const QDomElement& e, const QString& name );
+ static QStringList propertiesOfType( const QDomElement& e, const QString& type );
+ static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue );
+ static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment );
+ static QVariant readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue );
+ static bool hasAttribute( const QDomElement& e, const QString& name );
+ static QColor readColor( const QDomElement &e );
+ static void fixDocument( QDomDocument& );
+};
+
+
+#endif // DOMTOOL_H
diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp
new file mode 100644
index 00000000..f3078830
--- /dev/null
+++ b/kommander/factory/kommanderfactory.cpp
@@ -0,0 +1,1486 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+/* Modifications by Marc Britton (c) 2002 under GNU GPL, terms as above */
+
+#include <kconfig.h>
+#include <klibloader.h>
+
+#include "kommanderfactory.h"
+#include <kommanderplugin.h>
+
+
+#include <qfeatures.h>
+#include "config.h"
+#ifndef QT_NO_SQL
+#include "database2.h"
+#endif
+#include <qdom.h>
+#include <qdir.h>
+#include <qlayout.h>
+#include <qmetaobject.h>
+#include "domtool.h"
+#include <qapplication.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qobjectlist.h>
+#include <private/qpluginmanager_p.h>
+#include <qmime.h>
+#include <qdragobject.h>
+#include <zlib.h>
+
+#ifndef QT_NO_SQL
+#include <qsqlrecord.h>
+#include <qsqldatabase.h>
+#include <qdatatable.h>
+#endif
+
+// include all Qt widgets we support
+#include <qpushbutton.h>
+#include <qtoolbutton.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qgroupbox.h>
+#include <qbuttongroup.h>
+#include <qiconview.h>
+#include <qheader.h>
+#ifndef QT_NO_TABLE
+#include <qtable.h>
+#endif
+#include <qlistbox.h>
+#include <qlistview.h>
+#include <qlineedit.h>
+#include <qspinbox.h>
+#include <qmultilineedit.h>
+#include <qlabel.h>
+#include <qwidget.h>
+#include <qtabwidget.h>
+#include <qcombobox.h>
+#include <qdialog.h>
+#include <qwizard.h>
+#include <qlcdnumber.h>
+#include <qprogressbar.h>
+#include <qtextview.h>
+#include <qtextbrowser.h>
+#include <qdial.h>
+#include <qslider.h>
+#include <qframe.h>
+#include <qwidgetstack.h>
+#include <qtextedit.h>
+#include <qscrollbar.h>
+#include <qmainwindow.h>
+#include <qsplitter.h>
+#include <qaction.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+#include <qdatetimeedit.h>
+#include <qtoolbox.h>
+
+#include <stdlib.h>
+#include <kglobal.h>
+#include <klocale.h>
+
+#include "kmdrmainwindow.h"
+
+QPtrList<KommanderPlugin> widgetPlugins;
+
+QMap<QWidget*, QString> *qwf_functions = 0;
+QMap<QWidget*, QString> *qwf_forms = 0;
+QString *qwf_language = 0;
+bool qwf_execute_code = true;
+bool qwf_stays_on_top = false;
+QString *qwf_currFileName = 0L; //is this really used?
+
+KommanderFactory::KommanderFactory()
+ : dbControls( 0 ), usePixmapCollection( false )
+{
+ widgetPlugins.setAutoDelete( true );
+ defSpacing = 6;
+ defMargin = 11;
+ if (!qwf_currFileName)
+ qwf_currFileName = new QString();
+}
+
+KommanderFactory::~KommanderFactory()
+{
+ delete qwf_currFileName;
+ qwf_currFileName = 0L;
+}
+
+QWidget *KommanderFactory::create( const QString &uiFile, QObject *connector, QWidget *parent, const char *name )
+{
+ QFile f( uiFile );
+ if ( !f.open( IO_ReadOnly ) )
+ return 0;
+
+ if (!qwf_currFileName)
+ qwf_currFileName = new QString();
+ *qwf_currFileName = uiFile;
+ QWidget *w = KommanderFactory::create( &f, connector, parent, name );
+ if ( !qwf_forms )
+ qwf_forms = new QMap<QWidget*, QString>;
+ qwf_forms->insert( w, uiFile );
+ return w;
+}
+
+QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *parent, const char *name )
+{
+ QDomDocument doc;
+ QString errMsg;
+ int errLine;
+ QTextStream stream(dev);
+ QString content = stream.read();
+ if (content.startsWith("#!"))
+ content = content.mid(content.find('\n'));
+ if ( !doc.setContent( content ) ) {
+// qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ return 0;
+ }
+
+ DomTool::fixDocument( doc );
+
+ KommanderFactory *widgetFactory = new KommanderFactory;
+ widgetFactory->toplevel = 0;
+
+ QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+
+ QDomElement variables = e;
+ while ( variables.tagName() != "variables" && !variables.isNull() )
+ variables = variables.nextSibling().toElement();
+
+ QDomElement eltSlots = e;
+ while ( eltSlots.tagName() != "slots" && !eltSlots.isNull() )
+ eltSlots = eltSlots.nextSibling().toElement();
+
+ QDomElement connections = e;
+ while ( connections.tagName() != "connections" && !connections.isNull() )
+ connections = connections.nextSibling().toElement();
+
+ QDomElement imageCollection = e;
+ while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
+ imageCollection = imageCollection.nextSibling().toElement();
+
+ QDomElement tabOrder = e;
+ while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() )
+ tabOrder = tabOrder.nextSibling().toElement();
+
+ QDomElement actions = e;
+ while ( actions.tagName() != "actions" && !actions.isNull() )
+ actions = actions.nextSibling().toElement();
+
+ QDomElement toolbars = e;
+ while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() )
+ toolbars = toolbars.nextSibling().toElement();
+
+ QDomElement menubar = e;
+ while ( menubar.tagName() != "menubar" && !menubar.isNull() )
+ menubar = menubar.nextSibling().toElement();
+
+ QDomElement functions = e;
+ while ( functions.tagName() != "functions" && !functions.isNull() )
+ functions = functions.nextSibling().toElement();
+
+ QDomElement widget;
+ while ( !e.isNull() ) {
+ if ( e.tagName() == "widget" ) {
+ widget = e;
+ } else if ( e.tagName() == "variable" ) { // compatibility with old betas
+ widgetFactory->variables << e.firstChild().toText().data();
+ } else if ( e.tagName() == "pixmapinproject" ) {
+ widgetFactory->usePixmapCollection = true;
+ } else if ( e.tagName() == "layoutdefaults" ) {
+ widgetFactory->defSpacing = e.attribute( "spacing", QString::number( widgetFactory->defSpacing ) ).toInt();
+ widgetFactory->defMargin = e.attribute( "margin", QString::number( widgetFactory->defMargin ) ).toInt();
+ }
+ e = e.nextSibling().toElement();
+ }
+
+ if ( !imageCollection.isNull() )
+ widgetFactory->loadImageCollection( imageCollection );
+
+ widgetFactory->createWidgetInternal( widget, parent, 0, widget.attribute("class", "QWidget") );
+ QWidget *w = widgetFactory->toplevel;
+ if ( !w ) {
+ delete widgetFactory;
+ return 0;
+ }
+
+ if ( !variables.isNull() ) {
+ for ( QDomElement n = variables.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ if ( n.tagName() == "variable" )
+ widgetFactory->variables << n.firstChild().toText().data();
+ }
+ if ( !eltSlots.isNull() ) {
+ for ( QDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ if ( n.tagName() == "slot" ) {
+ QString s = n.firstChild().toText().data();
+ widgetFactory->languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language", "C++" ) );
+ }
+ }
+
+ if ( !actions.isNull() )
+ widgetFactory->loadActions( actions );
+ if ( !toolbars.isNull() )
+ widgetFactory->loadToolBars( toolbars );
+ if ( !menubar.isNull() )
+ widgetFactory->loadMenuBar( menubar );
+
+ if ( !connections.isNull() )
+ widgetFactory->loadConnections( connections, connector );
+ if ( w && name && qstrlen( name ) > 0 )
+ w->setName( name );
+
+ if ( !tabOrder.isNull() )
+ widgetFactory->loadTabOrder( tabOrder );
+
+
+ if ( widgetFactory->toplevel ) {
+#ifndef QT_NO_SQL
+ QMap<QWidget*, SqlWidgetConnection>::Iterator cit = widgetFactory->sqlWidgetConnections.begin();
+ for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) {
+ if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() )
+ continue;
+ if ( cit.key()->inherits( "QDesignerDataBrowser2" ) )
+ ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls );
+ else if ( cit.key()->inherits( "QDesignerDataView2" ) )
+ ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls );
+ }
+
+ for ( QMap<QString, QStringList>::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) {
+ QDataTable *table = (QDataTable*)widgetFactory->toplevel->child( it.key(), "QDataTable" );
+ if ( !table )
+ continue;
+ if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != widgetFactory->noDatabaseWidgets.end() )
+ continue;
+ QValueList<Field> fieldMap = *widgetFactory->fieldMaps.find( table );
+ QString conn = (*it)[ 0 ];
+ QSqlCursor* c = 0;
+ QSqlDatabase *db = 0;
+ if ( conn.isEmpty() || conn == "(default)" ) {
+ db = QSqlDatabase::database();
+ c = new QSqlCursor( (*it)[ 1 ] );
+ } else {
+ db = QSqlDatabase::database( conn );
+ c = new QSqlCursor( (*it)[ 1 ], true, db );
+ }
+ if ( db ) {
+ table->setSqlCursor( c, fieldMap.isEmpty(), true );
+ table->refresh( QDataTable::RefreshAll );
+ }
+ }
+#endif
+
+ }
+
+ for ( QMap<QString, QString>::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) {
+ QLabel *label = (QLabel*)widgetFactory->toplevel->child( it.key(), "QLabel" );
+ QWidget *buddy = (QWidget*)widgetFactory->toplevel->child( *it, "QWidget" );
+ if ( label && buddy )
+ label->setBuddy( buddy );
+ }
+
+ delete widgetFactory;
+
+ QApplication::sendPostedEvents();
+
+ return w;
+}
+
+void KommanderFactory::addPlugin( KommanderPlugin *plugin )
+{
+ widgetPlugins.append( plugin );
+}
+
+QWidget *KommanderFactory::createWidget( const QString &literalClassName, QWidget *parent, const char *name )
+{
+ QString className = literalClassName;
+
+ // create widgets we know
+ if (className == "QPushButton")
+ return new QPushButton(parent, name);
+ else if (className == "QToolButton")
+ return new QToolButton(parent, name);
+ else if (className == "QCheckBox")
+ return new QCheckBox(parent, name);
+ else if (className == "QRadioButton")
+ return new QRadioButton(parent, name);
+ else if (className == "QGroupBox")
+ return new QGroupBox(parent, name);
+ else if (className == "QButtonGroup")
+ return new QButtonGroup(parent, name);
+ else if (className == "QIconView")
+ {
+#if !defined(QT_NO_ICONVIEW)
+ return new QIconView(parent, name);
+#endif
+ }
+ else if (className == "QTable")
+ {
+#if !defined(QT_NO_TABLE)
+ return new QTable(parent, name);
+#endif
+ }
+ else if (className == "QListBox")
+ return new QListBox(parent, name);
+ else if (className == "QListView")
+ return new QListView(parent, name);
+ else if (className == "QLineEdit")
+ return new QLineEdit(parent, name);
+ else if (className == "QSpinBox")
+ return new QSpinBox(parent, name);
+ else if (className == "QMultiLineEdit")
+ return new QMultiLineEdit(parent, name);
+ else if (className == "QLabel")
+ return new QLabel(parent, name);
+ else if (className == "QLayoutWidget")
+ return new QWidget(parent, name);
+ else if (className == "QTabWidget")
+ return new QTabWidget(parent, name);
+ else if (className == "QComboBox")
+ return new QComboBox(false, parent, name);
+ else if (className == "QWidget")
+ {
+ if (!qwf_stays_on_top)
+ return new QWidget(parent, name);
+ return new QWidget(parent, name, Qt::WStyle_StaysOnTop);
+ }
+ else if (className == "QDialog")
+ {
+ if (!qwf_stays_on_top)
+ return new QDialog(parent, name);
+ return new QDialog(parent, name, false, Qt::WStyle_StaysOnTop);
+ }
+ else if (className == "QWizard")
+ return new QWizard(parent, name);
+ else if (className == "QLCDNumber")
+ return new QLCDNumber(parent, name);
+ else if (className == "QProgressBar")
+ return new QProgressBar(parent, name);
+ else if (className == "QTextView")
+ return new QTextView(parent, name);
+ else if (className == "QTextBrowser")
+ return new QTextBrowser(parent, name);
+ else if (className == "QDial")
+ return new QDial(parent, name);
+ else if (className == "QSlider")
+ return new QSlider(parent, name);
+ else if (className == "QFrame")
+ return new QFrame(parent, name);
+ else if (className == "QSplitter")
+ return new QSplitter(parent, name);
+ else if (className == "Line")
+ {
+ QFrame *f = new QFrame(parent, name);
+ f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ return f;
+ }
+ else if (className == "QTextEdit")
+ return new QTextEdit(parent, name);
+ else if (className == "QDateEdit")
+ return new QDateEdit(parent, name);
+ else if (className == "QTimeEdit")
+ return new QTimeEdit(parent, name);
+ else if (className == "QDateTimeEdit")
+ return new QDateTimeEdit(parent, name);
+ else if (className == "QScrollBar")
+ return new QScrollBar(parent, name);
+ else if (className == "QPopupMenu")
+ return new QPopupMenu(parent, name);
+ else if (className == "QWidgetStack")
+ return new QWidgetStack(parent, name);
+ else if (className == "QMainWindow")
+ {
+ QMainWindow *mw = 0;
+ if (!qwf_stays_on_top)
+ mw = new KmdrMainWindow(parent, name);
+ else
+ mw = new KmdrMainWindow(parent, name, Qt::WType_TopLevel | Qt::WStyle_StaysOnTop);
+ mw->setCentralWidget(new QWidget(mw, "qt_central_widget"));
+ mw->centralWidget()->show();
+ (void) mw->statusBar();
+ return mw;
+ }
+#if !defined(QT_NO_SQL)
+ else if (className == "QDataTable")
+ return new QDataTable(parent, name);
+ else if (className == "QDataBrowser")
+ return new QDesignerDataBrowser2(parent, name);
+ else if (className == "QDataView")
+ return new QDesignerDataView2(parent, name);
+#endif
+
+ // try to create it using the loaded kommander widget plugins
+ //find the widget plugin which can create className
+ for (KommanderPlugin * p = widgetPlugins.first(); p; p = widgetPlugins.next())
+ {
+ QWidget *w = p->create(className, parent, name);
+ if (w)
+ return w;
+ }
+
+ // no success
+ return 0;
+}
+
+static int num_plugins_loaded = 0;
+
+int KommanderFactory::loadPlugins(bool force)
+{
+ if (num_plugins_loaded > 0 && !force)
+ return num_plugins_loaded;
+
+ num_plugins_loaded = 0;
+ KConfig cfg("kommanderrc", true);
+ QStringList plugins = "libkommanderwidgets";
+ plugins += cfg.readListEntry("plugins");
+ QStringList::Iterator it;
+ KLibLoader *f = KLibLoader::self();
+ for (it = plugins.begin(); it != plugins.end(); ++it)
+ {
+ KLibrary *l = f->library((*it).latin1());
+ if (l)
+ {
+ if (l->hasSymbol("kommander_plugin"))
+ {
+ void *(*kommander_plugin) () = (void *(*)()) l->symbol("kommander_plugin");
+ KommanderPlugin *p = (KommanderPlugin *) (*kommander_plugin) ();
+ widgetPlugins.append(p);
+ ++num_plugins_loaded;
+ } else
+ {
+ qWarning("KommanderFactory::loadPlugins - '%s' isn't a Kommander Plugin library, skipping.",
+ l->fileName().latin1());
+ }
+ } else
+ {
+ qWarning("KommanderFactory::loadPlugins - Can't load Kommander plugin library %s",
+ (*it).latin1());
+ }
+ }
+ //qDebug("KommanderFactory::loadPlugins returning %d", num_plugins_loaded);
+ return num_plugins_loaded;
+}
+
+FeatureList KommanderFactory::featureList()
+{
+ FeatureList features;
+ for ( KommanderPlugin *p = widgetPlugins.first(); p ; p = widgetPlugins.next() )
+ {
+ QStringList widgets = p->widgets();
+ QStringList::Iterator it;
+ for( it = widgets.begin() ; it != widgets.end() ; ++it )
+ {
+ QString wn = *it;
+ features[wn] = KommanderWidgetInfo( p->group(wn), p->toolTip(wn),p->iconSet(wn), p->whatsThis(wn), p->isContainer(wn) );
+ }
+ }
+ return features;
+ //iterate through widgetPlugins, appending KommanderPlugin::widgets() to features
+}
+
+QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *parent, QLayout* layout, const QString &classNameArg )
+{
+ lastItem = 0;
+ QDomElement n = e.firstChild().toElement();
+ QWidget *w = 0; // the widget that got created
+ QObject *obj = 0; // gets the properties
+
+ QString className = classNameArg;
+
+ int row = e.attribute( "row" ).toInt();
+ int col = e.attribute( "column" ).toInt();
+ int rowspan = e.attribute( "rowspan" ).toInt();
+ int colspan = e.attribute( "colspan" ).toInt();
+ if ( rowspan < 1 )
+ rowspan = 1;
+ if ( colspan < 1 )
+ colspan = 1;
+ if ( !className.isEmpty() ) {
+ if ( !layout && className == "QLayoutWidget" )
+ className = "QWidget";
+ if ( layout && className == "QLayoutWidget" ) {
+ // hide layout widgets
+ w = parent;
+ } else {
+ obj = KommanderFactory::createWidget( className, parent, 0 );
+ if ( !obj )
+ {
+ return 0;
+ }
+ w = (QWidget*)obj;
+ if ( !toplevel )
+ toplevel = w;
+ if ( w->inherits( "QMainWindow" ) )
+ w = ( (QMainWindow*)w )->centralWidget();
+ if ( layout ) {
+ switch( layoutType( layout ) ) {
+ case HBox:
+ ( (QHBoxLayout*)layout )->addWidget( w );
+ break;
+ case VBox:
+ ( (QVBoxLayout*)layout )->addWidget( w );
+ break;
+ case Grid:
+ ( (QGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ col, col + colspan - 1 );
+ break;
+ default:
+ break;
+ }
+ }
+
+ layout = 0;
+ }
+ }
+ if (className == "Dialog")
+ w->setProperty( "useInternalParser", false );
+
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "spacer" ) {
+ createSpacer( n, layout );
+ } else if ( n.tagName() == "widget" ) {
+ QMap< QString, QString> *oldDbControls = dbControls;
+ createWidgetInternal( n, w, layout, n.attribute( "class", "QWidget" ) );
+ dbControls = oldDbControls;
+ } else if ( n.tagName() == "hbox" ) {
+ QLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "QGridLayout" ) )
+ layout = createLayout( 0, 0, KommanderFactory::HBox );
+ else
+ layout = createLayout( w, layout, KommanderFactory::HBox );
+ obj = layout;
+ n = n.firstChild().toElement();
+ if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
+ ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ continue;
+ } else if ( n.tagName() == "grid" ) {
+ QLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "QGridLayout" ) )
+ layout = createLayout( 0, 0, KommanderFactory::Grid );
+ else
+ layout = createLayout( w, layout, KommanderFactory::Grid );
+ obj = layout;
+ n = n.firstChild().toElement();
+ if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
+ ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ continue;
+ } else if ( n.tagName() == "vbox" ) {
+ QLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "QGridLayout" ) )
+ layout = createLayout( 0, 0, KommanderFactory::VBox );
+ else
+ layout = createLayout( w, layout, KommanderFactory::VBox );
+ obj = layout;
+ n = n.firstChild().toElement();
+ if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
+ ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ continue;
+ } else if ( n.tagName() == "property" && obj ) {
+ setProperty( obj, n.attribute( "name" ), n.firstChild().toElement() );
+ } else if ( n.tagName() == "attribute" && w ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( parent->inherits( "QTabWidget" ) ) {
+ if ( attrib == "title" )
+ ( (QTabWidget*)parent )->insertTab( w, translate(v.toString()) );
+ } else
+ if ( parent->inherits( "QToolBox" ) ) {
+ if ( attrib == "label" )
+ ( (QToolBox*)parent )->addItem( w, translate(v.toString()) );
+ }else if ( parent->inherits( "QWizard" ) ) {
+ if ( attrib == "title" )
+ ( (QWizard*)parent )->addPage( w, translate(v.toString()) );
+ }
+ } else if ( n.tagName() == "item" ) {
+ createItem( n, w );
+ } else if ( n.tagName() == "column" || n.tagName() == "row" ) {
+ createColumn( n, w );
+ }
+
+ n = n.nextSibling().toElement();
+ }
+
+ return w;
+}
+
+QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, LayoutType type )
+{
+ int spacing = defSpacing;
+ int margin = defMargin;
+
+ if ( !layout && widget && widget->inherits( "QTabWidget" ) )
+ widget = ((QTabWidget*)widget)->currentPage();
+ if ( !layout && widget && widget->inherits( "QToolBox" ) )
+ widget = ((QToolBox*)widget)->currentItem();
+
+ if ( !layout && widget && widget->inherits( "QWizard" ) )
+ widget = ((QWizard*)widget)->currentPage();
+
+ if ( !layout && widget && widget->inherits( "QWidgetStack" ) )
+ widget = ((QWidgetStack*)widget)->visibleWidget();
+
+ if ( !layout && widget && widget->inherits( "QGroupBox" ) ) {
+ QGroupBox *gb = (QGroupBox*)widget;
+ gb->setColumnLayout( 0, Qt::Vertical );
+ gb->layout()->setMargin( 0 );
+ gb->layout()->setSpacing( 0 );
+ QLayout *l;
+ switch ( type ) {
+ case HBox:
+ l = new QHBoxLayout( gb->layout() );
+ l->setAlignment( Qt::AlignTop );
+ return l;
+ case VBox:
+ l = new QVBoxLayout( gb->layout(), spacing );
+ l->setAlignment( Qt::AlignTop );
+ return l;
+ case Grid:
+ l = new QGridLayout( gb->layout() );
+ l->setAlignment( Qt::AlignTop );
+ return l;
+ default:
+ return 0;
+ }
+ } else {
+ if ( layout ) {
+ QLayout *l;
+ switch ( type ) {
+ case HBox:
+ l = new QHBoxLayout( layout );
+ l->setSpacing( spacing );
+ l->setMargin( margin );
+ return l;
+ case VBox:
+ l = new QVBoxLayout( layout );
+ l->setSpacing( spacing );
+ l->setMargin( margin );
+ return l;
+ case Grid: {
+ l = new QGridLayout( layout );
+ l->setSpacing( spacing );
+ l->setMargin( margin );
+ return l;
+ }
+ default:
+ return 0;
+ }
+ } else {
+ QLayout *l;
+ switch ( type ) {
+ case HBox:
+ l = new QHBoxLayout( widget );
+ if ( !widget ) {
+ l->setMargin( margin );
+ l->setSpacing( spacing );
+ }
+ return l;
+ case VBox:
+ l = new QVBoxLayout( widget );
+ if ( !widget ) {
+ l->setMargin( margin );
+ l->setSpacing( spacing );
+ }
+ return l;
+ case Grid: {
+ l = new QGridLayout( widget );
+ if ( !widget ) {
+ l->setMargin( margin );
+ l->setSpacing( spacing );
+ }
+ return l;
+ }
+ default:
+ return 0;
+ }
+ }
+ }
+}
+
+KommanderFactory::LayoutType KommanderFactory::layoutType( QLayout *layout ) const
+{
+ if ( layout->inherits( "QHBoxLayout" ) )
+ return HBox;
+ else if ( layout->inherits( "QVBoxLayout" ) )
+ return VBox;
+ else if ( layout->inherits( "QGridLayout" ) )
+ return Grid;
+ return NoLayout;
+}
+
+void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDomElement &e )
+{
+ const QMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
+
+ QVariant defVariant;
+ if ( e.tagName() == "font" ) {
+ QFont f( qApp->font() );
+ if ( obj->isWidgetType() && ( (QWidget*)obj )->parentWidget() )
+ f = ( (QWidget*)obj )->parentWidget()->font();
+ defVariant = QVariant( f );
+ }
+
+ QString comment;
+ QVariant v( DomTool::elementToVariant( e, defVariant, comment ) );
+
+ if ( e.tagName() == "pixmap" ) {
+ QPixmap pix = loadPixmap( e );
+ if ( pix.isNull() )
+ return;
+ v = QVariant( pix );
+ } else if ( e.tagName() == "iconset" ) {
+ QPixmap pix = loadPixmap( e );
+ if ( pix.isNull() )
+ return;
+ v = QVariant( QIconSet( pix ) );
+ } else if ( e.tagName() == "image" ) {
+ v = QVariant( loadFromCollection( v.toString() ) );
+ } else if ( e.tagName() == "string" ) {
+ v = QVariant( translate( v.asString(), comment ) );
+ }
+
+ if ( !p ) {
+ if ( obj->isWidgetType() ) {
+ if ( prop == "toolTip" ) {
+ if ( !v.toString().isEmpty() )
+ QToolTip::add( (QWidget*)obj, translate(v.toString()) );
+ } else if ( prop == "whatsThis" ) {
+ if ( !v.toString().isEmpty() )
+ QWhatsThis::add( (QWidget*)obj, translate(v.toString()) );
+ }
+#ifndef QT_NO_SQL
+ if ( prop == "database" && !obj->inherits( "QDataView" )
+ && !obj->inherits( "QDataBrowser" ) ) {
+ QStringList lst = DomTool::elementToVariant( e, QVariant( QStringList() ) ).toStringList();
+ if ( lst.count() > 2 ) {
+ if ( dbControls )
+ dbControls->insert( obj->name(), lst[ 2 ] );
+ } else if ( lst.count() == 2 ) {
+ dbTables.insert( obj->name(), lst );
+ }
+ } else if ( prop == "database" ) {
+ QStringList lst = DomTool::elementToVariant( e, QVariant( QStringList() ) ).toStringList();
+ if ( lst.count() == 2 && obj->inherits( "QWidget" ) ) {
+ SqlWidgetConnection conn( lst[ 0 ], lst[ 1 ] );
+ sqlWidgetConnections.insert( (QWidget*)obj, conn );
+ dbControls = conn.dbControls;
+ }
+ } else
+#endif
+ if ( prop == "buddy" ) {
+ buddies.insert( obj->name(), v.toCString() );
+ } else if ( prop == "frameworkCode" ) {
+ if ( !DomTool::elementToVariant( e, QVariant( true, 0 ) ).toBool() ) {
+ noDatabaseWidgets << obj->name();
+ }
+ } else if ( prop == "buttonGroupId" ) {
+ if ( obj->inherits( "QButton" ) && obj->parent()->inherits( "QButtonGroup" ) )
+ ( (QButtonGroup*)obj->parent() )->insert( (QButton*)obj, v.toInt() );
+ }
+
+ return;
+ }
+ }
+
+ if ( e.tagName() == "palette" ) {
+ QDomElement n = e.firstChild().toElement();
+ QPalette p;
+ while ( !n.isNull() ) {
+ QColorGroup cg;
+ if ( n.tagName() == "active" ) {
+ cg = loadColorGroup( n );
+ p.setActive( cg );
+ } else if ( n.tagName() == "inactive" ) {
+ cg = loadColorGroup( n );
+ p.setInactive( cg );
+ } else if ( n.tagName() == "disabled" ) {
+ cg = loadColorGroup( n );
+ p.setDisabled( cg );
+ }
+ n = n.nextSibling().toElement();
+ }
+ v = QPalette( p );
+ } else if ( e.tagName() == "enum" && p && p->isEnumType() ) {
+ QString key( v.toString() );
+ v = QVariant( p->keyToValue( key ) );
+ } else if ( e.tagName() == "set" && p && p->isSetType() ) {
+ QString keys( v.toString() );
+ QStringList lst = QStringList::split( '|', keys );
+ QStrList l;
+ for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ l.append( *it );
+ v = QVariant( p->keysToValue( l ) );
+ }
+
+ if ( prop == "geometry" ) {
+ if ( obj == toplevel ) {
+ toplevel->resize( v.toRect().size() );
+ return;
+ }
+ }
+
+ obj->setProperty( prop, v );
+}
+
+void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
+{
+ QDomElement n = e.firstChild().toElement();
+ int row = e.attribute( "row" ).toInt();
+ int col = e.attribute( "column" ).toInt();
+ int rowspan = e.attribute( "rowspan" ).toInt();
+ int colspan = e.attribute( "colspan" ).toInt();
+
+ Qt::Orientation orient = Qt::Horizontal;
+ int w = 0, h = 0;
+ QSizePolicy::SizeType sizeType = QSizePolicy::Preferred;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString prop = n.attribute( "name" );
+ if ( prop == "orientation" ) {
+ if ( n.firstChild().firstChild().toText().data() == "Horizontal" )
+ orient = Qt::Horizontal;
+ else
+ orient = Qt::Vertical;
+ } else if ( prop == "sizeType" ) {
+ if ( n.firstChild().firstChild().toText().data() == "Fixed" )
+ sizeType = QSizePolicy::Fixed;
+ else if ( n.firstChild().firstChild().toText().data() == "Minimum" )
+ sizeType = QSizePolicy::Minimum;
+ else if ( n.firstChild().firstChild().toText().data() == "Maximum" )
+ sizeType = QSizePolicy::Maximum;
+ else if ( n.firstChild().firstChild().toText().data() == "Preferred" )
+ sizeType = QSizePolicy::Preferred;
+ else if ( n.firstChild().firstChild().toText().data() == "MinimumExpanding" )
+ sizeType = QSizePolicy::MinimumExpanding;
+ else if ( n.firstChild().firstChild().toText().data() == "Expanding" )
+ sizeType = QSizePolicy::Expanding;
+ } else if ( prop == "sizeHint" ) {
+ w = n.firstChild().firstChild().firstChild().toText().data().toInt();
+ h = n.firstChild().firstChild().nextSibling().firstChild().toText().data().toInt();
+ }
+ }
+ n = n.nextSibling().toElement();
+ }
+
+ if ( rowspan < 1 )
+ rowspan = 1;
+ if ( colspan < 1 )
+ colspan = 1;
+ QSpacerItem *item = new QSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : QSizePolicy::Minimum,
+ orient == Qt::Vertical ? sizeType : QSizePolicy::Minimum );
+ if ( layout ) {
+ if ( layout->inherits( "QBoxLayout" ) )
+ ( (QBoxLayout*)layout )->addItem( item );
+ else
+ ( (QGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
+ orient == Qt::Horizontal ? Qt::AlignVCenter : Qt::AlignHCenter );
+ }
+}
+
+static QImage loadImageData( QDomElement &n2 )
+{
+ QImage img;
+ QString data = n2.firstChild().toText().data();
+ char *ba = new char[ data.length() / 2 ];
+ for ( int i = 0; i < (int)data.length() / 2; ++i ) {
+ char h = data[ 2 * i ].latin1();
+ char l = data[ 2 * i + 1 ].latin1();
+ uchar r = 0;
+ if ( h <= '9' )
+ r += h - '0';
+ else
+ r += h - 'a' + 10;
+ r = r << 4;
+ if ( l <= '9' )
+ r += l - '0';
+ else
+ r += l - 'a' + 10;
+ ba[ i ] = r;
+ }
+ QString format = n2.attribute( "format", "PNG" );
+ if ( format == "XPM.GZ" ) {
+ ulong len = n2.attribute( "length" ).toULong();
+ if ( len < data.length() * 5 )
+ len = data.length() * 5;
+ QByteArray baunzip( len );
+ ::uncompress( (uchar*) baunzip.data(), &len, (uchar*) ba, data.length()/2 );
+ img.loadFromData( (const uchar*)baunzip.data(), len, "XPM" );
+ } else {
+ img.loadFromData( (const uchar*)ba, data.length() / 2, format );
+ }
+ delete [] ba;
+
+ return img;
+}
+
+void KommanderFactory::loadImageCollection( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "image" ) {
+ Image img;
+ img.name = n.attribute( "name" );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "data" )
+ img.img = loadImageData( n2 );
+ n2 = n2.nextSibling().toElement();
+ }
+ images.append( img );
+ n = n.nextSibling().toElement();
+ }
+ }
+}
+
+QImage KommanderFactory::loadFromCollection( const QString &name )
+{
+ QValueList<Image>::Iterator it = images.begin();
+ for ( ; it != images.end(); ++it ) {
+ if ( ( *it ).name == name )
+ return ( *it ).img;
+ }
+ return QImage();
+}
+
+QPixmap KommanderFactory::loadPixmap( const QDomElement &e )
+{
+ QString arg = e.firstChild().toText().data();
+ if ( usePixmapCollection ) {
+ const QMimeSource *m = QMimeSourceFactory::defaultFactory()->data( arg );
+ if ( !m )
+ return QPixmap();
+ QPixmap pix;
+ QImageDrag::decode( m, pix );
+ return pix;
+ }
+
+ QImage img = loadFromCollection( arg );
+ QPixmap pix;
+ pix.convertFromImage( img );
+ return pix;
+}
+
+QColorGroup KommanderFactory::loadColorGroup( const QDomElement &e )
+{
+ QColorGroup cg;
+ int r = -1;
+ QDomElement n = e.firstChild().toElement();
+ QColor col;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "color" ) {
+ r++;
+ cg.setColor( (QColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
+ } else if ( n.tagName() == "pixmap" ) {
+ QPixmap pix = loadPixmap( n );
+ cg.setBrush( (QColorGroup::ColorRole)r, QBrush( col, pix ) );
+ }
+ n = n.nextSibling().toElement();
+ }
+ return cg;
+}
+
+struct Connection
+{
+ QObject *sender, *receiver;
+ QCString signal, slot;
+ bool operator==( const Connection &c ) const {
+ return sender == c.sender && receiver == c.receiver &&
+ signal == c.signal && slot == c.slot ;
+ }
+};
+
+class NormalizeObject : public QObject
+{
+public:
+ NormalizeObject() : QObject() {}
+ static QCString normalizeSignalSlot( const char *signalSlot ) { return QObject::normalizeSignalSlot( signalSlot ); }
+};
+
+void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector )
+{
+ QDomElement n = e.firstChild().toElement();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "connection" ) {
+ QString lang = n.attribute( "language", "C++" );
+ QDomElement n2 = n.firstChild().toElement();
+ Connection conn;
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "sender" ) {
+ QString name = n2.firstChild().toText().data();
+ if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ conn.sender = toplevel;
+ } else {
+ if ( name == "this" )
+ name = toplevel->name();
+ QObjectList *l = toplevel->queryList( 0, name, false );
+ if ( l ) {
+ if ( l->first() )
+ conn.sender = l->first();
+ delete l;
+ }
+ }
+ if ( !conn.sender )
+ conn.sender = findAction( name );
+ } else if ( n2.tagName() == "signal" ) {
+ conn.signal = n2.firstChild().toText().data();
+ } else if ( n2.tagName() == "receiver" ) {
+ QString name = n2.firstChild().toText().data();
+ if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ conn.receiver = toplevel;
+ } else {
+ QObjectList *l = toplevel->queryList( 0, name, false );
+ if ( l ) {
+ if ( l->first() )
+ conn.receiver = l->first();
+ delete l;
+ }
+ }
+ } else if ( n2.tagName() == "slot" ) {
+ conn.slot = n2.firstChild().toText().data();
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+
+ conn.signal = NormalizeObject::normalizeSignalSlot( conn.signal );
+ conn.slot = NormalizeObject::normalizeSignalSlot( conn.slot );
+
+ QObject *sender = 0, *receiver = 0;
+ QObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
+ if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
+ sender = toplevel;
+ } else {
+ if ( !l || !l->first() ) {
+ delete l;
+ n = n.nextSibling().toElement();
+ continue;
+ }
+ sender = l->first();
+ delete l;
+ }
+ if ( !sender )
+ sender = findAction( conn.sender->name() );
+
+ if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
+ receiver = toplevel;
+ } else {
+ l = toplevel->queryList( 0, conn.receiver->name(), false );
+ if ( !l || !l->first() ) {
+ delete l;
+ n = n.nextSibling().toElement();
+ continue;
+ }
+ receiver = l->first();
+ delete l;
+ }
+
+ if ( lang == "C++" ) {
+ QString s = "2""%1";
+ s = s.arg( conn.signal );
+ QString s2 = "1""%1";
+ s2 = s2.arg( conn.slot );
+
+ QStrList signalList = sender->metaObject()->signalNames( true );
+ QStrList slotList = receiver->metaObject()->slotNames( true );
+
+ // if this is a connection to a custom slot and we have a connector, try this as receiver
+ if ( slotList.find( conn.slot ) == -1 && receiver == toplevel && connector ) {
+ slotList = connector->metaObject()->slotNames( true );
+ receiver = connector;
+ }
+
+ // avoid warnings
+ if ( signalList.find( conn.signal ) == -1 ||
+ slotList.find( conn.slot ) == -1 ) {
+ n = n.nextSibling().toElement();
+ continue;
+ }
+ QObject::connect( sender, s, receiver, s2 );
+ } else {
+ EventFunction ef = eventMap[ conn.sender ];
+ ef.events.append( conn.signal );
+ ef.functions.append( QStringList::split( ',', conn.slot ) );
+ eventMap.replace( conn.sender, ef );
+ }
+ } else if ( n.tagName() == "slot" ) {
+ QString s = n.firstChild().toText().data();
+ languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language" ) );
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void KommanderFactory::loadTabOrder( const QDomElement &e )
+{
+ QWidget *last = 0;
+ QDomElement n = e.firstChild().toElement();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "tabstop" ) {
+ QString name = n.firstChild().toText().data();
+ QObjectList *l = toplevel->queryList( 0, name, false );
+ if ( l ) {
+ if ( l->first() ) {
+ QWidget *w = (QWidget*)l->first();
+ if ( last )
+ toplevel->setTabOrder( last, w );
+ last = w;
+ }
+ delete l;
+ }
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget )
+{
+ if ( widget->inherits( "QListView" ) && e.tagName() == "column" ) {
+ QListView *lv = (QListView*)widget;
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ bool hasPixmap = false;
+ QString txt;
+ bool clickable = true, resizeable = true;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( attrib == "text" )
+ txt = translate(v.toString());
+ else if ( attrib == "pixmap" ) {
+ pix = loadPixmap( n.firstChild().toElement().toElement() );
+ hasPixmap = !pix.isNull();
+ } else if ( attrib == "clickable" )
+ clickable = v.toBool();
+ else if ( attrib == "resizeable" )
+ resizeable = v.toBool();
+ }
+ n = n.nextSibling().toElement();
+ }
+ lv->addColumn( txt );
+ int i = lv->header()->count() - 1;
+ if ( hasPixmap ) {
+ lv->header()->setLabel( i, pix, txt );
+ }
+ if ( !clickable )
+ lv->header()->setClickEnabled( clickable, i );
+ if ( !resizeable )
+ lv->header()->setResizeEnabled( resizeable, i );
+ }
+#ifndef QT_NO_TABLE
+ else if ( widget->inherits( "QTable" ) ) {
+ QTable *table = (QTable*)widget;
+#ifndef QT_NO_SQL
+ bool isSql = (widget->inherits( "QDataTable" ));
+#endif
+ bool isRow;
+ if ( ( isRow = e.tagName() == "row" ) )
+ table->setNumRows( table->numRows() + 1 );
+ else {
+#ifndef QT_NO_SQL
+ if ( !isSql )
+#endif
+ table->setNumCols( table->numCols() + 1 );
+ }
+
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ bool hasPixmap = false;
+ QString txt;
+ QString field;
+ QValueList<Field> fieldMap;
+ if ( fieldMaps.find( table ) != fieldMaps.end() ) {
+ fieldMap = *fieldMaps.find( table );
+ fieldMaps.remove( table );
+ }
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( attrib == "text" )
+ txt = translate(v.toString());
+ else if ( attrib == "pixmap" ) {
+ hasPixmap = !n.firstChild().firstChild().toText().data().isEmpty();
+ if ( hasPixmap )
+ pix = loadPixmap( n.firstChild().toElement().toElement() );
+ } else if ( attrib == "field" )
+ field = v.toString();
+ }
+ n = n.nextSibling().toElement();
+ }
+
+ int i = isRow ? table->numRows() - 1 : table->numCols() - 1;
+ QHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader();
+ if ( hasPixmap ) {
+#ifndef QT_NO_SQL
+ if ( isSql )
+ ((QDataTable*)table)->addColumn( field, txt, -1, pix );
+ else
+#endif
+ h->setLabel( i, pix, txt );
+ } else {
+#ifndef QT_NO_SQL
+ if ( isSql ) {
+ ((QDataTable*)table)->addColumn( field, txt );
+ }
+ else
+#endif
+ h->setLabel( i, txt );
+ }
+ if ( !isRow && !field.isEmpty() ) {
+ fieldMap.append( Field( txt, (hasPixmap ? pix : QPixmap()), field ) );
+ fieldMaps.insert( table, fieldMap );
+ }
+ }
+#endif
+}
+
+void KommanderFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap )
+{
+ QDomElement n = e;
+ hasPixmap = false;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( attrib == "text" )
+ txt = translate(v.toString());
+ else if ( attrib == "pixmap" ) {
+ pix = loadPixmap( n.firstChild().toElement() );
+ hasPixmap = !pix.isNull();
+ }
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void KommanderFactory::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i )
+{
+ if ( widget->inherits( "QListBox" ) || widget->inherits( "QComboBox" ) ) {
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ bool hasPixmap = false;
+ QString txt;
+ loadItem( n, pix, txt, hasPixmap );
+ QListBox *lb = 0;
+ if ( widget->inherits( "QListBox" ) )
+ lb = (QListBox*)widget;
+ else
+ lb = ( (QComboBox*)widget)->listBox();
+ if ( hasPixmap ) {
+ new QListBoxPixmap( lb, pix, txt );
+ } else {
+ new QListBoxText( lb, txt );
+ }
+#ifndef QT_NO_ICONVIEW
+ } else if ( widget->inherits( "QIconView" ) ) {
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ bool hasPixmap = false;
+ QString txt;
+ loadItem( n, pix, txt, hasPixmap );
+
+ QIconView *iv = (QIconView*)widget;
+ new QIconViewItem( iv, txt, pix );
+#endif
+ } else if ( widget->inherits( "QListView" ) ) {
+ QDomElement n = e.firstChild().toElement();
+ QPixmap pix;
+ QValueList<QPixmap> pixmaps;
+ QStringList textes;
+ QListViewItem *item = 0;
+ QListView *lv = (QListView*)widget;
+ if ( i )
+ item = new QListViewItem( i, lastItem );
+ else
+ item = new QListViewItem( lv, lastItem );
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "property" ) {
+ QString attrib = n.attribute( "name" );
+ QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ if ( attrib == "text" )
+ textes << translate(v.toString());
+ else if ( attrib == "pixmap" ) {
+ QString s = v.toString();
+ if ( s.isEmpty() ) {
+ pixmaps << QPixmap();
+ } else {
+ pix = loadPixmap( n.firstChild().toElement() );
+ pixmaps << pix;
+ }
+ }
+ } else if ( n.tagName() == "item" ) {
+ item->setOpen( true );
+ createItem( n, widget, item );
+ }
+
+ n = n.nextSibling().toElement();
+ }
+
+ for ( int i = 0; i < lv->columns(); ++i ) {
+ item->setText( i, textes[ i ] );
+ item->setPixmap( i, pixmaps[ i ] );
+ }
+ lastItem = item;
+ }
+}
+
+
+
+void KommanderFactory::loadChildAction( QObject *parent, const QDomElement &e )
+{
+ QDomElement n = e;
+ QAction *a = 0;
+ EventFunction ef;
+ if ( n.tagName() == "action" ) {
+ a = new QAction( parent );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "property" ) {
+ setProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
+ } else if ( n2.tagName() == "event" ) {
+ ef.events.append( n2.attribute( "name" ) );
+ ef.functions.append( QStringList::split( ',', n2.attribute( "functions" ) ) );
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ if ( !parent->inherits( "QAction" ) )
+ actionList.append( a );
+ } else if ( n.tagName() == "actiongroup" ) {
+ a = new QActionGroup( parent );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "property" ) {
+ setProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
+ } else if ( n2.tagName() == "action" ||
+ n2.tagName() == "actiongroup" ) {
+ loadChildAction( a, n2 );
+ } else if ( n2.tagName() == "event" ) {
+ ef.events.append( n2.attribute( "name" ) );
+ ef.functions.append( QStringList::split( ',', n2.attribute( "functions" ) ) );
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ if ( !parent->inherits( "QAction" ) )
+ actionList.append( a );
+ }
+ if ( a )
+ eventMap.insert( a, ef );
+}
+
+void KommanderFactory::loadActions( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "action" ) {
+ loadChildAction( toplevel, n );
+ } else if ( n.tagName() == "actiongroup" ) {
+ loadChildAction( toplevel, n );
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void KommanderFactory::loadToolBars( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ QMainWindow *mw = ( (QMainWindow*)toplevel );
+ QToolBar *tb = 0;
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "toolbar" ) {
+ Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
+ tb = new QToolBar( QString::null, mw, dock );
+ tb->setLabel( n.attribute( "label" ) );
+ tb->setName( n.attribute( "name" ) );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "action" ) {
+ QAction *a = findAction( n2.attribute( "name" ) );
+ if ( a )
+ a->addTo( tb );
+ } else if ( n2.tagName() == "separator" ) {
+ tb->addSeparator();
+ } else if ( n2.tagName() == "widget" ) {
+ (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "QWidget" ) );
+ } else if ( n2.tagName() == "property" ) {
+ setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+void KommanderFactory::loadMenuBar( const QDomElement &e )
+{
+ QDomElement n = e.firstChild().toElement();
+ QMainWindow *mw = ( (QMainWindow*)toplevel );
+ QMenuBar *mb = mw->menuBar();
+ while ( !n.isNull() ) {
+ if ( n.tagName() == "item" ) {
+ QPopupMenu *popup = new QPopupMenu( mw );
+ popup->setName( n.attribute( "name" ) );
+ QDomElement n2 = n.firstChild().toElement();
+ while ( !n2.isNull() ) {
+ if ( n2.tagName() == "action" ) {
+ QAction *a = findAction( n2.attribute( "name" ) );
+ if ( a )
+ a->addTo( popup );
+ } else if ( n2.tagName() == "separator" ) {
+ popup->insertSeparator();
+ }
+ n2 = n2.nextSibling().toElement();
+ }
+ mb->insertItem( translate( n.attribute( "text" ) ), popup );
+ } else if ( n.tagName() == "property" ) {
+ setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
+ }
+ n = n.nextSibling().toElement();
+ }
+}
+
+
+QAction *KommanderFactory::findAction( const QString &name )
+{
+ for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ if ( QString( a->name() ) == name )
+ return a;
+ QAction *ac = (QAction*)a->child( name.latin1(), "QAction" );
+ if ( ac )
+ return ac;
+ }
+ return 0;
+}
+
+void KommanderFactory::loadImages( const QString &dir )
+{
+ QDir d(dir);
+ QStringList l = d.entryList(QDir::Files);
+ for (QStringList::Iterator it = l.begin(); it != l.end(); ++it)
+ QMimeSourceFactory::defaultFactory()->setPixmap(*it, QPixmap(d.path() + "/" + *it, "PNG"));
+}
+
+QString KommanderFactory::translate( const QString& sourceText, const QString& comment )
+{
+ if (!sourceText.isEmpty() && !comment.isEmpty())
+ return KGlobal::locale()->translate(comment.utf8(), sourceText.utf8());
+ else if (!sourceText.isEmpty())
+ return KGlobal::locale()->translate(sourceText.utf8());
+ else
+ return sourceText;
+}
diff --git a/kommander/factory/kommanderfactory.h b/kommander/factory/kommanderfactory.h
new file mode 100644
index 00000000..0b9a7eab
--- /dev/null
+++ b/kommander/factory/kommanderfactory.h
@@ -0,0 +1,160 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+/* Modifications by Marc Britton (c) 2002-2003 under GNU GPL, terms as above */
+
+#ifndef _HAVE_KOMMANDERFACTORY_H_
+#define _HAVE_KOMMANDERFACTORY_H_
+
+#include <qstring.h>
+#include <qptrlist.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qvaluelist.h>
+#include <qmap.h>
+#include <qaction.h>
+#include "kommander_export.h"
+
+class QWidget;
+class QLayout;
+class QDomElement;
+class QListViewItem;
+class QTable;
+class QIconSet;
+class KommanderPlugin;
+
+struct KommanderWidgetInfo
+{
+ KommanderWidgetInfo() {}
+ KommanderWidgetInfo( const QString &g, const QString &t, QIconSet *i, const QString &w = QString::null, bool c = FALSE )
+ : group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c )
+ {
+ }
+ QString group;
+ QString toolTip;
+ QIconSet *iconSet;
+ QString whatsThis;
+ bool isContainer;
+};
+typedef QMap<QString, KommanderWidgetInfo> FeatureList;
+
+class KOMMANDER_EXPORT KommanderFactory
+{
+public:
+ KommanderFactory();
+ virtual ~KommanderFactory();
+
+ static QWidget *create( const QString &uiFile, QObject *connector = 0, QWidget *parent = 0, const char *name = 0 );
+ static QWidget *create( QIODevice *dev, QObject *connector = 0, QWidget *parent = 0, const char *name = 0 );
+ static int loadPlugins( bool force = FALSE );
+ static void addPlugin( KommanderPlugin *plugin );
+ static void loadImages( const QString &dir );
+
+ static QWidget *createWidget( const QString &className, QWidget *parent, const char *name );
+
+ static FeatureList featureList();
+private:
+ enum LayoutType { HBox, VBox, Grid, NoLayout };
+ void loadImageCollection( const QDomElement &e );
+ void loadConnections( const QDomElement &e, QObject *connector );
+ void loadTabOrder( const QDomElement &e );
+ QWidget *createWidgetInternal( const QDomElement &e, QWidget *parent, QLayout* layout, const QString &classNameArg );
+ QLayout *createLayout( QWidget *widget, QLayout* layout, LayoutType type );
+ LayoutType layoutType( QLayout *l ) const;
+ void setProperty( QObject* widget, const QString &prop, const QDomElement &e );
+ void createSpacer( const QDomElement &e, QLayout *layout );
+ QImage loadFromCollection( const QString &name );
+ QPixmap loadPixmap( const QDomElement &e );
+ QColorGroup loadColorGroup( const QDomElement &e );
+ void createColumn( const QDomElement &e, QWidget *widget );
+ void loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap );
+ void createItem( const QDomElement &e, QWidget *widget, QListViewItem *i = 0 );
+ void loadChildAction( QObject *parent, const QDomElement &e );
+ void loadActions( const QDomElement &e );
+ void loadToolBars( const QDomElement &e );
+ void loadMenuBar( const QDomElement &e );
+ QAction *findAction( const QString &name );
+ QString translate( const QString& sourceText, const QString& comment = "" );
+
+private:
+ struct Image {
+ QImage img;
+ QString name;
+ bool operator==( const Image &i ) const {
+ return ( i.name == name &&
+ i.img == img );
+ }
+ };
+
+ struct Field
+ {
+ Field() {}
+ Field( const QString &s1, const QPixmap &p, const QString &s2 ) : name( s1 ), pix( p ), field( s2 ) {}
+ QString name;
+ QPixmap pix;
+ QString field;
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+ bool operator==( const Field& ) const { return FALSE; }
+#endif
+ };
+
+ struct EventFunction
+ {
+ EventFunction() {}
+ EventFunction( const QString &e, const QStringList &f )
+ : events( e ) { functions.append( f ); }
+ QStringList events;
+ QValueList<QStringList> functions;
+ };
+
+ struct SqlWidgetConnection
+ {
+ SqlWidgetConnection() {}
+ SqlWidgetConnection( const QString &c, const QString &t )
+ : conn( c ), table( t ), dbControls( new QMap<QString, QString>() ) {}
+ QString conn;
+ QString table;
+ QMap<QString, QString> *dbControls;
+ };
+
+ struct Functions
+ {
+ QString functions;
+ };
+
+ QValueList<Image> images;
+ QWidget *toplevel;
+ QListViewItem *lastItem;
+ QMap<QString, QString> *dbControls;
+ QMap<QString, QStringList> dbTables;
+ QMap<QWidget*, SqlWidgetConnection> sqlWidgetConnections;
+ QMap<QString, QString> buddies;
+ QMap<QTable*, QValueList<Field> > fieldMaps;
+ QPtrList<QAction> actionList;
+ QMap<QObject *, EventFunction> eventMap;
+ QMap<QString, QString> languageSlots;
+ QMap<QString, Functions*> languageFunctions;
+ QStringList variables;
+ QStringList noDatabaseWidgets;
+ bool usePixmapCollection;
+ int defMargin, defSpacing;
+
+};
+
+#endif
diff --git a/kommander/factory/kommanderversion.h b/kommander/factory/kommanderversion.h
new file mode 100644
index 00000000..7a1c7772
--- /dev/null
+++ b/kommander/factory/kommanderversion.h
@@ -0,0 +1,7 @@
+#ifndef __VERSION_H__
+#define __VERSION_H__
+
+#define KOMMANDER_VERSION "1.5.3"
+
+#endif
+
diff --git a/kommander/icons/Makefile.am b/kommander/icons/Makefile.am
new file mode 100644
index 00000000..408cd8ee
--- /dev/null
+++ b/kommander/icons/Makefile.am
@@ -0,0 +1,4 @@
+KDE_ICON=kommander
+
+appicondir = $(kde_datadir)/kommander/icons
+appicon_ICON = arrow
diff --git a/kommander/icons/cr128-app-kommander.png b/kommander/icons/cr128-app-kommander.png
new file mode 100644
index 00000000..e0e9fc7e
--- /dev/null
+++ b/kommander/icons/cr128-app-kommander.png
Binary files differ
diff --git a/kommander/icons/cr16-app-kommander.png b/kommander/icons/cr16-app-kommander.png
new file mode 100644
index 00000000..33e8d6e2
--- /dev/null
+++ b/kommander/icons/cr16-app-kommander.png
Binary files differ
diff --git a/kommander/icons/cr22-app-kommander.png b/kommander/icons/cr22-app-kommander.png
new file mode 100644
index 00000000..f14697d6
--- /dev/null
+++ b/kommander/icons/cr22-app-kommander.png
Binary files differ
diff --git a/kommander/icons/cr32-app-kommander.png b/kommander/icons/cr32-app-kommander.png
new file mode 100644
index 00000000..b2235fb4
--- /dev/null
+++ b/kommander/icons/cr32-app-kommander.png
Binary files differ
diff --git a/kommander/icons/cr64-app-kommander.png b/kommander/icons/cr64-app-kommander.png
new file mode 100644
index 00000000..2cbd68ee
--- /dev/null
+++ b/kommander/icons/cr64-app-kommander.png
Binary files differ
diff --git a/kommander/icons/hi22-action-arrow.png b/kommander/icons/hi22-action-arrow.png
new file mode 100644
index 00000000..dfbeabaa
--- /dev/null
+++ b/kommander/icons/hi22-action-arrow.png
Binary files differ
diff --git a/kommander/kmdrtools/Makefile.am b/kommander/kmdrtools/Makefile.am
new file mode 100644
index 00000000..3a37d597
--- /dev/null
+++ b/kommander/kmdrtools/Makefile.am
@@ -0,0 +1,3 @@
+execkmdrdir = ${kde_datadir}/kmdr-editor/editor
+
+execkmdr_SCRIPTS = dcoptool-oldparser.kmdr examples.kmdr
diff --git a/kommander/kmdrtools/dcoptool-oldparser.kmdr b/kommander/kmdrtools/dcoptool-oldparser.kmdr
new file mode 100755
index 00000000..e6a8ec54
--- /dev/null
+++ b/kommander/kmdrtools/dcoptool-oldparser.kmdr
@@ -0,0 +1,2125 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>dcoptool2</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>dcoptool2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>712</width>
+ <height>478</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>DCOP Inserter Version 0.2 - Old Parser</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>@##### put the following in init scripts #########
+ @widgetName.setVisible(false)
+@wname.setVisible(false)
+@TextParam1.setVisible(false)
+@param1.setVisible(false)
+@TextParam2.setVisible(false)
+@param2.setVisible(false)
+@TextParam3.setVisible(false)
+@param3.setVisible(false)
+@TextParam4.setVisible(false)
+@param4.setVisible(false)
+
+@setGlobal(Array,"values(QString)
+keys(QString)
+clear(QString)
+count(QString)
+count(QString)
+remove(QString,QString)
+remove(QString,QString)
+fromString(QString,QString)
+toString(QString)
+toString(QString)
+toString(QString)
+toString(QString)
+toString(QString)")
+
+@setGlobal(File,"read(QString)
+write(QString,QString)
+append(QString,QString)")
+
+@setGlobal(Input,"text(QString,QString,QString)
+password(QString,QString)
+value(QString,QString,int,int,int,int)
+double(QString,QString,double,double,double,double)
+openfile(QString,QString,QString)
+savefile(QString,QString,QString)
+directory(QString,QString,QString)
+openfiles(QString,QString,QString)")
+
+@setGlobal(DCOP,"addUniqueItem(QString,QString)
+associatedText(QString)
+cellText(QString,int,int)
+checked(QString)
+children(QString,bool)
+clear(QString)
+count(QString)
+currentColumn(QString)
+currentItem(QString)
+currentRow(QString)
+execute(QString)
+findItem(QString,QString)
+insertColumn(QString,int,int)
+insertItem(QString,QString,int)
+insertItems(QString,QStringList,int)
+insertRow(QString,int,int)
+item(QString,int)
+itemDepth(QString,int)
+itemPath(QString,int)
+removeColumn(QString,int,int)
+removeItem(QString,int)
+removeRow(QString,int,int)
+selection(QString)
+setAssociatedText(QString,QString)
+setEnabled(QString,bool)
+setCellText(QString,int,int,QString)
+setCellWidget(QString,int,int,QString)
+cellWidget(QString,int,int)
+setChecked(QString,bool)
+setColumnCaption(QString,int,QString)
+setCurrentItem(QString,int)
+insertTab(QString,QString,int)
+setMaximum(QString,int)
+setPixmap(QString,QString,int)
+setRowCaption(QString,int,QString)
+setSelection(QString,QString)
+setText(QString,QString)
+setVisible(QString,bool)
+type(QString)
+setEditable(QString,bool)")
+
+@setGlobal(File,"read(QString)
+write(QString,QString)
+append(QString,QString)")
+
+@setGlobal(KommanderMessage,"")
+
+@setGlobal(String,"length(QString)
+contains(QString,QString)
+find(QString,QString,int)
+findRev(QString,QString,int)
+left(QString,int)
+right(QString,int)
+mid(QString,int,int)
+remove(QString,QString)
+replace(QString,QString,QString)
+upper(QString)
+lower(QString)
+compare(QString,QString)
+isEmpty(QString)
+isNumber(QString)
+section(QString,QString,int)
+args(QString,QString,QString,QString)
+args(QString,QString,QString,QString)
+args(QString,QString,QString,QString)")
+
+
+@functiongroup.setCurrentItem(1)
+@proto.insertItems(@global(DCOP), 0)
+
+</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout9</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>202</width>
+ <height>380</height>
+ </rect>
+ </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="ComboBox">
+ <item>
+ <property name="text">
+ <string>dcop(</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>dcop</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>dcopstr</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>select whether to use a Kommander call or console call</string>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>Label6</cstring>
+ </property>
+ <property name="text">
+ <string>Function Group:</string>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <item>
+ <property name="text">
+ <string>Array</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>DCOP</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>File</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Input</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Kommander</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Message</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>String</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>functiongroup</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Func/Proto:</string>
+ </property>
+ </widget>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>proto</cstring>
+ </property>
+ <property name="populationText">
+ <string>@global(@functiongroup.selection)</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout10</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>508</x>
+ <y>10</y>
+ <width>190</width>
+ <height>370</height>
+ </rect>
+ </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>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Branch:</string>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <item>
+ <property name="text">
+ <string>KommanderIf</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>QuantaIf</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>qt</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>MainApplication-Interface</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>branch</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="TextEdit">
+ <property name="name">
+ <cstring>TextDescription</cstring>
+ </property>
+ <property name="backgroundOrigin">
+ <enum>ParentOrigin</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout11</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>431</y>
+ <width>690</width>
+ <height>34</height>
+ </rect>
+ </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>wfilter</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Filter f&amp;unctions by widget</string>
+ </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>Requires widgets to be loaded from running dialog</string>
+ </property>
+ </widget>
+ <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>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton18</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Insert</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@switch(@String.mid(@dcopstr.selection, 1, 4))
+@case(dcop)
+ @setGlobal("outstring","@dcopstr.selection @window.selection, @branch.selection, "@proto.selection", @String.mid(@wname.selection, 0, @String.find(@wname.selection, " ", ))@param1@param2@param3@param4)")
+@case(cop)
+ @setGlobal("outstring","@dcopstr.selection @window.selection @branch.selection @global(short) @String.mid(@wname.selection, 0, @String.find(@wname.selection, " ", ))@param1@param2@param3@param4")
+@case(*)
+ @setGlobal("outstring","@dcopstr.selection - not found")
+@end
+@outstring.setText(@global(outstring))
+@cbclip
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>cbclip</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add to clipboard</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>@exec(dcop klipper klipper setClipboardContents "@global(outstring)")</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Requires Klipper</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>120</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>outstring</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>400</y>
+ <width>671</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton59</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>400</y>
+ <width>20</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@outstring.clear</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="GroupBox">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>220</x>
+ <y>10</y>
+ <width>278</width>
+ <height>375</height>
+ </rect>
+ </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="Label" row="10" column="0">
+ <property name="name">
+ <cstring>TextParam4</cstring>
+ </property>
+ <property name="text">
+ <string>Parameter 4</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label" row="6" column="0">
+ <property name="name">
+ <cstring>TextParam2</cstring>
+ </property>
+ <property name="text">
+ <string>Parameter 2</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="11" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>param4</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@execBegin
+if [ "@widgetText" ]
+then
+ echo ', "@widgetText"'
+fi
+@execEnd</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="7" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>param2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@execBegin
+if [ "@widgetText" ]
+then
+ echo ', "@widgetText"'
+fi
+@execEnd</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Window:</string>
+ </property>
+ </widget>
+ <widget class="ComboBox" row="1" column="0" rowspan="1" colspan="2">
+ <item>
+ <property name="text">
+ <string>dcopid</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>"kmdr-executor-"+parentPid</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>window</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label" row="8" column="0">
+ <property name="name">
+ <cstring>TextParam3</cstring>
+ </property>
+ <property name="text">
+ <string>Parameter 3</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="2" column="0">
+ <property name="name">
+ <cstring>widgetName</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Widget &amp;Name:</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@Array.clear(dlg)
+@Array.fromString(dlg,@exec(dcop | grep kmdr))
+@setGlobal(kdlg,"")
+@forEach(i, @Array.keys(dlg))
+ @setGlobal(kdlg, @global(kdlg) @i @i)
+@end
+@setGlobal(pdlg,@exec(kdialog --menu "Select a dialog other than pid @pid to parse" @global(kdlg)))
+@#@exec(kdialog --msgbox "@global(_KDDIR)\n")
+@# dcop kmdr-executor-32730 KommanderIf children kmdr-executor-32730 1
+@wname.clear
+@setGlobal(items,@dcop(@global(pdlg), KommanderIf, "children(QString,bool)", @global(pdlg), 1 ))
+@setGlobal(iwd,"")
+@forEach(i, @global(items))
+ @setGlobal(iwd, "@global(iwd)@i (@dcop(@global(pdlg), KommanderIf, "type(QString)", @i))\n")
+@end
+@wname.insertItems(@global(iwd),0)</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See Whats This for instructions</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This will get the list of widgets from a running dialog. To use it simply launch your dialog and then select it from the list.</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="9" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>param3</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@execBegin
+if [ "@widgetText" ]
+then
+ echo ', "@widgetText"'
+fi
+@execEnd</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>param1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@execBegin
+if [ "@widgetText" ]
+then
+ echo ', "@widgetText"'
+fi
+@execEnd</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ComboBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>wname</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label" row="4" column="0">
+ <property name="name">
+ <cstring>TextParam1</cstring>
+ </property>
+ <property name="text">
+ <string>Parameter 1</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer row="2" 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>111</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>setfunction</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>610</x>
+ <y>380</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@##### put the following in @setfunction #########
+@# set up dialog based on function
+@switch(@functiongroup.selection::@proto.selection)
+@case(DCOP::addUniqueItem(QString,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"item")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,addUniqueItem)
+ @setGlobal(DESC,"Inserts the item if it will not create a duplicate.")
+@case(DCOP::associatedText(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,associatedText)
+ @setGlobal(DESC,"Returns scripts associated with widget. This is an advanced feature that would not be commonly used.")
+@case(DCOP::cellText(QString,int,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"row")
+ @setGlobal(PARM2,"column")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,cellText)
+ @setGlobal(DESC,"Returns text of a cell in a table.")
+@case(DCOP::checked(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,checked)
+ @setGlobal(DESC,"Returns 1 for checked boxes, 0 for unchecked.")
+@case(DCOP::children(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"recursive")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,children)
+ @setGlobal(DESC,"Returns the list of child widgets contained in the parent widget. Set the &lt;i&gt;recursive&lt;/i&gt; parameter to &lt;i&gt;true&lt;/i&gt; to include widgets contained by child widgets.")
+@case(DCOP::clear(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,clear)
+ @setGlobal(DESC,"Removes all content from the widget.")
+@case(DCOP::count(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,count)
+ @setGlobal(DESC,"Returns number of items in a widget such as combobox or listbox.")
+@case(DCOP::currentColumn(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,currentColumn)
+ @setGlobal(DESC,"Returns index of current column.")
+@case(DCOP::currentItem(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,currentItem)
+ @setGlobal(DESC,"Returns index of current item.")
+@case(DCOP::currentRow(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,currentRow)
+ @setGlobal(DESC,"Returns index of current row.")
+@case(DCOP::execute(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,execute)
+ @setGlobal(DESC,"Executes the script associated with the widget. With the new parser the execute method can take one or more arguments.")
+@case(DCOP::findItem(QString,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"item")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,findItem)
+ @setGlobal(DESC,"Returns the index of an item with the given text.")
+@case(DCOP::insertColumn(QString,int,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"column")
+ @setGlobal(PARM2,"count")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,insertColumn)
+ @setGlobal(DESC,"Inserts new column &amp;#040;or &lt;i&gt;count&lt;/i&gt; columns&amp;#041; at &lt;i&gt;column&lt;/i&gt; position.")
+@case(DCOP::insertItem(QString,QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"item")
+ @setGlobal(PARM2,"index")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,insertItem)
+ @setGlobal(DESC,"Inserts item at &lt;i&gt;index&lt;/i&gt; position.")
+@case(DCOP::insertItems(QString,QStringList,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"items")
+ @setGlobal(PARM2,"index")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,insertItems)
+ @setGlobal(DESC,"Inserts multiple items &amp;#040;EOL-separated&amp;#041; at &lt;i&gt;index&lt;/i&gt; position.")
+@case(DCOP::insertRow(QString,int,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"row")
+ @setGlobal(PARM2,"count")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,insertRow)
+ @setGlobal(DESC,"Inserts new row &amp;#040;or &lt;i&gt;count&lt;/i&gt; rows&amp;#041; at &lt;i&gt;row&lt;/i&gt; position.")
+@case(DCOP::item(QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"index")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,item)
+ @setGlobal(DESC,"Returns the text of the item at the given index.")
+@case(DCOP::itemDepth(QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"index")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,itemDepth)
+ @setGlobal(DESC,"Returns the depth of the current item in the tree. Root items have depth 0.")
+@case(DCOP::itemPath(QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"index")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,itemPath)
+ @setGlobal(DESC,"Returns the slash-separated path to the given item in the tree.")
+@case(DCOP::removeColumn(QString,int,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"column")
+ @setGlobal(PARM2,"count")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,removeColumn)
+ @setGlobal(DESC,"Removes the column &amp;#040;or &lt;i&gt;count&lt;/i&gt; consecutive columns&amp;#041; with the given index.")
+@case(DCOP::removeItem(QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"index")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,removeItem)
+ @setGlobal(DESC,"Removes the item with the given index.")
+@case(DCOP::removeRow(QString,int,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"row")
+ @setGlobal(PARM2,"count")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,removeRow)
+ @setGlobal(DESC,"Removes the row &amp;#040;or &lt;i&gt;count&lt;/i&gt; consecutive rows&amp;#041; with the given index.")
+@case(DCOP::selection(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,selection)
+ @setGlobal(DESC,"Returns selected text or text of current item.\nIn case of Table widgets, returns the selection coordinates, separated by commas in TopRow,LeftColumn,BottomRow,RightColumn form. ")
+@case(DCOP::setAssociatedText(QString,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setAssociatedText)
+ @setGlobal(DESC,"Sets scripts associated with widget. This is an advanced feature that would not be commonly used.")
+@case(DCOP::setEnabled(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"enabled")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setEnabled)
+ @setGlobal(DESC,"Enables or disables widget.")
+@case(DCOP::setCellText(QString,int,int,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"row")
+ @setGlobal(PARM2,"col")
+ @setGlobal(PARM3,"text")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setCellText)
+ @setGlobal(DESC,"Sets text of a cell in a table.")
+@case(DCOP::setCellWidget(QString,int,int,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"row")
+ @setGlobal(PARM2,"col")
+ @setGlobal(PARM3,"cellWidget")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setCellWidget)
+ @setGlobal(DESC,"Inserts a widget into a cell of a table.")
+@case(DCOP::cellWidget(QString,int,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"row")
+ @setGlobal(PARM2,"col")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,cellWidget)
+ @setGlobal(DESC,"Returns the name of a widget inserted into a cell, or an empty string if the cell contains no widget or an unknown widget type.")
+@case(DCOP::setChecked(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"checked")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setChecked)
+ @setGlobal(DESC,"Sets/unsets checkbox.")
+@case(DCOP::setColumnCaption(QString,int,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"column")
+ @setGlobal(PARM2,"text")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setColumnCaption)
+ @setGlobal(DESC,"Sets caption of the column &lt;i&gt;column&lt;/i&gt;.")
+@case(DCOP::setCurrentItem(QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"index")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setCurrentItem)
+ @setGlobal(DESC,"Selects the item at the specified index. Indexes are zero based.")
+@case(DCOP::insertTab(QString,QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"label")
+ @setGlobal(PARM2,"index")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,insertTab)
+ @setGlobal(DESC,"Inserts a tab to the tabwidget with the specified label at the given index. Indexes are zero based.")
+@case(DCOP::setMaximum(QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"value")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setMaximum)
+ @setGlobal(DESC,"Sets maximum numeric value")
+@case(DCOP::setPixmap(QString,QString,int))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"iconName")
+ @setGlobal(PARM2,"index")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setPixmap)
+ @setGlobal(DESC,"Sets pixmap at the given index to the specified icon. Use &lt;i&gt;index = -1&lt;/i&gt; to set the pixmap for all items.")
+@case(DCOP::setRowCaption(QString,int,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"row")
+ @setGlobal(PARM2,"text")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setRowCaption)
+ @setGlobal(DESC,"Sets caption of the row &lt;i&gt;row&lt;/i&gt;.")
+@case(DCOP::setSelection(QString,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setSelection)
+ @setGlobal(DESC,"Selects given text or select item containing given text.")
+@case(DCOP::setText(QString,QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setText)
+ @setGlobal(DESC,"Sets widget's content.")
+@case(DCOP::setVisible(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"visible")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setVisible)
+ @setGlobal(DESC,"Shows/hides widget.")
+@case(DCOP::type(QString))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,type)
+ @setGlobal(DESC,"Returns type&amp;#040;class&amp;#041; of widget.")
+@case(DCOP::setEditable(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"editable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setEditable)
+ @setGlobal(DESC,"Makes the widget editable or read only, depending on the editable argument.")
+@case(Kommander::setEditable(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"editable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setEditable)
+ @setGlobal(DESC,"Returns current widget's content. This was required inside widget A to return widget A content when requested by widget B. The new method is to use &amp;#064;A.text inside B instead of just &amp;#064;A if you just want the unaltered text.")
+@case(Kommander::setEditable(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"editable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setEditable)
+ @setGlobal(DESC,"Returns selected text or text of current item. This is deprecated for &lt;i&gt;&amp;#064;mywidget.selected&lt;/i&gt;.")
+@case(Kommander::setEditable(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"editable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setEditable)
+ @setGlobal(DESC,"Does nothing. This is useful if you request a CheckBox or RadioButton to return a value where a state, typically the unchecked state, has no value. The &amp;#064;null prevents an error indicating it is empty.")
+@case(Kommander::pid(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"editable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,pid)
+ @setGlobal(DESC,"Returns the pid &amp;#040;process ID&amp;#041; of the current process.")
+@case(Kommander::dcopid(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"editable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,dcopid)
+ @setGlobal(DESC,"Returns DCOP identifier of current process. This is shorthand for &lt;i&gt;kmdr-executor-&amp;#064;pid&lt;/i&gt;.")
+@case(Kommander::parentPid(QString,bool))
+ @setGlobal(enWidget,1)
+ @setGlobal(PARM1,"editable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,parentPid)
+ @setGlobal(DESC,"Returns the pid of the parent Kommander window.")
+@case(Kommander::debug(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,debug)
+ @setGlobal(DESC,"Writes &lt;i&gt;text&lt;/i&gt; on stderr.")
+@case(Kommander::echo(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,echo)
+ @setGlobal(DESC,"Writes &lt;i&gt;text&lt;/i&gt; on standard output.")
+@case(Kommander::echo(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,echo)
+ @setGlobal(DESC,"Executes a script block. Bash is used if no shell is given. It is primarily for use in non-button widgets where script actions are not expected. Full path is not required for the shell which may be useful for portability. &lt;p&gt;&lt;i&gt;If this is used inside a button it allows alternate script languages to be used and will return a value to the main script, which may be unexpected.&lt;/i&gt;")
+@case(Kommander::env(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"variable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,env)
+ @setGlobal(DESC,"Returns value of an environment &amp;#040;shell&amp;#041; variable. Do not use &lt;i&gt;$&lt;/i&gt; in the name. For example, &lt;i&gt;&amp;#064;env&amp;#040;PATH&amp;#041;&lt;/i&gt;.")
+@case(Kommander::exec(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"command")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,exec)
+ @setGlobal(DESC,"Executes an external shell command.")
+@case(Kommander::exec(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"command")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,exec)
+ @setGlobal(DESC,"Parses an expression and returns computed value.")
+@case(Kommander::forEach(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"variable")
+ @setGlobal(PARM2,"items")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,forEach)
+ @setGlobal(DESC,"Executes loop: values from &lt;i&gt;items&lt;/i&gt; list &amp;#040;passed as EOL-separated string&amp;#041; are assigned to the variable. &lt;br&gt;&lt;b&gt;Old&lt;/b&gt;&lt;br&gt; &lt;i&gt;&amp;#064;forEach&amp;#040;i,A\\nB\\nC\\n&amp;#041;&lt;br&gt; &amp;#064;# &amp;#064;i=A&lt;br&gt;&amp;#064;end&lt;/i&gt;&lt;br&gt;&lt;b&gt;New&lt;/b&gt;&lt;br&gt;&lt;i&gt;foreach i in MyArray do&lt;br&gt; //i = key, MyArray[i] = val&lt;br&gt;end ")
+@case(Kommander::for(QString,int,int,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"variable")
+ @setGlobal(PARM2,"start")
+ @setGlobal(PARM3,"end")
+ @setGlobal(PARM4,"step")
+ @setGlobal(short,for)
+ @setGlobal(DESC,"Executes loop: variable is set to &lt;i&gt;start&lt;/i&gt; and is increased by &lt;i&gt;step&lt;/i&gt; each time loop is executed. Execution stops when variable becomes larger then &lt;i&gt;end&lt;/i&gt;. &lt;br&gt;&lt;b&gt;Old&lt;/b&gt;&lt;br&gt;&lt;i&gt;&amp;#064;for&amp;#040;i,1,10,1&amp;#041;&lt;br&gt; &amp;#064;# &amp;#064;i=1&lt;br&gt;&amp;#064;endif&lt;/i&gt;&lt;br&gt;&lt;b&gt;New&lt;/b&gt;&lt;br&gt;&lt;i&gt;for i=0 to 20 step 5 do&lt;br&gt; debug&amp;#040;i&amp;#041;&lt;br&gt;end&lt;/i&gt;.")
+@case(Kommander::for(QString,int,int,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"variable")
+ @setGlobal(PARM2,"start")
+ @setGlobal(PARM3,"end")
+ @setGlobal(PARM4,"step")
+ @setGlobal(short,for)
+ @setGlobal(DESC,"Returns the value of a global variable.")
+@case(Kommander::i18n(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"variable")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,i18n)
+ @setGlobal(DESC,"Translates the string into the current language. Texts in GUI would be automatically extracted for translation.")
+@case(Kommander::if(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"expression")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,if)
+ @setGlobal(DESC,"Executes block if expression is true &amp;#040;non-zero number or non-empty string.&amp;#041; &lt;p&gt;&lt;b&gt;Old&lt;/b&gt;Close with &lt;b&gt;&amp;#064;endif&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;New&lt;/b&gt;&lt;br&gt;if val == true then&lt;br&gt;// do op&lt;br&gt;elseif cond&lt;br&gt;// second chance&lt;br&gt;else&lt;br&gt;// cond failed&lt;br&gt;endif&lt;/p&gt;")
+@case(Kommander::dialog(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"file")
+ @setGlobal(PARM2,"args")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,dialog)
+ @setGlobal(DESC,"Executes another Kommander dialog. Current dialog directory is used if no path is given. Arguments may be given as named arguments which will become global variables in the new dialog. For instance: &lt;i&gt;var=val&lt;/i&gt;")
+@case(Kommander::readSetting(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"key")
+ @setGlobal(PARM2,"default")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,readSetting)
+ @setGlobal(DESC,"Reads setting from configration file for this dialog.")
+@case(Kommander::setGlobal(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"variable")
+ @setGlobal(PARM2,"value")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,setGlobal)
+ @setGlobal(DESC,"Sets the value of a global variable. Global variables exist for the life of the Kommander window.")
+@case(Kommander::writeSetting(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"key")
+ @setGlobal(PARM2,"value")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,writeSetting)
+ @setGlobal(DESC,"Stores setting in configuration file for this dialog.")
+@case(Kommander::writeSetting(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"key")
+ @setGlobal(PARM2,"value")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,writeSetting)
+ @setGlobal(DESC,"Begin of &lt;b&gt;switch&lt;/b&gt; block. Following &lt;b&gt;case&lt;/b&gt; values are compared to &lt;i&gt;expression&lt;/i&gt;.&lt;p&gt;&amp;#064;switch&amp;#040;&amp;#041;&lt;br&gt;&amp;#064;case&amp;#040;&amp;#041;&lt;br&gt;&amp;#064;end")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Executes an external DCOP call.")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Adds a comment to EOL that Kommander will not parse")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Creates a new widget with the specified type and as the child of parent.")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Returns true if there is a widget with the passed name, false otherwise.")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Connects the signal of sender with the slot of the receiver")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Disconnects the signal of sender from the slot of the receiver")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Exits script execution and returns")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Exits the current block of a while, for or foreach loop")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Exit a step and return to the beginning of a loop")
+@case(Kommander::dcop(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"id")
+ @setGlobal(PARM2,"interface")
+ @setGlobal(PARM3,"function")
+ @setGlobal(PARM4,"args")
+ @setGlobal(short,dcop)
+ @setGlobal(DESC,"Return from a script, optionaly with a value from the script to the caller")
+@case(Array::values(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,values)
+ @setGlobal(DESC,"Returns an EOL-separated list of all values in the array.")
+@case(Array::keys(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,keys)
+ @setGlobal(DESC,"Returns an EOL-separated list of all keys in the array.")
+@case(Array::clear(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,clear)
+ @setGlobal(DESC,"Removes all elements from the array.")
+@case(Array::count(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,count)
+ @setGlobal(DESC,"Returns the number of elements in the array.")
+@case(Array::count(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,count)
+ @setGlobal(DESC,"Returns the value associated with the given key.")
+@case(Array::remove(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"key")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,remove)
+ @setGlobal(DESC,"Removes element with the given key from the array.")
+@case(Array::remove(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"key")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,remove)
+ @setGlobal(DESC,"Adds element with the given key and value to the array")
+@case(Array::fromString(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"string")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,fromString)
+ @setGlobal(DESC,"Adds all elements in the string to the array. ")
+@case(Array::toString(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,toString)
+ @setGlobal(DESC,"Returns all elements in the array in &lt;pre&gt;key\\tvalue\\n&lt;/pre&gt; format.")
+@case(Array::toString(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,toString)
+ @setGlobal(DESC,"")
+@case(Array::toString(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,toString)
+ @setGlobal(DESC,"")
+@case(Array::toString(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,toString)
+ @setGlobal(DESC,"")
+@case(Array::toString(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"array")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,toString)
+ @setGlobal(DESC,"")
+@case(String::length(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,length)
+ @setGlobal(DESC,"Returns number of chars in the string.")
+@case(String::contains(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"substring")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,contains)
+ @setGlobal(DESC,"Checks if the the string contains the given substring.")
+@case(String::find(QString,QString,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"sought")
+ @setGlobal(PARM3,"index")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,find)
+ @setGlobal(DESC,"Returns the position of a substring in the string, or -1 if it is not found.")
+@case(String::findRev(QString,QString,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"sought")
+ @setGlobal(PARM3,"index")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,findRev)
+ @setGlobal(DESC,"Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards")
+@case(String::left(QString,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"n")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,left)
+ @setGlobal(DESC,"Returns the first &lt;i&gt;n&lt;/i&gt; chars of the string.")
+@case(String::right(QString,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"n")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,right)
+ @setGlobal(DESC,"Returns the last &lt;i&gt;n&lt;/i&gt; chars of the string.")
+@case(String::mid(QString,int,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"start")
+ @setGlobal(PARM3,"n")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,mid)
+ @setGlobal(DESC,"Returns &lt;i&gt;n&lt;/i&gt; chars of the string, starting from &lt;i&gt;start&lt;/i&gt;.")
+@case(String::remove(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"substring")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,remove)
+ @setGlobal(DESC,"Removes all occurrences of given substring.")
+@case(String::replace(QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"substring")
+ @setGlobal(PARM3,"replacement")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,replace)
+ @setGlobal(DESC,"Replaces all occurrences of the given substring with the given replacement.")
+@case(String::upper(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,upper)
+ @setGlobal(DESC,"Converts the string to uppercase.")
+@case(String::lower(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,lower)
+ @setGlobal(DESC,"Converts the string to lowercase.")
+@case(String::compare(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string1")
+ @setGlobal(PARM2,"string2")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,compare)
+ @setGlobal(DESC,"Compares two strings. Returns 0 if they are equal, ")
+@case(String::isEmpty(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,isEmpty)
+ @setGlobal(DESC,"Checks if the string is empty.")
+@case(String::isNumber(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,isNumber)
+ @setGlobal(DESC,"Checks if the string is a valid number.")
+@case(String::section(QString,QString,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"separator")
+ @setGlobal(PARM3,"index")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,section)
+ @setGlobal(DESC,"Returns given section of a string.")
+@case(String::args(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"arg1")
+ @setGlobal(PARM3,"arg2")
+ @setGlobal(PARM4,"arg3")
+ @setGlobal(short,args)
+ @setGlobal(DESC,"Returns the given string with %1, %2, %3 replaced with &lt;i&gt;arg1&lt;/i&gt;, &lt;i&gt;arg2&lt;/i&gt;, &lt;i&gt;arg3&lt;/i&gt; accordingly.")
+@case(String::args(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"arg1")
+ @setGlobal(PARM3,"arg2")
+ @setGlobal(PARM4,"arg3")
+ @setGlobal(short,args)
+ @setGlobal(DESC,"Convert a string to an integer. If not possible use the default value")
+@case(String::args(QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"string")
+ @setGlobal(PARM2,"arg1")
+ @setGlobal(PARM3,"arg2")
+ @setGlobal(PARM4,"arg3")
+ @setGlobal(short,args)
+ @setGlobal(DESC,"Convert a string to a double precision floating point value. If not possible use the default value")
+@case(File::read(QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"")
+ @setGlobal(PARM2,"")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,read)
+ @setGlobal(DESC,"Returns content of given file.")
+@case(File::write(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"file")
+ @setGlobal(PARM2,"string")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,write)
+ @setGlobal(DESC,"Writes given string to a file.")
+@case(File::append(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"file")
+ @setGlobal(PARM2,"string")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,append)
+ @setGlobal(DESC,"Appends given string to the end of a file.")
+@case(Input::text(QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"caption")
+ @setGlobal(PARM2,"label")
+ @setGlobal(PARM3,"default")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,text)
+ @setGlobal(DESC,"Shows text selection dialog. Returns entered text.")
+@case(Input::password(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"caption")
+ @setGlobal(PARM2,"password")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,password)
+ @setGlobal(DESC,"Shows a dialog asking user for password and returns it.")
+@case(Input::value(QString,QString,int,int,int,int))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"caption")
+ @setGlobal(PARM2,"label")
+ @setGlobal(PARM3,"value")
+ @setGlobal(PARM4,"min")
+ @setGlobal(short,value)
+ @setGlobal(DESC,"Shows value selection dialog. Returns entered value.")
+@case(Input::double(QString,QString,double,double,double,double))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"caption")
+ @setGlobal(PARM2,"label")
+ @setGlobal(PARM3,"value")
+ @setGlobal(PARM4,"min")
+ @setGlobal(short,double)
+ @setGlobal(DESC,"Shows float value selection dialog. Returns entered value.")
+@case(Input::openfile(QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"startdir")
+ @setGlobal(PARM2,"filter")
+ @setGlobal(PARM3,"caption")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,openfile)
+ @setGlobal(DESC,"Shows existing file selection dialog. Returns selected file.")
+@case(Input::savefile(QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"startdir")
+ @setGlobal(PARM2,"filter")
+ @setGlobal(PARM3,"caption")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,savefile)
+ @setGlobal(DESC,"Shows save file selection dialog. Returns selected file.")
+@case(Input::directory(QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"startdir")
+ @setGlobal(PARM2,"filter")
+ @setGlobal(PARM3,"caption")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,directory)
+ @setGlobal(DESC,"Shows directory selection dialog. Returns selected directory.")
+@case(Input::openfiles(QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"startdir")
+ @setGlobal(PARM2,"filter")
+ @setGlobal(PARM3,"caption")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,openfiles)
+ @setGlobal(DESC,"Shows multiple files selection dialog. Returns EOL-separated list of selected files.")
+@case(Message::info(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"caption")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,info)
+ @setGlobal(DESC,"Shows an information dialog.")
+@case(Message::error(QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"caption")
+ @setGlobal(PARM3,"")
+ @setGlobal(PARM4,"")
+ @setGlobal(short,error)
+ @setGlobal(DESC,"Shows an error dialog.")
+@case(Message::warning(QString,QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"caption")
+ @setGlobal(PARM3,"button1")
+ @setGlobal(PARM4,"button2")
+ @setGlobal(short,warning)
+ @setGlobal(DESC,"Shows a warning dialog with up to three buttons. Returns number of selected button.")
+@case(Message::question(QString,QString,QString,QString,QString))
+ @setGlobal(enWidget,0)
+ @setGlobal(PARM1,"text")
+ @setGlobal(PARM2,"caption")
+ @setGlobal(PARM3,"button1")
+ @setGlobal(PARM4,"button2")
+ @setGlobal(short,question)
+ @setGlobal(DESC,"Shows a question dialog with up to three buttons. Returns number of selected button.")
+@case(*)
+ @exec(kdialog --error "@functiongroup.selection::@proto.selection is not recognized")
+@end
+@setparams
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>setparams</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>570</x>
+ <y>380</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@##### put the following in @setparams #########
+@if(@global(enWidget))
+ @widgetName.setVisible(true)
+ @wname.setVisible(true)
+@endif
+@if(!@global(enWidget))
+ @widgetName.setVisible(false)
+ @wname.setVisible(false)
+@endif
+@if(@String.length(@global(PARM1)))
+ @param1.setVisible(true)
+ @TextParam1.setVisible(true)
+ @TextParam1.setText(@global(PARM1))
+@endif
+@if(!@String.length(@global(PARM1)))
+ @param1.clear
+ @param1.setVisible(false)
+ @TextParam1.setVisible(false)
+@endif
+@if(@String.length(@global(PARM2)))
+ @param2.setVisible(true)
+ @TextParam2.setVisible(true)
+ @TextParam2.setText(@global(PARM2))
+@endif
+@if(!@String.length(@global(PARM2)))
+ @param2.clear
+ @param2.setVisible(false)
+ @TextParam2.setVisible(false)
+@endif
+@if(@String.length(@global(PARM3)))
+ @param3.setVisible(true)
+ @TextParam3.setVisible(true)
+ @TextParam3.setText(@global(PARM3))
+@endif
+@if(!@String.length(@global(PARM3)))
+ @param3.clear
+ @param3.setVisible(false)
+ @TextParam3.setVisible(false)
+@endif
+@if(@String.length(@global(PARM4)))
+ @param4.setVisible(true)
+ @TextParam4.setVisible(true)
+ @TextParam4.setText(@global(PARM4))
+@endif
+@if(!@String.length(@global(PARM4)))
+ @param4.clear
+ @param4.setVisible(false)
+ @TextParam4.setVisible(false)
+@endif
+@TextDescription.setText(&lt;html&gt;@global(DESC)&lt;/html&gt;)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>filterscript</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>220</x>
+ <y>380</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@if(@wfilter.checked)
+ @filteron
+@endif
+@if(!@wfilter.checked)
+ @filteroff
+@endif</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>filteroff</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>300</x>
+ <y>380</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@##### put the following in the @filteroff script #########
+@setGlobal(DCOP,"addUniqueItem(QString,QString)
+associatedText(QString)
+cellText(QString,int,int)
+checked(QString)
+children(QString,bool)
+clear(QString)
+count(QString)
+currentColumn(QString)
+currentItem(QString)
+currentRow(QString)
+execute(QString)
+findItem(QString,QString)
+insertColumn(QString,int,int)
+insertItem(QString,QString,int)
+insertItems(QString,QStringList,int)
+insertRow(QString,int,int)
+item(QString,int)
+itemDepth(QString,int)
+itemPath(QString,int)
+removeColumn(QString,int,int)
+removeItem(QString,int)
+removeRow(QString,int,int)
+selection(QString)
+setAssociatedText(QString,QString)
+setEnabled(QString,bool)
+setCellText(QString,int,int,QString)
+setCellWidget(QString,int,int,QString)
+cellWidget(QString,int,int)
+setChecked(QString,bool)
+setColumnCaption(QString,int,QString)
+setCurrentItem(QString,int)
+insertTab(QString,QString,int)
+setMaximum(QString,int)
+setPixmap(QString,QString,int)
+setRowCaption(QString,int,QString)
+setSelection(QString,QString)
+setText(QString,QString)
+setVisible(QString,bool)
+type(QString)
+setEditable(QString,bool)")
+
+@proto.clear
+@proto.insertItems(@global(DCOP), 0)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>filteron</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>260</x>
+ <y>380</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@##### put the following in @wfilter checked #########
+@setGlobal(start,@expr(@String.find("@wname.selection", " ")+2))
+@setGlobal(stop,@expr(@String.length("@wname.selection")-1))
+@setGlobal(length,@expr(@global(stop)-@global(start)))
+@setGlobal(teststr, @String.lower(@String.mid("@wname.selection", @global(start), @global(length))))
+@# @exec(kdialog --msgbox "Base: @wname.selection\nStart: @global(start)\nStop: @global(start)\nLength: @global(length)\nString: @global(teststr)")
+@switch(@global(teststr))
+
+@##### put the following in the @filteron script #########
+@case(aboutdialog)
+ @setGlobal(DCOP,"execute(QString)")
+
+@case(buttongroup)
+ @setGlobal(DCOP,"checked(QString)
+setChecked(QString,bool)")
+
+@case(checkbox)
+ @setGlobal(DCOP,"setText(QString,QString)
+checked(QString)
+setChecked(QString,bool)")
+
+@case(closebutton)
+ @setGlobal(DCOP,"setText(QString,QString)")
+
+@case(combobox)
+ @setGlobal(DCOP,"selection(QString)
+setSelection(QString,QString)
+currentItem(QString)
+setCurrentItem(QString,int)
+item(QString,int)
+removeItem(QString,int)
+insertItem(QString,QString,int)
+insertItems(QString,QStringList,int)
+addUniqueItem(QString,QString)
+clear(QString)
+count(QString)
+setEditable(QString,bool)")
+
+@case(datepicker)
+ @setGlobal(DCOP,"setText(QString,QString)")
+
+@case(dialog)
+ @setGlobal(DCOP,"setText(QString,QString)")
+
+@case(execbutton)
+ @setGlobal(DCOP,"setText(QString,QString)
+execute(QString)")
+
+@case(fileselector)
+ @setGlobal(DCOP,"setText(QString,QString)
+selection(QString)
+setSelection(QString,QString)
+clear(QString)")
+
+@case(fontdialog)
+ @setGlobal(DCOP,"execute(QString)")
+
+@case(groupbox)
+ @setGlobal(DCOP,"setText(QString,QString)")
+
+@case(konsole)
+ @setGlobal(DCOP,"setText(QString,QString)
+clear(QString)
+execute(QString)")
+
+@case(label)
+ @setGlobal(DCOP,"setText(QString,QString)
+clear(QString)")
+
+@case(lineedit)
+ @setGlobal(DCOP,"setText(QString,QString)
+selection(QString)
+setSelection(QString,QString)
+clear(QString)
+setEditable(QString,bool)")
+
+@case(listbox)
+ @setGlobal(DCOP,"setText(QString,QString)
+selection(QString)
+setSelection(QString,QString)
+insertItems(QString,QStringList,int)
+insertItem(QString,QString,int)
+removeItem(QString,int)
+clear(QString)
+currentItem(QString)
+setCurrentItem(QString,int)
+item(QString,int)
+addUniqueItem(QString,QString)
+findItem(QString,QString)
+setPixmap(QString,QString,int)
+count(QString)")
+
+@case(pixmaplabel)
+ @setGlobal(DCOP,"setText(QString,QString)
+clear(QString)")
+
+@case(popupmenu)
+ @setGlobal(DCOP,"clear(QString)
+execute(QString)
+item(QString,int)
+count(QString)")
+
+@case(progressbar)
+ @setGlobal(DCOP,"setText(QString,QString)
+clear(QString)
+setMaximum(QString,int)")
+
+@case(radiobutton)
+ @setGlobal(DCOP,"setText(QString,QString)
+setChecked(QString,bool)
+checked(QString)")
+
+@case(richtexteditor)
+ @setGlobal(DCOP,"setText(QString,QString)
+clear(QString)
+selection(QString)
+setEditable(QString,bool)")
+
+@case(scriptobject)
+ @setGlobal(DCOP,"setText(QString,QString)
+clear(QString)
+execute(QString)
+item(QString,int)
+count(QString)")
+
+@case(slider)
+ @setGlobal(DCOP,"setText(QString,QString)
+clear(QString)
+setMaximum(QString,int)")
+
+@case(spinboxint)
+ @setGlobal(DCOP,"setText(QString,QString)
+setMaximum(QString,int)")
+
+@case(statusbar)
+ @setGlobal(DCOP,"setText(QString,QString)
+insertItem(QString,QString,int)
+removeItem(QString,int)
+clear(QString)")
+
+@case(table)
+ @setGlobal(DCOP,"currentColumn(QString)
+currentRow(QString)
+insertColumn(QString,int,int)
+insertRow(QString,int,int)
+cellText(QString,int,int)
+setCellText(QString,int,int,QString)
+setCellWidget(QString,int,int,QString)
+cellWidget(QString,int,int)
+removeRow(QString,int,int)
+removeColumn(QString,int,int)
+setColumnCaption(QString,int,QString)
+setRowCaption(QString,int,QString)
+setText(QString,QString)
+selection(QString)")
+
+@case(tabwidget)
+ @setGlobal(DCOP,"currentItem(QString)
+setCurrentItem(QString,int)
+insertTab(QString,QString,int)")
+
+@case(textbrowser)
+ @setGlobal(DCOP,"setText(QString,QString)
+selection(QString)
+clear(QString)")
+
+@case(textedit)
+ @setGlobal(DCOP,"setText(QString,QString)
+selection(QString)
+setSelection(QString,QString)
+clear(QString)
+setEditable(QString,bool)")
+
+@case(timer)
+ @setGlobal(DCOP,"setText(QString,QString)
+execute(QString)")
+
+@case(timewidget)
+ @setGlobal(DCOP,"setText(QString,QString)")
+
+@case(toolbox)
+ @setGlobal(DCOP,"count(QString)")
+
+@case(treewidget)
+ @setGlobal(DCOP,"insertItem(QString,QString,int)
+setText(QString,QString)
+insertItems(QString,QStringList,int)
+selection(QString)
+setSelection(QString,QString)
+clear(QString)
+removeItem(QString,int)
+currentItem(QString)
+setCurrentItem(QString,int)
+findItem(QString,QString)
+item(QString,int)
+itemPath(QString,int)
+itemDepth(QString,int)
+setPixmap(QString,QString,int)
+setColumnCaption(QString,int,QString)")
+
+@end
+@proto.clear
+@proto.insertItems(@global(DCOP), 0)
+
+</string>
+ </stringlist>
+ </property>
+ </widget>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="812">789cbd915d4bc3301846effb2b427357645b3b3f36c49fa07829881769f276fd600a3a2f44fcefe6bc9b9195f5529f274d737a28a4e9bc300ff7b7a698676f3bb7ebbcf1ad7b354578df6e3f1e9f6e3eb3bcaa4c1ce5d294f95996cf8c37772fcfc2dac6b55d68c0012c5714ecc12a50b003cf1714dc80178e822d78b9a66000571ab001d74b0a7ab0bea260ad1828e840df5050c046a3fb3f997f36f637d3c68e8dabbd67d43f2a9920121a9d0e2a998d88e8d5b67b954cd70be9bb1855c90c838d22de883dde9bbeb3df9e1c191e1f94cc46264d535f2a536720a33390943ffd3fa7ccd775f60d4b60a687</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>wname</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>filterscript</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>functiongroup</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>proto</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>proto</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>setfunction</receiver>
+ <slot>execute()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>wname</tabstop>
+ <tabstop>param1</tabstop>
+ <tabstop>param2</tabstop>
+ <tabstop>param3</tabstop>
+ <tabstop>ExecButton18</tabstop>
+ <tabstop>window</tabstop>
+ <tabstop>widgetName</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/kmdrtools/examples.kmdr b/kommander/kmdrtools/examples.kmdr
new file mode 100755
index 00000000..4e63e80f
--- /dev/null
+++ b/kommander/kmdrtools/examples.kmdr
@@ -0,0 +1,154 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Form2</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>371</width>
+ <height>491</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Kommander Examples</string>
+ </property>
+ <property name="icon">
+ <pixmap>image0</pixmap>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>TreeWidget19.insertItem("current", -1)
+array_indexedFromString("a", exec("cd "+_KDDIR+" &amp;&amp; ls -1 current/*.kmdr"), "\n")
+c = TreeWidget19.currentItem
+for i=0 to array_count("a")-1 do
+ TreeWidget19.insertItem(a[i], c)
+ debug(a[i])
+end
+TreeWidget19.insertItem("old", -1)
+c = TreeWidget19.currentItem
+array_indexedFromString("a", exec("cd "+_KDDIR+" &amp;&amp; ls -1 old/*kmdr"), "\n")
+for i=0 to array_count("a")-1 do
+ TreeWidget19.insertItem(a[i], c)
+end
+c = TreeWidget19.currentItem
+array_indexedFromString("a", exec("cd "+_KDDIR+" &amp;&amp; ls -1 tutorial/*kmdr"), "\n")
+for i=0 to array_count("a")-1 do
+ TreeWidget19.insertItem(a[i], c)
+end
+//debug(exec("ls -1 /home/eric/kdesvn/kdewebdev/kommander/examples/current/*.kmdr"))</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="useInternalParser">
+ <bool>true</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="TreeWidget" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Examples</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>TreeWidget19</cstring>
+ </property>
+ <property name="tooltipColumn">
+ <number>0</number>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout90</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>Spacer39</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>71</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton108</cstring>
+ </property>
+ <property name="text">
+ <string>Open in &amp;new editor</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>d = TreeWidget19.itemDepth(TreeWidget19.currentItem)
+if d == 1 then
+ execBackground("kmdr-editor "+_KDDIR+"/"+TreeWidget19.itemPath(TreeWidget19.currentItem)+"/"+TreeWidget19.selection)
+else //directory
+
+endif</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer40</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>71</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="6350">789ca598d94f1fc911c7dff7af40db6faba877a667baa747511e8c01e3030c06cc11e5a1aa7a86cbdc603051fef734f5ad9fed5d2952a4f521fba3beeaae1a7eff6de9606b63e9b7df7fb9bba7fb53599213ba5dfaad3c5c5c7cfbe7bffef1ef5f7e0d61a9fee9425e0abffeed975fb7ef976469f3ea727a013f56708dfe7a61597069b372068729f6cabbe0dcc8acbc622c4599c1a10dad72f1ca5d1370bfc77d5dcb01e70770176252de51eebb1c21df96720c6d87f51edcd3202fec5e29a7c01dee3b541e43dfa9b2ee4699dbd88e2a0f2997861a5d97040ed441dfa83c776d8ff5a3176e9b466cff6be5b6ded7aabe07ca5d37f6f4c2f400ee1bc84f1f95fb2859d7654f39a6766495c729a7b66d3a5dc77d431fa2ca2b9f9573ecb2ae975999dafa80ae5f1a0f0df6ef83fb79507bf927701e65d0f39372b507cef3837102fb2be3a1d1fd1efb4b65f87f193c3454f4fcaaf294a3e8ba6b5e3834ed88f3a528b72d352a0fef1b33e4f5df9443655d776aefd02d582e94fb568c3be3b9813ddf2a577b6695df6d1bf3a8f662514eed64fa7c521e6a38ea79867c39b48dfa9f8e95c705fb1f0c79d55f8142d7a8feee1a9cbaacfafb013c24d8c7df29f398912fee8db2c431e17d562ea137ff41be52eda9f2ca15784c05f10e7da7ba5fe5e3afc6b1d1789333f0200cff6e2acf21415f4fc643837cd5f8ace99971de6bfe756d65bc770aee52d0f8e77be550d7555efe0c4e09f1e95ae52e8c382fe7e0ae4680aeef832345e4eb2a788cd08f351fbb18b8d1fc70deb858bee1be983bc67b9aef55ba453c6d1b4b8b7a73094e7d823d37c15944f575b7ca43985ae4f7163813d6f98b71417c7bd82b6766c8ff9d8bbe479a9fdd1826e8ef173c9bfc199c02e4f167e09c08f1fb4e9916e749c0718c6a0f817e9ce70279b5fe75656c0bce6bfdeea6b1401e79569ec750903fa7c65dd1f749fdd7b75d84bd68cf3899bc1d38ce51f7b3c64f1f6a81837f37c0fdd4e9fb45e3b9efbb01f6a457c6638bf7efc07966c4eb9a721c09fef7e0347403de3b048f52501fd51ffdd091f94beb479fc75c50bfb5fef463c7886f5f8ca5457d5a07f78dc973021e479ca76cccd6dfde1897a2f92cd7df19f9f200e66e02639d3a8b57ff15cc11eb1c94b9ea83fc1fc1d4a27ffa4730e709f9a9fda697b117f873dd7886bd44fb5b5f16e759e3a79faa01105ff7604eb8af683cf573df427fd27c8c4ddfc05ea2fe8b6dead0cfbcde17bb61863fc4836998d05fb53ebdb4e309f5f69371467cb1d6c318fb8c7940b41fc594ad3e8bda230ebdc59fc3f9816982fce7606967f85bf329e6aa2fcedf1a0f93dadbad19cf13f255e3258e6326f81ffa513fb6e89fc7600a45f38b5be3cee23119cf13ea9dc67be47a5edff747e034637e21cdafda0c09eb0c798426d88b36c1dc9a7c9067ea6dde7207e03a5ea01fdc1bd714d3f31a4f351bfb80fe7e011ed3a8f672cf606a102facf1949a7ec67d740fe61efef26aff3a8d7419f553e33d853a70a1bf6b7ca5eaff84fa7c09e63a10eafe689c2dbe351f534fc4e87f9b6066cb8ff7c613e291d4be29d6fc80fe97c684fda4fd28a52a0fe6870b70951ff1a5f99e061a11ffe2c0dfe5db302e33fa81ceaf29c7087bf30c1e53863c03b8ca83fa087dc6d8e37dbf0c669970df0765926646bdd478484c05eb0c7b72f537e261c738435fdf8317e77d671c26d85ffb7d7a891f5d27e823d59ee8075a8f53a9fae2fd2be31efa5334a609fd17f217e9cc7eda4fd2944a07be06d7fbd0efcf8c05e7a9372e789fb51ea5991bab072acfd04446fcc83b6369e1ff67e3a9457e9d825313109f5bc66d40fdd1fe31b4291beb7b43a8e7f57eeac0d2c05e148c5bc48fcbc619f6259d67872ece013c82ebf8827ab307ce92d45fa4fd63e853ead01fb51e0fb1be8f7e7108ce39a1be607fa49170ff07f0c29feec27898314f6bbd1952b4fc746aef614813be47dc399832a17edc81a5b7fcb9361e511f59fd33e4dabe21df93710c88e7b7e0fa3ee4d37a338ca9833dbc185bbde1c9389abd9e8d5340fdb835ce01f322de1f47ca8807cdf781d380fa4f2b0b0e88cf2fe03aeec1deb65fac5f11e247aaffd01fb4df0ea59e473eed826b3d417d867da6349a7c37c6847ac94fc605eb04f9a76a3fdc8ff89917e769d7d8ced3155826f88f35bf7293d8d64f8ca780786fc143d3a17e1b2fdea31b63863f44e325b7f53eb59fc77dede2bc4ce04c09f6d57a9043ae21a8f2ec81ab3de0ff75b0c80c7be1fe2e31fce1ee8d05f9e4eec0436bf1cee05a2f50ff347e725fc73bc4db7be301f2b947b044f467a7f37dfd9a317b91379e218f837e491af45fa7f3681eaaff11af3a0fe43c04c4179f82c5fa0d69bdafd3fae23eed8f99eb38827eb40c9638213ebf804b67fb35de6b3a0c01f543f3af0e2f09f586b51ee56960e4a3877c53e94d9fcbef8cefd7c138ce9897609f3a3d05f8e7192cd6df58e51fdb41ccde6b6059f40fad7f6390d1ea19f6f7b9ef313fbc06978cf748eb6ffd5a0ce66f9d6fea746cf313a93feab8dbf69837b57fd66c8df6f31331ce3df245fd33723d8ff96ad378b07eba62cc33ea95c6d72839a19ed2b231c11f74042ec9eedb3266c8ef57bf33ecadf5b54ebb56df48e38b9a2c3de637adb7d48e8dfdfca50117abaf7edf58709f68fda0900bf4753be0ba8efea7f580fa3ce1e73f746e3cf78897042ec5f455fd292e5834fe285579b05ffb130d63077fc9a371847d49e7833abd14bcef3e1acf33fa81e63351b507f24feb35f1d4d8bafabf7eac36789f35bfa88cf58341d7b57ed15426bb7f024f2dce93f6a33add2e58e781fa315d2750dd1fc153b0f7745eaa5f3b61c63ca1f5f4659a34d678abd3d382757eaa5f1fc6dbf7ffffefbfb6df3b4ffa2f7bf1c54ff57fb33ffe5ffbfdb13ff1a7fecc9ffb2ffec25ffa2b7fed6ffcadbff3f7fec17ff58ffee90ffbbff967ffca2ffbd77ec5affa35ffc6affbb7fe9d7fef3ff80dbfe93ffaadc57ebfed3ff91dbfebf7fc67bfef0ffca13ff28d6f7df09def7df4c90f3efb11fb9d77ce916327aeb8c9cdeed89db85377e6cedd1777e12edd95bb76377e5cc8ef6edd9dbb770feeab7b744fee5bfdfbec5eb965f7daadb855b7e6deb875f7f6677ddd3bf7de7d701b6eb3defed16db96df7c9edb85db7e73ebb7d77e00eddd18ffdae71ad0bae73bd8b2eb9c1e55a1e3cd5982426a15207cb998e7feca7133aa5333aa72f7441977445d77443b77447f7f4405fe9919ee81b3dd3abeffb97e935add02aadd11b5aa7b7f48eded307daa04dfa485bb44d9f68877669effbfecfb44f07744847d4504b813aea2952a297196964cf8e8999e587beb5384d3cf3319ff0299ff1397fe10bbee42bbee61bbee53bbee7871ff2f3577ee427fec6cffc8a97f935aff02aaff11b5ee7b7fc8edff307dee0cd9ff67fe42ddee64fbcc3bbbcc79f799f0ff8908fea44d372e08e7bae9f873fdb9f07ae9fbfe2c509098b4891496639961339953339972f72f1f37eb9942bb9961bb9953bb99707f92a8ff224dfe4595ed513cbf2fa8ff12c2bb22a6bf246d6e52d277927efe5836cc8a67c942dd9964fb2f3a7fdbbb2279f655f0ee4508ea491568274527bb8241924cbf8e77cf1a31f8b2faed40c2b5c84e652eaffa632ffa5fcfdcfdf7ff92f64b3cec5</data>
+ </image>
+</images>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kommander/kommander-editor.kdevelop b/kommander/kommander-editor.kdevelop
new file mode 100644
index 00000000..41a05352
--- /dev/null
+++ b/kommander/kommander-editor.kdevelop
@@ -0,0 +1,285 @@
+<!DOCTYPE kdevelop>
+<kdevelop>
+ <general>
+ <author>Michal Rudolf</author>
+ <email>mrudolf@kdewebdev.org</email>
+ <version>$VERSION$</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ </keywords>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <description/>
+ <ignoreparts/>
+ <secondaryLanguages/>
+ <defaultencoding/>
+ <projectname>kommander-editor</projectname>
+ </general>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <showvcsfields>false</showvcsfields>
+ </tree>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>gtk</toc>
+ <toc>gnustep</toc>
+ <toc>python</toc>
+ <toc>php</toc>
+ <toc>perl</toc>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash_bugs</toc>
+ <toc>bash</toc>
+ <toc>c++_bugs_gcc</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>kde2book</toc>
+ <toc>kdev3api</toc>
+ <toc>libc</toc>
+ <toc>libstdc++</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>perl_bugs</toc>
+ <toc>php_bugs</toc>
+ <toc>python_bugs</toc>
+ <toc>w3c-svg</toc>
+ <toc>sdl</toc>
+ <toc>stl</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <projectdoc>
+ <userdocDir>/home/andris/cvs-developement/head/quanta/kommander/html/</userdocDir>
+ <apidocDir>/home/andris/cvs-developement/head/quanta/kommander/html/</apidocDir>
+ </projectdoc>
+ <ignoreqt_xml/>
+ <ignoredoxygen/>
+ <ignorekdocs/>
+ <ignoredevhelp>
+ <toc>atk</toc>
+ <toc>bonobo-activation</toc>
+ <toc>gdk</toc>
+ <toc>libgimpbase</toc>
+ <toc>libgimpcolor</toc>
+ <toc>libgimp</toc>
+ <toc>libgimpmath</toc>
+ <toc>libgimpmodule</toc>
+ <toc>libgimpthumb</toc>
+ <toc>libgimpwidgets</toc>
+ <toc>glib</toc>
+ <toc>gobject</toc>
+ <toc>libgnome</toc>
+ <toc>gtk</toc>
+ <toc>libbonobo</toc>
+ <toc>libbonoboui</toc>
+ <toc>ORBit2</toc>
+ <toc>pango</toc>
+ <toc>gdk-pixbuf</toc>
+ </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>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevautoproject>
+ <make>
+ <envvars>
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </envvars>
+ <abortonerror>true</abortonerror>
+ <numberofjobs>2</numberofjobs>
+ <dontact>false</dontact>
+ <makebin>makeobj</makebin>
+ <runmultiplejobs>true</runmultiplejobs>
+ <prio>0</prio>
+ </make>
+ <general>
+ <useconfiguration>default</useconfiguration>
+ <activetarget>editor/kmdr-editor</activetarget>
+ </general>
+ <configurations>
+ <default>
+ <configargs>--with-kommander --enable-debug=full</configargs>
+ <builddir>/data/development/build/kde-3.5/kdewebdev/</builddir>
+ <topsourcedir>/data/development/sources/kde-3.5/kdewebdev/</topsourcedir>
+ <cppflags/>
+ <ldflags/>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <cxxflags/>
+ <f77flags/>
+ <envvars/>
+ </default>
+ <andris>
+ <envvars/>
+ <configargs/>
+ <builddir>andris</builddir>
+ <topsourcedir/>
+ <cppflags/>
+ <ldflags/>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <cxxflags/>
+ <f77flags/>
+ </andris>
+ </configurations>
+ <run>
+ <mainprogram>/data/development/build/kde-3.5/kdewebdev/kommander/editor/.libs/kmdr-editor</mainprogram>
+ <programargs/>
+ <terminal>false</terminal>
+ <envvars/>
+ <autocompile>true</autocompile>
+ <directoryradio>executable</directoryradio>
+ <customdirectory>/</customdirectory>
+ <globaldebugarguments/>
+ <globalcwd>/data/development/build/kde-3.5/kdewebdev/</globalcwd>
+ <useglobalprogram>true</useglobalprogram>
+ <autoinstall>false</autoinstall>
+ <autokdesu>false</autokdesu>
+ </run>
+ </kdevautoproject>
+ <cppsupportpart>
+ <codecompletion/>
+ <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>
+ <kdevcppsupport>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>false</includeTypedefs>
+ <automaticCodeCompletion>true</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>
+ <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
+ <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
+ <alwaysParseInBackground>true</alwaysParseInBackground>
+ <usePermanentCaching>true</usePermanentCaching>
+ <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
+ <includePaths>.;</includePaths>
+ </codecompletion>
+ <references/>
+ <qt>
+ <used>true</used>
+ <version>3</version>
+ <root>/usr/lib/qt3</root>
+ <includestyle>3</includestyle>
+ <designerintegration>EmbeddedKDevDesigner</designerintegration>
+ <qmake>/usr/lib/qt3/bin/qmake</qmake>
+ <designer>/usr/lib/qt3/bin/designer</designer>
+ <designerpluginpaths/>
+ </qt>
+ <creategettersetter>
+ <prefixGet/>
+ <prefixSet>set</prefixSet>
+ <prefixVariable>m_,_</prefixVariable>
+ <parameterName>theValue</parameterName>
+ <inlineGet>true</inlineGet>
+ <inlineSet>true</inlineSet>
+ </creategettersetter>
+ <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/kommander/kommander.kdevelop b/kommander/kommander.kdevelop
new file mode 100644
index 00000000..f85e7354
--- /dev/null
+++ b/kommander/kommander.kdevelop
@@ -0,0 +1,279 @@
+<!DOCTYPE kdevelop>
+<kdevelop>
+ <general>
+ <author>Andras Mantia</author>
+ <email>amantia@kdewebdev.org</email>
+ <version>$VERSION$</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ </keywords>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <description/>
+ <ignoreparts/>
+ <secondaryLanguages/>
+ <defaultencoding/>
+ <projectname>kommander</projectname>
+ </general>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <showvcsfields>false</showvcsfields>
+ </tree>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>gtk</toc>
+ <toc>gnustep</toc>
+ <toc>python</toc>
+ <toc>php</toc>
+ <toc>perl</toc>
+ <toc>wxwidgets_bugs</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>sw</toc>
+ <toc>stl</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>python_bugs</toc>
+ <toc>php_bugs</toc>
+ <toc>perl_bugs</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>opengl</toc>
+ <toc>libstdc++</toc>
+ <toc>libc</toc>
+ <toc>kde2book</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>haskell</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>gnome1</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>clanlib</toc>
+ <toc>c++_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>ada</toc>
+ <toc>gtk_bugs</toc>
+ </ignoretocs>
+ <projectdoc>
+ <userdocDir>/home/andris/cvs-developement/head/quanta/kommander/html/</userdocDir>
+ <apidocDir>/home/andris/cvs-developement/head/quanta/kommander/html/</apidocDir>
+ </projectdoc>
+ <ignoreqt_xml/>
+ <ignoredoxygen/>
+ <ignorekdocs/>
+ <ignoredevhelp>
+ <toc>pango</toc>
+ <toc>atk</toc>
+ <toc>gdk</toc>
+ <toc>bonobo-activation</toc>
+ <toc>libgimpbase</toc>
+ <toc>libgimpcolor</toc>
+ <toc>libgimp</toc>
+ <toc>libgimpmath</toc>
+ <toc>libgimpmodule</toc>
+ <toc>libgimpthumb</toc>
+ <toc>libgimpwidgets</toc>
+ <toc>glib</toc>
+ <toc>libgnome</toc>
+ <toc>gobject</toc>
+ <toc>gtk</toc>
+ <toc>libbonobo</toc>
+ <toc>libbonoboui</toc>
+ <toc>ORBit2</toc>
+ <toc>gdk-pixbuf</toc>
+ </ignoredevhelp>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell/>
+ <programargs>/opt/kde3/bin/DVDAuthorWizard.kmdr</programargs>
+ <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>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevautoproject>
+ <make>
+ <envvars>
+ <envvar value="no" name="UNSERMAKE" />
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </envvars>
+ <abortonerror>true</abortonerror>
+ <numberofjobs>2</numberofjobs>
+ <dontact>false</dontact>
+ <makebin>makeobj</makebin>
+ <runmultiplejobs>true</runmultiplejobs>
+ <prio>0</prio>
+ </make>
+ <general>
+ <useconfiguration>default</useconfiguration>
+ <activetarget>widgets/libkommanderwidgets.la</activetarget>
+ </general>
+ <configurations>
+ <default>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>/data/development/build/kde-3.5/kdewebdev/</builddir>
+ <topsourcedir>/data/development/sources/kde-3.5/kdewebdev/</topsourcedir>
+ <cppflags/>
+ <ldflags/>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <cxxflags/>
+ <f77flags/>
+ <envvars/>
+ </default>
+ </configurations>
+ <run>
+ <mainprogram>/data/development/build/kde-3.5/kdewebdev/kommander/executor/.libs/kmdr-executor</mainprogram>
+ <programargs>/data/development/quanta/eric/editor-poc.kmdr</programargs>
+ <terminal>false</terminal>
+ <envvars/>
+ <directoryradio>build</directoryradio>
+ <customdirectory>/</customdirectory>
+ <autocompile>true</autocompile>
+ <autoinstall>false</autoinstall>
+ <autokdesu>false</autokdesu>
+ <globaldebugarguments>/data/development/quanta/eric/editor-poc.kmdr</globaldebugarguments>
+ <globalcwd>/data/development/build/kde-3.5/kdewebdev/</globalcwd>
+ <useglobalprogram>true</useglobalprogram>
+ </run>
+ </kdevautoproject>
+ <cppsupportpart>
+ <codecompletion/>
+ <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/>
+ </kdevcvs>
+ <kdevcppsupport>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>false</includeTypedefs>
+ <automaticCodeCompletion>false</automaticCodeCompletion>
+ <automaticArgumentsHint>true</automaticArgumentsHint>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <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>true</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>
+ <pcs>Qt3</pcs>
+ <pcs>KDElibs3</pcs>
+ </references>
+ <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>
+ <designerpluginpaths/>
+ </qt>
+ <creategettersetter>
+ <prefixGet/>
+ <prefixSet>set</prefixSet>
+ <prefixVariable>m_,_</prefixVariable>
+ <parameterName>theValue</parameterName>
+ <inlineGet>true</inlineGet>
+ <inlineSet>true</inlineSet>
+ </creategettersetter>
+ <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>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem/>
+ <docurl/>
+ <usermanualurl/>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/kommander/part/Makefile.am b/kommander/part/Makefile.am
new file mode 100644
index 00000000..9ba32668
--- /dev/null
+++ b/kommander/part/Makefile.am
@@ -0,0 +1,8 @@
+INCLUDES = -I$(top_srcdir)/kommander/executor -I$(top_srcdir)/kommander/factory $(all_includes)
+METASOURCES = AUTO
+kde_module_LTLIBRARIES = libkommander_part.la
+libkommander_part_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+libkommander_part_la_LIBADD = $(top_builddir)/kommander/executor/libinstance.la $(top_builddir)/kommander/widget/libkommanderwidget.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML)
+kde_services_DATA = kommander_part.desktop
+libkommander_part_la_SOURCES = kommander_part.cpp
+noinst_HEADERS = kommander_part.h
diff --git a/kommander/part/kommander_part.cpp b/kommander/part/kommander_part.cpp
new file mode 100644
index 00000000..ef8ab5e1
--- /dev/null
+++ b/kommander/part/kommander_part.cpp
@@ -0,0 +1,86 @@
+/***************************************************************************
+ begin : Wed Jan 30 2008
+ copyright : (C) 2008, 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 "kommander_part.h"
+
+#include <kdebug.h>
+
+#include <kinstance.h>
+#include <kparts/genericfactory.h>
+
+#include <qpoint.h>
+#include <qlayout.h>
+#include <qtimer.h>
+
+#include "instance.h"
+#include "kommanderversion.h"
+
+static const char *description =
+ I18N_NOOP("Executor Part is a component of the Kommander dialog system that executes .kmdr files inside a KDE KPart");
+
+typedef KParts::GenericFactory<KommanderPart> KommanderPartFactory;
+
+K_EXPORT_COMPONENT_FACTORY( libkommander_part, KommanderPartFactory )
+
+KommanderPart::KommanderPart( QWidget *parentWidget, const char * /*widgetName*/,
+ QObject *parent, const char *name, const QStringList & /*args*/ )
+ : KParts::ReadOnlyPart(parent, name)
+{
+ setInstance( KommanderPartFactory::instance() );
+ m_instance = 0L;
+ m_widget = new QWidget(parentWidget);
+ setWidget(m_widget);
+ m_layout = new QGridLayout(m_widget);
+}
+
+KommanderPart::~KommanderPart()
+{
+ delete m_instance;
+}
+
+KAboutData* KommanderPart::createAboutData()
+{
+ KAboutData * aboutData = new KAboutData("kommander_part", I18N_NOOP("Kommander Executor Part"),
+ KOMMANDER_VERSION, description, KAboutData::License_GPL,
+ "(c) 2008 Andras Mantia", I18N_NOOP("Part of the KDEWebDev module."), "http://www.kdewebdev.org");
+
+ aboutData->addAuthor("Andras Mantia", I18N_NOOP("Current maintainer"), "amantia@kdewebdev.org");
+ aboutData->addAuthor("Michal Rudolf", I18N_NOOP("Previous maintainer"), "mrudolf@kdewebdev.org");
+ aboutData->addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au");
+ return aboutData;
+}
+
+bool KommanderPart::openFile()
+{
+ delete m_instance;
+ m_instance = new Instance(0L);
+ m_instance->build(m_url);
+ QTimer::singleShot(0, this, SLOT(slotRun()));
+
+ emit setStatusBarText( m_url.prettyURL() );
+ return true;
+}
+
+void KommanderPart::slotRun()
+{
+ QWidget *w = m_instance->widget();
+ if (w)
+ {
+ w->reparent(m_widget, 0, QPoint(0,0));
+ m_layout->addWidget(w, 0, 0);
+ w->show(); //show, not execute, so it doesn't block the parent
+ }
+}
+
+#include "kommander_part.moc"
diff --git a/kommander/part/kommander_part.desktop b/kommander/part/kommander_part.desktop
new file mode 100644
index 00000000..38e47dbf
--- /dev/null
+++ b/kommander/part/kommander_part.desktop
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Name=KommanderPart
+Name[ca]=Part del Kommander
+Name[de]=Kommander-Komponente
+Name[et]=Kommanderi komponent
+Name[nds]=Kommander-Komponent
+Name[nl]=Kommander-component
+Name[pl]=Moduł Kommandera
+Name[ru]=Компонент Kommander
+Name[sv]=Kommander-delprogram
+Name[zh_TW]=Kommander 部件
+MimeType=application/x-kommander;
+ServiceTypes=KParts/ReadOnlyPart
+X-KDE-Library=libkommander_part
+Type=Service
diff --git a/kommander/part/kommander_part.h b/kommander/part/kommander_part.h
new file mode 100644
index 00000000..fc9b876c
--- /dev/null
+++ b/kommander/part/kommander_part.h
@@ -0,0 +1,48 @@
+/***************************************************************************
+ begin : Wed Jan 30 2008
+ copyright : (C) 2008, 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 KOMMANDERPART_H
+#define KOMMANDERPART_H
+
+#include <kparts/part.h>
+#include <kparts/factory.h>
+
+class Instance;
+class QGridLayout;
+
+class KommanderPart : public KParts::ReadOnlyPart
+{
+ Q_OBJECT
+public:
+ KommanderPart(QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name, const QStringList &args);
+
+ virtual ~KommanderPart();
+
+ static KAboutData* createAboutData();
+
+protected:
+ virtual bool openFile();
+
+protected slots:
+ void slotRun();
+
+private:
+ Instance *m_instance;
+ QWidget *m_widget;
+ QGridLayout *m_layout;
+};
+
+
+#endif // KOMMANDERPART_H
diff --git a/kommander/plugin/Makefile.am b/kommander/plugin/Makefile.am
new file mode 100644
index 00000000..be1bb9f4
--- /dev/null
+++ b/kommander/plugin/Makefile.am
@@ -0,0 +1,17 @@
+lib_LTLIBRARIES = libkommanderplugin.la
+
+# set the include path for X, qt and KDE
+INCLUDES = -I$(top_srcdir)/kommander/widget $(all_includes)
+
+# the library search path.
+libkommanderplugin_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -no-undefined
+
+# the libraries to link against.
+libkommanderplugin_la_LIBADD = $(LIB_KDEUI) $(LIB_QT)
+
+libkommanderplugin_la_SOURCES = kommanderplugin.cpp specialinformation.cpp
+
+include_HEADERS = kommanderplugin.h specials.h
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
diff --git a/kommander/plugin/kommanderplugin.cpp b/kommander/plugin/kommanderplugin.cpp
new file mode 100644
index 00000000..9be1c2d5
--- /dev/null
+++ b/kommander/plugin/kommanderplugin.cpp
@@ -0,0 +1,82 @@
+/***************************************************************************
+ kommanderplugin.cpp - An interface to Kommander widget plugins
+ -------------------
+ copyright : (C) 2003 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "kommanderplugin.h"
+#include "specialinformation.h"
+
+KommanderPlugin::KommanderPlugin()
+{
+}
+
+KommanderPlugin::~KommanderPlugin()
+{
+}
+
+void KommanderPlugin::addWidget( const QString &name, const QString &group, const QString &toolTip, QIconSet *iconSet, const QString &whatsThis, bool isContainer)
+{
+ m_widgets[name] = WidgetInfo( group, toolTip, iconSet, whatsThis, isContainer );
+}
+
+void KommanderPlugin::removeWidget( const QString &name )
+{
+ m_widgets.remove( name );
+}
+
+QStringList KommanderPlugin::widgets() const
+{
+ QStringList ws;
+ WidgetInfos::ConstIterator it;
+ for( it = m_widgets.begin() ; it != m_widgets.end() ; ++ it )
+ ws += it.key();
+ return ws;
+}
+
+QString KommanderPlugin::group( const QString &name ) const
+{
+ return m_widgets[name].group;
+}
+
+QString KommanderPlugin::toolTip( const QString &name ) const
+{
+ return m_widgets[name].toolTip;
+}
+
+QString KommanderPlugin::whatsThis( const QString &name ) const
+{
+ return m_widgets[name].whatsThis;
+}
+
+bool KommanderPlugin::isContainer( const QString &name ) const
+{
+ return m_widgets[name].isContainer;
+}
+
+QIconSet* KommanderPlugin::iconSet( const QString &name ) const
+{
+ return m_widgets[name].iconSet;
+}
+
+void KommanderPlugin::setDefaultGroup( int id )
+{
+ SpecialInformation::setDefaultGroup(id);
+}
+
+bool KommanderPlugin::registerFunction(int id, const QString& function, const QString description , int minArgs, int maxArgs)
+{
+ return SpecialInformation::insert(id, function, description, minArgs, maxArgs);
+}
+
+#include "kommanderplugin.moc"
diff --git a/kommander/plugin/kommanderplugin.h b/kommander/plugin/kommanderplugin.h
new file mode 100644
index 00000000..ecba3384
--- /dev/null
+++ b/kommander/plugin/kommanderplugin.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+ ** kommanderplugin.h - KommanderPlugin class definition created from QWidgetPlugin
+ ** Copyright (C) 2001 Trolltech AS. All rights reserved.
+ ** Copyright (C) 2003 Marc Britton
+ **
+ ** This file is part of the widgets module of the Qt GUI Toolkit.
+ **
+ ** This file may be distributed under the terms of the Q Public License
+ ** as defined by Trolltech AS of Norway and appearing in the file
+ ** LICENSE.QPL included in the packaging of this file.
+ **
+ ** This file may be distributed and/or modified under the terms of the
+ ** GNU General Public License version 2 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.GPL included in the
+ ** packaging of this file.
+ **
+ ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+ ** licenses may use this file in accordance with the Qt Commercial License
+ ** Agreement provided with the Software.
+ **
+ ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ **
+ ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+ ** information about Qt Commercial License Agreements.
+ ** See http://www.trolltech.com/qpl/ for QPL licensing information.
+ ** See http://www.trolltech.com/gpl/ for GPL licensing information.
+ **
+ ** Contact info@trolltech.com if any conditions of this licensing are
+ ** not clear to you.
+ **
+ **********************************************************************/
+
+#ifndef _HAVE_KOMMANDERPLUGIN_H_
+#define _HAVE_KOMMANDERPLUGIN_H_
+
+#include <qobject.h>
+#include <qmap.h>
+#include <qstringlist.h>
+#include "kommander_export.h"
+
+class QWidget;
+class QIconSet;
+
+class KOMMANDER_EXPORT KommanderPlugin : public QObject
+{
+ Q_OBJECT
+ public:
+ KommanderPlugin();
+ ~KommanderPlugin();
+
+ virtual void addWidget( const QString &name, const QString &group, const QString &toolTip, QIconSet *iconSet, const QString &whatsThis = QString::null, bool isContainer = false);
+ virtual void removeWidget( const QString &name );
+ virtual QStringList widgets() const;
+
+ virtual QWidget *create( const QString &key, QWidget *parent = 0, const char *name = 0 ) = 0;
+ virtual QString group( const QString &key ) const;
+ virtual QString toolTip( const QString &key ) const;
+ virtual QString whatsThis( const QString &key ) const;
+ virtual bool isContainer( const QString &key ) const;
+ virtual QIconSet *iconSet( const QString &key ) const;
+
+ /**
+ * Sets the default group for functions. Must be called before registerFunction.
+ * @param group the groups ID
+ */
+ static void setDefaultGroup(int group);
+
+ /**
+ * Register a function of the plugin.
+ * @param id Kommander wide unique ID
+ * @param function function signature
+ * @param description description of what the function does
+ * @param minArgs minimum number of accepted arguments
+ * @param maxArgs maximum number of accepted arguments
+ * @return true if registration was successful
+ */
+ static bool registerFunction(int id, const QString& function, const QString description = QString::null,
+ int minArgs = -1, int maxArgs = -1);
+
+
+
+private:
+ struct WidgetInfo
+ {
+ WidgetInfo() { }
+ WidgetInfo( const QString &g, const QString &t, QIconSet *i, const QString &w = QString::null, bool c = false)
+ : group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c )
+ {}
+
+ QString group;
+ QString toolTip;
+ QIconSet *iconSet;
+ QString whatsThis;
+ bool isContainer;
+ };
+ typedef QMap<QString, WidgetInfo> WidgetInfos;
+ WidgetInfos m_widgets;
+};
+
+#define KOMMANDER_EXPORT_PLUGIN(plugin) extern "C" { KOMMANDER_EXPORT void *kommander_plugin() { return new plugin; } }
+
+#endif // _HAVE_KOMMANDERPLUGIN_H_
diff --git a/kommander/plugin/specialinformation.cpp b/kommander/plugin/specialinformation.cpp
new file mode 100644
index 00000000..5e86eb16
--- /dev/null
+++ b/kommander/plugin/specialinformation.cpp
@@ -0,0 +1,623 @@
+/***************************************************************************
+ specialinformation.cpp - internal commands information
+ -------------------
+ 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 "specials.h"
+#include "specialinformation.h"
+
+#include <klocale.h>
+
+SpecialFunction::SpecialFunction(const QString& name, const QString& description,
+ int minArgs, int maxArgs)
+{
+ m_parserTypes = AllParsers;
+ int lbracket = name.find('(');
+ int rbracket = name.find(')');
+ m_function = (lbracket != -1) ? name.left(lbracket) : name;
+ m_description = description;
+ if (lbracket != -1 && rbracket != -1)
+ {
+ QString part = name.mid(lbracket+1, rbracket - lbracket - 1);
+ QStringList args = QStringList::split(",", part);
+ for (uint i=0; i<args.count(); i++)
+ {
+ m_types.append(args[i].stripWhiteSpace().section(' ', 0, 0));
+ m_args.append(args[i].stripWhiteSpace().section(' ', 1, 1));
+ }
+ }
+ m_minArgs = (minArgs == -1) ? m_types.count() : minArgs;
+ m_maxArgs = (maxArgs == -1) ? m_types.count() : maxArgs;
+}
+
+SpecialFunction::SpecialFunction(ParserType p, const QString& name, const QString& description,
+ int minArgs, int maxArgs)
+{
+ m_parserTypes = p;
+ int lbracket = name.find('(');
+ int rbracket = name.find(')');
+ m_function = (lbracket != -1) ? name.left(lbracket) : name;
+ m_description = description;
+ if (lbracket != -1 && rbracket != -1)
+ {
+ QString part = name.mid(lbracket+1, rbracket - lbracket - 1);
+ QStringList args = QStringList::split(",", part);
+ for (uint i=0; i<args.count(); i++)
+ {
+ m_types.append(args[i].stripWhiteSpace().section(' ', 0, 0));
+ m_args.append(args[i].stripWhiteSpace().section(' ', 1, 1));
+ }
+ }
+ m_minArgs = (minArgs == -1) ? m_types.count() : minArgs;
+ m_maxArgs = (maxArgs == -1) ? m_types.count() : maxArgs;
+}
+
+
+QString SpecialFunction::prototype(uint prototypeFlags) const
+{
+ if (!m_types.count())
+ return m_function;
+ int start = (prototypeFlags & SkipFirstArgument) ? 1 : 0;
+ QStringList params;
+ for (uint i=start; i<m_types.count(); i++)
+ if (prototypeFlags & ShowArgumentNames)
+ params.append(QString("%1 %2").arg(m_types[i]).arg(m_args[i]));
+ else
+ params.append(m_types[i]);
+ if (!params.count())
+ return m_function;
+ else if (prototypeFlags & NoSpaces)
+ return QString("%1(%2)").arg(m_function).arg(params.join(","));
+ else
+ return QString("%1(%2)").arg(m_function).arg(params.join(", "));
+}
+
+QString SpecialFunction::argumentName(uint i) const
+{
+ if (i < m_args.count())
+ return m_args[i];
+ return QString();
+}
+
+QString SpecialFunction::argumentType(uint i) const
+{
+ if (i < m_types.count())
+ return m_types[i];
+ return QString();
+}
+
+int SpecialFunction::argumentCount() const
+{
+ return m_types.count();
+}
+
+
+
+
+int SpecialInformation::function(int group, const QString& fname)
+{
+ QString f = fname.lower();
+ if (m_functions.contains(group) && m_functions[group].contains(f))
+ return m_functions[group][f];
+ else if (m_aliases.contains(group) && m_aliases[group].contains(f))
+ return m_aliases[group][f];
+ return -1;
+}
+
+SpecialFunction SpecialInformation::functionObject(const QString& gname, const QString& fname)
+{
+ int gid = group(gname);
+ return m_specials[gid][function(gid, fname)];
+}
+
+int SpecialInformation::group(const QString& gname)
+{
+ if (m_groups.contains(gname))
+ return m_groups[gname];
+ return -1;
+}
+
+bool SpecialInformation::isValid(int gname, int fname)
+{
+ return m_specials.contains(gname) && m_specials[gname].contains(fname);
+}
+
+bool SpecialInformation::isValid(const QString& gname, const QString& fname)
+{
+ return function(group(gname), fname) != -1;
+}
+
+bool SpecialInformation::isValid(int gname, int fname, SpecialFunction::ParserType p)
+{
+ return m_specials.contains(gname) && m_specials[gname].contains(fname)
+ && m_specials[gname][fname].isSupported(p);
+}
+
+bool SpecialInformation::isValid(const QString& gname, const QString& fname,
+ SpecialFunction::ParserType p)
+{
+ int g = group(gname);
+ int f = function(g, fname);
+ return f != -1 && m_specials[g][f].isSupported(p);
+}
+
+int SpecialInformation::minArg(int gname, int fname)
+{
+ if (isValid(gname, fname))
+ return m_specials[gname][fname].minArg();
+ return -1;
+}
+
+int SpecialInformation::maxArg(int gname, int fname)
+{
+ if (isValid(gname, fname))
+ return m_specials[gname][fname].maxArg();
+ return -1;
+}
+
+int SpecialInformation::argCount(int gname, int fname)
+{
+ if (isValid(gname, fname))
+ return m_specials[gname][fname].argumentCount();
+ return -1;
+}
+
+bool SpecialInformation::isValidArg(int gname, int fname, int args)
+{
+ if (isValid(gname, fname))
+ return m_specials[gname][fname].isValidArg(args);
+ return -1;
+}
+
+QString SpecialInformation::description(int gname, int fname)
+{
+ if (isValid(gname, fname))
+ return m_specials[gname][fname].description();
+ return QString();
+}
+
+QString SpecialInformation::prototype(int gname, int fname, uint flags)
+{
+ if (isValid(gname, fname))
+ return m_specials[gname][fname].prototype(flags);
+ return QString();
+}
+
+bool SpecialInformation::insert(int id, const QString& function, const QString description,
+ int minArgs, int maxArgs, SpecialFunction::ParserType pType)
+{
+ if (isValid(m_defaultGroup, id)) /* function already defined */
+ return false;
+ if (m_functions[m_defaultGroup].contains(function.lower()))
+ return false; /* function name already in use */
+ if (m_aliases[m_defaultGroup].contains(function.lower()))
+ return false; /* function name already in use */
+ SpecialFunction sf(pType, function, description, minArgs, maxArgs);
+ m_specials[m_defaultGroup][id] = sf;
+ m_functions[m_defaultGroup][sf.name().lower()] = id;
+ return true;
+}
+
+bool SpecialInformation::insertMacro(int id, const QString& function, const QString description,
+ int minArgs, int maxArgs)
+{
+ return insert(id, function, description, minArgs, maxArgs, SpecialFunction::MacroParser);
+}
+
+bool SpecialInformation::insertInternal(int id, const QString& function, const QString description,
+ int minArgs, int maxArgs)
+{
+ return insert(id, function, description, minArgs, maxArgs, SpecialFunction::InternalParser);
+}
+
+bool SpecialInformation::insertAlias(int id, const QString& alias)
+{
+ if (!isValid(m_defaultGroup, id)) /* function doesn't exists */
+ return false;
+ if (m_functions[m_defaultGroup].contains(alias.lower()))
+ return false;
+ if (m_aliases[m_defaultGroup].contains(alias.lower()))
+ return false;
+ m_aliases[m_defaultGroup][alias] = id;
+ return true;
+}
+
+void SpecialInformation::setDefaultGroup(int gname)
+{
+ m_defaultGroup = gname;
+}
+
+void SpecialInformation::insertGroup(int id, const QString& name, const QString& parserName)
+{
+ if (group(name) == -1) {
+ m_groups[name] = id;
+ m_parserGroups[name] = parserName;
+ m_defaultGroup = id;
+ }
+}
+
+QString SpecialInformation::parserGroupName(const QString& name)
+{
+ if (m_parserGroups.contains(name))
+ return m_parserGroups[name];
+ else
+ return name;
+}
+
+QStringList SpecialInformation::groups()
+{
+ return m_groups.keys();
+}
+
+QStringList SpecialInformation::functions(const QString& g)
+{
+ int gid = group(g);
+ if (gid == -1)
+ return QStringList();
+ else
+ {
+ QStringList list;
+ const QMap<int, SpecialFunction> fgroup = m_specials[gid];
+ for(QMap<int, SpecialFunction>::ConstIterator it = fgroup.begin(); it != fgroup.end(); ++it)
+ list.append(it.data().name());
+ return list;
+ }
+}
+
+bool SpecialFunction::isSupported(ParserType p) const
+{
+ return (m_parserTypes & p);
+}
+
+void SpecialInformation::registerSpecials()
+{
+ insertGroup(Group::DCOP, "DCOP", "");
+ insert(DCOP::addUniqueItem, "addUniqueItem(QString widget, QString item)",
+ i18n("Inserts the item if it will not create a duplicate."), 2);
+ insert(DCOP::associatedText, "associatedText(QString widget)",
+ i18n("Returns scripts associated with widget. This is an advanced feature that would not be commonly used."), 1);
+ insert(DCOP::cancel, "cancel(QString widget)", i18n("Stops execution of the script associated with the widget."), 1);
+ insert(DCOP::cellText, "cellText(QString widget, int row, int column)",
+ i18n("Returns text of a cell in a table."), 3);
+ insert(DCOP::checked, "checked(QString widget)",
+ i18n("Returns 1 for checked boxes, 0 for unchecked."), 1);
+ insert(DCOP::children, "children(QString widget, bool recursive)",
+ i18n("Returns the list of child widgets contained in the parent widget. Set the <i>recursive</i> parameter to <i>true</i> to include widgets contained by child widgets."), 2);
+ insert(DCOP::clear, "clear(QString widget)",
+ i18n("Removes all content from the widget."), 1);
+ insertAlias(DCOP::clear, "clearList");
+ insertInternal(DCOP::columnCount, "columnCount(QString widget)",
+ i18n("Get the column count"), 1);
+ insert(DCOP::count, "count(QString widget)",
+ i18n("Returns number of items in a widget such as combobox or listbox."), 1);
+ insert(DCOP::currentColumn, "currentColumn(QString widget)",
+ i18n("Returns index of current column."), 1);
+ insert(DCOP::currentItem, "currentItem(QString widget)",
+ i18n("Returns index of current item."), 1);
+ insert(DCOP::currentRow, "currentRow(QString widget)",
+ i18n("Returns index of current row."), 1);
+ insert(DCOP::execute, "execute(QString widget)",
+ i18n("Executes the script associated with the widget. With the new parser the execute method can take one or more arguments."), 1, 9);
+ insert(DCOP::findItem, "findItem(QString widget, QString item, int column, bool CaseSensitive, bool ExactMatch)",
+ i18n("Returns the index of an item with the given text. Defaults to case sensitive. Matching can be an exact match or match if it contains the string. Only the first argument is requred. If no column is given it will search the first by default."), 2, 5);
+ insert(DCOP::insertColumn, "insertColumn(QString widget, int column, int count)",
+ i18n("Inserts new column (or <i>count</i> columns) at <i>column</i> position."), 2);
+ insert(DCOP::insertItem, "insertItem(QString widget, QString item, int index)",
+ i18n("Inserts item at <i>index</i> position."), 3);
+ insertAlias(DCOP::insertItem, "addListItem");
+ insert(DCOP::insertItems, "insertItems(QString widget, QStringList items, int index)",
+ i18n("Inserts multiple items (EOL-separated) at <i>index</i> position."), 3);
+ insertAlias(DCOP::insertItems, "addListItems");
+ insert(DCOP::insertRow, "insertRow(QString widget, int row, int count)",
+ i18n("Inserts new row (or <i>count</i> rows) at <i>row</i> position."), 2);
+ insert(DCOP::item, "item(QString widget, int index)",
+ i18n("Returns the text of the item at the given index."), 2);
+ insert(DCOP::itemDepth, "itemDepth(QString widget, int index)",
+ i18n("Returns the depth of the current item in the tree. Root items have depth 0."), 2);
+ insert(DCOP::itemPath, "itemPath(QString widget, int index)",
+ i18n("Returns the slash-separated path to the given item in the tree."), 2);
+ insert(DCOP::removeColumn, "removeColumn(QString widget, int column, int count)",
+ i18n("Removes the column (or <i>count</i> consecutive columns) with the given index."), 2, 3);
+ insert(DCOP::removeItem, "removeItem(QString widget, int index)",
+ i18n("Removes the item with the given index."), 2);
+ insertAlias(DCOP::removeItem, "removeListItem");
+ insert(DCOP::removeRow, "removeRow(QString widget, int row, int count)",
+ i18n("Removes the row (or <i>count</i> consecutive rows) with the given index."), 3);
+ insertAlias(DCOP::removeItem, "removeListItem");
+ insert(DCOP::selection, "selection(QString widget)",
+ i18n("Returns selected text or text of current item.\nIn case of Table widgets, returns the selection coordinates, separated by commas in TopRow,LeftColumn,BottomRow,RightColumn form. "), 1);
+ insert(DCOP::setAssociatedText, "setAssociatedText(QString widget, QString text)",
+ i18n("Sets scripts associated with widget. This is an advanced feature that would not be commonly used."), 2);
+ insert(DCOP::setEnabled, "setEnabled(QString widget, bool enabled)",
+ i18n("Enables or disables widget."), 2);
+ insertAlias(DCOP::setEnabled, "enableWidget");
+ insert(DCOP::setCellText, "setCellText(QString widget, int row, int col, QString text)",
+ i18n("Sets text of a cell in a table."), 4);
+ insert(DCOP::setCellWidget, "setCellWidget(QString widget, int row, int col, QString cellWidget)",
+ i18n("Inserts a widget into a cell of a table."), 4);
+ insert(DCOP::cellWidget, "cellWidget(QString widget, int row, int col)",
+ i18n("Returns the name of a widget inserted into a cell, or an empty string if the cell contains no widget or an unknown widget type."), 3);
+ insert(DCOP::setChecked, "setChecked(QString widget, bool checked)",
+ i18n("Sets/unsets checkbox."), 2);
+ insert(DCOP::setColumnCaption, "setColumnCaption(QString widget, int column, QString text)",
+ i18n("Sets caption of the column <i>column</i>."), 3);
+ insert(DCOP::setCurrentItem, "setCurrentItem(QString widget, int index)",
+ i18n("Selects the item at the specified index. Indexes are zero based."), 2);
+ insertAlias(DCOP::setCurrentItem, "setCurrentTab");
+ insert(DCOP::insertTab, "insertTab(QString widget, QString label,int index)",
+ i18n("Inserts a tab to the tabwidget with the specified label at the given index. Indexes are zero based."), 3); //enable for 3.5.8
+ insert(DCOP::setMaximum, "setMaximum(QString widget, int value)",
+ i18n("Sets maximum numeric value"), 2);
+ insert(DCOP::setPixmap, "setPixmap(QString widget, QString iconName, int index)",
+ i18n("Sets pixmap at the given index to the specified icon. Use <i>index = -1</i> to set the pixmap for all items."), 3);
+ insert(DCOP::setRowCaption, "setRowCaption(QString widget, int row, QString text)",
+ i18n("Sets caption of the row <i>row</i>."), 3);
+ insert(DCOP::setSelection, "setSelection(QString widget, QString text)",
+ i18n("Selects given text or select item containing given text."), 2);
+ insertAlias(DCOP::setSelection, "setCurrentListItem");
+ insert(DCOP::setText, "setText(QString widget, QString text)",
+ i18n("Sets widget's content."), 2);
+ insertAlias(DCOP::setText, "changeWidgetText");
+ insert(DCOP::setVisible, "setVisible(QString widget, bool visible)",
+ i18n("Shows/hides widget."), 2);
+ insert(DCOP::text, "text(QString widget)", i18n("Returns content of widget."), 1);
+ insert(DCOP::type, "type(QString widget)",
+ i18n("Returns type(class) of widget."), 1);
+ insert(DCOP::setEditable, "setEditable(QString widget, bool editable)",
+ i18n("Makes the widget editable or read only, depending on the editable argument."), 2);
+ insertInternal(DCOP::geometry, "geometry(QString widget)",
+ i18n("Return the widget's geometry as <i>x y w h</i>. This is useful for positioning a created widget."), 1);
+ insertInternal(DCOP::hasFocus, "hasFocus(QString widget)",
+ i18n("Returns true if the widget has focus."), 1);
+ insertInternal(DCOP::getBackgroundColor, "getBackgroundColor(QString widget)",
+ i18n("Gets the widget's background color."), 1);
+ insertInternal(DCOP::setBackgroundColor, "setBackgroundColor(QString widget, QString Color)",
+ i18n("Sets the widget's background color. Colors can be by name, like blue, or in hex like #0000ff for blue. Use the color dialog or a color picker if unsure."), 2);
+ insertInternal(DCOP::isModified, "isModified(QString widget)",
+ i18n("See if widget has been modified."), 1);
+
+ insertGroup(Group::Slots, i18n("Slots"), "");
+
+ insertGroup(Group::Kommander, "Kommander", "");
+ insertMacro(Kommander::widgetText, "widgetText",
+ i18n("Returns current widget's content. This was required inside widget A to return widget A content when requested by widget B. The new method is to use @A.text inside B instead of just @A if you just want the unaltered text."), 0);
+ insertMacro(Kommander::selectedWidgetText, "selectedWidgetText",
+ i18n("Returns selected text or text of current item. This is deprecated for <i>@mywidget.selected</i>."), 0);
+ insertMacro(Kommander::null, "null",
+ i18n("Does nothing. This is useful if you request a CheckBox or RadioButton to return a value where a state, typically the unchecked state, has no value. The @null prevents an error indicating it is empty."), 0);
+ insert(Kommander::pid, "pid",
+ i18n("Returns the pid (process ID) of the current process."), 0);
+ insert(Kommander::dcopid, "dcopid",
+ i18n("Returns DCOP identifier of current process. This is shorthand for <i>kmdr-executor-@pid</i>."),
+ 0);
+ insert(Kommander::parentPid, "parentPid",
+ i18n("Returns the pid of the parent Kommander window."), 0);
+ insert(Kommander::debug, "debug(QString text)",
+ i18n("Writes <i>text</i> on stderr."), 1);
+ insert(Kommander::echo, "echo(QString text)",
+ i18n("Writes <i>text</i> on standard output."), 1);
+ insertMacro(Kommander::execBegin, "execBegin(QString shell)",
+ i18n("Executes a script block. Bash is used if no shell is given. It is primarily for use in non-button widgets where script actions are not expected. Full path is not required for the shell which may be useful for portability. <p><i>If this is used inside a button it allows alternate script languages to be used and will return a value to the main script, which may be unexpected.</i>"), 0);
+ insert(Kommander::env, "env(QString variable)",
+ i18n("Returns value of an environment (shell) variable. Do not use <i>$</i> in the name. For example, <i>@env(PATH)</i>."), 1);
+ insert(Kommander::exec, "exec(QString command)",
+ i18n("Executes an external shell command."), 1);
+ insertInternal(Kommander::execBackground, "execBackground(QString command)",
+ i18n("Executes an external shell command."), 1);
+ insertMacro(Kommander::expr, "expr(QString expression)",
+ i18n("Parses an expression and returns computed value."), 1);
+ insert(Kommander::forEachBlock, "forEach(QString variable, QString items)",
+ i18n("Executes loop: values from <i>items</i> list (passed as EOL-separated string) are assigned to the variable. <br><b>Old</b><br> <i>@forEach(i,A\\nB\\nC\\n)<br> @# @i=A<br>@end</i><br><b>New</b><br><i>foreach i in MyArray do<br> //i = key, MyArray[i] = val<br>end "), 2);
+ insert(Kommander::forBlock, "for(QString variable, int start, int end, int step)",
+ i18n("Executes loop: variable is set to <i>start</i> and is increased by <i>step</i> each time loop is executed. Execution stops when variable becomes larger then <i>end</i>. <br><b>Old</b><br><i>@for(i,1,10,1)<br> @# @i=1<br>@endif</i><br><b>New</b><br><i>for i=0 to 20 step 5 do<br> debug(i)<br>end</i>."), 3);
+ insertMacro(Kommander::global, "global(QString variable)",
+ i18n("Returns the value of a global variable."), 1);
+ insert(Kommander::i18n, "i18n(QString variable)",
+ i18n("Translates the string into the current language. Texts in GUI would be automatically extracted for translation."), 1);
+ insert(Kommander::ifBlock, "if(QString expression)",
+ i18n("Executes block if expression is true (non-zero number or non-empty string.) <p><b>Old</b>Close with <b>@endif</b></p><p><b>New</b><br>if val == true then<br>// do op<br>elseif cond<br>// second chance<br>else<br>// cond failed<br>endif</p>"), 1);
+ insert(Kommander::dialog, "dialog(QString file, QString args)",
+ i18n("Executes another Kommander dialog. Current dialog directory is used if no path is given. Arguments may be given as named arguments which will become global variables in the new dialog. For instance: <i>var=val</i>"), 1);
+ insert(Kommander::readSetting, "readSetting(QString key, QString default)",
+ i18n("Reads setting from configration file for this dialog."), 2);
+ insert(Kommander::setGlobal, "setGlobal(QString variable, QString value)",
+ i18n("Sets the value of a global variable. Global variables exist for the life of the Kommander window."), 2);
+ insert(Kommander::writeSetting, "writeSetting(QString key, QString value)",
+ i18n("Stores setting in configuration file for this dialog."), 2);
+ insertMacro(Kommander::switchBlock, "switch(QString expresion)",
+ i18n("Begin of <b>switch</b> block. Following <b>case</b> values are compared to <i>expression</i>.<p>@switch()<br>@case()<br>@end"), 1);
+ insert(Kommander::dcop, "dcop(QString id, QString interface, QString function, QString args)",
+ i18n("Executes an external DCOP call."), 3, 9);
+ insertMacro(Kommander::comment, "#",
+ i18n("Adds a comment to EOL that Kommander will not parse"), 0);
+ insertInternal(Kommander::createWidget, "createWidget(QString widgetName, QString widgetType, QString parent)",
+ i18n("Creates a new widget with the specified type and as the child of parent."), 3);
+ insertInternal(Kommander::widgetExists, "widgetExists(QString widgetName)",
+ i18n("Returns true if there is a widget with the passed name, false otherwise."), 1);
+ insertInternal(Kommander::connect, "connect(QString sender, QString signal, QString receiver, QString slot)",
+ i18n("Connects the signal of sender with the slot of the receiver"), 4);
+ insertInternal(Kommander::disconnect, "disconnect(QString sender, QString signal, QString receiver, QString slot)",
+ i18n("Disconnects the signal of sender from the slot of the receiver"), 4);
+/* insertInternal(Kommander::switchInternal, "switch(QString Variable)",
+ i18n("Can use can use <br>switch var<br>case 1<br> //code<br>else<br> //code<br>end<p>also can use the form of <br>switch var {<br>case 1; //code<br>else; code<br>}<p> semicolons are optional in place of returns. Currently switch does not parse value from arrays.") );
+*/
+ insertInternal(Kommander::exit, "exit",
+ i18n("Exits script execution and returns"), 0);
+ insertInternal(Kommander::Break, "break",
+ i18n("Exits the current block of a while, for or foreach loop"), 0);
+ insertInternal(Kommander::Continue, "continue",
+ i18n("Exit a step and return to the beginning of a loop"), 0);
+ insertInternal(Kommander::Return, "return(QString value)",
+ i18n("Return from a script, optionaly with a value from the script to the caller"), 0, 1);
+
+ insertGroup(Group::Array, "Array", "array");
+ insert(Array::values, "values(QString array)",
+ i18n("Returns an EOL-separated list of all values in the array."), 1);
+ insert(Array::keys,"keys(QString array)",
+ i18n("Returns an EOL-separated list of all keys in the array."), 1);
+ insert(Array::clear,"clear(QString array)",
+ i18n("Removes all elements from the array."), 1);
+ insert(Array::count,"count(QString array)",
+ i18n("Returns the number of elements in the array."), 1);
+ insertMacro(Array::value, "value(QString array, QString key)",
+ i18n("Returns the value associated with the given key."), 2);
+ insert(Array::remove,"remove(QString array, QString key)",
+ i18n("Removes element with the given key from the array."), 2);
+ insertMacro(Array::setValue,"setValue(QString array, QString key, QString value)",
+ i18n("Adds element with the given key and value to the array"), 3);
+ insert(Array::fromString, "fromString(QString array, QString string)",
+ i18n("Adds all elements in the string to the array. "
+ "String should have <i>key\\tvalue\\n</i> format."), 2);
+ insert(Array::toString, "toString(QString array)",
+ i18n("Returns all elements in the array in <pre>key\\tvalue\\n</pre> format."), 1);
+ insertInternal(Array::indexedFromString, "indexedFromString(QString array, QString string, QString separator)",
+ i18n( "Create an integer indexed array - starting from 0 - from a string. Use the separator character to split the string. The separator's default value is '\\t'."), 2, 3);
+ insertInternal(Array::indexedToString, "indexedToString(QString array, QString separator)",
+ i18n( "Create a string from an integer indexed array. Concatenate the elements with the separator character. The separator's default value is '\\t'."), 1, 2);
+ insertInternal(Array::indexedRemoveElements, "indexedRemoveElements(QString array, int keyStart, int keyNum)",
+ i18n( "Remove keyNum elements starting with keyStart from an indexed array and reindex the array. If keyNum is not specified, remove only the keyStart element."), 2, 3);
+ insertInternal(Array::indexedInsertElements, "indexedInsertElements(QString array, int key, QString string, QString separator)",
+ i18n( "Insert the elements from string starting at key and reindex the array. Use the separator to separate the elements from the string. The separator's default value is '\\t'."), 3, 4);
+ insertInternal(Array::flipCopy, "flipCopy(QString Array, QString Copy)",
+ i18n("Create a flipped copy of the array where the keys and values switch places. NOTE: If the values are not unique they will be overwritten as keys! Set the name of the array to copy to and go. Useful with combos and lists were you have an index, a key and a value for data purposes."), 2, 2);
+
+ insertGroup(Group::Matrix, "Matrix", "matrix");
+ insertInternal(Matrix::fromString, "fromString(QString matrix, QString String, bool With-Row-Keys, bool With-Col-Keys)",
+ i18n("Create a 2D array with zero based integer keys. Rows seperated with returns or \\n and columns with tabs or \\t. You can then read and alter values with \"name[0][1]\".<br><b>NOTE: Watch keys!</b> The row and column keys when set to true will read respectively the first row and first column as headings. If for instance you set one where there is no column or row heading to read it will read data, and if the data is not unique you will have missing columns or rows as well as addressing not working."), 2, 4);
+ insertInternal(Matrix::toString, "toString(QString matrix, bool RowHeadings, bool ColHeadings)",
+ i18n("Convert 2D array to string, optionaly with row and column headings. If written without values set it will default to no headings."), 1, 3);
+ insertInternal(Matrix::rows, "rows(QString matrix)",
+ i18n("Return the number of rows in the matrix"), 1);
+ insertInternal(Matrix::columns, "columns(QString matrix)",
+ i18n("Return the number of columns in the matrix"), 1);
+ insertInternal(Matrix::clear, "clear(QString matrix)",
+ i18n("Clear the entire matrix"), 1);
+ insertInternal(Matrix::rowToArray, "rowToArray(QString matrix, QString Row, QString Array, bool Clear-First, bool Indexed)",
+ i18n("Convert row to array. Useful break out rows of data to work with. If you want to avoid spurious data Clear-First will wipe the array before filling it. If you choose indexed it will use a zero based index. Otherwise it will use the column keys."), 3, 5);
+ insertInternal(Matrix::columnToArray, "columnToArray(QString matrix, QString Column, QString Array)",
+ i18n("Copy a column of a Matrix to an array and optionally clear array first to avoid spurious data in loops"), 3);
+ insertInternal(Matrix::columnToIndexedArray, "columnToIndexedArray(QString matrix, QString Column, QString Array)",
+ i18n("Copy a column of a Matrix to an indexed array"), 3);
+ insertInternal(Matrix::rowKeys, "rowKeys(QString Matrix, QString Seperator)",
+ i18n("Return the row keys from the matrix. Separator defaults to [tab] \"\\t\" if left empty"), 1, 2);
+ insertInternal(Matrix::columnKeys, "columnKeys(QString Matrix, QString Seperator)",
+ i18n("Return the column keys from the matrix. Separator defaults to [tab] \"\\t\" if left empty"), 1, 2);
+ insertInternal(Matrix::addRow, "addRow(QString Matrix, QString RowKey, QString data)",
+ i18n("Add a row to the matrix. Specifiy the row key and format the data as column key [tab] column value on each line using key\\tval\\nkey\\tval format"), 3);
+ insertInternal(Matrix::removeRow, "removeRow(QString Matrix, QString RowKey)",
+ i18n("Remove a row from the matrix by key name. Returns true if key is found."), 2);
+ insertInternal(Matrix::removeColumn, "removeColumn(QString Matrix, QString ColKey)",
+ i18n("Remove a column from the matrix by key name. Returns true if key is found."), 2);
+ insertInternal(Matrix::findRow, "findRow(QString Matrix, QString Col-Key, QString Col-Value, int Iteration)",
+ i18n("Find the row key that matches a column value. Use this for unique key searches. Iteration may be omitted and the default is to return the first instance. In a loop it will return sequential finds until there are no more, in which case it returns null."), 3, 4);
+
+ insertGroup(Group::String, "String", "str");
+ insert(String::length, "length(QString string)",
+ i18n("Returns number of chars in the string."), 1);
+ insert(String::contains, "contains(QString string, QString substring)",
+ i18n("Checks if the the string contains the given substring."), 2);
+ insert(String::find, "find(QString string, QString sought, int index)",
+ i18n("Returns the position of a substring in the string, or -1 if it is not found."), 2);
+ insert(String::findRev, "findRev(QString string, QString sought, int index)",
+ i18n("Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards"), 2);
+ insertInternal(String::count, "count(QString String, QString substring)",
+ i18n("Returns the count of a given substring in the given string."), 2);
+ insert(String::left, "left(QString string, int n)",
+ i18n("Returns the first <i>n</i> chars of the string."), 2);
+ insert(String::right, "right(QString string, int n)",
+ i18n("Returns the last <i>n</i> chars of the string."), 2);
+ insert(String::mid, "mid(QString string, int start, int n)",
+ i18n("Returns <i>n</i> chars of the string, starting from <i>start</i>."), 3);
+ insert(String::remove, "remove(QString string, QString substring)",
+ i18n("Removes all occurrences of given substring."), 2);
+ insert(String::replace, "replace(QString string, QString substring, QString replacement)",
+ i18n("Replaces all occurrences of the given substring with the given replacement."), 3);
+ insert(String::upper, "upper(QString string)",
+ i18n("Converts the string to uppercase."), 1);
+ insert(String::lower, "lower(QString string)",
+ i18n("Converts the string to lowercase."), 1);
+ insert(String::compare, "compare(QString string1, QString string2)",
+ i18n("Compares two strings. Returns 0 if they are equal, "
+ "-1 if the first one is lower, 1 if the first one is higher"), 2);
+ insert(String::isEmpty, "isEmpty(QString string)",
+ i18n("Checks if the string is empty."), 1);
+ insert(String::isNumber, "isNumber(QString string)",
+ i18n("Checks if the string is a valid number."), 1);
+ insert(String::section, "section(QString string, QString separator, int index)",
+ i18n("Returns given section of a string."), 1);
+ insert(String::args, "args(QString string, QString arg1, QString arg2, QString arg3)",
+ i18n("Returns the given string with %1, %2, %3 replaced with <i>arg1</i>, <i>arg2</i>, <i>arg3</i> accordingly."), 2);
+ insert(String::round, "round(QString Number, int Digits)",
+ i18n("Round a floating point number by x digits."), 2);
+ insertInternal(String::sort, "sort(QString String, QString Separator)",
+ i18n("Sort a string list. Only first paramter is required. Default separator is a newline."), 1, 2);
+ insertInternal(String::trim, "trim(QString String)",
+ i18n("Strips white space from beginning and end of string."), 1);
+ insertInternal(String::padLeft, "padLeft(QString String, int Length, QString Pad)",
+ i18n("Pads the string to the total length indicated. if no pad character is given spaces will be used. Try this with 0 on integer sequences and read them with str_toint."), 1, 2);
+ insertInternal(String::padRight, "padRight(QString String, int Length, QString Pad)",
+ i18n("Pads the string to the total length indicated. if no pad character is given spaces will be used."), 1, 2);
+
+ insertInternal(String::toInt, "toint(QString string, QString default)",
+ i18n("Convert a string to an integer. If not possible use the default value"), 1, 2);
+ insertInternal(String::toDouble, "todouble(QString string, QString default)",
+ i18n("Convert a string to a double precision floating point value. If not possible use the default value"), 1, 2);
+
+ insertGroup(Group::File, "File", "file");
+ insert(File::read, "read(QString file)",
+ i18n("Returns content of given file."), 1);
+ insert(File::write, "write(QString file, QString string)",
+ i18n("Writes given string to a file."), 2);
+ insert(File::append, "append(QString file, QString string)",
+ i18n("Appends given string to the end of a file."), 2);
+ insert(File::exists, "exists(QString file)",
+ i18n("Checks to see if file exists."), 1);
+
+ insertGroup(Group::Input, "Input", "input");
+ insert(Input::color, "color(QString defaultColor)", i18n("Shows color dialog. Returns color in #RRGGBB format. Defaults to the parameter, if specified."), 0, 1);
+ insert(Input::text, "text(QString caption, QString label, QString default)",
+ i18n("Shows text selection dialog. Returns entered text."), 2);
+ insert(Input::password, "password(QString caption, QString password)",
+ i18n("Shows a dialog asking user for password and returns it."), 1);
+ insert(Input::value, "value(QString caption, QString label, int value, int min, int max, int step)",
+ i18n("Shows value selection dialog. Returns entered value."), 5);
+ insert(Input::valueDouble, "double(QString caption, QString label, double value, double min, double max, double step)",
+ i18n("Shows float value selection dialog. Returns entered value."), 6);
+ insert(Input::openfile, "openfile(QString startdir, QString filter, QString caption)",
+ i18n("Shows existing file selection dialog. Returns selected file."), 0);
+ insert(Input::savefile, "savefile(QString startdir, QString filter, QString caption)",
+ i18n("Shows save file selection dialog. Returns selected file."), 0);
+ insert(Input::directory, "directory(QString startdir, QString filter, QString caption)",
+ i18n("Shows directory selection dialog. Returns selected directory."), 0);
+ insert(Input::openfiles, "openfiles(QString startdir, QString filter, QString caption)",
+ i18n("Shows multiple files selection dialog. Returns EOL-separated list of selected files."), 0);
+
+ insertGroup(Group::Message, "Message", "message");
+ insert(Message::info, "info(QString text, QString caption)",
+ i18n("Shows an information dialog. Returns true when clicked so you can check for user response."), 1);
+ insert(Message::error, "error(QString text, QString caption)",
+ i18n("Shows an error dialog. Returns true when clicked so you can check for user response."), 1);
+ insert(Message::warning, "warning(QString text, QString caption, QString button1, QString button2, QString button3)",
+ i18n("Shows a warning dialog with up to three buttons. Returns number of selected button."), 1);
+ insert(Message::question, "question(QString text, QString caption, QString button1, QString button2, QString button3)",
+ i18n("Shows a question dialog with up to three buttons. Returns number of selected button."), 1);
+
+}
+
+QMap<int, QMap<int, SpecialFunction> > SpecialInformation::m_specials;
+QMap<QString, int> SpecialInformation::m_groups;
+QMap<QString, QString> SpecialInformation::m_parserGroups;
+QMap<int, QMap<QString, int> > SpecialInformation::m_functions;
+QMap<int, QMap<QString, int> > SpecialInformation::m_aliases;
+int SpecialInformation::m_defaultGroup;
+
diff --git a/kommander/plugin/specialinformation.h b/kommander/plugin/specialinformation.h
new file mode 100644
index 00000000..20b6ea04
--- /dev/null
+++ b/kommander/plugin/specialinformation.h
@@ -0,0 +1,119 @@
+/***************************************************************************
+ specialinformation.h - internal commands information
+ -------------------
+ 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 _HAVE_SPECIALINFORMATION_H_
+#define _HAVE_SPECIALINFORMATION_H_
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qmap.h>
+#include <qpair.h>
+
+class SpecialFunction
+{
+public:
+
+ /* flags for getting function prototype:
+ SkipFirstArgument - ignore first argument (useful for Kommander functions
+ prefixed by widget name
+ ShowArgumentNames - show parameter names, not only types
+ */
+ enum PrototypeFlags {SkipFirstArgument = 1, ShowArgumentNames = 2, NoSpaces = 4};
+ /* Flags describing which parser supports the function */
+ enum ParserType {MacroParser = 1, InternalParser = 2, AllParsers = 3};
+ SpecialFunction(const QString& function, const QString& description
+ = QString::null, int minArgs = -1, int maxArgs = -1);
+ SpecialFunction(ParserType p, const QString& function, const QString& description
+ = QString::null, int minArgs = -1, int maxArgs = -1);
+ SpecialFunction() {m_minArgs = m_maxArgs = 0;}
+ /* minimum number of arguments */
+ int minArg() const {return m_minArgs;}
+ /* maximum number of arguments */
+ int maxArg() const {return m_maxArgs;}
+ /* checks number of arguments */
+ bool isValidArg(int args) const {return args >= minArg() && args <= maxArg();}
+ /* function description */
+ QString description() const {return m_description;}
+ /* function name */
+ QString name() const {return m_function;}
+ /* function prototype: with parameter types and optional names */
+ QString prototype(uint prototypeFlags = 0) const;
+ /* i-th parameter name */
+ QString argumentName(uint i) const;
+ /* i-th parameter type */
+ QString argumentType(uint i) const;
+ /* number of named arguments */
+ int argumentCount() const;
+ /* check whether given parser supports the function */
+ bool isSupported(ParserType p) const;
+protected:
+ QString m_function;
+ QString m_description;
+ int m_minArgs, m_maxArgs;
+ QStringList m_args;
+ QStringList m_types;
+ unsigned m_parserTypes;
+};
+
+
+
+
+class SpecialInformation
+{
+public:
+ SpecialInformation() {m_defaultGroup = -1;}
+ static int function(int group, const QString& fname);
+ static SpecialFunction functionObject(const QString& gname, const QString& fname);
+ static int group(const QString& gname);
+ static bool isValid(int gname, int fname);
+ static bool isValid(const QString& gname, const QString& fname);
+ static bool isValid(int gname, int fname, SpecialFunction::ParserType p);
+ static bool isValid(const QString& gname, const QString& fname, SpecialFunction::ParserType p);
+ static int minArg(int gname, int fname);
+ static int maxArg(int gname, int fname);
+ static int argCount(int gname, int fname);
+ static bool isValidArg(int gname, int fname, int args);
+ static QString description(int gname, int fname);
+ static QString prototype(int gname, int fname, uint prototypeFlags = 0);
+ /* Insert function supported by all parsers */
+ static bool insert(int id, const QString& function, const QString description = QString::null,
+ int minArgs = -1, int maxArgs = -1, SpecialFunction::ParserType = SpecialFunction::AllParsers);
+ /* Insert function supported by (old) macro parser */
+ static bool insertMacro(int id, const QString& function, const QString description = QString::null,
+ int minArgs = -1, int maxArgs = -1);
+ /* Insert function supported by (new) internal parser */
+ static bool insertInternal(int id, const QString& function, const QString description = QString::null,
+ int minArgs = -1, int maxArgs = -1);
+ static bool insertAlias(int id, const QString& alias);
+ static void insertGroup(int id, const QString& name, const QString& parserName);
+ static void setDefaultGroup(int gname);
+ static void registerSpecials();
+ static QString parserGroupName(const QString&);
+ static QStringList groups();
+ static QStringList functions(const QString& group);
+protected:
+ static QMap<int, QMap<int, SpecialFunction> > m_specials;
+ static QMap<QString, int> m_groups;
+ static QMap<QString, QString> m_parserGroups;
+ static QMap<int, QMap<QString, int> > m_functions;
+ static QMap<int, QMap<QString, int> > m_aliases;
+ static int m_defaultGroup;
+};
+
+
+#endif
+
diff --git a/kommander/plugin/specials.h b/kommander/plugin/specials.h
new file mode 100644
index 00000000..2d46200a
--- /dev/null
+++ b/kommander/plugin/specials.h
@@ -0,0 +1,77 @@
+/***************************************************************************
+ specials.h - known specials and DCOP calls
+ -------------------
+ 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 _HAVE_SPECIALS_H_
+#define _HAVE_SPECIALS_H_
+
+/** This file contains the global Kommander defined. In case a new Group, method, etc. is
+added it MUST be added to the end of the enum lists in order to keep compatibility with the
+existing plugins. */
+
+
+namespace Group
+{
+ enum {DCOP, Kommander, String, Array, File, Input, Message, Slots, Matrix};
+}
+
+namespace DCOP
+{
+ enum {addUniqueItem, associatedText, cancel, cellText, clear, checked, children, columnCount, count, currentColumn,
+ currentItem, currentRow, execute, findItem, global, insertColumn, insertItem, insertItems, insertRow,
+ item, itemDepth, itemPath, removeColumn, removeItem, removeRow, selection, setAssociatedText, setChecked,
+ setCellText, setCurrentItem, insertTab, setColumnCaption, setEnabled, setGlobal, setMaximum, setPixmap,
+ setRowCaption, setSelection, setText, getBackgroundColor, setBackgroundColor,
+ setVisible, text, type, setCellWidget, cellWidget, setEditable, geometry, hasFocus, isModified};
+}
+
+namespace Kommander
+{
+ enum {widgetText, selectedWidgetText, null, pid, dcopid, parentPid, debug,
+ echo, env, exec, expr, global, i18n, dialog, readSetting, setGlobal, writeSetting, dcop,
+ switchBlock, execBegin, forBlock, forEachBlock, ifBlock, comment, createWidget, connect, disconnect, widgetExists, exit, Break, Continue, Return, execBackground, switchInternal}; //, focusWidget};
+}
+
+namespace Array
+{
+ enum {values, keys, clear, count, value, remove, setValue, fromString, toString, indexedFromString, indexedToString, indexedRemoveElements, indexedInsertElements, flipCopy};
+}
+
+namespace Matrix
+{
+ enum {fromString, toString, clear, rows, columns, rowToArray, columnToArray, columnToIndexedArray, rowKeys, columnKeys, addRow, removeRow, removeColumn, findRow};
+}
+
+namespace String
+{
+ enum {length, contains, find, findRev, left, right, mid, remove, replace, upper, lower,
+ compare, isEmpty, isNumber, section, args, toInt, toDouble, round, sort, trim, padLeft, padRight, count};
+}
+
+namespace File
+{
+ enum {read, write, append, exists};
+}
+
+namespace Input
+{
+ enum {color, text, password, value, valueDouble, openfile, openfiles, savefile, directory};
+}
+
+namespace Message
+{
+ enum {info, error, question, warning};
+}
+
+#endif
diff --git a/kommander/pluginmanager/Makefile.am b/kommander/pluginmanager/Makefile.am
new file mode 100644
index 00000000..5b3e56c8
--- /dev/null
+++ b/kommander/pluginmanager/Makefile.am
@@ -0,0 +1,18 @@
+bin_PROGRAMS = kmdr-plugins
+
+kmdr_plugins_SOURCES = main.cpp mainwindow.cpp pluginmanager.cpp
+kmdr_plugins_LDADD = $(top_builddir)/kommander/factory/libkommanderfactory.la $(LIB_KIO)
+
+#KDE_ICON = kmdr-plugins
+
+appsdir = $(kde_appsdir)/Applications
+#apps_DATA = kmdr-plugins.desktop
+
+INCLUDES = -I$(top_srcdir)/kommander/factory $(all_includes)
+
+METASOURCES = AUTO
+
+# the library search path.
+kmdr_plugins_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+
+noinst_HEADERS = mainwindow.h pluginmanager.h
diff --git a/kommander/pluginmanager/main.cpp b/kommander/pluginmanager/main.cpp
new file mode 100644
index 00000000..cdbf9cd5
--- /dev/null
+++ b/kommander/pluginmanager/main.cpp
@@ -0,0 +1,101 @@
+/***************************************************************************
+ main.cpp - Kommander plugin manager interface
+ -------------------
+ begin : Tue Aug 13 09:31:50 EST 2002
+ copyright : (C) 2004 Marc Britton <consume@optushome.com.au>
+ (C) 2005 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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+#include <klocale.h>
+#include <kurl.h>
+#include <qapplication.h>
+#include <qobject.h>
+#include <kapplication.h>
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+
+/* OTHER INCLUDES */
+#include "pluginmanager.h"
+#include "mainwindow.h"
+#include "kommanderversion.h"
+
+#include <iostream>
+using namespace std;
+
+static const char *description =
+ I18N_NOOP("kmdr-plugins is a component of the Kommander dialog system that manages installed plugins.");
+// INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
+
+
+static KCmdLineOptions options[] =
+{
+ { "a", 0, 0},
+ { "add <file>", I18N_NOOP("Register given library"), 0},
+ { "r", 0, 0},
+ { "remove <file>", I18N_NOOP("Remove given library"), 0},
+ { "c", 0, 0},
+ { "check", I18N_NOOP("Check all installed plugins and remove those missing"), 0},
+ { "l", 0, 0},
+ { "list", I18N_NOOP("List all installed plugins"), 0},
+ KCmdLineLastOption
+};
+
+int main(int argc, char *argv[])
+{
+ KLocale::setMainCatalogue("kommander");
+ KAboutData aboutData( "kmdr-plugins", I18N_NOOP("Kommander Plugin Manager"),
+ KOMMANDER_VERSION, description, KAboutData::License_GPL,
+ "(C) 2004-2005 Kommander authors");
+ aboutData.addAuthor("Marc Britton", "Original author", "consume@optusnet.com.au");
+ aboutData.addAuthor("Eric Laffoon", "Project manager", "eric@kdewebdev.org");
+ aboutData.addAuthor("Michal Rudolf", "Current maintainer", "mrudolf@kdewebdev.org");
+ KCmdLineArgs::init(argc, argv, &aboutData);
+ KCmdLineArgs::addCmdLineOptions(options); // Add our own options.
+
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ KApplication app;
+
+ if (!args->getOption("add").isNull() || !args->getOption("remove").isNull() || args->isSet("check") || args->isSet("list"))
+ {
+ PluginManager P;
+ if (args->isSet("check"))
+ P.verify();
+
+ QCStringList items = args->getOptionList("add");
+ for (QCStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
+ if (!P.add(*it))
+ cerr << i18n("Error adding plugin '%1'").arg(*it).local8Bit();
+
+ items = args->getOptionList("remove");
+ for (QCStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
+ if (!P.remove(*it))
+ cerr << i18n("Error removing plugin '%1'").arg(*it).local8Bit();
+
+ if (args->isSet("list"))
+ {
+ QStringList plugins = P.items();
+ for (QStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
+ cout << (*it).local8Bit() << "\n";
+ }
+ }
+ else
+ {
+ MainWindow *mw = new MainWindow();
+ app.setMainWidget(mw);
+ mw->show();
+ return app.exec();
+ }
+}
diff --git a/kommander/pluginmanager/mainwindow.cpp b/kommander/pluginmanager/mainwindow.cpp
new file mode 100644
index 00000000..4cc67d62
--- /dev/null
+++ b/kommander/pluginmanager/mainwindow.cpp
@@ -0,0 +1,106 @@
+/***************************************************************************
+ mainwindow.cpp - Kommander plugin manager mainwindow class implementation
+ -------------------
+ begin : Tue Aug 13 09:31:50 EST 2002
+ copyright : (C) 2004 by Marc Britton
+ email : consume@optushome.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "mainwindow.h"
+#include "pluginmanager.h"
+
+#include <ktoolbar.h>
+#include <klistbox.h>
+#include <kconfig.h>
+#include <kfiledialog.h>
+#include <klibloader.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+
+MainWindow::MainWindow( QWidget* parent, const char *name, WFlags f )
+ : KMainWindow( parent, name, f )
+{
+ KToolBar *toolBar = new KToolBar( this );
+ toolBar->insertButton("fileopen", Add, true, i18n("Add") );
+ toolBar->insertButton("no", Remove, true, i18n("Remove") );
+ toolBar->insertButton("reload", Refresh, true, i18n("Refresh") );
+ connect( toolBar, SIGNAL(clicked(int)), this, SLOT(toolButton(int)) );
+
+ m_list = new KListBox( this );
+ setCentralWidget(m_list);
+
+ m_pluginManager = new PluginManager;
+ m_list->insertStringList(m_pluginManager->items());
+}
+
+MainWindow::~MainWindow()
+{
+ delete m_pluginManager;
+}
+
+void MainWindow::toolButton( int id )
+{
+ switch (id)
+ {
+ case Add:
+ add();
+ break;
+ case Remove:
+ remove();
+ break;
+ case Refresh:
+ verify();
+ break;
+ }
+}
+
+void MainWindow::add()
+{
+ QString libDir = KGlobal::dirs()->findResourceDir("lib", "libkommanderplugin");
+ QString plugin = KFileDialog::getOpenFileName(libDir, "lib*", this,
+ i18n("Add Kommander Plugin"));
+ add(plugin);
+}
+
+void MainWindow::add(const QString &plugin)
+{
+ if (!m_pluginManager->add(plugin))
+ {
+ QString errMsg = i18n("<qt>Unable to load Kommander plugin<br><b>%1</b></qt>").arg(plugin);
+ KMessageBox::error(this, errMsg, i18n("Cannot add plugin"));
+ }
+ else
+ refresh();
+}
+
+void MainWindow::remove()
+{
+ QString plugin = m_list->currentText();
+ if (m_pluginManager->remove(plugin))
+ refresh();
+}
+
+void MainWindow::refresh()
+{
+ m_list->clear();
+ m_list->insertStringList(m_pluginManager->items());
+}
+
+void MainWindow::verify()
+{
+ m_pluginManager->verify();
+ refresh();
+}
+
+#include "mainwindow.moc"
diff --git a/kommander/pluginmanager/mainwindow.h b/kommander/pluginmanager/mainwindow.h
new file mode 100644
index 00000000..addf1a5f
--- /dev/null
+++ b/kommander/pluginmanager/mainwindow.h
@@ -0,0 +1,56 @@
+/***************************************************************************
+ mainwindow.h - Kommander plugin manager mainwindow class definition
+ -------------------
+ begin : Tue Aug 13 09:31:50 EST 2002
+ copyright : (C) 2004 by Marc Britton
+ email : consume@optushome.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 HAVE_MAINWINDOW_H
+#define HAVE_MAINWINDOW_H
+
+#include <kmainwindow.h>
+
+class KListBox;
+class PluginManager;
+
+class MainWindow : public KMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ ~MainWindow();
+
+protected slots:
+ // Call function asigned to tollbutton (0 = add, 1 = remove)
+ void toolButton( int id );
+ // Remove currently selected plugin
+ void remove();
+ // Show dialogbox for selecting plugin, then add it
+ void add();
+ // Add given plugin if is not added yet
+ void add( const QString &plugin );
+ // Check whether installed plugins are valid
+ void verify();
+private:
+ enum {Add, Remove, Refresh};
+
+ // Referesh plugin list
+ void refresh();
+
+ // ListBox of available plugins
+ KListBox *m_list;
+ // plugin manager
+ PluginManager* m_pluginManager;
+};
+
+#endif
diff --git a/kommander/pluginmanager/pluginmanager.cpp b/kommander/pluginmanager/pluginmanager.cpp
new file mode 100644
index 00000000..e9301b26
--- /dev/null
+++ b/kommander/pluginmanager/pluginmanager.cpp
@@ -0,0 +1,89 @@
+/***************************************************************************
+ pluginmanager.cpp - Plugin manager class
+ -------------------
+ copyright : (C) 2005 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 <kconfig.h>
+#include <klibloader.h>
+
+#include "pluginmanager.h"
+
+PluginManager::PluginManager()
+{
+ m_cfg = new KConfig("kommanderrc");
+ m_list = new QStringList(m_cfg->readListEntry("plugins"));
+}
+
+PluginManager::~PluginManager()
+{
+ m_cfg->writeEntry("plugins", *m_list);
+ delete m_cfg;
+ delete m_list;
+}
+
+int PluginManager::count() const
+{
+ return m_list->count();
+}
+
+QString PluginManager::item(int i) const
+{
+ return (*m_list)[i];
+}
+
+bool PluginManager::add(const QString& plugin, bool)
+{
+ QString plugName= libraryName(plugin);
+ if (plugName.isNull())
+ return false;
+ if (m_list->contains(plugName))
+ return false;
+ m_list->append(plugName);
+ return true;
+}
+
+bool PluginManager::remove(const QString& plugin)
+{
+ if (!m_list->contains(plugin))
+ return false;
+ m_list->remove(plugin);
+ return true;
+}
+
+int PluginManager::verify()
+{
+ QStringList verified;
+ for (QStringList::ConstIterator it = m_list->begin(); it != m_list->end(); ++it)
+ if (!libraryName(*it).isNull())
+ verified.append(*it);
+ int removed = count() - verified.count();
+ m_list->clear();
+ (*m_list) += verified;
+ return removed;
+}
+
+QString PluginManager::libraryName(const QString& plugin) const
+{
+ KLibrary *l = KLibLoader::self()->library(plugin.latin1());
+ QString libname;
+ if (l && l->hasSymbol("kommander_plugin"))
+ libname = l->fileName();
+ return libname;
+}
+
+QStringList PluginManager::items() const
+{
+ return (*m_list);
+}
+
diff --git a/kommander/pluginmanager/pluginmanager.h b/kommander/pluginmanager/pluginmanager.h
new file mode 100644
index 00000000..0c7c79b7
--- /dev/null
+++ b/kommander/pluginmanager/pluginmanager.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ pluginmanager.h - Plugin manager class
+ -------------------
+ copyright : (C) 2005 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 __HAVE_PLUGINMANAGER_H
+#define __HAVE_PLUGINMANAGER_H
+
+#include <qstringlist.h>
+
+class KConfig;
+
+class PluginManager
+{
+public:
+ PluginManager();
+ ~PluginManager();
+
+ // number of known plugins
+ int count() const;
+ // n-th plugin
+ QString item(int i) const;
+ // adds a plugin if valid;
+ // FIXME: if overwrite is true, plugin with the same base name will be removed
+ bool add(const QString& plugin, bool overwrite = true);
+ // removes given plugin
+ bool remove(const QString& plugin);
+ // remove invalid plugins, returns number of removed plugins
+ int verify();
+ // list of plugins
+ QStringList items() const;
+private:
+ // returns expanded library name or null if it is invalid
+ QString libraryName(const QString& plugin) const;
+
+ QStringList* m_list;
+ KConfig *m_cfg;
+};
+
+
+#endif
+
diff --git a/kommander/widget/Makefile.am b/kommander/widget/Makefile.am
new file mode 100644
index 00000000..410d57c9
--- /dev/null
+++ b/kommander/widget/Makefile.am
@@ -0,0 +1,20 @@
+lib_LTLIBRARIES = libkommanderwidget.la
+
+# set the include path for X, qt and KDE
+INCLUDES = -I$(top_srcdir)/kommander/plugin -I$(top_srcdir)/kommander/factory $(all_includes)
+
+# the library search path.
+libkommanderwidget_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -no-undefined
+
+# the libraries to link against.
+libkommanderwidget_la_LIBADD = $(top_builddir)/kommander/factory/libkommanderfactory.la $(LIB_KIO) $(LIB_KDEUI) $(LIB_QT)
+
+libkommanderwidget_la_SOURCES = expression.cpp function.cpp functionlib.cpp \
+ invokeclass.cpp kmdrmainwindow.cpp kommanderfunctions.cpp kommanderwidget.cpp \
+ kommanderwindow.cpp myprocess.cpp parsenode.cpp parser.cpp parserdata.cpp
+
+include_HEADERS = kommanderwidget.h kommander_export.h
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+noinst_HEADERS = invokeclass.h kmdrmainwindow.h
diff --git a/kommander/widget/expression.cpp b/kommander/widget/expression.cpp
new file mode 100644
index 00000000..88d46b51
--- /dev/null
+++ b/kommander/widget/expression.cpp
@@ -0,0 +1,332 @@
+/***************************************************************************
+ expression.cpp - Expression parser
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 "expression.h"
+
+#include <klocale.h>
+
+Expression::Expression() : m_start(0), m_error(false)
+{
+}
+
+Expression::Expression(const QString& expr)
+{
+ *this = expr;
+}
+
+Expression& Expression::operator=(const QString& s)
+{
+ m_start = 0;
+ m_error = false;
+ m_parts.clear();
+ const QString single = "()<>!+-/*%";
+ int start = 0;
+ int len = s.length();
+ int i = 0;
+ while (i < len)
+ {
+ if (((s[i] == '>' || s[i] == '<' || s[i] == '=' || s[i] == '!') &&
+ s[i + 1] == '=') || (s[i] == '<' && s[i + 1] == '>'))
+ {
+ m_parts.append(QVariant(s.mid(i, 2)));
+ i += 2;
+ } else if (s[i].isDigit())
+ {
+ i++;
+ bool decimal = false;
+ while (i < len && (s[i].isDigit() || (!decimal && s[i] == QChar('.'))))
+ {
+ if (s[i] == '.')
+ decimal = true;
+ i++;
+ }
+ if (decimal)
+ m_parts.append(QVariant(s.mid(start, i - start).toDouble()));
+ else
+ m_parts.append(QVariant(s.mid(start, i - start).toInt()));
+ } else if (single.contains(s[i]))
+ m_parts.append(QVariant(QString(s[i++])));
+ else if (s[i] == '\"')
+ {
+ i++;
+ while (i < len && s[i] != '\"')
+ i++;
+ m_parts.append(QVariant(s.mid(start + 1, i - start - 1)));
+ i++;
+ } else if (s[i].isSpace())
+ while (i < len && s[i].isSpace())
+ i++;
+ else
+ {
+ while (i < len && !s[i].isSpace())
+ i++;
+ QString keyword = s.mid(start, i - start);
+ if (keyword == "true")
+ m_parts.append(QVariant(true));
+ else if (keyword == "false")
+ m_parts.append(QVariant(false));
+ else /* will be deprecated soon */
+ m_parts.append(QVariant(keyword));
+ }
+ start = i;
+ }
+ return *this;
+}
+
+QString Expression::next() const
+{
+ if (m_start < m_parts.count())
+ return m_parts[m_start].toString();
+ else
+ return QString();
+}
+
+bool Expression::validate()
+{
+ if (m_start >= m_parts.count())
+ setError();
+ return !m_error;
+}
+Expression::Type Expression::commonType(const QVariant v1, const QVariant v2) const
+{
+ if (v1.type() == QVariant::String || v2.type() == QVariant::String)
+ return TypeString;
+ else if (v1.type() == QVariant::Double || v2.type() == QVariant::Double)
+ return TypeDouble;
+ return TypeInt;
+}
+
+static int expression_compareDouble(const double A, const double B)
+{
+ return A<B ? -1 : (A==B ? 0 : 1);
+}
+
+
+int Expression::compare(const QVariant v1, const QVariant v2) const
+{
+ switch (commonType(v1, v2)) {
+ case TypeString: return v1.toString().compare(v2.toString());
+ case TypeDouble: return expression_compareDouble(v1.toDouble(), v2.toDouble());
+ case TypeInt: return v1.toInt() - v2.toInt();
+ default: return 0;
+ }
+}
+
+
+void Expression::setError(int pos)
+{
+ m_errorPosition = pos == -1 ? m_start : pos;
+ m_error = true;
+}
+
+QVariant Expression::parseNumber()
+{
+ if (!validate())
+ return -1;
+ return m_parts[m_start++];
+}
+
+QVariant Expression::parseMinus()
+{
+ if (!validate()) return -1;
+ bool sign = next() == "-";
+ if (sign)
+ {
+ m_start++;
+ QVariant value = parseNumber();
+ if (value.type() == QVariant::Double)
+ return -value.toDouble();
+ else
+ return -value.toInt();
+ }
+ else
+ return parseNumber();
+}
+
+
+
+QVariant Expression::parseBracket()
+{
+ if (!validate()) return -1;
+ if (next() == "(")
+ {
+ m_start++;
+ QVariant value = parse();
+ if (next() == ")")
+ m_start++;
+ else
+ setError();
+ return value;
+ }
+ else
+ return parseMinus();
+}
+
+
+QVariant Expression::parseMultiply()
+{
+ if (!validate()) return -1;
+ QVariant value = parseBracket();
+ QString op = next();
+ while (op == "*" || op == "/" || op == "%")
+ {
+ m_start++;
+ QVariant value2 = parseBracket();
+ Type mode = commonType(value, value2);
+ if (op == "*")
+ {
+ if (mode == TypeDouble)
+ value = value.toDouble() * value2.toDouble();
+ else
+ value = value.toInt() * value2.toInt();
+ }
+ else if (op == "/")
+ {
+ if (value2.toInt() == 0)
+ return i18n("error");
+ if (mode == TypeDouble || value.toInt() != value.toInt() / value2.toInt() * value2.toInt())
+ value = value.toDouble() / value2.toDouble();
+ else
+ value = value.toInt() / value2.toInt();
+ }
+ else
+ {
+ if (value2.toInt() == 0)
+ return i18n("error");
+ if (mode == TypeDouble)
+ value = value.toDouble() / value2.toInt();
+ else
+ value = value.toInt() / value2.toInt();
+ }
+ op = next();
+ }
+ return value;
+}
+
+QVariant Expression::parseAdd()
+{
+ if (!validate()) return -1;
+ QVariant value = parseMultiply();
+ QString op = next();
+ while (op == "+" || op == "-")
+ {
+ m_start++;
+ QVariant value2 = parseMultiply();
+ Type mode = commonType(value, value2);
+ if (op == "+")
+ if (mode == TypeDouble)
+ value = value.toDouble() + value2.toDouble();
+ else
+ value = value.toInt() + value2.toInt();
+ else
+ if (mode == TypeDouble)
+ value = value.toDouble() - value2.toDouble();
+ else
+ value = value.toInt() - value2.toInt();
+ op = next();
+ }
+ return value;
+}
+
+QVariant Expression::parseComparison()
+{
+ if (!validate()) return -1;
+ QVariant value = parseAdd();
+ QString cmp = next();
+ if (cmp == "<" || cmp == "<=" || cmp == "==" || cmp == ">=" || cmp == ">" || cmp == "<>" || cmp == "!=")
+ {
+ m_start++;
+ QVariant value2 = parseAdd();
+ if (cmp == "<")
+ return compare(value, value2) < 0;
+ else if (cmp == "<=")
+ return compare(value, value2) <= 0;
+ else if (cmp == "==")
+ return compare(value, value2) == 0;
+ else if (cmp == ">=")
+ return compare(value, value2) >= 0;
+ else if (cmp == "<>" || cmp == "!=")
+ return compare(value, value2) != 0;
+ else
+ return compare(value, value2) > 0;
+ }
+ return value;
+}
+
+QVariant Expression::parseNot()
+{
+ if (next() == "!" || next() == "not")
+ {
+ m_start++;
+ return !parseComparison().asBool();
+ }
+ else
+ return parseComparison();
+}
+
+QVariant Expression::parseAnd()
+{
+ if (!validate()) return -1;
+ QVariant value = parseNot();
+ while (next() == "&&" || next() == "and")
+ {
+ m_start++;
+ value = parseNot().toBool() && value.toBool();
+ }
+
+ return value;
+}
+
+QVariant Expression::parseOr()
+{
+ if (!validate()) return -1;
+ QVariant value = parseAnd();
+ while (next() == "||" || next() == "or")
+ {
+ m_start++;
+ value = parseAnd().toBool() || value.toBool();
+ }
+ return value;
+}
+
+QVariant Expression::parse()
+{
+ return parseOr();
+}
+
+QVariant Expression::value(bool* valid)
+{
+ m_start = 0;
+ m_error = false;
+ QVariant val = parse();
+ if (valid)
+ *valid = !m_error && m_start == m_parts.count();
+ return val;
+}
+
+QVariant Expression::value(const QString& s, bool* valid)
+{
+ *this = s;
+ return value(valid);
+}
+
+bool Expression::isTrue(const QString& s, bool* valid)
+{
+ QVariant v = value(s, valid);
+ return (v.type() == QVariant::String && !v.toString().isNull()) ||
+ (v.type() != QVariant::String && v.toInt() != 0);
+}
+
diff --git a/kommander/widget/expression.h b/kommander/widget/expression.h
new file mode 100644
index 00000000..7ab163e2
--- /dev/null
+++ b/kommander/widget/expression.h
@@ -0,0 +1,80 @@
+/***************************************************************************
+ expression.h - Expression parser
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 _HAVE_EXPRESSION_H_
+#define _HAVE_EXPRESSION_H_
+
+#include <qstring.h>
+#include <qvaluelist.h>
+#include <qvariant.h>
+
+class Expression
+{
+public:
+ Expression();
+ Expression(const QString& expr);
+ /* set string to parse */
+ Expression& operator=(const QString& s);
+ /* calculate value */
+ QVariant value(bool* valid = 0);
+ /* equivalent of setString(s) and value(valid) */
+ QVariant value(const QString& s, bool* valid = 0);
+ /* equivalent of setString(s) and checking if value(valid) is true */
+ bool isTrue(const QString& s, bool* valid = 0);
+private:
+ enum Type {TypeInt, TypeDouble, TypeString};
+ /* parsing function - top-down approach */
+ /* parse terminal (number or string) */
+ QVariant parseNumber();
+ /* parse -x expression */
+ QVariant parseMinus();
+ /* parse (x) expression */
+ QVariant parseBracket();
+ /* parse x*y, x/y and x%y expressions */
+ QVariant parseMultiply();
+ /* parse x+y and x-y expressions */
+ QVariant parseAdd();
+ /* parse !x and (equivalent) not x expressions */
+ QVariant parseNot();
+ /* parse x==y, x<=y, x>=y, x<y and x>y expressions */
+ QVariant parseComparison();
+ /* parse x && y, (equivalent) x and y expressions */
+ QVariant parseAnd();
+ /* parse x || y and (equivalent) x or y expressions */
+ QVariant parseOr();
+ /* starting point of parsing - just call first function above */
+ QVariant parse();
+
+ /* check if we still have next argument */
+ bool validate();
+ /* return next argument to parse or null if there is none */
+ QString next() const;
+ /* set error position for future error reporting */
+ void setError(int pos = -1);
+ /* compare various types of QVariant (strings, floats, ints */
+ int compare(const QVariant v1, const QVariant v2) const;
+ /* return common type for binary operations */
+ Type commonType(const QVariant v1, const QVariant v2) const;
+
+ QValueList<QVariant> m_parts;
+ uint m_start;
+ bool m_error;
+ uint m_errorPosition;
+
+};
+
+#endif
+
diff --git a/kommander/widget/function.cpp b/kommander/widget/function.cpp
new file mode 100644
index 00000000..3bcd21cd
--- /dev/null
+++ b/kommander/widget/function.cpp
@@ -0,0 +1,135 @@
+/***************************************************************************
+ function.cpp - Functions for internal parser
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 "function.h"
+
+using namespace Parse;
+
+Function::Function() : m_function(0), m_minArgs(0), m_maxArgs(0)
+{
+}
+
+Function::Function(FunctionPointer fp, ValueType value, const TypeList& params, uint min, uint max)
+ : m_params(params)
+{
+ m_function = fp;
+ m_returnValue = value;
+ m_minArgs = min <= m_params.count() ? min : m_params.count();
+ m_maxArgs = max >= m_params.count() ? max : m_params.count();
+}
+
+Function::Function(FunctionPointer fp, ValueType value, ValueType param1, uint min, uint max)
+{
+ m_function = fp;
+ m_returnValue = value;
+ m_params.append(param1);
+ m_minArgs = min <= 1 ? min : 1;
+ m_maxArgs = max >= 1 ? max : 1;
+}
+
+Function::Function(FunctionPointer fp, ValueType value, ValueType param1, ValueType param2, uint min ,
+ uint max)
+{
+ m_function = fp;
+ m_returnValue = value;
+ m_params.append(param1);
+ m_params.append(param2);
+ m_minArgs = min <= 2 ? min : 2;
+ m_maxArgs = max >= 2 ? max : 2;
+}
+
+Function::Function(FunctionPointer fp, ValueType value, ValueType param1, ValueType param2, ValueType param3,
+ uint min, uint max)
+{
+ m_function = fp;
+ m_returnValue = value;
+ m_params.append(param1);
+ m_params.append(param2);
+ m_params.append(param3);
+ m_minArgs = min <= 3 ? min : 3;
+ m_maxArgs = max >= 3 ? max : 3;
+}
+
+Function::Function(FunctionPointer fp, ValueType value, ValueType param1, ValueType param2, ValueType param3,
+ ValueType param4, uint min, uint max)
+{
+ m_function = fp;
+ m_returnValue = value;
+ m_params.append(param1);
+ m_params.append(param2);
+ m_params.append(param3);
+ m_params.append(param4);
+ m_minArgs = min <= 4 ? min : 4;
+ m_maxArgs = max >= 4 ? max : 4;
+}
+
+Function::Function(FunctionPointer fp, ValueType value, ValueType param1, ValueType param2, ValueType param3,
+ ValueType param4, ValueType param5, uint min, uint max)
+{
+ m_function = fp;
+ m_returnValue = value;
+ m_params.append(param1);
+ m_params.append(param2);
+ m_params.append(param3);
+ m_params.append(param4);
+ m_params.append(param5);
+ m_minArgs = min <= 5 ? min : 5;
+ m_maxArgs = max >= 5 ? max : 5;
+}
+
+bool Function::isVoid() const
+{
+ return returnValue() == ValueNone;
+}
+
+ValueType Function::returnValue() const
+{
+ return m_returnValue;
+}
+
+ValueType Function::argType(uint i) const
+{
+ if (i < m_params.count())
+ return m_params[i];
+ else if (i < m_maxArgs)
+ return m_params.last();
+ else
+ return ValueNone;
+}
+
+uint Function::minArgs() const
+{
+ return m_minArgs;
+}
+
+uint Function::maxArgs() const
+{
+ return m_maxArgs;
+}
+
+bool Function::isValid(const ParameterList& params) const
+{
+ return params.count() >= minArgs() && params.count() <= maxArgs();
+}
+
+ParseNode Function::execute(Parser* P, const ParameterList& params) const
+{
+ if (m_function)
+ return m_function(P, params);
+ else
+ return ParseNode();
+}
+
diff --git a/kommander/widget/function.h b/kommander/widget/function.h
new file mode 100644
index 00000000..fbd8b99b
--- /dev/null
+++ b/kommander/widget/function.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+ function.h - Functions for internal parser
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 _HAVE_FUNCTION_H_
+#define _HAVE_FUNCTION_H_
+
+#include "parsenode.h"
+#include <qvaluevector.h>
+
+class Parser;
+
+typedef QValueVector<ParseNode> ParameterList;
+typedef QValueVector<Parse::ValueType> TypeList;
+typedef ParseNode(*FunctionPointer)(Parser*, const ParameterList&);
+
+class Function
+{
+ public:
+ /* default constructor - empty function */
+ Function();
+ /* construct a function from parameterlist */
+ Function(FunctionPointer fp, Parse::ValueType value, const TypeList& params, uint min = 99999,
+ uint max = 0);
+ /* construct a function from parameters */
+ Function(FunctionPointer fp, Parse::ValueType value, Parse::ValueType param1, uint min = 99999,
+ uint max = 0);
+ Function(FunctionPointer fp, Parse::ValueType value, Parse::ValueType param1, Parse::ValueType param2,
+ uint min = 99999, uint max = 0);
+ Function(FunctionPointer fp, Parse::ValueType value, Parse::ValueType param1, Parse::ValueType param2,
+ Parse::ValueType param3, uint min = 99999, uint max = 0);
+ Function(FunctionPointer fp, Parse::ValueType value, Parse::ValueType param1, Parse::ValueType param2,
+ Parse::ValueType param3, Parse::ValueType param4, uint min = 99999, uint max = 0);
+ Function(FunctionPointer fp, Parse::ValueType value, Parse::ValueType param1, Parse::ValueType param2,
+ Parse::ValueType param3, Parse::ValueType param4, Parse::ValueType param5,
+ uint min = 99999, uint max = 0);
+ /* if function returns value */
+ bool isVoid() const;
+ /* type of returned value */
+ Parse::ValueType returnValue() const;
+ /* type of i-th argument */
+ Parse::ValueType argType(uint i) const;
+ /* minimum number of arguments */
+ uint minArgs() const;
+ /* maximum number of arguments */
+ uint maxArgs() const;
+ /* check whether given list is appropriate for this function */
+ bool isValid(const ParameterList& params) const;
+ /* execute */
+ ParseNode execute(Parser* P, const ParameterList& params) const;
+
+private:
+ FunctionPointer m_function;
+ TypeList m_params;
+ Parse::ValueType m_returnValue;
+ uint m_minArgs;
+ uint m_maxArgs;
+};
+
+#endif
+
diff --git a/kommander/widget/functionlib.cpp b/kommander/widget/functionlib.cpp
new file mode 100644
index 00000000..3389d523
--- /dev/null
+++ b/kommander/widget/functionlib.cpp
@@ -0,0 +1,1476 @@
+/***************************************************************************
+ functionlib.cpp - Standard library of functions
+ -------------------
+ copyright : (C) 2004-2006 Michal Rudolf <mrudolf@kdewebdwev.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 "parserdata.h"
+#include "parser.h"
+#include "specials.h"
+#include "specialinformation.h"
+#include "myprocess.h"
+#include "kommanderwidget.h"
+#include "invokeclass.h"
+#include "kommanderfactory.h"
+
+#include <iostream>
+#include <stdlib.h>
+
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qstringlist.h>
+#include <qmetaobject.h>
+
+#include <kdebug.h>
+#include <kmessagebox.h>
+#include <dcopclient.h>
+#include <kapplication.h>
+#include <kcolordialog.h>
+#include <kfiledialog.h>
+#include <kglobal.h>
+#include <kinputdialog.h>
+#include <klocale.h>
+#include <kpassdlg.h>
+
+using namespace Parse;
+
+/******************* String functions ********************************/
+static ParseNode f_stringLength(Parser*, const ParameterList& params)
+{
+ return params[0].toString().length();
+}
+
+static ParseNode f_stringContains(Parser*, const ParameterList& params)
+{
+ return params[0].toString().contains(params[1].toString());
+}
+
+static ParseNode f_stringCompare(Parser*, const ParameterList& params)
+{
+ int result = QString::compare(params[0].toString(),params[1].toString());
+ if (result < 0)
+ {
+ result = -1;
+ } else
+ if (result > 0)
+ {
+ result = 1;
+ }
+ return result;
+}
+
+static ParseNode f_stringFind(Parser*, const ParameterList& params)
+{
+ return params[0].toString().find(params[1].toString(), params.count() == 3 ? params[2].toInt() : 0);
+}
+
+static ParseNode f_stringFindRev(Parser*, const ParameterList& params)
+{
+ return params[0].toString().findRev(params[1].toString(),
+ params.count() == 3 ? params[2].toInt() : params[0].toString().length());
+}
+
+static ParseNode f_stringCount(Parser*, const ParameterList& params)
+{
+ int c = 0;
+ int s = 0;
+ while (params[0].toString().find(params[1].toString(), s) > -1)
+ {
+ s = params[0].toString().find(params[1].toString(), s) + 1;
+ c++;
+ }
+ return c;
+}
+
+static ParseNode f_stringLeft(Parser*, const ParameterList& params)
+{
+ return params[0].toString().left(params[1].toInt());
+}
+
+static ParseNode f_stringRight(Parser*, const ParameterList& params)
+{
+ return params[0].toString().right(params[1].toInt());
+}
+
+static ParseNode f_stringMid(Parser*, const ParameterList& params)
+{
+ return params[0].toString().mid(params[1].toInt(), params.count() == 3 ? params[2].toInt() : 0xffffffff);
+}
+
+static ParseNode f_stringRemove(Parser*, const ParameterList& params)
+{
+ return params[0].toString().remove(params[1].toString());
+}
+
+static ParseNode f_stringReplace(Parser*, const ParameterList& params)
+{
+ return params[0].toString().replace(params[1].toString(), params[2].toString());
+}
+
+static ParseNode f_stringLower(Parser*, const ParameterList& params)
+{
+ return params[0].toString().lower();
+}
+
+static ParseNode f_stringUpper(Parser*, const ParameterList& params)
+{
+ return params[0].toString().upper();
+}
+
+static ParseNode f_stringIsEmpty(Parser*, const ParameterList& params)
+{
+ return params[0].toString().isEmpty();
+}
+
+static ParseNode f_stringSort(Parser*, const ParameterList& params)
+{
+ if (params.count() == 2 )
+ {
+ QStringList tmplst = QStringList::split(params[1].toString(), params[0].toString());
+ tmplst.sort();
+ return tmplst.join(params[1].toString());
+ }
+ else
+ {
+ QStringList tmplst = QStringList::split("\n", params[0].toString());
+ tmplst.sort();
+ return tmplst.join("\n");
+ }
+}
+static ParseNode f_stringTrim(Parser*, const ParameterList& params)
+{
+ return params[0].toString().stripWhiteSpace();
+}
+
+static ParseNode f_stringPadLeft(Parser*, const ParameterList& params)
+{
+ if (params.count() == 2 )
+ return params[0].toString().rightJustify(params[1].toInt(), ' ', false);
+ QString s = params[2].toString();
+ QChar ch = s.at(0);
+ return params[0].toString().rightJustify(params[1].toInt(), ch, false);
+}
+
+static ParseNode f_stringPadRight(Parser*, const ParameterList& params)
+{
+ if (params.count() == 2 )
+ return params[0].toString().leftJustify(params[1].toInt(), ' ', false);
+ QString s = params[2].toString();
+ QChar ch = s.at(0);
+ return params[0].toString().leftJustify(params[1].toInt(), ch, false);
+}
+
+static ParseNode f_stringSection(Parser*, const ParameterList& params)
+{
+ return params[0].toString().section(params[1].toString(), params[2].toInt(),
+ params.count() == 4 ? params[3].toInt() : params[2].toInt());
+}
+
+static ParseNode f_stringArgs(Parser*, const ParameterList& params)
+{
+ if (params.count() == 2)
+ return params[0].toString().arg(params[1].toString());
+ else if (params.count() == 3)
+ return params[0].toString().arg(params[1].toString()).arg(params[2].toString());
+ else
+ return params[0].toString().arg(params[1].toString()).arg(params[2].toString()).arg(params[3].toString());
+}
+
+static ParseNode f_stringIsNumber(Parser*, const ParameterList& params)
+{
+ bool ok;
+ params[0].toString().toDouble(&ok);
+ return ok;
+}
+
+static ParseNode f_stringToInt(Parser*, const ParameterList& params)
+{
+ return params[0].toString().toInt();
+}
+
+static ParseNode f_stringToDouble(Parser*, const ParameterList& params)
+{
+ return params[0].toString().toDouble();
+}
+
+static ParseNode f_return(Parser* p, const ParameterList& params)
+{
+ KommanderWidget * w = p->currentWidget();
+ if (w)
+ w->setGlobal(w->widgetName() + "_RESULT", params[0].toString());
+ return params[0];
+}
+
+static ParseNode f_stringRound(Parser*, const ParameterList& params)
+{
+ QString s;
+ s.sprintf("%."+params[1].toString()+"f", params[0].toDouble());
+ return s;
+}
+
+/******************* Debug function ********************************/
+static ParseNode f_debug(Parser*, const ParameterList& params)
+{
+ for (uint i=0; i<params.count(); i++)
+ std::cerr << params[i].toString();
+ std::cerr << "\n";
+ fflush(stderr);
+ return ParseNode();
+}
+
+static ParseNode f_echo(Parser*, const ParameterList& params)
+{
+ for (uint i=0; i<params.count(); i++)
+ std::cout << params[i].toString();
+ fflush(stdout);
+ return ParseNode();
+}
+
+
+
+/******************* File function ********************************/
+static ParseNode f_fileRead(Parser*, const ParameterList& params)
+{
+ QFile file(params[0].toString());
+ if (!file.exists() || !file.open(IO_ReadOnly))
+ return ParseNode("");
+ QTextStream text(&file);
+ return text.read();
+}
+
+static ParseNode f_fileWrite(Parser*, const ParameterList& params)
+{
+ QString fname = params[0].toString();
+ if (fname.isEmpty())
+ return 0;
+ QFile file(fname);
+ if (!file.open(IO_WriteOnly))
+ return 0;
+ QTextStream text(&file);
+ for (uint i=1; i<params.count(); i++)
+ text << params[i].toString();
+ return 1;
+}
+
+static ParseNode f_fileAppend(Parser*, const ParameterList& params)
+{
+ QString fname = params[0].toString();
+ if (fname.isEmpty())
+ return 0;
+ QFile file(fname);
+ if (!file.open(IO_WriteOnly | IO_Append))
+ return 0;
+ QTextStream text(&file);
+ for (uint i=1; i<params.count(); i++)
+ text << params[i].toString();
+ return 1;
+}
+
+static ParseNode f_fileExists(Parser*, const ParameterList& params)
+{
+ QFile file(params[0].toString());
+ if (!file.exists())
+ return 0;
+ else
+ return 1;
+}
+
+static ParseNode f_executeSlot(Parser* parser, const ParameterList& params)
+{
+ ParameterList::ConstIterator it = params.begin();
+ QString slotName = (*it).toString()+"(";
+ ++it;
+ QString widgetName = (*it).toString();
+ KommanderWidget* widget = parser->currentWidget();
+ if (!widget)
+ return ParseNode::error("unknown widget");
+ widget = widget->widgetByName(widgetName);
+ if (!widget)
+ return ParseNode::error("unknown widget");
+ QObject *object = widget->object();
+ if (!object)
+ return ParseNode::error("unknown widget");
+ QStrList slotSignatures = object->metaObject()->slotNames(true);
+ QStringList slotNames = QStringList::fromStrList(slotSignatures);
+ int slotNum = -1;
+ uint i = 0;
+ while (i < slotNames.count())
+ {
+ if (slotNames[i].startsWith(slotName))
+ {
+ slotNum = i;
+ break;
+ }
+ i++;
+ }
+ if (slotNum == -1)
+ return ParseNode::error("unknown function");
+ QStringList args;
+ ++it; // skip widget
+ while (it != params.end())
+ {
+ args += (*it).toString();
+ ++it;
+ }
+ InvokeClass* inv = new InvokeClass(0);
+ inv->invokeSlot(object, slotSignatures.at(slotNum), args);
+ inv->deleteLater();
+
+ return ParseNode();
+}
+
+
+/******************* DCOP function ********************************/
+static ParseNode f_dcopid(Parser*, const ParameterList& )
+{
+ return QString(kapp->dcopClient()->appId());
+}
+
+static ParseNode f_pid(Parser*, const ParameterList& )
+{
+ return QString::number(getpid());
+}
+
+static ParseNode f_parentPid(Parser*p, const ParameterList& )
+{
+ return p->variable("_PARENTPID").toString().isEmpty() ? QString::number(getppid()) : p->variable("_PARENTPID");
+}
+
+static ParseNode f_internalDcop(Parser* parser, const ParameterList& params)
+{
+ SpecialFunction function = SpecialInformation::functionObject("DCOP", params[0].toString());
+ int functionId = SpecialInformation::function(Group::DCOP, params[0].toString());
+ if (functionId == -1)
+ return f_executeSlot(parser, params);
+ //return ParseNode::error("unknown function");
+ else if ((uint)function.minArg() > params.count() - 1)
+ return ParseNode::error("too few parameters");
+ else if ((uint)function.maxArg() < params.count() - 1)
+ return ParseNode::error("too many parameters");
+ KommanderWidget* widget = parser->currentWidget();
+ if (widget)
+ widget = widget->widgetByName(params[1].toString());
+ if (!widget)
+ return ParseNode::error("unknown widget");
+ QStringList args;
+ ParameterList::ConstIterator it = params.begin();
+ ++it; // skip function
+ ++it; // skip widget
+ while (it != params.end())
+ {
+ args += (*it).toString();
+ ++it;
+ }
+ return widget->handleDCOP(functionId, args);
+}
+
+
+static ParseNode f_dcop(Parser*, const ParameterList& params)
+{
+ QCString appId = params[0].toString().latin1();
+ QCString object = params[1].toString().latin1();
+ QString function = params[2].toString().section('(', 0, 0);
+ QStringList items = QStringList::split(",", params[2].toString().section('(', 1, 1).section(')', 0, 0));
+ QByteArray byteData;
+ QDataStream byteDataStream(byteData, IO_WriteOnly);
+
+ if (items.count() != params.count() - 3)
+ {
+ qDebug("Wrong number of parameters");
+ return ParseNode();
+ }
+ int i = 3;
+ for (QStringList::Iterator it = items.begin(); it != items.end(); ++it)
+ {
+ *it = (*it).stripWhiteSpace();
+ if (*it == "int")
+ byteDataStream << params[i++].toInt();
+ else if (*it == "long")
+ byteDataStream << params[i++].toInt();
+ else if (*it == "float")
+ byteDataStream << params[i++].toDouble();
+ else if (*it == "double")
+ byteDataStream << params[i++].toDouble();
+ else if (*it == "bool")
+ byteDataStream << (bool)params[i++].toInt();
+ else if (*it == "QStringList")
+ if (params[i].toString().find('\n') != -1)
+ byteDataStream << QStringList::split("\n", params[i++].toString(), true);
+ else
+ byteDataStream << QStringList::split("\\n", params[i++].toString(), true);
+ else
+ byteDataStream << params[i++].toString();
+ }
+ function.append(QString("(%1)").arg(items.join(",")));
+ QCString replyType, byteReply;
+ DCOPClient* cl = KApplication::dcopClient();
+ if (!cl || !cl->call(appId, object, function.latin1(),
+ byteData, replyType, byteReply))
+ {
+ qDebug("DCOP failure");
+ return ParseNode();
+ }
+ QDataStream byteReplyStream(byteReply, IO_ReadOnly);
+ if (replyType == "QString")
+ {
+ QString text;
+ byteReplyStream >> text;
+ return text;
+ }
+ else if(replyType == "int")
+ {
+ int i;
+ byteReplyStream >> i;
+ return i;
+ }
+ else if(replyType == "bool")
+ {
+ bool b;
+ byteReplyStream >> b;
+ return b;
+ }
+ else if (replyType == "QStringList")
+ {
+ QStringList text;
+ byteReplyStream >> text;
+ return text.join("\n");
+ }
+ else if(replyType != "void")
+ {
+ qDebug("%s", QString("DCOP return type %1 is not yet implemented.").arg(replyType.data()).latin1());
+ }
+
+ return ParseNode();
+}
+
+static ParseNode f_createWidget(Parser* p, const ParameterList& params)
+{
+ QString widgetName = params[0].toString();
+ QString widgetType = params[1].toString();
+ QString parentName = params[2].toString();
+ KommanderWidget *widget = p->currentWidget()->widgetByName(parentName);
+ if (!widget)
+ return ParseNode::error("unknown widget");
+ QWidget *parent = dynamic_cast<QWidget*>(widget->object());
+ QWidget *w = KommanderFactory::createWidget(widgetType, parent, widgetName.latin1());
+ if (w)
+ w->adjustSize();
+ return ParseNode();
+}
+
+static ParseNode f_widgetExists(Parser* p, const ParameterList& params)
+{
+ QString widgetName = params[0].toString();
+ KommanderWidget *widget = p->currentWidget()->widgetByName(widgetName);
+ return (widget ? true : false);
+}
+
+
+static ParseNode f_connect(Parser* p, const ParameterList& params)
+{
+ QString sender = params[0].toString();
+ QString signal = QString::number(QSIGNAL_CODE) + params[1].toString();
+ QString receiver = params[2].toString();
+ QString slot = QString::number(QSLOT_CODE) + params[3].toString();
+ KommanderWidget *senderW = p->currentWidget()->widgetByName(sender);
+ if (!senderW)
+ return ParseNode::error("unknown widget");
+ KommanderWidget *receiverW = p->currentWidget()->widgetByName(receiver);
+ if (!receiverW)
+ return ParseNode::error("unknown widget");
+ dynamic_cast<QObject*>(senderW)->connect(dynamic_cast<QObject*>(senderW), signal.ascii(), dynamic_cast<QObject*>(receiverW), slot.ascii());
+ return ParseNode();
+}
+
+static ParseNode f_disconnect(Parser* p, const ParameterList& params)
+{
+ QString sender = params[0].toString();
+ QString signal = QString::number(QSIGNAL_CODE) + params[1].toString();
+ QString receiver = params[2].toString();
+ QString slot = QString::number(QSLOT_CODE) + params[3].toString();
+ KommanderWidget *senderW = p->currentWidget()->widgetByName(sender);
+ if (!senderW)
+ return ParseNode::error("unknown widget");
+ KommanderWidget *receiverW = p->currentWidget()->widgetByName(receiver);
+ if (!receiverW)
+ return ParseNode::error("unknown widget");
+ dynamic_cast<QObject*>(senderW)->disconnect(dynamic_cast<QObject*>(senderW), signal.ascii(), dynamic_cast<QObject*>(receiverW), slot.ascii());
+ return ParseNode();
+}
+
+
+static ParseNode f_exec(Parser* P, const ParameterList& params)
+{
+ MyProcess proc(P->currentWidget());
+ QString text;
+// qDebug("Trying %s", params[0].toString().latin1());
+ if (params.count() > 1)
+ text = proc.run(params[0].toString().local8Bit(), params[1].toString());
+ else
+ text = proc.run(params[0].toString().local8Bit());
+ return text;
+}
+
+static ParseNode f_execBackground(Parser* P, const ParameterList& params)
+{
+ MyProcess proc(P->currentWidget());
+ proc.setBlocking(false);
+ QString text;
+ qDebug("Trying %s", params[0].toString().latin1());
+ if (params.count() > 1)
+ text = proc.run(params[0].toString().local8Bit(), params[1].toString());
+ else
+ text = proc.run(params[0].toString().local8Bit());
+ return text;
+}
+
+static ParseNode f_dialog(Parser* P, const ParameterList& params)
+{
+ QString a_dialog = params[0].toString().local8Bit();
+ QString a_params = params[1].toString().local8Bit();
+
+ QString pFileName = P->currentWidget()->global("_KDDIR") + QString("/") + a_dialog;
+ QFileInfo pDialogFile(pFileName);
+ if (!pDialogFile.exists())
+ {
+ pFileName = a_dialog;
+ pDialogFile.setFile(pFileName);
+ if (!pDialogFile.exists())
+ return QString();
+ }
+ QString cmd = QString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
+ .arg(pFileName).arg(a_params).arg(getpid()).arg(getpid());
+
+ MyProcess proc(P->currentWidget());
+ QString text;
+ text = proc.run(cmd);
+
+ return text;
+}
+
+static ParseNode f_i18n(Parser*, const ParameterList& params)
+{
+ return KGlobal::locale()->translate(params[0].toString());
+}
+
+static ParseNode f_env(Parser*, const ParameterList& params)
+{
+ return QString(getenv(params[0].toString().latin1()));
+}
+
+/******************* Array functions ********************************/
+static ParseNode f_arrayClear(Parser* P, const ParameterList& params)
+{
+ P->unsetArray(params[0].toString());
+ return ParseNode();
+}
+
+static ParseNode f_arrayCount(Parser* P, const ParameterList& params)
+{
+ if (P->isArray(params[0].toString()))
+ return (uint)(P->array(params[0].toString()).count());
+ else
+ return (uint)0;
+}
+
+static ParseNode f_arrayKeys(Parser* P, const ParameterList& params)
+{
+ if (!P->isArray(params[0].toString()))
+ return ParseNode();
+ return QStringList(P->array(params[0].toString()).keys()).join("\n");
+}
+
+static ParseNode f_arrayValues(Parser* P, const ParameterList& params)
+{
+ if (!P->isArray(params[0].toString()))
+ return ParseNode();
+ QValueList<ParseNode> values = P->array(params[0].toString()).values();
+ QString array;
+ for (QValueList<ParseNode>::ConstIterator it = values.begin(); it != values.end(); ++it )
+ array += (*it).toString() + '\n';
+ return array;
+}
+
+static ParseNode f_arrayRemove(Parser* P, const ParameterList& params)
+{
+ if (P->isArray(params[0].toString()))
+ P->unsetArray(params[0].toString(), params[1].toString());
+ return ParseNode();
+}
+
+static ParseNode f_arrayToString(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isArray(name))
+ return ParseNode();
+ QString array;
+ QStringList keys = P->array(name).keys();
+ QValueList<ParseNode> values = P->array(name).values();
+
+ QStringList::Iterator it = keys.begin();
+ QValueList<ParseNode>::Iterator itval = values.begin();
+ while (*it)
+ {
+ array += QString("%1\t%2\n").arg(*it).arg((*itval).toString());
+ ++it;
+ ++itval;
+ }
+ return array;
+}
+
+static ParseNode f_arrayFromString(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ QStringList lines = QStringList::split("\n", params[1].toString());
+ for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ {
+ QString key = (*it).section('\t', 0, 0).stripWhiteSpace();
+ if (!key.isEmpty())
+ P->setArray(name, key, (*it).section('\t', 1));
+ }
+ return ParseNode();
+}
+
+
+static ParseNode f_arrayIndexedFromString(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ QStringList lines;
+ if (params.count() == 2)
+ lines = QStringList::split('\t', params[1].toString(), true);
+ else
+ lines = QStringList::split(params[2].toString(), params[1].toString(), true);
+ int i = 0;
+ for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ {
+ P->setArray(name, QString::number(i), (*it));
+ i++;
+ }
+ return ParseNode();
+}
+
+static ParseNode f_arrayIndexedToString(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isArray(name))
+ return ParseNode();
+ QString separator = "\t";
+ if (params.count() == 2)
+ separator = params[1].toString();
+ QString array;
+ int count = P->array(name).keys().count();
+ QValueList<ParseNode> values = P->array(name).values();
+
+ for (int i = 0; i < count; i++)
+ {
+ if (i != 0)
+ array.append(separator);
+ array.append(P->arrayValue(name, QString::number(i)).toString());
+ }
+ return array;
+}
+
+static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isArray(name))
+ return ParseNode();
+ int key = params[1].toInt();
+ int num = 0;
+ if (params.count() == 3)
+ num = params[2].toInt() - 1;
+ if (num < 0)
+ num = 0;
+ QString array;
+ QStringList keys = P->array(name).keys();
+ int count = keys.count();
+ if (key + num > count - 1 || key < 0)
+ return ParseNode(); //out of index range
+ for (int i = 0; i < count; i++)
+ {
+ if (keys.contains(QString::number(i)) != 1)
+ return ParseNode(); //array is not indexed
+ }
+ for (int i = key; i <= key + num; i++)
+ {
+ P->unsetArray(name, QString::number(i));
+ }
+ int j = key;
+ for (int i = key + num + 1; i < count; i++)
+ {
+ P->setArray(name, QString::number(j), P->arrayValue(name, QString::number(i)));
+ j++;
+ }
+ for (int i = 1; i <= num + 1; i++)
+ {
+ P->unsetArray(name, QString::number(count - i));
+ }
+ return ParseNode();
+}
+
+
+static ParseNode f_arrayIndexedInsertElements(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isArray(name))
+ return ParseNode();
+ int key = params[1].toInt();
+ QStringList keys = P->array(name).keys();
+ int count = keys.count();
+ if (key > count || key < 0)
+ return ParseNode(); //out of index range
+ QString separator = "\t";
+ if (params.count() == 4)
+ separator = params[3].toString();
+ QStringList elements = QStringList::split(separator, params[2].toString(), true);
+ int num = elements.count();
+ for (int i = count - 1; i >= key; i--)
+ {
+ P->setArray(name, QString::number(i + num), P->arrayValue(name, QString::number(i)));
+ }
+ int i = key;
+ for (QStringList::Iterator it = elements.begin(); it != elements.end(); ++it )
+ {
+ P->setArray(name, QString::number(i), (*it));
+ i++;
+ }
+ return ParseNode();
+}
+
+static ParseNode f_arrayFlipCopy(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isArray(name))
+ return ParseNode();
+ QString arr = params[1].toString();
+ const QMap<QString, ParseNode> A = P->array(name);
+ for (QMapConstIterator<QString, ParseNode> It = A.begin(); It != A.end(); ++It )
+ {
+ P->setArray(arr, (*It).toString(), It.key() );
+ }
+ return ParseNode();
+}
+
+/*********** matrix (2D array) functions ********/
+static ParseNode f_matrixClear(Parser* P, const ParameterList& params)
+{
+ P->unsetMatrix(params[0].toString());
+ return ParseNode();
+}
+
+static ParseNode f_matrixToString(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isMatrix(name))
+ return ParseNode();
+ QString matrix;
+ QString colhead;
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ int r = 0;
+ int c = 0;
+ int frow = 0;
+ int fcol = 0;
+ if (params.count() >= 1)
+ frow = params[1].toInt(); //row headings
+ if (params.count() >= 2)
+ fcol = params[2].toInt(); //col headings
+ QString tmp;
+ typedef QMap<int, QString> col_map;
+ col_map col_head;
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It1 = A.begin(); It1 != A.end(); ++It1 )
+ {
+ const QMap<QString, ParseNode> B = It1.data();
+ for (QMapConstIterator<QString, ParseNode> It2 = B.begin(); It2 != B.end(); ++It2 )
+ {
+ bool colfound = false;
+ for (QMapConstIterator<int, QString> It3 = col_head.begin(); It3 != col_head.end(); ++It3 )
+ {
+ if (It2.key() == (*It3))
+ {
+ colfound = true;
+ break;
+ }
+ }
+ if (!colfound)
+ {
+ col_head[c] = It2.key();
+ if (c > 0)
+ colhead.append("\t");
+ colhead.append(It2.key());
+ c++;
+ }
+ }
+ }
+ if (fcol && frow)
+ colhead.prepend("\t");
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It1 = A.begin(); It1 != A.end(); ++It1)
+ {
+ if (r > 0 )
+ matrix.append("\n");
+ if (frow) //add row keys
+ {
+ tmp = It1.key();
+ matrix.append(tmp+"\t");
+ }
+ c = 0;
+ const QMap<int, QString> B = col_head;
+ for (QMapConstIterator<int, QString> It2 = B.begin(); It2 != B.end(); ++It2 )
+ {
+ if (c > 0)
+ matrix.append("\t");
+ matrix.append(P->matrixValue(name, It1.key(), (*It2) ).toString());
+ c++;
+ }
+ r++;
+ }
+ if (fcol)
+ matrix.prepend(colhead+"\n");
+ return matrix;
+}
+
+static ParseNode f_matrixFromString(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ QStringList rows = QStringList::split("\n", params[1].toString());
+ int r = 0;
+ int frow = 0;
+ int fcol = 0;
+ QString rkey;
+ QMap<int, QString> colhead;
+ if (params.count() > 1)
+ frow = params[2].toInt(); //row headings
+ if (params.count() > 2)
+ fcol = params[3].toInt(); //col headings
+ for (QStringList::Iterator itr = rows.begin(); itr != rows.end(); ++itr )
+ {
+ int c = 0;
+ QString ckey;
+ QStringList cols = QStringList::split("\t", (*itr), true);
+ for (QStringList::Iterator itc = cols.begin(); itc != cols.end(); ++itc )
+ {
+ QString val = (*itc).stripWhiteSpace();
+ if (frow)
+ {
+ if (c == 0 && !val.isEmpty())
+ {
+ rkey = val;
+ }
+ }
+ else
+ rkey = QString::number(r);
+ if (fcol && r == 0 && c >= 0)
+ {
+ if (!val.isEmpty())
+ colhead[c] = val;
+ else
+ colhead[c] = QString::number(c);
+ }
+ if (!val.isEmpty() && !(c == 0 && frow) && !(r == 0 && fcol))
+ {
+ if (fcol)
+ ckey = colhead[c];
+ else
+ ckey = QString::number(c);
+ P->setMatrix(name, rkey, ckey, val);
+ }
+ c++;
+ }
+ r++;
+ }
+ return ParseNode();
+}
+
+static ParseNode f_matrixRows(Parser* P, const ParameterList& params)
+{
+ if (P->isMatrix(params[0].toString()))
+ return (uint)(P->matrix(params[0].toString()).count());
+ else
+ return (uint)0;
+
+}
+
+static ParseNode f_matrixRowKeys(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isMatrix(name))
+ return ParseNode();
+ QString matrix;
+ QString tmp;
+ QString separator = "\t";
+ if (params.count() == 2)
+ separator = params[1].toString();
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ int r = 0;
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It1 = A.begin(); It1 != A.end(); ++It1)
+ {
+ if (r > 0 )
+ matrix.append(separator);
+ tmp = It1.key();
+ matrix.append(tmp);
+ r++;
+ }
+ return matrix;
+}
+
+static ParseNode f_matrixFindRow(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isMatrix(name))
+ return ParseNode();
+ QString col = params[1].toString();
+ QString val = params[2].toString();
+ QString tmp;
+ int i = 0;
+ int find;
+ if (params.count() == 4)
+ find = params[3].toInt();
+ else
+ find = 0;
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It = A.begin(); It != A.end(); ++It)
+ {
+ if (val == P->matrixValue(name, It.key(), col).toString())
+ {
+ if (find == i)
+ return It.key();
+ i++;
+ }
+ }
+ return ParseNode();
+}
+
+static ParseNode f_matrixCols(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (P->isMatrix(name))
+ {
+ typedef QMap<int, QString> col_map;
+ col_map col_head;
+ uint cols = 0;
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It = A.begin(); It != A.end(); ++It)
+ {
+ const QMap<QString, ParseNode> B = It.data();
+ for (QMapConstIterator<QString, ParseNode> It2 = B.begin(); It2 != B.end(); ++It2 )
+ {
+ bool colfound = false;
+ for (QMapConstIterator<int, QString> It3 = col_head.begin(); It3 != col_head.end(); ++It3 )
+ {
+ if (It2.key() == (*It3))
+ {
+ colfound = true;
+ break;
+ }
+ }
+ if (!colfound)
+ {
+ col_head[cols] = It2.key();
+ cols++;
+ }
+ }
+ }
+ return (uint)cols;
+ }
+ else
+ return (uint)0;
+}
+
+static ParseNode f_matrixColumnKeys(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isMatrix(name))
+ return ParseNode();
+ QString matrix;
+ QString tmp;
+ QString separator = "\t";
+ if (params.count() == 2)
+ separator = params[1].toString();
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ QStringList colnames;
+ int c =0;
+
+ typedef QMap<int, QString> col_map;
+ col_map col_head;
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It1 = A.begin(); It1 != A.end(); ++It1 )
+ {
+ const QMap<QString, ParseNode> B = It1.data();
+ for (QMapConstIterator<QString, ParseNode> It2 = B.begin(); It2 != B.end(); ++It2 )
+ {
+ bool colfound = false;
+ for (QMapConstIterator<int, QString> It3 = col_head.begin(); It3 != col_head.end(); ++It3 )
+ {
+ if (It2.key() == (*It3))
+ {
+ colfound = true;
+ break;
+ }
+ }
+ if (!colfound)
+ {
+ col_head[c] = It2.key();
+ if (c > 0)
+ matrix.append(separator);
+ matrix.append(It2.key());
+ c++;
+ }
+ }
+ }
+ return matrix;
+}
+
+static ParseNode f_matrixRowToArray(Parser* P, const ParameterList& params)
+{
+ QString mtr = params[0].toString();
+ if (P->isMatrix(mtr))
+ {
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(mtr);
+ int i = 0;
+ int rclear = 1;
+ int ridx = 1;
+ if (params.count() > 2)
+ rclear = params[3].toInt();
+ if (params.count() > 3)
+ ridx = params[4].toInt();
+ QString arr = params[2].toString();
+ if (rclear)
+ P->unsetArray(arr);
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It1 = A.begin(); It1 != A.end(); ++It1)
+ {
+ if (It1.key() == params[1].toString() )
+ {
+ const QMap<QString, ParseNode> B = It1.data();
+ for (QMapConstIterator<QString, ParseNode> It2 = B.begin(); It2 != B.end(); ++It2 )
+ {
+ if (ridx)
+ P->setArray(arr, QString::number(i), (*It2));
+ else
+ P->setArray(arr, It2.key(), (*It2));
+ i++;
+ }
+ }
+ }
+ }
+ return ParseNode();
+}
+
+static ParseNode f_matrixColumnToArray(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (P->isMatrix(name))
+ {
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It1 = A.begin(); It1 != A.end(); ++It1)
+ {
+ const QMap<QString, ParseNode> B = It1.data();
+ for (QMapConstIterator<QString, ParseNode> It2 = B.begin(); It2 != B.end(); ++It2 )
+ {
+ if (It2.key() == params[1].toString() )
+ {
+ P->setArray(params[2].toString(), It1.key(), (*It2));
+ }
+ }
+ }
+ }
+ return ParseNode();
+}
+
+static ParseNode f_matrixColumnToIndexedArray(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (P->isMatrix(name))
+ {
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ int i = 0;
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It1 = A.begin(); It1 != A.end(); ++It1)
+ {
+ const QMap<QString, ParseNode> B = It1.data();
+ for (QMapConstIterator<QString, ParseNode> It2 = B.begin(); It2 != B.end(); ++It2 )
+ {
+ if (It2.key() == params[1].toString() )
+ {
+ P->setArray(params[2].toString(), QString::number(i), (*It2));
+ i++;
+ }
+ }
+ }
+ }
+ return ParseNode();
+}
+
+static ParseNode f_matrixAddRow(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ QString rowkey = params[1].toString();
+ QStringList rows = QStringList::split("\n", params[2].toString());
+ for (QStringList::Iterator itr = rows.begin(); itr != rows.end(); ++itr )
+ {
+ QStringList cols = QStringList::split("\t", (*itr));
+ if (cols.count() != 2 )
+ continue;
+ QStringList::Iterator itc = cols.begin();
+ QString rkey = (*itc).stripWhiteSpace();
+ ++itc;
+ QString rval = (*itc).stripWhiteSpace();
+ if (!rkey.isEmpty() && !rval.isEmpty())
+ P->setMatrix(name, rowkey, rkey, rval);
+ }
+ return ParseNode();
+}
+
+static ParseNode f_matrixRemoveRow(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ if (!P->isMatrix(name))
+ return ParseNode();
+ QString rowkey = params[1].toString();
+ int found = 0;
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ if (A.contains(rowkey))
+ {
+ P->unsetMatrix(name, rowkey);
+ found = 1;
+ }
+ return QString::number(found);
+}
+/*
+static ParseNode f_matrixAddColumn(Parser* P, const ParameterList& params)
+{
+}
+*/
+static ParseNode f_matrixRemoveColumn(Parser* P, const ParameterList& params)
+{
+ QString name = params[0].toString();
+ QString colkey = params[1].toString();
+ if (!P->isMatrix(name))
+ return ParseNode();
+ int found = 0;
+ const QMap<QString, QMap<QString, ParseNode> > A = P->matrix(name);
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It = A.begin(); It != A.end(); ++It)
+ {
+ if (A[It.key()].contains(colkey))
+ found = 1;
+ P->unsetMatrix(name, It.key(), colkey);
+ }
+ return QString::number(found);
+}
+/*
+static ParseNode f_matrixIndexedCopy(Parser* P, const ParameterList& params)
+{
+}
+*/
+/********** input functions *********************/
+static ParseNode f_inputColor(Parser*, const ParameterList& params)
+{
+ QColor color;
+ if (params.count())
+ color.setNamedColor(params[0].toString());
+ KColorDialog::getColor(color);
+ return color.name();
+}
+
+static ParseNode f_inputText(Parser*, const ParameterList& params)
+{
+ QString value;
+ if (params.count() > 2)
+ value = params[2].toString();
+ return KInputDialog::getText(params[0].toString(), params[1].toString(), value);
+}
+
+static ParseNode f_inputPassword(Parser*, const ParameterList& params)
+{
+ QCString value;
+ if (params.count() > 1)
+ value = params[1].toString().local8Bit();
+ KPasswordDialog::getPassword(value, params[0].toString());
+ return QString::fromLocal8Bit(value);
+}
+
+static ParseNode f_inputValue(Parser*, const ParameterList& params)
+{
+ return KInputDialog::getInteger(params[0].toString(), params[1].toString(),
+ params[2].toInt(), params[3].toInt(), params[4].toInt(),
+ params.count() > 5 ? params[5].toInt() : 1,
+ (bool*)0);
+}
+
+static ParseNode f_inputValueDouble(Parser*, const ParameterList& params)
+{
+ return KInputDialog::getDouble(params[0].toString(), params[1].toString(),
+ params[2].toDouble(), params[3].toDouble(), params[4].toDouble(),
+ params.count() > 5 ? params[5].toDouble() : 0.1);
+}
+
+static ParseNode f_inputOpenFile(Parser*, const ParameterList& params)
+{
+ QString startdir, filter, caption;
+ if (params.count() > 0)
+ startdir = params[0].toString();
+ if (params.count() > 1)
+ filter = params[1].toString();
+ if (params.count() > 2)
+ caption = params[2].toString();
+ return KFileDialog::getOpenFileName(startdir, filter, 0, caption);
+}
+
+static ParseNode f_inputOpenFiles(Parser*, const ParameterList& params)
+{
+ QString startdir, filter, caption;
+ if (params.count() > 0)
+ startdir = params[0].toString();
+ if (params.count() > 1)
+ filter = params[1].toString();
+ if (params.count() > 2)
+ caption = params[2].toString();
+ return KFileDialog::getOpenFileNames(startdir, filter, 0, caption).join("\n");
+}
+
+static ParseNode f_inputSaveFile(Parser*, const ParameterList& params)
+{
+ QString startdir, filter, caption;
+ if (params.count() > 0)
+ startdir = params[0].toString();
+ if (params.count() > 1)
+ filter = params[1].toString();
+ if (params.count() > 2)
+ caption = params[2].toString();
+ return KFileDialog::getSaveFileName(startdir, filter, 0, caption);
+}
+
+static ParseNode f_inputDirectory(Parser*, const ParameterList& params)
+{
+ QString startdir, caption;
+ if (params.count() > 0)
+ startdir = params[0].toString();
+ if (params.count() > 1)
+ caption = params[1].toString();
+ return KFileDialog::getExistingDirectory(startdir, 0, caption);
+}
+
+static ParseNode f_message_info(Parser*, const ParameterList& params)
+{
+ QString text, caption;
+ if (params.count() > 0)
+ text = params[0].toString();
+ if (params.count() > 1)
+ caption = params[1].toString();
+ KMessageBox::information(0, text, caption);
+ return 1;
+}
+
+static ParseNode f_message_error(Parser*, const ParameterList& params)
+{
+ QString text, caption;
+ if (params.count() > 0)
+ text = params[0].toString();
+ if (params.count() > 1)
+ caption = params[1].toString();
+ KMessageBox::error(0, text, caption);
+ return 1;
+}
+
+static ParseNode f_message_warning(Parser*, const ParameterList& params)
+{
+ int result;
+ QString text, caption, button1, button2, button3;
+ if (params.count() > 0)
+ text = params[0].toString();
+ if (params.count() > 1)
+ caption = params[1].toString();
+ if (params.count() > 2)
+ button1 = params[2].toString();
+ if (params.count() > 3)
+ button2 = params[3].toString();
+ if (params.count() > 4)
+ button3 = params[4].toString();
+ if (button1.isNull())
+ result = KMessageBox::warningYesNo(0, text, caption);
+ else if (button3.isNull())
+ result = KMessageBox::warningYesNo(0, text, caption, button1, button2);
+ else
+ result = KMessageBox::warningYesNoCancel(0, text, caption, button1, button2, button3);
+ switch(result)
+ {
+ case KMessageBox::Yes:
+ return 1;
+ case KMessageBox::No:
+ return 2;
+ case KMessageBox::Cancel:
+ return 3;
+ default:
+ return 0;
+ }
+}
+
+static ParseNode f_message_question(Parser*, const ParameterList& params)
+{
+ int result;
+ QString text, caption, button1, button2, button3;
+ if (params.count() > 0)
+ text = params[0].toString();
+ if (params.count() > 1)
+ caption = params[1].toString();
+ if (params.count() > 2)
+ button1 = params[2].toString();
+ if (params.count() > 3)
+ button2 = params[3].toString();
+ if (params.count() > 4)
+ button3 = params[4].toString();
+ if (button1.isNull())
+ result = KMessageBox::questionYesNo(0, text, caption);
+ else if (button3.isNull())
+ result = KMessageBox::questionYesNo(0, text, caption, button1, button2);
+ else
+ result = KMessageBox::questionYesNoCancel(0, text, caption, button1, button2, button3);
+ switch(result)
+ {
+ case KMessageBox::Yes:
+ return 1;
+ case KMessageBox::No:
+ return 2;
+ case KMessageBox::Cancel:
+ return 3;
+ default:
+ return 0;
+ }
+}
+
+static ParseNode f_read_setting(Parser* parser, const ParameterList& params)
+{
+ QString def;
+ if (params.count() > 1)
+ def = params[1].toString();
+ if (parser->currentWidget())
+ {
+ QString fname = parser->currentWidget()->fileName();
+ if (fname.isEmpty())
+ return ParseNode();
+ KConfig cfg("kommanderrc", true);
+ cfg.setGroup(fname);
+ return cfg.readEntry(params[0].toString(), def);
+ }
+ return ParseNode();
+}
+
+static ParseNode f_write_setting(Parser* parser, const ParameterList& params)
+{
+ if (parser->currentWidget())
+ {
+ QString fname = parser->currentWidget()->fileName();
+ if (fname.isEmpty())
+ return ParseNode();
+ KConfig cfg("kommanderrc", false);
+ cfg.setGroup(fname);
+ cfg.writeEntry(params[0].toString(), params[1].toString());
+ }
+ return ParseNode();
+}
+
+
+
+
+void ParserData::registerStandardFunctions()
+{
+ registerFunction("str_length", Function(&f_stringLength, ValueInt, ValueString));
+ registerFunction("str_contains", Function(&f_stringContains, ValueInt, ValueString, ValueString));
+ registerFunction("str_compare", Function(&f_stringCompare, ValueInt, ValueString, ValueString));
+ registerFunction("str_find", Function(&f_stringFind, ValueInt, ValueString, ValueString, ValueInt, 2));
+ registerFunction("str_findrev", Function(&f_stringFindRev, ValueInt, ValueString, ValueString, ValueInt, 2));
+ registerFunction("str_left", Function(&f_stringLeft, ValueString, ValueString, ValueInt));
+ registerFunction("str_count", Function(&f_stringCount, ValueInt, ValueString, ValueString));
+ registerFunction("str_right", Function(&f_stringRight, ValueString, ValueString, ValueInt));
+ registerFunction("str_mid", Function(&f_stringMid, ValueString, ValueString, ValueInt, ValueInt, 2));
+ registerFunction("str_remove", Function(&f_stringRemove, ValueString, ValueString, ValueString));
+ registerFunction("str_replace", Function(&f_stringReplace, ValueString, ValueString, ValueString, ValueString));
+ registerFunction("str_lower", Function(&f_stringLower, ValueString, ValueString));
+ registerFunction("str_upper", Function(&f_stringUpper, ValueString, ValueString));
+ registerFunction("str_section", Function(&f_stringSection, ValueString, ValueString, ValueString, ValueInt, ValueInt, 3));
+ registerFunction("str_args", Function(&f_stringArgs, ValueString, ValueString, 2, 4));
+ registerFunction("str_isnumber", Function(&f_stringIsNumber, ValueInt, ValueString));
+ registerFunction("str_isempty", Function(&f_stringIsEmpty, ValueInt, ValueString));
+ registerFunction("str_toint", Function(&f_stringToInt, ValueString, ValueInt, 1));
+ registerFunction("str_todouble", Function(&f_stringToDouble, ValueString, ValueDouble, 1));
+ registerFunction("str_round", Function(&f_stringRound, ValueInt, ValueDouble, ValueInt, 2));
+ registerFunction("str_sort", Function(&f_stringSort, ValueString, ValueString, ValueString, 1, 2));
+ registerFunction("str_trim", Function(&f_stringTrim, ValueString, ValueString, 1));
+ registerFunction("str_padLeft", Function(&f_stringPadLeft, ValueString, ValueInt, ValueString, ValueString, 1, 2));
+ registerFunction("str_padRight", Function(&f_stringPadRight, ValueString, ValueInt, ValueString, ValueString, 1, 2));
+ registerFunction("return", Function(&f_return, ValueNone, ValueString, 1, 1));
+ registerFunction("debug", Function(&f_debug, ValueNone, ValueString, 1, 100));
+ registerFunction("echo", Function(&f_echo, ValueNone, ValueString, 1, 100));
+ registerFunction("file_read", Function(&f_fileRead, ValueString, ValueString, 1, 1));
+ registerFunction("file_write", Function(&f_fileWrite, ValueInt, ValueString, ValueString, 2, 100));
+ registerFunction("file_append", Function(&f_fileAppend, ValueInt, ValueString, ValueString, 2, 100));
+ registerFunction("file_exists", Function(&f_fileExists, ValueString, ValueString, 1, 1));
+ registerFunction("internalDcop", Function(&f_internalDcop, ValueString, ValueString, ValueString, 2, 100));
+ registerFunction("executeSlot", Function(&f_executeSlot, ValueString, ValueString, ValueString, 2, 100));
+ registerFunction("createWidget", Function(&f_createWidget, ValueString, ValueString, ValueString, 3, 100));
+ registerFunction("widgetExists", Function(&f_widgetExists, ValueString, 1));
+ registerFunction("connect", Function(&f_connect, ValueString, ValueString, ValueString, ValueString, 4, 4));
+ registerFunction("disconnect", Function(&f_disconnect, ValueString, ValueString, ValueString, ValueString, 4, 4));
+ registerFunction("dcop", Function(&f_dcop, ValueString, ValueString, ValueString, 3, 100));
+ registerFunction("dcopid", Function(&f_dcopid, ValueString, ValueNone, 0, 0));
+ registerFunction("pid", Function(&f_pid, ValueString, ValueNone, 0, 0));
+ registerFunction("parentPid", Function(&f_parentPid, ValueString, ValueNone, 0, 0));
+ registerFunction("dialog", Function(&f_dialog, ValueString, ValueString, ValueString, 1, 2));
+ registerFunction("exec", Function(&f_exec, ValueString, ValueString, ValueString, 1, 2));
+ registerFunction("execBackground", Function(&f_execBackground, ValueString, ValueString, ValueString, 1, 2));
+ registerFunction("i18n", Function(&f_i18n, ValueString, ValueString));
+ registerFunction("env", Function(&f_env, ValueString, ValueString));
+ registerFunction("readSetting", Function(&f_read_setting, ValueString, ValueString, ValueString, 1));
+ registerFunction("writeSetting", Function(&f_write_setting, ValueNone, ValueString, ValueString));
+ registerFunction("array_clear", Function(&f_arrayClear, ValueNone, ValueString));
+ registerFunction("array_count", Function(&f_arrayCount, ValueInt, ValueString));
+ registerFunction("array_keys", Function(&f_arrayKeys, ValueString, ValueString));
+ registerFunction("array_values", Function(&f_arrayValues, ValueString, ValueString));
+ registerFunction("array_tostring", Function(&f_arrayToString, ValueString, ValueString));
+ registerFunction("array_fromstring", Function(&f_arrayFromString, ValueNone, ValueString, ValueString));
+ registerFunction("array_indexedfromstring", Function(&f_arrayIndexedFromString, ValueNone, ValueString, ValueString, ValueString, 2, 3));
+ registerFunction("array_indexedtostring", Function(&f_arrayIndexedToString, ValueNone, ValueString, ValueString, 1, 2));
+ registerFunction("array_indexedRemoveElements", Function(&f_arrayIndexedRemoveElements, ValueNone, ValueString, ValueInt, ValueInt, 2 , 3));
+ registerFunction("array_indexedInsertElements", Function(&f_arrayIndexedInsertElements, ValueNone, ValueString, ValueInt, ValueString, ValueString, 3, 4));
+ registerFunction("array_remove", Function(&f_arrayRemove, ValueNone, ValueString, ValueString));
+ registerFunction("matrix_fromString", Function(&f_matrixFromString, ValueNone, ValueString, ValueString, ValueInt, ValueInt, 2, 4));
+ registerFunction("matrix_toString", Function(&f_matrixToString, ValueNone, ValueString, ValueInt, ValueInt, 1, 3));
+ registerFunction("matrix_clear", Function(&f_matrixClear, ValueNone, ValueString));
+ registerFunction("matrix_rows", Function(&f_matrixRows, ValueInt, ValueString));
+ registerFunction("matrix_columns", Function(&f_matrixCols, ValueInt, ValueString));
+ registerFunction("matrix_rowToArray", Function(&f_matrixRowToArray, ValueNone, ValueString, ValueInt, ValueString, ValueInt, ValueInt, 3, 5));
+ registerFunction("matrix_columnToArray", Function(&f_matrixColumnToArray, ValueNone, ValueString, ValueString, ValueString, 3, 3));
+ registerFunction("matrix_columnToIndexedArray", Function(&f_matrixColumnToIndexedArray, ValueNone, ValueString, ValueString, ValueString, 3, 3));
+ registerFunction("array_flipCopy", Function(&f_arrayFlipCopy, ValueNone, ValueString, ValueString, 2, 2));
+ registerFunction("matrix_rowKeys", Function(&f_matrixRowKeys, ValueString, ValueString, ValueString, 1, 2));
+ registerFunction("matrix_columnKeys", Function(&f_matrixColumnKeys, ValueString, ValueString, ValueString, 1, 2));
+ registerFunction("matrix_addRow", Function(&f_matrixAddRow, ValueNone, ValueString, ValueString, ValueString, 3, 3));
+ registerFunction("matrix_removeRow", Function(&f_matrixRemoveRow, ValueInt, ValueString, ValueString, 2, 2));
+ registerFunction("matrix_removeColumn", Function(&f_matrixRemoveColumn, ValueInt, ValueString, ValueString, 2, 2));
+ registerFunction("matrix_findRow", Function(&f_matrixFindRow, ValueString, ValueString, ValueString, ValueString, 3, 4));
+
+ registerFunction("input_color", Function(&f_inputColor, ValueString, ValueString, 0));
+ registerFunction("input_text", Function(&f_inputText, ValueString, ValueString, ValueString, ValueString, 2));
+ registerFunction("input_password", Function(&f_inputPassword, ValueString, ValueString, ValueString, 1));
+ registerFunction("input_value", Function(&f_inputValue, ValueInt, ValueString, ValueString, ValueInt, ValueInt,
+ ValueInt, ValueInt, 6));
+ registerFunction("input_double", Function(&f_inputValueDouble, ValueDouble, ValueString, ValueString, ValueDouble, ValueDouble,
+ ValueDouble, ValueDouble, 6));
+ registerFunction("input_openfile", Function(&f_inputOpenFile, ValueString, ValueString, ValueString, ValueString, 0));
+ registerFunction("input_openfiles", Function(&f_inputOpenFiles, ValueString, ValueString, ValueString, ValueString, 0));
+ registerFunction("input_savefile", Function(&f_inputSaveFile, ValueString, ValueString, ValueString, ValueString, 0));
+ registerFunction("input_directory", Function(&f_inputDirectory, ValueString, ValueString, ValueString, 0));
+ registerFunction("message_info", Function(&f_message_info, ValueInt, ValueString, ValueString, 1));
+ registerFunction("message_error", Function(&f_message_error, ValueInt, ValueString, ValueString, 1));
+ registerFunction("message_warning", Function(&f_message_warning, ValueInt, ValueString, ValueString,
+ ValueString, ValueString, ValueString, 1));
+ registerFunction("message_question", Function(&f_message_question, ValueInt, ValueString, ValueString,
+ ValueString, ValueString, ValueString, 1));
+}
+
diff --git a/kommander/widget/invokeclass.cpp b/kommander/widget/invokeclass.cpp
new file mode 100644
index 00000000..b5de4678
--- /dev/null
+++ b/kommander/widget/invokeclass.cpp
@@ -0,0 +1,61 @@
+//
+// C++ Interface: invokeclass
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kde.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include "invokeclass.h"
+
+#include <qcolor.h>
+#include <qregexp.h>
+
+InvokeClass::InvokeClass(QObject *parent):QObject(parent)
+{
+ m_acceptedSlots = acceptedSlots();
+}
+
+void InvokeClass::invokeSlot(QObject *object, const QString& slot, QStringList args)
+{
+ QString invokeName = slot;
+ invokeName = invokeName.mid(invokeName.find('('));
+ invokeName.prepend(QString::number(QSIGNAL_CODE) + "invoke");
+ QString slotName = QString::number(QSLOT_CODE) + slot;
+ connect(this, invokeName.ascii(), object, slotName.ascii());
+
+ if (args.count() == 0)
+ emit invoke();
+ else
+ {
+ QString slotArgStr = slot.section(QRegExp("\\(|\\)"), 1);
+ uint argNum = slotArgStr.contains(',') + 1;
+ for (uint i = args.count(); i < argNum; i++)
+ args << "";
+ //poor man's invokeMetaObject
+ if (slotArgStr == m_acceptedSlots[0])
+ emit invoke(args[0]);
+ else if (slotArgStr == m_acceptedSlots[1])
+ emit invoke(args[0], args[1]);
+ else if (slotArgStr == m_acceptedSlots[2])
+ emit invoke(args[0].upper()=="TRUE" || args[0] =="1"? true : false);
+ else if (slotArgStr == m_acceptedSlots[3])
+ emit invoke(args[0].toInt());
+ else if (slotArgStr == m_acceptedSlots[4])
+ emit invoke(args[0].toInt(), args[1].toInt());
+ else if (slotArgStr == m_acceptedSlots[5])
+ emit invoke(args[0].toInt(), args[1].toInt(), args[2].toInt());
+ else if (slotArgStr == m_acceptedSlots[6])
+ emit invoke(args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
+ else if (slotArgStr == m_acceptedSlots[7])
+ emit invoke(QColor(args[0]));
+ }
+
+ disconnect(this, invokeName.ascii(), object, slotName.ascii());
+}
+
+#include "invokeclass.moc"
diff --git a/kommander/widget/invokeclass.h b/kommander/widget/invokeclass.h
new file mode 100644
index 00000000..61688b3e
--- /dev/null
+++ b/kommander/widget/invokeclass.h
@@ -0,0 +1,56 @@
+//
+// C++ Interface: invokeclass
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kde.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef INVOKECLASS_H
+#define INVOKECLASS_H
+
+#include <qobject.h>
+#include <qstringlist.h>
+
+class InvokeClass : public QObject {
+Q_OBJECT
+public:
+ InvokeClass(QObject *parent);
+ void invokeSlot(QObject *object, const QString& slot, QStringList args);
+
+ static QStringList acceptedSlots()
+ {
+ static QStringList acceptedSlots;
+ acceptedSlots << "const QString&";
+ acceptedSlots << "const QString&,const QString&";
+ acceptedSlots << "bool";
+ acceptedSlots << "int";
+ acceptedSlots << "int,int";
+ acceptedSlots << "int,int,int";
+ acceptedSlots << "int,int,int,int";
+ acceptedSlots << "const QColor&";
+
+ return acceptedSlots;
+ }
+
+signals:
+ void invoke();
+ void invoke(const QString&);
+ void invoke(const QString&,const QString&);
+ void invoke(bool);
+ void invoke(int);
+ void invoke(int,int);
+ void invoke(int,int,int);
+ void invoke(int,int,int,int);
+ void invoke(const QColor&);
+
+private:
+ QStringList m_acceptedSlots;
+
+};
+
+#endif
diff --git a/kommander/widget/kmdrmainwindow.cpp b/kommander/widget/kmdrmainwindow.cpp
new file mode 100644
index 00000000..cfe79d0c
--- /dev/null
+++ b/kommander/widget/kmdrmainwindow.cpp
@@ -0,0 +1,36 @@
+//
+// C++ Implementation: KmdrMainWindow
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "kmdrmainwindow.h"
+
+#include <qtimer.h>
+
+KmdrMainWindow::KmdrMainWindow(QWidget *parent, const char *name, WFlags f)
+ : KMainWindow(parent, name, f)
+{
+ QTimer::singleShot(10, this, SIGNAL(initialize()));
+}
+
+
+KmdrMainWindow::~KmdrMainWindow()
+{
+}
+
+bool KmdrMainWindow::queryClose()
+{
+ bool quit = KMainWindow::queryClose();
+ if (quit)
+ emit destroy();
+ return quit;
+}
+
+
+#include "kmdrmainwindow.moc"
diff --git a/kommander/widget/kmdrmainwindow.h b/kommander/widget/kmdrmainwindow.h
new file mode 100644
index 00000000..059b514e
--- /dev/null
+++ b/kommander/widget/kmdrmainwindow.h
@@ -0,0 +1,37 @@
+//
+// C++ Interface: KmdrMainWindow
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef KmdrMainWindow_H
+#define KmdrMainWindow_H
+
+#include <kmainwindow.h>
+
+/**
+ @author Andras Mantia <amantia@kdewebdev.org>
+*/
+class KmdrMainWindow : public KMainWindow
+{
+Q_OBJECT
+public:
+ KmdrMainWindow(QWidget *parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose);
+
+ ~KmdrMainWindow();
+
+protected:
+ virtual bool queryClose();
+
+signals:
+ void initialize();
+ void destroy();
+
+};
+
+#endif
diff --git a/kommander/widget/kommander_export.h b/kommander/widget/kommander_export.h
new file mode 100644
index 00000000..f97e739c
--- /dev/null
+++ b/kommander/widget/kommander_export.h
@@ -0,0 +1,35 @@
+/*
+ This file is part of kommander project
+ Copyright (c) 2005 Laurent Montel <montel@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.
+*/
+
+#ifndef _KOMMANDER_EXPORT_H
+#define _KOMMANDER_EXPORT_H
+
+#include <kdeversion.h>
+
+#if KDE_IS_VERSION(3,3,90)
+
+#include <kdemacros.h>
+
+#define KOMMANDER_EXPORT KDE_EXPORT
+
+#else
+#define KOMMANDER_EXPORT
+#endif
+#endif /* _KOMMANDER_EXPORT_H */
diff --git a/kommander/widget/kommanderfunctions.cpp b/kommander/widget/kommanderfunctions.cpp
new file mode 100644
index 00000000..a5a678db
--- /dev/null
+++ b/kommander/widget/kommanderfunctions.cpp
@@ -0,0 +1,349 @@
+/***************************************************************************
+ kommanderfunctions.cpp - Text widget core functionality
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 <iostream>
+#include <stdlib.h>
+
+#include <qfile.h>
+#include <qregexp.h>
+#include <qtextstream.h>
+
+#include <dcopclient.h>
+#include <kapplication.h>
+#include <kconfig.h>
+#include <klocale.h>
+#include <kglobal.h>
+
+#include "kommanderwidget.h"
+#include "specials.h"
+#include "specialinformation.h"
+#include "expression.h"
+#include "parser.h"
+
+QString KommanderWidget::evalFunction(const QString& function, const QStringList& args)
+{
+ switch (SpecialInformation::function(Group::Kommander, function)) {
+ case Kommander::widgetText:
+ return handleDCOP(DCOP::text);
+ case Kommander::selectedWidgetText:
+ return handleDCOP(DCOP::selection);
+ case Kommander::dcopid:
+ return kapp->dcopClient()->appId();
+ case Kommander::pid:
+ return QString().setNum(getpid());
+ case Kommander::null:
+ return QString();
+ case Kommander::comment:
+ return QString("#");
+ case Kommander::exec:
+ return execCommand(args[0]);
+ case Kommander::dcop:
+ return DCOPQuery(args);
+ case Kommander::parentPid:
+ return global("_PARENTPID").isEmpty() ? QString().setNum(getppid()) : global("_PARENTPID");
+ case Kommander::env:
+ return QString(getenv(args[0].latin1()));
+ case Kommander::i18n:
+ return KGlobal::locale()->translate(args[0]);
+ case Kommander::global:
+ return global(args[0]);
+ case Kommander::setGlobal:
+ setGlobal(args[0], args[1]);
+ return QString();
+ case Kommander::debug:
+ qDebug("%s", args[0].latin1());
+ fflush(stderr);
+ return QString::null;
+ case Kommander::echo:
+ for (uint i=0; i<args.count(); i++)
+ std::cout << args[i].latin1();
+ fflush(stdout);
+ return QString::null;
+ case Kommander::readSetting:
+ {
+ QString fname = fileName();
+ if (!fname.isEmpty())
+ {
+ KConfig cfg("kommanderrc", true);
+ cfg.setGroup(fname);
+ return cfg.readEntry(args[0], args[1]);
+ }
+ return QString::null;
+ }
+ case Kommander::writeSetting:
+ {
+ QString fname = fileName();
+ if (!fname.isEmpty())
+ {
+ KConfig cfg("kommanderrc", false);
+ cfg.setGroup(fname);
+ cfg.writeEntry(args[0], args[1]);
+ }
+ return QString::null;
+ }
+ case Kommander::dialog:
+ if (args.count() > 1)
+ return runDialog(args[0], args[1]);
+ else
+ return runDialog(args[0]);
+ case Kommander::expr:
+ {
+ Expression expr(args[0]);
+ bool ok;
+ QVariant value = expr.value(&ok);
+ return ok ? value.toString() : QString();
+ }
+ default:
+ return QString();
+ }
+}
+
+
+QString KommanderWidget::evalExecBlock(const QStringList& args, const QString& s, int& pos)
+{
+ int f = s.find("@execEnd", pos);
+ if (f == -1)
+ {
+ printError(i18n("Unterminated @execBegin ... @execEnd block."));
+ return QString();
+ }
+ else
+ {
+ QString shell = args.count() ? args[0] : QString();
+ int start = pos;
+ pos = f + QString("@execEnd").length()+1;
+ return execCommand(evalAssociatedText(s.mid(start, f - start)), shell);
+ }
+}
+
+QString KommanderWidget::evalForEachBlock(const QStringList& args, const QString& s, int& pos)
+{
+ int f = s.find("@end", pos);
+//FIXME: better detection of block boundaries
+ if (f == -1)
+ {
+ printError(i18n("Unterminated @forEach ... @end block."));
+ return QString();
+ }
+ else
+ {
+ int start = pos;
+ pos = f + QString("@end").length()+1;
+ QString var = args[0];
+ QStringList loop = QStringList::split("\n", args[1]);
+ QString output;
+ QString block = substituteVariable(s.mid(start, f - start), QString("%1_count").arg(var),
+ QString::number(loop.count()));
+ QString varidx = QString("%1_index").arg(var);
+ for (uint i=0; i<loop.count(); i++)
+ output += evalAssociatedText(substituteVariable(substituteVariable(block, varidx, QString::number(i+1)),
+ var, loop[i]));
+ return output;
+ }
+}
+
+QString KommanderWidget::evalForBlock(const QStringList& args, const QString& s, int& pos)
+{
+ int f = s.find("@end", pos);
+//FIXME: better detection of block boundaries
+ if (f == -1)
+ {
+ printError(i18n("Unterminated @forEach ... @end block."));
+ return QString();
+ }
+ else
+ {
+ int start = pos;
+ pos = f + QString("@end").length()+1;
+ QString block = s.mid(start, f - start);
+ QString variable = args[0];
+
+ Expression expr;
+ int loopstart = expr.value(args[1]).toInt();
+ int loopend = expr.value(args[2]).toInt();
+ int loopstep = 1;
+ if (args.count() > 3)
+ {
+ loopstep = expr.value(args[3]).toInt();
+ if (!loopstep)
+ loopstep = 1;
+ }
+
+ QString output;
+ for (int i=loopstart; i<=loopend; i+=loopstep)
+ {
+ output += evalAssociatedText(substituteVariable(block, variable, QString::number(i)));
+ }
+ return output;
+ }
+}
+
+QString KommanderWidget::evalIfBlock(const QStringList& args, const QString& s, int& pos)
+{
+ int f = s.find("@endif", pos);
+//FIXME: better detection of block boundaries; add error message
+ if (f == -1)
+ {
+ pos = s.length()+1;
+ printError(i18n("Unterminated @if ... @endif block."));
+ return QString();
+ }
+ else
+ {
+ QString block = s.mid(pos, f - pos);
+ pos = f + QString("@endif").length()+1;
+ Expression expr;
+ if (expr.isTrue(args[0]))
+ return evalAssociatedText(block);
+ return QString();
+ }
+}
+
+QString KommanderWidget::evalSwitchBlock(const QStringList& args, const QString& s, int& pos)
+{
+ int f = s.find("@end", pos);
+//FIXME: better detection of block boundaries; add error message
+ if (f == -1)
+ {
+ printError(i18n("Unterminated @switch ... @end block."));
+ return QString();
+ }
+ else
+ {
+ QString block = s.mid(pos, f - pos);
+ pos = f + QString("@end").length()+1;
+ f = parseBlockBoundary(block, 0, "@case");
+ bool finished = f == -1;
+ while (!finished)
+ {
+ f += 5;
+ int end = parseBlockBoundary(block, f, "@case");
+ if (end == -1)
+ {
+ end = block.length();
+ finished = true;
+ }
+ bool ok;
+ QString value = parseBrackets(block, f, ok);
+ if (!ok)
+ break;
+ if (value == args[0] || value == "*")
+ return evalAssociatedText(block.mid(f, end-f));
+ f = end;
+ }
+ return QString();
+ }
+}
+
+
+
+QString KommanderWidget::evalArrayFunction(const QString& function, const QStringList& args)
+{
+ Parser parser(internalParserData());
+ int fname = SpecialInformation::function(Group::Array, function);
+ QString array = args[0].startsWith("_") ? args[0] : QString("_")+ args[0];
+
+ if (fname == Array::setValue)
+ parser.setArray(array, args[1], args[2]);
+ else if (fname == Array::fromString)
+ {
+ QStringList lines = QStringList::split("\n", args[1]);
+ for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ {
+ QString key = (*it).section('\t', 0, 0).stripWhiteSpace();
+ if (!key.isEmpty())
+ parser.setArray(array, key, (*it).section('\t', 1));
+ }
+ }
+ else if (!parser.isArray(array))
+ return QString();
+ else switch (fname) {
+ case Array::value:
+ return parser.arrayValue(array, args[1]).toString();
+ case Array::keys:
+ {
+ const QMap<QString, ParseNode> map = parser.array(array);
+ QStringList keys;
+ for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
+ keys.append(it.key());
+ return keys.join("\n");
+ }
+ case Array::values:
+ {
+ const QMap<QString, ParseNode> map = parser.array(array);
+ QStringList values;
+ for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
+ values.append(it.data().toString());
+ return values.join("\n");
+ }
+ case Array::clear:
+ parser.unsetArray(array);
+ return QString();
+ case Array::remove:
+ parser.unsetArray(array, args[1]);
+ return QString();
+ case Array::count:
+ return QString::number(parser.array(array).count());
+ case Array::toString:
+ {
+ const QMap<QString, ParseNode> map = parser.array(array);
+ QString arraystring;
+ for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
+ arraystring += QString("%1\t%2\n").arg(it.key()).arg(it.data().toString());
+ return arraystring;
+ }
+ default:
+ return QString();
+ }
+ return QString();
+}
+
+
+QString KommanderWidget::evalWidgetFunction(const QString& identifier, const QString& s, int& pos)
+{
+ KommanderWidget* pWidget = parseWidget(identifier);
+ if (!pWidget)
+ {
+ printError(i18n("Unknown widget: @%1.").arg(identifier));
+ return QString();
+ }
+ if (s[pos] == '.')
+ {
+ pos++;
+ bool ok = true;
+ QString function = parseIdentifier(s, pos);
+ QStringList args = parseFunction("DCOP", function, s, pos, ok);
+ if (!ok)
+ return QString();
+ args.prepend(pWidget->widgetName());
+ QString prototype = SpecialInformation::prototype(Group::DCOP,
+ SpecialInformation::function(Group::DCOP, function));
+ return localDCOPQuery(prototype, args);
+ }
+ else if (pWidget == this)
+ {
+ printError(i18n("Infinite loop: @%1 called inside @%2.").arg(pWidget->widgetName())
+ .arg(pWidget->widgetName()));
+ return QString();
+ }
+ else if (!pWidget->hasAssociatedText())
+ {
+ printError(i18n("Script for @%1 is empty.").arg(pWidget->widgetName()));
+ return QString();
+ }
+ return pWidget->evalAssociatedText();
+}
+
diff --git a/kommander/widget/kommanderwidget.cpp b/kommander/widget/kommanderwidget.cpp
new file mode 100644
index 00000000..525f662b
--- /dev/null
+++ b/kommander/widget/kommanderwidget.cpp
@@ -0,0 +1,745 @@
+/***************************************************************************
+ kommanderwidget.cpp - Text widget core functionality
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 <dcopclient.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kdialogbase.h>
+#include <kmessagebox.h>
+#include <kprocess.h>
+
+/* QT INCLUDES */
+#include <qcstring.h>
+#include <qdatastream.h>
+#include <qfileinfo.h>
+#include <qobject.h>
+#include <qobjectlist.h>
+#include <qregexp.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qvaluelist.h>
+#include <qvariant.h>
+
+
+/* UNIX INCLUDES */
+#include <unistd.h>
+#include <stdlib.h>
+
+/* OTHER INCLUDES */
+#include "myprocess.h"
+#include "kommanderwidget.h"
+#include "specials.h"
+#include "specialinformation.h"
+#include "parser.h"
+#include "parserdata.h"
+#include "kommanderwindow.h"
+
+KommanderWidget::KommanderWidget(QObject *a_thisObject)
+{
+ m_thisObject = a_thisObject;
+}
+
+KommanderWidget::~KommanderWidget()
+{
+}
+
+void KommanderWidget::setAssociatedText(const QStringList& a_associations)
+{
+ m_associatedText = a_associations;
+ while(m_associatedText.count() < (states().count()))
+ m_associatedText += QString(); // sync states and associations
+}
+
+QStringList KommanderWidget::associatedText() const
+{
+ return m_associatedText;
+}
+
+bool KommanderWidget::hasAssociatedText()
+{
+ int index = states().findIndex(currentState());
+ if (index == -1 || m_associatedText[index].isEmpty())
+ return false;
+ return true;
+}
+
+
+void KommanderWidget::setPopulationText(const QString& a_txt)
+{
+ m_populationText = a_txt;
+}
+
+QString KommanderWidget::populationText() const
+{
+ return m_populationText;
+}
+
+QStringList KommanderWidget::states() const
+{
+ return m_states;
+}
+
+QStringList KommanderWidget::displayStates() const
+{
+ return m_displayStates;
+}
+
+void KommanderWidget::setStates(const QStringList& a_states)
+{
+ m_states = a_states;
+}
+
+void KommanderWidget::setDisplayStates(const QStringList& a_displayStates)
+{
+ m_displayStates = a_displayStates;
+}
+
+QString KommanderWidget::evalAssociatedText() // expands and returns associated text as a string
+{
+ int index = ( states().findIndex( currentState()) );
+ if (index == -1)
+ {
+ printError(i18n("Invalid state for associated text."));
+ return QString();
+ }
+ return evalAssociatedText(m_associatedText[index]);
+}
+
+QString KommanderWidget::evalAssociatedText(const QString& a_text)
+{
+ /* New internal parser is used if global flag is set */
+ if ((KommanderWidget::useInternalParser && !a_text.startsWith("#!")) || a_text.startsWith("#!kommander"))
+ {
+ Parser p(internalParserData());
+ p.setWidget(this);
+ p.setString(a_text);
+ if (!p.setString(a_text) || !p.parse())
+ printError(i18n("Line %1: %2.\n").arg(p.errorLine()+1).arg(p.errorMessage()));
+ return QString();
+ }
+ /* Old macro-only parser is implemented below */
+
+ bool parserType = KommanderWidget::useInternalParser;
+ KommanderWidget::useInternalParser = false; //shebang is used, switch to old parser
+
+ QString evalText;
+ int pos = 0, baseTextLength = a_text.length();
+ while (pos < baseTextLength)
+ {
+ int ident = a_text.find(ESCCHAR, pos);
+ if (ident == -1) {
+ evalText += a_text.mid(pos);
+ break;
+ }
+ evalText += a_text.mid(pos, ident - pos);
+ pos = ident+1;
+
+ /* escaped @ */
+ if (pos < baseTextLength-1 && a_text[pos] == ESCCHAR)
+ {
+ evalText += ESCCHAR;
+ pos++;
+ continue;
+ }
+
+ QString identifier = parseIdentifier(a_text, pos);
+ /* comment */
+ if (identifier.isEmpty())
+ {
+ if (pos < baseTextLength && a_text[pos] == '#') { // comment
+ int newpos = a_text.find('\n', pos+1);
+ if (newpos == -1)
+ newpos = a_text.length();
+ if (pos > 1 && a_text[pos-2] == '\n')
+ newpos++;
+ pos = newpos;
+ }
+ else
+ evalText += ESCCHAR; // single @
+ continue;
+ }
+ bool ok = true;
+ QStringList args;
+
+
+
+ /* Standard, non-prefixed special */
+ if (identifier == "if") // if required special handling as it takes expression
+ {
+ QString arg = parseBrackets(a_text, pos, ok);
+ if (!ok)
+ return QString();
+ args.append(evalAssociatedText(arg));
+ evalText += evalIfBlock(args, a_text, pos);
+ }
+ else if (SpecialInformation::function(Group::Kommander, identifier) != -1)
+ {
+ args = parseFunction("Kommander", identifier, a_text, pos, ok);
+ if (!ok)
+ return QString();
+ else if (identifier == "execBegin")
+ evalText += evalExecBlock(args, a_text, pos);
+ else if (identifier == "forEach")
+ evalText += evalForEachBlock(args, a_text, pos);
+ else if (identifier == "for")
+ evalText += evalForBlock(args, a_text, pos);
+ else if (identifier == "switch")
+ evalText += evalSwitchBlock(args, a_text, pos);
+ else if (identifier == "if")
+ evalText += evalIfBlock(args, a_text, pos);
+ else
+ evalText += evalFunction(identifier, args);
+ }
+
+ /* Widget special */
+ else if (parseWidget(identifier))
+ evalText += evalWidgetFunction(identifier, a_text, pos);
+ else if (a_text[pos] == '.')
+ {
+ pos++;
+ QString function = parseIdentifier(a_text, pos);
+ args = parseFunction(identifier, function, a_text, pos, ok);
+ if (!ok)
+ return QString();
+ switch (SpecialInformation::group(identifier))
+ {
+ case Group::Array:
+ evalText += evalArrayFunction(function, args);
+ break;
+ case Group::String:
+ evalText += Parser::function(internalParserData(), "str_" + function, args);
+ break;
+ case Group::File:
+ evalText += Parser::function(internalParserData(), "file_" + function, args);
+ break;
+ case Group::Message:
+ evalText += Parser::function(internalParserData(), "message_" + function, args);
+ break;
+ case Group::Input:
+ evalText += Parser::function(internalParserData(), "input_" + function, args);
+ break;
+ default:
+ return QString();
+ }
+ }
+ else
+ {
+ printError(i18n("Unknown special: \'%1\'.").arg(identifier));
+ return QString();
+ }
+ }
+
+ KommanderWidget::useInternalParser = parserType;
+ return evalText;
+}
+
+
+QString KommanderWidget::DCOPQuery(const QStringList& a_query)
+{
+ QString app = a_query[0];
+ app.remove("\"");
+ QCString appId = app.latin1(), object = a_query[1].latin1();
+
+ // parse function arguments
+ QString function = a_query[2], pTypes;
+ function.remove(' ');
+ int start = function.find('(');
+ bool ok = false;
+ if (start != -1)
+ pTypes = parseBrackets(function, start, ok);
+ else
+ {
+ ok = true;
+ function += "()";
+ }
+ if (!ok)
+ {
+ printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").arg(a_query[2]));
+ return QString();
+ }
+ const QStringList argTypes = parseArgs(pTypes, ok);
+ if (!ok || argTypes.count() != a_query.count() - 3)
+ {
+ printError(i18n("Incorrect arguments in DCOP call \'%1\'.").arg(a_query[2]));
+ return QString();
+ }
+
+ QCString replyType;
+ QByteArray byteData, byteReply;
+ QDataStream byteDataStream(byteData, IO_WriteOnly);
+ for (uint i=0 ; i<argTypes.count(); i++) {
+ if (argTypes[i] == "int")
+ byteDataStream << a_query[i+3].toInt();
+ else if (argTypes[i] == "long")
+ byteDataStream << a_query[i+3].toLong();
+ else if (argTypes[i] == "float")
+ byteDataStream << a_query[i+3].toFloat();
+ else if (argTypes[i] == "double")
+ byteDataStream << a_query[i+3].toDouble();
+ else if (argTypes[i] == "bool")
+ byteDataStream << (bool)(a_query[i+3] != "false" && a_query[i+3] != "false" && a_query[i+3] != "0");
+ else if (argTypes[i] == "QStringList")
+ if (a_query[i+3].find('\n') != -1)
+ byteDataStream << QStringList::split("\n", a_query[i+3], true);
+ else
+ byteDataStream << QStringList::split("\\n", a_query[i+3], true);
+ else
+ byteDataStream << a_query[i+3];
+ }
+
+ DCOPClient *cl = KApplication::dcopClient();
+ if (!cl || !cl->call(appId, object, function.latin1(), byteData, replyType, byteReply))
+ {
+ printError(i18n("Tried to perform DCOP query, but failed."));
+ return QString();
+ }
+
+ QDataStream byteReplyStream(byteReply, IO_ReadOnly);
+ if (replyType == "QString")
+ {
+ QString text;
+ byteReplyStream >> text;
+ return text;
+ }
+ else if(replyType == "int")
+ {
+ int i;
+ byteReplyStream >> i;
+ return QString::number(i);
+ }
+ else if(replyType == "bool")
+ {
+ bool b;
+ byteReplyStream >> b;
+ return QString::number(b);
+ }
+ else if (replyType == "QStringList")
+ {
+ QStringList text;
+ byteReplyStream >> text;
+ return text.join("\n");
+ }
+ else if(replyType != "void")
+ {
+ printError(i18n("DCOP return type %1 is not yet implemented.").arg(replyType.data()));
+ }
+
+ return QString();
+}
+
+QString KommanderWidget::localDCOPQuery(const QString function, const QStringList& args)
+{
+ QStringList pArgs;
+ pArgs.append(kapp->dcopClient()->appId());
+ pArgs.append("KommanderIf");
+ pArgs.append(function);
+ for (uint i=0; i<args.count(); i++)
+ pArgs.append(args[i]);
+ return DCOPQuery(pArgs);
+}
+
+QString KommanderWidget::localDCOPQuery(const QString function, const QString& arg1,
+ const QString& arg2, const QString& arg3, const QString& arg4)
+{
+ QStringList pArgs;
+ pArgs.append(kapp->dcopClient()->appId());
+ pArgs.append("KommanderIf");
+ pArgs.append(function);
+ pArgs.append(arg1);
+ pArgs.append(arg2);
+ if (!arg3.isNull())
+ pArgs.append(arg3);
+ if (!arg4.isNull())
+ pArgs.append(arg4);
+ return DCOPQuery(pArgs);
+}
+
+
+QString KommanderWidget::execCommand(const QString& a_command, const QString& a_shell) const
+{
+ MyProcess proc(this);
+ QString text = proc.run(a_command.local8Bit(), a_shell.latin1());
+//FIXME check if exec was successful
+ return text;
+}
+
+QString KommanderWidget::runDialog(const QString& a_dialog, const QString& a_params)
+{
+ QString pFileName = localDCOPQuery("global(QString)", "_KDDIR") + QString("/") + a_dialog;
+ QFileInfo pDialogFile(pFileName);
+ if (!pDialogFile.exists())
+ {
+ pFileName = a_dialog;
+ pDialogFile.setFile(pFileName);
+ if (!pDialogFile.exists())
+ return QString();
+ }
+ QString cmd = QString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
+ .arg(pFileName).arg(a_params).arg(getpid()).arg(getpid());
+ return execCommand(cmd);
+}
+
+
+void KommanderWidget::printError(const QString& a_error) const
+{
+ if (showErrors)
+ {
+ KDialogBase* dialog = new KDialogBase("Error", KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel,
+ KDialogBase::Yes, KDialogBase::No, 0, 0, true, false,
+ i18n("Continue"), i18n("Continue && Ignore Next Errors"), i18n("Stop"));
+ switch (KMessageBox::createKMessageBox(dialog, QMessageBox::Warning,
+ i18n("<qt>Error in widget <b>%1</b>:<p><i>%2</i></qt>").arg(QString(m_thisObject->name()))
+ .arg(a_error), QStringList(), QString(), 0, 0))
+ {
+ case KDialogBase::No:
+ showErrors = false;
+ case KDialogBase::Yes:
+ break;
+ case KDialogBase::Cancel:
+ if (parentDialog()->inherits("QDialog"))
+ {
+ parentDialog()->close();
+ exit(-1);
+ }
+ else if (parentDialog()->inherits("QMainWindow"))
+ kapp->quit();
+ }
+ }
+ else
+ {
+ kdError() << i18n("Error in widget %1:\n %2\n").arg(m_thisObject->name()).arg(a_error);
+ }
+}
+
+
+
+QString KommanderWidget::parseIdentifier(const QString& s, int& from) const
+{
+ uint start = from;
+ while (start < s.length() && s[start].isSpace())
+ start++;
+ uint end = start;
+ while (end < s.length() && (s[end].isLetterOrNumber() || s[end] == '_'))
+ end++;
+ from = end;
+ return s.mid(start, end-start);
+}
+
+QString KommanderWidget::parseBrackets(const QString& s, int& from, bool& ok) const
+{
+ ok = true;
+ uint start = from;
+ while (start < s.length() && s[start].isSpace())
+ start++;
+ if (start == s.length() || s[start] != '(')
+ return QString();
+ bool quoteSingle = false, quoteDouble = false;
+ int brackets = 1;
+ for (uint end = start+1; end < s.length(); end++)
+ {
+ if (!quoteDouble && s[end] == '\'' && s[end-1] != '\\')
+ quoteSingle = !quoteSingle;
+ else if (!quoteSingle && s[end] == '\"' && s[end-1] != '\\')
+ quoteDouble = !quoteDouble;
+ else if (!quoteDouble && !quoteSingle && s[end] == '(')
+ brackets++;
+ else if (!quoteDouble && !quoteSingle && s[end] == ')')
+ {
+ brackets--;
+ if (!brackets) {
+ from = end + 1;
+ return s.mid(start+1, end-start-1);
+ }
+ }
+ }
+ ok = false;
+ return QString();
+}
+
+
+QStringList KommanderWidget::parseArgs(const QString& s, bool &ok)
+{
+ QStringList argList;
+ bool quoteDouble = false, quoteSingle = false;
+ uint i, start = 0, brackets=0;
+ for (i = 0; i < s.length(); i++)
+ {
+ /* Handle brackets */
+ if (s[i] == '(' && !quoteSingle && !quoteDouble)
+ brackets++;
+ else if (s[i] == ')' && !quoteSingle && !quoteDouble)
+ brackets--;
+ /* Ignore everything in brackets */
+ else if (!brackets)
+ {
+ if (s[i] == '\'' && s[i-1] != '\\' && !quoteDouble)
+ quoteSingle = !quoteSingle;
+ else if (s[i] == '\"' && s[i-1] != '\\' && !quoteSingle)
+ quoteDouble = !quoteDouble;
+ else if (s[i] == ',' && !quoteDouble && !quoteSingle)
+ {
+ QString arg = s.mid(start, i - start).stripWhiteSpace();
+ if (!arg.isEmpty())
+ argList.append(evalAssociatedText(parseQuotes(arg)));
+ start = i+1;
+ }
+ }
+ }
+ if (!quoteDouble && !quoteSingle)
+ {
+ QString arg = s.mid(start, s.length() - start + 1).stripWhiteSpace();
+ if (!arg.isEmpty())
+ argList.append(evalAssociatedText(parseQuotes(arg)));
+ }
+ ok = !quoteDouble && !quoteSingle;
+
+ return argList;
+}
+
+QString KommanderWidget::parseQuotes(const QString& s) const
+{
+ if (s[0] == s[s.length()-1] && (s[0] == '\'' || s[0] == '\"'))
+ {
+ QMemArray<QChar> buf(s.length());
+ int start = 0;
+ int end = s.length() - 1;
+ for (int i=1; i<end; i++)
+ if (s[i] == '\\')
+ {
+ if (s[i+1] == 't')
+ buf[start++] = '\t';
+ else if (s[i+1] == 'n')
+ buf[start++] = '\n';
+ else if (s[i+1] == '\\')
+ buf[start++] = '\\';
+ else
+ {
+ buf[start++] = s[i];
+ i--;
+ }
+ i++;
+ }
+ else
+ buf[start++] = s[i];
+ return QString(buf, start);
+ //return s.mid(1, s.length()-2);
+ }
+ else return s;
+}
+
+bool KommanderWidget::isWidget(const QString& a_name) const
+{
+ return parseWidget(a_name);
+}
+
+KommanderWidget* KommanderWidget::widgetByName(const QString& a_name) const
+{
+ return parseWidget(a_name);
+}
+
+
+KommanderWidget* KommanderWidget::parseWidget(const QString& widgetName) const
+{
+ if (QString(parentDialog()->name()) == widgetName)
+ return dynamic_cast <KommanderWidget*>(parentDialog());
+ QCString s = widgetName.lower() == "self" ? m_thisObject->name() : widgetName.latin1();
+ QObject* childObj = parentDialog()->child(s);
+/* if (!childObj)
+ {
+ Parser parser(internalParserData());
+ QString variableValue = parser.variable(widgetName).toString();
+ s = variableValue.lower() == "self" ? m_thisObject->name() : variableValue.latin1();
+ childObj = parentDialog()->child(s);
+ }*/
+ return dynamic_cast <KommanderWidget*>(childObj);
+}
+
+QStringList KommanderWidget::parseFunction(const QString& group, const QString& function,
+ const QString& s, int& from, bool& ok)
+{
+ ok = true;
+ bool success = false;
+ QString arg = parseBrackets(s, from, ok);
+ if (!ok)
+ {
+ printError(i18n("Unmatched parenthesis after \'%1\'.").arg(function));
+ return QString();
+ }
+ const QStringList args = parseArgs(arg, ok);
+ int gname = SpecialInformation::group(group);
+ int fname = SpecialInformation::function(gname, function);
+ bool extraArg = gname == Group::DCOP;
+
+ if (!ok)
+ printError(i18n("Unmatched quotes in argument of \'%1\'.").arg(function));
+ else if (gname == -1)
+ printError(i18n("Unknown function group: \'%1\'.").arg(group));
+ else if (fname == -1 && !extraArg)
+ printError(i18n("Unknown function: \'%1\' in group '%2'.").arg(function).arg(group));
+ else if (fname == -1 && extraArg)
+ printError(i18n("Unknown widget function: \'%1\'.").arg(function));
+ else if ((int)args.count() + extraArg < SpecialInformation::minArg(gname, fname))
+ printError(i18n("Not enough arguments for \'%1\' (%2 instead of %3).<p>"
+ "Correct syntax is: %4")
+ .arg(function).arg(args.count() + extraArg).arg(SpecialInformation::minArg(gname, fname))
+ .arg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
+ else if ((int)args.count() + extraArg > SpecialInformation::maxArg(gname, fname))
+ printError(i18n("Too many arguments for \'%1\' (%2 instead of %3).<p>"
+ "Correct syntax is: %4")
+ .arg(function).arg(args.count() + extraArg).arg(SpecialInformation::maxArg(gname, fname))
+ .arg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
+ else
+ success = true;
+ ok = success;
+ return args;
+}
+
+int KommanderWidget::parseBlockBoundary(const QString& s, int from, const QStringList& args) const
+{
+ int shortest = -1;
+ for (uint i=0; i<args.count(); i++)
+ {
+ int match = s.find(args[i], from);
+ if (shortest > match || shortest == -1)
+ shortest = match;
+ }
+ return shortest;
+}
+
+
+
+QString KommanderWidget::substituteVariable(QString text, QString variable, QString value) const
+{
+ QString var = QString("@%1").arg(variable);
+ QString newtext;
+ int newpos, pos = 0;
+ while (true)
+ {
+ newpos = text.find(var, pos);
+ if (newpos != -1)
+ {
+ newtext += text.mid(pos, newpos-pos);
+ newtext += value;
+ pos = newpos + var.length();
+ } else
+ {
+ newtext += text.mid(pos);
+ break;
+ }
+ }
+ return newtext;
+}
+
+
+
+QWidget* KommanderWidget::parentDialog() const
+{
+ QObject *superParent = m_thisObject;
+ while (superParent->parent())
+ {
+ superParent = superParent->parent();
+ if (superParent->inherits("QDialog") || superParent->inherits("QMainWindow"))
+ break;
+ }
+ return (QWidget*)superParent;
+}
+
+
+
+
+QString KommanderWidget::global(const QString& variableName)
+{
+ QString var = variableName.startsWith("_") ? variableName : QString("_")+ variableName;
+ Parser parser(internalParserData());
+ return parser.variable(var).toString();
+}
+
+void KommanderWidget::setGlobal(const QString& variableName, const QString& value)
+{
+ QString var = variableName.startsWith("_") ? variableName : QString("_")+ variableName;
+ Parser parser(internalParserData());
+ parser.setVariable(var, value);
+}
+
+QString KommanderWidget::handleDCOP(const int function, const QStringList& args)
+{
+ QWidget* current = dynamic_cast<QWidget*>(m_thisObject);
+ if (!current)
+ return QString();
+ switch(function) {
+ case DCOP::setEnabled:
+ current->setEnabled( args[0] != "false" && args[0] != "0");
+ break;
+ case DCOP::setVisible:
+ current->setShown(args[0] != "false" && args[0] != "0");
+ break;
+ case DCOP::type:
+ return current->className();
+ case DCOP::children:
+ {
+ QStringList matching;
+ QObjectList* widgets = current->queryList("QWidget", 0, false, args.count() == 0 || args[0] != "false");
+ for (QObject* w = widgets->first(); w; w = widgets->next())
+ if (w->name() && (dynamic_cast<KommanderWidget*>(w)))
+ matching.append(w->name());
+ return matching.join("\n");
+ }
+ }
+ return QString();
+}
+
+bool KommanderWidget::isFunctionSupported(int f)
+{
+ return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::children || f == DCOP::type;
+}
+
+bool KommanderWidget::isCommonFunction(int f)
+{
+ return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::children || f == DCOP::type;
+}
+
+ParserData* KommanderWidget::internalParserData() const
+{
+ return m_parserData;
+}
+
+QString KommanderWidget::fileName()
+{
+ KommanderWindow* window = dynamic_cast<KommanderWindow*>(parentDialog());
+ if (window)
+ return QString(window->fileName());
+ else
+ return QString();
+}
+
+QString KommanderWidget::widgetName() const
+{
+ if (m_thisObject)
+ return QString::fromLatin1(m_thisObject->name());
+ else
+ return QString();
+}
+
+bool KommanderWidget::inEditor = false;
+bool KommanderWidget::showErrors = true;
+bool KommanderWidget::useInternalParser = false;
+ParserData* KommanderWidget::m_parserData = new ParserData;
+
+
diff --git a/kommander/widget/kommanderwidget.h b/kommander/widget/kommanderwidget.h
new file mode 100644
index 00000000..90a748b2
--- /dev/null
+++ b/kommander/widget/kommanderwidget.h
@@ -0,0 +1,162 @@
+/***************************************************************************
+ kommanderwidget.h - Text widget core functionality
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 _HAVE_KOMMANDERWIDGET_H_
+#define _HAVE_KOMMANDERWIDGET_H_
+
+/* KDE INCLUDES */
+#include <kprocess.h>
+
+#include "kommander_export.h"
+/* QT INCLUDES */
+#include <qmap.h>
+#include <qobject.h>
+#include <qpair.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+class ParserData;
+
+class KOMMANDER_EXPORT KommanderWidget
+{
+ friend class MyProcess;
+public:
+ KommanderWidget(QObject *);
+ virtual ~KommanderWidget();
+
+ //List of available states. Most widgets have only one state, but f. e. radiobutton has both
+ // 'checked' and 'unchecked'
+ virtual QStringList states() const;
+ virtual QStringList displayStates() const;
+ virtual QString currentState() const = 0;
+
+ virtual bool isKommanderWidget() const = 0;
+
+ // Associated script
+ virtual void setAssociatedText(const QStringList& a_associations);
+ virtual QStringList associatedText() const;
+ virtual bool hasAssociatedText();
+
+ // Execute default script, expanding all @macros.
+ virtual QString evalAssociatedText();
+ // Execute given script, expanding all @macros.
+ virtual QString evalAssociatedText(const QString&);
+ // Evaluate given Kommander function using given args.
+ virtual QString evalFunction(const QString& function, const QStringList& args);
+ // Parse and evaluate function for given widget, converting it to appropriate DCOP call.
+ virtual QString evalWidgetFunction(const QString& identifier, const QString& s, int& pos);
+ // Evaluate given array function using given args.
+ virtual QString evalArrayFunction(const QString&, const QStringList&);
+ // Parse and evaluate given execBegin..execEnd block.
+ virtual QString evalExecBlock(const QStringList&, const QString& s, int& pos);
+ // Parse and evaluate given forEach..end block.
+ virtual QString evalForEachBlock(const QStringList&, const QString& s, int& pos);
+ // Parse and evaluate given for..end block.
+ virtual QString evalForBlock(const QStringList&, const QString& s, int& pos);
+ // Parse and evaluate given switch..case..end block.
+ virtual QString evalSwitchBlock(const QStringList&, const QString& s, int& pos);
+ // Parse and evaluate given if..endif block.
+ virtual QString evalIfBlock(const QStringList&, const QString& s, int& pos);
+ // Population text. It will become widgetText after populate() is called
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ virtual void populate() = 0;
+
+ // Handles all widget-specific DCOP calls
+ virtual QString handleDCOP(int function, const QStringList& args = QStringList());
+ // Checks if appropriate function is supported by widget. By default all functions
+ // are reported as supported: use this to allow recognizing incorrect function calls.
+ virtual bool isFunctionSupported(int function);
+ // Checks if the function is common widget function (i. e. supported by all widgets)
+ virtual bool isCommonFunction(int function);
+ // Checks if the string is a valid widget name)
+ virtual bool isWidget(const QString& a_name) const;
+ // Returns widget from name
+ virtual KommanderWidget* widgetByName(const QString& a_name) const;
+ // Returns current widget name;
+ virtual QString widgetName() const;
+ // Returns filename associated with the dialog
+ virtual QString fileName();
+
+ QObject* object() { return m_thisObject;}
+
+
+ // Recognizes editor vs executor mode
+ static bool inEditor;
+ // Prints errors in message boxes, not in stderr
+ static bool showErrors;
+ // Default parser
+ static bool useInternalParser;
+ // Return global variable value
+ QString global(const QString& variableName);
+ // Set global variable value
+ void setGlobal(const QString& variableName, const QString& value);
+
+protected:
+ virtual void setStates(const QStringList& a_states);
+ virtual void setDisplayStates(const QStringList& a_displayStates);
+
+ // Execute DCOP query and return its result or null on failure
+ // Only QString and int are now handled
+ QString DCOPQuery(const QStringList& args);
+ QString localDCOPQuery(const QString function, const QStringList& args = QStringList());
+ QString localDCOPQuery(const QString function, const QString& arg1,
+ const QString& arg2, const QString& arg3 = QString::null,
+ const QString& arg4 = QString::null);
+ // Execute given command, return its result
+ QString execCommand(const QString& a_command, const QString& a_shell = QString::null) const;
+ // Find and run dialog (with optional parameters)
+ QString runDialog(const QString& a_dialog, const QString& a_params = QString::null);
+ // Display error message a_error; display current class name if no other is given
+ void printError(const QString& a_error) const;
+ // Auxiliary functions for parser
+ // Find matching brackets starting from current position
+ QString parseBrackets(const QString& s, int& from, bool& ok) const;
+ // Return identifier: the longest string of letters and numbers starting from i
+ QString parseIdentifier(const QString& s, int& from) const;
+ // Parse arguments for given function. Returns list of arguments without quotations
+ QStringList parseArgs(const QString& s, bool &ok);
+ // Remove quotes from given identifier
+ QString parseQuotes(const QString& s) const;
+ // Parse function
+ QStringList parseFunction(const QString& group, const QString& function,
+ const QString& s, int& from, bool& ok);
+ // Detect and return block boundary
+ int parseBlockBoundary(const QString& s, int from, const QStringList& args) const;
+
+ // Parse given identifier as widget name
+ KommanderWidget* parseWidget(const QString& name) const;
+ // Return parent dialog of this widget
+ QWidget* parentDialog() const;
+ QString substituteVariable(QString text, QString variable, QString value) const;
+
+ ParserData* internalParserData() const;
+
+ QObject *m_thisObject;
+ QStringList m_states;
+ QStringList m_displayStates;
+ QStringList m_associatedText;
+ QString m_populationText;
+
+ // Internal parser data
+ static ParserData* m_parserData;
+};
+
+
+#define ESCCHAR '@'
+
+#endif
diff --git a/kommander/widget/kommanderwindow.cpp b/kommander/widget/kommanderwindow.cpp
new file mode 100644
index 00000000..b536eb87
--- /dev/null
+++ b/kommander/widget/kommanderwindow.cpp
@@ -0,0 +1,35 @@
+/***************************************************************************
+ kommanderwindow.cpp - Kommander window widgets
+ -------------------
+ 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 "kommanderwindow.h"
+
+KommanderWindow::KommanderWindow(QObject* object) : KommanderWidget(object)
+{
+}
+
+KommanderWindow::~KommanderWindow()
+{
+}
+
+
+void KommanderWindow::setFileName(const QString& s)
+{
+ m_fileName = s;
+}
+
+QString KommanderWindow::fileName()
+{
+ return m_fileName;
+}
diff --git a/kommander/widget/kommanderwindow.h b/kommander/widget/kommanderwindow.h
new file mode 100644
index 00000000..023bd395
--- /dev/null
+++ b/kommander/widget/kommanderwindow.h
@@ -0,0 +1,37 @@
+/***************************************************************************
+ kommanderwindow.h - Kommander window widgets
+ -------------------
+ 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 _HAVE_KOMMANDERWINDOW_H_
+#define _HAVE_KOMMANDERWINDOW_H_
+
+#include "kommanderwidget.h"
+#include "kommander_export.h"
+class KOMMANDER_EXPORT KommanderWindow : public KommanderWidget
+{
+public:
+ KommanderWindow(QObject *);
+ virtual ~KommanderWindow();
+ virtual void setFileName(const QString& s);
+ virtual QString fileName();
+protected:
+
+private:
+ QString m_fileName;
+};
+
+
+
+#endif
+
diff --git a/kommander/widget/myprocess.cpp b/kommander/widget/myprocess.cpp
new file mode 100644
index 00000000..e7e05e3b
--- /dev/null
+++ b/kommander/widget/myprocess.cpp
@@ -0,0 +1,137 @@
+/***************************************************************************
+ myprocess.cpp - Wrapper class for running shell processes
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <kprocess.h>
+#include <klocale.h>
+
+/* QT INCLUDES */
+#include <qapplication.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include "myprocess.h"
+#include "kommanderwidget.h"
+
+MyProcess::MyProcess(const KommanderWidget *a_atw)
+ : m_atw(a_atw), m_loopStarted(false), m_blocking(true), mProcess(0)
+{
+}
+
+void qt_enter_modal(QWidget *widget);
+void qt_leave_modal(QWidget *widget);
+
+void MyProcess::setBlocking(bool blocking)
+{
+ m_blocking = blocking;
+}
+
+QString MyProcess::output() const
+{
+ return m_output;
+}
+
+bool MyProcess::isBlocking() const
+{
+ return m_blocking;
+}
+
+
+void MyProcess::cancel()
+{
+ if (mProcess) {
+ delete mProcess;
+ mProcess = 0;
+ }
+}
+
+QString MyProcess::run(const QString& a_command, const QString& a_shell)
+{
+ QString at = a_command.stripWhiteSpace();
+ if (at.isEmpty())
+ {
+ emit processExited(0);
+ return QString();
+ }
+
+ QString shellName = a_shell;
+ if (shellName.isEmpty())
+ shellName = "/bin/sh";
+
+ // Look for shell
+ if (at.startsWith("#!")) {
+ int eol = at.find("\n");
+ if (eol == -1)
+ eol = at.length();
+ shellName = at.mid(2, eol-1).stripWhiteSpace();
+ at = at.mid(eol+1);
+ }
+ m_input = at.local8Bit();
+
+ mProcess = new KProcess;
+ (*mProcess) << shellName.latin1();
+
+ connect(mProcess, SIGNAL(receivedStdout(KProcess*, char*, int)),
+ SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(mProcess, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
+
+ if(!mProcess->start(KProcess::NotifyOnExit, KProcess::All))
+ {
+ m_atw->printError(i18n("<qt>Failed to start shell process<br><b>%1</b></qt>").arg(shellName));
+ return QString();
+ }
+ mProcess->writeStdin(m_input, m_input.length());
+ mProcess->closeStdin();
+
+ if (!m_blocking)
+ return QString();
+ else
+ {
+ QWidget dummy(0, 0, WType_Dialog | WShowModal);
+ dummy.setFocusPolicy(QWidget::NoFocus);
+ m_loopStarted = true;
+ qt_enter_modal(&dummy);
+ qApp->enter_loop();
+ qt_leave_modal(&dummy);
+
+ if (!m_output.isEmpty() && m_output[m_output.length()-1] == '\n')
+ return m_output.left(m_output.length()-1);
+ else
+ return m_output;
+ }
+}
+
+void MyProcess::slotReceivedStdout(KProcess*, char* a_buffer, int a_len)
+{
+ m_output += QString::fromLocal8Bit(a_buffer, a_len);
+ emit processReceivedStdout(this, a_buffer, a_len);
+}
+
+void MyProcess::slotProcessExited(KProcess* process)
+{
+ if (m_loopStarted)
+ {
+ qApp->exit_loop();
+ m_loopStarted = false;
+ }
+ delete process;
+ if (!m_blocking)
+ emit processExited(this);
+ mProcess = 0;
+}
+
+#include "myprocess.moc"
diff --git a/kommander/widget/myprocess.h b/kommander/widget/myprocess.h
new file mode 100644
index 00000000..8487f170
--- /dev/null
+++ b/kommander/widget/myprocess.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ myprocess.h - Wrapper class for running shell processes
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_MYPROCESS_H_
+#define _HAVE_MYPROCESS_H_
+
+/* KDE INCLUDES */
+#include <kprocess.h>
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qobject.h>
+#include "kommander_export.h"
+
+class KommanderWidget;
+
+class KOMMANDER_EXPORT MyProcess : public QObject
+{
+ Q_OBJECT
+public:
+ MyProcess(const KommanderWidget *);
+ // Run given command, using a_shell as a shell (this can be overridden by shebang in the first line)
+ // Process is run in blocking mode.
+ QString run(const QString& a_command, const QString& a_shell = "/bin/sh");
+ // Kill running process
+ void cancel();
+ void setBlocking(bool blocking);
+ bool isBlocking() const;
+ QString output() const;
+signals:
+ void processExited(MyProcess*);
+ void processReceivedStdout(MyProcess*, char*, int);
+private slots:
+ void slotReceivedStdout(KProcess*, char*, int);
+ void slotProcessExited(KProcess*);
+protected:
+ const KommanderWidget *m_atw;
+ QString m_output;
+ QCString m_input;
+ bool m_loopStarted;
+ bool m_blocking;
+ bool m_handleOutput;
+ KProcess* mProcess;
+};
+
+#endif
diff --git a/kommander/widget/parsenode.cpp b/kommander/widget/parsenode.cpp
new file mode 100644
index 00000000..09ad66a7
--- /dev/null
+++ b/kommander/widget/parsenode.cpp
@@ -0,0 +1,262 @@
+/***************************************************************************
+ parsenode.cpp - Single parsed item
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 "parsenode.h"
+
+using namespace Parse;
+
+ParseNode::ParseNode() : m_type(ValueNone), m_context(-1)
+{
+}
+
+ParseNode::ParseNode(const QString& s) : m_type(ValueString), m_string(s), m_context(-1)
+{
+}
+
+ParseNode::ParseNode(int i) : m_type(ValueInt), m_int(i), m_context(-1)
+{
+}
+
+ParseNode::ParseNode(uint i) : m_type(ValueInt), m_int(i), m_context(-1)
+{
+}
+
+ParseNode::ParseNode(double d) : m_type(ValueDouble), m_double(d), m_context(-1)
+{
+}
+
+ParseNode::ParseNode(Keyword k) : m_type(ValueKeyword), m_keyword(k), m_string(QString::null), m_context(-1)
+{
+}
+
+ParseNode::ParseNode(Keyword k, const QString& name) : m_type(ValueKeyword), m_keyword(k), m_context(-1)
+{
+ m_string = (k == Variable) ? name : QString::null;
+}
+
+ParseNode ParseNode::error(const QString& s)
+{
+ ParseNode p;
+ p.m_string = s;
+ p.m_type = ValueError;
+ return p;
+}
+
+ValueType ParseNode::type() const
+{
+ return m_type;
+}
+
+Keyword ParseNode::keyword() const
+{
+ return isKeyword() ? m_keyword : Invalid;
+}
+
+QString ParseNode::toString() const
+{
+ switch(type()) {
+ case ValueString: return m_string;
+ case ValueInt: return QString::number(m_int);
+ case ValueDouble: return QString::number(m_double);
+ default: return QString();
+ }
+}
+
+int ParseNode::toInt() const
+{
+ switch(type()) {
+ case ValueInt: return m_int;
+ case ValueDouble: return (int)m_double;
+ case ValueString: return m_string.toInt();
+ default: return 0;
+ }
+}
+
+double ParseNode::toDouble() const
+{
+ switch(type()) {
+ case ValueDouble: return m_double;
+ case ValueInt: return (double)m_int;
+ case ValueString: return m_string.toDouble();
+ default: return 0.0;
+ }
+}
+
+bool ParseNode::toBool() const
+{
+ return toInt() != 0;
+}
+
+bool ParseNode::isValid() const
+{
+ return type() != ValueError;
+}
+
+bool ParseNode::isKeyword() const
+{
+ return type() == ValueKeyword;
+}
+
+bool ParseNode::isKeyword(Keyword k) const
+{
+ return type() == ValueKeyword && keyword() == k;
+}
+
+bool ParseNode::isVariable() const
+{
+ return type() == ValueKeyword && keyword() == Variable;
+}
+
+bool ParseNode::isArray() const
+{
+ return type() == ValueKeyword && keyword() == Array;
+}
+
+QString ParseNode::variableName() const
+{
+ return isVariable() ? m_string : QString();
+}
+
+QString ParseNode::arrayName() const
+{
+ return isArray() ? m_string : QString();
+}
+
+QString ParseNode::errorMessage() const
+{
+ return isValid() ? QString() : m_string;
+}
+
+
+ValueType ParseNode::commonType(const ParseNode& p) const
+{
+ if (type() == ValueKeyword || p.type() == ValueKeyword)
+ return ValueKeyword;
+ else if (type() == ValueString || p.type() == ValueString)
+ return ValueString;
+ else if (type() == ValueDouble || p.type() == ValueDouble)
+ return ValueDouble;
+ return ValueInt;
+}
+
+static int parsenode_compareDouble(const double A, const double B)
+{
+ return A<B ? -1 : (A==B ? 0 : 1);
+}
+
+int ParseNode::compare(const ParseNode& p) const
+{
+ switch (commonType(p))
+ {
+ case ValueString: return toString().compare(p.toString());
+ case ValueDouble: return parsenode_compareDouble(toDouble(), p.toDouble());
+ case ValueInt: return toInt() - p.toInt();
+ default: return 0;
+ }
+}
+
+bool ParseNode::operator==(int i) const
+{
+ return toInt() == i;
+}
+
+bool ParseNode::operator==(bool b) const
+{
+ return toBool() == b;
+}
+
+bool ParseNode::operator==(const QString& s) const
+{
+ return toString() == s;
+}
+
+bool ParseNode::operator==(const ParseNode& p) const
+{
+ return compare(p) == 0;
+}
+
+bool ParseNode::operator!=(const ParseNode& p) const
+{
+ return compare(p) != 0;
+}
+
+bool ParseNode::operator>=(const ParseNode& p) const
+{
+ return compare(p) >= 0;
+}
+
+bool ParseNode::operator<=(const ParseNode& p) const
+{
+ return compare(p) <= 0;
+}
+
+bool ParseNode::operator>(const ParseNode& p) const
+{
+ return compare(p) > 0;
+}
+
+bool ParseNode::operator<(const ParseNode& p) const
+{
+ return compare(p) < 0;
+}
+
+void ParseNode::setValue(int i)
+{
+ m_type = ValueInt;
+ m_int = i;
+}
+
+void ParseNode::setValue(double d)
+{
+ m_type = ValueDouble;
+ m_double = d;
+}
+
+void ParseNode::setValue(const QString& s)
+{
+ m_type = ValueString;
+ m_string = s;
+}
+
+void ParseNode::setVariable(const QString& name)
+{
+ m_type = ValueKeyword;
+ m_keyword = Variable;
+ m_string = name;
+}
+
+void ParseNode::setArray(const QString& name)
+{
+ m_type = ValueKeyword;
+ m_keyword = Array;
+ m_string = name;
+}
+
+bool ParseNode::isValue() const
+{
+ return m_type <= ValueValue;
+}
+
+void ParseNode::setContext(int c)
+{
+ m_context = c;
+}
+
+int ParseNode::context() const
+{
+ return m_context;
+}
+
diff --git a/kommander/widget/parsenode.h b/kommander/widget/parsenode.h
new file mode 100644
index 00000000..305b0998
--- /dev/null
+++ b/kommander/widget/parsenode.h
@@ -0,0 +1,129 @@
+/***************************************************************************
+ parsenode.cpp - Single parsed item
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 _HAVE_PARSENODE_H_
+#define _HAVE_PARSENODE_H_
+
+#include <qstring.h>
+
+namespace Parse
+{
+ enum Keyword {For, To, Step, End, While, Do, Foreach, In, If, Then, Else, Elseif, Endif, Switch, Case,
+ Break, Continue, Exit, Dot, Semicolon, Comma, Assign, Less, LessEqual, Greater, GreaterEqual, Equal, NotEqual,
+ Not, And, Or, False, True, LeftParenthesis, RightParenthesis, LeftBracket, DoubleBracket, RightBracket, LeftCurlyBrace, RightCurlyBrace, PlusEqual, MinusEqual, Increment, Decrement,
+ Plus, Minus, Multiply, Divide, Mod, LastRealKeyword = Mod, Variable, Invalid, Array, Matrix, ArrKeyVal};
+
+ enum KeywordGroup {GroupComparison, GroupAdd, GroupMultiply, GroupMisc};
+ enum ValueType {ValueString, ValueInt, ValueDouble, ValueValue = ValueDouble, ValueKeyword,
+ ValueNone, ValueError};
+
+ enum Mode{Execute, CheckOnly};
+
+ enum Flow{FlowStandard, FlowContinue, FlowBreak, FlowExit};
+}
+
+class ParseNode {
+public:
+ /* Default constructor */
+ ParseNode();
+ /* Create node from string */
+ ParseNode(const QString& s);
+ /* Create node from integer */
+ ParseNode(int i);
+ /* Create node from integer */
+ ParseNode(uint i);
+ /* Create node from double */
+ ParseNode(double d);
+ /* Create node from keyword */
+ ParseNode(Parse::Keyword k);
+ /* Create node from keyword and variable name */
+ ParseNode(Parse::Keyword k, const QString& s);
+ /* Create error node with optional error message */
+ static ParseNode error(const QString& s);
+
+ /* Return current type */
+ Parse::ValueType type() const;
+ /* Return current keyword if appropriate */
+ Parse::Keyword keyword() const;
+ /* Cast value to string */
+ QString toString() const;
+ /* Cast value to integer */
+ int toInt() const;
+ /* Cast value to double */
+ double toDouble() const;
+ /* Cast value to bool */
+ bool toBool() const;
+ /* Check if a value is valid */
+ bool isValid() const;
+ /* Check if current value is a keyword */
+ bool isKeyword() const;
+ /* Check if current value is a given keyword */
+ bool isKeyword(Parse::Keyword k) const;
+ /* Check if current value is a variable */
+ bool isVariable() const;
+ /* Check if current value is an Array */
+ bool isArray() const;
+ /* Return the name of variable */
+ QString variableName() const;
+ /* Return the name of array */
+ QString arrayName() const;
+ /* Return error message if applicable */
+ QString errorMessage() const;
+ /* Calculate common type for two nodes */
+ Parse::ValueType commonType(const ParseNode& p) const;
+ /* Find common type and compare values */
+ int compare(const ParseNode& p) const;
+ /* Various comparing functions */
+ bool operator==(int i) const;
+ bool operator==(bool b) const;
+ bool operator==(const QString& s) const;
+ bool operator==(const ParseNode& p) const;
+ bool operator!=(const ParseNode& p) const;
+ bool operator>=(const ParseNode& p) const;
+ bool operator<=(const ParseNode& p) const;
+ bool operator>(const ParseNode& p) const;
+ bool operator<(const ParseNode& p) const;
+ /* set value as integer */
+ void setValue(int i);
+ /* set value as double */
+ void setValue(double d);
+ /* set value as string */
+ void setValue(const QString& s);
+ /* set value as variable */
+ void setVariable(const QString& name);
+ /* set value as array */
+ void setArray(const QString& name);
+ /* check if it is correct value */
+ bool isValue() const;
+ /* for setting some context information, f. e. for bug reporting */
+ void setContext(int c);
+ /* get current context */
+ int context() const;
+
+private:
+ Parse::ValueType m_type;
+ union {
+ int m_int;
+ double m_double;
+ Parse::Keyword m_keyword;
+ };
+ QString m_string;
+ int m_context;
+};
+
+
+#endif
+
diff --git a/kommander/widget/parser.cpp b/kommander/widget/parser.cpp
new file mode 100644
index 00000000..9bc9637b
--- /dev/null
+++ b/kommander/widget/parser.cpp
@@ -0,0 +1,1243 @@
+/***************************************************************************
+ parser.cpp - Internal parser
+ -------------------
+ copyright : (C) 2004-2006 Michal Rudolf <mrudolf@kdewebdwev.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 <klocale.h>
+
+#include "parser.h"
+#include "parserdata.h"
+#include "kommanderwidget.h"
+
+using namespace Parse;
+
+QString unescape(QString s)
+{
+ return s.replace("\\\"", "\"").replace("\\t", "\t").replace("\\n", "\n").replace("\\\\", "\\");
+}
+
+Parser::Parser(ParserData* pData) : m_data(pData), m_start(0), m_error(QString::null), m_errorPosition(0),
+ m_widget(0)
+{
+}
+
+Parser::Parser(ParserData* pData, const QString& expr) : m_data(pData), m_start(0),
+ m_error(QString::null), m_errorPosition(0), m_widget(0)
+{
+ setString(expr);
+}
+
+bool Parser::setString(const QString& s)
+{
+ reset();
+ m_parts.clear();
+ uint lines = 0;
+ uint start = 0;
+ uint i = 0;
+ while (start < s.length())
+ {
+ if (s[start].isSpace() && s[start] != '\n')
+ start++;
+ else if (s[start] == '\\' && start < s.length() - 1 && s[start+1] == '\n')
+ start += 2;
+ else if (s[start] == ';')
+ {
+ insertNode(Semicolon, lines);
+ start++;
+ }
+ else if (s[start] == '\n')
+ {
+ if (m_parts.count() && !m_parts.last().isKeyword(Semicolon))
+ insertNode(Semicolon, lines);
+ lines++;
+ start++;
+ }
+ else if (s[start] == '\"') // quoted string: "abc"
+ {
+ bool escaped = false;
+ for (i = start + 1; i < s.length() && (s[i] != '\"' || s[i-1] == '\\'); i++)
+ if (!escaped)
+ escaped = s[i] == '\\';
+ if (escaped)
+ insertNode(unescape(s.mid(start + 1, i - start - 1)), lines);
+ else
+ insertNode(s.mid(start + 1, i - start - 1), lines);
+ start = i+1;
+ }
+ else if (s[start].isDigit()) // number: 1000 or 2.45
+ {
+ bool decimal = false;
+ for (i = start+1; s[i].isDigit() || (!decimal && s[i] == QChar('.')); i++)
+ if (s[i] == '.')
+ decimal = true;
+ if (decimal)
+ insertNode(s.mid(start, i - start).toDouble(), lines);
+ else
+ insertNode(s.mid(start, i - start).toInt(), lines);
+ start = i;
+ }
+ else if (s[start].isLetter() || s[start] == '_') // keyword
+ {
+ for (i = start+1; s[i].isLetterOrNumber() || s[i] == '_'; i++)
+ ;
+ QString name = s.mid(start, i - start);
+ insertNode(ParseNode(m_data->stringToKeyword(name), name), lines);
+ start = i;
+ } // comment
+ else if (s[start] == '#' || (s[start] == '/' && start < s.length() +1 && s[start+1] == '/'))
+ {
+ while (start < s.length() && s[start] != '\n')
+ start++;
+ } // enable /* */ block comments
+ else if (s[start] == '/' && start < s.length() +1 && s[start+1] == '*')
+ {
+ start += 2;
+ while (start < s.length() +1 && !(s[start] == '*' && s[start+1] == '/'))
+ {
+ start++;
+ }
+ start += 2;
+ } // special keyword: <>
+ else if (m_data->stringToKeyword(s.mid(start, 2)) <= LastRealKeyword)
+ {
+ insertNode(m_data->stringToKeyword(s.mid(start, 2)), lines);
+ start += 2;
+ } // special keyword: <
+ else if (m_data->stringToKeyword(s.mid(start, 1)) <= LastRealKeyword)
+ {
+ insertNode(m_data->stringToKeyword(s.mid(start, 1)), lines);
+ start++;
+ }
+ else // Bad character
+ {
+ insertNode(s.mid(start, 1), lines);
+ setError(i18n("Invalid character: '%1'").arg(s[start]), m_parts.count()-1);
+ return false;
+ }
+ }
+ return true;
+}
+
+void Parser::setWidget(KommanderWidget* w)
+{
+ m_widget = w;
+}
+
+void Parser::insertNode(ParseNode p, int line)
+{
+ p.setContext(line);
+ m_parts.append(p);
+}
+
+QString Parser::errorMessage() const
+{
+ return m_error;
+}
+
+QString Parser::function(ParserData* data, const QString& name, const QStringList& params)
+{
+ ParameterList par;
+ for (QStringList::ConstIterator Iter = params.begin(); Iter != params.end(); ++Iter)
+ par.append(*Iter);
+ Function f = data->function(name);
+ return f.execute(0, par).toString();
+}
+
+QString Parser::expression(Mode mode)
+{
+ reset();
+ ParseNode p = parseExpression(mode);
+ if (!isError())
+ return p.toString();
+ else
+ return QString();
+}
+
+bool Parser::isError() const
+{
+ return !m_error.isNull();
+}
+
+
+bool Parser::command(Mode mode)
+{
+ reset();
+ parseCommand(mode);
+ return !isError();
+}
+
+bool Parser::parse(Mode mode)
+{
+ reset();
+ parseBlock(mode);
+ return !isError();
+}
+
+int Parser::errorLine() const
+{
+ if (isError())
+ return m_parts[m_errorPosition].context();
+ else
+ return -1;
+}
+
+ParseNode Parser::parseConstant(Parse::Mode)
+{
+ ParseNode p = next();
+ m_start++;
+ if (!p.isValue())
+ {
+ setError(i18n("Constant value expected"));
+ return ParseNode();
+ }
+ return p;
+}
+//attempting to allow assign or copy of array, so far with no joy
+ParseNode Parser::parseValue(Mode mode)
+{
+ ParseNode p = next();
+ //QString p2 = QString(p.toString());
+ //qDebug("parseValue p2 = "+p2);
+ if (isFunction())
+ return parseFunction(mode);
+ else if (isWidget())
+ return parseWidget(mode);
+ else if (tryVariable(CheckOnly))
+ {
+ if (tryKeyword(LeftBracket, CheckOnly))
+ {
+ QString index = parseValue(mode).toString();
+ if (tryKeyword(DoubleBracket, CheckOnly))
+ {//2D array "matrix"
+ QString index2 = parseValue(mode).toString();
+ tryKeyword(RightBracket);
+ QString arr = p.variableName();
+ return matrixValue(arr, index, index2);
+ }
+ tryKeyword(RightBracket);
+ QString arr = p.variableName();
+ return arrayValue(arr, index);
+ }
+ else if (tryKeyword(Dot, CheckOnly))
+ {
+ QString value = variable(p.variableName()).toString();
+ if (m_widget && m_widget->isWidget(value))
+ {
+ m_start--;
+ return parseWidget(mode, value);
+ }else if (mode == Execute)
+ {
+ setError(i18n("'%1' (%2) is not a widget").arg(p.variableName()).arg(variable(p.variableName()).toString()));
+ return ParseNode();
+ } else
+ {
+ //this means it looks like a widget, but it is unknown. As we only check
+ //the syntax, we should ignore the error an parse as a widget.
+ m_start = m_start - 2;
+ return parseWidget(mode);
+ }
+ }
+ else if (tryKeyword(LeftParenthesis, CheckOnly))
+ {
+ setError(i18n("'%1' is not a function").arg(p.variableName()));
+ return ParseNode();
+ }
+ else
+ p = variable(p.variableName());
+ }
+ else if (tryKeyword(False, CheckOnly))
+ return ParseNode(0);
+ else if (tryKeyword(True, CheckOnly))
+ return ParseNode(1);
+/* else if (isArray(p2))
+ {
+ qDebug("returning array fpr p2");
+ return p2;
+ }*/
+ else if (p.isKeyword())
+ setError(i18n("Expected value"));
+ else // single value
+ m_start++;
+ return p;
+}
+
+ParseNode Parser::parseMultiply(Mode mode)
+{
+ ParseNode p = parseParenthesis(mode);
+ while (m_data->keywordGroup(next().keyword()) == GroupMultiply)
+ {
+ Keyword k = next().keyword();
+ m_start++;
+ ParseNode p2 = parseParenthesis(mode);
+ ValueType type = p.commonType(p2);
+ if (mode == Execute)
+ {
+ if (k == Multiply)
+ if (type == ValueInt)
+ p = p.toInt() * p2.toInt();
+ else
+ p = p.toDouble() * p2.toDouble();
+ else if (k == Divide)
+ {
+ if (p2.toDouble() == 0.0)
+ setError(i18n("Divide by zero"));
+ else
+ if (type == ValueInt)
+ p = p.toInt() / p2.toInt();
+ else
+ p = p.toDouble() / p2.toDouble();
+ }
+ else /* k == Mod */
+ {
+ if (p2.toInt() == 0)
+ setError(i18n("Divide by zero"));
+ else
+ p = p.toInt() - p.toInt() / p2.toInt() * p2.toInt();
+ }
+ }
+ }
+ return p;
+}
+
+ParseNode Parser::parseAdd(Mode mode)
+{
+ ParseNode p = parseMultiply(mode);
+ while (m_data->keywordGroup(next().keyword()) == GroupAdd)
+ {
+ Keyword k = next().keyword();
+ m_start++;
+ ParseNode p2 = parseMultiply(mode);
+ ValueType type = p.commonType(p2);
+ if (mode == Execute)
+ {
+ if (k == Plus)
+ if (type == ValueString)
+ p = QString(p.toString() + p2.toString());
+ else if (type == ValueDouble)
+ p = p.toDouble() + p2.toDouble();
+ else
+ p = p.toInt() + p2.toInt();
+ else /* k == Minus */
+ if (type == ValueDouble)
+ p = p.toDouble() - p2.toDouble();
+ else
+ p = p.toInt() - p2.toInt();
+ }
+ }
+ return p;
+}
+
+ParseNode Parser::parseSignedNumber(Mode mode)
+{
+ if (tryKeyword(Minus, CheckOnly))
+ {
+ ParseNode p = parseValue(mode);
+ if (p.type() == ValueDouble)
+ return ParseNode(-p.toDouble());
+ else
+ return ParseNode(-p.toInt());
+ }
+ else
+ return parseValue(mode);
+}
+
+ParseNode Parser::parseComparison(Mode mode)
+{
+ ParseNode p1 = parseAdd(mode);
+ if (m_data->keywordGroup(next().keyword()) == GroupComparison)
+ {
+ Keyword k = next().keyword();
+ m_start++;
+ ParseNode p2 = parseAdd(mode);
+ switch (k) {
+ case Less: return ParseNode(p1 < p2);
+ case LessEqual: return ParseNode(p1 <= p2);
+ case Equal: return ParseNode(p1 == p2);
+ case NotEqual: return ParseNode(p1 != p2);
+ case GreaterEqual: return ParseNode(p1 >= p2);
+ case Greater: return ParseNode(p1 > p2);
+ default: ;
+ }
+ }
+ return p1;
+}
+
+ParseNode Parser::parseParenthesis(Mode mode)
+{
+ if (tryKeyword(LeftParenthesis, CheckOnly))
+ {
+ ParseNode p = parseExpression(mode);
+ tryKeyword(RightParenthesis);
+ return p;
+ }
+ else
+ return parseSignedNumber(mode);
+}
+
+
+ParseNode Parser::parseNot(Mode mode)
+{
+ if (tryKeyword(Not, CheckOnly))
+ return !parseComparison(mode).toBool();
+ else
+ return parseComparison(mode);
+}
+
+ParseNode Parser::parseAnd(Mode mode)
+{
+ ParseNode p = parseNot(mode);
+ while (tryKeyword(And, CheckOnly))
+ {
+ if (p == false)
+ parseNot(CheckOnly);
+ else
+ p = parseNot(mode);
+ }
+ return p;
+}
+
+ParseNode Parser::parseOr(Mode mode)
+{
+ ParseNode p = parseAnd(mode);
+ while (tryKeyword(Or, CheckOnly))
+ {
+ if (p == true)
+ parseAnd(CheckOnly);
+ else
+ p = parseAnd(mode);
+ }
+ return p;
+}
+
+ParseNode Parser::parseCondition(Mode mode)
+{
+ return parseOr(mode);
+}
+
+ParseNode Parser::parseExpression(Mode mode)
+{
+ return parseOr(mode);
+}
+
+ParseNode Parser::parseFunction(Mode mode)
+{
+ int pos = m_start;
+ QString name = next().variableName();
+ //qDebug("Parsing function: "+name);
+ Function f = m_data->function(name);
+ m_start++;
+ ParameterList params;
+
+ if (tryKeyword(LeftParenthesis, CheckOnly) && !tryKeyword(RightParenthesis, CheckOnly))
+ {
+ do {
+ params.append(parseExpression(mode));
+ } while (tryKeyword(Comma, CheckOnly));
+ tryKeyword(RightParenthesis);
+ }
+ if (f.minArgs() > params.count())
+ setError(i18n("in function '%1': %2").arg(name).arg(i18n("too few parameters")), pos);
+ else if (f.maxArgs() < params.count())
+ setError(i18n("in function '%1': %2").arg(name).arg(i18n("too many parameters")), pos);
+ else if (mode == Execute)
+ {
+ ParseNode p = f.execute(this, params);
+ if (!p.isValid())
+ {
+ setError(i18n("in function '%1': %2").arg(name).arg(p.errorMessage()), pos);
+ return ParseNode();
+ }
+ else
+ return p;
+ }
+ return ParseNode();
+}
+
+ParseNode Parser::parseWidget(Mode mode, const QString &widgetName)
+{
+ int pos = m_start;
+ QString widget;
+ if (widgetName.isNull())
+ widget = nextVariable(mode);
+ else
+ widget = widgetName;
+ Function f = m_data->function("internalDcop");
+
+ if (!tryKeyword(Dot))
+ return ParseNode();
+ QString var = nextVariable();
+ if (var.isNull())
+ return ParseNode();
+ ParameterList params;
+ params.append(var);
+ params.append(widget);
+
+ if (tryKeyword(LeftParenthesis, CheckOnly) && !tryKeyword(RightParenthesis, CheckOnly))
+ {
+ do {
+ params.append(parseExpression(mode));
+ } while (tryKeyword(Comma, CheckOnly));
+ tryKeyword(RightParenthesis);
+ }
+ if (mode == Execute)
+ {
+ ParseNode p = f.execute(this, params);
+ if (!p.isValid())
+ {
+ setError(i18n("in widget function '%1.%2': %3").arg(widget).arg(var).arg(p.errorMessage()), pos);
+ return ParseNode();
+ }
+ else
+ return p;
+ }
+ return ParseNode();
+}
+
+
+ParseNode Parser::parseAssignment(Mode mode)
+{
+ QString var = nextVariable();
+ //qDebug("var = "+var+" Pos:"+QString::number(m_start));
+ if (tryKeyword(LeftBracket, CheckOnly))
+ {
+ QString index = parseValue(mode).toString();
+ if (tryKeyword(DoubleBracket, CheckOnly))
+ {//2D array "matrix"
+ ParseNode p1 = next(); //move along...
+ QString index2 = parseValue(mode).toString();
+ tryKeyword(RightBracket);
+ p1 = next();
+ ParseNode p2 = matrixValue(var, index, index2);
+ if (p1.isKeyword(PlusEqual))
+ {
+ tryKeyword(PlusEqual);
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ if (p2.type() == ValueString)
+ p = QString(p2.toString() + p.toString());
+ else if (p2.type() == ValueDouble)
+ p = p2.toDouble() + p.toDouble();
+ else
+ p = p2.toInt() + p.toInt();
+ setMatrix(var, index, index2, p);
+ }
+ }
+ else if (p1.isKeyword(MinusEqual))
+ {
+ tryKeyword(MinusEqual);
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ if (p2.type() == ValueDouble)
+ p = p2.toDouble() - p.toDouble();
+ else
+ p = p2.toInt() - p.toInt();
+ setMatrix(var, index, index2, p);
+ }
+ }
+ else if (p1.isKeyword(Increment))
+ {
+ tryKeyword(Increment);
+ if (mode == Execute)
+ {
+ p2 = p2.toInt() + 1;
+ setMatrix(var, index, index2, p2);
+ }
+ }
+ else if (p1.isKeyword(Decrement))
+ {
+ tryKeyword(Decrement);
+ if (mode == Execute)
+ {
+ p2 = p2.toInt() - 1;
+ setMatrix(var, index, index2, p2);
+ }
+ }
+ else
+ {
+ tryKeyword(Assign);
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ setMatrix(var, index, index2, p);
+ }
+ }
+ else
+ {
+ tryKeyword(RightBracket);
+ ParseNode p1 = next();
+ // seems awkward and pedantic but array values are now handled like variables
+ // for special assign with oparator
+ ParseNode p2 = arrayValue(var, index);
+ if (p1.isKeyword(PlusEqual))
+ {
+ tryKeyword(PlusEqual);
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ if (p2.type() == ValueString)
+ p = QString(p2.toString() + p.toString());
+ else if (p2.type() == ValueDouble)
+ p = p2.toDouble() + p.toDouble();
+ else
+ p = p2.toInt() + p.toInt();
+ setArray(var, index, p);
+ }
+ }
+ else if (p1.isKeyword(MinusEqual))
+ {
+ tryKeyword(MinusEqual);
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ if (p2.type() == ValueDouble)
+ p = p2.toDouble() - p.toDouble();
+ else
+ p = p2.toInt() - p.toInt();
+ setArray(var, index, p);
+ }
+ }
+ else if (p1.isKeyword(Increment))
+ {
+ tryKeyword(Increment);
+ if (mode == Execute)
+ {
+ p2 = p2.toInt() + 1;
+ setArray(var, index, p2);
+ }
+ }
+ else if (p1.isKeyword(Decrement))
+ {
+ tryKeyword(Decrement);
+ if (mode == Execute)
+ {
+ p2 = p2.toInt() - 1;
+ setArray(var, index, p2);
+ }
+ }
+ else
+ {
+ tryKeyword(Assign);
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ setArray(var, index, p);
+ }
+ }
+ }
+ else if (tryKeyword(Assign, CheckOnly))
+ {
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ setVariable(var, p);
+ }
+ }
+ else if (tryKeyword(PlusEqual, CheckOnly))
+ {
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ ParseNode p2 = variable(var);
+ if (p2.type() == ValueString)
+ p = QString(p2.toString() + p.toString());
+ else if (p2.type() == ValueDouble)
+ p = p2.toDouble() + p.toDouble();
+ else
+ p = p2.toInt() + p.toInt();
+ setVariable(var, p);
+ }
+ }
+ else if (tryKeyword(MinusEqual, CheckOnly))
+ {
+ ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ ParseNode p2 = variable(var);
+ if (p2.type() == ValueDouble)
+ p = p2.toDouble() - p.toDouble();
+ else
+ p = p2.toInt() - p.toInt();
+ setVariable(var, p);
+ }
+ }
+ else if (tryKeyword(Increment, CheckOnly))
+ {
+ //ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ ParseNode p = variable(var);
+ p = p.toInt() + 1;
+ setVariable(var, p);
+ }
+ }
+ else if (tryKeyword(Decrement, CheckOnly))
+ {
+ //ParseNode p = parseExpression(mode);
+ if (mode == Execute)
+ {
+ ParseNode p = variable(var);
+ p = p.toInt() - 1;
+ setVariable(var, p);
+ }
+ }
+ else if (tryKeyword(Dot, CheckOnly))
+ {
+ QString value = variable(var).toString();
+ if (m_widget && m_widget->isWidget(value))
+ {
+ m_start--;
+ return parseWidget(mode, value);
+ } else
+ if (mode == CheckOnly)
+ {
+ //this means it looks like a widget, but it is unknown. As we only check
+ //the syntax, we should ignore the error an parse as a widget.
+ m_start = m_start - 2;
+ return parseWidget(mode);
+ } else
+ setError(i18n("'%1' is not a widget").arg(var));
+ }
+ else if (tryKeyword(LeftParenthesis, CheckOnly))
+ setError(i18n("'%1' is not a function").arg(var));
+ else
+ setError(i18n("Unexpected symbol after variable '%1'").arg(var));
+
+ return ParseNode();
+}
+
+Flow Parser::parseIf(Mode mode)
+{
+ ParseNode p = next();
+ Flow flow = FlowStandard;
+ bool matched = false;
+ bool thenFound = false;
+ do {
+ m_start++;
+ Mode m = matched ? CheckOnly : mode;
+ p = parseCondition(m);
+ thenFound = tryKeyword(Then, CheckOnly);
+ if (!thenFound)
+ tryKeyword(LeftCurlyBrace);
+ bool condition = !matched && p.toBool();
+ if (condition)
+ {
+ flow = parseBlock(mode);
+ if (flow == FlowExit)
+ return flow;
+ }
+ else
+ parseBlock(CheckOnly);
+ matched = matched || p.toBool();
+ if (!thenFound)
+ tryKeyword(RightCurlyBrace);
+ } while (nextElseIf() == true);
+ bool braceFound = false;
+ if (tryKeyword(Else, CheckOnly))
+ {
+ braceFound = tryKeyword(LeftCurlyBrace, CheckOnly);
+ if (!matched)
+ flow = parseBlock(mode);
+ else
+ parseBlock(CheckOnly);
+ }
+ if (braceFound)
+ tryKeyword(RightCurlyBrace);
+ if (thenFound)
+ tryKeyword(Endif);
+ return flow;
+}
+
+bool Parser::nextElseIf()
+{
+ ParseNode p1 = next();
+ if (p1.isKeyword(Elseif))
+ return true;
+ else
+ {
+ ParseNode p2 = next();
+ if (p1.isKeyword(Else) && p2.isKeyword(If) )
+ return true;
+ }
+ return false;
+}
+
+Parse::Flow Parser::parseWhile(Mode mode)
+{
+ m_start++;
+ int start = m_start;
+ bool running = true;
+ Parse::Flow flow = FlowStandard;
+ bool doFound = false;
+ while (running)
+ {
+ m_start = start;
+ ParseNode p = parseCondition(mode);
+ doFound = tryKeyword(Do, CheckOnly);
+ if (!doFound && !tryKeyword(LeftCurlyBrace))
+ break;
+ running = p.toBool();
+ flow = parseBlock(running ? mode : CheckOnly);
+ if ( flow == FlowBreak || flow == FlowExit)
+ break;
+ }
+ if (flow != FlowExit)
+ {
+ if (doFound)
+ tryKeyword(End);
+ else
+ tryKeyword(RightCurlyBrace);
+ return FlowStandard;
+ }
+ else
+ return FlowExit;
+}
+
+Parse::Flow Parser::parseFor(Mode mode)
+{
+ m_start++;
+ QString var = nextVariable();
+ tryKeyword(Assign);
+ int start = parseExpression(mode).toInt();
+ tryKeyword(To);
+ int end = parseExpression(mode).toInt();
+ int step = 1;
+ if (tryKeyword(Step, CheckOnly))
+ step = parseExpression(mode).toInt();
+
+ bool doFound = tryKeyword(Do, CheckOnly);
+ if (!doFound)
+ tryKeyword(LeftCurlyBrace);
+ int block = m_start;
+ Parse::Flow flow = FlowStandard;
+ if (end >= start && step > 0)
+ {
+ for (int i = start; i <= end; i+=step)
+ {
+ m_start = block;
+ setVariable(var, ParseNode(i));
+ flow = parseBlock(mode);
+ if (flow == FlowBreak || flow == FlowExit)
+ break;
+ }
+ } else if (end <= start && step < 0)
+ {
+ for (int i = start; i >= end; i+=step)
+ {
+ m_start = block;
+ setVariable(var, ParseNode(i));
+ flow = parseBlock(mode);
+ if (flow == FlowBreak || flow == FlowExit)
+ break;
+ }
+ } else
+ parseBlock(Parse::CheckOnly);
+ if (flow != FlowExit)
+ {
+ if (doFound)
+ tryKeyword(End);
+ else
+ tryKeyword(RightCurlyBrace);
+ return FlowStandard;
+ }
+ else
+ return FlowExit;
+}
+
+Parse::Flow Parser::parseForeach(Mode mode)
+{
+ m_start++;
+ QString var = nextVariable();
+ QString var2 = "";
+ bool matrixfound = tryKeyword(ArrKeyVal, CheckOnly);
+ if (matrixfound == true)
+ {
+ m_start--;
+ tryKeyword(ArrKeyVal);
+ var2 = nextVariable();
+ }
+ tryKeyword(In);
+ QString arr = nextVariable();
+ bool doFound = tryKeyword(Do, CheckOnly);
+ if (!doFound)
+ tryKeyword(LeftCurlyBrace);
+ int start = m_start;
+ Parse::Flow flow = FlowStandard;
+ if (isArray(arr) && array(arr).count() && !matrixfound)
+ {
+ const QMap<QString, ParseNode> A = array(arr);
+ for (QMapConstIterator<QString, ParseNode> It = A.begin(); It != A.end(); ++It)
+ {
+ m_start = start;
+ setVariable(var, It.key());
+ flow = parseBlock(mode);
+ if (flow == FlowBreak || flow == FlowExit)
+ break;
+ }
+ }
+ else if (isMatrix(arr) && matrix(arr).count() )
+ {
+ const QMap<QString, QMap<QString, ParseNode> > A = matrix(arr);
+ for (QMapConstIterator<QString, QMap<QString, ParseNode> > It = A.begin(); It != A.end(); ++It)
+ {
+ m_start = start;
+ setVariable(var, It.key());
+ if (matrixfound == true)
+ {
+ const QMap<QString, ParseNode> B = It.data();
+ for (QMapConstIterator<QString, ParseNode> It2 = B.begin(); It2 != B.end(); ++It2 )
+ {
+ m_start = start;
+ setVariable(var2, It2.key());
+ flow = parseBlock(mode);
+ if (flow == FlowBreak || flow == FlowExit)
+ break;
+ }
+ }
+ else
+ {
+ flow = parseBlock(mode);
+ if (flow == FlowBreak || flow == FlowExit)
+ break;
+ }
+ }
+ }
+ else
+ parseBlock(CheckOnly);
+ if (flow != FlowExit)
+ {
+ if (doFound)
+ tryKeyword(End);
+ else
+ tryKeyword(RightCurlyBrace);
+ return FlowStandard;
+ }
+ else
+ return FlowExit;
+}
+
+void Parser::parseSwitch(Mode mode)
+{
+ m_start++;
+ QString var = nextVariable();
+ ParseNode caseValue = variable(var);
+ bool executed = false;
+ bool braceFound = false;
+ braceFound = tryKeyword(LeftCurlyBrace, CheckOnly);
+ tryKeyword(Semicolon, CheckOnly);
+ while (tryKeyword(Case, CheckOnly))
+ {
+ ParseNode p = parseConstant();
+ bool matched = mode == Execute && p == caseValue;
+ parseBlock(matched ? Execute : CheckOnly);
+ if (matched)
+ executed = true;
+ }
+ if (tryKeyword(Else, CheckOnly))
+ parseBlock(executed ? CheckOnly : mode);
+ if (!braceFound)
+ tryKeyword(End);
+ else
+ tryKeyword(RightCurlyBrace);
+}
+
+Flow Parser::parseCommand(Mode mode)
+{
+ ParseNode p = next();
+ QString p2 = p.toString();
+ //qDebug("Parsing command: "+p2);
+ if (next().isKeyword(If))
+ return parseIf(mode);
+ else if (next().isKeyword(While))
+ return parseWhile(mode);
+ else if (next().isKeyword(For))
+ return parseFor(mode);
+ else if (next().isKeyword(Foreach))
+ return parseForeach(mode);
+ else if (next().isKeyword(Switch))
+ parseSwitch(mode);
+ else if (tryKeyword(Continue, CheckOnly))
+ return FlowContinue;
+ else if (tryKeyword(Break, CheckOnly))
+ return FlowBreak;
+ else if (isFunction())
+ {
+ QString name = next().variableName();
+ parseFunction(mode);
+ if (name == "return" && mode == Execute)
+ return FlowExit;
+ }
+ else if (isWidget())
+ parseWidget(mode);
+ else if (next().isVariable())
+ parseAssignment(mode);
+ else if (tryKeyword(Exit, CheckOnly))
+ {
+ if (mode == Execute)
+ return FlowExit;
+ }
+ return FlowStandard;
+}
+
+Flow Parser::parseBlock(Mode mode)
+{
+ Flow flow = parseCommand(mode);
+ while (tryKeyword(Semicolon, CheckOnly) && flow != FlowExit)
+ {
+ if (flow == FlowStandard)
+ flow = parseCommand(mode);
+ else
+ parseCommand(CheckOnly);
+ }
+ return flow;
+}
+
+
+
+
+ParseNode Parser::next() const
+{
+ if (isError() || m_start >= m_parts.count())
+ return ParseNode();
+ return m_parts[m_start];
+}
+
+bool Parser::tryKeyword(Keyword k, Mode mode)
+{
+ if (next().isKeyword(k))
+ {
+ m_start++;
+ return true;
+ }
+ if (mode == Execute)
+ {
+ if (k == Dot)
+ setError(i18n("Expected '%1'<br><br>Possible cause of the error is having a variable with the same name as a widget").arg(m_data->keywordToString(k)));
+ else
+ setError(i18n("Expected '%1' got '%2'.").arg(m_data->keywordToString(k)).arg(next().toString()));
+ }
+ return false;
+}
+
+bool Parser::tryVariable(Mode mode)
+{
+ if (next().isVariable())
+ {
+ QString name = next().variableName();
+ m_start++;
+ return true;
+ }
+ if (mode == Execute)
+ setError(i18n("Expected variable"));
+ return false;
+}
+
+QString Parser::nextVariable(Mode mode)
+{
+ if (next().isVariable())
+ {
+ QString name = next().variableName();
+ m_start++;
+ return name;
+ }
+ else if (mode == Execute)
+ setError(i18n("Expected variable"));
+ return QString();
+}
+
+
+bool Parser::isFunction() const
+{
+ return next().isVariable() && m_data->isFunction(next().variableName());
+}
+
+bool Parser::isWidget() const
+{
+ return m_widget && next().isVariable() && m_widget->isWidget(next().variableName());
+}
+
+void Parser::reset()
+{
+ m_start = 0;
+ m_error = QString::null;
+ m_errorPosition = 0;
+}
+
+void Parser::setError(const QString& msg)
+{
+ setError(msg, m_start);
+}
+
+void Parser::setError(const QString& msg, int pos)
+{
+ if (m_error.isNull())
+ {
+ m_errorPosition = pos;
+ m_error = msg;
+ }
+}
+
+void Parser::setVariable(const QString& name, ParseNode value)
+{
+ if (isGlobal(name))
+ m_globalVariables[name] = value;
+ else
+ m_variables[name] = value;
+}
+
+ParseNode Parser::variable(const QString& name) const
+{
+ if (isGlobal(name))
+ return m_globalVariables.contains(name) ? m_globalVariables[name] : ParseNode();
+ else
+ return m_variables.contains(name) ? m_variables[name] : ParseNode();
+}
+
+bool Parser::isGlobal(const QString& name) const
+{
+ return !name.isEmpty() && name[0] == '_';
+}
+
+bool Parser::isVariable(const QString& name) const
+{
+ return m_variables.contains(name) || m_globalVariables.contains(name);
+}
+
+void Parser::unsetVariable(const QString& key)
+{
+ if (isGlobal(key))
+ m_globalVariables.remove(key);
+ else
+ m_variables.remove(key);
+}
+
+const QMap<QString, ParseNode>& Parser::array(const QString& name) const
+{
+ if (isGlobal(name))
+ return m_globalArrays[name];
+ else
+ return m_arrays[name];
+}
+
+bool Parser::isArray(const QString& name) const
+{
+ return m_arrays.contains(name) || m_globalArrays.contains(name);
+}
+
+void Parser::setArray(const QString& name, const QString& key, ParseNode value)
+{
+ if (isGlobal(name))
+ m_globalArrays[name][key] = value;
+ else
+ m_arrays[name][key] = value;
+}
+
+void Parser::unsetArray(const QString& name, const QString& key)
+{
+ if (isGlobal(name))
+ {
+ if (key.isNull())
+ m_globalArrays.remove(name);
+ else if (isArray(name))
+ m_globalArrays[name].remove(key);
+ }
+ else
+ {
+ if (key.isNull())
+ m_arrays.remove(name);
+ else if (isArray(name))
+ m_arrays[name].remove(key);
+ }
+}
+
+ParseNode Parser::arrayValue(const QString& name, const QString& key) const
+{
+ if (!isArray(name))
+ return ParseNode();
+ if (isGlobal(name))
+ return m_globalArrays[name].contains(key) ? m_globalArrays[name][key] : ParseNode();
+ else
+ return m_arrays[name].contains(key) ? m_arrays[name][key] : ParseNode();
+}
+
+// 2D arrays "Matrix"
+const QMap<QString, QMap<QString, ParseNode> >& Parser::matrix(const QString& name) const
+{
+ if (isGlobal(name))
+ return m_globalMatrices[name];
+ else
+ return m_matrices[name];
+}
+
+bool Parser::isMatrix(const QString& name) const
+{
+ return m_matrices.contains(name) || m_globalMatrices.contains(name);
+}
+
+void Parser::setMatrix(const QString& name, const QString& keyr, const QString& keyc, ParseNode value)
+{
+ if (isGlobal(name))
+ m_globalMatrices[name][keyr][keyc] = value;
+ else
+ m_matrices[name][keyr][keyc] = value;
+}
+
+void Parser::unsetMatrix(const QString& name, const QString& keyr, const QString& keyc)
+{
+ if (isGlobal(name))
+ {
+ if (keyr.isNull())
+ m_globalMatrices.remove(name);
+ else if (isMatrix(name))
+ {
+ if (keyc.isNull())
+ m_globalMatrices[name].remove(keyr);
+ else
+ m_globalMatrices[name][keyr].remove(keyc);
+ }
+ }
+ else
+ {
+ if (keyr.isNull())
+ m_matrices.remove(name);
+ else if (isMatrix(name))
+ {
+ if (keyc.isNull())
+ m_matrices[name].remove(keyr);
+ else
+ m_matrices[name][keyr].remove(keyc);
+ }
+ }
+}
+
+ParseNode Parser::matrixValue(const QString& name, const QString& keyr, const QString& keyc) const
+{
+ if (!isMatrix(name))
+ return ParseNode();
+ if (isGlobal(name))
+ return m_globalMatrices[name].contains(keyr) && m_globalMatrices[name][keyr].contains(keyc) ? m_globalMatrices[name][keyr][keyc] : ParseNode();
+ else
+ return m_matrices[name].contains(keyr) && m_matrices[name][keyr].contains(keyc) ? m_matrices[name][keyr][keyc] : ParseNode();
+}
+
+
+
+KommanderWidget* Parser::currentWidget() const
+{
+ return m_widget;
+}
+
+QMap<QString, ParseNode> Parser::m_globalVariables;
+QMap<QString, QMap<QString, ParseNode> > Parser::m_globalArrays;
+QMap<QString, QMap<QString, QMap<QString, ParseNode> > > Parser::m_globalMatrices;
+
diff --git a/kommander/widget/parser.h b/kommander/widget/parser.h
new file mode 100644
index 00000000..cc7c6010
--- /dev/null
+++ b/kommander/widget/parser.h
@@ -0,0 +1,197 @@
+/***************************************************************************
+ parser.h - Internal parser
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 _HAVE_PARSER_H_
+#define _HAVE_PARSER_H_
+
+#include "kommander_export.h"
+#include "parsenode.h"
+
+#include <qvaluevector.h>
+#include <qstringlist.h>
+#include <qmap.h>
+
+class KommanderWidget;
+class ParserData;
+
+class Parser
+{
+public:
+ Parser(ParserData* data);
+ Parser(ParserData* data, const QString& expr);
+ // set string to parse
+ bool setString(const QString& s);
+ // set Kommander widget associated with parser
+ void setWidget(KommanderWidget* w);
+
+ // parse generic expression
+ QString expression(Parse::Mode mode = Parse::Execute);
+ // execute single command; return true if ok
+ bool command(Parse::Mode mode = Parse::Execute);
+ // special class method to execute single parser function without creating parser object
+ static QString function(ParserData* data, const QString& name, const QStringList& params);
+ // execute whole block; return true if ok
+ bool parse(Parse::Mode mode = Parse::Execute);
+ // return line of errorneous node
+ int errorLine() const;
+ // return error message
+ QString errorMessage() const;
+
+ // check if this is a name of standard variable
+ bool isVariable(const QString& name) const;
+ // set variable value
+ void setVariable(const QString& name, ParseNode value);
+ // unset variable
+ void unsetVariable(const QString& key);
+ // get variable value
+ ParseNode variable(const QString& name) const;
+ // access associative array
+ const QMap<QString, ParseNode>& array(const QString& name) const;
+ // check if this is a name of an array
+ bool isArray(const QString& name) const;
+ // set array key
+ void setArray(const QString& name, const QString& key, ParseNode value);
+ // unset array key or whole array
+ void unsetArray(const QString& name, const QString& key = QString::null);
+ // array value
+ ParseNode arrayValue(const QString& name, const QString& key) const;
+ // access 2D array
+ const QMap<QString, QMap<QString, ParseNode> >& matrix(const QString& name) const;
+ // check if this is name of a 2D array
+ bool isMatrix(const QString& name) const;
+ // set array key
+ void setMatrix(const QString& name, const QString& keyr, const QString& keyc, ParseNode value);
+ // unset array key or whole array
+ void unsetMatrix(const QString& name, const QString& keyr = QString::null, const QString& keyc = QString::null);
+ // array value
+ ParseNode matrixValue(const QString& name, const QString& keyr, const QString& keyc) const;
+ // get associated widget
+ KommanderWidget* currentWidget() const;
+
+private:
+ // parsing function - top-down approach
+
+ // parse const
+ ParseNode parseConstant(Parse::Mode mode = Parse::Execute);
+ // parse value (literal or variable)
+ ParseNode parseValue(Parse::Mode mode = Parse::Execute);
+ // parse multiplication, division and mod (x*y, x/y, x%y)
+ ParseNode parseMultiply(Parse::Mode mode = Parse::Execute);
+ // parse sum (x+y, x-y)
+ ParseNode parseAdd(Parse::Mode mode = Parse::Execute);
+ // parse signed numeric (+x, -x)
+ ParseNode parseSignedNumber(Parse::Mode mode = Parse::Execute);
+
+ /*
+ // parse string expression
+ ParseNode parseStringValue(Parse::Mode mode = Parse::Execute);
+ // parse string concatenation (x+y)
+ ParseNode parseConcatenation(Parse::Mode mode = Parse::Execute);
+ */
+
+ // parse comparisons (x==y, x<y, x>y, x!=y, x<>y, x<=y, x>=y
+ ParseNode parseComparison(Parse::Mode mode = Parse::Execute);
+ // parse boolean not (!x, not x)
+ ParseNode parseNot(Parse::Mode mode = Parse::Execute);
+ // parse boolean and (x&&y, x and y)
+ ParseNode parseAnd(Parse::Mode mode = Parse::Execute);
+ // parse boolean or (x||y, x or y)
+ ParseNode parseOr(Parse::Mode mode = Parse::Execute);
+ // parse generic condition
+ ParseNode parseCondition(Parse::Mode mode = Parse::Execute);
+
+ // parse (x) expression
+ ParseNode parseParenthesis(Parse::Mode mode = Parse::Execute);
+ // parse generic expression
+ ParseNode parseExpression(Parse::Mode mode = Parse::Execute);
+ // parse parameters
+ ParseNode parseFunction(Parse::Mode mode = Parse::Execute);
+ // parse widget function
+ ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const QString &widgetName = QString::null);
+
+ // parse assignment
+ ParseNode parseAssignment(Parse::Mode mode = Parse::Execute);
+ // parse conditional
+ Parse::Flow parseIf(Parse::Mode mode = Parse::Execute);
+ // parse assignment
+ Parse::Flow parseCommand(Parse::Mode mode = Parse::Execute);
+ // parse while loop
+ Parse::Flow parseWhile(Parse::Mode mode = Parse::Execute);
+ // parse for loop
+ Parse::Flow parseFor(Parse::Mode mode = Parse::Execute);
+ // parse foreach loop
+ Parse::Flow parseForeach(Parse::Mode mode = Parse::Execute);
+ // parse switch block
+ void parseSwitch(Parse::Mode mode = Parse::Execute);
+ // parse whole block
+ Parse::Flow parseBlock(Parse::Mode mode = Parse::Execute);
+
+ // insert next node
+ void insertNode(ParseNode p, int line);
+ // next item to be parsed
+ ParseNode next() const;
+ // next is Else or Else && If?
+ bool nextElseIf();
+ // check if next item is keyword k, if so - go further, if no, set error
+ bool tryKeyword(Parse::Keyword k, Parse::Mode mode = Parse::Execute);
+ // check if next item is a variable, if so, return its name
+ bool tryVariable(Parse::Mode mode = Parse::Execute);
+
+ // get the name of the next node treated as variable
+ QString nextVariable(Parse::Mode mode = Parse::Execute);
+ // check whether variable/array name is global (preceded with _)
+ bool isGlobal(const QString& name) const;
+ // check if next item is a function
+ bool isFunction() const;
+ // check if next item is a widget
+ bool isWidget() const;
+
+ // reset to default state
+ void reset();
+ // set error state if no error was set before; err is expected symbol that wasn't found
+ void setError(const QString& msg);
+ void setError(const QString& msg, int pos);
+ // check whether parsing was successful
+ bool isError() const;
+
+ // parsing data
+ ParserData* m_data;
+ // current parsing position
+ uint m_start;
+ // current error message
+ QString m_error;
+ // in case of error, this keeps position of first error
+ uint m_errorPosition;
+ // parsing nodes
+ QValueVector<ParseNode> m_parts;
+ // variables
+ QMap<QString, ParseNode> m_variables;
+ // arrays
+ QMap<QString, QMap<QString, ParseNode> > m_arrays;
+ // 2D arrays
+ QMap<QString, QMap<QString, QMap<QString, ParseNode> > > m_matrices;
+ // Kommander
+ KommanderWidget* m_widget;
+ // global variables
+ static QMap<QString, ParseNode> m_globalVariables;
+ // global arrays
+ static QMap<QString, QMap<QString, ParseNode> > m_globalArrays;
+ // global 2D arrays
+ static QMap<QString, QMap<QString, QMap<QString, ParseNode> > > m_globalMatrices;
+};
+
+#endif
+
diff --git a/kommander/widget/parserdata.cpp b/kommander/widget/parserdata.cpp
new file mode 100644
index 00000000..778be3d6
--- /dev/null
+++ b/kommander/widget/parserdata.cpp
@@ -0,0 +1,134 @@
+/***************************************************************************
+ parserdata.cpp - Parser data: keywords, functions etc.
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 "parserdata.h"
+using namespace Parse;
+
+KeywordGroup ParserData::keywordGroup(Keyword k) const
+{
+ if (m_groups.contains(k))
+ return m_groups[k];
+ else
+ return GroupMisc;
+}
+
+Keyword ParserData::stringToKeyword(const QString& s) const
+{
+ QString k = s.lower();
+ if (m_keywords.contains(k))
+ return m_keywords[k];
+ else
+ return Variable;
+}
+
+QString ParserData::keywordToString(Parse::Keyword k) const
+{
+ for (QMapConstIterator<QString, Keyword> it = m_keywords.begin(); it != m_keywords.end(); ++it)
+ if (it.data() == k)
+ return it.key();
+ return QString();
+}
+
+bool ParserData::registerFunction(const QString& name, Function f)
+{
+ m_functions[name.lower()] = f;
+ return true;
+}
+
+ParserData::ParserData()
+{
+ m_keywords["for"] = For;
+ m_keywords["foreach"] = Foreach;
+ m_keywords["in"] = In;
+ m_keywords["end"] = End;
+ m_keywords["if"] = If;
+ m_keywords["then"] = Then;
+ m_keywords["else"] = Else;
+ m_keywords["elseif"] = Elseif;
+ m_keywords["endif"] = Endif;
+ m_keywords["{"] = LeftCurlyBrace;
+ m_keywords["}"] = RightCurlyBrace;
+ m_keywords["switch"] = Switch;
+ m_keywords["case"] = Case;
+ m_keywords["while"] = While;
+ m_keywords["to"] = To;
+ m_keywords["step"] = Step;
+ m_keywords["do"] = Do;
+ m_keywords["break"] = Break;
+ m_keywords["continue"] = Continue;
+ m_keywords["exit"] = Exit;
+ m_keywords["."] = Dot;
+ m_keywords[";"] = Semicolon;
+ m_keywords[","] = Comma;
+ m_keywords["="] = Assign;
+ m_keywords["<"] = Less;
+ m_keywords["<="] = LessEqual;
+ m_keywords[">"] = Greater;
+ m_keywords[">="] = GreaterEqual;
+ m_keywords["=="] = Equal;
+ m_keywords["!="] = NotEqual;
+ m_keywords["<>"] = NotEqual;
+ m_keywords["not"] = Not;
+ m_keywords["!"] = Not;
+ m_keywords["and"] = And;
+ m_keywords["&&"] = And;
+ m_keywords["or"] = Or;
+ m_keywords["||"] = Or;
+ m_keywords["false"] = False;
+ m_keywords["true"] = True;
+ m_keywords["("] = LeftParenthesis;
+ m_keywords[")"] = RightParenthesis;
+ m_keywords["["] = LeftBracket;
+ m_keywords["]["] = DoubleBracket;
+ m_keywords["]"] = RightBracket;
+ m_keywords["+"] = Plus;
+ m_keywords["-"] = Minus;
+ m_keywords["*"] = Multiply;
+ m_keywords["/"] = Divide;
+ m_keywords["%"] = Mod;
+ m_keywords["+="] = PlusEqual;
+ m_keywords["-="] = MinusEqual;
+ m_keywords["++"] = Increment;
+ m_keywords["--"] = Decrement;
+ m_keywords["mod"] = Mod;
+ m_keywords["with"] = ArrKeyVal;
+
+ m_groups[Less] = GroupComparison;
+ m_groups[LessEqual] = GroupComparison;
+ m_groups[Equal] = GroupComparison;
+ m_groups[NotEqual] = GroupComparison;
+ m_groups[Greater] = GroupComparison;
+ m_groups[GreaterEqual] = GroupComparison;
+
+ m_groups[Plus] = GroupAdd;
+ m_groups[Minus] = GroupAdd;
+ m_groups[Multiply] = GroupMultiply;
+ m_groups[Divide] = GroupMultiply;
+ m_groups[Mod] = GroupMultiply;
+
+ registerStandardFunctions();
+}
+
+bool ParserData::isFunction(const QString& name) const
+{
+ return m_functions.contains(name.lower());
+}
+
+const Function& ParserData::function(const QString& name) const
+{
+ return m_functions[name.lower()];
+}
+
diff --git a/kommander/widget/parserdata.h b/kommander/widget/parserdata.h
new file mode 100644
index 00000000..4c7f8d50
--- /dev/null
+++ b/kommander/widget/parserdata.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ parserdata.h - Parser data: keywords, functions etc.
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdwev.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 _HAVE_PARSERDATA_H_
+#define _HAVE_PARSERDATA_H_
+
+#include "parsenode.h"
+#include "function.h"
+#include <qmap.h>
+
+class ParserData {
+public:
+ /* initialize keywords */
+ ParserData();
+ /* Return group of given keyword */
+ Parse::KeywordGroup keywordGroup(Parse::Keyword k) const;
+ /* Convert string to keyword */
+ Parse::Keyword stringToKeyword(const QString& s) const;
+ /* Convert keyword to string */
+ QString keywordToString(Parse::Keyword k) const;
+ /* register a function */
+ bool registerFunction(const QString& name, Function f);
+ /* check if this is a name of standard function */
+ bool isFunction(const QString& name) const;
+ /* Return function with given name. Warning: this function has undefined behavior when there is
+ no such function. */
+ const Function& function(const QString& name) const;
+private:
+ // register standard function
+ void registerStandardFunctions();
+ QMap<QString, Parse::Keyword> m_keywords;
+ QMap<Parse::Keyword, Parse::KeywordGroup> m_groups;
+ QMap<QString, Function> m_functions;
+};
+
+
+#endif
diff --git a/kommander/widgets/Makefile.am b/kommander/widgets/Makefile.am
new file mode 100644
index 00000000..51b23251
--- /dev/null
+++ b/kommander/widgets/Makefile.am
@@ -0,0 +1,35 @@
+lib_LTLIBRARIES = libkommanderwidgets.la
+
+# set the include path for X, qt and KDE
+INCLUDES = -I$(top_srcdir)/kommander/widget -I$(top_srcdir)/kommander/factory -I$(top_srcdir)/kommander/plugin $(all_includes)
+
+# the library search path.
+#widgets_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+libkommanderwidgets_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -no-undefined
+
+# the libraries to link against.
+libkommanderwidgets_la_LIBADD = $(LIB_KIO) $(LIB_QT) \
+ $(top_builddir)/kommander/widget/libkommanderwidget.la \
+ $(top_builddir)/kommander/plugin/libkommanderplugin.la \
+ $(top_builddir)/kommander/factory/libkommanderfactory.la
+
+# which sources should be compiled for widgets
+libkommanderwidgets_la_SOURCES = aboutdialog.cpp buttongroup.cpp checkbox.cpp \
+ closebutton.cpp combobox.cpp datepicker.cpp dialog.cpp execbutton.cpp fileselector.cpp \
+ fontdialog.cpp groupbox.cpp konsole.cpp label.cpp lineedit.cpp listbox.cpp \
+ pixmaplabel.cpp plugin.cpp popupmenu.cpp progressbar.cpp radiobutton.cpp \
+ richtexteditor.cpp scriptobject.cpp slider.cpp spinboxint.cpp statusbar.cpp subdialog.cpp \
+ table.cpp tabwidget.cpp textbrowser.cpp textedit.cpp timer.cpp toolbox.cpp \
+ treewidget.cpp wizard.cpp
+
+# these are the headers for your project that won't be installed
+noinst_HEADERS = aboutdialog.h buttongroup.h checkbox.h closebutton.h \
+ combobox.h dialog.h execbutton.h fileselector.h fontdialog.h groupbox.h \
+ groupbox.h label.h lineedit.h listbox.h pixmaplabel.h popupmenu.h radiobutton.h \
+ radiobutton.h richtexteditor.h scriptobject.h spinboxint.h statusbar.h subdialog.h \
+ tabwidget.h textbrowser.h textedit.h toolbox.h treewidget.h wizard.h
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+
+KDE_OPTIONS=nofinal
diff --git a/kommander/widgets/aboutdialog.cpp b/kommander/widgets/aboutdialog.cpp
new file mode 100644
index 00000000..7f8c3428
--- /dev/null
+++ b/kommander/widgets/aboutdialog.cpp
@@ -0,0 +1,295 @@
+//
+// C++ Implementation: aboutdialog
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include <qfile.h>
+#include "aboutdialog.h"
+
+#include "kommanderplugin.h"
+#include "specials.h"
+
+#include <kaboutdata.h>
+#include <kaboutapplication.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+
+#include <qtextstream.h>
+
+enum Functions {
+ FirstFunction = 159,
+ Initialize,
+ AddAuthor,
+ AddTranslator,
+ SetDescription,
+ SetHomepage,
+ SetBugAddress,
+ SetLicense,
+ Version,
+ LastFunction
+};
+
+AboutDialog::AboutDialog(QWidget *parent, const char *name)
+ : QLabel(parent, name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ if (KommanderWidget::inEditor)
+ {
+ setPixmap(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium));
+ setFrameStyle(QFrame::Box | QFrame::Plain);
+ setLineWidth(1);
+ setFixedSize(pixmap()->size());
+ }
+ else
+ setHidden(true);
+
+ m_aboutData = 0L;
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(Initialize, "initialize(QString widget, QString appName, QString icon, QString version, QString copyright)",
+ i18n("Sets information about the application. This is the first method that must me called, any addition to the dialog done before initialization will be ignored."), 5);
+ KommanderPlugin::registerFunction(AddAuthor, "addAuthor(QString widget, QString author, QString task, QString email, QString webAddress)",
+ i18n("Add an author. Only the author name is required."), 2, 5);
+ KommanderPlugin::registerFunction(AddTranslator, "addTranslator(QString widget, QString author, QString email)",
+ i18n("Add a translator. Only the name is required."), 2, 3);
+ KommanderPlugin::registerFunction(SetDescription, "setDescription(QString widget, QString description)",
+ i18n("Set a short description text."), 2);
+ KommanderPlugin::registerFunction(SetHomepage, "setHomepage(QString widget, QString homepage)",
+ i18n("Set a homepage address."), 2);
+ KommanderPlugin::registerFunction(SetBugAddress, "setBugAddress(QString widget, QString address)",
+ i18n("Set an email address, where bugs can be reported."), 2);
+ KommanderPlugin::registerFunction(SetLicense, "setLicense(QString widget, QString license)",
+ i18n("Sets license information of the application. The parameter can be one of the license keys - GPL_V2, LGPL_V2, BSD, ARTISTIC -, or a freely specified text."), 2);
+ KommanderPlugin::registerFunction(Version, "version(QString widget)",
+ i18n("Returns the set version string."), 1);
+}
+
+
+AboutDialog::~AboutDialog()
+{
+ delete m_aboutData;
+ m_aboutData = 0L;
+}
+
+QString AboutDialog::currentState() const
+{
+ return QString("default");
+}
+
+bool AboutDialog::isKommanderWidget() const
+{
+ return true;
+}
+QStringList AboutDialog::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void AboutDialog::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+
+bool AboutDialog::isFunctionSupported(int f)
+{
+ return (f > FirstFunction && f < LastFunction) || f == DCOP::execute;
+}
+
+void AboutDialog::initialize(const QString& appName, const QString &icon, const QString& version, const QString& copyright)
+{
+ delete m_aboutData;
+ m_authors.clear();
+ m_emails.clear();
+ m_tasks.clear();
+ m_addresses.clear();
+ m_description = "";
+ m_homepage = "";
+ m_bugaddress = "";
+ m_version = version;
+ m_appName = appName;
+ m_icon = icon;
+ m_copyright = copyright;
+ m_aboutData = new KAboutData(m_appName, m_appName, m_version);
+ m_aboutData->setCopyrightStatement(m_copyright);
+ if (!m_icon.isEmpty())
+ m_aboutData->setProgramLogo(KGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeMedium).convertToImage());
+}
+
+void AboutDialog::addAuthor(const QString& author, const QString &task, const QString& email, const QString &webAddress)
+{
+ if (!m_aboutData)
+ return;
+ m_authors.append(author);
+ m_emails.append(email);
+ m_tasks.append(task);
+ m_addresses.append(webAddress);
+ m_aboutData->addAuthor(author, task, email, webAddress);
+}
+
+void AboutDialog::addTranslator(const QString& author, const QString& email)
+{
+ if (!m_aboutData)
+ return;
+ m_authors.append(author);
+ m_emails.append(email);
+ m_aboutData->setTranslator(author, email);
+}
+
+void AboutDialog::setDescription(const QString& description)
+{
+ if (!m_aboutData)
+ return;
+ m_description = description;
+ m_aboutData->setShortDescription(m_description);
+}
+
+void AboutDialog::setHomepage(const QString &homepage)
+{
+ if (!m_aboutData)
+ return;
+ m_homepage = homepage;
+ m_aboutData->setHomepage(m_homepage);
+}
+
+void AboutDialog::setBugAddress(const QString &bugAddress)
+{
+ if (!m_aboutData)
+ return;
+ m_bugaddress = bugAddress;
+ m_aboutData->setBugAddress(m_bugaddress);
+}
+
+void AboutDialog::setLicense(const QString &key)
+{
+ if (!m_aboutData)
+ return;
+ QString license = key.upper();
+ QString file;
+ if (key == "GPL_V2")
+ {
+ file = locate("data", "LICENSES/GPL_V2");
+ } else
+ if (key == "LGPL_V2")
+ {
+ file = locate("data", "LICENSES/LGPL_V2");
+ } else
+ if (key == "BSD")
+ {
+ file = locate("data", "LICENSES/BSD");
+ } else
+ if (key == "ARTISTIC")
+ {
+ file = locate("data", "LICENSES/ARTISTIC");
+ }
+ if (file.isEmpty() && !QFile::exists( key ))
+ {
+ if (!key.isEmpty())
+ m_license = key;
+ m_aboutData->setLicenseText(m_license);
+ }
+ else
+ {
+ if (file.isEmpty())
+ {
+ if (!key.isEmpty())
+ file = key;
+ }
+ m_aboutData->setLicenseTextFile(file);
+ }
+
+}
+
+void AboutDialog::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString AboutDialog::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void AboutDialog::populate()
+{
+ setAssociatedText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+void AboutDialog::execute()
+{
+ if (m_aboutData)
+ {
+ KAboutApplication dialog(m_aboutData, this);
+ dialog.exec();
+ }
+}
+
+QString AboutDialog::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case Initialize:
+ {
+ initialize(args[0], args[1], args[2], args[3]);
+ break;
+ }
+ case SetLicense:
+ {
+ setLicense(args[0]);
+ break;
+ }
+ case AddAuthor:
+ {
+ addAuthor(args[0], args[1], args[2], args[3]);
+ break;
+ }
+ case AddTranslator:
+ {
+ addTranslator(args[0], args[1]);
+ break;
+ }
+ case SetDescription:
+ {
+ setDescription(args[0]);
+ break;
+ }
+ case SetHomepage:
+ {
+ setHomepage(args[0]);
+ break;
+ }
+ case SetBugAddress:
+ {
+ setBugAddress(args[0]);
+ break;
+ }
+ case Version:
+ {
+ if (m_aboutData)
+ return m_aboutData->version();
+ break;
+ }
+ case DCOP::execute:
+ {
+ if (m_aboutData)
+ {
+ KAboutApplication dialog(m_aboutData, this);
+ dialog.exec();
+ }
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "aboutdialog.moc"
diff --git a/kommander/widgets/aboutdialog.h b/kommander/widgets/aboutdialog.h
new file mode 100644
index 00000000..0d0249a7
--- /dev/null
+++ b/kommander/widgets/aboutdialog.h
@@ -0,0 +1,72 @@
+//
+// C++ Interface: aboutdialog
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef ABOUTDIALOG_H
+#define ABOUTDIALOG_H
+
+#include <qlabel.h>
+#include <kommanderwidget.h>
+
+class KAboutApplication;
+class KAboutData;
+
+/**
+ @author Andras Mantia <amantia@kdewebdev.org>
+*/
+class AboutDialog : public QLabel, public KommanderWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+public:
+ AboutDialog(QWidget *parent = 0, const char *name = 0);
+
+ ~AboutDialog();
+
+ virtual bool isKommanderWidget() const;
+ virtual QString currentState() const;
+ virtual bool isFunctionSupported(int function);
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ virtual QStringList associatedText() const;
+ virtual void setAssociatedText(const QStringList&);
+
+public slots:
+ virtual void populate();
+ virtual void execute();
+
+private:
+ void initialize(const QString& appName, const QString &icon, const QString& version, const QString& copyright);
+ void addAuthor(const QString& author, const QString &task, const QString& email, const QString &webAddress);
+ void addTranslator(const QString& author, const QString& email);
+ void setDescription(const QString& description);
+ void setHomepage(const QString &homepage);
+ void setBugAddress(const QString &bugAddress);
+ void setLicense(const QString &license);
+
+ KAboutData *m_aboutData;
+ QString m_version;
+ QString m_appName;
+ QString m_copyright;
+ QString m_icon;
+ QString m_bugaddress;
+ QStringList m_authors;
+ QStringList m_emails;
+ QStringList m_tasks;
+ QStringList m_addresses;
+ QString m_description;
+ QString m_homepage;
+ QString m_license;
+};
+
+#endif
diff --git a/kommander/widgets/buttongroup.cpp b/kommander/widgets/buttongroup.cpp
new file mode 100644
index 00000000..0a6eafc2
--- /dev/null
+++ b/kommander/widgets/buttongroup.cpp
@@ -0,0 +1,159 @@
+/***************************************************************************
+ buttongroup.cpp - Button group widget
+ -------------------
+ copyright : (C) 2002-2004 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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>
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qbuttongroup.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include "kommanderplugin.h"
+#include <specials.h>
+#include "buttongroup.h"
+
+#include "radiobutton.h" // include a button header for the compiler with dynamic cast below
+
+enum Functions {
+ FirstFunction = 720,
+ BG_selectedId,
+ LastFunction
+};
+
+ButtonGroup::ButtonGroup(QWidget *a_parent, const char *a_name)
+ : QButtonGroup(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "checked";
+ states << "unchecked";
+ setStates(states);
+ setDisplayStates(states);
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(BG_selectedId, "selectedId(QString widget)", i18n("Returns the ID of the selected button."), 1);
+
+}
+
+ButtonGroup::~ButtonGroup()
+{
+}
+
+QString ButtonGroup::currentState() const
+{
+ if (!isCheckable() || isChecked())
+ return "checked";
+ else
+ return "unchecked";
+}
+
+bool ButtonGroup::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList ButtonGroup::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void ButtonGroup::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void ButtonGroup::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText( a_text );
+}
+
+QString ButtonGroup::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void ButtonGroup::populate()
+{
+//FIXME: implement
+}
+
+void ButtonGroup::showEvent(QShowEvent* e)
+{
+ QButtonGroup::showEvent(e);
+ emit widgetOpened();
+}
+
+void ButtonGroup::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool ButtonGroup::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
+}
+
+
+QString ButtonGroup::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ {
+ QString text;
+ for (int i = 0; i < count(); i++)
+ if (dynamic_cast<KommanderWidget*>(find(i)))
+ text += (dynamic_cast<KommanderWidget*>(find(i)))->evalAssociatedText();
+ return text;
+ }
+ case DCOP::checked:
+ return QString::number(isChecked());
+ case DCOP::setChecked:
+ setCheckable(true);
+ setChecked(args[0] != "false");
+ break;
+ case BG_selectedId:
+ return QString::number(this->selectedId() );
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "buttongroup.moc"
diff --git a/kommander/widgets/buttongroup.h b/kommander/widgets/buttongroup.h
new file mode 100644
index 00000000..0e123864
--- /dev/null
+++ b/kommander/widgets/buttongroup.h
@@ -0,0 +1,67 @@
+/***************************************************************************
+ buttongroup.h - Buttongroup widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_BUTTONGROUP_H_
+#define _HAVE_BUTTONGROUP_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qbuttongroup.h>
+#include <qobject.h>
+#include <qstringlist.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT ButtonGroup : public QButtonGroup, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget DESIGNABLE false)
+public:
+ ButtonGroup(QWidget *a_parent, const char *a_name);
+ ~ButtonGroup();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void populate();
+
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent* e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/checkbox.cpp b/kommander/widgets/checkbox.cpp
new file mode 100644
index 00000000..e78dbdb8
--- /dev/null
+++ b/kommander/widgets/checkbox.cpp
@@ -0,0 +1,151 @@
+/***************************************************************************
+ checkbox.cpp - Checkbox widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qcheckbox.h>
+#include <qbutton.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "checkbox.h"
+
+CheckBox::CheckBox(QWidget *a_parent, const char *a_name)
+ : QCheckBox(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "unchecked";
+ states << "semichecked";
+ states << "checked";
+ setStates(states);
+ QStringList displayStates;
+ displayStates << "checked";
+ displayStates << "semichecked";
+ displayStates << "unchecked";
+ setDisplayStates(displayStates);
+}
+
+CheckBox::~CheckBox()
+{
+}
+
+QString CheckBox::currentState() const
+{
+ if (state() == QButton::Off)
+ return "unchecked";
+ else if (state() == QButton::NoChange)
+ return "semichecked";
+ else if (state() == QButton::On)
+ return "checked";
+ return QString();
+}
+
+bool CheckBox::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList CheckBox::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void CheckBox::setAssociatedText(const QStringList & a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void CheckBox::setPopulationText(const QString & a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString CheckBox::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void CheckBox::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
+}
+
+void CheckBox::setWidgetText(const QString& a_text)
+{
+ setText(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void CheckBox::showEvent(QShowEvent* e)
+{
+ QCheckBox::showEvent(e);
+ emit widgetOpened();
+}
+
+bool CheckBox::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+}
+
+void CheckBox::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+QString CheckBox::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return text();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::checked:
+ return QString::number(isChecked());
+ case DCOP::setChecked:
+ setChecked(args[0] != "false" && args[0] != "0");
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "checkbox.moc"
diff --git a/kommander/widgets/checkbox.h b/kommander/widgets/checkbox.h
new file mode 100644
index 00000000..c9743434
--- /dev/null
+++ b/kommander/widgets/checkbox.h
@@ -0,0 +1,67 @@
+/***************************************************************************
+ checkbox.h - Checkbox widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_CHECKBOX_H_
+#define _HAVE_CHECKBOX_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstringlist.h>
+#include <qstring.h>
+#include <qcheckbox.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT CheckBox : public QCheckBox, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ CheckBox(QWidget *a_parent, const char *a_name);
+ ~CheckBox();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/closebutton.cpp b/kommander/widgets/closebutton.cpp
new file mode 100644
index 00000000..9da9f1a0
--- /dev/null
+++ b/kommander/widgets/closebutton.cpp
@@ -0,0 +1,183 @@
+/***************************************************************************
+ closebutton.cpp - Button that when clicked, closes the dialog it's in
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <kmessagebox.h>
+#include <klocale.h>
+
+/* QT INCLUDES */
+#include <qdialog.h>
+#include <qevent.h>
+#include <qobject.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qwidget.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "closebutton.h"
+
+CloseButton::CloseButton(QWidget* a_parent, const char* a_name)
+ : KPushButton(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ setWriteStdout(true);
+
+ connect(this, SIGNAL(clicked()), this, SLOT(startProcess()));
+
+ QObject *parent = this;
+ while (parent->parent() != 0)
+ {
+ parent = parent->parent();
+ if (parent->inherits("QDialog"))
+ break;
+ }
+ connect(this, SIGNAL(clicked()), parent, SLOT(reject()));
+}
+
+CloseButton::~CloseButton()
+{
+}
+
+QString CloseButton::currentState() const
+{
+ return QString("default");
+}
+
+bool CloseButton::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList CloseButton::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void CloseButton::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void CloseButton::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString CloseButton::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void CloseButton::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
+}
+
+void CloseButton::setWidgetText(const QString& a_text)
+{
+ setText(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void CloseButton::startProcess()
+{
+ QString at = evalAssociatedText();
+
+ if (!at.isEmpty())
+ {
+ KShellProcess *process = new KShellProcess("/bin/sh");
+ *process << at;
+
+ connect(process, SIGNAL(processExited(KProcess *)), SLOT(endProcess(KProcess *)));
+ connect(process, SIGNAL(receivedStdout(KProcess *, char *, int)), SLOT(appendOutput(KProcess *,
+ char *, int)));
+ connect(process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(appendOutput(KProcess *,
+ char *, int)));
+
+ if (!process->start(KProcess::Block, KProcess::Stdout))
+ {
+ KMessageBox::error(this, i18n("Failed to start shell process."));
+ endProcess(process);
+ return;
+ }
+ } else
+ endProcess(0);
+}
+
+void CloseButton::appendOutput(KProcess *, char *a_buffer, int a_len)
+{
+ char *buffer = new char[a_len + 1];
+ buffer[a_len] = 0;
+ for (int i = 0; i < a_len; ++i)
+ buffer[i] = a_buffer[i];
+
+ QString bufferString(buffer);
+ m_output += bufferString;
+ if (writeStdout())
+ {
+ fputs(buffer, stdout);
+ fflush(stdout);
+ }
+ delete[] buffer;
+}
+
+void CloseButton::endProcess(KProcess *a_process)
+{
+ emit widgetTextChanged(m_output);
+ m_output = "";
+ delete a_process;
+}
+
+bool CloseButton::writeStdout() const
+{
+ return m_writeStdout;
+}
+
+void CloseButton::setWriteStdout(bool a_enable)
+{
+ m_writeStdout = a_enable;
+}
+
+void CloseButton::showEvent(QShowEvent *e)
+{
+ QPushButton::showEvent(e);
+ emit widgetOpened();
+}
+
+bool CloseButton::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText;
+}
+
+QString CloseButton::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return m_output;
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "closebutton.moc"
diff --git a/kommander/widgets/closebutton.h b/kommander/widgets/closebutton.h
new file mode 100644
index 00000000..8b7aa57a
--- /dev/null
+++ b/kommander/widgets/closebutton.h
@@ -0,0 +1,72 @@
+/***************************************************************************
+ closebutton.h - Button that when clicked, closes the dialog it's in
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_CLOSEBUTTON_H_
+#define _HAVE_CLOSEBUTTON_H_
+
+/* KDE INCLUDES */
+#include <kpushbutton.h>
+
+/* QT INCLUDES */
+#include <qobject.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT CloseButton : public KPushButton, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout)
+public:
+ CloseButton(QWidget* a_parent, const char* a_name);
+ ~CloseButton();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ bool writeStdout() const;
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWriteStdout(bool);
+ virtual void setWidgetText(const QString &);
+ virtual void startProcess();
+ virtual void appendOutput(KProcess*, char*, int);
+ virtual void endProcess(KProcess*);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+protected:
+ bool m_writeStdout;
+ QString m_output;
+ void showEvent(QShowEvent* e);
+private:
+};
+
+#endif
diff --git a/kommander/widgets/combobox.cpp b/kommander/widgets/combobox.cpp
new file mode 100644
index 00000000..250d3820
--- /dev/null
+++ b/kommander/widgets/combobox.cpp
@@ -0,0 +1,210 @@
+/***************************************************************************
+ combobox.cpp - Combobox widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <kiconloader.h>
+#include <klocale.h>
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+
+/* OTHER INCLUDES */
+#include <kommanderplugin.h>
+#include <specials.h>
+#include "combobox.h"
+
+enum Functions {
+ FirstFunction = 353, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!!
+ popupList,
+ LastFunction
+};
+
+
+ComboBox::ComboBox(QWidget *a_parent, const char *a_name)
+ : KComboBox(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+
+ connect(this, SIGNAL(activated(int)), this, SLOT(emitWidgetTextChanged(int)));
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(popupList, "popupList(QString widget)", i18n("Make the ComboBox expose it's list without mousing around."), 1);
+
+}
+
+ComboBox::~ComboBox()
+{
+}
+
+QString ComboBox::currentState() const
+{
+ return QString("default");
+}
+
+bool ComboBox::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList ComboBox::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void ComboBox::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void ComboBox::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString ComboBox::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void ComboBox::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+void ComboBox::setWidgetText(const QString& a_text)
+{
+ clear();
+ insertStringList(QStringList::split("\n", a_text));
+ emit widgetTextChanged(a_text);
+}
+
+void ComboBox::emitWidgetTextChanged(int a_index)
+{
+ emit widgetTextChanged(text(a_index));
+}
+
+void ComboBox::showEvent(QShowEvent *e)
+{
+ QComboBox::showEvent( e );
+ emit widgetOpened();
+}
+
+void ComboBox::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+
+bool ComboBox::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::selection || f == DCOP::setSelection ||
+ f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::item ||
+ f == DCOP::removeItem || f == DCOP::insertItem || f == DCOP::insertItems ||
+ f == DCOP::addUniqueItem || f == DCOP::clear || f == DCOP::count || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
+}
+
+QString ComboBox::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return currentText();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::selection:
+ return currentText();
+ case DCOP::currentItem:
+ return QString::number(currentItem());
+ case DCOP::setCurrentItem:
+ setCurrentItem(args[0].toUInt());
+ break;
+ case DCOP::item:
+ {
+ int i = args[0].toInt();
+ if (i >= 0 && i < count())
+ return text(i);
+ break;
+ }
+ case DCOP::removeItem:
+ removeItem(args[0].toInt());
+ break;
+ case DCOP::insertItem:
+ insertItem(args[0], args[1].toInt());
+ break;
+ case DCOP::insertItems:
+ insertStringList(QStringList::split("\n", args[0]), args[1].toInt());
+ break;
+ case DCOP::addUniqueItem:
+ for (int i=0; i<count(); i++)
+ if (text(i) == args[0])
+ return QString();
+ insertItem(args[0]);
+ break;
+ case DCOP::clear:
+ clear();
+ break;
+ case DCOP::count:
+ return QString::number(count());
+ case DCOP::setSelection:
+ {
+ for (int i = 0; i < count(); i++)
+ if (text(i) == args[0])
+ {
+ setCurrentItem(i);
+ break;
+ }
+ break;
+ }
+ case DCOP::setEditable:
+ setEditable(args[0] != "false" && args[0] != "0");
+ break;
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ case popupList:
+ QComboBox::popup();
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::hasFocus:
+ return QString::number(this->hasFocus());
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "combobox.moc"
diff --git a/kommander/widgets/combobox.h b/kommander/widgets/combobox.h
new file mode 100644
index 00000000..916846d9
--- /dev/null
+++ b/kommander/widgets/combobox.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ combobox.h - Combobox widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_COMBOBOX_H_
+#define _HAVE_COMBOBOX_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kcombobox.h>
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT ComboBox : public KComboBox, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ ComboBox(QWidget *a_parent, const char *a_name);
+ ~ComboBox();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void populate();
+
+ virtual void emitWidgetTextChanged(int);
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/datepicker.cpp b/kommander/widgets/datepicker.cpp
new file mode 100644
index 00000000..c1b1f834
--- /dev/null
+++ b/kommander/widgets/datepicker.cpp
@@ -0,0 +1,130 @@
+/***************************************************************************
+ combobox.cpp - Combobox widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qdatetime.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "datepicker.h"
+
+DatePicker::DatePicker(QWidget *a_parent, const char *a_name)
+ : KDatePicker(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+}
+
+DatePicker::~DatePicker()
+{
+}
+
+QString DatePicker::currentState() const
+{
+ return QString("default");
+}
+
+bool DatePicker::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList DatePicker::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void DatePicker::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void DatePicker::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString DatePicker::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void DatePicker::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+void DatePicker::setWidgetText(const QString& a_text)
+{
+ setDate(QDate::fromString(a_text, Qt::ISODate));
+ emit widgetTextChanged(a_text);
+}
+
+QString DatePicker::widgetText() const
+{
+ return date().toString(Qt::ISODate);
+}
+
+
+void DatePicker::showEvent(QShowEvent *e)
+{
+ KDatePicker::showEvent( e );
+ emit widgetOpened();
+}
+void DatePicker::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+
+bool DatePicker::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || f == DCOP::hasFocus ;
+}
+
+QString DatePicker::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return date().toString(Qt::ISODate);
+ case DCOP::setText:
+ setDate(QDate::fromString(args[0], Qt::ISODate));
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::hasFocus:
+ return QString::number(this->hasFocus());
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "datepicker.moc"
diff --git a/kommander/widgets/datepicker.h b/kommander/widgets/datepicker.h
new file mode 100644
index 00000000..0383937a
--- /dev/null
+++ b/kommander/widgets/datepicker.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ combobox.h - Combobox widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_DATEPICKER_H_
+#define _HAVE_DATEPICKER_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kdatepicker.h>
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT DatePicker : public KDatePicker, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ DatePicker(QWidget *a_parent, const char *a_name);
+ ~DatePicker();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ virtual QString widgetText() const;
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void populate();
+
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/dialog.cpp b/kommander/widgets/dialog.cpp
new file mode 100644
index 00000000..ef9b727b
--- /dev/null
+++ b/kommander/widgets/dialog.cpp
@@ -0,0 +1,226 @@
+/***************************************************************************
+ dialog.cpp - Main dialog widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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>
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qdialog.h>
+#include <qpoint.h>
+#include <qcursor.h>
+#include <qapplication.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "dialog.h"
+#include <myprocess.h>
+#include "kommanderplugin.h"
+
+enum Functions {
+ FirstFunction = 185,
+ D_focusWidget,
+ D_waitCursor,
+ D_restoreCursor,
+ LastFunction
+};
+
+Dialog::Dialog(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
+ : QDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(this)
+{
+ QStringList states;
+ states << "default";
+ states << "initialization";
+ states << "destroy";
+ setStates(states);
+ setDisplayStates(states);
+ m_useShebang = false;
+ m_shebang = "#!/usr/bin/kmdr-executor";
+ m_firstShow = true;
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(D_focusWidget, "focusWidget(QString widget)", i18n("The name of the widget having focus"), 1);
+ KommanderPlugin::registerFunction(D_waitCursor, "waitCursor(QString widget)", i18n("Set a wait cursor. CAUTION: if set more than once an equal number of calls to restore must be made to clear it."), 1);
+ KommanderPlugin::registerFunction(D_restoreCursor, "restoreCursor(QString widget)", i18n("Restore normal curser. NOTE: must be called as many times as wait was."), 1);
+}
+
+Dialog::~Dialog()
+{
+ if (!inEditor)
+ destroy();
+}
+
+QString Dialog::currentState() const
+{
+ return QString("default");
+}
+
+bool Dialog::isKommanderWidget() const
+{
+ return true;
+}
+
+bool Dialog::useInternalParser() const
+{
+ return m_useInternalParser;
+}
+
+void Dialog::setUseInternalParser(bool b)
+{
+ KommanderWidget::useInternalParser = b;
+ m_useInternalParser = b;
+}
+
+
+QStringList Dialog::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void Dialog::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void Dialog::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText( a_text );
+}
+
+QString Dialog::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void Dialog::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
+}
+
+void Dialog::initialize()
+{
+ const QStringList assoc = associatedText();
+ if (assoc.count() > 1 && !assoc[1].isEmpty())
+ {
+ MyProcess proc(this);
+ proc.run( KommanderWidget::evalAssociatedText(assoc[1]) );
+ }
+}
+
+void Dialog::destroy()
+{
+ const QStringList assoc = associatedText();
+ if (assoc.count() > 2 && !assoc[2].isEmpty())
+ {
+ MyProcess proc(this);
+ proc.run( KommanderWidget::evalAssociatedText(assoc[2]) );
+ }
+}
+
+
+void Dialog::setWidgetText(const QString& a_text)
+{
+ setCaption(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void Dialog::exec()
+{
+ QDialog::exec();
+ emit finished();
+}
+
+void Dialog::show()
+{
+//if the dialog is embedded in a KPart, the show can be called many times.
+//to avoid re-init and sending signals we don't want, in that case call only the
+//QWidget's show method to show the widgets, but don't do any QDialog specific
+//task
+ if (!m_firstShow)
+ {
+ QWidget::show();
+ } else
+ {
+ QDialog::show();
+ if (!inEditor)
+ initialize();
+ m_firstShow = false;
+ }
+}
+
+void Dialog::done(int r)
+{
+/* if (!inEditor)
+ destroy();*/
+ QDialog::done(r);
+}
+
+void Dialog::showEvent(QShowEvent *e)
+{
+ QDialog::showEvent( e );
+ emit widgetOpened();
+}
+
+void Dialog::keyPressEvent( QKeyEvent *e )
+{
+ if ( e->state() == 0 && e->key() == Key_Escape)
+ return;
+ else
+ QDialog::keyPressEvent(e);
+
+}
+
+void Dialog::contextMenuEvent( QContextMenuEvent * e )
+{
+ QDialog::contextMenuEvent( e );
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool Dialog::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || (f > FirstFunction && f < LastFunction);
+}
+
+QString Dialog::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return caption();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::geometry:
+ return QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ break;
+ case D_focusWidget:
+ return focusWidget()->name();
+ break;
+ case D_waitCursor:
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ break;
+ case D_restoreCursor:
+ QApplication::restoreOverrideCursor();
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "dialog.moc"
diff --git a/kommander/widgets/dialog.h b/kommander/widgets/dialog.h
new file mode 100644
index 00000000..091ff890
--- /dev/null
+++ b/kommander/widgets/dialog.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ dialog.h - Kommander dialog
+ -------------------
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2004 by Andras Mantia <amantia@kde.org>
+ (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 _HAVE_DIALOG_H_
+#define _HAVE_DIALOG_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qdialog.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwindow.h>
+#include <kommander_export.h>
+class QShowEvent;
+class KOMMANDER_EXPORT Dialog : public QDialog, public KommanderWindow
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_PROPERTY(bool useInternalParser READ useInternalParser WRITE setUseInternalParser)
+ Q_PROPERTY(bool useShebang READ useShebang WRITE setUseShebang DESIGNABLE true)
+ Q_PROPERTY(QString shebang READ Shebang WRITE setShebang DESIGNABLE true)
+ Q_OVERRIDE(bool modal DESIGNABLE false)
+
+public:
+ Dialog(QWidget *, const char *, bool = true, int=0);
+ ~Dialog();
+ virtual bool isKommanderWidget() const;
+ virtual bool useInternalParser() const;
+ virtual void setUseInternalParser(bool b);
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ virtual void show();
+
+ bool useShebang() const { return m_useShebang; }
+ void setUseShebang(bool useit) { m_useShebang = useit; }
+ QString Shebang() const { return m_shebang; }
+ void setShebang(const QString &text) { m_shebang = text; }
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void exec();
+ virtual void populate();
+ virtual void done(int r);
+protected slots:
+ virtual void initialize();
+ virtual void destroy();
+
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void finished();
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent( QShowEvent *e );
+ void keyPressEvent( QKeyEvent * );
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+ QString m_fileName;
+ bool m_useInternalParser;
+ bool m_useShebang; //add m_shebang at the beginning of the dialog code or not
+ bool m_firstShow; //tells if the show method was called before or not
+ QString m_shebang; //#!/usr/bin/kmdr-executor or similar
+};
+
+#endif
diff --git a/kommander/widgets/execbutton.cpp b/kommander/widgets/execbutton.cpp
new file mode 100644
index 00000000..69d06f8b
--- /dev/null
+++ b/kommander/widgets/execbutton.cpp
@@ -0,0 +1,241 @@
+/***************************************************************************
+ execbutton.cpp - Button that runs its text association
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <kapplication.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+
+/* QT INCLUDES */
+#include <qcursor.h>
+#include <qevent.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qwidget.h>
+#include <qpopupmenu.h>
+#include <qapplication.h>
+#include <qwidgetlist.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <specials.h>
+#include "execbutton.h"
+#include <myprocess.h>
+#include <iostream>
+#include <kommanderplugin.h>
+
+using namespace std;
+
+enum Functions {
+ FirstFunction = 260, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!!
+ EB_isOn,
+ EB_setPopup,
+ EB_setButtonText,
+ LastFunction
+};
+
+ExecButton::ExecButton(QWidget* a_parent, const char* a_name)
+ : KPushButton(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ setWriteStdout(true);
+ setBlockGUI(Button);
+ connect(this, SIGNAL(clicked()), this, SLOT(startProcess()));
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(EB_isOn, "isOn(QString widget)", i18n("For use only when button is togle type."), 1);
+ KommanderPlugin::registerFunction(EB_setPopup, "setPopup(QString widget, QString Menu)", i18n("Associate a Kommander PopupMenu with this ExecButton."), 2);
+ KommanderPlugin::registerFunction(EB_setButtonText, "setButtonText(QString widget, QString Text)", i18n("Set the text on the ExecButton."), 2);
+}
+
+ExecButton::~ExecButton()
+{
+}
+
+QString ExecButton::currentState() const
+{
+ return QString("default");
+}
+
+bool ExecButton::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList ExecButton::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void ExecButton::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void ExecButton::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString ExecButton::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void ExecButton::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText(populationText());
+ setWidgetText(txt);
+}
+
+void ExecButton::setWidgetText(const QString& a_text)
+{
+ setText(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void ExecButton::startProcess()
+{
+ QString at = evalAssociatedText().stripWhiteSpace();
+ bool enabledStatus = isEnabled();
+ if (m_blockGUI != None)
+ setEnabled(false);
+ if (m_blockGUI == GUI)
+ KApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ MyProcess* process = new MyProcess(this);
+ process->setBlocking(m_blockGUI == GUI);
+ connect(process, SIGNAL(processExited(MyProcess*)), SLOT(processExited(MyProcess*)));
+ m_output = process->run(at);
+ if (m_blockGUI == GUI)
+ {
+ KApplication::restoreOverrideCursor();
+ if (writeStdout())
+ cout << m_output << flush;
+ }
+ setEnabled(enabledStatus);
+}
+
+
+bool ExecButton::writeStdout() const
+{
+ return m_writeStdout;
+}
+
+void ExecButton::setWriteStdout(bool a_enable)
+{
+ m_writeStdout = a_enable;
+}
+
+void ExecButton::setBlockGUI(Blocking a_enable)
+{
+ m_blockGUI = a_enable;
+}
+
+ExecButton::Blocking ExecButton::blockGUI() const
+{
+ return m_blockGUI;
+}
+
+void ExecButton::processExited(MyProcess* p)
+{
+ if (blockGUI() != None)
+ setEnabled(true);
+ if (p)
+ {
+ m_output = p->output();
+ if (writeStdout())
+ cout << m_output << flush;
+ delete p;
+ }
+}
+
+void ExecButton::showEvent(QShowEvent* e)
+{
+ KPushButton::showEvent(e);
+ emit widgetOpened();
+}
+
+void ExecButton::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool ExecButton::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::execute || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
+}
+
+QString ExecButton::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return m_output;
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::execute:
+ startProcess();
+ break;
+ case EB_isOn:
+ return QString::number(this->isOn() );
+ break;
+ case EB_setButtonText:
+ ExecButton::setText(args[0]);
+ break;
+ case EB_setPopup:
+ {
+ QWidgetList *list = QApplication::allWidgets();
+ QWidgetListIt it( *list );
+ QWidget * w;
+ while ( (w=it.current()) != 0 ) { // for each widget...
+ ++it;
+ if (w->name() == args[0] && w->className() == "PopupMenu")
+ {
+ QPopupMenu *popup = dynamic_cast<QPopupMenu*>(w->child("unnamed", "KPopupMenu"));
+ this->setPopup(popup);
+ }
+ }
+ break;
+ }
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "execbutton.moc"
diff --git a/kommander/widgets/execbutton.h b/kommander/widgets/execbutton.h
new file mode 100644
index 00000000..2e2ea60a
--- /dev/null
+++ b/kommander/widgets/execbutton.h
@@ -0,0 +1,94 @@
+/***************************************************************************
+ execbutton.h - Button that runs its text association
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_EXECBUTTON_H_
+#define _HAVE_EXECBUTTON_H_
+
+/* KDE INCLUDES */
+#include <kpushbutton.h>
+
+/* QT INCLUDES */
+#include <qobject.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+
+class QWidget;
+class KProcess;
+class MyProcess;
+
+class QShowEvent;
+class KOMMANDER_EXPORT ExecButton : public KPushButton, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_ENUMS(Blocking)
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout)
+ Q_PROPERTY(Blocking blockGUI READ blockGUI WRITE setBlockGUI)
+
+public:
+ ExecButton(QWidget *a_parent, const char *a_name);
+ ~ExecButton();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ // Handle stdout setting
+ virtual void setWriteStdout(bool);
+ bool writeStdout() const;
+ // Handle blocking
+ enum Blocking { None, Button, GUI };
+ virtual void setBlockGUI(Blocking a_enable);
+ Blocking blockGUI() const;
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void populate();
+ virtual void setWidgetText(const QString &);
+
+ // Execute script from associastedText
+ virtual void startProcess();
+ // Process has ended
+ virtual void processExited(MyProcess* p);
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+
+protected:
+ void contextMenuEvent( QContextMenuEvent * e );
+ // Whether output from process should be put in real stdout
+ bool m_writeStdout;
+ // Whether pressing execubtton should block GUI until process ends
+ Blocking m_blockGUI;
+ // Output from process
+ QString m_output;
+ void showEvent( QShowEvent *e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/fileselector.cpp b/kommander/widgets/fileselector.cpp
new file mode 100644
index 00000000..b220b8d9
--- /dev/null
+++ b/kommander/widgets/fileselector.cpp
@@ -0,0 +1,240 @@
+/***************************************************************************
+ fileselector.cpp - File selection widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+
+/* KDE INCLUDES */
+#include <kfiledialog.h>
+#include <klineedit.h>
+#include <kpushbutton.h>
+#include <kurlcompletion.h>
+#include <kiconloader.h>
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qlayout.h>
+#include <qsizepolicy.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "fileselector.h"
+
+FileSelector::FileSelector(QWidget * a_parent, const char *a_name)
+ : QWidget(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+
+ m_lineEdit = new KLineEdit(this);
+
+ m_selectButton = new KPushButton(BarIconSet("fileopen"), "", this);
+
+ m_boxLayout = new QHBoxLayout(this, 0, 11);
+ m_boxLayout->addWidget(m_lineEdit);
+ m_boxLayout->addWidget(m_selectButton);
+
+ setSizePolicy(m_lineEdit->sizePolicy());
+ m_lineEdit->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ m_selectButton->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding));
+
+ connect(m_selectButton, SIGNAL(clicked()), this, SLOT(makeSelection()));
+
+ setSelectionType(Open);
+ setSelectionOpenMultiple(false);
+}
+
+FileSelector::~FileSelector()
+{
+}
+
+QString FileSelector::currentState() const
+{
+ return QString("default");
+}
+
+bool FileSelector::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList FileSelector::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void FileSelector::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void FileSelector::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString FileSelector::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void FileSelector::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText(populationText());
+ setWidgetText(txt);
+}
+
+void FileSelector::setWidgetText(const QString& a_text)
+{
+ m_lineEdit->setText(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+FileSelector::SelectionType FileSelector::selectionType() const
+{
+ return m_selectionType;
+}
+
+void FileSelector::setSelectionType(SelectionType a_selectionType)
+{
+ m_selectionType = a_selectionType;
+ delete m_lineEdit->completionObject();
+ if (m_selectionType == Directory)
+ m_lineEdit->setCompletionObject(new KURLCompletion(KURLCompletion::DirCompletion));
+ else
+ m_lineEdit->setCompletionObject(new KURLCompletion(KURLCompletion::FileCompletion));
+
+}
+
+QString FileSelector::selectionFilter() const
+{
+ return m_filter;
+}
+
+void FileSelector::setSelectionFilter(const QString& a_filter)
+{
+ m_filter = a_filter;
+}
+
+QString FileSelector::selectionCaption() const
+{
+ return m_caption;
+}
+
+void FileSelector::setSelectionCaption(const QString& a_caption)
+{
+ m_caption = a_caption;
+}
+
+bool FileSelector::selectionOpenMultiple() const
+{
+ return m_openMultiple;
+}
+
+void FileSelector::setSelectionOpenMultiple(bool a_openMultiple)
+{
+ m_openMultiple = a_openMultiple;
+}
+
+void FileSelector::makeSelection()
+{
+ QString text;
+ if (m_selectionType == Open && m_openMultiple)
+ text = KFileDialog::getOpenFileNames(m_lineEdit->text(), m_filter, this, m_caption).join("\n");
+ else if (m_selectionType == Open && !m_openMultiple)
+ text = KFileDialog::getOpenFileName(m_lineEdit->text(), m_filter, this, m_caption);
+ else if (m_selectionType == Save)
+ text = KFileDialog::getSaveFileName(m_lineEdit->text(), m_filter, this, m_caption);
+ else if (m_selectionType == Directory)
+ text = KFileDialog::getExistingDirectory(m_lineEdit->text(), this, m_caption);
+
+ if (!text.isEmpty())
+ setWidgetText(text);
+}
+
+QString FileSelector::caption() const
+{
+ return m_selectButton->text();
+}
+
+void FileSelector::setCaption(const QString& a_text)
+{
+ m_selectButton->setText(a_text);
+}
+
+bool FileSelector::showEditor() const
+{
+ return m_lineEdit->isVisible();
+}
+
+void FileSelector::setShowEditor(bool a_visible)
+{
+ if (a_visible)
+ m_lineEdit->show();
+ else
+ m_lineEdit->hide();
+}
+
+void FileSelector::showEvent(QShowEvent * e)
+{
+ QWidget::showEvent(e);
+ emit widgetOpened();
+}
+
+void FileSelector::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool FileSelector::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection ||
+ f == DCOP::clear;
+}
+
+QString FileSelector::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return m_lineEdit->text();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::selection:
+ return m_lineEdit->selectedText();
+ case DCOP::setSelection:
+ {
+ int f = m_lineEdit->text().find(args[0]);
+ if (f != -1)
+ m_lineEdit->setSelection(f, args[0].length());
+ break;
+ }
+ case DCOP::clear:
+ setWidgetText(QString::null);
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "fileselector.moc"
diff --git a/kommander/widgets/fileselector.h b/kommander/widgets/fileselector.h
new file mode 100644
index 00000000..9da6847d
--- /dev/null
+++ b/kommander/widgets/fileselector.h
@@ -0,0 +1,102 @@
+/***************************************************************************
+ fileselector.h - File selection widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_FILESELECTOR_H_
+#define _HAVE_FILESELECTOR_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstringlist.h>
+#include <qstring.h>
+#include <qwidget.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+
+class QBoxLayout;
+class KPushButton;
+class KLineEdit;
+
+class QShowEvent;
+class KOMMANDER_EXPORT FileSelector : public QWidget, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_PROPERTY(bool showEditor READ showEditor WRITE setShowEditor)
+ Q_PROPERTY(QString buttonCaption READ caption WRITE setCaption)
+ Q_PROPERTY(QString selectionFilter READ selectionFilter WRITE setSelectionFilter)
+ Q_PROPERTY(QString selectionCaption READ selectionCaption WRITE setSelectionCaption)
+ Q_PROPERTY(SelectionType selectionType READ selectionType WRITE setSelectionType)
+ Q_ENUMS(SelectionType)
+ Q_PROPERTY(bool selectionOpenMultiple READ selectionOpenMultiple WRITE setSelectionOpenMultiple)
+
+public:
+ FileSelector(QWidget *a_parent, const char *a_name);
+ ~FileSelector();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ enum SelectionType { Open, Save, Directory };
+ SelectionType selectionType() const;
+ void setSelectionType(SelectionType);
+ bool selectionOpenMultiple() const;
+ void setSelectionOpenMultiple(bool);
+ QString selectionFilter() const;
+ void setSelectionFilter(const QString&);
+ QString selectionCaption() const;
+ void setSelectionCaption(const QString&);
+ QString caption() const;
+ void setCaption(const QString&);
+ bool showEditor() const;
+ void setShowEditor(bool);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void makeSelection();
+ virtual void populate();
+
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void contextMenuEvent( QContextMenuEvent * e );
+
+ bool m_openMultiple;
+ QString m_caption;
+ QString m_filter;
+ SelectionType m_selectionType;
+ KLineEdit *m_lineEdit;
+ KPushButton *m_selectButton;
+ QBoxLayout *m_boxLayout;
+ void showEvent(QShowEvent *e);
+private:
+};
+
+#endif
diff --git a/kommander/widgets/fontdialog.cpp b/kommander/widgets/fontdialog.cpp
new file mode 100644
index 00000000..432b2d7f
--- /dev/null
+++ b/kommander/widgets/fontdialog.cpp
@@ -0,0 +1,158 @@
+//
+// C++ Implementation: FontDialog
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "fontdialog.h"
+
+#include "kommanderplugin.h"
+#include "specials.h"
+
+#include <kfontdialog.h>
+#include <kiconloader.h>
+#include <klocale.h>
+
+enum Functions {
+ FirstFunction = 139,
+ SetFont,
+ Family,
+ PointSize,
+ Bold,
+ Italic,
+ LastFunction
+};
+
+FontDialog::FontDialog(QWidget *parent, const char *name)
+ : QLabel(parent, name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ if (KommanderWidget::inEditor)
+ {
+ setPixmap(KGlobal::iconLoader()->loadIcon("kfontcombo", KIcon::NoGroup, KIcon::SizeMedium));
+ setFrameStyle(QFrame::Box | QFrame::Plain);
+ setLineWidth(1);
+ setFixedSize(pixmap()->size());
+ }
+ else
+ setHidden(true);
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(SetFont, "setFont(QString widget, QString family, int pointSize, bool bold, bool italic)",
+ i18n("Sets the default font for the dialog, by specifying the family, the size and other style options."), 2, 5);
+ KommanderPlugin::registerFunction(Family, "family(QString widget)",
+ i18n("Returns the font family."), 1);
+ KommanderPlugin::registerFunction(PointSize, "pointSize(QString widget)",
+ i18n("Returns the font size in point."), 1);
+ KommanderPlugin::registerFunction(Bold, "bold(QString widget)",
+ i18n("Returns true, if the font is bold."), 1);
+ KommanderPlugin::registerFunction(Italic, "italic(QString widget)",
+ i18n("Returns true, if the font is italic."), 1);
+}
+
+FontDialog::~FontDialog()
+{
+}
+
+QString FontDialog::currentState() const
+{
+ return QString("default");
+}
+
+bool FontDialog::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList FontDialog::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void FontDialog::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void FontDialog::setWidgetText(const QString& a_text)
+{
+ KommanderWidget::setAssociatedText(a_text);
+}
+
+void FontDialog::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString FontDialog::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void FontDialog::populate()
+{
+ setAssociatedText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+bool FontDialog::isFunctionSupported(int f)
+{
+ return (f > FirstFunction && f < LastFunction) || f == DCOP::execute;
+}
+
+QString FontDialog::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case SetFont:
+ {
+ m_font.setFamily(args[0]);
+ if (args[1].isEmpty())
+ m_font.setPointSize(12);
+ else
+ m_font.setPointSize(args[1].toInt());
+ m_font.setBold(args[2] == "1" || args[2].upper() == "TRUE");
+ m_font.setItalic(args[3] == "1" || args[3].upper() == "TRUE");
+ break;
+ }
+ case Family:
+ {
+ return m_font.family();
+ break;
+ }
+ case PointSize:
+ {
+ return QString::number(m_font.pointSize());
+ break;
+ }
+ case Bold:
+ {
+ return m_font.bold() ? "1" : "0";
+ }
+ case Italic:
+ {
+ return m_font.italic() ? "1" : "0";
+ }
+ case DCOP::execute:
+ {
+ int result = KFontDialog::getFont( m_font );
+ if ( result == KFontDialog::Accepted )
+ {
+ return m_font.toString();
+ }
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+
+#include "fontdialog.moc"
diff --git a/kommander/widgets/fontdialog.h b/kommander/widgets/fontdialog.h
new file mode 100644
index 00000000..38bf7830
--- /dev/null
+++ b/kommander/widgets/fontdialog.h
@@ -0,0 +1,50 @@
+//
+// C++ Interface: colordialog
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef FONTDIALOG_H
+#define FONTDIALOG_H
+
+#include <qlabel.h>
+#include <kommanderwidget.h>
+
+#include <qfont.h>
+
+/**
+ @author Andras Mantia <amantia@kdewebdev.org>
+*/
+class FontDialog : public QLabel, public KommanderWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ FontDialog(QWidget *parent = 0, const char *name = 0);
+
+ ~FontDialog();
+
+ virtual bool isKommanderWidget() const;
+ virtual QString currentState() const;
+ virtual bool isFunctionSupported(int function);
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual QStringList associatedText() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void populate();
+
+ QFont m_font;
+};
+
+#endif
diff --git a/kommander/widgets/groupbox.cpp b/kommander/widgets/groupbox.cpp
new file mode 100644
index 00000000..29947eb1
--- /dev/null
+++ b/kommander/widgets/groupbox.cpp
@@ -0,0 +1,152 @@
+/***************************************************************************
+ groupbox.cpp - Groupbox widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qgroupbox.h>
+#include <qobjectlist.h>
+#include <klocale.h>
+
+/* OTHER INCLUDES */
+#include "kommanderplugin.h"
+#include <specials.h>
+#include "groupbox.h"
+
+
+GroupBox::GroupBox(QWidget *a_parent, const char *a_name)
+ : QGroupBox(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+}
+
+GroupBox::~GroupBox()
+{
+}
+
+QString GroupBox::currentState() const
+{
+ return QString("default");
+}
+
+bool GroupBox::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList GroupBox::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void GroupBox::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void GroupBox::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString GroupBox::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void GroupBox::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText( populationText() );
+//FIXME: setWidgetText( txt );
+}
+
+/* We need to keep track of all widgets created as a child of a groupbox, in order of creation. */
+void GroupBox::insertChild(QObject *a_child)
+{
+ m_childList.append(a_child);
+ QObject::insertChild(a_child);
+}
+
+void GroupBox::removeChild(QObject *a_child)
+{
+ m_childList.remove(a_child);
+ QObject::removeChild(a_child);
+}
+
+void GroupBox::showEvent( QShowEvent *e )
+{
+ QGroupBox::showEvent(e);
+ emit widgetOpened();
+}
+
+void GroupBox::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool GroupBox::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+// || (f >= FirstFunction && f <= LastFunction);
+}
+
+QString GroupBox::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ {
+ QString text;
+ for (QObjectListIt it(m_childList); it.current(); ++it)
+ if (dynamic_cast<KommanderWidget*>(it.current()))
+ text += (dynamic_cast<KommanderWidget*>(it.current()))->evalAssociatedText();
+ return text;
+ }
+ case DCOP::setText:
+ setTitle(args[0]);
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+
+}
+
+#include "groupbox.moc"
diff --git a/kommander/widgets/groupbox.h b/kommander/widgets/groupbox.h
new file mode 100644
index 00000000..b7de75e1
--- /dev/null
+++ b/kommander/widgets/groupbox.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ groupbox.h - Groupbox widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_GROUPBOX_H_
+#define _HAVE_GROUPBOX_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qgroupbox.h>
+#include <qobject.h>
+#include <qstringlist.h>
+#include <qstring.h>
+#include <qobjectlist.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT GroupBox : public QGroupBox, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ GroupBox(QWidget *a_parent, const char *a_name);
+ ~GroupBox();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual void insertChild(QObject*);
+ virtual void removeChild(QObject*);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString &);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ QObjectList m_childList;
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/konsole.cpp b/kommander/widgets/konsole.cpp
new file mode 100644
index 00000000..587f2318
--- /dev/null
+++ b/kommander/widgets/konsole.cpp
@@ -0,0 +1,153 @@
+/***************************************************************************
+ konsole.cpp - Widget that shows output of a process
+ -------------------
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* QT INCLUDES */
+#include <qcursor.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qwidget.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <specials.h>
+#include "konsole.h"
+#include <myprocess.h>
+
+Konsole::Konsole(QWidget* a_parent, const char* a_name)
+ : KTextEdit(a_parent, a_name), KommanderWidget(this), mSeenEOL(false), mProcess(false)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+}
+
+Konsole::~Konsole()
+{
+}
+
+QString Konsole::currentState() const
+{
+ return QString("default");
+}
+
+bool Konsole::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList Konsole::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void Konsole::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void Konsole::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString Konsole::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void Konsole::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText(populationText());
+ setWidgetText(txt);
+}
+
+void Konsole::setWidgetText(const QString&)
+{
+// FIXME: emit widgetTextChanged(a_text);
+}
+
+void Konsole::execute()
+{
+ QString at = evalAssociatedText().stripWhiteSpace();
+ if (mProcess)
+ cancel();
+ mSeenEOL = false;
+ mProcess = new MyProcess(this);
+ mProcess->setBlocking(false);
+ connect(mProcess, SIGNAL(processExited(MyProcess*)), SLOT(processExited(MyProcess*)));
+ connect(mProcess, SIGNAL(processReceivedStdout(MyProcess*, char*, int)), SLOT(processReceivedStdout(MyProcess*, char*, int)));
+ setCursor(QCursor(Qt::WaitCursor));
+ mProcess->run(at);
+}
+
+void Konsole::cancel()
+{
+ if (!mProcess)
+ return;
+ mProcess->cancel();
+ processExited(mProcess);
+}
+
+
+void Konsole::processReceivedStdout(MyProcess*, char* buffer, int buflen)
+{
+ QString pBuf = QString::fromLocal8Bit(buffer, buflen);
+ if (mSeenEOL)
+ pBuf = '\n' + pBuf;
+ mSeenEOL = pBuf[pBuf.length()-1] == '\n';
+ if (mSeenEOL)
+ pBuf = pBuf.left(pBuf.length()-1);
+ insert(pBuf);
+}
+
+void Konsole::processExited(MyProcess*)
+{
+ unsetCursor();
+ delete mProcess;
+ mProcess = 0;
+ emit finished();
+}
+
+bool Konsole::isFunctionSupported(int f)
+{
+ return f == DCOP::setText || f == DCOP::text || f == DCOP::clear || f == DCOP::execute || f == DCOP::cancel;
+}
+
+QString Konsole::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::text:
+ return text();
+ case DCOP::clear:
+ clear();
+ break;
+ case DCOP::execute:
+ execute();
+ break;
+ case DCOP::cancel:
+ cancel();
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "konsole.moc"
diff --git a/kommander/widgets/konsole.h b/kommander/widgets/konsole.h
new file mode 100644
index 00000000..a031adef
--- /dev/null
+++ b/kommander/widgets/konsole.h
@@ -0,0 +1,74 @@
+/***************************************************************************
+ konsole.h - Widget that shows output of a process
+ -------------------
+ copyright : (C) 2004 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 _HAVE_KONSOLE_H_
+#define _HAVE_KONSOLE_H_
+
+/* KDE INCLUDES */
+#include <ktextedit.h>
+
+/* QT INCLUDES */
+#include <qobject.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+
+class QWidget;
+class MyProcess;
+
+class KOMMANDER_EXPORT Konsole : public KTextEdit, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_OVERRIDE(bool readOnly DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+ public:
+ Konsole(QWidget *a_parent, const char *a_name);
+ ~Konsole();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+ public slots:
+ virtual void populate();
+ virtual void setWidgetText(const QString &);
+ // Execute current script
+ virtual void execute();
+ // Stop executing current script
+ virtual void cancel();
+ // Process has ended
+ virtual void processReceivedStdout(MyProcess*, char* a_buffer, int a_len);
+ virtual void processExited(MyProcess* p);
+ signals:
+ void finished();
+ protected:
+ // Whether last line of output was ended with EOL
+ bool mSeenEOL;
+ // Current process or NULL if there is no process running
+ MyProcess* mProcess;
+};
+
+#endif
diff --git a/kommander/widgets/label.cpp b/kommander/widgets/label.cpp
new file mode 100644
index 00000000..a9a24e3b
--- /dev/null
+++ b/kommander/widgets/label.cpp
@@ -0,0 +1,127 @@
+/***************************************************************************
+ label.cpp - label widget
+ -------------------
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <specials.h>
+#include "label.h"
+
+Label::Label(QWidget *a_parent, const char *a_name)
+ : QLabel(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ if (KommanderWidget::inEditor && a_name)
+ setText(a_name);
+}
+
+Label::~Label()
+{
+}
+
+QString Label::currentState() const
+{
+ return QString("default");
+}
+
+bool Label::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList Label::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void Label::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void Label::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString Label::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void Label::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
+}
+
+void Label::setWidgetText(const QString& a_text)
+{
+ setText(a_text);
+}
+
+void Label::showEvent(QShowEvent *e)
+{
+ QLabel::showEvent(e);
+ emit widgetOpened();
+}
+
+bool Label::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+}
+
+QString Label::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return text();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::clear:
+ setWidgetText("");
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "label.moc"
diff --git a/kommander/widgets/label.h b/kommander/widgets/label.h
new file mode 100644
index 00000000..216998db
--- /dev/null
+++ b/kommander/widgets/label.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ label.h - label widget
+ -------------------
+ copyright : (C) 2004 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 _HAVE_LABEL_H_
+#define _HAVE_LABEL_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <qlabel.h>
+
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT Label : public QLabel, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ Label(QWidget *a_parent, const char *a_name);
+ ~Label();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+protected:
+ void showEvent(QShowEvent *e);
+private:
+};
+
+#endif
diff --git a/kommander/widgets/lineedit.cpp b/kommander/widgets/lineedit.cpp
new file mode 100644
index 00000000..d243660a
--- /dev/null
+++ b/kommander/widgets/lineedit.cpp
@@ -0,0 +1,182 @@
+/***************************************************************************
+ lineedit.cpp - Lineedit widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* QT INCLUDES */
+#include <qlayout.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "lineedit.h"
+#include <klocale.h>
+#include <kommanderplugin.h>
+
+enum functions {
+ FirstFunction = 440,
+ LE_clearModified,
+ LastFunction
+};
+
+LineEdit::LineEdit(QWidget *a_parent, const char *a_name)
+ : KLineEdit(a_parent, a_name), KommanderWidget((QObject *)this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+
+ connect(this, SIGNAL(textChanged(const QString &)), this,
+ SIGNAL(widgetTextChanged(const QString &)));
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(LE_clearModified, "clearModified(QString widget)", i18n("Clear widget modified status."), 1);
+}
+
+void LineEdit::showEvent(QShowEvent *e)
+{
+ QLineEdit::showEvent(e);
+ emit widgetOpened();
+}
+
+void LineEdit::focusInEvent( QFocusEvent * e)
+{
+ QLineEdit::focusInEvent(e);
+ emit gotFocus();
+}
+
+void LineEdit::focusOutEvent( QFocusEvent * e)
+{
+ QLineEdit::focusOutEvent(e);
+ emit lostFocus();
+}
+
+QString LineEdit::currentState() const
+{
+ return QString("default");
+}
+
+LineEdit::~LineEdit()
+{
+}
+
+bool LineEdit::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList LineEdit::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void LineEdit::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void LineEdit::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString LineEdit::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void LineEdit::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText(populationText());
+ setWidgetText(txt);
+}
+
+void LineEdit::setSelectedWidgetText(const QString& a_text)
+{
+ insert(a_text);
+}
+
+void LineEdit::setWidgetText(const QString& a_text)
+{
+ setText(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void LineEdit::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool LineEdit::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection ||
+ f == DCOP::clear || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction) ;
+}
+
+QString LineEdit::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return text();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::selection:
+ return selectedText();
+ case DCOP::setSelection:
+ setSelectedWidgetText(args[0]);
+ break;
+ case DCOP::clear:
+ setWidgetText("");
+ break;
+ case DCOP::setEditable:
+ setReadOnly(args[0] == "false" || args[0] == "0");
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::hasFocus:
+ return QString::number(this->hasFocus());
+ break;
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ case DCOP::isModified:
+ return isModified() ? "1" : "0";
+ break;
+ case LE_clearModified:
+ this->clearModified();
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+
+#include "lineedit.moc"
diff --git a/kommander/widgets/lineedit.h b/kommander/widgets/lineedit.h
new file mode 100644
index 00000000..8b4d403a
--- /dev/null
+++ b/kommander/widgets/lineedit.h
@@ -0,0 +1,72 @@
+/***************************************************************************
+ lineedit.h - Lineedit widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_LINEEDIT_H_
+#define _HAVE_LINEEDIT_H_
+
+/* KDE INCLUDES */
+#include <klineedit.h>
+
+/* QT INCLUDES */
+#include <qtextedit.h>
+#include <qstringlist.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+
+#include <kommander_export.h>
+class QShowEvent;
+
+class KOMMANDER_EXPORT LineEdit : public KLineEdit, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ LineEdit(QWidget *, const char *);
+ virtual ~LineEdit();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void setSelectedWidgetText(const QString &a_text);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString &);
+ void contextMenuRequested(int xpos, int ypos);
+ void gotFocus();
+ void lostFocus();
+protected:
+ virtual void showEvent( QShowEvent *e );
+ void contextMenuEvent( QContextMenuEvent * e );
+ void focusInEvent( QFocusEvent* e);
+ void focusOutEvent( QFocusEvent* e);
+private:
+};
+
+#endif
diff --git a/kommander/widgets/listbox.cpp b/kommander/widgets/listbox.cpp
new file mode 100644
index 00000000..19b1b540
--- /dev/null
+++ b/kommander/widgets/listbox.cpp
@@ -0,0 +1,225 @@
+/***************************************************************************
+ listbox.cpp - Listbox widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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. *
+ * *
+ ***************************************************************************/
+/* KDE INCLUDES */
+#include <kglobal.h>
+#include <kiconloader.h>
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <specials.h>
+#include "listbox.h"
+
+ListBox::ListBox(QWidget *a_parent, const char *a_name)
+ : KListBox(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+}
+
+ListBox::~ListBox()
+{
+}
+
+QString ListBox::currentState() const
+{
+ return QString("default");
+}
+
+bool ListBox::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList ListBox::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void ListBox::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void ListBox::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString ListBox::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void ListBox::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText(populationText());
+ setWidgetText(txt);
+}
+
+void ListBox::setWidgetText(const QString& a_text)
+{
+ clear();
+ insertStringList(QStringList::split("\n", a_text));
+ emit widgetTextChanged(a_text);
+}
+
+void ListBox::showEvent(QShowEvent *e)
+{
+ QListBox::showEvent(e);
+ emit widgetOpened();
+}
+
+bool ListBox::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection ||
+ f == DCOP::insertItems || f == DCOP::insertItem || f == DCOP::removeItem || f == DCOP::clear ||
+ f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::item || f == DCOP::addUniqueItem ||
+ f == DCOP::findItem || f == DCOP::setPixmap || f == DCOP::count || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+}
+
+void ListBox::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+
+QString ListBox::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::selection:
+ {
+ if (selectionMode() == Single)
+ return currentText();
+ QString value;
+ for (uint i=0; i<count(); i++)
+ if (isSelected(i))
+ value += (value.length() ? "\n" : "") + item(i)->text();
+ return value;
+ }
+ case DCOP::setSelection:
+ {
+ QListBoxItem* found = findItem(args[0], Qt::ExactMatch);
+ if (found)
+ setCurrentItem(index(found));
+ break;
+ }
+ case DCOP::insertItems:
+ insertStringList(QStringList::split("\n", args[0]), args[1].toInt());
+ break;
+ case DCOP::insertItem:
+ insertItem(args[0], args[1].toInt());
+ break;
+ case DCOP::removeItem:
+ removeItem(args[0].toInt());
+ break;
+ case DCOP::clear:
+ clear();
+ break;
+ case DCOP::count:
+ return QString::number(count());
+ case DCOP::currentItem:
+ return QString::number(currentItem());
+ case DCOP::setCurrentItem:
+ {
+ int index = args[0].toInt();
+ if (index < (int)count())
+ setCurrentItem(index);
+ break;
+ }
+ case DCOP::item:
+ {
+ int index = args[0].toInt();
+ if (index >= 0 && index < (int)count())
+ return item(index)->text();
+ else
+ return QString();
+ }
+ case DCOP::addUniqueItem:
+ if (!findItem(args[0], Qt::ExactMatch))
+ insertItem(args[0]);
+ break;
+ case DCOP::findItem:
+ {
+ QListBoxItem* found = findItem(args[0], Qt::ExactMatch);
+ if (!found) found = findItem(args[0], Qt::BeginsWith);
+ if (!found) found = findItem(args[0], Qt::Contains);
+ if (found)
+ return QString::number(index(found));
+ else return QString::number(-1);
+ break;
+ }
+ case DCOP::setPixmap:
+ {
+ QPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small);
+ if (pixmap.isNull())
+ pixmap.load(args[0]);
+ int index = args[1].toInt();
+ if (index == -1)
+ {
+ for (uint i=0; i<count(); i++)
+ changeItem(pixmap, text(i), i);
+ }
+ else if (index < (int)count())
+ changeItem(pixmap, text(index), index);
+ break;
+ }
+ case DCOP::text:
+ {
+ QStringList strings;
+ for(uint i=0; i < count() ; ++i)
+ strings += item(i)->text();
+ return strings.join("\n");
+ }
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::hasFocus:
+ return QString::number(this->hasFocus());
+ break;
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "listbox.moc"
diff --git a/kommander/widgets/listbox.h b/kommander/widgets/listbox.h
new file mode 100644
index 00000000..516e9f86
--- /dev/null
+++ b/kommander/widgets/listbox.h
@@ -0,0 +1,67 @@
+/***************************************************************************
+ listbox.h - Listbox widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_LISTBOX_H_
+#define _HAVE_LISTBOX_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <klistbox.h>
+#include <kommander_export.h>
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT ListBox : public KListBox, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ ListBox(QWidget *a_parent, const char *a_name);
+ ~ListBox();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/pixmaplabel.cpp b/kommander/widgets/pixmaplabel.cpp
new file mode 100644
index 00000000..7d7095e3
--- /dev/null
+++ b/kommander/widgets/pixmaplabel.cpp
@@ -0,0 +1,132 @@
+/***************************************************************************
+ pixmaplabel.cpp - Pixmap label widget
+ -------------------
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qpixmap.h>
+
+/* KDE INCLUDES */
+#include <kglobal.h>
+#include <kiconloader.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <specials.h>
+#include "pixmaplabel.h"
+
+PixmapLabel::PixmapLabel(QWidget *a_parent, const char *a_name)
+ : QLabel(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ if (KommanderWidget::inEditor)
+ setPixmap(KGlobal::iconLoader()->loadIcon("tux", KIcon::NoGroup, 128));
+ setAutoResize(false);
+}
+
+PixmapLabel::~PixmapLabel()
+{
+}
+
+QString PixmapLabel::currentState() const
+{
+ return QString("default");
+}
+
+bool PixmapLabel::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList PixmapLabel::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void PixmapLabel::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void PixmapLabel::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString PixmapLabel::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void PixmapLabel::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
+}
+
+void PixmapLabel::setWidgetText(const QString& a_text)
+{
+ QPixmap pixmap;
+ if (pixmap.load(a_text))
+ setPixmap(pixmap);
+}
+
+void PixmapLabel::showEvent(QShowEvent *e)
+{
+ QLabel::showEvent(e);
+ emit widgetOpened();
+}
+
+void PixmapLabel::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool PixmapLabel::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry;
+}
+
+QString PixmapLabel::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::clear:
+ setPixmap(QPixmap());
+ break;
+ case DCOP::text:
+ return text();
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "pixmaplabel.moc"
diff --git a/kommander/widgets/pixmaplabel.h b/kommander/widgets/pixmaplabel.h
new file mode 100644
index 00000000..a932ad1e
--- /dev/null
+++ b/kommander/widgets/pixmaplabel.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+ pixmaplabel.h - Pixmap label widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_PIXMAPLABEL_H_
+#define _HAVE_PIXMAPLABEL_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <qlabel.h>
+
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT PixmapLabel : public QLabel, public KommanderWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ PixmapLabel(QWidget *a_parent, const char *a_name);
+ ~PixmapLabel();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/pixmaps/textbold.xpm b/kommander/widgets/pixmaps/textbold.xpm
new file mode 100644
index 00000000..6787a461
--- /dev/null
+++ b/kommander/widgets/pixmaps/textbold.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static const char * const bold_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ......... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" ........ ",
+" ... .... ",
+" ... .... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" .......... ",
+" ",
+" ",
+" ",
+" "};
diff --git a/kommander/widgets/pixmaps/textcenter.xpm b/kommander/widgets/pixmaps/textcenter.xpm
new file mode 100644
index 00000000..59eeb565
--- /dev/null
+++ b/kommander/widgets/pixmaps/textcenter.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static const char * const center_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ",
+" "};
diff --git a/kommander/widgets/pixmaps/textitalic.xpm b/kommander/widgets/pixmaps/textitalic.xpm
new file mode 100644
index 00000000..4cbee92c
--- /dev/null
+++ b/kommander/widgets/pixmaps/textitalic.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static const char * const italic_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ..... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ..... ",
+" ",
+" ",
+" ",
+" "};
diff --git a/kommander/widgets/pixmaps/textleft.xpm b/kommander/widgets/pixmaps/textleft.xpm
new file mode 100644
index 00000000..129a93a4
--- /dev/null
+++ b/kommander/widgets/pixmaps/textleft.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static const char * const left_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ",
+" "};
diff --git a/kommander/widgets/pixmaps/textright.xpm b/kommander/widgets/pixmaps/textright.xpm
new file mode 100644
index 00000000..71544c87
--- /dev/null
+++ b/kommander/widgets/pixmaps/textright.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static const char * const right_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ",
+" "};
diff --git a/kommander/widgets/pixmaps/textunder.xpm b/kommander/widgets/pixmaps/textunder.xpm
new file mode 100644
index 00000000..37882c45
--- /dev/null
+++ b/kommander/widgets/pixmaps/textunder.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static const char * const under_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ..... .... ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... .. ",
+" ... .. ",
+" ...... ",
+" ",
+" ............ ",
+" ",
+" ",
+" "};
diff --git a/kommander/widgets/plugin.cpp b/kommander/widgets/plugin.cpp
new file mode 100644
index 00000000..9319bc00
--- /dev/null
+++ b/kommander/widgets/plugin.cpp
@@ -0,0 +1,138 @@
+/***************************************************************************
+ plugins.cpp - Kommander Plugins
+ -------------------
+ copyright : (C) 2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004-2006 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 <kommanderplugin.h>
+#include <kiconloader.h>
+
+/* WIDGET INCLUDES */
+#include "buttongroup.h"
+#include "checkbox.h"
+#include "closebutton.h"
+#include "combobox.h"
+#include "datepicker.h"
+#include "dialog.h"
+#include "execbutton.h"
+#include "fileselector.h"
+#include "groupbox.h"
+#include "konsole.h"
+#include "label.h"
+#include "lineedit.h"
+#include "listbox.h"
+#include "pixmaplabel.h"
+#include "progressbar.h"
+#include "radiobutton.h"
+#include "richtexteditor.h"
+#include "scriptobject.h"
+#include "slider.h"
+#include "spinboxint.h"
+#include "statusbar.h"
+#include "subdialog.h"
+#include "tabwidget.h"
+#include "table.h"
+#include "textbrowser.h"
+#include "textedit.h"
+#include "textedit.h"
+#include "timer.h"
+#include "treewidget.h"
+#include "toolbox.h"
+#include "wizard.h"
+#include "popupmenu.h"
+#include "fontdialog.h"
+#include "aboutdialog.h"
+
+class KomStdPlugin : public KommanderPlugin
+{
+public:
+ KomStdPlugin();
+ virtual QWidget *create( const QString &key, QWidget *parent = 0, const char *name = 0 );
+};
+
+KomStdPlugin::KomStdPlugin()
+{
+ const char *group = "Kommander";
+ addWidget("Label", group, "", 0);
+ addWidget("PixmapLabel", group, "", 0);
+ addWidget("LineEdit", group, "", 0);
+ addWidget("Dialog", group, "", 0);
+ addWidget("ExecButton", group, "", 0);
+ addWidget("CloseButton", group, "", 0);
+ addWidget("Konsole", group, "", 0);
+ addWidget("TextEdit", group, "", 0);
+ addWidget("RadioButton", group, "", 0);
+ // addWidget("", group, "");
+ addWidget("GroupBox", group, "", 0);
+ addWidget("ButtonGroup", group, "", 0);
+ addWidget("CheckBox", group, "", 0);
+ addWidget("ComboBox", group, "", 0);
+ addWidget("SpinBoxInt", group, "", 0);
+ // addWidget("Wizard", group, "");
+ addWidget("TabWidget", group, "", 0);
+ addWidget("ToolBox", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("toolbox", KIcon::NoGroup, KIcon::SizeMedium)), "", true);
+ // addWidget("SubDialog", group, "");
+ addWidget("ListBox", group, "", 0);
+ addWidget("Timer", group, "", 0);
+ addWidget("ScriptObject", group, "", 0);
+ addWidget("RichTextEditor", group, "", 0);
+ addWidget("TreeWidget", group, "", 0);
+ addWidget("StatusBar", group, "", 0);
+ addWidget("TextBrowser", group, "", 0);
+ addWidget("Slider", group, "", 0);
+ addWidget("Table", group, "", 0);
+ addWidget("DatePicker", group, "", 0);
+ addWidget("PopupMenu", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("contents", KIcon::NoGroup, KIcon::SizeMedium)));
+ addWidget("FontDialog", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("kfontcombo", KIcon::NoGroup, KIcon::SizeMedium)));
+ addWidget("AboutDialog", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium)));
+}
+
+QWidget *KomStdPlugin::create( const QString &key, QWidget *parent, const char *name )
+{
+ if (key == "ButtonGroup") return new ButtonGroup(parent, name);
+ else if (key == "CheckBox") return new CheckBox(parent, name);
+ else if (key == "CloseButton") return new CloseButton(parent, name);
+ else if (key == "ComboBox") return new ComboBox(parent, name);
+ else if (key == "Dialog") return new Dialog(parent, name);
+ else if (key == "ExecButton") return new ExecButton(parent, name);
+ else if (key == "FileSelector") return new FileSelector(parent, name);
+ else if (key == "GroupBox") return new GroupBox(parent, name);
+ else if (key == "Konsole") return new Konsole(parent, name);
+ else if (key == "Label") return new Label(parent, name);
+ else if (key == "LineEdit") return new LineEdit(parent, name);
+ else if (key == "ListBox") return new ListBox(parent, name);
+ else if (key == "PixmapLabel") return new PixmapLabel(parent, name);
+ else if (key == "ProgressBar") return new ProgressBar(parent, name);
+ else if (key == "RadioButton") return new RadioButton(parent, name);
+ else if (key == "RichTextEditor") return new RichTextEditor(parent, name);
+ else if (key == "ScriptObject") return new ScriptObject(parent, name);
+ else if (key == "Slider") return new Slider(parent, name);
+ else if (key == "SpinBoxInt") return new SpinBoxInt(parent, name);
+ else if (key == "StatusBar") return new StatusBar(parent, name);
+ else if (key == "SubDialog") return new SubDialog(parent, name);
+ else if (key == "Table") return new Table(parent, name);
+ else if (key == "TabWidget") return new TabWidget(parent, name);
+ else if (key == "ToolBox") return new ToolBox(parent, name);
+ else if (key == "TextBrowser") return new TextBrowser(parent, name);
+ else if (key == "TextEdit") return new TextEdit(parent, name);
+ else if (key == "Timer") return new Timer(parent, name);
+ else if (key == "TreeWidget") return new TreeWidget(parent, name);
+ else if (key == "Wizard") return new Wizard(parent, name);
+ else if (key == "DatePicker") return new DatePicker(parent, name);
+ else if (key == "PopupMenu") return new PopupMenu(parent, name);
+ else if (key == "FontDialog") return new FontDialog(parent, name);
+ else if (key == "AboutDialog") return new AboutDialog(parent, name);
+ else return 0;
+}
+
+KOMMANDER_EXPORT_PLUGIN(KomStdPlugin)
diff --git a/kommander/widgets/popupmenu.cpp b/kommander/widgets/popupmenu.cpp
new file mode 100644
index 00000000..696bd0be
--- /dev/null
+++ b/kommander/widgets/popupmenu.cpp
@@ -0,0 +1,246 @@
+//
+// C++ Implementation: popupmenu
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "popupmenu.h"
+#include "specials.h"
+
+#include <qcursor.h>
+
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kpopupmenu.h>
+#include <kommanderplugin.h>
+
+#define INSERTMENUITEM 100
+#define INSERTSEPARATOR 101
+#define CHANGEMENUITEM 102
+#define SETITEMENABLED 103
+#define ITEMENABLED 104
+#define SETITEMVISIBLE 105
+#define SETITEMCHECKED 106
+#define ITEMVISIBLE 107
+#define ITEMCHECKED 108
+#define INSERTSUBMENU 109
+#define LAST_FUNCTION INSERTSUBMENU
+
+PopupMenu::PopupMenu(QWidget *parent, const char *name)
+ : QLabel(parent, name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ if (KommanderWidget::inEditor)
+ {
+ setPixmap(KGlobal::iconLoader()->loadIcon("contents", KIcon::NoGroup, KIcon::SizeMedium));
+ setFrameStyle(QFrame::Box | QFrame::Plain);
+ setLineWidth(1);
+ setFixedSize(pixmap()->size());
+ }
+ else
+ setHidden(true);
+
+ m_menu = new KPopupMenu(this);
+ connect(m_menu, SIGNAL(activated(int)), this, SLOT(slotMenuItemActivated(int)));
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(INSERTMENUITEM, "insertMenuItem(QString widget, QString text, QString executeWidget, int index, QString icon)", i18n("Insert an item into the popup menu. The executeWidget's execute method will be run when this item is selected. Returns the id of the inserted item. Use -1 for index to insert to the end. The icon is optional."), 4, 5);
+ KommanderPlugin::registerFunction(INSERTSEPARATOR, "insertSeparator(QString widget, int index)", i18n("Insert a separator item into the popup menu. Use -1 for index to insert to the end."), 2);
+ KommanderPlugin::registerFunction(CHANGEMENUITEM, "changeMenuItem(QString widget, int id, QString text, QString executeWidget, QString icon)", i18n("Change an item specified by id in the popup menu. The executeWidget's execute method will be run when this item is selected."), 4, 5);
+ KommanderPlugin::registerFunction(SETITEMENABLED, "setItemEnabled(QString widget, int id, bool enable)", i18n("Enable the item specified by id in the popup menu."), 3);
+ KommanderPlugin::registerFunction(ITEMENABLED, "itemEnabled(QString widget, int id)", i18n("Check if the item specified by id is enabled."), 2);
+ KommanderPlugin::registerFunction(SETITEMVISIBLE, "setItemVisible(QString widget, int id, bool enable)", i18n("Make the item specified by id visible."), 3);
+ KommanderPlugin::registerFunction(SETITEMCHECKED, "setItemChecked(QString widget, int id, bool enable)", i18n("Apply checked status for the item specified by id."), 3);
+ KommanderPlugin::registerFunction(ITEMVISIBLE, "itemVisible(QString widget, int id)", i18n("Check if the item specified by id is visible."), 2);
+ KommanderPlugin::registerFunction(ITEMCHECKED, "itemChecked(QString widget, int id)", i18n("Verify if the item specified by id is checked."), 2);
+ KommanderPlugin::registerFunction(INSERTSUBMENU, "insertSubmenu(QString widget, QString text, QString menuWidget, int index, QString icon)", i18n("Insert submenu widget into the popup menu. Use -1 for index to insert to the end. The icon is optional."), 4, 5);
+}
+
+
+PopupMenu::~PopupMenu()
+{
+ delete m_menu;
+}
+
+QString PopupMenu::currentState() const
+{
+ return QString("default");
+}
+
+bool PopupMenu::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList PopupMenu::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void PopupMenu::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void PopupMenu::setWidgetText(const QString& a_text)
+{
+ KommanderWidget::setAssociatedText(a_text);
+}
+
+void PopupMenu::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString PopupMenu::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void PopupMenu::popup(int x, int y)
+{
+ m_menu->exec(QPoint(x, y));
+}
+
+void PopupMenu::slotMenuItemActivated(int id)
+{
+ QString widget = m_associations[id];
+ KommanderWidget::evalAssociatedText(QString("#!kommander\n%1.execute(%2)").arg(widget).arg(id));
+}
+
+void PopupMenu::populate()
+{
+ setAssociatedText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+QString PopupMenu::insertSubmenu(const QString& title, const QString &menuWidget, int index, const QString& icon)
+{
+ KommanderWidget *w = widgetByName(menuWidget);
+ if (dynamic_cast<PopupMenu*>(w))
+ {
+ if (icon.isEmpty())
+ return QString::number(m_menu->insertItem(title, dynamic_cast<PopupMenu*>(w)->menu(), index));
+ else
+ return QString::number( m_menu->insertItem(KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, KIcon::SizeMedium), title, dynamic_cast<PopupMenu*>(w)->menu(), index));
+ }
+ return QString();
+}
+
+
+bool PopupMenu::isFunctionSupported(int f)
+{
+ return f == DCOP::clear || f == DCOP::execute || f == DCOP::item || (f >= INSERTMENUITEM && f <= LAST_FUNCTION) || f == DCOP::count || f == DCOP::geometry;
+}
+
+QString PopupMenu::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::clear:
+ m_menu->clear();
+ m_associations.clear();
+ break;
+ case DCOP::execute:
+ m_params = args;
+ evalAssociatedText();
+ break;
+ case INSERTMENUITEM:
+ {
+ uint index = args[2].toInt();
+ int id = -1;
+ if (args[3].isEmpty())
+ id = m_menu->insertItem(args[0], index);
+ else
+ id = m_menu->insertItem(KGlobal::iconLoader()->loadIcon(args[3], KIcon::NoGroup, KIcon::SizeMedium), args[0], index);
+ m_associations[id] = args[1];
+ return QString::number(id);
+ break;
+ }
+ case INSERTSUBMENU:
+ {
+ return insertSubmenu(args[0], args[1], args[2].toInt(), args[3]);
+ break;
+ }
+ case CHANGEMENUITEM:
+ {
+ uint id = args[0].toInt();
+ if (args[3].isEmpty())
+ m_menu->changeItem(id, args[1]);
+ else
+ m_menu->changeItem(id, KGlobal::iconLoader()->loadIcon(args[3], KIcon::NoGroup, KIcon::SizeMedium), args[1]);
+ m_associations[id] = args[2];
+ break;
+ }
+ case INSERTSEPARATOR:
+ {
+ uint index = args[0].toInt();
+ m_menu->insertSeparator(index);
+ }
+ case SETITEMENABLED:
+ {
+ uint id = args[0].toInt();
+ m_menu->setItemEnabled(id, args[1] == "true" || args[1] == "1" ? true : false);
+ break;
+ }
+ case ITEMENABLED:
+ {
+ uint id = args[0].toInt();
+ return m_menu->isItemEnabled(id) ? "1" : "0";
+ break;
+ }
+ case SETITEMVISIBLE:
+ {
+ uint id = args[0].toInt();
+ m_menu->setItemVisible(id, args[1] == "true" || args[1] == "1" ? true : false);
+ break;
+ }
+ case SETITEMCHECKED:
+ {
+ uint id = args[0].toInt();
+ m_menu->setItemChecked(id, args[1] == "true" || args[1] == "1" ? true : false);
+ break;
+ }
+ case ITEMVISIBLE:
+ {
+ uint id = args[0].toInt();
+ return m_menu->isItemVisible(id) ? "1" : "0";
+ break;
+ }
+ case ITEMCHECKED:
+ {
+ uint id = args[0].toInt();
+ return m_menu->isItemChecked(id) ? "1" : "0";
+ break;
+ }
+ case DCOP::item:
+ {
+ uint index = args[0].toInt();
+ return index < m_params.count() ? m_params[index] : QString::null;
+ break;
+ }
+ case DCOP::count:
+ return QString::number(m_menu->count());
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+
+#include "popupmenu.moc"
diff --git a/kommander/widgets/popupmenu.h b/kommander/widgets/popupmenu.h
new file mode 100644
index 00000000..f2db18a6
--- /dev/null
+++ b/kommander/widgets/popupmenu.h
@@ -0,0 +1,61 @@
+//
+// C++ Interface: popupmenu
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef POPUPMENU_H
+#define POPUPMENU_H
+
+#include <qlabel.h>
+#include <qmap.h>
+#include <kommanderwidget.h>
+
+
+class KPopupMenu;
+
+/**
+ @author Andras Mantia <amantia@kdewebdev.org>
+*/
+class PopupMenu : public QLabel, public KommanderWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ PopupMenu(QWidget *parent = 0, const char *name = 0);
+ ~PopupMenu();
+
+ virtual bool isKommanderWidget() const;
+ virtual QString currentState() const;
+ virtual bool isFunctionSupported(int function);
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual QStringList associatedText() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ KPopupMenu *menu() {return m_menu;}
+
+public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void populate();
+ void popup(int x, int y);
+
+private slots:
+ void slotMenuItemActivated(int id);
+
+private:
+ QString insertSubmenu(const QString& title, const QString &menuWidget, int index, const QString& icon);
+
+ KPopupMenu *m_menu;
+ QMap<int, QString> m_associations;
+ QStringList m_params;
+};
+
+#endif
diff --git a/kommander/widgets/progressbar.cpp b/kommander/widgets/progressbar.cpp
new file mode 100644
index 00000000..874601f5
--- /dev/null
+++ b/kommander/widgets/progressbar.cpp
@@ -0,0 +1,144 @@
+/***************************************************************************
+ progressbar.cpp - ProgressBar widget
+ -------------------
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <klocale.h>
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "progressbar.h"
+#include "kommanderplugin.h"
+
+enum Functions {
+ FirstFunction = 585,
+ PB_setHighlightColor,
+ PB_setHightlightTextColor,
+ LastFunction
+};
+
+ProgressBar::ProgressBar(QWidget *a_parent, const char *a_name)
+ : KProgress(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(PB_setHighlightColor, "setBarColor(QString widget, QString Color)", i18n("Sets the ProgresBar color"), 2);
+ KommanderPlugin::registerFunction(PB_setHightlightTextColor, "setBarTextColor(QString widget, QString Color)", i18n("Sets the ProgresBar text color"), 2);
+}
+
+ProgressBar::~ProgressBar()
+{
+}
+
+QString ProgressBar::currentState() const
+{
+ return QString("default");
+}
+
+bool ProgressBar::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList ProgressBar::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void ProgressBar::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void ProgressBar::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString ProgressBar::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void ProgressBar::populate()
+{
+ setProgress(KommanderWidget::evalAssociatedText(populationText()).toUInt());
+}
+
+void ProgressBar::showEvent(QShowEvent *e)
+{
+ QProgressBar::showEvent(e);
+ emit widgetOpened();
+}
+
+bool ProgressBar::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::setMaximum || f == DCOP::geometry || (f > FirstFunction && f < LastFunction);
+}
+
+QString ProgressBar::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return QString::number(progress());
+ case DCOP::setText:
+ setProgress(args[0].toUInt());
+ break;
+ case DCOP::clear:
+ setProgress(0);
+ break;
+ case DCOP::setMaximum:
+ setTotalSteps(args[0].toUInt());
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case PB_setHighlightColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ QPalette p = this->palette();
+ p.setColor(QPalette::Active, QColorGroup::Highlight, color);
+ this->setPalette( p, TRUE );
+ break;
+ }
+ case PB_setHightlightTextColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ QPalette p = this->palette();
+ p.setColor(QPalette::Active, QColorGroup::HighlightedText, color);
+ this->setPalette( p, TRUE );
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "progressbar.moc"
diff --git a/kommander/widgets/progressbar.h b/kommander/widgets/progressbar.h
new file mode 100644
index 00000000..b4aa3d94
--- /dev/null
+++ b/kommander/widgets/progressbar.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ progressbar.h - ProgressBar widget
+ -------------------
+ copyright : (C) 2004 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 _HAVE_PROGRESSBAR_H_
+#define _HAVE_PROGRESSBAR_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kprogress.h>
+#include <kommanderwidget.h>
+
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT ProgressBar: public KProgress, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ ProgressBar(QWidget *a_parent, const char *a_name);
+ ~ProgressBar();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void populate();
+signals:
+ void widgetOpened();
+protected:
+ void showEvent(QShowEvent *e);
+private:
+};
+
+#endif
diff --git a/kommander/widgets/radiobutton.cpp b/kommander/widgets/radiobutton.cpp
new file mode 100644
index 00000000..a7faa91a
--- /dev/null
+++ b/kommander/widgets/radiobutton.cpp
@@ -0,0 +1,144 @@
+/***************************************************************************
+ radiobutton.cpp - Radiobutton class
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qradiobutton.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "radiobutton.h"
+
+RadioButton::RadioButton(QWidget *a_parent, const char *a_name)
+ : QRadioButton(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "unchecked";
+ states << "checked";
+ setStates(states);
+ QStringList displayStates;
+ displayStates << "checked";
+ displayStates << "unchecked";
+ setDisplayStates(displayStates);
+}
+
+RadioButton::~RadioButton()
+{
+}
+
+QString RadioButton::currentState() const
+{
+ return (isChecked() ? "checked" : "unchecked");
+}
+
+bool RadioButton::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList RadioButton::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void RadioButton::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void RadioButton::setWidgetText(const QString &a_text)
+{
+ setText(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void RadioButton::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText( a_text );
+}
+
+QString RadioButton::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void RadioButton::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText( populationText() );
+ setWidgetText( txt );
+}
+
+void RadioButton::showEvent( QShowEvent *e )
+{
+ QRadioButton::showEvent( e );
+ emit widgetOpened();
+}
+
+void RadioButton::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool RadioButton::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::setChecked || f == DCOP::checked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+}
+
+QString RadioButton::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return text();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::setChecked:
+ setChecked(args[0] != "false");
+ break;
+ case DCOP::checked:
+ return QString::number(isOn());
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+
+#include "radiobutton.moc"
diff --git a/kommander/widgets/radiobutton.h b/kommander/widgets/radiobutton.h
new file mode 100644
index 00000000..f9fb5a16
--- /dev/null
+++ b/kommander/widgets/radiobutton.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+ radiobutton.h - Radiobutton widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_RADIOBUTTON_H_
+#define _HAVE_RADIOBUTTON_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qradiobutton.h>
+#include <qobject.h>
+#include <qstringlist.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT RadioButton : public QRadioButton, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ RadioButton(QWidget *a_parent, const char *a_name);
+ ~RadioButton();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString &);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent( QShowEvent *e );
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp
new file mode 100644
index 00000000..eea0b0d6
--- /dev/null
+++ b/kommander/widgets/richtexteditor.cpp
@@ -0,0 +1,249 @@
+/***************************************************************************
+ richtexteditor.cpp - Widget providing simple rich text editing
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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>
+
+/* QT INCLUDES */
+#include <qlayout.h>
+#include <qevent.h>
+#include <qtextedit.h>
+#include <qframe.h>
+#include <qwidget.h>
+#include <qlayout.h>
+#include <qtoolbutton.h>
+#include <qpixmap.h>
+#include <qhbuttongroup.h>
+#include <qfont.h>
+#include <qstringlist.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "richtexteditor.h"
+
+/* Pixmaps */
+#include "pixmaps/textbold.xpm"
+#include "pixmaps/textunder.xpm"
+#include "pixmaps/textitalic.xpm"
+#include "pixmaps/textcenter.xpm"
+#include "pixmaps/textleft.xpm"
+#include "pixmaps/textright.xpm"
+
+RichTextEditor::RichTextEditor(QWidget *a_parent, const char *a_name)
+ : QWidget(a_parent, a_name), KommanderWidget((QObject *)this)
+{
+
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+
+ // setup toolbar
+ m_toolbar = new QFrame(this, "buttonBar");
+ m_toolbar->setMinimumSize(0, 32);
+ m_toolbar->setFrameShape(QFrame::NoFrame);
+ m_toolbar->setFrameShadow(QFrame::Plain);
+
+ //setup textedit
+ m_textedit = new QTextEdit(this, "editor");
+ m_textedit->setTextFormat(RichText);
+
+ // layout the widgets
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ layout->addWidget(m_toolbar);
+ layout->addWidget(m_textedit);
+ layout->setSpacing(1);
+
+ // setup buttons
+ QHBoxLayout *tbLayout = new QHBoxLayout(m_toolbar);
+
+ //bold italic underline left right center link
+ m_formatGroup = new QHButtonGroup(m_toolbar, "formatGroup");
+ //m_formatGroup->setFlat(true);
+ m_alignGroup = new QHButtonGroup(m_toolbar, "alignGroup");
+ //m_alignGroup->setFlat(true);
+ m_alignGroup->setExclusive(true);
+ tbLayout->insertStretch(0);
+ tbLayout->addWidget(m_formatGroup);
+ tbLayout->addWidget(m_alignGroup);
+ tbLayout->insertStretch(3);
+
+ m_buttonTextBold = new QToolButton(m_formatGroup, "textBold");
+ m_buttonTextBold->setPixmap(QPixmap((const char **)bold_xpm));
+ m_buttonTextBold->setToggleButton(true);
+ connect(m_buttonTextBold, SIGNAL(toggled(bool)), this, SLOT(textBold(bool)));
+ m_buttonTextItalic = new QToolButton(m_formatGroup, "textItalic");
+ m_buttonTextItalic->setPixmap(QPixmap((const char **)italic_xpm));
+ m_buttonTextItalic->setToggleButton(true);
+ connect(m_buttonTextItalic, SIGNAL(toggled(bool)), this, SLOT(textItalic(bool)));
+ m_buttonTextUnder = new QToolButton(m_formatGroup, "textUnder");
+ m_buttonTextUnder->setPixmap(QPixmap((const char **)under_xpm));
+ m_buttonTextUnder->setToggleButton(true);
+ connect(m_buttonTextUnder, SIGNAL(toggled(bool)), this, SLOT(textUnder(bool)));
+
+ m_buttonTextLeft = new QToolButton(m_alignGroup, "textLeft");
+ m_buttonTextLeft->setPixmap(QPixmap((const char **)left_xpm));
+ m_buttonTextLeft->setToggleButton(true);
+ m_buttonTextCenter = new QToolButton(m_alignGroup, "textCenter");
+ m_buttonTextCenter->setPixmap(QPixmap((const char **)center_xpm));
+ m_buttonTextCenter->setToggleButton(true);
+ m_buttonTextRight = new QToolButton(m_alignGroup, "textRight");
+ m_buttonTextRight->setPixmap(QPixmap((const char **)right_xpm));
+ m_buttonTextRight->setToggleButton(true);
+
+ connect(m_alignGroup, SIGNAL(clicked(int)), this, SLOT(textAlign(int)));
+ connect(m_textedit, SIGNAL(currentFontChanged(const QFont &)), this, SLOT(fontChanged(const QFont &)));
+ connect(m_textedit, SIGNAL(currentAlignmentChanged(int)), this, SLOT(alignmentChanged(int)));
+
+ connect(m_textedit, SIGNAL(textChanged()), this, SLOT(setTextChanged()));
+
+}
+
+QString RichTextEditor::currentState() const
+{
+ return QString("default");
+}
+
+RichTextEditor::~RichTextEditor()
+{
+}
+
+bool RichTextEditor::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList RichTextEditor::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void RichTextEditor::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void RichTextEditor::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText( a_text );
+}
+
+QString RichTextEditor::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void RichTextEditor::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText( populationText() );
+ setWidgetText( txt );
+}
+
+void RichTextEditor::setWidgetText(const QString &a_text)
+{
+ m_textedit->setText(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void RichTextEditor::setTextChanged()
+{
+ emit widgetTextChanged(m_textedit->text());
+}
+
+void RichTextEditor::textBold(bool a_isOn)
+{
+ m_textedit->setBold(a_isOn);
+}
+
+void RichTextEditor::textUnder(bool a_isOn)
+{
+ m_textedit->setUnderline(a_isOn);
+}
+
+void RichTextEditor::textItalic(bool a_isOn)
+{
+ m_textedit->setItalic(a_isOn);
+}
+
+void RichTextEditor::textAlign(int a_id)
+{
+ QToolButton *b = (QToolButton *)m_alignGroup->find(a_id);
+ if(b == m_buttonTextLeft)
+ m_textedit->setAlignment(Qt::AlignLeft);
+ else if(b == m_buttonTextCenter)
+ m_textedit->setAlignment(Qt::AlignCenter);
+ else if(b == m_buttonTextRight)
+ m_textedit->setAlignment(Qt::AlignRight);
+}
+
+void RichTextEditor::fontChanged(const QFont &a_font)
+{
+ m_buttonTextBold->setOn(a_font.bold());
+ m_buttonTextItalic->setOn(a_font.italic());
+ m_buttonTextUnder->setOn(a_font.underline());
+}
+
+void RichTextEditor::alignmentChanged(int a_alignment)
+{
+ if((a_alignment == AlignAuto) || (a_alignment & AlignLeft))
+ m_buttonTextLeft->setOn(true);
+ else if(a_alignment & AlignHCenter)
+ m_buttonTextCenter->setOn(true);
+ else if(a_alignment & AlignRight)
+ m_buttonTextRight->setOn(true);
+}
+
+void RichTextEditor::showEvent( QShowEvent *e )
+{
+ QWidget::showEvent(e);
+ emit widgetOpened();
+}
+
+void RichTextEditor::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool RichTextEditor::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::selection || f == DCOP::setEditable;
+}
+
+QString RichTextEditor::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return m_textedit->text();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::selection:
+ return m_textedit->selectedText();
+ case DCOP::clear:
+ setWidgetText("");
+ break;
+ case DCOP::setEditable:
+ m_textedit->setReadOnly(args[0] == "false" || args[0] == "0");
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "richtexteditor.moc"
diff --git a/kommander/widgets/richtexteditor.h b/kommander/widgets/richtexteditor.h
new file mode 100644
index 00000000..4436d73f
--- /dev/null
+++ b/kommander/widgets/richtexteditor.h
@@ -0,0 +1,85 @@
+/***************************************************************************
+ richtexteditor.h - Widget providing simple rich texxt editing
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_RICHTEXTEDITOR_H_
+#define _HAVE_RICHTEXTEDITOR_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qstring.h>
+#include <qwidget.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+
+/* Forward Decls */
+class QTextEdit;
+class QFrame;
+class QToolButton;
+class QHButtonGroup;
+
+class QShowEvent;
+class KOMMANDER_EXPORT RichTextEditor : public QWidget, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ RichTextEditor(QWidget *, const char *);
+ virtual ~RichTextEditor();
+
+ bool isKommanderWidget() const;
+ void setAssociatedText(const QStringList&);
+ QStringList associatedText() const;
+ QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ void setTextChanged();
+ void setWidgetText(const QString &);
+ void textAlign(int);
+ void textBold(bool);
+ void textUnder(bool);
+ void textItalic(bool);
+ void fontChanged(const QFont &);
+ void alignmentChanged(int);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent( QShowEvent *e );
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+ QFrame *m_toolbar;
+ QTextEdit *m_textedit;
+
+ QToolButton *m_buttonTextBold, *m_buttonTextUnder, *m_buttonTextItalic,
+ *m_buttonTextLeft, *m_buttonTextCenter, *m_buttonTextRight;
+
+ QHButtonGroup *m_formatGroup, *m_alignGroup;
+
+};
+
+#endif
diff --git a/kommander/widgets/scriptobject.cpp b/kommander/widgets/scriptobject.cpp
new file mode 100644
index 00000000..859d87d0
--- /dev/null
+++ b/kommander/widgets/scriptobject.cpp
@@ -0,0 +1,191 @@
+/***************************************************************************
+ scriptobject.cpp - Widget for holding scripts
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qstringlist.h>
+#include <qwidget.h>
+
+/* KDE INCLUDES */
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <klocale.h>
+
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include "scriptobject.h"
+#include <myprocess.h>
+#include <specials.h>
+
+ScriptObject::ScriptObject(QWidget *a_parent, const char *a_name)
+ : QLabel(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ if (KommanderWidget::inEditor)
+ {
+ setPixmap(KGlobal::iconLoader()->loadIcon("shellscript", KIcon::NoGroup, KIcon::SizeMedium));
+ setFrameStyle(QFrame::Box | QFrame::Plain);
+ setLineWidth(1);
+ setFixedSize(pixmap()->size());
+ }
+ else
+ setHidden(true);
+}
+
+ScriptObject::~ScriptObject()
+{
+}
+
+QString ScriptObject::currentState() const
+{
+ return QString("default");
+}
+
+bool ScriptObject::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList ScriptObject::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void ScriptObject::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void ScriptObject::setWidgetText(const QString& a_text)
+{
+ KommanderWidget::setAssociatedText(a_text);
+}
+
+void ScriptObject::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString ScriptObject::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void ScriptObject::populate()
+{
+ setAssociatedText(KommanderWidget::evalAssociatedText(populationText()));
+}
+
+QString ScriptObject::executeProcess(bool blocking)
+{
+ int index = ( states().findIndex( currentState()) );
+ if (index == -1)
+ {
+ printError(i18n("Invalid state for associated text."));
+ return QString();
+ }
+ QString evalText = m_associatedText[index];
+
+ if ((KommanderWidget::useInternalParser && !evalText.startsWith("#!")) || evalText.startsWith("#!kommander"))
+ {
+ evalAssociatedText(evalText);
+ return global(widgetName() + "_RESULT");
+ } else
+ {
+ MyProcess process(this);
+ process.setBlocking(blocking);
+ return process.run(evalAssociatedText(evalText));
+ }
+}
+
+void ScriptObject::execute()
+{
+ m_params.clear();
+ executeProcess(true);
+}
+
+void ScriptObject::execute(const QString& s)
+{
+ m_params.clear();
+ m_params.append(s);
+ executeProcess(true);
+}
+
+void ScriptObject::execute(const QString& s1, const QString& s2)
+{
+ m_params.clear();
+ m_params.append(s1);
+ m_params.append(s2);
+ executeProcess(true);
+}
+
+void ScriptObject::execute(int i)
+{
+ m_params.clear();
+ m_params.append(QString::number(i));
+ executeProcess(true);
+}
+
+void ScriptObject::execute(int i, int j)
+{
+ m_params.clear();
+ m_params.append(QString::number(i));
+ m_params.append(QString::number(j));
+ executeProcess(true);
+}
+
+void ScriptObject::execute(bool i)
+{
+ m_params.clear();
+ m_params.append(QString::number(i));
+ executeProcess(true);
+}
+
+bool ScriptObject::isFunctionSupported(int f)
+{
+ return f == DCOP::setText || f == DCOP::clear || f == DCOP::execute || f == DCOP::item
+ || f == DCOP::count;
+}
+
+QString ScriptObject::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::setText:
+ setAssociatedText(args[0]);
+ break;
+ case DCOP::clear:
+ setAssociatedText(QString::null);
+ break;
+ case DCOP::execute:
+ m_params = args;
+ return executeProcess(true);
+ break;
+ case DCOP::item:
+ {
+ uint index = args[0].toInt();
+ return index < m_params.count() ? m_params[index] : QString::null;
+ }
+ case DCOP::count:
+ return QString::number(m_params.count());
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "scriptobject.moc"
diff --git a/kommander/widgets/scriptobject.h b/kommander/widgets/scriptobject.h
new file mode 100644
index 00000000..3906d5e4
--- /dev/null
+++ b/kommander/widgets/scriptobject.h
@@ -0,0 +1,68 @@
+/***************************************************************************
+ scriptobject.h - Widget for holding scripts
+ -------------------
+ copyright : (C) 2002 Marc Britton <consume@optusnet.com.au>
+ (C) 2003-2004 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 _HAVE_SCRIPTOBJECT_H_
+#define _HAVE_SCRIPTOBJECT_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qlabel.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+
+class KOMMANDER_EXPORT ScriptObject : public QLabel, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ ScriptObject(QWidget *a_parent, const char *a_name);
+ ~ScriptObject();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void populate();
+ virtual void execute();
+ virtual void execute(const QString&);
+ virtual void execute(const QString&, const QString&);
+ virtual void execute(int);
+ virtual void execute(int, int);
+ virtual void execute(bool);
+signals:
+ void widgetOpened();
+
+protected:
+ virtual QString executeProcess(bool blocking);
+private:
+ QStringList m_params;
+};
+
+#endif
diff --git a/kommander/widgets/slider.cpp b/kommander/widgets/slider.cpp
new file mode 100644
index 00000000..52f6d47a
--- /dev/null
+++ b/kommander/widgets/slider.cpp
@@ -0,0 +1,121 @@
+/***************************************************************************
+ slider.cpp - Slider widget
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qstringlist.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "slider.h"
+
+Slider::Slider(QWidget * a_parent, const char *a_name)
+ : QSlider(a_parent, a_name), KommanderWidget((QObject *) this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+}
+
+QString Slider::currentState() const
+{
+ return QString("default");
+}
+
+Slider::~Slider()
+{
+}
+
+bool Slider::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList Slider::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void Slider::setAssociatedText(const QStringList & a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void Slider::setPopulationText(const QString & a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString Slider::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void Slider::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText(populationText());
+ setWidgetText(txt);
+}
+
+void Slider::setWidgetText(const QString & a_text)
+{
+ setValue(a_text.toInt());
+}
+
+void Slider::showEvent(QShowEvent * e)
+{
+ QSlider::showEvent(e);
+ emit widgetOpened();
+}
+
+bool Slider::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::setMaximum || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+}
+
+QString Slider::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return QString::number(value());
+ case DCOP::setText:
+ setValue(args[0].toInt());
+ break;
+ case DCOP::clear:
+ setValue(minValue());
+ break;
+ case DCOP::setMaximum:
+ setMaxValue(args[0].toInt());
+ break;
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "slider.moc"
diff --git a/kommander/widgets/slider.h b/kommander/widgets/slider.h
new file mode 100644
index 00000000..59526deb
--- /dev/null
+++ b/kommander/widgets/slider.h
@@ -0,0 +1,60 @@
+/***************************************************************************
+ slider.h - Slider widget
+ -------------------
+ copyright : (C) 2004 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 _HAVE_SLIDER_H_
+#define _HAVE_SLIDER_H_
+
+/* KDE INCLUDES */
+#include <qslider.h>
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QShowEvent;
+class KOMMANDER_EXPORT Slider: public QSlider, public KommanderWidget
+{
+ Q_OBJECT Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ Slider(QWidget*, const char*);
+ virtual ~Slider();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList &);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString &);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+
+public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void populate();
+
+signals:
+ void widgetOpened();
+
+protected:
+ void showEvent(QShowEvent* e);
+};
+
+#endif
diff --git a/kommander/widgets/spinboxint.cpp b/kommander/widgets/spinboxint.cpp
new file mode 100644
index 00000000..ce013333
--- /dev/null
+++ b/kommander/widgets/spinboxint.cpp
@@ -0,0 +1,140 @@
+/***************************************************************************
+ spinboxint.cpp - Integer spinbox widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qspinbox.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "spinboxint.h"
+
+SpinBoxInt::SpinBoxInt(QWidget *a_parent, const char *a_name)
+ : QSpinBox(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+}
+
+SpinBoxInt::~SpinBoxInt()
+{
+}
+
+QString SpinBoxInt::currentState() const
+{
+ return "default";
+}
+
+bool SpinBoxInt::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList SpinBoxInt::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void SpinBoxInt::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void SpinBoxInt::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString SpinBoxInt::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void SpinBoxInt::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+void SpinBoxInt::setWidgetText(const QString &a_text)
+{
+ setValue(a_text.toInt());
+ emit widgetTextChanged(a_text);
+}
+
+void SpinBoxInt::showEvent( QShowEvent *e )
+{
+ QSpinBox::showEvent(e);
+ emit widgetOpened();
+}
+
+void SpinBoxInt::focusOutEvent( QFocusEvent * e)
+{
+ QSpinBox::focusOutEvent(e);
+ emit lostFocus();
+}
+
+void SpinBoxInt::focusInEvent( QFocusEvent * e)
+{
+ QSpinBox::focusInEvent(e);
+ emit gotFocus();
+}
+
+bool SpinBoxInt::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::setMaximum || f == DCOP::geometry|| f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+}
+
+QString SpinBoxInt::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return cleanText();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::setMaximum:
+ setMaxValue(args[0].toUInt());
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "spinboxint.moc"
diff --git a/kommander/widgets/spinboxint.h b/kommander/widgets/spinboxint.h
new file mode 100644
index 00000000..03c30b24
--- /dev/null
+++ b/kommander/widgets/spinboxint.h
@@ -0,0 +1,68 @@
+/***************************************************************************
+ spinboxint.h - Integer spinbox widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_SPINBOXINT_H_
+#define _HAVE_SPINBOXINT_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstringlist.h>
+#include <qstring.h>
+#include <qspinbox.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT SpinBoxInt : public QSpinBox, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ SpinBoxInt(QWidget *a_parent, const char *a_name);
+ ~SpinBoxInt();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void lostFocus();
+ void gotFocus();
+protected:
+ void showEvent(QShowEvent *e);
+ void focusOutEvent( QFocusEvent* e);
+ void focusInEvent( QFocusEvent* e);
+private:
+};
+
+#endif
diff --git a/kommander/widgets/statusbar.cpp b/kommander/widgets/statusbar.cpp
new file mode 100644
index 00000000..90b23999
--- /dev/null
+++ b/kommander/widgets/statusbar.cpp
@@ -0,0 +1,131 @@
+/***************************************************************************
+ statusbar.cpp - StatusBar widget
+ -------------------
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "statusbar.h"
+
+StatusBar::StatusBar(QWidget *a_parent, const char *a_name)
+ : KStatusBar(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ insertItem(QString::null, 0, 1);
+ setItemAlignment(0, Qt::AlignLeft);
+}
+
+StatusBar::~StatusBar()
+{
+}
+
+QString StatusBar::currentState() const
+{
+ return QString("default");
+}
+
+bool StatusBar::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList StatusBar::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void StatusBar::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void StatusBar::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString StatusBar::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void StatusBar::populate()
+{
+ changeItem(KommanderWidget::evalAssociatedText(populationText()), 0);
+}
+
+void StatusBar::showEvent(QShowEvent *e)
+{
+ QStatusBar::showEvent(e);
+ emit widgetOpened();
+}
+
+void StatusBar::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool StatusBar::isFunctionSupported(int f)
+{
+ return f == DCOP::setText || f == DCOP::insertItem || f == DCOP::removeItem || f == DCOP::clear || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+}
+
+QString StatusBar::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::setText:
+ changeItem(args[0], 0);
+ break;
+ case DCOP::insertItem:
+ if (hasItem(args[1].toInt()))
+ changeItem(args[0], args[1].toInt());
+ else
+ insertItem(args[0], args[1].toInt());
+ break;
+ case DCOP::removeItem:
+ removeItem(args[0].toInt());
+ break;
+ case DCOP::clear:
+ clear();
+ break;
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "statusbar.moc"
diff --git a/kommander/widgets/statusbar.h b/kommander/widgets/statusbar.h
new file mode 100644
index 00000000..4920abca
--- /dev/null
+++ b/kommander/widgets/statusbar.h
@@ -0,0 +1,65 @@
+/***************************************************************************
+ statusbar.h - StatusBar widget
+ -------------------
+ copyright : (C) 2004 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 _HAVE_STATUSBAR_H_
+#define _HAVE_STATUSBAR_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qobject.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kstatusbar.h>
+#include <kommanderwidget.h>
+
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT StatusBar : public KStatusBar, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ StatusBar(QWidget *a_parent, const char *a_name);
+ ~StatusBar();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/subdialog.cpp b/kommander/widgets/subdialog.cpp
new file mode 100644
index 00000000..4986d174
--- /dev/null
+++ b/kommander/widgets/subdialog.cpp
@@ -0,0 +1,146 @@
+/***************************************************************************
+ subdialog.cpp - Subdialog widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qpushbutton.h>
+#include <qdialog.h>
+
+/* OTHER INCLUDES */
+#include <kdebug.h>
+#include <kommanderfactory.h>
+#include <kommanderwidget.h>
+#include <specials.h>
+#include "subdialog.h"
+
+SubDialog::SubDialog(QWidget *a_parent, const char *a_name)
+ : QPushButton(a_parent, a_name), KommanderWidget(this), m_dialog(0)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+
+ connect(this, SIGNAL(clicked()), this, SLOT(showDialog()));
+
+}
+
+SubDialog::~SubDialog()
+{
+}
+
+QString SubDialog::currentState() const
+{
+ return QString("default");
+}
+
+bool SubDialog::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList SubDialog::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void SubDialog::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void SubDialog::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText( a_text );
+}
+
+QString SubDialog::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void SubDialog::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText( populationText() );
+//FIXME
+}
+
+
+void SubDialog::setKmdrFile(QString a_kmdrFile)
+{
+ m_kmdrFile = a_kmdrFile;
+}
+
+QString SubDialog::kmdrFile() const
+{
+ return m_kmdrFile;
+}
+
+void SubDialog::showDialog()
+{
+ delete m_dialog;
+
+ KommanderFactory::loadPlugins();
+ m_dialog = (QDialog *)KommanderFactory::create(kmdrFile());
+ if(!m_dialog)
+ {
+ kdWarning() << "Creation of sub dialog failed .." << endl;
+ connect(m_dialog, SIGNAL(finished()), this, SLOT(slotFinished()));
+
+ m_dialog->exec();
+ }
+}
+
+void SubDialog::slotFinished()
+{
+ if(m_dialog)
+ {
+ KommanderWidget *atw = dynamic_cast<KommanderWidget *>(m_dialog);
+ if(atw)
+ emit widgetTextChanged(atw->evalAssociatedText());
+ }
+}
+
+void SubDialog::showEvent( QShowEvent *e )
+{
+ QPushButton::showEvent( e );
+ emit widgetOpened();
+}
+
+QString SubDialog::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ {
+ if (!m_dialog)
+ return QString();
+ KommanderWidget *atw = dynamic_cast<KommanderWidget *>(m_dialog);
+ if(atw)
+ return atw->evalAssociatedText();
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "subdialog.moc"
diff --git a/kommander/widgets/subdialog.h b/kommander/widgets/subdialog.h
new file mode 100644
index 00000000..ad19fec5
--- /dev/null
+++ b/kommander/widgets/subdialog.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ subdialog.h - Subdialog widget
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_SUBDIALOG_H_
+#define _HAVE_SUBDIALOG_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qpushbutton.h>
+#include <qobject.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QWidget;
+class QDialog;
+
+class QShowEvent;
+class KOMMANDER_EXPORT SubDialog : public QPushButton, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QString kmdrFile READ kmdrFile WRITE setKmdrFile)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ SubDialog(QWidget *a_parent, const char *a_name);
+ ~SubDialog();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ QString kmdrFile() const;
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+public slots:
+ void setKmdrFile(QString);
+ virtual void showDialog();
+ virtual void slotFinished();
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString &);
+protected:
+ QDialog *m_dialog;
+ QString m_kmdrFile;
+ void showEvent( QShowEvent *e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/table.cpp b/kommander/widgets/table.cpp
new file mode 100644
index 00000000..358b548b
--- /dev/null
+++ b/kommander/widgets/table.cpp
@@ -0,0 +1,373 @@
+/***************************************************************************
+ table.cpp - Table widget
+ -------------------
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+
+/* KDE INCLUDES */
+#include <klocale.h>
+#include <kglobal.h>
+#include <kmessagebox.h>
+
+/* QT INCLUDES */
+#include <qmetaobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qpoint.h>
+
+/* OTHER INCLUDES */
+#include "kommanderplugin.h"
+#include "specials.h"
+#include "table.h"
+
+enum Functions {
+ FirstFunction = 365,
+ TBL_sortColumnExtra,
+ TBL_keepCellVisible,
+ TBL_selectCells,
+ TBL_selectRow,
+ TBL_selectColumn,
+ TBL_setColumnReadOnly,
+ TBL_setRowReadOnly,
+ TBL_rowCount,
+ TBL_colHeader,
+ TBL_rowHeader,
+ LastFunction
+};
+
+
+Table::Table(QWidget *a_parent, const char *a_name)
+ : QTable(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(TBL_sortColumnExtra, "sortColumnExtra(QString widget, int col, bool ascending, bool wholeRows)", i18n("Sets a column to sort ascending or descending. Optionally can sort with rows intact for database use."), 2, 4);
+ KommanderPlugin::registerFunction(TBL_keepCellVisible, "keepCellVisible(QString widget, int row, int col)", i18n("Scrolls the table so the cell indicated is visible."), 3);
+ KommanderPlugin::registerFunction(TBL_selectCells, "selectCells(QString widget, int row, int col, int row, int col)", i18n("Select cells using the upper left and lower right cell addresses<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 5);
+ KommanderPlugin::registerFunction(TBL_selectRow, "selectRow(QString widget, int row)", i18n("Select the row with the zero based index."), 2);
+ KommanderPlugin::registerFunction(TBL_selectColumn, "selectColumn(QString widget, int col)", i18n("Select the column with the zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 2);
+ KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(QString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
+ KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(QString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
+ KommanderPlugin::registerFunction(TBL_rowCount, "rowCount(QString widget)", i18n("Returns the number of rows of the table"), 1);
+ KommanderPlugin::registerFunction(TBL_colHeader, "columnHeader(QString widget, int Column)", i18n("Returns the text of the header for the column index"), 2);
+ KommanderPlugin::registerFunction(TBL_rowHeader, "rowHeader(QString widget, int Row)", i18n("Returns the text of the header for the row index"), 2);
+
+}
+
+Table::~Table()
+{
+}
+
+QString Table::currentState() const
+{
+ return QString("default");
+}
+
+bool Table::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList Table::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void Table::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void Table::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString Table::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void Table::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+void Table::setWidgetText(const QString&)
+{
+}
+
+QString Table::selectedArea()
+{
+ QTableSelection sel = selection(currentSelection());
+ return QString("%1,%2,%3,%4").arg(sel.topRow()).arg(sel.leftCol()).arg(sel.bottomRow()).arg(sel.rightCol());
+}
+
+
+bool Table::isFunctionSupported(int f)
+{
+ return f == DCOP::currentColumn || f == DCOP::currentRow || f == DCOP::insertColumn ||
+ f == DCOP::insertRow || f == DCOP::cellText || f == DCOP::setCellText || f == DCOP::setCellWidget || f == DCOP::cellWidget || f == DCOP::columnCount ||
+ f == DCOP::removeRow || f == DCOP::removeColumn || f == DCOP::setColumnCaption ||
+ f == DCOP::setRowCaption || f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
+}
+
+void Table::setCellWidget(int row, int col, const QString & _widgetName)
+{
+ KommanderWidget *w = widgetByName(_widgetName);
+ if (w)
+ {
+ QWidget *widget = static_cast<QWidget*>(w->object());
+ if (QTable::cellWidget(row, col) != widget)
+ {
+ setCurrentCell(-1, -1); //hack to not delete the cellwidget after clicking away to another cell.
+//I don't know why it does so, but without this on a click to another cell calls endEdit, which calls
+//clearCellWidget, all this before the currentChanged signal is emitted.
+//this hack does ugly things once table starts scrolling - let's try to minize damage
+//we should have a way to test doe cellWidget looses focus and send it right or down too
+ QTable::ensureCellVisible(row, col);
+ clearCellWidget(row, col);
+ QTable::setCellWidget(row, col, widget);
+ }
+ } else
+ clearCellWidget(row, col);
+}
+
+QString Table::cellWidget(int row, int col)
+{
+
+ QWidget *widget = QTable::cellWidget(row, col);
+ if (widget)
+ {
+ KommanderWidget *w = widgetByName(widget->name());
+ if (w)
+ return widget->name();
+ }
+ return QString();
+}
+
+void Table::setCellText(int row, int col, const QString& text)
+{
+ QWidget *widget = QTable::cellWidget(row, col);
+ if (widget)
+ {
+ KommanderWidget *w = widgetByName(widget->name());
+ if (w)
+ widget->reparent(parentDialog(), QPoint(0,0));
+ }
+ setText(row, col, text);
+ endEdit(row, col, false, false);
+}
+
+void Table::clearCellWidget(int row, int col)
+{
+ QTable::clearCellWidget(row, col); //just for debugging
+}
+
+void Table::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+void Table::columnClicked(int col)
+{
+ emit columnHeaderClicked(col);
+ static bool ascending = TRUE;
+ if (!sorting()) return;
+ ascending=!ascending;
+ sortColumn( col, ascending, TRUE);
+}
+
+QString Table::handleDCOP(int function, const QStringList& args)
+{
+ switch (function)
+ {
+ case DCOP::cellText:
+ return text(args[0].toInt(), args[1].toInt());
+ case DCOP::setCellText:
+ if (numRows() >= args[0].toInt() && numCols() >+ args[1].toInt())
+ setCellText(args[0].toInt(), args[1].toInt(), args[2]);
+ break;
+ case DCOP::setCellWidget:
+ if (numRows() >= args[0].toInt() && numCols() >+ args[1].toInt())
+ setCellWidget(args[0].toInt(), args[1].toInt(), args[2]);
+ break;
+ case DCOP::cellWidget:
+ return cellWidget(args[0].toInt(), args[1].toInt());
+ break;
+ case DCOP::insertRow:
+ insertRows(args[0].toInt(), args.count() == 1 ? 1 : args[1].toInt());
+ break;
+ case DCOP::insertColumn:
+ insertColumns(args[0].toInt(), args.count() == 1 ? 1 : args[1].toInt());
+ break;
+ case DCOP::currentColumn:
+ return QString::number(currentColumn());
+ case DCOP::currentRow:
+ return QString::number(currentRow());
+ case DCOP::columnCount:
+ return QString::number(numCols());
+ break;
+ case DCOP::removeColumn:
+ if (numCols() >= args[0].toInt())
+ {
+ if (!args[1].toInt())
+ removeColumn(args[0].toInt());
+ else
+ {
+ int column = args[0].toInt();
+ int lines = args[1].toInt();
+ for (int i = 0; i < lines; i++)
+ removeColumn(column);
+ }
+ break;
+ }
+ case TBL_rowCount:
+ return QString::number(numRows());
+ break;
+ case DCOP::removeRow:
+ {
+ int row = args[0].toInt();
+ int lines = args[1].toInt();
+ for (int i = 0; i < lines; i++)
+ removeRow(row);
+ break;
+ }
+ case DCOP::setColumnCaption:
+ if (numCols() >= args[0].toInt())
+ horizontalHeader()->setLabel(args[0].toInt(), args[1]);
+ break;
+ case DCOP::setRowCaption:
+ if (numRows() >= args[0].toInt())
+ verticalHeader()->setLabel(args[0].toInt(), args[1]);
+ break;
+ case DCOP::text:
+ {
+ QString rows;
+ for (int r = 0; r < numRows(); r++)
+ {
+ QString row;
+ for (int c = 0; c < numCols(); c++)
+ {
+ if (c)
+ row += '\t';
+ row += text(r,c);
+ }
+ if (r)
+ rows += '\n';
+ rows += row;
+ }
+ return rows;
+ }
+ case DCOP::setText:
+ {
+ int r = 0, c = 0;
+ setNumCols(0);
+ setNumRows(0);
+ QStringList rows;
+ QStringList row;
+ rows = QStringList::split("\n", args[0], true);
+ setNumRows(rows.count());
+ for (QStringList::Iterator it = rows.begin(); it != rows.end(); ++it, ++r)
+ {
+ row = QStringList::split("\t", *it, true);
+ if (!r)
+ setNumCols(row.count());
+ c = 0;
+ for (QStringList::Iterator itr = row.begin(); itr != row.end(); ++itr, ++c)
+ setText(r, c, *itr);
+ }
+ break;
+ }
+ case DCOP::selection:
+ return selectedArea();
+ break;
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ case TBL_sortColumnExtra:
+ if (numCols() >= args[0].toInt())
+ QTable::sortColumn(args[0].toInt(), args[1].toInt(), args[2].toInt());
+ break;
+ case TBL_keepCellVisible:
+ if (numRows() >= args[0].toInt() && numCols() >+ args[1].toInt())
+ QTable::ensureCellVisible(args[0].toInt()-1, args[1].toInt()-1);
+ break;
+ case TBL_selectCells:
+ if (numRows() >= args[0].toInt() && numCols() >+ args[1].toInt() && numRows() >= args[2].toInt() && numCols() >+ args[3].toInt())
+ QTable::selectCells (args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
+ break;
+ case TBL_selectRow:
+ if (numRows() >= args[0].toInt())
+ QTable::selectRow (args[0].toInt());
+ break;
+ case TBL_selectColumn:
+ if (numCols() >= args[0].toInt())
+ QTable::selectColumn (args[0].toInt());
+ break;
+ case TBL_setColumnReadOnly:
+ if (numCols() >= args[0].toInt())
+ QTable::setColumnReadOnly (args[0].toInt(), args[1].toUInt());
+ break;
+ case TBL_setRowReadOnly:
+ if (numRows() >= args[0].toInt())
+ QTable::setRowReadOnly (args[0].toInt(), args[1].toUInt());
+ break;
+ case TBL_colHeader:
+ {
+ QHeader* hdr = QTable::horizontalHeader();
+ if (numCols() >= args[0].toInt())
+ return hdr->label(args[0].toInt());
+ else
+ return "No column at index "+args[0];
+ break;
+ }
+ case TBL_rowHeader:
+ {
+ QHeader* hdr = QTable::verticalHeader();
+ if (numRows() >= args[0].toInt())
+ return hdr->label(args[0].toInt());
+ else
+ return "No row at index "+args[0];
+ break;
+ }
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::hasFocus:
+ return QString::number(this->hasFocus());
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "table.moc"
+
diff --git a/kommander/widgets/table.h b/kommander/widgets/table.h
new file mode 100644
index 00000000..26ed3b36
--- /dev/null
+++ b/kommander/widgets/table.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+ table.h - Table widget
+ -------------------
+ copyright : (C) 2004 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 _HAVE_TABLE_H_
+#define _HAVE_TABLE_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qtable.h>
+#include <qobject.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+
+class QWidget;
+
+class KOMMANDER_EXPORT Table : public QTable, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_OVERRIDE(bool readOnly DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+ public:
+ Table(QWidget *a_parent, const char *a_name);
+ ~Table();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+ virtual void clearCellWidget(int row, int col);
+ virtual void columnClicked(int col);
+ public slots:
+ virtual void populate();
+ virtual void setWidgetText(const QString &);
+ //void adjustColumn(int col);
+ signals:
+ void contextMenuRequested(int xpos, int ypos);
+ void columnHeaderClicked(int col);
+ protected:
+ void contextMenuEvent( QContextMenuEvent * e );
+ private:
+ QString selectedArea();
+ QString cellWidget(int row, int col);
+ void setCellWidget(int row, int col, const QString &widgetName);
+ void setCellText(int row, int col, const QString &text);
+};
+
+#endif
+
diff --git a/kommander/widgets/tabwidget.cpp b/kommander/widgets/tabwidget.cpp
new file mode 100644
index 00000000..ec0a02cf
--- /dev/null
+++ b/kommander/widgets/tabwidget.cpp
@@ -0,0 +1,194 @@
+/***************************************************************************
+ tabwidget.cpp - Widget with tabs
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <kiconloader.h>
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qtabwidget.h>
+#include <qtabbar.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include "kommanderplugin.h"
+#include <specials.h>
+#include "tabwidget.h"
+
+enum Functions {
+ FirstFunction = 357,
+ TAB_setTabIcon,
+ TAB_tabLabel,
+ TAB_isTabEnabled,
+ TAB_setTabEnabled,
+ TAB_showTabBar,
+ TAB_setCurrentPage,
+ TAB_setTabLabel,
+ LastFunction
+};
+
+TabWidget::TabWidget(QWidget *a_parent, const char *a_name, int a_flags)
+ : QTabWidget(a_parent, a_name, a_flags), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(TAB_setTabIcon, "setTabIcon(QString widget, int Tab, QString Icon)", i18n("Sets an icon on the specified tab. Index is zero based."), 3);
+ KommanderPlugin::registerFunction(TAB_tabLabel, "tabLabel(QString widget, int Tab)", i18n("Returns the tab label at the given index. Index is zero based."), 2);
+ KommanderPlugin::registerFunction(TAB_isTabEnabled, "isTabEnabled(QString widget, int Tab)", i18n("Returns true if tab at specified index is enabled, otherwise returns false."), 2);
+ KommanderPlugin::registerFunction(TAB_setTabEnabled, "setTabEnabled(QString widget, int Tab, bool Enabled)", i18n("Sets the tab at the given index to enabled or disabled."), 3);
+ KommanderPlugin::registerFunction(TAB_showTabBar, "showTabBar(QString widget, bool Show)", i18n("Show or hide the tabs on the tab widget."), 2);
+ KommanderPlugin::registerFunction(TAB_setCurrentPage, "setCurrentPage(QString widget, QString Page)", i18n("Set the current page by name."), 2);
+ KommanderPlugin::registerFunction(TAB_setTabLabel, "setTabLabel(QString widget, int Tab, QString Text)", i18n("Sets the tab tab label."), 3);
+}
+
+TabWidget::~TabWidget()
+{
+}
+
+QString TabWidget::currentState() const
+{
+ return QString("default");
+}
+
+bool TabWidget::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList TabWidget::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void TabWidget::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void TabWidget::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText( a_text );
+}
+
+QString TabWidget::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void TabWidget::populate()
+{
+}
+
+void TabWidget::showEvent(QShowEvent* e)
+{
+ QTabWidget::showEvent(e);
+ emit widgetOpened();
+}
+
+void TabWidget::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool TabWidget::isFunctionSupported(int f)
+{
+ return f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::insertTab || (f >= FirstFunction && f <= LastFunction) ;
+}
+
+QString TabWidget::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::currentItem:
+ return QString::number(currentPageIndex());
+ case DCOP::setCurrentItem:
+ setCurrentPage(args[0].toUInt());
+ break;
+ case DCOP::insertTab:
+ insertTab(0L, args[0], args[1].toUInt());
+ break;
+ case TAB_tabLabel:
+ {
+ QString s = this->label(args[0].toInt());
+ return s.remove("&");
+ break;
+ }
+ case TAB_setTabIcon:
+ {
+ QWidget *w = page(args[0].toInt());
+ setTabIconSet(w, KGlobal::iconLoader()->loadIcon(args[1], KIcon::NoGroup, KIcon::SizeMedium));
+ break;
+ }
+ case TAB_isTabEnabled:
+ {
+ QWidget *w = page(args[0].toInt());
+ return QString::number(this->isTabEnabled(w));
+ break;
+ }
+ case TAB_setTabLabel:
+ {
+ QWidget *w = page(args[0].toInt());
+ setTabLabel(w, args[1]);
+ break;
+ }
+ case TAB_setTabEnabled:
+ {
+ QWidget *w = page(args[0].toInt());
+ this->setTabEnabled(w, args[1].toInt());
+ break;
+ }
+ case TAB_setCurrentPage:
+ {
+ int cnt = this->count();
+ int i = 0;
+ bool found = false;
+ while (i < cnt) {
+ QString s = this->label(i);
+ if (s.remove("&") == args[0])
+ {
+ setCurrentPage(i);
+ found = true;
+ break;
+ }
+ i++;
+ }
+ return QString::number(found);
+ break;
+ }
+ case TAB_showTabBar:
+ {
+ QTabBar *t = this->tabBar();
+ if (args[0].toInt() == 1)
+ t->show();
+ else
+ t->hide();
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "tabwidget.moc"
diff --git a/kommander/widgets/tabwidget.h b/kommander/widgets/tabwidget.h
new file mode 100644
index 00000000..48f19232
--- /dev/null
+++ b/kommander/widgets/tabwidget.h
@@ -0,0 +1,60 @@
+/***************************************************************************
+ tabwidget.h - Widget with tabs
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_TABWIDGET_H_
+#define _HAVE_TABWIDGET_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qtabwidget.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+class QShowEvent;
+class KOMMANDER_EXPORT TabWidget : public QTabWidget, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ TabWidget(QWidget *, const char *, int=0);
+ ~TabWidget();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+
+public slots:
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+private:
+};
+
+#endif
diff --git a/kommander/widgets/textbrowser.cpp b/kommander/widgets/textbrowser.cpp
new file mode 100644
index 00000000..324bc62c
--- /dev/null
+++ b/kommander/widgets/textbrowser.cpp
@@ -0,0 +1,139 @@
+/***************************************************************************
+ textedit.cpp - Rich text viewing widget with links
+ -------------------
+ copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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>
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include "kommanderplugin.h"
+#include <specials.h>
+#include "textbrowser.h"
+
+enum Functions {
+ FirstFunction = 420,
+ TBR_setNotifyClick,
+ TBR_isNotifyClick,
+ LastFunction
+};
+
+TextBrowser::TextBrowser(QWidget * a_parent, const char *a_name)
+ : KTextBrowser(a_parent, a_name), KommanderWidget((QObject *) this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(TBR_setNotifyClick, "setNotifyClick(QString widget, bool Set)",i18n("Set notify click to intercept clicks and handle links"), 2, 2);
+ KommanderPlugin::registerFunction(TBR_isNotifyClick, "isNotifyClick(QString widget)",i18n("Set notify click to intercept clicks and handle links"), 1);
+}
+
+QString TextBrowser::currentState() const
+{
+ return QString("default");
+}
+
+TextBrowser::~TextBrowser()
+{
+}
+
+bool TextBrowser::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList TextBrowser::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void TextBrowser::setAssociatedText(const QStringList & a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void TextBrowser::setPopulationText(const QString & a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString TextBrowser::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void TextBrowser::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText(populationText());
+ setWidgetText(txt);
+}
+
+void TextBrowser::setWidgetText(const QString & a_text)
+{
+ setText(a_text);
+}
+
+void TextBrowser::showEvent(QShowEvent * e)
+{
+ QTextBrowser::showEvent(e);
+ emit widgetOpened();
+}
+
+void TextBrowser::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+
+bool TextBrowser::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::clear || (f >= FirstFunction && f <= LastFunction);
+}
+
+QString TextBrowser::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return text();
+ case DCOP::setText:
+ setText(args[0]);
+ break;
+ case DCOP::selection:
+ return selectedText();
+ case TBR_setNotifyClick:
+ KTextBrowser::setNotifyClick(args[0]);
+ break;
+ case TBR_isNotifyClick:
+ return QString::number(KTextBrowser::isNotifyClick());
+ break;
+ case DCOP::clear:
+ clear();
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "textbrowser.moc"
diff --git a/kommander/widgets/textbrowser.h b/kommander/widgets/textbrowser.h
new file mode 100644
index 00000000..f34e374e
--- /dev/null
+++ b/kommander/widgets/textbrowser.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ textedit.h - Rich text viewing widget with links
+ -------------------
+ copyright : (C) 2004 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 _HAVE_TEXTBROWSER_H_
+#define _HAVE_TEXTBROWSER_H_
+
+/* KDE INCLUDES */
+#include <ktextbrowser.h>
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+
+class QShowEvent;
+class KOMMANDER_EXPORT TextBrowser: public KTextBrowser, public KommanderWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ TextBrowser(QWidget*, const char*);
+ virtual ~TextBrowser();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList &);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString &);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+
+public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void populate();
+
+signals:
+ void widgetOpened();
+ void contextMenuRequested(int xpos, int ypos);
+
+protected:
+ void showEvent(QShowEvent* e);
+ void contextMenuEvent( QContextMenuEvent * e );
+};
+
+#endif
diff --git a/kommander/widgets/textedit.cpp b/kommander/widgets/textedit.cpp
new file mode 100644
index 00000000..b59e0513
--- /dev/null
+++ b/kommander/widgets/textedit.cpp
@@ -0,0 +1,229 @@
+/***************************************************************************
+ textedit.cpp - Rich text editing widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qlineedit.h>
+#include <qstringlist.h>
+#include <qevent.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "textedit.h"
+#include <klocale.h>
+#include <kommanderplugin.h>
+
+enum Functions {
+ FirstFunction = 450, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!!
+ TE_setModified,
+ TE_selectText,
+ TE_paragraphs,
+ TE_length,
+// TE_getCursorPosition,
+ TE_paragraphLength,
+ TE_linesOfParagraph,
+ TE_findText,
+ TE_VAsuperScript,
+ TE_VAnormalScript,
+ LastFunction
+};
+
+TextEdit::TextEdit(QWidget * a_parent, const char *a_name):KTextEdit(a_parent, a_name),
+KommanderWidget((QObject *) this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+
+ connect(this, SIGNAL(textChanged()), this, SLOT(setTextChanged()));
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(TE_setModified, "setModified(QString widget, bool Modified)", i18n("Set widget modified status."), 1);
+ KommanderPlugin::registerFunction(TE_selectText, "selectText(QString widget, int paraFrom, int indexFrom, int paraTo, int indexTo)", i18n("Select a block of text using the paragraph number and character index of the line. You can use the cursorPositionChanged(int, int) signal to get this data in real time into a script."), 5);
+ KommanderPlugin::registerFunction(TE_findText, "findText(QString widget, QString Text, bool Case-Sensitive, bool Forward)", i18n("Search for text from the cursor or a specified position. You can specifiy case sensitive search and forward or backward."), 5);
+// KommanderPlugin::registerFunction(TE_findText, "findText(QString widget, QString Text, bool Case-Sensitive, bool Forward, int Paragraph, int Index)", i18n("Search for text from the cursor or a specified position. You can specifiy case sensitive search and forward or backward."), 5, 7);
+ KommanderPlugin::registerFunction(TE_paragraphs, "paragraphs(QString widget)", i18n("Get the number of paragraphs in the widget."), 1);
+ KommanderPlugin::registerFunction(TE_length, "length(QString widget)", i18n("Get the total length of all text."), 1);
+// KommanderPlugin::registerFunction(TE_getCursorPosition, "getCursorPosition(QString widget)", i18n("Get the cursor postion in the form of paragraph and postion integers."), 1);
+ KommanderPlugin::registerFunction(TE_paragraphLength, "paragraphLength(QString widget, int Paragraph)", i18n("Get the length of the paragraph."), 2);
+ KommanderPlugin::registerFunction(TE_linesOfParagraph, "linesOfParagraph(QString widget, int Paragraph)", i18n("Get the number of lines in the paragraph."), 2);
+ KommanderPlugin::registerFunction(TE_VAsuperScript, "setSuperScript(QString widget)", i18n("Use to set superscript."), 1);
+ KommanderPlugin::registerFunction(TE_VAnormalScript, "setNormalScript(QString widget)", i18n("Use to revert from superscript to normal script."), 1);
+}
+
+QString TextEdit::currentState() const
+{
+ return QString("default");
+}
+
+TextEdit::~TextEdit()
+{
+}
+
+bool TextEdit::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList TextEdit::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void TextEdit::setAssociatedText(const QStringList & a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void TextEdit::setPopulationText(const QString & a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString TextEdit::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void TextEdit::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
+}
+
+void TextEdit::setWidgetText(const QString & a_text)
+{
+ setText(a_text);
+ emit widgetTextChanged(text());
+}
+
+void TextEdit::setTextChanged()
+{
+ emit widgetTextChanged(text());
+}
+
+void TextEdit::focusOutEvent( QFocusEvent * e)
+{
+ QTextEdit::focusOutEvent(e);
+ emit lostFocus();
+}
+
+void TextEdit::focusInEvent( QFocusEvent * e)
+{
+ QTextEdit::focusInEvent(e);
+ emit gotFocus();
+}
+
+void TextEdit::showEvent(QShowEvent * e)
+{
+ QTextEdit::showEvent(e);
+ emit widgetOpened();
+}
+
+void TextEdit::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool TextEdit::isFunctionSupported(int f)
+{
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction);
+}
+
+QString TextEdit::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::text:
+ return text();
+ case DCOP::setText:
+ setWidgetText(args[0]);
+ break;
+ case DCOP::selection:
+ return selectedText();
+ case DCOP::setSelection:
+ insert(args[0]);
+ break;
+ case DCOP::clear:
+ setWidgetText(QString());
+ break;
+ case DCOP::setEditable:
+ setReadOnly(args[0] == "false" || args[0] == "0");
+ break;
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ case DCOP::isModified:
+ return isModified() ? "1" : "0";
+ break;
+ case TE_setModified:
+ this->setModified(args[0].toInt());
+ break;
+ case TE_selectText:
+ QTextEdit::setSelection(args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
+ break;
+ case TE_length:
+ return QString::number(QTextEdit::length() );
+ break;
+ /*case TE_getCursorPosition:
+ return QString::number(QTextEdit::getCursorPosition() );
+ break;*/
+ case TE_paragraphLength:
+ return QString::number(QTextEdit::paragraphLength(args[0].toInt() ) );
+ break;
+ case TE_linesOfParagraph:
+ return QString::number(QTextEdit::linesOfParagraph(args[0].toInt() ) );
+ break;
+ case TE_findText:
+ {
+// int para = args[3].toInt();
+// int idx = args[4].toInt();
+// return QString::number(QTextEdit::find(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx ));
+ return QString::number(QTextEdit::find(args[0], args[1].toUInt(), false ));
+ break;
+ }
+ case TE_VAsuperScript:
+ break;
+ QTextEdit::setVerticalAlignment(AlignSuperScript);
+ case TE_VAnormalScript:
+ QTextEdit::setVerticalAlignment(AlignNormal);
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::hasFocus:
+ return QString::number(this->hasFocus());
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+#include "textedit.moc"
diff --git a/kommander/widgets/textedit.h b/kommander/widgets/textedit.h
new file mode 100644
index 00000000..7f842343
--- /dev/null
+++ b/kommander/widgets/textedit.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ textedit.h - Rich text editing widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_TEXTEDIT_H_
+#define _HAVE_TEXTEDIT_H_
+
+/* KDE INCLUDES */
+#include <ktextedit.h>
+
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qstring.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+
+class QShowEvent;
+class KOMMANDER_EXPORT TextEdit: public KTextEdit, public KommanderWidget
+{
+ Q_OBJECT Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ TextEdit(QWidget *, const char *);
+ virtual ~TextEdit();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList &);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString &);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+
+public slots:
+ virtual void setTextChanged();
+ virtual void setWidgetText(const QString &);
+ virtual void populate();
+
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+ void lostFocus();
+ void gotFocus();
+
+protected:
+ void showEvent(QShowEvent* e);
+ void contextMenuEvent( QContextMenuEvent * e );
+ void focusOutEvent( QFocusEvent* e);
+ void focusInEvent( QFocusEvent* e);
+};
+
+#endif
diff --git a/kommander/widgets/timer.cpp b/kommander/widgets/timer.cpp
new file mode 100644
index 00000000..9aff1560
--- /dev/null
+++ b/kommander/widgets/timer.cpp
@@ -0,0 +1,189 @@
+/***************************************************************************
+ timer.cpp - Widget for running scripts periodically
+ -------------------
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+/* QT INCLUDES */
+#include <qstringlist.h>
+#include <qtimer.h>
+#include <qwidget.h>
+
+/* KDE INCLUDES */
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <klocale.h>
+
+
+/* OTHER INCLUDES */
+#include <myprocess.h>
+#include <specials.h>
+#include "timer.h"
+#include "kommanderplugin.h"
+#include "specials.h"
+
+
+enum Functions {
+ FirstFunction = 179,
+ SetInterval,
+ LastFunction
+};
+
+Timer::Timer(QWidget *a_parent, const char *a_name)
+ : QLabel(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ if (KommanderWidget::inEditor)
+ {
+ setPixmap(KGlobal::iconLoader()->loadIcon("kalarm", KIcon::NoGroup, KIcon::SizeMedium));
+ setFrameStyle(QFrame::Box | QFrame::Plain);
+ setLineWidth(1);
+ setFixedSize(pixmap()->size());
+ }
+ else
+ setHidden(true);
+
+ mTimer = new QTimer(this);
+ setInterval(5000);
+ setSingleShot(false);
+ connect(mTimer, SIGNAL(timeout()), SLOT(timeout()));
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(SetInterval, "setInterval(QString widget, int interval)", i18n("Set the timer timeout interval in ms."), 2);
+}
+
+Timer::~Timer()
+{
+}
+
+int Timer::interval() const
+{
+ return mInterval;
+}
+
+void Timer::setInterval(int a_interval)
+{
+ if (mTimer->isActive())
+ {
+ mTimer->changeInterval(a_interval);
+ }
+ mInterval = a_interval;
+}
+
+bool Timer::singleShot() const
+{
+ return mSingleShot;
+}
+
+void Timer::setSingleShot(bool a_shot)
+{
+ mSingleShot = a_shot;
+}
+
+QString Timer::currentState() const
+{
+ return QString("default");
+}
+
+bool Timer::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList Timer::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void Timer::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void Timer::setWidgetText(const QString& a_text)
+{
+ KommanderWidget::setAssociatedText(a_text);
+}
+
+void Timer::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString Timer::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void Timer::populate()
+{
+ setAssociatedText(KommanderWidget::evalAssociatedText(populationText()));
+}
+
+void Timer::executeProcess(bool blocking)
+{
+ MyProcess process(this);
+ process.setBlocking(blocking);
+ process.run(evalAssociatedText());
+ if (blocking)
+ emit finished();
+}
+
+void Timer::timeout()
+{
+ executeProcess(true);
+}
+
+void Timer::execute()
+{
+ if (mSingleShot)
+ QTimer::singleShot(mInterval, this, SLOT(timeout()));
+ else
+ mTimer->start(mInterval);
+}
+
+void Timer::cancel()
+{
+ mTimer->stop();
+}
+
+
+
+bool Timer::isFunctionSupported(int f)
+{
+ return f == DCOP::setText || f == DCOP::execute || f == DCOP::cancel || (f > FirstFunction && f < LastFunction);
+}
+
+QString Timer::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::setText:
+ setAssociatedText(args[0]);
+ break;
+ case DCOP::execute:
+ execute();
+ break;
+ case DCOP::cancel:
+ cancel();
+ break;
+ case SetInterval:
+ setInterval(args[0].toInt());
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "timer.moc"
diff --git a/kommander/widgets/timer.h b/kommander/widgets/timer.h
new file mode 100644
index 00000000..856ceeb3
--- /dev/null
+++ b/kommander/widgets/timer.h
@@ -0,0 +1,71 @@
+/***************************************************************************
+ timer.h - Widget for running scripts periodically
+ -------------------
+ copyright : (C) 2004 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 _HAVE_TIMER_H_
+#define _HAVE_TIMER_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qlabel.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+
+class QTimer;
+class KOMMANDER_EXPORT Timer : public QLabel, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_PROPERTY(int interval READ interval WRITE setInterval)
+ Q_PROPERTY(bool singleShot READ singleShot WRITE setSingleShot)
+
+ public:
+ Timer(QWidget *a_parent, const char *a_name);
+ ~Timer();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ virtual int interval() const;
+ virtual void setInterval(int a_interval);
+ virtual bool singleShot() const;
+ virtual void setSingleShot(bool a_shot);
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+ public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void populate();
+ virtual void execute();
+ virtual void cancel();
+ protected slots:
+ virtual void timeout();
+ signals:
+ void finished();
+
+ protected:
+ virtual void executeProcess(bool blocking);
+ QTimer* mTimer;
+ int mInterval;
+ bool mSingleShot;
+
+};
+
+#endif
diff --git a/kommander/widgets/toolbox.cpp b/kommander/widgets/toolbox.cpp
new file mode 100644
index 00000000..90a31e46
--- /dev/null
+++ b/kommander/widgets/toolbox.cpp
@@ -0,0 +1,190 @@
+//
+// C++ Implementation: toolbox
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "toolbox.h"
+#include "kommanderplugin.h"
+#include "specials.h"
+
+
+#include <klocale.h>
+
+#define ADDWIDGET 120
+#define CURRENTWIDGET 121
+#define REMOVEWIDGET 122
+#define REMOVEWIDGETAT 123
+#define SETCURRENTWIDGET 124
+#define CURRENTINDEX 125
+#define WIDGETAT 126
+#define INDEXOF 127
+#define FIRST_FUNCTION ADDWIDGET
+#define LAST_FUNCTION INDEXOF
+
+ToolBox::ToolBox(QWidget *parent, const char *name)
+ : QToolBox(parent, name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(ADDWIDGET, "addWidget(QString widget, QString widgetName, QString Label)",
+ i18n("Adds a widget to the toolbox. Returns the index of the widget."), 3);
+ KommanderPlugin::registerFunction(CURRENTWIDGET, "currentWidget(QString widget)",
+ i18n("Returns the name of the active widget."), 1);
+ KommanderPlugin::registerFunction(REMOVEWIDGET, "removeWidget(QString widget, QString widgetName)", i18n("Remove the selected widget, returns the index of the removed widget or -1 if no such widget was found."), 2);
+ KommanderPlugin::registerFunction(REMOVEWIDGETAT, "removeWidgetAt(QString widget, int index)", i18n("Remove the widget from the index position, returns the index of the removed widget or -1 if no widget was found."), 2);
+ KommanderPlugin::registerFunction(SETCURRENTWIDGET, "setCurrentWidget(QString widget, QString widgetName)",
+ i18n("Activates the selected widget."), 2);
+ KommanderPlugin::registerFunction(CURRENTINDEX, "currentIndex(QString widget)",
+ i18n("Returns the index of the active widget."), 1);
+ KommanderPlugin::registerFunction(WIDGETAT, "widgetAt(QString widget, int index)",
+ i18n("Returns the widget having the supplied index."), 2);
+ KommanderPlugin::registerFunction(INDEXOF, "indexOf(QString widget, QString widgetName)",
+ i18n("Returns the index of the widget, -1 if the widget is not part of the toolbox."), 2);
+
+}
+
+
+ToolBox::~ToolBox()
+{
+}
+
+QString ToolBox::currentState() const
+{
+ return QString("default");
+}
+
+bool ToolBox::isKommanderWidget() const
+{
+ return true;
+}
+
+void ToolBox::populate()
+{
+ setAssociatedText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+QStringList ToolBox::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void ToolBox::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void ToolBox::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString ToolBox::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+
+QString ToolBox::addWidget(const QString& widgetName, const QString &label)
+{
+ KommanderWidget *w = widgetByName(widgetName);
+ if (w)
+ {
+ int idx = addItem(dynamic_cast<QWidget*>(w), label);
+ adjustSize();
+ return QString::number(idx);
+ } else
+ return QString("-1");
+
+}
+
+void ToolBox::showEvent(QShowEvent* e)
+{
+ QToolBox::showEvent(e);
+ emit widgetOpened();
+}
+
+void ToolBox::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+bool ToolBox::isFunctionSupported(int f)
+{
+ return f == DCOP::count || f == DCOP::geometry || (f >= FIRST_FUNCTION && f <= LAST_FUNCTION) ;
+}
+
+QString ToolBox::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case ADDWIDGET:
+ return addWidget(args[0], args[1]);
+ break;
+ case CURRENTWIDGET:
+ {
+ QWidget *w = currentItem();
+ if (w)
+ return w->name();
+ else
+ return QString();
+ break;
+ }
+ case SETCURRENTWIDGET:
+ {
+ KommanderWidget *w = widgetByName(args[0]);
+ setCurrentItem(dynamic_cast<QWidget*>(w));
+ return QString();
+ }
+ case REMOVEWIDGET:
+ {
+ KommanderWidget *w = widgetByName(args[0]);
+ return QString::number(removeItem(dynamic_cast<QWidget*>(w)));
+ }
+ case REMOVEWIDGETAT:
+ {
+ QWidget *w = item(args[0].toInt());
+ return QString::number(removeItem(w));
+ }
+ case CURRENTINDEX:
+ {
+ return QString::number(currentIndex());
+ break;
+ }
+ case WIDGETAT:
+ {
+ QWidget *w = item(args[0].toInt());
+ if (w)
+ return w->name();
+ else
+ return QString();
+ break;
+ }
+ case INDEXOF:
+ {
+ KommanderWidget *w = widgetByName(args[0]);
+ return QString::number(indexOf(dynamic_cast<QWidget*>(w)));
+ }
+ case DCOP::count:
+ return QString::number(count());
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+#include "toolbox.moc"
diff --git a/kommander/widgets/toolbox.h b/kommander/widgets/toolbox.h
new file mode 100644
index 00000000..9171aa32
--- /dev/null
+++ b/kommander/widgets/toolbox.h
@@ -0,0 +1,54 @@
+//
+// C++ Interface: toolbox
+//
+// Description:
+//
+//
+// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef TOOLBOX_H
+#define TOOLBOX_H
+
+#include <qtoolbox.h>
+#include <kommanderwidget.h>
+
+/**
+ @author Andras Mantia <amantia@kdewebdev.org>
+*/
+class ToolBox : public QToolBox, public KommanderWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+public:
+ ToolBox(QWidget *parent = 0, const char *name = 0);
+
+ ~ToolBox();
+
+ virtual bool isKommanderWidget() const;
+ virtual QString currentState() const;
+ virtual bool isFunctionSupported(int function);
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual QStringList associatedText() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+public slots:
+ virtual void populate();
+
+signals:
+ void widgetOpened();
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+ QString addWidget(const QString& widgetName, const QString &label);
+
+};
+
+#endif
diff --git a/kommander/widgets/treewidget.cpp b/kommander/widgets/treewidget.cpp
new file mode 100644
index 00000000..578384c5
--- /dev/null
+++ b/kommander/widgets/treewidget.cpp
@@ -0,0 +1,512 @@
+/***************************************************************************
+ treewidget.cpp - Tree/detailed list widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+ (C) 2008 Andras Mantia <amantia@kdewebdev.org>
+ (C) 2008 Eric Laffoon <eric@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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <klocale.h>
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <klistview.h>
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qlistview.h>
+
+/* OTHER INCLUDES */
+#include <specials.h>
+#include "treewidget.h"
+#include "kommanderplugin.h"
+#include "specials.h"
+
+#define TW_FUNCTION 275
+#define addColumnTree TW_FUNCTION+1
+#define setAltBackground TW_FUNCTION+2
+#define setColAlignment TW_FUNCTION+3
+//#define colCount TW_FUNCTION+3
+#define colCaption TW_FUNCTION+4
+#define setColWidth TW_FUNCTION+5
+#define setSortCol TW_FUNCTION+6
+#define TW_LAST_FUNCTION setSortCol
+
+enum Functions {
+ FirstFunction = 189,
+ SelectedIndexes,
+ TW_childCount,
+ TW_setOpen,
+ TW_isOpen,
+ LastFunction
+};
+
+TreeWidget::TreeWidget(QWidget *a_parent, const char *a_name)
+ : KListView(a_parent, a_name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+ setPathSeparator("/");
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+ KommanderPlugin::registerFunction(SelectedIndexes, "selectedIndexes(QString widget)", "", 1);
+ KommanderPlugin::registerFunction(addColumnTree, "addColumn(QString widget, const QString & label, int width = -1 )", i18n("Add column at end with column header"), 2, 3);
+ KommanderPlugin::registerFunction(setSortCol, "setSortColumn(QString widget, int column, bool ascending=true)", i18n("Set sorting for a column"), 2, 3);
+ //KommanderPlugin::registerFunction(setAltBackground, "setAltBackground(QString widget, const QColor & c)", i18n("Alternate colors in list view"), 2);
+// KommanderPlugin::registerFunction(colCount, "colCount(QString widget)", i18n("Get the column count"), 1);
+ KommanderPlugin::registerFunction(colCaption, "columnCaption(QString widget, int column)", i18n("Get the column caption for column index"), 2);
+ KommanderPlugin::registerFunction(setColWidth, "setColWidth(QString widget, int column, int width)", i18n("Set the pixel width for column index - use 0 to hide"), 3);
+ KommanderPlugin::registerFunction(setColAlignment, "setColumnAlignment(QString widget, int column, QString Alignment)", i18n("Set to <i>left</i>, <i>right</i> or <i>center</i>, case insensitive "), 3);
+ KommanderPlugin::registerFunction(TW_childCount, "childCount(QString widget)", i18n("Get the count of top level items."), 1);
+ KommanderPlugin::registerFunction(TW_setOpen, "setOpen(QString widget, int Index, bool Open)", i18n("Expand or collapse a node."), 3);
+ KommanderPlugin::registerFunction(TW_isOpen, "isOpen(QString widget, int Index)", i18n("See if node is open or closed."), 2);
+}
+
+TreeWidget::~TreeWidget()
+{
+}
+
+QString TreeWidget::pathSeparator() const
+{
+ return m_pathSeparator;
+}
+
+void TreeWidget::setPathSeparator(const QString& a_pathSep)
+{
+ m_pathSeparator = a_pathSep;
+}
+
+void TreeWidget::addItemFromString(const QString& s)
+{
+ QStringList elements = QStringList::split(m_pathSeparator, s, true);
+ if (elements.count() > 1)
+ setRootIsDecorated(true);
+ QListViewItem* parent = 0;
+ if (m_lastPath.size() < elements.count())
+ m_lastPath.resize(elements.count());
+ uint i = 0;
+ for (QStringList::ConstIterator it = elements.begin(); it != elements.end(); ++it)
+ {
+ if (m_lastPath[i] && m_lastPath[i]->text(0) == elements[i])
+ {
+ parent = m_lastPath[i];
+ i++;
+ continue;
+ }
+ else
+ {
+ QListViewItem* item = (i>0) ? parent->firstChild() : firstChild();
+ while (item)
+ {
+ if (item->text(0) == *it)
+ break;
+ item = item->nextSibling();
+ }
+ if (item)
+ parent = item;
+ else
+ parent = itemFromString(parent, *it);
+ m_lastPath.insert(i, parent);
+ i++;
+ }
+ }
+}
+
+QListViewItem* TreeWidget::itemFromString(QListViewItem* parent, const QString& s)
+{
+ QStringList elements;
+ if (s.contains("\t"))
+ elements = QStringList::split("\t", s, true);
+ else
+ elements = QStringList::split("\\t", s, true);
+ int cols = elements.count();
+ if (cols >= columns())
+ cols = columns();
+ QListViewItem* item;
+ if (parent)
+ item = new QListViewItem(parent);
+ else
+ item = new QListViewItem(this);
+ int i = 0;
+ for (QStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it)
+ item->setText(i++, *it);
+ return item;
+}
+
+int TreeWidget::itemToIndex(QListViewItem* item)
+{
+// if (!item->isSelected())
+// return -1;
+ QListViewItemIterator it(this);
+ int index = 0;
+ while (it.current()) {
+ if (it.current() == item)
+ return index;
+ ++it;
+ ++index;
+ }
+ return -1;
+}
+
+int TreeWidget::itemToIndexSafe(QListViewItem* item)
+{
+ QListViewItemIterator it(this);
+ int index = 0;
+ while (it.current()) {
+ if (it.current() == item)
+ return index;
+ ++it;
+ ++index;
+ }
+ return -1;
+}
+
+QListViewItem* TreeWidget::indexToItem(int item)
+{
+ QListViewItemIterator it(this);
+ int index = 0;
+ while (it.current()) {
+ if (index == item)
+ return it.current();
+ ++it;
+ ++index;
+ }
+ return 0;
+}
+
+QString TreeWidget::itemText(QListViewItem* item) const
+{
+ if (!item)
+ return QString();
+ QStringList items;
+ for (int i=0; i<columns(); i++)
+ items.append(item->text(i));
+ return items.join("\t");
+}
+
+QString TreeWidget::itemsText()
+{
+ QStringList items;
+ QListViewItemIterator it(this);
+ while (it.current())
+ {
+ QString path = itemPath(it.current());
+ if (path.isEmpty())
+ items.append(itemText(it.current()));
+ else
+ items.append(QString("%1%2%3").arg(path).arg(m_pathSeparator)
+ .arg(itemText(it.current())));
+ ++it;
+ }
+ return items.join("\n");
+}
+
+QString TreeWidget::itemPath(QListViewItem* item) const
+{
+ if (!item)
+ return QString();
+ item = item->parent();
+ if (!item)
+ return QString();
+ QStringList path;
+ while (item)
+ {
+ path.prepend(item->text(0));
+ item = item->parent();
+ }
+ return path.join(m_pathSeparator);
+}
+
+QString TreeWidget::currentState() const
+{
+ return QString("default");
+}
+
+bool TreeWidget::isKommanderWidget() const
+{
+ return true;
+}
+
+void TreeWidget::setCurrentItem(QListViewItem* item)
+{
+ KListView::setCurrentItem(item);
+ setSelected(item, true);
+ ensureItemVisible(item);
+}
+
+QStringList TreeWidget::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void TreeWidget::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void TreeWidget::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText( a_text );
+}
+
+QString TreeWidget::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void TreeWidget::populate()
+{
+ setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
+}
+
+void TreeWidget::setWidgetText(const QString &a_text)
+{
+ handleDCOP(DCOP::setText, a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void TreeWidget::showEvent(QShowEvent* e)
+{
+ QListView::showEvent( e );
+ emit widgetOpened();
+}
+
+void TreeWidget::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+void TreeWidget::setColAlign(int column, const QString& align)
+{
+ if (align.lower() == "left")
+ setColumnAlignment (column, Qt::AlignLeft);
+ else if (align.lower() == "right")
+ setColumnAlignment (column, Qt::AlignRight);
+ else if (align.lower() == "center")
+ setColumnAlignment (column, Qt::AlignCenter);
+}
+
+bool TreeWidget::isFunctionSupported(int f)
+{
+ return f == DCOP::insertItem || f == DCOP::text || f == DCOP::setText || f == DCOP::insertItems ||
+ f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::removeItem ||
+ f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::findItem || f == DCOP::item ||
+ f == DCOP::itemPath || f == DCOP::itemDepth || f == DCOP::setPixmap || f == DCOP::setColumnCaption || f == DCOP::removeColumn || f == DCOP::columnCount || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f > FirstFunction && f < LastFunction) || (f >= TW_FUNCTION && f <= TW_LAST_FUNCTION);
+}
+
+QString TreeWidget::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::insertItem:
+ addItemFromString(args[0]);
+ break;
+ case DCOP::text:
+ return itemsText();
+ case DCOP::setText:
+ clear(); /* break omitted: setText is equivalent to clear and insertItems */
+ m_lastPath.clear();
+ case DCOP::insertItems:
+ {
+ QStringList items(QStringList::split("\n", args[0], true));
+ for (QStringList::ConstIterator it = items.constBegin(); it != items.constEnd(); ++it)
+ addItemFromString(*it);
+ break;
+ }
+ case TW_setOpen:
+ setOpen(indexToItem(args[0].toInt()), args[1].toInt());
+ break;
+ case TW_isOpen:
+ return QString::number(isOpen(indexToItem(args[0].toInt())));
+ break;
+ case SelectedIndexes:
+ {
+ QString selection = "";
+ QListViewItemIterator it(this);
+ while (it.current())
+ {
+ if (it.current()->isSelected())
+ {
+ selection.append(QString("%1\n").arg(itemToIndexSafe(it.current())));
+ }
+ ++it;
+ }
+ if (!selection.isEmpty())
+ selection = selection.left(selection.length() - 1);
+ return selection;
+ break;
+ }
+ case DCOP::selection:
+ {
+ QString selection = "";
+ QListViewItemIterator it(this);
+ while (it.current())
+ {
+ if (it.current()->isSelected())
+ selection.append(itemText(it.current()) + "\n");
+ ++it;
+ }
+ if (!selection.isEmpty())
+ selection = selection.left(selection.length() - 1);
+ return selection;
+ break;
+ }
+ case DCOP::setSelection:
+ if (selectionModeExt() == Single || selectionModeExt() == NoSelection)
+ setCurrentItem(findItem(args[0], 0));
+ else
+ {
+ clearSelection();
+ QStringList items(QStringList::split("\n", args[0]));
+ for (QStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
+ {
+ QListViewItem* item = findItem(*it, 0);
+ if (item)
+ {
+ item->setSelected(true);
+ ensureItemVisible(item);
+ }
+ }
+ }
+ break;
+ case DCOP::clear:
+ clear();
+ m_lastPath.clear();
+ break;
+ case DCOP::removeItem:
+ {
+ if (args[0].toInt() >= 0 )
+ {
+ delete indexToItem(args[0].toInt());
+ m_lastPath.clear();
+ }
+ break;
+ }
+ case DCOP::currentItem:
+ return QString::number(itemToIndexSafe(currentItem()));
+ break;
+ case DCOP::setCurrentItem:
+ setCurrentItem(indexToItem(args[0].toInt()));
+ break;
+ case DCOP::findItem:
+ if (!args[1])
+ return QString::number(itemToIndexSafe(findItem(args[0], 0)));
+ else
+ {
+ if (args[2].toUInt() && args[3].toUInt())
+ return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt())));
+ else if (args[2].toUInt())
+ return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::CaseSensitive | Qt::Contains)));
+ else if (args[3].toUInt())
+ return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::ExactMatch)));
+ else
+ return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::Contains)));
+ }
+ break;
+ case DCOP::item:
+ return itemText(indexToItem(args[0].toInt()));
+ break;
+ case DCOP::itemPath:
+ return itemPath(indexToItem(args[0].toInt()));
+ break;
+ case DCOP::itemDepth:
+ {
+ QListViewItem* item = indexToItem(args[0].toInt());
+ return (item) ? QString::number(item->depth()) : QString::number(-1);
+ }
+ case DCOP::setPixmap:
+ {
+ QPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small);
+ if (args[1].toInt() == -1)
+ for (QListViewItemIterator it(this); it.current(); ++it)
+ it.current()->setPixmap(0, pixmap);
+ else
+ {
+ QListViewItem* item = indexToItem(args[1].toInt());
+ if (item)
+ item->setPixmap(0, pixmap);
+ }
+ break;
+ }
+ case DCOP::setColumnCaption:
+ if (columns() >= args[0].toInt())
+ setColumnText(args[0].toInt(), args[1]);
+ break;
+ case DCOP::getBackgroundColor:
+ return this->paletteBackgroundColor().name();
+ break;
+ case DCOP::setBackgroundColor:
+ {
+ QColor color;
+ color.setNamedColor(args[0]);
+ this->setPaletteBackgroundColor(color);
+ break;
+ }
+ case addColumnTree:
+ return QString::number(KListView::addColumn(args[0], args[1].toInt()));
+ break;
+ case setSortCol:
+ KListView::setSorting(args[0].toInt(), args[1].toInt());
+ break;
+ case DCOP::columnCount:
+ return QString::number(QListView::columns() );
+ break;
+ case colCaption:
+ return QListView::columnText(args[0].toInt()) ;
+ break;
+ case setColWidth:
+ QListView::setColumnWidth(args[0].toInt(), args[1].toInt());
+ break;
+ case setColAlignment:
+ setColAlign(args[0].toInt(), args[1]);
+ break;
+ case setAltBackground:
+ KListView::setAlternateBackground(QColor(args[0]));
+ break;
+ case DCOP::removeColumn:
+ {
+ if (!args[1].toInt())
+ removeColumn(args[0].toInt());
+ else
+ {
+ int column = args[0].toInt();
+ int lines = args[1].toInt();
+ for (int i = 0; i < lines; i++)
+ removeColumn(column);
+ }
+ break;
+ }
+ case TW_childCount:
+ return QString::number(childCount());
+ break;
+ case DCOP::geometry:
+ {
+ QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return geo;
+ break;
+ }
+ case DCOP::hasFocus:
+ return QString::number(this->hasFocus());
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+#include "treewidget.moc"
diff --git a/kommander/widgets/treewidget.h b/kommander/widgets/treewidget.h
new file mode 100644
index 00000000..29d0a747
--- /dev/null
+++ b/kommander/widgets/treewidget.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ treewidget.h - Tree/detailed list widget
+ -------------------
+ copyright : (C) 2002-2003 Marc Britton <consume@optusnet.com.au>
+ (C) 2004 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 _HAVE_TREEWIDGET_H_
+#define _HAVE_TREEWIDGET_H_
+
+/* KDE INCLUDES */
+#include <klistview.h>
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qptrvector.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+
+class QWidget;
+
+class QShowEvent;
+class KOMMANDER_EXPORT TreeWidget : public KListView, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_PROPERTY(QString pathSeparator READ pathSeparator WRITE setPathSeparator)
+
+public:
+ TreeWidget(QWidget *a_parent, const char *a_name);
+ ~TreeWidget();
+ virtual void setCurrentItem(QListViewItem* item);
+ QString pathSeparator() const;
+ void setPathSeparator(const QString& a_pathSep);
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+public slots:
+ virtual void setWidgetText(const QString&);
+ virtual void populate();
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString&);
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent(QShowEvent *e);
+ void contextMenuEvent( QContextMenuEvent * e );
+ int itemToIndex(QListViewItem* item);
+ int itemToIndexSafe(QListViewItem* item);
+ QString itemText(QListViewItem* item) const;
+ QString itemsText();
+ QListViewItem* indexToItem(int index);
+ QString itemPath(QListViewItem* item) const;
+private:
+ void addItemFromString(const QString& s);
+ QListViewItem* itemFromString(QListViewItem* parent, const QString& s);
+ QPtrVector<QListViewItem> m_lastPath;
+ QString m_pathSeparator;
+ int addColumnTree(const QString & label, int width = -1 );
+ void setSortCol(int column, bool ascending=true);
+ void setAltBackground(const QColor & c);
+ void setColAlign(int column, const QString& align);
+};
+
+#endif
diff --git a/kommander/widgets/widgets.desktop b/kommander/widgets/widgets.desktop
new file mode 100644
index 00000000..f24396de
--- /dev/null
+++ b/kommander/widgets/widgets.desktop
@@ -0,0 +1,36 @@
+[Desktop Entry]
+Name=Widgets
+Name[bg]=Графични обекти
+Name[br]=Widgetoù
+Name[ca]=Estris
+Name[cs]=Widgety
+Name[cy]=Celfigion
+Name[da]=Kontroller
+Name[el]=ΓÏαφικά συστατικά
+Name[et]=Elemendid
+Name[fa]=عناصر
+Name[fi]=Elementit
+Name[fr]=Éléments graphiques
+Name[ga]=Giuirléidí
+Name[hi]=विजेटà¥à¤¸
+Name[hu]=Grafikai elemek
+Name[ja]=ウィジェット
+Name[lt]=Valdikliai
+Name[ms]=Wijet
+Name[ne]=विजेट
+Name[pl]=Elementy interfejsu
+Name[pt]=Elementos
+Name[pt_BR]=Janelas
+Name[ru]=Виджеты
+Name[sl]=Gradniki
+Name[sr]=Контроле
+Name[sr@Latn]=Kontrole
+Name[sv]=Grafiska komponenter
+Name[ta]=சினà¯à®©à®ªà¯ படஙà¯à®•à®³à¯
+Name[tg]=ВаÑеъкуниҳо
+Name[tr]=BileÅŸenler
+Name[uk]=Віджети
+Name[zh_CN]=部件
+Exec=widgets %i %m -caption "%c"
+Type=Application
+Terminal=false
diff --git a/kommander/widgets/wizard.cpp b/kommander/widgets/wizard.cpp
new file mode 100644
index 00000000..7e6a07b4
--- /dev/null
+++ b/kommander/widgets/wizard.cpp
@@ -0,0 +1,194 @@
+/***************************************************************************
+ wizard.cpp - Widget providing a wizard
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <kprocess.h>
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <qevent.h>
+#include <qwizard.h>
+#include <qdialog.h>
+
+/* OTHER INCLUDES */
+#include <myprocess.h>
+#include <kommanderfactory.h>
+#include <specials.h>
+#include "wizard.h"
+
+
+Wizard::Wizard(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
+ : QWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ states << "initialization";
+ states << "destroy";
+ setStates(states);
+ setDisplayStates(states);
+
+ connect(this, SIGNAL(helpClicked()), SLOT(runHelp()));
+}
+
+Wizard::~Wizard()
+{
+ if (!inEditor)
+ destroy();
+}
+
+QString Wizard::currentState() const
+{
+ return QString("default");
+}
+
+bool Wizard::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList Wizard::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void Wizard::setAssociatedText(const QStringList& a_at)
+{
+ KommanderWidget::setAssociatedText(a_at);
+}
+
+void Wizard::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString Wizard::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void Wizard::populate()
+{
+ QString txt = KommanderWidget::evalAssociatedText(populationText());
+//FIXME: implement me
+}
+
+void Wizard::setWidgetText(const QString &a_text)
+{
+ setCaption(a_text);
+ emit widgetTextChanged(a_text);
+}
+
+void Wizard::initialize()
+{
+ setFinishEnabled(page(pageCount() - 1), true);
+ const QStringList assoc = associatedText();
+ if (assoc.count() > 1 && !assoc[1].isEmpty())
+ {
+ MyProcess proc(this);
+ proc.run( KommanderWidget::evalAssociatedText(assoc[1]) );
+ }
+}
+
+void Wizard::destroy()
+{
+ const QStringList assoc = associatedText();
+ if (assoc.count() > 2 && !assoc[2].isEmpty())
+ {
+ MyProcess proc(this);
+ proc.run(KommanderWidget::evalAssociatedText(assoc[2]));
+ }
+}
+
+void Wizard::exec()
+{
+ QWizard::exec();
+ emit finished();
+}
+
+void Wizard::show()
+{
+ QWizard::show();
+ if (!inEditor)
+ initialize();
+}
+
+void Wizard::runHelp()
+{
+ if (helpAction() == Command)
+ {
+ KProcess proc;
+ proc << helpActionText();
+ proc.start(KProcess::DontCare, KProcess::NoCommunication);
+ }
+ else if (helpAction() == Dialog)
+ {
+ KommanderFactory::loadPlugins();
+ QDialog *dialog = (QDialog *)KommanderFactory::create(helpActionText());
+ dialog->exec();
+ delete dialog;
+ }
+}
+
+Wizard::HelpAction Wizard::helpAction() const
+{
+ return m_helpAction;
+}
+
+void Wizard::setHelpAction(HelpAction a_helpAction)
+{
+ m_helpAction = a_helpAction;
+}
+
+QString Wizard::helpActionText() const
+{
+ return m_helpActionText;
+}
+
+void Wizard::setHelpActionText(const QString& a_helpActionText)
+{
+ m_helpActionText = a_helpActionText;
+}
+
+
+void Wizard::showEvent(QShowEvent *e)
+{
+ QWizard::showEvent(e);
+ emit widgetOpened();
+}
+
+void Wizard::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+QString Wizard::handleDCOP(int function, const QStringList& args)
+{
+ switch (function) {
+ case DCOP::setEnabled:
+ setFinishEnabled(page(pageCount() - 1), args[0] != "false");
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString();
+}
+
+
+
+#include "wizard.moc"
diff --git a/kommander/widgets/wizard.h b/kommander/widgets/wizard.h
new file mode 100644
index 00000000..868a14bc
--- /dev/null
+++ b/kommander/widgets/wizard.h
@@ -0,0 +1,82 @@
+/***************************************************************************
+ wizard.h - Widget providing a wizard
+ -------------------
+ copyright : (C) 2002 by Marc Britton
+ email : consume@optusnet.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 _HAVE_WIZARD_H_
+#define _HAVE_WIZARD_H_
+
+/* KDE INCLUDES */
+
+/* QT INCLUDES */
+#include <qwizard.h>
+
+/* OTHER INCLUDES */
+#include <kommanderwidget.h>
+#include <kommander_export.h>
+#include <myprocess.h>
+
+class QShowEvent;
+class KOMMANDER_EXPORT Wizard : public QWizard, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_PROPERTY(HelpAction helpAction READ helpAction WRITE setHelpAction)
+ Q_ENUMS(HelpAction)
+ Q_PROPERTY(QString helpActionText READ helpActionText WRITE setHelpActionText)
+
+public:
+ Wizard(QWidget *, const char *, bool = true, int = 0);
+ ~Wizard();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ enum HelpAction { None, Command, Dialog };
+ HelpAction helpAction() const;
+ void setHelpAction(HelpAction);
+ QString helpActionText() const;
+ void setHelpActionText(const QString&);
+
+public slots:
+ virtual void setWidgetText(const QString &);
+ virtual void exec();
+ virtual void show();
+ virtual void runHelp();
+ virtual void populate();
+protected slots:
+ virtual void initialize();
+ virtual void destroy();
+
+signals:
+ void widgetOpened();
+ void widgetTextChanged(const QString &);
+ void finished();
+ void contextMenuRequested(int xpos, int ypos);
+protected:
+ void showEvent( QShowEvent *e );
+ void contextMenuEvent( QContextMenuEvent * e );
+
+ HelpAction m_helpAction;
+ QString m_helpActionText;
+};
+
+#endif
diff --git a/kommander/working/Makefile.am b/kommander/working/Makefile.am
new file mode 100644
index 00000000..8eb9f2b3
--- /dev/null
+++ b/kommander/working/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS=plugintemplate
+execkmdrdir = ${kde_datadir}/kommander/translating
+
+execkmdr_SCRIPTS = extractkmdr kmdr2po \ No newline at end of file
diff --git a/kommander/working/extractkmdr b/kommander/working/extractkmdr
new file mode 100755
index 00000000..ea1da6ff
--- /dev/null
+++ b/kommander/working/extractkmdr
@@ -0,0 +1,112 @@
+#! /usr/bin/perl
+#
+# This script extracts messages from designer (.ui) and XMLGIU (.rc) files
+# and writes on standard output (usually redirected to rc.cpp)
+# the equivalent i18n() calls so that xgettext can parse them.
+
+# known flags:
+# --tag=name : extract also the tag name
+# --contect=name : give all i18n calls a context name: i18n( "name",...)
+
+$filename = "";
+@filenames = ();
+
+sub writeoutstring
+{
+ print STDOUT "i18n(\"";
+ if (@_[0])
+ {
+ # We have a I18N context
+ print STDOUT @_[0];
+ print STDOUT "\",\"";
+ }
+ print STDOUT @_[1];
+ print STDOUT "\"); // $filename \n";
+}
+
+$extratags = "";
+$context = ""; # I18N context
+
+ARGUMENTS: while (defined ($ARGV[0]))
+{
+ $_ = shift;
+
+ if (/^--tag=(\w+)/) # --tag=name
+ {
+ $extratags .= "|" . $1;
+ next ARGUMENTS;
+ }
+ elsif (/^--context=(\w+)/) # --context=name
+ {
+ $context = $1;
+ next ARGUMENTS;
+ }
+
+ $filename = $_; # maybe check for more options
+
+if (! $filename) {
+ print STDERR "no file to open\n";
+ exit 1;
+}
+
+$string = "";
+$intext = 0;
+$linenr = 0;
+$inskippedprop = 0;
+
+open(FILE, $filename);
+
+READING: while ( <FILE> ) {
+ $linenr++;
+ if ($linenr == 1 && ($_ !~ /^<!DOCTYPE/) && ($_ !~ /^<\?xml/)) {
+ last READING;
+ }
+
+ $string .= "\\n" . $_;
+ chomp($string);
+
+ $textstring = '([tT][eE][xX][tT]|title|string|whatsthis|tooltip|label' . $extratags .')>';
+
+ # The 'database' property contains strings that shouldn't be translated
+ if ($inskippedprop == 0 && ($string =~ /<property name=\"database\"/ || $string =~ /<property name=\"populationText\"/ || $string=~ /<property name=\"associations\"/)) {
+ $inskippedprop = 1;
+ } elsif ($inskippedprop == 1 && ($string =~ /<\/property/)) {
+ $inskippedprop = 0;
+ $string = "";
+ }
+
+ if ($inskippedprop == 0 && $intext == 0) {
+ if ($string =~ /<$textstring/) {
+ $string =~ s/^.*<$textstring//;
+ $intext = 1;
+ $starting_linenr = $linenr;
+ } else {
+ $string = "";
+ }
+ }
+
+ if (($intext == 1) && ($string =~ /<\/$textstring/)) {
+ my $text = $string;
+ $text =~ s/<\/$textstring.*$//;
+ $text =~ s/&lt;/</g;
+ $text =~ s/&gt;/>/g;
+ $text =~ s/&amp;/&/g;
+ $text =~ s/\\([^n])/\\\\$1/g;
+ $text =~ s/\"/\\\"/g;
+ writeoutstring($context, $text);
+ $string =~ s/^.*<\/$textstring//;
+ $intext = 0;
+ # Text can be multiline in .ui files (possibly), but we warn about it in XMLGUI .rc files.
+ if ($linenr != $starting_linenr && $filename =~ m/\.rc$/) {
+ print STDERR "there is <text> floating $filename\n";
+ }
+ }
+
+}
+
+if ($intext == 1) {
+ print STDERR "parsing error in $filename $linenr\n";
+ exit 1;
+}
+
+}
diff --git a/kommander/working/kmdr2po b/kommander/working/kmdr2po
new file mode 100755
index 00000000..33d5dfa4
--- /dev/null
+++ b/kommander/working/kmdr2po
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ -z $1 ]; then
+ echo "Makepo extracts strings for translation from Kommander dialog."
+ echo "Usage: kmdr2po <Kommander dialog>"
+else
+ ./extractkmdr $1 >_from_rc.cc
+ xgettext -C -F --default-domain=`basename $1 .kmdr` \
+ --keyword=i18n --keyword=@i18n $1 _from_rc.cc
+ rm _from_rc.cc
+fi
diff --git a/kommander/working/plugintemplate/Makefile.am b/kommander/working/plugintemplate/Makefile.am
new file mode 100644
index 00000000..14e3c0a8
--- /dev/null
+++ b/kommander/working/plugintemplate/Makefile.am
@@ -0,0 +1,17 @@
+dataFiles = src-Makefile.am plugin.cpp \
+ widget.h widget.cpp app.kdevelop
+templateName = kommanderplugin
+
+### no need to change below:
+template_DATA = $(templateName).kdevtemplate
+templatedir = ${appwizarddatadir}/templates
+
+appwizarddatadir = ${kde_datadir}/kdevappwizard
+$(templateName).tar.gz: ${dataFiles}
+ $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
+ $(GZIP_COMMAND) -f9 $(templateName).tar
+
+archivedir = ${appwizarddatadir}
+archive_DATA = $(templateName).tar.gz ${templateName}.png
+
+CLEANFILES = *.tar.gz \ No newline at end of file
diff --git a/kommander/working/plugintemplate/README.dox b/kommander/working/plugintemplate/README.dox
new file mode 100644
index 00000000..86968add
--- /dev/null
+++ b/kommander/working/plugintemplate/README.dox
@@ -0,0 +1,55 @@
+/** \class %{APPNAME}
+Put a brief description here, the brief description ends at the first dot.
+Put a more detailed description of your part in these lines. It can span
+over several lines. You can even use some html commands in these lines like:
+<code>This is code</code>, html links <a href="http://somelocation">link text</a>,
+and images.
+
+\authors <a href="mailto:%{EMAIL}">%{AUTHOR}</a>
+\authors <a href="mailto:2nd author AT provider.com">2nd author full name</a>
+...
+\authors <a href="mailto:nth author AT provider.com">nth author full name</a>
+
+\maintainer <a href="mailto:%{EMAIL}">%{AUTHOR}</a>
+\maintainer <a href="mailto:2nd maintainer AT provider.com">2nd maintainer full name</a>
+...
+\maintainer <a href="mailto:nth maintainer AT provider.com">nth maintainer full name</a>
+
+\feature Describe the first feature
+\feature Describe the second feature
+...
+\feature Describe the last feature
+
+\bug bugs in <a href="http://bugs.kde.org/buglist.cgi?product=kdevelop&component=YOUR_COMPONENT_NAME&
+bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=Bug+Number">
+YOUR_COMPONENT_NAME at Bugzilla database</a>
+\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet.
+..
+\bug Describe a the nth bug that you know of, but probably hasn't been reported yet.
+
+\requirement Describe a the 1st requirement of your part.
+\requirement Describe a the 2nd requirement of your part.
+...
+\requirement Describe a the nth requirement of your part.
+
+\todo Describe a the 1st TODO of your part.
+\todo Describe a the 2nd TODO of your part.
+...
+\todo Describe a the nth TODO of your part.
+
+\faq <b>First frequenly asked question about your part ?</b> Answer.
+\faq <b>Second frequenly asked question about your part ?</b> Answer.
+...
+\faq <b>Last frequenly asked question about your part ?</b> Answer.
+
+\note First note text.
+\note Second note text.
+...
+\note Last note text.
+
+\warning First warning text.
+\warning Second warning text.
+...
+\warning Last warning text.
+
+*/
diff --git a/kommander/working/plugintemplate/app.kdevelop b/kommander/working/plugintemplate/app.kdevelop
new file mode 100644
index 00000000..29beaf21
--- /dev/null
+++ b/kommander/working/plugintemplate/app.kdevelop
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ <keyword>KDevelop</keyword>
+ </keywords>
+ </general>
+ <kdevcppsupport>
+ <qt>
+ <version>3</version>
+ <used>true</used>
+ <includestyle>3</includestyle>
+ <designerintegration>EmbeddedKDevDesigner</designerintegration>
+ </qt>
+ </kdevcppsupport>
+
+ <kdevautoproject>
+ <general>
+ <activetarget>src/%{APPNAMELC}</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <run>
+ <mainprogram>src/%{APPNAMELC}</mainprogram>
+ </run>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>debug</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O0 -g3</cxxflags>
+ </debug>
+ </configurations>
+</kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ </groups>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>libtool</dbgshell>
+ </general>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>%{APPNAMELC}.tag</docurl>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/kommander/working/plugintemplate/kommanderplugin.kdevtemplate b/kommander/working/plugintemplate/kommanderplugin.kdevtemplate
new file mode 100644
index 00000000..1eb9917f
--- /dev/null
+++ b/kommander/working/plugintemplate/kommanderplugin.kdevtemplate
@@ -0,0 +1,66 @@
+# KDE Config File
+[General]
+Name=Kommander Plugin
+Category=C++/Kommander/
+Comment=This generates a plugin for Kommander
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp
+Archive=kommanderplugin.tar.gz
+
+[ADMIN]
+Type=include
+File=%{kdevelop}/template-common/admin.kdevtemplate
+
+[GNU]
+Type=include
+File=%{kdevelop}/template-common/gnu.kdevtemplate
+
+[MkDir1]
+Type=mkdir
+Dir=%{dest}/src
+
+[FILE1]
+Type=install
+EscapeXML=true
+Source=%{src}/app.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[FILE2]
+Type=install
+Source=%{src}/src-Makefile.am
+Dest=%{dest}/src/Makefile.am
+
+[FILE3]
+Type=install
+Source=%{src}/widget.cpp
+Dest=%{dest}/src/%{APPNAMELC}.cpp
+
+[FILE4]
+Type=install
+Source=%{src}/widget.h
+Dest=%{dest}/src/%{APPNAMELC}.h
+
+[FILE5]
+Type=install
+Source=%{src}/plugin.cpp
+Dest=%{dest}/src/%{APPNAMELC}plugin.cpp
+
+[FILE6]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.cvs
+Dest=%{dest}/Makefile.cvs
+
+[FILE7]
+Type=install
+Source=%{kdevelop}/template-common/kde-configure.in.in
+Dest=%{dest}/configure.in.in
+
+[FILE8]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.am
+Dest=%{dest}/Makefile.am
+
+
+[MSG]
+Type=message
+Comment=A Kommander plugin was created in %{dest}
diff --git a/kommander/working/plugintemplate/kommanderplugin.png b/kommander/working/plugintemplate/kommanderplugin.png
new file mode 100644
index 00000000..2cbd68ee
--- /dev/null
+++ b/kommander/working/plugintemplate/kommanderplugin.png
Binary files differ
diff --git a/kommander/working/plugintemplate/plugin.cpp b/kommander/working/plugintemplate/plugin.cpp
new file mode 100644
index 00000000..e6b506cc
--- /dev/null
+++ b/kommander/working/plugintemplate/plugin.cpp
@@ -0,0 +1,29 @@
+%{CPP_TEMPLATE}
+#include "%{APPNAMELC}.h"
+
+#include <kommanderplugin.h>
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include "%{APPNAMELC}.h"
+
+class %{APPNAME}Plugin : public KommanderPlugin
+{
+public:
+ %{APPNAME}Plugin();
+ virtual QWidget *create( const QString &className, QWidget *parent = 0, const char *name = 0);
+};
+
+%{APPNAME}Plugin::%{APPNAME}Plugin()
+{
+ addWidget( "%{APPNAME}", "Custom", i18n("Kommander %{APPNAME} plugin."), new QIconSet(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium)) );
+}
+
+QWidget *%{APPNAME}Plugin::create( const QString &className, QWidget *parent, const char *name)
+{
+ if (className == "%{APPNAME}")
+ return new %{APPNAME}(parent, name);
+ return 0;
+}
+
+KOMMANDER_EXPORT_PLUGIN(%{APPNAME}Plugin)
diff --git a/kommander/working/plugintemplate/src-Makefile.am b/kommander/working/plugintemplate/src-Makefile.am
new file mode 100644
index 00000000..eb7dbe9d
--- /dev/null
+++ b/kommander/working/plugintemplate/src-Makefile.am
@@ -0,0 +1,19 @@
+lib_LTLIBRARIES = libkmdr%{APPNAMELC}.la
+
+# the library search path.
+libkmdr%{APPNAMELC}_la_LDFLAGS = -module $(KDE_PLUGIN) \
+ $(HK_LDFLAGS) $(all_libraries)
+
+# the libraries to link against.
+libkmdr%{APPNAMELC}_la_LIBADD = -lkommanderwidget -lkommanderplugin \
+ $(LIB_KPARTS) $(LIB_KDEUI)
+
+# which sources should be compiled for widgets
+libkmdr%{APPNAMELC}_la_SOURCES = %{APPNAMELC}.cpp %{APPNAMELC}plugin.cpp
+
+# these are the headers for your project that won't be installed
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+AM_CXXFLAGS= -DHAVE_SSTREAM
+AM_CPPFLAGS= $(all_includes)
diff --git a/kommander/working/plugintemplate/widget.cpp b/kommander/working/plugintemplate/widget.cpp
new file mode 100644
index 00000000..73ec0278
--- /dev/null
+++ b/kommander/working/plugintemplate/widget.cpp
@@ -0,0 +1,116 @@
+%{CPP_TEMPLATE}
+#include "%{APPNAMELC}.h"
+
+#include <kommanderplugin.h>
+#include <specials.h>
+
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <klocale.h>
+
+
+enum Functions {
+ FirstFunction = 11001, //CHANGE THIS NUMBE TO AN UNIQUE ONE!!!
+ Function1,
+ Function2,
+ LastFunction
+};
+
+%{APPNAME}::%{APPNAME}(QWidget *parent, const char *name)
+ : QWidget(parent, name), KommanderWidget(this)
+{
+ QStringList states;
+ states << "default";
+ setStates(states);
+ setDisplayStates(states);
+
+//enable the below code to show a different widget in editor
+/*
+ if (KommanderWidget::inEditor)
+ {
+ setPixmap(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium));
+ setFrameStyle(QFrame::Box | QFrame::Plain);
+ setLineWidth(1);
+ setAlignment(Qt::AlignCenter);
+ }
+ else
+ setHidden(true);
+*/
+
+ KommanderPlugin::setDefaultGroup(Group::DCOP);
+
+//CHANGE THE BELOW LINES TO MATCH YOUR FUNCTIONS NAMES AND SIGNATURE
+ KommanderPlugin::registerFunction(Function1, "function1(QString widget, QString arg1, int arg2)", i18n("Call function1 with two arguments, second is optional."), 2, 3);
+ KommanderPlugin::registerFunction(Function2, "function2(QString widget)", i18n("Get a QString as a result of function2."), 1);
+
+}
+
+%{APPNAME}::~%{APPNAME}()
+{
+}
+
+QString %{APPNAME}::currentState() const
+{
+ return QString("default");
+}
+
+bool %{APPNAME}::isKommanderWidget() const
+{
+ return true;
+}
+
+QStringList %{APPNAME}::associatedText() const
+{
+ return KommanderWidget::associatedText();
+}
+
+void %{APPNAME}::setAssociatedText(const QStringList& a_atext)
+{
+ KommanderWidget::setAssociatedText(a_atext);
+}
+
+void %{APPNAME}::setPopulationText(const QString& a_text)
+{
+ KommanderWidget::setPopulationText(a_text);
+}
+
+QString %{APPNAME}::populationText() const
+{
+ return KommanderWidget::populationText();
+}
+
+void %{APPNAME}::populate()
+{
+ KommanderWidget::evalAssociatedText(populationText());
+}
+
+void %{APPNAME}::contextMenuEvent( QContextMenuEvent * e )
+{
+ e->accept();
+ QPoint p = e->globalPos();
+ emit contextMenuRequested(p.x(), p.y());
+}
+
+
+bool %{APPNAME}::isFunctionSupported(int f)
+{
+ return (f >= FirstFunction && f <= LastFunction); //see specials.h for other DCOP functions you might want to support
+}
+
+QString %{APPNAME}::handleDCOP(int function, const QStringList& args)
+{
+ switch (function)
+ {
+ case Function1:
+ //do something for Function1, like handleFunction1(arg[0], arg[1].toInt());
+ break;
+ case Function2:
+ //do something for Function2, like return handleFunction2();
+ break;
+ default:
+ return KommanderWidget::handleDCOP(function, args);
+ }
+ return QString::null;
+}
+
+#include "%{APPNAMELC}.moc"
diff --git a/kommander/working/plugintemplate/widget.h b/kommander/working/plugintemplate/widget.h
new file mode 100644
index 00000000..56e87f91
--- /dev/null
+++ b/kommander/working/plugintemplate/widget.h
@@ -0,0 +1,46 @@
+%{H_TEMPLATE}
+#ifndef %{APPNAMEUC}_WIDGET_H
+#define %{APPNAMEUC}_WIDGET_H
+
+#include <qwidget.h>
+#include <qstring.h>
+
+#include <kparts/part.h>
+
+#include <kommanderwidget.h>
+
+class QStringList;
+
+//replace QWidget with the widget you want to derive from
+class %{APPNAME}: public QWidget, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ %{APPNAME}(QWidget *parent, const char* name);
+ ~%{APPNAME}();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ virtual void populate();
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+
+signals:
+ void contextMenuRequested(int xpos, int ypos);
+
+protected:
+ void contextMenuEvent( QContextMenuEvent * e );
+};
+
+
+#endif
diff --git a/kommander/x-kommander.desktop b/kommander/x-kommander.desktop
new file mode 100644
index 00000000..45c94003
--- /dev/null
+++ b/kommander/x-kommander.desktop
@@ -0,0 +1,55 @@
+[Desktop Entry]
+Comment=Kommander File
+Comment[bg]=Файл на Kommander
+Comment[br]=Restr Kommander
+Comment[ca]=Fitxer de Kommander
+Comment[cs]=Soubor Kommanderu
+Comment[da]=Kommander-fil
+Comment[de]=Kommander-Datei
+Comment[el]=ΑÏχείο Kommander
+Comment[es]=Archivo de Kommander
+Comment[et]=Kommanderi fail
+Comment[eu]=Kommander fitxategiak
+Comment[fa]=پروندۀ Kommander
+Comment[fi]=Komentotiedosto
+Comment[fr]=Fichier de Kommander
+Comment[ga]=Comhad Kommander
+Comment[gl]=Ficheiro de Kommander
+Comment[hi]=कमांडर फ़ाइल
+Comment[hu]=Kommander-fájl
+Comment[is]=Kommander skrá
+Comment[it]=File di Kommander
+Comment[ja]=Kommander ファイル
+Comment[ka]=Kommander-ის ფáƒáƒ˜áƒšáƒ˜
+Comment[lt]=Kommander byla
+Comment[ms]=Fail Kommander
+Comment[nds]=Kommander-Datei
+Comment[ne]=आदेश फाइल
+Comment[nl]=Kommander-dialoogbestand
+Comment[pa]=Kommander ਫਾਇਲ
+Comment[pl]=Plik Kommandera
+Comment[pt]=Ficheiro do Kommander
+Comment[pt_BR]=Arquivo do Kommander
+Comment[ru]=Файл Kommander
+Comment[sk]=Kommander súbor
+Comment[sl]=Datoteka Kommanderja
+Comment[sr]=Kommander-ов фајл
+Comment[sr@Latn]=Kommander-ov fajl
+Comment[sv]=Kommander-fil
+Comment[ta]=Kகடà¯à®Ÿà®³à¯ˆ கோபà¯à®ªà¯
+Comment[tg]=Файли Kommander
+Comment[tr]=Kommander Dosyası
+Comment[uk]=Файл Kommander
+Comment[zh_CN]=Kommander 文件
+Comment[zh_HK]=Kommander 檔案
+Comment[zh_TW]=Kommander 檔案
+Icon=widget_doc
+Type=MimeType
+MimeType=application/x-kommander
+Patterns=*.kmdr;
+X-KDE-IsAlso=application/x-executable-script
+
+[Property::X-KDE-text]
+Type=bool
+Value=true
+
diff --git a/kxsldbg/Makefile.am b/kxsldbg/Makefile.am
new file mode 100644
index 00000000..e70c4127
--- /dev/null
+++ b/kxsldbg/Makefile.am
@@ -0,0 +1,66 @@
+bin_PROGRAMS = kxsldbg xsldbg
+
+kxsldbg_SOURCES = kxsldbg.cpp main.cpp kxsldbgif.skel
+noinst_HEADERS = kxsldbg.h
+kxsldbg_DEPENDENCIES = ./kxsldbgpart/libqtnotfier/libqtnotfier.la ./kxsldbgpart/libkxsldbgcommon.la ./kxsldbgpart/libxsldbg/libxsldbg.la
+kxsldbg_LDADD = ./kxsldbgpart/libqtnotfier/libqtnotfier.la ./kxsldbgpart/libkxsldbgcommon.la ./kxsldbgpart/libxsldbg/libxsldbg.la $(LIB_KDEUI) $(LIBXSLT_LIBS) $(LIBXML_LIBS) $(LIB_KPARTS)
+
+SUBDIRS = kxsldbgpart
+
+xdg_apps_DATA = kxsldbg.desktop
+
+# Disable building xsldbg application as documentation for it is not ready
+#
+xsldbg_SOURCES = xsldbgmain.cpp
+
+xsldbg_CFLAGS = $(XSLDBG_CFLAGS) $(all_includes)
+
+xsldbg_DEPENDENCIES = kxsldbgpart/libxsldbg/libxsldbg.la
+
+# use of configure defined libraries
+xsldbg_LDADD = kxsldbgpart/libxsldbg/libxsldbg.la $(LIBXSLT_LIBS) $(LIBXML_LIBS) $(LIB_KDEUI)
+#
+# the library search path.
+xsldbg_LDFLAGS = $(all_libraries) $(XSLDBG_EXTRA_LIBS)
+
+# These paths are KDE specific. Use them:
+# kde_appsdir Where your application's menu entry (.desktop) should go to.
+# kde_icondir Where your icon should go to - better use KDE_ICON.
+# kde_sounddir Where your sounds should go to.
+# kde_htmldir Where your docs should go to. (contains lang subdirs)
+# kde_datadir Where you install application data. (Use a subdir)
+# kde_locale Where translation files should go to. (contains lang subdirs)
+# kde_cgidir Where cgi-bin executables should go to.
+# kde_confdir Where config files should go to (system-wide ones with default values).
+# kde_mimedir Where mimetypes .desktop files should go to.
+# kde_servicesdir Where services .desktop files should go to.
+# kde_servicetypesdir Where servicetypes .desktop files should go to.
+# kde_toolbardir Where general toolbar icons should go to (deprecated, use KDE_ICON).
+# kde_wallpaperdir Where general wallpapers should go to.
+# kde_templatesdir Where templates for the "New" menu (Konqueror/KDesktop) should go to.
+# kde_bindir Where executables should go to. Use bin_PROGRAMS or bin_SCRIPTS.
+# kde_libdir Where shared libraries should go to. Use lib_LTLIBRARIES.
+# kde_moduledir Where modules (e.g. parts) should go to. Use kde_module_LTLIBRARIES.
+# kde_styledir Where Qt/KDE widget styles should go to (new in KDE 3).
+# kde_designerdir Where Qt Designer plugins should go to (new in KDE 3).
+
+# set the include path for X, qt and KDE
+INCLUDES= $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS) $(all_includes)
+
+METASOURCES = AUTO
+
+# the application source, library search path, and link libraries
+kxsldbg_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+
+# this is where the shell's XML-GUI resource file goes
+shellrcdir = $(kde_datadir)/kxsldbg
+shellrc_DATA = kxsldbg_shell.rc
+
+messages: rc.cpp
+ LIST=`find . -name \*.ui -o -name \*.rc`; \
+ $(EXTRACTRC) $$LIST >> rc.cpp ;\
+ LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
+ if test -n "$$LIST"; then \
+ $(XGETTEXT) $$LIST -o $(podir)/kxsldbg.pot; \
+ fi
+
diff --git a/kxsldbg/configure.in.in b/kxsldbg/configure.in.in
new file mode 100644
index 00000000..b4f1ef5e
--- /dev/null
+++ b/kxsldbg/configure.in.in
@@ -0,0 +1,176 @@
+LIBXSLT_REQUIRED_VERSION="1.0.18"
+AC_SUBST(LIBXSLT_REQUIRED_VERSION)
+
+dnl
+dnl Math detection
+dnl
+
+AC_CHECK_HEADERS(sys/types.h unistd.h string.h)
+AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h ansidecl.h)
+AC_CHECK_HEADERS(time.h sys/stat.h stdarg.h)
+AC_CHECK_FUNCS(stat _stat)
+
+AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
+ [M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)]))
+
+AC_CHECK_FUNC(isinf, , AC_CHECK_LIB(m, isinf,
+ [M_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)]))
+
+AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow,
+ [M_LIBS="-lm"; AC_DEFINE(HAVE_POW)]))
+
+AC_CHECK_FUNC(floor, , AC_CHECK_LIB(m, pow,
+ [M_LIBS="-lm"; AC_DEFINE(HAVE_FLOOR)]))
+
+AC_CHECK_FUNC(fabs, , AC_CHECK_LIB(m, pow,
+ [M_LIBS="-lm"; AC_DEFINE(HAVE_FABS)]))
+AC_CHECK_FUNCS(gettimeofday)
+AC_CHECK_FUNCS(mktime localtime asctime)
+
+AH_TEMPLATE(USE_DOCS_MACRO)
+AH_TEMPLATE(TIMESTAMP)
+AH_TEMPLATE(WITH_DEBUG_HELP)
+AH_TEMPLATE(WITH_XSLDBG_DEBUG)
+AH_TEMPLATE(XSLDBG_BIN)
+AH_TEMPLATE(USE_XSLDBG_AS_THREAD)
+AH_TEMPLATE(HAVE_INCLUDE_FIX)
+
+AH_TEMPLATE(_GNU_SOURCE)
+AH_TEMPLATE(HAVE_ISINF)
+AH_TEMPLATE(HAVE_ISNAN)
+AH_TEMPLATE(HAVE_POW)
+AH_TEMPLATE(HAVE_FLOOR)
+AH_TEMPLATE(HAVE_FABS)
+AH_TEMPLATE(HAVE_QT)
+AH_TEMPLATE(HAVE_PTHREAD)
+AH_TEMPLATE(HAVE_READLINE)
+AH_TEMPLATE(HAVE_HISTORY)
+
+dnl
+dnl how are we to invoke xsldbg, or the other stylesheet processor (xsltproc?)
+dnl
+
+AC_DEFINE(XSLDBG_BIN, "xsldbg")
+
+
+dnl
+dnl Do we have we fix for included xml files
+dnl
+
+save_LDFLAGS="$LDFLAGS"
+save_CFLAGS="$CFLAGS"
+LDFLAGS="$LDFLAGS $LIBXML_LIBS"
+CFLAGS="$CFLAGS $LIBXML_CFLAGS"
+
+AC_CHECK_LIB(xml2, xmlSetEntityReferenceFunc,
+ [AC_DEFINE(HAVE_INCLUDE_FIX)],
+ [AC_MSG_RESULT(
+!!Warning!! The version of libxml2 installed does not support
+ debugging of files included as entities. Test 10 will be skipped
+ as it will fail. You will not be able to set breakpoints on external
+ entities. Try upgrading your libxml2.
+ See also --enable-includefix)
+ RUNTEST10="false"
+ ])
+
+LDFLAGS="$save_LDFLAGS"
+CFLAGS="$save_CFLAGS"
+
+AC_ARG_ENABLE([includefix],
+ [ --enable-includefix Do you want to force the use of include fix (no)], [do_include_fix=$enableval], [do_include_fix="no"])
+
+if test "x$do_include_fix" = "xyes"; then
+ AC_DEFINE(HAVE_INCLUDE_FIX)
+ AC_MSG_RESULT(Forcing the use if include fix)
+fi
+
+
+
+XSLDBG_MAJOR_VERSION=3
+XSLDBG_MINOR_VERSION=1
+XSLDBG_MICRO_VERSION=7
+XSLDBG_VERSION=$XSLDBG_MAJOR_VERSION.$XSLDBG_MINOR_VERSION.$XSLDBG_MICRO_VERSION
+XSLDBG_VERSION_INFO=`expr $XSLDBG_MAJOR_VERSION + \
+$XSLDBG_MINOR_VERSION`:$XSLDBG_MICRO_VERSION:$XSLDBG_MINOR_VERSION
+
+XSLDBG_VERSION_NUMBER=`expr $XSLDBG_MAJOR_VERSION \* 10000 + \
+$XSLDBG_MINOR_VERSION \* 100 + $XSLDBG_MICRO_VERSION`
+AC_SUBST(XSLDBG_MAJOR_VERSION)
+AC_SUBST(XSLDBG_MINOR_VERSION)
+AC_SUBST(XSLDBG_MICRO_VERSION)
+AC_SUBST(XSLDBG_VERSION)
+AC_SUBST(XSLDBG_VERSION_INFO)
+AC_SUBST(XSLDBG_VERSION_NUMBER)
+
+
+dnl
+dnl We must run xsldbg as a thread
+dnl
+AC_CHECK_HEADERS(pthread.h,
+ AC_DEFINE(HAVE_PTHREAD)
+ AVE_PTHREAD=1
+ SE_XSLDBG_AS_THREAD=1
+ AC_DEFINE(USE_XSLDBG_AS_THREAD),
+ AC_MSG_ERROR(PThread library not found)
+)
+XSLDBG_INCLUDEDIR="`pwd`/kxsldbg/kxsldbgpart"
+
+dnl Where is the xsldbg documentation stored
+dnl
+docs_macro=true
+AC_ARG_ENABLE(docs_macro,
+ [ --enable-docs-macro Use a compiler macro to specify where documentation is (PREFIX/doc/xsldbg/)],
+ [docs_macro=$enableval], [docs_macro="yes"])
+
+if test "x$docs_macro" = "xyes"; then
+ AC_DEFINE(USE_DOCS_MACRO, 1)
+ if test "x$prefix" != "x"
+ then
+ AC_MSG_RESULT(xsldbg will look for installed documentation in ${prefix}/doc/xsldbg)
+ else
+ AC_MSG_RESULT(xsldbg will look for installed documentation in ${ac_default_prefix}doc/xsldbg/)
+ fi
+ DOCS_PATH="${prefix}/doc/xsldbg"
+AC_SUBST(DOCS_PATH)
+
+else
+ AC_MSG_RESULT(
+
+ !!Warning!! Using a environment variable for specifiying location of documentation.
+ On non risc os systems : XSLDBG_DOCS_DIR
+ On risc os systems : XSLDebugDocs\$Dir
+ See --enable-docs-macro in ./configure
+ )
+fi
+
+
+dnl include extra debugging for xsldbg?
+AC_ARG_ENABLE([xsldbg-debugging],
+ [ --enable-xsldbg-debugging Do you want to enable lots of debugging messages in xsldbg (no)], [do_xsldbg_debugging=$enableval], [do_xsldbg_debugging="no"])
+
+if test "x$do_xsldbg_debugging" = "xyes"; then
+ AC_DEFINE(WITH_XSLDBG_DEBUG)
+ AC_MSG_RESULT(Enabling lots of debug messages in xsldbg)
+fi
+
+
+
+
+AC_MSG_RESULT(Using xsldbg as a part of kxsldbg)
+
+dnl
+dnl Check for readline and history
+dnl
+XSLDBG_EXTRA_LIBS=""
+dnl AC_CHECK_HEADERS(readline/readline.h, [
+dnl AC_DEFINE(HAVE_READLINE)
+dnl XSLDBG_EXTRA_LIBS="-lreadline -lncurses"])
+dnl AC_CHECK_HEADER(readline/history.h, [
+dnl AC_DEFINE(HAVE_HISTORY)
+dnl XSLDBG_EXTRA_LIBS="$XSLDBG_EXTRA_LIBS -lhistory"])
+
+AC_SUBST(XSLDBG_INCLUDEDIR)
+AC_SUBST(XSLDBG_EXTRA_LIBS)
+XSLDBG_CFLAGS="-I${XSLDBG_INCLUDEDIR} ${LIBXSLT_CFLAGS} "
+AC_SUBST(XSLDBG_CFLAGS)
+AC_SUBST(XSLDBG_PREFIX)
diff --git a/kxsldbg/data/Makefile.am b/kxsldbg/data/Makefile.am
new file mode 100644
index 00000000..d6bd3286
--- /dev/null
+++ b/kxsldbg/data/Makefile.am
@@ -0,0 +1,16 @@
+SUBDIRS =
+
+
+# Provide a example XSLT scripts : testdoc.xsl and empty.xsl
+commondata = test1.xml test2.xml test3.xml test4.xml \
+ test_import.xsl test_include_bot.xsl test_include_top.xsl \
+ testdoc.dtd testdoc.xml testdoc.xsl \
+ empty.xsl empty.xml
+
+
+kxsldbgdir = ${kde_datadir}/kxsldbg
+kxsldbg_DATA = ${commondata}
+
+
+xsldbgdir = ${kde_datadir}/xsldbg
+xsldbg_DATA = ${commondata}
diff --git a/kxsldbg/data/empty.xml b/kxsldbg/data/empty.xml
new file mode 100644
index 00000000..aa9ac07e
--- /dev/null
+++ b/kxsldbg/data/empty.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ File : empty.xml
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: empty xml data for getting started
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+<empty>
+ Empty example data file
+</empty>
diff --git a/kxsldbg/data/empty.xsl b/kxsldbg/data/empty.xsl
new file mode 100644
index 00000000..ab4548ef
--- /dev/null
+++ b/kxsldbg/data/empty.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ File : empty.xsl
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: empty stylesheet for getting started
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+version="1.0">
+
+ <xsl:output method="text"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates />
+ </xsl:template>
+</xsl:stylesheet>
+
diff --git a/kxsldbg/data/test1.xml b/kxsldbg/data/test1.xml
new file mode 100644
index 00000000..06c35dde
--- /dev/null
+++ b/kxsldbg/data/test1.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ File : test1.xml
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: xml data for stylesheet for testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+<html>
+<head>
+</head>
+<body>
+ <h1>test1</h1>
+ <p>text1</p>
+</body>
+</html>
diff --git a/kxsldbg/data/test2.xml b/kxsldbg/data/test2.xml
new file mode 100644
index 00000000..80bf77a7
--- /dev/null
+++ b/kxsldbg/data/test2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ File : test2.xml
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: xml data for stylesheet for testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+
+<result>
+ <head name="foo"/>
+ <data name="fred"/>
+ <data name="barney"/>
+ <data name="pebbles"/>
+ <extra name="wilma"/>
+</result>
+
+
+
+<!-- initialization code for xemacs -->
+<!--
+Local Variables:
+mode: sgml
+sgml-minimize-attributes:nil
+sgml-general-insert-case:lower
+sgml-indent-step:0
+sgml-indent-data:nil
+End:
+-->
diff --git a/kxsldbg/data/test3.xml b/kxsldbg/data/test3.xml
new file mode 100644
index 00000000..706321e4
--- /dev/null
+++ b/kxsldbg/data/test3.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ File : test3.xml
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: xml data for stylesheet for testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+
+<result>
+ <data>2</data>
+ <data>1</data>
+ <data>3</data>
+ <extra/>
+</result>
+
+
+
+<!-- initialization code for xemacs -->
+<!--
+Local Variables:
+mode: sgml
+sgml-minimize-attributes:nil
+sgml-general-insert-case:lower
+sgml-indent-step:0
+sgml-indent-data:nil
+End:
+-->
diff --git a/kxsldbg/data/test4.xml b/kxsldbg/data/test4.xml
new file mode 100644
index 00000000..437ca18e
--- /dev/null
+++ b/kxsldbg/data/test4.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ File : test4.xml
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: xml data for stylesheet for testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+
+<result>
+ <data/>
+ <extra/>
+</result>
+
+
+
+<!-- initialization code for xemacs -->
+<!--
+Local Variables:
+mode: sgml
+sgml-minimize-attributes:nil
+sgml-general-insert-case:lower
+sgml-indent-step:0
+sgml-indent-data:nil
+End:
+-->
diff --git a/kxsldbg/data/test_import.xsl b/kxsldbg/data/test_import.xsl
new file mode 100644
index 00000000..e48539eb
--- /dev/null
+++ b/kxsldbg/data/test_import.xsl
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ File : test_import.xsl
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: stylesheet for testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <xsl:template match="head">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/kxsldbg/data/test_include_bot.xsl b/kxsldbg/data/test_include_bot.xsl
new file mode 100644
index 00000000..6dd6c9aa
--- /dev/null
+++ b/kxsldbg/data/test_include_bot.xsl
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ File : test_include.xsl
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: stylesheet for include testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <xsl:template match="include_bot">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/kxsldbg/data/test_include_top.xsl b/kxsldbg/data/test_include_top.xsl
new file mode 100644
index 00000000..df7e4967
--- /dev/null
+++ b/kxsldbg/data/test_include_top.xsl
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ File : test_include_top.xsl
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: stylesheet for include testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <xsl:template name="import_top">
+ <xsl:apply-templates select="result/head"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/kxsldbg/data/testdoc.dtd b/kxsldbg/data/testdoc.dtd
new file mode 100644
index 00000000..08e9108a
--- /dev/null
+++ b/kxsldbg/data/testdoc.dtd
@@ -0,0 +1,6 @@
+<!ELEMENT simple (#PCDATA)>
+<!ENTITY mytext "Some text">
+<!ENTITY anotherDoc SYSTEM "test1.xml" >
+<!ENTITY anotherDoc2 SYSTEM "test2.xml" >
+<!ENTITY anotherDoc3 SYSTEM "test3.xml" >
+<!ENTITY anotherDoc4 SYSTEM "test4.xml" > \ No newline at end of file
diff --git a/kxsldbg/data/testdoc.xml b/kxsldbg/data/testdoc.xml
new file mode 100644
index 00000000..894fbbfe
--- /dev/null
+++ b/kxsldbg/data/testdoc.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ File : testdoc.xml
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: xml data for stylesheet for testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+
+<!DOCTYPE simple SYSTEM "testdoc.dtd">
+
+<simple>
+ &mytext;
+ &anotherDoc;
+ &anotherDoc;
+ &anotherDoc;
+ &anotherDoc2;
+ &anotherDoc3;
+ &anotherDoc4;
+</simple>
+
+
+<!-- initialization code for xemacs -->
+<!--
+Local Variables:
+mode: sgml
+sgml-minimize-attributes:nil
+sgml-general-insert-case:lower
+sgml-indent-step:0
+sgml-indent-data:nil
+End:
+-->
diff --git a/kxsldbg/data/testdoc.xsl b/kxsldbg/data/testdoc.xsl
new file mode 100644
index 00000000..da6447f3
--- /dev/null
+++ b/kxsldbg/data/testdoc.xsl
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ File : testdoc.xsl
+ Author: Keith Isdale <k_isdale@tpg.com.au>
+ Description: stylesheet for testing
+ Copyright Reserved Under GPL
+-->
+<!-- This file does not require translation -->
+<!-- NO TRANSLATION -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+version="1.0">
+
+ <xsl:import href="test_import.xsl"/>
+ <xsl:include href="test_include_top.xsl"/>
+ <xsl:strip-space elements="text()"/>
+ <xsl:decimal-format name="test" decimal-separator="."/>
+ <xsl:output method="text"/>
+ <xsl:variable name="globalvariable" select="'foo'"/>
+
+ <xsl:template match="/">
+ <xsl:call-template name="test_set_variable">
+ <xsl:with-param name="item" select="'1234'"/>
+ </xsl:call-template>
+
+ <xsl:variable name="localvariable" select="'bar'"/>
+ <xsl:text>Global variable contains </xsl:text><xsl:value-of select="$globalvariable"/><xsl:text>
+</xsl:text>
+ <xsl:text>Local variable contains </xsl:text><xsl:value-of select="$localvariable"/><xsl:text>
+</xsl:text>
+
+ <!-- test import of xsl file -->
+ <xsl:call-template name="import_top"/>
+
+ <!-- Basic xsl:apply-templates, xsl:call-template usage -->
+ <!-- Test basic usage of xsl:apply-templates -->
+ <xsl:apply-templates select="//result/data"/>
+ <!-- Test basic usage of xsl:call-template -->
+ <xsl:call-template name="call-template1"/>
+
+ <!-- Test xsl:apply-templates with parameter value.
+ Test the ability to step into a xsl:with-param child -->
+ <xsl:apply-templates select="//result/data">
+ <xsl:with-param name="item">
+ <item/>
+ </xsl:with-param>
+ </xsl:apply-templates>
+
+ <!-- Test xsl:call-template with parameter value
+ Test the ability to step into a xsl:with-param child -->
+ <xsl:call-template name="call-template2">
+ <xsl:with-param name="item">
+ <item />
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <!-- Test ability to step into xsl:param from xsl:apply-templates -->
+ <xsl:apply-templates select="//result/extra" />
+
+ <!-- Test ability to step into xsl:param from xsl:call-template -->
+ <xsl:call-template name="call-template3" />
+
+ <!-- Test ability to step into xsl:sort from xsl:apply-templates -->
+ <xsl:apply-templates select="//result/data">
+ <xsl:sort select="."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:apply-templates>
+
+ <xsl:apply-imports/> <!-- useless but test that we can step to it -->
+
+ <xsl:apply-templates select="//result/data" mode="verbose" />
+
+ </xsl:template>
+
+
+ <xsl:template match="result">
+ <xsl:param name="item" select="'default'"/>
+ <!-- ignore node content -->
+ </xsl:template>
+
+
+ <xsl:template match="data">
+ <!-- ignore node content -->
+ </xsl:template>
+
+ <xsl:template match="data" mode="verbose">
+ <xsl:apply-templates />
+ </xsl:template>
+
+
+ <xsl:template match="extra">
+ <xsl:param name="item">
+ <item/>
+ </xsl:param>
+ <!-- ignore node content -->
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template name="call-template1">
+ <xsl:number value="position()" format="1."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template name="call-template2">
+ <!-- ignore any param provided -->
+ <!-- test message -->
+ <xsl:message terminate="no">Message here</xsl:message>
+ <xsl:processing-instruction name="pitest">
+ pi text
+ </xsl:processing-instruction>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template name="call-template3">
+ <xsl:param name="item">
+ <item/>
+ </xsl:param>
+ <!-- test comments -->
+ <xsl:comment>A text comment.</xsl:comment>
+ <!-- test copy and copy-of -->
+ <xsl:copy>copy text</xsl:copy>
+ <xsl:copy-of select="'copy-of Text'"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template name="test_set_variable">
+ <xsl:param name="item" select="'default-value'"/>
+ <xsl:value-of select="$item"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/kxsldbg/kxsldbg.cpp b/kxsldbg/kxsldbg.cpp
new file mode 100644
index 00000000..c28325a3
--- /dev/null
+++ b/kxsldbg/kxsldbg.cpp
@@ -0,0 +1,173 @@
+/*
+ * kxsldbg.cpp
+ *
+ * Copyright (C) 2001 <kurt@granroth.org>
+ */
+#include "kxsldbg.h"
+
+#include <kkeydialog.h>
+#include <kconfig.h>
+#include <klocale.h>
+
+#include <kedittoolbar.h>
+
+#include <kaction.h>
+#include <kstdaction.h>
+
+#include <klibloader.h>
+#include <kmessagebox.h>
+#include <kstatusbar.h>
+
+KXsldbg::KXsldbg()
+ : DCOPObject("KXsldbg"), KParts::MainWindow( 0L, "kxsldbg" )
+{
+ // set the shell's ui resource file
+ setXMLFile("kxsldbg_shell.rc");
+
+ // then, setup our actions
+ setupActions();
+
+ // and a status bar
+ statusBar()->show();
+ statusBar()->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
+
+ // this routine will find and load our Part. it finds the Part by
+ // name which is a bad idea usually.. but it's alright in this
+ // case since our Part is made for this Shell
+ KLibFactory *factory = KLibLoader::self()->factory("libkxsldbgpart");
+ if (factory)
+ {
+ // now that the Part is loaded, we cast it to a Part to get
+ // our hands on it
+ m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(this,
+ "kxsldbg_part", "KParts::ReadOnlyPart" ));
+
+ if (m_part)
+ {
+ // tell the KParts::MainWindow that this is indeed the main widget
+ setCentralWidget(m_part->widget());
+
+ // and integrate the part's GUI with the shell's
+ createGUI(m_part);
+
+ // connect up signals
+ kapp->dcopClient()->attach();
+ connectDCOPSignal(0, 0, "debuggerPositionChanged(QString,int)", "newDebuggerPosition(QString,int)", false );
+ connectDCOPSignal(0, 0, "editorPositionChanged(QString,int,int)", "newCursorPosition(QString,int,int)", false );
+ }
+
+ }
+ else
+ {
+ // if we couldn't find our Part, we exit since the Shell by
+ // itself can't do anything useful
+ KMessageBox::error(this, i18n("Could not find our part."));
+ kapp->quit();
+ }
+}
+
+KXsldbg::~KXsldbg()
+{
+ if (m_part)
+ m_part->closeURL();
+
+ delete m_part;
+}
+
+void KXsldbg::quit()
+{
+ closeURL();
+ close();
+}
+
+bool KXsldbg::closeURL()
+{
+ if (m_part)
+ m_part->closeURL();
+
+ return true;
+}
+
+void KXsldbg::setupActions()
+{
+ KAction *act = KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ connect(act, SIGNAL(activated()), this, SLOT(quit()));
+
+ m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
+ m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
+
+ KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+}
+
+void KXsldbg::saveProperties(KConfig* /*config*/)
+{
+ // the 'config' object points to the session managed
+ // config file. anything you write here will be available
+ // later when this app is restored
+}
+
+void KXsldbg::readProperties(KConfig* /*config*/)
+{
+ // the 'config' object points to the session managed
+ // config file. this function is automatically called whenever
+ // the app is being restored. read in here whatever you wrote
+ // in 'saveProperties'
+}
+
+
+void KXsldbg::optionsShowToolbar()
+{
+ // this is all very cut and paste code for showing/hiding the
+ // toolbar
+ if (m_toolbarAction->isChecked())
+ toolBar()->show();
+ else
+ toolBar()->hide();
+}
+
+void KXsldbg::optionsShowStatusbar()
+{
+ // this is all very cut and paste code for showing/hiding the
+ // statusbar
+ if (m_statusbarAction->isChecked())
+ statusBar()->show();
+ else
+ statusBar()->hide();
+}
+
+void KXsldbg::optionsConfigureKeys()
+{
+ KKeyDialog::configure(actionCollection(), "kxsldbg_shell.rc");
+}
+
+void KXsldbg::optionsConfigureToolbars()
+{
+ saveMainWindowSettings(KGlobal::config(), "MainWindow");
+
+ // use the standard toolbar editor
+ KEditToolbar dlg(factory());
+ connect(&dlg, SIGNAL(newToolbarConfig()),
+ this, SLOT(applyNewToolbarConfig()));
+ dlg.exec();
+}
+
+void KXsldbg::applyNewToolbarConfig()
+{
+ applyMainWindowSettings(KGlobal::config(), "MainWindow");
+}
+
+
+void KXsldbg::newCursorPosition(const QString &file, int lineNumber, int columnNumber)
+{
+ statusBar()->clear();
+ statusBar()->message( i18n("File: %1 Line: %2 Col: %3").arg(file).arg(lineNumber).arg(columnNumber));
+}
+
+void KXsldbg::newDebuggerPosition(const QString &file, int lineNumber)
+{
+ // maybe do something extra here later
+ newCursorPosition(file, lineNumber);
+}
+
+#include "kxsldbg.moc"
diff --git a/kxsldbg/kxsldbg.desktop b/kxsldbg/kxsldbg.desktop
new file mode 100644
index 00000000..8ab7ad9e
--- /dev/null
+++ b/kxsldbg/kxsldbg.desktop
@@ -0,0 +1,53 @@
+[Desktop Entry]
+Name=KXSLDbg
+Name[sv]=Kxsldbg
+Name[ta]=KXSLDபிஜி
+GenericName=XSLT Debugger
+GenericName[bg]=Дебъгер XSLT
+GenericName[br]=Dizraener XSLT
+GenericName[ca]=Depurador XSLT
+GenericName[cs]=XSLT debugger
+GenericName[da]=XSLT-Fejlretter
+GenericName[de]=XSLT-Debugger
+GenericName[el]=Αποσφαλματωτής XSLT
+GenericName[es]=Depurador XSLT
+GenericName[et]=XSLT silur
+GenericName[eu]=XSLT araztailea
+GenericName[fa]=اشکال‌زدای XSLT
+GenericName[fi]=XSLT debuggeri
+GenericName[fr]=Débogueur XSLT
+GenericName[ga]=Dífhabhtóir XSLT
+GenericName[gl]=Depurador XSLT
+GenericName[hi]=XSLT डिबगर
+GenericName[hu]=XSLT-nyomkövető
+GenericName[is]=XSLT aflúsari
+GenericName[it]=Debugger per XSLT
+GenericName[ja]=XSLT デãƒãƒƒã‚¬
+GenericName[lt]=XSLT derintuvÄ—
+GenericName[ms]=Penyahralat XSLT
+GenericName[nds]=XSLT-Fehlersöker
+GenericName[ne]=तà¥à¤°à¥à¤Ÿà¤¿à¤®à¥‹à¤šà¤• à¤à¤•à¥à¤¸à¤à¤¸à¤à¤²à¤Ÿà¥€
+GenericName[nl]=XSLT-debugger
+GenericName[pl]=Debuger XSLT
+GenericName[pt]=Depuração de XSLT
+GenericName[pt_BR]=Debugger para XSLT
+GenericName[ro]=Depanator XSLT
+GenericName[ru]=Отладчик XSLT
+GenericName[sk]=XSLT debuger
+GenericName[sl]=RazhroÅ¡Äevalnik XSLT
+GenericName[sr]=ИÑправљач XSLT-а
+GenericName[sr@Latn]=IspravljaÄ XSLT-a
+GenericName[sv]=XSLT-felsökare
+GenericName[ta]=XSLT வழà¯à®¨à¯€à®•à¯à®•à¯à®ªà®µà®°à¯
+GenericName[tg]=Ғалатёби XSLT
+GenericName[tr]=XSLT Hata Ayıklayıcısı
+GenericName[uk]=Зневаджувач XSLT
+GenericName[zh_CN]=XSLT 调试器
+GenericName[zh_HK]=XSLT 除錯器
+GenericName[zh_TW]=XSLT 除錯器
+Exec=kxsldbg %i %m -caption "%c"
+Icon=kxsldbg
+Type=Application
+DocPath=kxsldbg/index.html
+Terminal=false
+Categories=Qt;KDE;Development;WebDevelopment;
diff --git a/kxsldbg/kxsldbg.h b/kxsldbg/kxsldbg.h
new file mode 100644
index 00000000..7c75629a
--- /dev/null
+++ b/kxsldbg/kxsldbg.h
@@ -0,0 +1,84 @@
+#ifndef KXSLDBG_H
+#define KXSLDBG_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <kapplication.h>
+#include <kparts/mainwindow.h>
+#include <dcopobject.h>
+#include <dcopclient.h>
+#include "kxsldbgif.h"
+
+class KToggleAction;
+
+/**
+ * This is the application "Shell". It has a menubar, toolbar, and
+ * statusbar but relies on the "Part" to do all the real work.
+ *
+ * @short Application Shell
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ * @version 0.4
+ */
+class KXsldbg : public KParts::MainWindow, public KXsldbgIf
+{
+ Q_OBJECT
+
+public:
+ /**
+ * Default Constructor
+ */
+ KXsldbg();
+
+ /**
+ * Default Destructor
+ */
+ virtual ~KXsldbg();
+
+ /**
+ KxsldbgIf implementation
+ */
+ void newCursorPosition(const QString &file, int lineNumber, int columnNumber=0);
+ void newDebuggerPosition(const QString & file, int lineNumber);
+
+protected:
+ /**
+ * This method is called when it is time for the app to save its
+ * properties for session management purposes.
+ */
+ void saveProperties(KConfig *);
+
+ /**
+ * This method is called when this app is restored. The KConfig
+ * object points to the session management config file that was saved
+ * with @ref saveProperties
+ */
+ void readProperties(KConfig *);
+
+ virtual bool closeURL();
+
+public slots:
+ void quit();
+
+private slots:
+ void optionsShowToolbar();
+ void optionsShowStatusbar();
+ void optionsConfigureKeys();
+ void optionsConfigureToolbars();
+
+ void applyNewToolbarConfig();
+
+
+private:
+ void setupAccel();
+ void setupActions();
+
+private:
+ KParts::ReadOnlyPart *m_part;
+
+ KToggleAction *m_toolbarAction;
+ KToggleAction *m_statusbarAction;
+};
+
+#endif // KXSLDBG_H
diff --git a/kxsldbg/kxsldbg_shell.rc b/kxsldbg/kxsldbg_shell.rc
new file mode 100644
index 00000000..d3e2fc86
--- /dev/null
+++ b/kxsldbg/kxsldbg_shell.rc
@@ -0,0 +1,29 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="kxsldbg_shell" version="1">
+<MenuBar>
+ <Menu noMerge="1" name="file"><text>&amp;File</text>
+ <Merge/>
+ <Separator/>
+ <Action name="file_quit"/>
+ </Menu>
+ <Menu name="debug"><text>Debug</text>
+ </Menu>
+ <Menu noMerge="1" name="settings"><text>&amp;Settings</text>
+ <Action name="options_show_toolbar"/>
+ <Action name="options_show_statusbar"/>
+ <Merge name="show_merge"/>
+ <Separator/>
+ <Action name="options_configure_keybinding"/>
+ <Action name="options_configure_toolbars"/>
+ <Action name="options_configure"/>
+ <Action name="configureEditorCmd"/>
+ <Merge name="configure_merge"/>
+ <Separator/>
+ <Merge/>
+ </Menu>
+</MenuBar>
+<ToolBar noMerge="1" name="mainToolBar"><text>Main Toolbar</text>
+ <Merge/>
+ <Action name="help"/>
+</ToolBar>
+</kpartgui>
diff --git a/kxsldbg/kxsldbgif.h b/kxsldbg/kxsldbgif.h
new file mode 100644
index 00000000..a9942bfc
--- /dev/null
+++ b/kxsldbg/kxsldbgif.h
@@ -0,0 +1,17 @@
+#ifndef KXSLDBGIF_H
+#define KXSLDBGIF_H
+
+#include <dcopobject.h>
+
+class KXsldbgIf : virtual public DCOPObject
+{
+ K_DCOP
+ k_dcop:
+
+ virtual void newCursorPosition(const QString & file, int lineNumber, int columnNumber=0) = 0;
+ virtual void newDebuggerPosition(const QString & file, int lineNumber) = 0;
+
+};
+
+#endif
+
diff --git a/kxsldbg/kxsldbgpart/Makefile.am b/kxsldbg/kxsldbgpart/Makefile.am
new file mode 100644
index 00000000..ee5e1e9a
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/Makefile.am
@@ -0,0 +1,31 @@
+noinst_LTLIBRARIES = libkxsldbgcommon.la
+libkxsldbgcommon_la_SOURCES = xsldbgwalkspeedimpl.cpp xsldbgtemplatesimpl.cpp xsldbgtemplatelistitem.cpp xsldbgsourcesimpl.cpp xsldbgoutputview.cpp xsldbglocalvariablesimpl.cpp xsldbglocallistitem.cpp xsldbglistitem.cpp xsldbginspector.cpp xsldbgglobalvariablesimpl.cpp xsldbggloballistitem.cpp xsldbgentitiesimpl.cpp xsldbgdoc.cpp xsldbgdialogbase.cpp xsldbgdebugger.cpp xsldbgconfigimpl.cpp xsldbgcallstackimpl.cpp xsldbgbreakpointsimpl.cpp xsldbgbreakpointlistitem.cpp qxsldbgdoc.cpp kxsldbg_part.cpp kxsldbg_partif.skel xsldbgwalkspeed.ui xsldbgtemplates.ui xsldbgsources.ui xsldbgmsgdialog.ui xsldbglocalvariables.ui xsldbgglobalvariables.ui xsldbgentities.ui xsldbgconfig.ui xsldbgcallstack.ui xsldbgbreakpoints.ui
+libkxsldbgcommon_la_METASOURCES = AUTO
+libkxsldbgcommon_la_LDFLAGS = $(all_libraries)
+libkxsldbgcommon_la_LIBADD = libxsldbg/libxsldbg.la libqtnotfier/libqtnotfier.la
+
+noinst_HEADERS = kxsldbg_part.h qxsldbgdoc.h xsldbgbreakpointlistitem.h xsldbgbreakpointsimpl.h xsldbgcallstackimpl.h xsldbgconfigimpl.h xsldbgdebugger.h xsldbgdialogbase.h xsldbgdoc.h xsldbgdocmap.h xsldbgentitiesimpl.h xsldbggloballistitem.h xsldbgglobalvariablesimpl.h xsldbginspector.h xsldbglistitem.h xsldbglocallistitem.h xsldbglocalvariablesimpl.h xsldbgmsgdialogimpl.h xsldbgoutputview.h xsldbgsourcesimpl.h xsldbgtemplatelistitem.h xsldbgtemplatesimpl.h xsldbgwalkspeedimpl.h
+
+kde_module_LTLIBRARIES = libkxsldbgpart.la
+
+libkxsldbgpart_la_SOURCES = dummy.cpp
+
+SUBDIRS = libqtnotfier libxsldbg
+
+INCLUDES = $(XSLDBG_CFLAGS) -I.. $(all_includes)
+
+
+libkxsldbgpart_la_LDFLAGS = -module $(KDE_PLUGIN) -lkatepartinterfaces $(all_libraries) $(XSLDBG_EXTRA_LIBS)
+libkxsldbgpart_la_LIBADD = libkxsldbgcommon.la $(LIB_KPARTS)
+
+
+# this is where the desktop file will go
+partdesktopdir = $(kde_servicesdir)
+partdesktop_DATA = kxsldbg_part.desktop
+
+# this is where the part's XML-GUI resource file goes
+partrcdir = $(kde_datadir)/kxsldbgpart
+partrc_DATA = kxsldbg_part.rc
+
+KDE_ICON = AUTO
+
diff --git a/kxsldbg/kxsldbgpart/dummy.cpp b/kxsldbg/kxsldbgpart/dummy.cpp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/dummy.cpp
diff --git a/kxsldbg/kxsldbgpart/hi16-action-1downarrow.png b/kxsldbg/kxsldbgpart/hi16-action-1downarrow.png
new file mode 100644
index 00000000..f545e039
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-1downarrow.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-configure.png b/kxsldbg/kxsldbgpart/hi16-action-configure.png
new file mode 100644
index 00000000..95bd319c
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-configure.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-exit.png b/kxsldbg/kxsldbgpart/hi16-action-exit.png
new file mode 100644
index 00000000..3ce53009
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-exit.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-hash.png b/kxsldbg/kxsldbgpart/hi16-action-hash.png
new file mode 100644
index 00000000..dd8c43ce
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-hash.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-mark.png b/kxsldbg/kxsldbgpart/hi16-action-mark.png
new file mode 100644
index 00000000..8ab861a1
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-mark.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-next.png b/kxsldbg/kxsldbgpart/hi16-action-next.png
new file mode 100644
index 00000000..a9300537
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-next.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-run.png b/kxsldbg/kxsldbgpart/hi16-action-run.png
new file mode 100644
index 00000000..215fc6aa
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-run.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-step.png b/kxsldbg/kxsldbgpart/hi16-action-step.png
new file mode 100644
index 00000000..56f1baf6
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-step.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_break.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_break.png
new file mode 100644
index 00000000..543710fb
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_break.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_data.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_data.png
new file mode 100644
index 00000000..6f359b41
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_data.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_delete.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_delete.png
new file mode 100644
index 00000000..6d0d29d7
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_delete.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_enable.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_enable.png
new file mode 100644
index 00000000..59522882
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_enable.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_output.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_output.png
new file mode 100644
index 00000000..0d826bbf
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_output.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_refresh.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_refresh.png
new file mode 100644
index 00000000..5c6a26dd
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_refresh.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_source.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_source.png
new file mode 100644
index 00000000..4e1c214c
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_source.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_stepdown.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_stepdown.png
new file mode 100644
index 00000000..4eec6e5a
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_stepdown.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi16-action-xsldbg_stepup.png b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_stepup.png
new file mode 100644
index 00000000..22220d87
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi16-action-xsldbg_stepup.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-1downarrow.png b/kxsldbg/kxsldbgpart/hi22-action-1downarrow.png
new file mode 100644
index 00000000..6dce81ca
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-1downarrow.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-configure.png b/kxsldbg/kxsldbgpart/hi22-action-configure.png
new file mode 100644
index 00000000..96ba4338
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-configure.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-exit.png b/kxsldbg/kxsldbgpart/hi22-action-exit.png
new file mode 100644
index 00000000..119e5ef7
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-exit.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-next.png b/kxsldbg/kxsldbgpart/hi22-action-next.png
new file mode 100644
index 00000000..cfab7cfb
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-next.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-run.png b/kxsldbg/kxsldbgpart/hi22-action-run.png
new file mode 100644
index 00000000..b5c89495
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-run.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-step.png b/kxsldbg/kxsldbgpart/hi22-action-step.png
new file mode 100644
index 00000000..a0e64fc0
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-step.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_break.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_break.png
new file mode 100644
index 00000000..31c064ba
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_break.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_data.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_data.png
new file mode 100644
index 00000000..bcd6c2f5
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_data.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_delete.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_delete.png
new file mode 100644
index 00000000..6fb193f0
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_delete.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_enable.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_enable.png
new file mode 100644
index 00000000..aa6ed24c
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_enable.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_output.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_output.png
new file mode 100644
index 00000000..bb4a9447
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_output.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_refresh.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_refresh.png
new file mode 100644
index 00000000..3fa8db76
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_refresh.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_source.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_source.png
new file mode 100644
index 00000000..1f9c87bb
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_source.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_stepdown.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_stepdown.png
new file mode 100644
index 00000000..384f0c32
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_stepdown.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/hi22-action-xsldbg_stepup.png b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_stepup.png
new file mode 100644
index 00000000..fffef2ec
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/hi22-action-xsldbg_stepup.png
Binary files differ
diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.cpp b/kxsldbg/kxsldbgpart/kxsldbg_part.cpp
new file mode 100644
index 00000000..5c4742ab
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/kxsldbg_part.cpp
@@ -0,0 +1,875 @@
+#include "kxsldbg_part.h"
+#include "libxsldbg/files.h"
+#include "libxsldbg/xsldbg.h"
+
+#include <kinstance.h>
+#include <kaction.h>
+#include <kstdaction.h>
+#include <kfiledialog.h>
+#include <kparts/genericfactory.h>
+#include <ktexteditor/markinterface.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <ktexteditor/configinterface.h>
+#include <kate/view.h>
+
+#include <qfile.h>
+#include <qtextstream.h>
+
+#include "../kxsldbg.h"
+#include <kaction.h>
+#include <kcmdlineargs.h>
+#include <kinstance.h>
+#include <kiconloader.h>
+#include <qmessagebox.h>
+#include <klocale.h>
+#include <kdeversion.h>
+#if KDE_IS_VERSION(3,1,90)
+#include <kinputdialog.h>
+#else
+#include <klineeditdlg.h>
+#endif
+
+// Qxsldbg specific includes
+#include "qxsldbgdoc.h"
+#include <qvariant.h>
+#include <qfile.h>
+#include <qstatusbar.h>
+#include <qsplitter.h>
+#include <qvbox.h>
+
+
+#include <qmime.h>
+#include <qdragobject.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qaction.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+#include <qtoolbar.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qtextstream.h>
+#include <qtextbrowser.h>
+#include <qmessagebox.h>
+#include <qlineedit.h>
+#include <qdockwindow.h>
+#include <qpushbutton.h>
+#include <qinputdialog.h>
+#include <qobjectlist.h>
+#include <qwidgetstack.h>
+#include "xsldbgoutputview.h"
+#include "xsldbgconfigimpl.h"
+#include <kdebug.h>
+#include "xsldbgdebugger.h"
+
+typedef KParts::GenericFactory<KXsldbgPart> KXsldbgPartFactory;
+K_EXPORT_COMPONENT_FACTORY( libkxsldbgpart, KXsldbgPartFactory )
+
+KXsldbgPart::KXsldbgPart( QWidget *parentWidget, const char * /*widgetName*/,
+ QObject *parent, const char *name,
+ const QStringList & /*args*/ )
+ : DCOPObject("KXsldbgPart"), KParts::ReadOnlyPart(parent, name)
+{
+ currentLineNo = 0;
+ currentColumnNo = 0;
+ inspector = 0L;
+ debugger = 0L;
+ configWidget = 0L;
+ currentDoc = 0L;
+
+ // we need an instance
+ setInstance( KXsldbgPartFactory::instance() );
+ QVBox *frame = new QVBox(parentWidget);
+ QHBox *h = new QHBox(frame);
+ newXPath = new QLineEdit(h);
+ xPathBtn = new QPushButton(i18n("Goto XPath"), h);
+/* Disable searching as searching documentation is not ready
+ h = new QHBox(frame);
+ newSearch = new QLineEdit(h);
+ searchBtn = new QPushButton(i18n("Search"), h);
+*/
+ h = new QHBox(frame);
+ newEvaluate = new QLineEdit(h);
+ evaluateBtn = new QPushButton(i18n("Evaluate"), h);
+
+ QSplitter *splitter = new QSplitter(QSplitter::Vertical, frame);
+ mainView = new QWidgetStack(splitter);
+ mainView->setMinimumHeight(400); //## TODO don't use a magic number
+ outputview = new XsldbgOutputView(splitter);
+ setWidget(frame);
+ docDictionary.setAutoDelete(true);
+
+ // create our actions
+ KStdAction::open(this, SLOT(fileOpen()), actionCollection());
+
+ // set our XML-UI resource file
+ setXMLFile("kxsldbg_part.rc");
+ (void) new KAction( i18n("Configure Editor..."),
+ "configure", 0,
+ this, SLOT(configureEditorCmd_activated()),
+ actionCollection(), "configureEditorCmd" );
+ (void) new KAction( i18n("Configure..."),
+ "configure", Key_C,
+ this, SLOT(configureCmd_activated()),
+ actionCollection(), "configureCmd" );
+
+ (void) new KAction( i18n("Inspect..."),
+ "find", Key_I,
+ this, SLOT(inspectorCmd_activated()),
+ actionCollection(), "inspectCmd" );
+
+
+ // Motions commands
+ (void) new KAction( i18n("Run"),
+ "run", Key_F5,
+ this, SLOT(runCmd_activated()),
+ actionCollection(), "runCmd" );
+
+ (void) new KAction( i18n("Continue"),
+ "1downarrow", Key_F4,
+ this, SLOT(continueCmd_activated()),
+ actionCollection(), "continueCmd" );
+
+ (void) new KAction( i18n("Step"),
+ "step", Key_F8,
+ this, SLOT(stepCmd_activated()),
+ actionCollection(), "stepCmd" );
+
+ (void) new KAction( i18n("Next"),
+ "next", Key_F10,
+ this, SLOT(nextCmd_activated()),
+ actionCollection(), "nextCmd" );
+
+ (void) new KAction( i18n("Step Up"),
+ "xsldbg_stepup", Key_F6,
+ this, SLOT(stepupCmd_activated()),
+ actionCollection(), "stepupCmd" );
+
+ (void) new KAction( i18n("Step Down"),
+ "xsldbg_stepdown", Key_F7,
+ this, SLOT(stepCmd_activated()),
+ actionCollection(), "stepdownCmd" );
+
+ // Breakpoint commands
+ (void) new KAction( i18n("Break"),
+ "xsldbg_break", Key_F2,
+ this, SLOT(breakCmd_activated()),
+ actionCollection(), "breakCmd" );
+
+ (void) new KAction( i18n("Enable/Disable"),
+ "xsldbg_enable", Key_F3,
+ this, SLOT(enableCmd_activated()),
+ actionCollection(), "enableCmd" );
+
+ (void) new KAction( i18n("Delete"),
+ "xsldbg_delete", Key_Delete,
+ this, SLOT(deleteCmd_activated()),
+ actionCollection(), "deleteCmd" );
+
+ (void) new KAction( i18n("&Source"),
+ "xsldbg_source", Key_S,
+ this, SLOT(sourceCmd_activated()),
+ actionCollection(), "sourceCmd" );
+
+ (void) new KAction( i18n("&Data"),
+ "xsldbg_data", Key_D,
+ this, SLOT(dataCmd_activated()),
+ actionCollection(), "dataCmd" );
+
+ (void) new KAction( i18n("&Output"),
+ "xsldbg_output", Key_O,
+ this, SLOT(outputCmd_activated()),
+ actionCollection(), "outputCmd" );
+
+ (void) new KAction( i18n("Reload Current File From Disk"),
+ "xsldbg_refresh", CTRL + Key_F5,
+ this, SLOT(refreshCmd_activated()),
+ actionCollection(), "refreshCmd" );
+
+ /* tracing and walking */
+ (void) new KAction( i18n("Walk Through Stylesheet..."),
+ Key_W,
+ this, SLOT(walkCmd_activated()),
+ actionCollection(), "walkCmd" );
+ (void) new KAction( i18n("Stop Wal&king Through Stylesheet"),
+ Key_K,
+ this, SLOT(walkStopCmd_activated()),
+ actionCollection(), "walkStopCmd" );
+ (void) new KAction( i18n("Tr&ace Execution of Stylesheet"),
+ Key_A,
+ this, SLOT(traceCmd_activated()),
+ actionCollection(), "traceCmd" );
+ (void) new KAction( i18n("Stop Tracing of Stylesheet"),
+ Key_K,
+ this, SLOT(traceStopCmd_activated()),
+ actionCollection(), "traceStopCmd" );
+
+ (void) new KAction( i18n("&Evaluate Expression..."),
+ Key_E,
+ this, SLOT(evaluateCmd_activated()),
+ actionCollection(), "evaluateCmd" );
+
+ (void) new KAction( i18n("Goto &XPath..."),
+ Key_X,
+ this, SLOT(gotoXPathCmd_activated()),
+ actionCollection(), "gotoXPathCmd" );
+
+ (void) new KAction( i18n("Lookup SystemID..."),
+ 0,
+ this, SLOT(slotLookupSystemID()),
+ actionCollection(), "lookupSystemID" );
+
+ (void) new KAction( i18n("Lookup PublicID..."),
+ 0,
+ this, SLOT(slotLookupPublicID()),
+ actionCollection(), "lookupPublicID" );
+
+ (void) new KAction( i18n("Quit"),
+ 0, CTRL + Key_Q,
+ this, SLOT(quit()),
+ actionCollection(), "file_quit" );
+
+ /*
+ (void) new KAction( i18n("Exit KXsldbg"),
+ "xsldbg_output", CTRL + Key_Q,
+ this, SLOT(exitCmd_activated()),
+ actionCollection(), "exitCmd" );
+ */
+ connect( xPathBtn, SIGNAL( clicked() ),
+ this, SLOT( slotGotoXPath() ) );
+ connect( evaluateBtn, SIGNAL( clicked() ),
+ this, SLOT( slotEvaluate() ) );
+/*
+
+ connect( searchBtn, SIGNAL( clicked() ),
+ this, SLOT( slotSearch() ) );
+*/
+/* We must have a valid debugger and inspector */
+ createInspector();
+ if (checkDebugger()){
+ configWidget = new XsldbgConfigImpl( debugger, 0L );
+ Q_CHECK_PTR( configWidget );
+ debugger->start();
+ }else{
+ openURL("");
+ }
+}
+
+KXsldbgPart::~KXsldbgPart()
+{
+ docDictionary.clear();
+}
+
+void KXsldbgPart::quit()
+{
+ qWarning("Custom void KXsldbgPart::quit()");
+ closeURL();
+}
+
+
+KAboutData *KXsldbgPart::createAboutData()
+{
+ // the non-i18n name here must be the same as the directory in
+ // which the part's rc file is installed ('partrcdir' in the
+ // Makefile)
+ KAboutData *aboutData = new KAboutData("kxsldbgpart", I18N_NOOP("KXsldbgPart"), "0.1");
+ aboutData->addAuthor("Keith Isdale", 0L, "k_isdale@tpg.com.au");
+ return aboutData;
+}
+
+
+bool KXsldbgPart::openURL(const KURL &url)
+{
+ bool result = fetchURL(url);
+ if (result){
+ QXsldbgDoc *docPtr = docDictionary[url.prettyURL()];
+ if (docPtr && docPtr->kateView()){
+ if (docPtr != currentDoc){
+ currentDoc = docPtr;
+ currentFileName = url.prettyURL();
+ mainView->raiseWidget(currentDoc->kateView());
+ emit setWindowCaption(currentDoc->url().prettyURL());
+ }
+ } else{
+ result = false;
+ }
+ }
+
+ return result;
+}
+
+
+/* Don't show the content of URL just loaded it into our data structures */
+bool KXsldbgPart::fetchURL(const KURL &url)
+{
+ QString docID = url.prettyURL();
+ QXsldbgDoc *docPtr = docDictionary[docID];
+ if (!docPtr){
+ docPtr = new QXsldbgDoc(mainView, url);
+ docDictionary.insert(docID, docPtr);
+ if (docPtr->kateView()){
+ mainView->addWidget(docPtr->kateView());
+ Kate::View *v = Kate::view((docPtr->kateView()));
+ connect(v, SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged()));
+ }
+ }
+
+ return true;
+}
+
+bool KXsldbgPart::openFile()
+{
+ qWarning("bool KXsldbgPart::openFile() called");
+ return false;
+}
+
+bool KXsldbgPart::closeURL()
+{
+ docDictionary.clear();
+ return true;
+}
+
+void KXsldbgPart::fileOpen()
+{
+ // this slot is called whenever the File->Open menu is selected,
+ // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
+ // button is clicked
+ QString file_name = KFileDialog::getOpenFileName();
+
+ if (file_name.isEmpty() == false)
+ openURL(KURL( file_name ));
+}
+
+void KXsldbgPart::configureEditorCmd_activated()
+{
+ if (currentDoc){
+ KTextEditor::ConfigInterface *configIf = KTextEditor::configInterface(currentDoc->kateDoc());
+ if (configIf)
+ configIf->configDialog();
+ }
+}
+
+bool KXsldbgPart::checkDebugger()
+{
+ bool result = debugger != 0L;
+ if (!result){
+ QMessageBox::information(0L, i18n("Debugger Not Ready"),
+ i18n("Configure and start the debugger first."),
+ QMessageBox::Ok);
+ }
+
+ return result;
+}
+
+
+void KXsldbgPart::lookupSystemID( QString systemID)
+{
+ bool ok = false;
+ if (!checkDebugger())
+ return;
+
+ if (systemID.isEmpty()){
+#if KDE_IS_VERSION(3, 1, 90)
+ systemID = KInputDialog::getText(
+ i18n( "Lookup SystemID" ),
+ i18n( "Please enter SystemID to find:" ),
+ QString::null, &ok,
+ mainView);
+#else
+ systemID = QInputDialog::getText(
+ i18n( "Lookup SystemID" ),
+ i18n( "Please enter SystemID to find:" ),
+ QLineEdit::Normal, QString::null, &ok,
+ mainView);
+#endif
+ }else{
+ ok = true;
+ }
+ if ( ok && !systemID.isEmpty() ){
+ // user entered something and pressed ok
+ QString msg(QString("system %1").arg(systemID)); // noTr
+ debugger->fakeInput(msg, true);
+ }
+
+}
+
+
+void KXsldbgPart::lookupPublicID(QString publicID)
+{
+ bool ok = false;
+ if (!checkDebugger())
+ return;
+
+ if (publicID.isEmpty()){
+#if KDE_IS_VERSION(3, 1, 90)
+ publicID = KInputDialog::getText(
+ i18n( "Lookup PublicID" ),
+ i18n( "Please enter PublicID to find:" ),
+ QString::null, &ok, mainView );
+#else
+ publicID = QInputDialog::getText(
+ i18n( "Lookup PublicID" ),
+ i18n( "Please enter PublicID to find:" ),
+ QLineEdit::Normal, QString::null, &ok, mainView );
+#endif
+ }else{
+ ok = true;
+ }
+ if ( ok && !publicID.isEmpty()){
+ // user entered something and pressed ok
+ QString msg(QString("public %1").arg(publicID)); // noTr
+ debugger->fakeInput(msg, true);
+ }
+}
+
+
+void KXsldbgPart::slotLookupSystemID()
+{
+ lookupSystemID("");
+}
+
+void KXsldbgPart::slotLookupPublicID()
+{
+ lookupPublicID("");
+}
+
+void KXsldbgPart::configureCmd_activated()
+{
+ if (!checkDebugger())
+ return;
+
+ if (configWidget != 0L){
+ configWidget->refresh();
+ configWidget->show();
+ }
+}
+
+void
+KXsldbgPart::runCmd_activated()
+{
+ if ( checkDebugger() )
+ debugger->slotRunCmd();
+}
+
+void KXsldbgPart::inspectorCmd_activated()
+{
+ if (inspector == 0L)
+ createInspector();
+
+ if (checkDebugger() && (inspector != 0L)){
+ inspector->show();
+ }
+}
+
+
+void KXsldbgPart::createInspector()
+{
+ if ( inspector == 0L ) {
+ debugger = new XsldbgDebugger();
+ Q_CHECK_PTR( debugger );
+ if ( debugger != 0L ) {
+ connect(debugger, SIGNAL( debuggerReady()),
+ this, SLOT(debuggerStarted()));
+ if (outputview){
+ connect(debugger,
+ SIGNAL( showMessage(QString /* msg*/)),
+ outputview,
+ SLOT(slotProcShowMessage(QString /* msg*/)));
+ }
+ inspector = new XsldbgInspector( debugger );
+ Q_CHECK_PTR( inspector );
+ debugger->setInspector( inspector );
+ if (inspector != 0L){
+ /*process line number and/or file name changed */
+ connect(debugger,
+ SIGNAL(lineNoChanged
+ (QString /* fileName */ ,
+ int /* lineNumber */ ,
+ bool /* breakpoint */ ) ),
+ this,
+ SLOT(lineNoChanged
+ ( QString /* fileName */ ,
+ int /* lineNumber */ ,
+ bool /* breakpoint */ ) ) );
+ connect(debugger,
+ SIGNAL(breakpointItem(QString /* fileName*/,
+ int /* lineNumber */,
+ QString /*templateName*/,
+ QString /* modeName */,
+ bool /* enabled */,
+ int /* id */)),
+ this,
+ SLOT( breakpointItem(QString /* fileName*/,
+ int /* lineNumber */,
+ QString /*templateName*/,
+ QString /* modeName */,
+ bool /* enabled */,
+ int /* id */)));
+ connect(debugger, SIGNAL(resolveItem(QString /*URI*/)),
+ this, SLOT(slotProcResolveItem(QString /*URI*/)));
+ }
+ }
+ }
+}
+
+void KXsldbgPart::emitOpenFile(QString file, int line, int row)
+{
+ QByteArray params;
+ QDataStream stream(params, IO_WriteOnly);
+ stream << file << line << row;
+ emitDCOPSignal("openFile(QString,int,int)", params);
+}
+void KXsldbgPart::continueCmd_activated()
+{
+ if ( checkDebugger() )
+ debugger->slotContinueCmd();
+
+}
+
+void KXsldbgPart::stepCmd_activated()
+{
+ if ( checkDebugger() )
+ debugger->slotStepCmd();
+}
+
+void KXsldbgPart::nextCmd_activated()
+{
+ if ( checkDebugger() )
+ debugger->fakeInput("next", true); // noTr
+}
+
+
+void KXsldbgPart::stepupCmd_activated()
+{
+ if ( checkDebugger() )
+ debugger->fakeInput("stepup", true); // noTr
+}
+
+
+void KXsldbgPart::stepdownCmd_activated()
+{
+ if ( checkDebugger() )
+ debugger->fakeInput("stepdown", true); // noTr
+}
+
+
+void KXsldbgPart::dataCmd_activated()
+{
+ if ( checkDebugger() )
+ debugger->slotDataCmd();
+}
+
+void
+KXsldbgPart::sourceCmd_activated()
+{
+ if ( checkDebugger() )
+ debugger->slotSourceCmd();
+}
+
+void
+KXsldbgPart::outputCmd_activated()
+{
+ if ( ( inspector != 0L ) && checkDebugger() && ( configWidget != 0L ) ){
+ debugger->setOutputFileActive(true);
+ lineNoChanged( configWidget->getOutputFile(), 1, false );
+ refreshCmd_activated();
+ }
+}
+
+void KXsldbgPart::refreshCmd_activated()
+{
+
+ if ( !currentFileName.isEmpty() ){
+ QDictIterator<QXsldbgDoc> it(docDictionary);
+ QXsldbgDoc *docPtr;
+ while (it.current()){
+ docPtr = it.current();
+ docPtr->refresh();
+ ++it;
+ }
+ if ( checkDebugger() ){
+ debugger->fakeInput("showbreak", true); // noTr
+ }
+ }
+}
+
+void KXsldbgPart::enableCmd_activated()
+{
+ if ( checkDebugger() ){
+ debugger->slotEnableCmd( currentFileName, currentLineNo);
+ }
+}
+
+void KXsldbgPart::deleteCmd_activated()
+{
+ if ( checkDebugger() ){
+ debugger->slotDeleteCmd( currentFileName, currentLineNo);
+ }
+}
+
+void KXsldbgPart::breakCmd_activated()
+{
+ if ( checkDebugger() ){
+ debugger->slotBreakCmd( currentFileName, currentLineNo);
+ }
+}
+
+void KXsldbgPart::evaluateCmd_activated()
+{
+#if KDE_IS_VERSION(3,1,90)
+ QString expression = KInputDialog::getText(i18n("Evalute Expression"), i18n("XPath:"));
+#else
+ QString expression = KLineEditDlg::getText(i18n("Evalute Expression"), i18n("XPath:"));
+#endif
+ if (checkDebugger() && (expression.length() > 0)){
+ debugger->slotCatCmd( expression);
+ }
+}
+
+void KXsldbgPart::gotoXPathCmd_activated()
+{
+#if KDE_IS_VERSION(3,1,90)
+ QString xpath = KInputDialog::getText(i18n("Goto XPath"), i18n("XPath:"));
+#else
+ QString xpath = KLineEditDlg::getText(i18n("Goto XPath"), i18n("XPath:"));
+#endif
+ if (checkDebugger() && xpath.length() > 0){
+ debugger->slotCdCmd( xpath );
+ }
+}
+
+void
+KXsldbgPart::lineNoChanged(QString fileName, int lineNumber, bool breakpoint)
+{
+ if ( fileName.isEmpty() ) {
+ kdDebug() << "Empty file Name" << endl; // noTr
+ return;
+ }
+
+ openURL(fileName);
+
+ QXsldbgDoc *docPtr;
+ QDictIterator<QXsldbgDoc> it(docDictionary);
+ while (it.current()){
+ docPtr = it.current();
+ // cause all Execution and BreakpointReached marks to be cleared
+ docPtr->clearMarks(false);
+ ++it;
+ }
+ /* Did we stop at a breakpoint if so move the marker */
+ if (currentDoc) {
+ currentDoc->selectBreakPoint(lineNumber -1, breakpoint);
+ QByteArray params;
+ QDataStream stream(params, IO_WriteOnly);
+ stream << currentFileName << lineNumber;
+ emitDCOPSignal("debuggerPositionChanged(QString,int)", params);
+ }else {
+ qWarning("Unable to retrieve document from internal cache");
+ }
+
+
+ /* Move cursor and update status bar */
+ if (currentDoc && currentDoc->kateView()){
+ KTextEditor::ViewCursorInterface *cursorIf = KTextEditor::viewCursorInterface(currentDoc->kateView());
+ if (cursorIf){
+ cursorIf->setCursorPositionReal(lineNumber - 1, 0);
+ currentLineNo = lineNumber;
+ }
+ }
+}
+
+void KXsldbgPart::cursorPositionChanged()
+{
+ if (currentDoc && currentDoc->kateView()){
+ KTextEditor::ViewCursorInterface *viewCurIf = KTextEditor::viewCursorInterface(currentDoc->kateView());
+ if (viewCurIf){
+ viewCurIf->cursorPosition(&currentLineNo, &currentColumnNo);
+ currentLineNo++;
+ currentColumnNo++;
+ QByteArray params;
+ QDataStream stream(params, IO_WriteOnly);
+ stream << currentFileName << currentLineNo << currentColumnNo;
+ emitDCOPSignal("editorPositionChanged(QString,int,int)", params);
+ }
+ }
+}
+
+void KXsldbgPart::docChanged()
+{
+ if (!currentDoc || currentDoc->kateDoc() || currentDoc->kateView())
+ return;
+}
+
+void KXsldbgPart::debuggerStarted()
+{
+ if (configWidget != 0L){
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ if (args){
+ int i=0, result=1, noFilesFound = 0;
+ QString expandedName; /* contains file name with path expansion if any */
+
+ for (i = 0; i < args->count(); i++) {
+ if (!result)
+ break;
+
+ if (args->arg(i)[0] != '-') {
+ expandedName = QString::fromUtf8((const char*)filesExpandName((const xmlChar*)args->arg(i)));
+ if (expandedName.isEmpty()) {
+ result = 0;
+ break;
+ }
+ switch (noFilesFound) {
+ case 0:
+ configWidget->slotSourceFile(expandedName);
+ noFilesFound++;
+ break;
+ case 1:
+ configWidget->slotDataFile(expandedName);
+ noFilesFound++;
+ break;
+ case 2:
+ configWidget->slotOutputFile(expandedName);
+ noFilesFound++;
+ break;
+
+ default:
+ xsldbgGenericErrorFunc(i18n("Error: Too many file names supplied via command line.\n"));
+ result = 0;
+ }
+ continue;
+ }
+ }
+ configWidget->refresh();
+ configWidget->show();
+ }
+ }
+}
+
+void KXsldbgPart::addBreakPoint(int lineNumber)
+{
+ if ( checkDebugger() ){
+ debugger->slotBreakCmd( currentFileName, lineNumber);
+ }
+}
+
+void KXsldbgPart::enableBreakPoint(int lineNumber)
+{
+ if ( checkDebugger() ){
+ debugger->slotEnableCmd( currentFileName, lineNumber);
+ }
+}
+
+
+void KXsldbgPart::deleteBreakPoint(int lineNumber)
+{
+ if ( checkDebugger() ){
+ debugger->slotDeleteCmd( currentFileName, lineNumber);
+ }
+}
+
+
+
+void KXsldbgPart::slotSearch()
+{
+ if ((newSearch != 0L) && checkDebugger() ) {
+ QString msg(QString("search \"%1\"").arg(newSearch->text())); // noTr
+ debugger->fakeInput(msg, false);
+ }
+}
+
+
+void KXsldbgPart::slotEvaluate()
+{
+ if ((newEvaluate != 0L) && checkDebugger() ){
+ debugger->slotCatCmd( newEvaluate->text() );
+ }
+}
+
+void KXsldbgPart::slotGotoXPath()
+{
+ if ((newXPath != 0L) && checkDebugger() ){
+ debugger->slotCdCmd( newXPath->text() );
+ }
+}
+
+
+
+void KXsldbgPart::slotProcResolveItem(QString URI)
+{
+ if (!URI.isEmpty()){
+ QMessageBox::information(mainView, i18n("SystemID or PublicID Resolution Result"),
+ i18n("SystemID or PublicID has been resolved to\n.%1").arg(URI),
+ QMessageBox::Ok);
+ }
+}
+
+void KXsldbgPart::breakpointItem(QString fileName, int lineNumber ,
+ QString /*templateName*/, QString /* modeName */,
+ bool enabled , int /* id */)
+{
+
+ if (fileName == 0L){
+ /* Go through all documents and remove all breakpoints */
+ QDictIterator<QXsldbgDoc> it(docDictionary);
+ QXsldbgDoc *docPtr;
+ while (it.current()){
+ docPtr = it.current();
+ docPtr->clearMarks(true);
+ ++it;
+ }
+ }else{
+/*
+ if (!fileName.contains("://")){
+ // relative path ? must handle this special case
+ KURL url;
+ url.setFileName(fileName);
+ fetchURL(url);
+ }else{
+ fetchURL(fileName);
+ }
+*/
+ fileName = XsldbgDebugger::fixLocalPaths(fileName);
+ KURL temp(fileName);
+ fileName = temp.prettyURL();
+ fetchURL(fileName);
+ QXsldbgDoc *docPtr = docDictionary[fileName] ;
+ if (docPtr){
+ docPtr->addBreakPoint(lineNumber - 1, enabled);
+ }else {
+ qWarning("Unable to get doc %s from docDictionary", fileName.local8Bit().data());
+ }
+ }
+}
+
+
+
+void KXsldbgPart::walkCmd_activated()
+{
+ if (checkDebugger()){
+ debugger->slotWalkCmd();
+ }
+}
+
+void KXsldbgPart::walkStopCmd_activated()
+{
+ if (checkDebugger()){
+ debugger->slotWalkStopCmd();
+ }
+}
+
+void KXsldbgPart::traceCmd_activated()
+{
+ if (checkDebugger()){
+ debugger->slotTraceCmd();
+ }
+}
+
+void KXsldbgPart::traceStopCmd_activated()
+{
+ walkStopCmd_activated();
+}
+
+
+#include "kxsldbg_part.moc"
diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.desktop b/kxsldbg/kxsldbgpart/kxsldbg_part.desktop
new file mode 100644
index 00000000..229c6cad
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/kxsldbg_part.desktop
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Name=KXsldbgPart
+Name[de]=KXsldbg-Komponente
+Name[fr]=Module externe KXsldbg
+Name[ja]=KXsldbgPort
+Name[nds]=KXsldbg-Komponent
+Name[pl]=Osadzalny program KPart KXsldbg
+Name[pt_BR]=KXSsldbgPart
+Name[sv]=Kxsldbg-delprogram
+Name[ta]=KXsldbg பகà¯à®¤à®¿
+Name[tg]=ҚиÑми KXsldbg
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
+ServiceTypes=KParts/ReadOnlyPart
+X-KDE-Library=libkxsldbgpart
+Type=Service
diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.h b/kxsldbg/kxsldbgpart/kxsldbg_part.h
new file mode 100644
index 00000000..1da5ceb8
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/kxsldbg_part.h
@@ -0,0 +1,170 @@
+#ifndef KXSLDBGKPART_H
+#define KXSLDBGKPART_H
+
+#include <kparts/part.h>
+#include <qvariant.h>
+#include <qdict.h>
+#include <qmainwindow.h>
+#include "xsldbgdebugger.h"
+#include "xsldbginspector.h"
+#include <dcopclient.h>
+#include "kxsldbg_partif.h"
+#include <ktexteditor/document.h>
+#include <ktexteditor/view.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QAction;
+class QActionGroup;
+class QToolBar;
+class QPopupMenu;
+class QTextBrowser;
+class QLineEdit;
+class QDockWindow;
+class QWidgetStack;
+
+class XsldbgBrkStatusView;
+class QXsldbgDoc;
+class XsldbgOutputView;
+class XsldbgConfigImpl;
+
+class QWidget;
+class QPainter;
+class KURL;
+class QMultiLineEdit;
+class KAboutData;
+
+typedef QDict<QXsldbgDoc> XsldbgDocDict;
+
+/**
+ * This is a "Part". It that does all the real work in a KPart
+ * application.
+ *
+ * @short Main Part
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ * @version 0.1
+ */
+class KXsldbgPart : public KParts::ReadOnlyPart, public KXsldbgPartIf
+{
+ Q_OBJECT
+
+public:
+ /**
+ * Default constructor
+ */
+ KXsldbgPart(QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name, const QStringList &args);
+
+ /**
+ * Destructor
+ */
+ virtual ~KXsldbgPart();
+
+ static KAboutData *createAboutData();
+
+
+ /** Checks the debugger, if it is not ready then
+ * display a error in a message box
+ *
+ * @returns TRUE if debugger is ready, otherwise FALSE
+ */
+ bool checkDebugger();
+ void lookupSystemID(QString systemID);
+ void lookupPublicID(QString publicID);
+ void createInspector();
+
+public slots:
+ virtual bool openURL(const KURL &url);
+ virtual bool closeURL();
+ void quit();
+ void emitOpenFile(QString file, int line, int row);
+ void slotLookupSystemID();
+ void slotLookupPublicID();
+ void walkCmd_activated();
+ void walkStopCmd_activated();
+ void traceCmd_activated();
+ void traceStopCmd_activated();
+ void configureEditorCmd_activated();
+
+ //Tool bar commands
+ void configureCmd_activated();
+ void inspectorCmd_activated();
+ void runCmd_activated();
+ void stepCmd_activated();
+ void nextCmd_activated();
+ void continueCmd_activated();
+ void stepupCmd_activated();
+ void stepdownCmd_activated();
+ void sourceCmd_activated();
+ void dataCmd_activated();
+ void outputCmd_activated();
+ void refreshCmd_activated();
+ void enableCmd_activated();
+ void breakCmd_activated();
+ void deleteCmd_activated();
+
+ /** Evaluate expression entered */
+ void evaluateCmd_activated();
+
+ /** Goto/display file XPath entered */
+ void gotoXPathCmd_activated();
+
+ virtual void lineNoChanged( QString fileName, int lineNumber,
+ bool breakpoint );
+
+ void addBreakPoint(int lineNumber);
+ void enableBreakPoint(int lineNumber);
+ void deleteBreakPoint(int lineNumber);
+
+ /** Evaluate expression entered in expressionEdit */
+ void slotEvaluate();
+
+ /** Goto/display file that matches XPath specified in xPathEdit */
+ void slotGotoXPath();
+
+ /** Run search on data base , see search.dtd for DTD of search database */
+ void slotSearch();
+
+ /* Process the the URI for SystemID or PublicID requested */
+ void slotProcResolveItem(QString URI);
+
+ /* used to get breakpoint list notfication */
+ void breakpointItem(QString fileName, int lineNumber ,
+ QString /*templateName*/, QString /* modeName */,
+ bool enabled , int /* id */);
+
+ void cursorPositionChanged();
+ void docChanged();
+
+ void debuggerStarted();
+
+protected:
+ /**
+ * This must be implemented by each part
+ */
+ virtual bool openFile();
+ bool fetchURL(const KURL &url);
+
+protected slots:
+ void fileOpen();
+
+private:
+ QXsldbgDoc *currentDoc;
+ QWidgetStack *mainView;
+
+ QPushButton *xPathBtn, *searchBtn, *evaluateBtn;
+ QLineEdit *newXPath, *newSearch, *newEvaluate;
+ QGridLayout* qxsldbgLayout;
+
+ uint currentLineNo, currentColumnNo;
+ XsldbgDocDict docDictionary;
+ XsldbgInspector *inspector;
+ XsldbgDebugger *debugger;
+ XsldbgConfigImpl *configWidget;
+ QString currentFileName;
+
+ XsldbgOutputView *outputview;
+};
+
+#endif // KXSLDBGPART_H
diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.rc b/kxsldbg/kxsldbgpart/kxsldbg_part.rc
new file mode 100644
index 00000000..b8daea6e
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/kxsldbg_part.rc
@@ -0,0 +1,61 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="kxsldbg_part" version="1">
+<MenuBar>
+ <Menu name="debug"><text>Debug</text>
+ <Action name="configureCmd"/>
+ <Action name="inspectCmd"/>
+ <Action name="runCmd"/>
+ <Action name="continueCmd"/>
+ <Action name="stepCmd"/>
+ <Action name="nextCmd"/>
+ <Separator/>
+ <Action name="stepupCmd"/>
+ <Action name="stepdownCmd"/>
+ <Separator/>
+ <Action name="breakCmd"/>
+ <Action name="deleteCmd"/>
+ <Action name="enableCmd"/>
+ <Separator/>
+ <Action name="sourceCmd"/>
+ <Action name="dataCmd"/>
+ <Action name="outputCmd"/>
+ <Action name="refreshCmd"/>
+ <Separator/>
+ <Action name="walkCmd"/>
+ <Action name="walkStopCmd"/>
+ <Action name="traceCmd"/>
+ <Action name="traceStopCmd"/>
+ <Separator/>
+ <Action name="evaluateCmd"/>
+ <Action name="gotoXPathCmd"/>
+ <Action name="lookupSystemID"/>
+ <Action name="lookupPublicID"/>
+ </Menu>
+ <Menu name="settings"><text>&amp;Settings</text>
+ <Action name="configureEditorCmd"/>
+ </Menu>
+
+</MenuBar>
+
+<ToolBar name="debugToolBar">
+ <Action name="configureCmd"/>
+ <Action name="inspectCmd"/>
+ <Action name="runCmd"/>
+ <Action name="continueCmd"/>
+ <Action name="stepCmd"/>
+ <Action name="nextCmd"/>
+ <Separator/>
+ <Action name="stepupCmd"/>
+ <Action name="stepdownCmd"/>
+ <Separator/>
+ <Action name="breakCmd"/>
+ <Action name="deleteCmd"/>
+ <Action name="enableCmd"/>
+ <Separator/>
+ <Action name="sourceCmd"/>
+ <Action name="dataCmd"/>
+ <Action name="outputCmd"/>
+ <Action name="refreshCmd"/>
+ <Separator/>
+ </ToolBar>
+</kpartgui>
diff --git a/kxsldbg/kxsldbgpart/kxsldbg_partif.h b/kxsldbg/kxsldbgpart/kxsldbg_partif.h
new file mode 100644
index 00000000..bd537cec
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/kxsldbg_partif.h
@@ -0,0 +1,14 @@
+#ifndef KXSLDBG_PARTIF_H
+#define KXSLDBG_PARTIF_H
+
+#include <dcopobject.h>
+
+class KXsldbgPartIf : virtual public DCOPObject
+{
+ K_DCOP
+ k_dcop:
+
+ /* reserved for future expansion*/
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/Makefile.am b/kxsldbg/kxsldbgpart/libqtnotfier/Makefile.am
new file mode 100644
index 00000000..82902c19
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libqtnotfier/Makefile.am
@@ -0,0 +1,8 @@
+noinst_LTLIBRARIES = libqtnotfier.la
+
+libqtnotfier_la_LIBADD = $(LIBXSLT_LIBS)
+libqtnotfier_la_METASOURCES = AUTO
+
+libqtnotfier_la_SOURCES = xsldbgthread.cpp xsldbgnotifier.cpp xsldbgevent.cpp xsldbgdebuggerbase.cpp qtnotifier2.cpp
+
+INCLUDES = $(XSLDBG_CFLAGS) $(all_includes)
diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp b/kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp
new file mode 100644
index 00000000..6d4b7fcb
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp
@@ -0,0 +1,62 @@
+/***************************************************************************
+ qtnotifier2.cpp - description
+ -------------------
+ begin : Sun Dec 23 2001
+ copyright : (C) 2001 by keith
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qapplication.h>
+
+#include "../libxsldbg/xsldbgevent.h"
+#include "../libxsldbg/qtnotifier2.h"
+#include "xsldbgdebuggerbase.h"
+#include "../libxsldbg/xsldbgthread.h"
+
+XsldbgDebuggerBase *_debugger = 0L;
+
+int qtNotifyXsldbgApp(XsldbgMessageEnum type, const void *data)
+{
+ int result = 0;
+ if (::getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED){
+ return 1;
+ }
+
+ /* clear the input ready flag as quickly as possible*/
+ if ( ::getInputStatus() == XSLDBG_MSG_READ_INPUT)
+ ::setInputReady(0);
+
+ /* state of the thread */
+ if (_debugger != 0L){
+ XsldbgEvent *e = new XsldbgEvent(type, data);
+ if (e != 0L) {
+ /* The application will now have this event in its event queue
+ that all that is needed from here*/
+ QApplication::postEvent(_debugger, e);
+ }
+ }
+
+ if (::getThreadStatus() == XSLDBG_MSG_THREAD_STOP)
+ ::xsldbgThreadCleanup(); /* thread has died so cleanup after it */
+
+ result++; /* at the moment this function will always work */
+
+ return result;
+}
+
+
+
+void connectNotifier(XsldbgDebuggerBase *debugger){
+ _debugger = debugger;
+}
+
+
diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp
new file mode 100644
index 00000000..930be808
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp
@@ -0,0 +1,93 @@
+/***************************************************************************
+ xsldbgdebuggerbase.cpp - The base class from
+ which a debugger
+ could be built
+
+ -------------------
+ begin : Fri Feb 1 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qapplication.h>
+#include <qglobal.h>
+#include <qstringlist.h>
+#include <kurl.h>
+
+#include "xsldbgdebuggerbase.h"
+
+XsldbgDebuggerBase::XsldbgDebuggerBase()
+ : QObject(0L, "XsldbgDebuggerBase")
+{
+ initialized = false;
+ updateTimerID = -1;
+}
+
+
+XsldbgDebuggerBase::~XsldbgDebuggerBase()
+{
+ /* empty*/
+}
+
+
+
+QString XsldbgDebuggerBase::fromUTF8(const char *text)
+{
+ QString result;
+ if (text != 0L)
+ result = (const char*)text;
+ return result;
+}
+
+
+QString XsldbgDebuggerBase::fromUTF8(const xmlChar *text)
+{
+ QString result;
+ if (text != 0L)
+ result = QString::fromUtf8((const char*)text);
+ return result;
+}
+
+
+QString XsldbgDebuggerBase::fromUTF8FileName(const char *text)
+{
+ QString result;
+ if (text != 0L){
+ KURL url(((const char*)text));
+ if (url.isLocalFile())
+ result = QString("file:") + url.path();
+ else
+ result = url.prettyURL();
+ }
+ return result;
+}
+
+
+QString XsldbgDebuggerBase::fromUTF8FileName(const xmlChar *text)
+{
+ QString result;
+ if (text != 0L){
+ KURL url(QString::fromUtf8((const char*)text));
+ if (url.isLocalFile())
+ result = QString("file:") + url.path();
+ else
+ result = url.prettyURL();
+ }
+ return result;
+}
+
+
+void XsldbgDebuggerBase::queueMessage(const QString &text)
+{
+ updateText += text;
+}
+#include "xsldbgdebuggerbase.moc"
diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h
new file mode 100644
index 00000000..ff830495
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h
@@ -0,0 +1,147 @@
+/***************************************************************************
+ xsldbgdebuggerbase.h - The base class from
+ which a debugger
+ could be built
+
+ -------------------
+ begin : Fri Feb 1 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGDEBUGGERBASE_H
+#define XSLDBGDEBUGGERBASE_H
+
+#if defined WIN32
+# include <libxsldbg/xsldbgwin32config.h>
+#else
+# ifndef XSLDBG_SO_API
+# define XSLDBG_SO_API
+# endif
+#endif
+
+#include <qobject.h>
+#include <qstringlist.h>
+#include <libxml/tree.h>
+
+class XsldbgEvent;
+class QApplication;
+class QStringList;
+
+/**
+ We delegate the task of emitting our signals to XsldbgEvent , so
+ Xsldbg must become our friend
+*/
+class XsldbgDebuggerBase : public QObject
+{
+ Q_OBJECT
+
+ friend class XsldbgEvent;
+
+ public:
+ XsldbgDebuggerBase(void);
+ ~XsldbgDebuggerBase(void);
+
+ void setInitialized(bool state) {initialized = state; };
+ bool getInitialized(void) {return initialized ;};
+
+ void setUpdateTimerID(int ID) { updateTimerID = ID;};
+ int getUpdateTimerID(void) {return updateTimerID ;};
+
+
+ /** Convert from libxslt UTF8 to a QString */
+ static QString fromUTF8(const char *text);
+ static QString fromUTF8FileName(const char *text);
+
+ /** Convert from libxslt UTF8 to a QString */
+ static QString fromUTF8(const xmlChar *text);
+ static QString fromUTF8FileName(const xmlChar *text);
+
+ /* list of command yet to be processed */
+ QStringList commandQueue(void) {return _commandQueue ;};
+
+ void queueMessage(const QString &text);
+
+protected:
+ QString updateText;
+
+ private:
+ bool initialized;
+ int updateTimerID;
+ QStringList _commandQueue;
+
+ signals: // Signals
+ /** line number and/or file name changed */
+ void lineNoChanged(QString /* fileName */, int /* lineNumber */, bool /* breakpoint */);
+
+ /** Show a message in debugger window */
+ void showMessage(QString /* msg*/);
+
+ /** Add breakpoint to view, First parameter is QString::null
+ to indicate start of breakpoint list notfication */
+ void breakpointItem(QString /* fileName*/, int /* lineNumber */,
+ QString /*templateName*/, QString /* modeName */,
+ bool /* enabled */, int /* id */);
+
+ /** Add global variable to view, First parameter is QString::null
+ to indicate start of global variable list notfication */
+ void globalVariableItem(QString /* name */, QString /* fileName */, int /* lineNumber */);
+
+ /** Add local variable to view, First parameter is QString::null
+ to indicate start of local variable list notfication */
+ void localVariableItem(QString /*name */, QString /* templateContext*/,
+ QString /* fileName */, int /*lineNumber */);
+
+ /** Add a variable to view, First parameter is QString::null
+ to indicate start of local variable list notfication */
+ void variableItem(QString /*name */, QString /* templateContext*/,
+ QString /* fileName */, int /*lineNumber */,
+ QString /* select XPath */, int /* is it a local variable */);
+
+ /** Add template to view, First parameter is QString::null
+ to indicate start of template list notfication */
+ void templateItem(QString /* name*/, QString /*mode*/, QString /* fileName */, int /* lineNumber */);
+
+ /** Add source to view, First parameter is QString::null
+ to indicate start of source list notfication */
+ void sourceItem(QString /* fileName */, QString /* parentFileName */, int /*lineNumber */);
+
+ /** Add parameter to view, First parameter is QString::null
+ to indicate start of parameter list notfication */
+ void parameterItem(QString /* name*/, QString /* value */);
+
+ /** Add callStack to view, First parameter is QString::null
+ to indicate start of callstack list notfication */
+ void callStackItem(QString /* tempalteName*/, QString /* fileName */, int /* lineNumber */);
+
+ /** Add entity to view, First parameter is QString::null
+ to indicate start of entity list notfication */
+ void entityItem(QString /*SystemID*/, QString /*PublicID*/);
+
+ /* Show the URI for SystemID or PublicID requested */
+ void resolveItem(QString /*URI*/);
+
+ /* Display a integer option value First parameter is QString::null
+ to indicate start of option list notification */
+ void intOptionItem(QString /* name*/, int /* value */);
+
+ /* Display a string option value. First parameter is QString::null
+ to indicate start of option list notification */
+ void stringOptionItem(QString /* name*/, QString /* value */);
+
+ /* Cause the names for source, data and output files to be reload from xsldbg */
+ void fileDetailsChanged();
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp
new file mode 100644
index 00000000..a424eaba
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp
@@ -0,0 +1,857 @@
+
+/***************************************************************************
+ xsldbgevent.c - event to notify app of
+ data from xsldbg
+ -------------------
+ begin : Fri Feb 1 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qapplication.h>
+#include <qtimer.h>
+#include <qfile.h>
+#include <kurl.h>
+#include <qtextstream.h>
+
+#include <libxslt/xsltInternals.h>
+
+#include "../libxsldbg/xsldbgevent.h"
+#include "xsldbgdebuggerbase.h"
+#include "../libxsldbg/arraylist.h"
+#include "../libxsldbg/breakpoint.h"
+#include "../libxsldbg/xsldbgmsg.h"
+#include "../libxsldbg/xsldbgthread.h"
+#include "../libxsldbg/options.h"
+#include "../libxsldbg/files.h"
+
+QString updateText;
+
+XsldbgEventData::XsldbgEventData()
+{
+ int column;
+
+ for (column = 0; column < XSLDBGEVENT_COLUMNS; column++){
+ textValues[column] = QString::null;
+ }
+
+ for (column = 0; column < XSLDBGEVENT_COLUMNS; column++){
+ intValues[column] = -1;
+ }
+
+}
+
+XsldbgEventData::~XsldbgEventData()
+{
+}
+
+void XsldbgEventData::setText(int column, QString text)
+{
+ if ((column >= 0) && (column < XSLDBGEVENT_COLUMNS))
+ textValues[column] = text;
+}
+
+
+QString XsldbgEventData::getText(int column)
+{
+ if ((column >= 0) && (column < XSLDBGEVENT_COLUMNS))
+ return textValues[column];
+ else
+ return QString::null;
+}
+
+
+void XsldbgEventData::setInt(int column, int value)
+{
+ if ((column >= 0) && (column < XSLDBGEVENT_COLUMNS))
+ intValues[column] = value;
+}
+
+
+int XsldbgEventData::getInt(int column)
+{
+ if ((column >= 0) && (column < XSLDBGEVENT_COLUMNS))
+ return intValues[column];
+ else
+ return -1;
+}
+
+
+XsldbgEvent::XsldbgEvent(XsldbgMessageEnum type, const void *data)
+ : QEvent(QEvent::User)
+{
+ XsldbgEventData *eventData;
+ this->data = data;
+ debugger = 0L;
+ beenCreated = false;
+
+ if (type == XSLDBG_MSG_LIST){ /* 23 : As list of messages */
+ notifyMessageListPtr msgList = (notifyMessageListPtr)data;
+ void *msgData;
+ /* If this is an included source message, which just continues a source message,
+ we don't need to add an empty XsldbgEventData */
+ if (msgList->type != XSLDBG_MSG_INCLUDED_SOURCE_CHANGED){
+ /* add an empty event data item which indicates the start of a list */
+ eventData = new XsldbgEventData();
+ if (eventData != 0L)
+ list.append(eventData);
+ }
+ for (int index = 0; index < arrayListCount(msgList->list); index++){
+ msgData = ::arrayListGet(msgList->list, index);
+ eventData = createEventData(msgList->type, msgData);
+ if (eventData != 0L)
+ list.append(eventData);
+ }
+ ::arrayListFree(msgList->list);
+ msgList->list = 0L;
+ itemType = msgList->type;
+ }else{
+ eventData = createEventData(type, data);
+ if (eventData != 0L)
+ list.append(eventData);
+ itemType = type;
+ }
+
+ beenCreated = true;
+ /* remove any knowledge of orginal data */
+ this->data = 0L;
+}
+
+
+XsldbgEvent::~XsldbgEvent()
+{
+}
+
+
+XsldbgEventData *XsldbgEvent::createEventData(XsldbgMessageEnum type, const void *msgData)
+{
+ XsldbgEventData *result = new XsldbgEventData();
+
+ if (result == 0L)
+ return result;
+
+ switch (type){
+
+ case XSLDBG_MSG_THREAD_NOTUSED: /* 0: Thread are not to be used */
+ case XSLDBG_MSG_THREAD_INIT: /* 1: The xsldbg thread is initializing */
+ case XSLDBG_MSG_THREAD_RUN: /* 2: The xsldbg thread is running */
+ case XSLDBG_MSG_THREAD_STOP: /* 3: The xsldbg thread is about to die */
+ case XSLDBG_MSG_THREAD_DEAD: /* 4: The xsldbg thread died */
+ /* we don't need to do anything extra with this message */
+ break;
+
+ /* input status ( once thread is running) */
+ case XSLDBG_MSG_AWAITING_INPUT: /* 5: Waiting for user input */
+ /* we don't need to do anything extra with this message */
+ break;
+
+ case XSLDBG_MSG_READ_INPUT: /* 6: Read user input */
+ /* we don't need to do anything extra with this message */
+ break;
+
+ case XSLDBG_MSG_PROCESSING_INPUT: /* 7: Processing user's request */
+ /* we don't need to do anything extra with this message */
+ break;
+
+ /* provide more informatiom about state of xsldbg (optional) */
+ case XSLDBG_MSG_PROCESSING_RESULT: /* 8: An error occured performing command
+ * requested command */
+ if (msgData != 0L){
+ xsldbgErrorMsgPtr msg = (xsldbgErrorMsgPtr)msgData;
+ if (msg->text)
+ result->setText(0, XsldbgDebuggerBase::fromUTF8(msg->text));
+ }
+ break;
+
+ case XSLDBG_MSG_LINE_CHANGED: /* 9: Changed to new line number
+ * ie a step */
+ handleLineNoChanged(result, msgData);
+ break;
+
+ case XSLDBG_MSG_FILE_CHANGED: /* 10: Changed selection for source/data/output file */
+ // not used
+ break;
+
+ case XSLDBG_MSG_BREAKPOINT_CHANGED: /* 11: Response to a showbreak command */
+ handleBreakpointItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_PARAMETER_CHANGED: /* 12: Response to showparam command */
+ handleParameterItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_TEXTOUT: /* 13 : Free form text from xsldg */
+ /* this is going to be most common and its so simple we can handle
+ it here */
+ result->setText(0, XsldbgDebuggerBase::fromUTF8((xmlChar*)msgData));
+ break;
+
+ case XSLDBG_MSG_FILEOUT: /* 14 : Response to cat commmand, ie
+ * Free form text in file */
+ /* this is actualy the file to load */
+ {
+ KURL url(XsldbgDebuggerBase::fromUTF8FileName((xmlChar*)msgData));
+ if (!url.isLocalFile()){
+ qDebug("Remote path to temp file %s unsupported, unable to read message from xsldbg", url.prettyURL().local8Bit().data());
+ break;
+ }
+
+ QString fileName = url.path();
+ QString outputText;
+ if (!fileName.isNull()){
+ QFile file (fileName);
+ if (file.open(IO_ReadOnly)){
+ QTextStream textFile(&file);
+ QString textIn = "";
+ textFile.setEncoding(QTextStream::UnicodeUTF8);
+ while (1){
+ textIn = textFile.readLine();
+ if (textIn.isNull())
+ break;
+ outputText.append(textIn).append("\n");
+ }
+ file.close();
+ }
+ outputText.append("\n");
+ result->setText(0, outputText);
+ }
+ }
+ break;
+
+ case XSLDBG_MSG_LOCALVAR_CHANGED: /* 15 : Response to locals command ie a
+ * local variable */
+ handleLocalVariableItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_GLOBALVAR_CHANGED: /* 16 : Response to globals command
+ * ie a global variable */
+ handleGlobalVariableItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_TEMPLATE_CHANGED: /* 17 : Response to templates commmand
+ * ie template details */
+ handleTemplateItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_SOURCE_CHANGED: /* 18 : Response to stylesheets command,
+ * a normal stylesheet */
+ handleSourceItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_INCLUDED_SOURCE_CHANGED: /* 19: Response to stylesheets
+ * command, a xmlNodeptr of
+ * a included stylesheet */
+ handleIncludedSourceItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_CALLSTACK_CHANGED: /* 20: Response to where command,
+ * ie a item on the call stack */
+ handleCallStackItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_ENTITIY_CHANGED: /* 21: Response to entities
+ * command */
+ handleEntityItem(result, msgData);
+ break;
+
+ case XSLDBG_MSG_RESOLVE_CHANGE: /* 22: Response to system or
+ * public command */
+ handleResolveItem(result, msgData);
+ break;
+
+ default:
+ qDebug("Unhandled type in createEventData %d", type);
+
+ }
+ return result;
+}
+
+void XsldbgEvent::emitMessage(XsldbgDebuggerBase *debugger)
+{
+ XsldbgEventData *eventData;
+
+ this->debugger = debugger;
+
+ for (eventData = list.first(); eventData != 0L; eventData = list.next()){
+ emitMessage(eventData);
+ }
+
+ /* make sure that we only temporarily set the value for debugger*/
+ this->debugger = 0L;
+}
+
+
+void XsldbgEvent::emitMessage(XsldbgEventData *eventData)
+{
+
+ if ((eventData == 0L) || (debugger == 0L)){
+ qDebug("emitMessage failed");
+ if (eventData == 0L)
+ qDebug("Event data == NULL");
+ if (debugger == 0L)
+ qDebug("Debugger == NULL");
+ return;
+ }
+
+ /*
+ Method use will end up like
+
+ emit debugger->lineNoChanged("", 1, false);
+
+ */
+
+ switch (itemType){
+
+ case XSLDBG_MSG_THREAD_NOTUSED: /* 0: Thread are not to be used */
+ case XSLDBG_MSG_THREAD_INIT: /* 1: The xsldbg thread is initializing */
+ case XSLDBG_MSG_THREAD_RUN: /* 2: The xsldbg thread is running */
+ /* we don't need to do anything extra with this message */
+ break;
+
+ case XSLDBG_MSG_THREAD_STOP: /* 3: The xsldbg thread is about to die */
+ case XSLDBG_MSG_THREAD_DEAD: /* 4: The xsldbg thread died */
+ /* the debugger has stopped is about to stop */
+ debugger->setInitialized(false);
+ break;
+
+ /* input status ( once thread is running) */
+ case XSLDBG_MSG_AWAITING_INPUT: /* 5: Waiting for user input */
+ if ((getInputReady() == 0) && (debugger->commandQueue().count() > 0)){
+ qDebug("Command queue not empty");
+ QTimerEvent *e = new QTimerEvent(debugger->getUpdateTimerID());
+ QApplication::postEvent(debugger, e);
+ }
+ if (!updateText.isEmpty()){
+ debugger->queueMessage(updateText);
+ updateText = "";
+ }
+ break;
+
+ case XSLDBG_MSG_READ_INPUT: /* 6: Read user input */
+ /* we don't need to do anything extra with this message */
+ break;
+
+ case XSLDBG_MSG_PROCESSING_INPUT: /* 7: Processing user's request */
+ /* we don't need to do anything extra with this message */
+ break;
+
+ /* provide more informatiom about state of xsldbg (optional) */
+ case XSLDBG_MSG_PROCESSING_RESULT: /* 8: An error occured performing command
+ * requested command */
+ if (!eventData->getText(0).isNull())
+ updateText.append(eventData->getText(0));
+ break;
+
+ case XSLDBG_MSG_LINE_CHANGED: /* 9: Changed to new line number
+ * ie a step */
+ handleLineNoChanged(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_FILE_CHANGED: /* 10: Loaded source/data file */
+ if (beenCreated == false){
+ /* Empty data */
+ }else{
+ emit debugger->fileDetailsChanged();
+ }
+ break;
+
+ case XSLDBG_MSG_BREAKPOINT_CHANGED: /* 11: Response to a showbreak command */
+ handleBreakpointItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_PARAMETER_CHANGED: /* 12: Response to showparam command */
+ handleParameterItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_TEXTOUT: /* 13 : Free form text from xsldg */
+ /* this is going to be most common and its so simple we can handle
+ it here */
+ /*
+ emit debugger->showMessage(eventData->getText(0));
+ */
+ if (!eventData->getText(0).isNull())
+ updateText.append(eventData->getText(0));
+ break;
+
+ case XSLDBG_MSG_FILEOUT: /* 14 : Response to cat commmand */
+ if (!eventData->getText(0).isNull())
+ updateText.append(eventData->getText(0));
+ break;
+
+ case XSLDBG_MSG_LOCALVAR_CHANGED: /* 15 : Response to locals command ie a
+ * local variable */
+ handleLocalVariableItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_GLOBALVAR_CHANGED: /* 16 : Response to globals command
+ * ie a global variable */
+ handleGlobalVariableItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_TEMPLATE_CHANGED: /* 17 : Response to templates commmand
+ * ie template details */
+ handleTemplateItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_SOURCE_CHANGED: /* 18 : Response to stylesheets command,
+ * a normal stylesheet */
+ handleSourceItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_INCLUDED_SOURCE_CHANGED: /* 19: Response to stylesheets
+ * command, a xmlNodeptr of
+ * a included stylesheet */
+ handleIncludedSourceItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_CALLSTACK_CHANGED: /* 20: Response to where command,
+ * ie a item on the call stack */
+ handleCallStackItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_ENTITIY_CHANGED: /* 21: Response to entities
+ * command */
+ handleEntityItem(eventData, 0L);
+ break;
+
+ case XSLDBG_MSG_RESOLVE_CHANGE: /* 22: Response to system or
+ * public command */
+ handleResolveItem(eventData, 0L);
+ break;
+
+ default:
+ qDebug("Unhandled type in emitMessage %d", itemType);
+ }
+}
+
+
+void XsldbgEvent::handleLineNoChanged(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (xsldbgUrl() != 0L){
+ eventData->setText(0, XsldbgDebuggerBase::fromUTF8FileName(xsldbgUrl()));
+ eventData->setInt(0, xsldbgLineNo());
+ eventData->setInt(1, msgData != 0L);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->lineNoChanged(eventData->getText(0), eventData->getInt(0),
+ eventData->getInt(1));
+ }
+ }
+}
+
+
+void XsldbgEvent::handleShowMessage(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ eventData->setText(0, XsldbgDebuggerBase::fromUTF8((xmlChar*)msgData));
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->showMessage(eventData->getText(0));
+ }
+ }
+}
+
+
+void XsldbgEvent::handleBreakpointItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ breakPointPtr breakItem = (breakPointPtr)msgData;
+ /* set the file name*/
+ eventData->setText(0, XsldbgDebuggerBase::fromUTF8FileName(breakItem->url));
+ /* line number*/
+ eventData->setInt(0, (int)breakItem->lineNo);
+
+ /* templateName */
+ eventData->setText(1, XsldbgDebuggerBase::fromUTF8(breakItem->templateName));
+
+ /* modeName */
+ eventData->setText(2, XsldbgDebuggerBase::fromUTF8(breakItem->modeName));
+ /* enabled state */
+ eventData->setInt(1, (int)(breakItem->flags & BREAKPOINT_ENABLED));
+
+ /* id value */
+ eventData->setInt(2, (int)breakItem->id);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->breakpointItem(eventData->getText(0), /* file name*/
+ eventData->getInt(0), /* line number*/
+ eventData->getText(1), /* template name */
+ eventData->getText(2), /* mode name */
+ eventData->getInt(1), /* enabled state*/
+ eventData->getInt(2) /* id*/);
+ }
+ }
+}
+
+
+void XsldbgEvent::handleGlobalVariableItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ xsltStackElemPtr item = (xsltStackElemPtr)msgData;
+ QString name, fileName, selectXPath;
+ int lineNumber = -1;
+
+ /* variable name*/
+ if (item->nameURI)
+ name = (XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
+ name.append(XsldbgDebuggerBase::fromUTF8(item->name));
+
+
+
+ if (item->computed && item->comp && item->comp->inst && item->comp->inst->doc){
+ fileName = XsldbgDebuggerBase::fromUTF8FileName(item->comp->inst->doc->URL);
+ lineNumber= xmlGetLineNo(item->comp->inst);
+ }
+
+ if (item->select)
+ selectXPath = XsldbgDebuggerBase::fromUTF8(item->select);
+
+ eventData->setText(0, name);
+ eventData->setText(1, "");
+ eventData->setText(2, fileName);
+ eventData->setText(3, selectXPath);
+ eventData->setInt(0, lineNumber);
+ eventData->setInt(1, 0);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->variableItem(eventData->getText(0), /* variable name*/
+ eventData->getText(1), /* templatecontext*/
+ eventData->getText(2), /* file name */
+ eventData->getInt(0), /* line number */
+ eventData->getText(3), /* select XPath */
+ eventData->getInt(1) /* Is this a local variable */ );
+ }
+ }
+}
+
+
+void XsldbgEvent::handleLocalVariableItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ xsltStackElemPtr item = (xsltStackElemPtr)msgData;
+ QString name, templateContext, fileName, selectXPath;
+ int lineNumber = -1;
+ xmlNodePtr varXmlNode;
+
+ /* variable name */
+ if (item->nameURI)
+ name = (XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
+ name.append(XsldbgDebuggerBase::fromUTF8(item->name));
+
+ if (item->computed && item->comp && item->comp->inst){
+ varXmlNode = item->comp->inst;
+
+ /* try to find out what template this variable belongs to */
+ if (varXmlNode->parent && IS_XSLT_NAME(varXmlNode->parent, "template")) {
+ xmlChar* value = xmlGetProp(varXmlNode->parent, (xmlChar *) "name");
+ if (value) {
+ templateContext = XsldbgDebuggerBase::fromUTF8(value);
+ xmlFree(value);
+ }else{
+ value = xmlGetProp(varXmlNode->parent, (xmlChar *) "match");
+ if (value) {
+ templateContext = XsldbgDebuggerBase::fromUTF8(value);
+ xmlFree(value);
+ }
+ }
+ }
+
+ if (varXmlNode->doc) {
+ fileName = XsldbgDebuggerBase::fromUTF8FileName(varXmlNode->doc->URL);
+ lineNumber = xmlGetLineNo(varXmlNode);
+ }
+
+ if (item->select)
+ selectXPath = XsldbgDebuggerBase::fromUTF8(item->select);
+
+ eventData->setText(0, name);
+ eventData->setText(1, templateContext);
+ eventData->setText(2, fileName);
+ eventData->setText(3, selectXPath);
+ eventData->setInt(0, lineNumber);
+ eventData->setInt(1, 1);
+ }
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->variableItem(eventData->getText(0), /* variable name*/
+ eventData->getText(1), /* templatecontext*/
+ eventData->getText(2), /* file name */
+ eventData->getInt(0), /* line number */
+ eventData->getText(3), /* select XPath */
+ eventData->getInt(1) /* Is this a local variable */ );
+ }
+ }
+}
+
+
+void XsldbgEvent::handleTemplateItem(XsldbgEventData *eventData, const void *msgData)
+{
+if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if(msgData != 0L){
+ xsltTemplatePtr item = (xsltTemplatePtr)msgData;
+ QString name, mode, fileName;
+ int lineNumber = -1;
+
+ if (item->nameURI)
+ name.append(XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
+
+ if (item->name)
+ name.append(XsldbgDebuggerBase::fromUTF8(item->name));
+ else if (item->match)
+ name.append(XsldbgDebuggerBase::fromUTF8(item->match));
+
+ mode = XsldbgDebuggerBase::fromUTF8(item->mode);
+
+ if (item->elem && item->elem->doc){
+ fileName = XsldbgDebuggerBase::fromUTF8FileName(item->elem->doc->URL);
+ lineNumber = xmlGetLineNo(item->elem);
+ }
+ eventData->setText(0, name);
+ eventData->setText(1, mode);
+ eventData->setText(2, fileName);
+ eventData->setInt(0, lineNumber);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->templateItem(eventData->getText(0), /* tempalte name*/
+ eventData->getText(1), /* mode*/
+ eventData->getText(2), /* file name*/
+ eventData->getInt(0) /* line number*/);
+ }
+ }
+
+}
+
+
+void XsldbgEvent::handleIncludedSourceItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ xmlNodePtr item = (xmlNodePtr)msgData;
+ QString name, fileName;
+ int lineNumber = -1;
+
+ if (item->doc)
+ name = XsldbgDebuggerBase::fromUTF8FileName(item->doc->URL);
+
+ if (item->parent && item->parent->doc){
+ fileName = XsldbgDebuggerBase::fromUTF8FileName(item->parent->doc->URL);
+ lineNumber = xmlGetLineNo((xmlNodePtr)item->parent->doc);
+ }
+ eventData->setText(0, name);
+ eventData->setText(1, fileName);
+ eventData->setInt(0, lineNumber);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->sourceItem(eventData->getText(0), /* file name*/
+ eventData->getText(1), /* parent file name*/
+ eventData->getInt(0) /* parent line number*/);
+ }
+ }
+}
+
+void XsldbgEvent::handleSourceItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ xsltStylesheetPtr item = (xsltStylesheetPtr)msgData;
+ QString name, fileName;
+ int lineNumber = -1;
+
+ if (item->doc)
+ name = XsldbgDebuggerBase::fromUTF8FileName(item->doc->URL);
+
+ if (item->parent && item->parent->doc){
+ fileName = XsldbgDebuggerBase::fromUTF8FileName(item->parent->doc->URL);
+ lineNumber = xmlGetLineNo((xmlNodePtr)item->parent->doc);
+ }
+
+ eventData->setText(0, name);
+ eventData->setText(1, fileName);
+ eventData->setInt(0, lineNumber);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->sourceItem(eventData->getText(0), /* name*/
+ eventData->getText(1), /* parent file name*/
+ eventData->getInt(0) /* parent line number*/);
+ }
+ }
+}
+
+void XsldbgEvent::handleParameterItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ parameterItemPtr paramItem = (parameterItemPtr)msgData;
+ QString name, value;
+
+ name = XsldbgDebuggerBase::fromUTF8(paramItem->name);
+ value = XsldbgDebuggerBase::fromUTF8(paramItem->value);
+
+ eventData->setText(0, name);
+ eventData->setText(1, value);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->parameterItem(eventData->getText(0), /* param name*/
+ eventData->getText(1) /* param value*/);
+ }
+ }
+}
+
+
+void XsldbgEvent::handleCallStackItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ callPointPtr item = (callPointPtr)msgData;
+ QString templateName, fileName;
+ int lineNumber = -1;
+
+ /* template name */
+ if (item->info){
+ templateName = XsldbgDebuggerBase::fromUTF8(item->info->templateName);
+ fileName = XsldbgDebuggerBase::fromUTF8FileName(item->info->url);
+ lineNumber = item->lineNo;
+ }
+
+ eventData->setText(0, templateName);
+ eventData->setText(1, fileName);
+ eventData->setInt(0, lineNumber);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->callStackItem(eventData->getText(0), /* template name*/
+ eventData->getText(1), /* fileName */
+ eventData->getInt(0) /* line number*/);
+ }
+ }
+}
+
+
+void XsldbgEvent::handleEntityItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ QString SystemID, PublicID;
+
+ entityInfoPtr info = (entityInfoPtr)msgData;
+ SystemID = XsldbgDebuggerBase::fromUTF8FileName(info->SystemID);
+ PublicID = XsldbgDebuggerBase::fromUTF8(info->PublicID);
+
+ eventData->setText(0, SystemID);
+ eventData->setText(1, PublicID);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->entityItem(eventData->getText(0), /* SystemID*/
+ eventData->getText(1) /* PublicID*/);
+ }
+ }
+}
+
+
+void XsldbgEvent::handleResolveItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ QString URI = XsldbgDebuggerBase::fromUTF8FileName((const xmlChar*)msgData);
+
+ eventData->setText(0, URI);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->resolveItem(eventData->getText(0) /* URI */);
+ }
+ }
+}
+
+
+void XsldbgEvent::handleIntOptionItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ parameterItemPtr paramItem = (parameterItemPtr)msgData;
+ eventData->setText(0, XsldbgDebuggerBase::fromUTF8(paramItem->name));
+ eventData->setInt(0, paramItem->intValue);
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->intOptionItem(eventData->getText(0), /* option name*/
+ eventData->getInt(0) /* value*/);
+ }
+ }
+}
+
+
+void XsldbgEvent::handleStringOptionItem(XsldbgEventData *eventData, const void *msgData)
+{
+ if (eventData != 0L){
+ if (beenCreated == false){
+ /* add our specific data to eventData*/
+ if (msgData != 0L){
+ parameterItemPtr paramItem = (parameterItemPtr)msgData;
+ eventData->setText(0, XsldbgDebuggerBase::fromUTF8(paramItem->name));
+ eventData->setText(1, XsldbgDebuggerBase::fromUTF8(paramItem->value));
+ }
+ }else{
+ /* emit the event data via debugger*/
+ emit debugger->stringOptionItem(eventData->getText(0), /* option name*/
+ eventData->getText(1) /* value*/);
+ }
+ }
+}
+
+
+
+void XsldbgEventDataList::deleteItem( QPtrCollection::Item d )
+{
+ if ( del_item ) delete (XsldbgEventData *)d;
+}
diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgnotifier.cpp b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgnotifier.cpp
new file mode 100644
index 00000000..d76c6678
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgnotifier.cpp
@@ -0,0 +1,33 @@
+/***************************************************************************
+ xsldbgnotifier.cpp - description
+ -------------------
+ begin : Thu Dec 20 2001
+ copyright : (C) 2001 by keith
+ email : keith@linux
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "../libxsldbg/xsldbgnotifier.h"
+
+XsldbgNotifier::XsldbgNotifier(void)
+{
+}
+
+
+XsldbgNotifier::~XsldbgNotifier(void)
+{
+}
+
+
+void XsldbgNotifier::doNotify(XsldbgMessageEnum /*type*/, const void * /*data*/)
+{
+}
+
diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgthread.cpp b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgthread.cpp
new file mode 100644
index 00000000..1f428bb5
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgthread.cpp
@@ -0,0 +1,360 @@
+/***************************************************************************
+ xsldbgthread.cpp - description
+ -------------------
+ begin : Thu Dec 20 2001
+ copyright : (C) 2001 by keith
+ email : keith@linux
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "config.h"
+#include <pthread.h> /* need to create/work with process thread */
+#include <errno.h> /* need for EAGAIN */
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdarg.h>
+
+#include <libxml/xmlerror.h>
+
+#include "../libxsldbg/breakpoint.h"
+#include "../libxsldbg/xsldbgmsg.h"
+#include "../libxsldbg/xsldbgthread.h"
+#include "../libxsldbg/qtnotifier2.h"
+
+#ifdef HAVE_READLINE
+#include <readline/readline.h>
+#ifdef HAVE_HISTORY
+#include <readline/history.h>
+#endif
+#endif
+
+#define DEBUG_BUFFER_SIZE 500
+
+static char inputBuffer[DEBUG_BUFFER_SIZE];
+static char outputBuffer[DEBUG_BUFFER_SIZE];
+
+/*the major structure to hold information about the process thread */
+pthread_t mythread;
+
+/* The reader for stdout */
+pthread_t stdoutReaderThread;
+
+FILE *stdoutIO = NULL;
+
+
+/* -----------------------------------------------
+ private functions
+ ---------------------------------------------------*/
+
+extern "C" {
+
+/**
+ * xsldbgGenericErrorFunc:
+ * @ctx: Is Valid
+ * @msg: Is valid
+ * @...: other parameters to use
+ *
+ * Handles print output from xsldbg and passes it to the application
+ */
+void
+xsldbgGenericErrorFunc(void *ctx, const char *msg, ...);
+xmlChar * qtXslDbgShellReadline(xmlChar * prompt);
+
+}
+
+/* -----------------------------------------------
+ end functions
+ ---------------------------------------------------*/
+
+/* setup all application wide items */
+int
+xsldbgThreadInit(void)
+{
+ int result = 0;
+ fprintf(stderr, "mainInit()\n");
+ xsltSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
+ setThreadStatus(XSLDBG_MSG_THREAD_INIT);
+ xsldbgSetAppFunc(qtNotifyXsldbgApp);
+ xsldbgSetAppStateFunc(qtNotifyStateXsldbgApp);
+ xsldbgSetTextFunc(qtNotifyTextXsldbgApp);
+ xsldbgSetReadlineFunc(qtXslDbgShellReadline);
+
+
+ /* create the thread */
+ if (pthread_create(&mythread, NULL, xsldbgThreadMain, NULL) != EAGAIN) {
+ int counter;
+ for (counter = 0; counter < 11; counter++){
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_INIT)
+ break;
+ usleep(250000); /*guess that it will take at most 2.5 seconds to startup */
+ }
+ /* xsldbg should have started by now if it can */
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN){
+ fprintf(stderr, "Created thread\n");
+ result++;
+ }else
+ fprintf(stderr, "Thread did not start\n");
+ } else {
+ fprintf(stderr, "Failed to create thread\n");
+ }
+
+ return result;
+}
+
+
+/* tell the thread to stop and free that memory !*/
+void
+xsldbgThreadFree(void)
+{
+ fprintf(stderr, "xsldbgThreadFree()\n");
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_DEAD)
+ {
+ int counter;
+ fprintf(stderr, "Killing xsldbg thread\n");
+ setThreadStatus(XSLDBG_MSG_THREAD_STOP);
+ for (counter = 0; counter < 11; counter++){
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_DEAD)
+ break;
+ usleep(250000); /*guess that it will take at most 2.5 seconds to stop */
+ }
+ }
+
+}
+
+const char *getFakeInput()
+{
+ return inputBuffer;
+}
+
+
+/* put text into standard input just like we had typed it */
+int
+fakeInput(const char *text)
+{
+ int result = 0;
+
+ if (!text || (getInputReady() == 1) || (getThreadStatus() != XSLDBG_MSG_THREAD_RUN))
+ return result;
+
+ // fprintf(stderr, "\nFaking input of \"%s\"\n", text);
+ strncpy(inputBuffer, text, sizeof(inputBuffer));
+ setInputReady(1);
+ result++;
+ return result;
+}
+
+
+/* use this function instead of the one that was in debugXSL.c */
+/**
+ * qtXslDbgShellReadline:
+ * @prompt: the prompt value
+ *
+ * Read a string
+ *
+ * Returns a copy of the text inputed or NULL if EOF in stdin found.
+ * The caller is expected to free the returned string.
+ */
+xmlChar *
+qtXslDbgShellReadline(xmlChar * prompt)
+{
+
+ const char *inputReadBuff;
+
+ static char last_read[DEBUG_BUFFER_SIZE] = { '\0' };
+
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN)
+ {
+#ifdef HAVE_READLINE
+ xmlChar *line_read;
+
+ /* Get a line from the user. */
+ line_read = (xmlChar *) readline((char *) prompt);
+
+ /* If the line has any text in it, save it on the history. */
+ if (line_read && *line_read) {
+ add_history((char *) line_read);
+ strncpy((char*)last_read, (char*)line_read, DEBUG_BUFFER_SIZE - 1);
+ } else {
+ /* if only <Enter>is pressed then try last saved command line */
+ line_read = (xmlChar *) xmlMemStrdup(last_read);
+ }
+ return (line_read);
+#else
+ char line_read[DEBUG_BUFFER_SIZE];
+
+ if (prompt != NULL)
+ xsltGenericError(xsltGenericErrorContext, "%s", prompt);
+ if (!fgets(line_read, DEBUG_BUFFER_SIZE - 1, stdin))
+ return (NULL);
+ line_read[DEBUG_BUFFER_SIZE - 1] = 0;
+ /* if only <Enter>is pressed then try last saved command line */
+ if ((strlen(line_read) == 0) || (line_read[0] == '\n')) {
+ strcpy(line_read, last_read);
+ } else {
+ strcpy(last_read, line_read);
+ }
+ return (xmlChar *) xmlMemStrdup(line_read);
+#endif
+
+ }
+ else{
+
+ setInputStatus(XSLDBG_MSG_AWAITING_INPUT);
+ notifyXsldbgApp(XSLDBG_MSG_AWAITING_INPUT, NULL);
+
+ while (getInputReady() == 0){
+ usleep(10000);
+ /* have we been told to die */
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_STOP){
+ fprintf(stderr, "About to stop thread\n");
+ xslDebugStatus = DEBUG_QUIT;
+ return NULL;
+ }
+ }
+
+ setInputStatus(XSLDBG_MSG_READ_INPUT);
+ inputReadBuff = getFakeInput();
+ if(inputReadBuff){
+ notifyXsldbgApp(XSLDBG_MSG_READ_INPUT, inputReadBuff);
+ return (xmlChar*)xmlMemStrdup(inputReadBuff);
+ }else{
+ return NULL;
+ }
+ }
+}
+
+
+xsldbgErrorMsg msg;
+xsldbgErrorMsgPtr msgPtr = &msg;
+xmlChar *msgText = NULL;
+
+int qtNotifyStateXsldbgApp(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState, const char *text)
+{
+ int result = 0;
+ msg.type = type;
+ msg.commandId = commandId;
+ msg.commandState = commandState;
+ if (text != NULL)
+ {
+ msg.text = (xmlChar*)xmlMemStrdup(text);
+ if (msg.text == NULL)
+ return result; /* out of memory */
+ }
+ else
+ msg.text = NULL;
+
+ notifyXsldbgApp(XSLDBG_MSG_PROCESSING_RESULT, msgPtr);
+ if (msg.text != NULL)
+ {
+ xmlFree(msg.text);
+ msg.text = NULL;
+ }
+
+ result = 1;
+ return result;
+}
+
+
+int qtNotifyTextXsldbgApp(XsldbgMessageEnum type, const char *text)
+{
+ return qtNotifyStateXsldbgApp(type, -1, XSLDBG_COMMAND_NOTUSED, text);
+}
+
+char mainBuffer[DEBUG_BUFFER_SIZE];
+static void xsldbgThreadCleanupQt(void);
+
+
+/* this is where the thread get to do all its work */
+void *
+xsldbgThreadMain(void *)
+{
+ // int defaultArgc = 2;
+ // char *defaultArgv[2];
+ // int i;
+
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_INIT){
+ fprintf(stderr, "xsldbg thread is not ready to be started. Or one is already running.\n");
+ return NULL; /* we can't start more than one thread of xsldbg */
+ }
+
+// defaultArgv[0] = xmlMemStrdup("xsldbg");
+// defaultArgv[1] = xmlMemStrdup("--shell");
+ /*
+ defaultArgv[2] = xmlMemStrdup("xsldoc.xsl");
+ defaultArgv[3] = xmlMemStrdup("xsldoc.xml");
+ */
+/* for (i = 0; i < defaultArgc; i++){
+ if (defaultArgv[i] == NULL){
+ fprintf(stderr, "Start thread failed. Unable to create xsldbg arguments\n");
+ return NULL;
+ }
+ }
+*/
+ xsldbgSetThreadCleanupFunc(xsldbgThreadCleanupQt);
+ setThreadStatus(XSLDBG_MSG_THREAD_RUN);
+ setInputStatus(XSLDBG_MSG_AWAITING_INPUT);
+ fprintf(stderr, "Starting thread\n");
+
+ /* call the "main of xsldbg" found in debugXSL.c */
+// xsldbgMain(defaultArgc, defaultArgv);
+ xsldbgMain(0,0);
+ fprintf(stderr, "Stopping thread\n");
+/*
+ for (i = 0; i < defaultArgc; i++){
+ xmlFree(defaultArgv[i]);
+ }
+*/
+
+ setThreadStatus(XSLDBG_MSG_THREAD_DEAD);
+ setInputStatus(XSLDBG_MSG_PROCESSING_INPUT);
+ notifyXsldbgApp(XSLDBG_MSG_THREAD_DEAD, NULL);
+ return NULL;
+}
+
+
+
+/* thread has died so cleanup after it not called directly but via
+ notifyXsldbgApp*/
+void
+xsldbgThreadCleanupQt(void)
+{
+ fprintf(stderr, "Thread has finished\n");
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN)
+ {
+ xsldbgThreadFree();
+ }
+ /* its safe to modify threadStatus as the thread is now dead */
+ setThreadStatus(XSLDBG_MSG_THREAD_DEAD);
+}
+
+
+
+void *
+xsldbgThreadStdoutReader(void *data)
+{
+ if (!stdoutIO)
+ return data;
+
+ while (getThreadStatus() == XSLDBG_MSG_THREAD_RUN){
+ if (fgets(outputBuffer, sizeof(outputBuffer -1), stdoutIO)){
+ usleep(10000);
+ strcat(outputBuffer, "\n");
+ notifyTextXsldbgApp(XSLDBG_MSG_TEXTOUT, outputBuffer);
+ }else{
+ fprintf(stderr, "Unable to read from stdout from xsldbg\n");
+ break;
+ }
+ }
+ return data;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/Makefile.am b/kxsldbg/kxsldbgpart/libxsldbg/Makefile.am
new file mode 100644
index 00000000..aaea2e53
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/Makefile.am
@@ -0,0 +1,12 @@
+noinst_LTLIBRARIES = libxsldbg.la
+
+libxsldbg_la_METASOURCES = AUTO
+
+libxsldbg_la_SOURCES = allmoc.cpp xsldbgthread.cpp xsldbg.cpp xsldbgmsg.cpp variable_cmds.cpp utils.cpp trace_cmds.cpp template_cmds.cpp search_cmds.cpp search.cpp param_cmds.cpp os_cmds.cpp options_unix.cpp options.cpp option_cmds.cpp nodeview_cmds.cpp help_unix.cpp files_unix.cpp files.cpp file_cmds.cpp debugXSL.cpp debug.cpp callstack.cpp breakpoint_cmds.cpp breakpoint.cpp arraylist.cpp
+
+libxsldbg_la_LIBADD = $(LIBXSLT_LIBS)
+libxsldbg_la_LDFLAGS = $(all_libraries)
+
+AM_CPPFLAGS = -DDOCS_PATH=\"$(DOCS_PATH)\" -I.. $(LIBXSLT_CFLAGS) $(all_includes)
+
+KDE_OPTIONS= nofinal
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/allmoc.cpp b/kxsldbg/kxsldbgpart/libxsldbg/allmoc.cpp
new file mode 100644
index 00000000..41decae4
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/allmoc.cpp
@@ -0,0 +1,2 @@
+#include "../xsldbgdebugger.h"
+#include "qtnotifier2.h"
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/arraylist.cpp b/kxsldbg/kxsldbgpart/libxsldbg/arraylist.cpp
new file mode 100644
index 00000000..a9de14fe
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/arraylist.cpp
@@ -0,0 +1,240 @@
+
+/***************************************************************************
+ arraylist.c - define array implementation of a list
+ -------------------
+ begin : Sat Nov 10 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "arraylist.h"
+#include <libxslt/xsltutils.h>
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+/**
+ * arrayListNew:
+ * @initialSize: The initial size of list
+ * @deleteFunction: The function to call to free items in the list
+ *
+ * Create a new list with a size of @initialSize
+ *
+ * Returns Non-null on success,
+ * NULL otherwise
+ */
+arrayListPtr
+arrayListNew(int initialSize, freeItemFunc deleteFunction)
+{
+ arrayListPtr list = NULL;
+
+ if (initialSize <= 0) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "arrayListNew invalid initialSize %d\n",
+ initialSize);
+#endif
+ } else
+ list = (arrayListPtr) xmlMalloc(sizeof(arrayList));
+
+ if (list) {
+ list->data = (void **) xmlMalloc(sizeof(void *) * initialSize);
+ list->deleteFunction = deleteFunction;
+ list->count = 0;
+ list->size = initialSize;
+ }
+
+ return list;
+}
+
+
+/**
+ * arrayListFree:
+ * @list: A valid list
+ *
+ * Free memory assocated with array list, if the array list
+ * has a valid deleteFunction then content with be freed with
+ * using that deleteFunction
+ */
+void
+arrayListFree(arrayListPtr list)
+{
+ if (!list)
+ return;
+
+ arrayListEmpty(list);
+ xmlFree(list->data);
+ xmlFree(list);
+}
+
+
+/**
+ * arrayListEmpty:
+ * @list: A valid list
+ *
+ * Empties the list of its content
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+arrayListEmpty(arrayListPtr list)
+{
+ int index, result = 0;
+
+ if (list) {
+ if (list->deleteFunction) {
+ for (index = 0; index < list->count; index++) {
+ if (list->data[index])
+ (*list->deleteFunction) (list->data[index]);
+ }
+ result = 1;
+ list->count = 0;
+ }
+ }
+ return result;
+}
+
+
+/**
+ * arrayListSize:
+ * @list: A valid list
+ *
+ * Return The maximum number elements this list can contain
+ *
+ * Returns The maximum number elements this list can contain
+ */
+int
+arrayListSize(arrayListPtr list)
+{
+ int result = 0;
+
+ if (list)
+ result = list->size;
+
+ return result;
+}
+
+
+/**
+ * arrayListCount:
+ * @list: A valid list
+ *
+ * Return the count of number items in list
+ *
+ * Returns The count of number items in list
+ */
+int
+arrayListCount(arrayListPtr list)
+{
+ int result = 0;
+
+ if (list)
+ result = list->count;
+
+ return result;
+}
+
+
+/**
+ * arrayListAdd:
+ * @list: A valid list
+ * @item: A valid list
+ *
+ * Add @item to @list
+ *
+ * Returns 1 if able to add @item to end of @list,
+ * 0 otherwise
+ */
+int
+arrayListAdd(arrayListPtr list, void *item)
+{
+ int result = 0;
+
+ if (list && item) {
+ if (list->count + 1 > list->size) {
+ /* grow the size of data */
+ void **temp;
+ int newSize, index;
+
+ if (list->size < DOUBLE_SIZE_MAX_ITEM)
+ newSize = list->size * 2;
+ else
+ newSize = (int) (list->size * 1.5);
+ temp = (void **) xmlMalloc(sizeof(void *) * newSize);
+ for (index = 0; index < list->count; index++) {
+ temp[index] = list->data[index];
+ }
+ xmlFree(list->data);
+ list->data = temp;
+ list->size = newSize;
+ }
+ list->data[list->count++] = item;
+ result = 1;
+ }
+ return result;
+}
+
+
+/**
+ * arrayListDelete:
+ * @list: A valid list
+ * @position: 0 =< @position < arrayListCount(@list)
+ *
+ * Delete item at position @position from @list
+ *
+ * Returns 1 if able to delete element in @list at position @position,
+ * 0 otherwise
+ */
+int
+arrayListDelete(arrayListPtr list, int position)
+{
+ int result = 0, index;
+
+ if (list && (list->count > 0) && (position >= 0) &&
+ (position < list->count) && list->data[position]) {
+ if (list->deleteFunction)
+ (*list->deleteFunction) (list->data[position]);
+
+ /* shuffle all elements upwards */
+ for (index = position; index < (list->count - 1); index++) {
+ list->data[index] = list->data[index + 1];
+ }
+ list->count--;
+ result = 1;
+ }
+ return result;
+}
+
+
+
+/**
+ * arrayListGet:
+ * @list: A valid list
+ * @position: 0 =< @position < arrayListCount(@list)
+ *
+ * Get item at position @position from @list
+ *
+ * Returns Non-null if able to retrieve element in @list at position @position,
+ * NULL otherwise
+ */
+void *
+arrayListGet(arrayListPtr list, int position)
+{
+ void *result = NULL;
+
+ if (list && (position >= 0) && (position < list->count)) {
+ result = list->data[position];
+ }
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/arraylist.h b/kxsldbg/kxsldbgpart/libxsldbg/arraylist.h
new file mode 100644
index 00000000..81398459
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/arraylist.h
@@ -0,0 +1,291 @@
+
+/**************************************************************************
+ arraylist.h - declare the functions for
+ implementation of the array list
+ -------------------
+ begin : Sat Nov 10 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ **************************************************************************/
+
+/**************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 ARRAYLIST_H
+#define ARRAYLIST_H
+
+#ifdef USE_KDE_DOCS
+
+/**
+ * Provide a fast easy to use array list. Support the basic functions of add
+ * delete, empty, count, free
+ *
+ * @short Array list support
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef USE_GNOME_DOCS
+
+#else
+#ifdef USE_KDE_DOCS
+
+#endif
+#endif
+
+
+ typedef void (*freeItemFunc) (void *item);
+ /* A dynamic structure behave like a list */
+ typedef struct _arrayList arrayList;
+ typedef arrayList *arrayListPtr;
+ struct _arrayList {
+ int size, count;
+ void **data;
+ freeItemFunc deleteFunction;
+ };
+
+/* what size of the list do we stop automatic doubling of capacity
+ if array list size growth is needed */
+#define DOUBLE_SIZE_MAX_ITEM 10
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * arrayListNew:
+ * @initialSize: The initial size of list
+ * @deleteFunction: The function to call to free items in the list
+ *
+ * Create a new list with a size of @initialSize
+ *
+ * Returns Non-null on success,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Create a new list with a size of @p initialSize
+ *
+ * @returns Non-null on success,
+ * NULL otherwise
+ *
+ * @param initial The initial size of list
+ * @param deleteFunction the Function to call to free items in the list
+ */
+#endif
+#endif
+ arrayListPtr arrayListNew(int initialSize,
+ freeItemFunc deleteFunction);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * arrayListFree:
+ * @list: A valid list
+ *
+ * Free memory assocated with array list, if the array list
+ * has a valid deleteFunction then content with be freed with
+ * using that deleteFunction
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Free memory assocated with array list, if the array list
+ * has a valid deleteFunction then content with be freed with
+ * using that deleteFunction
+ *
+ * @param list A valid list
+ */
+#endif
+#endif
+ void arrayListFree(arrayListPtr list);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * arrayListEmpty:
+ * @list: A valid list
+ *
+ * Empties the list of its content
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Empties the list of its content
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param list A valid list
+ */
+#endif
+#endif
+ int arrayListEmpty(arrayListPtr list);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * arrayListSize:
+ * @list: A valid list
+ *
+ * Return The maximum number elements this list can contain
+ *
+ * Returns The maximum number elements this list can contain
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Return the maximum number elements this list can contain
+ *
+ * @returns The maximum number elements this list can contain
+ *
+ * @param list A valid list
+ */
+#endif
+#endif
+ int arrayListSize(arrayListPtr list);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * arrayListCount:
+ * @list: A valid list
+ *
+ * Return the count of number items in list
+ *
+ * Returns The count of number items in list
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Return the count of number items in list
+ * @returns The count of number items in list
+ *
+ * @param list A valid list
+ */
+#endif
+#endif
+
+ int arrayListCount(arrayListPtr list);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * arrayListAdd:
+ * @list: A valid list
+ * @item:A valid item
+ *
+ * Add @item to @list
+ *
+ * Returns 1 if able to add @item to end of @list,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Add @p item to @p list
+ *
+ * @returns 1 if able to add @p item to end of @p list,
+ * 0 otherwise
+ *
+ * @param list A valid list
+ * @param item A valid item
+ */
+#endif
+#endif
+ int arrayListAdd(arrayListPtr list, void *item);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * arrayListDelete:
+ * @list: A valid list
+ * @position: 0 =< @position < arrayListCount(@list)
+ *
+ * Delete item at position @position from @list
+ *
+ * Returns 1 if able to delete element in @list at position @position,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * @returns 1 if able to delete element in @p list at position @p position,
+ * 0 otherwise
+ *
+ * @param list A valid list
+ * @param position 0 =< @p position < arrayListCount(@p list)
+ */
+#endif
+#endif
+ int arrayListDelete(arrayListPtr list, int position);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * arrayListGet:
+ * @list: A valid list
+ * @position: 0 =< @position < arrayListCount(@list)
+ *
+ * Get item at position @position from @list
+ *
+ * Returns Non-null if able to retrieve element in @list at position
+ * @position,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * @returns Non-null if able to retrieve element in @p list at position
+ * @p position,
+ * NULL otherwise
+ *
+ * @param list A valid list
+ * @param position 0 =< @p position < arrayListCount(@p list)
+ */
+#endif
+#endif
+ void *arrayListGet(arrayListPtr list, int position);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint.cpp b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint.cpp
new file mode 100644
index 00000000..270ce82d
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint.cpp
@@ -0,0 +1,696 @@
+
+/***************************************************************************
+ breakpoint.c - breakpoint implementation
+ -------------------
+ begin : Fri Nov 2 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+#include "xsldbg.h"
+#include "breakpoint.h"
+#include "arraylist.h"
+#include "options.h"
+
+extern int xsldbgValidateBreakpoints; /*located in debugXSL.c*/
+
+/*-----------------------------------------------------------
+ Private functions
+-----------------------------------------------------------*/
+
+/**
+ * lineNoItemNew:
+ *
+ * Returns a new hash table for break points
+ */
+xmlHashTablePtr lineNoItemNew(void);
+
+
+/**
+ * lineNoItemFree:
+ * @item: valid hashtable of break points
+ *
+ * Free @item and all its contents
+ */
+void lineNoItemFree(void *item);
+
+
+/**
+ * lineNoItemDelete:
+ * @breakPointHash: Is valid
+ * @breakPtr: Is valid
+ *
+ * Returns 1 if able to delete @breakPtr from @breakPointHash,
+ * 0 otherwise
+ */
+int lineNoItemDelete(xmlHashTablePtr breakPointHash,
+ breakPointPtr breakPtr);
+
+/**
+ * lineNoItemAdd:
+ * @breakPointHash: is valid
+ * @breakPtr: is valid
+ *
+ * Add breakpoint to hash
+ *
+ * Returns 1 if able to add @breakPtr to @breakPointHash,
+ * 0 otherwise
+ */
+int lineNoItemAdd(xmlHashTablePtr breakPointHash, breakPointPtr breakPtr);
+
+/*-----------------------------------------------------------
+ Breakpoint debugger functions
+-----------------------------------------------------------*/
+
+
+/* This is our major structure, it is a list of hash tables. Each
+ hash table has breakpoints with the same line number. A line
+ number is used as an index into this list to get the right hash table.
+ Then its just a matter of a simple hash table lookup */
+arrayListPtr breakList;
+
+/* keep track of what break point id we're up to*/
+int breakPointCounter = 0;
+
+/* What is the current breakpoint is only valid up to the start of
+ xsldbg command prompt. ie don't use it after deletion of breakpoints */
+breakPointPtr activeBreakPointItem = NULL;
+
+
+/**
+ * lineNoItemNew:
+ *
+ * Returns a new hash table for break points
+ */
+xmlHashTablePtr
+lineNoItemNew(void)
+{
+ xmlHashTablePtr hash;
+
+ hash = xmlHashCreate(4);
+
+ return hash;
+}
+
+
+/**
+ * lineNoItemFree:
+ * @item: valid hashtable of break points
+ *
+ * Free @item and all its contents
+ */
+void
+lineNoItemFree(void *item)
+{
+ xmlHashTablePtr hash = (xmlHashTablePtr) item;
+
+ if (item) {
+#if 0
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Freeing breakpoint line hash"
+ " with %d elements \n", xmlHashSize(item));
+#endif
+#endif
+ xmlHashFree(hash, breakPointItemFree);
+ }
+}
+
+
+/**
+ * lineNoItemDelete:
+ * @breakPointHash: is valid
+ * @breakPtr: is valid
+ *
+ * Returns 1 if able to delete @breakPtr from @breakPointHash,
+ * 0 otherwise
+ */
+int
+lineNoItemDelete(xmlHashTablePtr breakPointHash, breakPointPtr breakPtr)
+{
+ int result = 0;
+
+ if (breakPointHash && breakPtr) {
+ if (xmlHashRemoveEntry(breakPointHash, breakPtr->url,
+ breakPointItemFree) == 0){
+ result = 1;
+ }else{
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,"lineNoItemDelete failed");
+#endif
+ }
+
+ }else {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext, "lineNoItemDelete failed args %d %d", breakPointHash, breakPtr);
+#endif
+ }
+ return result;
+}
+
+
+/**
+ * lineNoItemAdd:
+ * @breakPointHash: is valid
+ * @breakPtr: is valid
+ *
+ * Returns 1 if able to add @breakPtr to @breakPointHash,
+ * 0 otherwise
+ */
+int
+lineNoItemAdd(xmlHashTablePtr breakPointHash, breakPointPtr breakPtr)
+{
+ int result = 0;
+
+ if (breakPointHash && breakPtr) {
+ if (xmlHashAddEntry(breakPointHash, breakPtr->url, breakPtr) == 0)
+ result = 1;
+ }
+ return result;
+}
+
+/**
+ * breakPointGetLineNoHash:
+ * @lineNo: Line number of of breakpoints of interest
+ *
+ * Return A hash of breakpoints with same line number
+ *
+ * Returns A hash of breakpoints with a line number of @lineNo
+ */
+xmlHashTablePtr
+breakPointGetLineNoHash(long lineNo)
+{
+ if (!breakList) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Breakpoints structures not initialized\n");
+#endif
+ return NULL;
+ } else
+ return (xmlHashTablePtr) arrayListGet(breakList, lineNo);
+}
+
+
+/**
+ * breakPointInit:
+ *
+ * Returns 1 if breakpoints have been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+*/
+int
+breakPointInit(void)
+{
+ int result = 0;
+
+ /* the average file has 395 lines of code so add 100 lines now */
+ breakList = arrayListNew(100, lineNoItemFree);
+ if (breakList) {
+ /*
+ * We don't need to do any thing else, as its done when we add the
+ * breakPoints
+ */
+ result = 1;
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Unable to intialize breakPoints: memory error\n");
+#endif
+ }
+ return result;
+}
+
+
+/**
+ * breakPointFree:
+ *
+ * Free all memory used by breakPoints
+ */
+void
+breakPointFree(void)
+{
+ if (breakList)
+ arrayListFree(breakList);
+ breakList = NULL;
+}
+
+
+/**
+ * breakPointEmpty:
+ *
+ * Empty the break point collection
+ *
+ * Returns 1 if able to empty the breakpoint list of its contents,
+ * 0 otherwise
+ */
+int
+breakPointEmpty(void)
+{
+ return arrayListEmpty(breakList);
+}
+
+
+/**
+ * breakPointItemNew:
+ *
+ * Create a new break point item
+ * Returns valid break point with default values set if successful,
+ * NULL otherwise
+ */
+breakPointPtr
+breakPointItemNew(void)
+{
+ breakPointPtr breakPtr = (breakPointPtr) xmlMalloc(sizeof(breakPoint));
+
+ if (breakPtr) {
+ breakPtr->url = NULL;
+ breakPtr->lineNo = -1;
+ breakPtr->templateName = NULL;
+ breakPtr->modeName = NULL;
+ breakPtr->flags = BREAKPOINT_ENABLED;
+ breakPtr->id = ++breakPointCounter;
+ breakPtr->type = DEBUG_BREAK_SOURCE;
+ }
+ return breakPtr;
+}
+
+
+/**
+ * breakPointItemFree:
+ * @payload: valid breakPointPtr
+ * @name: not used
+ *
+ * Free memory associated with this break point
+ */
+void
+breakPointItemFree(void *payload, xmlChar * name)
+{
+ Q_UNUSED(name);
+ if (payload) {
+ breakPointPtr breakPtr = (breakPointPtr) payload;
+
+ if (breakPtr->url)
+ xmlFree(breakPtr->url);
+ if (breakPtr->templateName)
+ xmlFree(breakPtr->templateName);
+ if (breakPtr->modeName)
+ xmlFree(breakPtr->modeName);
+ xmlFree(breakPtr);
+ }
+}
+
+
+/**
+ * breakPointActiveBreakPoint:
+ *
+ * Get the active break point
+ *
+ * Returns The last break point that we stoped at
+ *
+ * Depreciated
+ */
+breakPointPtr
+breakPointActiveBreakPoint(void)
+{
+ /* This function is depreciated */
+ return NULL; /* activeBreakPointItem; */
+}
+
+
+
+/**
+ * breakPointSetActiveBreakPoint:
+ * @breakPtr: Is valid break point or NULL
+ *
+ * Set the active break point
+ *
+ * Depreciated
+ */
+void
+breakPointSetActiveBreakPoint(breakPointPtr breakPtr)
+{
+ Q_UNUSED(breakPtr);
+ /*
+ * activeBreakPointItem = breakPtr;
+ */
+
+}
+
+
+/**
+ * breakPointAdd:
+ * @url: Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @lineNumber: @lineNumber >= 0 and is available in url specified and
+ * points to an xml element
+ * @templateName: The template name of breakPoint or NULL
+ * @modeName : The mode of breakpoint or NULL
+ * @type: Valid BreakPointTypeEnum
+ *
+ * Add break point at file and line number specified
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+*/
+int
+breakPointAdd(const xmlChar * url, long lineNumber,
+ const xmlChar * templateName,
+ const xmlChar * modeName,
+ BreakPointTypeEnum type)
+{
+ int result = 0, breakPointType = type;
+ xmlHashTablePtr breakPointHash = NULL; /* hash of breakPoints */
+ breakPointPtr breakPtr;
+
+ if (!breakList) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Breakpoints structures not initialized\n");
+#endif
+ return result;
+ }
+
+ if (!url || (lineNumber == -1)) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Invalid url or line number to breakPointAdd\n");
+#endif
+ return result;
+ }
+
+ /* if breakpoint already exists then don;t add it */
+ if (breakPointIsPresent(url, lineNumber)) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Warning: Breakpoint at file %s: line %d exists\n",
+ url, lineNumber);
+#endif
+ return result;
+ }
+
+ breakPtr = breakPointItemNew();
+ if (breakPtr) {
+ breakPtr->url = (xmlChar *) xmlMemStrdup((char *) url);
+ breakPtr->lineNo = lineNumber;
+ if (templateName)
+ breakPtr->templateName =
+ xmlStrdup( templateName);
+ else
+ breakPtr->templateName = NULL;
+ if (modeName)
+ breakPtr->modeName =
+ xmlStrdup(modeName);
+ else
+ breakPtr->modeName = NULL;
+ breakPtr->type = BreakPointTypeEnum(breakPointType);
+
+ /* add new breakPoint to the right hash table */
+ breakPointHash = breakPointGetLineNoHash(lineNumber);
+ if (breakPointHash) {
+ result = lineNoItemAdd(breakPointHash, breakPtr);
+ } else {
+ /* Grow breakList size */
+ int lineIndex;
+ int newEntries = breakList->count;
+ xmlHashTablePtr hash;
+
+ result = 1;
+ if ((lineNumber < breakList->count) && breakList->count) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to find breakpoint line hash at %d\n",
+ lineNumber);
+#endif
+ } else {
+ if (breakList->count + newEntries < lineNumber)
+ newEntries = lineNumber - breakList->count + 1;
+
+
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ /*
+ * xsltGenericError(xsltGenericErrorContext,
+ * "Size of line list was %d adding %d entries\n",
+ * breakList->count, newEntries);
+ */
+#endif
+ lineIndex = 0;
+ while ((lineIndex < newEntries) && result) {
+ hash = lineNoItemNew();
+ if (hash) {
+ result = result && arrayListAdd(breakList, hash);
+ } else {
+ result = 0;
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to create hash table breakPoint list: memory error\n");
+#endif
+ return result;
+ }
+ lineIndex++;
+ }
+ /* find the newly added hashtable of breakpoints */
+ breakPointHash = breakPointGetLineNoHash(lineNumber);
+ if (breakPointHash) {
+ result = lineNoItemAdd(breakPointHash, breakPtr);
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to create new breakPoint:interal error\n");
+#endif
+ return result;
+ }
+ }
+
+ }
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to create new breakPoint: memory error\n");
+#endif
+ }
+
+ if (result && (optionsGetIntOption(OPTIONS_GDB) > 1) &&
+ (xsldbgValidateBreakpoints != BREAKPOINTS_BEING_VALIDATED)){
+ breakPointPrint(breakPtr);
+ xsldbgGenericErrorFunc("\n");
+ }
+ return result;
+}
+
+
+/**
+ * breakPointDelete:
+ * @breakPtr: Is valid
+ *
+ * Delete the break point specified if it can be found using
+ * @breakPoint's url and lineNo
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+*/
+int
+breakPointDelete(breakPointPtr breakPtr)
+{
+ int result = 0;
+ xmlHashTablePtr breakPointHash; /* hash of breakPoints */
+
+ if (!breakPtr)
+ return result;
+
+ breakPointHash = breakPointGetLineNoHash(breakPtr->lineNo);
+ if (breakPointHash) {
+ result = lineNoItemDelete(breakPointHash, breakPtr);
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Breakpoint not found: xslDeleteBreakPoint\n");
+#endif
+ }
+ return result;
+}
+
+
+/**
+ * breakPointEnable:
+ * @breakPtr: A valid breakpoint
+ * @enable: Enable break point if 1, disable if 0, toggle if -1
+ *
+ * Enable or disable a break point
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+*/
+int
+breakPointEnable(breakPointPtr breakPtr, int enable)
+{
+ int result = 0;
+
+ if (breakPtr) {
+ int enableFlag = 1;
+ if (enable != XSL_TOGGLE_BREAKPOINT){
+ enableFlag = enable;
+ }else {
+ if (breakPtr->flags & BREAKPOINT_ENABLED)
+ enableFlag = 0;
+ }
+ if (enableFlag)
+ breakPtr->flags |= BREAKPOINT_ENABLED;
+ else
+ breakPtr->flags = breakPtr->flags & (BREAKPOINT_ALLFLAGS ^ BREAKPOINT_ENABLED);
+ result = 1;
+ }
+ return result;
+}
+
+
+/**
+ * breakPointLinesCount:
+ *
+ * Return the number of hash tables of break points with the same line number
+ *
+ * Returns The number of hash tables of break points with the same line number
+ */
+int
+breakPointLinesCount(void)
+{
+ if (!breakList) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Breakpoints structures not initialized\n");
+#endif
+ return 0;
+ } else
+ return arrayListCount(breakList);
+}
+
+
+/**
+ * breakPointLinesList:
+ *
+ * Returns The list of hash tables for break points
+ * Dangerous function to use!!
+ */
+arrayListPtr
+breakPointLineList(void)
+{
+ return breakList;
+}
+
+
+/**
+ * breakPointGet:
+ * @url: Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @lineNumber: lineNumber >= 0 and is available in @url
+ *
+ * Get a break point for the breakpoint collection
+ *
+ * Returns break point if break point exists at location specified,
+ * NULL otherwise
+*/
+breakPointPtr
+breakPointGet(const xmlChar * url, long lineNumber)
+{
+ xmlHashTablePtr breakHash = breakPointGetLineNoHash(lineNumber);
+ breakPointPtr breakPtr = NULL;
+
+ if (!breakHash || !url)
+ return breakPtr;
+
+ breakPtr = (breakPointPtr)xmlHashLookup(breakHash, url);
+ return breakPtr;
+}
+
+
+/**
+ * breakPointPrint:
+ * @breakPtr: A valid break point
+ *
+ * Print the details of @breakPtr
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+ */
+int
+breakPointPrint(breakPointPtr breakPtr)
+{
+ int result = 0;
+ const char *breakStatusText[2] = {
+ I18N_NOOP("disabled"),
+ I18N_NOOP("enabled")
+ };
+ const char *breakTemplate="";
+ const char *breakMode = "";
+ const char *breakStatus;
+
+
+ if (!breakPtr)
+ return result;
+
+ if (breakPtr->templateName){
+ if (breakPtr->modeName)
+ breakMode = (const char*)breakPtr->modeName;
+ breakTemplate = (const char*)breakPtr->templateName;
+ }
+
+
+ breakStatus = breakStatusText[breakPtr->flags & BREAKPOINT_ENABLED];
+ if (breakPtr->url)
+ xsldbgGenericErrorFunc(i18n("Breakpoint %1 %2 for template: \"%3\" mode: \"%4\" in file \"%5\" at line %6").arg(breakPtr->id).arg(i18n(breakStatus)).arg(xsldbgText(breakTemplate)).arg(xsldbgText(breakMode)).arg(xsldbgUrl(breakPtr->url)).arg(breakPtr->lineNo));
+ else
+ xsldbgGenericErrorFunc(i18n("Breakpoint %1 %2 for template: \"%3\" mode: \"%4\"").arg(breakPtr->id).arg(i18n(breakStatus)).arg(xsldbgText(breakTemplate)).arg(xsldbgText(breakMode)));
+ return ++result;
+}
+
+
+/**
+ * breakPointIsPresent:
+ * @url: Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @lineNumber: @lineNumber >= 0 and is available in @url
+ *
+ * Determine if there is a break point at file and line number specified
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+*/
+int
+breakPointIsPresent(const xmlChar * url, long lineNumber)
+{
+ int result = 0;
+
+ if (!url || (lineNumber == -1))
+ return result;
+
+ result = (breakPointGet(url, lineNumber) != NULL);
+
+ return result;
+}
+
+
+/**
+ * breakPointIsPresentNode:
+ * @node: node != NULL
+ *
+ * Determine if a node is a break point
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+breakPointIsPresentNode(xmlNodePtr node)
+{
+ int result = 0;
+
+ if (!node || !node->doc)
+ return result;
+
+ if (xmlGetLineNo(node) == -1)
+ return result;
+
+ if (node->doc->URL) {
+ result = breakPointIsPresent(node->doc->URL, xmlGetLineNo(node));
+ }
+
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint.h b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint.h
new file mode 100644
index 00000000..83f2e712
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint.h
@@ -0,0 +1,633 @@
+
+/**************************************************************************
+ breakpoint.h - public functions for the
+ breakpoint API
+ -------------------
+ begin : Fri Dec 7 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ **************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLBREAKPOINT_H
+#define XSLBREAKPOINT_H
+
+#ifdef USE_KDE_DOCS
+
+/**
+ * Provide a basic break point support
+ *
+ * @short break point support
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+#endif
+
+#ifndef BUILD_DOCS
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/xsltutils.h>
+
+#include "arraylist.h"
+#endif /* BUILD_DOCS */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* indicate that we are to toggle a breakpoint , used for enableBreakPoint */
+#define XSL_TOGGLE_BREAKPOINT -1
+
+ /* Define the types of status whilst debugging */
+#ifndef USE_KDOC
+ typedef enum {
+ DEBUG_NONE = 0, /* must start at zero!! */
+ DEBUG_INIT,
+ DEBUG_STEP,
+ DEBUG_STEPUP,
+ DEBUG_STEPDOWN,
+ DEBUG_NEXT,
+ DEBUG_STOP,
+ DEBUG_CONT,
+ DEBUG_RUN,
+ DEBUG_RUN_RESTART,
+ DEBUG_QUIT,
+ DEBUG_TRACE,
+ DEBUG_WALK
+ } DebugStatusEnum;
+
+
+ typedef enum {
+ DEBUG_BREAK_SOURCE = 300,
+ DEBUG_BREAK_DATA
+ } BreakPointTypeEnum;
+
+
+/*Indicate what type of variable to print out.
+ Is used by print_variable and searching functions */
+ typedef enum {
+ DEBUG_GLOBAL_VAR = 200, /* pick a unique starting point */
+ DEBUG_LOCAL_VAR,
+ DEBUG_ANY_VAR
+ } VariableTypeEnum;
+
+/*What type of flags can breakpoints have */
+ typedef enum {
+ BREAKPOINT_ENABLED = 1,
+ BREAKPOINT_ORPHANED = 2,
+ BREAKPOINT_ALLFLAGS = 255
+ } BreakPointFlags;
+
+/*What state of breakpoint validation can we be in */
+ typedef enum {
+ BREAKPOINTS_ARE_VALID,
+ BREAKPOINTS_NEED_VALIDATION,
+ BREAKPOINTS_BEING_VALIDATED
+ } BreakPointValidationStates;
+#else
+ /* keep kdoc happy */
+ enum DebugStatusEnum {
+ DEBUG_NONE = 0, /* must start at zero!! */
+ DEBUG_INIT,
+ DEBUG_STEP,
+ DEBUG_STEPUP,
+ DEBUG_STEPDOWN,
+ DEBUG_NEXT,
+ DEBUG_STOP,
+ DEBUG_CONT,
+ DEBUG_RUN,
+ DEBUG_RUN_RESTART,
+ DEBUG_QUIT,
+ DEBUG_TRACE,
+ DEBUG_WALK
+ };
+
+
+ enum BreakPointTypeEnum {
+ DEBUG_BREAK_SOURCE = 300,
+ DEBUG_BREAK_DATA
+ };
+
+
+/*Indicate what type of variable to print out.
+ Is used by print_variable and searching functions */
+ enum VariableTypeEnum {
+ DEBUG_GLOBAL_VAR = 200, /* pick a unique starting point */
+ DEBUG_LOCAL_VAR,
+ DEBUG_ANY_VAR
+ } VariableTypeEnum;
+
+/*What type of flags can breakpoints have */
+ enum BreakPointFlags {
+ BREAKPOINT_ENABLED = 1,
+ BREAKPOINT_ORPHANED = 2,
+ BREAKPOINT_ALLFLAGS = 255
+ } BreakPointFlags;
+
+/*What state of breakpoint validation can we be in */
+ enum BreakPointValidationStates {
+ BREAKPOINTS_ARE_VALID,
+ BREAKPOINTS_NEED_VALIDATION,
+ BREAKPOINTS_BEING_VALIDATED
+ } BreakPointValidationStates;
+#endif
+
+ /* The main structure for holding breakpoints */
+ typedef struct _breakPoint breakPoint;
+ typedef breakPoint *breakPointPtr;
+ struct _breakPoint {
+ xmlChar *url;
+ long lineNo;
+ xmlChar *templateName, *modeName;
+ int flags;
+ BreakPointTypeEnum type;
+ int id;
+ };
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointInit:
+ *
+ * Intialized the breakpoint module
+ *
+ * Returns 1 if breakpoint module haas been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Intialized the breakpoint module
+ *
+ * @returns 1 if breakpoint module has been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+*/
+#endif
+#endif
+ int breakPointInit(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointFree:
+ *
+ * Free all memory used by breakpoint module
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Free all memory used by breakpoint module
+ */
+#endif
+#endif
+ void breakPointFree(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointActiveBreakPoint:
+ *
+ * Get the active break point
+ *
+ * Returns the last break point that we stoped at
+ *
+ * Depreciated
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Get the active break point
+ *
+ * @returns The last break point that we stoped at
+ *
+ * Depreciated
+ */
+#endif
+#endif
+ breakPointPtr breakPointActiveBreakPoint(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointSetActiveBreakPoint:
+ * @breakPtr: Is valid break point or NULL
+ *
+ * Set the active break point
+ *
+ * Depreciated
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Set the active break point
+ *
+ * @param breakPoint Is valid break point or NULL
+ *
+ * Depreciated
+ */
+#endif
+#endif
+ void breakPointSetActiveBreakPoint(breakPointPtr breakPtr);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointAdd:
+ * @url: Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @lineNumber: @lineNumber >= 0 and is available in url specified and
+ * points to an xml element
+ * @templateName: The template name of breakPoint or NULL
+ * @modeName : The mode of breakpoint or NULL
+ * @type: Valid BreakPointTypeEnum
+ *
+ * Add break point at file and line number specified
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Add break point at file and line number specified
+ *
+ * @returns 1 if successful,
+ * 0 otherwise
+ *
+ * @param url Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @param lineNumber @p lineNumber >= 0 and is available in url specified and
+ * points to an xml element
+ * @param temlateName The template name of break point or NULL
+ * @param modeName : The mode of breakpoint or NULL
+ * @param type Valid BreakPointTypeEnum
+*/
+#endif
+#endif
+ int breakPointAdd(const xmlChar * url, long lineNumber,
+ const xmlChar * templateName,
+ const xmlChar * modeName,
+ BreakPointTypeEnum type);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointDelete:
+ * @breakPtr: Is valid
+ *
+ * Delete the break point specified if it can be found using
+ * @breakPoint's url and lineNo
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Delete the break point specified if it can be found using
+ * @p breakPtr's url and lineNo
+ *
+ * @returns 1 if successful,
+ * 0 otherwise
+ *
+ * @param breakPoint Is valid
+ *
+*/
+#endif
+#endif
+ int breakPointDelete(breakPointPtr breakPtr);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointEmpty:
+ *
+ * Empty the break point collection
+ *
+ * Returns 1 if able to empty the breakpoint list of its contents,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Empty the break point collection
+ *
+ * @returns 1 if able to empty the break point list of its contents,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int breakPointEmpty(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointEnable:
+ * @breakPtr: A valid breakpoint
+ * @enable: Enable break point if 1, disable if 0, toggle if -1
+ *
+ * Enable or disable a break point
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Enable or disable a break point
+ *
+ * @returns 1 if successful,
+ * 0 otherwise
+ *
+ * @param breakPoint A valid breakpoint
+ * @param enable Enable break point if 1, disable if 0, toggle if -1
+*/
+#endif
+#endif
+ int breakPointEnable(breakPointPtr breakPtr, int enable);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointGet:
+ * @url: Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @lineNumber: lineNumber >= 0 and is available in @url
+ *
+ * Get a break point for the breakpoint collection
+ *
+ * Returns break point if break point exists at location specified,
+ * NULL otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Get a break point for the breakpoint collection
+ *
+ * @returns break point if break point exists at location specified,
+ * NULL otherwise
+ *
+ * @param url Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @param lineNumber @p lineNumber >= 0 and is available in url specified
+*/
+#endif
+#endif
+ breakPointPtr breakPointGet(const xmlChar * url, long lineNumber);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointGetLineNoHash:
+ * @lineNo: Line number of of breakpoints of interest
+ *
+ * Return A hash of breakpoints with same line number
+ *
+ * Returns A hash of breakpoints with a line number of @lineNo
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Return A hash of breakpoints with same line number
+ *
+ * @param lineNo : Line number of of breakpoints of interest
+ *
+ * @returns A hash of breakpoints with a line number of @p lineNo
+ */
+#endif
+#endif
+ xmlHashTablePtr breakPointGetLineNoHash(long lineNo);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointItemNew:
+ *
+ * Create a new break point item
+ * Returns A valid break point with default values set if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Create a new break point item
+ *
+ * @returns A valid break point with default values set if successful,
+ * NULL otherwise
+ */
+#endif
+#endif
+ breakPointPtr breakPointItemNew(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointItemFree:
+ * @payload: valid breakPointPtr
+ * @name: not used
+ *
+ * Free memory associated with this break point
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Free memory associated with this break point
+ *
+ * @param payload Valid breakPointPtr
+ * @param name not used
+ *
+ */
+#endif
+#endif
+ void breakPointItemFree(void *payload, xmlChar * name);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointLinesCount:
+ *
+ * Return the number of hash tables of break points with the same line number
+ *
+ * Returns the number of hash tables of break points with the same line number
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Return the number of hash tables of break points with the same line number
+ *
+ * @returns the number of hash tables of break points with the same line number
+ */
+#endif
+#endif
+ int breakPointLinesCount(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointPrint:
+ * @breakPtr: A valid break point
+ *
+ * Print the details of @breakPtr to @file
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print the details of @p breakPtr to @p file
+ *
+ * @returns 1 if successful,
+ * 0 otherwise
+ *
+ * @param breakPoint A valid break point
+ */
+#endif
+#endif
+ int breakPointPrint(breakPointPtr breakPtr);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointIsPresent:
+ * @url: Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @lineNumber: @lineNumber >= 0 and is available in @url
+ *
+ * Determine if there is a break point at file and line number specified
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Determine if there is a break point at file and line number specified
+ *
+ * @returns 1 if successful,
+ * 0 otherwise
+ *
+ * @param url Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @lineNumber @p lineNumber >= 0 and is available in url specified
+*/
+#endif
+#endif
+ int breakPointIsPresent(const xmlChar * url, long lineNumber);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointIsPresentNode:
+ * @node: node != NULL
+ *
+ * Determine if a node is a break point
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Determine if a node is a break point
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param node Is valid
+ */
+#endif
+#endif
+ int breakPointIsPresentNode(xmlNodePtr node);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * breakPointLinesList:
+ *
+ * Return The list of hash tables for break points
+ * Dangerous function to use!!
+ *
+ * Returns The list of hash tables for break points
+ * Dangerous function to use!!
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Return The list of hash tables for break points
+ * Dangerous function to use!!
+ *
+ * Returns The list of hash tables for break points
+ * Dangerous function to use!!
+ */
+#endif
+#endif
+ arrayListPtr breakPointLineList(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp
new file mode 100644
index 00000000..7935ea8c
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp
@@ -0,0 +1,1036 @@
+
+/***************************************************************************
+ breakpoint_cmds.c - breakpoint commands for xsldbg
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "debugXSL.h"
+#include "files.h"
+#include "utils.h"
+#include <libxml/valid.h> /* needed for xmlSplitQName2 */
+#include <libxml/xpathInternals.h> /* needed for xmlNSLookup */
+#include <libxml/uri.h> /* needed for xmlURIEscapeStr */
+#include "xsldbgthread.h" /* for getThreadStatus() */
+#include "xsldbgmsg.h"
+#include "options.h"
+
+/* temp buffer needed occationaly */
+static xmlChar buff[DEBUG_BUFFER_SIZE];
+
+/* needed by breakpoint validation */
+extern int breakPointCounter;
+
+/* we need to have a fake URL and line number for orphaned template breakpoints */
+int orphanedTemplateLineNo = 1;
+const xmlChar *orphanedTemplateURL= (xmlChar*)"http://xsldbg.sourceforge.net/default.xsl";
+/* ---------------------------------------------------
+ Private function declarations for breakpoint_cmds.c
+ ----------------------------------------------------*/
+
+/**
+ * validateSource:
+ * @url : is valid name of a xsl source file
+ * @lineNo : lineNo >= 0
+ *
+ * Returns 1 if a breakpoint could be set at specified file url and line number
+ * 0 otherwise
+ */
+int validateSource(xmlChar ** url, long *lineNo);
+
+/**
+ * validateData:
+ * @url : is valid name of a xml data file
+ * @lineNo : lineNo >= 0
+ *
+ * Returns 1 if a breakpoint could be set at specified file url and line number
+ * 0 otherwise
+ */
+int validateData(xmlChar ** url, long *lineNo);
+
+
+/* -------------------------------------
+ End private functions
+---------------------------------------*/
+
+
+
+/* -----------------------------------------
+
+ BreakPoint related commands
+
+ ------------------------------------------- */
+
+
+/**
+ * xslDbgShellFrameBreak:
+ * @arg: Is valid number of frames to change location by
+ * @stepup: If != 1 then we step up, otherwise step down
+ *
+ * Set a "frame" break point either up or down from here
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellFrameBreak(xmlChar * arg, int stepup)
+{
+ int result = 0;
+
+ /* how many frames to go up/down */
+ int noOfFrames;
+ static const char *errorPrompt = I18N_NOOP("Failed to add breakpoint.");
+
+ if (!filesGetStylesheet() || !filesGetMainDoc()) {
+ xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n"));
+ xsldbgGenericErrorFunc(QString("Error: %1.\n").arg(i18n(errorPrompt)));
+ return result;
+ }
+
+ if (!arg) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+ }
+
+ if (xmlStrLen(arg) > 0) {
+ if (!sscanf((char *) arg, "%d", &noOfFrames)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a number of frames.\n").arg((char*)arg));
+ noOfFrames = -1;
+ }
+ } else {
+ noOfFrames = 0;
+ }
+
+ if (noOfFrames >0){
+ if (stepup) {
+ result = callStackStepup(callStackGetDepth() - noOfFrames);
+ } else {
+ result = callStackStepdown(callStackGetDepth() + noOfFrames);
+ }
+ }
+
+ if (!result)
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+}
+
+
+/**
+ * validateSource:
+ * @url : is valid name of a xsl source file
+ * @lineNo : lineNo >= 0
+ *
+ * Returns 1 if a breakpoint could be set at specified file url and line number
+ * 0 otherwise
+ */
+int
+validateSource(xmlChar ** url, long *lineNo)
+{
+
+ int result = 0, type;
+ searchInfoPtr searchInf;
+ nodeSearchDataPtr searchData = NULL;
+
+ if (!filesGetStylesheet()) {
+ xsldbgGenericErrorFunc(i18n("Error: Stylesheet is not valid or file is not loaded.\n"));
+ return result;
+ }
+
+ if (!url) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ searchInf = searchNewInfo(SEARCH_NODE);
+
+ if (searchInf && searchInf->data) {
+ type = DEBUG_BREAK_SOURCE;
+ searchData = (nodeSearchDataPtr) searchInf->data;
+ if (lineNo != NULL)
+ searchData->lineNo = *lineNo;
+ searchData->nameInput = (xmlChar *) xmlMemStrdup((char *) *url);
+ guessStylesheetName(searchInf);
+ /* try to verify that the line number is valid */
+ if (searchInf->found) {
+ /* ok it looks like we've got a valid url */
+ /* searchData->url will be freed by searchFreeInfo */
+ if (searchData->absoluteNameMatch)
+ searchData->url = (xmlChar *)
+ xmlMemStrdup((char *) searchData->absoluteNameMatch);
+ else
+ searchData->url = (xmlChar *)
+ xmlMemStrdup((char *) searchData->guessedNameMatch);
+
+ if (lineNo != NULL) {
+ /* now to check the line number */
+ if (searchData->node) {
+ searchInf->found = 0;
+ /* searchData->node is set to the topmost node in stylesheet */
+ walkChildNodes((xmlHashScanner) scanForNode, searchInf,
+ searchData->node);
+ if (!searchInf->found) {
+ xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").arg(xsldbgUrl(*url)).arg(*lineNo));
+ }
+
+ *lineNo = searchData->lineNo;
+ xmlFree(*url);
+ *url = xmlStrdup(searchData->url);
+ result = 1;
+ }
+
+ } else {
+ /* we've been asked just to check the file name */
+ if (*url)
+ xmlFree(*url);
+ if (searchData->absoluteNameMatch)
+ *url = (xmlChar *)
+ xmlMemStrdup((char *) searchData->absoluteNameMatch);
+ else
+ *url = (xmlChar *)
+ xmlMemStrdup((char *) searchData->guessedNameMatch);
+ result = 1;
+ }
+ } else{
+ xsldbgGenericErrorFunc(i18n("Error: Unable to find a stylesheet file whose name contains %1.\n").arg(xsldbgUrl(*url)));
+ if (lineNo){
+ xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").arg(xsldbgUrl(*url)).arg(*lineNo));
+ }
+ }
+ }
+
+ if (searchInf)
+ searchFreeInfo(searchInf);
+ else
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+
+ return result;
+}
+
+
+
+
+/**
+ * validateData:
+ * @url : is valid name of a xml data file
+ * @lineNo : lineNo >= 0
+ *
+ * Returns 1 if a breakpoint could be set at specified file url and line number
+ * 0 otherwise
+ */
+int
+validateData(xmlChar ** url, long *lineNo)
+{
+ int result = 0;
+ searchInfoPtr searchInf;
+ nodeSearchDataPtr searchData = NULL;
+ char *lastSlash;
+
+ if (!filesGetMainDoc()) {
+ if (!optionsGetIntOption(OPTIONS_GDB)){
+ xsldbgGenericErrorFunc(i18n("Error: Data file is invalid. Try the run command first.\n"));
+ }
+ return result;
+ }
+
+ if (!url) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ searchInf = searchNewInfo(SEARCH_NODE);
+ if (searchInf && searchInf->data && filesGetMainDoc()) {
+ /* Try to verify that the line number is valid.
+ First try an absolute name match */
+ searchData = (nodeSearchDataPtr) searchInf->data;
+ if (lineNo != NULL)
+ searchData->lineNo = *lineNo;
+ else
+ searchData->lineNo = -1;
+ searchData->url = (xmlChar *) xmlMemStrdup((char *) *url);
+ walkChildNodes((xmlHashScanner) scanForNode, searchInf,
+ (xmlNodePtr) filesGetMainDoc());
+
+ /* Next try to guess file name by adding the prefix of main document
+ if no luck so far */
+ if (!searchInf->found) {
+ /* Find the last separator of the documents URL */
+ lastSlash = xmlStrrChr(filesGetMainDoc()->URL, URISEPARATORCHAR);
+ if (!lastSlash)
+ lastSlash = xmlStrrChr(filesGetMainDoc()->URL, PATHCHAR);
+
+ if (lastSlash) {
+ lastSlash++;
+ xmlStrnCpy(buff, filesGetMainDoc()->URL,
+ lastSlash - (char *) filesGetMainDoc()->URL);
+ buff[lastSlash - (char *) filesGetMainDoc()->URL] = '\0';
+ xmlStrCat(buff, *url);
+ } else
+ xmlStrCpy(buff, "");
+ if (xmlStrLen(buff) > 0) {
+ if (searchData->url)
+ xmlFree(searchData->url);
+ searchData->url = (xmlChar *) xmlMemStrdup((char *) buff);
+ walkChildNodes((xmlHashScanner) scanForNode, searchInf,
+ (xmlNodePtr) filesGetMainDoc());
+ }
+ }
+
+ if (!searchInf->found) {
+ if (lineNo){
+ xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").arg(xsldbgUrl(*url)).arg(*lineNo));
+ } else{
+ xsldbgGenericErrorFunc(i18n("Error: Unable to find a data file whose name contains %1.\n").arg(xsldbgUrl(*url)));
+ }
+ result = 1;
+ } else {
+ if (*url)
+ xmlFree(*url);
+ *url = xmlStrdup(searchData->url);
+ result = 1;
+ }
+ }
+
+ if (searchInf)
+ searchFreeInfo(searchInf);
+ else
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+
+ return result;
+}
+
+
+/**
+ * xslDbgShellBreak:
+ * @arg: Is valid and in UTF-8
+ * @style: Is valid
+ * @ctxt: Is valid
+ *
+ * Add break point specified by arg
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style,
+ xsltTransformContextPtr ctxt)
+{
+ int result = 0;
+ long lineNo = -1;
+ xmlChar *url = NULL;
+ int orphanedBreakPoint = 0;
+ breakPointPtr breakPtr;
+
+ static const char *errorPrompt = I18N_NOOP("Failed to add breakpoint.");
+
+ if (style == NULL) {
+ style = filesGetStylesheet();
+ }
+ if (!style || !filesGetMainDoc()) {
+ if (!optionsGetIntOption(OPTIONS_GDB)){
+ xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n"));
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+ }else{
+ orphanedBreakPoint = 1;
+ }
+ }
+
+ if (!arg) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ if (arg[0] == '-') {
+ xmlChar *opts[2];
+
+ if ((xmlStrLen(arg) > 1) && (arg[1] == 'l')) {
+ if (splitString(&arg[2], 2, opts) == 2) {
+ if ((xmlStrlen(opts[1]) == 0) ||
+ !sscanf((char *) opts[1], "%ld", &lineNo)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").arg((char*)opts[1]));
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+ } else {
+ /* try to guess whether we are looking for source or data
+ * break point
+ */
+ xmlChar *escapedURI;
+ trimString(opts[0]);
+ url = filesExpandName(opts[0]);
+ if (url){
+ escapedURI = xmlURIEscapeStr(url, (const xmlChar*)"/");
+ if (escapedURI){
+ xmlFree(url);
+ url = escapedURI;
+ }
+ }
+ if (url) {
+ if (!orphanedBreakPoint){
+ if (filesIsSourceFile(url)) {
+ if (validateSource(&url, &lineNo))
+ result =
+ breakPointAdd(url, lineNo, NULL, NULL,
+ DEBUG_BREAK_SOURCE);
+ } else {
+ if (validateData(&url, &lineNo))
+ result =
+ breakPointAdd(url, lineNo, NULL, NULL,
+ DEBUG_BREAK_DATA);
+ }
+ }else{
+ if (filesIsSourceFile(url)) {
+ result =
+ breakPointAdd(url, lineNo, NULL, NULL,
+ DEBUG_BREAK_SOURCE);
+ }else{
+ result =
+ breakPointAdd(url, lineNo, NULL, NULL,
+ DEBUG_BREAK_DATA);
+ }
+ breakPtr = breakPointGet(url, lineNo);
+ if (breakPtr){
+ breakPtr->flags |= BREAKPOINT_ORPHANED;
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Unable to find the added breakpoint."));
+ }
+ }
+ }
+ }
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments to command %1.\n").arg("break"));
+ }
+ } else {
+ /* add breakpoint at specified template names */
+ xmlChar *opts[2];
+ xmlChar *name = NULL, *nameURI = NULL, *mode = NULL, *modeURI = NULL;
+ xmlChar *templateName = NULL, *modeName = NULL;
+ xmlChar *tempUrl = NULL; /* we must use a non-const xmlChar *
+ and we are not making a copy
+ of orginal value so this must not be
+ freed */
+ xmlChar *defaultUrl = (xmlChar *) "<n/a>";
+ int newBreakPoints = 0, validatedBreakPoints = 0;
+ int allTemplates = 0;
+ int ignoreTemplateNames = 0;
+ int argCount;
+ int found;
+ xsltTemplatePtr templ;
+ if (orphanedBreakPoint || !ctxt){
+ /* Add an orphaned template breakpoint we will need to call this function later to
+ activate the breakpoint */
+ result =
+ breakPointAdd(orphanedTemplateURL, orphanedTemplateLineNo, arg, NULL,
+ DEBUG_BREAK_SOURCE);
+ breakPtr = breakPointGet(orphanedTemplateURL, orphanedTemplateLineNo++);
+ if (breakPtr){
+ breakPtr->flags |= BREAKPOINT_ORPHANED;
+ }else{
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to find added breakpoint");
+#endif
+ }
+ return result;
+ }
+
+ argCount = splitString(arg, 2, opts);
+ if ((argCount == 2) && (xmlStrLen(opts[1]) == 0))
+ argCount = 1;
+
+ switch (argCount){
+ case 0:
+ allTemplates = 1;
+ break;
+
+ case 1:
+ if (xmlStrEqual(opts[0], (xmlChar*)"*")){
+ allTemplates = 1;
+ }else{
+
+ if (xmlStrEqual(opts[0], (xmlChar*)"\\*")){
+ opts[0][0] = '*';
+ opts[0][1] = '\0';
+ }
+
+ name = xmlSplitQName2(opts[0], &nameURI);
+ if (name == NULL){
+ name = xmlStrdup(opts[0]);
+ }else{
+ if (nameURI){
+ /* get the real URI for this namespace */
+ const xmlChar *temp = xmlXPathNsLookup(ctxt->xpathCtxt, nameURI);
+ if (temp)
+ xmlFree(nameURI);
+ nameURI = xmlStrdup(temp);
+ }
+
+ }
+ }
+ break;
+
+ case 2:
+ if (xmlStrLen(opts[0]) == 0){
+ /* we don't care about the template name ie we are trying to match
+ templates with a given mode */
+ ignoreTemplateNames = 1;
+ }else{
+ name = xmlSplitQName2(opts[0], &nameURI);
+ if (name == NULL)
+ name = xmlStrdup(opts[0]);
+ if (nameURI){
+ /* get the real URI for this namespace */
+ const xmlChar *temp = xmlXPathNsLookup(ctxt->xpathCtxt,
+ nameURI);
+ if (temp)
+ xmlFree(nameURI);
+ nameURI = xmlStrdup(temp);
+ }
+ }
+ mode = xmlSplitQName2(opts[1], &modeURI);
+ if (mode == NULL)
+ mode = xmlStrdup(opts[1]);
+ if (modeURI){
+ /* get the real URI for this namespace */
+ const xmlChar *temp = xmlXPathNsLookup(ctxt->xpathCtxt, modeURI);
+ if (temp)
+ xmlFree(modeURI);
+ modeURI = xmlStrdup(temp);
+ }
+ break;
+
+ default:
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").arg("break"));
+ return 0;
+ }
+
+ while (style) {
+ templ = style->templates;
+ while (templ) {
+ found = 0;
+ if (templ->elem && templ->elem->doc
+ && templ->elem->doc->URL) {
+ tempUrl = (xmlChar *) templ->elem->doc->URL;
+ } else {
+ tempUrl = defaultUrl;
+ }
+
+ if (templ->match)
+ templateName = xmlStrdup(templ->match);
+ else
+ templateName = fullQName(templ->nameURI, templ->name);
+
+ if (allTemplates)
+ found = 1;
+ else {
+ if (ignoreTemplateNames){
+ if (!mode || (xmlStrEqual(templ->mode, mode) &&
+ (!modeURI || xmlStrEqual(templ->modeURI,
+ modeURI))))
+ found = 1;
+ } else if (templ->match){
+ if ((xmlStrEqual(templ->match, name) &&
+ (!modeURI || xmlStrEqual(templ->modeURI,
+ modeURI)) &&
+ (!mode || xmlStrEqual(templ->mode,
+ mode))))
+ found = 1;
+ }else{
+ if(xmlStrEqual(templ->name, name) &&
+ (!nameURI || xmlStrEqual(templ->nameURI, nameURI)))
+ found = 1;
+ }
+ }
+ if (found) {
+ int templateLineNo = xmlGetLineNo(templ->elem);
+ breakPointPtr searchPtr = breakPointGet(tempUrl, templateLineNo);
+
+ if (templ->mode)
+ modeName =
+ fullQName(templ->modeURI, templ->mode);
+
+
+ if (!searchPtr){
+ if (breakPointAdd(tempUrl, templateLineNo,
+ templateName, modeName,
+ DEBUG_BREAK_SOURCE)){
+ newBreakPoints++;
+ }
+ }else{
+
+ if ((templateLineNo != searchPtr->lineNo ) || !xmlStrEqual(tempUrl, searchPtr->url)){
+ int lastId = searchPtr->id;
+ int lastCounter = breakPointCounter;
+ /* we have a new location for breakpoint */
+ if (breakPointDelete(searchPtr)){
+ if (breakPointAdd(tempUrl, templateLineNo, templateName, modeName,DEBUG_BREAK_SOURCE)){
+ searchPtr = breakPointGet(tempUrl, templateLineNo);
+ if (searchPtr){
+ searchPtr->id = lastId;
+ result = 1;
+ breakPointCounter = lastCounter;
+ xsldbgGenericErrorFunc(i18n("Information: Breakpoint validation has caused breakpoint %1 to be re-created.\n").arg(searchPtr->id));
+ validatedBreakPoints++;
+ }
+ }
+ }
+ }else{
+ if (xsldbgValidateBreakpoints != BREAKPOINTS_BEING_VALIDATED){
+ xsldbgGenericErrorFunc(i18n("Warning: Breakpoint exits for file \"%1\" at line %2.\n").arg(xsldbgUrl(tempUrl)).arg(templateLineNo));
+ }
+ validatedBreakPoints++;
+ }
+ }
+ }
+ if (templateName){
+ xmlFree(templateName);
+ templateName = NULL;
+ }
+ if (modeName){
+ xmlFree(modeName);
+ modeName = NULL;
+ }
+ templ = templ->next;
+ }
+ if (style->next)
+ style = style->next;
+ else
+ style = style->imports;
+ }
+
+ if ((newBreakPoints == 0) && (validatedBreakPoints == 0)) {
+ xsldbgGenericErrorFunc(i18n("Error: No templates found or unable to add breakpoint.\n"));
+ url = NULL; /* flag that we've printed partial error message about the problem url */
+ } else {
+ result = 1;
+ if (newBreakPoints){
+ xsldbgGenericErrorFunc(i18n("Information: Added %n new breakpoint.", "Information: Added %n new breakpoints.", newBreakPoints) + QString("\n"));
+ }
+ }
+
+ if (name)
+ xmlFree(name);
+ if (nameURI)
+ xmlFree(nameURI);
+ if (mode)
+ xmlFree(mode);
+ if (modeURI)
+ xmlFree(modeURI);
+ if (defaultUrl && !xmlStrEqual((xmlChar*)"<n/a>", defaultUrl))
+ xmlFree(defaultUrl);
+ if (tempUrl)
+ url = xmlStrdup(tempUrl);
+ } /* end add template breakpoints */
+
+ if (!result) {
+ if (url)
+ xsldbgGenericErrorFunc(i18n("Error: Failed to add breakpoint for file \"%1\" at line %2.\n").arg(xsldbgUrl(url)).arg(lineNo));
+ else
+ xsldbgGenericErrorFunc(i18n("Error: Failed to add breakpoint.\n"));
+ }
+
+ if (url)
+ xmlFree(url);
+ return result;
+}
+
+
+/**
+ * xslDbgShellDelete:
+ * @arg: Is valid and in UTF-8
+ *
+ * Delete break point specified by arg
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellDelete(xmlChar * arg)
+{
+ int result = 0, breakPointId;
+ long lineNo;
+ breakPointPtr breakPtr = NULL;
+ static const char *errorPrompt = I18N_NOOP("Failed to delete breakpoint.");
+
+ if (!arg) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+ }
+
+ if (arg[0] == '-') {
+ xmlChar *opts[2], *url = NULL;
+
+ if ((xmlStrLen(arg) > 1) && (arg[1] == 'l')) {
+ if (splitString(&arg[2], 2, opts) == 2) {
+ if ((xmlStrlen(opts[1]) == 0) ||
+ !sscanf((char *) opts[1], "%ld", &lineNo)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").arg((char*)opts[1]));
+ } else {
+ xmlChar *escapedURI;
+ trimString(opts[0]);
+ url = filesExpandName(opts[0]);
+ if (url){
+ escapedURI = xmlURIEscapeStr(url, (const xmlChar*)"/");
+ if (escapedURI){
+ xmlFree(url);
+ url = escapedURI;
+ }
+ }
+ if (url) {
+ if (filesIsSourceFile(url)) {
+ if (validateSource(&url, &lineNo))
+ breakPtr = breakPointGet(url, lineNo);
+ } else if (validateData(&url, &lineNo))
+ breakPtr = breakPointGet(url, lineNo);
+ if (!breakPtr || !breakPointDelete(breakPtr)){
+ xsldbgGenericErrorFunc(i18n("Error: Breakpoint does not exist for file \"%1\" at line %2.\n").arg(xsldbgUrl(url)).arg(lineNo));
+ }else{
+ result = 1;
+ }
+ xmlFree(url);
+ }
+ }
+ } else{
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").arg("delete"));
+ }
+ }
+ } else if (xmlStrEqual((xmlChar*)"*", arg)) {
+ result = 1;
+ /*remove all from breakpoints */
+ breakPointEmpty();
+
+ } else if (sscanf((char *) arg, "%d", &breakPointId)) {
+ breakPtr = findBreakPointById(breakPointId);
+ if (breakPtr) {
+ result = breakPointDelete(breakPtr);
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to delete breakpoint %1.\n").arg(breakPointId));
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Breakpoint %1 does not exist.\n").arg(breakPointId));
+ }
+ } else {
+ breakPtr = findBreakPointByName(arg);
+ if (breakPtr) {
+ result = breakPointDelete(breakPtr);
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to delete breakpoint at template %1.\n").arg(xsldbgText(arg)));
+ }
+ } else{
+ xsldbgGenericErrorFunc(i18n("Error: Breakpoint at template \"%1\" does not exist.\n").arg(xsldbgText(arg)));
+ }
+ }
+ if (!result)
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+}
+
+
+/**
+ * xslDbgShellEnableBreakPoint:
+ * @payload: A valid breakPointPtr
+ * @data: Enable type, a pointer to an integer
+ * for a value of
+ * 1 enable break point
+ * 0 disable break point
+ * -1 toggle enabling of break point
+ * @name: Not used
+ *
+ * Enable/disable break points via use of scan of break points
+*/
+void
+xslDbgShellEnableBreakPoint(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(name);
+ if (payload && data) {
+ breakPointEnable((breakPointPtr) payload, *(int *) data);
+ }
+}
+
+
+/**
+ * xslDbgShellEnable:
+ * @arg : is valid and in UTF-8
+ * @enableType : enable break point if 1, disable if 0, toggle if -1
+ *
+ * Enable/disable break point specified by arg using enable
+ * type of @enableType
+ * Returns 1 if successful,
+ * 0 otherwise
+ */
+
+int
+xslDbgShellEnable(xmlChar * arg, int enableType)
+{
+ int result = 0, breakPointId;
+ long lineNo;
+ breakPointPtr breakPtr = NULL;
+ static const char *errorPrompt = I18N_NOOP("Failed to enable/disable breakpoint.");
+
+ if (!filesGetStylesheet() || !filesGetMainDoc()) {
+ xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n"));
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+ }
+
+ if (!arg) {
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+ }
+
+ if (arg[0] == '-') {
+ xmlChar *opts[2], *url = NULL;
+
+ if ((xmlStrLen(arg) > 1) && (arg[1] == 'l')) {
+ if (splitString(&arg[2], 2, opts) == 2) {
+ if ((xmlStrlen(opts[1]) == 0) ||
+ !sscanf((char *) opts[1], "%ld", &lineNo)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").arg((char*)opts[1]));
+ } else {
+ xmlChar *escapedURI;
+ trimString(opts[0]);
+ url = filesExpandName(opts[0]);
+ if (url){
+ escapedURI = xmlURIEscapeStr(url, (const xmlChar*)"/");
+ if (escapedURI){
+ xmlFree(url);
+ url = escapedURI;
+ }
+ }
+ if (url) {
+ if (strstr((char *) url, ".xsl")) {
+ if (validateSource(&url, NULL))
+ breakPtr = breakPointGet(url, lineNo);
+ } else if (validateData(&url, NULL))
+ breakPtr = breakPointGet(url, lineNo);
+ if (breakPtr){
+ result = breakPointEnable(breakPtr, enableType);
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Breakpoint does not exist for file \"%1\" at line %2.\n").arg(xsldbgUrl(url)).arg(lineNo));
+ }
+ xmlFree(url);
+ }
+ }
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").arg("enable"));
+ }
+ } else if (xmlStrEqual((xmlChar*)"*", arg)) {
+ result = 1;
+ /*enable/disable all from breakpoints */
+ walkBreakPoints((xmlHashScanner) xslDbgShellEnableBreakPoint,
+ &enableType);
+
+ } else if (sscanf((char *) arg, "%d", &breakPointId)) {
+ breakPtr = findBreakPointById(breakPointId);
+ if (breakPtr) {
+ result = breakPointEnable(breakPtr, enableType);
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to enable/disable breakpoint %1.\n").arg(breakPointId));
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Breakpoint %1 does not exist.\n").arg(breakPointId));
+ }
+ } else {
+ breakPtr = findBreakPointByName(arg);
+ if (breakPtr) {
+ result = breakPointEnable(breakPtr, enableType);
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Breakpoint at template \"%1\" does not exist.\n").arg(xsldbgText(arg)));
+ }
+
+ if (!result)
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ return result;
+}
+
+
+/**
+ * xslDbgShellPrintBreakPoint:
+ * @payload: A valid breakPointPtr
+ * @data: Not used
+ * @name: Not used
+ *
+ * Print data given by scan of break points
+*/
+void
+xslDbgShellPrintBreakPoint(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+
+ if (payload) {
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListQueue(payload);
+ } else {
+ printCount++;
+ xsldbgGenericErrorFunc(" ");
+ breakPointPrint((breakPointPtr) payload);
+ xsldbgGenericErrorFunc("\n");
+ }
+ }
+}
+
+
+/* Validiate a breakpoint at a given URL and line number
+ breakPtr and copy must be valid
+*/
+static int validateBreakPoint(breakPointPtr breakPtr, breakPointPtr copy)
+{
+
+ int result = 0;
+ if (!breakPtr || !copy){
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Warning: NULL arguments passed to validateBreakPoint\n");
+#endif
+ return result;
+ }
+
+ if (filesIsSourceFile(breakPtr->url)) {
+ result = validateSource(&copy->url, &copy->lineNo);
+ } else {
+ result = validateData(&copy->url, &copy->lineNo);
+ }
+ if (result)
+ breakPtr->flags &= BREAKPOINT_ALLFLAGS ^ BREAKPOINT_ORPHANED;
+ else
+ breakPtr->flags |= BREAKPOINT_ORPHANED;
+
+ if ( breakPtr->flags & BREAKPOINT_ORPHANED){
+ xsldbgGenericErrorFunc(QString("Warning: Breakpoint %1 is orphaned. Result: %2. Old flags: %3. New flags: %4.\n").arg(breakPtr->id).arg(result).arg(copy->flags).arg(breakPtr->flags));
+ }
+
+ if (!(breakPtr->flags & BREAKPOINT_ORPHANED) && ((copy->lineNo != breakPtr->lineNo ) ||
+ (xmlStrlen(copy->url) != xmlStrlen(breakPtr->url)) || xmlStrCmp(copy->url, breakPtr->url))){
+ /* we have a new location for breakpoint */
+ int lastCounter = breakPointCounter;
+ copy->templateName = xmlStrdup(breakPtr->templateName);
+ copy->modeName = xmlStrdup(breakPtr->modeName);
+ if (breakPointDelete(breakPtr) && !breakPointGet(copy->url, copy->lineNo)){
+ if (breakPointAdd(copy->url, copy->lineNo, NULL, NULL, copy->type)){
+ breakPtr = breakPointGet(copy->url, copy->lineNo);
+ if (breakPtr){
+ breakPtr->id = copy->id;
+ breakPtr->flags = copy->flags;
+ breakPointCounter = lastCounter; /* compensate for breakPointAdd which always
+ increments the breakPoint counter */
+ result = 1;
+ xsldbgGenericErrorFunc(i18n("Information: Breakpoint validation has caused breakpoint %1 to be re-created.\n").arg(breakPtr->id));
+ }
+ }
+ if (!result){
+ xsldbgGenericErrorFunc(i18n("Warning: Validation of breakpoint %1 failed.\n").arg(copy->id));
+ }
+ }
+ }
+
+ return result;
+}
+
+/* Validiate a breakpoint at a given URL and line number
+ breakPtr, copy and ctx must be valid
+ */
+static int validateTemplateBreakPoint(breakPointPtr breakPtr, breakPointPtr copy, xsltTransformContextPtr ctxt)
+{
+ int result = 0;
+ if (!breakPtr || !copy || !ctxt){
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Warning: NULL arguments passed to validateTemplateBreakPoint\n");
+#endif
+ return result;
+ }
+
+ copy->templateName = xmlStrdup(breakPtr->templateName);
+ if ((xmlStrlen(copy->templateName) == 0) || xmlStrEqual(copy->templateName, (xmlChar*)"*")){
+ if (xmlStrEqual(breakPtr->url, orphanedTemplateURL))
+ breakPointDelete(breakPtr);
+ if ( xslDbgShellBreak(copy->templateName, NULL, ctxt)){
+ result = 1;
+ xsldbgGenericErrorFunc(i18n("Information: Breakpoint validation has caused one or more breakpoints to be re-created.\n"));
+ }
+ }else{
+ if (xmlStrEqual(breakPtr->url, orphanedTemplateURL))
+ breakPointDelete(breakPtr);
+ if (xslDbgShellBreak(copy->templateName, NULL, ctxt)){
+ result = 1;
+ }
+ }
+ xmlFree(copy->templateName);
+ if (!result){
+ xsldbgGenericErrorFunc(i18n("Warning: Validation of breakpoint %1 failed.\n").arg(copy->id));
+ }
+ return result;
+}
+
+/**
+ * xslDbgShellValidateBreakPoint:
+ * @payload: A valid breakPointPtr
+ * @data: Not used
+ * @name: Not used
+ *
+ * Print an warning if a breakpoint is invalid
+
+ */
+void xslDbgShellValidateBreakPoint(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(name);
+ int result = 0;
+ if (payload){
+ breakPointPtr breakPtr = (breakPointPtr) payload;
+
+ breakPoint copy; /* create a copy of the breakpoint */
+ copy.lineNo = breakPtr->lineNo;
+ copy.url = xmlStrdup(breakPtr->url);
+ copy.flags = breakPtr->flags;
+ copy.type = breakPtr->type;
+ copy.id = breakPtr->id;
+ if (copy.url){
+ if (breakPtr->templateName){
+ /* template name is used to contain the rules to add template breakpoint */
+ result = validateTemplateBreakPoint(breakPtr, &copy, (xsltTransformContextPtr)data);
+ }else{
+ result = validateBreakPoint(breakPtr, &copy);
+ }
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+
+ xmlFree(copy.url);
+ }
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/callstack.cpp b/kxsldbg/kxsldbgpart/libxsldbg/callstack.cpp
new file mode 100644
index 00000000..585a70d1
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/callstack.cpp
@@ -0,0 +1,509 @@
+
+/***************************************************************************
+ callstack.c - call stack implementation
+ -------------------
+ begin : Fri Nov 2 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+#include "xsldbg.h"
+#include "utils.h"
+#include "breakpoint.h"
+#include "arraylist.h"
+#include "callstack.h"
+#include "xsldbgmsg.h"
+
+
+/*------------------------------------------------------
+ Private functions
+ -----------------------------------------------------*/
+
+/**
+ * addCallInfo:
+ * @templateName: Template name to add
+ * @templateURI: QName part of template name to add
+ * @modeName: Mode of template
+ * @modeURI: QName part of node of template
+ * @url: The url for the template
+ *
+ * Add template "call" to call stack
+ *
+ * Returns A reference to the added info if successful,
+ * NULL otherwise
+ */
+callPointInfoPtr
+addCallInfo(const xmlChar * templateName, const xmlChar *templateURI,
+ const xmlChar * modeName, const xmlChar* modeURI, const xmlChar * url);
+
+
+/*------------------------------------------------------
+ Xsl call stack related
+-----------------------------------------------------*/
+
+/* keep track of the top and bottom of call stack*/
+
+/* This is the major structure and contains a stack of call points */
+callPointPtr callStackBot, callStackTop;
+
+/* save memory by keep only one copy of data used for several
+ items on call stack */
+callPointInfoPtr callInfo;
+
+/* What frame depth are we to stop at */
+int stopDepth = -1;
+
+
+/**
+ * callStackInit:
+ *
+ * Returns If callStack has been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+ *
+ * Returns 1 if callStack has been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+*/
+int
+callStackInit(void)
+{
+
+ callInfo = (callPointInfoPtr) xmlMalloc(sizeof(callPointInfo));
+ if (callInfo) {
+ callInfo->next = NULL;
+ callInfo->templateName = NULL;
+ callInfo->templateURI = NULL;
+ callInfo->modeName = NULL;
+ callInfo->modeURI = NULL;
+ callInfo->url = NULL;
+ }
+ callStackBot = (callPointPtr) xmlMalloc(sizeof(callPoint));
+ if (callStackBot) {
+ callStackBot->next = NULL;
+ callStackBot->info = NULL;
+ callStackBot->lineNo = -1;
+ callStackTop = callStackBot;
+ }
+ return (callInfo != NULL) && (callStackBot != NULL);
+}
+
+
+
+/**
+ * callStackFree:
+ *
+ *
+ * Free all memory used by callStack
+ */
+void
+callStackFree(void)
+{
+
+ callPointInfoPtr curInfo = callInfo, nextInfo;
+ callPointPtr curCall = callStackBot, nextCall;
+
+ /* remove all call info's */
+ while (curInfo) {
+ nextInfo = curInfo->next;
+ if (curInfo->templateName)
+ xmlFree(curInfo->templateName);
+ if (curInfo->templateURI)
+ xmlFree(curInfo->templateURI);
+ if (curInfo->modeName)
+ xmlFree(curInfo->modeName);
+ if (curInfo->modeURI)
+ xmlFree(curInfo->modeURI);
+ if (curInfo->url)
+ xmlFree(curInfo->url);
+ xmlFree(curInfo);
+ curInfo = nextInfo;
+ }
+ curInfo = NULL;
+
+ /* remove all call stack items left. There should be none !! */
+ while (curCall) {
+ nextCall = curCall->next;
+ xmlFree(curCall);
+ curCall = nextCall;
+ }
+
+ callStackBot = NULL;
+ callStackTop = NULL;
+ callInfo = NULL;
+}
+
+
+/**
+ * addCallInfo:
+ * @templateName: Template name to add
+ * @templateURI: QName part of template name to add
+ * @modeName: Mode of template
+ * @modeURI: QName part of node of template
+ * @url: The url for the template
+ *
+ * Add template "call" to call stack
+ *
+ * Returns A reference to the added info if successful,
+ * NULL otherwise
+ */
+callPointInfoPtr
+addCallInfo(const xmlChar * templateName, const xmlChar *templateURI,
+ const xmlChar * modeName, const xmlChar* modeURI, const xmlChar * url)
+{
+ callPointInfoPtr result = NULL, cur = callInfo;
+ int found;
+
+ if (!templateName || !url) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Null template name or url: addCallInfo\n");
+ if (templateName)
+ xsltGenericError(xsltGenericErrorContext, "template :\"%s\"\n",
+ templateName);
+ if (url)
+ xsltGenericError(xsltGenericErrorContext, "url :\"%s\"\n", url);
+
+#endif
+ return result;
+ }
+
+ while (cur->next) {
+ found = 1;
+ if (templateName && cur->templateName
+ && !xmlStrEqual(cur->templateName, templateName))
+ found = 0;
+ if (found && !xmlStrEqual(cur->templateURI, templateURI))
+ found = 0;
+ if (found && !xmlStrEqual(cur->modeName, modeName))
+ found = 0;
+ if (found && !xmlStrEqual(cur->modeURI, modeURI))
+ found = 0;
+ if (found && !xmlStrEqual(cur->url, url))
+ found = 0;
+
+ if (found){
+ result = cur;
+ break;
+ }
+ cur = cur->next;
+ }
+
+ if (!result && cur) {
+ result = (callPointInfoPtr) xmlMalloc(sizeof(callPointInfo));
+ if (result) {
+ if ((cur == callInfo) && !cur->templateName && !cur->templateURI
+ && !cur->modeName && !cur->modeURI
+ && !cur->url){
+ xmlFree(callInfo);
+ callInfo = result;
+ } else{
+ cur->next = result;
+ }
+ result->templateName =
+ (xmlChar *) xmlMemStrdup((char *) templateName);
+ result->templateURI =
+ (xmlChar *) xmlMemStrdup((char *) templateURI);
+ result->modeName =
+ (xmlChar *) xmlMemStrdup((char *) modeName);
+ result->modeURI =
+ (xmlChar *) xmlMemStrdup((char *) modeURI);
+ result->url = (xmlChar *) xmlMemStrdup((char *) url);
+ result->next = NULL;
+ }else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to create callPointInfo from : addCallInfo\n");
+#endif
+ }
+ }
+ if (!cur){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to create callPointInfo from : addCallInfo\n");
+#endif
+ }
+ return result;
+}
+
+
+/**
+ * callStackAdd:
+ * @templ: The current template being applied
+ * @source: The source node being processed
+ *
+ * Add template "call" to call stack
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+callStackAdd(xsltTemplatePtr templ, xmlNodePtr source)
+{
+ int result = 0;
+ const char *name = "Default template";
+ callPointInfoPtr info;
+
+ if (!templ || !source)
+ return result;
+
+ if (!source->doc || !source->doc->URL) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Invalid document url in call from : callStackAdd\n");
+#endif
+ return result;
+ }
+
+ /* are at a "frame" break point ie "step down" */
+ if ((xslDebugStatus == DEBUG_STEPDOWN)
+ && (stopDepth == callStackGetDepth())) {
+ xslDebugStatus = DEBUG_STOP;
+ stopDepth = 0;
+ }
+
+ /* this need not be an error just we've got a text in source */
+ if (xmlGetLineNo(source) == -1) {
+ return result;
+ }
+
+ if (templ) {
+ if (templ->name)
+ name = (char *) templ->name;
+ else {
+ if (templ->match)
+ name = (char *) templ->match;
+ }
+ }
+
+ if (!name) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Invalid template name : callStackAdd\n");
+#endif
+ return result;
+ }
+
+ info = addCallInfo((xmlChar *) name, (xmlChar *) templ->nameURI,
+ (xmlChar *) templ->mode, (xmlChar *) templ->modeURI,
+ source->doc->URL);
+
+ if (info) {
+ callPointPtr cur;
+
+ cur = (callPointPtr) xmlMalloc(sizeof(callPoint));
+ if (cur) {
+ callStackTop->next = cur;
+ callStackTop = cur;
+ cur->info = info;
+ cur->lineNo = xmlGetLineNo(source);
+ cur->next = NULL;
+ result = 1;
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to create call point : callStackAdd\n");
+#endif
+ }
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to create call info : callStackAdd\n");
+#endif
+ }
+
+ return result;
+}
+
+
+/**
+ * callStackDrop:
+ *
+ *
+ * Drop the topmost item off the call stack
+ */
+void
+callStackDrop(void)
+{
+
+ if (!callStackBot) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: callStackDrop failed invalid call stack: dbgcallstack.c");
+#endif
+ return;
+ }
+
+ /* are we at a "frame" break point ie "step up". if we've gone too
+ * far stop imediately */
+ if ((xslDebugStatus == DEBUG_STEPUP)
+ && (-1 * callStackGetDepth()) >= stopDepth) {
+ xslDebugStatus = DEBUG_STOP;
+ stopDepth = 0;
+ }
+
+ if (callStackBot->next) {
+ callPointPtr cur = callStackBot;
+
+ while (cur->next && cur->next->next) {
+ cur = cur->next;
+ }
+ if (cur->next)
+ xmlFree(cur->next);
+ cur->next = NULL;
+ callStackTop = cur;
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: callStackDrop failed no items on call stack : dbgcallstack.c");
+#endif
+ }
+}
+
+
+/**
+ * callStackStepup:
+ * @depth:The frame depth to step up to
+ * 0 < @depth <= callStackGetDepth()
+ *
+ * Set the frame depth to step up to
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+callStackStepup(int depth)
+{
+ int result = 0;
+
+ if ((depth > 0) && (depth <= callStackGetDepth())) {
+ stopDepth = -1 * depth;
+ xslDebugStatus = DEBUG_STEPUP;
+ result = 1;
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: callStackStepup failed invalid depth %d: callstack.c", depth);
+#endif
+ }
+ return result;
+}
+
+
+/**
+ * callStackStepdown:
+ * @depth: The frame depth to step down to,
+ * 0 < @depth <= callStackGetDepth()
+ *
+ * Set the frame depth to step down to
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+callStackStepdown(int depth)
+{
+ int result = 0;
+
+ if ((depth > 0) && (depth >= callStackGetDepth())) {
+ stopDepth = depth;
+ xslDebugStatus = DEBUG_STEPDOWN;
+ result = 1;
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: callStackStepdown failed invalid depth %d: dbgcallstack.c", depth);
+#endif
+ }
+ return result;
+}
+
+
+/**
+ * callStackGet:
+ * @depth: 0 < @depth <= callStackGetDepth()
+ *
+ * Retrieve the call point at specified call depth
+
+ * Returns Non-null if depth is valid,
+ * NULL otherwise
+ */
+callPointPtr
+callStackGet(int depth)
+{
+ callPointPtr result = NULL, cur = callStackBot;
+
+ if (!callStackBot) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: callStackGet failed invalid call stack: callstack.c");
+#endif
+ return result;
+ }
+ if ((depth < 1) && (depth > callStackGetDepth())) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: callStackGet failed invalid call depth: callstack.c");
+#endif
+ return result;
+ }
+
+ while (depth > 0 && cur->next) {
+ cur = cur->next;
+ depth--;
+ }
+
+ if (depth == 0)
+ result = cur;
+ else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: callStackGet failed invalid call depth: callstack.c");
+#endif
+ }
+ return result;
+}
+
+
+/**
+ * callStackGetTop:
+ *
+ * Get the top item in the call stack
+ *
+ * Returns The top of the call stack
+ */
+callPointPtr
+callStackGetTop(void)
+{
+ return callStackTop;
+}
+
+
+/**
+ * callStackGetDepth:
+ *
+ * Return the depth of call stack
+ *
+ * Returns The depth of call stack
+ */
+int
+callStackGetDepth(void)
+{
+ callPointPtr cur = callStackBot;
+ int depthCount = 0;
+
+ if (!callStackBot) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: calldepth failed invalid call stack: dbgcallstack.c");
+#endif
+ return depthCount;
+ }
+
+
+ while (cur->next) {
+ depthCount++;
+ cur = cur->next;
+ }
+ return depthCount;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/callstack.h b/kxsldbg/kxsldbgpart/libxsldbg/callstack.h
new file mode 100644
index 00000000..fd87b9bd
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/callstack.h
@@ -0,0 +1,275 @@
+
+/* *************************************************************************
+ xslcallpoint.h - public functions for the
+ the call stack
+ -------------------
+ begin : Fri Dec 7 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ************************************************************************* */
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLCALLSTACK_H
+#define XSLCALLSTACK_H
+
+/**
+ * Provide a call stack support
+ *
+ * @short call stack support
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+
+#ifndef BUILD_DOCS
+#include "breakpoint.h"
+#endif
+
+#ifdef WITH_XSLT_DEBUG
+#ifndef WITH_XSLT_DEBUG_BREAKPOINTS
+#define WITH_XSLT_DEBUG_BREAKPOINTS
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+ typedef struct _callPointInfo callPointInfo;
+ typedef callPointInfo *callPointInfoPtr;
+ struct _callPointInfo {
+ xmlChar *templateName, *templateURI;
+ xmlChar *modeName, *modeURI;
+ xmlChar *url;
+ callPointInfoPtr next;
+ };
+
+ typedef struct _callPoint callPoint;
+ typedef callPoint *callPointPtr;
+ struct _callPoint {
+ callPointInfoPtr info;
+ long lineNo;
+ callPointPtr next;
+ };
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackInit:
+ *
+ * Returns If callStack has been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+ *
+ * Returns 1 if callStack has been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+*/
+#endif
+ int
+ callStackInit(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackFree:
+ *
+ *
+ * Free all memory used by callStack
+ */
+#endif
+ void
+ callStackFree(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackAdd:
+ * @templ: The current template being applied
+ * @source: The source node being processed
+ *
+ * Add template "call" to call stack
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Add template "call" to call stack
+ *
+ * @param templ The current template being applied
+ * @param source The source node being processed
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int callStackAdd(xsltTemplatePtr templ, xmlNodePtr source);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackDrop:
+ *
+ *
+ * Drop the topmost item off the call stack
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Drop the topmost item off the call stack
+ */
+#endif
+#endif
+ void callStackDrop(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackStepup:
+ * @depth:The frame depth to step up to
+ * 0 < @depth <= callDepth()
+ *
+ * Set the frame depth to step up to
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Set the frame depth to step up to
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param depth The frame depth to step up to
+ * 0 < @p depth <= callDepth()
+ */
+#endif
+#endif
+ int callStackStepup(int depth);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackStepdown:
+ * @depth: The frame depth to step down to,
+ * 0 < @depth <= callDepth()
+ *
+ * Set the frame depth to step down to
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Set the frame depth to step down to
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param depth The frame depth to step down to
+ * 0 < @p depth <= callDepth()
+ */
+#endif
+#endif
+ int callStackStepdown(int depth);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackGet:
+ * @depth: 0 < @depth <= callDepth()
+ *
+ * Retrieve the call point at specified call depth
+
+ * Returns Non-null a if depth is valid,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Retrieve the call point at specified call depth
+
+ * @returns Non-null a if depth is valid,
+ * NULL otherwise
+ *
+ * @param depth 0 < @p depth <= callDepth()
+ */
+#endif
+#endif
+ callPointPtr callStackGet(int depth);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackGetTop:
+ *
+ * Get the top item in the call stack
+ *
+ * Returns The top of the call stack
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Get the top item in the call stack
+ *
+ * @returns The top of the call stack
+ */
+#endif
+#endif
+ callPointPtr callStackGetTop(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * callStackGetDepth:
+ *
+ * Return the depth of call stack
+ *
+ * Returns The depth of call stack
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * @returns the depth of call stack
+ */
+#endif
+#endif
+ int callStackGetDepth(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/cmds.h b/kxsldbg/kxsldbgpart/libxsldbg/cmds.h
new file mode 100644
index 00000000..f12648c7
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/cmds.h
@@ -0,0 +1,197 @@
+
+/***************************************************************************
+ cmds.h - A list of valid commands ID's for xsldbg
+ -------------------
+ begin : Thu Dec 27 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 CMDS_H
+#define CMDS_H
+
+/* See the top of debugXSL.c for a list of command names and thier shortcuts */
+#ifndef USE_KDE_DOCS
+typedef enum { /* id's for commands of xslDbgShell */
+ DEBUG_HELP_CMD = 100,
+ DEBUG_BYE_CMD,
+ DEBUG_EXIT_CMD,
+ DEBUG_QUIT_CMD,
+
+ DEBUG_STEP_CMD,
+ DEBUG_STEPUP_CMD,
+ DEBUG_STEPDOWN_CMD,
+ DEBUG_NEXT_CMD,
+ DEBUG_CONT_CMD,
+ DEBUG_RUN_CMD,
+
+ DEBUG_TEMPLATES_CMD,
+ DEBUG_WHERE_CMD,
+ DEBUG_FRAME_CMD,
+ DEBUG_STYLESHEETS_CMD,
+
+ DEBUG_BREAK_CMD,
+ DEBUG_SHOWBREAK_CMD,
+ DEBUG_DELETE_CMD,
+ DEBUG_ENABLE_CMD,
+ DEBUG_DISABLE_CMD,
+
+ DEBUG_LS_CMD,
+ DEBUG_DIR_CMD,
+ DEBUG_DU_CMD,
+ DEBUG_CAT_CMD,
+ DEBUG_PRINT_CMD, /* cat alternative */
+ DEBUG_PWD_CMD,
+ DEBUG_DUMP_CMD,
+ DEBUG_BASE_CMD,
+
+ DEBUG_GLOBALS_CMD,
+ DEBUG_LOCALS_CMD,
+ /* DEBUG_CAT_CMD, already listed */
+ DEBUG_SOURCE_CMD,
+ DEBUG_DATA_CMD,
+ DEBUG_OUTPUT_CMD,
+ DEBUG_CD_CMD,
+
+ /* file related */
+ /* DEBUG_OUTPUT_CMD, already listed */
+ DEBUG_ENTITIES_CMD,
+ DEBUG_SYSTEM_CMD,
+ DEBUG_PUBLIC_CMD,
+ DEBUG_ENCODING_CMD,
+ DEBUG_VALIDATE_CMD,
+ DEBUG_LOAD_CMD,
+ DEBUG_SAVE_CMD,
+ DEBUG_WRITE_CMD,
+ DEBUG_FREE_CMD,
+
+ /* Operating system related */
+ DEBUG_CHDIR_CMD,
+ DEBUG_SHELL_EXEC_CMD,
+ DEBUG_TTY_CMD,
+
+ /* libxslt parameter and options related */
+ DEBUG_ADDPARAM_CMD,
+ DEBUG_DELPARAM_CMD,
+ DEBUG_SHOWPARAM_CMD,
+ DEBUG_SETOPTION_CMD,
+ DEBUG_OPTIONS_CMD, /* print options */
+
+ /* extra options/commands */
+ DEBUG_TRACE_CMD,
+ DEBUG_WALK_CMD,
+ DEBUG_ADDWATCH_CMD,
+ DEBUG_DELWATCH_CMD,
+ DEBUG_SHOWWATCH_CMD,
+
+ /* searching */
+ DEBUG_SEARCH_CMD,
+
+ /* variable change */
+ DEBUG_SET_CMD,
+
+ /* language change */
+ DEBUG_LANG_CMD
+
+ /* NULL */
+
+} CommandsEnum;
+#else
+
+/* Keep kdoc happy*/
+enum CommandsEnum { /* id's for commands of xslDbgShell */
+ DEBUG_HELP_CMD = 100,
+ DEBUG_BYE_CMD,
+ DEBUG_EXIT_CMD,
+ DEBUG_QUIT_CMD,
+
+ DEBUG_STEP_CMD,
+ DEBUG_STEPUP_CMD,
+ DEBUG_STEPDOWN_CMD,
+ DEBUG_NEXT_CMD,
+ DEBUG_CONT_CMD,
+ DEBUG_RUN_CMD,
+
+ DEBUG_TEMPLATES_CMD,
+ DEBUG_WHERE_CMD,
+ DEBUG_FRAME_CMD,
+ DEBUG_STYLESHEETS_CMD,
+
+ DEBUG_BREAK_CMD,
+ DEBUG_SHOWBREAK_CMD,
+ DEBUG_DELETE_CMD,
+ DEBUG_ENABLE_CMD,
+ DEBUG_DISABLE_CMD,
+
+ DEBUG_LS_CMD,
+ DEBUG_DIR_CMD,
+ DEBUG_DU_CMD,
+ DEBUG_CAT_CMD,
+ DEBUG_PRINT_CMD, /* cat alternative */
+ DEBUG_PWD_CMD,
+ DEBUG_DUMP_CMD,
+ DEBUG_BASE_CMD,
+
+ DEBUG_GLOBALS_CMD,
+ DEBUG_LOCALS_CMD,
+ /* DEBUG_CAT_CMD, already listed */
+ DEBUG_SOURCE_CMD,
+ DEBUG_DATA_CMD,
+ DEBUG_OUTPUT_CMD,
+ DEBUG_CD_CMD,
+
+ /* file related */
+ /* DEBUG_OUTPUT_CMD, already listed */
+ DEBUG_ENTITIES_CMD,
+ DEBUG_SYSTEM_CMD,
+ DEBUG_PUBLIC_CMD,
+ DEBUG_ENCODING_CMD,
+ DEBUG_VALIDATE_CMD,
+ DEBUG_LOAD_CMD,
+ DEBUG_SAVE_CMD,
+ DEBUG_WRITE_CMD,
+ DEBUG_FREE_CMD,
+
+ /* Operating system related */
+ DEBUG_CHDIR_CMD,
+ DEBUG_SHELL_EXEC_CMD,
+ DEBUG_TTY_CMD,
+
+ /* libxslt parameter and options related */
+ DEBUG_ADDPARAM_CMD,
+ DEBUG_DELPARAM_CMD,
+ DEBUG_SHOWPARAM_CMD,
+ DEBUG_SETOPTION_CMD,
+ DEBUG_OPTIONS_CMD, /* print options */
+
+ /* extra options/commands */
+ DEBUG_TRACE_CMD,
+ DEBUG_WALK_CMD,
+ DEBUG_ADDWATCH_CMD,
+ DEBUG_DELWATCH_CMD,
+ DEBUG_SHOWWATCH_CMD,
+
+ /* searching */
+ DEBUG_SEARCH_CMD,
+
+ /* variable change */
+ DEBUG_SET_CMD
+
+ /* language change */
+ DEBUG_LANG_CMD
+
+ /* NULL */
+};
+#endif
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/debug.cpp b/kxsldbg/kxsldbgpart/libxsldbg/debug.cpp
new file mode 100644
index 00000000..2975f814
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/debug.cpp
@@ -0,0 +1,235 @@
+
+/***************************************************************************
+ debug.c - main functions for debugger use
+ -------------------
+ begin : Fri Nov 2 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+#include "xsldbg.h"
+#include "debug.h"
+#include "debugXSL.h" /* needed for debugXSLBreak function */
+#include "breakpoint.h"
+#include "callstack.h"
+#include "files.h"
+#include "options.h"
+
+#include <libxslt/xsltutils.h> /* need for breakpoint callback support */
+
+/* setup debugger callbacks */
+struct DebuggerCallbacks {
+ xsltHandleDebuggerCallback debuggercallback;
+ xsltAddCallCallback addcallback;
+ xsltDropCallCallback dropcallback;
+} debuggerDriver;
+
+
+/* -----------------------------------------
+ Private functions
+ -------------------------------------------*/
+
+/**
+ * debugHandleDebugger:
+ * @cur : source node being executed
+ * @node : data node being processed
+ * @templ : temlate that applies to node
+ * @ctxt : the xslt transform context
+ *
+ * If either cur or node are a breakpoint, or xslDebugStatus in state
+ * where debugging must occcur at this time, then transfer control
+ * to the debugXSLBreak function
+ */
+void debugHandleDebugger(xmlNodePtr cur, xmlNodePtr node,
+ xsltTemplatePtr templ,
+ xsltTransformContextPtr ctxt);
+
+/* -------------------------------------
+ End private functions
+---------------------------------------*/
+
+
+/*-----------------------------------------------------------
+ Main debugger functions
+-----------------------------------------------------------*/
+
+
+
+/**
+ * debugInit :
+ *
+ * Initialize debugger
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+debugInit(void)
+{
+ int result;
+
+ xslDebugStatus = DEBUG_NONE;
+ result = breakPointInit();
+ result = result && callStackInit();
+
+ /* setup debugger callbacks */
+ debuggerDriver.debuggercallback = debugHandleDebugger;
+ debuggerDriver.addcallback = callStackAdd;
+ debuggerDriver.dropcallback = callStackDrop;
+ xsltSetDebuggerCallbacks(3, &debuggerDriver);
+ return result;
+}
+
+
+/**
+ * debugFree :
+ *
+ * Free up any memory taken by debugging
+ */
+void
+debugFree(void)
+{
+ breakPointFree();
+ callStackFree();
+}
+
+
+/**
+ * debugGotControl:
+ * @reached: 1 if debugger has received control, -1 to read its value,
+ 0 to clear the flag
+ *
+ * Set flag that debugger has received control to value of @reached
+ *
+ * Returns 1 if any break point was reached previously,
+ * 0 otherwise
+ */
+int
+debugGotControl(int reached)
+{
+ static int hasReached;
+ int result = hasReached;
+
+ if (reached != -1)
+ hasReached = reached;
+ return result;
+}
+
+
+/**
+ * debugHandleDebugger:
+ * @cur : source node being executed
+ * @node : data node being processed
+ * @templ : temlate that applies to node
+ * @ctxt : the xslt transform context
+ *
+ * If either cur or node are a breakpoint, or xslDebugStatus in state
+ * where debugging must occcur at this time then transfer control
+ * to the debugXSLBreak function
+ */
+void
+debugHandleDebugger(xmlNodePtr cur, xmlNodePtr node,
+ xsltTemplatePtr templ, xsltTransformContextPtr ctxt)
+{
+
+ if (!cur && !node) {
+ xsldbgGenericErrorFunc(i18n("Error: XSLT source and XML data are empty. Cannot enter the debugger.\n"));
+ } else {
+ if (optionsGetIntOption(OPTIONS_GDB)){
+ int doValidation = 0;
+ switch(xsldbgValidateBreakpoints){
+ case BREAKPOINTS_ARE_VALID:
+ if (!filesGetStylesheet() || !filesGetMainDoc()) {
+ xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
+ doValidation = 1;
+ }
+
+ break;
+
+ case BREAKPOINTS_NEED_VALIDATION:
+ if (filesGetStylesheet() && filesGetMainDoc() && templ){
+ xsldbgValidateBreakpoints = BREAKPOINTS_BEING_VALIDATED;
+ doValidation = 1;
+ }
+ break;
+
+ case BREAKPOINTS_BEING_VALIDATED:
+ /*should never be in the state for any length of time */
+#ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unexpected breakpoint validation state %d", xsldbgValidateBreakpoints);
+#endif
+ break;
+ }
+ if (doValidation){
+ /* breakpoints will either be marked as orphaned or not as needed */
+ xsldbgValidateBreakpoints = BREAKPOINTS_BEING_VALIDATED;
+ walkBreakPoints((xmlHashScanner)
+ xslDbgShellValidateBreakPoint, ctxt);
+ if (filesGetStylesheet() && filesGetMainDoc() && templ){
+ xsldbgValidateBreakpoints = BREAKPOINTS_ARE_VALID;
+ }else{
+ xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
+ }
+ }
+ }
+ switch (xslDebugStatus) {
+
+ /* A temparary stopping point */
+ case DEBUG_WALK:
+ case DEBUG_TRACE:
+ /* only allow breakpoints at xml elements */
+ if (xmlGetLineNo(cur) != -1)
+ debugXSLBreak(cur, node, templ, ctxt);
+ break;
+
+ case DEBUG_STOP:
+ xslDebugStatus = DEBUG_CONT;
+ /* only allow breakpoints at xml elements */
+ if (xmlGetLineNo(cur) != -1)
+ debugXSLBreak(cur, node, templ, ctxt);
+ break;
+
+ case DEBUG_STEP:
+ /* only allow breakpoints at xml elements */
+ if (xmlGetLineNo(cur) != -1)
+ debugXSLBreak(cur, node, templ, ctxt);
+ break;
+
+ case DEBUG_CONT:
+ {
+ breakPointPtr breakPtr = NULL;
+ xmlChar *baseUri = NULL;
+
+ if (cur) {
+ breakPtr =
+ breakPointGet(cur->doc->URL,
+ xmlGetLineNo(cur));
+
+ if (breakPtr && (breakPtr->flags & BREAKPOINT_ENABLED) ){
+ debugXSLBreak(cur, node, templ, ctxt);
+ return;
+ }
+ }
+ if (node) {
+ baseUri = filesGetBaseUri(node);
+ if (baseUri != NULL) {
+ breakPtr =
+ breakPointGet(baseUri, xmlGetLineNo(node));
+ } else {
+ breakPtr =
+ breakPointGet(node->doc->URL,
+ xmlGetLineNo(node));
+ }
+ if (breakPtr) {
+ if (breakPtr->flags & BREAKPOINT_ENABLED) {
+ debugXSLBreak(cur, node, templ, ctxt);
+ }
+ }
+ if (baseUri)
+ xmlFree(baseUri);
+ }
+ }
+ break;
+ }
+ }
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/debug.h b/kxsldbg/kxsldbgpart/libxsldbg/debug.h
new file mode 100644
index 00000000..c38f37eb
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/debug.h
@@ -0,0 +1,101 @@
+
+/**************************************************************************
+ debug.h - declare major debugger functions
+ -------------------
+ begin : Thur Jan 31 2002
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ **************************************************************************/
+
+/**************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSL_DEBUG_H
+#define XSL_DEBUG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * debugInit:
+ *
+ * Initialize debugger allocating any memory needed by debugger
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Initialize debugger allocating any memory needed by debugger
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int debugInit(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * debugFree:
+ *
+ * Free up any memory taken by debugger
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Free up any memory taken by debugger
+ */
+#endif
+#endif
+ void debugFree(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * debugGotControl:
+ * @reached: 1 if debugger has received control, -1 to read its value,
+ 0 to clear the flag
+ *
+ * Set flag that debuger has received control to value of @reached
+ *
+ * Returns 1 if any break point was reached previously,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Set flag that debuger has received control to value of @p reached
+ *
+ * @returns 1 if any breakpoint was reached previously,
+ * 0 otherwise
+ *
+ * @param reached 1 if debugger has received control, -1 to read its value,
+ * 0 to clear the flag
+ */
+#endif
+#endif
+ int debugGotControl(int reached);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp b/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp
new file mode 100644
index 00000000..39aea804
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp
@@ -0,0 +1,2118 @@
+
+/***************************************************************************
+ debugXSL.c - debugger commands to use
+ -------------------
+ begin : Sun Sep 16 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/*
+ * Orinal file : debugXML.c : This is a set of routines used for
+ * debugging the tree produced by the XML parser.
+ *
+ * New file : shell.c : Debug support version
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <daniel@veillard.com>
+ *
+ * Permission obtained to modify the LGPL'd code and extend to include breakpoints, inspections of
+ * stylesheet source, xml data, stylesheet variables
+ */
+
+#ifdef WIN32
+#include <wtypes.h>
+#include <winbase.h> /* needed fort the sleep function */
+#endif
+
+#include "xsldbg.h"
+#include "files.h"
+#include "cmds.h" /* list of command Id's */
+#include "debug.h"
+#include "debugXSL.h"
+#include "options.h"
+#include "breakpoint.h"
+#include "help.h"
+#include <stdlib.h>
+#include <libxslt/transform.h> /* needed by source command */
+#include <libxslt/xsltInternals.h>
+#include <libxml/debugXML.h>
+#include <stdio.h>
+
+/* language change support */
+#ifdef LOCALE_PREFIX
+#include <locale.h>
+#endif
+
+#include "xsldbgmsg.h"
+#include "xsldbgthread.h" /* for get thread status */
+#include "xsldbgio.h"
+
+/* current template being processed */
+xsltTemplatePtr rootCopy;
+
+/* how may items have been printed */
+int printCount;
+
+/* used to sending small amounts data when xsldbg runs as a thread */
+xmlChar messageBuffer[2000];
+
+/* To achieve the same fucntionality of a next command
+ we first do a step, then a step up */
+int nextCommandActive = 0;
+
+/* Do we print the values for watches each time the debugger stops */
+int showWatchesActive = 1;
+
+extern FILE *terminalIO;
+
+int xsldbgStop = 0;
+int xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
+int xsldbgHasLineNumberFix;
+bool xsldbgReachedFirstTemplate = false;
+
+/* valid commands of xslDbgShell */
+const char *commandNames[] = {
+ "help",
+
+ "bye",
+ "exit",
+ "quit",
+
+ "step",
+ "stepup",
+ "stepdown",
+ "next", /* next ie step over template function call*/
+ "continue",
+ "run",
+
+ "templates",
+ "where",
+ "frame",
+ "stylesheets",
+
+ "break",
+ "showbreak",
+ "delete",
+ "enable",
+ "disable",
+
+ "ls",
+ "dir",
+ "du",
+ "cat",
+ "print",
+ "pwd",
+ "dump",
+ "base",
+
+ "globals",
+ "locals",
+ /* "cat", already listed */
+ "source",
+ "data",
+ "output", /* output file name */
+ "cd",
+
+ /* file related */
+ /* "output", already listed */
+ "entities",
+ "system",
+ "public",
+ "encoding",
+ "validate",
+ "load",
+ "save",
+ "write",
+ "free",
+
+ /* Operating system related */
+ "chdir",
+ "shell",
+ "tty",
+
+ /* libxslt parameter related */
+ "addparam",
+ "delparam",
+ "showparam",
+ "setoption",
+ "options",
+
+ /* extra options */
+ "trace",
+ "walk",
+ "addwatch",
+ "delwatch",
+ "showwatch",
+
+ /* searching */
+ "search",
+
+ /*variable value change */
+ "set",
+
+ /* language change */
+ "lang",
+
+ NULL /* Indicate the end of list */
+};
+
+/* valid commands of xslShell in there alternative|shorter format */
+const char *shortCommandNames[] = {
+ "h",
+
+ "bye",
+ "exit",
+ "q", /*quit */
+
+ "s", /* step */
+ "up", /*stepup */
+ "down", /* stepdown */
+ "n", /* next ie step over function call*/
+ "c", /* continue */
+ "r", /* run */
+
+ "t", /* templates */
+ "w", /* where */
+ "f",
+ "style",
+
+ "b", /* break */
+ "show",
+ "d", /* delete */
+ "e", /* enabled */
+ "disable",
+
+ "ls",
+ "dir",
+ "du",
+ "cat",
+ "print",
+ "pwd",
+ "dump",
+ "base",
+
+ "globals",
+ "locals",
+ /* "cat", already listed */
+ "source",
+ "data",
+ "o", /* output file name */
+ "cd",
+
+
+ /* file related */
+ /* "output", already listed */
+ "ent", /* entities command */
+ "sys", /* sytem command */
+ "pub", /* public command */
+ "encoding",
+ "validate",
+ "load",
+ "save",
+ "write",
+ "free",
+
+ /* Operating system related */
+ "chdir",
+ "shell",
+ "tty",
+
+ /* libxslt parameter related */
+ "addparam",
+ "delparam",
+ "showparam",
+ "setoption",
+ "options",
+
+ /* extra options/commands */
+ "trace",
+ "walk",
+ "watch",
+ "delwatch",
+ "watches",
+
+ /* searching */
+ "search",
+
+ /*variable value change */
+ "set",
+
+ /* language change */
+ "lang",
+
+ NULL /* Indicate the end of list */
+};
+
+
+/* some convenient short cuts when using cd command*/
+const char *cdShortCuts[] = {
+ "<<",
+ ">>",
+ "<-",
+ "->",
+ NULL /* indicate end of list */
+};
+
+/* what to replace shortcuts with */
+const char *cdAlternative[] = {
+ "preceding-sibling::node()",
+ "following-sibling::node()",
+ "ancestor::node()",
+ "descendant::node()",
+ NULL /* indicate end of list */
+};
+
+/* what enum to use for shortcuts */
+enum ShortcutsEnum {
+ DEBUG_PREV_SIBLING = 200,
+ DEBUG_NEXT_SIBLING,
+ DEBUG_ANCESTOR_NODE,
+ DEBUG_DESCENDANT_NODE
+};
+
+
+
+#include <libxml/xpathInternals.h>
+
+#include <libxslt/extra.h>
+#include <string.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/valid.h>
+#include <libxml/debugXML.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/HTMLparser.h>
+
+
+/* -----------------------------------------
+ Private function declarations for debugXSL.c
+ -------------------------------------------*/
+
+
+/* xslDbgCd :
+ * Change directories
+ * @styleCtxt : current stylesheet context
+ * @ctxt : current shell context
+ * @arg : path to change to
+ * @source : is valid
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int xslDbgCd(xsltTransformContextPtr styleCtxt, xmlShellCtxtPtr ctxt,
+ xmlChar * arg, xmlNodePtr source);
+
+
+/**
+ * xslDbgPrintCallStack:
+ * @arg : the number of frame to print, NULL if all items
+ *
+ * Print all items found on the callStack
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int xslDbgPrintCallStack(const xmlChar * arg);
+
+
+/**
+ * xslDbgSleep:
+ * @delay : the number of microseconds to delay exection by
+ *
+ * Delay execution by a specified number of microseconds. On some system
+ * this will not be at all accurate.
+ */
+void xslDbgSleep(long delay);
+
+
+/**
+ * xslDbgWalkContinue:
+ *
+ * Delay execution for time as indicated by OPTION_WALK_SPEED
+ * Can only be called from within shellPrompt!
+ * OPTION_WALK_SPEED != WALKSPEED_STOP
+ *
+ * Returns 1 if walk is to continue,
+ * 0 otherwise
+ */
+int xslDbgWalkContinue(void);
+
+
+
+/**
+ * addBreakPointNode:
+ * @payload : valid breakPointPtr
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+ addBreakPointNode(void *payload, void *data,
+ xmlChar * name);
+
+
+/**
+ * addSourceNode:
+ * @payload : valid xsltStylesheetPtr
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+ addSourceNode(void *payload, void *data,
+ xmlChar * name);
+
+
+/**
+ * addTemplateNode:
+ * @payload : valid xsltTemplatePtr
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+ addTemplateNode(void *payload, void *data,
+ xmlChar * name);
+
+/**
+ * addGlobalNode:
+ * @payload : valid xmlNodePtr of global variable
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+ addGlobalNode(void *payload, void *data,
+ xmlChar * name);
+
+/**
+ * addLocalNode:
+ * @payload : valid xmlNodePtr of local variable
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+ addLocalNode(void *payload, void *data,
+ xmlChar * name);
+
+
+/**
+ * addIncludeNode:
+ * @payload : valid xmlNodePtr of include instuction
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+ addIncludeNode(void *payload, void *data,
+ xmlChar * name);
+
+
+
+/**
+ * addCallStackItems:
+ *
+ * Convert call stack items into format needed, and add to search dataBase
+ */
+void
+ addCallStackItems(void);
+
+
+/**
+ * shellPrompt:
+ * @source: The current stylesheet instruction being executed
+ * @doc: The current document node being processed
+ * @filename: Not used
+ * @input: The function to call to when reading commands from stdio
+ * @output: Where to put the results
+ * @styleCtxt: Is valid
+ *
+ * Present to the user the xsldbg shell
+ */
+void shellPrompt(xmlNodePtr source, xmlNodePtr doc,
+ xmlChar * filename,
+ xmlShellReadlineFunc input,
+ FILE * output, xsltTransformContextPtr styleCtxt);
+
+/* -------------------------------------
+ End private functions
+---------------------------------------*/
+
+
+
+/**
+ * debugXSLGetTemplate:
+ *
+ * Return the last template node found, if an
+ *
+ * Returns The last template node found, if any
+ */
+xsltTemplatePtr
+debugXSLGetTemplate(void)
+{
+ return rootCopy;
+}
+
+
+/****************************************************************
+ * *
+ * The XSL shell related functions *
+ * *
+ ****************************************************************/
+
+
+/* xslDbgCd :
+ * Change directories
+ * @styleCtxt : current stylesheet context
+ * @ctxt : current shell context
+ * @arg : path to change to and in UTF-8
+ * @source : is valid
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgCd(xsltTransformContextPtr styleCtxt, xmlShellCtxtPtr ctxt,
+ xmlChar * arg, xmlNodePtr source)
+{
+ xmlXPathObjectPtr list = NULL;
+ int result = 0;
+ int offset = 2; /* in some cases I'm only interested after first two chars */
+
+ if (!ctxt) {
+ xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n"));
+ return result;
+ }
+
+ if (arg == NULL)
+ arg = (xmlChar *) "";
+ if (arg[0] == 0) {
+ ctxt->node = (xmlNodePtr) ctxt->doc;
+ } else {
+ if ((arg[0] == '-') && (xmlStrLen(arg) > 2)) {
+ if (styleCtxt) {
+ if (arg[1] == 't') {
+ xmlNodePtr templateNode;
+
+ /* quickly find a template */
+ /* skip any white spaces */
+ while (_IS_BLANK(arg[offset]))
+ offset++;
+
+ templateNode =
+ findTemplateNode(styleCtxt->style, &arg[offset]);
+ if (!templateNode) {
+ xsldbgGenericErrorFunc(i18n("Error: The XSLT template named \"%1\" was not found.\n").arg(xsldbgText(&arg[offset])));
+ return result;
+ } else {
+ xsldbgGenericErrorFunc(i18n(" template: \"%1\"\n").arg(xsldbgText(&arg[offset])));
+ ctxt->node = templateNode;
+ result = 1;
+ return result;
+ }
+ } else if (arg[1] == 's') {
+ /*quickly switch to another stylesheet node */
+ xmlXPathContextPtr pctxt;
+
+ if (source) {
+ pctxt = xmlXPathNewContext(source->doc);
+ if (pctxt == NULL) {
+ xmlFree(ctxt);
+ /* xslDebugStatus = DEBUG_QUIT; */
+ return result;
+ }
+ if (!xmlXPathNsLookup(pctxt, (xmlChar *) "xsl"))
+ xmlXPathRegisterNs(pctxt, (xmlChar *) "xsl",
+ XSLT_NAMESPACE);
+ list =
+ xmlXPathEval((xmlChar *) & arg[offset], pctxt);
+ if (pctxt) {
+ xmlFree(pctxt);
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to cd. No stylesheet loaded.\n"));
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Unknown arguments to the command %1.\n").arg("cd"));
+ }
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Unable to cd. No stylesheet loaded.\n"));
+ } else {
+ xmlNodePtr savenode;
+
+ if (styleCtxt) {
+ savenode = styleCtxt->xpathCtxt->node;
+ ctxt->pctxt->node = ctxt->node;
+ styleCtxt->xpathCtxt->node = ctxt->node;
+ if (!xmlXPathNsLookup(ctxt->pctxt, (xmlChar *) "xsl"))
+ xmlXPathRegisterNs(ctxt->pctxt, (xmlChar *) "xsl",
+ XSLT_NAMESPACE);
+ list = xmlXPathEval((xmlChar *) arg, styleCtxt->xpathCtxt);
+ styleCtxt->xpathCtxt->node = savenode;
+ } else if (ctxt->pctxt) {
+ if (!xmlXPathNsLookup(ctxt->pctxt, (xmlChar *) "xsl"))
+ xmlXPathRegisterNs(ctxt->pctxt, (xmlChar *) "xsl",
+ XSLT_NAMESPACE);
+ list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments to the command %1.\n").arg("cd"));
+ }
+ }
+
+ if (list != NULL) {
+ switch (list->type) {
+ case XPATH_NODESET:
+ if (list->nodesetval) {
+ if (list->nodesetval->nodeNr == 1) {
+ ctxt->node = list->nodesetval->nodeTab[0];
+ /* tell the application about the new line
+ * number we are looking at */
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ int breakpoint = 0;
+
+ xsldbgUpdateFileDetails(ctxt->node);
+ notifyXsldbgApp(XSLDBG_MSG_LINE_CHANGED,
+ &breakpoint);
+ }
+ result = 1;
+ } else
+ xsldbgGenericErrorFunc(i18n("Warning: XPath %1 is a Node Set with %n child.", "Warning: XPath %1 is a Node Set with %n children.", list->nodesetval->nodeNr).arg(xsldbgText(arg)) + QString("\n"));
+ } else {
+ xsldbgGenericErrorFunc(i18n("Warning: XPath %1 is an empty Node Set.\n").arg(xsldbgText(arg)));
+ }
+ break;
+
+ default:
+ xmlShellPrintXPathError(list->type, (char *) arg);
+ }
+ xmlXPathFreeObject(list);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: XPath %1 was not found.\n").arg(xsldbgText(arg)));
+ }
+ if (ctxt->pctxt)
+ ctxt->pctxt->node = NULL;
+ }
+ return result;
+}
+
+
+/**
+ * xslDbgPrintCallStack:
+ * @arg : the number of frame to print, NULL if all items
+ *
+ * Print all items found on the callStack
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgPrintCallStack(const xmlChar * arg)
+{
+ int depth = 0;
+ int result = 1;
+ callPointPtr callPointItem;
+
+ if (arg == NULL) {
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListStart(XSLDBG_MSG_CALLSTACK_CHANGED);
+ /* we send the oldest frame stack first */
+ for (depth = 1; depth <= callStackGetDepth(); depth++) {
+ callPointItem = callStackGet(depth);
+ if (callPointItem && callPointItem->info) {
+ notifyListQueue(callPointItem);
+ }
+ }
+ notifyListSend();
+ } else {
+ xmlChar *nameTemp, *modeTemp;
+ for (depth = callStackGetDepth(); depth >= 1; depth--) {
+ callPointItem = callStackGet(depth);
+ nameTemp = NULL;
+ modeTemp = NULL;
+ if (callPointItem && callPointItem->info) {
+ if (depth == callStackGetDepth()) {
+ xmlChar *curUrl = xsldbgUrl();
+ long curLine = xsldbgLineNo();
+ /* if possible list the current location */
+ if (rootCopy && (rootCopy->match || rootCopy->name)
+ && curUrl) {
+ xmlChar *rootNameTemp, *rootModeTemp;
+ rootNameTemp = fullQName(rootCopy->nameURI, rootCopy->name);
+ rootModeTemp = fullQName(rootCopy->modeURI, rootCopy->mode);
+ if (rootNameTemp && rootModeTemp){
+ if (rootCopy->match)
+ /* display information about the current XSLT template */
+ xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\" mode: \"%3\"").arg(depth).arg(xsldbgText(rootCopy->match)).arg(xsldbgText(rootModeTemp)));
+ else
+ /* display information about the current XSLT template */
+ xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\" mode: \"%3\"").arg(depth).arg(xsldbgText(rootNameTemp)).arg(xsldbgText(rootModeTemp)));
+ /* display where we are in the source/document file */
+ xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(curUrl)).arg(curLine));
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ result = 0;
+ }
+ if (rootNameTemp){
+ xmlFree(rootNameTemp);
+ rootNameTemp = NULL;
+ }
+ if (rootModeTemp){
+ xmlFree(rootModeTemp);
+ rootModeTemp = NULL;
+ }
+ } else if (curUrl) {
+ /* display information about the current XSLT template */
+ xsldbgGenericErrorFunc(i18n("#%1 template: \"LIBXSLT_DEFAULT\" mode: \"\"").arg(depth));
+ /* display where we are in the source/document file */
+ xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(curUrl)).arg(curLine));
+ }
+ if (curUrl)
+ xmlFree(curUrl);
+
+ }
+ nameTemp = fullQName(callPointItem->info->templateURI,
+ callPointItem->info->templateName);
+ modeTemp = fullQName(callPointItem->info->modeURI,
+ callPointItem->info->modeName);
+ if (nameTemp && modeTemp){
+ /* display information about the current XSLT template */
+ xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\" mode: \"%3\"").arg(depth - 1).arg(xsldbgText(nameTemp)).arg(xsldbgText(modeTemp)));
+ if (callPointItem->info->url)
+ /* display where we are in the source/document file */
+ xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(callPointItem->info->url)).arg(callPointItem->lineNo));
+ else
+ xsldbgGenericErrorFunc("\n");
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ result = 0;
+ }
+ if (nameTemp){
+ xmlFree(nameTemp);
+ nameTemp = NULL;
+ }
+ if(modeTemp){
+ xmlFree(modeTemp);
+ modeTemp = NULL;
+ }
+
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Call stack item not found at depth %d : xslDbgPrintCallStack\n", depth);
+#endif
+ result = 0;
+ break;
+ }
+ }
+ if (callStackGetDepth() == 0)
+ xsldbgGenericErrorFunc(i18n("\tNo items in call stack.\n"));
+ else
+ xsldbgGenericErrorFunc("\n");
+ }
+ } else {
+ long templateDepth = atol((char *) arg);
+
+
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ /* should never happen but just in case, when running as a
+ * thread always provide NO params to the where command */
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Notification of a frame not supported\n");
+#endif
+ result = 0;
+ return result;
+ }
+
+ if (templateDepth >= 0) {
+ callPointItem = callStackGet(templateDepth + 1);
+ if (callPointItem && callPointItem->info) {
+ /* display information about the current XSLT template */
+ xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\"").arg(templateDepth).arg(xsldbgText(callPointItem->info->templateName)));
+ /* should alays be present but .. */
+ if (callPointItem->info->url)
+ /* display where we are in the source/document file */
+ xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(callPointItem->info->url)).arg(callPointItem->lineNo));
+ else
+ xsldbgGenericErrorFunc("\n");
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Call stack item not found at templateDepth %d : xslDbgPrintCallStack\n", depth);
+#endif
+ result = 0;
+ }
+ }
+ }
+ return result;
+}
+
+
+/**
+ * xslDbgSleep:
+ * @delay : the number of microseconds to delay exection by
+ *
+ * Delay execution by a specified number of microseconds. On some system
+ * this will not be at all accurate.
+ */
+void
+xslDbgSleep(long delay)
+{
+#ifdef HAVE_USLEEP
+ usleep(delay);
+#else
+#ifdef WIN32
+ Sleep(delay / 1000);
+#else
+ /* try to delay things by doing a lot of floating point
+ * multiplication
+ */
+ long loop1, loop2;
+ float f1 = 1.0000001, f2;
+
+ for (loop1 = 0; loop1 < 100000 * delay; loop1++)
+ for (loop2 = 0; loop2 < 100000; loop2++) {
+ f2 = f1 * f1;
+ }
+#endif
+#endif
+}
+
+
+/**
+ * xslDbgWalkContinue:
+ *
+ * Delay execution for time as indicated by OPTION_WALK_SPEED
+ * Can only be called from within shellPrompt!
+ * OPTION_WALK_SPEED != WALKSPEED_STOP
+ *
+ * Returns 1 if walk is to continue,
+ * 0 otherwise
+ */
+int
+xslDbgWalkContinue(void)
+{
+ int result = 0, speed = optionsGetIntOption(OPTIONS_WALK_SPEED);
+
+ /* We need to ensure that output is realy sent. Otherwise
+ * walking using xemacs under WIN32 will not work */
+ fflush(stderr);
+
+ switch (speed) {
+ case WALKSPEED_1:
+ case WALKSPEED_2:
+ case WALKSPEED_3:
+ case WALKSPEED_4:
+ case WALKSPEED_5:
+ case WALKSPEED_6:
+ case WALKSPEED_7:
+ case WALKSPEED_8:
+ case WALKSPEED_9:
+ /* see options.h for defintion of WALKDAY */
+ xslDbgSleep(speed * WALKDELAY);
+ result = 1;
+ break;
+
+ default: /* stop walking */
+ optionsSetIntOption(OPTIONS_WALK_SPEED, WALKSPEED_STOP);
+ xslDebugStatus = DEBUG_STOP;
+ break;
+ }
+
+ return result;
+}
+
+
+/**
+ * addBreakPointNode:
+ * @payload : valid breakPointPtr
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+addBreakPointNode(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xmlNodePtr node = searchBreakPointNode((breakPointPtr) payload);
+
+ searchAdd(node);
+}
+
+
+/**
+ * addSourceNode:
+ * @payload : valid xsltStylesheetPtr
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+addSourceNode(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xmlNodePtr node = searchSourceNode((xsltStylesheetPtr) payload);
+
+ searchAdd(node);
+}
+
+
+/**
+ * addTemplateNode:
+ * @payload : valid xsltTemplatePtr
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+addTemplateNode(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xmlNodePtr node =
+ searchTemplateNode(((xsltTemplatePtr) payload)->elem);
+ searchAdd(node);
+}
+
+
+/**
+ * addGlobalNode:
+ * @payload : valid xmlNodePtr of global variable
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+addGlobalNode(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xmlNodePtr node = searchGlobalNode((xmlNodePtr) payload);
+
+ searchAdd(node);
+}
+
+
+/**
+ * addLocalNode:
+ * @payload : valid xmlNodePtr of local variable
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+addLocalNode(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xmlNodePtr node = searchLocalNode((xmlNodePtr) payload);
+
+ searchAdd(node);
+}
+
+
+/**
+ * addIncludeNode:
+ * @payload : valid xmlNodePtr of include instuction
+ * @data : not used
+ * @name : not used
+ *
+ * Convert payload into format needed, and add to search dataBase
+ */
+void
+addIncludeNode(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xmlNodePtr node = searchIncludeNode((xmlNodePtr) payload);
+
+ searchAdd(node);
+}
+
+
+/**
+ * addCallStackItems:
+ *
+ * Convert call stack items into format needed, and add to search dataBase
+ */
+void
+addCallStackItems(void)
+{
+ callPointPtr item;
+ xmlNodePtr node;
+ int depth;
+
+ for (depth = callStackGetDepth(); depth > 0; depth--) {
+ item = callStackGet(depth);
+ if (item) {
+ node = searchCallStackNode(item);
+ if (node)
+ searchAdd(node);
+ }
+ }
+}
+
+
+/**
+ * updateSearchData:
+ * @styleCtxt: Not used
+ * @style: Is valid
+ * @data: Not used but MUST be NULL for the moment
+ * @variableTypes: What types of variables to look
+ *
+ * Update the searchDatabase
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+updateSearchData(xsltTransformContextPtr styleCtxt,
+ xsltStylesheetPtr style,
+ void *data, VariableTypeEnum variableTypes)
+{
+ Q_UNUSED(styleCtxt);
+ Q_UNUSED(variableTypes);
+ int result = 0;
+
+ if (!style) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to update search database no stylesheet loaded\n");
+#endif
+ return result;
+ }
+ searchEmpty();
+ xsldbgGenericErrorFunc(i18n("Information: Updating search database. This may take a while...\n"));
+ /* add items to the search dataBase */
+ addCallStackItems();
+ xsldbgGenericErrorFunc(i18n("Information: Looking for breakpoints.\n"));
+ walkBreakPoints((xmlHashScanner) addBreakPointNode, data);
+ xsldbgGenericErrorFunc(i18n("Information: Looking for imports and top-level stylesheets.\n"));
+ walkStylesheets((xmlHashScanner) addSourceNode, data, style);
+ xsldbgGenericErrorFunc(i18n("Information: Looking for xsl:includes.\n"));
+ walkIncludeInst((xmlHashScanner) addIncludeNode, data, style);
+ xsldbgGenericErrorFunc(i18n("Information: Looking for templates.\n"));
+ walkTemplates((xmlHashScanner) addTemplateNode, data, style);
+ xsldbgGenericErrorFunc(i18n("Information: Looking for global variables.\n"));
+ walkGlobals((xmlHashScanner) addGlobalNode, data, style);
+ xsldbgGenericErrorFunc(i18n("Information: Looking for local variables.\n"));
+ walkLocals((xmlHashScanner) addLocalNode, data, style);
+ xsldbgGenericErrorFunc(i18n("Information: Formatting output.\n"));
+
+ result = searchSave(NULL);
+ return result;
+}
+
+
+/**
+ * debugXSLBreak:
+ * @templ: The source node being executed
+ * @node: The data node being processed
+ * @root: The template being applied to "node"
+ * @ctxt: The transform context for stylesheet being processed
+ *
+ * A break point has been found so pass control to user
+ */
+void
+debugXSLBreak(xmlNodePtr templ, xmlNodePtr node, xsltTemplatePtr root,
+ xsltTransformContextPtr ctxt)
+{
+ xmlDocPtr tempDoc = NULL;
+ xmlNodePtr tempNode = NULL;
+ rootCopy = root;
+ static const xmlChar *lastTemplate = NULL;
+ xmlBufferPtr buffer = xmlBufferCreate();
+ static char mybuff[6] = " 0\n\x0";
+
+ if (ctxt && templ && root && !xsldbgReachedFirstTemplate)
+ xsldbgReachedFirstTemplate = true;
+
+ if (templ == NULL) {
+ tempDoc = xmlNewDoc((xmlChar *) "1.0");
+ if (!tempDoc)
+ return;
+ tempNode = xmlNewNode(NULL, (xmlChar *) "xsldbg_default_node");
+ if (!tempNode) {
+ xmlFreeDoc(tempDoc);
+ return;
+ }
+ xmlAddChild((xmlNodePtr) tempDoc, tempNode);
+ templ = tempNode;
+ }
+
+ if (node == NULL)
+ node = (xmlNodePtr) filesGetMainDoc();
+
+ if (node == NULL) {
+ tempDoc = xmlNewDoc((xmlChar *) "1.0");
+ if (!tempDoc)
+ return;
+ tempNode = xmlNewNode(NULL, (xmlChar *) "xsldbg_default_node");
+ if (!tempNode) {
+ xmlFreeDoc(tempDoc);
+ return;
+ }
+ xmlAddChild((xmlNodePtr) tempDoc, tempNode);
+ node = tempNode;
+ }
+ if (root) {
+ xmlChar *nameTemp = NULL, *modeTemp = NULL;
+ nameTemp = fullQName(root->nameURI, root->name);
+ modeTemp = fullQName(root->modeURI, root->mode);
+ if (!nextCommandActive){
+ /* we only want messages if we are not
+ in the process of completing the next command */
+ if (terminalIO == NULL) {
+
+ if (root->match){
+ xsldbgGenericErrorFunc(i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(root->match)).arg(xsldbgText(modeTemp)));
+ if (lastTemplate != root->match && buffer){
+ xmlBufferCCat(buffer, "\nreached matched template:");
+ xmlBufferCat(buffer, root->match);
+ xmlBufferCCat(buffer, mybuff);
+ xsltCopyTextString(ctxt, ctxt->insert,xmlBufferContent(buffer),0);
+ mybuff[1]++;
+ lastTemplate = root->match;
+ }
+ }else{
+ xsldbgGenericErrorFunc(i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(nameTemp)).arg(xsldbgText(modeTemp)));
+ if (lastTemplate != root->name && buffer){
+ xmlBufferCCat(buffer, "\nreached named template:");
+ xmlBufferCat(buffer,root->match);
+ xmlBufferCCat(buffer,mybuff);
+ xsltCopyTextString(ctxt, ctxt->insert,xmlBufferContent(buffer),0);
+ mybuff[1]++;
+ lastTemplate = root->name;
+ }
+
+ }
+ if (buffer)
+ xmlBufferFree(buffer);
+ } else {
+ if ((xslDebugStatus == DEBUG_TRACE) ||
+ (xslDebugStatus == DEBUG_WALK)) {
+ QString message;
+ if (root->match)
+ message = i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(root->match)).arg(xsldbgText(modeTemp));
+ else
+ message = i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(nameTemp)).arg(xsldbgText(modeTemp));
+ fprintf(terminalIO, "%s", message.local8Bit().data());
+ }
+ }
+ }
+ if (nameTemp)
+ xmlFree(nameTemp);
+ if (modeTemp)
+ xmlFree(modeTemp);
+ }
+
+ shellPrompt(templ, node, (xmlChar *) "index.xsl",
+ (xmlShellReadlineFunc) xslDbgShellReadline, stdout, ctxt);
+ if (tempDoc)
+ xmlFreeDoc(tempDoc);
+}
+
+
+/* Highly modified function based on xmlShell */
+
+/**
+ * shellPrompt:
+ * @source: The current stylesheet instruction being executed
+ * @doc: The current document node being processed
+ * @filename: Not used
+ * @input: The function to call to when reading commands from stdio
+ * @output: Where to put the results
+ * @styleCtxt: Is valid
+ *
+ * Present to the user the xsldbg shell
+ */
+void
+shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
+ xmlShellReadlineFunc input, FILE * output,
+ xsltTransformContextPtr styleCtxt)
+{
+ xmlChar prompt[DEBUG_BUFFER_SIZE] = "/ > ";
+ xmlChar *cmdline = NULL, *cur;
+ int nbargs = 0;
+ int loadedFiles = 0;
+ int commandId = -1; /* stores what was the last
+ * command id entered by user */
+ xmlChar command[DEBUG_BUFFER_SIZE]; /* holds the command user entered */
+ xmlChar arg[DEBUG_BUFFER_SIZE]; /* holds any extra arguments to
+ * command entered */
+ xmlChar dir[DEBUG_BUFFER_SIZE]; /* temporary buffer used by where
+ * and pwd commands */
+ int cmdResult; /* result of last command */
+ int shortCutId = -1; /* used by cd command */
+ int i;
+ static int showSource = 1; /* Do we first show source or data ? */
+ xmlChar *baseUri = NULL; /* for used for included xml entities */
+ const xmlChar *breakUri;
+
+ /* for convenience keep track of which node was last
+ * selected of source and doc */
+ xmlNodePtr lastSourceNode, lastDocNode;
+
+
+ xmlShellCtxtPtr ctxt;
+ int exitShell = 0; /* Indicate when to exit xslShell */
+
+ if (source == NULL){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Source NULL in shellPrompt\n");
+#endif
+ return;
+ }
+ if (doc == NULL){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: doc NULL in shellPrompt\n");
+#endif
+ return;
+ }
+ if (filename == NULL){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: fileName NULL in shellPrompt\n");
+#endif
+ return;
+ }
+ if (input == NULL){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Input function NULL in shellPrompt\n");
+#endif
+ return;
+ }
+ if (output == NULL){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Output NULL in shellPrompt\n");
+#endif
+ return;
+ }
+ ctxt = (xmlShellCtxtPtr) xmlMalloc(sizeof(xmlShellCtxt));
+ if (ctxt == NULL){
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ return;
+ }
+
+ /* flag that we've received control */
+ debugGotControl(1);
+ ctxt->loaded = 0;
+ lastSourceNode = source;
+ lastDocNode = doc;
+ /* show the doc or source first? */
+ if (showSource) {
+ ctxt->doc = source->doc;
+ ctxt->node = source;
+ xsldbgUpdateFileDetails(source);
+ } else {
+ ctxt->doc = doc->doc;
+ ctxt->node = (xmlNodePtr) doc;
+ xsldbgUpdateFileDetails((xmlNodePtr) doc);
+ }
+
+ ctxt->input = input;
+ ctxt->output = output;
+ ctxt->filename = (char *) xmlStrdup((xmlChar *) filename);
+
+
+ if (xsldbgStop == 1){
+ xslDebugStatus = DEBUG_STOP;
+ optionsSetIntOption(OPTIONS_TRACE, TRACE_OFF);
+ optionsSetIntOption(OPTIONS_WALK_SPEED, WALKSPEED_STOP);
+ xsldbgStop = 0;
+ }
+
+ /* let any listener know that we got to a new line */
+ if (xslDebugStatus != DEBUG_TRACE) {
+ /* don't send notify message if we are tracing stylesheet */
+ int breakpoint = 1;
+
+ notifyXsldbgApp(XSLDBG_MSG_LINE_CHANGED, &breakpoint);
+ }
+
+
+ /* If using a thread and the thread is running then we don't need to
+ * send this as the application will see the XSLDBG_MSG_LINE_CHANGED message */
+ if ((getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED) ||
+ (xslDebugStatus == DEBUG_TRACE)) {
+ QString messageTxt;
+ if (!nextCommandActive && ctxt->node && ctxt->node && ctxt->node->doc
+ && ctxt->node->doc->URL) {
+ if (!showSource) {
+ baseUri = filesGetBaseUri(ctxt->node);
+ if (baseUri != NULL)
+ breakUri = baseUri;
+ else
+ breakUri = ctxt->node->doc->URL;
+ } else
+ breakUri = ctxt->node->doc->URL;
+
+ if (xmlGetLineNo(ctxt->node) != -1)
+ messageTxt = i18n("Breakpoint for file \"%1\" at line %2.\n").arg(xsldbgUrl(breakUri)).arg(xmlGetLineNo(ctxt->node));
+ else
+ messageTxt = i18n("Breakpoint at text node in file \"%1\".\n").arg(xsldbgUrl(breakUri));
+ if (baseUri != NULL) {
+ xmlFree(baseUri);
+ baseUri = NULL;
+ }
+
+ if (((xslDebugStatus == DEBUG_TRACE) ||
+ (xslDebugStatus == DEBUG_WALK)) && (terminalIO != NULL))
+ fprintf(terminalIO, "%s", messageTxt.utf8().data());
+ else
+ xsldbgGenericErrorFunc(messageTxt);
+
+ }
+ }
+ if ((showWatchesActive && (xslDebugStatus == DEBUG_TRACE)) ||
+ (xslDebugStatus == DEBUG_WALK)){
+ ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
+ if (ctxt->pctxt) {
+ xslDbgShellShowWatches(styleCtxt, ctxt, 0);
+ xsldbgGenericErrorFunc("\n");
+ xmlXPathFreeContext(ctxt->pctxt);
+ ctxt->pctxt = NULL;
+ }
+ }
+
+ if (xslDebugStatus == DEBUG_TRACE) {
+ if (ctxt->filename)
+ xmlFree(ctxt->filename);
+ xmlFree(ctxt);
+ return; /* All done. Trace next instruction/node */
+ }
+ if (xslDebugStatus == DEBUG_WALK) {
+ if (xslDbgWalkContinue()) {
+ if (ctxt->filename)
+ xmlFree(ctxt->filename);
+ xmlFree(ctxt);
+ return; /* All done. Walk to next instruction/node */
+ }
+ }
+
+ ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
+ if (ctxt->pctxt == NULL) {
+ xmlFree(ctxt);
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ return;
+ }
+
+ if (showWatchesActive){
+ xslDbgShellShowWatches(styleCtxt, ctxt, 0);
+ xsldbgGenericErrorFunc("\n");
+ }
+
+ while (!exitShell && (xslDebugStatus != DEBUG_QUIT)) {
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) {
+ if (ctxt->node == (xmlNodePtr) ctxt->doc)
+ snprintf((char *) prompt, DEBUG_BUFFER_SIZE - 1,
+ "(xsldbg) %s > ", "/");
+ else if ((ctxt->node->name) && (ctxt->node->ns))
+ snprintf((char *) prompt, DEBUG_BUFFER_SIZE - 1,
+ "(xsldbg) %s:%s > ", ctxt->node->ns->prefix,
+ ctxt->node->name);
+ else if (ctxt->node->name)
+ snprintf((char *) prompt, DEBUG_BUFFER_SIZE - 1,
+ "(xsldbg) %s > ", ctxt->node->name);
+
+ else
+ snprintf((char *) prompt, DEBUG_BUFFER_SIZE - 1,
+ "(xsldbg) ? > ");
+
+ prompt[sizeof(prompt) - 1] = 0;
+
+ /*
+ * Get a new command line
+ */
+ if (nextCommandActive && (xslDebugStatus == DEBUG_STEP))
+ /* we are processing the "next command" do the next
+ part of the command which is the up command */
+ cmdline = xmlStrdup((xmlChar*)"up");
+ else
+ cmdline = (xmlChar *) ctxt->input((char *) prompt);
+ if (cmdline && (optionsGetIntOption(OPTIONS_UTF8_INPUT) == 0)) {
+ /* we are getting encoded characters from the command line
+ * so decode them into UTF-8 */
+ xmlChar *tempResult = filesDecode(cmdline);
+
+ if (tempResult) {
+ xmlFree(cmdline);
+ cmdline = tempResult;
+ }
+ }
+ } else {
+ /* don't need a prompt for running as when running as a thread */
+ xmlStrCpy(messageBuffer, "");
+ if (nextCommandActive && (xslDebugStatus == DEBUG_STEP))
+ /* we are processing the "next command" do the next
+ part of the command which is the up command */
+ cmdline = xmlStrdup((xmlChar*)"up");
+ else
+ cmdline = (xmlChar *) ctxt->input((char *) messageBuffer);
+ }
+
+ if (cmdline == NULL)
+ break;
+
+ /* don't allow next command to be active more than at one breakpoint */
+ if (nextCommandActive)
+ nextCommandActive = 0;
+
+ notifyXsldbgApp(XSLDBG_MSG_PROCESSING_INPUT, NULL);
+
+ /* remove leading/trailing blanks */
+ trimString(cmdline);
+
+ /*
+ * Parse the command itself
+ */
+ cur = cmdline;
+ nbargs = 0;
+ while ((*cur == ' ') || (*cur == '\t'))
+ cur++;
+ i = 0;
+ while ((*cur != ' ') && (*cur != '\t') &&
+ (*cur != '\n') && (*cur != '\r')) {
+ if (*cur == 0)
+ break;
+ command[i++] = *cur++;
+ }
+ command[i] = 0;
+ if (i == 0)
+ continue;
+ nbargs++;
+
+ /*
+ * Parse the argument
+ */
+ while ((*cur == ' ') || (*cur == '\t'))
+ cur++;
+ i = 0;
+ while ((*cur != '\n') && (*cur != '\r') && (*cur != 0)) {
+ if (*cur == 0)
+ break;
+ arg[i++] = *cur++;
+ }
+ arg[i] = 0;
+ if (i != 0)
+ nbargs++;
+
+
+ commandId = lookupName(command, (xmlChar **) commandNames);
+ /* try command shorts if command is not found */
+ if (commandId < 0)
+ commandId =
+ lookupName(command, (xmlChar **) shortCommandNames);
+
+ cmdResult = -1; /* flag that it contains no result */
+ /*
+ * start interpreting the command
+ */
+ switch (commandId + DEBUG_HELP_CMD) {
+ /* --- Help related commands --- */
+ case DEBUG_HELP_CMD:
+ cmdResult = helpTop(arg);
+ if (!cmdResult)
+ xsldbgGenericErrorFunc(i18n("Unable to print local help. Online help can be found at http://xsldbg.sourceforge.net/docs/index.html.\n"));
+ break;
+
+
+ /* --- Running related commands --- */
+ case DEBUG_BYE_CMD:
+ case DEBUG_EXIT_CMD:
+ case DEBUG_QUIT_CMD:
+ /* allow the stylesheet to exit */
+ xslDebugStatus = DEBUG_QUIT;
+ exitShell++;
+ cmdResult = 1;
+ break;
+
+ case DEBUG_NEXT_CMD:
+ xslDebugStatus = DEBUG_STEP;
+ exitShell++;
+ cmdResult = 1;
+ /* Do the the next part of this command
+ which is the up command */
+ nextCommandActive = 1;
+ break;
+
+ case DEBUG_STEP_CMD:
+ xslDebugStatus = DEBUG_STEP;
+ exitShell++;
+ cmdResult = 1;
+ break;
+
+ case DEBUG_STEPUP_CMD:
+ {
+ xmlChar *noOfFrames = arg;
+
+ /* skip until next space character */
+ while (*noOfFrames && (*noOfFrames != ' ')) {
+ noOfFrames++;
+ }
+ cmdResult = xslDbgShellFrameBreak(noOfFrames, 1);
+ exitShell++;
+ }
+ break;
+
+ case DEBUG_STEPDOWN_CMD:
+ {
+ xmlChar *noOfFrames = arg;
+
+ /* skip until next space character */
+ while (*noOfFrames && (*noOfFrames != ' ')) {
+ noOfFrames++;
+ }
+ cmdResult = xslDbgShellFrameBreak(noOfFrames, 0);
+ exitShell++;
+ }
+ break;
+
+ /* continue to next break point */
+ case DEBUG_CONT_CMD:
+ xslDebugStatus = DEBUG_CONT;
+ exitShell++;
+ cmdResult = 1;
+ break;
+
+ /* restart */
+ case DEBUG_RUN_CMD:
+ xslDebugStatus = DEBUG_RUN_RESTART;
+ exitShell++;
+ cmdResult = 1;
+ break;
+
+
+ /* --- Template related commands --- */
+ case DEBUG_TEMPLATES_CMD:
+ {
+ int allFiles = 1, verbose = 1;
+
+ if (xmlStrLen(arg) && (xmlStrCmp(arg, "this") == 0)) {
+ allFiles = 0;
+ }
+
+ /* be verbose when printing template names */
+ /* if args is not empty then print names this stylesheet */
+ cmdResult =
+ xslDbgShellPrintTemplateNames(styleCtxt, ctxt, arg,
+ verbose, allFiles);
+ break;
+ }
+
+
+ case DEBUG_WHERE_CMD:
+ /* Print the current working directory as well */
+ xslDbgPrintCallStack(NULL);
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) {
+ if (!xmlShellPwd(ctxt, (char *) dir, ctxt->node, NULL)){
+ xsldbgGenericErrorFunc((const char*)dir);
+ xsldbgGenericErrorFunc("\n");
+ }
+ }
+ cmdResult = 1;
+
+ break;
+
+ case DEBUG_FRAME_CMD:
+ cmdResult = xslDbgPrintCallStack(arg);
+ break;
+
+ case DEBUG_STYLESHEETS_CMD:
+ cmdResult = xslDbgShellPrintStyleSheets(arg);
+ break;
+
+ /* --- Break point related commands --- */
+ case DEBUG_BREAK_CMD:
+ if (xmlStrLen(arg)) {
+ if (styleCtxt)
+ cmdResult =
+ xslDbgShellBreak(arg, styleCtxt->style,
+ styleCtxt);
+ else
+ cmdResult = xslDbgShellBreak(arg, NULL, styleCtxt);
+ } else {
+ /* select current node to break at */
+ xmlChar buff[100];
+ xmlChar *tempBaseName = filesGetBaseUri(ctxt->node);
+ if (tempBaseName){
+ snprintf((char *) buff, sizeof(buff), "-l %s %ld",
+ tempBaseName,
+ xmlGetLineNo(ctxt->node));
+ xmlFree(tempBaseName);
+ }
+ if (styleCtxt)
+ cmdResult =
+ xslDbgShellBreak(buff, styleCtxt->style,
+ styleCtxt);
+ else
+ cmdResult =
+ xslDbgShellBreak(buff, NULL, styleCtxt);
+ }
+
+ break;
+
+ case DEBUG_SHOWBREAK_CMD:
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListStart(XSLDBG_MSG_BREAKPOINT_CHANGED);
+ walkBreakPoints((xmlHashScanner)
+ xslDbgShellPrintBreakPoint, NULL);
+ notifyListSend();
+ } else {
+ xsldbgGenericErrorFunc("\n");
+ printCount = 0; /* printCount will get updated by
+ * xslDbgShellPrintBreakPoint */
+
+ walkBreakPoints((xmlHashScanner)
+ xslDbgShellPrintBreakPoint, NULL);
+ if (printCount == 0)
+ xsldbgGenericErrorFunc(i18n("\nNo breakpoints are set for the file.\n"));
+ else
+ xsldbgGenericErrorFunc(i18n("\tTotal of %n breakpoint present.","\tTotal of %n breakpoints present.", printCount) + QString("\n"));
+ }
+ cmdResult = 1;
+ break;
+
+ case DEBUG_DELETE_CMD:
+ if (xmlStrLen(arg))
+ cmdResult = xslDbgShellDelete((xmlChar *) arg);
+ else {
+ breakPointPtr breakPtr = NULL;
+ xmlChar* tempBaseName = filesGetBaseUri(ctxt->node);
+
+ if (tempBaseName){
+ breakPtr =
+ breakPointGet(tempBaseName,
+ xmlGetLineNo(ctxt->node));
+ xmlFree(tempBaseName);
+ }
+ if (!breakPtr || !breakPointDelete(breakPtr)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to delete breakpoint.\n"));
+ cmdResult = 0;
+ }
+ }
+ break;
+
+ case DEBUG_ENABLE_CMD:
+ if (xmlStrLen(arg))
+ cmdResult =
+ xslDbgShellEnable(arg, XSL_TOGGLE_BREAKPOINT);
+ else {
+ breakPointPtr breakPtr = NULL;
+ xmlChar * tempBaseName = filesGetBaseUri(ctxt->node);
+
+ if (tempBaseName){
+ breakPtr =
+ breakPointGet(tempBaseName,
+ xmlGetLineNo(ctxt->node));
+ xmlFree(tempBaseName);
+ }
+ if (!breakPtr ||
+ (!breakPointEnable(breakPtr, !(breakPtr->flags & BREAKPOINT_ENABLED)))) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to enable/disable breakpoint.\n"));
+ cmdResult = 0;
+ }
+ }
+ break;
+
+ case DEBUG_DISABLE_CMD:
+ if (xmlStrLen(arg))
+ cmdResult = xslDbgShellEnable(arg, 0);
+ else {
+ breakPointPtr breakPtr = NULL;
+ xmlChar *tempBaseName = filesGetBaseUri(ctxt->node);
+
+ if (tempBaseName){
+ breakPtr =
+ breakPointGet(tempBaseName,
+ xmlGetLineNo(ctxt->node));
+ xmlFree(tempBaseName);
+ }
+ if (!breakPtr || !breakPointEnable(breakPtr, 0)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to enable/disable breakpoint.\n"));
+ cmdResult = 0;
+ }
+ }
+ break;
+
+
+
+ /* --- Node view related commands --- */
+ case DEBUG_LS_CMD:
+ cmdResult = xslDbgShellPrintList(ctxt, arg, 0);
+ break;
+
+ case DEBUG_DIR_CMD:
+ cmdResult = xslDbgShellPrintList(ctxt, arg, 1);
+ break;
+
+ case DEBUG_DU_CMD:
+ xmlShellDu(ctxt, NULL, ctxt->node, NULL);
+ cmdResult = 1;
+ break;
+
+ case DEBUG_CAT_CMD:
+ case DEBUG_PRINT_CMD:
+ cmdResult = xslDbgShellCat(styleCtxt, ctxt, arg);
+ break;
+
+ case DEBUG_PWD_CMD:
+ if (!xmlShellPwd(ctxt, (char *) dir, ctxt->node, NULL)) {
+ xmlChar* tempBaseName = filesGetBaseUri(ctxt->node);
+ if(tempBaseName){
+ xsldbgGenericErrorFunc("\n");
+ xsldbgGenericErrorFunc((char*)dir);
+ xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2").arg(xsldbgUrl(tempBaseName)).arg(xmlGetLineNo(ctxt->node)));
+ xmlFree(tempBaseName);
+ cmdResult = 1;
+ }
+ }
+ if (cmdResult)
+ xsldbgGenericErrorFunc("\n");
+ else
+ xsldbgGenericErrorFunc(i18n("Error: Unable to print working directory.\n"));
+ break;
+
+ case DEBUG_DUMP_CMD:
+ xmlDebugDumpDocument(stdout, ctxt->doc);
+ cmdResult = 1;
+ break;
+
+ case DEBUG_BASE_CMD:
+ xmlShellBase(ctxt, NULL, ctxt->node, NULL);
+ cmdResult = 1;
+ break;
+
+
+ /* --- Variable related commands --- */
+ case DEBUG_GLOBALS_CMD:
+ if (loadedFiles == 0)
+ cmdResult = xslDbgShellPrintVariable(styleCtxt, arg,
+ DEBUG_GLOBAL_VAR);
+ else {
+ xsldbgGenericErrorFunc(i18n("Error: Need to use the run command first.\n"));
+ cmdResult = 0;
+ }
+ break;
+
+ case DEBUG_LOCALS_CMD:
+ if (loadedFiles == 0)
+ /* if gdb compatability mode is enable print the globals then
+ * the locals */
+ if (optionsGetIntOption(OPTIONS_GDB) == 1) {
+ cmdResult =
+ xslDbgShellPrintVariable(styleCtxt, arg,
+ DEBUG_GLOBAL_VAR);
+ if (cmdResult == 1)
+ cmdResult =
+ xslDbgShellPrintVariable(styleCtxt, arg,
+ DEBUG_LOCAL_VAR);
+ } else
+ cmdResult =
+ xslDbgShellPrintVariable(styleCtxt, arg,
+ DEBUG_LOCAL_VAR);
+ else {
+ xsldbgGenericErrorFunc(i18n("Error: Need to use the run command first.\n"));
+ cmdResult = 0;
+ }
+ break;
+
+
+ /* It's difficult to put the following commands into
+ * a separe file so they stay here! */
+ /* --- Node selection related commands --- */
+ case DEBUG_SOURCE_CMD:
+ cmdResult = 1; /* only one case where this will command fail */
+ xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
+ if (xmlStrLen(arg) == 0) {
+ if (ctxt->doc == doc->doc)
+ lastDocNode = ctxt->node;
+ ctxt->doc = source->doc;
+ ctxt->node = lastSourceNode;
+ if (ctxt->pctxt)
+ xmlXPathFreeContext(ctxt->pctxt);
+ ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
+ showSource = 1;
+ xsldbgUpdateFileDetails((xmlNodePtr) ctxt->node);
+ /* let any listener know that we got to a new line */
+ notifyXsldbgApp(XSLDBG_MSG_LINE_CHANGED, NULL);
+ if (ctxt->pctxt == NULL) {
+ xmlFree(ctxt);
+ xslDebugStatus = DEBUG_QUIT;
+ return;
+ } else
+ break;
+ } else {
+ /* load new stylesheet file, actual loading happens later */
+ xmlChar *expandedName = filesExpandName(arg);
+
+ if (expandedName) {
+ xsldbgGenericErrorFunc(i18n("Load of source deferred. Use the run command.\n"));
+
+ optionsSetStringOption(OPTIONS_SOURCE_FILE_NAME,
+ expandedName);
+ notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
+ loadedFiles = 1;
+ xmlFree(expandedName);
+ cmdResult = 1;
+ } else {
+ cmdResult = 0;
+ }
+ }
+ break;
+
+ case DEBUG_DATA_CMD:
+ cmdResult = 1; /* only one case where this will command fail */
+ xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
+ if (xmlStrLen(arg) == 0) {
+ if (ctxt->doc == source->doc)
+ lastSourceNode = ctxt->node;
+ ctxt->doc = doc->doc;
+ ctxt->node = lastDocNode;
+ if (ctxt->pctxt)
+ xmlXPathFreeContext(ctxt->pctxt);
+ ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
+ showSource = 0;
+ xsldbgUpdateFileDetails((xmlNodePtr) ctxt->node);
+ /* let any listener know that we got to a new line */
+ notifyXsldbgApp(XSLDBG_MSG_LINE_CHANGED, NULL);
+ if (ctxt->pctxt == NULL) {
+ xmlFree(ctxt);
+ xslDebugStatus = DEBUG_QUIT;
+ return;
+ } else
+ break;
+ } else {
+ /* load new xml file actual loading hapens later */
+ xmlChar *expandedName = filesExpandName(arg);
+
+ if (expandedName) {
+ xsldbgGenericErrorFunc(i18n("Load of data file deferred. Use the run command.\n"));
+
+ optionsSetStringOption(OPTIONS_DATA_FILE_NAME,
+ expandedName);
+ notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
+ loadedFiles = 1;
+ xmlFree(expandedName);
+ cmdResult = 1;
+ } else {
+ cmdResult = 0;
+ }
+ }
+ break;
+
+ case DEBUG_OUTPUT_CMD:
+ /* set the output file name to use */
+ cmdResult = xslDbgShellOutput(arg);
+ break;
+
+ case DEBUG_CD_CMD:
+ /* use dir as a working buffer */
+ xmlStrnCpy(dir, arg, 2);
+ dir[2] = '\0';
+ shortCutId = lookupName(dir, (xmlChar **) cdShortCuts);
+ if (shortCutId >= 0) {
+ if (xmlStrLen(arg) == 2) {
+ cmdResult = xslDbgCd(styleCtxt, ctxt, (xmlChar *)
+ cdAlternative[shortCutId],
+ source);
+ } else {
+
+ xmlStrCpy(dir, cdAlternative[shortCutId]);
+ xmlStrCat(dir, &arg[2]);
+ cmdResult = xslDbgCd(styleCtxt, ctxt, dir, source);
+ }
+
+ } else
+ cmdResult = xslDbgCd(styleCtxt, ctxt, arg, source);
+ break;
+
+
+ /* --- File related commands --- */
+ case DEBUG_ENTITIES_CMD:
+ cmdResult = xslDbgEntities();
+ break;
+
+ case DEBUG_SYSTEM_CMD:
+ /* strip off a single argument. I need to do it this
+ way because I've already public this API */
+ {
+ xmlChar *systemID;
+ if (splitString(arg, 1, &systemID) == 1){
+ cmdResult = xslDbgSystem(systemID);
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("system"));
+ }
+ }
+ break;
+
+ case DEBUG_PUBLIC_CMD:
+ /* strip off a single argument. I need to do it this
+ way because I've already public this API */
+ {
+ xmlChar *publicID;
+ if (splitString(arg, 1, &publicID) == 1){
+ cmdResult = xslDbgPublic(publicID);
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("public"));
+ }
+ }
+ break;
+
+ case DEBUG_ENCODING_CMD:
+ cmdResult = xslDbgEncoding(arg);
+ break;
+
+ case DEBUG_VALIDATE_CMD:
+ xsldbgGenericErrorFunc(i18n("Warning: The %1 command is disabled.\n").arg("validate"));
+ cmdResult = 0;
+ /*
+ * xmlShellValidate(ctxt, arg, NULL, NULL);
+ */
+ break;
+
+ case DEBUG_LOAD_CMD:
+ cmdResult = optionsLoad();
+ /* restart xsldbg and activate new configuration */
+ if (cmdResult == 1) {
+ xslDebugStatus = DEBUG_RUN_RESTART;
+ exitShell++;
+ }
+ break;
+
+ case DEBUG_SAVE_CMD:
+ cmdResult = optionsSave();
+ break;
+
+ case DEBUG_WRITE_CMD:
+ xsldbgGenericErrorFunc(i18n("Warning: The %1 command is disabled.\n").arg("write"));
+ cmdResult = 0;
+ /*
+ * xmlShellWrite(ctxt, arg, NULL, NULL);
+ */
+ break;
+
+ case DEBUG_FREE_CMD:
+ xsldbgGenericErrorFunc(i18n("Warning: The %1 command is disabled.\n").arg("free"));
+ cmdResult = 0;
+ /*
+ * if (arg[0] == 0) {
+ * xmlMemShow(stdout, 0);
+ * } else {
+ * int len = 0;
+ * sscanf(arg, "%d", &len);
+ * xmlMemShow(stdout, len);
+ * }
+ */
+ break;
+
+
+ /* operating system related */
+ case DEBUG_CHDIR_CMD:
+ cmdResult = xslDbgShellChangeWd(arg);
+ break;
+
+ case DEBUG_SHELL_EXEC_CMD:
+ cmdResult = xslDbgShellExecute(arg, 1);
+ break;
+
+
+ /* libxslt parameter related commands */
+ case DEBUG_ADDPARAM_CMD:
+ cmdResult = xslDbgShellAddParam(arg);
+ break;
+
+ case DEBUG_DELPARAM_CMD:
+ cmdResult = xslDbgShellDelParam(arg);
+ break;
+
+ case DEBUG_SHOWPARAM_CMD:
+ cmdResult = xslDbgShellShowParam(arg);
+ break;
+
+
+
+ /* option related commmands */
+ case DEBUG_SETOPTION_CMD:
+ cmdResult = xslDbgShellSetOption(arg);
+ break;
+
+ case DEBUG_OPTIONS_CMD:
+ cmdResult = xslDbgShellOptions();
+ break;
+
+
+
+ /* misc commands */
+ case DEBUG_TTY_CMD:
+ if (openTerminal(arg)) {
+ /* gdb does to say anything after redirecting its
+ output */
+ if (optionsGetIntOption(OPTIONS_GDB) < 2)
+ xsldbgGenericErrorFunc(i18n("Opening terminal %1.\n").arg(xsldbgText(arg)));
+ cmdResult = 1;
+ } else
+ cmdResult = 0;
+ break;
+
+
+ /* language selection for messages */
+ case DEBUG_LANG_CMD:
+#ifdef LOCALE_PREFIX
+ if (xmlStrlen(arg) > 0){
+ setlocale(LC_MESSAGES, (char*)arg);
+ textdomain("kdewebdev/xsldsbg");
+ bindtextdomain("kdewebdev/xsldbg", LOCALE_PREFIX);
+ cmdResult = 1;
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("lang"));
+ cmdResult = 0;
+ }
+#else
+ xsldbgGenericErrorFunc(i18n("Warning: The %1 command is disabled\n").arg("lang"));
+ cmdResult = 1;
+#endif
+ break;
+
+ /* tracing related commands */
+ case DEBUG_TRACE_CMD:
+ if (xslDbgShellTrace(arg)) {
+ exitShell++;
+ cmdResult = 1;
+ } else
+ cmdResult = 0;
+
+ break;
+
+ case DEBUG_WALK_CMD:
+ if (xslDbgShellWalk(arg)) {
+ exitShell++;
+ cmdResult = 1;
+ } else
+ cmdResult = 0;
+ break;
+
+ case DEBUG_ADDWATCH_CMD:
+ cmdResult = xslDbgShellAddWatch(arg);
+ break;
+
+ case DEBUG_DELWATCH_CMD:
+ cmdResult = xslDbgShellDeleteWatch(arg);
+ break;
+
+ case DEBUG_SHOWWATCH_CMD:
+ trimString(arg);
+ switch (arg[0]){
+ case '\0':
+ cmdResult = xslDbgShellShowWatches(styleCtxt, ctxt, 1);
+ break;
+
+ case '0':
+ case '1':
+ showWatchesActive = arg[0] - '0';
+ cmdResult = 1;
+ break;
+
+ default:
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("showmatch"));
+ }
+ break;
+
+
+ /* search related commands */
+ case DEBUG_SEARCH_CMD:
+ cmdResult =
+ xslDbgShellSearch(styleCtxt, filesGetStylesheet(),
+ arg);
+ break;
+
+
+
+ case DEBUG_SET_CMD:
+ cmdResult = xslDbgShellSetVariable(styleCtxt, arg);
+ break;
+
+ default:
+ xsldbgGenericErrorFunc(i18n("Error: Unknown command %1. Try help.\n").arg(xsldbgText(command)));
+ cmdResult = 0;
+ }
+
+ /* KDbg likes to get the marker after every command so here it is */
+ if ((optionsGetIntOption(OPTIONS_GDB) >1) && optionsGetIntOption(OPTIONS_VERBOSE) && !nextCommandActive
+ && (commandId != DEBUG_STEPUP_CMD - DEBUG_HELP_CMD)) {
+ if (ctxt->node && ctxt->node &&
+ ctxt->node->doc && ctxt->node->doc->URL) {
+
+ if (xmlGetLineNo(ctxt->node) != -1)
+ xsldbgGenericErrorFunc(i18n("Breakpoint for file \"%1\" at line %2.\n").arg(xsldbgUrl(ctxt->node->doc->URL)).arg(xmlGetLineNo(ctxt->node)));
+ else
+ xsldbgGenericErrorFunc(i18n("Breakpoint at text node in file \"%1\".\n").arg(xsldbgUrl(ctxt->node->doc->URL)));
+ }
+ }
+
+ /* notify any listeners of that the command failed */
+ if (cmdResult == 0 && (xmlStrlen(messageBuffer) > 0)) {
+ snprintf((char *) messageBuffer, sizeof(messageBuffer),
+ "\nRequest to xsldbg failed:%s\n", cmdline);
+ notifyTextXsldbgApp(XSLDBG_MSG_TEXTOUT,
+ (char *) messageBuffer);
+ }
+
+ xmlFree(cmdline);
+ cmdline = NULL;
+ }
+
+ xmlXPathFreeContext(ctxt->pctxt);
+
+ if (ctxt->filename)
+ xmlFree(ctxt->filename);
+
+ xmlFree(ctxt);
+
+ if (cmdline)
+ xmlFree(cmdline);
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.h b/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.h
new file mode 100644
index 00000000..df50a53b
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.h
@@ -0,0 +1,1078 @@
+
+/**************************************************************************
+ debugXSL.h - describes the core xsldbg shell functions
+ -------------------
+ begin : Sun Sep 16 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ **************************************************************************/
+
+/**************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ **************************************************************************/
+
+/*
+ * Orinal file : debugXML.h : This is a set of routines used for
+ * debugging the tree produced by the XML parser.
+ *
+ * New file : debugXSL.h : Debug support version
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <daniel@veillard.com>
+ *
+ * Permission abtained to modify the LGPL'd code and extend to include
+ * break points, inspections of stylesheet source, xml data, stylesheet
+ * variables Keith Isdale <k_isdale@tpg.com.au>
+ */
+
+#ifndef __DEBUG_XSL__
+#define __DEBUG_XSL__
+
+#ifdef USE_XSLDBG_AS_THREAD
+#include "xsldbgmsg.h"
+#include "xsldbgthread.h"
+#endif
+
+/* We want skip most of these includes when building documentation*/
+#ifndef BUILD_DOCS
+#include "utils.h"
+#include "breakpoint.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DEBUG_BUFFER_SIZE 500 /*used by xslDbgShell */
+
+/* how may items have been printed */
+ extern int printCount;
+
+ /* used to indicated that xsldbg should stop tracing/walking
+ value : 1 stop tracing at start of next cycle
+ value : 0 normal operation
+ */
+
+ extern int xsldbgStop;
+ extern int xsldbgValidateBreakpoints;
+ /* Some versions of libxml/libxslt need a different type of
+ line numbers handling */
+ extern int xsldbgHasLineNumberFix;
+ extern bool xsldbgReachedFirstTemplate;
+
+/****************************************************************
+ * *
+ * The XSL shell related structures and functions *
+ * *
+ ****************************************************************/
+
+/*
+ Note that functions that have a prefix of xslDbgShell are NOT implemented
+ in debugXSL.c unless stated
+
+ All functions with the prefix of debygXSL are implemented in debugXSL.c
+
+ */
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * debugXSLBreak:
+ * @templ: The source node being executed
+ * @node: The data node being processed
+ * @root: The template being applied to "node"
+ * @ctxt: The transform context for stylesheet being processed
+ *
+ * A break point has been found so pass control to user
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * A break point has been found so pass control to user
+ *
+ * @param templ The source node being executed
+ * @param node The data node being processed
+ * @param root The template being applied to "node"
+ * @param ctxt transform context for stylesheet being processed
+ */
+#endif
+#endif
+ void debugXSLBreak(xmlNodePtr templ, xmlNodePtr node,
+ xsltTemplatePtr root, xsltTransformContextPtr ctxt);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * debugXSLGetTemplate:
+ *
+ * Get the last template node found, if any
+ *
+ * Returns The last template node found, if any
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Get the last template node found, if any
+ *
+ * @returns the last template node found, if any
+ */
+#endif
+#endif
+ xsltTemplatePtr debugXSLGetTemplate(void);
+
+
+
+/* -----------------------------------------
+ Break Point related commands
+
+ They are implemented in breakpoint_cmds.c
+ ------------------------------------------- */
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellFrameBreak:
+ * @arg: Is valid number of frames to change location by
+ * @stepup: If != 1 then we step up, otherwise step down
+ *
+ * Set a "frame" break point either up or down from here
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Set a "frame" break point either up or down from here
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg Is valid and in UTF-8
+ * @param stepup If != 1 then we step up, otherwise step down
+ */
+#endif
+#endif
+ int xslDbgShellFrameBreak(xmlChar * arg, int stepup);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellBreak:
+ * @arg: Is valid and in UTF-8
+ * @style: Is valid
+ * @ctxt: Is valid
+ *
+ * Add break point specified by arg
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Add break point specified by arg
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg Is valid and in UTF-8
+ * @param style Is valid
+ * @param ctxt Is valid
+ */
+#endif
+#endif
+ int xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style,
+ xsltTransformContextPtr ctxt);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellDelete:
+ * @arg: Is valid and in UTF-8
+ *
+ * Delete break point specified by arg
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Delete break point specified by arg
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg Is valid and in UTF-8
+ */
+#endif
+#endif
+ int xslDbgShellDelete(xmlChar * arg);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellEnableBreakPoint:
+ * @payload: A valid xslBreakPointPtr
+ * @data: Enable type, a pointer to an integer
+ * for a value of
+ * 1 enable break point
+ * 0 disable break point
+ * -1 toggle enabling of break point
+ * @name: Not used
+ *
+ * Enable/disable break points via use of scan of break points
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Enable/disable break points via use of scan of break points
+ *
+ * @param payload Is valid xslBreakPointPtr
+ * @param data Enable type, a pointer to an integer
+ * for a value of
+ * @li 1 enable break point
+ * @li 0 disable break point
+ * @li -1 toggle enabling of break point
+ * @param name Not used
+*/
+#endif
+#endif
+ void xslDbgShellEnableBreakPoint(void *payload, void *data,
+ xmlChar * name);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellEnable:
+ * @arg : is valid enable "commmand text" and in UTF-8
+ * @enableType : enable break point if 1, disable if 0, toggle if -1
+ *
+ * Enable/disable break point specified by arg using enable
+ * type of @enableType
+ * Returns 1 if successful,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Enable/disable break point specified by arg using enable
+ *
+ * @param arg: is valid enable "commmand text" and in UTF-8
+ * @param enableType : enable break point if 1, disable if 0, toggle if -1
+ *
+ * @returns 1 if successful,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int xslDbgShellEnable(xmlChar * arg, int enableType);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellPrintBreakPoint:
+ * @payload: A valid xslBreakPointPtr
+ * @data: Not used
+ * @name: Not used
+ *
+ * Print data given by scan of break points
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print data given by scan of break points
+ *
+ * @param payload Is valid xslBreakPointPtr
+ * @param data Not used
+ * @param name Not used
+*/
+#endif
+#endif
+ void xslDbgShellPrintBreakPoint(void *payload, void *data,
+ xmlChar * name);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellValidateBreakPoint:
+ * @payload: A valid xslBreakPointPtr
+ * @data: Not used
+ * @name: Not used
+ *
+ * Print an warning if a breakpoint is invalid
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print an warning if a breakpoint is invalid
+ *
+ * @param payload Is valid xslBreakPointPtr
+ * @param data Not used
+ * @param name Not used
+*/
+#endif
+#endif
+ void xslDbgShellValidateBreakPoint(void *payload, void *data,
+ xmlChar * name);
+
+
+/* -----------------------------------------
+ Template related commands
+
+ They are implemented in template_cmds.c
+ ------------------------------------------- */
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellPrintStyleSheets:
+ * @arg: The stylesheets of interests and in UTF-8, is NULL for all stylesheets
+ *
+ * Print stylesheets that can be found in loaded stylsheet
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print stylesheets that can be found in loaded stylsheet
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg The stylesheets of interests and in UTF-8, is NULL for all stylesheets
+ *
+ */
+#endif
+#endif
+ int xslDbgShellPrintStyleSheets(xmlChar * arg);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellPrintTemplateNames:
+ * @styleCtxt: Is valid
+ * @ctxt: Not used
+ * @arg: Not used
+ * @verbose: If 1 then print extra messages about templates found,
+ * otherwise print normal messages only
+ * @allFiles: If 1 then look for all templates in stylsheets found in
+ * @styleCtxt
+ * otherwise look in the stylesheet found by
+ * debugXSLBreak function
+ *
+ * Print out the list of template names found that match critieria
+*
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print out the list of template names found that match critieria
+ *
+ * @param styleCtxt Is valid
+ * @param ctxt Not used
+ * @param arg Not used
+ * @param verbose If 1 then print extra messages about templates found,
+ * otherwise print normal messages only
+ * @param allFiles If 1 then look for all templates in stylsheets found in
+ * @p styleCtxt
+ * otherwise look in the stylesheet found by
+ * debugXSLBreak function
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int xslDbgShellPrintTemplateNames(xsltTransformContextPtr styleCtxt,
+ xmlShellCtxtPtr ctxt,
+ xmlChar * arg, int verbose,
+ int allFiles);
+
+
+
+
+/* -----------------------------------------
+
+ Node viewing related commands
+
+ ------------------------------------------- */
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellPrintList:
+ * @ctxt: The current shell context
+ * @arg: What xpath to display and in UTF-8
+ * @dir: If 1 print in dir mode?,
+ * otherwise ls mode
+ *
+ * Print list of nodes in either ls or dir format
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print list of nodes in either ls or dir format
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param ctxt The current shell context
+ * @param arg What xpath to display and in UTF-8
+ * @param dir If 1 print in dir mode,
+ * otherwise ls mode
+ */
+#endif
+#endif
+ int xslDbgShellPrintList(xmlShellCtxtPtr ctxt, xmlChar * arg, int dir);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellCat:
+ * @styleCtxt: the current stylesheet context
+ * @ctxt: The current shell context
+ * @arg: The xpath to print and in UTF-8
+ *
+ * Print the result of an xpath expression. This can include variables
+ * if styleCtxt is not NULL
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print the result of an xpath expression. This can include variables
+ * if styleCtxt is not NULL
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param styleCtxt Current stylesheet context
+ * @param ctxt Current shell context
+ * @param arg The xpath to print and in UTF-8
+ */
+#endif
+#endif
+ int xslDbgShellCat(xsltTransformContextPtr styleCtxt,
+ xmlShellCtxtPtr ctxt, xmlChar * arg);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellPrintVariable:
+ * @styleCtxt: The current stylesheet context
+ * @arg: The name of variable to look for '$' prefix is optional and in UTF-8
+ * @type: A valid VariableTypeEnum
+ *
+ * Print the value variable specified by args.
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print the value variable specified by args.
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+
+ *
+ * @param styleCtxt The current stylesheet context
+ * @param arg The name of variable to look for '$' prefix is optional and in UTF-8
+ * @param type Is valid VariableTypeEnum
+ */
+#endif
+#endif
+ int xslDbgShellPrintVariable(xsltTransformContextPtr styleCtxt,
+ xmlChar * arg, VariableTypeEnum type);
+
+
+/* -----------------------------------------
+
+ File related command
+
+ Implemented in file_cmds.c
+ ------------------------------------------- */
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellOutput:
+ * @arg : Is valid, either a local file name which will be expanded
+ * if needed, or a "file://" protocol URI
+ *
+ * Set the output file name to use
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * xslDbgShellOutput:
+ * @arg : Is valid, either a local file name which will be expanded
+ * if needed, or a "file://" protocol URI
+ *
+ * Set the output file name to use
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int xslDbgShellOutput(const xmlChar *arg);
+
+
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * xslDbgEntities:
+ *
+ * Print list of entites found
+ *
+ * Returns 1 on sucess,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+#endif
+#endif
+ int xslDbgEntities(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * xslDbgSystem:
+ * @arg : Is valid in UTF-8
+ *
+ * Print what a system file @arg maps to via the current xml catalog
+ *
+ * Returns 1 on sucess,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Print what a system file @p arg maps to via the current xml catalog
+ *
+ * @param arg Is valid in UTF-8
+ *
+ * @returns 1 on sucess,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int xslDbgSystem(const xmlChar * arg);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * xslDbgPublic:
+ * @arg : Is valid PublicID in UTF-8
+ *
+ * Print what a public ID @arg maps to via the current xml catalog
+ *
+ * Returns 1 on sucess,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Print what a public ID @p arg maps to via the current xml catalog
+ *
+ * @param arg Is valid PublicID in UTF-8
+ *
+ * @returns 1 on sucess,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int xslDbgPublic(const xmlChar * arg);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * xslDbgEncoding:
+ * @arg: Is valid encoding supported by libxml2
+ *
+ * Set current encoding to use for output to standard output
+ *
+ * Returns 1 on sucess,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Set current encoding to use for output to standard output
+ *
+ * @param arg Is valid encoding supported by libxml2
+ *
+ *
+ * Returns 1 on sucess,
+ */
+#endif
+#endif
+ int xslDbgEncoding(xmlChar * arg);
+
+/* -----------------------------------------
+
+ Operating system related commands
+
+ Implemented in os_cmds.c
+ ------------------------------------------- */
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellChangeWd:
+ * @path: The path to change to and in UTF-8
+ *
+ * Change the current working directory of the operating system
+ *
+ * Returns 1 if able to change xsldbg's working directory to @path
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * @returns 1 if able to change xsldbg working direcorty to @p path
+ * 0 otherwise
+ *
+ * @param path Operating system path(directory) to change to and in UTF-8
+ */
+#endif
+#endif
+ int xslDbgShellChangeWd(xmlChar * path);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellExecute:
+ * @name: The name of command string to be executed by operating system shell
+ * @verbose: If 1 then print extra debugging messages,
+ * normal messages otherwise
+ *
+ * Execute an operating system command
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * @returns 1 if able to execute command @p name,
+ * 0 otherwise
+ *
+ * @param name The name of command string to be executed
+ * by operating system shell
+ * @param verbose If 1 then print extra debugging messages,
+ * normal messages otherwise
+ */
+#endif
+#endif
+ int xslDbgShellExecute(xmlChar * name, int verbose);
+
+
+
+
+/* -----------------------------------------
+
+ libxslt parameter related commands
+
+ Implemented in param_cmds.c
+ ------------------------------------------- */
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellAddParam:
+ * @arg: A string comprised of two words separated by
+ * one or more spaces which are in UTF-8.
+ *
+ * Add a libxslt parameter to be sent to libxslt later on
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/*
+ * Add a parameter to be sent to libxslt later on
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg A string comprised of two words separated by
+ * one or more spaces which are in UTF-8
+ */
+#endif
+#endif
+ int xslDbgShellAddParam(xmlChar * arg);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellDelParam:
+ * @arg: A single white space trimmed parameter number to look for
+ *
+ * Delete a libxslt parameter that was to be sent to libxslt later on
+ *
+ * Returns 1 if able to delete parameter @name,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Delete a libxslt parameter that was to be sent to libxslt later on
+ *
+ * @returns 1 if able to delete parameter @p name,
+ * 0 otherwise
+ *
+ * @param arg A single white space trimmed libxslt parameter number to look for
+ */
+#endif
+#endif
+ int xslDbgShellDelParam(xmlChar * arg);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellShowParam:
+ * @arg: Not used
+ *
+ * Print list of current paramters
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Print list of current paramters
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg Not used
+ */
+#endif
+#endif
+ int xslDbgShellShowParam(xmlChar * arg);
+
+
+ /* -----------------------------------------
+ *
+ * Option related commands
+ *
+ * Implemented in option_cmds.c
+ *
+ * ------------------------------------------- */
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellSetOption:
+ * @arg: Is valid, and in the format <NAME> <VALUE>
+ *
+ * Set the value of an option
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Set the value of an option
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg is valid, and in format <NAME> <VALUE>
+ *
+ */
+#endif
+#endif
+ int xslDbgShellSetOption(xmlChar * arg);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellOptions:
+ *
+ * Prints out values for user options
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Prints out values for user options
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int xslDbgShellOptions(void);
+
+
+ /**
+ * xslDbgShellShowWatches:
+ * @styleCtxt: the current stylesheet context
+ * @ctxt: The current shell context
+ * @showWarnings : If 1 then showWarning messages,
+ * otherwise do not show warning messages
+ *
+ * Print the current watches and their values
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+ int xslDbgShellShowWatches(xsltTransformContextPtr styleCtxt,
+ xmlShellCtxtPtr ctx,int showWarnings);
+
+ /**
+ * xslDbgShellAddWatch:
+ * @arg : A valid xPath of expression to watch the value of
+ *
+ * Add expression to list of expressions to watch value of
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+ int xslDbgShellAddWatch(xmlChar* arg);
+
+ /**
+ * xslDbgShellDeleteWatch:
+ * @arg : A watch ID to remove
+ *
+ * Delete a given watch ID from our list of expressions to watch
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+ int xslDbgShellDeleteWatch(xmlChar* arg);
+
+
+ /* -----------------------------------------
+ *
+ * Tracing, walking related commands
+ *
+ * Implemented in shell.c
+ *
+ * ------------------------------------------- */
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellTrace:
+ * @arg: Not used
+ *
+ * Start the tracing of the stylesheet. First need to restart it.
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Start the tracing of the stylesheet. First need to restart it.
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg Not used
+ */
+#endif
+#endif
+ int xslDbgShellTrace(xmlChar * arg);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellWalk:
+ * @arg: An interger between 0 and 9 indicate the speed of walk
+ *
+ * Start walking through the stylesheet.
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Start walking through the stylesheet.
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param arg An interger between 0 and 9 indicate the speed of walk
+ */
+#endif
+#endif
+ int xslDbgShellWalk(xmlChar * arg);
+
+
+
+ /* -----------------------------------------
+ *
+ * Seach related commands
+ *
+ * Implemented in search_cmds.c
+ * ------------------------------------------- */
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellSearch:
+ * @styleCtxt: Is valid
+ * @style: Is valid
+ * @arg: The xpath query to use for searching dataBase
+ *
+ * Displays the result of performing a query on the search dataBase
+ *
+ * Returns 1 if able to run query with @arg,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * @returns 1 if able to run query with @p arg,
+ * 0 otherwise
+ *
+ * @param styleCtxt Is valid
+ * @param style Is valid
+ * @param arg The xpath query to use for searching dataBase
+ */
+#endif
+#endif
+ int xslDbgShellSearch(xsltTransformContextPtr styleCtxt,
+ xsltStylesheetPtr style, xmlChar * arg);
+
+
+/* -----------------------------------------
+
+ Seach related commands
+
+ Implemented in variable_cmds.c
+ ------------------------------------------- */
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xslDbgShellSetVariable:
+ * @styleCtxt : Is valid
+ * @arg : Is valid must be in the format of
+ * <VARIABLE_NAME> <XPATH>
+ *
+ * Change the value of a global or local variable
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Change the value of a global or local variable
+ *
+ * @param styleCtxt Is valid
+ * @param arg Is valid must be in the format of
+ * <VARIABLE_NAME> <XPATH>
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+
+ int xslDbgShellSetVariable(xsltTransformContextPtr styleCtxt,
+ xmlChar * arg);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+ /* __DEBUG_XSL__ */
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp
new file mode 100644
index 00000000..083b33b2
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp
@@ -0,0 +1,274 @@
+
+/***************************************************************************
+ file_cmds.c - define file command related functions
+ -------------------
+ begin : Sat Jan 19 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <stdio.h>
+#include <libxml/tree.h>
+#include <libxml/catalog.h>
+
+#include "xsldbg.h"
+#include "debugXSL.h"
+#include "files.h"
+#include "options.h"
+#include "utils.h"
+#include "xsldbgthread.h"
+
+static char buffer[500];
+
+/**
+ * xslDbgEntities:
+ *
+ * Print list of entites found
+ *
+ * Returns 1 on sucess,
+ * 0 otherwise
+ */
+int
+xslDbgEntities(void)
+{
+ int result = 0;
+
+ if (filesEntityList()) {
+ int entityIndex;
+ entityInfoPtr entInfo;
+
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ /* notify that we are starting new list of entity names */
+ notifyListStart(XSLDBG_MSG_ENTITIY_CHANGED);
+ for (entityIndex = 0;
+ entityIndex < arrayListCount(filesEntityList());
+ entityIndex++) {
+ entInfo = (entityInfoPtr) arrayListGet(filesEntityList(),
+ entityIndex);
+ if (entInfo)
+ notifyListQueue(entInfo);
+
+ }
+ notifyListSend();
+ result = 1;
+ } else {
+ for (entityIndex = 0;
+ entityIndex < arrayListCount(filesEntityList());
+ entityIndex++) {
+ entInfo = (entityInfoPtr) arrayListGet(filesEntityList(),
+ entityIndex);
+ if (entInfo) {
+ /* display identifier of an XML entity */
+ xsldbgGenericErrorFunc(i18n("Entity %1 ").arg(xsldbgText(entInfo->SystemID)));
+ if (entInfo->PublicID)
+ xsldbgGenericErrorFunc(xsldbgText(entInfo->PublicID));
+ xsldbgGenericErrorFunc("\n");
+ }
+ }
+ if (arrayListCount(filesEntityList()) == 0) {
+ xsldbgGenericErrorFunc(i18n("No external General Parsed entities present.\n"));
+ } else {
+ xsldbgGenericErrorFunc(i18n("\tTotal of %n entity found.", "\tTotal of %n entities found.", arrayListCount(filesEntityList())) + QString("\n"));
+ }
+
+ result = 1;
+ }
+ }
+ return result;
+}
+
+
+/**
+ * xslDbgSystem:
+ * @arg : Is valid
+ *
+ * Print what a system file @arg maps to via the current xml catalog
+ *
+ * Returns 1 on sucess,
+ * 0 otherwise
+ */
+int
+xslDbgSystem(const xmlChar * arg)
+{
+ int result = 0;
+ xmlChar *name;
+
+ if (!arg || (xmlStrlen(arg) == 0)) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ name = xmlCatalogResolveSystem(arg);
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ if (name) {
+ notifyXsldbgApp(XSLDBG_MSG_RESOLVE_CHANGE, name);
+ result = 1;
+ xmlFree(name);
+ } else {
+ notifyXsldbgApp(XSLDBG_MSG_RESOLVE_CHANGE, "");
+ xsldbgGenericErrorFunc(i18n("SystemID \"%1\" was not found in current catalog.\n").arg(xsldbgText(arg)));
+ }
+ } else {
+ if (name) {
+ xsldbgGenericErrorFunc(i18n("SystemID \"%1\" maps to: \"%2\"\n").arg(xsldbgText(arg)).arg(xsldbgText(name)));
+ xmlFree(name);
+ result = 1;
+ } else {
+ xsldbgGenericErrorFunc(i18n("SystemID \"%1\" was not found in current catalog.\n").arg(xsldbgText(arg)));
+ }
+ }
+
+ return result;
+}
+
+
+/**
+ * xslDbgPublic:
+ * @arg : Is valid
+ *
+ * Print what a public ID @arg maps to via the current xml catalog
+ *
+ * Returns 1 on sucess,
+ * 0 otherwise
+ */
+int
+xslDbgPublic(const xmlChar * arg)
+{
+ int result = 0;
+ xmlChar *name;
+
+ if (!arg || (xmlStrlen(arg) == 0)) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ name = xmlCatalogResolvePublic(arg);
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ if (name) {
+ notifyXsldbgApp(XSLDBG_MSG_RESOLVE_CHANGE, name);
+ result = 1;
+ xmlFree(name);
+ } else {
+ notifyXsldbgApp(XSLDBG_MSG_RESOLVE_CHANGE, "");
+ xsldbgGenericErrorFunc(i18n("PublicID \"%1\" was not found in current catalog.\n").arg(xsldbgText(arg)));
+ }
+ } else {
+ if (name) {
+ xsldbgGenericErrorFunc(i18n("PublicID \"%1\" maps to: \"%2\"\n").arg(xsldbgText(arg)).arg(xsldbgText(name)));
+ xmlFree(name);
+ result = 1;
+ } else {
+ xsldbgGenericErrorFunc(i18n("PublicID \"%1\" was not found in current catalog.\n").arg(xsldbgText(arg)));
+ }
+ xsltGenericError(xsltGenericErrorContext, "%s", buffer);
+ }
+ return result;
+}
+
+
+/**
+ * xslDbgEncoding:
+ * @arg: Is valid encoding supported by libxml2
+ *
+ * Set current encoding to use for output to standard output
+ *
+ * Returns 1 on sucess,
+ * 0 otherwise
+ */
+int
+xslDbgEncoding(xmlChar * arg)
+{
+ int result = 0;
+ xmlChar *opts[2];
+
+ if (!arg) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ if (splitString(arg, 1, opts) == 1) {
+ if (filesSetEncoding((char *) opts[0])) {
+ optionsSetStringOption(OPTIONS_ENCODING, opts[0]);
+ result = 1;
+ }
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("encoding"));
+ return result;
+}
+
+
+/**
+ * xslDbgShellOutput:
+ * @arg : Is valid, either a local file name which will be expanded
+ * if needed, or a "file://" protocol URI
+ *
+ * Set the output file name to use
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int xslDbgShellOutput(const xmlChar *arg)
+{
+ int result = 0;
+ if (arg && (xmlStrLen(arg) > 0)){
+ if (!xmlStrnCmp(arg, "file:/", 6)){
+ /* convert URI to local file name */
+ xmlChar *outputFileName = filesURItoFileName(arg);
+ if (outputFileName){
+ optionsSetStringOption(OPTIONS_OUTPUT_FILE_NAME,
+ outputFileName);
+ notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
+ xmlFree(outputFileName);
+ result = 1;
+ }
+ } else if (xmlStrEqual(arg, (xmlChar*)"-")) {
+ optionsSetStringOption(OPTIONS_OUTPUT_FILE_NAME,
+ NULL);
+ notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
+ result = 1;
+ } else if (!xmlStrnCmp(arg, "ftp://", 6) || !xmlStrnCmp(arg, "http://", 7)){
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("output"));
+ return 0;
+ } else {
+ /* assume that we were provided a local file name
+ * that may need expanding
+ */
+ xmlChar *expandedName = filesExpandName(arg);
+
+ // The output file must not be the same as our SOURCE or DATA file
+ if (expandedName &&
+ (!xmlStrEqual(optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME), expandedName)) &&
+ (!xmlStrEqual(optionsGetStringOption(OPTIONS_DATA_FILE_NAME), expandedName)) ){
+ optionsSetStringOption(OPTIONS_OUTPUT_FILE_NAME, expandedName);
+ notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
+ xmlFree(expandedName);
+ result = 1;
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("output"));
+ }
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("output"));
+ }
+
+ return result;
+}
+
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/files.cpp b/kxsldbg/kxsldbgpart/libxsldbg/files.cpp
new file mode 100644
index 00000000..73d3713b
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/files.cpp
@@ -0,0 +1,1420 @@
+
+/***************************************************************************
+ files.h - define file related functions
+ -------------------
+ begin : Sat Nov 10 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/* We want skip most of these includes when building documentation */
+#ifndef BUILD_DOCS
+
+#include "xsldbg.h"
+#include <stdio.h>
+#include <libxml/entities.h>
+#include <libxml/tree.h>
+#include <libxml/catalog.h>
+#include <libxml/parserInternals.h>
+#include <libxml/encoding.h> /* needed by filesTranslate, filesEncoding functions */
+#include <libxml/uri.h> /* needed for xmlURIUnescapeString */
+#include "debugXSL.h"
+#include "files.h"
+#include "utils.h"
+#include "options.h"
+#include "xsldbgthread.h"
+#ifdef WIN32
+#include <direct.h>
+#endif
+
+#endif /* BUILD_DOCS */
+
+
+/* top xml document */
+static xmlDocPtr topDocument;
+
+/* temporary xml document */
+static xmlDocPtr tempDocument;
+
+/* used as a scratch pad for temporary results*/
+static xmlChar filesBuffer[DEBUG_BUFFER_SIZE];
+
+/* top stylsheet */
+static xsltStylesheetPtr topStylesheet;
+
+/* what is the base path for top stylesheet */
+static xmlChar *stylePathName = NULL;
+
+/* what is the path for current working directory*/
+static xmlChar *workingDirPath = NULL;
+
+static arrayListPtr entityNameList = NULL;
+
+/* Current encoding to use for standard output*/
+static xmlCharEncodingHandlerPtr stdoutEncoding = NULL;
+
+/* input and output buffers for encoding*/
+static xmlBufferPtr encodeInBuff = NULL;
+static xmlBufferPtr encodeOutBuff = NULL;
+
+/* Current line number and URI for xsldbg*/
+static int currentLineNo = -1;
+static xmlChar *currentUrl = NULL;
+
+/* -----------------------------------------
+ Private function declarations for files.c
+ -------------------------------------------*/
+
+/**
+ * guessStylesheetHelper:
+ * @payload: valid xsltStylesheetPtr
+ * @data: valid searchInfoPtr of type SEARCH_NODE
+ * @name: not used
+ *
+ * Try to guess what the complete file/URI is. If successful the search
+ * info will be set to found and the search data will contain the
+ * file name found. We are given our payload via walkStylesheets
+ */
+static void guessStylesheetHelper(void *payload, void *data,
+ xmlChar * name);
+
+
+/**
+ * guessStylesheetHelper2:
+ * @payload: valid xmlNodePtr of the included stylesheet
+ * @data: valid searchInfoPtr of type SEARCH_NODE
+ * @name: not used
+ *
+ * Try to guess what the complete file/URI is. If successful the search
+ * info will be set to found and the search data will contain the
+ * file name found. We are given our payload via walkIncludes
+ */
+static void guessStylesheetHelper2(void *payload, void *data,
+ xmlChar * name);
+
+
+entityInfoPtr filesNewEntityInfo(const xmlChar * SystemID,
+ const xmlChar * PublicID);
+
+void filesFreeEntityInfo(entityInfoPtr info);
+
+void filesAddEntityName(const xmlChar * SystemID,
+ const xmlChar * PublicID);
+
+
+/* -------------------------------------
+ End private functions
+---------------------------------------*/
+
+
+FILE *terminalIO;
+
+/* No longer needed
+ static FILE *oldStdin, *oldStdout, *oldStderr;*/
+
+
+//static char *ttyName = NULL; /* what is the name of the default terminal */
+static char *termName = NULL; /* what is the name of terminal we are redirected to */
+
+
+/**
+ * redirectToTerminal:
+ * @device: terminal to redirect i/o to , will not work under win32
+ *
+ * Open communications to the terminal device @device
+ *
+ * Returns 1 if sucessful
+ * 0 otherwise
+ */
+int
+openTerminal(xmlChar * device)
+{
+ int result = 0;
+
+ if (!device) { /* Failed; there's no device */
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ /*
+ * On RISC OS, you get one terminal - the screen.
+ * we assume that the parameter is meant to be an output device as
+ * per normal - we can use vdu:, rawvdu: or :tt, or a filename for
+ * normal VDU output, VDU output without newline expansion,
+ * C terminal output with control code escaping, or a raw file
+ * respectively.
+ * The name passed is expected to be in native file format - no
+ * URI escaping here.
+ * One assumes that you might use a socket or a pipe here.
+ */
+
+ if (terminalIO) {
+ fclose(terminalIO);
+ terminalIO = NULL;
+ }
+
+
+ switch (device[0]) {
+ case '\0':
+ case '0':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ /* look like we are supposed to close the terminal
+ * but we've already done that
+ */
+ break;
+
+ case '1':
+ if (termName) {
+ terminalIO = fopen((char *) termName, "w");
+ if (terminalIO != NULL) {
+ xmlFree(termName);
+ termName = xmlMemStrdup((char *) device);
+ result = 1;
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to open terminal %1.\n").arg(xsldbgText(termName)));
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Did not previously open terminal.\n"));
+ }
+ break;
+
+ case '2':
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Warning: Terminal level 2 not implemented\n");
+#endif
+ break;
+
+
+ default:
+ terminalIO = fopen((char *) device, "w");
+ if (terminalIO != NULL) {
+ if (termName)
+ xmlFree(termName);
+ termName = xmlMemStrdup((char *) device);
+ result = 1;
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to open terminal %1.\n").arg(xsldbgText(device)));
+ }
+
+ }
+
+ return result;
+}
+
+
+/**
+ * guessStylesheetHelper:
+ * @payload: valid xsltStylesheetPtr
+ * @data: valid searchInfoPtr of type SEARCH_NODE
+ * @name: not used
+ *
+ * Try to guess what the complete file/URI is. If successful the search
+ * info will be set to found and the search data will contain the
+ * file name found. We are given our payload via walkStylesheets
+ */
+void
+guessStylesheetHelper(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(name);
+ xsltStylesheetPtr style = (xsltStylesheetPtr) payload;
+ searchInfoPtr searchCriteria = (searchInfoPtr) data;
+ nodeSearchDataPtr searchData = NULL;
+ /* where did the directory/URI separator occur */
+ char *lastSlash;
+
+ if (!style || !style->doc || !searchCriteria || !searchCriteria->data
+ || (searchCriteria->type != SEARCH_NODE))
+ return;
+
+ searchData = (nodeSearchDataPtr) searchCriteria->data;
+ if (searchData->nameInput && (searchData->absoluteNameMatch == NULL)) {
+ /* at this point we know that we have not made an absolute match
+ * but we may have made a relative match */
+ if (xmlStrCmp(style->doc->URL, searchData->nameInput) == 0) {
+ /* absolute path match great! */
+ searchData->absoluteNameMatch =
+ (xmlChar *) xmlMemStrdup((char *) style->doc->URL);
+ searchData->node = (xmlNodePtr) style->doc;
+ searchCriteria->found = 1;
+ return;
+ }
+
+
+ /* try to guess we assume that the files are unique */
+ xmlStrCpy(filesBuffer, "__#!__");
+ /* try relative to top stylesheet directory */
+ if (stylePath()) {
+ xmlStrCpy(filesBuffer, stylePath());
+ xmlStrCat(filesBuffer, searchData->nameInput);
+ }
+ if (xmlStrCmp(style->doc->URL, filesBuffer) == 0) {
+ /* guessed right! */
+ searchData->guessedNameMatch =
+ (xmlChar *) xmlMemStrdup((char *) filesBuffer);
+ searchData->node = (xmlNodePtr) style->doc;
+ searchCriteria->found = 1;
+ return;
+ }
+
+ if (workingPath()) {
+ /* try relative to working directory */
+ xmlStrCpy(filesBuffer, workingPath());
+ xmlStrCat(filesBuffer, searchData->nameInput);
+ }
+ if (xmlStrCmp(style->doc->URL, filesBuffer) == 0) {
+ /* guessed right! */
+ searchData->guessedNameMatch =
+ (xmlChar *) xmlMemStrdup((char *) filesBuffer);
+ searchData->node = (xmlNodePtr) style->doc;
+ searchCriteria->found = 1;
+ return;
+ }
+
+
+ /* Find the last separator of the stylsheet's URL */
+ lastSlash = xmlStrChr(style->doc->URL, URISEPARATORCHAR);
+ if (!lastSlash)
+ lastSlash = xmlStrChr(style->doc->URL, PATHCHAR);
+
+ if (lastSlash) {
+ /* Last try, assume nameInput contains only a file name
+ * Strip of the file name at end of the stylesheet doc URL */
+ lastSlash++; /* skip the slash */
+ if (xmlStrCmp(lastSlash, searchData->nameInput) == 0) {
+ /* guessed right! */
+ searchData->guessedNameMatch =
+ (xmlChar *) xmlMemStrdup((char *) style->doc->URL);
+ searchData->node = (xmlNodePtr) style->doc;
+ searchCriteria->found = 1;
+ }
+ }
+ }
+}
+
+
+/**
+ * guessStylesheetHelper2:
+ * @payload: valid xmlNodePtr of the included stylesheet
+ * @data: valid searchInfoPtr of type SEARCH_NODE
+ * @name: not used
+ *
+ * Try to guess what the complete file/URI is. If successful the search
+ * info will be set to found and the search data will contain the
+ * file name found. We are given our payload via walkIncludes
+ */
+void
+guessStylesheetHelper2(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(name);
+ xmlNodePtr node = (xmlNodePtr) payload;
+ searchInfoPtr searchCriteria = (searchInfoPtr) data;
+ nodeSearchDataPtr searchData = NULL;
+ /* where did the directory/URI separator occur */
+ char *lastSlash;
+
+ if (!node || !node->doc || !searchCriteria || !searchCriteria->data ||
+ (searchCriteria->type != SEARCH_NODE))
+ return;
+
+ searchData = (nodeSearchDataPtr) searchCriteria->data;
+ if (searchData->nameInput && (searchData->absoluteNameMatch == NULL)) {
+ /* at this point we know that we have not made an absolute match
+ * but we may have made a relative match */
+ if (xmlStrCmp(node->doc->URL, searchData->nameInput) == 0) {
+ /* absolute path match great! */
+ searchData->absoluteNameMatch =
+ (xmlChar *) xmlMemStrdup((char *) node->doc->URL);
+ searchData->node = node;
+ searchCriteria->found = 1;
+ return;
+ }
+
+
+ /* try to guess we assume that the files are unique */
+ xmlStrCpy(filesBuffer, "__#!__");
+ /* try relative to top stylesheet directory */
+ if (stylePath()) {
+ xmlStrCpy(filesBuffer, stylePath());
+ xmlStrCat(filesBuffer, searchData->nameInput);
+ }
+ if (xmlStrCmp(node->doc->URL, filesBuffer) == 0) {
+ /* guessed right! */
+ searchData->guessedNameMatch =
+ (xmlChar *) xmlMemStrdup((char *) filesBuffer);
+ searchData->node = node;
+ searchCriteria->found = 1;
+ return;
+ }
+
+ if (workingPath()) {
+ /* try relative to working directory */
+ xmlStrCpy(filesBuffer, workingPath());
+ xmlStrCat(filesBuffer, searchData->nameInput);
+ }
+ if (xmlStrCmp(node->doc->URL, filesBuffer) == 0) {
+ /* guessed right! */
+ searchData->guessedNameMatch =
+ (xmlChar *) xmlMemStrdup((char *) filesBuffer);
+ searchData->node = node;
+ searchCriteria->found = 1;
+ return;
+ }
+
+
+ /* Find the last separator of the stylsheet's URL */
+ lastSlash = xmlStrChr(node->doc->URL, URISEPARATORCHAR);
+ if (!lastSlash)
+ lastSlash = xmlStrChr(node->doc->URL, PATHCHAR);
+
+ if (lastSlash) {
+ /* Last try, assume nameInput contains only a file name
+ * Strip of the file name at end of the stylesheet doc URL */
+ lastSlash++; /* skip the slash */
+ if (xmlStrCmp(lastSlash, searchData->nameInput) == 0) {
+ /* guessed right! */
+ searchData->guessedNameMatch =
+ (xmlChar *) xmlMemStrdup((char *) node->doc->URL);
+ searchData->node = node;
+ searchCriteria->found = 1;
+ }
+ }
+ }
+}
+
+
+/**
+ * guessStylesheetName:
+ * @searchInf: Is valid
+ *
+ * Try to find a matching stylesheet name
+ * Sets the values in @searchinf depending on outcome of search
+ */
+void
+guessStylesheetName(searchInfoPtr searchCriteria)
+{
+ nodeSearchDataPtr searchData;
+
+ if (!searchCriteria)
+ return;
+
+ searchData = (nodeSearchDataPtr) searchCriteria->data;
+ if (searchData->nameInput == NULL)
+ return; /* must supply name of file to look for */
+
+ walkStylesheets((xmlHashScanner) guessStylesheetHelper,
+ searchCriteria, filesGetStylesheet());
+ if (!searchCriteria->found) {
+ /* try looking in the included stylesheets */
+ walkIncludes((xmlHashScanner) guessStylesheetHelper2,
+ searchCriteria, filesGetStylesheet());
+ }
+}
+
+
+/**
+ * stylePath:
+ *
+ * Return The base path for the top stylesheet ie
+ * ie URL minus the actual file name
+ *
+ * Returns The base path for the top stylesheet ie
+ * ie URL minus the actual file name
+ */
+xmlChar *
+stylePath(void)
+{
+ return stylePathName;
+}
+
+
+/**
+ * workingPath:
+ *
+ * Return the working directory as set by changeDir function
+ *
+ * Returns The working directory as set by changeDir function
+ */
+xmlChar *
+workingPath(void)
+{
+ return workingDirPath;
+}
+
+
+/**
+ * changeDir:
+ * @path: The path to adopt as new working directory
+ *
+ * Change working directory to path
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+changeDir(const xmlChar * path)
+{
+ int result = 0;
+ int charIndex;
+ const char endString[2] = { PATHCHAR, '\0' };
+ xmlChar *expandedName = NULL;
+
+
+ if (path && (xmlStrLen(path) > 0)) {
+ expandedName = filesExpandName(path);
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Empty path provided to changeDir");
+#endif
+ return result;
+ }
+
+ if (!expandedName)
+ return result; /* out of memory ? */
+
+ if (xmlStrLen(expandedName) + 1 > sizeof(filesBuffer)) {
+ xsldbgGenericErrorFunc(i18n("Error: The file name \"%1\" is too long.\n").arg(xsldbgText(path)));
+ return result;
+ }
+
+ xmlStrCpy(filesBuffer, expandedName);
+ /* strip off any extra PATHCHAR's as win32's chdir function
+ * fails if we don't */
+ charIndex = xmlStrLen(filesBuffer) - 1;
+ while (charIndex && (filesBuffer[charIndex] == PATHCHAR)) {
+ charIndex--;
+ }
+ filesBuffer[charIndex + 1] = '\0';
+
+
+ if (chdir((char *) filesBuffer) == 0) {
+ if (workingDirPath)
+ xmlFree(workingDirPath);
+ /* must have path char at end of path name */
+ xmlStrCat(filesBuffer, endString);
+ workingDirPath = (xmlChar *) xmlMemStrdup((char *) filesBuffer);
+ result = 1;
+ }
+ xmlFree(expandedName); /* this will always be valid time */
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to change to directory %1.\n").arg(xsldbgText(path)));
+ } else {
+ if (xslDebugStatus != DEBUG_NONE)
+ xsldbgGenericErrorFunc(i18n("Changed to directory %1.\n").arg(xsldbgText(path)));
+ }
+ return result;
+}
+
+
+/**
+ * filesLoadXmlFile:
+ * @path: xml file to load
+ * @fileType: A valid FileTypeEnum
+ *
+ * Load specified file type, freeing any memory previously used
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+filesLoadXmlFile(const xmlChar * path, FileTypeEnum fileType)
+{
+ int result = 0;
+
+ if (!filesFreeXmlFile(fileType))
+ return result;
+
+ switch (fileType) {
+ case FILES_XMLFILE_TYPE:
+ if (path && xmlStrLen(path)) {
+ if (optionsGetIntOption(OPTIONS_SHELL)) {
+ xsldbgGenericErrorFunc(i18n("Setting XML Data file name to %1.\n").arg(xsldbgText(path)));
+ }
+ optionsSetStringOption(OPTIONS_DATA_FILE_NAME, path);
+ }
+ topDocument = xsldbgLoadXmlData();
+ if (topDocument)
+ result = 1;
+ break;
+
+ case FILES_SOURCEFILE_TYPE:
+ if (path && xmlStrLen(path)) {
+ if (optionsGetIntOption(OPTIONS_SHELL)) {
+ xsldbgGenericErrorFunc(i18n("Setting stylesheet file name to %1.\n").arg(xsldbgText(path)));
+ }
+ optionsSetStringOption(OPTIONS_SOURCE_FILE_NAME, path);
+ }
+ topStylesheet = xsldbgLoadStylesheet();
+ if (topStylesheet && topStylesheet->doc) {
+ /* look for last slash (or baskslash) of URL */
+ char *lastSlash = xmlStrrChr(topStylesheet->doc->URL,
+ PATHCHAR);
+ const char *docUrl =
+ (const char *) topStylesheet->doc->URL;
+
+ result = 1;
+ if (docUrl && lastSlash) {
+ stylePathName = (xmlChar *) xmlMemStrdup(docUrl);
+ stylePathName[lastSlash - docUrl + 1] = '\0';
+ if (optionsGetIntOption(OPTIONS_SHELL)) {
+ xsldbgGenericErrorFunc(i18n("Setting stylesheet base path to %1.\n").arg(xsldbgText(stylePathName)));
+ }
+ } else {
+ const char cwd[4] = { '.', PATHCHAR, '\0' };
+
+ /* ie for *nix this becomes "./" */
+ stylePathName = xmlStrdup(BAD_CAST cwd);
+ }
+
+ /* try to find encoding for this stylesheet */
+ if (optionsGetIntOption(OPTIONS_AUTOENCODE))
+ filesSetEncoding((char *) topStylesheet->encoding);
+ }
+ break;
+
+ case FILES_TEMPORARYFILE_TYPE:
+ if (!path || !xmlStrLen(path)) {
+ xsldbgGenericErrorFunc(i18n("Missing file name.\n"));
+ break;
+ }
+ topDocument = xsldbgLoadXmlTemporary(path);
+ if (tempDocument)
+ result = 1;
+ break;
+ }
+ return result;
+}
+
+
+/**
+ * filesFreeXmlFile:
+ * @fileType: A valid FileTypeEnum
+ *
+ * Free memory associated with the xml file
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+filesFreeXmlFile(FileTypeEnum fileType)
+{
+ int result = 0, type = fileType;
+
+ switch (type) {
+ case FILES_XMLFILE_TYPE:
+ if (topDocument)
+ xmlFreeDoc(topDocument);
+ topDocument = NULL;
+ result = 1;
+ break;
+
+ case FILES_SOURCEFILE_TYPE:
+ if (topStylesheet)
+ xsltFreeStylesheet(topStylesheet);
+ if (stylePathName)
+ xmlFree(stylePathName);
+ stylePathName = NULL;
+ topStylesheet = NULL;
+ result = 1;
+ break;
+
+ case FILES_TEMPORARYFILE_TYPE:
+ if (tempDocument)
+ xmlFreeDoc(tempDocument);
+ tempDocument = NULL;
+ result = 1;
+ break;
+ }
+ return result;
+}
+
+
+/**
+ * filesGetStylesheet:
+ *
+ * Return The topmost stylesheet non-null on success,
+ * NULL otherwise
+ *
+ * Returns The topmost stylesheet non-null on success,
+ * NULL otherwise
+ */
+xsltStylesheetPtr
+filesGetStylesheet(void)
+{
+ return topStylesheet;
+}
+
+
+/**
+ * filesGetTemporaryDoc:
+ *
+ * Return The current "temporary" document
+ *
+ * Returns The current "temporary" document
+ */
+xmlDocPtr
+filesGetTemporaryDoc(void)
+{
+ return tempDocument;
+}
+
+
+/**
+ * filesGetMainDoc:
+ *
+ * Return The main docment
+ *
+ * Returns The main docment
+ */
+xmlDocPtr
+filesGetMainDoc(void)
+{
+ return topDocument;
+}
+
+
+/**
+ * filesReloaded:
+ * @reloaded: if = -1 then ignore @reloaded
+ * otherwise change the status of files to value of @reloaded
+ *
+ * Returns 1 if stylesheet or its xml data file has been "flaged" as reloaded,
+ * 0 otherwise
+ */
+int
+filesReloaded(int reloaded)
+{
+ static int changed = 0;
+
+ if (reloaded >= 0) {
+ changed = reloaded;
+ }
+
+ return changed;
+}
+
+
+
+/**
+ * filesInit:
+ *
+ * Initialize the file related structures
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+filesInit(void)
+{
+ int result = 0;
+
+ terminalIO = NULL;
+#ifdef __riscos
+ ttyName = ":tt"; /* Default tty */
+#endif
+#ifdef HAVE_UNISTD
+ ttyName = ttyname(fileno(stdin));
+ /* save out io for when/if we send debugging to a terminal */
+ oldStdin = stdin;
+ oldStdout = stdout;
+ oldStderr = stderr;
+#endif
+ topDocument = NULL;
+ tempDocument = NULL;
+ topStylesheet = NULL;
+ entityNameList = arrayListNew(4, (freeItemFunc) filesFreeEntityInfo);
+#if defined(HAVE_INCLUDE_FIX) && (LIBXML_VERSION < 20508)
+ xmlSetEntityReferenceFunc(filesEntityRef);
+#endif
+
+ /* setup the encoding */
+ encodeInBuff = xmlBufferCreate();
+ encodeOutBuff = xmlBufferCreate();
+
+ /* check the result so far and lastly perform platform specific
+ * initialization */
+ if (entityNameList && encodeInBuff && encodeOutBuff &&
+ filesPlatformInit())
+ result = 1;
+ return result;
+}
+
+/**
+ * filesFree:
+ *
+ * Free memory used by file related structures
+ */
+void
+filesFree(void)
+{
+ int result;
+
+ if (terminalIO) {
+ fclose(terminalIO);
+ terminalIO = NULL;
+ }
+ if (termName) {
+ xmlFree(termName);
+ termName = NULL;
+ }
+
+ result = filesFreeXmlFile(FILES_SOURCEFILE_TYPE);
+ if (result)
+ result = filesFreeXmlFile(FILES_XMLFILE_TYPE);
+ if (result)
+ result = filesFreeXmlFile(FILES_TEMPORARYFILE_TYPE);
+ if (!result){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to free memory used by XML/XSLT files\n");
+#endif
+ }
+ if (stylePathName) {
+ xmlFree(stylePathName);
+ stylePathName = NULL;
+ }
+
+ if (workingDirPath) {
+ xmlFree(workingDirPath);
+ workingDirPath = NULL;
+ }
+
+ if (entityNameList) {
+ arrayListFree(entityNameList);
+ entityNameList = NULL;
+ }
+
+ /* Free memory used by encoding related structures */
+ if (encodeInBuff)
+ xmlBufferFree(encodeInBuff);
+
+ if (encodeOutBuff)
+ xmlBufferFree(encodeOutBuff);
+
+ /* close current encoding */
+ filesSetEncoding(NULL);
+
+ if (currentUrl)
+ xmlFree(currentUrl);
+
+ /* free any memory used by platform specific files module */
+ filesPlatformFree();
+}
+
+
+/**
+ * filesIsSourceFile:
+ * @fileName : is valid
+ *
+ * Returns true if @name has the ".xsl" externsion
+ */
+int
+filesIsSourceFile(xmlChar * fileName)
+{
+ return strstr((char *) fileName, ".xsl") ||
+ strstr((char *) fileName, ".Xsl") ||
+ strstr((char *) fileName, ".XSL");
+}
+
+
+
+entityInfoPtr
+filesNewEntityInfo(const xmlChar * SystemID, const xmlChar * PublicID)
+{
+
+ entityInfoPtr result = (entityInfoPtr) xmlMalloc(sizeof(entityInfo));
+
+ if (result) {
+ if (SystemID)
+ result->SystemID = xmlStrdup(SystemID);
+ else
+ result->SystemID = xmlStrdup(BAD_CAST "");
+
+ if (PublicID)
+ result->PublicID = xmlStrdup(PublicID);
+ else
+ result->PublicID = xmlStrdup(BAD_CAST "");
+ }
+ return result;
+}
+
+void
+filesFreeEntityInfo(entityInfoPtr info)
+{
+ if (!info)
+ return;
+
+ if (info->SystemID)
+ xmlFree(info->SystemID);
+
+ if (info->PublicID)
+ xmlFree(info->PublicID);
+ xmlFree(info);
+}
+
+/**
+ * filesAddEntityName:
+ * @name : is valid
+ *
+ * Add name to entity name list of know external entities if
+ * it does not already exist in list
+ */
+void
+
+filesAddEntityName(const xmlChar * SystemID, const xmlChar * PublicID)
+{
+ int entityIndex = 0;
+ entityInfoPtr tempItem;
+
+ if (!SystemID || !filesEntityList())
+ return;
+
+ for (entityIndex = 0;
+ entityIndex < arrayListCount(filesEntityList()); entityIndex++) {
+ tempItem =
+ (entityInfoPtr) arrayListGet(filesEntityList(), entityIndex);
+ if (tempItem && xmlStrEqual(SystemID, tempItem->SystemID)) {
+ /* name aready exits so don't add it */
+ return;
+ }
+
+ }
+
+ tempItem = filesNewEntityInfo(SystemID, PublicID);
+ arrayListAdd(filesEntityList(), tempItem);
+}
+
+
+/**
+ * filesEntityRef :
+ * @ent : Is valid as provided by libxslt
+ * @firstNode : Is valid
+ * @lastNode : Is Valid
+ *
+ * Fixes the nodes from firstNode to lastNode so that debugging can occur
+ */
+void
+
+filesEntityRef(xmlEntityPtr ent, xmlNodePtr firstNode, xmlNodePtr lastNode)
+{
+ xmlNodePtr node = firstNode;
+ if (!firstNode || !ent || !ent->SystemID ||
+ (ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) )
+ return;
+
+ if (ent->ExternalID)
+ filesAddEntityName(ent->SystemID, ent->ExternalID);
+ else
+ filesAddEntityName(ent->URI, BAD_CAST "");
+ while (node){
+ filesSetBaseUri(node, ent->URI);
+ if (node != lastNode)
+ node = node->next;
+ else
+ node = NULL;
+ }
+}
+
+
+
+ /**
+ * filesSetBaseUri:
+ * @node : Is valid and has a doc parent
+ * @uri : Is Valid
+ *
+ * Set the base uri for this node. Function is used when xml file
+ * has external entities in its DTD
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+ */
+
+int
+filesSetBaseUri(xmlNodePtr node, const xmlChar * uri)
+{
+ int result = 0;
+
+ if (!node || !uri)
+ return result;
+ else {
+ if (node->type == XML_ELEMENT_NODE){
+ xmlChar *xsldbgUrlCopy = xmlGetProp(node, BAD_CAST "xsldbg:uri");
+ if (!xsldbgUrlCopy)
+ xmlNewProp(node, BAD_CAST "xsldbg:uri", uri);
+ else
+ xmlFree(xsldbgUrlCopy);
+ }
+ result = 1;
+ }
+ return result;
+}
+
+
+ /**
+ * filesGetBaseUri:
+ * @node : Is valid and has a doc parent
+ *
+ * Get a copy of the base uri for this node. Function is most usefull
+ * used when xml file has external entities in its DTD
+ *
+ * Returns the a copy of the base uri for this node,
+ * NULL otherwise
+ */
+xmlChar *
+filesGetBaseUri(xmlNodePtr node)
+{
+ xmlChar *result = NULL;
+
+ if (!node || !node->doc)
+ return result;
+
+ while (node && node->parent) {
+ /*
+ * result = xmlGetNsProp(node, BAD_CAST "uri", XSLDBG_XML_NAMESPACE);
+ */
+ if (node->type == XML_ELEMENT_NODE) {
+ result = xmlGetProp(node, BAD_CAST "xsldbg:uri");
+ if (result)
+ break;
+ }
+ node = node->parent;
+ }
+
+ if (!result && node->doc && node->doc->URL)
+ result = xmlStrdup(node->doc->URL);
+
+ return result;
+}
+
+
+
+
+/**
+ * filesEntityList:
+ *
+ * Return the list entity names used for documents loaded
+ *
+ * Returns the list entity names used for documents loaded
+ */
+arrayListPtr
+filesEntityList(void)
+{
+ return entityNameList;
+}
+
+extern int intVolitileOptions[OPTIONS_LAST_INT_OPTIONID - OPTIONS_FIRST_INT_OPTIONID + 1];
+
+/**
+ * filesLoadCatalogs:
+ *
+ * Load the catalogs specifed by OPTIONS_CATALOG_NAMES if
+ * OPTIONS_CATALOGS is enabled
+ * Returns 1 if sucessful
+ * 0 otherwise
+ */
+int
+filesLoadCatalogs(void)
+{
+ int result = 0;
+ const char *catalogs = NULL;
+
+ xmlCatalogCleanup();
+ if (optionsGetIntOption(OPTIONS_CATALOGS)) {
+ if (optionsGetStringOption(OPTIONS_CATALOG_NAMES) == NULL) {
+ /* use the SGML catalog */
+#ifdef __riscos
+ catalogs = getenv("SGML$CatalogFiles");
+#else
+ catalogs = getenv("SGML_CATALOG_FILES");
+#endif
+ if (catalogs == NULL) {
+#ifdef __riscos
+ xsldbgGenericErrorFunc("Warning: Environment variable SGML$CatalogFiles is not set.\n");
+#else
+ xsldbgGenericErrorFunc("Warning: Environment variabe SGML_CATALOG_FILES FILES not set.\n");
+#endif
+ } else
+ /* copy the current catalog name(s) for user to see */
+ optionsSetStringOption(OPTIONS_CATALOG_NAMES,
+ (xmlChar *) catalogs);
+ } else
+ /* Use the current catalog settings from users*/
+ catalogs = (char *)
+ optionsGetStringOption(OPTIONS_CATALOG_NAMES);
+
+ result = 1;
+ }
+
+ if (catalogs){
+ /* Load the new cataog selection */
+ xmlLoadCatalogs(catalogs);
+ }else{
+ /* Use default catalogs */
+ xmlInitializeCatalog();
+ }
+ return result;
+}
+
+
+
+
+ /**
+ * filesEncode:
+ * @text: Is valid, text to translate from UTF-8,
+ *
+ * Return A new string of converted @text
+ *
+ * Returns A new string of converted @text, may be NULL
+ */
+xmlChar *
+filesEncode(const xmlChar * text)
+{
+ xmlChar *result = NULL;
+
+ if (!text)
+ return result;
+
+ if (!stdoutEncoding || !encodeInBuff || !encodeOutBuff)
+ return xmlStrdup(text); /* no encoding active return as UTF-8 */
+
+ xmlBufferEmpty(encodeInBuff);
+ xmlBufferEmpty(encodeOutBuff);
+ xmlBufferCat(encodeInBuff, text);
+
+ if (xmlCharEncOutFunc(stdoutEncoding, encodeOutBuff, encodeInBuff)
+ >= 0) {
+ result = xmlStrdup(xmlBufferContent(encodeOutBuff));
+ } else {
+ xsldbgGenericErrorFunc(i18n("Encoding of text failed.\n"));
+ return xmlStrdup(text); /* panic, return as UTF-8 */
+ }
+ return result;
+}
+
+
+
+ /**
+ * filesDeccode:
+ * @text: Is valid, text to translate from current encoding to UTF-8,
+ *
+ * Return A string of converted @text
+ *
+ * Returns A string of converted @text, may be NULL
+ */
+xmlChar *
+filesDecode(const xmlChar * text)
+{
+ xmlChar *result = NULL;
+
+ if (!text)
+ return result;
+
+ if (!stdoutEncoding || !encodeInBuff || !encodeOutBuff)
+ return xmlStrdup(text); /* no encoding active return as UTF-8 */
+
+ xmlBufferEmpty(encodeInBuff);
+ xmlBufferEmpty(encodeOutBuff);
+ xmlBufferCat(encodeInBuff, text);
+
+ if (xmlCharEncInFunc(stdoutEncoding, encodeOutBuff, encodeInBuff)
+ >= 0) {
+ result = xmlStrdup(xmlBufferContent(encodeOutBuff));
+ } else {
+ xsldbgGenericErrorFunc(i18n("Encoding of text failed.\n"));
+ return xmlStrdup(text); /* panic, return @text unchanged */
+ }
+ return result;
+}
+
+
+ /*
+ * filesSetEncoding:
+ * @encoding : Is a valid encoding supported by the iconv library or NULL
+ *
+ * Opens encoding for all standard output to @encoding. If @encoding
+ * is NULL then close current encoding and use UTF-8 as output encoding
+ *
+ * Returns 1 if successful in setting the encoding of all standard output
+ * to @encoding
+ * 0 otherwise
+ */
+int
+filesSetEncoding(const char *encoding)
+{
+ int result = 0;
+
+ if (encoding) {
+ /* don't switch encoding unless we've found a valid encoding */
+ xmlCharEncodingHandlerPtr tempEncoding =
+ xmlFindCharEncodingHandler(encoding);
+ if (tempEncoding) {
+ filesSetEncoding(NULL); /* re-use code to close encoding */
+ stdoutEncoding = tempEncoding;
+ result =
+ (xmlCharEncOutFunc(stdoutEncoding, encodeOutBuff, NULL)
+ >= 0);
+ if (!result) {
+ xmlCharEncCloseFunc(stdoutEncoding);
+ stdoutEncoding = NULL;
+ xsldbgGenericErrorFunc(i18n("Unable to initialize encoding %1.").arg(xsldbgText(encoding)));
+ } else
+ optionsSetStringOption(OPTIONS_ENCODING,
+ (xmlChar *) encoding);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Invalid encoding %1.\n").arg(xsldbgText(encoding)));
+ }
+ } else {
+ /* close encoding and use UTF-8 */
+ if (stdoutEncoding)
+ result = (xmlCharEncCloseFunc(stdoutEncoding) >= 0);
+ else
+ result = 1;
+ stdoutEncoding = NULL;
+ }
+ return result;
+}
+
+
+
+ /**
+ * filesMoreFile:
+ * @fileName : May be NULL
+ * @file : May be NULL
+ *
+ * Do a "more" like print of file specified by @fileName OR
+ * @file. If both are provided @file will be used. The content
+ * of file chosen must be in UTF-8, and will be printed in
+ * the current encoding selected.The function will pause output
+ * after FILES_NO_LINES lines have been printed waiting for
+ * user to enter "q" to quit or any other text to continue.
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+ */
+int
+filesMoreFile(const xmlChar * fileName, FILE * file)
+{
+ int result = 0;
+ int openedFile = 0;
+ int lineCount;
+ int reachedEof = 0;
+
+ if (fileName && !file) {
+#ifdef __riscos
+ /* convert into RISC OS format a *nix style file name */
+ fileName = (const xmlChar *) riscosfilename((char *) fileName);
+#endif
+ file = fopen((char *) fileName, "r");
+ openedFile = 1; /* since we opened the file we must close it */
+ }
+ if (file) {
+ while (!feof(file) && !reachedEof) {
+ lineCount = 0;
+ while (!feof(file) && (lineCount < FILES_NO_LINES) &&
+ !reachedEof) {
+ if (fgets((char *) filesBuffer, sizeof(filesBuffer), file)) {
+ xsltGenericError(xsltGenericErrorContext, "%s",
+ filesBuffer);
+ lineCount++;
+ } else {
+ reachedEof = 1;
+ }
+ }
+
+ if (!feof(file) && !reachedEof) {
+ xsldbgGenericErrorFunc(i18n(" ----- more ---- \n"));
+ fflush(stderr);
+ if (fgets((char *) filesBuffer, sizeof(filesBuffer), stdin)) {
+ if ((*filesBuffer == 'q') || (*filesBuffer == 'Q'))
+ reachedEof = 1;
+ } else {
+ reachedEof = 1;
+ }
+ }
+ }
+
+ if (openedFile) {
+ fclose(file);
+ }
+ xsltGenericError(xsltGenericErrorContext, "\n");
+ result = 1;
+ } else {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: No valid file provided to print\n");
+#endif
+ }
+
+
+ return result;
+}
+
+
+ /**
+ * filesSearchResultsPath:
+ *
+ * Get the base path to be used for storing search results
+ *
+ * Returns The base path to be used for storing search results
+ */
+const xmlChar *
+filesSearchResultsPath()
+{
+ const xmlChar *result;
+
+ if (optionsGetStringOption(OPTIONS_SEARCH_RESULTS_PATH))
+ result = optionsGetStringOption(OPTIONS_SEARCH_RESULTS_PATH);
+ else
+ result = stylePath();
+
+ return result;
+}
+
+
+ /**
+ * filesURItoFileName:
+ * @uri : A valid URI that uses the "file://" prefix
+ *
+ * Return A copy of the conversion of @uri to a file name
+ * that is suitable to be used with the fopen function.
+ * May be NULL, if out of memory, @uri does not use the
+ * "file://" prefix, or unable to convert to a valid file name
+ *
+ * Returns A copy of the conversion of @uri to a file name
+ * that is suitable to be used with the fopen function.
+ * May be NULL, if out of memory, @uri does not use the
+ * "file://" prefix, or unable to convert to a valid file name
+ *
+ */
+xmlChar *filesURItoFileName(const xmlChar* uri)
+{
+ xmlChar *result = NULL;
+ xmlChar *unescapedFileName = NULL;
+ const xmlChar* tempName = NULL;
+
+ if (uri){
+ if (!xmlStrnCmp(uri, "file://localhost", 16 )){
+ tempName = uri + 16;
+ }else{
+#if defined(WIN32) && ! defined(CYGWIN)
+ if (!xmlStrnCmp(uri, "file:///", 8))
+ tempName = uri + 8;
+#else
+ if (!xmlStrnCmp(uri, "file:/", 6))
+ tempName = uri + 5; // we need the leading '/'*/
+ while (tempName[0] == '/' && tempName[1] == '/' )
+ tempName++;
+#endif
+ }
+
+ /* If we've found something check to see if the file name
+ found is to be valid */
+ if (tempName)
+ result = (xmlChar*) xmlStrdup(tempName);
+ unescapedFileName = (xmlChar*) xmlStrdup(tempName);
+ if (result && unescapedFileName){
+ if (PATHCHAR != URISEPARATORCHAR){
+ /* Must convert path separators first */
+ xmlChar *probe = result;
+ while(*probe != '\0'){
+ if (*probe == (xmlChar)URISEPARATORCHAR)
+ *probe = (xmlChar)PATHCHAR;
+ probe++;
+ }
+ }
+ /* Now unescape the file name in result so far
+ * NB: An unescaped name takes less memory that an escaped name
+ */
+ xmlURIUnescapeString((char*)result, -1, (char*)unescapedFileName);
+ xmlFree(result);
+ /* success we've got an local unescaped file name */
+ result = unescapedFileName;
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ if (result){
+ xmlFree(result);
+ }
+ if (unescapedFileName) /* not needed, here for completeness */
+ xmlFree(unescapedFileName);
+
+ result = NULL;
+ }
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Unable to convert %1 to local file name.\n").arg(xsldbgText(uri)));
+ }
+
+
+ return result;
+}
+
+
+/* TODO in xsldbg 3.x rename these to use files prefix */
+
+/**
+ * xsldbgUpdateFileDetails:
+ * @node : A valid node
+ *
+ * Update the URL and line number that we stoped at
+ */
+void
+xsldbgUpdateFileDetails(xmlNodePtr node)
+{
+ if ((node != NULL) && (node->doc != NULL)){
+ if (currentUrl != NULL)
+ xmlFree(currentUrl);
+ currentUrl = filesGetBaseUri(node);
+ currentLineNo = xmlGetLineNo(node);
+ }
+}
+
+
+/**
+ * xsldbgLineNo:
+ *
+ * What line number are we at
+ *
+ * Returns The current line number of xsldbg, may be -1
+ **/
+int
+xsldbgLineNo(void)
+{
+ return currentLineNo;
+}
+
+
+/**
+ * xsldbgUrl:
+ *
+ * What URL did we stop at
+ *
+ * Returns A NEW copy of URL stopped at. Caller must free memory for URL.
+ * May be NULL
+ */
+xmlChar *
+xsldbgUrl(void)
+{
+ if (currentUrl != NULL)
+ return (xmlChar *) xmlMemStrdup((char *) currentUrl);
+ else
+ return NULL;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/files.h b/kxsldbg/kxsldbgpart/libxsldbg/files.h
new file mode 100644
index 00000000..05e49828
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/files.h
@@ -0,0 +1,981 @@
+
+/***************************************************************************
+ files.h - define file related functions
+ -------------------
+ begin : Sat Nov 10 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 FILES_H
+#define FILES_H
+
+#ifndef BUILD_DOCS
+
+#include "search.h"
+#include "arraylist.h"
+
+#endif
+
+#ifdef USE_KDE_DOCS
+
+/**
+ * Provide a file support
+ *
+ * @short file support
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+#endif
+
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> /* need chdir function */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ extern FILE *terminalIO;
+
+#define XSLDBG_XML_NAMESPACE \
+ (const xmlChar *) "http://xsldbg.sourceforge.net/namespace"
+
+ typedef struct _entityInfo entityInfo;
+ typedef entityInfo *entityInfoPtr;
+ struct _entityInfo {
+ xmlChar *SystemID;
+ xmlChar *PublicID;
+ };
+
+
+ /* how many lines do we print before pausing when
+ * performing "more" on a UTF-8 file. See function filesMoreFile */
+#define FILES_NO_LINES 20
+
+ /* Define the types of file names that we are intested in when creating
+ * search results */
+#ifndef USE_KDOC
+ typedef enum {
+ FILES_SEARCHINPUT,
+ FILES_SEARCHXSL,
+ FILES_SEARCHRESULT
+ } FilesSearchFileNameEnum;
+#else
+ /* keep kdoc happy */
+ enum FilesSearchFileNameEnum {
+ FILES_SEARCHINPUT,
+ FILES_SEARCHXSL,
+ FILES_SEACHRESULT
+ };
+#endif
+
+
+
+ /*-----------------------------------------------------------
+ General function for working with files
+ -----------------------------------------------------------*/
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesEntityRef :
+ * @ent : Is valid as provided by libxslt
+ * @firstNode : Is valid
+ * @lastNode : Is Valid
+ *
+ * Fixes the nodes from firstNode to lastNode so that debugging can occur
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Fixes the nodes from firstNode to lastNode so that debugging can occur
+ *
+ * @param uri Is valid as provided by libxslt
+ * @param firstNode Is valid
+ * @param lastNode Is Valid
+ */
+#endif
+#endif
+ void filesEntityRef(xmlEntityPtr ent, xmlNodePtr firstNode,
+ xmlNodePtr lastNode);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesEntityList:
+ *
+ * Return the list entity names used for documents loaded
+ *
+ * Returns The list entity names used for documents loaded
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return the list entity names used for documents loaded
+ *
+ * @returns The list entity names used for documents loaded
+ */
+#endif
+#endif
+ arrayListPtr filesEntityList(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesSetBaseUri:
+ * @node : Is valid and has a doc parent
+ * @uri : Is Valid
+ *
+ * Set the base uri for this node. Function is used when xml file
+ * has external entities in its DTD
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Set the base uri for this node. Function is used when xml file
+ * has external entities in its DTD
+ *
+ * @param node Is valid and has a doc parent
+ * @param uri Is Valid
+ *
+ * @returns 1 if successful,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int filesSetBaseUri(xmlNodePtr node, const xmlChar * uri);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesGetBaseUri:
+ * @node : Is valid and has a doc parent
+ *
+ * Get a copy of the base uri for this node. Function is most usefull
+ * used when xml file has external entities in its DTD
+ *
+ * Returns the a copy of the base uri for this node,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Get a copy of the base uri for this node. Function is most usefull
+ * used when xml file has external entities in its DTD
+ *
+ * @param node : Is valid and has a doc parent
+ *
+ * @returns The a copy of the base uri for this node,
+ * NULL otherwise
+ */
+#endif
+#endif
+ xmlChar *filesGetBaseUri(xmlNodePtr node);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesTempFileName:
+ * @fleNumber : Number of temp file required
+ * where @fileNumber is
+ * 0 : file name used by cat command
+ * 1 : file name used by profiling output
+ *
+ * Return the name of tempfile requirested
+ *
+ * This is a platform specific interface
+ *
+ * Returns The name of temp file to be used for temporary results if sucessful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return the name of tempfile requested.
+ * @param fleNumber : Number of temp file required
+ * where @p fileNumber is
+ * 0 : file name used by cat command
+ * 1 : file name used by profiling output
+ *
+ * This is a platform specific interface
+ *
+ * Returns The name of temp file to be used for temporary results if sucessful,
+ * NULL otherwise
+ */
+#endif
+#endif
+ const char *filesTempFileName(int fileNumber);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesLoadCatalogs:
+ *
+ * Load the catalogs specifed by OPTIONS_CATALOG_NAMES if
+ * OPTIONS_CATALOGS is enabled
+ *
+ * Returns 1 if sucessful
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Load the catalogs specifed by OPTIONS_CATALOG_NAMES if
+ * OPTIONS_CATALOGS is enabled
+ *
+ * @returns 1 if sucessful
+ * 0 otherwise
+ */
+#endif
+#endif
+ int filesLoadCatalogs(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesEncode:
+ * @text: Is valid, text to translate from UTF-8,
+ *
+ * Return A string of converted @text
+ *
+ * Returns A string of converted @text, may be NULL
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return A string of converted @text
+ *
+ * @param text Is valid, text to translate from UTF-8,
+ *
+ * Returns A string of converted @text, may be NULL
+ */
+#endif
+#endif
+ xmlChar *filesEncode(const xmlChar * text);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesDeccode:
+ * @text: Is valid, text to translate from current encoding to UTF-8,
+ *
+ * Return A string of converted @text
+ *
+ * Returns A string of converted @text, may be NULL
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return A string of converted @text
+ *
+ * @param test Is valid, text to translate from current encoding to UTF-8,
+ *
+ * Returns A string of converted @text, may be NULL
+ */
+#endif
+#endif
+ xmlChar *filesDecode(const xmlChar * text);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesSetEncoding:
+ * @encoding : Is a valid encoding supported by the iconv library or NULL
+ *
+ * Opens encoding for all standard output to @encoding. If @encoding
+ * is NULL then close current encoding and use UTF-8 as output encoding
+ *
+ * Returns 1 if successful in setting the encoding of all standard output
+ * to @encoding
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Opens encoding for all standard output to @p encoding. If @p encoding
+ * is NULL then close current encoding and use UTF-8 as output encoding
+ *
+ * @param encoding Is a valid encoding supported by the iconv library or NULL
+ *
+ * Returns 1 if successful in setting the encoding of all standard output
+ * to @p encoding
+ * 0 otherwise
+ */
+#endif
+#endif
+ int filesSetEncoding(const char *encoding);
+
+
+#ifndef USE_KDOC
+ /* used by filesLoadXmlFile, filesFreeXmlFile functions */
+ typedef enum {
+ FILES_XMLFILE_TYPE = 100, /* pick a unique starting point */
+ FILES_SOURCEFILE_TYPE,
+ FILES_TEMPORARYFILE_TYPE
+ } FileTypeEnum;
+#else
+
+ /* used by filesLoadXmlFile, filesFreeXmlFile functions */
+ enum FileTypeEnum {
+ FILES_XMLFILE_TYPE = 100, /* pick a unique starting point */
+ FILES_SOURCEFILE_TYPE,
+ FILES_TEMPORARYFILE_TYPE
+ };
+#endif
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * openTerminal
+ * @device: terminal to redirect i/o to , will not work under win32
+ *
+ * Open communications to the terminal device @device
+ * Returns 1 if sucessful
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Open communications to the terminal device @p device
+ *
+ * @param device Terminal to redirect i/o to , will not work under win32
+ *
+ * @returns 1 if sucessful
+ * 0 otherwise
+ */
+#endif
+#endif
+ int openTerminal(xmlChar * device);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * guessStyleSheetName:
+ * @searchInf : Is valid
+ *
+ * Try to find a matching stylesheet name
+ * Sets the values in @searchinf depending on outcome of search
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Try to find a matching stylesheet name
+ * Sets the values in @p searchinf depending on outcome of search
+ *
+ * @param searchInf Is valid
+ */
+#endif
+#endif
+ void guessStylesheetName(searchInfoPtr searchInf);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * stylePath:
+ *
+ * Returns the base path for the top stylesheet ie
+ * ie URL minus the actual file name
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return the base path for the top stylesheet ie
+ * ie URL minus the actual file name
+ *
+ * @returns The base path for the top stylesheet ie
+ * ie URL minus the actual file name
+ */
+#endif
+#endif
+ xmlChar *stylePath(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * workingPath:
+ *
+ * Return the working directory as set by changeDir function
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return the working directory as set by changeDir function
+ *
+ * @return the working directory as set by changeDir function
+ */
+#endif
+#endif
+ xmlChar *workingPath(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * changeDir:
+ * @path : path to adopt as new working directory
+ *
+ * Change working directory to path
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Change working directory to path
+ *
+ * @param path The operating system path(directory) to adopt as
+ * new working directory
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int changeDir(const xmlChar * path);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesLoadXmlFile:
+ * @path : xml file to load
+ * @fileType : A valid FileTypeEnum
+ *
+ * Load specified file type, freeing any memory previously used
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Load specified file type, freeing any memory previously used
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param path The xml file to load
+ * @param fileType A valid FileTypeEnum
+ */
+#endif
+#endif
+ int filesLoadXmlFile(const xmlChar * path, FileTypeEnum fileType);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesFreeXmlFile:
+ * @fileType : A valid FileTypeEnum
+ *
+ * Free memory associated with the xml file
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Free memory associated with the xml file
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param fileType : A valid FileTypeEnum
+ */
+#endif
+#endif
+ int filesFreeXmlFile(FileTypeEnum fileType);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesGetStylesheet:
+ *
+ * Return the topmost stylesheet
+ *
+ * Returns non-null on success,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return the topmost stylesheet
+ *
+ * @returns Non-null on success,
+ * NULL otherwise
+ */
+#endif
+#endif
+ xsltStylesheetPtr filesGetStylesheet(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesGetTemporaryDoc:
+ *
+ * Return the current "temporary" document
+ *
+ * Returns the current "temporary" document
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return the current "temporary" document
+ *
+ * @returns non-null on success,
+ * NULL otherwise
+ */
+#endif
+#endif
+ xmlDocPtr filesGetTemporaryDoc(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesGetMainDoc:
+ *
+ * Returns the main docment
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return the main docment
+ *
+ * @returns the main document
+ */
+#endif
+#endif
+ xmlDocPtr filesGetMainDoc(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesReloaded:
+ * @reloaded : if = -1 then ignore @reloaded
+ * otherwise change the status of files to value of @reloaded
+ *
+ * Returns 1 if stylesheet or its xml data file has been "flaged" as reloaded,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * @returns 1 if stylesheet or its xml data file has been "flaged" as reloaded,
+ * 0 otherwise
+ *
+ * @param reloaded If = -1 then ignore @p reloaded
+ * otherwise change the status of files to value of @p reloaded
+ */
+#endif
+#endif
+ int filesReloaded(int reloaded);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesInit:
+ *
+ * Initialize the file module
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Initialize the file module
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int filesInit(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesFree:
+ *
+ * Free memory used by file related structures
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Free memory used by file related structures
+ */
+#endif
+#endif
+ void filesFree(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesIsSourceFile:
+ * @fileName : Is valid
+ *
+ * Test if filename could be a stylesheet
+ *
+ * Returns true if @name has the ".xsl" extension
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Test if filename could be a stylesheet
+ *
+ * @returns True if @name has the ".xsl" extension
+ *
+ * @param fileName Is valid
+ */
+#endif
+#endif
+ int filesIsSourceFile(xmlChar * fileName);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesMoreFile:
+ * @fileName : May be NULL
+ * @file : May be NULL
+ *
+ * Do a "more" like print of file specified by @fileName OR
+ * @file. If both are provided @file will be used. The content
+ * of file chosen must be in UTF-8, and will be printed in
+ * the current encoding selected.The function will pause output
+ * after FILES_NO_LINES lines have been printed waiting for
+ * user to enter "q" to quit or any other text to continue.
+ *
+ * Returns 1 if successful,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Do a "more" like print of file specified by @fileName OR
+ * @file. If both are provided @file will be used. The content
+ * of file chosen must be in UTF-8, and will be printed in
+ * the current encoding selected. The function will pause output
+ * after FILES_NO_LINES lines have been printed waiting for
+ * user to enter "q" to quit or any other text to continue.
+ *
+ * @returns 1 if successful,
+ * 0 otherwise
+ *
+ * @param fileName May be NULL
+ * @param file May be NULL
+ *
+ */
+#endif
+#endif
+ int filesMoreFile(const xmlChar * fileName, FILE * file);
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesSearchResultsPath:
+ *
+ * Get the base path to be used for storing search results
+ *
+ * Returns The base path to be used for storing search results
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Get the base path to be used for storing search results
+ *
+ * @returns The base path to be used for storing search results
+ */
+#endif
+#endif
+ const xmlChar *filesSearchResultsPath(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesURItoFileName:
+ * @uri : A valid URI that uses the "file://" prefix
+ *
+ * Return A copy of the conversion of @uri to a file name
+ * that is suitable to be used with the fopen function.
+ * May be NULL, if out of memory, @uri does not use the
+ * "file://" prefix, or unable to convert to a valid file name
+ *
+ * Returns A copy of the conversion of @uri to a file name
+ * that is suitable to be used with the fopen function.
+ * May be NULL, if out of memory, @uri does not use the
+ * "file://" prefix, or unable to convert to a valid file name
+ *
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return A copy of the conversion of @uri to a file name
+ * that is suitable to be used with the fopen function.
+ * May be NULL, if out of memory, @uri does not use the
+ * "file://" protocol, or unable to convert to a valid file name
+ *
+ * Returns A copy of the conversion of @uri to a file name
+ * that is suitable to be used with the fopen function.
+ * May be NULL, if out of memory, @uri does not use the
+ * "file://" prefix, or unable to convert to a valid file name
+ *
+ * @param uri A valid URI that uses the "file://" prefix
+ *
+ */
+#endif
+#endif
+ xmlChar *filesURItoFileName(const xmlChar* uri);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xsldbgUpdateFileDetails:
+ * @node : A valid node
+ *
+ * Update the URL and line number that we stoped at
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Update the URL and line number that we stoped at
+ *
+ * @param node A valid node
+ */
+#endif
+#endif
+ void xsldbgUpdateFileDetails(xmlNodePtr node);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * xsldbgLineNo:
+ *
+ * What line number are we at
+ *
+ * Returns The current line number of xsldbg, may be -1
+ **/
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * What line number are we at
+ *
+ * @returns The current line number of xsldbg, may be -1
+ **/
+#endif
+#endif
+ int xsldbgLineNo(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * xsldbgUrl:
+ *
+ * What URL did we stop at
+ *
+ * Returns A NEW copy of URL stopped at. Caller must free memory for URL,
+ * may be NULL
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * What URL did we stop at
+ *
+ * @returns A NEW copy of URL stopped at. Caller must free memory for URL,
+ * may be NULL
+ */
+#endif
+#endif
+ xmlChar *xsldbgUrl(void);
+
+ /*-----------------------------------------------------------
+ Platform specific file functions
+ -----------------------------------------------------------*/
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesPlatformInit:
+ *
+ * Intialize the platform specific files module
+ *
+ * This is a platform specific interface
+ *
+ * Returns 1 if sucessful
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Intialize the platform specific files module
+ *
+ * This is a platform specific interface
+ *
+ * @returns 1 if sucessful
+ * 0 otherwise
+ */
+#endif
+#endif
+ int filesPlatformInit(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesPlatformFree:
+ *
+ * Free memory used by the platform specific files module
+ *
+ * This is a platform specific interface
+ *
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Free memory used by the platform specific files module
+ *
+ * This is a platform specific interface
+ *
+ */
+#endif
+#endif
+ void filesPlatformFree(void);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesExpandName:
+ * @fileName : A valid fileName
+ *
+ * Converts a fileName to an absolute path
+ * If operating system supports it a leading "~" in the fileName
+ * will be converted to the user's home path. Otherwise
+ * the same name will be returned
+ *
+ * Returns A copy of the converted @fileName or a copy of
+ * the @fileName as supplied. May return NULL
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Converts a fileName to an absolute path
+ * If operating system supports it a leading "~" in the fileName
+ * will be converted to the user's home path. Otherwise
+ * the same name will be returned
+ *
+ * Returns A copy of the converted @p fileName or a copy of
+ * the @p fileName as supplied. May return NULL
+ *
+ * @param fileName A valid fileName
+ */
+#endif
+#endif
+ xmlChar *filesExpandName(const xmlChar * fileName);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+ /**
+ * filesSearchFileName:
+ * @fileType : Is valid
+ *
+ * Return a copy of the file name to use as an argument to searching
+ *
+ * Returns A copy of the file name to use as an argument to searching
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Return a copy of the file name to use as an argument to searching
+ *
+ * @returns A copy of the file name to use as an argument to searching
+ *
+ * @param fileType Is valid
+ *
+ */
+#endif
+#endif
+ xmlChar *filesSearchFileName(FilesSearchFileNameEnum fileType);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/files_unix.cpp b/kxsldbg/kxsldbgpart/libxsldbg/files_unix.cpp
new file mode 100644
index 00000000..5c1bcbff
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/files_unix.cpp
@@ -0,0 +1,225 @@
+
+/***************************************************************************
+ files_unix.c - file functions *nix platform
+ specific
+ -------------------
+ begin : Tue Jan 29 2002
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "files.h"
+#include "utils.h"
+#include "options.h"
+
+static char *tempNames[2] = { NULL, NULL };
+
+ /**
+ * filesPlatformInit:
+ *
+ * Intialize the platform specific files module
+ *
+ * This is a platform specific interface
+ *
+ *
+ * Returns 1 if sucessful
+ * 0 otherwise
+ */
+int
+filesPlatformInit(void)
+{
+ const char *namePrefix = "/tmp/";
+ int nameIndex;
+ int result = 1;
+
+ /* The "base" names for files files to use */
+ const char *names[] = {
+ "_xsldbg_tmp1.txt",
+ "_xsldbg_tmp2.txt"
+ };
+
+ if (getenv("USER")) {
+ for (nameIndex = 0; nameIndex < 2; nameIndex++) {
+ tempNames[nameIndex] = (char*)
+ xmlMalloc(strlen(namePrefix) + strlen(getenv("USER")) +
+ strlen(names[nameIndex]) + 1);
+ if (tempNames[nameIndex]) {
+ xmlStrCpy(tempNames[nameIndex], namePrefix);
+ xmlStrCat(tempNames[nameIndex], getenv("USER"));
+ xmlStrCat(tempNames[nameIndex], names[nameIndex]);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ break;
+ result = 0;
+ }
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: USER environment variable is not set.\n"));
+ }
+ return result;
+}
+
+
+ /**
+ * filesPlatformFree:
+ *
+ * Free memory used by the platform specific files module
+ *
+ * This is a platform specific interface
+ *
+ */
+void
+filesPlatformFree(void)
+{
+ int nameIndex;
+
+ for (nameIndex = 0; nameIndex < 2; nameIndex++) {
+ if (tempNames[nameIndex])
+ xmlFree(tempNames[nameIndex]);
+ }
+}
+
+ /**
+ * filesTempFileName:
+ * @fileNumber : Number of temp file required
+ *
+ * Return the name of tempfile. For each call to this function
+ * with the same @fileNumber the same file name will be returned
+ * File number : 0 is used by cat command
+ * File number : 1 is used by profiling output
+ *
+ * This is a platform specific interface
+ *
+ * Returns The name of temp file to be used for temporary results,
+ * NULL otherwise
+ */
+const char *
+filesTempFileName(int fileNumber)
+{
+
+ const char *result = NULL;
+
+ if ((fileNumber < 0) || ((fileNumber + 1) > 2)){ //don't use > (int) sizeof(tempNames), it depends on the platform and is wrong even on i586
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to allocate temporary file %d for xsldbg\n",
+ fileNumber);
+#endif
+ }else{
+ result = tempNames[fileNumber];
+ }
+
+ return result;
+}
+
+
+
+ /**
+ * filesExpandName:
+ * @fileName : A valid fileName
+ *
+ * Converts a fileName to an absolute path
+ * If operating system supports it a leading "~" in the fileName
+ * will be converted to the user's home path. Otherwise
+ * the same name will be returned
+ *
+ * Returns A copy of the converted @fileName or a copy of
+ * the @fileName as supplied. May return NULL
+ */
+xmlChar *
+filesExpandName(const xmlChar * fileName)
+{
+ xmlChar *result = NULL;
+
+ if (fileName) {
+ if ((fileName[0] == '~') && getenv("HOME")) {
+ result =
+ (xmlChar *) xmlMalloc(xmlStrLen(fileName) +
+ strlen(getenv("HOME")) + 1);
+ if (result) {
+ xmlStrCpy(result, getenv("HOME"));
+ xmlStrCat(result, &fileName[1]);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ } else if (!xmlStrnCmp(fileName, "file:/", 6)){
+ /* return a copy of the corrected path */
+ result = filesURItoFileName(fileName);
+ }else{
+ /* return a copy only */
+ result = xmlStrdup(fileName);
+ }
+ }
+ return result;
+}
+
+
+ /**
+ * filesSearchFileName:
+ * @fileType : Is valid
+ *
+ * Return a copy of the file name to use as an argument to searching
+ *
+ * Returns A copy of the file name to use as an argument to searching
+ */
+xmlChar *
+filesSearchFileName(FilesSearchFileNameEnum fileType)
+{
+ xmlChar *result = NULL;
+ int type = fileType;
+ int preferHtml = optionsGetIntOption(OPTIONS_PREFER_HTML);
+ const xmlChar *baseDir = NULL;
+ const xmlChar *name = NULL;
+ static const char *searchNames[] = {
+ /* Note: File names here are in native format, to be appended to the
+ * help directory name or search results path
+ */
+ /* First list names when prefer html is false */
+ "searchresult.xml", /* input */
+ "search.xsl", /* stylesheet to use */
+ "searchresult.txt", /* where to put the result */
+ /*Now for the names to use when prefer html is true */
+ "searchresult.xml", /* input */
+ "searchhtml.xsl", /* stylesheet to use */
+ "searchresult.html" /* where to put the result */
+ };
+
+ if (!optionsGetStringOption(OPTIONS_DOCS_PATH)
+ || !filesSearchResultsPath()) {
+ xsldbgGenericErrorFunc(i18n("Error: The value of the option docspath or searchresultspath is empty. See help on setoption or options command for more information.\n"));
+ return result;
+ }
+
+
+ name = (xmlChar *) searchNames[(preferHtml * 3) + type];
+ switch (type) {
+ case FILES_SEARCHINPUT:
+ baseDir = filesSearchResultsPath();
+ break;
+
+ case FILES_SEARCHXSL:
+ baseDir = optionsGetStringOption(OPTIONS_DOCS_PATH);
+ break;
+
+ case FILES_SEARCHRESULT:
+ baseDir = filesSearchResultsPath();
+ break;
+ }
+
+ result = (xmlChar*)xmlMalloc(xmlStrLen(baseDir) + xmlStrLen(name) + 1);
+ if (result) {
+ xmlStrCpy(result, baseDir);
+ xmlStrCat(result, name);
+ }
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/help.h b/kxsldbg/kxsldbgpart/libxsldbg/help.h
new file mode 100644
index 00000000..de77a71d
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/help.h
@@ -0,0 +1,73 @@
+
+/***************************************************************************
+ help.h - describe the help support functions
+ -------------------
+ begin : Sun Sep 16 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBG_HELP_H
+#define XSLDBG_HELP_H
+
+#ifdef USE_KDE_DOCS
+
+/**
+ * Provide a help system for user
+ *
+ * @short help system support
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * helpTop:
+ * @args : Is valid command or empty string
+ *
+ * Display help about the command in @arg
+ *
+ * This is a platform specific interface
+ *
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Display help about the command in @p arg
+ *
+ *
+ * This is a platform specific interface
+ *
+ * @param args Is valid or empty string
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int helpTop(const xmlChar * args);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp b/kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp
new file mode 100644
index 00000000..d3e91f92
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp
@@ -0,0 +1,115 @@
+
+/***************************************************************************
+ help.c - help system for *nix platform
+ -------------------
+ begin : Tue Jan 29 2002
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/*
+ * Uses docs/xsldoc.xsl docs/xsldoc.xml and xslproc to generate text
+ */
+
+#include "xsldbg.h"
+#include "options.h"
+#include "utils.h"
+#include "debugXSL.h"
+#include "help.h"
+#include "files.h"
+#include <stdlib.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+
+/**
+ * helpTop:
+ * @args : Is valid command or empty string
+ *
+ * Display help about the command in @args
+ *
+ * This is a platform specific interface
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+helpTop(const xmlChar * args)
+{
+
+ //Extra phrases to support translation of help display see kdewebdev/doc/xsldbg/xsldbghelp.xml and kdewebdev/kxsldbg/xsldbghelp.xsl
+ static const char* xsldbghelp_translations[] =
+ {
+ I18N_NOOP("xsldbg version"),
+ I18N_NOOP("Help document version"),
+ I18N_NOOP("Help not found for command")
+ };
+
+ QString xsldbgVerTxt(i18n("xsldbg version"));
+ QString helpDocVerTxt(i18n("Help document version"));
+ QString helpErrorTxt(i18n("Help not found for command"));
+
+
+ char buff[500], helpParam[100];
+
+ const char *docsDirPath =
+ (const char *) optionsGetStringOption(OPTIONS_DOCS_PATH);
+ int result = 0;
+
+ if (xmlStrLen(args) > 0) {
+ snprintf(helpParam, 100, "--param help:%c'%s'%c", QUOTECHAR, args,
+ QUOTECHAR);
+ } else
+ xmlStrCpy(helpParam, "");
+ if (docsDirPath && filesTempFileName(0)) {
+ snprintf((char *) buff, sizeof(buff), "%s %s"
+ " --param xsldbg_version:%c'%s'%c "
+ " --param xsldbgVerTxt:%c'%s'%c "
+ " --param helpDocVerTxt:%c'%s'%c "
+ " --param helpErrorTxt:%c'%s'%c "
+ " --output %s "
+ " --cd %s "
+ "xsldbghelp.xsl xsldbghelp.xml",
+ XSLDBG_BIN, helpParam,
+ QUOTECHAR, VERSION, QUOTECHAR,
+ QUOTECHAR, xsldbgVerTxt.utf8().data(), QUOTECHAR,
+ QUOTECHAR, helpDocVerTxt.utf8().data(), QUOTECHAR,
+ QUOTECHAR, helpErrorTxt.utf8().data(), QUOTECHAR,
+ filesTempFileName(0),
+ docsDirPath);
+ if (xslDbgShellExecute((xmlChar *) buff, optionsGetIntOption(OPTIONS_VERBOSE)) == 0) {
+ if (docsDirPath)
+ xsldbgGenericErrorFunc(i18n("Error: Unable to display help. Help files not found in %1 or xsldbg not found in path.\n").arg(docsDirPath)); /* FIXME: Comments not correct - the command is that invoked */
+ else
+ xsldbgGenericErrorFunc(i18n("Error: Unable to find xsldbg or help files.\n"));
+ } else {
+ if (filesMoreFile((xmlChar*)filesTempFileName(0), NULL) == 1) {
+ result = 1;
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to print help file.\n"));
+ }
+ }
+
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: No path to documentation; aborting help.\n"));
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+#ifdef USE_DOCS_MACRO
+ xsltGenericError(xsltGenericErrorContext,"MACRO has been defined look at Makefile.am\n");
+#else
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Environment variable %s is not set to the directory of xsldbg documentation.\n",
+ XSLDBG_DOCS_DIR_VARIABLE);
+#endif
+#endif
+ }
+ return result;
+}
+
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/nodeview_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/nodeview_cmds.cpp
new file mode 100644
index 00000000..5fcbef00
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/nodeview_cmds.cpp
@@ -0,0 +1,609 @@
+
+/***************************************************************************
+ nodeview_cmds.c - node viewing commands for xsldbg
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include <libxml/xpathInternals.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <ctype.h> /* for isspace*/
+#include "debugXSL.h"
+#include "arraylist.h"
+#include "breakpoint.h"
+#include "xsldbgmsg.h"
+#include "xsldbgthread.h" /* for getThreadStatus */
+#include "files.h"
+#include "options.h"
+
+
+/* -----------------------------------------
+ Private function declarations for nodeview_cmds.c
+ -------------------------------------------*/
+static xmlChar nodeViewBuffer[500];
+static int printVariableValue = 0;
+
+/*
+ * xslDbgShellPrintNames:
+ * Print a name of variable found by scanning variable table
+ * It is used by print_variable function.
+ * @payload : not used
+ * @data : not used
+ * @name : the variable name
+ */
+void *xslDbgShellPrintNames(void *payload,
+ void *data, xmlChar * name);
+
+/**
+ * xslDbgCatToFile:
+ * @node : Is valid
+ * @file : Is valid
+ *
+ * Send the results of cat command in @node to @file
+ */
+static void xslDbgCatToFile(xmlNodePtr node, FILE * file);
+
+
+/**
+ * printXPathObject:
+ * @item : XPath object to print
+ * @xPath : The XPath used to find item
+ *
+ * Print an XPath object
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+static int printXPathObject(xmlXPathObjectPtr item, xmlChar* xPath);
+
+/* -------------------------------------
+ End private functions
+---------------------------------------*/
+
+
+/**
+ * xslDbgShellPrintList:
+ * @ctxt: The current shell context
+ * @arg: What xpath to display and in UTF-8
+ * @dir: If 1 print in dir mode?,
+ * otherwise ls mode
+ *
+ * Print list of nodes in either ls or dir format
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellPrintList(xmlShellCtxtPtr ctxt, xmlChar * arg, int dir)
+{
+ xmlXPathObjectPtr list;
+ int result = 0;
+
+ if (!ctxt || !arg) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL arguments provided\n");
+#endif
+ return result;
+ }
+
+ if (arg[0] == 0) {
+ if (dir)
+ xmlShellDir(ctxt, NULL, ctxt->node, NULL);
+ else
+ xmlShellList(ctxt, NULL, ctxt->node, NULL);
+ result = 1; /*assume that this worked */
+ } else {
+ ctxt->pctxt->node = ctxt->node;
+ ctxt->pctxt->node = ctxt->node;
+ if (!xmlXPathNsLookup(ctxt->pctxt, (xmlChar *) "xsl"))
+ xmlXPathRegisterNs(ctxt->pctxt, (xmlChar *) "xsl",
+ XSLT_NAMESPACE);
+ list = xmlXPathEval(arg, ctxt->pctxt);
+ if (list != NULL) {
+ switch (list->type) {
+ case XPATH_NODESET:{
+ int indx;
+
+ for (indx = 0;
+ indx < list->nodesetval->nodeNr; indx++) {
+ if (dir)
+ xmlShellList(ctxt, NULL,
+ list->nodesetval->
+ nodeTab[indx], NULL);
+ else
+ xmlShellList(ctxt, NULL,
+ list->nodesetval->
+ nodeTab[indx], NULL);
+ }
+ result = 1;
+ break;
+ }
+ default:
+ xmlShellPrintXPathError(list->type, (char *) arg);
+ }
+ xmlXPathFreeObject(list);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: XPath %1 results in an empty Node Set.\n").arg(xsldbgText(arg)));
+ }
+ ctxt->pctxt->node = NULL;
+ }
+ return result;
+}
+
+
+
+/**
+ * xslDbgCatToFile:
+ * @node : Is valid
+ * @file : Is valid
+ *
+ * Send the results of cat command in @node to @file
+ */
+void
+xslDbgCatToFile(xmlNodePtr node, FILE * file)
+{
+ if (!node || !file)
+ return;
+
+ /* assume that HTML usage is enabled */
+ if (node->doc->type == XML_HTML_DOCUMENT_NODE) {
+ if (node->type == XML_HTML_DOCUMENT_NODE)
+ htmlDocDump(file, (htmlDocPtr) node);
+ else
+ htmlNodeDumpFile(file, node->doc, node);
+ } else if (node->type == XML_DOCUMENT_NODE) {
+ /* turn off encoding for the moment and just dump UTF-8
+ * which will be converted by xsldbgGeneralErrorFunc */
+ xmlDocPtr doc = (xmlDocPtr) node;
+ const xmlChar *encoding = doc->encoding;
+
+ if (encoding) {
+ xsldbgGenericErrorFunc(i18n("Information: Temporarily setting document's encoding to UTF-8. Previously was %1.\n").arg(xsldbgText(encoding)));
+ }
+ doc->encoding = (xmlChar *) "UTF-8";
+ xmlDocDump(file, (xmlDocPtr) node);
+ doc->encoding = encoding;
+ } else {
+ xmlElemDump(file, node->doc, node);
+ }
+}
+
+
+/**
+ * printXPathObject:
+ * @item : XPath object to print
+ * @xPath : The XPath used to find item
+ *
+ * Print an XPath object
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+
+static int
+printXPathObject(xmlXPathObjectPtr item, xmlChar* xPath){
+ int result = 0;
+ if (item){
+ switch (item->type) {
+ case XPATH_BOOLEAN:
+ xsltGenericError(xsltGenericErrorContext,
+ "= %s\n%s\n", xPath,
+ xmlBoolToText(item->boolval));
+ result = 1;
+ break;
+
+ case XPATH_NUMBER:
+ xsltGenericError(xsltGenericErrorContext,
+ "= %s\n%0g\n", xPath, item->floatval);
+ result = 1;
+ break;
+
+ /* case XPATH_NODESET:*/
+ default:{
+ /* We may need to convert this XPath to a string,
+ plus ensure that we print required the number of
+ lines of text */
+ int indx;
+
+ const char *fileName = filesTempFileName(0);
+ FILE *file = NULL;
+
+ if (!fileName)
+ break;
+ file = fopen(fileName, "w+");
+ if (!file) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to save temporary results to %1.\n").arg(xsldbgText(fileName)));
+ break;
+ } else {
+ fprintf(file, "= %s\n", xPath);
+ switch(item->type){
+
+ case XPATH_NODESET:
+ if (item->nodesetval){
+ for (indx = 0;
+ indx < item->nodesetval->nodeNr; indx++){
+ xslDbgCatToFile(item->nodesetval->
+ nodeTab[indx], file);
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: XPath %1 results in an empty Node Set.\n").arg(xsldbgText(xPath)));
+ }
+ break;
+
+ case XPATH_STRING:
+ if (item->stringval)
+ fprintf(file, "\'%s\'", item->stringval);
+ else
+ fprintf(file, "%s", i18n("NULL string value supplied.").utf8().data());
+ break;
+
+ default:{
+ xmlXPathObjectPtr tempObj =
+ xmlXPathObjectCopy(item);
+ if (tempObj)
+ tempObj = xmlXPathConvertString(tempObj);
+ if (tempObj && tempObj->stringval){
+ fprintf(file, "%s", tempObj->stringval);
+ }else{
+ fprintf(file, "%s", i18n("Unable to convert XPath to string.").utf8().data());
+ }
+ if (tempObj)
+ xmlXPathFreeObject(tempObj);
+ }
+ break;
+ fprintf(file,"\n");
+
+ } /* inner switch statement */
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ fclose(file);
+ file = NULL;
+ /* send the data to application */
+ notifyXsldbgApp(XSLDBG_MSG_FILEOUT, fileName);
+ } else {
+ int lineCount = 0, gdbModeEnabled = 0;
+
+ /* save the value of option to speed things up
+ * a bit */
+ gdbModeEnabled =
+ optionsGetIntOption(OPTIONS_GDB);
+ rewind(file);
+
+ /* when gdb mode is enable then only print the first
+ * GDB_LINES_TO_PRINT lines */
+ while (!feof(file)) {
+ if (fgets
+ ((char *) nodeViewBuffer, sizeof(nodeViewBuffer),
+ file))
+ xsltGenericError
+ (xsltGenericErrorContext, "%s",
+ nodeViewBuffer);
+ if (gdbModeEnabled) {
+ lineCount++;
+ /* there is an overhead of two lines
+ * when print expression values */
+ if (lineCount ==
+ GDB_LINES_TO_PRINT + 2) {
+ xsltGenericError
+ (xsltGenericErrorContext,
+ "...");
+ break;
+ }
+ }
+ }
+ xsltGenericError
+ (xsltGenericErrorContext, "\n");
+ }
+ if (file)
+ fclose(file);
+ result = 1;
+ break;
+ }
+ }
+ }
+ }
+ return result;
+}
+
+
+/**
+ * xslDbgShellCat:
+ * @styleCtxt: the current stylesheet context
+ * @ctxt: The current shell context
+ * @arg: The xpath to print (in UTF-8)
+ *
+ * Print the result of an xpath expression. This can include variables
+ * if styleCtxt is not NULL
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+
+int
+xslDbgShellCat(xsltTransformContextPtr styleCtxt, xmlShellCtxtPtr ctxt,
+ xmlChar * arg)
+{
+ xmlXPathObjectPtr list;
+ int result = 0;
+ static const char * QUIET_STR = "-q";
+ bool silenceCtxtErrors = false;
+
+ if ((arg == NULL) || (xmlStrLen(arg) == 0))
+ arg = (xmlChar *) ".";
+
+ /* Do we quietly ingore style context errors */
+ if (strncasecmp((char*)arg, QUIET_STR, strlen(QUIET_STR))== 0){
+ silenceCtxtErrors = true;
+ arg = arg + strlen(QUIET_STR);
+ while (isspace(*arg)){
+ arg++;
+ }
+ }
+
+ if (!styleCtxt || !ctxt || !ctxt->node) {
+ if (!(!xsldbgReachedFirstTemplate && silenceCtxtErrors))
+ xsldbgGenericErrorFunc(i18n("Warning: Unable to print expression. No stylesheet was properly loaded.\n"));
+ return 0;
+ }
+
+ if ((arg == NULL) || (xmlStrLen(arg) == 0))
+ arg = (xmlChar *) ".";
+
+ ctxt->pctxt->node = ctxt->node;
+ if (!styleCtxt) {
+ list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
+ } else {
+ xmlNodePtr savenode = styleCtxt->xpathCtxt->node;
+
+ ctxt->pctxt->node = ctxt->node;
+ styleCtxt->xpathCtxt->node = ctxt->node;
+ if (!xmlXPathNsLookup(styleCtxt->xpathCtxt, (xmlChar *) "xsl"))
+ xmlXPathRegisterNs(styleCtxt->xpathCtxt, (xmlChar *) "xsl",
+ XSLT_NAMESPACE);
+ list = xmlXPathEval((xmlChar *) arg, styleCtxt->xpathCtxt);
+ styleCtxt->xpathCtxt->node = savenode;
+ }
+ if (list != NULL) {
+ result = printXPathObject(list, arg);
+ xmlXPathFreeObject(list);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: XPath %1 results in an empty Node Set.\n").arg(xsldbgText(arg)));
+ }
+ ctxt->pctxt->node = NULL;
+ return result;
+}
+
+/* only used by xslDbgPrintNames and xslDbgPrintVariable cound number of variables */
+static int varCount;
+
+/*
+ * xslDbgShellPrintNames:
+ * Print a name of variable found by scanning variable table
+ * It is used by print_variable function.
+ * @payload : Global variable of type xsltStackElemPtr
+ * @data : not used
+ * @name : the variable name
+ */
+void *
+xslDbgShellPrintNames(void *payload,
+ void *data, xmlChar * name)
+{
+ Q_UNUSED(payload);
+ Q_UNUSED(data);
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListQueue(payload);
+ } else if (payload && name) {
+ xmlChar * fullQualifiedName = nodeViewBuffer;
+ xsltStackElemPtr item = (xsltStackElemPtr)payload;
+ if (item->nameURI == NULL){
+ snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s", item->name);
+ }else{
+ snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s:%s",
+ item->nameURI, item->name);
+ }
+ if (printVariableValue == 0){
+ xsldbgGenericErrorFunc(i18n(" Global %1\n").arg(xsldbgText(fullQualifiedName)));
+ }else{
+ if (item->computed == 1){
+ xsldbgGenericErrorFunc(i18n(" Global "));
+ printXPathObject(item->value, fullQualifiedName);
+ }else if (item->tree){
+ xsldbgGenericErrorFunc(i18n(" Global = %1\n").arg(xsldbgText(fullQualifiedName)));
+ xslDbgCatToFile(item->tree, stderr);
+ }else if (item->select){
+ xsldbgGenericErrorFunc(i18n(" Global = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(xsldbgText(item->select)));
+ }else{
+ /* can't find a value give only a variable name an error message */
+ xsldbgGenericErrorFunc(i18n(" Global = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(i18n("Warning: No value assigned to variable.\n")));
+ }
+ xsltGenericError(xsltGenericErrorContext, "\n\032\032\n");
+ }
+ varCount++;
+ }
+ return NULL;
+}
+
+
+
+/**
+ * xslDbgShellPrintVariable:
+ * @styleCtxt: The current stylesheet context
+ * @arg: The name of variable to look for '$' prefix is optional and in UTF-8
+ * @type: A valid VariableTypeEnum
+ *
+ * Print the value variable specified by args.
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellPrintVariable(xsltTransformContextPtr styleCtxt, xmlChar * arg,
+ VariableTypeEnum type)
+{
+ int result = 0;
+ /* command argument to include both name and its value */
+ static const char * FULLNAME_STR = "-f";
+ /* Quietly exit if an invalid stylesheet is provided */
+ static const char * QUIET_STR = "-q";
+ bool silenceCtxtErrors = false;
+
+ if (!arg) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ varCount = 0;
+ /* Do we quietly ingore style context errors */
+ if (strncasecmp((char*)arg, QUIET_STR, strlen(QUIET_STR))== 0){
+ silenceCtxtErrors = true;
+ arg = arg + strlen(QUIET_STR);
+ while (isspace(*arg)){
+ arg++;
+ }
+ }
+
+ if (!styleCtxt) {
+ if (!(!xsldbgReachedFirstTemplate && silenceCtxtErrors))
+ xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded or libxslt has not reached a template.\nTry reloading files or taking more steps.\n"));
+ return result;
+ }
+
+ /* Do we include the name as well as its value */
+ if (strncasecmp((char*)arg, FULLNAME_STR, strlen(FULLNAME_STR))== 0){
+ printVariableValue = 1;
+ arg = arg + strlen(FULLNAME_STR);
+ while (isspace(*arg)){
+ arg++;
+ }
+ }
+ if (arg[0] == 0) {
+ /* list variables of type requested */
+ if (type == DEBUG_GLOBAL_VAR) {
+ if (styleCtxt->globalVars) {
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListStart(XSLDBG_MSG_GLOBALVAR_CHANGED);
+ /* list global variables */
+ xmlHashScan(styleCtxt->globalVars,
+ (xmlHashScanner) xslDbgShellPrintNames,
+ NULL);
+ notifyListSend();
+ } else
+ /* list global variables */
+ xmlHashScan(styleCtxt->globalVars,
+ (xmlHashScanner) xslDbgShellPrintNames,
+ NULL);
+ result = 1;
+ /* ensure that the locals follow imediately after the
+ * globals when in gdb mode */
+ if (optionsGetIntOption(OPTIONS_GDB) == 0)
+ xsltGenericError(xsltGenericErrorContext, "\n");
+ } else {
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) {
+ /* Don't show this message when running as a thread as it
+ * is annoying */
+ xsldbgGenericErrorFunc(i18n("Error: Libxslt has not initialized variables yet; try stepping to a template.\n"));
+ } else {
+ /* send an empty list */
+ notifyListStart(XSLDBG_MSG_GLOBALVAR_CHANGED);
+ notifyListSend();
+ result = 1;
+ }
+ }
+ } else {
+ /* list local variables */
+ if (styleCtxt->varsNr && styleCtxt->varsTab) {
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListStart(XSLDBG_MSG_LOCALVAR_CHANGED);
+ for (int i = styleCtxt->varsNr; i > styleCtxt->varsBase; i--) {
+ xsltStackElemPtr item = styleCtxt->varsTab[i-1];
+ while (item) {
+ notifyListQueue(item);
+ item = item->next;
+ }
+ }
+ notifyListSend();
+ } else {
+ xmlChar * fullQualifiedName = nodeViewBuffer;
+ for (int i = styleCtxt->varsNr; i > styleCtxt->varsBase; i--) {
+ xsltStackElemPtr item = styleCtxt->varsTab[i-1];
+ while (item) {
+ if (item->name) {
+ if (item->nameURI == NULL){
+ snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s",
+ item->name);
+ }else{
+
+ snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s:%s",
+ item->nameURI, item->name);
+ }
+ if (printVariableValue == 0){
+ xsldbgGenericErrorFunc(i18n(" Local %1").arg(xsldbgText(fullQualifiedName)));
+ }else{
+ if (item->computed == 1){
+ xsldbgGenericErrorFunc(i18n(" Local "));
+ printXPathObject(item->value, fullQualifiedName);
+ }else if (item->tree){
+ xsldbgGenericErrorFunc(i18n(" Local = %1\n").arg(xsldbgText(fullQualifiedName)));
+ xslDbgCatToFile(item->tree, stderr);
+ }else if (item->select){
+ xsldbgGenericErrorFunc(i18n(" Local = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(xsldbgText(item->select)));
+ }else{
+ /* can't find a value give only a variable name and an error */
+ xsldbgGenericErrorFunc(i18n(" Local = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(i18n("Warning: No value assigned to variable.\n")));
+ }
+ }
+ xsltGenericError(xsltGenericErrorContext, "\n\032\032\n");
+ }
+ item = item->next;
+ }
+ }
+ }
+ result = 1;
+ xsltGenericError(xsltGenericErrorContext, "\n");
+ } else {
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) {
+ /* Don't show this message when running as a thread as it
+ * is annoying */
+ xsldbgGenericErrorFunc(i18n("Error: Libxslt has not initialized variables yet; try stepping past the xsl:param elements in the template.\n"));
+ } else {
+ /* send an empty list */
+ notifyListStart(XSLDBG_MSG_LOCALVAR_CHANGED);
+ notifyListSend();
+ result = 1;
+ }
+ }
+ }
+ } else {
+ /* Display the value of variable */
+ if (arg[0] == '$') {
+ printXPathObject(xmlXPathEval(arg, styleCtxt->xpathCtxt), arg);
+ xsltGenericError(xsltGenericErrorContext, "\032\032\n");
+ } else {
+ xmlStrCpy(nodeViewBuffer, "$");
+ xmlStrCat(nodeViewBuffer, arg);
+ printXPathObject(xmlXPathEval((xmlChar*)nodeViewBuffer,styleCtxt->xpathCtxt),
+ (xmlChar*)nodeViewBuffer);
+ xsltGenericError(xsltGenericErrorContext, "\032\032\n");
+ }
+
+ }
+
+ printVariableValue = 0;
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/option_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/option_cmds.cpp
new file mode 100644
index 00000000..0bc54364
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/option_cmds.cpp
@@ -0,0 +1,299 @@
+
+/***************************************************************************
+ option_cmds.c - implementation for option
+ related commands
+
+ -------------------
+ begin : Fri Feb 1 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "utils.h"
+#include "options.h"
+#include "xsldbgmsg.h"
+#include "xsldbgthread.h"
+#include "debugXSL.h"
+
+
+/**
+ * xslDbgShellSetOption:
+ * @arg : Is valid, and in the format <NAME> <VALUE>
+ *
+ * Set the value of an option
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellSetOption(xmlChar * arg)
+{
+ int result = 0;
+
+ if (!arg) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ if (xmlStrLen(arg) > 0) {
+ xmlChar *opts[2];
+ long optValue;
+ long optID;
+
+
+ if (splitString(arg, 2, opts) == 2) {
+ bool invertOption = false;
+ optID = optionsGetOptionID(opts[0]);
+ if ((optID == -1) && (opts[0][0] == 'n') && (opts[0][1] == 'o')){
+ optID = optionsGetOptionID(&opts[0][2]);
+ if (optID != -1){
+ // invert the value the user provides
+ invertOption = true;
+ }
+ }
+
+ if (optID >= OPTIONS_FIRST_INT_OPTIONID) {
+ if (optID <= OPTIONS_LAST_INT_OPTIONID) {
+ /* handle setting integer option */
+ if ((xmlStrlen(opts[1]) == 0) ||
+ !sscanf((char *) opts[1], "%ld", &optValue)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as an option value.\n").arg(xsldbgText(opts[1])));
+ } else {
+ if (invertOption)
+ optValue = !optValue;
+ result = optionsSetIntOption(OptionTypeEnum(optID), optValue);
+ }
+ } else {
+ /* handle setting a string option */
+ result = optionsSetStringOption(OptionTypeEnum(optID), opts[1]);
+
+ }
+ } else {
+ static xmlExternalEntityLoader xsldbgDefaultEntLoader = 0;
+ bool invertOption = false;
+ bool enableNet = false;
+
+ if (!xsldbgDefaultEntLoader)
+ xsldbgDefaultEntLoader = xmlGetExternalEntityLoader();
+
+ if (xmlStrEqual(opts[0], (const xmlChar *)"nonet" ))
+ invertOption = true;
+
+ if (xmlStrEqual(&opts[0][2*invertOption], (const xmlChar *)"net" )){
+ if (sscanf((char *) opts[1], "%ld", &optValue)) {
+ if (invertOption)
+ optValue = !optValue;
+ if (optValue)
+ enableNet = true;
+ result = true;
+ if (enableNet)
+ xmlSetExternalEntityLoader(xsldbgDefaultEntLoader);
+ else
+ xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as an option value.\n").arg(xsldbgText(opts[1])));
+ }
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Unknown option name %1.\n").arg(xsldbgText(opts[0])));
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("setoption"));
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("setoption"));
+ }
+
+ return result;
+}
+
+
+
+/**
+ * xslDbgShellOptions:
+ *
+ * Prints out values for user options
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellOptions(void)
+{
+ int result = 1;
+ int optionIndex;
+ const xmlChar *optionName, *optionValue;
+
+ /* Print out the integer options and thier values */
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) {
+ for (optionIndex = OPTIONS_XINCLUDE;
+ optionIndex <= OPTIONS_VERBOSE; optionIndex++) {
+ /* skip any non-user options */
+ optionName = optionsGetOptionName(OptionTypeEnum(optionIndex));
+ if (optionName && (optionName[0] != '*')) {
+ xsldbgGenericErrorFunc(i18n("Option %1 = %2\n").arg(xsldbgText(optionName)).arg(optionsGetIntOption(OptionTypeEnum(optionIndex))));
+
+ }
+ }
+ /* Print out the string options and thier values */
+ for (optionIndex = OPTIONS_OUTPUT_FILE_NAME;
+ optionIndex <= OPTIONS_DATA_FILE_NAME; optionIndex++) {
+ optionName = optionsGetOptionName(OptionTypeEnum(optionIndex));
+ if (optionName && (optionName[0] != '*')) {
+ optionValue = optionsGetStringOption(OptionTypeEnum(optionIndex));
+ if (optionValue) {
+ xsldbgGenericErrorFunc(i18n("Option %1 = \"%2\"\n").arg(xsldbgText(optionName)).arg((char*)optionValue));
+ } else {
+ xsldbgGenericErrorFunc(i18n("Option %1 = \"\"\n").arg(xsldbgText(optionName)));
+
+ }
+ }
+
+ }
+ xsldbgGenericErrorFunc("\n");
+ } else {
+ /* we are now notifying the application of the value of options */
+ parameterItemPtr paramItem;
+
+ notifyListStart(XSLDBG_MSG_INTOPTION_CHANGE);
+ /* send the integer options and their values */
+ for (optionIndex = OPTIONS_XINCLUDE;
+ optionIndex <= OPTIONS_VERBOSE; optionIndex++) {
+ /* skip any non-user options */
+ optionName = optionsGetOptionName(OptionTypeEnum(optionIndex));
+ if (optionName && (optionName[0] != '*')) {
+ paramItem = optionsParamItemNew(optionName, 0L);
+ if (!paramItem) {
+ notifyListSend(); /* send what ever we've got so far */
+ return 0; /* out of memory */
+ }
+ paramItem->intValue = optionsGetIntOption(OptionTypeEnum(optionIndex));
+ notifyListQueue(paramItem); /* this will be free later */
+ }
+ }
+
+ notifyListSend();
+ notifyListStart(XSLDBG_MSG_STRINGOPTION_CHANGE);
+ /* Send the string options and thier values */
+ for (optionIndex = OPTIONS_OUTPUT_FILE_NAME;
+ optionIndex <= OPTIONS_DATA_FILE_NAME; optionIndex++) {
+ optionName = optionsGetOptionName(OptionTypeEnum(optionIndex));
+ if (optionName && (optionName[0] != '*')) {
+ paramItem =
+ optionsParamItemNew(optionName,
+ optionsGetStringOption
+ (OptionTypeEnum(optionIndex)));
+ if (!paramItem) {
+ notifyListSend(); /* send what ever we've got so far */
+ return 0; /* out of memory */
+ } else
+ notifyListQueue(paramItem); /* this will be freed later */
+ }
+ }
+ notifyListSend();
+ }
+
+ return result;
+}
+
+
+ /**
+ * xslDbgShellShowWatches:
+ * @styleCtxt: the current stylesheet context
+ * @ctxt: The current shell context
+ * @showWarnings : If 1 then showWarning messages,
+ * otherwise do not show warning messages
+ *
+ * Print the current watches and their values
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+ int xslDbgShellShowWatches(xsltTransformContextPtr styleCtxt,
+ xmlShellCtxtPtr ctx,int showWarnings)
+{
+ int result = 0, counter;
+ xmlChar* watchExpression;
+ if ((showWarnings == 1) && (arrayListCount(optionsGetWatchList()) == 0)){
+ xsldbgGenericErrorFunc(i18n("\tNo expression watches set.\n"));
+ }
+ for ( counter = 0;
+ counter < arrayListCount(optionsGetWatchList());
+ counter++){
+ watchExpression = (xmlChar*)arrayListGet(optionsGetWatchList(), counter);
+ if (watchExpression){
+ xsldbgGenericErrorFunc(i18n(" WatchExpression %1 ").arg(counter + 1));
+ result = xslDbgShellCat(styleCtxt, ctx, watchExpression);
+ }else
+ break;
+ }
+
+ return result;
+}
+
+
+ /**
+ * xslDbgShellAddWatch:
+ * @arg : A valid xPath of expression to watch the value of
+ *
+ * Add expression to list of expressions to watch value of
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+ int xslDbgShellAddWatch(xmlChar* arg)
+{
+ int result = 0;
+ if (arg){
+ trimString(arg);
+ result = optionsAddWatch(arg);
+ if (!result)
+ xsldbgGenericErrorFunc(i18n("Error: Unable to add watch expression \"%1\". It already has been added or it cannot be watched.\n").arg(xsldbgText(arg)));
+ }
+ return result;
+}
+
+ /**
+ * xslDbgShellDeleteWatch:
+ * @arg : A watch ID to remove or "*" to remove all watches
+ *
+ * Delete a given watch ID from our list of expressions to watch
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+ int xslDbgShellDeleteWatch(xmlChar* arg)
+{
+ int result = 0;
+ long watchID;
+ if (arg){
+ trimString(arg);
+ if (arg[0] == '*') {
+ arrayListEmpty(optionsGetWatchList());
+ }else if ((xmlStrlen(arg) == 0) ||
+ !sscanf((char *) arg, "%ld", &watchID)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a watchID.\n").arg(xsldbgText(arg)));
+ return result;
+ } else {
+ result = optionsRemoveWatch(watchID);
+ if (!result)
+ xsldbgGenericErrorFunc(i18n("Error: Watch expression %1 does not exist.\n").arg(watchID));
+ }
+ }
+ return result;
+}
+
+
+
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/options.cpp b/kxsldbg/kxsldbgpart/libxsldbg/options.cpp
new file mode 100644
index 00000000..9f667eb3
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/options.cpp
@@ -0,0 +1,902 @@
+
+/***************************************************************************
+ options.c - provide the implementation for option
+ related functions
+ -------------------
+ begin : Sat Nov 10 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "xsldbgthread.h"
+#include "options.h"
+#include "arraylist.h"
+#include "xsldbgmsg.h"
+#include "utils.h"
+#include <kglobal.h>
+#include <kstandarddirs.h>
+#include <qfileinfo.h>
+#include <qstringlist.h>
+
+
+/* keep track of our integer/boolean options */
+static int intOptions[OPTIONS_LAST_INT_OPTIONID - OPTIONS_FIRST_INT_OPTIONID + 1];
+
+/* make use that use of options are safe by only copying
+ critical values from intVolitleOptions just before stylesheet is started
+ */
+int intVolitileOptions[OPTIONS_LAST_INT_OPTIONID - OPTIONS_FIRST_INT_OPTIONID + 1];
+
+/* keep track of our string options */
+static xmlChar *stringOptions[OPTIONS_LAST_STRING_OPTIONID -
+ OPTIONS_FIRST_STRING_OPTIONID + 1];
+
+/* keep track of our parameters */
+static arrayListPtr parameterList;
+
+/* what are the expressions to be printed out when xsldbg stops */
+static arrayListPtr watchExpressionList;
+
+
+/* the names for our options
+ Items that start with *_ are options that CANNOT be used by the user
+ Once you set an option you need to give a run command to activate
+ new settings */
+const char *optionNames[] = {
+ "xinclude", /* Use xinclude during xml parsing */
+ "docbook", /* Use of docbook sgml parsing */
+ "timing", /* Use of timing */
+ "profile", /* Use of profiling */
+ "valid", /* Enable file validation */
+ "out", /* Enable output to stdout */
+ "html", /* Enable the use of html parsing */
+ "debug", /* Enable the use of xml tree debugging */
+ "shell", /* Enable the use of debugger shell */
+ "gdb", /* Run in gdb modem prints more messages */
+ "preferhtml", /* Prefer html output for search results */
+ "autoencode", /* Try to use the encoding from the stylesheet */
+ "utf8input", /* All input from "user" will be in UTF-8 */
+ "stdout", /* Print all error messages to stdout,
+ * normally error messages go to stderr */
+ "autorestart", /* When finishing the debug of a XSLT script
+ automaticly restart at the beginning */
+ "verbose", /* Be verbose with messages */
+ "repeat", /* The number of times to repeat */
+ "*_trace_*", /* Trace execution */
+ "*_walkspeed_*", /* How fast do we walk through code */
+ "catalogs", /* do we use catalogs in SGML_CATALOG_FILES */
+ "output", /* what is the output file name */
+ "source", /* The stylesheet source to use */
+ "docspath", /* Path of xsldbg's documentation */
+ "catalognames", /* The names of the catalogs to use when the catalogs option is active */
+ "encoding", /* What encoding to use for standard output */
+ "searchresultspath", /* Where do we store the results of search */
+ "data", /* The xml data file to use */
+ NULL /* indicate end of list */
+};
+
+
+
+// find the translated help documentation directory
+// langLookupDir code modified from langLookup function in kdebase/khelpcenter/view.cpp
+
+static QString langLookupDir( const QString &fname )
+{
+ QStringList search;
+
+ // assemble the local search paths
+ QStringList localDoc = KGlobal::dirs()->resourceDirs("html");
+ // also look in each of the KDEDIR paths
+ QString kdeDirs = getenv("KDEDIRS");
+ QStringList kdeDirsList = QStringList::split(":", kdeDirs);
+ if (!kdeDirs.isEmpty() && !kdeDirsList.isEmpty()){
+ for (QStringList::iterator it = kdeDirsList.begin(); it != kdeDirsList.end(); it++)
+ localDoc.append((*it) + "/share/doc/HTML/") ;
+ }
+
+ // look up the different languages
+ for (uint id=0; id < localDoc.count(); id++)
+ {
+ QStringList langs = KGlobal::locale()->languageList();
+ langs.append( "en" );
+ langs.remove( "C" );
+ QStringList::ConstIterator lang;
+ for (lang = langs.begin(); lang != langs.end(); ++lang)
+ search.append(QString("%1%2/%3/%4").arg(localDoc[id]).arg(*lang).arg("xsldbg").arg(fname));
+ }
+
+ // try to locate the file
+ QStringList::Iterator it;
+ for (it = search.begin(); it != search.end(); ++it)
+ {
+ QString baseDir = (*it).left((*it).findRev('/')) ;
+ QFileInfo info(baseDir + "/"+ fname);
+ if (info.exists() && info.isFile() && info.isReadable())
+ return baseDir;
+ }
+
+ return QString::null;
+}
+
+
+/**
+ * optionsInit:
+ *
+ * Intialize the options module
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+optionsInit(void)
+{
+ int optionId;
+
+ for (optionId = 0;
+ optionId <= OPTIONS_LAST_INT_OPTIONID - OPTIONS_FIRST_INT_OPTIONID; optionId++) {
+ intOptions[optionId] = 0;
+ intVolitileOptions[optionId] = 0;
+ }
+
+ for (optionId = 0;
+ optionId <= OPTIONS_LAST_STRING_OPTIONID - OPTIONS_FIRST_STRING_OPTIONID;
+ optionId++) {
+ stringOptions[optionId] = NULL;
+ }
+
+ /* init our parameter list */
+ parameterList = arrayListNew(10, (freeItemFunc) optionsParamItemFree);
+
+ /* setup the docs path */
+ optionsSetStringOption(OPTIONS_DOCS_PATH, (const xmlChar*)(langLookupDir("xsldbghelp.xml").utf8().data()));
+
+ optionsSetIntOption(OPTIONS_TRACE, TRACE_OFF);
+ optionsSetIntOption(OPTIONS_WALK_SPEED, WALKSPEED_STOP);
+ /* always try to use encoding if found */
+ optionsSetIntOption(OPTIONS_AUTOENCODE, 1);
+ /* start up with auto restart turned off */
+ optionsSetIntOption(OPTIONS_AUTORESTART, 0);
+ /* start up with gdb mode turned on */
+ optionsSetIntOption(OPTIONS_GDB, 1);
+ /* start up with output mode turned on */
+ optionsSetIntOption(OPTIONS_OUT, 1);
+ /* start up with validation turned on */
+ optionsSetIntOption(OPTIONS_VALID, 1);
+ /* start up with xinclude turned on */
+ optionsSetIntOption(OPTIONS_XINCLUDE, 1);
+
+ /* set output default as standard output. Must be changed if not using
+ * xsldbg's command line. Or the tty command is used */
+ optionsSetStringOption(OPTIONS_OUTPUT_FILE_NAME, NULL);
+
+ /* init our list of expressions to watch which are only a list of
+ strings ie xmlChar*'s */
+ watchExpressionList = arrayListNew(10, (freeItemFunc) xmlFree);
+
+ return (parameterList && watchExpressionList);
+}
+
+
+/**
+ * optionsFree:
+ *
+ * Free memory used by the options module
+ */
+void
+optionsFree(void)
+{
+ int string_option;
+
+ for (string_option = OPTIONS_FIRST_STRING_OPTIONID;
+ string_option <= OPTIONS_LAST_STRING_OPTIONID; string_option++) {
+ optionsSetStringOption(OptionTypeEnum(string_option), NULL);
+ }
+
+ /* Free up memory used by parameters and watches*/
+ arrayListFree(parameterList);
+ arrayListFree(watchExpressionList);
+ parameterList = NULL;
+ watchExpressionList = NULL;
+}
+
+
+ /**
+ * optionsGetOptionID:
+ * @optionName : A valid option name see documentation for "setoption"
+ * command and program usage documentation
+ *
+ * Find the option id for a given option name
+ *
+ * Returns The optionID for @optionName if successful, where
+ * OPTIONS_FIRST_OPTIONID<= optionID <= OPTIONS_LAST_OPTIONID,
+ * otherwise returns -1
+ */
+int
+optionsGetOptionID(xmlChar * optionName)
+{
+ int result = -1;
+ int optID = lookupName(optionName, (xmlChar **) optionNames);
+
+ if (optID >= 0) {
+ result = optID + OPTIONS_FIRST_OPTIONID;
+ }
+
+ return result;
+}
+
+
+ /**
+ * optionsGetOptionName:
+ * @ID : A valid option ID
+ *
+ * Get the name text for an option
+ *
+ * Returns The name of option if @ID is valid,
+ * NULL otherwise
+ */
+const xmlChar *
+optionsGetOptionName(OptionTypeEnum ID)
+{
+ const xmlChar *result = 0;
+ if ( (ID >= OPTIONS_FIRST_OPTIONID) && (ID <= OPTIONS_LAST_OPTIONID)){
+ /* An option ID is always valid at the moment */
+ result = (const xmlChar *) optionNames[ID - OPTIONS_FIRST_OPTIONID];
+ }
+
+ return result;
+}
+
+
+/**
+ * optionsSetIntOption:
+ * @optionType: A valid boolean option
+ * @value: 1 to enable, 0 otherwise
+ *
+ * Set the state of a boolean xsldbg option to @value
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+optionsSetIntOption(OptionTypeEnum optionType, int value)
+{
+ int type = optionType, result = 1;
+
+ if ((type >= OPTIONS_FIRST_INT_OPTIONID) && (type <= OPTIONS_LAST_INT_OPTIONID)) {
+ /* make sure that use of options are safe by only copying
+ * critical values from intVolitleOptions just before
+ * stylesheet is started
+ */
+ intVolitileOptions[type - OPTIONS_FIRST_INT_OPTIONID] = value;
+
+ /* the following types must be activated imediately */
+ switch (type) {
+
+ case OPTIONS_TRACE:
+ case OPTIONS_WALK_SPEED:
+ case OPTIONS_GDB:
+ intOptions[type - OPTIONS_FIRST_INT_OPTIONID] = value;
+ break;
+
+ default:
+ break;
+ }
+ } else {
+ if ((type >= OPTIONS_FIRST_OPTIONID) && (type <= OPTIONS_LAST_OPTIONID)){
+ xsldbgGenericErrorFunc(i18n("Error: Option %1 is not a valid boolean/integer option.\n").arg(xsldbgText(optionNames[type - OPTIONS_FIRST_OPTIONID])));
+ }else{
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsldbgGenericErrorFunc(QString("Error: Invalid arguments for the command %1.\n").arg("setoption"));
+#endif
+ }
+ result = 0;
+ }
+ return result;
+}
+
+
+/**
+ * optionsGetIntOption:
+ * @optionType: A valid boolean option to query
+ *
+ * Return the state of a boolean option
+ *
+ * Returns The state of a boolean xsldbg option.
+ * ie 1 for enabled , 0 for disabled
+ */
+int
+optionsGetIntOption(OptionTypeEnum optionType)
+{
+ int type = optionType, result = 0;
+
+ if ((type >= OPTIONS_FIRST_INT_OPTIONID) && (type <= OPTIONS_LAST_INT_OPTIONID)) {
+ result = intOptions[type - OPTIONS_FIRST_INT_OPTIONID];
+ } else {
+ if ((type >= OPTIONS_FIRST_OPTIONID) && (type <= OPTIONS_LAST_OPTIONID)){
+ xsldbgGenericErrorFunc(i18n("Error: Option %1 is not a valid boolean/integer option.\n").arg(xsldbgText(optionNames[type - OPTIONS_FIRST_OPTIONID])));
+ }else{
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsldbgGenericErrorFunc(QString("Error: Invalid arguments for the command %1.\n").arg("options"));
+#endif
+ }
+ }
+ return result;
+}
+
+
+
+/**
+ * optionsSetStringOption:
+ * @optionType: A valid string option
+ * @value: The value to copy
+ *
+ * Set value for a string xsldbg option to @value.
+ * Any memory used currently by option @optionType will be freed
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+optionsSetStringOption(OptionTypeEnum optionType, const xmlChar * value)
+{
+ int type = optionType, result = 0;
+
+ if ((type >= OPTIONS_FIRST_STRING_OPTIONID) &&
+ (type <= OPTIONS_LAST_STRING_OPTIONID)) {
+ int optionId = type - OPTIONS_FIRST_STRING_OPTIONID;
+
+ if (stringOptions[optionId])
+ xmlFree(stringOptions[optionId]);
+ if (value)
+ stringOptions[optionId] =
+ (xmlChar *) xmlMemStrdup((char *) value);
+ else /* we want to be able to provide a NULL value */
+ stringOptions[optionId] = NULL;
+ result = 1;
+ } else{
+ if ((type >= OPTIONS_FIRST_OPTIONID) && (type <= OPTIONS_LAST_OPTIONID)){
+ xsldbgGenericErrorFunc(i18n("Error: Option %1 is not a valid string xsldbg option.\n").arg(xsldbgText(optionNames[type - OPTIONS_LAST_OPTIONID])));
+ }else{
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsldbgGenericErrorFunc(QString("Error: Invalid arguments for the command %1.\n").arg("setoption"));
+#endif
+ }
+ }
+ return result;
+}
+
+
+/**
+ * optionsGetStringOption:
+ * @optionType: A valid string option
+ *
+ * Get value for a string xsldbg option of @optionType
+
+ * Returns current option value which may be NULL
+ */
+const xmlChar *
+optionsGetStringOption(OptionTypeEnum optionType)
+{
+ int type = optionType;
+ xmlChar *result = NULL;
+
+ if ((type >= OPTIONS_FIRST_STRING_OPTIONID) &&
+ (type <= OPTIONS_LAST_STRING_OPTIONID)) {
+ int optionId = type - OPTIONS_FIRST_STRING_OPTIONID;
+ result = stringOptions[optionId];
+ } else{
+ if ((type >= OPTIONS_FIRST_OPTIONID) && (type <= OPTIONS_LAST_OPTIONID)){
+ xsldbgGenericErrorFunc(i18n("Error: Option %1 is not a valid string xsldbg option.\n").arg(xsldbgText(optionNames[type - OPTIONS_FIRST_OPTIONID])));
+ }else{
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsldbgGenericErrorFunc(QString("Error: Invalid arguments for the command %1.\n").arg("options"));
+#endif
+ }
+ }
+ return result;
+}
+
+
+ /**
+ * optionsCopyVolitleOptions:
+ *
+ * Copy volitile options to the working area for xsldbg to be used
+ * just after xsldbg starts its processing loop
+ */
+void
+optionsCopyVolitleOptions(void)
+{
+ int optionId;
+
+ for (optionId = 0;
+ optionId <= OPTIONS_LAST_INT_OPTIONID - OPTIONS_FIRST_INT_OPTIONID; optionId++) {
+ intOptions[optionId] = intVolitileOptions[optionId];
+ }
+}
+
+
+/**
+ * optionsParamItemNew:
+ * @name: Is valid
+ * @value: Is valid
+ *
+ * Create a new libxslt parameter item
+ * Returns non-null if sucessful
+ * NULL otherwise
+ */
+parameterItemPtr
+optionsParamItemNew(const xmlChar * name, const xmlChar * value)
+{
+ parameterItemPtr result = NULL;
+
+ if (name) {
+ result = (parameterItem *) xmlMalloc(sizeof(parameterItem));
+ if (result) {
+ result->name = (xmlChar *) xmlMemStrdup((char *) name);
+ if (value)
+ result->value = (xmlChar *) xmlMemStrdup((char *) value);
+ else
+ result->value = (xmlChar *) xmlMemStrdup("");
+ result->intValue = -1;
+ }
+ }
+ return result;
+}
+
+
+/**
+ * optionsParamItemFree:
+ * @item: Is valid
+ *
+ * Free memory used by libxslt parameter item @item
+ */
+void
+optionsParamItemFree(parameterItemPtr item)
+{
+ if (item) {
+ if (item->name)
+ xmlFree(item->name);
+ if (item->value)
+ xmlFree(item->value);
+ xmlFree(item);
+ }
+
+}
+
+
+/**
+ * optionsGetParamItemList:
+ *
+ * Return the list of libxlt parameters
+ *
+ * Returns The list of parameters to provide to libxslt when doing
+ * stylesheet transformation if successful
+ * NULL otherwise
+ */
+arrayListPtr
+optionsGetParamItemList(void)
+{
+ return parameterList;
+}
+
+
+/**
+ * optionsPrintParam:
+ * @paramId: 0 =< paramID < arrayListCount(getParamList())
+ *
+ * Print parameter information
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+optionsPrintParam(int paramId)
+{
+ int result = 0;
+ parameterItemPtr paramItem =
+ (parameterItemPtr) arrayListGet(optionsGetParamItemList(),
+ paramId);
+
+ if (paramItem && paramItem->name && paramItem->value) {
+ xsldbgGenericErrorFunc(i18n(" Parameter %1 %2=\"%3\"\n").arg(paramId).arg(xsldbgText(paramItem->name)).arg(xsldbgText(paramItem->value)));
+ result = 1;
+ }
+ return result;
+}
+
+
+/**
+ * optionsPrintParamList:
+ *
+ * Prints all items in parameter list
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+optionsPrintParamList(void)
+{
+ int result = 1;
+ int paramIndex = 0;
+ int itemCount = arrayListCount(optionsGetParamItemList());
+
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ if (itemCount > 0) {
+ while (result && (paramIndex < itemCount)) {
+ result = optionsPrintParam(paramIndex++);
+ }
+ }
+ } else {
+ if (itemCount > 0) {
+ xsltGenericError(xsltGenericErrorContext, "\n");
+ while (result && (paramIndex < itemCount)) {
+ result = optionsPrintParam(paramIndex++);
+ }
+ } else
+ xsldbgGenericErrorFunc(i18n("\nNo parameters present.\n"));
+ }
+ return result;
+}
+
+
+ /**
+ * optionsNode:
+ * @optionType : Is valid, option to convert to a xmlNodePtr
+ *
+ * Convert option into a xmlNodePtr
+ *
+ * Returns the option @optionType as a xmlNodePtr if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+optionsNode(OptionTypeEnum optionType)
+{
+ xmlNodePtr node = NULL;
+ char numberBuffer[10];
+ int result = 1;
+
+ numberBuffer[0] = '\0';
+ if (optionType <= OPTIONS_VERBOSE) {
+ /* integer option */
+ node = xmlNewNode(NULL, (xmlChar *) "intoption");
+ if (node) {
+ snprintf(numberBuffer, sizeof(numberBuffer), "%d",
+ optionsGetIntOption(optionType));
+ result = result && (xmlNewProp
+ (node, (xmlChar *) "name",
+ (xmlChar *) optionNames[optionType -
+ OPTIONS_XINCLUDE])
+ != NULL);
+ if (result)
+ result = result && (xmlNewProp(node, (xmlChar *) "value",
+ (xmlChar *) numberBuffer) !=
+ NULL);
+ if (!result) {
+ xmlFreeNode(node);
+ node = NULL;
+ }
+
+ }
+ } else {
+ /* string option */
+ node = xmlNewNode(NULL, (xmlChar *) "stringoption");
+ if (node) {
+ result = result && (xmlNewProp
+ (node, (xmlChar *) "name",
+ (xmlChar *) optionNames[optionType -
+ OPTIONS_XINCLUDE])
+ != NULL);
+ if (result) {
+ if (optionsGetStringOption(optionType))
+ result = result && (xmlNewProp
+ (node, (xmlChar *) "value",
+ optionsGetStringOption
+ (optionType)) != NULL);
+ else
+ result = result && (xmlNewProp
+ (node, (xmlChar *) "value",
+ (xmlChar *) "") != NULL);
+ }
+
+ if (!result) {
+ xmlFreeNode(node);
+ node = NULL;
+ }
+
+ }
+ }
+ return node;
+}
+
+
+ /**
+ * optionsReadDoc:
+ * @doc : Is valid xsldbg config document, in the format as indicated
+ * by config.dtd
+ *
+ * Read options from document provided.
+ *
+ * Returns 1 if able to read @doc and load options found,
+ * 0 otherwise
+ */
+int
+optionsReadDoc(xmlDocPtr doc)
+{
+ int result = 1;
+ xmlChar *name, *value;
+ int optID;
+ xmlNodePtr node;
+
+ /* very primative search for config node
+ * we skip the DTD and then go straight to the first child of
+ * config node */
+ if (doc && doc->children->next && doc->children->next->children) {
+ /* find the first configuration option */
+ node = doc->children->next->children;
+ while (node && result) {
+ if (node->type == XML_ELEMENT_NODE) {
+ if (xmlStrCmp(node->name, "intoption") == 0) {
+ name = xmlGetProp(node, (xmlChar *) "name");
+ value = xmlGetProp(node, (xmlChar *) "value");
+ if (name && value && (atoi((char *) value) >= 0)) {
+ optID = lookupName(name, (xmlChar **) optionNames);
+ if (optID >= 0)
+ result =
+ optionsSetIntOption(OptionTypeEnum(optID + OPTIONS_XINCLUDE),
+ atoi((char *) value));
+ }
+ if (name)
+ xmlFree(name);
+ if (value)
+ xmlFree(value);
+ } else if (xmlStrCmp(node->name, "stringoption") == 0) {
+ name = xmlGetProp(node, (xmlChar *) "name");
+ value = xmlGetProp(node, (xmlChar *) "value");
+ if (name && value) {
+ optID = lookupName(name, (xmlChar **) optionNames);
+ if (optID >= 0)
+ result =
+ optionsSetStringOption(OptionTypeEnum(optID + OPTIONS_XINCLUDE),
+ value);
+ }
+ if (name)
+ xmlFree(name);
+ if (value)
+ xmlFree(value);
+ }
+ }
+ node = node->next;
+ }
+ }
+ return result;
+}
+
+
+
+/**
+ * optionsSavetoFile:
+ * @fileName : Must be NON NULL be a local file that can be written to
+ *
+ * Save configuation to file specified
+ *
+ * Returns 1 if able to save options to @fileName,
+ * 0 otherwise
+ */
+int
+optionsSavetoFile(xmlChar * fileName)
+{
+ int result = 0;
+ int optionIndex = 0;
+ xmlDocPtr configDoc;
+ xmlNodePtr rootNode;
+ xmlNodePtr node = NULL;
+
+ if (!fileName) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL file name provided\n");
+#endif
+ return result;
+ }
+
+ configDoc = xmlNewDoc((xmlChar *) "1.0");
+ rootNode = xmlNewNode(NULL, (xmlChar *) "config");
+
+ if (configDoc && rootNode) {
+ xmlCreateIntSubset(configDoc, (xmlChar *) "config", (xmlChar *)
+ "-//xsldbg//DTD config XML V1.0//EN",
+ (xmlChar *) "config.dtd");
+ xmlAddChild((xmlNodePtr) configDoc, rootNode);
+
+ /*now to do the work of adding configuration items */
+ for (optionIndex = OPTIONS_XINCLUDE;
+ optionIndex <= OPTIONS_DATA_FILE_NAME; optionIndex++) {
+ result = 1;
+ if (optionNames[optionIndex - OPTIONS_XINCLUDE][0] == '*')
+ continue; /* don't save non user options */
+
+ node = optionsNode(OptionTypeEnum(optionIndex));
+ if (node)
+ xmlAddChild(rootNode, node);
+ else {
+ result = 0;
+ break;
+ }
+ }
+
+ if (result) {
+ /* so far so good, now to serialize it to disk */
+ if (!xmlSaveFormatFile((char *) fileName, configDoc, 1))
+ result = 0;
+ }
+
+ xmlFreeDoc(configDoc);
+ } else {
+
+ if (configDoc)
+ xmlFreeDoc(configDoc);
+
+ if (rootNode)
+ xmlFreeNode(rootNode);
+
+ }
+
+ return result;
+}
+
+
+
+ /**
+ * optionsConfigState:
+ * @value : Is valid
+ *
+ * Set/Get the state of configuration loading/saving
+ *
+ * Returns The current/new value of configuration flag. Where
+ * @value means:
+ * OPTIONS_CONFIG_READVALUE : No change return current
+ * value of read configuration flag
+ * OPTIONS_CONFIG_WRITING : Clear flag and return
+ * OPTIONS_CONFIG_WRITING which mean configuration
+ * file is being written
+ * OPTIONS_CONFIG_READING : Set flag and return
+ * OPTIONS_CONFIG_READING, which means configuration
+ * file is being read
+ * OPTIONS_CONFIG_IDLE : We are neither reading or writing
+ * configuration and return OPTIONS_CONFIG_IDLE
+ */
+int
+optionsConfigState(OptionsConfigState value)
+{
+ int result = OPTIONS_CONFIG_IDLE;
+
+ /* work around as some compiler refuse to switch on enums */
+ int configValue = value;
+
+ /* hold the current state of configuration reading/writing */
+ static int configState = OPTIONS_CONFIG_IDLE;
+
+ switch (configValue) {
+ case OPTIONS_CONFIG_READVALUE:
+ /* read the current value only */
+ result = configState;
+ break;
+
+ case OPTIONS_CONFIG_READING:
+ case OPTIONS_CONFIG_WRITING:
+ /* update the value */
+ result = configValue;
+ configState = configValue;
+ break;
+ }
+
+ return result;
+}
+
+ /**
+ * optionsAddWatch:
+ * @xPath : A valid xPath to evaluate in a context and
+ * has not already been addded
+ *
+ * Add xPath to be evaluated and printed out each time the debugger stops
+ *
+ * Returns 1 if able to add xPath to watched
+ * 0 otherwise
+ */
+ int optionsAddWatch(const xmlChar* xPath)
+{
+ int result = 0;
+ if (!xPath || (xmlStrlen(xPath) == 0)){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Invalid XPath supplied\n");
+#endif
+ } else{
+ if (optionsGetWatchID(xPath) == 0){
+ xmlChar * nameCopy = xmlStrdup(xPath);
+ if (nameCopy){
+ arrayListAdd(watchExpressionList, nameCopy);
+ result = 1;
+ }
+ }
+ }
+
+ return result;
+}
+
+
+ /**
+ * optionsGetWatchID:
+ * @xPath : A valid watch expression that has already been added
+ *
+ * Finds the ID of watch expression previously added
+ *
+ * Returns 0 if not found,
+ * otherwise returns the ID of watch expression
+ */
+ int optionsGetWatchID(const xmlChar* xPath)
+{
+ int result = 0, counter;
+ xmlChar* watchExpression;
+ if (!xPath){
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Invalid xPath supplied\n");
+#endif
+ } else{
+ for ( counter = 0;
+ counter < arrayListCount(watchExpressionList);
+ counter++){
+ watchExpression = (xmlChar*)arrayListGet(watchExpressionList, counter);
+ if (watchExpression){
+ if (xmlStrEqual(xPath, watchExpression)){
+ result = counter + 1;
+ break;
+ }
+ }else{
+ break;
+ }
+ }
+ }
+
+ return result;
+}
+
+ /**
+ * optionsRemoveWatch:
+ * @watchID : A valid watchID as indicated by last optionsPrintWatches
+ * @showWarnings : Print more error messages if 1,
+ * print less if 0
+ *
+ * Remove the watch with given ID from our list of expressions to watch
+ *
+ * Returns 1 if able to remove to watch expression
+ * 0 otherwise
+ */
+ int optionsRemoveWatch(int watchID)
+{
+ return arrayListDelete(watchExpressionList, watchID - 1);
+}
+
+ /**
+ * optionsGetWatchList:
+ *
+ * Return the current list of expressions to watch
+ *
+ * Return the current list of expressions to watch
+ */
+ arrayListPtr optionsGetWatchList()
+{
+ return watchExpressionList;
+}
+
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/options.h b/kxsldbg/kxsldbgpart/libxsldbg/options.h
new file mode 100644
index 00000000..60ab69d3
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/options.h
@@ -0,0 +1,476 @@
+
+/***************************************************************************
+ options.h - define option related functions
+ -------------------
+ begin : Sat Nov 10 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 OPTIONS_H
+#define OPTIONS_H
+
+#include "arraylist.h"
+
+/**
+ * Provide a mechanism to change option. The Options structure is not in use,
+ * it has been added so that kdoc puts all option related
+ * functions together
+ *
+ * @short file support
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+
+/* We want skip most of these includes when building documentation */
+#ifndef BUILD_DOCS
+#include <libxslt/xslt.h>
+#endif
+
+/* ---------------------------------------
+ Misc options
+-------------------------------------------*/
+
+/** The largest number lines of text can be print print printing documents
+ This is equivant to gdb shorting of evaluation values
+ */
+#define GDB_LINES_TO_PRINT 3
+
+
+ enum OptionsConfigState {
+ OPTIONS_CONFIG_READVALUE = -1, /* Read configuration flag */
+ OPTIONS_CONFIG_READING = 1, /* Configuration file is being read */
+ OPTIONS_CONFIG_WRITING, /* Configuration file is being written */
+ OPTIONS_CONFIG_IDLE /* We are neither reading or writing */
+ };
+
+ enum OptionTypeEnum {
+ OPTIONS_XINCLUDE = 500, /* Use xinclude during xml parsing */
+ OPTIONS_FIRST_BOOL_OPTIONID = OPTIONS_XINCLUDE,
+ OPTIONS_FIRST_INT_OPTIONID = OPTIONS_XINCLUDE,
+ OPTIONS_FIRST_OPTIONID = OPTIONS_XINCLUDE,
+ OPTIONS_DOCBOOK, /* Use of docbook sgml parsing */
+ OPTIONS_TIMING, /* Use of timing */
+ OPTIONS_PROFILING, /* Use of profiling */
+ OPTIONS_VALID, /* Enables file validation */
+ OPTIONS_OUT, /* Enables output to stdout */
+ OPTIONS_HTML, /* Enable the use of html parsing */
+ OPTIONS_DEBUG, /* Enable the use of xml tree debugging */
+ OPTIONS_SHELL, /* Enable the use of debugger shell */
+ OPTIONS_GDB, /* Run in gdb modem prints more messages) */
+ OPTIONS_PREFER_HTML, /* Prefer html output for search results */
+ OPTIONS_AUTOENCODE, /* try to use the encoding from the stylesheet */
+ OPTIONS_UTF8_INPUT, /* All input from user is in UTF-8.This normaly
+ * used when xsldbg is running as a thread */
+ OPTIONS_STDOUT, /* Print all error messages to stdout,
+ * normally error messages go to stderr */
+ OPTIONS_AUTORESTART, /* When finishing the debug of a XSLT script
+ automaticly restart at the beginning */
+ OPTIONS_VERBOSE, /* Be verbose with messages */
+ OPTIONS_LAST_BOOL_OPTIONID = OPTIONS_VERBOSE,
+ OPTIONS_REPEAT, /* The number of times to repeat */
+ OPTIONS_TRACE, /* Trace execution */
+ OPTIONS_WALK_SPEED, /* How fast do we walk through code */
+ OPTIONS_CATALOGS, /* Get the catalogs from SGML_CATALOG_FILES and
+ * store it in OPTIONS_CATALOG_NAMES */
+ OPTIONS_LAST_INT_OPTIONID = OPTIONS_CATALOGS,
+ OPTIONS_OUTPUT_FILE_NAME, /* what is the output file name */
+ OPTIONS_FIRST_STRING_OPTIONID = OPTIONS_OUTPUT_FILE_NAME,
+ OPTIONS_SOURCE_FILE_NAME, /* the stylesheet source to use */
+ OPTIONS_DOCS_PATH, /* path of xsldbg's documentation */
+ OPTIONS_CATALOG_NAMES, /* the names of the catalogs to use when catalogs option is active */
+ OPTIONS_ENCODING, /* What encoding to use for standard output */
+ OPTIONS_SEARCH_RESULTS_PATH, /* Where do we store the results of searching */
+ OPTIONS_DATA_FILE_NAME, /* xml data file to use */
+ OPTIONS_LAST_STRING_OPTIONID = OPTIONS_DATA_FILE_NAME,
+ OPTIONS_LAST_OPTIONID = OPTIONS_DATA_FILE_NAME
+ };
+
+ /* define what tracing is used */
+ enum TraceModeEnum {
+ TRACE_OFF = 600, /* disable tracing */
+ TRACE_ON, /* enable tracing */
+ TRACE_RUNNING, /* tracing is running */
+ TRACE_FINISHED /* not needed but just in case */
+ };
+
+ /* what speeds can we walk through a stylesheet */
+ /* must start walkSpeed enums from zero !! */
+ enum WalkSpeedEnum {
+ WALKSPEED_0 = 0,
+ WALKSPEED_STOP = WALKSPEED_0,
+ WALKSPEED_1,
+ WALKSPEED_FAST = WALKSPEED_1,
+ WALKSPEED_2,
+ WALKSPEED_3,
+ WALKSPEED_4,
+ WALKSPEED_5,
+ WALKSPEED_NORMAL = WALKSPEED_5,
+ WALKSPEED_6,
+ WALKSPEED_7,
+ WALKSPEED_8,
+ WALKSPEED_9,
+ WALKSPEED_SLOW = WALKSPEED_9
+ };
+
+extern int intVolitileOptions[OPTIONS_LAST_INT_OPTIONID - OPTIONS_FIRST_INT_OPTIONID + 1];
+
+/* how many microseconds is each speed increase worth*/
+#define WALKDELAY 250000
+
+
+/* for non win32 environments see the macro in xsldebugger/Makefile.am
+ Win32 type systems see macro in libxslt/xsltwin32config.h
+*/
+#ifdef __riscos
+
+/* The environment variable name we are going to use is the readable version
+ of the application name */
+#define XSLDBG_DOCS_DIR_VARIABLE "XSLDebugDocs$Dir"
+#else
+
+/* The environment variable name on normal systems */
+#define XSLDBG_DOCS_DIR_VARIABLE "XSLDBG_DOCS_DIR"
+#endif
+
+/* used to keep track of libxslt paramters
+ see Parameter related options near end of file
+*/
+ typedef struct _parameterItem parameterItem;
+ typedef parameterItem *parameterItemPtr;
+ struct _parameterItem {
+ xmlChar *name; /* libxslt parameter name */
+ xmlChar *value; /* libxslt parameter value */
+ int intValue; /* reserved */
+ };
+
+
+
+/**
+ * Initialized the options module
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+ int optionsInit(void);
+
+
+
+/**
+ * Free memory used by the options module
+ */
+ void optionsFree(void);
+
+
+ /**
+ * Find the option id for a given option name
+ *
+ * @returns The optionID for @optionName if successful, where
+ * OPTIONS_XINCLUDE<= optionID <= OPTIONS_DATA_FILE_NAME,
+ * otherwise returns -1
+ *
+ * @param optionName A valid option name see documentation for "setoption"
+ * command and program usage documentation
+ *
+ */
+ int optionsGetOptionID(xmlChar * optionName);
+
+
+
+ /**
+ * Get the name text for an option
+ *
+ * Returns The name of option if @ID is valid,
+ * NULL otherwise
+ *
+ * @param ID A valid option ID
+ *
+ */
+ const xmlChar *optionsGetOptionName(OptionTypeEnum ID);
+
+
+/**
+ * Set the value of an integer xsldbg option to @p value
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param optionType Is a valid integer option
+ * @param value Is the valid to adopt
+ */
+ int optionsSetIntOption(OptionTypeEnum optionType, int value);
+
+
+/**
+ * @returns The state of a integer xsldbg option
+ *
+ * @param optionType Is a valid integer option
+ */
+ int optionsGetIntOption(OptionTypeEnum optionType);
+
+
+/**
+ * Set value for a string xsldbg option to @p value.
+ * Any memory used currently by option @p optionType will be freed
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param optionType A valid string option
+ * @param value The value to copy
+ */
+ int optionsSetStringOption(OptionTypeEnum optionType,
+ const xmlChar * value);
+
+
+/**
+ * Get value for a string xsldbg option of @p optionType
+ *
+ * @returns current option value which may be NULL
+ *
+ * @param optionType A valid string option
+ */
+ const xmlChar *optionsGetStringOption(OptionTypeEnum optionType);
+
+
+ /**
+ * Copy volitile options to the working area for xsldbg to be used
+ * just after xsldbg starts its processing loop
+ */
+ void optionsCopyVolitleOptions(void);
+
+
+
+/*---------------------------------------------
+ Parameter related options
+-------------------------------------------------*/
+
+
+/**
+ * Return the list of libxlt parameters
+ *
+ * @returns The list of parameters to provide to libxslt when doing
+ * stylesheet transformation if successful
+ * NULL otherwise
+ */
+ arrayListPtr optionsGetParamItemList(void);
+
+
+
+/**
+ * Create a new libxslt parameter item
+ *
+ * @returns non-null if sucessful
+ * NULL otherwise
+ *
+ * @param name Is valid
+ * @param value Is valid
+ */
+ parameterItemPtr optionsParamItemNew(const xmlChar * name,
+ const xmlChar * value);
+
+
+/**
+ * Free memory used by libxslt parameter item @p item
+ *
+ * @param item Is valid
+ */
+ void optionsParamItemFree(parameterItemPtr item);
+
+
+/**
+ * Prints all items in parameter list
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+ int optionsPrintParam(int paramId);
+
+
+
+/**
+ * Prints all items in parameter list
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+ int optionsPrintParamList(void);
+
+/* ---------------------------------------------
+ Option serialization functions
+-------------------------------------------------*/
+
+ /**
+ * Convert option into a xmlNodePtr
+ *
+ * @returns The option @p optionType as a xmlNodePtr if successful,
+ * NULL otherwise
+ *
+ * @param optionType Is valid, option to convert to a xmlNodePtr
+ *
+ */
+ xmlNodePtr optionsNode(OptionTypeEnum optionType);
+
+
+
+ /**
+ * Read options from document provided.
+ *
+ * @returns 1 if able to read @p doc and load options found,
+ * 0 otherwise
+ *
+ * @param doc Is valid xsldbg config document, in the format as indicated
+ * by config.dtd
+ */
+ int optionsReadDoc(xmlDocPtr doc);
+
+
+ /**
+ * Save configuation to file specified
+ *
+ * @returns 1 if able to save options to @fileName,
+ * 0 otherwise
+ *
+ * @fileName : Must be NON NULL be a local file that can be written to
+ */
+ int optionsSavetoFile(xmlChar * fileName);
+
+
+/* ---------------------------------------------
+ Platform specific option functions
+-------------------------------------------------*/
+
+ /**
+ * Intialize the platform specific options module
+ *
+ * This is a platform specific interface
+ *
+ * @returns 1 if sucessful
+ * 0 otherwise
+ */
+ int optionsPlatformInit(void);
+
+
+ /**
+ * Free memory used by the platform specific options module
+ *
+ * This is a platform specific interface
+ *
+ */
+ void optionsPlatformFree(void);
+
+
+ /**
+ * Return xsldbg's the configuration file name
+ *
+ * Returns A copy of the file name that will be used to load xsldbgs
+ * configuration from,
+ * NULL otherwise
+ *
+ * This is a platform specific interface
+ *
+ */
+ xmlChar *optionsConfigFileName(void);
+
+
+ /**
+ * Load options from configuration file/registry
+ *
+ * This is a platform specific interface
+ *
+ * Returns 1 if able to load options
+ * 0 otherwise
+ */
+ int optionsLoad(void);
+
+
+ /**
+ * Save options to configuration file/registry
+ *
+ * This is a platform specific interface
+ *
+ * Returns 1 if able to load options
+ * 0 otherwise
+ */
+ int optionsSave(void);
+
+
+ /**
+ * Set/Get the state of configuration loading/saving. Normally only used
+ * by RISC OS
+ *
+ *
+ * Returns The current/new value of configuration flag. Where
+ * @p value means:
+ * OPTIONS_CONFIG_READVALUE : No change return current
+ * value of read configuration flag
+ * OPTIONS_CONFIG_WRITING : Clear flag and return
+ * OPTIONS_CONFIG_WRITING which mean configuration
+ * file is being written
+ * OPTIONS_CONFIG_READING : Set flag and return
+ * OPTIONS_CONFIG_READING, which means configuration
+ * file is being read
+ * OPTIONS_CONFIG_IDLE : We are neither reading or writing
+ * configuration and return OPTIONS_CONFIG_IDLE
+ *
+ * @param value Is valid
+ *
+ */
+ int optionsConfigState(OptionsConfigState value);
+
+ /**
+ * optionsAddWatch:
+ * @xPath : A valid xPath to evaluate in a context and
+ * has not already been addded
+ *
+ * Add xPath to be evaluated and printed out each time the debugger stops
+ *
+ * Returns 1 if able to add xPath to watched
+ * 0 otherwise
+ */
+ int optionsAddWatch(const xmlChar* xPath);
+
+ /**
+ * optionsGetWatchID:
+ * @xPath : A valid watch expression that has already been added
+ *
+ * Finds the ID of watch expression previously added
+ *
+ * Returns 0 if not found,
+ * otherwise returns the ID of watch expression
+ */
+ int optionsGetWatchID(const xmlChar* xPath);
+
+
+ /**
+ * optionsRemoveWatch:
+ * @watchID : A valid watchID as indicated by last optionsPrintWatches
+ *
+ * Remove the watch with given ID from our list of expressions to watch
+ *
+ * Returns 1 if able to remove to watch expression
+ * 0 otherwise
+ */
+ int optionsRemoveWatch(int watchID);
+
+
+ /**
+ * optionsGetWatchList:
+ *
+ * Return the current list of expressions to watch
+ *
+ * Return the current list of expressions to watch
+ */
+ arrayListPtr optionsGetWatchList(void);
+
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/options_unix.cpp b/kxsldbg/kxsldbgpart/libxsldbg/options_unix.cpp
new file mode 100644
index 00000000..27c7d2f1
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/options_unix.cpp
@@ -0,0 +1,118 @@
+
+/***************************************************************************
+ options_unix.c - *nix specific option functions
+ -------------------
+ begin : Tue Jan 29 2002
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <libxml/parser.h>
+#include <stdlib.h>
+#include <string.h>
+#include "xsldbg.h"
+#include "options.h"
+
+ /**
+ * optionsPlatformInit:
+ *
+ * Intialize the platform specific options module
+ *
+ * This is a platform specific interface
+ *
+ * Returns 1 if sucessful
+ * 0 otherwise
+ */
+int
+optionsPlatformInit(void)
+{
+ return 1;
+}
+
+
+ /**
+ * optionsPlatformFree:
+ *
+ * Free memory used by the platform specific options module
+ *
+ * This is a platform specific interface
+ *
+ */
+void
+optionsPlatformFree(void)
+{
+ /* empty */
+}
+
+ /**
+ * optionsConfigFileName:
+ *
+ * Returns A copy of the file name that will be used to load xsldbgs
+ * configuration from,
+ * NULL otherwise
+ */
+xmlChar *
+optionsConfigFileName(void)
+{
+ xmlChar *result = NULL;
+ const char *homeDir = getenv("HOME");
+ const char *configName = "xsldbg.rc";
+ int bufferSize = 0;
+
+ if (homeDir) {
+ /* give ourselves a bit of room to move */
+ bufferSize = strlen(homeDir) + strlen(configName) + 10;
+ result = (xmlChar *) xmlMalloc(bufferSize);
+ snprintf((char *) result, bufferSize, "%s/%s", homeDir,
+ configName);
+ }
+ return result;
+}
+
+
+ /**
+ * optionsLoad:
+ *
+ * Load options from configuration file/registry
+ *
+ * This is a platform specific interface
+ *
+ * Returns 1 if able to load options
+ * 0 otherwise
+ */
+int
+optionsLoad(void)
+{
+ int result = 0;
+ xmlDocPtr doc = xmlParseFile((char *) optionsConfigFileName());
+
+ if (doc)
+ result = optionsReadDoc(doc);
+ return 0;
+}
+
+
+ /**
+ * optionsSave:
+ *
+ * Save options to configuration file/registry
+ *
+ * This is a platform specific interface
+ *
+ * Returns 1 if able to save options
+ * 0 otherwise
+ */
+int
+optionsSave(void)
+{
+ return optionsSavetoFile(optionsConfigFileName());
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/os_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/os_cmds.cpp
new file mode 100644
index 00000000..dac5bb0f
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/os_cmds.cpp
@@ -0,0 +1,100 @@
+
+/***************************************************************************
+ os_cmds.c - operating system commands for xsldbg
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "debugXSL.h"
+#include "files.h"
+
+/* -----------------------------------------
+
+ Operating system related commands
+
+ ------------------------------------------- */
+
+
+/**
+ * xslDbgShellChangeWd:
+ * @path: The path to change to
+ *
+ * Change the current working directory of the operating system
+ *
+ * Returns 1 if able to change xsldbg's working directory to @path
+ * 0 otherwise
+ */
+int
+xslDbgShellChangeWd(xmlChar * path)
+{
+ int result = 0;
+
+ if (xmlStrLen(path)) {
+ /* call function in files.c to do the work */
+ result = changeDir(path);
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("chdir"));
+ return result;
+}
+
+
+/**
+ * xslDbgShellExecute:
+ * @name: The name of command string to be executed by operating system shell
+ * @verbose: If 1 then print extra debugging messages,
+ * normal messages otherwise
+ *
+ * Execute an operating system command
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellExecute(xmlChar * name, int verbose)
+{
+ int result = 0;
+
+ /* Quick check to see if we have a command processor; embedded systems
+ * may not have such a thing */
+ if (system(NULL) == 0) {
+ xsldbgGenericErrorFunc(i18n("Error: No command processor available for shell command \"%1\".\n").arg(xsldbgText(name)));
+ } else {
+ int return_code;
+
+ if (verbose)
+ xsldbgGenericErrorFunc(i18n("Information: Starting shell command \"%1\".\n").arg(xsldbgText(name)));
+
+ return_code = system((char *) name);
+ /* JRF: Strictly system returns an implementation defined value -
+ * we are interpreting that value here, so we need
+ * implementation specific code to handle each case */
+
+#ifdef __riscos
+ /* on RISC OS -2 means 'system call failed', otherwise it is the
+ * return code from the sub-program */
+ if (return_code != -2) {
+#else
+ if (return_code == 0) {
+#endif
+ if (verbose)
+ xsldbgGenericErrorFunc(i18n("Information: Finished shell command.\n"));
+ result = 1;
+ } else {
+ if (verbose)
+ xsldbgGenericErrorFunc(i18n("Error: Unable to run command. System error %1.\n").arg(return_code));
+ }
+ }
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp
new file mode 100644
index 00000000..e4255797
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp
@@ -0,0 +1,175 @@
+
+/***************************************************************************
+ param_cmds.c - libxslt parameter commands for xsldbg
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "debugXSL.h"
+#include "options.h"
+
+#include "xsldbgmsg.h"
+#include "xsldbgthread.h" /* for get thread status */
+
+
+/* -----------------------------------------
+
+ libxslt parameter related commands
+
+ ------------------------------------------- */
+
+/**
+ * xslDbgShellAddParam:
+ * @arg: A string comprised of two words separated by
+ * one or more spaces which are in UTF-8
+ *
+ * Add a libxslt parameter to be sent to libxslt later on
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+*/
+int
+xslDbgShellAddParam(xmlChar * arg)
+{
+ int result = 0;
+ parameterItemPtr paramItem = NULL;
+ static const char *errorPrompt = I18N_NOOP("Failed to add parameter");
+ xmlChar *opts[2];
+
+ if (!arg) {
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("addparam"));
+ }else{
+ if ((xmlStrLen(arg) > 1) && splitString(arg, 2, opts) == 2) {
+ int count;
+ for (count = 0; count < arrayListCount(optionsGetParamItemList()); count++){
+ paramItem = (parameterItemPtr)arrayListGet(optionsGetParamItemList(), count);
+ if (paramItem != NULL){
+ if (xmlStrCmp(opts[0], paramItem->name) == 0){
+ /* parameter exist just update its value */
+ if (paramItem->value)
+ xmlFree(paramItem->value);
+ paramItem->value = xmlStrdup(opts[1]);
+ return 1;
+ }
+ }
+ }
+ paramItem = optionsParamItemNew(opts[0], opts[1]);
+ result = arrayListAdd(optionsGetParamItemList(), paramItem);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("addparam"));
+ }
+ }
+ if (!result)
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ else {
+ xsldbgGenericErrorFunc("\n");
+ }
+ return result;
+}
+
+
+/**
+ * xslDbgShellDelParam:
+ * @arg: A single white space trimmed parameter number to look for
+ *
+ * Delet a libxslt parameter to be sent to libxslt later on
+ *
+ * Returns 1 if able to delete parameter @name,
+ * 0 otherwise
+ */
+int
+xslDbgShellDelParam(xmlChar * arg)
+{
+ int result = 0;
+ static const char *errorPrompt = I18N_NOOP("Failed to delete parameter");
+ long paramId;
+ xmlChar *opts[2];
+
+ if (!arg) {
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("delparam"));
+ }else{
+ if (xmlStrLen(arg) > 0) {
+ if (splitString(arg, 1, opts) == 1) {
+ if ((xmlStrlen(opts[0]) == 0) ||
+ !sscanf((char *) opts[0], "%ld", &paramId)) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").arg(xsldbgText(opts[0])));
+ } else {
+ result =
+ arrayListDelete(optionsGetParamItemList(), paramId);
+ if (!result)
+ xsldbgGenericErrorFunc(i18n("Error: Unable to find parameter %1.\n").arg(paramId));
+ }
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("delparam"));
+ }
+ } else {
+ /* Delete all parameters */
+ arrayListEmpty(optionsGetParamItemList());
+ result = 1;
+ }
+ }
+ if (!result)
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ else
+ xsldbgGenericErrorFunc("\n");
+
+ return result;
+}
+
+
+/**
+ * xslDbgShellShowParam:
+ * @arg: Not used
+ *
+ * Print list of current paramters
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellShowParam(xmlChar * arg)
+{
+ Q_UNUSED(arg);
+ int result = 0;
+ static const char *errorPrompt = I18N_NOOP("Unable to print parameters");
+
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ int paramIndex = 0;
+ int itemCount = arrayListCount(optionsGetParamItemList());
+
+ notifyListStart(XSLDBG_MSG_PARAMETER_CHANGED);
+
+ if (itemCount > 0) {
+ parameterItemPtr paramItem = NULL;
+
+ while (paramIndex < itemCount) {
+ paramItem = (parameterItemPtr)
+ arrayListGet(optionsGetParamItemList(), paramIndex++);
+ if (paramItem != NULL)
+ notifyListQueue(paramItem);
+ }
+ }
+ notifyListSend();
+ result = 1;
+ } else {
+
+ if (optionsPrintParamList())
+ result = 1;
+ else
+ xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt)));
+ xsldbgGenericErrorFunc("\n");
+ }
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/qtnotifier2.h b/kxsldbg/kxsldbgpart/libxsldbg/qtnotifier2.h
new file mode 100644
index 00000000..dfe57f0c
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/qtnotifier2.h
@@ -0,0 +1,38 @@
+/***************************************************************************
+ qtnotifier.h - notify the qt app of changes
+ -------------------
+ begin : Sun Dec 23 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 QTNOTIFIER_H
+#define QTNOTIFIER_H
+
+#if defined WIN32
+#include <libxsldbg/xsldbgwin32config.h>
+#endif
+
+#include "xsldbgnotifier.h"
+
+
+class XsldbgDebuggerBase;
+
+extern "C" {
+
+ void connectNotifier(XsldbgDebuggerBase *debugger);
+ int qtNotifyXsldbgApp(XsldbgMessageEnum type, const void *data);
+ int qtNotifyStateXsldbgApp(XsldbgMessageEnum type, int commandId, XsldbgCommandStateEnum commandState, const char *text);
+ int qtNotifyTextXsldbgApp(XsldbgMessageEnum type, const char *text);
+}
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/search.cpp b/kxsldbg/kxsldbgpart/libxsldbg/search.cpp
new file mode 100644
index 00000000..68fcd7e1
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/search.cpp
@@ -0,0 +1,1584 @@
+
+/***************************************************************************
+ search.c - search implementation
+ -------------------
+ begin : Fri Nov 2 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+
+#include "xsldbg.h"
+#include "debugXSL.h"
+#include "breakpoint.h"
+#include "search.h"
+#include "options.h"
+#include "files.h"
+
+#ifdef __riscos
+
+/* Include for filename conversions */
+#include "libxml/riscos.h"
+#endif
+
+/* our private function*/
+void scanForBreakPoint(void *payload, void *data,
+ xmlChar * name);
+
+/* store all data in this document so we can write it to file*/
+static xmlDocPtr searchDataBase;
+
+/* the topmost node in document*/
+static xmlNodePtr searchDataBaseRoot;
+
+/* what was the last query that was run */
+static xmlChar *lastQuery;
+
+#define BUFFER_SIZE 500
+static xmlChar searchBuffer[BUFFER_SIZE];
+
+/* -----------------------------------------
+ Private function declarations for dbgsearch.c
+ -------------------------------------------*/
+
+/**
+ * findNodeByLineNoHelper:
+ * @payload: valid xsltStylesheetPtr
+ * @data: valid searchInfoPtr
+ * @name: not used
+ *
+ * We are walking through stylesheets looking for a match
+ */
+void
+ findNodeByLineNoHelper(void *payload, void *data,
+ xmlChar * name);
+
+/**
+ * globalVarHelper:
+ * @payload: valid xsltStylesheetPtr
+ * @data: is valid
+ * @name: not used
+ *
+ * Helper to find the global variables. We are given control via
+ * walkStylesheets globalWalkFunc will always be set to the
+ * walkFunc to call
+ */
+void
+ globalVarHelper(void **payload, void *data,
+ xmlChar * name);
+
+/**
+ * localVarHelper:
+ * @payload: valid xsltTemplatePtr
+ * @data: is valid
+ * @name: not used
+ *
+ * Helper to find the local variables. We are given control via walkTemplates
+ * globalWalkFunc will always be set to the walkFunc to call
+ * localWalkFunc will always be set to the walkFunc to call
+ */
+void
+ localVarHelper(void **payload, void *data,
+ xmlChar * name);
+
+
+/* -------------------------------------
+ End private functions
+ ---------------------------------------*/
+
+
+/**
+ * searchInit:
+ *
+ * Initialize the search module
+ *
+ * Returns 1 if search structures have been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+*/
+int
+searchInit(void)
+{
+ searchDataBase = NULL;
+ searchDataBaseRoot = NULL;
+ lastQuery = NULL;
+ if (!searchEmpty()) {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ return (searchRootNode() != NULL);
+}
+
+
+/**
+ * searchFree:
+ *
+ * Free all memory used by the search module
+ */
+void
+searchFree(void)
+{
+ if (searchDataBase) {
+ xmlFreeDoc(searchDataBase);
+ searchDataBase = NULL;
+ searchDataBaseRoot = NULL;
+ }
+}
+
+
+/**
+ * searchNewInfo:
+ * @type: What type of search is required
+ *
+ * Create a new search
+ *
+ * Returns A valid search info pointer if successful
+ * NULL otherwise
+ */
+searchInfoPtr
+searchNewInfo(SearchEnum type)
+{
+ searchInfoPtr result = NULL;
+ int searchType = type;
+
+ switch (searchType) {
+ case SEARCH_BREAKPOINT:
+ result = (searchInfoPtr) xmlMalloc(sizeof(searchInfo));
+ if (result) {
+ breakPointSearchDataPtr searchData;
+
+ result->type = SEARCH_BREAKPOINT;
+ searchData = (breakPointSearchDataPtr)
+ xmlMalloc(sizeof(breakPointSearchData));
+ if (searchData) {
+ searchData->id = -1;
+ searchData->templateName = NULL;
+ searchData->breakPtr = NULL;
+ result->data = searchData;
+ } else {
+ xmlFree(result);
+ result = NULL;
+ }
+ }
+ break;
+
+ case SEARCH_NODE:
+ result = (searchInfoPtr) xmlMalloc(sizeof(searchInfo));
+ if (result) {
+ nodeSearchDataPtr searchData;
+
+ result->type = SEARCH_NODE;
+ searchData =
+ (nodeSearchDataPtr) xmlMalloc(sizeof(nodeSearchData));
+ if (searchData) {
+ searchData->node = NULL;
+ searchData->lineNo = -1;
+ searchData->url = NULL;
+ searchData->nameInput = NULL;
+ searchData->guessedNameMatch = NULL;
+ searchData->absoluteNameMatch = NULL;
+ result->data = searchData;
+ } else {
+ xmlFree(result);
+ result = NULL;
+ }
+ }
+ break;
+
+ case SEARCH_XSL:
+ break;
+
+ case SEARCH_VARIABLE:
+ result = (searchInfoPtr) xmlMalloc(sizeof(searchInfo));
+ if (result) {
+ variableSearchDataPtr searchData;
+
+ result->type = SEARCH_VARIABLE;
+ searchData = (variableSearchDataPtr)
+ xmlMalloc(sizeof(variableSearchData));
+ if (searchData) {
+ searchData->name = NULL;
+ searchData->nameURI = NULL;
+ searchData->select = NULL;
+ result->data = searchData;
+ } else {
+ xmlFree(result);
+ result = NULL;
+ }
+ }
+ break;
+
+ }
+ if (result) {
+ result->found = 0;
+ result->error = 0;
+ }
+ return result;
+}
+
+
+/**
+ * searchFreeInfo:
+ * @info: valid search info
+ *
+ * Free memory used by @info
+ */
+void
+searchFreeInfo(searchInfoPtr info)
+{
+ if (info) {
+ if (info->data) {
+ switch (info->type) {
+ case SEARCH_BREAKPOINT:
+ {
+ breakPointSearchDataPtr searchData =
+ (breakPointSearchDataPtr) info->data;
+
+ if (searchData->templateName)
+ xmlFree(searchData->templateName);
+ }
+ break;
+
+ case SEARCH_NODE:
+ {
+ nodeSearchDataPtr searchData =
+ (nodeSearchDataPtr) info->data;
+
+ if (searchData->url)
+ xmlFree(searchData->url);
+
+ if (searchData->nameInput)
+ xmlFree(searchData->nameInput);
+
+ if (searchData->guessedNameMatch)
+ xmlFree(searchData->guessedNameMatch);
+
+ if (searchData->absoluteNameMatch)
+ xmlFree(searchData->absoluteNameMatch);
+
+ /* we never free searchData->node as we did not create it! */
+ }
+ break;
+
+ case SEARCH_XSL:
+ break;
+
+ case SEARCH_VARIABLE:
+ {
+ variableSearchDataPtr searchData =
+ (variableSearchDataPtr) info->data;
+
+ if (searchData->name)
+ xmlFree(searchData->name);
+
+ if (searchData->nameURI)
+ xmlFree(searchData->nameURI);
+
+ if (searchData->select)
+ xmlFree(searchData->select);
+ }
+ break;
+
+ }
+ xmlFree(info->data);
+ }
+ xmlFree(info);
+ }
+}
+
+
+/**
+ * searchEmpty:
+ *
+ * Empty the seach dataBase of its contents
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+searchEmpty(void)
+{
+ if (searchDataBase) {
+ xmlFreeDoc(searchDataBase);
+ }
+ searchDataBase = xmlNewDoc((xmlChar *) "1.0");
+ searchDataBaseRoot = NULL;
+ if (searchDataBase) {
+ xmlCreateIntSubset(searchDataBase,
+ (xmlChar *) "search", (xmlChar *)
+ "-//xsldbg//DTD search XML V1.1//EN",
+ (xmlChar *) "search_v1_1.dtd");
+ searchDataBaseRoot = xmlNewNode(NULL, (xmlChar *) "search");
+ if (searchDataBaseRoot)
+ xmlAddChild((xmlNodePtr) searchDataBase, searchDataBaseRoot);
+ }
+ if (lastQuery)
+ xmlFree(lastQuery);
+ lastQuery = NULL;
+ if (searchRootNode() == NULL) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to clear old search results, memory error?\n");
+#endif
+ }
+
+ return (searchRootNode() != NULL);
+}
+
+
+/**
+ * searchDoc:
+ *
+ * Return the document used for seaching ie the search dataBase
+ *
+ * Returns The document used for searching
+ * Dangerous function to use! Does NOT return a copy of
+ * search data so don't free it
+ */
+xmlDocPtr
+searchDoc(void)
+{
+ return searchDataBase;
+}
+
+
+/**
+ * searchRootNode:
+ *
+ * Get the topmost node in the search dataBase
+ *
+ * Returns The topmost xml node in search dataBase.
+ * Dangerous function to use! Does NOT return a copy of
+ * search root node so don't free it
+ */
+xmlNodePtr
+searchRootNode(void)
+{
+ return searchDataBaseRoot;
+}
+
+
+/**
+ * searchAdd:
+ * @node: Is valid
+ *
+ * Add a node to the search dataBase
+ *
+ * Returns 1 if able to add @node to top node in search dataBase,
+ * 0 otherwise
+ */
+int
+searchAdd(xmlNodePtr node)
+{
+ int result = 0;
+
+ if (node && searchDataBaseRoot
+ && xmlAddChild(searchDataBaseRoot, node)) {
+ result = 1;
+ }
+
+ return result;
+}
+
+
+/**
+ * searchSave:
+ * @fileName: A valid file name, or NULL for the default
+ *
+ * Save the search dataBase to @fileName
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+searchSave(const xmlChar * fileName)
+{
+
+ int result = 0;
+ xmlChar *searchInput = NULL;
+
+ if (fileName == NULL)
+ searchInput = filesSearchFileName(FILES_SEARCHINPUT);
+ else
+ searchInput = xmlStrdup(fileName);
+
+ if (xmlSaveFormatFile((char *) searchInput, searchDataBase, 1) != -1){
+ result = 1;
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Unable to write search Database to file %1. Try setting the \"searchresultspath\" option to a writable path.\n").arg(xsldbgText(searchInput)));
+ }
+
+ if (searchInput)
+ xmlFree(searchInput);
+
+ return result;
+}
+
+
+/**
+ * searchQuery:
+ * @query: The query to run . If NULL then query is "//search/ *"
+ * @tempFile: Where do we load the search dataBase from to execute
+ * query. If tempFile is NULL "searchresult.xml" is used
+ * @outputFile : Where do we store the result. If NULL
+ * then default to "searchresult.html"
+ *
+ * Send query as parameter for execution of search.xsl using
+ * data stored in @tempFile
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+searchQuery(const xmlChar * tempFile, const xmlChar * outputFile,
+ const xmlChar * query)
+{
+ int result = 0;
+
+ /* The file name of where the input is comming from */
+ xmlChar *searchInput = NULL;
+
+ /* The XSL file name to use during transformation of searchInput */
+ xmlChar *searchXSL = NULL;
+
+ /* Where to store the result of transformation */
+ xmlChar *searchOutput = NULL;
+
+
+ /* if a tempFile if provided its up you to make sure that it is correct !! */
+ if (tempFile == NULL)
+ searchInput = filesSearchFileName(FILES_SEARCHINPUT);
+ else
+ searchInput = xmlStrdup(tempFile);
+
+ searchXSL = filesSearchFileName(FILES_SEARCHXSL);
+
+ /* if a outputFile if provided its up you to make sure that it is correct */
+ if (outputFile == NULL)
+ searchOutput = filesSearchFileName(FILES_SEARCHRESULT);
+ else
+ searchOutput = xmlStrdup(outputFile);
+
+ if (!query || (xmlStrlen(query) == 0))
+ query = (xmlChar *) "--param query //search/*";
+
+ /* see configure.in for the definition of XSLDBG_BIN, the name of our binary */
+ if (searchInput && searchXSL && searchOutput) {
+ if (optionsGetIntOption(OPTIONS_CATALOGS) == 0)
+ snprintf((char *) searchBuffer, sizeof(searchBuffer),
+ "%s -o %s %s %s %s", XSLDBG_BIN,
+ searchOutput, query, searchXSL, searchInput);
+ else
+ /* assume that we are to use catalogs as well in our query */
+ snprintf((char *) searchBuffer, sizeof(searchBuffer),
+ "%s --catalogs -o %s %s %s %s", XSLDBG_BIN,
+ searchOutput, query, searchXSL, searchInput);
+ result = xslDbgShellExecute(searchBuffer, 1);
+
+ if (result && (optionsGetIntOption(OPTIONS_PREFER_HTML) == 0)) {
+ /* try printing out the file */
+ result = filesMoreFile(searchOutput, NULL);
+ }
+
+ xsldbgGenericErrorFunc(i18n("Information: Transformed %1 using %2 and saved to %3.\n").arg(xsldbgText(searchInput)).arg(xsldbgText(searchXSL)).arg(xsldbgText(searchOutput)));
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments to command %1.\n").arg("search"));
+ }
+
+ if (searchInput)
+ xmlFree(searchInput);
+
+ if (searchXSL)
+ xmlFree(searchXSL);
+
+ if (searchOutput)
+ xmlFree(searchOutput);
+
+ return result;
+}
+
+
+/**
+ * scanForBreakPoint:
+ * @payload: A valid breakPointPtr
+ * @data: The criteria to look for and a valid searchInfoPtr of
+ * type SEARCH_BREAKPOINT
+ * @name: Not used
+ *
+ * Test if break point matches criteria given by @data. If so then
+ * set @data->found to 1 and stores reference to break point found in
+ * @data->data->node
+ * otherwise @data is unchanged
+*/
+void
+scanForBreakPoint(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(name);
+ breakPointPtr breakPtr = (breakPointPtr) payload;
+ searchInfoPtr searchInf = (searchInfoPtr) data;
+ breakPointSearchDataPtr searchData = NULL;
+ int found = 0;
+
+ if (!payload || !searchInf || !searchInf->data
+ || (searchInf->type != SEARCH_BREAKPOINT) || searchInf->found)
+ return;
+
+ searchData = (breakPointSearchDataPtr) searchInf->data;
+
+ if (searchData->id && (breakPtr->id == searchData->id))
+ found = 1;
+ else if (searchData->templateName && breakPtr->templateName &&
+ (xmlStrCmp(breakPtr->templateName, searchData->templateName)
+ == 0))
+ found = 1;
+
+ if (found) {
+ searchInf->found = 1;
+ searchData->breakPtr = breakPtr;
+ }
+}
+
+
+
+/**
+ * scanForNode:
+ * @payload: A valid xmlNodePtr
+ * @data: The criteria to look for and a valid searchInfo of
+ * type SEARCH_NODE
+ * @name: Not used
+
+ * Test if node matches criteria given by @data if so then set @data->found
+ * to 1 and stores reference to node found in @data->data->node
+ * otherwise @data is unchanged
+ */
+void
+scanForNode(void *payload, void *data, xmlChar * name)
+{
+ Q_UNUSED(name);
+ searchInfoPtr searchInf = (searchInfoPtr) data;
+ nodeSearchDataPtr searchData = NULL;
+ xmlNodePtr node = (xmlNodePtr) payload;
+ xmlChar *baseUri = NULL;
+ int match = 1;
+
+ if (!node || !node->doc || !node->doc->URL ||
+ !searchInf || (searchInf->type != SEARCH_NODE))
+ return;
+
+ searchData = (nodeSearchDataPtr) searchInf->data;
+
+ if (searchData->lineNo >= 0)
+ match = searchData->lineNo == xmlGetLineNo(node);
+
+ if (searchData->url)
+ baseUri = filesGetBaseUri(node);
+ if (baseUri) {
+ match = match && (xmlStrCmp(searchData->url, baseUri) == 0);
+ xmlFree(baseUri);
+ } else {
+ match = match && (xmlStrcmp(searchData->url, node->doc->URL) == 0);
+ }
+
+ if (match) {
+ searchData->node = node;
+ searchInf->found = 1;
+ }
+
+}
+
+
+/**
+ * findNodeByLineNoHelper:
+ * @payload: A valid xsltStylesheetPtr
+ * @data: A valid searchInfoPtr
+ * @name: Not used
+ *
+ * We are walking through stylesheets looking for a match
+ */
+void
+findNodeByLineNoHelper(void *payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(name);
+ xsltStylesheetPtr style = (xsltStylesheetPtr) payload;
+ searchInfoPtr searchInf = (searchInfoPtr) data;
+
+ if (!payload || !searchInf || !style->doc)
+ return;
+
+ walkChildNodes((xmlHashScanner) scanForNode, searchInf,
+ (xmlNodePtr) style->doc);
+
+ /* try the included stylesheets */
+ if (!searchInf->found)
+ walkIncludes((xmlHashScanner) scanForNode, searchInf, style);
+}
+
+
+/**
+ * findNodeByLineNo:
+ * @ctxt: Valid ctxt to look into
+ * @url: Non-null, non-empty file name that has been loaded by debugger
+ * @lineNumber: @lineNumber >= 0 and is available in @url
+ *
+ * Finds the closest line number in file specified that can be a point
+ *
+ * Returns The node at line number number specified if successfull,
+ * NULL otherwise
+ */
+xmlNodePtr
+findNodeByLineNo(xsltTransformContextPtr ctxt,
+ const xmlChar * url, long lineNumber)
+{
+ xmlNodePtr result = NULL;
+ searchInfoPtr searchInf = searchNewInfo(SEARCH_NODE);
+ nodeSearchDataPtr searchData = NULL;
+
+ if (!searchInf) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Unable to create searchInfo in findNodeByLineNo\n");
+#endif
+ return result;
+ }
+
+ if (!ctxt || !url || (lineNumber == -1)) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Invalid ctxt, url or line number to findNodeByLineNo\n");
+#endif
+ return result;
+ }
+
+ searchData = (nodeSearchDataPtr) searchInf->data;
+ searchData->url = (xmlChar *) xmlMemStrdup((char *) url);
+ searchData->lineNo = lineNumber;
+ walkStylesheets((xmlHashScanner) findNodeByLineNoHelper, searchInf,
+ ctxt->style);
+ if (!searchInf->found) {
+ /* try searching the document set */
+ xsltDocumentPtr document = ctxt->document;
+
+ while (document && !searchInf->found) {
+ walkChildNodes((xmlHashScanner) scanForNode, searchInf,
+ (xmlNodePtr) document->doc);
+ document = document->next;
+ }
+ }
+ result = searchData->node;
+ searchFreeInfo(searchInf);
+
+ return result;
+}
+
+
+/**
+ * findTemplateNode:
+ * @style: A valid stylesheet collection to look into
+ * @name: A valid template name to look for
+ *
+ * Find a template node
+ *
+ * Returns The template node found if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+findTemplateNode(xsltStylesheetPtr style, const xmlChar * name)
+{
+ xmlNodePtr result = NULL;
+ xmlChar *templName;
+ xsltTemplatePtr templ;
+
+ if (!style || !name) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Invalid stylesheet or template name : findTemplateNode\n");
+#endif
+ return result;
+ }
+
+ while (style) {
+ templ = style->templates;
+
+ while (templ) {
+ if (templ->match)
+ templName = (xmlChar *) templ->match;
+ else
+ templName = (xmlChar *) templ->name;
+
+ if (templName) {
+ if (!xmlStrCmp((char *) templName, (char *) name)) {
+ return templ->elem;
+ }
+ }
+ templ = templ->next;
+ }
+ if (style->next)
+ style = style->next;
+ else
+ style = style->imports;
+ }
+
+ if (!result)
+ xsldbgGenericErrorFunc(i18n("Error: XSLT template named \"%1\" was not found.\n").arg(xsldbgText(name)));
+ return result;
+}
+
+
+/**
+ * findBreakPointByName:
+ * @templateName: The template name to look for
+ *
+ * Find the breakpoint at template with "match" or "name" equal
+ * to templateName
+ *
+ * Returns The break point that matches @templateName
+ * NULL otherwise
+*/
+breakPointPtr
+findBreakPointByName(const xmlChar * templateName)
+{
+ breakPointPtr result = NULL;
+ searchInfoPtr searchInf = searchNewInfo(SEARCH_BREAKPOINT);
+ breakPointSearchDataPtr searchData;
+
+ if (!searchInf || (searchInf->type != SEARCH_BREAKPOINT))
+ return result;
+
+ searchData = (breakPointSearchDataPtr) searchInf->data;
+ searchData->templateName = (xmlChar *) xmlStrdup(templateName);
+ if (templateName) {
+ walkBreakPoints((xmlHashScanner) scanForBreakPoint, searchInf);
+ if (!searchInf->found) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Breakpoint with template name of \"%s\" not found\n",
+ templateName);
+#endif
+ } else
+ result = searchData->breakPtr;
+ }
+
+ searchFreeInfo(searchInf);
+
+ return result;
+}
+
+
+/**
+ * findBreakPointById:
+ * @id: The break point id to look for
+ *
+ * Find a break point by its id
+ *
+ * Returns The break point with given the break point id if found,
+ * NULL otherwise
+ */
+breakPointPtr
+findBreakPointById(int id)
+{
+ breakPointPtr result = NULL;
+ searchInfoPtr searchInf = searchNewInfo(SEARCH_BREAKPOINT);
+ breakPointSearchDataPtr searchData;
+
+ if (!searchInf || !searchInf->data)
+ return result;
+
+ searchData = (breakPointSearchDataPtr) searchInf->data;
+ if (id >= 0) {
+ searchData->id = id;
+ walkBreakPoints((xmlHashScanner) scanForBreakPoint, searchInf);
+ if (!searchInf->found) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: Breakpoint id %d not found\n", id);
+#endif
+ } else
+ result = searchData->breakPtr;
+ }
+
+ searchFreeInfo(searchInf);
+ return result;
+}
+
+
+/**
+ * findNodesByQuery:
+ * @query: The xpath query to run, see docs/en/search.dtd for more details
+ *
+ * Find nodes in search dataBase using an xpath query
+ *
+ * Returns The nodes that match the given query on success,
+ * NULL otherwise
+ */
+xmlXPathObjectPtr
+findNodesByQuery(const xmlChar * query)
+{
+ Q_UNUSED(query);
+ xmlXPathObjectPtr list = NULL;
+
+ return list;
+}
+
+
+
+/**
+ * walkBreakPoints:
+ * @walkFunc: The function to callback for each break point found
+ * @data: The extra data to pass onto walkFunc
+ *
+ * Walks through all break points calling walkFunc for each. The payload
+ * sent to walkFunc is of type breakPointPtr
+ */
+void
+walkBreakPoints(xmlHashScanner walkFunc, void *data)
+{
+ int lineNo;
+ xmlHashTablePtr hashTable;
+
+ if (!walkFunc)
+ return;
+
+ for (lineNo = 0; lineNo < breakPointLinesCount(); lineNo++) {
+ hashTable = breakPointGetLineNoHash(lineNo);
+ if (hashTable) {
+ xmlHashScan(hashTable, walkFunc, data);
+ }
+ }
+}
+
+
+/**
+ * walkTemplates:
+ * @walkFunc: The function to callback for each template found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all templates calling walkFunc for each. The payload
+ * of walkFunc is of type xsltTemplatePtr
+ */
+void
+walkTemplates(xmlHashScanner walkFunc, void *data, xsltStylesheetPtr style)
+{
+ xsltTemplatePtr templ;
+
+ if (!walkFunc || !style)
+ return;
+
+ while (style) {
+ templ = style->templates;
+ while (templ) {
+ (*walkFunc) (templ, data, NULL);
+ templ = templ->next;
+ }
+ if (style->next)
+ style = style->next;
+ else
+ style = style->imports;
+ }
+}
+
+
+/**
+ * walkStylesheets:
+ * @walkFunc: The function to callback for each stylesheet found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all templates calling walkFunc for each. The payload
+ * sent to walkFunc is of type xsltStylesheetPtr
+ */
+void
+walkStylesheets(xmlHashScanner walkFunc, void *data,
+ xsltStylesheetPtr style)
+{
+ xsltStylesheetPtr next;
+
+ if (!walkFunc || !style)
+ return;
+
+ next = style->next;
+ while (style) {
+ (*walkFunc) (style, data, NULL);
+ if (style->imports)
+ style = style->imports;
+ else
+ style = next;
+ }
+}
+
+
+
+xmlHashScanner globalWalkFunc = NULL;
+
+/**
+ * globalVarHelper:
+ * @payload: valid xsltStylesheetPtr
+ * @data: is valid
+ * @name: not used
+ *
+ * Helper to find the global variables. We are given control via
+ * walkStylesheets globalWalkFunc will always be set to the
+ * walkFunc to call
+ */
+void
+globalVarHelper(void **payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xsltStylesheetPtr style = (xsltStylesheetPtr) payload;
+ xsltStackElemPtr global;
+
+ if (style) {
+ global = style->variables;
+
+ while (global &&global->comp) {
+ (*globalWalkFunc) (global->comp->inst, data, NULL);
+ global = global->next;
+ }
+ }
+}
+
+
+/**
+ * walkGlobals:
+ * @walkFunc: The function to callback for each gobal variable found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Call walkFunc for each global variable. The payload
+ * sent to walkFunc is of type xmlNodePtr
+ */
+void
+walkGlobals(xmlHashScanner walkFunc, void *data,
+ xsltStylesheetPtr style)
+{
+ Q_UNUSED(data);
+ if (!walkFunc || !style)
+ return;
+
+ globalWalkFunc = walkFunc;
+
+ walkStylesheets((xmlHashScanner) globalVarHelper, data, style);
+}
+
+
+
+xmlHashScanner localWalkFunc = NULL;
+
+/**
+ * localVarHelper:
+ * @payload: valid xsltTemplatePtr
+ * @data: is valid
+ * @name: not used
+ *
+ * Helper to find the local variables. We are given control via walkTemplates
+ * globalWalkFunc will always be set to the walkFunc to call
+ * localWalkFunc will always be set to the walkFunc to call
+ */
+void
+localVarHelper(void **payload, void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xsltTemplatePtr templ = (xsltTemplatePtr) payload;
+ xmlNodePtr node;
+
+ if (templ && templ->elem) {
+ node = templ->elem->children;
+
+ while (node) {
+ if (IS_XSLT_NAME(node, "param")
+ || IS_XSLT_NAME(node, "variable")) {
+ (*localWalkFunc) (node, data, NULL);
+ node = node->next;
+ } else
+ break;
+ }
+ }
+}
+
+
+/**
+ * walkLocals:
+ * @walkFunc: The function to callback for each local variable found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all local variables calling walkFunc for each. The payload
+ * of walkFunc is of type xmlNodePtr
+ */
+void
+walkLocals(xmlHashScanner walkFunc, void *data, xsltStylesheetPtr style)
+{
+ if (!walkFunc || !style)
+ return;
+
+ localWalkFunc = walkFunc;
+
+ walkTemplates((xmlHashScanner) localVarHelper, data, style);
+
+}
+
+
+/**
+ * walkIncludes:
+ * @walkFunc: The function to callback for each included stylesheet
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all included stylesheets calling walkFunc for each.
+ * The payload of walkFunc is of type xmlNodePtr
+ */
+
+void
+walkIncludes(xmlHashScanner walkFunc, void *data, xsltStylesheetPtr style)
+{
+ xsltDocumentPtr document; /* included xslt documents */
+
+ if (!walkFunc || !style)
+ return;
+
+ while (style) {
+ document = style->docList;
+ /* look at included documents */
+ while (document) {
+ (*walkFunc) ((xmlNodePtr) document->doc, data, NULL);
+ document = document->next;
+ }
+ /* try next stylesheet */
+ if (style->next)
+ style = style->next;
+ else
+ style = style->imports;
+ }
+}
+
+
+/**
+ * walkIncludeInst:
+ * @walkFunc: The function to callback for each xsl:include instruction found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all xsl:include calling walkFunc for each. The payload
+ * of walkFunc is of type xmlNodePtr
+ */
+void
+walkIncludeInst(xmlHashScanner walkFunc, void *data,
+ xsltStylesheetPtr style)
+{
+ xmlNodePtr node = NULL, styleChild = NULL;
+
+ if (!walkFunc || !style)
+ return;
+
+ while (style) {
+ /*look for stylesheet node */
+ if (style->doc) {
+ node = (xmlNodePtr) style->doc->children;
+ while (node) {
+ /* not need but just in case :) */
+ if (IS_XSLT_NAME(node, "stylesheet")
+ || IS_XSLT_NAME(node, "transform")) {
+ styleChild = node->children; /* get the topmost elements */
+ break;
+ } else
+ node = node->next;
+ }
+
+ /* look for includes */
+ while (styleChild) {
+ if (IS_XSLT_NAME(styleChild, "include"))
+ (*walkFunc) (styleChild, data, NULL);
+ styleChild = styleChild->next;
+ }
+ }
+ /* try next stylesheet */
+ if (style->next)
+ style = style->next;
+ else
+ style = style->imports;
+ }
+}
+
+
+/**
+ * walkChildNodes:
+ * @walkFunc: The function to callback for each child/sibling found
+ * @data: The extra data to pass onto walkFunc
+ * @node: Is valid
+ *
+ * Call walkFunc for each child of @node the payload sent to walkFunc is
+ * a xmlNodePtr
+ */
+void
+walkChildNodes(xmlHashScanner walkFunc, void *data, xmlNodePtr node)
+{
+ xmlNodePtr child = NULL;
+ searchInfoPtr searchInf = (searchInfoPtr) data;
+
+ if (!walkFunc || !searchInf || !searchInf->data)
+ return;
+
+ while (node && !searchInf->found) {
+ (walkFunc) (node, data, NULL);
+ child = node->children;
+ if (child && !searchInf->found) {
+ walkChildNodes(walkFunc, data, child);
+ }
+ node = node->next;
+ }
+}
+
+
+/**
+ * searchBreakPointNode:
+ * @breakPtr: Is valid
+ *
+ * Convert @breakPtr into search dataBase format
+ *
+ * Returns @breakPtr as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+searchBreakPointNode(breakPointPtr breakPtr)
+{
+
+ xmlNodePtr node = NULL;
+ int result = 1;
+
+ if (breakPtr) {
+ node = xmlNewNode(NULL, (xmlChar *) "breakpoint");
+ if (node) {
+ /* if unable to create any property failed then result will be equal to 0 */
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "url", breakPtr->url) !=
+ NULL);
+ sprintf((char *) searchBuffer, "%ld", breakPtr->lineNo);
+ result = result
+ &&
+ (xmlNewProp(node, (xmlChar *) "line", (xmlChar *) searchBuffer)
+ != NULL);
+ if (breakPtr->templateName) {
+ result = result
+ &&
+ (xmlNewProp
+ (node, (xmlChar *) "template",
+ breakPtr->templateName) != NULL);
+ }
+ sprintf((char *) searchBuffer, "%d", breakPtr->flags & BREAKPOINT_ENABLED);
+ result = result
+ &&
+ (xmlNewProp
+ (node, (xmlChar *) "enabled", (xmlChar *) searchBuffer)
+ != NULL);
+ sprintf((char *) searchBuffer, "%d", breakPtr->type);
+ result = result
+ &&
+ (xmlNewProp(node, (xmlChar *) "type", (xmlChar *) searchBuffer)
+ != NULL);
+ sprintf((char *) searchBuffer, "%d", breakPtr->id);
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "id", (xmlChar *) searchBuffer)
+ != NULL);
+ } else
+ result = 0;
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ }
+ return node;
+}
+
+
+/**
+ * searchTemplateNode:
+ * @templNode: Is valid
+ *
+ * Convert @templateNode into search dataBase format
+ *
+ * Returns @templNode as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+searchTemplateNode(xmlNodePtr templNode)
+{
+ xmlNodePtr node = NULL;
+ xmlChar *value;
+ int result = 1;
+
+ if (templNode) {
+ node = xmlNewNode(NULL, (xmlChar *) "template");
+ if (node) {
+ /* if unable to create any property failed then result will be equal to 0 */
+ value = xmlGetProp(templNode, (xmlChar *) "match");
+ if (value) {
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "match", value) !=
+ NULL);
+ xmlFree(value);
+ }
+ value = xmlGetProp(templNode, (xmlChar *) "name");
+ if (value) {
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "name", value) !=
+ NULL);
+ xmlFree(value);
+ }
+ if (templNode->doc) {
+ result = result
+ &&
+ (xmlNewProp
+ (node, (xmlChar *) "url",
+ templNode->doc->URL) != NULL);
+ }
+ sprintf((char *) searchBuffer, "%ld", xmlGetLineNo(templNode));
+ result = result
+ &&
+ (xmlNewProp(node, (xmlChar *) "line", (xmlChar *) searchBuffer)
+ != NULL);
+ if (result) {
+ xmlNodePtr textNode = searchCommentNode(templNode);
+
+ if (textNode && !xmlAddChild(node, textNode))
+ result = 0;
+ }
+ } else
+ result = 0;
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ }
+ return node;
+}
+
+
+/**
+ * searchGlobalNode:
+ * @globalVariable: Is valid
+ *
+ * Convert @globalVariable into search dataBase format
+ *
+ * Returns @globalVariable as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+searchGlobalNode(xmlNodePtr variable)
+{
+ xmlNodePtr node = NULL;
+ int result = 1;
+ xmlChar *value;
+
+ if (variable) {
+ node = xmlNewNode(NULL, (xmlChar *) "variable");
+ if (node) {
+ /* if unable to create any property failed then result will be equal to 0 */
+ if (variable->doc) {
+ result = result &&
+ (xmlNewProp(node, (xmlChar *) "url",
+ variable->doc->URL) != NULL);
+ sprintf((char *) searchBuffer, "%ld", xmlGetLineNo(variable));
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "line",
+ (xmlChar *) searchBuffer) != NULL);
+ }
+ value = xmlGetProp(variable, (xmlChar *) "name");
+ if (value) {
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "name", value) !=
+ NULL);
+ xmlFree(value);
+ }
+ value = xmlGetProp(variable, (xmlChar *) "select");
+ if (value) {
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "select", value) !=
+ NULL);
+ xmlFree(value);
+ }
+ if (result) {
+ xmlNodePtr textNode = searchCommentNode(variable);
+
+ if (textNode && !xmlAddChild(node, textNode))
+ result = 0;
+ }
+ } else
+ result = 0;
+ }
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ return node;
+}
+
+
+/**
+ * searchLocalNode:
+ * @localvariable: Is valid
+ *
+ * Convert @localVariable into search dataBase format
+ *
+ * Returns @localVariable as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+searchLocalNode(xmlNodePtr variable)
+{
+ xmlNodePtr node = NULL;
+ int result = 1;
+ xmlChar *value;
+ xmlNodePtr parent;
+
+ if (variable) {
+ node = searchGlobalNode(variable);
+ if (node) {
+ /* if unable to create any property failed then result will be equal to 0 */
+ parent = variable->parent;
+ /* try to find out what template this variable belongs to */
+ if (parent && IS_XSLT_NAME(parent, "template")) {
+ value = xmlGetProp(parent, (xmlChar *) "name");
+ if (value) {
+ result = result
+ &&
+ (xmlNewProp(node, (xmlChar *) "templname", value)
+ != NULL);
+ xmlFree(value);
+ }
+ value = xmlGetProp(parent, (xmlChar *) "match");
+ if (value) {
+ result = result
+ &&
+ (xmlNewProp(node, (xmlChar *) "templmatch", value)
+ != NULL);
+ xmlFree(value);
+ }
+ }
+ } else
+ result = 0;
+ }
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ return node;
+}
+
+
+/**
+ * searchSourceNode:
+ * @style: Is valid
+ *
+ * Convert @style into search dataBase format
+ *
+ * Returns @style as a new xmlNode in search dataBase format if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+searchSourceNode(xsltStylesheetPtr style)
+{
+ xmlNodePtr node = NULL;
+ int result = 1;
+
+ if (style) {
+ if (style->parent == NULL)
+ node = xmlNewNode(NULL, (xmlChar *) "source");
+ else
+ node = xmlNewNode(NULL, (xmlChar *) "import");
+ if (node) {
+ /* if unable to create any property failed then result will be equal to 0 */
+ if (style->doc) {
+ result = result &&
+ (xmlNewProp(node, (xmlChar *) "href", style->doc->URL)
+ != NULL);
+ if (style->parent && style->parent->doc) {
+ result = result &&
+ (xmlNewProp(node, (xmlChar *) "parent",
+ style->parent->doc->URL) != NULL);
+ }
+ if (result) {
+ xmlNodePtr textNode =
+ searchCommentNode((xmlNodePtr) style->doc);
+ if (textNode && !xmlAddChild(node, textNode))
+ result = 0;
+ }
+ }
+ } else
+ result = 0;
+ }
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ return node;
+}
+
+
+/**
+ * searchIncludeNode:
+ * @include: Is a valid xsl:include instruction
+ *
+ * Convert @include into search dataBase format
+ *
+ * Returns @include as a new xmlNode in search dataBase format if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+searchIncludeNode(xmlNodePtr include)
+{
+ xmlNodePtr node = NULL;
+ int result = 1;
+ xmlChar *value;
+
+ if (include) {
+ node = xmlNewNode(NULL, (xmlChar *) "include");
+ if (node) {
+ /* if unable to create any property failed then result will be equal to 0 */
+ if (include->doc) {
+ value = xmlGetProp(include, (xmlChar *) "href");
+ if (value) {
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "href", value) !=
+ NULL);
+ xmlFree(value);
+ }
+ if (include->parent && include->parent->doc) {
+ result = result &&
+ (xmlNewProp(node, (xmlChar *) "url",
+ include->parent->doc->URL) != NULL);
+ sprintf((char *) searchBuffer, "%ld", xmlGetLineNo(include));
+ result = result
+ && (xmlNewProp(node, (xmlChar *) "line",
+ (xmlChar *) searchBuffer) != NULL);
+ }
+ if (result) {
+ xmlNodePtr textNode = searchCommentNode(include);
+
+ if (textNode && !xmlAddChild(node, textNode))
+ result = 0;
+ }
+ }
+ } else
+ result = 0;
+ }
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ return node;
+}
+
+
+/**
+ * searchCallStackNode:
+ * @callStackItem: Is valid
+ *
+ * Convert @callStackItem into search dataBase format
+ *
+ * Returns @callStackItem as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+searchCallStackNode(callPointPtr callStackItem)
+{
+ xmlNodePtr node = NULL;
+ int result = 1;
+
+ if (callStackItem) {
+ node = xmlNewNode(NULL, (xmlChar *) "callstack");
+ if (node) {
+ /* if unable to create any property failed then result will be equal to 0 */
+ if (callStackItem->info && callStackItem->info->url)
+ result = result
+ &&
+ (xmlNewProp
+ (node, (xmlChar *) "url", callStackItem->info->url)
+ != NULL);
+ sprintf((char *) searchBuffer, "%ld", callStackItem->lineNo);
+ result = result
+ &&
+ (xmlNewProp(node, (xmlChar *) "line", (xmlChar *) searchBuffer)
+ != NULL);
+ if (callStackItem->info && callStackItem->info->templateName) {
+ result = result &&
+ (xmlNewProp
+ (node, (xmlChar *) "template",
+ callStackItem->info->templateName) != NULL);
+ }
+ } else
+ result = 0;
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ }
+ return node;
+}
+
+
+static xmlChar *commentText(xmlNodePtr node);
+
+/*
+ * Returns A copy of comment text that applies to node,
+ * NULL otherwise
+ */
+xmlChar *
+commentText(xmlNodePtr node)
+{
+ xmlChar *result = NULL;
+
+ if (node) {
+ if (node->type == XML_COMMENT_NODE)
+ result = xmlNodeGetContent(node);
+ }
+
+ return result;
+}
+
+/**
+ * searchCommentNode:
+ * @sourceNode: Is valid
+ *
+ * Find documentation comment that applies to @node. If found convert comment
+ * into search dataBase format required
+ *
+ * Returns Documentation comment for @node as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+xmlNodePtr
+searchCommentNode(xmlNodePtr sourceNode)
+{
+ xmlNodePtr node = NULL, textChild = NULL;
+ xmlChar *text = NULL;
+ int result = 0;
+
+ if (sourceNode) {
+ text = commentText(sourceNode->prev);
+ if (!text) {
+ text = commentText(sourceNode->children);
+ }
+
+ if (text) {
+ node = xmlNewNode(NULL, (xmlChar *) "comment");
+ textChild = xmlNewText(text);
+ if (node && textChild && xmlAddChild(node, textChild)) {
+ result = 1;
+ }
+ if (!result) {
+ if (node) {
+ xmlFreeNode(node);
+ node = NULL;
+ }
+ if (textChild)
+ xmlFreeNode(textChild);
+ }
+
+ xmlFree(text);
+ }
+ }
+ return node;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/search.h b/kxsldbg/kxsldbgpart/libxsldbg/search.h
new file mode 100644
index 00000000..20fc82b4
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/search.h
@@ -0,0 +1,1087 @@
+
+/* *************************************************************************
+ xslsearch.h - public functions for
+ searching
+ -------------------
+ begin : Fri Dec 7 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ************************************************************************* */
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLSEARCH_H
+#define XSLSEARCH_H
+
+#ifdef USE_KDE_DOCS
+
+/**
+ * Provide a searching support
+ *
+ * @short search support
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+#endif
+
+/* We want skip most of these includes when building documentation*/
+#ifndef BUILD_DOCS
+#include "breakpoint.h"
+#include "callstack.h"
+#endif
+
+
+#ifdef WITH_XSLT_DEBUG
+#ifndef WITH_XSLT_DEBUG_BREAKPOINTS
+#define WITH_XSLT_DEBUG_BREAKPOINTS
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* what types of searches are there */
+#ifndef USE_KDOC
+ typedef enum {
+ SEARCH_BREAKPOINT = 400,
+ SEARCH_NODE,
+ SEARCH_XSL,
+ SEARCH_VARIABLE
+ } SearchEnum;
+#else
+ /* keep kdoc happy */
+ enum SearchEnum {
+ SEARCH_BREAKPOINT = 400,
+ SEARCH_NODE,
+ SEARCH_XSL,
+ SEARCH_VARIABLE
+ };
+#endif
+
+ /* define a common structure to be used when searching */
+ typedef struct _searchInfo searchInfo;
+ typedef searchInfo *searchInfoPtr;
+ struct _searchInfo {
+ int found; /* found is 1 if search is finished */
+ int type; /* what type of search see SearchEnum */
+ int error; /* did an error occur */
+ void *data; /* extra data to pass to walkFunc */
+ };
+
+
+ /* data to pass to via searchInfoPtr when searching for break points */
+ typedef struct _breakPointSearchData breakPointSearchData;
+ typedef breakPointSearchData *breakPointSearchDataPtr;
+ struct _breakPointSearchData {
+ int id; /* what id to look for,
+ * if -1 then ignore */
+ xmlChar *templateName; /* template to look for
+ * if NULL then ignore */
+ breakPointPtr breakPtr; /* the break point found by search */
+ };
+
+
+ /* data to pass via searchInfoPtr when searching for nodes */
+ typedef struct _nodeSearchData nodeSearchData;
+ typedef nodeSearchData *nodeSearchDataPtr;
+ struct _nodeSearchData {
+ long lineNo; /* what line number to look for
+ * if < 0 then ignore */
+ xmlChar *url; /* what URl to look for
+ * if NULL then ignore */
+ int fileSearch; /* if true then we are trying
+ * to match a file name */
+ xmlChar *nameInput; /* what file/node name are we
+ * trying to match */
+ xmlChar *guessedNameMatch; /* possible name match */
+ xmlChar *absoluteNameMatch; /* full name match */
+ xmlNodePtr node; /* the node that the match
+ * occured in */
+ };
+
+ /* data to pass to via searchInfoPtr when searching for variables points */
+ typedef struct _variableSearchData variableSearchData;
+ typedef variableSearchData *variableSearchDataPtr;
+ struct _variableSearchData {
+ xmlChar *name;
+ xmlChar *nameURI;
+ xmlChar *select; /* new value to adopt if any */
+ };
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchInit:
+ *
+ * Initialize the search module
+ *
+ * Returns 1 if search structures have been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Initialize the search module
+ *
+ * @returns 1 if search structures have been initialized properly and all
+ * memory required has been obtained,
+ * 0 otherwise
+*/
+#endif
+#endif
+ int searchInit(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchFree:
+ *
+ * Free all memory used by the search module
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Free all memory used by the search module
+ */
+#endif
+#endif
+ void searchFree(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchNewInfo:
+ * @type: What type of search is required
+ *
+ * Create a new search
+ *
+ * Returns A valid search info pointer if successful
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Create a new search
+ *
+ * @returns valid search info pointer if successful
+ * NULL otherwise
+ *
+ * @param type What type of search is required
+ */
+#endif
+#endif
+ searchInfoPtr searchNewInfo(SearchEnum type);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchFreeInfo:
+ * @info: A valid search info
+ *
+ * Free memory used by @info
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Free memory used by @p info
+ *
+ * @param info A valid search info
+ *
+ */
+#endif
+#endif
+ void searchFreeInfo(searchInfoPtr info);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchEmpty:
+ *
+ * Empty the seach data base of its contents
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Empty the seach dataBase of its contents
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ */
+#endif
+#endif
+ int searchEmpty(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchDoc:
+ *
+ * Return the document used for seaching ie the search dataBase
+ *
+ * Returns The document used for searching
+ * Dangerous function to use! Does NOT return a copy of
+ * search data so don't free it
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Return the document used for seaching ie the search dataBase
+ *
+ * @returns the document used for searching
+ * Dangerous function to use! Does NOT return a copy of
+ * search data so don't free it
+ */
+#endif
+#endif
+ xmlDocPtr searchDoc(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchRootNode:
+ *
+ * Get the topmost node in the search dataBase
+ *
+ * Returns The topmost xml node in search dataBase.
+ * Dangerous function to use! Does NOT return a copy of
+ * search root node so don't free it
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Get the topmost node in the search dataBase
+ *
+ * @returns The topmost xml node in search dataBase.
+ * Dangerous function to use! Does NOT return a copy of
+ * search root node so don't free it
+ */
+#endif
+#endif
+ xmlNodePtr searchRootNode(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchAdd:
+ * @node: Is valid
+ *
+ * Add a node to the search dataBase
+ *
+ * Returns 1 if able to add @node to top node in search dataBase ,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Add a node to the search dataBase
+ *
+ * @returns 1 if able to add @p node to top node in search dataBase,
+ * 0 otherwise
+ *
+ * @param node Is valid
+ */
+#endif
+#endif
+ int searchAdd(xmlNodePtr node);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchSave:
+ * @fileName: A valid file name, or NULL for the default
+ *
+ * Save the search dataBase to @fileName
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Save the search dataBase to @p fileName
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param fileName Valid file name
+ */
+#endif
+#endif
+ int searchSave(const xmlChar * fileName);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchQuery:
+ * @query: The query to run . If NULL then query is "//search/ *"
+ * @tempFile: Where do we load the search dataBase from to execute
+ * query. If tempFile is NULL "searchresult.xml" is used
+ * @outputFile : Where do we store the result. If NULL
+ * then default to "searchresult.html"
+ *
+ * Send query as parameter for execution of search.xsl using
+ * data stored in @tempFile
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Send query as parameter for execution of search.xsl using
+ * data stored in @p tempFile
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param query The Query to run. If NULL then @p query defaults to "//search/ *"
+ * @param tempFile Where do we load the search dataBase from to execute
+ * query. If @p tempFile is NULL default is "search.data"
+ * @param outputFile Where do we store the result. If NULL
+ * then default to "searchresult.html"
+ */
+#endif
+#endif
+ int searchQuery(const xmlChar * tempFile, const xmlChar * outputFile,
+ const xmlChar * query);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * updateSearchData:
+ * @styleCtxt: Not used
+ * @style: Is valid
+ * @data: Not used but MUST be NULL for the moment
+ * @variableTypes: What types of variables to look
+ *
+ * Update the searchDatabase
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Update the search dataBase
+ *
+ * @returns 1 if able to update the search dataBase,
+ * 0 otherwise
+ * @param styleCtxt Not used
+ * @param style Is valid
+ * @param data Not used but MUST be NULL for the moment
+ * @param variableTypes What types of variables to look
+ */
+#endif
+#endif
+ int updateSearchData(xsltTransformContextPtr styleCtxt,
+ xsltStylesheetPtr style,
+ void *data, VariableTypeEnum variableTypes);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * scanForBreakPoint:
+ * @payload: A valid breakPointPtr
+ * @data: The criteria to look for and a valid searchInfoPtr of
+ * type SEARCH_BREAKPOINT
+ * @name: Not used
+ *
+ * Test if break point matches criteria given by @data. If so then
+ * set @data->found to 1 and stores reference to break point found in
+ * @data->data->node
+ * otherwise @data is unchanged
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Test if break point matches criteria given by @p data. If so then
+ * set @p data->found to 1 and stores reference to break point found in
+ * @p data->data->node
+ * otherwise @p data is unchanged
+ *
+ * @param payload A valid breakPointPtr
+ * @param data The criteria to look for and a valid searchInfoPtr of
+ * type SEARCH_BREAKPOINT
+ * @param name Not used
+ *
+*/
+#endif
+#endif
+ void scanForBreakPoint(void *payload, void *data, xmlChar * name);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * scanForNode:
+ * @payload: A valid xmlNodePtr
+ * @data: The criteria to look for and a valid searchInfo of
+ * type SEARCH_NODE
+ * @name: Not used
+
+ * Test if node matches criteria given by @data if so then set @data->found
+ * to 1 and stores reference to node found in @data->data->node
+ * otherwise @data is unchanged
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Test if node matches criteria given by @p data if so then
+ * set @p data->found to 1 and stores reference to node found in
+ * @p data->data->node.
+ * otherwise @p data is unchanged
+ *
+ * @param payload A valid xmlNodePtr
+ * @param data The criteria to look for and a valid searchInfo of
+ * type SEARCH_NODE
+ * @param name Not used
+*/
+#endif
+#endif
+ void scanForNode(void *payload, void *data, xmlChar * name);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * findNodeByLineNo:
+ * @ctxt: Valid ctxt to look into
+ * @url: Non-null, non-empty file name that has been loaded by debugger
+ * @lineNumber: @lineNumber >= 0 and is available in @url
+ *
+ * Finds the closest line number in file specified that can be a point
+ *
+ * Returns The node at line number number specified if successfull,
+ * NULL otherwise
+ */
+
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Find the closest line number in file specified that can be a point
+ *
+ * @returns The node at line number specified if successful,
+ * NULL otherwise
+ *
+ * @param ctxt Valid ctxt to look into
+ * @param url Non-null, non-empty file name that has been loaded by
+ * debugger
+ * @param lineNumber @p lineNumber >= 0 and is available in @p url
+*/
+#endif
+#endif
+ xmlNodePtr findNodeByLineNo(xsltTransformContextPtr ctxt,
+ const xmlChar * url, long lineNumber);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * findTemplateNode:
+ * @style: A valid stylesheet collection to look into
+ * @name: A valid template name to look for
+ *
+ * Find a template node
+ *
+ * Returns The template node found if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Find a template node
+ *
+ * @returns The template node found if successful,
+ * NULL otherwise
+ *
+ * @param style A Valid stylesheet collection to look into
+ * @param name Valid template name to look for
+ */
+#endif
+#endif
+ xmlNodePtr findTemplateNode(xsltStylesheetPtr style,
+ const xmlChar * name);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * findBreakPointByName:
+ * @templateName: The template name to look for
+ *
+ * Find the breakpoint at template with "match" or "name" equal
+ * to templateName
+ *
+ * Returns The break point that matches @templateName
+ * NULL otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Find the breakpoint at template with "match" or "name" equal
+ * to templateName
+ *
+ * @returns The break point that matches @p templateName
+ * NULL otherwise
+ *
+ * @param templateName Valid template name to look for
+*/
+#endif
+#endif
+ breakPointPtr findBreakPointByName(const xmlChar * templateName);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * findBreakPointById:
+ * @id: The break point id to look for
+ *
+ * Find a break point by its id
+ *
+ * Returns The break point with given the break point id if found,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Find a break point by its id
+ *
+ * @returns The break point with given the break point id if found,
+ * NULL otherwise
+ *
+ * @param id The break point id to look for
+ */
+#endif
+#endif
+ breakPointPtr findBreakPointById(int id);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * findNodesByQuery:
+ * @query: The xpath query to run, see docs/en/search.dtd for more details
+ *
+ * Find nodes in search dataBase using an xpath query
+ *
+ * Returns The nodes that match the given query on success,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Find nodes in search dataBase using an xpath query
+ *
+ * @returns The nodes that match the given query on success,
+ * NULL otherwise
+ *
+ * @param query The xpath query to run, see docs/en/search.dtd for more details
+ */
+#endif
+#endif
+ xmlXPathObjectPtr findNodesByQuery(const xmlChar * query);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * walkBreakPoints:
+ * @walkFunc: The function to callback for each break point found
+ * @data: The extra data to pass onto walkFunc
+ *
+ * Walks through all break points calling walkFunc for each. The payload
+ * sent to walkFunc is of type breakPointPtr
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Walks through all break points calling walkFunc for each. The payload
+ * sent to walkFunc is of type breakPointPtr
+ *
+ * @param walkFunc The function to callback for each break point found
+ * @param data The extra data to pass onto @p walkFunc
+ */
+#endif
+#endif
+ void walkBreakPoints(xmlHashScanner walkFunc, void *data);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * walkTemplates:
+ * @walkFunc: The function to callback for each template found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all templates calling walkFunc for each. The payload
+ * of walkFunc is of type xsltTemplatePtr
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Walks through all templates found in @p style calling walkFunc for each.
+ * The payload of walkFunc is of type xsltTemplatePtr
+ *
+ * @param walkFunc The function to callback for each template found
+ * @param data The extra data to pass onto @p walkFunc
+ * @param style The stylesheet to start from
+ */
+#endif
+#endif
+ void walkTemplates(xmlHashScanner walkFunc, void *data,
+ xsltStylesheetPtr style);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * walkStylesheets:
+ * @walkFunc: The function to callback for each stylesheet found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all templates calling walkFunc for each. The payload
+ * sent to walkFunc is of type xsltStylesheetPtr
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Walks through all stylesheets found in @p style calling walkFunc for
+ * each. The payload sent to walkFunc is of type xsltStylesheetPtr
+ *
+ * @param walkFunc The function to callback for each stylesheet found
+ * @param data The extra data to pass onto @p walkFunc
+ * @param style The stylesheet to start from
+ */
+#endif
+#endif
+ void walkStylesheets(xmlHashScanner walkFunc, void *data,
+ xsltStylesheetPtr style);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * walkGlobals:
+ * @walkFunc: The function to callback for each gobal variable found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Call walkFunc for each global variable. The payload
+ * sent to walkFunc is of type xmlNodePtr
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Call walkFunc for each global variable found in @p style. The payload
+ * sent to walkFunc is of type xmlNodePtr
+ *
+ * @param walkFunc The function to callback for each gobal variable found
+ * @param data The extra data to pass onto @p walkFunc
+ * @param style The stylesheet to start from
+ */
+#endif
+#endif
+ void walkGlobals(xmlHashScanner walkFunc,
+ void *data, xsltStylesheetPtr style);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * walkLocals:
+ * @walkFunc: The function to callback for each local variable found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all local variables calling walkFunc for each. The payload
+ * of walkFunc is of type xmlNodePtr
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Walks through all local variables found in @p style calling
+ * walkFunc for each. The payload of walkFunc is of type xmlNodePtr
+ *
+ * @param walkFunc The function to callback for each local variable found
+ * @param data The extra data to pass onto @p walkFunc
+ * @param style The stylesheet to start from
+ */
+#endif
+#endif
+ void walkLocals(xmlHashScanner walkFunc, void *data,
+ xsltStylesheetPtr style);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * walkIncludes:
+ * @walkFunc: The function to callback for each included stylesheet
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all included stylesheets calling walkFunc for each.
+ * The payload of walkFunc is of type xmlNodePtr
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Walks through all included stylesheets found in @p style,
+ * calling walkFunc for each. The payload of walkFunc is of
+ * type xmlNodePtr
+ *
+ * @param walkFunc The function to callback for each included stylesheet
+ * @param data The extra data to pass onto @p walkFunc
+ * @param style The stylesheet to start from
+ */
+#endif
+#endif
+ void walkIncludes(xmlHashScanner walkFunc, void *data,
+ xsltStylesheetPtr style);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * walkIncludeInst:
+ * @walkFunc: The function to callback for each xsl:include instruction found
+ * @data: The extra data to pass onto walkFunc
+ * @style: The stylesheet to start from
+ *
+ * Walks through all xsl:include calling walkFunc for each. The payload
+ * of walkFunc is of type xmlNodePtr
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Walks through all xsl:include calling walkFunc for each. The payload
+ * of walkFunc is of type xmlNodePtr
+ *
+ * @param walkFunc The function to callback for each xsl:include instruction found
+ * @param data The extra data to pass onto @p walkFunc
+ * @param style The stylesheet to start from
+ */
+#endif
+#endif
+ void walkIncludeInst(xmlHashScanner walkFunc, void *data,
+ xsltStylesheetPtr style);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * walkChildNodes:
+ * @walkFunc: The function to callback for each child/sibling found
+ * @data: The extra data to pass onto walkFunc
+ * @node: Is valid
+ *
+ * Call walkFunc for each child of @node the payload sent to walkFunc is
+ * a xmlNodePtr
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Call walkFunc for each child of @p node the payload sent to walkFunc is
+ * a xmlNodePtr
+ *
+ * @param walkFunc The function to callback for each child/sibling found
+ * @param data The extra data to pass onto @p walkFunc
+ * @param node Valid xmlNodePtr
+ */
+#endif
+#endif
+ void walkChildNodes(xmlHashScanner walkFunc, void *data,
+ xmlNodePtr node);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchBreakPointNode:
+ * @breakPtr: Is valid
+ *
+ * Convert @breakPtr into search dataBase format
+ *
+ * Returns @breakPtr as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Convert @p breakPtr into search dataBase format
+ *
+ * @returns @p breakPtr as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ *
+ * @param breakPtr Is valid
+ */
+#endif
+#endif
+ xmlNodePtr searchBreakPointNode(breakPointPtr breakPtr);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchTemplateNode:
+ * @templNode: Is valid
+ *
+ * Convert @templateNode into search dataBase format
+ *
+ * Returns @templNode as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Convert @p templateNode into search dataBase format
+ *
+ * @returns @p templNode as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ *
+ * @param templNode A valid template node
+ */
+#endif
+#endif
+ xmlNodePtr searchTemplateNode(xmlNodePtr templNode);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchGlobalNode:
+ * @globalVariable: Is valid
+ *
+ * Convert @globalVariable into search dataBase format
+ *
+ * Returns @globalVariable as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Convert @p globalVariable into search dataBase format
+ *
+ * @returns @p globalVariable as a new xmlNode in search dataBase
+ * format if successful,
+ * NULL otherwise
+ *
+ * @param globalVariable A valid xmlNodePtr node
+ *
+ */
+#endif
+#endif
+ xmlNodePtr searchGlobalNode(xmlNodePtr globalVariable);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchLocalNode:
+ * @localvariable: Is valid
+ *
+ * Convert @localVariable into search dataBase format
+ *
+ * Returns @localVariable as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Convert @p localVariable into search dataBase format
+ *
+ * @returns @p localVariable as a new xmlNode in search dataBase
+ * format if successful,
+ * NULL otherwise
+ *
+ * @param localVariable Is valid
+ *
+ */
+#endif
+#endif
+ xmlNodePtr searchLocalNode(xmlNodePtr localVariable);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchSourceNode:
+ * @style: Is valid
+ *
+ * Convert @style into search dataBase format
+ *
+ * Returns @style as a new xmlNode in search dataBase format if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Convert @p style into search dataBase format
+ *
+ * @returns @p style as a new xmlNode in search dataBase format if successful,
+ * NULL otherwise
+ *
+ * @param style Is valid
+ */
+#endif
+#endif
+ xmlNodePtr searchSourceNode(xsltStylesheetPtr style);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchIncludeNode:
+ * @include: Is a valid xsl:include instruction
+ *
+ * Convert @include into search dataBase format
+ *
+ * Returns @include as a new xmlNode in search dataBase format if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Convert @p include into search dataBase format
+ *
+ * @returns @p include as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ *
+ * @param include Is a valid xsl:include instruction
+ *
+ */
+#endif
+#endif
+ xmlNodePtr searchIncludeNode(xmlNodePtr include);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchCallStackNode:
+ * @callStackItem: Is valid
+ *
+ * Convert @callStackItem into search dataBase format
+ *
+ * Returns @callStackItem as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ *Convert @p include into search dataBase format
+ *
+ * @returns @p callStackItem as a new xmlNode in search dataBase
+ * format if successful,
+ * NULL otherwise
+ * @param callStackItem Is valid
+ */
+#endif
+#endif
+ xmlNodePtr searchCallStackNode(callPointPtr callStackItem);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * searchCommentNode:
+ * @sourceNode: Is valid
+ *
+ * Find documentation comment that applies to @sourceNode. If found convert comment
+ * into search dataBase format required
+ *
+ * Returns Documentation comment for @node as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+ /**
+ * Find documentation comment that applies to @p sourceNode. If found convert comment
+ * into search dataBase format required
+ *
+ * Returns Documentation comment for @node as a new xmlNode in search dataBase format
+ * if successful,
+ * NULL otherwise
+ *
+ * @param node Is valid
+ */
+#endif
+#endif
+ xmlNodePtr searchCommentNode(xmlNodePtr node);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/search_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/search_cmds.cpp
new file mode 100644
index 00000000..1dc65190
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/search_cmds.cpp
@@ -0,0 +1,88 @@
+
+/***************************************************************************
+ search_cmds.c - search related commands for xsldbg
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "debugXSL.h"
+#include "options.h"
+#include "search.h"
+
+/* -----------------------------------------
+
+ Seach related commands
+
+ ------------------------------------------- */
+
+
+/**
+ * xslDbgShellSearch:
+ * @styleCtxt: Is valid
+ * @style: Is valid
+ * @arg: The xpath query to use for searching dataBase and in UTF-8
+ *
+ * Displays the result of performing a query on the search dataBase
+ *
+ * Returns 1 if able to run query with @arg,
+ * 0 otherwise
+ */
+int
+xslDbgShellSearch(xsltTransformContextPtr styleCtxt,
+ xsltStylesheetPtr style, xmlChar * arg)
+{
+ int result = 0;
+ xmlChar buff[DEBUG_BUFFER_SIZE];
+ const xmlChar *sortOption = (xmlChar *) "-sort ";
+ int sortOptionLen = xmlStrLen(sortOption);
+
+ if (optionsGetStringOption(OPTIONS_DOCS_PATH) == NULL) {
+ xsldbgGenericErrorFunc(i18n("Error: No path to documentation; aborting searching.\n"));
+#ifdef USE_DOCS_MACRO
+ xsldbgGenericErrorFunc(i18n("Error: Error in value of USE_DOCS_MACRO; look at Makefile.am.\n"));
+#else
+ xsldbgGenericErrorFunc(i18n("Error: Required environment variable %1 not set to the directory of xsldbg documentation.\n").arg((const char*)XSLDBG_DOCS_DIR_VARIABLE));
+#endif
+ return result; /* failed */
+ }
+
+ if (!styleCtxt || !style) {
+ xsldbgGenericErrorFunc(i18n("Error: Stylesheet not valid, files not loaded yet?\n"));
+ return result;
+ }
+
+ result = updateSearchData(styleCtxt, style, NULL, DEBUG_ANY_VAR);
+ trimString(arg);
+ if (xmlStrLen(arg) == 0) {
+ arg = (xmlChar *) "//search/*";
+ }
+ strncpy((char *) buff, (char *) arg, sortOptionLen);
+ if (xmlStrEqual(buff, sortOption)) {
+ /* yep do sorting as well */
+ if (snprintf
+ ((char *) buff, DEBUG_BUFFER_SIZE,
+ "--param dosort 1 --param query \"%s\"",
+ &arg[sortOptionLen])) {
+ result = result && searchQuery(NULL, NULL, buff);
+ }
+ } else {
+ if (snprintf
+ ((char *) buff, DEBUG_BUFFER_SIZE,
+ "--param dosort 0 --param query \"%s\"", arg)) {
+ result = result && searchQuery(NULL, NULL, buff);
+ }
+ }
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp
new file mode 100644
index 00000000..10deb686
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp
@@ -0,0 +1,331 @@
+
+/***************************************************************************
+ template_cmds.c - template commands for xsldbg
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "debugXSL.h"
+#include "files.h"
+#include "utils.h"
+#include "xsldbgmsg.h"
+#include "xsldbgthread.h" /* for getThreadStatus */
+
+static int printCounter; /* Dangerous name think of a better one */
+
+/* -----------------------------------------
+ Private function declarations for files.c
+ -------------------------------------------*/
+
+/**
+ * xslDbgShellPrintStylesheetsHelper:
+ * @payload :valid xxsltStylesheetPtr
+ * @data : not used
+ * name : not used
+ *
+ * Print out the stylesheet name from the stylesheet given to
+ * us via walkStylesheets
+ */
+void
+ xslDbgShellPrintStylesheetsHelper(void *payload,
+ void *data,
+ xmlChar * name);
+
+
+/**
+ * xslDbgShellPrintStylesheetsHelper2:
+ * @payload :valid xmlNodePtr of included stylesheet
+ * @data : not used
+ * name : not used
+ *
+ * Print out the stylesheet name from the stylesheet given to
+ * us via walkIncludes
+ */
+void
+ xslDbgShellPrintStylesheetsHelper2(void *payload,
+ void *data,
+ xmlChar * name);
+
+
+/**
+ * printTemplateHelper:
+ * @templ: Is valid
+ * @verbose: Either 1 or 0
+ * @templateCount: Is valid
+ * @count: Is valid
+ * @templateName: template name to print and in UTF-8, may be NULL
+ *
+ * This display the templates in the same order as they are in the
+ * stylesheet. If verbose is 1 then print more information
+ * For each template found @templateCount is increased
+ * For each printed template @printCount is increased
+ */
+void printTemplateHelper(xsltTemplatePtr templ, int verbose,
+ int *templateCount, int *count,
+ xmlChar * templateName);
+
+/* -------------------------------------
+ End private functions
+---------------------------------------*/
+
+
+
+/**
+ * printTemplateHelper:
+ * @templ: Is valid
+ * @verbose: Either 1 or 0
+ * @templateCount: Is valid
+ * @count: Is valid
+ * @templateName: template name to print, may be NULL
+ *
+ * This display the templates in the same order as they are in the
+ * stylesheet. If verbose is 1 then print more information
+ * For each template found @templateCount is increased
+ * For each printed template @printCount is increased
+ */
+void
+printTemplateHelper(xsltTemplatePtr templ, int verbose,
+ int *templateCount, int *count, xmlChar * templateName)
+{
+ xmlChar *name, *defaultUrl = (xmlChar *) "<n/a>";
+ const xmlChar *url;
+
+ if (!templ)
+ return;
+
+ *templateCount = *templateCount + 1;
+ printTemplateHelper(templ->next, verbose,
+ templateCount, count, templateName);
+ if (templ->elem && templ->elem->doc && templ->elem->doc->URL) {
+ url = templ->elem->doc->URL;
+ } else {
+ url = defaultUrl;
+ }
+
+ if (templ->match)
+ name = xmlStrdup(templ->match);
+ else
+ name = fullQName(templ->nameURI, templ->name);
+
+ if (name) {
+ if (templateName &&
+ (xmlStrcmp(templateName, name) != 0)) {
+ /* search for template name supplied failed */
+ /* empty */
+ } else {
+ xmlChar *modeTemp = NULL;
+ *count = *count + 1;
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListQueue(templ);
+ } else {
+ modeTemp = fullQName(templ->modeURI, templ->mode);
+ if (verbose)
+ xsldbgGenericErrorFunc(i18n(" template: \"%1\" mode: \"%2\" in file \"%3\" at line %4\n").arg(xsldbgText(name)).arg(xsldbgText(modeTemp)).arg(xsldbgUrl(url)).arg(xmlGetLineNo(templ->elem)));
+ else
+ xsldbgGenericErrorFunc(QString("\"%s\" ").arg(xsldbgText(name)));
+ if (modeTemp)
+ xmlFree(modeTemp);
+ }
+ }
+
+ xmlFree(name);
+
+ }
+}
+
+
+/**
+ * xslDbgShellPrintTemplateNames:
+ * @styleCtxt: Is valid
+ * @ctxt: Not used
+ * @arg: Not used
+ * @verbose: If 1 then print extra messages about templates found,
+ * otherwise print normal messages only
+ * @allFiles: If 1 then look for all templates in stylsheets found in
+ * @styleCtxt
+ * otherwise look in the stylesheet found by
+ * debugXSLBreak function
+ *
+ * Print out the list of template names found that match critieria
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellPrintTemplateNames(xsltTransformContextPtr styleCtxt,
+ xmlShellCtxtPtr ctxt,
+ xmlChar * arg, int verbose, int allFiles)
+{
+ Q_UNUSED(ctxt);
+ int templateCount = 0, printedTemplateCount = 0;
+ int result = 0;
+ xsltStylesheetPtr curStyle;
+ xsltTemplatePtr templ;
+
+ if (xmlStrLen(arg) == 0) {
+ arg = NULL;
+ } else {
+ allFiles = 1; /* make sure we find it if we can */
+ }
+
+ if (!styleCtxt) {
+ xsldbgGenericErrorFunc(i18n("Error: Stylesheet is not valid.\n"));
+ return result;
+ }
+
+ if (allFiles)
+ curStyle = styleCtxt->style;
+ else {
+ /* try to find files in the current stylesheet */
+ /* root copy is set to the stylesheet found by debugXSLBreak */
+ if (debugXSLGetTemplate())
+ curStyle = debugXSLGetTemplate()->style;
+ else
+ curStyle = NULL;
+ }
+
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListStart(XSLDBG_MSG_TEMPLATE_CHANGED);
+ while (curStyle) {
+ templ = curStyle->templates;
+ /* print them out in the order their in the file */
+ printTemplateHelper(templ, verbose, &templateCount,
+ &printedTemplateCount, arg);
+ if (curStyle->next)
+ curStyle = curStyle->next;
+ else
+ curStyle = curStyle->imports;
+ }
+ notifyListSend();
+ } else {
+ xsltGenericError(xsltGenericErrorContext, "\n");
+ while (curStyle) {
+ templ = curStyle->templates;
+ /* print them out in the order their in the file */
+ printTemplateHelper(templ, verbose, &templateCount,
+ &printedTemplateCount, arg);
+ xsltGenericError(xsltGenericErrorContext, "\n");
+ if (curStyle->next)
+ curStyle = curStyle->next;
+ else
+ curStyle = curStyle->imports;
+ }
+ if (templateCount == 0) {
+ xsldbgGenericErrorFunc(i18n("\tNo XSLT templates found.\n"));
+ } else {
+ xsldbgGenericErrorFunc(i18n("\tTotal of %n XSLT template found", "\tTotal of %n XSLT templates found", templateCount) + QString("\n"));
+ xsldbgGenericErrorFunc(i18n("\tTotal of %n XSLT template printed", "\tTotal of %n XSLT templates printed", printedTemplateCount) + QString("\n"));
+ }
+ }
+
+ result = 1;
+ return result;
+}
+
+
+/**
+ * xslDbgShellPrintStylesheetsHelper:
+ * @payload :valid xsltStylesheetPtr
+ * @data : not used
+ * name : not used
+ *
+ * Print out the stylesheet name from the stylesheet given to
+ * us via walkStylesheets
+ */
+void
+xslDbgShellPrintStylesheetsHelper(void *payload,
+ void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xsltStylesheetPtr style = (xsltStylesheetPtr) payload;
+
+ if (style && style->doc && style->doc->URL) {
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN)
+ notifyListQueue(payload);
+ else
+ /* display the URL of stylesheet */
+ xsldbgGenericErrorFunc(i18n(" Stylesheet %1\n").arg(xsldbgUrl(style->doc->URL)));
+ printCounter++;
+ }
+}
+
+
+/**
+ * xslDbgShellPrintStylesheetsHelper2:
+ * @payload :valid xmlNodePtr of included stylesheet
+ * @data : not used
+ * name : not used
+ *
+ * Print out the stylesheet name from the stylesheet given to
+ * us via walkIncludes
+ */
+void
+xslDbgShellPrintStylesheetsHelper2(void *payload,
+ void *data,
+ xmlChar * name)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(name);
+ xmlNodePtr node = (xmlNodePtr) payload;
+
+ if (node && node->doc && node->doc->URL) {
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN)
+ notifyListQueue(payload);
+ else
+ /* display the URL of stylesheet */
+ xsldbgGenericErrorFunc(i18n(" Stylesheet %1\n").arg(xsldbgUrl(node->doc->URL)));
+ printCounter++;
+ }
+}
+
+
+/**
+ * xslDbgShellPrintStyleSheets:
+ * @arg: The stylesheets of interests and in UTF-8, is NULL for all stylsheets
+ *
+ * Print stylesheets that can be found in loaded stylsheet
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellPrintStyleSheets(xmlChar * arg)
+{
+ Q_UNUSED(arg);
+ printCounter = 0;
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ notifyListStart(XSLDBG_MSG_SOURCE_CHANGED);
+ walkStylesheets((xmlHashScanner) xslDbgShellPrintStylesheetsHelper,
+ NULL, filesGetStylesheet());
+ notifyListSend();
+ notifyListStart(XSLDBG_MSG_INCLUDED_SOURCE_CHANGED);
+ walkIncludes((xmlHashScanner) xslDbgShellPrintStylesheetsHelper2,
+ NULL, filesGetStylesheet());
+ notifyListSend();
+ } else {
+ walkStylesheets((xmlHashScanner) xslDbgShellPrintStylesheetsHelper,
+ NULL, filesGetStylesheet());
+ walkIncludes((xmlHashScanner) xslDbgShellPrintStylesheetsHelper2,
+ NULL, filesGetStylesheet());
+ if (printCounter != 0)
+ xsldbgGenericErrorFunc(i18n("\tTotal of %n XSLT stylesheet found.", "\tTotal of %n XSLT stylesheets found.", printCounter) + QString("\n"));
+ else
+ /* strange but possible */
+ xsldbgGenericErrorFunc(i18n("\tNo XSLT stylesheets found.\n"));
+ }
+ return 1; /* always succeed */
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/trace_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/trace_cmds.cpp
new file mode 100644
index 00000000..3893be67
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/trace_cmds.cpp
@@ -0,0 +1,77 @@
+
+/***************************************************************************
+ oc_cmds.c - libxslt parameter commands for xsldbg
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "debugXSL.h"
+#include "options.h"
+
+
+/* -----------------------------------------
+
+ Tracing related commands
+
+ ------------------------------------------- */
+
+
+/**
+ * xslDbgShellTrace:
+ * @arg: Not used
+ *
+ * Start the tracing of the stylesheet. First need to restart it.
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellTrace(xmlChar * arg)
+{
+ Q_UNUSED(arg);
+ xslDebugStatus = DEBUG_RUN_RESTART;
+ optionsSetIntOption(OPTIONS_TRACE, TRACE_ON);
+ return 1;
+}
+
+
+/**
+ * xslDbgShellWalk:
+ * @arg: An interger between 0 and 9 indicate the speed of walk
+ *
+ * Start walking through the stylesheet.
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+xslDbgShellWalk(xmlChar * arg)
+{
+ int result = 0;
+
+ long speed = WALKSPEED_NORMAL;
+
+ if (xmlStrLen(arg)
+ && (!sscanf((char *) arg, "%ld", &speed) || ((speed < 0) || (speed > 9)))) {
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments to command %1.\n").arg("walk"));
+ xsldbgGenericErrorFunc(i18n("Warning: Assuming normal speed.\n"));
+ speed = WALKSPEED_NORMAL;
+ }
+ result = 1;
+ optionsSetIntOption(OPTIONS_WALK_SPEED, speed);
+ xslDebugStatus = DEBUG_WALK;
+
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/utils.cpp b/kxsldbg/kxsldbgpart/libxsldbg/utils.cpp
new file mode 100644
index 00000000..c63c07fc
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/utils.cpp
@@ -0,0 +1,187 @@
+
+/**************************************************************************
+ utils.c - misc utils
+
+ -------------------
+ begin : Thur Jan 31 2002
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ **************************************************************************/
+
+/**************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "utils.h"
+
+/**
+ * trimString:
+ * @text : A valid string with leading or trailing spaces
+ *
+ * Remove leading and trailing spaces off @text
+ * stores result back into @text
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+trimString(xmlChar * text)
+{
+ int result = 0;
+ xmlChar *start, *end;
+
+ if (text && xmlStrlen(text)) {
+ start = text;
+ end = text + xmlStrLen(text) - 1;
+ while (_IS_BLANK(*start) && (start <= end))
+ start++;
+
+ while (_IS_BLANK(*end) && (end >= start))
+ end--;
+
+ /* copy to @text */
+ while (start <= end) {
+ *text = *start;
+ text++;
+ start++;
+ }
+
+ *text = '\0';
+ result = 1;
+ }
+ return result;
+}
+
+
+/**
+ * splitString:
+ * @textIn: The string to split
+ * @maxStrings: The max number of strings to put into @out
+ * @out: Is valid and at least the size of @maxStrings
+ *
+ * Split string by white space and put into @out
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+int
+splitString(xmlChar * textIn, int maxStrings, xmlChar ** out)
+{
+ int wordCount = 0;
+ int foundQuote = 0;
+
+ if (!textIn || !out)
+ return wordCount;
+
+
+ while ((*textIn != '\0') && (wordCount < maxStrings)) {
+ /*skip the first spaces ? */
+ while (_IS_BLANK(*textIn))
+ textIn++;
+
+ if (*textIn == '\"') {
+ textIn++;
+ foundQuote = 1;
+ }
+ out[wordCount] = textIn;
+
+ /* look for end of word */
+ if (foundQuote == 0) {
+ while (!_IS_BLANK(*textIn) && (*textIn != '\0'))
+ textIn++;
+
+ if (*textIn != '\0') {
+ *textIn = '\0';
+ textIn++;
+ }
+
+ if (xmlStrLen(out[wordCount]) > 0) {
+ wordCount++;
+ }
+ } else {
+ /* look for ending quotation mark */
+ while ((*textIn != '\0') && (*textIn != '\"'))
+ textIn++;
+ if (*textIn == '\0') {
+ xsldbgGenericErrorFunc(i18n("Error: Unmatched quotes in input.\n"));
+ wordCount = 0;
+ break;
+ }
+ *textIn = '\0';
+ textIn++; /* skip the '"' which is now a '\0' */
+ foundQuote = 0;
+ wordCount++;
+ }
+
+ }
+
+ if (*textIn != '\0')
+ wordCount = 0; /* We have not processed all the text givent to us */
+ return wordCount;
+}
+
+
+
+/**
+ * lookupName:
+ * @name : Is valid
+ * @matchList : A NULL terminated list of names to use as lookup table
+ *
+ * Lookup and name in a list
+ *
+ * Returns The id of name found in @matchList,
+ * 0 otherwise
+*/
+int
+lookupName(xmlChar * name, xmlChar ** matchList)
+{
+ int result = -1, nameIndex;
+
+ if (!name || !matchList)
+ return result;
+
+ for (nameIndex = 0; matchList[nameIndex]; nameIndex++) {
+ if (xmlStrEqual(name, matchList[nameIndex])) {
+ result = nameIndex;
+ break;
+ }
+ }
+
+ return result;
+}
+
+/**
+ * fullQName:
+ * @nameURI : QName part of name
+ * @name : Local part of name
+ *
+ * Join nameURI to name
+ *
+ * Returns a copy of "nameURI:name"
+ *
+ */
+
+xmlChar * fullQName(const xmlChar* nameURI, const xmlChar * name)
+{
+ xmlChar *result = NULL;
+ if (!nameURI && !name)
+ result = xmlStrdup((xmlChar*)"");
+ else{
+ if (nameURI == NULL){
+ result = xmlStrdup(name);
+ }else{
+ result = (xmlChar*) xmlMalloc(sizeof(char) * (
+ xmlStrLen(name) +
+ xmlStrLen(nameURI) + 3));
+ if (result)
+ sprintf((char*)result, "%s:%s", (char*)nameURI, (char*)name);
+ }
+ }
+ return result;
+}
+
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/utils.h b/kxsldbg/kxsldbgpart/libxsldbg/utils.h
new file mode 100644
index 00000000..e5cd4bfc
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/utils.h
@@ -0,0 +1,217 @@
+
+/**************************************************************************
+ utils.c - declaration for misc utils this is
+ mixed bag of functions so it is
+ not realy a module hense no need
+ for a utils prefix its functions
+
+ -------------------
+ begin : Thur Jan 31 2002
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ **************************************************************************/
+
+/**************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBG_UTILS_H
+#define XSLDBG_UTILS_H
+
+#ifndef BUILD_DOCS
+#include <stdio.h>
+#include <string.h>
+#include <libxml/tree.h>
+#include <libxml/debugXML.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/xsltutils.h>
+#include <libxml/xpath.h>
+#endif
+
+#include "xsldbg.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ Make things simpler when working between char* and xmlChar* .
+ By definition a char is the same size as an xmlChar(unsigned char).
+*/
+
+#ifndef BUILD_DOCS
+#define xmlStrLen(text) strlen((char*)(text))
+#define xmlStrCat(a, b) strcat((char*)(a), (char*)(b))
+#define xmlStrCmp(a, b) strcmp((char*)(a), (char*)(b))
+#define xmlStrnCmp(a, b, c) strncmp((char*)(a), (char*)(b), c)
+#define xmlStrCpy(a, b) strcpy((char*)(a), (char*)(b))
+#define xmlStrnCpy(a, b, c) strncpy((char*)(a),(char*)(b), c)
+#define xmlStrChr(a, b) strchr((char*)(a), b)
+#define xmlStrrChr(a, b) strrchr((char*)(a), b)
+#endif
+
+/* what char is use to separate directories in an URI*/
+#define URISEPARATORCHAR '/'
+
+ /* Handle the differences in path and quote character between
+ * win32 and *nix systems */
+#ifdef WIN32
+#define QUOTECHAR ' '
+#define PATHCHAR '\\'
+#else
+#define QUOTECHAR '\"'
+#define PATHCHAR '/'
+#endif
+
+
+/* JRF: Although RISC OS native paths use . as a separator, the arguments
+ to xsldbg are passed in unix or URI form, and thus the above
+ specification is correct. */
+
+
+
+/**
+ * _IS_BLANK:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec
+ *
+ * [3] S ::= (#x20 | #x9 | #xD | #xA)+
+ */
+#define _IS_BLANK(c) (((c) == 0x20) || ((c) == 0x09) || ((c) == 0xA) || \
+ ((c) == 0x0D))
+
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * trimString:
+ * @text : A valid string with leading or trailing spaces
+ *
+ * Remove leading and trailing spaces off @text
+ * stores result back into @text
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Remove leading and trailing spaces off @p text
+ * stores result back into @p text
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param text A valid string with leading or trailing spaces
+ */
+#endif
+#endif
+ int trimString(xmlChar * text);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * splitString:
+ * @textIn: The string to split
+ * @maxStrings: The max number of strings to put into @out
+ * @out: Is valid and at least the size of @maxStrings
+ *
+ * Split string by white space and put into @out
+ *
+ * Returns 1 on success,
+ * 0 otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Spit string by white space and put into @p out
+ *
+ * @returns 1 on success,
+ * 0 otherwise
+ *
+ * @param textIn The string to split
+ * @param maxStrings The max number of strings to put into @p out
+ * @param out Is valid and at least the size of @p maxStrings
+ */
+#endif
+#endif
+ int splitString(xmlChar * textIn, int maxStrings, xmlChar ** out);
+
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * lookupName:
+ * @name : Is valid
+ * @matchList : A NULL terminated list of names to use as lookup table
+ *
+ * Lookup and name in a list
+ *
+ * Returns The id of name found in @matchList,
+ * 0 otherwise
+*/
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Lookup and name in a list
+ *
+ *
+ * @returns The id of name found in @p matchList
+ * 0 otherwise
+ *
+ * @param name Is valid
+ * @param matchList A NULL terminated list of names to use as lookup table
+ *
+*/
+#endif
+#endif
+ int lookupName(xmlChar * name, xmlChar ** matchList);
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * fullQName:
+ * @nameURI : QName part of name
+ * @name : Local part of name
+ *
+ * Join nameURI to name
+ *
+ * Returns a copy of "nameURI:name"
+ *
+ */
+
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Join nameURI to name
+ *
+ * @returns a copy of "nameURI:name"
+
+ * fullQName:
+ * @param nameURI : QName part of name
+ * @param name : Local part of name
+ *
+ *
+ */
+#endif
+#endif
+
+ xmlChar * fullQName(const xmlChar* nameURI, const xmlChar * name);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/variable_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/variable_cmds.cpp
new file mode 100644
index 00000000..a00769f4
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/variable_cmds.cpp
@@ -0,0 +1,114 @@
+
+/***************************************************************************
+ variable_cmds.c - description
+ -------------------
+ begin : Sun Dec 30 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <libxml/xpath.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/variables.h> /* needed for xsltVariablesComp */
+#include <libxml/valid.h> /* needed for xmlSplitQName2 */
+#include "xsldbg.h"
+#include "debugXSL.h"
+#include "search.h"
+
+
+int
+xslDbgShellSetVariable(xsltTransformContextPtr styleCtxt, xmlChar * arg)
+{
+ int result = 0, showUsage = 0;
+ xmlChar *name, *nameURI, *selectExpr, *opts[3];
+
+ if (!styleCtxt) {
+
+ xsldbgGenericErrorFunc(i18n("Error: Stylesheet is not valid.\n"));
+ return result;
+ }
+
+ if (!arg) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Error: NULL argument provided\n");
+#endif
+ return result;
+ }
+
+ if (xmlStrLen(arg) > 1) {
+ if (splitString(arg, 2, opts) == 2) {
+ nameURI = NULL;
+ /* ignore any "$" prefix as user probably didn't mean that
+ "$" is part of variable name*/
+ if (*opts[0] =='$'){
+ opts[0] = opts[0] + 1;
+ }
+ name = xmlSplitQName2(opts[0], &nameURI);
+ if (name == NULL)
+ name = xmlStrdup(opts[0]);
+ selectExpr = xmlStrdup(opts[1]);
+ if (name && selectExpr) {
+ xsltStackElemPtr def = NULL;
+
+ if (styleCtxt->varsNr && styleCtxt->varsTab) {
+ /* try finding varaible in stack */
+ for (int i = styleCtxt->varsNr; i > styleCtxt->varsBase; i--) {
+ xsltStackElemPtr item = styleCtxt->varsTab[i-1];
+ while (item) {
+ if ((xmlStrCmp(name, item->name) == 0) &&
+ (item->nameURI == NULL
+ || (xmlStrCmp(name, item->nameURI) == 0))) {
+ def = item;
+ break;
+ }
+ item = item->next;
+ }
+ }
+ }
+
+ if (def == NULL)
+ def = (xsltStackElemPtr)
+ xmlHashLookup2(styleCtxt->globalVars,
+ name, nameURI);
+ if (def != NULL) {
+ if (def->select) {
+ def->select = xmlDictLookup(styleCtxt->dict, selectExpr, -1);
+ def->tree = NULL; /* maybe a memory leak, but play it safe */
+ def->computed = 1;
+ if (def->comp->comp)
+ xmlXPathFreeCompExpr(def->comp->comp);
+ def->comp->comp = xmlXPathCompile(def->select);
+ if (def->value)
+ xmlXPathFreeObject(def->value);
+ def->value =
+ xmlXPathEval(def->select,
+ styleCtxt->xpathCtxt);
+ result = 1;
+ } else {
+ xmlFree(selectExpr);
+ xsldbgGenericErrorFunc(i18n("Error: Cannot change a variable that does not use the select attribute.\n"));
+ }
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Variable %1 was not found.\n").arg(xsldbgText(name)));
+ xmlFree(name);
+ } else
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ } else {
+ showUsage = 1;
+ }
+
+ if (showUsage == 1)
+ xsldbgGenericErrorFunc(i18n("Error: Invalid arguments to command %1.\n").arg("set"));
+ }
+ return result;
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp
new file mode 100644
index 00000000..2afdb828
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp
@@ -0,0 +1,1367 @@
+
+/***************************************************************************
+ xsldbg.c - description
+ -------------------
+ begin : Sun Sep 16 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/*
+ * Based on file xsltproc.c
+ *
+ * by Daniel Veillard
+ * daniel@veillard.com
+ *
+ * xsltproc.c is part of libxslt
+ *
+ *
+ */
+
+/* Justin's port version - do not merge into core!!! */
+#define RISCOS_PORT_VERSION "2.01"
+
+#include <kurl.h>
+#include <kdebug.h>
+#include "xsldbg.h"
+#include "debug.h"
+#include "options.h"
+#include "utils.h"
+#include "files.h"
+#include "breakpoint.h"
+#include "debugXSL.h"
+
+#include <libxml/xmlerror.h>
+#include "xsldbgmsg.h"
+#include "xsldbgthread.h" /* for getThreadStatus */
+#ifdef HAVE_READLINE
+# include <readline/readline.h>
+# ifdef HAVE_HISTORY
+# include <readline/history.h>
+# endif
+#endif
+
+/* need to setup catch of SIGINT */
+#include <signal.h>
+
+/* needed by printTemplateNames */
+#include <libxslt/transform.h>
+
+/* standard includes from xsltproc*/
+#include <libxslt/xslt.h>
+#include <libexslt/exslt.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#include <libxml/xmlmemory.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlerror.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/xmlIO.h>
+#ifdef LIBXML_DOCB_ENABLED
+#include <libxml/DOCBparser.h>
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+#include <libxml/xinclude.h>
+#endif
+
+#include <libxml/catalog.h>
+#include <libxml/parserInternals.h>
+
+#include <libxslt/xslt.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
+#include <libxslt/extensions.h>
+#include <libexslt/exsltconfig.h>
+
+#include <kcmdlineargs.h>
+#include <kglobal.h>
+#include <qfile.h>
+
+#ifdef WIN32
+#ifdef _MSC_VER
+#include <winsock2.h>
+#pragma comment(lib, "ws2_32.lib")
+#define gettimeofday(p1,p2)
+#define HAVE_TIME_H
+#include <time.h>
+#define HAVE_STDARG_H
+#include <stdarg.h>
+#endif /* _MS_VER */
+#else /* WIN32 */
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#elif defined(HAVE_TIME_H)
+#include <time.h>
+#endif
+
+
+#endif /* WIN32 */
+
+#ifndef HAVE_STAT
+# ifdef HAVE__STAT
+
+/* MS C library seems to define stat and _stat. The definition
+ * is identical. Still, mapping them to each other causes a warning. */
+# ifndef _MSC_VER
+# define stat(x,y) _stat(x,y)
+# endif
+# define HAVE_STAT
+# endif
+#endif
+
+#ifdef __riscos
+
+/* Global definition of our program name on invocation.
+ This is required such that we can invoke ourselves for processing
+ search or help messages where our executable does not exist on the
+ current run path */
+char *xsldbgCommand = NULL;
+#endif
+
+xmlSAXHandler mySAXhdlr;
+
+FILE *errorFile = NULL; /* we'll set this just before starting debugger */
+
+xmlParserInputPtr xmlNoNetExternalEntityLoader(const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+/* -----------------------------------------
+ Private function declarations for xsldbg.c
+ -------------------------------------------*/
+
+/**
+ * xsldbgInit:
+ *
+ * Returns 1 if able to allocate memory needed by xsldbg
+ * 0 otherwise
+ */
+int xsldbgInit(void);
+
+
+/**
+ * xsldbgFree:
+ *
+ * Free memory used by xsldbg
+ */
+void xsldbgFree(void);
+
+
+/**
+ * printTemplates:
+ * @style : valid as parsed my xsldbg
+ * @doc : " " " " "
+ *
+ * print out list of template names
+ */
+void printTemplates(xsltStylesheetPtr style, xmlDocPtr doc);
+
+
+/**
+ * catchSigInt:
+ * @value : not used
+ *
+ * Recover from a signal(SIGINT), exit if needed
+ */
+void catchSigInt(int value);
+
+
+/**
+ * catchSigTerm:
+ * @value : not used
+ *
+ * Clean up and exit
+ */
+void
+ catchSigTerm(int value);
+
+/**
+ * xsldbgGenericErrorFunc:
+ * @ctx: Is Valid
+ * @msg: Is valid
+ * @...: other parameters to use
+ *
+ * Handles print output from xsldbg and passes it to the application if
+ * running as a thread otherwise send to stderr
+ */
+void
+ xsldbgGenericErrorFunc(void *ctx, const char *msg, ...);
+
+xmlEntityPtr (*oldGetEntity)( void * user_data, const xmlChar * name);
+
+static xmlEntityPtr xsldbgGetEntity( void * user_data, const xmlChar * name)
+{
+ xmlEntityPtr ent = NULL;
+ if (oldGetEntity){
+ ent = (oldGetEntity)(user_data, name);
+ if (ent)
+ filesEntityRef(ent, ent->children, ent->last);
+ }
+ return ent;
+}
+
+/* -------------------------------------
+ End private functions
+ ---------------------------------------*/
+
+
+/*
+ * Internal timing routines to remove the necessity to have unix-specific
+ * function calls
+ */
+
+#if defined(HAVE_GETTIMEOFDAY)
+static struct timeval begin, end;
+
+/*
+ * startTimer: call where you want to start timing
+ */
+static void
+startTimer(void)
+{
+ gettimeofday(&begin, NULL);
+}
+
+/*
+ * endTimer: call where you want to stop timing and to print out a
+ * message about the timing performed; format is a printf
+ * type argument
+ */
+static void
+endTimer(const QString& message)
+{
+ long msec;
+
+ gettimeofday(&end, NULL);
+ msec = end.tv_sec - begin.tv_sec;
+ msec *= 1000;
+ msec += (end.tv_usec - begin.tv_usec) / 1000;
+
+#ifndef HAVE_STDARG_H
+#error "endTimer required stdarg functions"
+#endif
+ /* Display the time taken to complete this task */
+ xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n").arg(message).arg(msec));
+}
+#elif defined(HAVE_TIME_H)
+
+/*
+ * No gettimeofday function, so we have to make do with calling clock.
+ * This is obviously less accurate, but there's little we can do about
+ * that.
+ */
+
+clock_t begin, end;
+static void
+startTimer(void)
+{
+ begin = clock();
+}
+static void
+endTimer(const QString& message)
+{
+ long msec;
+
+ end = clock();
+ msec = ((end - begin) * 1000) / CLOCKS_PER_SEC;
+
+#ifndef HAVE_STDARG_H
+#error "endTimer required stdarg functions"
+#endif
+ /* Display the time taken to complete this task */
+ xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n").arg(message).arg(msec));
+}
+#else
+
+/*
+ * We don't have a gettimeofday or time.h, so we just don't do timing
+ */
+static void
+startTimer(void)
+{
+ /*
+ * Do nothing
+ */
+}
+static void
+endTimer(const QString& message)
+{
+ /*
+ * We can not do anything because we don't have a timing function
+ */
+#ifdef HAVE_STDARG_H
+ /* Display the time taken to complete this task */
+ xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n"),arg(message).arg(msec));
+#else
+ /* We don't have gettimeofday, time or stdarg.h, what crazy world is
+ * this ?!
+ */
+#endif
+}
+#endif
+
+static void
+xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur)
+{
+
+ xmlDocPtr res;
+ const char *params[8 * 2 + 2];
+ int bytesWritten = -1;
+ int nbparams = 0;
+ int paramIndex;
+ parameterItemPtr paramItem;
+
+ /* Copy the parameters accross for libxslt */
+ for (paramIndex = 0;
+ paramIndex < arrayListCount(optionsGetParamItemList());
+ paramIndex++) {
+ paramItem = (parameterItemPtr)arrayListGet(optionsGetParamItemList(), paramIndex);
+ if (paramItem) {
+ params[nbparams] = (char *) paramItem->name;
+ params[nbparams + 1] = (char *) paramItem->value;
+ nbparams += 2;
+ }
+ }
+
+ params[nbparams] = NULL;
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+ if (optionsGetIntOption(OPTIONS_XINCLUDE)) {
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ startTimer();
+ xmlXIncludeProcess(doc);
+ if (optionsGetIntOption(OPTIONS_TIMING)) {
+ /* Display the time taken to do XInclude processing */
+ endTimer(i18n("XInclude processing %1.").arg((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME)));
+ }
+ }
+#endif
+ if (optionsGetIntOption(OPTIONS_TIMING) ||
+ optionsGetIntOption(OPTIONS_PROFILING))
+ startTimer();
+ if ((optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) == NULL) ||
+ optionsGetIntOption(OPTIONS_SHELL)) {
+ if (optionsGetIntOption(OPTIONS_REPEAT)) {
+ int j;
+
+ for (j = 1; j < optionsGetIntOption(OPTIONS_REPEAT); j++) {
+ res = xsltApplyStylesheet(cur, doc, params);
+ xmlFreeDoc(res);
+ doc = xsldbgLoadXmlData();
+ }
+ }
+ if (optionsGetIntOption(OPTIONS_PROFILING)) {
+ if (terminalIO != NULL)
+ res = xsltProfileStylesheet(cur, doc, params, terminalIO);
+ else if ((optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) ==
+ NULL) || (getThreadStatus() != XSLDBG_MSG_THREAD_RUN)
+ || (filesTempFileName(1) == NULL))
+ res = xsltProfileStylesheet(cur, doc, params, stderr);
+ else {
+ /* We now have to output to using notify using
+ * temp file #1 */
+ FILE *tempFile = fopen(filesTempFileName(1), "w");
+
+ if (tempFile != NULL) {
+ res =
+ xsltProfileStylesheet(cur, doc, params, tempFile);
+ fclose(tempFile);
+ /* send the data to application */
+ notifyXsldbgApp(XSLDBG_MSG_FILEOUT,
+ filesTempFileName(1));
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").arg(filesTempFileName(1)));
+ res = xsltProfileStylesheet(cur, doc, params, stderr);
+ }
+ }
+ } else {
+ res = xsltApplyStylesheet(cur, doc, params);
+ }
+ if (optionsGetIntOption(OPTIONS_PROFILING)) {
+ if (optionsGetIntOption(OPTIONS_REPEAT))
+ /* Display how long it took to apply stylesheet */
+ endTimer(i18n("Applying stylesheet %n time", "Applying stylesheet %n times", optionsGetIntOption(OPTIONS_REPEAT)));
+ else
+ /* Display how long it took to apply stylesheet */
+ endTimer(i18n("Applying stylesheet"));
+ }
+ if (res == NULL) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext, "Error: Transformation did not complete writing to file %s\n",
+ optionsGetStringOption
+ (OPTIONS_OUTPUT_FILE_NAME));
+#endif
+ return;
+ }
+ if (!optionsGetIntOption(OPTIONS_OUT)) {
+ xmlFreeDoc(res);
+ return;
+ }
+#ifdef LIBXML_DEBUG_ENABLED
+ if (optionsGetIntOption(OPTIONS_DEBUG)) {
+ if (xslDebugStatus != DEBUG_RUN_RESTART){
+ if (terminalIO != NULL)
+ xmlDebugDumpDocument(terminalIO, res);
+ else if ((optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) ==
+ NULL) || (getThreadStatus() != XSLDBG_MSG_THREAD_RUN)
+ || (filesTempFileName(1) == NULL))
+ xmlDebugDumpDocument(stdout, res);
+ else {
+ FILE *tempFile = fopen(filesTempFileName(1), "w");
+
+ if (tempFile) {
+ bytesWritten = 0; // flag that we have writen at least zero bytes
+ xmlDebugDumpDocument(tempFile, res);
+ fclose(tempFile);
+ /* send the data to application */
+ notifyXsldbgApp(XSLDBG_MSG_FILEOUT,
+ filesTempFileName(1));
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").arg(filesTempFileName(1)));
+ xmlDebugDumpDocument(stdout, res);
+ }
+
+ }
+ }
+ } else {
+#endif
+ if (xslDebugStatus != DEBUG_RUN_RESTART){
+ if (cur->methodURI == NULL) {
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ startTimer();
+ if (xslDebugStatus != DEBUG_QUIT) {
+ if (terminalIO != NULL)
+ bytesWritten = xsltSaveResultToFile(terminalIO, res, cur);
+ else if (optionsGetStringOption
+ (OPTIONS_OUTPUT_FILE_NAME) == NULL)
+ bytesWritten = xsltSaveResultToFile(stdout, res, cur);
+ else{
+ bytesWritten = xsltSaveResultToFilename((const char *)
+ optionsGetStringOption
+ (OPTIONS_OUTPUT_FILE_NAME),
+ res, cur, 0);
+ }
+ }
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ /* Indicate how long it took to save to file */
+ endTimer(i18n("Saving result"));
+ } else {
+ if (xmlStrEqual(cur->method, (const xmlChar *) "xhtml")) {
+ xsldbgGenericErrorFunc(i18n("Warning: Generating non-standard output XHTML.\n"));
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ startTimer();
+ if (terminalIO != NULL)
+ bytesWritten = xsltSaveResultToFile(terminalIO, res, cur);
+ else if (optionsGetStringOption
+ (OPTIONS_OUTPUT_FILE_NAME) == NULL)
+ bytesWritten = xsltSaveResultToFile(stdout, res, cur);
+ else
+ bytesWritten = xsltSaveResultToFilename((const char *)
+ optionsGetStringOption
+ (OPTIONS_OUTPUT_FILE_NAME),
+ res, cur, 0);
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ /* Indicate how long it took to save to file */
+ endTimer(i18n("Saving result"));
+ } else {
+ xsldbgGenericErrorFunc(i18n("Warning: Unsupported, non-standard output method %1.\n").arg(xsldbgText(cur->method)));
+ }
+ }
+ }
+#ifdef LIBXML_DEBUG_ENABLED
+ }
+#endif
+
+ xmlFreeDoc(res);
+ } else {
+ xsltTransformContextPtr userCtxt = xsltNewTransformContext(cur, doc);
+ if (userCtxt){
+ bytesWritten = xsltRunStylesheetUser(cur, doc, params,
+ (char *)optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME),
+ NULL, NULL, NULL, userCtxt);
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ endTimer(i18n("Running stylesheet and saving result"));
+ xsltFreeTransformContext(userCtxt);
+ }else{
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+ }
+ if ((xslDebugStatus != DEBUG_RUN_RESTART) && (bytesWritten == -1))
+ xsldbgGenericErrorFunc(i18n("Error: Unable to save results of transformation to file %1.\n").arg(xsldbgText(optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME))));
+}
+
+int
+xsldbgMain(int argc, char **argv)
+{
+ Q_UNUSED(argc);
+ Q_UNUSED(argv);
+ int i=0, result = 1, noFilesFound = 0;
+ xsltStylesheetPtr cur = NULL;
+ xmlChar *expandedName; /* contains file name with path expansion if any */
+
+ /* in some cases we always want to bring up a command prompt */
+ int showPrompt;
+
+ /* the xml document we're processing */
+ xmlDocPtr doc;
+
+ KCmdLineArgs *args = 0;
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED)
+ args = KCmdLineArgs::parsedArgs();
+
+ errorFile = stderr;
+
+
+ if (args){
+ QString langChoice = args->getOption("lang");
+ if (KGlobal::locale() && !langChoice.isEmpty() && result)
+ KGlobal::locale()->setLanguage(langChoice);
+ }
+
+#ifdef __riscos
+ /* Remember our invocation command such that we may call ourselves */
+ xsldbgCommand = argv[0];
+#endif
+
+ xmlInitMemory();
+
+
+ LIBXML_TEST_VERSION xmlLineNumbersDefault(1);
+
+ if (!xsldbgInit()) {
+ xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
+ xsldbgFree();
+ xsltCleanupGlobals();
+ xmlCleanupParser();
+ xmlMemoryDump();
+ return (1);
+ }
+
+
+ if (args){
+ for (i = 0; i < args->count(); i++) {
+ if (!result)
+ break;
+
+ if (args->arg(i)[0] != '-') {
+ expandedName = filesExpandName((const xmlChar*)args->arg(i));
+ if (!expandedName) {
+ result = 0;
+ break;
+ }
+ switch (noFilesFound) {
+ case 0:
+ optionsSetStringOption(OPTIONS_SOURCE_FILE_NAME,
+ expandedName);
+ noFilesFound++;
+ break;
+ case 1:
+ optionsSetStringOption(OPTIONS_DATA_FILE_NAME,
+ expandedName);
+ noFilesFound++;
+ break;
+
+ default:
+ xsldbgGenericErrorFunc(i18n("Error: Too many file names supplied via command line.\n"));
+ result = 0;
+ }
+ xmlFree(expandedName);
+ continue;
+ }
+ }
+
+
+ // Handle boolean options
+ for (int optionID = OPTIONS_FIRST_BOOL_OPTIONID; optionID < OPTIONS_LAST_BOOL_OPTIONID; optionID++){
+ if (optionsGetOptionName(OptionTypeEnum(optionID))){
+ if (args->isSet((char *)optionsGetOptionName(OptionTypeEnum(optionID))))
+ optionsSetIntOption(OptionTypeEnum
+ (optionID), 1);
+ else
+ optionsSetIntOption(OptionTypeEnum(optionID), 0);
+ }
+ }
+
+ // No extra arguments go straight to the shell?
+ if (args->count() == 0)
+ result = optionsSetIntOption(OPTIONS_SHELL, 1);
+
+ // Disable net access?
+ if (!args->isSet("net")){
+ char noNetCmd[] = {"nonet 1"};
+ xslDbgShellSetOption((xmlChar*)noNetCmd);
+ }
+ }
+
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_NOTUSED){
+ result = optionsSetIntOption(OPTIONS_SHELL, 1);
+ }
+ /* copy the volitile options over to xsldbg */
+ optionsCopyVolitleOptions();
+
+ /*
+ * shell interraction
+ */
+ if (!optionsGetIntOption(OPTIONS_SHELL)) { /* excecute stylesheet (ie no debugging) */
+ xslDebugStatus = DEBUG_NONE;
+ } else {
+ xslDebugStatus = DEBUG_STOP;
+ xsltGenericError(xsltGenericErrorContext, "XSLDBG %s\n", VERSION);
+ }
+
+ if (optionsGetIntOption(OPTIONS_VALID))
+ xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ else
+ xmlLoadExtDtdDefaultValue = 0;
+
+
+ if (args){
+ if (args->isSet("verbose") && result)
+ xsltSetGenericDebugFunc(stderr, NULL);
+
+ QCString outFile = args->getOption("output");
+ if (!outFile.isEmpty() && result)
+ result = xslDbgShellOutput((const xmlChar *)QFile::encodeName(outFile).data());
+
+ QCString maxDepth = args->getOption("maxdepth");
+ if (!maxDepth.isEmpty() && result){
+ bool OK;
+ int value = maxDepth.toInt(&OK);
+ if (OK && (value> 0))
+ xsltMaxDepth = value;
+ }
+
+ if (args->isSet("repeat") && result){
+ if (optionsGetIntOption(OPTIONS_REPEAT) == 0)
+ optionsSetIntOption(OPTIONS_REPEAT, 20);
+ else
+ optionsSetIntOption(OPTIONS_REPEAT, 100);
+ }
+
+ QCStringList xslParams(args->getOptionList("param"));
+ QCStringList::iterator it;
+ QCString param, paramName, paramValue;
+ int separatorIdx;
+ bool paramOK;
+ for ( it = xslParams.begin(); it != xslParams.end(); ++it){
+ param = (*it);
+ paramOK = true;
+ separatorIdx = param.find(':');
+ if (separatorIdx > 0){
+ paramName = param.left((uint)separatorIdx);
+ paramValue = param.mid((uint)separatorIdx + 1);
+ if (!paramName.isEmpty() && !paramValue.isEmpty()){
+ if (arrayListCount(optionsGetParamItemList()) <= 31) {
+ arrayListAdd(optionsGetParamItemList(), optionsParamItemNew((const xmlChar*)paramName.data(), (const xmlChar*)paramValue.data()));
+ }else{
+ xsldbgGenericErrorFunc(i18n("Warning: Too many libxslt parameters provided via the command line option --param.\n"));
+ }
+ }else{
+ paramOK = false;
+ }
+ }else{
+ paramOK = false;
+ }
+ if (!paramOK)
+ xsldbgGenericErrorFunc(i18n("Error: Argument \"%1\" to --param is not in the format <name>:<value>.\n").arg(param.data()));
+ }
+
+ QCString cdPath = args->getOption("cd");
+ if (!cdPath.isEmpty() && result)
+ result = changeDir((const xmlChar *)QFile::encodeName(cdPath).data());
+
+ }
+
+ if (!result) {
+ KCmdLineArgs::usage();
+ xsldbgFree();
+ return (1);
+ }
+
+
+ /*
+ * * Replace entities with their content.
+ */
+ xmlSubstituteEntitiesDefault(1);
+
+ /*
+ * * Register the EXSLT extensions and the test module
+ */
+ exsltRegisterAll();
+ xsltRegisterTestModule();
+
+
+
+ debugGotControl(0);
+ while (xslDebugStatus != DEBUG_QUIT) {
+ xsldbgReachedFirstTemplate = false;
+ /* don't force xsldbg to show command prompt */
+ showPrompt = 0;
+ cur = NULL;
+ doc = NULL;
+ arrayListEmpty(filesEntityList());
+ xsltSetXIncludeDefault(optionsGetIntOption(OPTIONS_XINCLUDE));
+
+ /* copy the volitile options over to xsldbg */
+ optionsCopyVolitleOptions();
+
+ /* choose where error messages/xsldbg output get sent to */
+ if (optionsGetIntOption(OPTIONS_STDOUT))
+ errorFile = stdout;
+ else
+ errorFile = stderr;
+
+ filesLoadCatalogs();
+
+ if (optionsGetIntOption(OPTIONS_SHELL)) {
+ debugGotControl(0);
+ xsldbgGenericErrorFunc(i18n("\nStarting stylesheet\n\n"));
+ if (optionsGetIntOption(OPTIONS_TRACE) == TRACE_OFF)
+ xslDebugStatus = DEBUG_STOP; /* stop as soon as possible */
+ }
+
+ if ((optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) == NULL) ||
+ (optionsGetStringOption(OPTIONS_DATA_FILE_NAME) == NULL)) {
+ /* at least on file name has not been set */
+ /*goto a xsldbg command prompt */
+ showPrompt = 1;
+ if (optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) == NULL)
+ xsldbgGenericErrorFunc(i18n("Error: No XSLT source file supplied.\n"));
+
+ if (optionsGetStringOption(OPTIONS_DATA_FILE_NAME) == NULL) {
+ xsldbgGenericErrorFunc(i18n("Error: No XML data file supplied.\n"));
+ }
+
+ } else {
+ filesLoadXmlFile(NULL, FILES_SOURCEFILE_TYPE);
+ cur = filesGetStylesheet();
+ if ((cur == NULL) || (cur->errors != 0)) {
+ /*goto a xsldbg command prompt */
+ showPrompt = 1;
+ if (xslDebugStatus == DEBUG_NONE) {
+ xslDebugStatus = DEBUG_QUIT; /* panic !! */
+ result = 0;
+ }
+ }
+ }
+
+ if (showPrompt == 0) {
+ filesLoadXmlFile(NULL, FILES_XMLFILE_TYPE);
+ doc = filesGetMainDoc();
+ if (doc == NULL) {
+ if (xslDebugStatus == DEBUG_NONE) {
+ xslDebugStatus = DEBUG_QUIT; /* panic !! */
+ result = 0;
+ } else {
+ /*goto a xsldbg command prompt */
+ showPrompt = 1;
+ }
+ } else {
+ if (xslDebugStatus != DEBUG_QUIT) {
+ xsltProcess(doc, cur);
+ result = 1;
+ }
+ }
+
+ if (optionsGetIntOption(OPTIONS_SHELL) && (showPrompt == 0)) {
+ if ((xslDebugStatus != DEBUG_QUIT)
+ && !debugGotControl(-1)) {
+ xsldbgGenericErrorFunc(i18n("\nDebugger never received control.\n"));
+ /*goto a xsldbg command prompt */
+ showPrompt = 1;
+ xslDebugStatus = DEBUG_STOP;
+ } else {
+ xsldbgGenericErrorFunc(i18n("\nFinished stylesheet\n\032\032\n"));
+ {
+ /* handle trace execution */
+ int trace = optionsGetIntOption(OPTIONS_TRACE);
+
+ switch (trace) {
+ case TRACE_OFF:
+ /* no trace of execution */
+ break;
+
+ case TRACE_ON:
+ /* tell xsldbg to stop tracing next time we get here */
+ optionsSetIntOption(OPTIONS_TRACE,
+ TRACE_RUNNING);
+ xslDebugStatus = DEBUG_TRACE;
+ break;
+
+ case TRACE_RUNNING:
+ /* turn off tracing */
+ xslDebugStatus = DEBUG_CONT;
+ optionsSetIntOption(OPTIONS_TRACE,
+ TRACE_OFF);
+ break;
+ }
+ }
+ if (!optionsGetIntOption(OPTIONS_AUTORESTART) && (xslDebugStatus != DEBUG_RUN_RESTART)){
+ /* pass control to user they won't be able to do much
+ other than add breakpoints, quit, run, continue */
+ debugXSLBreak((xmlNodePtr) cur->doc, (xmlNodePtr) doc,
+ NULL, NULL);
+ }
+ }
+ } else {
+ /* request to execute stylesheet only so we're done */
+ xslDebugStatus = DEBUG_QUIT;
+ }
+ } else {
+ /* Some sort of problem loading source file has occured. Quit? */
+ if (xslDebugStatus == DEBUG_NONE) {
+ xslDebugStatus = DEBUG_QUIT; /* Panic!! */
+ result = 0;
+ } else {
+ /*goto a xsldbg command prompt */
+ showPrompt = 1;
+ }
+ }
+
+ if (showPrompt && optionsGetIntOption(OPTIONS_SHELL)) {
+ xmlDocPtr tempDoc = xmlNewDoc((xmlChar *) "1.0");
+ xmlNodePtr tempNode =
+ xmlNewNode(NULL, (xmlChar *) "xsldbg_default_node");
+ if (!tempDoc || !tempNode) {
+ xsldbgFree();
+ return (1);
+ }
+ xmlAddChild((xmlNodePtr) tempDoc, tempNode);
+
+ xsldbgGenericErrorFunc(i18n("Going to the command shell; not all xsldbg commands will work as not all needed have been loaded.\n"));
+ xslDebugStatus = DEBUG_STOP;
+ if ((cur == NULL) && (doc == NULL)) {
+ /*no doc's loaded */
+ debugXSLBreak(tempNode, tempNode, NULL, NULL);
+ } else if ((cur != NULL) && (doc == NULL)) {
+ /* stylesheet is loaded */
+ debugXSLBreak((xmlNodePtr) cur->doc, tempNode, NULL, NULL);
+ } else if ((cur == NULL) && (doc != NULL)) {
+ /* xml doc is loaded */
+ debugXSLBreak(tempNode, (xmlNodePtr) doc, NULL, NULL);
+ } else {
+ /* unexpected problem, both docs are loaded */
+ debugXSLBreak((xmlNodePtr) cur->doc, (xmlNodePtr) doc,
+ NULL, NULL);
+ }
+ xmlFreeDoc(tempDoc);
+ } else if (showPrompt && !optionsGetIntOption(OPTIONS_SHELL)) {
+ xslDebugStatus = DEBUG_QUIT;
+ result = 0; /* panic */
+ }
+
+ if (optionsGetIntOption(OPTIONS_SHELL)) {
+ /* force a refesh of both stlesheet and xml data */
+ filesFreeXmlFile(FILES_SOURCEFILE_TYPE);
+ filesFreeXmlFile(FILES_XMLFILE_TYPE);
+ }
+ }
+
+ if (!result) {
+ xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
+ }
+ xsldbgFree();
+ xsltCleanupGlobals();
+ xmlCleanupParser();
+ xmlMemoryDump();
+ return !result;
+}
+
+/**
+ * xsldbgLoadStylesheet:
+ *
+ * Load the stylesheet and return it
+ *
+ * Returns The stylesheet after reloading it if successful
+ * NULL otherwise
+ */
+xsltStylesheetPtr
+xsldbgLoadStylesheet()
+{
+ xsltStylesheetPtr cur = NULL;
+ xmlDocPtr style;
+
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ startTimer();
+ style = xmlParseFile((const char *) optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME));
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ endTimer(i18n("Parsing stylesheet %1").arg((const char*)optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME)));
+ if (style == NULL) {
+ xsldbgGenericErrorFunc(i18n("Error: Cannot parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME))));
+ cur = NULL;
+ if (!optionsGetIntOption(OPTIONS_SHELL)) {
+ xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
+ xslDebugStatus = DEBUG_QUIT;
+ } else {
+ xsltGenericError(xsltGenericErrorContext, "\n");
+ xslDebugStatus = DEBUG_STOP;
+ }
+ } else {
+ cur = xsltLoadStylesheetPI(style);
+ if (cur != NULL) {
+ /* it is an embedded stylesheet */
+ xsltProcess(style, cur);
+ xsltFreeStylesheet(cur);
+ } else {
+ cur = xsltParseStylesheetDoc(style);
+ if (cur != NULL) {
+ if (cur->indent == 1)
+ xmlIndentTreeOutput = 1;
+ else
+ xmlIndentTreeOutput = 0;
+ } else {
+ xmlFreeDoc(style);
+ }
+ }
+ }
+ return cur;
+}
+
+
+
+/**
+ * xsldbgLoadXmlData:
+ *
+ * Load the xml data file and return it
+ *
+ * Returns The data file after reloading it if successful
+ * NULL otherwise
+ */
+xmlDocPtr
+xsldbgLoadXmlData(void)
+{
+ xmlDocPtr doc = NULL;
+ xmlSAXHandler mySAXHandler;
+ doc = NULL;
+
+ xmlSAXVersion(&mySAXHandler,2);
+ oldGetEntity = mySAXHandler.getEntity;
+ mySAXHandler.getEntity = xsldbgGetEntity;
+
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ startTimer();
+#ifdef LIBXML_HTML_ENABLED
+ if (optionsGetIntOption(OPTIONS_HTML))
+ doc = htmlParseFile((char *)
+ optionsGetStringOption(OPTIONS_DATA_FILE_NAME),
+ NULL);
+ else
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+ if (optionsGetIntOption(OPTIONS_DOCBOOK))
+ doc = docbParseFile((char *)
+ optionsGetStringOption(OPTIONS_DATA_FILE_NAME),
+ NULL);
+ else
+#endif
+
+#if LIBXML_VERSION >= 20600
+ doc = xmlSAXParseFile(&mySAXHandler,
+ (char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME), 0);
+#else
+ doc = xmlParseFile((char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME));
+#endif
+ if (doc == NULL) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))));
+ if (!optionsGetIntOption(OPTIONS_SHELL)) {
+ xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
+ xslDebugStatus = DEBUG_QUIT;
+ } else {
+ xsltGenericError(xsltGenericErrorContext, "\n");
+ xslDebugStatus = DEBUG_STOP;
+ }
+ } else if (optionsGetIntOption(OPTIONS_TIMING))
+ endTimer(QString("Parsing document %1").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))).utf8().data());
+
+ return doc;
+}
+
+
+/**
+ * xsldbgLoadXmlTemporary:
+ * @path: The name of temporary file to load
+ *
+ * Load the temporary data file and return it
+ *
+ * Returns The temporary file after reloading it if successful,
+ * NULL otherwise
+ */
+xmlDocPtr
+xsldbgLoadXmlTemporary(const xmlChar * path)
+{
+ xmlDocPtr doc = NULL;
+ doc = NULL;
+
+ if (optionsGetIntOption(OPTIONS_TIMING))
+ startTimer();
+#ifdef LIBXML_HTML_ENABLED
+ if (optionsGetIntOption(OPTIONS_HTML))
+ doc = htmlParseFile((char *) path, NULL);
+ else
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+ if (optionsGetIntOption(OPTIONS_DOCBOOK))
+ doc = docbParseFile((char *) path, NULL);
+ else
+#endif
+ doc = xmlSAXParseFile(&mySAXhdlr, (char *) path, 0);
+ if (doc == NULL) {
+ xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(path)));
+ }
+
+ if (optionsGetIntOption(OPTIONS_TIMING)
+ && (xslDebugStatus != DEBUG_QUIT)) {
+ endTimer(QString("Parsing document %1").arg(xsldbgUrl(path)));
+ }
+ return doc;
+}
+
+/**
+ * printTemplates:
+ * @style : valid as parsed my xsldbg
+ * @doc : " " " " "
+ *
+ * print out list of template names
+ */
+void
+printTemplates(xsltStylesheetPtr style, xmlDocPtr doc)
+{
+ xsltTransformContextPtr ctxt = xsltNewTransformContext(style, doc);
+
+ if (ctxt) {
+ /* don't be verbose when printing out template names */
+ xslDbgShellPrintTemplateNames(ctxt, NULL, NULL, 0, 0);
+ } else {
+ xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+ }
+}
+
+#ifdef WIN32
+
+/* For the windows world we capture the control event */
+BOOL WINAPI
+handler_routine(DWORD dwCtrlType)
+{
+
+ switch (dwCtrlType) {
+ case CTRL_C_EVENT:
+ case CTRL_BREAK_EVENT:
+ case CTRL_CLOSE_EVENT:
+ catchSigInt(SIGINT);
+ break;
+
+ case CTRL_LOGOFF_EVENT:
+ case CTRL_SHUTDOWN_EVENT:
+ xsldbgFree();
+ exit(1);
+ break;
+
+ default:
+ printf("Error: Unknown control event\n");
+ break;
+ }
+
+ return (true);
+}
+
+#endif
+
+#if LIBXML_VERSION >= 2006000
+/* libxml/ handlers */
+void xsldbgStructErrorHandler(void * userData, xmlErrorPtr error)
+{
+ if (error && error->message && (error->level >= 0) && (error->level <= 4)){
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN){
+ static const char *msgPrefix[4 + 1] = {"", "warning :", "error:", "fatal:"};
+ if (error->file)
+ xsltGenericError(xsltGenericErrorContext, "%s%s in file \"%s\" line %d", msgPrefix[error->level], error->message, error->file, error->line);
+ else
+ xsltGenericError(xsltGenericErrorContext, "%s%s", msgPrefix[error->level], error->message);
+
+ }else{
+ xsltGenericError(xsltGenericErrorContext,"Struct error handler");
+ notifyXsldbgApp(XSLDBG_MSG_ERROR_MESSAGE, error);
+ }
+ }
+}
+
+void xsldbgSAXErrorHandler(void * ctx, const char * msg, ...)
+{
+ if (ctx)
+ xsldbgStructErrorHandler(0, ((xmlParserCtxtPtr)ctx)->lastError);
+}
+
+void xsldbgSAXWarningHandler(void * ctx, const char * msg, ...)
+{
+ if (ctx)
+ xsldbgStructErrorHandler(0, ((xmlParserCtxtPtr)ctx)->lastError);
+}
+
+#endif
+
+/**
+ * catchSigInt:
+ * @value : not used
+ *
+ * Recover from a signal(SIGINT), exit if needed
+ */
+void
+catchSigInt(int value)
+{
+ Q_UNUSED(value);
+ if ((xslDebugStatus == DEBUG_NONE) || (xsldbgStop == 1) || (xslDebugStatus == DEBUG_STOP)) {
+ xsldbgFree();
+ exit(1);
+ }
+#ifdef __riscos
+ /* re-catch SIGINT - RISC OS resets the handler when the interupt occurs */
+ signal(SIGINT, catchSigInt);
+#endif
+
+ if (xslDebugStatus != DEBUG_STOP) {
+ /* stop running/walking imediately !! */
+ xsldbgStop = 1;
+ }
+}
+
+
+/**
+ * catchSigTerm:
+ * @value : not used
+ *
+ * Clean up and exit
+ */
+void
+catchSigTerm(int value)
+{
+ Q_UNUSED(value);
+ xsldbgFree();
+ exit(1);
+}
+
+
+
+typedef void (*sighandler_t) (int);
+static sighandler_t oldHandler;
+
+static int initialized = 0;
+
+/**
+ * xsldbgInit:
+ *
+ * Returns 1 if able to allocate memory needed by xsldbg
+ * 0 otherwise
+ */
+int
+xsldbgInit()
+{
+ int result = 0;
+ int xmlVer = 0;
+
+ if (!initialized) {
+ sscanf(xmlParserVersion, "%d", &xmlVer);
+ if (!debugInit()) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Fatal error: Init of debug module failed\n");
+#endif
+ return result;
+ }
+ if (!filesInit()) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Fatal error: Init of files module failed\n");
+#endif
+ return result;
+ }
+
+ if (!optionsInit()) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Fatal error: Init of options module failed\n");
+#endif
+ return result;
+ }
+
+ if (!searchInit()) {
+#ifdef WITH_XSLDBG_DEBUG_PROCESS
+ xsltGenericError(xsltGenericErrorContext,
+ "Fatal error: Init of search module failed\n");
+#endif
+ return result;
+ }
+
+
+
+ /* set up the parser */
+ xmlInitParser();
+#if 0
+#if LIBXML_VERSION >= 20600
+ xmlSetGenericErrorFunc(NULL, NULL);
+ xmlSetStructuredErrorFunc(NULL , (xmlStructuredErrorFunc)xsldbgStructErrorHandler);
+#else
+ xmlSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
+ xsltSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
+#endif
+#else
+ xmlSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
+ xsltSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
+#endif
+
+ /*
+ * disable CDATA from being built in the document tree
+ */
+ xmlDefaultSAXHandlerInit();
+ xmlDefaultSAXHandler.cdataBlock = NULL;
+
+ if (getThreadStatus() != XSLDBG_MSG_THREAD_NOTUSED) {
+ initialized = 1;
+ return 1; /* this is all we need to do when running as a thread */
+ }
+#ifndef WIN32
+ /* catch SIGINT */
+ oldHandler = signal(SIGINT, catchSigInt);
+#else
+ if (SetConsoleCtrlHandler(handler_routine, true) != true)
+ return result;
+#endif
+
+#ifndef WIN32
+ /* catch SIGTIN tty input available fro child */
+ signal(SIGTERM, catchSigTerm);
+#endif
+ initialized = 1;
+ }
+ return 1;
+}
+
+/**
+ * xsldbgFree:
+ *
+ * Free memory used by xsldbg
+ */
+void
+xsldbgFree()
+{
+ debugFree();
+ filesFree();
+ optionsFree();
+ searchFree();
+#ifndef WIN32
+ if (oldHandler != SIG_ERR)
+ signal(SIGINT, oldHandler);
+#else
+ SetConsoleCtrlHandler(handler_routine, false);
+#endif
+ initialized = 0;
+
+#ifdef HAVE_READLINE
+ /* rl_free_line_state ();
+ rl_cleanup_after_signal(); */
+# ifdef HAVE_HISTORY
+ clear_history();
+# endif
+#endif
+
+}
+
+
+char msgBuffer[4000];
+
+/**
+ * xsldbgGenericErrorFunc:
+ * @ctx: Is Valid
+ * @msg: Is valid
+ * @...: other parameters to use
+ *
+ * Handles print output from xsldbg and passes it to the application if
+ * running as a thread otherwise send to stderr
+ */
+void
+xsldbgGenericErrorFunc(void *ctx, const char *msg, ...)
+{
+ va_list args;
+ Q_UNUSED(ctx);
+
+ va_start(args, msg);
+ if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+ vsnprintf(msgBuffer, sizeof(msgBuffer), msg, args);
+
+ notifyTextXsldbgApp(XSLDBG_MSG_TEXTOUT, msgBuffer);
+ } else {
+ xmlChar *encodeResult = NULL;
+
+ vsnprintf(msgBuffer, sizeof(msgBuffer), msg, args);
+ encodeResult = filesEncode((xmlChar *) msgBuffer);
+ if (encodeResult) {
+ fprintf(errorFile, "%s", encodeResult);
+ xmlFree(encodeResult);
+ } else
+ fprintf(errorFile, "%s", msgBuffer);
+ }
+ va_end(args);
+}
+
+void xsldbgGenericErrorFunc(QString const &text)
+{
+ xsldbgGenericErrorFunc(0, "%s", text.utf8().data());
+}
+
+
+QString xsldbgUrl(const char *utf8fUrl)
+{
+ QString tempUrl(utf8fUrl);
+ QString fixedURI;
+ KURL url(tempUrl);
+
+ // May be provided with a URL that only has been encoded and has no protocol prefix ie a local file
+ if ( !tempUrl.startsWith("file:/") && !tempUrl.startsWith("http:/") && !tempUrl.startsWith("ftp:/"))
+ fixedURI = KURL::decode_string(tempUrl);
+ else
+ fixedURI = url.prettyURL();
+
+ return fixedURI;
+}
+
+QString xsldbgUrl(const xmlChar *utf8Url)
+{
+ return xsldbgUrl((const char*)(utf8Url));
+}
+
+QString xsldbgText(const char *utf8Text)
+{
+ return QString::fromUtf8(utf8Text);
+
+}
+
+QString xsldbgText(const xmlChar *utf8Text)
+{
+ return QString::fromUtf8((const char *)utf8Text);
+}
+
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h
new file mode 100644
index 00000000..6972fc12
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h
@@ -0,0 +1,188 @@
+
+/***************************************************************************
+ xsldbg.h - describe the application level functions
+ -------------------
+ begin : Sun Sep 16 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDEBUGGER_H
+#define XSLDEBUGGER_H
+
+#ifdef USE_KDE_DOCS
+
+/**
+ * Provide provide application level services and useful bits and pieces
+ *
+ * @short application functions and useful bits and pieces
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+#endif
+
+
+/* We want skip most of these includes when building documentation */
+#ifndef BUILD_DOCS
+#ifndef __riscos
+# ifndef WIN32
+# include "config.h"
+ /* we don't need to use dll declares for *nix based machines */
+# define XSLDBG_SO_API
+# else
+ /* dll declares get defined in xsldbgwin32config.h *nix based machines */
+# include "xsldbgwin32config.h"
+# endif
+#else
+ /* we don't need to use dll declares for risc_os*/
+# define XSLDBG_SO_API
+# include "config_riscos.h"
+# include "libxml/riscos.h"
+#endif
+
+#include <libxslt/xsltconfig.h>
+
+
+#if !defined (FORCE_DEBUGGER) && (LIBXSLT_VERSION > 10019)
+# ifndef WITH_XSLT_DEBUGGER
+# ifndef WITH_DEBUGGER
+# error "WITH_DEBUGGER MACRO not defined in libxslt maybe you've disable debugger in libxslt." \
+ "if your are sure then disable this check by defining WITH_FORCE_DEBUGGER. eg.\n" \
+ "\nmake CFLAGS=\"$CFLAGS -D FORCE_DEBUGGER\""
+# endif
+# endif
+#endif
+
+#ifdef WITH_XSLDBG_DEBUG
+
+#ifndef WITH_XSLDBG_DEBUG_PROCESS
+#define WITH_XSLDBG_DEBUG_PROCESS
+#endif
+
+#ifndef WITH_XSLDBG_DEBUG_BREAKPOINTS
+#define WITH_XSLDBG_DEBUG_BREAKPOINTS
+#endif
+
+#endif /* end of WITH_XSL_DEBUG */
+
+
+#include <libxslt/xslt.h>
+#include <libexslt/exslt.h>
+#include <libxslt/xsltutils.h>
+
+#include <qstring.h>
+#include <klocale.h>
+
+#include "breakpoint.h"
+
+
+#endif /* BUILD_DOCS */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xsldbgLoadStylesheet:
+ *
+ * Load the stylesheet and return it
+ *
+ * Returns the stylesheet after reloading it if successful
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Load the stylesheet and return it
+ *
+ * @returns The stylesheet after reloading it if successful
+ * NULL otherwise
+ */
+#endif
+#endif
+ xsltStylesheetPtr xsldbgLoadStylesheet(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xsldbgLoadXmlData:
+ *
+ * Load the xml data file and return it
+ *
+ * Returns the data file after reloading it if successful
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Load the xml data file and return it
+ *
+ * @returns The stylesheet after reloading it if successful
+ * NULL otherwise
+ */
+#endif
+#endif
+ xmlDocPtr xsldbgLoadXmlData(void);
+
+
+#ifdef USE_GNOME_DOCS
+
+/**
+ * xsldbgLoadXmlTemporary:
+ * @path: The name of temporary file to load
+ *
+ * Load the temporary data file and return it
+ *
+ * Returns The temporary file after reloading it if successful,
+ * NULL otherwise
+ */
+#else
+#ifdef USE_KDE_DOCS
+
+/**
+ * Load the temporary data file and return it
+ *
+ * @returns The temporary file after reloading it if successful,
+ * NULL otherwise
+ * @param path The name of temporary file to loa
+ */
+#endif
+#endif
+ xmlDocPtr xsldbgLoadXmlTemporary(const xmlChar * path);
+
+
+void xsldbgGenericErrorFunc(void *ctx, const char *msg, ...)
+#ifdef __GNUC__
+ __attribute__ ( ( format ( printf, 2, 3 ) ) )
+#endif
+;
+int xsldbgMain(int argc, char **argv);
+
+#ifdef __cplusplus
+}
+#endif
+
+void xsldbgGenericErrorFunc(QString const &text);
+QString xsldbgUrl(const char *utf8Url);
+QString xsldbgUrl(const xmlChar *utf8Url);
+QString xsldbgText(const char *utf8Text);
+QString xsldbgText(const xmlChar *utf8Text);
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgconfig.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgconfig.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgconfig.h
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h
new file mode 100644
index 00000000..85b1827f
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h
@@ -0,0 +1,302 @@
+
+/***************************************************************************
+ xsldbgevent.h - event to notify app of
+ data from xsldbg
+ -------------------
+ begin : Fri Feb 1 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGEVENT_H
+#define XSLDBGEVENT_H
+
+#if defined WIN32
+#include <libxsldbg/xsldbgwin32config.h>
+#endif
+
+#include <qevent.h>
+#include <qptrlist.h>
+
+#include "xsldbgmsg.h"
+
+/* how many columns do we have */
+#define XSLDBGEVENT_COLUMNS 4
+
+class XsldbgDebuggerBase;
+class XsldbgEventData;
+
+class XsldbgEventDataList : public QGList
+{
+public:
+ XsldbgEventDataList(void) {}
+ XsldbgEventDataList( const XsldbgEventDataList &l ) : QGList(l) {}
+ ~XsldbgEventDataList(void) { clear(); }
+ XsldbgEventDataList &operator=(const XsldbgEventDataList &l)
+ { return (XsldbgEventDataList&)QGList::operator=(l); }
+ bool operator==( const XsldbgEventDataList &list ) const
+ { return QGList::operator==( list ); }
+ uint count(void) const { return QGList::count(); }
+ bool isEmpty(void) const { return QGList::count() == 0; }
+ bool insert( uint i, const XsldbgEventData *d){ return QGList::insertAt(i,(QPtrCollection::Item)d); }
+ void inSort( const XsldbgEventData *d ) { QGList::inSort((QPtrCollection::Item)d); }
+ void prepend( const XsldbgEventData *d ) { QGList::insertAt(0,(QPtrCollection::Item)d); }
+ void append( const XsldbgEventData *d ) { QGList::append((QPtrCollection::Item)d); }
+ bool remove( uint i ) { return QGList::removeAt(i); }
+ bool remove(void) { return QGList::remove((QPtrCollection::Item)0); }
+ bool remove( const XsldbgEventData *d ) { return QGList::remove((QPtrCollection::Item)d); }
+ bool removeRef( const XsldbgEventData *d ) { return QGList::removeRef((QPtrCollection::Item)d); }
+ void removeNode( QLNode *n ) { QGList::removeNode(n); }
+ bool removeFirst(void) { return QGList::removeFirst(); }
+ bool removeLast(void) { return QGList::removeLast(); }
+ XsldbgEventData *take( uint i ) { return (XsldbgEventData *)QGList::takeAt(i); }
+ XsldbgEventData *take(void) { return (XsldbgEventData *)QGList::take(); }
+ XsldbgEventData *takeNode( QLNode *n ) { return (XsldbgEventData *)QGList::takeNode(n); }
+ void clear(void) { QGList::clear(); }
+ void sort(void) { QGList::sort(); }
+ int find( const XsldbgEventData *d ) { return QGList::find((QPtrCollection::Item)d); }
+ int findNext( const XsldbgEventData *d ) { return QGList::find((QPtrCollection::Item)d,FALSE); }
+ int findRef( const XsldbgEventData *d ) { return QGList::findRef((QPtrCollection::Item)d); }
+ int findNextRef( const XsldbgEventData *d ){ return QGList::findRef((QPtrCollection::Item)d,FALSE);}
+ uint contains( const XsldbgEventData *d ) const { return QGList::contains((QPtrCollection::Item)d); }
+ uint containsRef( const XsldbgEventData *d ) const
+ { return QGList::containsRef((QPtrCollection::Item)d); }
+ XsldbgEventData *at( uint i ) { return (XsldbgEventData *)QGList::at(i); }
+ int at(void) const { return QGList::at(); }
+ XsldbgEventData *current(void) const { return (XsldbgEventData *)QGList::get(); }
+ QLNode *currentNode(void) const { return QGList::currentNode(); }
+ XsldbgEventData *getFirst(void) const { return (XsldbgEventData *)QGList::cfirst(); }
+ XsldbgEventData *getLast(void) const { return (XsldbgEventData *)QGList::clast(); }
+ XsldbgEventData *first(void) { return (XsldbgEventData *)QGList::first(); }
+ XsldbgEventData *last(void) { return (XsldbgEventData *)QGList::last(); }
+ XsldbgEventData *next(void) { return (XsldbgEventData *)QGList::next(); }
+ XsldbgEventData *prev(void) { return (XsldbgEventData *)QGList::prev(); }
+ void toVector( QGVector *vec )const{ QGList::toVector(vec); }
+private:
+ void deleteItem( QPtrCollection::Item d );
+};
+
+
+
+
+
+
+/**
+ * This class is used to convert a message from xsldbg into a simple data type
+ *
+ * @short convertor of xsldbg message to a data class
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+class XsldbgEventData {
+
+ public:
+ XsldbgEventData(void);
+ ~XsldbgEventData(void);
+
+
+ /**
+ * Set the text for the column specified
+ *
+ * @param column 0 =< @p column < XSLDBGEVENT_COLUMNS
+ * @param text The text value to store in column indicated
+ */
+ void setText(int column, QString text);
+
+
+ /**
+ * Get the text from the column specified
+ *
+ * @returns QString::null if invalid column number
+ *
+ * @param column 0 =< @p column < XSLDBGEVENT_COLUMNS
+ *
+ */
+ QString getText(int column);
+
+
+ /**
+ * Set the integer value for the column specified
+ *
+ * @param column 0 =< @p column < XSLDBGEVENT_COLUMNS
+ * @param value The value to store in column indicated
+ */
+ void setInt(int column, int value);
+
+
+ /**
+ * Get the integer value from the column specified
+ *
+ * @returns -1 if invalid column number
+ *
+ * @param column 0 =< @p column < XSLDBGEVENT_COLUMNS
+ *
+ */
+ int getInt(int column);
+
+ private:
+ /** Below are the messages that this class will support
+ Values are mapped left to right ie the first QString value maps
+ to textValues[0], the second mapps to textValues[1]
+ the third maps to textValues[2] etc.. */
+ QString textValues[XSLDBGEVENT_COLUMNS];
+
+ /**
+ Both int and bool values are mapped to intValues in the same manner as
+ stated above */
+ int intValues[XSLDBGEVENT_COLUMNS];
+
+ /** - - - - - - The message/signal types supported - - - - - - */
+ // /** line number and/or file name changed */
+ // void lineNoChanged(QString /* fileName */, int /* lineNumber */, bool /* breakpoint */);
+ // These data items are mapped to attributes of this class with the same name
+
+
+ // /** Show a message in debugger window */
+ // void showMessage(QString /* msg*/);
+ // These data item is mapped to the text attribute
+
+
+ // /** Add breakpoint to view, First parameter is QString::null
+ // to indicate start of breakpoint list notfication */
+ // void breakpointItem(QString /* fileName*/, int /* lineNumber */, QString /*templateName*/,
+ // bool /* enabled */, int /* id */);
+ // These data items are mapped to attributes of this class with the same name
+
+
+ // /** Add global variable to view, First parameter is QString::null
+ // to indicate start of global variable list notfication */
+ // void globalVariableItem(QString /* name */, QString /* fileName */, int /* lineNumber */);
+ // These data items are mapped to attributes of this class with the same name
+
+
+ // /** Add local variable to view, First parameter is QString::null
+ // to indicate start of local variable list notfication */
+ // void localVariableItem(QString /*name */, QString /* templateContext*/,
+ // QString /* fileName */, int /*lineNumber */);
+ // These data items are mapped to attributes of this class with the same name
+
+
+ // /** Add template to view, First parameter is QString::null
+ // to indicate start of template list notfication */
+ // void templateItem(QString /* name*/, QString /*mode*/, QString /* fileName */, int /* lineNumber */);
+
+ // /** Add source to view, First parameter is QString::null
+ // to indicate start of source list notfication */
+ // void sourceItem(QString /* fileName */, QString /* parentFileName */, int /*lineNumber */);
+
+ // /** Add parameter to view, First parameter is QString::null
+ // to indicate start of parameter list notfication */
+ // void parameterItem(QString /* name*/, QString /* value */);
+
+ // /** Add callStack to view, First parameter is QString::null
+ // to indicate start of callstack list notfication */
+ // void callStackItem(QString /* tempalteName*/, QString /* fileName */, int /* lineNumber */);
+
+ // /** Add entity to view, First parameter is QString::null
+ // to indicate start of entity list notfication */
+ // void entityItem(QString /*SystemID*/, QString /*PublicID*/);
+
+ // /* Show the URI for SystemID or PublicID requested */
+ // void resolveItem(QString /*URI*/);
+
+ // /* Display a integer option value First parameter is QString::null
+ // to indicate start of option list notification */
+ // void intOptionItem(QString /* name*/, int /* value */);
+
+ // /* Display a string option value. First parameter is QString::null
+ // to indicate start of option list notification */
+ // void stringOptionItem(QString /* name*/, QString /* value */);
+
+};
+
+
+/**
+ * This class is posted to the applications event queue. When the application
+ * has time to process the event this class then aids in emitting
+ * the relavant signals for the event.
+ *
+ * @short Emit signals to QT application via debugger base class
+ *
+ * @author Keith Isdale <k_isdale@tpg.com.au>
+ */
+class XsldbgEvent : public QEvent {
+
+ public:
+ XsldbgEvent(XsldbgMessageEnum type, const void *data);
+ ~XsldbgEvent(void);
+
+ /** Main control for emitting messages, use this from the application
+ inside its event processing function */
+ void emitMessage(XsldbgDebuggerBase *debugger);
+
+ /** Emit a single message. It uses handleXXX to do the actual emitting
+ of signal from debugger */
+ void emitMessage(XsldbgEventData *eventData);
+
+ private:
+ /** Create the XsldbgEventData for this message. Is used by our constructor
+ it uses handleXXX function to fill in the approriate values in
+ the XsldbgEventData provided */
+ XsldbgEventData * createEventData(XsldbgMessageEnum type, const void *msgData);
+
+ /** The following functions are directly related to the eventual signals that
+ will be emitted ie the signal
+ lineNoChanged(QString, int bool)
+ is mapped to
+ handleLineNoChanged(XsldbgEventData *, void *)
+ */
+ void handleLineNoChanged(XsldbgEventData *eventData, const void *msgData);
+ void handleShowMessage(XsldbgEventData *eventData, const void *msgData);
+ void handleBreakpointItem(XsldbgEventData *eventData, const void *msgData);
+ void handleGlobalVariableItem(XsldbgEventData *eventData, const void *msgData);
+ void handleLocalVariableItem(XsldbgEventData *eventData, const void *msgData);
+ void handleTemplateItem(XsldbgEventData *eventData, const void *msgData);
+ void handleSourceItem(XsldbgEventData *eventData, const void *msgData);
+ void handleIncludedSourceItem(XsldbgEventData *eventData, const void *msgData);
+ void handleParameterItem(XsldbgEventData *eventData, const void *msgData);
+ void handleCallStackItem(XsldbgEventData *eventData, const void *msgData);
+ void handleEntityItem(XsldbgEventData *eventData, const void *msgData);
+ void handleResolveItem(XsldbgEventData *eventData, const void *msgData);
+ void handleIntOptionItem(XsldbgEventData *eventData, const void *msgData);
+ void handleStringOptionItem(XsldbgEventData *eventData, const void *msgData);
+
+
+ private:
+
+ /** What type is the items in list */
+ XsldbgMessageEnum itemType;
+
+ /** A flag that gets set once the list has been filled with approriate
+ XsldbgEventData */
+ bool beenCreated;
+
+ /** This is a volitile value that is only valid for the duration
+ of the constuctor. It will be set to 0L immediately after */
+ const void *data;
+
+ /** This is a volitile value only valid for duration of emitMessage
+ function. It will be set to 0L imedediately after */
+ XsldbgDebuggerBase *debugger;
+
+ /** This is the data associated with this event
+ each data item in the list will be of the type required
+ by the "type" this event
+ */
+ class XsldbgEventDataList list;
+ };
+
+
+
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgio.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgio.h
new file mode 100644
index 00000000..0e164f0e
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgio.h
@@ -0,0 +1,41 @@
+
+/***************************************************************************
+ xsldbgio.h - declare user input functions
+ -------------------
+ begin : Sun Dec 23 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGIO_H
+#define XSLDBGIO_H
+
+#ifndef BUILD_DOCS
+#include <libxml/tree.h> /* needed for definition of xmlChar */
+#endif
+
+/**
+ * xslShellReadline:
+ * @prompt: the prompt value
+ *
+ * Read a string
+ *
+ * Returns a copy of the text inputed or NULL if EOF in stdin found.
+ * The caller is expected to free the returned string.
+ */
+xmlChar *xslDbgShellReadline(xmlChar * prompt);
+
+
+#define DEBUG_BUFFER_SIZE 500 /*used by xslDbgShell */
+
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgmsg.cpp b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgmsg.cpp
new file mode 100644
index 00000000..9f95d353
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgmsg.cpp
@@ -0,0 +1,119 @@
+
+/***************************************************************************
+ xsldbg.cpp - send message to console or KXSLDbg
+ -------------------
+ begin : Mon April 26 2004
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+
+#include <libxslt/xsltutils.h>
+
+#ifdef HAVE_READLINE
+#include <readline/readline.h>
+#ifdef HAVE_HISTORY
+#include <readline/history.h>
+#endif
+#endif
+
+#include "xsldbgmsg.h"
+#include "xsldbgio.h"
+#include "options.h"
+
+static int (*notifyXsldbgAppFuncPtr) (XsldbgMessageEnum type, const void *data) = 0;
+
+static int (*notifyStateXsldbgAppFuncPtr)(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState,
+ const char *text) = 0;
+
+static int (*notifyTextXsldbgAppFuncPtr)(XsldbgMessageEnum type, const char *text) = 0;
+static xmlChar * (*xslDbgShellReadlineFuncPtr)(xmlChar * prompt) = 0;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void xsldbgSetAppFunc(int (*notifyXsldbgAppFunc) (XsldbgMessageEnum type, const void *data))
+{
+ notifyXsldbgAppFuncPtr = notifyXsldbgAppFunc;
+}
+
+void xsldbgSetAppStateFunc(int (*notifyStateXsldbgAppFunc)(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState,
+ const char *text))
+{
+ notifyStateXsldbgAppFuncPtr = notifyStateXsldbgAppFunc;
+}
+
+
+void xsldbgSetTextFunc(int (*notifyTextXsldbgAppFunc)(XsldbgMessageEnum type, const char *text))
+{
+ notifyTextXsldbgAppFuncPtr = notifyTextXsldbgAppFunc;
+}
+
+void xsldbgSetReadlineFunc(xmlChar * (*xslDbgShellReadlineFunc)(xmlChar * prompt))
+{
+ xslDbgShellReadlineFuncPtr = xslDbgShellReadlineFunc;
+}
+
+int notifyXsldbgApp(XsldbgMessageEnum type, const void *data)
+{
+ if (!notifyXsldbgAppFuncPtr)
+ return 1;
+ else
+ return (notifyXsldbgAppFuncPtr)(type, data);
+}
+
+int notifyStateXsldbgApp(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState, const char *text)
+{
+ if (!notifyStateXsldbgAppFuncPtr)
+ return 1;
+ else
+ return (notifyStateXsldbgApp)(type, commandId, commandState, text);
+}
+
+int notifyTextXsldbgApp(XsldbgMessageEnum type, const char *text)
+{
+ if (!notifyTextXsldbgAppFuncPtr)
+ return 1;
+ else
+ return (notifyTextXsldbgAppFuncPtr)(type, text);
+}
+
+
+/* use this function instead of the one that was in debugXSL.c */
+/**
+ * xslShellReadline:
+ * @prompt: the prompt value
+ *
+ * Read a string
+ *
+ * Returns a copy of the text inputed or NULL if EOF in stdin found.
+ * The caller is expected to free the returned string.
+ */
+xmlChar *
+xslDbgShellReadline(xmlChar * prompt)
+{
+
+ if (!xslDbgShellReadlineFuncPtr)
+ return 0;
+ else
+ return (xslDbgShellReadlineFuncPtr)(prompt);
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgmsg.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgmsg.h
new file mode 100644
index 00000000..12b16a3c
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgmsg.h
@@ -0,0 +1,210 @@
+
+/***************************************************************************
+ xsldbgmsg.h - description
+ -------------------
+ begin : Thu Dec 20 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGMSG_H
+#define XSLDBGMSG_H
+
+#ifdef WIN32
+# include <libxsldbg/xsldbgwin32config.h>
+#else
+# ifndef XSLDBG_SO_API
+# define XSLDBG_SO_API
+# endif
+#endif
+
+#ifndef BUILD_DOCS
+#include <libxml/tree.h> /* needed for the definition of xmlChar */
+#include "arraylist.h"
+#endif
+
+typedef enum {
+ /* thread status */
+ XSLDBG_MSG_THREAD_NOTUSED, /* 0: Thread are not to be used */
+ XSLDBG_MSG_THREAD_INIT, /* 1: The xsldbg thread is initializing */
+ XSLDBG_MSG_THREAD_RUN, /* 2: The xsldbg thread is running */
+ XSLDBG_MSG_THREAD_STOP, /* 3: The xsldbg thread is about to die */
+ XSLDBG_MSG_THREAD_DEAD, /* 4: The xsldbg thread died */
+
+ /* input status ( once thread is running) */
+ XSLDBG_MSG_AWAITING_INPUT, /* 5: Waiting for user input */
+ XSLDBG_MSG_READ_INPUT, /* 6: Read user input */
+ XSLDBG_MSG_PROCESSING_INPUT, /* 7: Processing user's request */
+
+ /* provide more informatiom about state of xsldbg (optional) */
+ XSLDBG_MSG_PROCESSING_RESULT, /* 8: An error occured performing command
+ * requested command */
+ XSLDBG_MSG_LINE_CHANGED, /* 9: Changed to new line number
+ * ie a step */
+ XSLDBG_MSG_FILE_CHANGED, /* 10: Loaded source/data file */
+ XSLDBG_MSG_BREAKPOINT_CHANGED, /* 11: Response to a showbreak command */
+ XSLDBG_MSG_PARAMETER_CHANGED, /* 12: Response to showparam command */
+ XSLDBG_MSG_TEXTOUT, /* 13 : Free form text from xsldg */
+ XSLDBG_MSG_FILEOUT, /* 14 : Response to cat commmand, ie
+ * Free form text in file */
+ XSLDBG_MSG_LOCALVAR_CHANGED, /* 15 : Response to locals command ie a
+ * local variable */
+ XSLDBG_MSG_GLOBALVAR_CHANGED, /* 16 : Response to globals command
+ * ie a global variable */
+ XSLDBG_MSG_TEMPLATE_CHANGED, /* 17 : Response to templates commmand
+ * ie template details */
+ XSLDBG_MSG_SOURCE_CHANGED, /* 18 : Response to stylesheets command,
+ * a normal stylesheet */
+ XSLDBG_MSG_INCLUDED_SOURCE_CHANGED, /* 19: Response to stylesheets
+ * command, a xmlNodeptr of
+ * a included stylesheet */
+ XSLDBG_MSG_CALLSTACK_CHANGED, /* 20: Response to where command,
+ * ie a item on the call stack */
+ XSLDBG_MSG_ENTITIY_CHANGED, /* 21: Response to entities
+ * command */
+ XSLDBG_MSG_RESOLVE_CHANGE, /* 22: Response to system or
+ * public command */
+ XSLDBG_MSG_LIST, /* 23 : As list of messages */
+
+ XSLDBG_MSG_INTOPTION_CHANGE, /* 23* Response to options command */
+ XSLDBG_MSG_STRINGOPTION_CHANGE, /* 24* Response to options command */
+ XSLDBG_MSG_ERROR_MESSAGE /* 25: Entercepted error message from libxml2 */
+} XsldbgMessageEnum;
+
+
+typedef enum {
+ XSLDBG_COMMAND_FAILED, /* generic error */
+ XSLDBG_COMMAND_WARNING,
+ XSLDBG_COMMAND_INFO,
+ XSLDBG_COMMAND_NOTUSED
+} XsldbgCommandStateEnum;
+
+
+
+/**
+ * Notify the application that something happened to the xsldbg thread
+ *
+ * @param type : A valid XsldbgMessageEnum
+ *
+ * @param data : The meaning of data can have a different meaning for each value of @type
+ *<pre>
+ * Value of @type Meaning of @data
+ * -------------------------- +++ ---------------------
+ * XSLDBG_MSG_THREAD_NOTUSED, not used
+ * XSLDBG_MSG_THREAD_INIT, not used
+ * XSLDBG_MSG_THREAD_RUN, not used
+ * XSLDBG_MSG_THREAD_STOP, not used
+ * XSLDBG_MSG_THREAD_DEAD, not used
+ * XSLDBG_MSG_AWAITING_INPUT, not used
+ * XSLDBG_MSG_READ_INPUT, A value of the char* for user input
+ * XSLDBG_MSG_PROCESSING_INPUT, not used
+ * XSLDBG_MSG_PROCESSING_RESULT, A value of type xsldbgErrorMsgPtr
+ * XSLDBG_MSG_LINE_CHANGED Is non-NULL if reached breakpoint
+ * otherwise just change in line number
+ * of displayed source/data
+ * XSLDBG_MSG_FILE_CHANGED, not used
+ * XSLDBG_MSG_BREAKPOINT_CHANGED A breakPointPtr of the breakpoint
+ * XSLDBG_MSG_PARAMETER_CHANGED A parameterItemPtr of libxslt pameter.
+ * XSLDBG_MSG_TEXTOUT A char * to buffer for text output
+ * XSLDBG_MSG_FILEOUT A FILE * for text to output
+ * XSLDBG_MSG_LOCALVAR_CHANGED, A local variable of type xsltStackElemPtr
+ * XSLDBG_MSG_GLOBALVAR_CHANGED, A global variable of type xsltStackElemPtr
+ * XSLDBG_MSG_TEMPLATE_CHANGED, A template of type xsltTemplatePtr
+ * XSLDBG_MSG_SOURCE_CHANGED, A xsltStylesheetPtr of a normal stylesheet
+ * XSLDBG_MSG_INCLUDED_SOURCE_CHANGED A xmlNodePtr of a included stylsheet
+ * XSLDBG_MSG_CALLSTACK_CHANGED A callPointPtr of a call stack item
+ * XSLDBG_MSG_ENTITIY_CHANGED A const entityInfoPtr
+ * for the included entity
+ * XSLDBG_MSG_RESOLVE_CHANGE A xmlChar* of URI that
+ * SystemID or PublicID resolves to
+ * XSLDBG_MSG_LIST A notifyMessageListPtr
+ *
+ * XSLDBG_MSG_INTOPTION_CHANGE A paramItemPtr, value is not used
+ * XSLDBG_MSG_STRINGOPTION_CHANGE A paramItemPtr, intValue is not used
+ * XSLDBG_MSG_ERROR_MESSAGE A xmlErrorPtr
+ *
+ *
+ * Legend :
+ * not used :- value may be NULL but must not be used
+ *
+ * All values are to treated as volitile and are only guaranteed
+ * to be valid for the life of the notification messages. ie make a
+ * NEW copy of value if needed for longer than that.
+ * Unless stated otherwise, if reponse can return a value and the value is
+ * NULL then that indicates the start of a list of values
+ *
+ *<pre>
+ * @returns 1 on sucess
+ * 0 otherwise
+*/
+
+typedef struct _xsldbgErrorMsg xsldbgErrorMsg;
+typedef xsldbgErrorMsg *xsldbgErrorMsgPtr;
+struct _xsldbgErrorMsg {
+ XsldbgMessageEnum type;
+ int commandId;
+ XsldbgCommandStateEnum commandState;
+ xmlChar *text;
+ xmlChar *messagefileName; /* used when send large chunks of data */
+};
+
+
+typedef struct _notifyMessageList notifyMessageList;
+typedef notifyMessageList *notifyMessageListPtr;
+struct _notifyMessageList {
+ XsldbgMessageEnum type;
+ arrayListPtr list;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void xsldbgSetAppFunc(int (*notifyXsldbgAppFunc) (XsldbgMessageEnum type, const void *data));
+
+void xsldbgSetAppStateFunc(int (*notifyStateXsldbgAppFunc)(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState,
+ const char *text));
+
+void xsldbgSetTextFunc(int (*notifyTextXsldbgAppFunc)(XsldbgMessageEnum type, const char *text));
+
+void xsldbgSetReadlineFunc(xmlChar * (*xslDbgShellReadlineFunc)(xmlChar * prompt));
+
+int notifyXsldbgApp(XsldbgMessageEnum type, const void *data);
+
+int notifyStateXsldbgApp(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState,
+ const char *text);
+
+int notifyTextXsldbgApp(XsldbgMessageEnum type, const char *text);
+
+xmlChar * xslDbgShellReadline(xmlChar * prompt);
+
+
+ /* The following functions implemented in xsldbgthread.c */
+ int notifyListStart(XsldbgMessageEnum type);
+
+ /* Data must be valid for until the next notifyListStart.
+ * Memory pointed to by @data will not be freed. Added @data items
+ * queued to list must be of the same data type as required by the
+ * XsldbgMessageEnum used with the matching notifyListSend */
+ int notifyListQueue(const void *data);
+
+ /* The notified application is responsible for free memory used
+ * by the ArrayList and notifyMessageList of notify message */
+ int notifyListSend(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgnotifier.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgnotifier.h
new file mode 100644
index 00000000..5c5aaeac
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgnotifier.h
@@ -0,0 +1,48 @@
+
+/***************************************************************************
+ xsldbgnotifier.h - description
+ -------------------
+ begin : Thu Dec 20 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGNOTIFIER_H
+#define XSLDBGNOTIFIER_H
+
+#include "xsldbgmsg.h"
+
+#ifndef __cplusplus
+#error "Must only be used with a c++ compiler"
+#endif
+
+
+
+/**
+ *@author keith
+ */
+
+class XsldbgNotifier {
+ public:
+ XsldbgNotifier(void);
+ virtual ~ XsldbgNotifier(void);
+
+ virtual void doNotify(XsldbgMessageEnum type, const void *data);
+};
+
+
+
+/* get the notifer */
+void setNotifier(XsldbgNotifier * notifier);
+
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgthread.cpp b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgthread.cpp
new file mode 100644
index 00000000..ecb94052
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgthread.cpp
@@ -0,0 +1,184 @@
+
+/***************************************************************************
+ xsldbgthread.c - basic thread support
+ -------------------
+ begin : Thu Dec 20 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbg.h"
+#include "breakpoint.h"
+#include "options.h"
+
+#include "xsldbgmsg.h"
+#include "xsldbgthread.h"
+
+static void (*cleanupFuncPtr)(void) = 0;
+static int threadStatus = XSLDBG_MSG_THREAD_NOTUSED;
+static int inputStatus = XSLDBG_MSG_AWAITING_INPUT;
+
+/* is xsldbg ready for input from the application */
+static int inputReady = 0;
+
+/* Is the application ready for a notification message */
+static int appReady = 0;
+
+static notifyMessageListPtr notifyList;
+
+arrayListPtr msgList = NULL;
+
+int
+getAppReady(void)
+{
+ return appReady;
+}
+
+void
+setAppReady(int ready)
+{
+ appReady = ready;
+}
+
+
+/* the compiler will optimize this function to inline and to keep variable private*/
+int
+getInputStatus(void)
+{
+ return inputStatus;
+}
+
+void
+setInputStatus(XsldbgMessageEnum type)
+{
+ switch (type) {
+ case XSLDBG_MSG_AWAITING_INPUT: /* Waiting for user input */
+ case XSLDBG_MSG_READ_INPUT: /* Read user input */
+ case XSLDBG_MSG_PROCESSING_INPUT: /* Processing user's request */
+ inputStatus = type;
+ break;
+
+ default:
+ printf("Invalid input status %d\n", type);
+ }
+}
+
+
+/* the compiler will optimize this function to inline and to keep variable private*/
+int
+getThreadStatus(void)
+{
+ return threadStatus;
+}
+
+/* reset the status to @p type */
+void
+setThreadStatus(XsldbgMessageEnum type)
+{
+ switch (type) {
+ case XSLDBG_MSG_THREAD_NOTUSED:
+ case XSLDBG_MSG_THREAD_INIT:
+ case XSLDBG_MSG_THREAD_RUN:
+ threadStatus = type;
+ break;
+
+ case XSLDBG_MSG_THREAD_STOP:
+ case XSLDBG_MSG_THREAD_DEAD:
+ xslDebugStatus = DEBUG_QUIT;
+ threadStatus = type;
+ break;
+
+ default:
+ printf("Invalid thread status %d\n", type);
+ }
+}
+
+
+/* Is input ready yet */
+int
+getInputReady(void)
+{
+ return inputReady;
+}
+
+/* set/clear flag that indicates if input is ready*/
+void
+setInputReady(int value)
+{
+ inputReady = value;
+}
+
+
+
+int
+notifyListStart(XsldbgMessageEnum type)
+{
+ int result = 0;
+
+ switch (type) {
+ case XSLDBG_MSG_INTOPTION_CHANGE:
+ case XSLDBG_MSG_STRINGOPTION_CHANGE:
+ msgList =
+ arrayListNew(10, (freeItemFunc) optionsParamItemFree);
+ break;
+
+ default:
+ msgList = arrayListNew(10, NULL);
+ }
+
+ notifyList =
+ (notifyMessageListPtr) xmlMalloc(sizeof(notifyMessageList));
+ if (notifyList && msgList) {
+ notifyList->type = type;
+ notifyList->list = msgList;
+ result = 1;
+ }
+
+ return result;
+}
+
+int
+notifyListQueue(const void *data)
+{
+ int result = 0;
+
+ if (msgList) {
+ arrayListAdd(msgList, (void *) data);
+ result = 1;
+ }
+ return result;
+}
+
+
+int
+notifyListSend(void)
+{
+ int result = 0;
+
+ if (notifyList && msgList) {
+ notifyXsldbgApp(XSLDBG_MSG_LIST, notifyList);
+ result = 1;
+ }
+ return result;
+}
+
+void xsldbgSetThreadCleanupFunc(void (*cleanupFunc)(void))
+{
+ cleanupFuncPtr = cleanupFunc;
+}
+
+void xsldbgThreadCleanup(void)
+{
+ if (cleanupFuncPtr != 0)
+ (cleanupFuncPtr)();
+}
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgthread.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgthread.h
new file mode 100644
index 00000000..d83e71f3
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgthread.h
@@ -0,0 +1,90 @@
+
+/***************************************************************************
+ xsldbgthread.h - description
+ -------------------
+ begin : Thu Dec 20 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGTHREAD_H
+#define XSLDBGTHREAD_H
+
+#if defined WIN32
+#include <libxsldbg/xsldbgwin32config.h>
+#endif
+
+
+#ifndef BUILD_DOCS
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+
+#include "xsldbgmsg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ int getAppReady(void);
+
+ void setAppReady(int ready);
+
+ int getInputStatus(void);
+
+ void setInputStatus(XsldbgMessageEnum type);
+
+ int getThreadStatus(void);
+
+ void setThreadStatus(XsldbgMessageEnum type);
+
+ void *xsldbgThreadMain(void *data);
+
+ int xsldbgMain(int argc, char **argv);
+
+ int xsldbgThreadInit(void);
+
+ void xsldbgThreadFree(void);
+
+ /* thread has died so cleanup after it */
+ void xsldbgThreadCleanup(void);
+ void xsldbgSetThreadCleanupFunc(void (*cleanupFunc)(void));
+
+ const char *getFakeInput(void);
+
+ int fakeInput(const char *text);
+
+ /* Is input ready yet */
+ int getInputReady(void);
+
+ /* set/clear flag that indicates if input is ready */
+ void setInputReady(int value);
+
+ xmlChar *xslDbgShellReadline(xmlChar * prompt);
+
+
+
+ /* This is implemented by xsldbg.c */
+
+/**
+ * xsldbgFree:
+ *
+ * Free memory used by xsldbg
+ */
+ void xsldbgFree(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp b/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp
new file mode 100644
index 00000000..69105338
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp
@@ -0,0 +1,162 @@
+/**
+ File : qxsldbgdoc.cpp
+ Author : Keith Isdale
+ Date : 19th April 2002
+ Description : The document to handle source and breakpoints
+ */
+
+#include "qxsldbgdoc.h"
+#include <ktexteditor/markinterface.h>
+#include <ktexteditor/editorchooser.h>
+#include <qfile.h>
+#include <qdir.h>
+#include <qtextstream.h>
+#include <qptrlist.h>
+
+
+QXsldbgDoc::QXsldbgDoc(QWidget *parent, KURL url)
+ : QObject(0L, "QXsldbgDoc"), kDoc(0L),kView(0L), locked(false)
+{
+ kDoc = KTextEditor::createDocument("libkatepart", 0L,"KTextEditor::Document");
+ connect(kDoc, SIGNAL(started(KIO::Job *)), this, SLOT(lockDoc()));
+ connect(kDoc, SIGNAL(completed()), this, SLOT(unlockDoc()));
+ if (kDoc){
+ kView = kDoc->createView(parent, "QXsldbgDocView");
+ KURL cleanUrl;
+ // convert paths relative to PWD into a absolute path
+ QString relUrl = url.prettyURL();
+ if (!relUrl.contains(":/")){
+ if (!(relUrl.left(1) == "/"))
+ relUrl.prepend(QDir::currentDirPath() + "/");
+ cleanUrl.setFileName(relUrl);
+ }else{
+ cleanUrl = url;
+ }
+ kDoc->openURL(cleanUrl);
+ }
+}
+
+
+QXsldbgDoc::~QXsldbgDoc()
+{
+ if (kDoc){
+ if (kDoc->views().count() == 1){
+ kDoc->closeURL(false);
+ delete kDoc;
+ }
+ }
+}
+
+void QXsldbgDoc::slotResult( KIO::Job *job )
+{
+ if ( job->error() != 0 ){
+ }else{
+ }
+ emit docChanged();
+}
+
+KURL QXsldbgDoc::url() const
+{
+ if (kDoc)
+ return kDoc->url();
+ else
+ return KURL();
+}
+
+void QXsldbgDoc::refresh()
+{
+ if (kDoc){
+ KURL lastUrl = kDoc->url();
+ kDoc->closeURL(false);
+ kDoc->openURL(lastUrl);
+ }
+}
+
+
+void QXsldbgDoc::enableBreakPoint(uint lineNumber, bool state)
+{
+ if (locked)
+ return;
+
+ KTextEditor::MarkInterface *markIf = KTextEditor::markInterface(kDoc);
+ if (markIf){
+ if (state){
+ markIf->setMark(lineNumber, KTextEditor::MarkInterface::BreakpointActive);
+ }else{
+ markIf->removeMark(lineNumber, KTextEditor::MarkInterface::BreakpointDisabled);
+ }
+ }
+}
+
+void QXsldbgDoc::addBreakPoint(uint lineNumber, bool enabled)
+{
+ if (locked)
+ return;
+
+ KTextEditor::MarkInterface *markIf = KTextEditor::markInterface(kDoc);
+ if (markIf){
+ if (enabled)
+ markIf->setMark(lineNumber, KTextEditor::MarkInterface::BreakpointActive);
+ else
+ markIf->setMark(lineNumber, KTextEditor::MarkInterface::BreakpointDisabled);
+ }
+}
+
+void QXsldbgDoc::deleteBreakPoint(uint lineNumber)
+{
+ if (locked)
+ return;
+
+ KTextEditor::MarkInterface *markIf = KTextEditor::markInterface(kDoc);
+ if (markIf)
+ markIf->clearMark(lineNumber);
+}
+
+
+void QXsldbgDoc::clearMarks(bool allMarkTypes)
+{
+ if (locked)
+ return;
+
+ KTextEditor::MarkInterface *markIf = KTextEditor::markInterface(kDoc);
+ if (markIf){
+ if (!allMarkTypes){
+ QPtrList<KTextEditor::Mark> marks = markIf->marks();
+ while ( marks.current()) {
+ markIf->removeMark(marks.current()->line, KTextEditor::MarkInterface::Execution);
+ markIf->removeMark(marks.current()->line, KTextEditor::MarkInterface::BreakpointReached);
+ marks.next();
+ }
+ }else {
+ markIf->clearMarks();
+ }
+ }
+
+}
+
+void QXsldbgDoc::selectBreakPoint(uint lineNumber, bool reachedBreakPoint)
+{
+ if (locked)
+ return;
+
+ clearMarks(false);
+ KTextEditor::MarkInterface *markIf = KTextEditor::markInterface(kDoc);
+ if (markIf){
+ if (reachedBreakPoint){
+ //markIf->setMark(lineNumber, KTextEditor::MarkInterface::BreakpointReached);
+ }else{
+ markIf->setMark(lineNumber, KTextEditor::MarkInterface::Execution);
+ }
+ }
+}
+
+void QXsldbgDoc::lockDoc()
+{
+ locked = true;
+}
+
+void QXsldbgDoc::unlockDoc()
+{
+ locked = false;
+}
+#include "qxsldbgdoc.moc"
diff --git a/kxsldbg/kxsldbgpart/qxsldbgdoc.h b/kxsldbg/kxsldbgpart/qxsldbgdoc.h
new file mode 100644
index 00000000..ec126aa6
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/qxsldbgdoc.h
@@ -0,0 +1,56 @@
+/**
+ File : qxsldbgdoc.h
+ Author : Keith Isdale
+ Date : 19th April 2002
+ Description : The document to handle source and breakpoints
+ */
+
+
+#ifndef QXSLDBGDOC_H
+#define QXSLDBGDOC_H
+
+#include <kio/job.h>
+#include <qptrlist.h>
+#include <qstring.h>
+#include <qguardedptr.h>
+#include <ktexteditor/document.h>
+#include <ktexteditor/view.h>
+
+class QXsldbgDoc : public QObject {
+
+Q_OBJECT
+
+ public:
+ QXsldbgDoc(QWidget *parent=0, KURL url=QString::null);
+ ~QXsldbgDoc();
+
+ void enableBreakPoint(uint lineNumber, bool state);
+ void addBreakPoint(uint lineNumber, bool enabled);
+ void deleteBreakPoint(uint lineNumber);
+ void selectBreakPoint(uint lineNumberbool, bool reachedBreakPoint);
+ bool isSelected(uint lineNumberbool);
+ void clearMarks(bool allMarkTypes);
+
+ KURL url() const;
+ KTextEditor::Document *kateDoc() {return kDoc;};
+ KTextEditor::View *kateView() {return kView;};
+
+
+ bool isLocked() {return locked;};
+ void refresh();
+
+signals:
+ void docChanged();
+
+private slots:
+ void slotResult( KIO::Job *job );
+ void lockDoc();
+ void unlockDoc();
+
+ private:
+ QGuardedPtr<KTextEditor::Document> kDoc;
+ QGuardedPtr<KTextEditor::View> kView;
+ bool locked;
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp b/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp
new file mode 100644
index 00000000..9e0c7130
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp
@@ -0,0 +1,46 @@
+/***************************************************************************
+ xsldbgbreakpointlistitem.cpp - description
+ -------------------
+ begin : Sun Jan 6 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <klocale.h>
+#include "xsldbgbreakpointlistitem.h"
+
+XsldbgBreakpointListItem::XsldbgBreakpointListItem(QListView *parent,
+ QString fileName, int lineNumber,
+ QString templateName, QString modeName,
+ bool enabled, int id)
+ : XsldbgListItem(parent, 3, fileName, lineNumber)
+{
+ this->id = id;
+ setText(0, QString::number(id));
+
+ this->templateName = templateName;
+ setText(1, templateName);
+
+ this->modeName = modeName;
+ setText(2, modeName);
+
+ __enabled = enabled;
+ if (enabled == true)
+ setText(5, i18n("Enabled"));
+ else
+ setText(5, i18n("Disabled"));
+}
+
+XsldbgBreakpointListItem::~XsldbgBreakpointListItem()
+{
+}
+
diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h b/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h
new file mode 100644
index 00000000..3c25395e
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h
@@ -0,0 +1,51 @@
+/***************************************************************************
+ xsldbgbreakpointlistitem.h - description
+ -------------------
+ begin : Sun Jan 6 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGBREAKPOINTLISTITEM_H
+#define XSLDBGBREAKPOINTLISTITEM_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbglistitem.h"
+
+class XsldbgBreakpointListItem : public XsldbgListItem {
+public:
+ XsldbgBreakpointListItem(QListView *parent,
+ QString fileName, int lineNumber,
+ QString templateName, QString modeName,
+ bool enabled, int id);
+ ~XsldbgBreakpointListItem();
+
+ /** returns true if this breakpoint is enabled */
+ bool getEnabled() {return __enabled; };
+
+ /** Returns the name of template for this breakpoiint */
+ QString getTemplateName() { return templateName;};
+ QString getModeName() {return modeName;};
+
+ /** Return the breakpoint's id */
+ int getId() { return id;};
+
+private:
+ QString templateName, modeName;
+ bool __enabled; /*make sure the name does not clash with QT */
+ int id;
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpoints.ui b/kxsldbg/kxsldbgpart/xsldbgbreakpoints.ui
new file mode 100644
index 00000000..a5af9c36
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgbreakpoints.ui
@@ -0,0 +1,582 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgBreakpoints</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>XsldbgBreakpoints</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>498</width>
+ <height>563</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Xsldbg Breakpoints</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QListView">
+ <column>
+ <property name="text">
+ <string>ID</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <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>Mode</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>Line Number</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Enabled</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>breakpointListView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Click breakpoint in list to modify or delete it</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <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>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout6</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">
+ <property name="name">
+ <cstring>idLabel</cstring>
+ </property>
+ <property name="text">
+ <string>ID:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>lineNumberLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Line number:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="3" column="1">
+ <property name="name">
+ <cstring>sourceFileEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>You don't need to specify directory for file name</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>templateNameEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Template name or match name to look for</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="1">
+ <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>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>lineNumberEdit</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>60</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Must be positive</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer10_2</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>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <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="QLineEdit">
+ <property name="name">
+ <cstring>idEdit</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>60</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Must be positive</string>
+ </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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>modeNameEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Mode:</string>
+ </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="3" column="0">
+ <property name="name">
+ <cstring>sourceFileLabel</cstring>
+ </property>
+ <property name="text">
+ <string>File name:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>81</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer7</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>
+ </hbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer8_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout18</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>deleteButton</cstring>
+ </property>
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete breakpoint using ID</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>PushButton5</cstring>
+ </property>
+ <property name="text">
+ <string>Clear</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Clear entered text</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>addAllButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add All</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Add breakpoint on all templates found</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>deleteAllButton</cstring>
+ </property>
+ <property name="text">
+ <string>Delete All</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Delete all breakpoints</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>enableButton</cstring>
+ </property>
+ <property name="text">
+ <string>Enable</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enable breakpoint using ID</string>
+ </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="toolTip" stdset="0">
+ <string>Add breakpoint using file name with line number or a template name</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer8_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <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>
+ <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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>refreshBtn</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>breakpointListView</sender>
+ <signal>selectionChanged(QListViewItem*)</signal>
+ <receiver>XsldbgBreakpoints</receiver>
+ <slot>selectionChanged(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>addButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgBreakpoints</receiver>
+ <slot>slotAddBreakpoint()</slot>
+ </connection>
+ <connection>
+ <sender>deleteButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgBreakpoints</receiver>
+ <slot>slotDeleteBreakpoint()</slot>
+ </connection>
+ <connection>
+ <sender>enableButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgBreakpoints</receiver>
+ <slot>slotEnableBreakpoint()</slot>
+ </connection>
+ <connection>
+ <sender>refreshBtn</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgBreakpoints</receiver>
+ <slot>refresh()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton5</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgBreakpoints</receiver>
+ <slot>slotClear()</slot>
+ </connection>
+ <connection>
+ <sender>addAllButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgBreakpoints</receiver>
+ <slot>slotAddAllTemplateBreakpoints()</slot>
+ </connection>
+ <connection>
+ <sender>deleteAllButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgBreakpoints</receiver>
+ <slot>slotDeleteAllBreakpoints()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>breakpointListView</tabstop>
+ <tabstop>idEdit</tabstop>
+ <tabstop>sourceFileEdit</tabstop>
+ <tabstop>lineNumberEdit</tabstop>
+ <tabstop>addButton</tabstop>
+ <tabstop>deleteButton</tabstop>
+ <tabstop>enableButton</tabstop>
+</tabstops>
+<slots>
+ <slot>slotClear()</slot>
+ <slot>refresh()</slot>
+ <slot>selectionChanged(QListViewItem*)</slot>
+ <slot>slotAddBreakpoint()</slot>
+ <slot>slotDeleteBreakpoint()</slot>
+ <slot>slotEnableBreakpoint()</slot>
+ <slot>slotAddAllTemplateBreakpoints()</slot>
+ <slot>slotDeleteAllBreakpoints()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp
new file mode 100644
index 00000000..81e83142
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp
@@ -0,0 +1,202 @@
+/***************************************************************************
+ xsldbgbreakpointsimpl.cpp - description
+ -------------------
+ begin : Fri Jan 4 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <klocale.h>
+#include <qlistview.h>
+#include <qlineedit.h>
+#include <qmessagebox.h>
+#include "xsldbgdebugger.h"
+#include "xsldbgbreakpointsimpl.h"
+#include "xsldbgbreakpointlistitem.h"
+#include <kdebug.h>
+
+
+XsldbgBreakpointsImpl::XsldbgBreakpointsImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0*/, const char *name /*=0*/)
+ : XsldbgBreakpoints(parent, name), XsldbgDialogBase()
+{
+ this->debugger = debugger;
+ connect(debugger, SIGNAL(breakpointItem(QString /* file*/,
+ int /*line number */, QString /*templateName*/,
+ QString /* modeName*/,
+ bool /* enabled */, int /* id */)),
+ this, SLOT(slotProcBreakpointItem(QString /* file*/,
+ int /*line number */, QString /*templateName*/,
+ QString /* modeName */,
+ bool /* enabled */, int /* id */)));
+ connect( breakpointListView, SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(selectionChanged(QListViewItem*)));
+ show();
+ refresh();
+}
+
+XsldbgBreakpointsImpl::~XsldbgBreakpointsImpl()
+{
+ debugger = 0L;
+}
+
+int XsldbgBreakpointsImpl::getLineNumber()
+{
+ bool isOk = false;
+ int lineNo = lineNumberEdit->text().toInt(&isOk);
+ if (isOk == false){
+ lineNo = -1;
+ kdDebug() << "Invalid line number" << endl;
+ }
+
+ return lineNo;
+}
+
+int XsldbgBreakpointsImpl::getId()
+{
+ bool isOk = false;
+ int id = idEdit->text().toInt(&isOk);
+ if (isOk == false){
+ id = -1;
+ kdDebug() << "Invalid line number" << endl;
+ }
+
+ return id;
+}
+
+void XsldbgBreakpointsImpl::slotAddBreakpoint()
+{
+ int lineNo = getLineNumber();
+ if (lineNo != -1) {
+ if (!sourceFileEdit->text().isEmpty()){
+ debugger->slotBreakCmd(sourceFileEdit->text(), lineNo);
+ }else {
+ QMessageBox::information(this, i18n("Operation Failed"),
+ i18n("A line number was provided without a file name."),
+ QMessageBox::Ok);
+ }
+ }else if (!templateNameEdit->text().isEmpty() ||
+ !modeNameEdit->text().isEmpty()){
+ debugger->slotBreakCmd(templateNameEdit->text(),
+ modeNameEdit->text());
+ }else{
+ QMessageBox::information(this, i18n("Operation Failed"),
+ i18n("No details provided or an invalid line number was supplied."),
+ QMessageBox::Ok);
+ }
+}
+
+void XsldbgBreakpointsImpl::slotAddAllTemplateBreakpoints()
+{
+ if (debugger != 0L){
+ debugger->fakeInput("break *", true);
+ debugger->fakeInput("show", true);
+ }
+}
+
+void XsldbgBreakpointsImpl::slotDeleteBreakpoint()
+{
+ int lineNo = getLineNumber(), id = getId();
+ if (id != -1){
+ debugger->slotDeleteCmd(id);
+ }else if (lineNo != -1) {
+ if (!sourceFileEdit->text().isEmpty()){
+ debugger->slotDeleteCmd(sourceFileEdit->text(), lineNo);
+ }else {
+ QMessageBox::information(this, i18n("Operation Failed"),
+ i18n("A line number was provided without a file name."),
+ QMessageBox::Ok);
+ }
+ }else {
+ QMessageBox::information(this, i18n("Operation Failed"),
+ i18n("No details provided or an invalid line or ID was supplied."),
+ QMessageBox::Ok);
+ }
+}
+
+void XsldbgBreakpointsImpl::slotDeleteAllBreakpoints()
+{
+ if (debugger != 0L){
+ debugger->fakeInput("delete *", true);
+ debugger->fakeInput("show", true);
+ }
+}
+
+void XsldbgBreakpointsImpl::slotEnableBreakpoint()
+{
+ int lineNo = getLineNumber(), id = getId();
+ if (id != -1){
+ debugger->slotEnableCmd(id);
+ }else if (lineNo != -1){
+ if (!sourceFileEdit->text().isEmpty()){
+ debugger->slotEnableCmd(sourceFileEdit->text(), lineNo);
+ }else {
+ QMessageBox::information(this, i18n("Operation Failed"),
+ i18n("A line number was provided without a file name."),
+ QMessageBox::Ok);
+ }
+ }else {
+ QMessageBox::information(this, i18n("Operation Failed"),
+ i18n("No details provided."),
+ QMessageBox::Ok);
+ }
+}
+
+void XsldbgBreakpointsImpl::selectionChanged(QListViewItem *item)
+{
+ XsldbgBreakpointListItem *breakItem =
+ dynamic_cast<XsldbgBreakpointListItem*>(item);
+ if (breakItem){
+ idEdit->setText(QString::number(breakItem->getId()));
+ templateNameEdit->setText(breakItem->getTemplateName());
+ modeNameEdit->setText(breakItem->getModeName());
+ sourceFileEdit->setText(breakItem->getFileName());
+ lineNumberEdit->setText(QString::number(breakItem->getLineNumber())); }
+}
+
+
+void XsldbgBreakpointsImpl::refresh()
+{
+ /* get xsldbg to tell what breakpoints are set,
+ we'll get the notification back via slotProcBreakpointItem */
+ debugger->fakeInput("showbreak", true);
+}
+
+
+void XsldbgBreakpointsImpl::slotClear()
+{
+ idEdit->setText("");
+ templateNameEdit->setText("");
+ modeNameEdit->setText("");
+ sourceFileEdit->setText("");
+ lineNumberEdit->setText("");
+}
+
+void XsldbgBreakpointsImpl::slotProcBreakpointItem(QString fileName,
+ int lineNumber ,
+ QString templateName,
+ QString modeName,
+ bool enabled, int id )
+{
+ if (fileName.isNull())
+ breakpointListView->clear();
+ else{
+ breakpointListView->insertItem(
+ new XsldbgBreakpointListItem(breakpointListView,
+ fileName, lineNumber,templateName, modeName, enabled, id));
+ }
+}
+
+
+
+
+#include "xsldbgbreakpointsimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h b/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h
new file mode 100644
index 00000000..2dad57ca
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h
@@ -0,0 +1,71 @@
+/***************************************************************************
+ xsldbgbreakpointsimpl.h - description
+ -------------------
+ begin : Fri Jan 4 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGBREAKPOINTSIMPL_H
+#define XSLDBGBREAKPOINTSIMPL_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbgbreakpoints.h"
+#include "xsldbgdialogbase.h"
+
+class XsldbgDebugger;
+
+
+class XsldbgBreakpointsImpl : public XsldbgBreakpoints, public XsldbgDialogBase {
+ Q_OBJECT
+
+public:
+ XsldbgBreakpointsImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgBreakpointsImpl();
+
+ /* Return >= 0 if line number entered is valid */
+ int getLineNumber();
+
+ /* Return >= 0 if breakpoint id entered is valid */
+ int getId();
+
+
+public slots:
+
+ void slotAddBreakpoint();
+ void slotAddAllTemplateBreakpoints();
+ void slotDeleteBreakpoint();
+ void slotDeleteAllBreakpoints();
+ void slotEnableBreakpoint();
+ void selectionChanged(QListViewItem *item);
+
+ /** Recieve notification about breakpoint to add to view, First parameter is QString::null
+ to indicate start of breakpoint list notfication */
+ void slotProcBreakpointItem(QString file, int lineNumber,
+ QString templateName, QString modeName,
+ bool enabled, int id );
+
+ /** refresh data from source */
+ void refresh();
+
+ /**Clear data from all fields */
+ void slotClear();
+
+private:
+ XsldbgDebugger *debugger;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgcallstack.ui b/kxsldbg/kxsldbgpart/xsldbgcallstack.ui
new file mode 100644
index 00000000..6203e764
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgcallstack.ui
@@ -0,0 +1,157 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgCallStack</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>XsldbgCallStack</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>520</width>
+ <height>391</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Xsldbg Callstack</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="0">
+ <column>
+ <property name="text">
+ <string>Frame# Template Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Source File Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Line Number</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>callStackListView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Oldest Frame # is 0, Frame # has been added to the first column</string>
+ </property>
+ </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>Spacer4</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>refreshBtn</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>callStackListView</sender>
+ <signal>selectionChanged(QListViewItem*)</signal>
+ <receiver>XsldbgCallStack</receiver>
+ <slot>selectionChanged(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>refreshBtn</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgCallStack</receiver>
+ <slot>refresh()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>refresh()</slot>
+ <slot>selectionChanged(QListViewItem*)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp
new file mode 100644
index 00000000..5592e4e6
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp
@@ -0,0 +1,71 @@
+/***************************************************************************
+ xsldbgcallstackimpl.cpp - description
+ -------------------
+ begin : Wed Jan 16 2002
+ copyright : (C) 2002 by Keith lsdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qlistview.h>
+#include <qlineedit.h>
+
+#include "xsldbgdebugger.h"
+#include "xsldbgcallstackimpl.h"
+#include "xsldbggloballistitem.h" /* reuse global list item variable as a template list item */
+
+XsldbgCallStackImpl::XsldbgCallStackImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0*/, const char *name /*=0*/)
+ : XsldbgCallStack(parent, name), XsldbgDialogBase()
+{
+ this->debugger = debugger;
+
+ connect(debugger, SIGNAL(callStackItem(QString /* templateName*/, QString /* fileName */, int /* lineNumber */)),
+ this, SLOT(slotProcCallStackItem(QString /* templateName*/, QString /* fileName */, int /* lineNumber */)));
+ connect( callStackListView, SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(selectionChanged(QListViewItem*)));
+
+ show();
+ refresh();
+}
+
+XsldbgCallStackImpl::~XsldbgCallStackImpl(){
+ debugger = 0L;
+}
+
+void XsldbgCallStackImpl::slotProcCallStackItem(QString templateName, QString fileName , int lineNumber )
+{
+ static int frameNo =0;
+ if (templateName.isNull()){
+ callStackListView->clear();
+ frameNo = 0;
+ }else{
+ /* each stack entry will have a FRAME# prefix */
+ callStackListView->insertItem(new XsldbgGlobalListItem(callStackListView,
+ fileName, lineNumber, templateName.prepend(QString::number(frameNo++)+ "# ")));
+ }
+}
+
+
+void XsldbgCallStackImpl::selectionChanged(QListViewItem *item)
+{
+ XsldbgGlobalListItem *callStackItem = dynamic_cast<XsldbgGlobalListItem*>(item);
+ if (callStackItem){
+ debugger->gotoLine(callStackItem->getFileName(), callStackItem->getLineNumber());
+ }
+}
+
+void XsldbgCallStackImpl::refresh()
+{
+ debugger->fakeInput("where", true) ;
+}
+
+
+#include "xsldbgcallstackimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h b/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h
new file mode 100644
index 00000000..61200fe8
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ xsldbgcallstackimpl.h - description
+ -------------------
+ begin : Wed Jan 16 2002
+ copyright : (C) 2002 by Keith lsdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGCALLSTACKIMPL_H
+#define XSLDBGCALLSTACKIMPL_H
+
+/**
+ *@author Keith lsdale
+ */
+
+#include "xsldbgcallstack.h"
+#include "xsldbgdialogbase.h"
+
+class XsldbgDebugger;
+
+class XsldbgCallStackImpl : public XsldbgCallStack, public XsldbgDialogBase {
+ Q_OBJECT
+
+public:
+ XsldbgCallStackImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgCallStackImpl();
+
+public slots:
+ void selectionChanged(QListViewItem *item);
+
+ /** Process request to add callstack to view, First parameter is QString::null
+ to indicate start of callstack list notfication */
+ void slotProcCallStackItem(QString templateName, QString fileName , int lineNumber );
+
+ /** refresh data from source */
+ void refresh();
+
+
+private:
+ XsldbgDebugger *debugger;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgconfig.ui b/kxsldbg/kxsldbgpart/xsldbgconfig.ui
new file mode 100644
index 00000000..660d9890
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgconfig.ui
@@ -0,0 +1,817 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgConfig</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>XsldbgConfig</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>501</width>
+ <height>542</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>300</width>
+ <height>450</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>KXsldbg Configuration</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="3" column="0">
+ <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>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="4" column="0">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>LibXSLT Parameters</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout12</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout10_2</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>paramValueLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Parameter value:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>parameterValueEdit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxLength">
+ <number>100</number>
+ </property>
+ </widget>
+ </hbox>
+ </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="QLabel">
+ <property name="name">
+ <cstring>paramNameLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Parameter name:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>parameterNameEdit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxLength">
+ <number>100</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget">
+ <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>
+ <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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <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="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>prevButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Prev</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>deleteButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>nextButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Next</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>addButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </grid>
+ </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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="5" column="0">
+ <property name="name">
+ <cstring>Spacer61</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="QLayoutWidget" row="6" column="0">
+ <property name="name">
+ <cstring>Layout18</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>Spacer23</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>PushButton13</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>110</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Apply</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>PushButton14</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>110</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer24</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>
+ </hbox>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>Spacer12_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="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout11</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="4" 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="QLabel">
+ <property name="name">
+ <cstring>outputFileLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Output file:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>outputFileEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>outputFileButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" 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="QLabel">
+ <property name="name">
+ <cstring>xmlSourceLabel</cstring>
+ </property>
+ <property name="text">
+ <string>XML data:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>xmlDataEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>xmlDataButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" 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>xslSourceLabel</cstring>
+ </property>
+ <property name="text">
+ <string>XSL source:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>xslSourceEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>xslSourceButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="2" column="0">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Options</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="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>catalogsChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>catalogs</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>use catalogs from $SGML_CATALOGS_FILES</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="2">
+ <property name="name">
+ <cstring>novalidChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>novalid</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>skip the DTD loading phase</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="1">
+ <property name="name">
+ <cstring>htmlChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>html</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>the input document is(are) an HTML file(s)</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="2">
+ <property name="name">
+ <cstring>docbookChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>docbook</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>the input document is SGML docbook</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>debugChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>debug</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>dump the tree of the result instead</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>nooutChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>noout</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>do not dump the result</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="1">
+ <property name="name">
+ <cstring>profileChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>profile</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>print profiling information</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="2">
+ <property name="name">
+ <cstring>timingChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>timing</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>display the time used</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="1">
+ <property name="name">
+ <cstring>nonetChkBox</cstring>
+ </property>
+ <property name="text">
+ <string>nonet</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>refuse to fetch DTDs or entities over network</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>xslSourceButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotChooseSourceFile()</slot>
+ </connection>
+ <connection>
+ <sender>xmlDataButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotChooseDataFile()</slot>
+ </connection>
+ <connection>
+ <sender>outputFileButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotChooseOutputFile()</slot>
+ </connection>
+ <connection>
+ <sender>addButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotAddParam()</slot>
+ </connection>
+ <connection>
+ <sender>deleteButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotDeleteParam()</slot>
+ </connection>
+ <connection>
+ <sender>nextButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotNextParam()</slot>
+ </connection>
+ <connection>
+ <sender>prevButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotPrevParam()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton13</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotApply()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton14</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgConfig</receiver>
+ <slot>slotCancel()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>parameterNameEdit</tabstop>
+ <tabstop>parameterValueEdit</tabstop>
+ <tabstop>addButton</tabstop>
+ <tabstop>deleteButton</tabstop>
+ <tabstop>prevButton</tabstop>
+ <tabstop>nextButton</tabstop>
+ <tabstop>PushButton13</tabstop>
+ <tabstop>PushButton14</tabstop>
+ <tabstop>xslSourceButton</tabstop>
+ <tabstop>xmlDataButton</tabstop>
+ <tabstop>outputFileButton</tabstop>
+ <tabstop>catalogsChkBox</tabstop>
+ <tabstop>debugChkBox</tabstop>
+ <tabstop>nooutChkBox</tabstop>
+ <tabstop>htmlChkBox</tabstop>
+ <tabstop>nonetChkBox</tabstop>
+ <tabstop>profileChkBox</tabstop>
+ <tabstop>docbookChkBox</tabstop>
+ <tabstop>novalidChkBox</tabstop>
+ <tabstop>timingChkBox</tabstop>
+ <tabstop>outputFileEdit</tabstop>
+ <tabstop>xmlDataEdit</tabstop>
+ <tabstop>xslSourceEdit</tabstop>
+</tabstops>
+<slots>
+ <slot>slotCancel()</slot>
+ <slot>slotAddParam()</slot>
+ <slot>slotApply()</slot>
+ <slot>slotChooseDataFile()</slot>
+ <slot>slotChooseOutputFile()</slot>
+ <slot>slotChooseSourceFile()</slot>
+ <slot>slotDatafile(QString)</slot>
+ <slot>slotDeleteParam()</slot>
+ <slot>slotNextParam()</slot>
+ <slot>slotPrevParam()</slot>
+ <slot>slotSourcefile(QString)</slot>
+ <slot>slotoutputfile(QString)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp
new file mode 100644
index 00000000..dd62b1ec
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp
@@ -0,0 +1,499 @@
+/***************************************************************************
+ xsldbgconfigimpl.cpp - description
+ -------------------
+ begin : Fri Jan 4 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <klocale.h>
+#include <kfiledialog.h>
+
+#include <qdialog.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include <qmessagebox.h>
+
+#include "xsldbgconfigimpl.h"
+#include "xsldbgdebugger.h"
+#include <kdebug.h>
+
+LibxsltParam::LibxsltParam(const QString &name, const QString &value)
+ : QObject(0L, 0L)
+{
+ _name = name;
+ _value = value;
+}
+
+
+LibxsltParam::~LibxsltParam()
+{
+}
+
+
+QString LibxsltParam::getName() const
+{
+ return _name;
+}
+
+void LibxsltParam::setName(const QString &name)
+{
+ _name = name;
+}
+
+
+QString LibxsltParam::getValue() const
+{
+ return _value;
+}
+
+
+void LibxsltParam::setValue(const QString & value)
+{
+ _value = value;
+}
+
+
+bool LibxsltParam::isValid() const
+{
+ bool result = true;
+ if ((_name.length() > 0) && ( _value.length() == 0))
+ result = false;
+
+ return result;
+}
+
+
+XsldbgConfigImpl::XsldbgConfigImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0*/, const char *name /*=0*/)
+ : XsldbgConfig(parent, name)
+{
+ this->debugger = debugger;
+ connect(debugger, SIGNAL(parameterItem(QString /* name*/, QString /* value */)),
+ this, SLOT(slotProcParameterItem(QString /* name*/, QString /* value */)));
+ connect(debugger, SIGNAL(fileDetailsChanged()),
+ this, SLOT(slotReloadFileNames()));
+ paramIndex= 0;
+ catalogs = false;
+ debug = false;
+ html = false;
+ nonet = false;
+ docbook = false;
+}
+
+XsldbgConfigImpl::~XsldbgConfigImpl()
+{
+ debugger = 0L;
+}
+
+
+QString XsldbgConfigImpl::getSourceFile()
+{
+ if (xslSourceEdit != 0L)
+ return xslSourceEdit->text();
+ else
+ return QString();
+}
+
+
+QString XsldbgConfigImpl::getDataFile()
+{
+ if (xmlDataEdit != 0L)
+ return xmlDataEdit->text();
+ else
+ return QString();
+}
+
+
+QString XsldbgConfigImpl::getOutputFile()
+{
+ if (outputFileEdit != 0L)
+ return outputFileEdit->text();
+ else
+ return QString();
+}
+
+
+LibxsltParam *XsldbgConfigImpl::getParam(int paramNumber)
+{
+ return paramList.at(paramNumber);
+}
+
+LibxsltParam *XsldbgConfigImpl::getParam(QString name)
+{
+ LibxsltParam *param = 0L;
+ for (param = paramList.first(); param != 0L; param = paramList.next())
+ {
+ if (param->getName() == name)
+ break;
+ }
+
+ return param;
+}
+
+
+int XsldbgConfigImpl::getParamCount()
+{
+ return paramList.count();
+}
+
+
+void XsldbgConfigImpl::addParam(QString name, QString value)
+{
+ LibxsltParam *param;
+ if ((name.length() == 0) || (value.length() == 0))
+ return;
+
+ param = getParam(name);
+ if (param == 0L)
+ {
+ param = new LibxsltParam(name, value);
+ if (param != 0L)
+ paramList.append(param);
+
+ }else
+ param->setValue(value);
+}
+
+
+void XsldbgConfigImpl::deleteParam(QString name)
+{
+ bool isOk = false;
+ LibxsltParam *param;
+ if (name.length() == 0)
+ return;
+
+ param = getParam(name);
+ if (param != 0L)
+ isOk = paramList.remove(param);
+
+ if (isOk == false)
+ kdDebug() << QString(" Param %1 dosn't exist").arg(name) << endl;
+ else
+ kdDebug() << "Deleted param " << name << endl;
+}
+
+
+bool XsldbgConfigImpl::isValid(QString &errorMsg)
+{
+ bool isOK = true;
+ errorMsg = "";
+ if (xslSourceEdit->text().isEmpty())
+ errorMsg.append( i18n("\t\"XSL source\" \n"));
+ if (xmlDataEdit->text().isEmpty())
+ errorMsg.append(i18n("\t\"XML data\" \n"));
+ if (outputFileEdit->text().isEmpty())
+ errorMsg.append(i18n("\t\"Output file\" \n"));
+ if (!errorMsg.isEmpty()){
+ errorMsg.prepend(i18n("Missing values for \n"));
+ isOK = false;
+ }else if (( xslSourceEdit->text() == outputFileEdit->text()) ||
+ (xmlDataEdit->text() == outputFileEdit->text())){
+ errorMsg.append(i18n("Output file is the same as either XSL Source or "
+ "XML Data file\n"));
+ isOK = false;
+ }
+
+ // make it a warning when parameters are invalid
+ LibxsltParam *param;
+ QString emptyParams = "";
+ for (param = paramList.first(); param != 0L; param = paramList.next())
+ {
+ if (!param->isValid()){
+ if (emptyParams.isEmpty())
+ emptyParams = param->getName();
+ else
+ emptyParams.append(", "). append(param->getName());
+ }
+ }
+
+ if (!emptyParams.isEmpty()){
+ errorMsg.append(i18n("The following libxslt parameters are empty\n\t"));
+ errorMsg.append(emptyParams);
+ }
+
+ return isOK;
+}
+
+
+/*we previously said that isValid() == true so we must commit our changes */
+void XsldbgConfigImpl::update()
+{
+ QString msg;
+ if (debugger == 0L)
+ return;
+
+ /* update source, data, output file name if needed */
+ slotSourceFile(xslSourceEdit->text());
+ slotDataFile(xmlDataEdit->text());
+ slotOutputFile(outputFileEdit->text());
+
+ /* ensure entered param are updated */
+ slotAddParam();
+
+ if (debugger->start() == false)
+ return ; /* User has killed xsldbg and we can't restart it */
+
+ /* always update the libxslt parameters */
+ debugger->fakeInput("delparam", true);
+
+
+
+ LibxsltParam *param;
+ for (param = paramList.first(); param != 0L; param = paramList.next())
+ {
+ if (debugger->start() == false)
+ return ; /* User has killed xsldbg and we can't restart it */
+ if (param->isValid()){
+ msg = "addparam ";
+ msg.append(param->getName()).append(" ").append(param->getValue());
+ debugger->fakeInput(msg, true);
+ }
+ }
+
+ /* now set the xsldbg options*/
+ if (catalogsChkBox->isChecked() != catalogs){
+ catalogs = catalogsChkBox->isChecked();
+ debugger->setOption("catalogs", catalogs);
+ }
+ if (debugChkBox->isChecked() != debug){
+ debug= debugChkBox->isChecked();
+ debugger->setOption("debug", debug);
+ }
+ if (htmlChkBox->isChecked() != html){
+ html = htmlChkBox->isChecked();
+ debugger->setOption("html", html);
+ }
+ if (docbookChkBox->isChecked() != docbook){
+ docbook = docbookChkBox->isChecked();
+ debugger->setOption("docbook", docbook);
+ }
+ if (nonetChkBox->isChecked() != nonet){
+ nonet = nonetChkBox->isChecked();
+ debugger->setOption("nonet", nonet);
+ }
+ if (novalidChkBox->isChecked() != novalid){
+ novalid = novalidChkBox->isChecked();
+ debugger->setOption("novalid", novalid);
+ }
+ if (nooutChkBox->isChecked() != noout){
+ noout = nooutChkBox->isChecked();
+ debugger->setOption("noout", noout);
+ }
+ if (timingChkBox->isChecked() != timing){
+ timing = timingChkBox->isChecked();
+ debugger->setOption("timing", timing);
+ }
+ if (profileChkBox->isChecked() != profile){
+ profile = profileChkBox->isChecked();
+ debugger->setOption("profile", profile);
+ }
+
+ debugger->setOption("preferhtml", true);
+ debugger->setOption("utf8input", true);
+ debugger->slotRunCmd();
+ hide();
+}
+
+
+void XsldbgConfigImpl::refresh()
+{
+ paramIndex = 0;
+ repaintParam();
+ xslSourceEdit->setText(debugger->sourceFileName());
+ xmlDataEdit->setText(debugger->dataFileName());
+ outputFileEdit->setText(debugger->outputFileName());
+ /*
+ if (debugger->start() == false)
+ return ;
+
+ qDebug("XsldbgConfigImpl::refresh");
+ */
+ /* we'll get the list of parameters via paramItem(..) in this class */
+ /* debugger->fakeInput("showparam", true);
+ */
+
+}
+
+
+void XsldbgConfigImpl::slotSourceFile(QString xslFile)
+{
+ if (debugger->start() == false)
+ return ; /* User has killed xsldbg and we can't restart it */
+
+ if (debugger->sourceFileName() == xslFile)
+ return;
+
+ QString msg("source ");
+ msg.append(XsldbgDebugger::fixLocalPaths(xslFile));
+ debugger->fakeInput(msg, true);
+}
+
+void XsldbgConfigImpl::slotDataFile(QString xmlFile)
+{
+ if (debugger->start() == false)
+ return ; /* User has killed xsldbg and we can't restart it */
+
+ if (debugger->dataFileName() == xmlFile)
+ return;
+
+ QString msg("data ");
+ msg.append(XsldbgDebugger::fixLocalPaths(xmlFile));
+ debugger->fakeInput(msg, true);
+}
+
+void XsldbgConfigImpl::slotOutputFile(QString outputFile)
+{
+ if (debugger->start() == false)
+ return ; /* User has killed xsldbg and we can't restart it */
+
+ if (debugger->outputFileName() == outputFile)
+ return;
+
+ QString msg("output ");
+ msg.append(XsldbgDebugger::fixLocalPaths(outputFile));
+ debugger->fakeInput(msg, true);
+}
+
+void XsldbgConfigImpl::slotChooseSourceFile()
+{
+ KURL url = KFileDialog::getOpenURL(QString::null, "*.xsl; *.XSL; *.Xsl ; *.xslt; *.XSLT; *.Xslt \n *.*", this,
+ i18n("Choose XSL Source to Debug"));
+ QString fileName = url.prettyURL();
+
+ if ((!fileName.isNull()) && (fileName.length() > 0)){
+ xslSourceEdit->setText(XsldbgDebugger::fixLocalPaths(fileName));
+ }
+}
+
+
+void XsldbgConfigImpl::slotChooseDataFile()
+{
+ KURL url = KFileDialog::getOpenURL(QString::null, "*.xml; *.XML; *.Xml \n*.docbook \n *.html;*.HTML; *.htm ; *HTM \n *.*", this,
+ i18n("Choose XML Data to Debug"));
+ QString fileName = url.prettyURL();
+
+ if ((!fileName.isNull()) && (fileName.length() > 0))
+ xmlDataEdit->setText(XsldbgDebugger::fixLocalPaths(fileName));
+}
+
+
+void XsldbgConfigImpl::slotChooseOutputFile()
+{
+ KURL url = KFileDialog::getSaveURL(QString::null, "*.xml; *.XML; *.Xml \n*.docbook \n *.txt; *.TXT \n *.htm;*.HTM;*.htm;*.HTML \n*.*", this,
+ i18n("Choose Output File for XSL Transformation"));
+ QString fileName;
+
+ if (url.isLocalFile()){
+ fileName = url.prettyURL();
+ if ((!fileName.isNull()) && (fileName.length() > 0))
+ outputFileEdit->setText(XsldbgDebugger::fixLocalPaths(fileName));
+ }
+}
+
+void XsldbgConfigImpl::slotReloadFileNames()
+{
+ if (debugger != 0){
+ xslSourceEdit->setText(debugger->sourceFileName());
+ xmlDataEdit->setText(debugger->dataFileName());
+ outputFileEdit->setText(debugger->outputFileName());
+ }
+}
+
+
+void XsldbgConfigImpl::repaintParam()
+{
+ if (paramIndex < getParamCount()){
+ LibxsltParam *param = getParam(paramIndex);
+ parameterNameEdit->setText(param->getName());
+ parameterValueEdit->setText(param->getValue());
+ }else{
+ parameterNameEdit->setText("");
+ parameterValueEdit->setText("");
+ }
+}
+
+void XsldbgConfigImpl::slotAddParam()
+{
+ addParam(parameterNameEdit->text(), parameterValueEdit->text());
+ if (paramIndex < getParamCount())
+ paramIndex++;
+
+ repaintParam();
+}
+
+void XsldbgConfigImpl::slotDeleteParam()
+{
+ deleteParam(parameterNameEdit->text());
+ repaintParam();
+}
+
+
+void XsldbgConfigImpl::slotNextParam()
+{
+ addParam(parameterNameEdit->text(), parameterValueEdit->text());
+ if (paramIndex < getParamCount())
+ paramIndex++;
+
+ repaintParam();
+}
+
+void XsldbgConfigImpl::slotPrevParam()
+{
+ addParam(parameterNameEdit->text(), parameterValueEdit->text());
+ if (paramIndex > 0)
+ paramIndex--;
+
+ repaintParam();
+}
+
+void XsldbgConfigImpl::slotProcParameterItem(QString name, QString value)
+{
+ if (name.isNull()){
+ paramList.clear();
+ paramIndex = 0;
+ parameterNameEdit->setText("");
+ parameterValueEdit->setText("");
+ }else{
+ addParam(name, value);
+ if(paramList.count() == 1){
+ parameterNameEdit->setText(name);
+ parameterValueEdit->setText(value);
+ }
+ }
+}
+
+
+
+void XsldbgConfigImpl::slotApply()
+{
+
+ // Validate the users choices before applying it
+ QString msg;
+ if (isValid(msg)){
+ if (!msg.isEmpty())
+ QMessageBox::information(this, i18n("Suspect Configuration"),
+ msg, QMessageBox::Ok);
+ update();
+ }else{
+ QMessageBox::information(this, i18n("Incomplete or Invalid Configuration"),
+ msg, QMessageBox::Ok);
+ }
+}
+
+
+void XsldbgConfigImpl::slotCancel()
+{
+ hide();
+}
+
+#include "xsldbgconfigimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgconfigimpl.h b/kxsldbg/kxsldbgpart/xsldbgconfigimpl.h
new file mode 100644
index 00000000..ad207d7a
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgconfigimpl.h
@@ -0,0 +1,151 @@
+/***************************************************************************
+ xsldbgconfigimpl.h - description
+ -------------------
+ begin : Fri Jan 4 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGCONFIGIMPL_H
+#define XSLDBGCONFIGIMPL_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbgconfig.h"
+#include "xsldbgdialogbase.h"
+
+#include <qptrlist.h>
+
+
+class LibxsltParam : public QObject
+{
+ public:
+ LibxsltParam(const QString & name, const QString &value);
+ ~LibxsltParam();
+
+ QString getName() const;
+ void setName(const QString &name);
+ QString getValue() const;
+ void setValue(const QString &value);
+ bool isValid() const;
+
+private:
+ QString _name;
+ QString _value;
+};
+
+
+class XsldbgDebugger;
+
+class XsldbgConfigImpl : public XsldbgConfig, public XsldbgDialogBase {
+ Q_OBJECT
+
+public:
+ XsldbgConfigImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgConfigImpl();
+
+ LibxsltParam *getParam(int paramNumber);
+ LibxsltParam *getParam(QString name);
+ int getParamCount();
+ void addParam(QString name, QString value);
+ void deleteParam(QString name);
+ void repaintParam();
+
+ QString getSourceFile();
+ QString getDataFile();
+ QString getOutputFile();
+ bool debugEnabled() const {return debug; };
+ bool catalogsEnabled() const {return catalogs; };
+ bool htmlEnabled() const {return html; };
+ bool docbookEnabled() const {return docbook; };
+ bool nonetEnabled() const {return nonet; };
+ bool novalidEnabled() const {return novalid; };
+ bool nooutEnabled() const {return noout; };
+ bool timingEnabled() const {return timing; };
+ bool profileEnabled() const {return profile; };
+
+
+ /** return true if all data ok */
+ bool isValid(QString &errorMsg);
+
+ /** Update changes to xsldbg*/
+ void update();
+
+ /** refresh data from source */
+ void refresh();
+
+
+public slots:
+
+ /** Set xsl source file*/
+ void slotSourceFile(QString);
+
+ /** Set xml data file*/
+ void slotDataFile(QString);
+
+ /** Set file name for the default output of transformed data*/
+ void slotOutputFile(QString);
+
+ /**Choose the XSL source file */
+ void slotChooseSourceFile();
+
+ /**Choose the XML data file */
+ void slotChooseDataFile();
+
+
+ /**Choose the output file */
+ void slotChooseOutputFile();
+
+ /* Update the gui with the new values for source, data and output files */
+ void slotReloadFileNames();
+
+ /** Configure dialog has request that a param be added */
+ void slotAddParam();
+
+ /** Configure dialog has request that a param be deleted */
+ void slotDeleteParam();
+
+ /** Configure dialog has request that a next param be shown */
+ void slotNextParam();
+
+ /** Configure dialog has request that a prev param be shown */
+ void slotPrevParam();
+
+ /** Apply the changes */
+ void slotApply();
+
+ /** Ignore any changes and hide dialog */
+ void slotCancel();
+
+ /** Process notification of add parameter to view, First parameter
+ is QString::null to indicate start of parameter list notfication */
+ void slotProcParameterItem(QString name, QString value);
+
+
+private:
+ int paramIndex;
+ QPtrList<LibxsltParam> paramList;
+
+ XsldbgDebugger *debugger;
+
+ bool catalogs;
+ bool debug;
+ bool html;
+ bool docbook;
+ bool nonet;
+ bool novalid;
+ bool noout;
+ bool timing;
+ bool profile;
+};
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp b/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp
new file mode 100644
index 00000000..69fcaeec
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp
@@ -0,0 +1,474 @@
+/***************************************************************************
+ xsldbgdebugger.cpp - description
+ -------------------
+ begin : Tue Jan 1 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <klocale.h>
+#include <kurl.h>
+
+#include <libxml/tree.h>
+#include <libxslt/xsltInternals.h>
+#include "xsldbgdebugger.h"
+
+#include <libxsldbg/xsldbgthread.h>
+#include <libxsldbg/xsldbgevent.h>
+#include <libxsldbg/qtnotifier2.h>
+#include <libxsldbg/options.h>
+#include <libxsldbg/files.h>
+
+extern int xsldbgStop;
+
+#include "xsldbgwalkspeedimpl.h"
+#include <qmessagebox.h>
+#include <kdebug.h>
+
+XsldbgDebugger::XsldbgDebugger()
+{
+ initialized = false;
+ inspector = 0L;
+ walkDialog = 0L;
+ outputFileActive = false;
+
+ updateText = "";
+ lastType = XSLDBG_MSG_AWAITING_INPUT;
+ readMsg = false;
+ procMsg = false;
+ /* set a slow occurance of timer events to check for xsldbg commands from user */
+ updateTimerID = startTimer(100);
+
+ connectNotifier(this);
+}
+
+
+XsldbgDebugger::~XsldbgDebugger(){
+ if (initialized == true)
+ xsldbgThreadFree();
+
+ if (walkDialog != 0L)
+ walkDialog->close(true);
+
+}
+
+
+void XsldbgDebugger::setInspector(XsldbgInspector *inspector)
+{
+ this->inspector = inspector;
+}
+
+bool XsldbgDebugger::event(QEvent *e)
+{
+ if (e == 0L)
+ return false;
+
+ if (e->type() != QEvent::User)
+ return QObject::event(e);
+ else{
+ static bool waitingFirstmessage = true;
+ if (waitingFirstmessage){
+ waitingFirstmessage = false;
+ emit debuggerReady();
+ }
+
+ /* we now have a notify message from xsldbg */
+ XsldbgEvent *event = dynamic_cast<XsldbgEvent*>(e);
+ /* send to this debugger the messages in event */
+ event->emitMessage(this);
+ }
+ return true;
+
+}
+
+
+void XsldbgDebugger::timerEvent(QTimerEvent *e)
+{
+ /* This function runs in the application's thread */
+
+ if (e == 0L || (e->timerId() != updateTimerID))
+ return;
+
+ if ((getInputReady() == 0) && (getInputStatus() == XSLDBG_MSG_AWAITING_INPUT) &&
+ (commandQue.count() > 0)){
+ QString msg = commandQue.first();
+ commandQue.remove(msg);
+ ::fakeInput((const char*)msg.utf8());
+ }
+
+ if ((!updateText.isEmpty()) && (getInputStatus() == XSLDBG_MSG_AWAITING_INPUT)){
+ /* flush remainding text to message window */
+ QString msgCopy = updateText;
+ updateText = "";
+ emit showMessage(msgCopy);
+ lastType = XSLDBG_MSG_AWAITING_INPUT;
+ }
+
+}
+
+
+QString XsldbgDebugger::fixLocalPaths(QString & file)
+{
+ QString result = file;
+
+ if (file.left(6) == "file:/"){
+ xmlChar * tempResult = filesExpandName((xmlChar *)file.utf8().data());
+ result = QString::fromUtf8((char*)tempResult);
+ xmlFree(tempResult);
+ }
+
+ return result;
+}
+
+
+QString XsldbgDebugger::sourceFileName()
+{
+ QString fileName;
+
+ if (optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) != 0L)
+ fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME));
+
+ return fileName;
+}
+
+QString XsldbgDebugger::dataFileName()
+{
+ QString fileName;
+
+ if (optionsGetStringOption(OPTIONS_DATA_FILE_NAME) != 0L)
+ fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME));
+
+ return fileName;
+}
+
+QString XsldbgDebugger::outputFileName()
+{
+ QString fileName;
+
+ if (optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) != 0L)
+ fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME));
+
+ return fileName;
+}
+
+void XsldbgDebugger::gotoLine(QString fileName, int lineNo, bool breakpoint /*= false*/)
+{
+ emit lineNoChanged(fileName, lineNo, breakpoint);
+}
+
+
+void XsldbgDebugger::setOption(const char* name, bool value)
+{
+ QString msg = "setoption ";
+ msg.append(name).append(" ").append(QString::number(value));
+ fakeInput(msg, true);
+}
+
+void XsldbgDebugger::fakeInput(QString text, bool wait)
+{
+ Q_UNUSED(wait);
+ commandQue.append(text);
+}
+
+
+bool XsldbgDebugger::start()
+{
+ bool result = false;
+ if ((initialized == false) && !xsldbgThreadInit())
+ {
+ xsldbgThreadFree();
+ kdDebug() << "Init of thread failed" << endl;
+ }
+ else
+ {
+ initialized = true;
+ result = true;
+ }
+ return result;
+}
+
+bool XsldbgDebugger::stop()
+{
+ if (initialized == true){
+ setThreadStatus(XSLDBG_MSG_THREAD_STOP);
+ }
+
+ /* it always succeeds at the moment */
+ return true;
+}
+
+void XsldbgDebugger::slotConfigure()
+{
+ if (start() == false)
+ return;
+
+ if(inspector == 0L ){
+ inspector = new XsldbgInspector(this);
+ connect(inspector, SIGNAL(closedWindow()), this, SLOT(slotConfigClosed()));
+ }
+}
+
+
+void XsldbgDebugger::slotConfigClosed()
+{
+ inspector = 0L;
+}
+
+void XsldbgDebugger::slotStepCmd()
+{
+ if (start())
+ fakeInput("step", true);
+ if (inspector != 0L)
+ inspector->refreshVariables();
+}
+
+void XsldbgDebugger::slotContinueCmd()
+{
+ if (start())
+ /*this can take a while so don't wait for xsldbg to finish */
+ fakeInput("continue", false);
+ if (inspector != 0L)
+ inspector->refreshVariables();
+
+}
+
+void XsldbgDebugger::slotRunCmd()
+{
+ if (start())
+ /*this can take a while so don't wait for xsldbg to finish */
+ fakeInput("run", false);
+
+ if (inspector != 0L)
+ inspector->refresh();
+}
+
+
+void XsldbgDebugger::slotWalkSpeed(int speed)
+{
+ if ((speed >= 0) && (speed <= 9)){
+ if (start()){
+ if (optionsGetIntOption(OPTIONS_WALK_SPEED) == WALKSPEED_STOP){
+ // start walking at speed requested
+ QString msg("walk ");
+ msg.append(QString::number(speed));
+ fakeInput(msg, true);
+ } else
+ // This will take effect imediately
+ optionsSetIntOption(OPTIONS_WALK_SPEED, speed);
+ }
+ }else
+ kdDebug() << "Invalid walk speed " << speed << endl;
+}
+
+void XsldbgDebugger::slotWalkCmd()
+{
+ if (walkDialog == 0L )
+ walkDialog = new XsldbgWalkSpeedImpl (this);
+
+ if (walkDialog != 0L)
+ /* if the user changes the speed the dialog will call back slotWalkSpeed(int) */
+ walkDialog->show();
+}
+
+void XsldbgDebugger::slotWalkStopCmd()
+{
+ xsldbgStop = 1;
+}
+
+void XsldbgDebugger::slotTraceCmd()
+{
+ if (start())
+ /*this can take a while so don't wait for xsldbg to finish */
+ fakeInput("trace", false);
+}
+
+void XsldbgDebugger::slotBreakCmd(QString fileName, int lineNumber)
+{
+ if (outputFileActive == true){
+ QMessageBox::information(0L, i18n("Operation Failed"),
+ i18n("Cannot set/edit breakpoints on the output file."),
+ QMessageBox::Ok);
+ return ;
+ }
+
+ QString msg("break -l \"");
+ msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber));
+
+ if (start())
+ fakeInput(msg, true);
+
+ if (inspector != 0L)
+ inspector->refreshBreakpoints();
+}
+
+void XsldbgDebugger::slotBreakCmd(QString templateName, QString modeName)
+{
+
+ if (outputFileActive == true){
+ QMessageBox::information(0L, i18n("Operation Failed"),
+ i18n("Cannot set/edit breakpoints on the output file."),
+ QMessageBox::Ok);
+ return ;
+ }
+ QString msg("break \"");
+ msg.append(templateName).append("\" \"").append(modeName).append("\"");
+ if (start())
+ fakeInput(msg, true);
+
+ if (inspector != 0L)
+ inspector->refreshBreakpoints();
+}
+
+void XsldbgDebugger::slotEnableCmd(QString fileName, int lineNumber)
+{
+
+ if (outputFileActive == true){
+ QMessageBox::information(0L, i18n("Operation Failed"),
+ i18n("Cannot set/edit breakpoints on the output file."),
+ QMessageBox::Ok);
+ return ;
+ }
+
+ QString msg("enable -l \"");
+ msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber));
+ if (start())
+ fakeInput(msg, true);
+
+ if (inspector != 0L)
+ inspector->refreshBreakpoints();
+}
+
+
+void XsldbgDebugger::slotEnableCmd(int id)
+{
+
+ if (outputFileActive == true){
+ QMessageBox::information(0L, i18n("Operation Failed"),
+ i18n("Cannot set/edit breakpoints on the output file."),
+ QMessageBox::Ok);
+ return ;
+ }
+
+ QString msg("enable ");
+ msg.append(QString::number(id));
+ if (start())
+ fakeInput(msg, true);
+
+ if (inspector != 0L)
+ inspector->refreshBreakpoints();
+}
+
+
+void XsldbgDebugger::slotDeleteCmd(QString fileName, int lineNumber)
+{
+
+ if (outputFileActive == true){
+ QMessageBox::information(0L, i18n("Operation Failed"),
+ i18n("Cannot set/edit breakpoints on the output file."),
+ QMessageBox::Ok);
+ return ;
+ }
+
+ QString msg("delete -l \"");
+ msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber));
+ if (start())
+ fakeInput(msg, true);
+ if (inspector != 0L)
+ inspector->refreshBreakpoints();
+}
+
+
+void XsldbgDebugger::slotDeleteCmd(int id)
+{
+
+ if (outputFileActive == true){
+ QMessageBox::information(0L, i18n("Operation Failed"),
+ i18n("Cannot set/edit breakpoints on the output file."),
+ QMessageBox::Ok);
+ return ;
+ }
+ QString msg("delete ");
+ msg.append(QString::number(id));
+ if (start())
+ fakeInput(msg, true);
+ if (inspector != 0L)
+ inspector->refreshBreakpoints();
+}
+
+
+void XsldbgDebugger::slotSourceCmd()
+{
+ if (start()){
+ outputFileActive = false;
+ fakeInput("source", true);
+ }
+}
+
+
+void XsldbgDebugger::slotDataCmd()
+{
+ if (start()){
+ outputFileActive = false;
+ fakeInput("data", true);
+ }
+}
+
+void XsldbgDebugger::slotShowDocument()
+{
+
+ if (outputFileName().length() > 0){
+ outputFileActive = true;
+ gotoLine(outputFileName(), 1);
+ }
+}
+
+
+void XsldbgDebugger::slotExitCmd()
+{
+ /* showMessage("\nExit command disabled in Quanta for the moment\n");*/
+ stop();
+}
+
+
+void XsldbgDebugger::slotCatCmd(QString xPathExpression){
+ QString msg("cat ");
+ msg.append(xPathExpression);
+
+ if (start())
+ /*this can take a while so don't wait for xsldbg to finish */
+ fakeInput(msg, false);
+
+}
+
+void XsldbgDebugger::slotCdCmd(QString xPathExpression){
+ QString msg("cd ");
+ msg.append(xPathExpression);
+
+ if (start())
+ fakeInput(msg, true);
+}
+void XsldbgDebugger::slotSetVariableCmd(QString variableName, QString xPathExpression)
+{
+ if (!variableName.isEmpty() && !xPathExpression.isEmpty()){
+ QString msg("set ");
+ msg.append(variableName);
+ msg.append(" \"");
+ msg.append(xPathExpression);
+ msg.append("\"");
+
+ if (start())
+ fakeInput(msg, true);
+ }
+}
+
+
+#include "xsldbgdebugger.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgdebugger.h b/kxsldbg/kxsldbgpart/xsldbgdebugger.h
new file mode 100644
index 00000000..3e9c267f
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgdebugger.h
@@ -0,0 +1,176 @@
+/***************************************************************************
+ xsldbgdebugger.h - description
+ -------------------
+ begin : Tue Jan 1 2002
+ copyright : (C) 2002 by keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGDEBUGGER_H
+#define XSLDBGDEBUGGER_H
+
+#include <qevent.h>
+#include "libxsldbg/xsldbgmsg.h" /* needed for XsldbgMessageEnum */
+#include "libqtnotfier/xsldbgdebuggerbase.h"
+
+#include "xsldbginspector.h"
+
+
+/**
+ *@author Keith Isdale
+ */
+
+class QStringList;
+
+class XsldbgWalkSpeedImpl;
+
+class XsldbgDebugger : public XsldbgDebuggerBase {
+ Q_OBJECT
+
+public:
+ XsldbgDebugger();
+ ~XsldbgDebugger();
+
+ /** */
+ void setInspector(XsldbgInspector *inspector);
+
+ /** Get the name of source file from xsldbg*/
+ QString sourceFileName();
+
+ /** Get the name of data file from xsldbg*/
+ QString dataFileName();
+
+ /** Get the name of output file from xsldbg*/
+ QString outputFileName();
+
+ /** Tell quanta to move its cursor to file and line number supplied */
+ void gotoLine(QString fileName, int lineNo, bool breakpoint = false);
+
+ /** Set a xsldbg option */
+ void setOption(const char *name, bool value);
+
+ bool event(QEvent *e);
+ void timerEvent(QTimerEvent *e);
+
+ void setOutputFileActive(bool b) {outputFileActive = b;};
+
+ /* helper function to handle differences between URI's in Qt/KDE and libxml2 */
+ static QString fixLocalPaths(QString & file);
+
+private:
+ /** */
+ bool outputFileActive;
+
+public slots:
+ /** start xsldbg */
+ bool start();
+
+ /** stop xsldbg */
+ bool stop();
+
+ /** send text to xsldbg, if wait is true then wait for the reply */
+ void fakeInput(QString text, bool wait);
+
+ /** Display configure dialog */
+ void slotConfigure();
+
+ /** Config window closed */
+ void slotConfigClosed();
+
+ /** Step to next instruction */
+ void slotStepCmd();
+
+ /** Continue to next break point */
+ void slotContinueCmd();
+
+ /** Restart xsldbg with selected xsl/xml file */
+ void slotRunCmd();
+
+ /** Walk throught shtylesheet at a fixed speed
+ @param speed : Must be a value of 0 to 9, where 1 mean fast, 9 means slow, and 0 means stop
+ */
+ void slotWalkSpeed(int speed);
+
+ /** Present a dialog for use to choose walk speed */
+ void slotWalkCmd();
+
+ /** Stop walking imediately */
+ void slotWalkStopCmd();
+
+ /**
+ Start xslbg's trace mode, where output will be sent to to message window.
+ Can only be be stopped by using "exit" tool button and killing xsldbg */
+ void slotTraceCmd();
+
+ /** Add breakpoint at given file and line number */
+ void slotBreakCmd(QString fileName, int lineNumber);
+
+ /** Add breakpoint at given template name*/
+ void slotBreakCmd(QString templateName, QString modeName);
+
+ /** Toggle the enabling of break point at given file and line number */
+ void slotEnableCmd(QString fileName, int lineNumber);
+
+ /** Enable break point for given breakpoint id */
+ void slotEnableCmd(int id);
+
+ /** Delete break point at given file and line number */
+ void slotDeleteCmd(QString fileName, int lineNumber);
+
+ /** Delete break point for given breakpoint id */
+ void slotDeleteCmd(int id);
+
+ /** Switch to view of XSL source */
+ void slotSourceCmd();
+
+ /* switch to the output document */
+ void slotShowDocument();
+
+ /** Switch to view of XML data */
+ void slotDataCmd();
+
+ /** Stop xsldg, must use start after this command */
+ void slotExitCmd();
+
+ /** Print the result of evaluating xPathExpression to the message window */
+ void slotCatCmd(QString xPathExpression);
+
+ /** Move to line specified by xPathExpression */
+ void slotCdCmd(QString xPathExpression);
+
+ /** Set a libxslt variable to xPathExpression */
+ void slotSetVariableCmd(QString variableName, QString xPathExpression);
+signals: // Signals
+ // generated after first message is received from xsldbg
+ void debuggerReady();
+
+private:
+ bool initialized;
+
+ /* xsldbg config and inspection dialog */
+ XsldbgInspector *inspector;
+
+ /**Walk speed dialog */
+ XsldbgWalkSpeedImpl *walkDialog;
+ bool readMsg;
+ bool procMsg;
+
+ /* copy text to output only if no furher output us requested */
+ XsldbgMessageEnum lastType;
+ int updateTimerID;
+ bool addMsg;
+
+ QStringList commandQue;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgdialogbase.cpp b/kxsldbg/kxsldbgpart/xsldbgdialogbase.cpp
new file mode 100644
index 00000000..6170e185
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgdialogbase.cpp
@@ -0,0 +1,39 @@
+/***************************************************************************
+ xsldbgdialogbase.cpp - description
+ -------------------
+ begin : Sun Jan 6 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbgdialogbase.h"
+
+XsldbgDialogBase::XsldbgDialogBase(){
+}
+
+XsldbgDialogBase::~XsldbgDialogBase(){
+}
+
+
+bool XsldbgDialogBase::isValid()
+{
+ return true;
+}
+
+void XsldbgDialogBase::update()
+{
+}
+
+void XsldbgDialogBase::refresh()
+{
+}
+
diff --git a/kxsldbg/kxsldbgpart/xsldbgdialogbase.h b/kxsldbg/kxsldbgpart/xsldbgdialogbase.h
new file mode 100644
index 00000000..4582ef3f
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgdialogbase.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+ xsldbgdialogbase.h - description
+ -------------------
+ begin : Sun Jan 6 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGDIALOGBASE_H
+#define XSLDBGDIALOGBASE_H
+
+
+/**
+ *@author Keith Isdale
+ */
+
+#include <qfiledialog.h>
+
+class XsldbgDialogBase {
+
+public:
+ XsldbgDialogBase();
+ virtual ~XsldbgDialogBase();
+
+public :
+ /** return true if all data ok */
+ virtual bool isValid();
+
+ /** Update changes to xsldbg*/
+ virtual void update();
+
+ /** refresh data from source */
+ virtual void refresh();
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgdoc.cpp b/kxsldbg/kxsldbgpart/xsldbgdoc.cpp
new file mode 100644
index 00000000..51b27dcb
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgdoc.cpp
@@ -0,0 +1,61 @@
+/*
+ Handle our documents
+ */
+
+#include "xsldbgdoc.h"
+
+XsldbgDoc::XsldbgDoc()
+{
+ fileName = QString();
+ text = QString();
+ row = 0;
+ column = 0;
+}
+
+
+XsldbgDoc::XsldbgDoc(const QString &fileName, const QString &text)
+{
+ this->fileName = fileName;
+ this->text = text;
+ row = 0;
+ column = 0;
+}
+
+
+XsldbgDoc::~XsldbgDoc()
+{
+ /* Empty */
+}
+
+
+QString XsldbgDoc::getText() const
+{
+ return text;
+}
+
+
+QString XsldbgDoc::getFileName() const
+{
+ return fileName;
+}
+
+void XsldbgDoc::setRow(int row)
+{
+ this->row = row;
+}
+
+int XsldbgDoc::getRow()
+{
+ return row;
+}
+
+void XsldbgDoc::setColumn(int column)
+{
+ this->column = column;
+}
+
+
+int XsldbgDoc::getColumn()
+{
+ return column;
+}
diff --git a/kxsldbg/kxsldbgpart/xsldbgdoc.h b/kxsldbg/kxsldbgpart/xsldbgdoc.h
new file mode 100644
index 00000000..26e4482a
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgdoc.h
@@ -0,0 +1,28 @@
+
+#ifndef XSLDBGDOC
+#define XSLDBGDOC
+
+#include <qstring.h>
+
+class XsldbgDoc {
+ public:
+ XsldbgDoc();
+ XsldbgDoc(const QString &fileName, const QString &text);
+ ~XsldbgDoc();
+
+ QString getText() const;
+ QString getFileName() const;
+
+ void setRow(int row);
+ int getRow();
+ void setColumn(int column);
+ int getColumn();
+
+ private:
+ QString text;
+ QString fileName;
+ int row, column;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgdocmap.h b/kxsldbg/kxsldbgpart/xsldbgdocmap.h
new file mode 100644
index 00000000..189ddc1c
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgdocmap.h
@@ -0,0 +1,5 @@
+
+#include <qmap.h>
+#include "qxsldbgdoc.h"
+
+typedef QMap<QString, QXsldbgDoc> XsldbgDocMap;
diff --git a/kxsldbg/kxsldbgpart/xsldbgentities.ui b/kxsldbg/kxsldbgpart/xsldbgentities.ui
new file mode 100644
index 00000000..3f3d1339
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgentities.ui
@@ -0,0 +1,161 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgEntities</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>XsldbgEntities</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>610</width>
+ <height>464</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>Xsldbg Entities</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="0">
+ <column>
+ <property name="text">
+ <string>PublicID</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>SystemID</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>entitiesListView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>Spacer3_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="4" 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>Spacer4</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>refreshBtn</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>refreshBtn</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgEntities</receiver>
+ <slot>refresh()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>refresh()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp
new file mode 100644
index 00000000..f24e694f
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp
@@ -0,0 +1,79 @@
+/***************************************************************************
+ xsldbgentitiesimplimpl.cpp - description
+ -------------------
+ begin : Sun Jan20 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qlistview.h>
+#include <qlineedit.h>
+
+#include "xsldbgentitiesimpl.h"
+#include "xsldbgdebugger.h"
+#include "xsldbggloballistitem.h"
+
+
+XsldbgEntitiesImpl::XsldbgEntitiesImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0*/, const char *name /*=0*/)
+ : XsldbgEntities(parent, name), XsldbgDialogBase()
+{
+ this->debugger = debugger;
+ connect(debugger,
+ SIGNAL(entityItem(QString /*SystemID*/,
+ QString /*PublicID*/)),
+ this,
+ SLOT(slotProcEntityItem(QString /*SystemID*/,
+ QString /*PublicID*/)));
+
+ connect( entitiesListView,
+ SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(selectionChanged(QListViewItem*)));
+ show();
+}
+
+
+XsldbgEntitiesImpl::~XsldbgEntitiesImpl(){
+}
+
+
+void XsldbgEntitiesImpl::slotProcEntityItem(QString SystemID, QString PublicID)
+{
+ if (SystemID.isNull())
+ entitiesListView->clear();
+ else{
+ entitiesListView->insertItem(
+ new XsldbgGlobalListItem(entitiesListView,
+ SystemID, -1, PublicID));
+ }
+
+}
+
+
+void XsldbgEntitiesImpl::selectionChanged(QListViewItem *item)
+{
+ XsldbgGlobalListItem *globalItem = dynamic_cast<XsldbgGlobalListItem*>(item);
+ if (globalItem){
+ debugger->gotoLine(globalItem->getFileName(), 1);
+ }
+}
+
+void XsldbgEntitiesImpl::refresh()
+{
+ debugger->fakeInput("entities", true) ;
+}
+
+
+
+
+
+#include "xsldbgentitiesimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h b/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h
new file mode 100644
index 00000000..2c744001
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ xsldbgentitiesimpl.h - description
+ -------------------
+ begin : Sun Jan 20 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGENTITIESIMPL_H
+#define XSLDBGENTITIESIMPL_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbgentities.h"
+#include "xsldbgdialogbase.h"
+
+class XsldbgDebugger;
+
+class XsldbgEntitiesImpl : public XsldbgEntities, public XsldbgDialogBase {
+ Q_OBJECT
+
+public:
+ XsldbgEntitiesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgEntitiesImpl();
+
+public slots:
+ /** Process request to add entity to view, First parameter is QString::null
+ to indicate start of entity list notfication */
+ void slotProcEntityItem(QString SystemID, QString PublicID);
+
+ void selectionChanged(QListViewItem *item);
+
+ /** refresh data from source */
+ void refresh();
+
+
+private:
+ XsldbgDebugger *debugger;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp b/kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp
new file mode 100644
index 00000000..b1fa76d9
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp
@@ -0,0 +1,38 @@
+/***************************************************************************
+ xsldbggloballistitem.cpp - description
+ -------------------
+ begin : Sun Jan 13 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbggloballistitem.h"
+
+XsldbgGlobalListItem::XsldbgGlobalListItem(QListView *parent,
+ QString fileName, int lineNumber, QString globalName)
+ : XsldbgListItem(parent, 1, fileName, lineNumber)
+{
+ varName = globalName;
+ setText(0, globalName);
+}
+
+
+XsldbgGlobalListItem::~XsldbgGlobalListItem()
+{
+}
+
+
+QString XsldbgGlobalListItem::getVarName()
+{
+ return varName;
+}
+
diff --git a/kxsldbg/kxsldbgpart/xsldbggloballistitem.h b/kxsldbg/kxsldbgpart/xsldbggloballistitem.h
new file mode 100644
index 00000000..325df028
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbggloballistitem.h
@@ -0,0 +1,41 @@
+/***************************************************************************
+ xsldbggloballistitem.h - description
+ -------------------
+ begin : Sun Jan 13 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGGLOBALLISTITEM_H
+#define XSLDBGGLOBALLISTITEM_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbglistitem.h"
+
+
+class XsldbgGlobalListItem : public XsldbgListItem {
+public:
+ XsldbgGlobalListItem(QListView *parent,
+ QString fileName, int lineNumber, QString globalName);
+ ~XsldbgGlobalListItem();
+
+ /** return the name of this variable */
+ QString getVarName();
+
+private:
+ QString varName;
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgglobalvariables.ui b/kxsldbg/kxsldbgpart/xsldbgglobalvariables.ui
new file mode 100644
index 00000000..513e3079
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgglobalvariables.ui
@@ -0,0 +1,272 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgGlobalVariables</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>XsldbgGlobalVariables</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>639</width>
+ <height>342</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>Xsldbg Global Variables</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="2" column="0">
+ <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>Source File</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Source Line Number</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>varsListView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="0" 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>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer1</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="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="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Expression:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>expressionEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enter a valid XPath expression</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer>
+ <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="QPushButton">
+ <property name="name">
+ <cstring>expressionButton</cstring>
+ </property>
+ <property name="text">
+ <string>Evaluate</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Result of evaluation will appear in message window</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="3" 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>Spacer4</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>refreshBtn</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>expressionButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgGlobalVariables</receiver>
+ <slot>slotEvaluate()</slot>
+ </connection>
+ <connection>
+ <sender>refreshBtn</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgGlobalVariables</receiver>
+ <slot>refresh()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>refresh()</slot>
+ <slot>slotEvaluate()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp
new file mode 100644
index 00000000..37083068
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp
@@ -0,0 +1,77 @@
+/***************************************************************************
+ xsldbgglobalvariablesimpl.cpp - description
+ -------------------
+ begin : Sat Jan 5 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qlistview.h>
+#include <qlineedit.h>
+
+#include "xsldbgglobalvariablesimpl.h"
+#include "xsldbgdebugger.h"
+#include "xsldbggloballistitem.h"
+
+
+XsldbgGlobalVariablesImpl::XsldbgGlobalVariablesImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0*/, const char *name /*=0*/)
+ : XsldbgGlobalVariables(parent, name), XsldbgDialogBase()
+{
+ this->debugger = debugger;
+ connect(debugger, SIGNAL(globalVariableItem(QString /*name */, QString /* fileName */, int /*lineNumber */)),
+ this, SLOT(slotProcGlobalVariableItem(QString /*name */, QString /* fileName */, int /*lineNumber */)));
+ connect( varsListView, SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(selectionChanged(QListViewItem*)));
+ show();
+}
+
+
+XsldbgGlobalVariablesImpl::~XsldbgGlobalVariablesImpl(){
+ debugger = 0L;
+}
+
+void XsldbgGlobalVariablesImpl::slotProcGlobalVariableItem(QString name , QString fileName, int lineNumber)
+{
+ if (name.isNull())
+ varsListView->clear();
+ else{
+ varsListView->insertItem(new XsldbgGlobalListItem(varsListView,
+ fileName, lineNumber, name));
+ }
+
+}
+
+
+void XsldbgGlobalVariablesImpl::selectionChanged(QListViewItem *item)
+{
+ XsldbgGlobalListItem *globalItem = dynamic_cast<XsldbgGlobalListItem*>(item);
+ if (globalItem != 0 && debugger != 0) {
+ debugger->gotoLine(globalItem->getFileName(), globalItem->getLineNumber());
+ }
+}
+
+void XsldbgGlobalVariablesImpl::refresh()
+{
+ if (debugger != 0)
+ debugger->fakeInput("globals -q", true) ;
+}
+
+void XsldbgGlobalVariablesImpl::slotEvaluate()
+{
+ if (debugger != 0L)
+ debugger->slotCatCmd( expressionEdit->text() );
+}
+
+
+
+#include "xsldbgglobalvariablesimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h b/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h
new file mode 100644
index 00000000..57d0c922
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ xsldbgglobalvariablesimpl.h - description
+ -------------------
+ begin : Sat Jan 5 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGGLOBALVARIABLESIMPL_H
+#define XSLDBGGLOBALVARIABLESIMPL_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbgglobalvariables.h"
+#include "xsldbgdialogbase.h"
+
+class XsldbgDebugger;
+
+class XsldbgGlobalVariablesImpl : public XsldbgGlobalVariables, public XsldbgDialogBase {
+ Q_OBJECT
+
+public:
+ XsldbgGlobalVariablesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgGlobalVariablesImpl();
+
+public slots:
+ /** Process request to add global variable to view, First parameter is QString::null
+ to indicate start of global variable list notfication */
+ void slotProcGlobalVariableItem(QString name , QString fileName, int lineNumber);
+
+ void selectionChanged(QListViewItem *item);
+
+ /** refresh data from source */
+ void refresh();
+
+ void slotEvaluate();
+
+
+private:
+ XsldbgDebugger *debugger;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbginspector.cpp b/kxsldbg/kxsldbgpart/xsldbginspector.cpp
new file mode 100644
index 00000000..c36130c7
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbginspector.cpp
@@ -0,0 +1,210 @@
+/**
+ File : xsldbginspector.cpp
+ Author : Keith Isdale
+ Date : 30th March 2002
+ Description : Dialog to inspect stylesheet using xsldbg. Based on
+ file created by uic
+ */
+
+#include "xsldbginspector.h"
+
+#include <klocale.h>
+
+#include <qvariant.h>
+#include <qlistbox.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+#include <qwidget.h>
+#include <qmime.h>
+#include <qdragobject.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qiconset.h>
+
+#include <kpushbutton.h>
+#include <kstdguiitem.h>
+#include "xsldbgdebugger.h"
+#include "xsldbgbreakpointsimpl.h"
+#include "xsldbglocalvariablesimpl.h"
+#include "xsldbgcallstackimpl.h"
+#include "xsldbgtemplatesimpl.h"
+#include "xsldbgsourcesimpl.h"
+#include "xsldbgentitiesimpl.h"
+
+static QPixmap uic_load_pixmap_XsldbgInspector( const QString &name )
+{
+ const QMimeSource *m = QMimeSourceFactory::defaultFactory()->data( name );
+ if ( !m )
+ return QPixmap();
+ QPixmap pix;
+ QImageDrag::decode( m, pix );
+ return pix;
+}
+/*
+ * Constructs a XsldbgInspector which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ *
+ * The dialog will by default be modeless, unless you set 'modal' to
+ * true to construct a modal dialog.
+ */
+XsldbgInspector::XsldbgInspector( XsldbgDebugger *debugger, QWidget* parent,
+ const char* name, bool modal, WFlags fl )
+ : QDialog( parent, name, modal, fl )
+{
+ Q_CHECK_PTR(debugger);
+ this->debugger = debugger;
+ breakpointWidget = 0L;
+ localWidget = 0L;
+ callStackWidget = 0L;
+ templateWidget = 0L;
+ sourceWidget = 0L;
+ entityWidget = 0L;
+ if ( !name )
+ setName( "XsldbgInspector" );
+ resize( 597, 364 );
+ setCaption( i18n( "Xsldbg Inspector" ) );
+ setSizeGripEnabled( true );
+ XsldbgInspectorLayout = new QGridLayout( this, 1, 1, 11, 6,
+ "XsldbgInspectorLayout");
+
+ tabWidget = new QTabWidget( this, "tabWidget" );
+ Q_CHECK_PTR( tabWidget );
+ breakpointWidget = new XsldbgBreakpointsImpl( debugger, tabWidget );
+ Q_CHECK_PTR( breakpointWidget );
+ tabWidget->insertTab( breakpointWidget, i18n( "Breakpoints" ) );
+
+ localWidget = new XsldbgLocalVariablesImpl( debugger, tabWidget );
+ Q_CHECK_PTR( localWidget );
+ tabWidget->insertTab( localWidget,
+ QIconSet( uic_load_pixmap_XsldbgInspector( "xsldbg_source.png" ) ),
+ i18n( "Variables" ) );
+
+ callStackWidget = new XsldbgCallStackImpl( debugger, tabWidget );
+ Q_CHECK_PTR( callStackWidget );
+ tabWidget->insertTab( callStackWidget,
+ QIconSet( uic_load_pixmap_XsldbgInspector( "xsldbg_source.png" ) ),
+ i18n( "CallStack" ));
+
+ templateWidget = new XsldbgTemplatesImpl( debugger, tabWidget );
+ Q_CHECK_PTR( templateWidget );
+ tabWidget->insertTab( templateWidget,
+ QIconSet( uic_load_pixmap_XsldbgInspector( "xsldbg_source.png" ) ),
+ i18n( "Templates" ));
+
+ sourceWidget = new XsldbgSourcesImpl( debugger, tabWidget );
+ Q_CHECK_PTR( sourceWidget );
+ tabWidget->insertTab( sourceWidget,
+ QIconSet( uic_load_pixmap_XsldbgInspector( "xsldbg_source.png" ) ),
+ i18n( "Sources" ));
+
+ entityWidget = new XsldbgEntitiesImpl( debugger, tabWidget );
+ Q_CHECK_PTR( entityWidget );
+ tabWidget->insertTab( entityWidget,
+ QIconSet( uic_load_pixmap_XsldbgInspector( "xsldbg_data.png" ) ),
+ i18n( "Entities" ));
+
+ XsldbgInspectorLayout->addWidget( tabWidget, 0, 1 );
+ Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
+
+ buttonHelp = new KPushButton( KStdGuiItem::help(), this, "buttonHelp" );
+ buttonHelp->setAccel( 4144 );
+ buttonHelp->setAutoDefault( true );
+ Layout1->addWidget( buttonHelp );
+ QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ Layout1->addItem( spacer );
+
+ buttonOk = new KPushButton( KStdGuiItem::ok(), this, "buttonOk" );
+ buttonOk->setAccel( 0 );
+ buttonOk->setAutoDefault( true );
+ buttonOk->setDefault( true );
+ Layout1->addWidget( buttonOk );
+
+ buttonApply = new KPushButton( KStdGuiItem::apply(), this, "buttonApply" );
+ QToolTip::add(buttonApply, i18n("Apply changes to xsldbg after restarting execution"));
+ buttonApply->setAccel( 0 );
+ buttonApply->setAutoDefault( true );
+ buttonApply->setDefault( true );
+ Layout1->addWidget( buttonApply );
+
+ buttonRefresh = new QPushButton( this, "buttonRefresh" );
+ buttonRefresh->setText( i18n( "&Refresh" ) );
+ QToolTip::add(buttonRefresh, i18n("Refresh values in inspectors from xsldbg"));
+ buttonRefresh->setAccel( 0 );
+ buttonRefresh->setAutoDefault( true );
+ buttonRefresh->setDefault( true );
+ Layout1->addWidget( buttonRefresh );
+
+ buttonCancel = new KPushButton( KStdGuiItem::cancel(), this, "buttonCancel" );
+ buttonCancel->setAccel( 0 );
+ buttonCancel->setAutoDefault( true );
+ Layout1->addWidget( buttonCancel );
+
+ XsldbgInspectorLayout->addMultiCellLayout( Layout1, 1, 1, 0, 1 );
+
+ // signals and slots connections
+ connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
+ connect( buttonApply, SIGNAL ( clicked() ), this, SLOT ( update() ) );
+ connect( buttonRefresh, SIGNAL ( clicked() ), this, SLOT ( refresh() ) );
+ connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+
+ hide();
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+XsldbgInspector::~XsldbgInspector()
+{
+ debugger = 0L;
+ // no need to delete child widgets, Qt does it all for us
+}
+
+
+void XsldbgInspector::accept()
+{
+ QDialog::accept();
+}
+
+void XsldbgInspector::reject()
+{
+ QDialog::reject();
+}
+
+
+void XsldbgInspector::refresh()
+{
+
+ refreshBreakpoints();
+ refreshVariables();
+
+ if ( templateWidget != 0L)
+ templateWidget->refresh();
+
+ if ( sourceWidget != 0L)
+ sourceWidget->refresh();
+
+ if ( entityWidget != 0L)
+ entityWidget->refresh();
+
+}
+
+void XsldbgInspector::refreshBreakpoints()
+{
+ if ( breakpointWidget != 0L )
+ breakpointWidget->refresh();
+}
+
+
+void XsldbgInspector::refreshVariables()
+{
+ if ( localWidget != 0L )
+ localWidget->refresh();
+
+ if (callStackWidget != 0L)
+ callStackWidget->refresh();
+}
+
+#include "xsldbginspector.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbginspector.h b/kxsldbg/kxsldbgpart/xsldbginspector.h
new file mode 100644
index 00000000..c879af58
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbginspector.h
@@ -0,0 +1,67 @@
+/**
+ File : xsldbginspector.h
+ Author : Keith Isdale
+ Date : 30th March 2002
+ Description : Dialog to inspect stylesheet using xsldbg. Based on
+ file created by uic
+*/
+#ifndef XSLDBGINSPECTOR_H
+#define XSLDBGINSPECTOR_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QListBox;
+class QListBoxItem;
+class QPushButton;
+class QTabWidget;
+class QWidget;
+class KPushButton;
+
+class XsldbgDebugger;
+class XsldbgBreakpointsImpl;
+class XsldbgLocalVariablesImpl;
+class XsldbgCallStackImpl;
+class XsldbgTemplatesImpl;
+class XsldbgSourcesImpl;
+class XsldbgEntitiesImpl;
+
+class XsldbgInspector : public QDialog
+{
+ Q_OBJECT
+
+public:
+ XsldbgInspector( XsldbgDebugger *debugger, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ~XsldbgInspector();
+
+ QTabWidget* tabWidget;
+ KPushButton* buttonHelp;
+ KPushButton* buttonOk;
+ KPushButton* buttonApply;
+ QPushButton* buttonRefresh;
+ KPushButton* buttonCancel;
+
+
+public slots:
+ void accept();
+ void reject();
+ void refresh();
+ void refreshBreakpoints();
+ void refreshVariables();
+
+
+protected:
+ QGridLayout* XsldbgInspectorLayout;
+ QHBoxLayout* Layout1;
+ XsldbgDebugger *debugger;
+ XsldbgBreakpointsImpl *breakpointWidget;
+ XsldbgLocalVariablesImpl *localWidget;
+ XsldbgCallStackImpl *callStackWidget;
+ XsldbgTemplatesImpl *templateWidget;
+ XsldbgSourcesImpl *sourceWidget;
+ XsldbgEntitiesImpl *entityWidget;
+};
+
+#endif // XSLDBGINPECTOR_H
diff --git a/kxsldbg/kxsldbgpart/xsldbglistitem.cpp b/kxsldbg/kxsldbgpart/xsldbglistitem.cpp
new file mode 100644
index 00000000..9242994f
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbglistitem.cpp
@@ -0,0 +1,46 @@
+/***************************************************************************
+ xsldbglistitem.cpp - description
+ -------------------
+ begin : Sun Jan 6 2002
+ copyright : (C) 2002 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; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "xsldbglistitem.h"
+
+XsldbgListItem::XsldbgListItem(QListView *parent, int columnOffset,
+ const QString & fileName, int lineNumber)
+ : QListViewItem(parent)
+{
+ this->fileName = fileName;
+ this->lineNumber = lineNumber;
+ setText(columnOffset, fileName);
+ /* we may not have a line number column so skip it if needed */
+ if ((listView()->columns() >= columnOffset + 1) && (lineNumber != -1))
+ setText(columnOffset + 1, QString::number(lineNumber));
+}
+
+XsldbgListItem::~XsldbgListItem()
+{
+}
+
+
+QString XsldbgListItem::getFileName() const
+{
+ return fileName;
+}
+
+int XsldbgListItem::getLineNumber() const
+{
+ return lineNumber;
+}
+
diff --git a/kxsldbg/kxsldbgpart/xsldbglistitem.h b/kxsldbg/kxsldbgpart/xsldbglistitem.h
new file mode 100644
index 00000000..35ad39c7
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbglistitem.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ xsldbglistitem.h - description
+
+ -------------------
+ begin : Sun Jan 6 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGLISTITEM_H
+#define XSLDBGLISTITEM_H
+
+/**
+ *@author Keith Isdale
+ */
+
+
+#include <qlistview.h>
+
+class XsldbgListItem : public QListViewItem {
+public:
+ /** column offset is the index of the fileName column */
+ XsldbgListItem(QListView *parent, int columnOffset,
+ const QString &fileName, int lineNumber);
+ ~XsldbgListItem();
+
+
+ QString getFileName() const;
+ int getLineNumber() const;
+
+private:
+ QString fileName;
+ int lineNumber;
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp b/kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp
new file mode 100644
index 00000000..ccade6ac
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp
@@ -0,0 +1,59 @@
+/***************************************************************************
+ xsldbglocallistitem.cpp - description
+ -------------------
+ begin : Sun Jan 13 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbglocallistitem.h"
+#include <klocale.h>
+
+XsldbgLocalListItem::XsldbgLocalListItem(QListView *parent, QString fileName, int lineNumber,
+ QString localName, QString templateContext, QString selectXPath, bool localVariable)
+: XsldbgListItem(parent, 3, fileName, lineNumber)
+{
+ varName = localName;
+ contextName = templateContext;
+ XPath = selectXPath;
+
+ setText(0, localName);
+ setText(1, templateContext);
+ if (localVariable)
+ setText(2, i18n("Local"));
+ else
+ setText(2, i18n("Global"));
+}
+
+XsldbgLocalListItem::~XsldbgLocalListItem()
+{
+}
+
+QString XsldbgLocalListItem::getVarName()
+{
+ return varName;
+}
+
+QString XsldbgLocalListItem::getContextName()
+{
+ return contextName;
+}
+
+QString XsldbgLocalListItem::getXPath()
+{
+ return XPath;
+}
+
+bool XsldbgLocalListItem::isLocalVariable()
+{
+ return localVar;
+}
diff --git a/kxsldbg/kxsldbgpart/xsldbglocallistitem.h b/kxsldbg/kxsldbgpart/xsldbglocallistitem.h
new file mode 100644
index 00000000..ee72ab1a
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbglocallistitem.h
@@ -0,0 +1,51 @@
+/***************************************************************************
+ xsldbglocallistitem.h - description
+ -------------------
+ begin : Sun Jan 13 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGLOCALLISTITEM_H
+#define XSLDBGLOCALLISTITEM_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbglistitem.h"
+
+class XsldbgLocalListItem : public XsldbgListItem {
+public:
+ XsldbgLocalListItem(QListView *parent, QString fileName, int lineNumber,
+ QString localName, QString templateContext, QString selectXPath, bool localVariable);
+ ~XsldbgLocalListItem();
+
+ /** return the name of this variable */
+ QString getVarName();
+
+ /** return the template context for this variable */
+ QString getContextName();
+
+ /** return the XPath for this variable */
+ QString getXPath();
+
+ bool isLocalVariable();
+
+private:
+ QString varName;
+ QString contextName;
+ QString XPath;
+ bool localVar;
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbglocalvariables.ui b/kxsldbg/kxsldbgpart/xsldbglocalvariables.ui
new file mode 100644
index 00000000..2d31320c
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbglocalvariables.ui
@@ -0,0 +1,374 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgLocalVariables</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>XsldbgLocalVaraibles</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>690</width>
+ <height>473</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>Xsldbg Local Variables</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <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>Spacer1</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="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="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Expression:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>expressionEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enter a valid XPath expression</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer>
+ <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="QPushButton">
+ <property name="name">
+ <cstring>expressionButton</cstring>
+ </property>
+ <property name="text">
+ <string>Evaluate</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Result of evaluation will appear in message window</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QListView">
+ <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>Template Context</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Type</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Source File</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Source Line Number</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>varsListView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <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>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Variable expression:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>variableName</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>variableType</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Variable type:</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="1">
+ <property name="name">
+ <cstring>layout8</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>xPathEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>setExpressionButton</cstring>
+ </property>
+ <property name="text">
+ <string>Set Expression</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Set the selection for variable </string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Variable name:</string>
+ </property>
+ </widget>
+ </grid>
+ </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>
+ <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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>refreshBtn</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>expressionButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgLocalVaraibles</receiver>
+ <slot>slotEvaluate()</slot>
+ </connection>
+ <connection>
+ <sender>refreshBtn</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgLocalVaraibles</receiver>
+ <slot>refresh()</slot>
+ </connection>
+ <connection>
+ <sender>setExpressionButton</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgLocalVaraibles</receiver>
+ <slot>slotSetExpression()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>refresh()</slot>
+ <slot>slotEvaluate()</slot>
+ <slot>slotSetExpression()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp
new file mode 100644
index 00000000..bd39fcc8
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp
@@ -0,0 +1,121 @@
+/***************************************************************************
+ xsldbglocalvariablesimpl.cpp - description
+ -------------------
+ begin : Sat Jan 5 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qlistview.h>
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+
+#include "xsldbglocalvariablesimpl.h"
+#include "xsldbglocallistitem.h"
+#include "xsldbgdebugger.h"
+#include <klocale.h>
+
+
+XsldbgLocalVariablesImpl::XsldbgLocalVariablesImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0*/, const char *name /*=0*/)
+ : XsldbgLocalVariables(parent, name), XsldbgDialogBase()
+{
+ this->debugger = debugger;
+ connect(debugger, SIGNAL(variableItem(QString /*name */, QString /* templateContext*/,
+ QString /* fileName */, int /*lineNumber */,
+ QString /* select XPath */, int /* is it a local variable */)),
+ this, SLOT(slotProcVariableItem(QString /*name */, QString /* templateContext*/,
+ QString /* fileName */, int /*lineNumber */,
+ QString /* select XPath */, int /* is it a local variable */)));
+ connect(varsListView, SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(selectionChanged(QListViewItem*)));
+ show();
+}
+
+
+XsldbgLocalVariablesImpl::~XsldbgLocalVariablesImpl()
+{
+ debugger = 0L;
+}
+
+void XsldbgLocalVariablesImpl::slotProcVariableItem(QString name , QString templateContext,
+ QString fileName, int lineNumber,
+ QString selectXPath, int localVariable)
+{
+
+ if (!name.isNull()){
+ varsListView->insertItem(new XsldbgLocalListItem(varsListView,
+ fileName, lineNumber, name, templateContext, selectXPath, localVariable != 0));
+ }
+
+}
+
+void XsldbgLocalVariablesImpl::selectionChanged(QListViewItem *item)
+{
+ XsldbgLocalListItem *localItem = dynamic_cast<XsldbgLocalListItem*>(item);
+ if (localItem){
+ variableName->setText(localItem->getVarName());
+ xPathEdit->setText(localItem->getXPath());
+
+ if (localItem->isLocalVariable())
+ variableType->setText(i18n("Local"));
+ else
+ variableType->setText(i18n("Global"));
+
+ setExpressionButton->setEnabled(!localItem->getXPath().isEmpty());
+ xPathEdit->setEnabled(!localItem->getXPath().isEmpty());
+ debugger->gotoLine(localItem->getFileName(), localItem->getLineNumber());
+ }else{
+ // "clear" values in variable editing widgets
+ variableName->setText("");
+ xPathEdit->setText("");
+ variableType->setText("");
+ setExpressionButton->setEnabled(false);
+ xPathEdit->setEnabled(false);
+ }
+
+}
+
+void XsldbgLocalVariablesImpl::refresh()
+{
+ if (varsListView){
+ varsListView->clear();
+ debugger->fakeInput("locals -q", true) ;
+ // "clear" values in variable editing widgets
+ variableName->setText("");
+ xPathEdit->setText("");
+ variableType->setText("");
+ setExpressionButton->setEnabled(false);
+ xPathEdit->setEnabled(false);
+ }
+}
+
+void XsldbgLocalVariablesImpl::slotEvaluate()
+{
+ if (debugger != 0L)
+ debugger->slotCatCmd( expressionEdit->text() );
+}
+
+void XsldbgLocalVariablesImpl::slotSetExpression()
+{
+ if (debugger != 0L){
+ debugger->slotSetVariableCmd( variableName->text(), xPathEdit->text() );
+ refresh();
+ }
+}
+
+
+
+
+
+#include "xsldbglocalvariablesimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h b/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h
new file mode 100644
index 00000000..0f05b0ef
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h
@@ -0,0 +1,60 @@
+/***************************************************************************
+ xsldbglocalvariablesimpl.h - description
+ -------------------
+ begin : Sat Jan 5 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGLOCALVARIABLESIMPL_H
+#define XSLDBGLOCALVARIABLESIMPL_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbglocalvariables.h"
+#include "xsldbgdialogbase.h"
+
+class XsldbgDebugger;
+
+class XsldbgLocalVariablesImpl : public XsldbgLocalVariables, public XsldbgDialogBase {
+ Q_OBJECT
+
+public:
+ XsldbgLocalVariablesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgLocalVariablesImpl();
+
+public slots:
+ /** Process request to add local varaible to view, First parameter is QString::null
+ to indicate start of local variable list notfication */
+
+ void slotProcVariableItem(QString /*name */, QString /* templateContext*/,
+ QString /* fileName */, int /*lineNumber */,
+ QString /* select XPath */, int /* is it a local variable */);
+
+ void selectionChanged(QListViewItem *item);
+
+ /** refresh data from source */
+ void refresh();
+
+ void slotEvaluate();
+
+ void slotSetExpression();
+
+
+private:
+ XsldbgDebugger *debugger;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgmsgdialog.ui b/kxsldbg/kxsldbgpart/xsldbgmsgdialog.ui
new file mode 100644
index 00000000..8ba1cac3
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgmsgdialog.ui
@@ -0,0 +1,175 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgMsgDialog</class>
+<comment>Used with QT3 or greater</comment>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>XsldbgMsgDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>456</width>
+ <height>211</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>qxsldbg Message</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</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="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout3</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>iconLbl</cstring>
+ </property>
+ <property name="text">
+ <string>TextLabel1</string>
+ </property>
+ </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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QTextEdit">
+ <property name="name">
+ <cstring>msgTextEdit</cstring>
+ </property>
+ <property name="resizePolicy">
+ <enum>AutoOneFit</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <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>
+ <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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>PushButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>PushButton1</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgMsgDialog</receiver>
+ <slot>accept()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h b/kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h
new file mode 100644
index 00000000..a801d49b
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h
@@ -0,0 +1,30 @@
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBMSGDIALOGIMPL_H
+#define XSLDBMSGDIALOGIMPL_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbgmsgdialog.h"
+#include <qtextedit.h>
+
+class XsldbgMsgDialogImpl : public XsldbgMsgDialog {
+
+public:
+
+ XsldbgMsgDialogImpl(QWidget *parent,
+ QMessageBox::Icon icon,
+ const QString & title, const QString &msg);
+
+ void append(const QString &text);
+};
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp b/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp
new file mode 100644
index 00000000..6284ddec
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp
@@ -0,0 +1,156 @@
+/***************************************************************************
+ xsldbgoutputview.cpp - Display raw output from xsldbg
+ -------------------
+ begin : Sat July 27 2002
+ copyright : (C) 2002 by keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ************************************************************************************/
+
+/**
+ *@author Keith Isdale
+ */
+
+#include <klocale.h>
+
+#include <qlayout.h>
+#include <qmessagebox.h>
+#include <qdialog.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+
+#if QT_VERSION >= 300
+#include "xsldbgmsgdialogimpl.h"
+#else
+#include "xsldbgmsgdialogimpl2.h"
+#endif
+
+
+XsldbgMsgDialogImpl::XsldbgMsgDialogImpl(QWidget *parent,
+ QMessageBox::Icon icon,
+ const QString &title, const QString &msg)
+#if QT_VERSION >= 300
+ : XsldbgMsgDialog(parent, "XsldbgMsgDialogImpl" , TRUE )
+#else
+ : XsldbgMsgDialog2(parent, "XsldbgMsgDialogImpl" , TRUE )
+#endif
+{
+ setCaption(title);
+
+ QMessageBox tmpMsg;
+ tmpMsg.setIcon(icon);
+ msgTextEdit->setText(msg);
+ iconLbl->setPixmap(*tmpMsg.iconPixmap());
+}
+
+void XsldbgMsgDialogImpl::append(const QString &text)
+{
+ msgTextEdit->append(text);
+}
+
+
+
+#if QT_VERSION >= 300
+
+#include "xsldbgoutputview.h"
+
+XsldbgOutputView::XsldbgOutputView(QWidget * parent)
+ : QTextEdit(parent, "outputview")
+{
+ new QBoxLayout(this, QBoxLayout::TopToBottom);
+ setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
+ setMinimumSize(QSize(500, 80));
+ setCaption(i18n("xsldbg Output"));
+ setText(i18n("\t\txsldbg output capture ready\n\n"));
+ dlg = 0L;
+ show();
+ setReadOnly(TRUE);
+}
+
+#else
+
+#include "xsldbgoutputview2.h"
+
+XsldbgOutputView::XsldbgOutputView(QWidget * parent)
+ : QTextView(parent, "outputview")
+{
+ new QBoxLayout(this, QBoxLayout::TopToBottom);
+ setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
+ setMinimumSize(QSize(500,80));
+ setCaption(i18n("xsldbg Output"));
+ setText(i18n("\t\txsldbg output capture ready\n\n"));
+ dlg = 0L;
+ show();
+}
+#endif // QT_VERSION
+
+void XsldbgOutputView::slotProcShowMessage(QString msg)
+{
+ bool processed = FALSE;
+ // Is this a result of an evaluate command
+ if ((msg[0] == QChar('=')) && (msg[1] == QChar(' '))){
+ int endPosition = msg.find(QChar('\n'));
+ if (endPosition >= 0){
+ processed = TRUE;
+ showDialog(QMessageBox::Information, i18n("Result of evaluation"),
+ msg.mid(endPosition + 1));
+ }
+ }else /* Is there some sort of error message in msg */
+ if ((msg.find("Error:") != -1) ||
+ (msg.find("Warning:") != -1) ||
+ (msg.find("Request to xsldbg failed") != -1) ||
+ /* the following errors are libxml or libxslt generated */
+ (msg.find("error:") != -1) ||
+ (msg.find("xmlXPathEval:") != -1) ||
+ (msg.find("runtime error") != -1)) {
+ /* OK we've found an error but ingore any errors about
+ data or source files */
+ if ((msg.find("Error: No XSL source file supplied") == -1) &&
+ (msg.find("Error: No XML data file supplied") == -1) &&
+ (msg.find("Load of source deferred") == -1) &&
+ (msg.find("Load of data deferred") == -1) )
+ showDialog(QMessageBox::Warning, i18n("Request Failed "),
+ msg);
+ processed = TRUE;
+ }
+ if (processed == FALSE){
+ if (isVisible() == FALSE)
+ show();
+ append(msg);
+ }
+}
+
+
+void XsldbgOutputView::slotClearView()
+{
+}
+
+void XsldbgOutputView::showDialog(QMessageBox::Icon icon, QString title,
+ QString msg)
+{
+
+ if ( dlg ){
+ // not pretty, add this text to the open dialog when multiple
+ // calls to showDialog are made
+ dlg->append(msg);
+ }else{
+ dlg = new XsldbgMsgDialogImpl(this, icon, title, msg);
+ if ( dlg ){
+ dlg->exec();
+ delete dlg;
+ dlg = 0L;
+ }
+ }
+}
+
+
+
+#include "xsldbgoutputview.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgoutputview.h b/kxsldbg/kxsldbgpart/xsldbgoutputview.h
new file mode 100644
index 00000000..547ca907
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgoutputview.h
@@ -0,0 +1,51 @@
+/***************************************************************************
+ xsldbgoutputview.h - Display raw output from xsldbg
+ -------------------
+ begin : Sat July 27 2002
+ copyright : (C) 2002 by keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGOUTPUTVIEW_H
+#define XSLDBGOUTPUTVIEW_H
+
+/**
+ *@author Keith Isdale
+ */
+#include <qtextedit.h>
+#include <qmessagebox.h>
+
+class QDialog;
+class XsldbgMsgDialogImpl;
+
+class XsldbgOutputView : public QTextEdit {
+ Q_OBJECT
+
+public :
+ XsldbgOutputView(QWidget *parent = 0);
+
+ void showDialog(QMessageBox::Icon icon, QString title, QString msg);
+
+public slots:
+ /** Process a copy of mesage sent to message window */
+ void slotProcShowMessage(QString msg);
+
+ /** Clear message view window of its text */
+ void slotClearView();
+
+ private:
+
+ XsldbgMsgDialogImpl *dlg;
+
+};
+
+#endif /* XSLDBGOUTPUTVIEW_H */
diff --git a/kxsldbg/kxsldbgpart/xsldbgsources.ui b/kxsldbg/kxsldbgpart/xsldbgsources.ui
new file mode 100644
index 00000000..b6073eb6
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgsources.ui
@@ -0,0 +1,154 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgSources</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>XsldbgSources</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>536</width>
+ <height>365</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Xsldbg Source Files</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="0">
+ <column>
+ <property name="text">
+ <string>Source File</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Parent File</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Parent Line Number</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>sourceListView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </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>Spacer4</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>refreshBtn</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>sourceListView</sender>
+ <signal>selectionChanged(QListViewItem*)</signal>
+ <receiver>XsldbgSources</receiver>
+ <slot>selectionChanged(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>refreshBtn</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgSources</receiver>
+ <slot>refresh()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>refresh()</slot>
+ <slot>selectionChanged(QListViewItem*)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp
new file mode 100644
index 00000000..1c0528f0
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp
@@ -0,0 +1,73 @@
+/***************************************************************************
+ xsldbgsourcesimpl.cpp - description
+ -------------------
+ begin : Fri Jan 4 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qlistview.h>
+#include <qlineedit.h>
+
+#include "xsldbgsourcesimpl.h"
+#include "xsldbgdebugger.h"
+#include "xsldbggloballistitem.h"
+
+
+XsldbgSourcesImpl::XsldbgSourcesImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0*/, const char *name /*=0*/)
+ : XsldbgSources(parent, name), XsldbgDialogBase()
+{
+ this->debugger = debugger;
+ connect(debugger, SIGNAL(sourceItem(QString /* fileName */, QString /* parentFileName */, int /*lineNumber */)),
+ this, SLOT(slotProcSourceItem(QString /* fileName */, QString /* parentFileName */, int /*lineNumber */)));
+
+ connect( sourceListView, SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(selectionChanged(QListViewItem*)));
+
+ show();
+ refresh();
+}
+
+XsldbgSourcesImpl::~XsldbgSourcesImpl(){
+ debugger = 0L;
+}
+
+void XsldbgSourcesImpl::slotProcSourceItem(QString fileName , QString parentFileName , int lineNumber )
+{
+ if (fileName.isNull()){
+ sourceListView->clear();
+ }else{
+ sourceListView->insertItem(new XsldbgGlobalListItem(sourceListView,
+ parentFileName, lineNumber, fileName));
+ }
+}
+
+
+void XsldbgSourcesImpl::selectionChanged(QListViewItem *item)
+{
+ XsldbgGlobalListItem *sourceItem = dynamic_cast<XsldbgGlobalListItem*>(item);
+ if (sourceItem){
+ debugger->gotoLine(sourceItem->getVarName(), 1);
+ }
+}
+
+void XsldbgSourcesImpl::refresh()
+{
+ debugger->fakeInput("stylesheets", true) ;
+}
+
+
+
+
+
+#include "xsldbgsourcesimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h b/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h
new file mode 100644
index 00000000..b8afe34e
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ xsldbgsourcesimpl.h - description
+ -------------------
+ begin : Fri Jan 4 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGSOURCESIMPL_H
+#define XSLDBGSOURCESIMPL_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbgsources.h"
+#include "xsldbgdialogbase.h"
+
+class XsldbgDebugger;
+
+class XsldbgSourcesImpl : public XsldbgSources, public XsldbgDialogBase {
+ Q_OBJECT
+
+public:
+ XsldbgSourcesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgSourcesImpl();
+
+public slots:
+ void selectionChanged(QListViewItem *item);
+
+ /** Process request to add source to view, First parameter is QString::null
+ to indicate start of source list notfication */
+ void slotProcSourceItem(QString fileName , QString parentFileName , int lineNumber );
+
+ /** refresh data from source */
+ void refresh();
+
+
+private:
+ XsldbgDebugger *debugger;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp b/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp
new file mode 100644
index 00000000..8c58b9fc
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp
@@ -0,0 +1,32 @@
+/***************************************************************************
+ xsldbgtemplatelistitem.cpp - description
+ -------------------
+ begin : Mon Jan 21 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "xsldbgtemplatelistitem.h"
+
+XsldbgTemplateListItem::XsldbgTemplateListItem(QListView *parent,
+ QString fileName, int lineNumber, QString templateName, QString modeName)
+ : XsldbgListItem(parent, 2, fileName, lineNumber)
+{
+ this->templateName = templateName;
+ setText(0, templateName);
+ this->modeName = modeName;
+ setText(1, modeName);
+}
+
+XsldbgTemplateListItem::~XsldbgTemplateListItem()
+{
+}
diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h b/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h
new file mode 100644
index 00000000..5a10a6ff
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h
@@ -0,0 +1,44 @@
+/***************************************************************************
+ xsldbgtemplatelistitem.h - description
+ -------------------
+ begin : Mon Jan 21 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGTEMPLATELISTITEM_H
+#define XSLDBGTEMPLATELISTITEM_H
+
+/**
+ *@author Keith Isdale
+ */
+#include "xsldbglistitem.h"
+
+class XsldbgTemplateListItem : public XsldbgListItem {
+public:
+ XsldbgTemplateListItem(QListView *parent,
+ QString fileName, int lineNumber, QString templateName, QString modeName);
+ ~XsldbgTemplateListItem();
+
+ /** return the name of this template */
+ QString getTemplateName();
+
+ /** return the mode of this template */
+ QString getModeName();
+
+private:
+ QString templateName;
+ QString modeName;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplates.ui b/kxsldbg/kxsldbgpart/xsldbgtemplates.ui
new file mode 100644
index 00000000..9804bcef
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgtemplates.ui
@@ -0,0 +1,100 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgTemplates</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>XsldbgTemplates</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>491</width>
+ <height>232</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Xsldbg Templates</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="0">
+ <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>Mode</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Source File Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Line Number</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>templatesListView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>templatesListView</sender>
+ <signal>selectionChanged(QListViewItem*)</signal>
+ <receiver>XsldbgTemplates</receiver>
+ <slot>selectionChanged(QListViewItem*)</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>selectionChanged(QListViewItem*)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp
new file mode 100644
index 00000000..ebc25bee
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp
@@ -0,0 +1,68 @@
+/***************************************************************************
+ xsldbgtemplatesimpl.cpp - description
+ -------------------
+ begin : Fri Jan 4 2002
+ copyright : (C) 2002 by keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qlistview.h>
+#include <qlineedit.h>
+
+#include "xsldbgdebugger.h"
+#include "xsldbgtemplatesimpl.h"
+#include "xsldbgtemplatelistitem.h"
+
+XsldbgTemplatesImpl::XsldbgTemplatesImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0*/, const char *name /*=0*/)
+ : XsldbgTemplates(parent, name), XsldbgDialogBase()
+{
+ this->debugger = debugger;
+
+ connect(debugger, SIGNAL(templateItem(QString /* name*/, QString /*mode*/, QString /* fileName */, int /* lineNumber */)),
+ this, SLOT(slotProcTemplateItem(QString /* name*/, QString /*mode*/, QString /* fileName */, int /* lineNumber */)));
+ connect( templatesListView, SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(selectionChanged(QListViewItem*)));
+
+ show();
+}
+
+XsldbgTemplatesImpl::~XsldbgTemplatesImpl(){
+ debugger = 0L;
+}
+
+
+void XsldbgTemplatesImpl::slotProcTemplateItem(QString name, QString mode, QString fileName , int lineNumber )
+{
+ if (name.isNull())
+ templatesListView->clear();
+ else
+ templatesListView->insertItem(new XsldbgTemplateListItem(templatesListView,
+ fileName, lineNumber, name, mode));
+}
+
+
+void XsldbgTemplatesImpl::selectionChanged(QListViewItem *item)
+{
+ XsldbgTemplateListItem *templateItem = dynamic_cast<XsldbgTemplateListItem*>(item);
+ if (templateItem){
+ debugger->gotoLine(templateItem->getFileName(), templateItem->getLineNumber());
+ }
+}
+
+void XsldbgTemplatesImpl::refresh()
+{
+ debugger->fakeInput("templates", true) ;
+}
+
+
+
+#include "xsldbgtemplatesimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h b/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h
new file mode 100644
index 00000000..1a9705fe
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ xsldbgtemplatesimpl.h - description
+ -------------------
+ begin : Fri Jan 4 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGTEMPLATESIMPL_H
+#define XSLDBGTEMPLATESIMPL_H
+
+
+/**
+ *@author Keith Isdale
+ */
+
+
+#include "xsldbgtemplates.h"
+#include "xsldbgdialogbase.h"
+
+class XsldbgDebugger;
+
+class XsldbgTemplatesImpl : public XsldbgTemplates, public XsldbgDialogBase {
+ Q_OBJECT
+
+public:
+ XsldbgTemplatesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgTemplatesImpl();
+
+public slots:
+ void selectionChanged(QListViewItem *item);
+
+ /** Process request to add template to view, First parameter is QString::null
+ to indicate start of template list notfication */
+ void slotProcTemplateItem(QString name, QString mode, QString fileName , int lineNumber );
+
+ /** refresh data from source */
+ void refresh();
+
+
+private:
+ XsldbgDebugger *debugger;
+
+};
+
+#endif
diff --git a/kxsldbg/kxsldbgpart/xsldbgwalkspeed.ui b/kxsldbg/kxsldbgpart/xsldbgwalkspeed.ui
new file mode 100644
index 00000000..2088d97f
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgwalkspeed.ui
@@ -0,0 +1,239 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>XsldbgWalkSpeed</class>
+<author>Keith Isdale &lt;k_isdale@tpg.com.au&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>XsldbgWalkSpeed</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>382</width>
+ <height>292</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Configure xsldbg's Walk Speed</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>60</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Change the speed at which xsldbg walks through execution of the stylesheet.</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter|AlignLeft</set>
+ </property>
+ <property name="wordwrap" stdset="0">
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>51</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="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Slow</string>
+ </property>
+ </widget>
+ <widget class="QSlider">
+ <property name="name">
+ <cstring>walkSpeedSlider</cstring>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ <property name="maxValue">
+ <number>9</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Fast</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>51</height>
+ </size>
+ </property>
+ </spacer>
+ <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>
+ <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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>PushButton1</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>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>PushButton2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</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>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>PushButton1</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgWalkSpeed</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton2</sender>
+ <signal>clicked()</signal>
+ <receiver>XsldbgWalkSpeed</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp
new file mode 100644
index 00000000..376fbfb7
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp
@@ -0,0 +1,49 @@
+/***************************************************************************
+ xsldbgwalkspeedimpl.cpp - description
+ -------------------
+ begin : Fri Jan 25 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 <qslider.h>
+
+#include "xsldbgdebugger.h"
+#include "xsldbgwalkspeedimpl.h"
+
+XsldbgWalkSpeedImpl::XsldbgWalkSpeedImpl(XsldbgDebugger *debugger,
+ QWidget *parent /*=0 */, const char *name /*=0*/ )
+ : XsldbgWalkSpeed(parent, name, false)
+{
+ this->debugger = debugger;
+}
+
+XsldbgWalkSpeedImpl::~XsldbgWalkSpeedImpl()
+{
+}
+
+void XsldbgWalkSpeedImpl::accept()
+{
+ /* For xsldbg 1 means fast speed 9 means slow so invert the slider value to suit
+ ie : a slider value of 1 results in walk speed of 9 */
+ debugger->slotWalkSpeed(10 - walkSpeedSlider->value());
+ hide();
+}
+
+void XsldbgWalkSpeedImpl::reject()
+{
+ hide();
+}
+
+
+
+#include "xsldbgwalkspeedimpl.moc"
diff --git a/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h b/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h
new file mode 100644
index 00000000..dafe86d7
--- /dev/null
+++ b/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ xsldbgwalkspeedimpl.h - description
+ -------------------
+ begin : Fri Jan 25 2002
+ copyright : (C) 2002 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***********************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 XSLDBGWALKSPEEDIMPL_H
+#define XSLDBGWALKSPEEDIMPL_H
+
+/**
+ *@author Keith Isdale
+ */
+
+#include "xsldbgwalkspeed.h"
+
+class XsldbgDebugger;
+
+class XsldbgWalkSpeedImpl : public XsldbgWalkSpeed {
+ Q_OBJECT
+
+public:
+ XsldbgWalkSpeedImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0);
+ ~XsldbgWalkSpeedImpl();
+
+public slots:
+ void accept() ;
+ void reject();
+
+private:
+ XsldbgDebugger *debugger;
+
+};
+
+#endif
diff --git a/kxsldbg/lo16-app-kxsldbg.png b/kxsldbg/lo16-app-kxsldbg.png
new file mode 100644
index 00000000..0985586b
--- /dev/null
+++ b/kxsldbg/lo16-app-kxsldbg.png
Binary files differ
diff --git a/kxsldbg/lo32-app-kxsldbg.png b/kxsldbg/lo32-app-kxsldbg.png
new file mode 100644
index 00000000..12542c8a
--- /dev/null
+++ b/kxsldbg/lo32-app-kxsldbg.png
Binary files differ
diff --git a/kxsldbg/main.cpp b/kxsldbg/main.cpp
new file mode 100644
index 00000000..ca7b18b3
--- /dev/null
+++ b/kxsldbg/main.cpp
@@ -0,0 +1,38 @@
+#include "kxsldbg.h"
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+static const char *description =
+ I18N_NOOP("A KDE KPart Application for xsldbg, an XSLT debugger");
+
+static const char *version = VERSION;
+static const KCmdLineOptions options[] =
+{
+ { "+XSLSource", I18N_NOOP("XSL script to run"), 0},
+ { "+XMLData", I18N_NOOP("XML data to be transformed"), 0},
+ { "+OutputFile", I18N_NOOP("File to save results to"), 0},
+ KCmdLineLastOption // End of options.
+};
+
+int main(int argc, char **argv)
+{
+ KAboutData about("kxsldbg", I18N_NOOP("KXSLDbg"), version, description, KAboutData::License_GPL, "(C) 2003 Keith Isdale", 0, 0, "k_isdale@tpg.com.au");
+ about.addAuthor( "Keith Isdale", 0, "k_isdale@tpg.com.au" );
+ KCmdLineArgs::init(argc, argv, &about);
+ KCmdLineArgs::addCmdLineOptions( options );
+ KApplication app;
+
+ // see if we are starting with session management
+ if (app.isRestored())
+ RESTORE(KXsldbg)
+ else
+ {
+ KXsldbg *widget = new KXsldbg;
+ widget->show();
+ }
+
+ return app.exec();
+}
diff --git a/kxsldbg/output.txt b/kxsldbg/output.txt
new file mode 100644
index 00000000..0d7db4bb
--- /dev/null
+++ b/kxsldbg/output.txt
@@ -0,0 +1,50 @@
+
+ xsldbg version 0.5.9
+ ====================
+
+ xsldbg help
+ ___________
+
+xsldbg is similar to gdb. It has three major modes of execution of stylesheets.
+ Run the whole stylesheet
+ Step to next xsl instruction
+ Continue until next break point is found, or stylesheet has restarted
+
+On systems with readline library available you can use the back/forward keys to navigate the history of entered commands. On all systems the last entered command can be repeated by just pressing the <ENTER> key.
+
+ TEMPLATENAME : a valid template name
+ FILENAME : a valid URL for a stylesheet
+ LINENO : a valid line number in associated FILENAME
+ NUMBER_OF_FRAMES : a valid line number frames to change position by
+ BREAKPOINT_ID : a valid break point number
+ SPEED: speed to walk through code at, between 0 to 9
+ (Comment): a comment about command meaning or usage
+ { opt1 | opt2 | opt2 .. etc} : Choose one of the opt's
+ XPATH : a xpath selection of node(s)
+ PARAM_ID : a valid parameter number as indicated by showparam command
+ PATH : a path to change working directory to
+ TEXT : free form text (no restrictions)
+ COMMAND : a valid command for the xsdbg
+ QNAME : a valid variable/parameter name
+ SOURCE : the stylesheet being/to be executed
+ DATA : the xml data(document) being/to be processed by the stylesheet
+ DEVICE_PATH : is a valid terminal on the operating system
+ TTY_LEVEL : is a valid level of input/output to use
+
+
+ Help related :help
+ Running related : {bye|exit|quit},step,stepup,stepdown,continue,run,trace
+ Libxslt parameter related :addparam,delparam,showparam
+ Template related :templates,where,frame
+ Break point related :break,showbreak,delete,enable
+ Expression viewing(xpath) :cat
+ Node viewing :ls,dir,du,cat,pwd
+ Variable viewing :globals,locals,cat
+ Node selection :source,data,cd
+ Searching :search
+ Operating system related :chdir,shell,tty
+ File related :validate,load,save,write,free
+
+nb: At the moment the file related commands as disabled because they are not completed.
+
+ Help document version 0.5
diff --git a/kxsldbg/simpleio.c b/kxsldbg/simpleio.c
new file mode 100644
index 00000000..900a698a
--- /dev/null
+++ b/kxsldbg/simpleio.c
@@ -0,0 +1,144 @@
+
+/***************************************************************************
+ simpleio.c - use console io only
+ -------------------
+ begin : Sun Dec 23 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "kxsldbgpart/libxsldbg/xsldbg.h"
+
+#include <libxslt/xsltutils.h>
+
+#ifdef HAVE_READLINE
+#include <readline/readline.h>
+#ifdef HAVE_HISTORY
+#include <readline/history.h>
+#endif
+#endif
+
+#include <string.h>
+
+#include "kxsldbgpart/libxsldbg/xsldbgmsg.h"
+#include "kxsldbgpart/libxsldbg/xsldbgio.h"
+#include "kxsldbgpart/libxsldbg/options.h"
+
+
+int notifyXsldbgApp(XsldbgMessageEnum type, const void *data)
+{
+ return 1;
+}
+
+int notifyStateXsldbgApp(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState, const char *text)
+{
+ return 1;
+}
+
+int notifyTextXsldbgApp(XsldbgMessageEnum type, const char *text)
+{
+ return 1;
+}
+
+
+/* use this function instead of the one that was in debugXSL.c */
+/**
+ * xslShellReadline:
+ * @prompt: the prompt value
+ *
+ * Read a string
+ *
+ * Returns a copy of the text inputed or NULL if EOF in stdin found.
+ * The caller is expected to free the returned string.
+ */
+xmlChar *
+xslDbgShellReadline(xmlChar * prompt)
+{
+
+ static char last_read[DEBUG_BUFFER_SIZE] = { '\0' };
+
+#ifdef HAVE_READLINE
+
+ xmlChar *line_read;
+
+ if (optionsGetIntOption(OPTIONS_STDOUT) == 0){
+ /* Get a line from the user. */
+ line_read = (xmlChar *) readline((char *) prompt);
+
+ /* If the line has any text in it, save it on the history. */
+ if (line_read && *line_read) {
+ char *temp = (char*)line_read;
+ add_history((char *) line_read);
+ strncpy((char*)last_read, (char*)line_read, DEBUG_BUFFER_SIZE - 1);
+ /* we must ensure that the data is free properly */
+ line_read = xmlStrdup((xmlChar*)line_read);
+ free(temp);
+ } else {
+ free(line_read);
+ /* if only <Enter>is pressed then try last saved command line */
+ line_read = xmlStrdup((xmlChar*)last_read);
+ }
+ }else{
+ /* readline library will/may echo its output which is not wanted
+ when running in gdb mode.*/
+ char line_buffer[DEBUG_BUFFER_SIZE];
+
+ if (prompt != NULL)
+ xsltGenericError(xsltGenericErrorContext, "%s", prompt);
+ if (!fgets(line_buffer, sizeof(line_buffer) - 1, stdin)){
+ line_read = NULL;
+ }else{
+ line_buffer[DEBUG_BUFFER_SIZE - 1] = 0;
+ if ((strlen(line_buffer) == 0) || (line_buffer[0] == '\n')){
+ line_read = xmlStrdup((xmlChar*)last_read);
+ }else{
+ add_history((char *) line_buffer);
+ line_read = xmlStrdup((xmlChar*)line_buffer);
+ strncpy((char*)last_read, (char*)line_read, sizeof(last_read) - 1); }
+ }
+
+ }
+ return (line_read);
+
+#else
+ char line_read[DEBUG_BUFFER_SIZE];
+
+ if (prompt != NULL)
+ xsltGenericError(xsltGenericErrorContext, "%s", prompt);
+ fflush(stderr);
+ if (!fgets(line_read, DEBUG_BUFFER_SIZE - 1, stdin))
+ return (NULL);
+ line_read[DEBUG_BUFFER_SIZE - 1] = 0;
+ /* Repeat of last command when gdb mode is disabled */
+ if (optionsGetIntOption(OPTIONS_GDB) == 0){
+ /* if only <Enter>is pressed then try last saved command line */
+ if ((strlen(line_read) == 0) || (line_read[0] == '\n')) {
+ strncpy(line_read, last_read, sizeof(line_read) - 1);
+ } else {
+ strcpy(last_read, line_read);
+ }
+ }
+ return xmlStrdup((xmlChar*)line_read);
+#endif
+
+ }
+
+void xsldbgThreadCleanup(void);
+
+/* thread has died so cleanup after it not called directly but via
+ notifyXsldbgApp*/
+void
+xsldbgThreadCleanup(void)
+{
+
+}
diff --git a/kxsldbg/xsldbgmain.cpp b/kxsldbg/xsldbgmain.cpp
new file mode 100644
index 00000000..23f6bb0b
--- /dev/null
+++ b/kxsldbg/xsldbgmain.cpp
@@ -0,0 +1,256 @@
+
+/***************************************************************************
+ main.c - main fiule for xsldbg
+ -------------------
+ begin : Sat Dec 22 2001
+ copyright : (C) 2001 by Keith Isdale
+ email : k_isdale@tpg.com.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the 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 "kxsldbgpart/libxsldbg/xsldbg.h"
+
+#include <libxslt/xsltutils.h>
+
+#ifdef HAVE_READLINE
+#include <readline/readline.h>
+#ifdef HAVE_HISTORY
+#include <readline/history.h>
+#endif
+#endif
+
+#include <string.h>
+#include "kxsldbgpart/libxsldbg/xsldbgmsg.h"
+#include "kxsldbgpart/libxsldbg/xsldbgio.h"
+#include "kxsldbgpart/libxsldbg/xsldbg.h"
+#include "kxsldbgpart/libxsldbg/options.h"
+
+#include <libxslt/xsltutils.h>
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <kdebug.h>
+/* Forward delare private functions */
+static int notifyXsldbgAppSimple(XsldbgMessageEnum type, const void *data);
+static int notifyStateXsldbgAppSimple(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState, const char *text);
+static int notifyTextXsldbgAppSimple(XsldbgMessageEnum type, const char *text);
+static xmlChar * xslDbgShellReadlineSimple(xmlChar * prompt);
+
+
+static const char *description = I18N_NOOP("A KDE console application for xsldbg, an XSLT debugger");
+
+static const char *version = VERSION;
+
+static const KCmdLineOptions options[] =
+{
+ { "shell", I18N_NOOP("Start a shell"), 0},
+ { "cd <path>", I18N_NOOP("Path to change into before loading files"), 0},
+ { "param <name>:<value>",I18N_NOOP("Add a parameter named <name> and value <value> to XSL environment"), 0},
+ { "lang <LANG>", I18N_NOOP("Use ISO 639 language code specified; for example en_US"), 0}, { "output file", I18N_NOOP("Save to a given file. See output command documentation"), 0},
+ { "version", I18N_NOOP("Show the version of libxml and libxslt used"), 0},
+ { "verbose", I18N_NOOP("Show logs of what is happening"), 0},
+ { "timing", I18N_NOOP("Display the time used"), 0},
+ { "repeat", I18N_NOOP("Run the transformation 20 times"), 0},
+#ifdef LIBXML_DEBUG_ENABLED
+ { "debug", I18N_NOOP("Dump the tree of the result instead"), 0},
+#endif
+ { "novalid", I18N_NOOP("Disable the DTD loading phase"), 0},
+ { "noout", I18N_NOOP("Disable the output of the result"), 0},
+ { "maxdepth val", I18N_NOOP("Increase the maximum depth"), 0},
+
+#ifdef LIBXML_HTML_ENABLED
+ { "html", I18N_NOOP("The input document is(are) an HTML file(s)"), 0},
+#endif
+
+#ifdef LIBXML_DOCB_ENABLED
+ { "docbook", I18N_NOOP("The input document is SGML docbook"), 0},
+#endif
+
+ { "nonet", I18N_NOOP("Disable the fetching DTDs or entities over network"), 0},
+
+#ifdef LIBXML_CATALOG_ENABLED
+ { "catalogs", I18N_NOOP("Use the catalogs from $SGML_CATALOG_FILES"), 0},
+#endif
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+ { "noxinclude", I18N_NOOP("Disable XInclude processing on document input"), 0},
+#endif
+
+ { "profile", I18N_NOOP("Print profiling informations"), 0},
+ { "nogdb", I18N_NOOP("Do not run gdb compatability mode and print less information"), 0},
+ { "autoencode", I18N_NOOP("Detect and use encodings in the stylesheet"), 0},
+ { "utf8input", I18N_NOOP("Treat command line input as encoded in UTF-8"), 0},
+ { "preferhtml", I18N_NOOP("Use HTML output when generating search reports"), 0},
+ { "stdout", I18N_NOOP("Print all error messages to stdout, normally error messages go to stderr"), 0},
+ { "noautorestart", I18N_NOOP("Disable the automatic restarting of execution when current processing pass is complete"), 0},
+ { "+XSLSource", I18N_NOOP("XSL script to run"), 0},
+ { "+XMLData", I18N_NOOP("XML data to be transformed"), 0},
+ KCmdLineLastOption // End of options.
+};
+
+class XsldbgApp : public KApplication
+{
+ public:
+ XsldbgApp()
+ :KApplication(false, false)
+ {
+ xsldbgSetAppFunc(notifyXsldbgAppSimple);
+ xsldbgSetAppStateFunc(notifyStateXsldbgAppSimple);
+ xsldbgSetTextFunc(notifyTextXsldbgAppSimple);
+ xsldbgSetReadlineFunc(xslDbgShellReadlineSimple);
+ }
+
+ int exec(){
+ return xsldbgMain(0, 0);
+ }
+
+};
+
+int main(int argc, char **argv)
+{
+ KLocale::setMainCatalogue("kxsldbg"); // Translations come from KXSLDbg's catalog
+
+ QString xsldbgRunTimeInfo(i18n("Using libxml %1, libxslt %2 and libexslt %3\n").arg(xmlParserVersion).arg(xsltEngineVersion).arg(exsltLibraryVersion));
+ QString libxmlCompileTimeInfo(i18n("xsldbg was compiled against libxml %1, libxslt %2 and libexslt %3\n").arg(LIBXML_VERSION).arg(LIBXSLT_VERSION).arg(LIBEXSLT_VERSION));
+ QString libxsltCompileTimeInfo(i18n("libxslt %1 was compiled against libxml %2\n").arg(xsltLibxsltVersion).arg(xsltLibxmlVersion));
+ QString libexsltCompileTimeInfo(i18n("libexslt %1 was compiled against libxml %2\n").arg(exsltLibexsltVersion).arg(exsltLibxmlVersion));
+ QString freeFormText = xsldbgRunTimeInfo + libxmlCompileTimeInfo + libxsltCompileTimeInfo + libexsltCompileTimeInfo;
+
+ KAboutData about("xsldbg", I18N_NOOP("Xsldbg"), version, description, KAboutData::License_GPL, "(C) 2003 Keith Isdale", freeFormText, 0, "k_isdale@tpg.com.au");
+ about.addAuthor( "Keith Isdale", 0, "k_isdale@tpg.com.au" );
+ KCmdLineArgs::init(argc, argv, &about);
+ KCmdLineArgs::addCmdLineOptions( options );
+ XsldbgApp app;
+
+ return app.exec();;
+}
+
+/* Private implmentation of messaging functions */
+int notifyXsldbgAppSimple(XsldbgMessageEnum type, const void *data)
+{
+ Q_UNUSED(type);
+ Q_UNUSED(data);
+ return 1;
+}
+
+int notifyStateXsldbgAppSimple(XsldbgMessageEnum type, int commandId,
+ XsldbgCommandStateEnum commandState, const char *text)
+{
+ Q_UNUSED(type);
+ Q_UNUSED(commandId);
+ Q_UNUSED(commandState);
+ Q_UNUSED(text);
+ return 1;
+}
+
+int notifyTextXsldbgAppSimple(XsldbgMessageEnum type, const char *text)
+{
+ Q_UNUSED(type);
+ Q_UNUSED(text);
+ return 1;
+}
+
+
+/* use this function instead of the one that was in debugXSL.c */
+/**
+ * xslShellReadline:
+ * @prompt: the prompt value
+ *
+ * Read a string
+ *
+ * Returns a copy of the text inputed or NULL if EOF in stdin found.
+ * The caller is expected to free the returned string.
+ */
+xmlChar *
+xslDbgShellReadlineSimple(xmlChar * prompt)
+{
+
+ static char last_read[DEBUG_BUFFER_SIZE] = { '\0' };
+
+#ifdef HAVE_READLINE
+
+ xmlChar *line_read;
+
+ if (optionsGetIntOption(OPTIONS_STDOUT) == 0){
+ /* Get a line from the user. */
+ line_read = (xmlChar *) readline((char *) prompt);
+
+ /* If the line has any text in it, save it on the history. */
+ if (line_read && *line_read) {
+ char *temp = (char*)line_read;
+ add_history((char *) line_read);
+ strncpy((char*)last_read, (char*)line_read, DEBUG_BUFFER_SIZE - 1);
+ /* we must ensure that the data is free properly */
+ line_read = xmlStrdup((xmlChar*)line_read);
+ free(temp);
+ } else {
+ free(line_read);
+ /* if only <Enter>is pressed then try last saved command line */
+ line_read = xmlStrdup((xmlChar*)last_read);
+ }
+ }else{
+ /* readline library will/may echo its output which is not wanted
+ when running in gdb mode.*/
+ char line_buffer[DEBUG_BUFFER_SIZE];
+
+ if (prompt != NULL)
+ xsltGenericError(xsltGenericErrorContext, "%s", prompt);
+ if (!fgets(line_buffer, sizeof(line_buffer) - 1, stdin)){
+ line_read = NULL;
+ }else{
+ line_buffer[DEBUG_BUFFER_SIZE - 1] = 0;
+ if ((strlen(line_buffer) == 0) || (line_buffer[0] == '\n')){
+ line_read = xmlStrdup((xmlChar*)last_read);
+ }else{
+ add_history((char *) line_buffer);
+ line_read = xmlStrdup((xmlChar*)line_buffer);
+ strncpy((char*)last_read, (char*)line_read, sizeof(last_read) - 1); }
+ }
+
+ }
+ return (line_read);
+
+#else
+ char line_read[DEBUG_BUFFER_SIZE];
+
+ if (prompt != NULL)
+ xsltGenericError(xsltGenericErrorContext, "%s", prompt);
+ fflush(stderr);
+ if (!fgets(line_read, DEBUG_BUFFER_SIZE - 1, stdin))
+ return (NULL);
+ line_read[DEBUG_BUFFER_SIZE - 1] = 0;
+ /* if only <Enter>is pressed then try last saved command line */
+ if ((strlen(line_read) == 0) || (line_read[0] == '\n')) {
+ strncpy(line_read, last_read, sizeof(line_read) - 1);
+ } else {
+ strcpy(last_read, line_read);
+ }
+ return xmlStrdup((xmlChar*)line_read);
+#endif
+
+ }
+/*
+void xsldbgThreadCleanup(void);
+*/
+/* thread has died so cleanup after it not called directly but via
+ notifyXsldbgApp*/
+/*
+void
+xsldbgThreadCleanup(void)
+{
+
+}
+*/
+
+
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 00000000..e024a39e
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,10 @@
+SUBDIRS = compatibility
+
+
+noinst_LTLIBRARIES = libquantamodule.la
+
+METASOURCES = AUTO
+
+libquantamodule_la_SOURCES = qextfileinfo.cpp ksavealldialog.cpp
+
+INCLUDES = $(all_includes)
diff --git a/lib/compatibility/Makefile.am b/lib/compatibility/Makefile.am
new file mode 100644
index 00000000..63242e4b
--- /dev/null
+++ b/lib/compatibility/Makefile.am
@@ -0,0 +1,17 @@
+if include_qextmdi
+KMDI_SUBDIR = kmdi
+endif
+
+if include_knewstuff
+KNEWSTUFF_SUBDIR = knewstuff
+endif
+
+
+SUBDIRS = $(KMDI_SUBDIR) $(KNEWSTUFF_SUBDIR)
+
+#enable the below when there is something in the compatibility lib
+#noinst_LTLIBRARIES = libcompat.la
+#libcompat_la_SOURCES =
+
+#AM_CPPFLAGS = $(all_includes)
+METASOURCES = AUTO
diff --git a/lib/compatibility/kmdi/Makefile.am b/lib/compatibility/kmdi/Makefile.am
new file mode 100644
index 00000000..3fdc0cfb
--- /dev/null
+++ b/lib/compatibility/kmdi/Makefile.am
@@ -0,0 +1,21 @@
+# Here resides the library of general KDevelop-related utilities,
+# which may be linked by any plugin or part. This is installed
+# as a shared library, including header files
+
+
+INCLUDES = $(all_includes)
+
+noinst_LTLIBRARIES = libquantakmdi.la
+libquantakmdi_la_LDFLAGS = $(all_libraries) -no-undefined
+libquantakmdi_la_LIBADD = $(top_builddir)/lib/compatibility/kmdi/qextmdi/libquantaqextmdi.la -lktexteditor $(LIB_KPARTS) $(LIB_KIO)
+libquantakmdi_la_SOURCES = dummy.cpp
+
+
+SUBDIRS = qextmdi
+
+AM_CFLAGS =
+AM_CXXFLAGS =
+AM_FFLAGS =
+#lib_LIBRARIES = libquanta_la
+#libquanta_la_SOURCES =
+#libquanta_la_LDFLAGS =
diff --git a/lib/compatibility/kmdi/dummy.cpp b/lib/compatibility/kmdi/dummy.cpp
new file mode 100644
index 00000000..8d1c8b69
--- /dev/null
+++ b/lib/compatibility/kmdi/dummy.cpp
@@ -0,0 +1 @@
+
diff --git a/lib/compatibility/kmdi/qextmdi/Makefile.am b/lib/compatibility/kmdi/qextmdi/Makefile.am
new file mode 100644
index 00000000..9c683679
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/Makefile.am
@@ -0,0 +1,18 @@
+# Here resides the qextmdi library.
+
+INCLUDES = -I$(top_srcdir)/lib/compatibility/kmdi/qextmdi/res -I$(top_builddir)/lib/compatibility/kmdi/qextmdi $(all_includes)
+
+noinst_LTLIBRARIES = libquantaqextmdi.la
+libquantaqextmdi_la_LDFLAGS = $(all_libraries)
+libquantaqextmdi_la_LIBADD = $(LIB_KPARTS)
+
+libquantaqextmdi_la_SOURCES = kmdichildarea.cpp kmdichildfrm.cpp kmdichildfrmcaption.cpp \
+ kmdichildview.cpp kmdimainfrm.cpp kmditaskbar.cpp \
+ kmultitabbar.cpp \
+ kmditoolviewaccessor.cpp kmdidocumentviewtabwidget.cpp kmdifocuslist.cpp \
+ kmdiguiclient.cpp \
+ ktabwidget.cpp ktabbar.cpp kdockwidget.cpp kdockwidget_private.cpp kmdidockcontainer.cpp
+
+METASOURCES = AUTO
+
+#AM_CXXFLAGS = -DNO_INCLUDE_MOCFILES
diff --git a/lib/compatibility/kmdi/qextmdi/kdelibs_export.h b/lib/compatibility/kmdi/qextmdi/kdelibs_export.h
new file mode 100644
index 00000000..d6244357
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kdelibs_export.h
@@ -0,0 +1,87 @@
+/*
+ This file is part of the KDE libraries
+ Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
+
+ 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.
+*/
+
+#ifndef _KDELIBS_EXPORT_H
+#define _KDELIBS_EXPORT_H
+
+/* needed for KDE_EXPORT macros */
+#include <kdemacros.h>
+
+/* needed, because e.g. Q_OS_UNIX is so frequently used */
+#include <qglobal.h>
+
+#ifdef Q_WS_WIN
+#include <kdelibs_export_win.h>
+
+#else /* Q_OS_UNIX */
+
+#undef KDE_EXPORT
+#define KDE_EXPORT
+
+/* export statements for unix */
+#define KDECORE_EXPORT KDE_EXPORT
+#define KDEUI_EXPORT KDE_EXPORT
+#define KDEFX_EXPORT KDE_EXPORT
+#define KDEPRINT_EXPORT KDE_EXPORT
+#define KDNSSD_EXPORT KDE_EXPORT
+#define KIO_EXPORT KDE_EXPORT
+#define DCOP_EXPORT KDE_EXPORT
+#define KPARTS_EXPORT KDE_EXPORT
+#define KTEXTEDITOR_EXPORT KDE_EXPORT
+#define KABC_EXPORT KDE_EXPORT
+#define KDESU_EXPORT KDE_EXPORT
+#define KVCARD_EXPORT KDE_EXPORT
+#define KRESOURCES_EXPORT KDE_EXPORT
+#define KSTYLE_EXPORT KDE_EXPORT
+#define KHTML_EXPORT KDE_EXPORT
+#define KMDI_EXPORT KDE_EXPORT
+#define KUTILS_EXPORT KDE_EXPORT
+#define KATEPARTINTERFACES_EXPORT KDE_EXPORT
+#define KATEPART_EXPORT KDE_EXPORT
+#define KMID_EXPORT KDE_EXPORT
+#define KIMPROXY_EXPORT KDE_EXPORT
+#define KDE_ARTS_EXPORT KDE_EXPORT
+
+#define KPATH_SEPARATOR ':'
+
+#ifndef O_BINARY
+#define O_BINARY 0 /* for open() */
+#endif
+
+#endif
+
+#endif /*_KDELIBS_EXPORT_H*/
+
+/* workaround for kdecore: stupid moc's grammar doesn't accept two macros
+ between 'class' keyword and <classname>: */
+#ifdef KDE_DEPRECATED
+# ifndef KDECORE_EXPORT_DEPRECATED
+# define KDECORE_EXPORT_DEPRECATED KDE_DEPRECATED KDECORE_EXPORT
+# endif
+# ifndef KIO_EXPORT_DEPRECATED
+# define KIO_EXPORT_DEPRECATED KDE_DEPRECATED KIO_EXPORT
+# endif
+# ifndef KDEUI_EXPORT_DEPRECATED
+# define KDEUI_EXPORT_DEPRECATED KDE_DEPRECATED KDEUI_EXPORT
+# endif
+# ifndef KABC_EXPORT_DEPRECATED
+# define KABC_EXPORT_DEPRECATED KDE_DEPRECATED KABC_EXPORT
+# endif
+#endif
+/* (let's add KDE****_EXPORT_DEPRECATED for other libraries if it's needed) */
diff --git a/lib/compatibility/kmdi/qextmdi/kdemacros.h.in b/lib/compatibility/kmdi/qextmdi/kdemacros.h.in
new file mode 100644
index 00000000..95ac5d8e
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kdemacros.h.in
@@ -0,0 +1,208 @@
+/* This file is part of the KDE libraries
+ Copyright (c) 2002-2003 KDE Team
+
+ 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.
+*/
+
+#ifndef _KDE_MACROS_H_
+#define _KDE_MACROS_H_
+
+/* Set by configure */
+#undef __KDE_HAVE_GCC_VISIBILITY
+
+/**
+ * The KDE_NO_EXPORT macro marks the symbol of the given variable
+ * to be hidden. A hidden symbol is stripped during the linking step,
+ * so it can't be used from outside the resulting library, which is similar
+ * to static. However, static limits the visibility to the current
+ * compilation unit. hidden symbols can still be used in multiple compilation
+ * units.
+ *
+ * \code
+ * int KDE_NO_EXPORT foo;
+ * int KDE_EXPORT bar;
+ * \end
+ */
+
+#ifdef __KDE_HAVE_GCC_VISIBILITY
+#define KDE_NO_EXPORT __attribute__ ((visibility("hidden")))
+#define KDE_EXPORT __attribute__ ((visibility("default")))
+#elif defined(Q_WS_WIN)
+#define KDE_NO_EXPORT
+#define KDE_EXPORT __declspec(dllexport)
+#else
+#define KDE_NO_EXPORT
+#define KDE_EXPORT
+#endif
+
+/**
+ * KDE_Q_EXPORT_PLUGIN is a workaround for Qt not being able to
+ * cope with symbol visibility.
+ */
+#define KDE_Q_EXPORT_PLUGIN(PLUGIN) \
+ Q_EXTERN_C KDE_EXPORT const char* qt_ucm_query_verification_data(); \
+ Q_EXTERN_C KDE_EXPORT QUnknownInterface* ucm_instantiate(); \
+ Q_EXPORT_PLUGIN(PLUGIN)
+
+/**
+ * The KDE_PACKED can be used to hint the compiler that a particular
+ * structure or class should not contain unnecessary paddings.
+ */
+
+#ifdef __GNUC__
+#define KDE_PACKED __attribute__((__packed__))
+#else
+#define KDE_PACKED
+#endif
+
+/**
+ * The KDE_DEPRECATED macro can be used to trigger compile-time warnings
+ * with newer compilers when deprecated functions are used.
+ *
+ * For non-inline functions, the macro gets inserted at the very end of the
+ * function declaration, right before the semicolon:
+ *
+ * \code
+ * DeprecatedConstructor() KDE_DEPRECATED;
+ * void deprecatedFunctionA() KDE_DEPRECATED;
+ * int deprecatedFunctionB() const KDE_DEPRECATED;
+ * \endcode
+ *
+ * Functions which are implemented inline are handled differently: for them,
+ * the KDE_DEPRECATED macro is inserted at the front, right before the return
+ * type, but after "static" or "virtual":
+ *
+ * \code
+ * KDE_DEPRECATED void deprecatedInlineFunctionA() { .. }
+ * virtual KDE_DEPRECATED int deprecatedInlineFunctionB() { .. }
+ * static KDE_DEPRECATED bool deprecatedInlineFunctionC() { .. }
+ * \end
+ *
+ * You can also mark whole structs or classes as deprecated, by inserting the
+ * KDE_DEPRECATED macro after the struct/class keyword, but before the
+ * name of the struct/class:
+ *
+ * \code
+ * class KDE_DEPRECATED DeprecatedClass { };
+ * struct KDE_DEPRECATED DeprecatedStruct { };
+ * \endcode
+ *
+ * \note
+ * It does not make much sense to use the KDE_DEPRECATED keyword for a Qt signal;
+ * this is because usually get called by the class which they belong to,
+ * and one'd assume that a class author doesn't use deprecated methods of his
+ * own class. The only exception to this are signals which are connected to
+ * other signals; they get invoked from moc-generated code. In any case,
+ * printing a warning message in either case is not useful.
+ * For slots, it can make sense (since slots can be invoked directly) but be
+ * aware that if the slots get triggered by a signal, the will get called from
+ * moc code as well and thus the warnings are useless.
+ *
+ * \par
+ * Also note that it is not possible to use KDE_DEPRECATED for classes which
+ * use the k_dcop keyword (to indicate a DCOP interface declaration); this is
+ * because the dcopidl program would choke on the unexpected declaration
+ * syntax.
+ */
+
+#ifndef KDE_DEPRECATED
+#if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)
+ /* gcc >= 3.2 */
+# define KDE_DEPRECATED __attribute__ ((deprecated))
+#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
+ /* msvc >= 7 */
+# define KDE_DEPRECATED __declspec(deprecated)
+#else
+# define KDE_DEPRECATED
+#endif
+#endif
+
+/**
+ * The KDE_ISLIKELY macro tags a boolean expression as likely to evaluate to
+ * 'true'. When used in an if ( ) statement, it gives a hint to the compiler
+ * that the following codeblock is likely to get executed. Providing this
+ * information helps the compiler to optimize the code for better performance.
+ * Using the macro has an insignificant code size or runtime memory footprint impact.
+ * The code semantics is not affected.
+ *
+ * \note
+ * Providing wrong information ( like marking a condition that almost never
+ * passes as 'likely' ) will cause a significant runtime slowdown. Therefore only
+ * use it for cases where you can be sure about the odds of the expression to pass
+ * in all cases ( independent from e.g. user configuration ).
+ *
+ * \par
+ * The KDE_ISUNLIKELY macro tags an expression as unlikely evaluating to 'true'.
+ *
+ * \note
+ * Do NOT use ( !KDE_ISLIKELY(foo) ) as an replacement for KDE_ISUNLIKELY !
+ *
+ * \code
+ * if ( KDE_ISUNLIKELY( testsomething() ) )
+ * abort(); // assume its unlikely that the application aborts
+ * \endcode
+ */
+#if __GNUC__ - 0 >= 3
+# define KDE_ISLIKELY( x ) __builtin_expect(!!(x),1)
+# define KDE_ISUNLIKELY( x ) __builtin_expect(!!(x),0)
+#else
+# define KDE_ISLIKELY( x ) ( x )
+# define KDE_ISUNLIKELY( x ) ( x )
+#endif
+
+/**
+ * This macro, and it's friends going up to 10 reserve a fixed number of virtual
+ * functions in a class. Because adding virtual functions to a class changes the
+ * size of the vtable, adding virtual functions to a class breaks binary
+ * compatibility. However, by using this macro, and decrementing it as new
+ * virtual methods are added, binary compatibility can still be preserved.
+ *
+ * \note The added functions must be added to the header at the same location
+ * as the macro; changing the order of virtual functions in a header is also
+ * binary incompatible as it breaks the layout of the vtable.
+ */
+
+#define RESERVE_VIRTUAL_1 \
+ virtual void reservedVirtual1() {}
+#define RESERVE_VIRTUAL_2 \
+ virtual void reservedVirtual2() {} \
+ RESERVE_VIRTUAL_1
+#define RESERVE_VIRTUAL_3 \
+ virtual void reservedVirtual3() {} \
+ RESERVE_VIRTUAL_2
+#define RESERVE_VIRTUAL_4 \
+ virtual void reservedVirtual4() {} \
+ RESERVE_VIRTUAL_3
+#define RESERVE_VIRTUAL_5 \
+ virtual void reservedVirtual5() {} \
+ RESERVE_VIRTUAL_4
+#define RESERVE_VIRTUAL_6 \
+ virtual void reservedVirtual6() {} \
+ RESERVE_VIRTUAL_5
+#define RESERVE_VIRTUAL_7 \
+ virtual void reservedVirtual7() {} \
+ RESERVE_VIRTUAL_6
+#define RESERVE_VIRTUAL_8 \
+ virtual void reservedVirtual8() {} \
+ RESERVE_VIRTUAL_7
+#define RESERVE_VIRTUAL_9 \
+ virtual void reservedVirtual9() {} \
+ RESERVE_VIRTUAL_8
+#define RESERVE_VIRTUAL_10 \
+ virtual void reservedVirtual10() {} \
+ RESERVE_VIRTUAL_9
+
+#endif /* _KDE_MACROS_H_ */
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
new file mode 100644
index 00000000..1a1e56ae
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
@@ -0,0 +1,3273 @@
+
+/* This file is part of the KDE libraries
+ Copyright (C) 2000 Max Judin <novaprint@mtu-net.ru>
+ Copyright (C) 2002,2003 Joseph Wenninger <jowenn@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 "kdockwidget.h"
+#include "kdockwidget_private.h"
+#include "kdockwidget_p.h"
+
+#include <qapplication.h>
+#include <qlayout.h>
+#include <qpainter.h>
+#include <qobjectlist.h>
+#include <qstrlist.h>
+#include <qcursor.h>
+#include <qwidgetlist.h>
+#include <qtabwidget.h>
+#include <qtooltip.h>
+#include <qstyle.h>
+
+#ifndef NO_KDE2
+#include <kconfig.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <ktoolbar.h>
+#include <kpopupmenu.h>
+#include <kwin.h>
+#include <kdebug.h>
+#include <kglobalsettings.h>
+
+#include "config.h"
+#ifdef Q_WS_X11
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#endif
+
+#else
+#include <qtoolbar.h>
+#include <qpopupmenu.h>
+#endif
+
+#include <stdlib.h>
+
+#undef BORDERLESS_WINDOWS
+
+#define DOCK_CONFIG_VERSION "0.0.5"
+
+static const char* const dockback_xpm[]={
+"6 6 2 1",
+"# c black",
+". c None",
+"......",
+".#....",
+"..#..#",
+"...#.#",
+"....##",
+"..####"};
+
+static const char* const todesktop_xpm[]={
+"5 5 2 1",
+"# c black",
+". c None",
+"####.",
+"##...",
+"#.#..",
+"#..#.",
+"....#"};
+
+static const char* const not_close_xpm[]={
+"5 5 2 1",
+"# c black",
+". c None",
+"#####",
+"#...#",
+"#...#",
+"#...#",
+"#####"};
+
+/**
+ * A special kind of KMainWindow that is able to have dockwidget child widgets.
+ *
+ * The main widget should be a dockwidget where other dockwidgets can be docked to
+ * the left, right, top, bottom or to the middle.
+ * Furthermore, the KDockMainWindow has got the KDocManager and some data about the dock states.
+ *
+ * @author Max Judin.
+*/
+KDockMainWindow::KDockMainWindow( QWidget* parent, const char *name, WFlags f)
+:KMainWindow( parent, name, f )
+{
+ QString new_name = QString(name) + QString("_DockManager");
+ dockManager = new KDockManager( this, new_name.latin1() );
+ mainDockWidget = 0L;
+}
+
+KDockMainWindow::~KDockMainWindow()
+{
+ delete dockManager;
+}
+
+void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
+{
+ if ( mainDockWidget == mdw ) return;
+ mainDockWidget = mdw;
+ dockManager->setMainDockWidget2(mdw);
+}
+
+void KDockMainWindow::setView( QWidget *view )
+{
+ if ( view->isA("KDockWidget") ){
+ if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
+ }
+
+#ifndef NO_KDE2
+ KMainWindow::setCentralWidget(view);
+#else
+ QMainWindow::setCentralWidget(view);
+#endif
+}
+
+KDockWidget* KDockMainWindow::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+{
+ return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
+}
+
+void KDockMainWindow::makeDockVisible( KDockWidget* dock )
+{
+ if ( dock )
+ dock->makeDockVisible();
+}
+
+void KDockMainWindow::makeDockInvisible( KDockWidget* dock )
+{
+ if ( dock )
+ dock->undock();
+}
+
+void KDockMainWindow::makeWidgetDockVisible( QWidget* widget )
+{
+ makeDockVisible( dockManager->findWidgetParentDock(widget) );
+}
+
+void KDockMainWindow::writeDockConfig(QDomElement &base)
+{
+ dockManager->writeConfig(base);
+}
+
+void KDockMainWindow::readDockConfig(QDomElement &base)
+{
+ dockManager->readConfig(base);
+}
+
+#ifndef NO_KDE2
+void KDockMainWindow::writeDockConfig( KConfig* c, QString group )
+{
+ dockManager->writeConfig( c, group );
+}
+
+void KDockMainWindow::readDockConfig( KConfig* c, QString group )
+{
+ dockManager->readConfig( c, group );
+}
+#endif
+
+void KDockMainWindow::slotDockWidgetUndocked()
+{
+ QObject* pSender = (QObject*) sender();
+ if (!pSender->inherits("KDockWidget")) return;
+ KDockWidget* pDW = (KDockWidget*) pSender;
+ emit dockWidgetHasUndocked( pDW);
+}
+
+/*************************************************************************/
+KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
+:QFrame( parent, name )
+{
+ dw = dock;
+ installEventFilter( dock->dockManager() );
+}
+/*************************************************************************/
+KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
+:KDockWidgetAbstractHeaderDrag( parent, dock, name )
+{
+}
+
+void KDockWidgetHeaderDrag::paintEvent( QPaintEvent* )
+{
+ QPainter paint;
+
+ paint.begin( this );
+
+ style().drawPrimitive (QStyle::PE_DockWindowHandle, &paint, QRect(0,0,width(), height()), colorGroup());
+
+ paint.end();
+}
+/*************************************************************************/
+KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* parent, const char* name )
+:QFrame( parent, name )
+{
+}
+/*************************************************************************/
+KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name )
+:KDockWidgetAbstractHeader( parent, name )
+{
+#ifdef BORDERLESS_WINDOWS
+ setCursor(QCursor(ArrowCursor));
+#endif
+ d = new KDockWidgetHeaderPrivate( this );
+
+ layout = new QHBoxLayout( this );
+ layout->setResizeMode( QLayout::Minimum );
+
+ drag = new KDockWidgetHeaderDrag( this, parent );
+
+ closeButton = new KDockButton_Private( this, "DockCloseButton" );
+ QToolTip::add( closeButton, i18n("Close") );
+ closeButton->setPixmap( style().stylePixmap (QStyle::SP_TitleBarCloseButton , this));
+ closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
+ connect( closeButton, SIGNAL(clicked()), parent, SIGNAL(headerCloseButtonClicked()));
+ connect( closeButton, SIGNAL(clicked()), parent, SLOT(undock()));
+
+ stayButton = new KDockButton_Private( this, "DockStayButton" );
+ QToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") );
+ stayButton->setToggleButton( true );
+ stayButton->setPixmap( const_cast< const char** >(not_close_xpm) );
+ stayButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
+ connect( stayButton, SIGNAL(clicked()), this, SLOT(slotStayClicked()));
+
+ dockbackButton = new KDockButton_Private( this, "DockbackButton" );
+ QToolTip::add( dockbackButton, i18n("Dock this window", "Dock") );
+ dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm));
+ dockbackButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
+ connect( dockbackButton, SIGNAL(clicked()), parent, SIGNAL(headerDockbackButtonClicked()));
+ connect( dockbackButton, SIGNAL(clicked()), parent, SLOT(dockBack()));
+
+ d->toDesktopButton = new KDockButton_Private( this, "ToDesktopButton" );
+ QToolTip::add( d->toDesktopButton, i18n("Detach") );
+ d->toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm));
+ d->toDesktopButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
+ connect( d->toDesktopButton, SIGNAL(clicked()), parent, SLOT(toDesktop()));
+ stayButton->hide();
+
+ d->dummy = new QWidget( this );
+ d->dummy->setFixedSize( 1,closeButton->pixmap()->height() );
+
+
+ layout->addWidget( drag );
+ layout->addWidget( dockbackButton );
+ layout->addWidget( d->toDesktopButton );
+ layout->addWidget( d->dummy);
+ layout->addWidget( stayButton );
+ layout->addWidget( closeButton );
+ layout->activate();
+ d->dummy->hide();
+ drag->setFixedHeight( layout->minimumSize().height() );
+}
+
+void KDockWidgetHeader::setTopLevel( bool isTopLevel )
+{
+ d->topLevel = isTopLevel;
+ if ( isTopLevel ){
+ KDockWidget* par = (KDockWidget*)parent();
+ if( par) {
+ if( par->isDockBackPossible())
+ dockbackButton->show();
+ else
+ dockbackButton->hide();
+ }
+ stayButton->hide();
+ closeButton->hide();
+ d->toDesktopButton->hide();
+ drag->setEnabled( true );
+ } else {
+ dockbackButton->hide();
+ stayButton->hide();
+ if (!d->forceCloseButtonHidden) closeButton->show();
+ if( d->showToDesktopButton )
+ d->toDesktopButton->show();
+ }
+ layout->activate();
+
+ bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
+ d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
+ closeButton->isVisibleTo(this);
+ for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
+ }
+ if (dontShowDummy) d->dummy->hide(); else d->dummy->show();
+
+ updateGeometry();
+}
+
+void KDockWidgetHeader::forceCloseButtonHidden(bool hidden) {
+ d->forceCloseButtonHidden=hidden;
+ if (hidden) closeButton->hide();
+ else closeButton->show();
+}
+
+KDockWidgetHeaderDrag *KDockWidgetHeader::dragPanel() {
+ return drag;
+}
+
+void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
+{
+ if ( !nd ) return;
+
+ delete layout;
+ layout = new QHBoxLayout( this );
+ layout->setResizeMode( QLayout::Minimum );
+
+ delete drag;
+ drag = nd;
+ if (drag->parentWidget()!=this) {
+ drag->reparent(this,QPoint(0,0));
+ }
+
+
+ layout->addWidget( drag );
+ layout->addWidget( dockbackButton );
+ layout->addWidget( d->dummy );
+ layout->addWidget( d->toDesktopButton );
+ layout->addWidget( stayButton );
+ bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
+ d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
+ closeButton->isVisibleTo(this);
+ for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ layout->addWidget(it.current());
+ dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
+ }
+ if (dontShowDummy) d->dummy->hide(); else d->dummy->show();
+ layout->addWidget( closeButton );
+ layout->activate();
+ kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<layout->minimumSize().height()<<endl;
+#ifdef __GNUC__
+#warning FIXME
+#endif
+ drag->setFixedHeight( closeButton->height()); // /*layout->minimumS*/sizeHint().height() );
+}
+
+void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
+ if (!btn) return;
+
+ if (btn->parentWidget()!=this) {
+ btn->reparent(this,QPoint(0,0));
+ }
+ btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
+ if (!d->btns.containsRef(btn)) d->btns.append(btn);
+
+ btn->show();
+
+ delete layout;
+ layout = new QHBoxLayout( this );
+ layout->setResizeMode( QLayout::Minimum );
+
+ layout->addWidget( drag );
+ layout->addWidget( dockbackButton );
+ layout->addWidget( d->toDesktopButton );
+ layout->addWidget( d->dummy);
+ layout->addWidget( stayButton );
+ bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
+ d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
+ closeButton->isVisibleTo(this);
+ for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ layout->addWidget(it.current());
+ dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
+ }
+ if (dontShowDummy) d->dummy->hide(); else d->dummy->show();
+ layout->addWidget( closeButton );
+ layout->activate();
+ drag->setFixedHeight( layout->minimumSize().height() );
+}
+
+void KDockWidgetHeader::removeButton(KDockButton_Private* btn) {
+ if (btn->parentWidget()==this) {
+ if (d->btns.containsRef(btn)) d->btns.removeRef(btn);
+ delete btn;
+ }
+}
+
+
+void KDockWidgetHeader::slotStayClicked()
+{
+ setDragEnabled(!stayButton->isOn());
+}
+
+bool KDockWidgetHeader::dragEnabled() const
+{
+ return drag->isEnabled();
+}
+
+void KDockWidgetHeader::showUndockButton(bool show)
+{
+ kdDebug(282)<<"KDockWidgetHeader::showUndockButton("<<show<<")"<<endl;
+ if( d->showToDesktopButton == show )
+ return;
+
+ d->showToDesktopButton = show;
+ if( !show || d->topLevel )
+ d->toDesktopButton->hide( );
+ else
+ d->toDesktopButton->show( );
+}
+
+void KDockWidgetHeader::setDragEnabled(bool b)
+{
+ stayButton->setOn(!b);
+ closeButton->setEnabled(b);
+ drag->setEnabled(b);
+}
+
+#ifndef NO_KDE2
+void KDockWidgetHeader::saveConfig( KConfig* c )
+{
+ c->writeEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
+}
+
+void KDockWidgetHeader::loadConfig( KConfig* c )
+{
+ setDragEnabled( !c->readBoolEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
+}
+#endif
+
+/*************************************************************************/
+
+class KDockManager::KDockManagerPrivate
+{
+public:
+ /**
+ * This rectangle is used to highlight the current dockposition. It stores global screen coordinates.
+ */
+ QRect dragRect;
+
+ /**
+ * This rectangle is used to erase the previously highlighted dockposition. It stores global screen coordinates.
+ */
+ QRect oldDragRect;
+
+ /**
+ * This flag stores the information if dragging is ready to start. Used between mousePress and mouseMove event.
+ */
+ bool readyToDrag;
+
+ /**
+ * This variable stores the offset of the mouse cursor to the upper left edge of the current drag widget.
+ */
+ QPoint dragOffset;
+
+ /**
+ * These flags store information about the splitter behavior
+ */
+ bool splitterOpaqueResize;
+ bool splitterKeepSize;
+ bool splitterHighResolution;
+
+ QGuardedPtr<KDockWidget> mainDockWidget;
+
+ QObjectList containerDocks;
+
+ QGuardedPtr<KDockWidget> leftContainer;
+ QGuardedPtr<KDockWidget> topContainer;
+ QGuardedPtr<KDockWidget> rightContainer;
+ QGuardedPtr<KDockWidget> bottomContainer;
+ int m_readDockConfigMode;
+};
+
+
+/*************************************************************************/
+KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel, WFlags f)
+#ifdef BORDERLESS_WINDOWS
+: QWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
+#else
+: QWidget( parent, name, f )
+#endif
+ ,formerBrotherDockWidget(0L)
+ ,currentDockPos(DockNone)
+ ,formerDockPos(DockNone)
+ ,widget(0L)
+ ,pix(new QPixmap(pixmap))
+ ,prevSideDockPosBeforeDrag(DockNone)
+ ,isGroup(false)
+{
+ d = new KDockWidgetPrivate(); // create private data
+
+ d->_parent = parent;
+
+ layout = new QVBoxLayout( this );
+ layout->setResizeMode( QLayout::Minimum );
+
+ manager = dockManager;
+ manager->childDock->append( this );
+ installEventFilter( manager );
+
+ eDocking = DockFullDocking;
+ sDocking = DockFullSite;
+
+ header = 0L;
+ setHeader( new KDockWidgetHeader( this, "AutoCreatedDockHeader" ) );
+
+ if( strCaption.isNull() )
+ setCaption( name );
+ else
+ setCaption( strCaption);
+
+ if( strTabPageLabel == " ")
+ setTabPageLabel( caption());
+ else
+ setTabPageLabel( strTabPageLabel);
+
+ isTabGroup = false;
+ d->isContainer =false;
+ setIcon( pixmap);
+ widget = 0L;
+
+ QObject::connect(this, SIGNAL(hasUndocked()), manager->main, SLOT(slotDockWidgetUndocked()) );
+ applyToWidget( parent, QPoint(0,0) );
+}
+
+void KDockWidget::setPixmap(const QPixmap& pixmap) {
+ delete pix;
+ pix=new QPixmap(pixmap);
+ setIcon(*pix);
+ KDockTabGroup *dtg=parentDockTabGroup();
+ if (dtg)
+ dtg->changeTab(this,pixmap,dtg->tabLabel(this));
+ QWidget *contWid=parentDockContainer();
+ if (contWid) {
+ KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
+ if (x) {
+ x->setPixmap(this,pixmap);
+ }
+ }
+}
+
+const QPixmap& KDockWidget::pixmap() const {
+ return *pix;
+}
+
+KDockWidget::~KDockWidget()
+{
+ d->pendingDtor = true;
+ if ( !manager->undockProcess ){
+ d->blockHasUndockedSignal = true;
+ undock();
+ d->blockHasUndockedSignal = false;
+ }
+
+ if (latestKDockContainer()) {
+ KDockContainer *x = dynamic_cast<KDockContainer*>(latestKDockContainer());
+ if (x) {
+ x->removeWidget(this);
+ }
+ }
+ emit iMBeingClosed();
+ if (manager->d) manager->d->containerDocks.remove(this);
+ manager->childDock->remove( this );
+ delete pix;
+ delete d; // destroy private data
+ d=0;
+}
+
+void KDockWidget::paintEvent(QPaintEvent* pe)
+{
+ QWidget::paintEvent(pe);
+ QPainter paint;
+ paint.begin( this );
+ style().drawPrimitive (QStyle::PE_Panel, &paint, QRect(0,0,width(), height()), colorGroup());
+ paint.end();
+}
+
+void KDockWidget::leaveEvent(QEvent *e)
+{
+ QWidget::leaveEvent(e);
+#ifdef BORDERLESS_WINDOWS
+ if (parent()) return;
+// setCursor(QCursor(ArrowCursor));
+#endif
+}
+
+void KDockWidget::mousePressEvent(QMouseEvent* mme)
+{
+#ifdef BORDERLESS_WINDOWS
+ if (!parent())
+ {
+ kdDebug(282)<<"KDockWidget::mousePressEvent"<<endl;
+
+ bool bbottom;
+ bool bleft;
+ bool bright;
+ bool btop;
+ int styleheight;
+ QPoint mp;
+ mp=mme->pos();
+ styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this);
+ bbottom=mp.y()>=height()-styleheight;
+ btop=mp.y()<=styleheight;
+ bleft=mp.x()<=styleheight;
+ bright=mp.x()>=width()-styleheight;
+ kdDebug(282)<<"mousemovevent"<<endl;
+ d->resizing=true;
+ if (bright)
+ {
+ if (btop)
+ {
+ d->resizeMode=KDockWidgetPrivate::ResizeTopRight;
+ d->resizePos=QPoint(width(),0)-mme->pos();
+
+ }
+ else
+ {
+ d->resizePos=QPoint(width(),height())-mme->pos();
+ if (bbottom) d->resizeMode=KDockWidgetPrivate::ResizeBottomRight;
+ else d->resizeMode=KDockWidgetPrivate::ResizeRight;
+ }
+ }
+ else if (bleft)
+ {
+ if (btop) setCursor(QCursor(SizeFDiagCursor));
+ else
+ if (bbottom) setCursor(QCursor(SizeBDiagCursor));
+ else setCursor(QCursor(SizeHorCursor));
+ }
+ else
+ if (bbottom)
+ {
+ d->resizeMode=KDockWidgetPrivate::ResizeBottom;
+ d->resizePos=QPoint(0,height())-mme->pos();
+ }
+ else
+ if (btop) setCursor(QCursor(SizeVerCursor));
+ else d->resizing=false;
+
+ if (d->resizing) grabMouse(cursor());
+
+ }
+#endif
+ QWidget::mousePressEvent(mme);
+}
+
+void KDockWidget::mouseReleaseEvent(QMouseEvent* ev)
+{
+#ifdef BORDERLESS_WINDOWS
+ d->resizing=false;
+ releaseMouse();
+#endif
+ QWidget::mouseReleaseEvent(ev);
+}
+
+void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
+{
+ QWidget::mouseMoveEvent(mme);
+#ifdef BORDERLESS_WINDOWS
+ if (parent()) return;
+
+ if (d->resizing)
+ {
+ switch (d->resizeMode)
+ {
+ case KDockWidgetPrivate::ResizeRight:
+ resize(mme->pos().x()+d->resizePos.x(),height());
+ break;
+ case KDockWidgetPrivate::ResizeBottomRight:
+ resize(mme->pos().x()+d->resizePos.x(),mme->pos().y()+d->resizePos.y());
+ break;
+ case KDockWidgetPrivate::ResizeBottom:
+ resize(width(),mme->pos().y()+d->resizePos.y());
+ break;
+ default:
+ break;
+ }
+ return;
+ }
+
+
+ bool bbottom;
+ bool bleft;
+ bool bright;
+ bool btop;
+ int styleheight;
+ QPoint mp;
+ mp=mme->pos();
+ styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this);
+ bbottom=mp.y()>=height()-styleheight;
+ btop=mp.y()<=styleheight;
+ bleft=mp.x()<=styleheight;
+ bright=mp.x()>=width()-styleheight;
+ kdDebug(282)<<"mousemovevent"<<endl;
+ if (bright)
+ {
+ if (btop) setCursor(QCursor(SizeBDiagCursor));
+ else
+ if (bbottom) setCursor(QCursor(SizeFDiagCursor));
+ else setCursor(QCursor(SizeHorCursor));
+ }
+ else if (bleft)
+ {
+ if (btop) setCursor(QCursor(SizeFDiagCursor));
+ else
+ if (bbottom) setCursor(QCursor(SizeBDiagCursor));
+ else setCursor(QCursor(SizeHorCursor));
+ }
+ else
+ if (bbottom || btop) setCursor(QCursor(SizeVerCursor));
+ else setCursor(QCursor(ArrowCursor));
+#endif
+}
+
+void KDockWidget::setLatestKDockContainer(QWidget* container)
+{
+ if (container)
+ {
+ if (dynamic_cast<KDockContainer*>(container))
+ d->container=container;
+ else
+ d->container=0;
+ }
+}
+
+QWidget* KDockWidget::latestKDockContainer()
+{
+ if (!(d->container)) return 0;
+ if (dynamic_cast<KDockContainer*>(d->container.operator->())) return d->container;
+ return 0;
+}
+
+
+
+KDockWidgetAbstractHeader *KDockWidget::getHeader() {
+ return header;
+}
+
+void KDockWidget::setHeader( KDockWidgetAbstractHeader* h )
+{
+ if ( !h ) return;
+
+ if ( header ){
+ delete header;
+ delete layout;
+ header = h;
+ layout = new QVBoxLayout( this );
+ layout->setResizeMode( QLayout::Minimum );
+ layout->addWidget( header );
+ setWidget( widget );
+ } else {
+ header = h;
+ layout->addWidget( header );
+ }
+ kdDebug(282)<<caption()<<": KDockWidget::setHeader"<<endl;
+ setEnableDocking(eDocking);
+}
+
+void KDockWidget::setEnableDocking( int pos )
+{
+ eDocking = pos;
+ if( header && header->inherits( "KDockWidgetHeader" ) )
+ ( ( KDockWidgetHeader* ) header )->showUndockButton( pos & DockDesktop );
+ updateHeader();
+}
+
+void KDockWidget::updateHeader()
+{
+ if ( parent() ){
+#ifdef BORDERLESS_WINDOWS
+ layout->setMargin(0);
+ setMouseTracking(false);
+ setCursor(QCursor(ArrowCursor));
+#endif
+
+ if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
+ header->hide();
+ } else {
+ header->setTopLevel( false );
+ if (widget && dynamic_cast<KDockContainer*>(widget))
+ header->hide();
+ else
+ header->show();
+ }
+ } else {
+ header->setTopLevel( true );
+ header->show();
+#ifdef BORDERLESS_WINDOWS
+ layout->setMargin(2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this));
+ setMouseTracking(true);
+#endif
+ }
+}
+
+void KDockWidget::applyToWidget( QWidget* s, const QPoint& p )
+{
+ if ( parent() != s )
+ {
+ hide();
+ reparent(s, 0, QPoint(0,0), false);
+ }
+
+ if ( s && s->inherits("KDockMainWindow") ){
+ ((KDockMainWindow*)s)->setView( this );
+ }
+
+ if ( manager && s == manager->main ){
+ setGeometry( QRect(QPoint(0,0), manager->main->geometry().size()) );
+ }
+
+ if ( !s )
+ {
+ move(p);
+
+#ifndef NO_KDE2
+#ifdef Q_WS_X11
+ if (d->transient && d->_parent)
+ XSetTransientForHint( qt_xdisplay(), winId(), d->_parent->winId() );
+
+#ifdef BORDERLESS_WINDOWS
+ KWin::setType( winId(), NET::Override); //d->windowType );
+// setWFlags(WStyle_Customize | WStyle_NoBorder | WStyle_Tool);
+#else
+ KWin::setType( winId(), d->windowType );
+#endif // BORDERLESS_WINDOW
+#endif // Q_WS_X11
+#endif
+
+ }
+ updateHeader();
+
+ setIcon(*pix);
+}
+
+void KDockWidget::show()
+{
+ if ( parent() || manager->main->isVisible() )
+ if ( !parent() ){
+ emit manager->setDockDefaultPos( this );
+ emit setDockDefaultPos();
+ if ( parent() ){
+ makeDockVisible();
+ } else {
+ QWidget::show();
+ }
+ } else {
+ QWidget::show();
+ }
+}
+
+#ifndef NO_KDE2
+
+void KDockWidget::setDockWindowType (NET::WindowType windowType)
+{
+ d->windowType = windowType;
+ applyToWidget( parentWidget(), QPoint(0,0) );
+}
+
+#endif
+
+void KDockWidget::setDockWindowTransient (QWidget *parent, bool transientEnabled)
+{
+ d->_parent = parent;
+ d->transient = transientEnabled;
+ applyToWidget( parentWidget(), QPoint(0,0) );
+}
+
+QWidget *KDockWidget::transientTo() {
+ if (d->transient && d->_parent) return d->_parent; else return 0;
+}
+
+bool KDockWidget::event( QEvent *event )
+{
+ switch ( event->type() )
+ {
+ #undef FocusIn
+ case QEvent::FocusIn:
+ if (widget && !d->pendingFocusInEvent) {
+ d->pendingFocusInEvent = true;
+ widget->setFocus();
+ }
+ d->pendingFocusInEvent = false;
+ break;
+ case QEvent::ChildRemoved:
+ if ( widget == ((QChildEvent*)event)->child() ) widget = 0L;
+ break;
+ case QEvent::Show:
+ if ( widget ) widget->show();
+ emit manager->change();
+ break;
+ case QEvent::Hide:
+ if ( widget ) widget->hide();
+ emit manager->change();
+ break;
+ case QEvent::CaptionChange:
+ if ( parentWidget() ){
+ if ( parent()->inherits("KDockSplitter") ){
+ ((KDockSplitter*)(parent()))->updateName();
+ }
+ if ( parentDockTabGroup() ){
+ setDockTabName( parentDockTabGroup() );
+ parentDockTabGroup()->setTabLabel( this, tabPageLabel() );
+ }
+ }
+ break;
+ case QEvent::Close:
+ emit iMBeingClosed();
+ break;
+ default:
+ break;
+ }
+ return QWidget::event( event );
+}
+
+KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
+{
+ if (!parent()) return 0;
+ if (!parent()->inherits("KDockSplitter")) return 0;
+ Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ? Vertical:Horizontal;
+ if (((KDockSplitter*)(parent()))->orientation()==orientation)
+ {
+ KDockWidget *neighbor=
+ ((pos==DockLeft)||(pos==DockTop))?
+ static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getFirst()):
+ static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getLast());
+
+ if (neighbor==this)
+ return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos));
+ else
+ if (neighbor->getWidget() && (neighbor->getWidget()->qt_cast("KDockTabGroup")))
+ return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0));
+ else
+ return neighbor;
+ }
+ else
+ return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos));
+
+ return 0;
+}
+
+
+KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, QPoint pos, bool check, int tabIndex )
+{
+ if (this == target)
+ return 0L; // docking to itself not possible
+// kdDebug(282)<<"manualDock called "<<endl;
+ bool succes = true; // tested flag
+
+ // check allowed this dock submit this operations
+ if ( !(eDocking & (int)dockPos) ){
+ succes = false;
+// kdDebug(282)<<"KDockWidget::manualDock(): success = false (1)"<<endl;
+ }
+
+ KDockWidget *tmpTarget;
+ switch (dockPos) {
+ case DockLeft:tmpTarget=dockManager()->d->leftContainer;
+ break;
+ case DockRight:tmpTarget=dockManager()->d->rightContainer;
+ break;
+ case DockBottom:tmpTarget=dockManager()->d->bottomContainer;
+ break;
+ case DockTop:tmpTarget=dockManager()->d->topContainer;
+ break;
+ default: tmpTarget=0;
+ }
+
+ if (this!=tmpTarget) {
+ if (target && (target==dockManager()->d->mainDockWidget) && tmpTarget) {
+ return manualDock(tmpTarget,DockCenter,spliPos,pos,check,tabIndex);
+ }
+ }
+
+ // check allowed target submit this operations
+ if ( target && !(target->sDocking & (int)dockPos) ){
+ succes = false;
+// kdDebug(282)<<"KDockWidget::manualDock(): success = false (2)"<<endl;
+ }
+
+ if ( parent() && !parent()->inherits("KDockSplitter") && !parentDockTabGroup() &&
+ !(dynamic_cast<KDockContainer*>(parent())) && !parentDockContainer()){
+// kdDebug(282)<<"KDockWidget::manualDock(): success = false (3)"<<endl;
+// kdDebug(282)<<parent()->name()<<endl;
+ succes = false;
+ }
+
+// kdDebug(282)<<"KDockWidget::manualDock(): success == false "<<endl;
+ if ( !succes ){
+ // try to make another manualDock
+ KDockWidget* dock_result = 0L;
+ if ( target && !check ){
+ KDockWidget::DockPosition another__dockPos = KDockWidget::DockNone;
+ switch ( dockPos ){
+ case KDockWidget::DockLeft : another__dockPos = KDockWidget::DockRight ; break;
+ case KDockWidget::DockRight : another__dockPos = KDockWidget::DockLeft ; break;
+ case KDockWidget::DockTop : another__dockPos = KDockWidget::DockBottom; break;
+ case KDockWidget::DockBottom: another__dockPos = KDockWidget::DockTop ; break;
+ default: break;
+ }
+ dock_result = target->manualDock( this, another__dockPos, spliPos, pos, true, tabIndex );
+ }
+ return dock_result;
+ }
+ // end check block
+
+ d->blockHasUndockedSignal = true;
+ undock();
+ d->blockHasUndockedSignal = false;
+
+ if ( !target ){
+ move( pos );
+ show();
+ emit manager->change();
+ return this;
+ }
+
+// kdDebug(282)<<"Looking for KDockTabGroup"<<endl;
+ KDockTabGroup* parentTab = target->parentDockTabGroup();
+ if ( parentTab ){
+ // add to existing TabGroup
+ applyToWidget( parentTab );
+ parentTab->insertTab( this, icon() ? *icon() : QPixmap(),
+ tabPageLabel(), tabIndex );
+
+ QWidget *wantTransient=parentTab->transientTo();
+ target->setDockWindowTransient(wantTransient,wantTransient);
+
+ setDockTabName( parentTab );
+ if( !toolTipStr.isEmpty())
+ parentTab->setTabToolTip( this, toolTipStr);
+
+ currentDockPos = KDockWidget::DockCenter;
+ emit manager->change();
+ return (KDockWidget*)parentTab->parent();
+ }
+ else
+ {
+// kdDebug(282)<<"Looking for KDockContainer"<<endl;
+ QWidget *contWid=target->parentDockContainer();
+ if (!contWid) contWid=target->widget;
+ if (contWid)
+ {
+ KDockContainer *cont=dynamic_cast<KDockContainer*>(contWid);
+ if (cont)
+ {
+ if (latestKDockContainer() && (latestKDockContainer()!=contWid)) {
+ KDockContainer* dc = dynamic_cast<KDockContainer*>(latestKDockContainer());
+ if (dc) {
+ dc->removeWidget(this);
+ }
+ }
+// kdDebug(282)<<"KDockContainerFound"<<endl;
+ applyToWidget( contWid );
+ cont->insertWidget( this, icon() ? *icon() : QPixmap(),
+ tabPageLabel(), tabIndex );
+ setLatestKDockContainer(contWid);
+// setDockTabName( parentTab );
+ if( !toolTipStr.isEmpty())
+ cont->setToolTip( this, toolTipStr);
+
+ currentDockPos = KDockWidget::DockCenter;
+ emit manager->change();
+ return (KDockWidget*)(cont->parentDockWidget());
+
+ }
+ }
+ }
+
+ // create a new dockwidget that will contain the target and this
+ QWidget* parentDock = target->parentWidget();
+ KDockWidget* newDock = new KDockWidget( manager, "tempName", QPixmap(""), parentDock );
+ newDock->currentDockPos = target->currentDockPos;
+
+ if ( dockPos == KDockWidget::DockCenter ){
+ newDock->isTabGroup = true;
+ } else {
+ newDock->isGroup = true;
+ }
+ newDock->eDocking = (target->eDocking & eDocking) & (~(int)KDockWidget::DockCenter);
+
+ newDock->applyToWidget( parentDock );
+
+ if ( !parentDock ){
+ // dock to a toplevel dockwidget means newDock is toplevel now
+ newDock->move( target->frameGeometry().topLeft() );
+ newDock->resize( target->geometry().size() );
+ if ( target->isVisibleToTLW() ) newDock->show();
+ }
+
+ // redirect the dockback button to the new dockwidget
+ if( target->formerBrotherDockWidget ) {
+ newDock->setFormerBrotherDockWidget(target->formerBrotherDockWidget);
+ if( formerBrotherDockWidget )
+ target->loseFormerBrotherDockWidget();
+ }
+ newDock->formerDockPos = target->formerDockPos;
+
+
+ // HERE SOMETING CREATING CONTAINERS SHOULD BE ADDED !!!!!
+ if ( dockPos == KDockWidget::DockCenter )
+ {
+ KDockTabGroup* tab = new KDockTabGroup( newDock, "_dock_tab");
+ QObject::connect(tab, SIGNAL(currentChanged(QWidget*)), d, SLOT(slotFocusEmbeddedWidget(QWidget*)));
+ newDock->setWidget( tab );
+
+ target->applyToWidget( tab );
+ applyToWidget( tab );
+
+
+ tab->insertTab( target, target->icon() ? *(target->icon()) : QPixmap(),
+ target->tabPageLabel() );
+
+
+
+ if( !target->toolTipString().isEmpty())
+ tab->setTabToolTip( target, target->toolTipString());
+
+ tab->insertTab( this, icon() ? *icon() : QPixmap(),
+ tabPageLabel(), tabIndex );
+
+ QRect geom=newDock->geometry();
+ QWidget *wantTransient=tab->transientTo();
+ newDock->setDockWindowTransient(wantTransient,wantTransient);
+ newDock->setGeometry(geom);
+
+ if( !toolTipString().isEmpty())
+ tab->setTabToolTip( this, toolTipString());
+
+ setDockTabName( tab );
+ tab->show();
+
+ currentDockPos = DockCenter;
+ target->formerDockPos = target->currentDockPos;
+ target->currentDockPos = DockCenter;
+ }
+ else {
+ // if to dock not to the center of the target dockwidget,
+ // dock to newDock
+ KDockSplitter* panner = 0L;
+ if ( dockPos == KDockWidget::DockTop || dockPos == KDockWidget::DockBottom ) panner = new KDockSplitter( newDock, "_dock_split_", Horizontal, spliPos, manager->splitterHighResolution() );
+ if ( dockPos == KDockWidget::DockLeft || dockPos == KDockWidget::DockRight ) panner = new KDockSplitter( newDock, "_dock_split_", Vertical , spliPos, manager->splitterHighResolution() );
+ newDock->setWidget( panner );
+
+ panner->setOpaqueResize(manager->splitterOpaqueResize());
+ panner->setKeepSize(manager->splitterKeepSize());
+ panner->setFocusPolicy( NoFocus );
+ target->applyToWidget( panner );
+ applyToWidget( panner );
+ target->formerDockPos = target->currentDockPos;
+ if ( dockPos == KDockWidget::DockRight) {
+ panner->activate( target, this );
+ currentDockPos = KDockWidget::DockRight;
+ target->currentDockPos = KDockWidget::DockLeft;
+ }
+ else if( dockPos == KDockWidget::DockBottom) {
+ panner->activate( target, this );
+ currentDockPos = KDockWidget::DockBottom;
+ target->currentDockPos = KDockWidget::DockTop;
+ }
+ else if( dockPos == KDockWidget::DockTop) {
+ panner->activate( this, target );
+ currentDockPos = KDockWidget::DockTop;
+ target->currentDockPos = KDockWidget::DockBottom;
+ }
+ else if( dockPos == KDockWidget::DockLeft) {
+ panner->activate( this, target );
+ currentDockPos = KDockWidget::DockLeft;
+ target->currentDockPos = KDockWidget::DockRight;
+ }
+ target->show();
+ show();
+ panner->show();
+ }
+
+ if ( parentDock ){
+ if ( parentDock->inherits("KDockSplitter") ){
+ KDockSplitter* sp = (KDockSplitter*)parentDock;
+ sp->deactivate();
+ if ( sp->getFirst() == target )
+ sp->activate( newDock, 0L );
+ else
+ sp->activate( 0L, newDock );
+ }
+ }
+
+ newDock->show();
+ emit target->docking( this, dockPos );
+ emit manager->replaceDock( target, newDock );
+ emit manager->change();
+
+ return newDock;
+}
+
+KDockTabGroup* KDockWidget::parentDockTabGroup() const
+{
+ if ( !parent() ) return 0L;
+ QWidget* candidate = parentWidget()->parentWidget();
+ if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate;
+ return 0L;
+}
+
+QWidget *KDockWidget::parentDockContainer() const
+{
+ if (!parent()) return 0L;
+ QWidget* candidate = parentWidget()->parentWidget();
+ if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate;
+ return 0L;
+}
+
+
+void KDockWidget::setForcedFixedWidth(int w)
+{
+ d->forcedWidth=w;
+ setFixedWidth(w);
+ if (!parent()) return;
+ if (parent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->setForcedFixedWidth(this,w);
+}
+
+void KDockWidget::setForcedFixedHeight(int h)
+{
+ d->forcedHeight=h;
+ setFixedHeight(h);
+ if (!parent()) return;
+ if (parent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->setForcedFixedHeight(this,h);
+}
+
+int KDockWidget::forcedFixedWidth()
+{
+ return d->forcedWidth;
+}
+
+int KDockWidget::forcedFixedHeight()
+{
+ return d->forcedHeight;
+}
+
+void KDockWidget::restoreFromForcedFixedSize()
+{
+ d->forcedWidth=-1;
+ setMinimumWidth(0);
+ setMaximumWidth(32000);
+ setMinimumHeight(0);
+ setMaximumHeight(32000);
+ if (!parent()) return;
+ if (parent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->restoreFromForcedFixedSize(this);
+}
+
+void KDockWidget::toDesktop()
+{
+ QPoint p = mapToGlobal( QPoint( -30, -30 ) );
+ if( p.x( ) < 0 )
+ p.setX( 0 );
+ if( p.y( ) < 0 )
+ p.setY( 0 );
+ manualDock( 0, DockDesktop, 50, p );
+}
+
+KDockWidget::DockPosition KDockWidget::currentDockPosition() const
+{
+ return currentDockPos;
+}
+
+void KDockWidget::undock()
+{
+// kdDebug(282)<<"KDockWidget::undock()"<<endl;
+
+ manager->d->dragRect = QRect ();
+ manager->drawDragRectangle ();
+
+ QWidget* parentW = parentWidget();
+ if ( !parentW ){
+ hide();
+ if (!d->blockHasUndockedSignal)
+ emit hasUndocked();
+ return;
+ }
+
+ formerDockPos = currentDockPos;
+ currentDockPos = KDockWidget::DockDesktop;
+
+ manager->blockSignals(true);
+ manager->undockProcess = true;
+
+ bool isV = parentW->isVisibleToTLW();
+
+ //UNDOCK HAS TO BE IMPLEMENTED CORRECTLY :)
+ KDockTabGroup* parentTab = parentDockTabGroup();
+ if ( parentTab ){
+ d->index = parentTab->indexOf( this); // memorize the page position in the tab widget
+ parentTab->removePage( this );
+/*
+ QWidget *wantTransient=parentTab->transientTo();
+ target->setDockWindowTransient(wantTransient,wantTransient);
+ */
+ setFormerBrotherDockWidget((KDockWidget*)parentTab->page(0));
+ applyToWidget( 0L );
+ if ( parentTab->count() == 1 ){
+
+ // last subdock widget in the tab control
+ KDockWidget* lastTab = (KDockWidget*)parentTab->page(0);
+ parentTab->removePage( lastTab );
+/* QWidget *wantTransient=parentTab->transientTo();
+ target->setDockWindowTransient(wantTransient,wantTransient);*/
+
+ lastTab->applyToWidget( 0L );
+ lastTab->move( parentTab->mapToGlobal(parentTab->frameGeometry().topLeft()) );
+
+ // KDockTabGroup always have a parent that is a KDockWidget
+ KDockWidget* parentOfTab = (KDockWidget*)parentTab->parent();
+ delete parentTab; // KDockTabGroup
+
+ QWidget* parentOfDockWidget = parentOfTab->parentWidget();
+ if ( !parentOfDockWidget ){
+ if ( isV ) lastTab->show();
+ } else {
+ if ( parentOfDockWidget->inherits("KDockSplitter") ){
+ KDockSplitter* split = (KDockSplitter*)parentOfDockWidget;
+ lastTab->applyToWidget( split );
+ split->deactivate();
+ if ( split->getFirst() == parentOfTab ){
+ split->activate( lastTab );
+ if ( ((KDockWidget*)split->parent())->splitterOrientation == Vertical )
+ emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockLeft );
+ else
+ emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockTop );
+ } else {
+ split->activate( 0L, lastTab );
+ if ( ((KDockWidget*)split->parent())->splitterOrientation == Vertical )
+ emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockRight );
+ else
+ emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockBottom );
+ }
+ split->show();
+ } else {
+ lastTab->applyToWidget( parentOfDockWidget );
+ }
+ lastTab->show();
+ }
+ manager->blockSignals(false);
+ emit manager->replaceDock( parentOfTab, lastTab );
+ lastTab->currentDockPos = parentOfTab->currentDockPos;
+ emit parentOfTab->iMBeingClosed();
+ manager->blockSignals(true);
+ delete parentOfTab;
+
+ } else {
+ setDockTabName( parentTab );
+ }
+ } else {
+ /*********************************************************************************************/
+ //QWidget* containerWidget = (QWidget*)parent();
+ bool undockedFromContainer=false;
+ if (d->container)
+ {
+// kdDebug(282)<<"undocked from dockcontainer"<<endl;
+ undockedFromContainer=true;
+ KDockContainer* dc = dynamic_cast<KDockContainer*>(d->container.operator->());
+ if (dc) {
+ dc->undockWidget(this);
+ setFormerBrotherDockWidget(dc->parentDockWidget());
+ }
+ applyToWidget( 0L );
+ }
+ if (!undockedFromContainer) {
+/*********************************************************************************************/
+ if ( parentW->inherits("KDockSplitter") ){
+ KDockSplitter* parentSplitterOfDockWidget = (KDockSplitter*)parentW;
+ d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos();
+
+ KDockWidget* secondWidget = (KDockWidget*)parentSplitterOfDockWidget->getAnother( this );
+ KDockWidget* group = (KDockWidget*)parentSplitterOfDockWidget->parentWidget();
+ setFormerBrotherDockWidget(secondWidget);
+ applyToWidget( 0L );
+ group->hide();
+
+ if ( !group->parentWidget() ){
+ secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() );
+ secondWidget->resize( group->width(), group->height() );
+ } else {
+ QWidget* obj = group->parentWidget();
+ secondWidget->applyToWidget( obj );
+ if ( obj->inherits("KDockSplitter") ){
+ KDockSplitter* parentOfGroup = (KDockSplitter*)obj;
+ parentOfGroup->deactivate();
+
+ if ( parentOfGroup->getFirst() == group )
+ parentOfGroup->activate( secondWidget );
+ else
+ parentOfGroup->activate( 0L, secondWidget );
+ }
+ }
+ secondWidget->currentDockPos = group->currentDockPos;
+ secondWidget->formerDockPos = group->formerDockPos;
+ delete parentSplitterOfDockWidget;
+ manager->blockSignals(false);
+ emit manager->replaceDock( group, secondWidget );
+ emit group->iMBeingClosed();
+ manager->blockSignals(true);
+ delete group;
+
+ if ( isV ) secondWidget->show();
+ } else {
+ if (!d->pendingDtor) {
+ // don't reparent in the dtor of this
+ applyToWidget( 0L );
+ }
+ }
+/*********************************************************************************************/
+ }
+ }
+ manager->blockSignals(false);
+ if (!d->blockHasUndockedSignal)
+ emit manager->change();
+ manager->undockProcess = false;
+
+ if (!d->blockHasUndockedSignal)
+ emit hasUndocked();
+}
+
+void KDockWidget::setWidget( QWidget* mw )
+{
+ if ( !mw ) return;
+
+ if ( mw->parent() != this ){
+ mw->reparent(this, 0, QPoint(0,0), false);
+ }
+
+#ifdef BORDERLESS_WINDOWS
+ if (!mw->ownCursor()) mw->setCursor(QCursor(ArrowCursor));
+#endif
+ widget = mw;
+ delete layout;
+
+ layout = new QVBoxLayout( this );
+ layout->setResizeMode( QLayout::Minimum );
+
+ KDockContainer* dc = dynamic_cast<KDockContainer*>(widget);
+ if (dc)
+ {
+ d->isContainer=true;
+ manager->d->containerDocks.append(this);
+ }
+ else
+ {
+ d->isContainer=false;
+ }
+
+ {
+ header->show();
+ layout->addWidget( header );
+ layout->addWidget( widget,1 );
+ }
+ updateHeader();
+ emit widgetSet(mw);
+}
+
+void KDockWidget::setDockTabName( KDockTabGroup* tab )
+{
+ QString listOfName;
+ QString listOfCaption;
+ for ( int i = 0; i < tab->count(); ++i ) {
+ QWidget *w = tab->page( i );
+ listOfCaption.append( w->caption() ).append(",");
+ listOfName.append( w->name() ).append(",");
+ }
+ listOfCaption.remove( listOfCaption.length()-1, 1 );
+ listOfName.remove( listOfName.length()-1, 1 );
+
+ tab->parentWidget()->setName( listOfName.utf8() );
+ tab->parentWidget()->setCaption( listOfCaption );
+
+ tab->parentWidget()->repaint( false ); // KDockWidget->repaint
+ if ( tab->parentWidget()->parent() )
+ if ( tab->parentWidget()->parent()->inherits("KDockSplitter") )
+ ((KDockSplitter*)(tab->parentWidget()->parent()))->updateName();
+}
+
+bool KDockWidget::mayBeHide() const
+{
+ bool f = (parent() != manager->main);
+ return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) );
+}
+
+bool KDockWidget::mayBeShow() const
+{
+ bool f = (parent() != manager->main);
+ return ( !isGroup && !isTabGroup && f && !isVisible() );
+}
+
+void KDockWidget::changeHideShowState()
+{
+ if ( mayBeHide() ){
+ undock();
+ return;
+ }
+
+ if ( mayBeShow() ){
+ if ( manager->main->inherits("KDockMainWindow") ){
+ ((KDockMainWindow*)manager->main)->makeDockVisible(this);
+ } else {
+ makeDockVisible();
+ }
+ }
+}
+
+void KDockWidget::makeDockVisible()
+{
+ if ( parentDockTabGroup() ){
+ parentDockTabGroup()->showPage( this );
+ }
+ if (parentDockContainer()) {
+ QWidget *contWid=parentDockContainer();
+ KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
+ if (x) {
+ x->showWidget(this);
+ }
+ }
+ if ( isVisible() ) return;
+
+ QWidget* p = parentWidget();
+ while ( p ){
+ if ( !p->isVisible() )
+ p->show();
+ p = p->parentWidget();
+ }
+ if( !parent() ) // is undocked
+ dockBack();
+ show();
+}
+
+void KDockWidget::setFormerBrotherDockWidget(KDockWidget *dockWidget)
+{
+ formerBrotherDockWidget = dockWidget;
+ if( formerBrotherDockWidget )
+ QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
+ this, SLOT(loseFormerBrotherDockWidget()) );
+}
+
+void KDockWidget::loseFormerBrotherDockWidget()
+{
+ if( formerBrotherDockWidget )
+ QObject::disconnect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
+ this, SLOT(loseFormerBrotherDockWidget()) );
+ formerBrotherDockWidget = 0L;
+ repaint();
+}
+
+void KDockWidget::dockBack()
+{
+ if( formerBrotherDockWidget) {
+ // search all children if it tries to dock back to a child
+ bool found = false;
+ QObjectList* cl = queryList("KDockWidget");
+ QObjectListIt it( *cl );
+ QObject * obj;
+ while ( !found && (obj=it.current()) != 0 ) {
+ ++it;
+ QWidget* widg = (QWidget*)obj;
+ if( widg == formerBrotherDockWidget)
+ found = true;
+ }
+ delete cl;
+
+ if( !found) {
+ // can dock back to the former brother dockwidget
+ manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ formerBrotherDockWidget = 0L;
+ makeDockVisible();
+ return;
+ }
+ }
+
+ // else dockback to the dockmainwindow (default behavior)
+ manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ formerBrotherDockWidget = 0L;
+ if (parent())
+ makeDockVisible();
+}
+
+bool KDockWidget::isDockBackPossible() const
+{
+ if( !(formerBrotherDockWidget) || !(formerBrotherDockWidget->dockSite() & formerDockPos))
+ return false;
+ else
+ return true;
+}
+
+/**************************************************************************************/
+
+
+KDockManager::KDockManager( QWidget* mainWindow , const char* name )
+:QObject( mainWindow, name )
+ ,main(mainWindow)
+ ,currentDragWidget(0L)
+ ,currentMoveWidget(0L)
+ ,childDockWidgetList(0L)
+ ,autoCreateDock(0L)
+ ,storeW(0)
+ ,storeH(0)
+ ,dragging(false)
+ ,undockProcess(false)
+ ,dropCancel(true)
+{
+ d = new KDockManagerPrivate;
+
+ d->readyToDrag = false;
+ d->mainDockWidget=0;
+
+#ifndef NO_KDE2
+ d->splitterOpaqueResize = KGlobalSettings::opaqueResize();
+#else
+ d->splitterOpaqueResize = false;
+#endif
+
+ d->splitterKeepSize = false;
+ d->splitterHighResolution = false;
+ d->m_readDockConfigMode = WrapExistingWidgetsOnly; // default as before
+
+ main->installEventFilter( this );
+
+ undockProcess = false;
+
+ menuData = new QPtrList<MenuDockData>;
+ menuData->setAutoDelete( true );
+ menuData->setAutoDelete( true );
+
+#ifndef NO_KDE2
+ menu = new KPopupMenu();
+#else
+ menu = new QPopupMenu();
+#endif
+
+ connect( menu, SIGNAL(aboutToShow()), SLOT(slotMenuPopup()) );
+ connect( menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int)) );
+
+ childDock = new QObjectList();
+ childDock->setAutoDelete( false );
+}
+
+
+void KDockManager::setMainDockWidget2(KDockWidget *w)
+{
+ d->mainDockWidget=w;
+}
+
+KDockManager::~KDockManager()
+{
+ delete menuData;
+ delete menu;
+
+ QObjectListIt it( *childDock );
+ KDockWidget * obj;
+
+ while ( (obj=(KDockWidget*)it.current()) ) {
+ delete obj;
+ }
+ delete childDock;
+ delete d;
+ d=0;
+}
+
+void KDockManager::activate()
+{
+ QObjectListIt it( *childDock );
+ KDockWidget * obj;
+
+ while ( (obj=(KDockWidget*)it.current()) ) {
+ ++it;
+ if ( obj->widget ) obj->widget->show();
+ if ( !obj->parentDockTabGroup() ){
+ obj->show();
+ }
+ }
+ if ( !main->inherits("QDialog") ) main->show();
+}
+
+bool KDockManager::eventFilter( QObject *obj, QEvent *event )
+{
+
+ if ( obj->inherits("KDockWidgetAbstractHeaderDrag") ){
+ KDockWidget* pDockWdgAtCursor = 0L;
+ KDockWidget* curdw = ((KDockWidgetAbstractHeaderDrag*)obj)->dockWidget();
+ switch ( event->type() ){
+ case QEvent::MouseButtonDblClick:
+ if (curdw->currentDockPos == KDockWidget::DockDesktop) curdw->dockBack();
+ else
+ {
+ curdw->toDesktop();
+ // curdw->manualDock (0, KDockWidget::DockDesktop);
+ }
+ break;
+
+ case QEvent::MouseButtonPress:
+ if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ if ( curdw->eDocking != (int)KDockWidget::DockNone ){
+ dropCancel = true;
+ curdw->setFocus();
+ qApp->processOneEvent();
+
+ currentDragWidget = curdw;
+ currentMoveWidget = 0L;
+ childDockWidgetList = new QWidgetList();
+ childDockWidgetList->append( curdw );
+ findChildDockWidget( curdw, childDockWidgetList );
+
+ //d->oldDragRect = QRect(); should fix rectangle not erased problem
+ d->dragRect = QRect(curdw->geometry());
+ QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->dragRect.moveTopLeft(p);
+ drawDragRectangle();
+ d->readyToDrag = true;
+
+ d->dragOffset = QCursor::pos()-currentDragWidget->mapToGlobal(QPoint(0,0));
+ }
+
+ }
+ break;
+ case QEvent::MouseButtonRelease:
+ if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ if ( dragging ){
+ if ( !dropCancel )
+ drop();
+ else
+ cancelDrop();
+ }
+ if (d->readyToDrag) {
+ d->readyToDrag = false;
+ //d->oldDragRect = QRect(); should fix rectangle not erased problem
+ d->dragRect = QRect(curdw->geometry());
+ QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->dragRect.moveTopLeft(p);
+ drawDragRectangle();
+ currentDragWidget = 0L;
+ delete childDockWidgetList;
+ childDockWidgetList = 0L;
+ }
+ dragging = false;
+ dropCancel = true;
+ }
+ break;
+ case QEvent::MouseMove:
+ if ( dragging ) {
+
+#ifdef BORDERLESS_WINDOWS
+//BEGIN TEST
+ KDockWidget *oldMoveWidget;
+ if (!curdw->parent())
+ {
+ curdw->move(QCursor::pos()-d->dragOffset);
+ pDockWdgAtCursor = findDockWidgetAt( QCursor::pos()-QPoint(0,d->dragOffset.y()+3) );
+ oldMoveWidget = currentMoveWidget;
+ }
+ else
+ {
+ pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ oldMoveWidget = currentMoveWidget;
+ }
+//END TEST
+#else
+ pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ KDockWidget* oldMoveWidget = currentMoveWidget;
+#endif
+
+ if ( currentMoveWidget && pDockWdgAtCursor == currentMoveWidget ) { //move
+ dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( QCursor::pos() ) );
+ break;
+ } else {
+ if (dropCancel && curdw) {
+ d->dragRect = QRect(curdw->geometry());
+ QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->dragRect.moveTopLeft(p);
+ }else
+ d->dragRect = QRect();
+
+ drawDragRectangle();
+ }
+
+ if ( !pDockWdgAtCursor && !(curdw->eDocking & (int)KDockWidget::DockDesktop) ){
+ // just moving at the desktop
+ currentMoveWidget = pDockWdgAtCursor;
+ curPos = KDockWidget::DockDesktop;
+ } else {
+ if ( oldMoveWidget && pDockWdgAtCursor != currentMoveWidget ) { //leave
+ currentMoveWidget = pDockWdgAtCursor;
+ curPos = KDockWidget::DockDesktop;
+ }
+ }
+
+ if ( oldMoveWidget != pDockWdgAtCursor && pDockWdgAtCursor ) { //enter pDockWdgAtCursor
+ currentMoveWidget = pDockWdgAtCursor;
+ curPos = KDockWidget::DockDesktop;
+ }
+ } else {
+ if (d->readyToDrag) {
+ d->readyToDrag = false;
+ }
+ if ( (((QMouseEvent*)event)->state() == LeftButton) &&
+ (curdw->eDocking != (int)KDockWidget::DockNone) ) {
+ startDrag( curdw);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ return QObject::eventFilter( obj, event );
+}
+
+KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
+{
+ dropCancel = true;
+
+ if (!currentDragWidget)
+ return 0L; // pointer access safety
+
+ if (currentDragWidget->eDocking == (int)KDockWidget::DockNone ) return 0L;
+
+ QWidget* p = QApplication::widgetAt( pos );
+ if ( !p ) {
+ dropCancel = false;
+ return 0L;
+ }
+#if defined(_OS_WIN32_) || defined(Q_OS_WIN32)
+ p = p->topLevelWidget();
+#endif
+ QWidget* w = 0L;
+ findChildDockWidget( w, p, p->mapFromGlobal(pos) );
+ if ( !w ){
+ if ( !p->inherits("KDockWidget") ) {
+ return 0L;
+ }
+ w = p;
+ }
+ if ( qt_find_obj_child( w, "KDockSplitter", "_dock_split_" ) ) return 0L;
+ if ( qt_find_obj_child( w, "KDockTabGroup", "_dock_tab" ) ) return 0L;
+ if (dynamic_cast<KDockContainer*>(w)) return 0L;
+
+ if (!childDockWidgetList) return 0L;
+ if ( childDockWidgetList->find(w) != -1 ) return 0L;
+ if ( currentDragWidget->isGroup && ((KDockWidget*)w)->parentDockTabGroup() ) return 0L;
+
+ KDockWidget* www = (KDockWidget*)w;
+ if ( www->sDocking == (int)KDockWidget::DockNone ) return 0L;
+ if( !www->widget )
+ return 0L;
+
+ KDockWidget::DockPosition curPos = KDockWidget::DockDesktop;
+ QPoint cpos = www->mapFromGlobal( pos );
+
+ int ww = www->widget->width() / 3;
+ int hh = www->widget->height() / 3;
+
+ if ( cpos.y() <= hh ){
+ curPos = KDockWidget::DockTop;
+ } else
+ if ( cpos.y() >= 2*hh ){
+ curPos = KDockWidget::DockBottom;
+ } else
+ if ( cpos.x() <= ww ){
+ curPos = KDockWidget::DockLeft;
+ } else
+ if ( cpos.x() >= 2*ww ){
+ curPos = KDockWidget::DockRight;
+ } else
+ curPos = KDockWidget::DockCenter;
+
+ if ( !(www->sDocking & (int)curPos) ) return 0L;
+ if ( !(currentDragWidget->eDocking & (int)curPos) ) return 0L;
+ if ( www->manager != this ) return 0L;
+
+ dropCancel = false;
+ return www;
+}
+
+void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QPoint& pos )
+{
+ if ( p->children() ) {
+ QWidget *w;
+ QObjectListIt it( *p->children() );
+ it.toLast();
+ while ( it.current() ) {
+ if ( it.current()->isWidgetType() ) {
+ w = (QWidget*)it.current();
+ if ( w->isVisible() && w->geometry().contains(pos) ) {
+ if ( w->inherits("KDockWidget") ) ww = w;
+ findChildDockWidget( ww, w, w->mapFromParent(pos) );
+ return;
+ }
+ }
+ --it;
+ }
+ }
+ return;
+}
+
+void KDockManager::findChildDockWidget( const QWidget* p, QWidgetList*& list )
+{
+ if ( p->children() ) {
+ QWidget *w;
+ QObjectListIt it( *p->children() );
+ it.toLast();
+ while ( it.current() ) {
+ if ( it.current()->isWidgetType() ) {
+ w = (QWidget*)it.current();
+ if ( w->isVisible() ) {
+ if ( w->inherits("KDockWidget") ) list->append( w );
+ findChildDockWidget( w, list );
+ }
+ }
+ --it;
+ }
+ }
+ return;
+}
+
+void KDockManager::startDrag( KDockWidget* w )
+{
+ if(( w->currentDockPos == KDockWidget::DockLeft) || ( w->currentDockPos == KDockWidget::DockRight)
+ || ( w->currentDockPos == KDockWidget::DockTop) || ( w->currentDockPos == KDockWidget::DockBottom)) {
+ w->prevSideDockPosBeforeDrag = w->currentDockPos;
+
+ if ( w->parentWidget()->inherits("KDockSplitter") ){
+ KDockSplitter* parentSplitterOfDockWidget = (KDockSplitter*)(w->parentWidget());
+ w->d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos();
+ }
+ }
+
+ curPos = KDockWidget::DockDesktop;
+ dragging = true;
+
+ QApplication::setOverrideCursor(QCursor(sizeAllCursor));
+}
+
+void KDockManager::dragMove( KDockWidget* dw, QPoint pos )
+{
+ QPoint p = dw->mapToGlobal( dw->widget->pos() );
+ KDockWidget::DockPosition oldPos = curPos;
+
+ QSize r = dw->widget->size();
+ if ( dw->parentDockTabGroup() ){
+ curPos = KDockWidget::DockCenter;
+ if ( oldPos != curPos ) {
+ d->dragRect.setRect( p.x()+2, p.y()+2, r.width()-4, r.height()-4 );
+ }
+ return;
+ }
+
+ int w = r.width() / 3;
+ int h = r.height() / 3;
+
+ if ( pos.y() <= h ){
+ curPos = KDockWidget::DockTop;
+ w = r.width();
+ } else
+ if ( pos.y() >= 2*h ){
+ curPos = KDockWidget::DockBottom;
+ p.setY( p.y() + 2*h );
+ w = r.width();
+ } else
+ if ( pos.x() <= w ){
+ curPos = KDockWidget::DockLeft;
+ h = r.height();
+ } else
+ if ( pos.x() >= 2*w ){
+ curPos = KDockWidget::DockRight;
+ p.setX( p.x() + 2*w );
+ h = r.height();
+ } else
+ {
+ curPos = KDockWidget::DockCenter;
+ p.setX( p.x() + w );
+ p.setY( p.y() + h );
+ }
+
+ if ( oldPos != curPos ) {
+ d->dragRect.setRect( p.x(), p.y(), w, h );
+ drawDragRectangle();
+ }
+}
+
+
+void KDockManager::cancelDrop()
+{
+ QApplication::restoreOverrideCursor();
+
+ delete childDockWidgetList;
+ childDockWidgetList = 0L;
+
+ d->dragRect = QRect(); // cancel drawing
+ drawDragRectangle(); // only the old rect will be deleted
+}
+
+
+void KDockManager::drop()
+{
+ d->dragRect = QRect(); // cancel drawing
+ drawDragRectangle(); // only the old rect will be deleted
+
+ QApplication::restoreOverrideCursor();
+
+ delete childDockWidgetList;
+ childDockWidgetList = 0L;
+
+ if ( dropCancel ) return;
+ if ( !currentMoveWidget && (!(currentDragWidget->eDocking & (int)KDockWidget::DockDesktop)) ) {
+ d->dragRect = QRect(); // cancel drawing
+ drawDragRectangle(); // only the old rect will be deleted
+ return;
+ }
+ if ( !currentMoveWidget && !currentDragWidget->parent() ) {
+ currentDragWidget->move( QCursor::pos() - d->dragOffset );
+ }
+ else {
+ int splitPos = currentDragWidget->d->splitPosInPercent;
+ // do we have to calculate 100%-splitPosInPercent?
+ if( (curPos != currentDragWidget->prevSideDockPosBeforeDrag) && (curPos != KDockWidget::DockCenter) && (curPos != KDockWidget::DockDesktop)) {
+ switch( currentDragWidget->prevSideDockPosBeforeDrag) {
+ case KDockWidget::DockLeft: if(curPos != KDockWidget::DockTop) splitPos = 100-splitPos; break;
+ case KDockWidget::DockRight: if(curPos != KDockWidget::DockBottom) splitPos = 100-splitPos; break;
+ case KDockWidget::DockTop: if(curPos != KDockWidget::DockLeft) splitPos = 100-splitPos; break;
+ case KDockWidget::DockBottom: if(curPos != KDockWidget::DockRight) splitPos = 100-splitPos; break;
+ default: break;
+ }
+ }
+ currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, QCursor::pos() - d->dragOffset );
+ currentDragWidget->makeDockVisible();
+ }
+}
+
+
+static QDomElement createStringEntry(QDomDocument &doc, const QString &tagName, const QString &str)
+{
+ QDomElement el = doc.createElement(tagName);
+
+ el.appendChild(doc.createTextNode(str));
+ return el;
+}
+
+
+static QDomElement createBoolEntry(QDomDocument &doc, const QString &tagName, bool b)
+{
+ return createStringEntry(doc, tagName, QString::fromLatin1(b? "true" : "false"));
+}
+
+
+static QDomElement createNumberEntry(QDomDocument &doc, const QString &tagName, int n)
+{
+ return createStringEntry(doc, tagName, QString::number(n));
+}
+
+
+static QDomElement createRectEntry(QDomDocument &doc, const QString &tagName, const QRect &rect)
+{
+ QDomElement el = doc.createElement(tagName);
+
+ QDomElement xel = doc.createElement("x");
+ xel.appendChild(doc.createTextNode(QString::number(rect.x())));
+ el.appendChild(xel);
+ QDomElement yel = doc.createElement("y");
+ yel.appendChild(doc.createTextNode(QString::number(rect.y())));
+ el.appendChild(yel);
+ QDomElement wel = doc.createElement("width");
+ wel.appendChild(doc.createTextNode(QString::number(rect.width())));
+ el.appendChild(wel);
+ QDomElement hel = doc.createElement("height");
+ hel.appendChild(doc.createTextNode(QString::number(rect.height())));
+ el.appendChild(hel);
+
+ return el;
+}
+
+
+static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
+ const QString &subTagName, const QStrList &list)
+{
+ QDomElement el = doc.createElement(tagName);
+
+ QStrListIterator it(list);
+ for (; it.current(); ++it) {
+ QDomElement subel = doc.createElement(subTagName);
+ subel.appendChild(doc.createTextNode(QString::fromLatin1(it.current())));
+ el.appendChild(subel);
+ }
+
+ return el;
+}
+
+
+static QString stringEntry(QDomElement &base, const QString &tagName)
+{
+ return base.namedItem(tagName).firstChild().toText().data();
+}
+
+
+static bool boolEntry(QDomElement &base, const QString &tagName)
+{
+ return base.namedItem(tagName).firstChild().toText().data() == "true";
+}
+
+
+static int numberEntry(QDomElement &base, const QString &tagName)
+{
+ return stringEntry(base, tagName).toInt();
+}
+
+
+static QRect rectEntry(QDomElement &base, const QString &tagName)
+{
+ QDomElement el = base.namedItem(tagName).toElement();
+
+ int x = numberEntry(el, "x");
+ int y = numberEntry(el, "y");
+ int width = numberEntry(el, "width");
+ int height = numberEntry(el, "height");
+
+ return QRect(x, y, width, height);
+}
+
+
+static QStrList listEntry(QDomElement &base, const QString &tagName, const QString &subTagName)
+{
+ QStrList list;
+
+ for( QDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement subel = n.toElement();
+ if (subel.tagName() == subTagName)
+ list.append(subel.firstChild().toText().data().latin1());
+ }
+
+ return list;
+}
+
+
+void KDockManager::writeConfig(QDomElement &base)
+{
+ // First of all, clear the tree under base
+ while (!base.firstChild().isNull())
+ base.removeChild(base.firstChild());
+ QDomDocument doc = base.ownerDocument();
+
+ QStrList nameList;
+ QString mainWidgetStr;
+
+ // collect widget names
+ QStringList nList;
+ QObjectListIt it(*childDock);
+ KDockWidget *obj1;
+ while ( (obj1=(KDockWidget*)it.current()) ) {
+ if ( obj1->parent() == main )
+ mainWidgetStr = QString::fromLatin1(obj1->name());
+ nList.append(obj1->name());
+ ++it;
+ }
+
+ for (QObjectListIt it(d->containerDocks);it.current();++it)
+ {
+ KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
+ if (dc) {
+ dc->prepareSave(nList);
+ }
+ }
+
+ QStringList::Iterator nListIt=nList.begin();
+ while ( nListIt!=nList.end() ) {
+ KDockWidget *obj = getDockWidgetFromName( *nListIt);
+ if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.find( obj->firstName.latin1() ) == -1
+ || nameList.find(obj->lastName.latin1()) == -1)) {
+ // Skip until children are saved (why?)
+ ++nListIt;
+// nList.next();
+//falk? if ( !nList.current() ) nList.first();
+ continue;
+ }
+
+ QDomElement groupEl;
+ if (obj->d->isContainer) {
+ KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget);
+ if (x) {
+ groupEl=doc.createElement("dockContainer");
+ x->save(groupEl);
+ }
+ } else
+ if (obj->isGroup) {
+ //// Save a group
+ groupEl = doc.createElement("splitGroup");
+
+ groupEl.appendChild(createStringEntry(doc, "firstName", obj->firstName));
+ groupEl.appendChild(createStringEntry(doc, "secondName", obj->lastName));
+ groupEl.appendChild(createNumberEntry(doc, "orientation", (int)obj->splitterOrientation));
+ groupEl.appendChild(createNumberEntry(doc, "separatorPos", ((KDockSplitter*)obj->widget)->separatorPos()));
+ } else if (obj->isTabGroup) {
+ //// Save a tab group
+ groupEl = doc.createElement("tabGroup");
+
+ QStrList list;
+ for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
+ list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
+ groupEl.appendChild(createListEntry(doc, "tabs", "tab", list));
+ groupEl.appendChild(createNumberEntry(doc, "currentTab", ((KDockTabGroup*)obj->widget)->currentPageIndex()));
+ if (!obj->parent()) {
+ groupEl.appendChild(createStringEntry(doc, "dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : ""));
+ groupEl.appendChild(createNumberEntry(doc, "dockBackToPos", obj->formerDockPos));
+ }
+ } else {
+ //// Save an ordinary dock widget
+ groupEl = doc.createElement("dock");
+ groupEl.appendChild(createStringEntry(doc, "tabCaption", obj->tabPageLabel()));
+ groupEl.appendChild(createStringEntry(doc, "tabToolTip", obj->toolTipString()));
+ if (!obj->parent()) {
+ groupEl.appendChild(createStringEntry(doc, "dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : ""));
+ groupEl.appendChild(createNumberEntry(doc, "dockBackToPos", obj->formerDockPos));
+ }
+ }
+
+ groupEl.appendChild(createStringEntry(doc, "name", QString::fromLatin1(obj->name())));
+ groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent()));
+ if ( !obj->parent() ) {
+ groupEl.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible()));
+ }
+ if (obj->header && obj->header->inherits("KDockWidgetHeader")) {
+ KDockWidgetHeader *h = static_cast<KDockWidgetHeader*>(obj->header);
+ groupEl.appendChild(createBoolEntry(doc, "dragEnabled", h->dragEnabled()));
+ }
+
+ base.appendChild(groupEl);
+ nameList.append(obj->name());
+ nList.remove(nListIt);
+ nListIt=nList.begin();
+ }
+
+ if (main->inherits("KDockMainWindow")) {
+ KDockMainWindow *dmain = (KDockMainWindow*)main;
+ QString centralWidgetStr = QString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
+ base.appendChild(createStringEntry(doc, "centralWidget", centralWidgetStr));
+ QString mainDockWidgetStr = QString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
+ base.appendChild(createStringEntry(doc, "mainDockWidget", mainDockWidgetStr));
+ } else {
+ base.appendChild(createStringEntry(doc, "mainWidget", mainWidgetStr));
+ }
+
+ base.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+}
+
+
+void KDockManager::readConfig(QDomElement &base)
+{
+ if (base.namedItem("group").isNull()
+ && base.namedItem("tabgroup").isNull()
+ && base.namedItem("dock").isNull()
+ && base.namedItem("dockContainer").isNull()) {
+ activate();
+ return;
+ }
+
+ autoCreateDock = new QObjectList();
+ autoCreateDock->setAutoDelete( true );
+
+ bool isMainVisible = main->isVisible();
+ main->hide();
+
+ QObjectListIt it(*childDock);
+ KDockWidget *obj1;
+ while ( (obj1=(KDockWidget*)it.current()) ) {
+ if ( !obj1->isGroup && !obj1->isTabGroup ) {
+ if ( obj1->parent() )
+ obj1->undock();
+ else
+ obj1->hide();
+ }
+ ++it;
+ }
+
+ // firstly, recreate all common dockwidgets
+ for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement childEl = n.toElement();
+ if (childEl.tagName() != "dock") continue;
+
+ // Read an ordinary dock widget
+ KDockWidget *obj = getDockWidgetFromName(stringEntry(childEl, "name"));
+ obj->setTabPageLabel(stringEntry(childEl, "tabCaption"));
+ obj->setToolTipString(stringEntry(childEl, "tabToolTip"));
+
+ if (!boolEntry(childEl, "hasParent")) {
+ QRect r = rectEntry(childEl, "geometry");
+ obj = getDockWidgetFromName(stringEntry(childEl, "name"));
+ obj->applyToWidget(0);
+ obj->setGeometry(r);
+ if (boolEntry(childEl, "visible"))
+ obj->QWidget::show();
+ }
+
+ if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) {
+ KDockWidgetHeader *h = static_cast<KDockWidgetHeader*>(obj->header);
+ h->setDragEnabled(boolEntry(childEl, "dragEnabled"));
+ }
+ }
+
+ // secondly, now iterate again and create the groups and tabwidgets, apply the dockwidgets to them
+ for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement childEl = n.toElement();
+ if (childEl.isNull()) continue;
+
+ KDockWidget *obj = 0;
+
+ if (childEl.tagName() == "dockContainer") {
+
+ KDockWidget *cont=getDockWidgetFromName(stringEntry(childEl, "name"));
+ kdDebug(282)<<"dockContainer: "<<stringEntry(childEl,"name")<<endl;
+ if (!(cont->d->isContainer)) {
+ kdDebug(282)<<"restoration of dockContainer is only supported for already existing dock containers"<<endl;
+ } else {
+ KDockContainer *dc=dynamic_cast<KDockContainer*>(cont->getWidget());
+ if (!dc) kdDebug(282)<<"Error while trying to handle dockcontainer configuration restoration"<<endl;
+ else {
+ dc->load(childEl);
+ removeFromAutoCreateList(cont);
+ }
+
+ }
+ }
+ else
+ if (childEl.tagName() == "splitGroup") {
+ // Read a group
+ QString name = stringEntry(childEl, "name");
+ QString firstName = stringEntry(childEl, "firstName");
+ QString secondName = stringEntry(childEl, "secondName");
+ int orientation = numberEntry(childEl, "orientation");
+ int separatorPos = numberEntry(childEl, "separatorPos");
+
+ KDockWidget *first = getDockWidgetFromName(firstName);
+ KDockWidget *second = getDockWidgetFromName(secondName);
+ if (first && second) {
+ obj = first->manualDock(second,
+ (orientation == (int)Vertical)? KDockWidget::DockLeft : KDockWidget::DockTop,
+ separatorPos);
+ if (obj)
+ obj->setName(name.latin1());
+ }
+ } else if (childEl.tagName() == "tabGroup") {
+ // Read a tab group
+ QString name = stringEntry(childEl, "name");
+ QStrList list = listEntry(childEl, "tabs", "tab");
+
+ KDockWidget *d1 = getDockWidgetFromName( list.first() );
+ list.next();
+ KDockWidget *d2 = getDockWidgetFromName( list.current() );
+
+ KDockWidget *obj = d2->manualDock( d1, KDockWidget::DockCenter );
+ if (obj) {
+ KDockTabGroup *tab = (KDockTabGroup*)obj->widget;
+ list.next();
+ while (list.current() && obj) {
+ KDockWidget *tabDock = getDockWidgetFromName(list.current());
+ obj = tabDock->manualDock(d1, KDockWidget::DockCenter);
+ list.next();
+ }
+ if (obj) {
+ obj->setName(name.latin1());
+ tab->showPage(tab->page(numberEntry(childEl, "currentTab")));
+ }
+ }
+ } else {
+ continue;
+ }
+
+ if (!boolEntry(childEl, "hasParent")) {
+ QRect r = rectEntry(childEl, "geometry");
+ obj = getDockWidgetFromName(stringEntry(childEl, "name"));
+ obj->applyToWidget(0);
+ obj->setGeometry(r);
+ if (boolEntry(childEl, "visible"))
+ obj->QWidget::show();
+ }
+
+ if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) {
+ KDockWidgetHeader *h = static_cast<KDockWidgetHeader*>(obj->header);
+ h->setDragEnabled(boolEntry(childEl, "dragEnabled"));
+ }
+ }
+
+ // thirdly, now that all ordinary dockwidgets are created,
+ // iterate them again and link them with their corresponding dockwidget for the dockback action
+ for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement childEl = n.toElement();
+
+ if (childEl.tagName() != "dock" && childEl.tagName() != "tabGroup")
+ continue;
+
+ KDockWidget *obj = 0;
+
+ if (!boolEntry(childEl, "hasParent")) {
+ // Read a common toplevel dock widget
+ obj = getDockWidgetFromName(stringEntry(childEl, "name"));
+ QString name = stringEntry(childEl, "dockBackTo");
+ if (!name.isEmpty()) {
+ obj->setFormerBrotherDockWidget(getDockWidgetFromName(name));
+ }
+ obj->formerDockPos = KDockWidget::DockPosition(numberEntry(childEl, "dockBackToPos"));
+ obj->updateHeader();
+ }
+ }
+
+ if (main->inherits("KDockMainWindow")) {
+ KDockMainWindow *dmain = (KDockMainWindow*)main;
+
+ QString mv = stringEntry(base, "centralWidget");
+ if (!mv.isEmpty() && getDockWidgetFromName(mv) ) {
+ KDockWidget *mvd = getDockWidgetFromName(mv);
+ mvd->applyToWidget(dmain);
+ mvd->show();
+ dmain->setCentralWidget(mvd);
+ }
+ QString md = stringEntry(base, "mainDockWidget");
+ if (!md.isEmpty() && getDockWidgetFromName(md)) {
+ KDockWidget *mvd = getDockWidgetFromName(md);
+ dmain->setMainDockWidget(mvd);
+ }
+ } else {
+ QString mv = stringEntry(base, "mainWidget");
+ if (!mv.isEmpty() && getDockWidgetFromName(mv)) {
+ KDockWidget *mvd = getDockWidgetFromName(mv);
+ mvd->applyToWidget(main);
+ mvd->show();
+ }
+
+ // only resize + move non-mainwindows
+ QRect mr = rectEntry(base, "geometry");
+ main->move(mr.topLeft());
+ main->resize(mr.size());
+ }
+
+ if (isMainVisible)
+ main->show();
+
+ if (d->m_readDockConfigMode == WrapExistingWidgetsOnly) {
+ finishReadDockConfig(); // remove empty dockwidgets
+ }
+}
+
+void KDockManager::removeFromAutoCreateList(KDockWidget* pDockWidget)
+{
+ if (!autoCreateDock) return;
+ autoCreateDock->setAutoDelete(false);
+ autoCreateDock->removeRef(pDockWidget);
+ autoCreateDock->setAutoDelete(true);
+}
+
+void KDockManager::finishReadDockConfig()
+{
+ delete autoCreateDock;
+ autoCreateDock = 0;
+}
+
+void KDockManager::setReadDockConfigMode(int mode)
+{
+ d->m_readDockConfigMode = mode;
+}
+
+#ifndef NO_KDE2
+void KDockManager::writeConfig( KConfig* c, QString group )
+{
+ //debug("BEGIN Write Config");
+ if ( !c ) c = KGlobal::config();
+ if ( group.isEmpty() ) group = "dock_setting_default";
+
+ c->setGroup( group );
+ c->writeEntry( "Version", DOCK_CONFIG_VERSION );
+
+ QStringList nameList;
+ QStringList findList;
+ QObjectListIt it( *childDock );
+ KDockWidget * obj;
+
+ // collect KDockWidget's name
+ QStringList nList;
+ while ( (obj=(KDockWidget*)it.current()) ) {
+ ++it;
+ //debug(" +Add subdock %s", obj->name());
+ nList.append( obj->name() );
+ if ( obj->parent() == main )
+ c->writeEntry( "Main:view", obj->name() );
+ }
+
+// kdDebug(282)<<QString("list size: %1").arg(nList.count())<<endl;
+ for (QObjectListIt it(d->containerDocks);it.current();++it)
+ {
+ KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
+ if (dc) {
+ dc->prepareSave(nList);
+ }
+ }
+// kdDebug(282)<<QString("new list size: %1").arg(nList.count())<<endl;
+
+ QStringList::Iterator nListIt=nList.begin();
+ while ( nListIt!=nList.end() ){
+ //debug(" -Try to save %s", nList.current());
+ obj = getDockWidgetFromName( *nListIt );
+ QString cname = obj->name();
+ if ( obj->header ){
+ obj->header->saveConfig( c );
+ }
+ if (obj->d->isContainer) {
+ KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget);
+ if (x) {
+ x->save(c,group);
+ }
+ }
+/*************************************************************************************************/
+ if ( obj->isGroup ){
+ if ( (findList.find( obj->firstName ) != findList.end()) && (findList.find( obj->lastName ) != findList.end() )){
+
+ c->writeEntry( cname+":type", "GROUP");
+ if ( !obj->parent() ){
+ c->writeEntry( cname+":parent", "___null___");
+ c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":visible", obj->isVisible());
+ } else {
+ c->writeEntry( cname+":parent", "yes");
+ }
+ c->writeEntry( cname+":first_name", obj->firstName );
+ c->writeEntry( cname+":last_name", obj->lastName );
+ c->writeEntry( cname+":orientation", (int)obj->splitterOrientation );
+ c->writeEntry( cname+":sepPos", ((KDockSplitter*)obj->widget)->separatorPos() );
+
+ nameList.append( obj->name() );
+ findList.append( obj->name() );
+ //debug(" Save %s", nList.current());
+ nList.remove(nListIt);
+ nListIt=nList.begin(); //nList.first();
+ } else {
+/*************************************************************************************************/
+ //debug(" Skip %s", nList.current());
+ //if ( findList.find( obj->firstName ) == -1 )
+ // debug(" ? Not found %s", obj->firstName);
+ //if ( findList.find( obj->lastName ) == -1 )
+ // debug(" ? Not found %s", obj->lastName);
+ ++nListIt;
+ // if ( !nList.current() ) nList.first();
+ if (nListIt==nList.end()) nListIt=nList.begin();
+ }
+ } else {
+/*************************************************************************************************/
+ if ( obj->isTabGroup){
+ c->writeEntry( cname+":type", "TAB_GROUP");
+ if ( !obj->parent() ){
+ c->writeEntry( cname+":parent", "___null___");
+ c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":visible", obj->isVisible());
+ c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
+ c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
+ } else {
+ c->writeEntry( cname+":parent", "yes");
+ }
+ QStrList list;
+ for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
+ list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
+ c->writeEntry( cname+":tabNames", list );
+ c->writeEntry( cname+":curTab", ((KDockTabGroup*)obj->widget)->currentPageIndex() );
+
+ nameList.append( obj->name() );
+ findList.append( obj->name() ); // not really need !!!
+ //debug(" Save %s", nList.current());
+ nList.remove(nListIt);
+ nListIt=nList.begin();
+ } else {
+/*************************************************************************************************/
+ c->writeEntry( cname+":tabCaption", obj->tabPageLabel());
+ c->writeEntry( cname+":tabToolTip", obj->toolTipString());
+ if ( !obj->parent() ){
+ c->writeEntry( cname+":type", "NULL_DOCK");
+ c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":visible", obj->isVisible());
+ c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
+ c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
+ } else {
+ c->writeEntry( cname+":type", "DOCK");
+ }
+ nameList.append( cname.latin1() );
+ //debug(" Save %s", nList.current());
+ findList.append( obj->name() );
+ nList.remove(nListIt);
+ nListIt=nList.begin();
+ }
+ }
+ }
+ c->writeEntry( "NameList", nameList );
+
+ c->writeEntry( "Main:Geometry", QRect(main->frameGeometry().topLeft(), main->size()) );
+ c->writeEntry( "Main:visible", main->isVisible()); // curently nou use
+
+ if ( main->inherits("KDockMainWindow") ){
+ KDockMainWindow* dmain = (KDockMainWindow*)main;
+ // for KDockMainWindow->setView() in readConfig()
+ c->writeEntry( "Main:view", dmain->centralWidget() ? dmain->centralWidget()->name():"" );
+ c->writeEntry( "Main:dock", dmain->getMainDockWidget() ? dmain->getMainDockWidget()->name() :"" );
+ }
+
+ c->sync();
+ //debug("END Write Config");
+}
+#include <qmessagebox.h>
+void KDockManager::readConfig( KConfig* c, QString group )
+{
+ if ( !c ) c = KGlobal::config();
+ if ( group.isEmpty() ) group = "dock_setting_default";
+
+ c->setGroup( group );
+ QStrList nameList;
+ c->readListEntry( "NameList", nameList );
+ QString ver = c->readEntry( "Version", "0.0.1" );
+ nameList.first();
+ if ( !nameList.current() || ver != DOCK_CONFIG_VERSION ){
+ activate();
+ return;
+ }
+
+ autoCreateDock = new QObjectList();
+ autoCreateDock->setAutoDelete( true );
+
+ bool isMainVisible = main->isVisible();
+ // if (isMainVisible) // CCC
+ //QMessageBox::information(0,"","hallo");
+//COMMENTED4TESTING main->hide();
+
+ QObjectListIt it( *childDock );
+ KDockWidget * obj;
+
+ while ( (obj=(KDockWidget*)it.current()) ){
+ ++it;
+ if ( !obj->isGroup && !obj->isTabGroup )
+ {
+ if ( obj->parent() ) obj->undock(); else obj->hide();
+ }
+ }
+
+ // firstly, only the common dockwidgets,
+ // they must be restored before e.g. tabgroups are restored
+ nameList.first();
+ while ( nameList.current() ){
+ QString oname = nameList.current();
+ c->setGroup( group );
+ QString type = c->readEntry( oname + ":type" );
+ obj = 0L;
+
+ if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
+ QRect r = c->readRectEntry( oname + ":geometry" );
+ obj = getDockWidgetFromName( oname );
+ obj->applyToWidget( 0L );
+ obj->setGeometry(r);
+
+ c->setGroup( group );
+ obj->setTabPageLabel(c->readEntry( oname + ":tabCaption" ));
+ obj->setToolTipString(c->readEntry( oname + ":tabToolTip" ));
+ if ( c->readBoolEntry( oname + ":visible" ) ){
+ obj->QWidget::show();
+ }
+ }
+
+ if ( type == "DOCK" ){
+ obj = getDockWidgetFromName( oname );
+ obj->setTabPageLabel(c->readEntry( oname + ":tabCaption" ));
+ obj->setToolTipString(c->readEntry( oname + ":tabToolTip" ));
+ }
+
+ if (obj && obj->d->isContainer) {
+ dynamic_cast<KDockContainer*>(obj->widget)->load(c,group);
+ removeFromAutoCreateList(obj);
+ }
+ if ( obj && obj->header){
+ obj->header->loadConfig( c );
+ }
+ nameList.next();
+ }
+
+ // secondly, after the common dockwidgets, restore the groups and tabgroups
+ nameList.first();
+ while ( nameList.current() ){
+ QString oname = nameList.current();
+ c->setGroup( group );
+ QString type = c->readEntry( oname + ":type" );
+ obj = 0L;
+
+ if ( type == "GROUP" ){
+ KDockWidget* first = getDockWidgetFromName( c->readEntry( oname + ":first_name" ) );
+ KDockWidget* last = getDockWidgetFromName( c->readEntry( oname + ":last_name" ) );
+ int sepPos = c->readNumEntry( oname + ":sepPos" );
+
+ Orientation p = (Orientation)c->readNumEntry( oname + ":orientation" );
+ if ( first && last ){
+ obj = first->manualDock( last, ( p == Vertical ) ? KDockWidget::DockLeft : KDockWidget::DockTop, sepPos );
+ if (obj){
+ obj->setName( oname.latin1() );
+ }
+ }
+ }
+
+ if ( type == "TAB_GROUP" ){
+ QStrList list;
+ KDockWidget* tabDockGroup = 0L;
+ c->readListEntry( oname+":tabNames", list );
+ KDockWidget* d1 = getDockWidgetFromName( list.first() );
+ list.next();
+ KDockWidget* d2 = getDockWidgetFromName( list.current() );
+ tabDockGroup = d2->manualDock( d1, KDockWidget::DockCenter );
+ if ( tabDockGroup ){
+ KDockTabGroup* tab = dynamic_cast<KDockTabGroup*>(tabDockGroup->widget);
+ list.next();
+ while ( list.current() && tabDockGroup ){
+ KDockWidget* tabDock = getDockWidgetFromName( list.current() );
+ tabDockGroup = tabDock->manualDock( d1, KDockWidget::DockCenter );
+ list.next();
+ }
+ if ( tabDockGroup ){
+ tabDockGroup->setName( oname.latin1() );
+ c->setGroup( group );
+ if (tab)
+ tab->showPage( tab->page( c->readNumEntry( oname+":curTab" ) ) );
+ }
+ }
+ obj = tabDockGroup;
+ }
+
+ if (obj && obj->d->isContainer) dynamic_cast<KDockContainer*>(obj->widget)->load(c,group);
+ if ( obj && obj->header){
+ obj->header->loadConfig( c );
+ }
+ nameList.next();
+ }
+
+ // thirdly, now that all ordinary dockwidgets are created,
+ // iterate them again and link the toplevel ones of them with their corresponding dockwidget for the dockback action
+ nameList.first();
+ while ( nameList.current() ){
+ QString oname = nameList.current();
+ c->setGroup( group );
+ QString type = c->readEntry( oname + ":type" );
+ obj = 0L;
+
+ if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
+ obj = getDockWidgetFromName( oname );
+ c->setGroup( group );
+ QString name = c->readEntry( oname + ":dockBackTo" );
+ if (!name.isEmpty()) {
+ obj->setFormerBrotherDockWidget(getDockWidgetFromName( name ));
+ }
+ obj->formerDockPos = KDockWidget::DockPosition(c->readNumEntry( oname + ":dockBackToPos" ));
+ }
+
+ nameList.next();
+ }
+
+ if ( main->inherits("KDockMainWindow") ){
+ KDockMainWindow* dmain = (KDockMainWindow*)main;
+
+ c->setGroup( group );
+ QString mv = c->readEntry( "Main:view" );
+ if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
+ KDockWidget* mvd = getDockWidgetFromName( mv );
+ mvd->applyToWidget( dmain );
+ mvd->show();
+ dmain->setView( mvd );
+ }
+ c->setGroup( group );
+ QString md = c->readEntry( "Main:dock" );
+ if ( !md.isEmpty() && getDockWidgetFromName( md ) ){
+ KDockWidget* mvd = getDockWidgetFromName( md );
+ dmain->setMainDockWidget( mvd );
+ }
+ } else {
+ c->setGroup( group );
+ QString mv = c->readEntry( "Main:view" );
+ if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
+ KDockWidget* mvd = getDockWidgetFromName( mv );
+ mvd->applyToWidget( main );
+ mvd->show();
+ }
+
+ }
+
+ // delete all autocreate dock
+ if (d->m_readDockConfigMode == WrapExistingWidgetsOnly) {
+ finishReadDockConfig(); // remove empty dockwidgets
+ }
+
+ c->setGroup( group );
+ QRect mr = c->readRectEntry("Main:Geometry");
+ main->move(mr.topLeft());
+ main->resize(mr.size());
+ if ( isMainVisible ) main->show();
+}
+#endif
+
+
+void KDockManager::dumpDockWidgets() {
+ QObjectListIt it( *childDock );
+ KDockWidget * obj;
+ while ( (obj=(KDockWidget*)it.current()) ) {
+ ++it;
+ kdDebug(282)<<"KDockManager::dumpDockWidgets:"<<obj->name()<<endl;
+ }
+
+}
+
+KDockWidget* KDockManager::getDockWidgetFromName( const QString& dockName )
+{
+ QObjectListIt it( *childDock );
+ KDockWidget * obj;
+ while ( (obj=(KDockWidget*)it.current()) ) {
+ ++it;
+ if ( QString(obj->name()) == dockName ) return obj;
+ }
+
+ KDockWidget* autoCreate = 0L;
+ if ( autoCreateDock ){
+ kdDebug(282)<<"Autocreating dock: "<<dockName<<endl;
+ autoCreate = new KDockWidget( this, dockName.latin1(), QPixmap("") );
+ autoCreateDock->append( autoCreate );
+ }
+ return autoCreate;
+}
+void KDockManager::setSplitterOpaqueResize(bool b)
+{
+ d->splitterOpaqueResize = b;
+}
+
+bool KDockManager::splitterOpaqueResize() const
+{
+ return d->splitterOpaqueResize;
+}
+
+void KDockManager::setSplitterKeepSize(bool b)
+{
+ d->splitterKeepSize = b;
+}
+
+bool KDockManager::splitterKeepSize() const
+{
+ return d->splitterKeepSize;
+}
+
+void KDockManager::setSplitterHighResolution(bool b)
+{
+ d->splitterHighResolution = b;
+}
+
+bool KDockManager::splitterHighResolution() const
+{
+ return d->splitterHighResolution;
+}
+
+void KDockManager::slotMenuPopup()
+{
+ menu->clear();
+ menuData->clear();
+
+ QObjectListIt it( *childDock );
+ KDockWidget * obj;
+ int numerator = 0;
+ while ( (obj=(KDockWidget*)it.current()) ) {
+ ++it;
+ if ( obj->mayBeHide() )
+ {
+ menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), i18n("Hide %1").arg(obj->caption()), numerator++ );
+ menuData->append( new MenuDockData( obj, true ) );
+ }
+
+ if ( obj->mayBeShow() )
+ {
+ menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ );
+ menuData->append( new MenuDockData( obj, false ) );
+ }
+ }
+}
+
+void KDockManager::slotMenuActivated( int id )
+{
+ MenuDockData* data = menuData->at( id );
+ data->dock->changeHideShowState();
+}
+
+KDockWidget* KDockManager::findWidgetParentDock( QWidget* w ) const
+{
+ QObjectListIt it( *childDock );
+ KDockWidget * dock;
+ KDockWidget * found = 0L;
+
+ while ( (dock=(KDockWidget*)it.current()) ) {
+ ++it;
+ if ( dock->widget == w ){ found = dock; break; }
+ }
+ return found;
+}
+
+void KDockManager::drawDragRectangle()
+{
+#ifdef BORDERLESS_WINDOWS
+ return
+#endif
+ if (d->oldDragRect == d->dragRect)
+ return;
+
+ int i;
+ QRect oldAndNewDragRect[2];
+ oldAndNewDragRect[0] = d->oldDragRect;
+ oldAndNewDragRect[1] = d->dragRect;
+
+ // 2 calls, one for the old and one for the new drag rectangle
+ for (i = 0; i <= 1; i++) {
+ if (oldAndNewDragRect[i].isEmpty())
+ continue;
+
+ KDockWidget* pDockWdgAtRect = (KDockWidget*) QApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
+ if (!pDockWdgAtRect)
+ continue;
+
+ bool isOverMainWdg = false;
+ bool unclipped;
+ KDockMainWindow* pMain = 0L;
+ KDockWidget* pTLDockWdg = 0L;
+ QWidget* topWdg;
+ if (pDockWdgAtRect->topLevelWidget() == main) {
+ isOverMainWdg = true;
+ topWdg = pMain = (KDockMainWindow*) main;
+ unclipped = pMain->testWFlags( WPaintUnclipped );
+ pMain->setWFlags( WPaintUnclipped );
+ }
+ else {
+ topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->topLevelWidget();
+ unclipped = pTLDockWdg->testWFlags( WPaintUnclipped );
+ pTLDockWdg->setWFlags( WPaintUnclipped );
+ }
+
+ // draw the rectangle unclipped over the main dock window
+ QPainter p;
+ p.begin( topWdg );
+ if ( !unclipped ) {
+ if (isOverMainWdg)
+ pMain->clearWFlags(WPaintUnclipped);
+ else
+ pTLDockWdg->clearWFlags(WPaintUnclipped);
+ }
+ // draw the rectangle
+ p.setRasterOp(Qt::NotXorROP);
+ QRect r = oldAndNewDragRect[i];
+ r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(QPoint(0,0)) );
+ p.drawRect(r.x(), r.y(), r.width(), r.height());
+ p.end();
+ }
+
+ // memorize the current rectangle for later removing
+ d->oldDragRect = d->dragRect;
+}
+
+void KDockManager::setSpecialLeftDockContainer(KDockWidget* container) {
+ d->leftContainer=container;
+}
+
+void KDockManager::setSpecialTopDockContainer(KDockWidget* container) {
+ d->topContainer=container;
+}
+
+void KDockManager::setSpecialRightDockContainer(KDockWidget* container) {
+ d->rightContainer=container;
+
+}
+
+void KDockManager::setSpecialBottomDockContainer(KDockWidget* container) {
+ d->bottomContainer=container;
+}
+
+
+KDockArea::KDockArea( QWidget* parent, const char *name)
+:QWidget( parent, name)
+{
+ QString new_name = QString(name) + QString("_DockManager");
+ dockManager = new KDockManager( this, new_name.latin1() );
+ mainDockWidget = 0L;
+}
+
+KDockArea::~KDockArea()
+{
+ delete dockManager;
+}
+
+KDockWidget* KDockArea::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+{
+ return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
+}
+
+void KDockArea::makeDockVisible( KDockWidget* dock )
+{
+ if ( dock )
+ dock->makeDockVisible();
+}
+
+void KDockArea::makeDockInvisible( KDockWidget* dock )
+{
+ if ( dock )
+ dock->undock();
+}
+
+void KDockArea::makeWidgetDockVisible( QWidget* widget )
+{
+ makeDockVisible( dockManager->findWidgetParentDock(widget) );
+}
+
+void KDockArea::writeDockConfig(QDomElement &base)
+{
+ dockManager->writeConfig(base);
+}
+
+void KDockArea::readDockConfig(QDomElement &base)
+{
+ dockManager->readConfig(base);
+}
+
+void KDockArea::slotDockWidgetUndocked()
+{
+ QObject* pSender = (QObject*) sender();
+ if (!pSender->inherits("KDockWidget")) return;
+ KDockWidget* pDW = (KDockWidget*) pSender;
+ emit dockWidgetHasUndocked( pDW);
+}
+
+void KDockArea::resizeEvent(QResizeEvent *rsize)
+{
+ QWidget::resizeEvent(rsize);
+ if (children()){
+#ifndef NO_KDE2
+// kdDebug(282)<<"KDockArea::resize"<<endl;
+#endif
+ QObjectList *list=queryList("QWidget",0,false);
+
+ QObjectListIt it( *list ); // iterate over the buttons
+ QObject *obj;
+
+ while ( (obj = it.current()) != 0 ) {
+ // for each found object...
+ ((QWidget*)obj)->setGeometry(QRect(QPoint(0,0),size()));
+ break;
+ }
+ delete list;
+#if 0
+ KDockSplitter *split;
+// for (unsigned int i=0;i<children()->count();i++)
+ {
+// QPtrList<QObject> list(children());
+// QObject *obj=((QPtrList<QObject*>)children())->at(i);
+ QObject *obj=children()->getFirst();
+ if (split = dynamic_cast<KDockSplitter*>(obj))
+ {
+ split->setGeometry( QRect(QPoint(0,0), size() ));
+// break;
+ }
+ }
+#endif
+ }
+}
+
+#ifndef NO_KDE2
+void KDockArea::writeDockConfig( KConfig* c, QString group )
+{
+ dockManager->writeConfig( c, group );
+}
+
+void KDockArea::readDockConfig( KConfig* c, QString group )
+{
+ dockManager->readConfig( c, group );
+}
+
+void KDockArea::setMainDockWidget( KDockWidget* mdw )
+{
+ if ( mainDockWidget == mdw ) return;
+ mainDockWidget = mdw;
+ mdw->applyToWidget(this);
+}
+#endif
+
+
+
+// KDOCKCONTAINER - AN ABSTRACTION OF THE KDOCKTABWIDGET
+KDockContainer::KDockContainer(){m_overlapMode=false; m_childrenListBegin=0; m_childrenListEnd=0;}
+KDockContainer::~KDockContainer(){
+
+ if (m_childrenListBegin)
+ {
+ struct ListItem *tmp=m_childrenListBegin;
+ while (tmp)
+ {
+ struct ListItem *tmp2=tmp->next;
+ free(tmp->data);
+ delete tmp;
+ tmp=tmp2;
+ }
+ m_childrenListBegin=0;
+ m_childrenListEnd=0;
+ }
+
+}
+
+void KDockContainer::activateOverlapMode(int nonOverlapSize) {
+ m_nonOverlapSize=nonOverlapSize;
+ m_overlapMode=true;
+ if (parentDockWidget()) {
+ if (parentDockWidget()->parent()) {
+ kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl;
+ KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
+ parent()->qt_cast("KDockSplitter"));
+ if (sp) sp->resizeEvent(0);
+ }
+ }
+}
+
+void KDockContainer::deactivateOverlapMode() {
+ if (!m_overlapMode) return;
+ m_overlapMode=false;
+ if (parentDockWidget()) {
+ if (parentDockWidget()->parent()) {
+ kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl;
+ KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
+ parent()->qt_cast("KDockSplitter"));
+ if (sp) sp->resizeEvent(0);
+ }
+ }
+
+}
+
+bool KDockContainer::isOverlapMode() {
+ return m_overlapMode;
+}
+
+
+bool KDockContainer::dockDragEnter(KDockWidget*, QMouseEvent *) { return false;}
+bool KDockContainer::dockDragMove(KDockWidget*, QMouseEvent *) { return false;}
+bool KDockContainer::dockDragLeave(KDockWidget*, QMouseEvent *) { return false;}
+
+
+KDockWidget *KDockContainer::parentDockWidget(){return 0;}
+
+QStringList KDockContainer::containedWidgets() const {
+ QStringList tmp;
+ for (struct ListItem *it=m_childrenListBegin;it;it=it->next) {
+ tmp<<QString(it->data);
+ }
+
+ return tmp;
+}
+
+void KDockContainer::showWidget(KDockWidget *) {
+}
+
+void KDockContainer::insertWidget (KDockWidget *dw, QPixmap, const QString &, int &)
+ {
+ struct ListItem *it=new struct ListItem;
+ it->data=strdup(dw->name());
+ it->next=0;
+
+ if (m_childrenListEnd)
+ {
+ m_childrenListEnd->next=it;
+ it->prev=m_childrenListEnd;
+ m_childrenListEnd=it;
+ }
+ else
+ {
+ it->prev=0;
+ m_childrenListEnd=it;
+ m_childrenListBegin=it;
+ }
+ }
+void KDockContainer::removeWidget (KDockWidget *dw){
+ for (struct ListItem *tmp=m_childrenListBegin;tmp;tmp=tmp->next)
+ {
+ if (!strcmp(tmp->data,dw->name()))
+ {
+ free(tmp->data);
+ if (tmp->next) tmp->next->prev=tmp->prev;
+ if (tmp->prev) tmp->prev->next=tmp->next;
+ if (tmp==m_childrenListBegin) m_childrenListBegin=tmp->next;
+ if (tmp==m_childrenListEnd) m_childrenListEnd=tmp->prev;
+ delete tmp;
+ break;
+ }
+ }
+}
+
+//m_children.remove(dw->name());}
+void KDockContainer::undockWidget (KDockWidget *){;}
+void KDockContainer::setToolTip(KDockWidget *, QString &){;}
+void KDockContainer::setPixmap(KDockWidget*,const QPixmap&){;}
+void KDockContainer::load (KConfig*, const QString&){;}
+void KDockContainer::save (KConfig*, const QString&){;}
+void KDockContainer::load (QDomElement&){;}
+void KDockContainer::save (QDomElement&){;}
+void KDockContainer::prepareSave(QStringList &names)
+{
+
+ for (struct ListItem *tmp=m_childrenListBegin;tmp; tmp=tmp->next)
+ names.remove(tmp->data);
+// for (uint i=0;i<m_children.count();i++)
+// {
+// names.remove(m_children.at(i));
+// }
+}
+
+
+QWidget *KDockTabGroup::transientTo() {
+ QWidget *tT=0;
+ for (int i=0;i<count();i++) {
+ KDockWidget *dw=static_cast<KDockWidget*>(page(i)->qt_cast("KDockWidget"));
+ QWidget *tmp;
+ if ((tmp=dw->transientTo())) {
+ if (!tT) tT=tmp;
+ else {
+ if (tT!=tmp) {
+ kdDebug(282)<<"KDockTabGroup::transientTo: widget mismatch"<<endl;
+ return 0;
+ }
+ }
+ }
+ }
+
+ kdDebug(282)<<"KDockTabGroup::transientTo: "<<(tT?"YES":"NO")<<endl;
+
+ return tT;
+}
+
+void KDockWidgetAbstractHeader::virtual_hook( int, void* )
+{ /*BASE::virtual_hook( id, data );*/ }
+
+void KDockWidgetAbstractHeaderDrag::virtual_hook( int, void* )
+{ /*BASE::virtual_hook( id, data );*/ }
+
+void KDockWidgetHeaderDrag::virtual_hook( int id, void* data )
+{ KDockWidgetAbstractHeaderDrag::virtual_hook( id, data ); }
+
+void KDockWidgetHeader::virtual_hook( int id, void* data )
+{ KDockWidgetAbstractHeader::virtual_hook( id, data ); }
+
+void KDockTabGroup::virtual_hook( int, void* )
+{ /*BASE::virtual_hook( id, data );*/ }
+
+void KDockWidget::virtual_hook( int, void* )
+{ /*BASE::virtual_hook( id, data );*/ }
+
+void KDockManager::virtual_hook( int, void* )
+{ /*BASE::virtual_hook( id, data );*/ }
+
+void KDockMainWindow::virtual_hook( int id, void* data )
+{ KMainWindow::virtual_hook( id, data ); }
+
+void KDockArea::virtual_hook( int, void* )
+{ /*KMainWindow::virtual_hook( id, data );*/ }
+
+
+#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name
+#include "kdockwidget.moc"
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.h b/lib/compatibility/kmdi/qextmdi/kdockwidget.h
new file mode 100644
index 00000000..8858b9ba
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.h
@@ -0,0 +1,1534 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2000 Max Judin <novaprint@mtu-net.ru>
+ Copyright (C) 2000 Falk Brettschneider <falk@kdevelop.org>
+ Copyright (C) 2002,2003 Joseph Wenninger <jowenn@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.
+*/
+
+/*
+ activities:
+ -----------
+ 05/2001 - : useful patches, bugfixes by Christoph Cullmann <crossfire@babylon2k.de>,
+ Joseph Wenninger <jowenn@bigfoot.com> and Falk Brettschneider
+ 03/2001 - 05/2001 : maintained and enhanced by Falk Brettschneider <falk@kdevelop.org>
+ 03/2000 : class documentation added by Falk Brettschneider <gigafalk@yahoo.com>
+ 10/1999 - 03/2000 : programmed by Max Judin <novaprint@mtu-net.ru>
+
+ C++ classes in this file:
+ -------------------------
+ - KDockWidgetAbstractHeader - minor helper class
+ - KDockWidgetAbstractHeaderDrag - minor helper class
+ - KDockWidgetHeaderDrag - drag panel in a dockwidget title bar
+ - KDockWidgetHeader - dockwidget title bar containing the drag panel
+ - KDockTabGroup - minor helper class
+ - KDockWidget - IMPORTANT CLASS: the one and only dockwidget class
+ - KDockManager - helper class
+ - KDockMainWindow - IMPORTANT CLASS: a special KMainWindow that can have dockwidgets
+ - KDockArea - like KDockMainWindow but inherits just QWidget
+
+ IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition!
+*/
+
+
+#ifndef KDOCKWIDGET_H
+#define KDOCKWIDGET_H
+
+#define _KDOCKWIDGET_2_2_
+
+#include <qpoint.h>
+#include <qptrlist.h>
+#include <qframe.h>
+#include <qdom.h>
+#include <qtabwidget.h>
+
+#ifndef NO_KDE2
+#include <kmainwindow.h>
+#include <netwm_def.h>
+#else
+
+#include <qmainwindow.h>
+#include "exportdockclass.h"
+#include "dummykmainwindow.h"
+#endif
+
+#include <kdelibs_export.h>
+
+class KDockSplitter;
+class KDockManager;
+class KDockMoveManager;
+class KDockWidget;
+class KDockButton_Private;
+class KDockWidgetPrivate;
+class KDockWidgetHeaderPrivate;
+class KDockArea;
+
+class QObjectList;
+class QPopupMenu;
+class QVBoxLayout;
+class QHBoxLayout;
+class QPixmap;
+
+#ifndef NO_KDE2
+class KToolBar;
+class KConfig;
+#else
+class QToolBar;
+#endif
+
+class KDockContainer;
+
+namespace KMDI
+{
+ class MainWindow;
+}
+
+/**
+ * An abstract base clase for all dockwidget headers (and member of the dockwidget class set).
+ * See the class description of KDockWidgetHeader!
+ * More or less a minor helper class for the dockwidget class set.
+ *
+ * @author Max Judin (documentation: Falk Brettschneider).
+ */
+class KDockWidgetAbstractHeader : public QFrame
+{
+ Q_OBJECT
+public:
+
+ /**
+ * Constructs this.
+ *
+ * @param parent the parent widget (usually a dockwidget)
+ * @param name the object instance name
+ */
+ KDockWidgetAbstractHeader( KDockWidget* parent, const char* name = 0L );
+
+ /**
+ * Destructs this.
+ */
+ virtual ~KDockWidgetAbstractHeader(){};
+
+ /**
+ * Provides things concerning to switching to toplevel mode. Must be overridden by an inheriting class.
+ */
+ virtual void setTopLevel( bool ){};
+
+#ifndef NO_KDE2
+ /**
+ * Provides saving the current configuration. Must be overridden by an inheriting class.
+ */
+ virtual void saveConfig( KConfig* ){};
+
+ /**
+ * Provides loading the current configuration. Must be overridden by an inheriting class
+ */
+ virtual void loadConfig( KConfig* ){};
+#endif
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ class KDockWidgetAbstractHeaderPrivate;
+ KDockWidgetAbstractHeaderPrivate *d;
+};
+
+/**
+ * An abstract class for all dockwidget drag-panels of a dockwidgets (and member of the dockwidget class set).
+ * See the class description of KDockWidgetHeaderDrag!
+ * More or less a minor helper class for the dockwidget class set.
+ *
+ * @author Max Judin (documentation: Falk Brettschneider).
+ */
+class KDEUI_EXPORT KDockWidgetAbstractHeaderDrag : public QFrame
+{
+ Q_OBJECT
+public:
+
+ /**
+ * Constructs this.
+ *
+ * @param parent the parent widget (usually a dockwidget header)
+ * @param dock the dockwidget where it belongs to
+ * @param name the object instance name
+ */
+ KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* parent,
+ KDockWidget* dock, const char* name = 0L );
+
+ /**
+ * Destructs this.
+ */
+ virtual ~KDockWidgetAbstractHeaderDrag(){};
+
+ /**
+ * @return the dockwidget where this belongs to
+ */
+ KDockWidget* dockWidget() const { return dw; }
+
+private:
+ /**
+ * the dockwidget where this belongs to
+ */
+ KDockWidget* dw;
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ class KDockWidgetAbstractHeaderDragPrivate;
+ KDockWidgetAbstractHeaderDragPrivate *d;
+};
+
+/**
+ * This special widget is the panel one can grip with the mouses (and member of the dockwidget class set).
+ * The widget for dragging, so to speak.
+ * Usually it is located in the KDockWidgetHeader.
+ * More or less a minor helper class for the dockwidget class set.
+ *
+ * @author Max Judin (documentation: Falk Brettschneider).
+ */
+class KDEUI_EXPORT KDockWidgetHeaderDrag : public KDockWidgetAbstractHeaderDrag
+{
+ Q_OBJECT
+public:
+
+ /**
+ * Constructs this.
+ *
+ * @param parent the parent widget (usually a dockwidget header)
+ * @param dock the dockwidget where it belongs to
+ * @param name the object instance name
+ */
+ KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock,
+ const char* name = 0L );
+
+ /**
+ * Destructs this.
+ */
+ virtual ~KDockWidgetHeaderDrag(){};
+
+protected:
+
+ /**
+ * Draws the drag panel (a double line)
+ */
+ virtual void paintEvent( QPaintEvent* );
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ class KDockWidgetHeaderDragPrivate;
+ KDockWidgetHeaderDragPrivate *d;
+};
+
+/**
+ * The header (additional bar) for a KDockWidget s (and member of the dockwidget class set).
+ * It have got the buttons located there. And it is for recording and reading the button states.
+ * More or less a minor helper class for the dockwidget class set.
+ *
+ * @author Max Judin (documentation: Falk Brettschneider).
+ */
+class KDEUI_EXPORT KDockWidgetHeader : public KDockWidgetAbstractHeader
+{
+ Q_OBJECT
+public:
+
+ /**
+ * Constructs this.
+ *
+ * @param parent the parent widget (usually a dockwidget)
+ * @param name the object instance name
+ */
+ KDockWidgetHeader( KDockWidget* parent, const char* name = 0L );
+
+ /**
+ * Destructs this.
+ */
+ virtual ~KDockWidgetHeader(){};
+
+ /**
+ * Hides the close button and stay button when switching to toplevel or vice versa shows them.
+ *
+ * @param t toplevel or not
+ */
+ virtual void setTopLevel( bool t);
+
+ /**
+ * Sets the drag panel of this header.
+ *
+ * @param nd A pointer to the new drag panel
+ */
+ void setDragPanel( KDockWidgetHeaderDrag* nd );
+
+ /**
+ * Get the drag panel of this header.
+ *
+ * @since 3.4
+ */
+ KDockWidgetHeaderDrag *dragPanel();
+
+ bool dragEnabled() const;
+ void setDragEnabled(bool b);
+ /// @since 3.1
+ void showUndockButton(bool show);
+
+ /// @since 3.2
+ void forceCloseButtonHidden(bool enable=true);
+#ifndef NO_KDE2
+ /**
+ * Saves the current button state to a KDE config container object.
+ *
+ * @param c the configuration safe
+ */
+ virtual void saveConfig( KConfig* c);
+
+ /**
+ * Loads the current button state from a KDE config container object.
+ *
+ * @param c the configuration safe
+ */
+ virtual void loadConfig( KConfig* c);
+#endif
+
+ /*@since 3.2
+ * add an arbitrary button to the dockwidget header
+ * NOT PART OF THE PUBLIC API (you don't have access the class defintion anyways, without special
+ * header file copying. (don't do it))
+ */
+ void addButton(KDockButton_Private*);
+
+ /*@since 3.2
+ * remove an arbtrary button from the dockwidget header
+ * NOT PART OF THE PUBLIC API (you don't have access the class defintion anyways, without special
+ * header file copying. (don't do it))
+ */
+ void removeButton(KDockButton_Private*);
+
+
+
+protected slots:
+ /**
+ * Sets dragging the dockwidget off when the stay button is pressed down and vice versa.
+ */
+ void slotStayClicked();
+
+protected:
+
+ /**
+ * A layout manager for placing the embedded buttons (close and stay)
+ */
+ QHBoxLayout* layout;
+
+ /**
+ * a little button for closing (undocking and hiding) the dockwidget
+ */
+ KDockButton_Private* closeButton;
+
+ /**
+ * a little button for enabling/disabling dragging the dockwidget with the mouse
+ */
+ KDockButton_Private* stayButton;
+
+ /**
+ * a little button for dock back the dockwidget to it's previous dockwidget
+ */
+ KDockButton_Private* dockbackButton;
+
+ /**
+ * the drag panel (double line)
+ */
+ KDockWidgetHeaderDrag* drag;
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ KDockWidgetHeaderPrivate *d;
+};
+
+/**
+ * It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget class set).
+ * An abstraction what it is currently.
+ * In general it is like QTabWidget but is more useful for the dockwidget class set.
+ * More or less a minor helper class for the dockwidget class set.
+ *
+ * @author Max Judin (documentation: Falk Brettschneider).
+ */
+class KDEUI_EXPORT KDockTabGroup : public QTabWidget
+{
+ Q_OBJECT
+public:
+ /**
+ * Constructs this. It just calls the method of the base class.
+ */
+ KDockTabGroup( QWidget *parent = 0, const char *name = 0 )
+ :QTabWidget( parent, name ){};
+
+ /**
+ * Destructs a KDockTabGroup.
+ */
+ virtual ~KDockTabGroup(){};
+
+ QWidget *transientTo();
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ class KDockTabGroupPrivate;
+ KDockTabGroupPrivate *d;
+};
+
+
+/**
+ * Floatable widget that can be dragged around with the mouse and
+ * encapsulate the actual widgets (and member of the dockwidget class
+ * set).
+ *
+ * You just grip the double-lined panel, tear it off its parent
+ * widget, drag it somewhere and let it loose. Depending on the
+ * position where you leave it, the dockwidget becomes a toplevel
+ * window on the desktop (floating mode) or docks to a new widget
+ * (dock mode). Note: A KDockWidget can only be docked to a
+ * KDockWidget.
+ *
+ * If you want to use this kind of widget, your main application
+ * window has to be a KDockMainWindow. That is because it has
+ * got several additional dock management features, for instance a
+ * KDockManager that has an overview over all dockwidgets and and
+ * a dockmovemanager (internal class) that handles the dock process.
+ *
+ * Usually you create an KDockWidget that covers the actual widget in this way:
+ * \code
+ * ...
+ * KDockMainWindow* mainWidget;
+ * ...
+ * KDockWidget* dock = 0L;
+ * dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent
+ * QWidget* actualWidget = new QWidget( dock);
+ * dock->setWidget( actualWidget); // embed it
+ * dock->setToolTipString(i18n("That's me")); // available when appearing as tab page
+ * ...
+ * \endcode
+ *
+ * See KDockMainWindow how a dockwidget is docked in.
+ *
+ *
+ * @author Max Judin (documentation: Falk Brettschneider).
+ */
+class KDEUI_EXPORT KDockWidget: public QWidget
+{
+ Q_OBJECT
+friend class KDockManager;
+friend class KDockSplitter;
+friend class KDockMainWindow;
+friend class KDockArea;
+
+public:
+ /**
+ * Construct a dockwidget.
+ *
+ * Initially, docking to another and docking to this is allowed for
+ * every @p DockPosition. It is supposed to be no (tab) group. It will
+ * taken under control of its dockmanager.
+ *
+ * @param dockManager The responsible manager (dock helper)
+ * @param name Object instance name
+ * @param pixmap An icon (for instance shown when docked centered)
+ * @param parent Parent widget
+ * @param strCaption Title of the dockwidget window (shown when toplevel)
+ * @param strTabPageLabel The title of the tab page (shown when in tab page mode), if it is "", only the icon will be shown, if it is 0L, the label is set to strCaption
+ * @param f Qt::WidgetFlags widget flags
+ */
+ KDockWidget( KDockManager* dockManager, const char* name,
+ const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = QString::null,
+ const QString& strTabPageLabel = QString::fromLatin1( " " ), WFlags f = 0);
+
+ /**
+ * Destructs a dockwidget.
+ */
+ virtual ~KDockWidget();
+
+ /**
+ * The possible positions where a dockwidget can dock to another dockwidget
+ */
+ enum DockPosition
+ {
+ DockNone = 0,
+ DockTop = 0x0001,
+ DockLeft = 0x0002,
+ DockRight = 0x0004,
+ DockBottom = 0x0008,
+ DockCenter = 0x0010,
+ DockDesktop= 0x0020,
+ DockToSpecialSites=0x0040, ///< @since 3.1
+ DockCorner = DockTop | DockLeft | DockRight | DockBottom,
+ DockFullSite = DockCorner | DockCenter,
+ DockFullDocking = DockFullSite | DockDesktop
+ };
+
+ /**
+ * This is a key method of this class! Use it to dock dockwidgets to
+ * another dockwidget at the right position within its
+ * KDockMainWindow or a toplevel dockwidget.
+ *
+ *
+ * If the target is null, it will become a toplevel dockwidget at position pos;
+ * Note: Docking to another dockwidget means exactly:
+ * A new parent dockwidget will be created, that replaces the target dockwidget and contains another single helper widget (tab widget or panner)
+ * which contains both dockwidgets, this and the target dockwidget. So consider parent<->child relationships change completely during such actions.
+ *
+ * @param target The dockwidget to dock to
+ * @param dockPos One of the DockPositions this is going to dock to
+ * @param spliPos The split relation (in percent, or percent*100 in high resolution) between both dockwidgets, target and this
+ * @param pos The dock position, mainly of interest for docking to the desktop (as toplevel dockwidget)
+ * @param check Only for internal use;
+ * @param tabIndex The position index of the tab widget (when in tab page mode), -1 (default) means append
+ * @return result The group dockwidget that replaces the target dockwidget and will be grandparent of target and @p this.
+ */
+ KDockWidget* manualDock( KDockWidget* target, DockPosition dockPos, int spliPos = 50, QPoint pos = QPoint(0,0), bool check = false, int tabIndex = -1);
+
+ /**
+ * Specify where it is either possible or impossible for this to dock to another dockwidget.
+ *
+ * @param pos An OR'ed set of @p DockPositions
+ */
+ void setEnableDocking( int pos );
+
+ /**
+ * @return Where it is either possible or impossible for this to dock to another dockwidget (an OR'ed set of DockPositions).
+ */
+ int enableDocking() const { return eDocking; }
+
+ /**
+ * Specify where it is either possible or impossible for another dockwidget to dock to this.
+ *
+ * @param pos An OR'ed set of @p DockPositions
+ */
+ void setDockSite( int pos ){ sDocking = pos;}
+
+ /**
+ * @return There it is either possible or impossible for another dockwidget to dock to this (an OR'ed set of @p DockPositions).
+ */
+ int dockSite() const { return sDocking; }
+
+ /**
+ * Sets the embedded widget.
+ *
+ * A QLayout takes care about proper resizing, automatically.
+ *
+ * @param w The pointer to the dockwidget's child widget.
+ */
+ void setWidget( QWidget* w);
+
+ /**
+ * Get the embedded widget.
+ *
+ * @return The pointer to the dockwidget's child widget, 0L if there's no such child.
+ */
+ QWidget* getWidget() const { return widget; };
+
+ /**
+ * Sets the header of this dockwidget.
+ *
+ * A QLayout takes care about proper resizing, automatically.
+ * The header contains the drag panel, the close button and the stay button.
+ *
+ * @param ah A base class pointer to the dockwidget header
+ */
+ void setHeader( KDockWidgetAbstractHeader* ah);
+
+ /**@since 3.2
+ * get the pointer to the header widget
+ */
+ KDockWidgetAbstractHeader *getHeader();
+
+ /**
+ * Normally it simply shows the dockwidget.
+ *
+ * But additionally, if it is docked to a tab widget (@p DockCenter), it is set as the active (visible) tab page.
+ */
+ void makeDockVisible();
+
+ /**
+ * @return If it may be possible to hide this.
+ *
+ * There are reasons that it's impossible:
+ * @li It is a (tab) group.
+ * @li It is already invisible ;-)
+ * @li The parent of this is the KDockMainWindow.
+ * @li It isn't able to dock to another widget.
+ */
+ bool mayBeHide() const;
+
+ /**
+ * @return If it may be possible to show this.
+ * There are reasons that it's impossible:
+ * @li It is a (tab) group.
+ * @li It is already visible ;-)
+ * @li The parent of this is the @p KDockMainWindow.
+ */
+ bool mayBeShow() const;
+
+ /**
+ * @return The dockmanager that is responsible for this.
+ */
+ KDockManager* dockManager() const { return manager; }
+
+ /**
+ * Stores a string for a tooltip.
+ *
+ * That tooltip string has only a meaning when this dockwidget is shown as tab page.
+ * In this case the tooltip is shown when one holds the mouse cursor on the tab page header.
+ * Such tooltip will for instance be useful, if you use only icons there.
+ * Note: Setting an empty string switches the tooltip off.
+ *
+ * @param ttStr A string for the tooltip on the tab.
+ */
+ void setToolTipString(const QString& ttStr) { toolTipStr = ttStr; };
+
+ /**
+ * @return The tooltip string being shown on the appropriate tab page header when in dock-centered mode.
+ */
+ const QString& toolTipString() const { return toolTipStr; };
+
+ /**
+ * @return result @p true, if a dockback is possible, otherwise @p false.
+ */
+ bool isDockBackPossible() const;
+
+ /**
+ * Sets a string that is used for the label of the tab page when in tab page mode
+ * @param label The new tab page label.
+ */
+ void setTabPageLabel( const QString& label) { tabPageTitle = label; };
+
+ /**
+ * @return A string that is used for the label of the tab page when in tab page mode.
+ */
+ const QString& tabPageLabel() const { return tabPageTitle; };
+
+ /**
+ * Catches and processes some QWidget events that are interesting for dockwidgets.
+ */
+ virtual bool event( QEvent * );
+
+ /**
+ * Add dockwidget management actions to QWidget::show.
+ */
+ virtual void show();
+ /**
+ * @return the parent widget of this if it inherits class KDockTabGroup
+ */
+ KDockTabGroup* parentDockTabGroup() const;
+
+ /// @since 3.1
+ QWidget *parentDockContainer() const;
+
+#ifndef NO_KDE2
+
+ /**
+ * Sets the type of the dock window
+ *
+ * @param windowType is type of dock window
+ */
+ void setDockWindowType (NET::WindowType windowType);
+
+#endif
+
+ void setDockWindowTransient (QWidget *parent, bool transientEnabled);
+
+ /**
+ * Returns the widget this dockwidget is set transient to, otherwise 0
+ * @since 3.2
+ */
+ QWidget *transientTo();
+
+ /**
+ * Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0
+ *
+ * @param pos is the position the wanted widget is docked to this one
+ * @since 3.1
+ */
+ KDockWidget *findNearestDockWidget(DockPosition pos);
+
+ /**
+ * Allows changing the pixmap which is used for the caption or dock tabs
+ *
+ * @param pixmap is the pixmap to set
+ * @since 3.2
+ */
+ void setPixmap(const QPixmap& pixmap=QPixmap());
+
+ /**
+ * Returns the dockwidget's associated caption/dock tab pixmap
+ *
+ * @since 3.2
+ */
+ const QPixmap& pixmap() const;
+
+ /**
+ * @return the current dock position.
+ * @since 3.3
+ */
+ KDockWidget::DockPosition currentDockPosition() const;
+
+public slots:
+ /**
+ * subject to changes. It doesn't completely work yet without small hacks from within the calling application (Perhaps
+ * KDE 3.1.x oder 3.2
+ * width is in pixel. It only affects a widget, which is placed directly into a horizontal KDockSplitter
+ * @since 3.1
+ **/
+ void setForcedFixedWidth(int);
+ /**
+ * subject to changes. It doesn't completely work yet without small hacks from within the calling application (Perhaps
+ * KDE 3.1.x oder 3.2
+ * height is in pixel. It only affects a widget, which is placed directly into a vertical KDockSplitter
+ * @since 3.1
+ **/
+ void setForcedFixedHeight(int);
+ /// @since 3.1
+ void restoreFromForcedFixedSize();
+
+ /// @since 3.1
+ int forcedFixedWidth();
+ /// @since 3.1
+ int forcedFixedHeight();
+
+ /**
+ * Docks a dockwidget back to the dockwidget that was the neighbor
+ widget before the current dock position.
+ */
+ void dockBack();
+
+ /**
+ * Toggles the visibility state of the dockwidget if it is able to be shown or to be hidden.
+ */
+ void changeHideShowState();
+
+ /**
+ * Undocks this. It means it becomes a toplevel widget framed by the system window manager.
+ * A small panel at the top of this undocked widget gives the possibility to drag it into
+ * another dockwidget by mouse (docking).
+ */
+ void undock();
+
+ /**
+ * Docks the widget to the desktop (as a toplevel widget)
+ * @since 3.1
+ */
+ void toDesktop( );
+
+protected:
+ friend class KMdiMainFrm;
+ friend class KMDI::MainWindow;
+ /**
+ * Checks some conditions and shows or hides the dockwidget header (drag panel).
+ * The header is hidden if:
+ * @li the parent widget is the KDockMainWindow
+ * @li this is a (tab) group dockwidget
+ * @li it is not able to dock to another dockwidget
+ */
+ void updateHeader();
+
+ /// @since 3.1
+ void setLatestKDockContainer(QWidget *);
+ /// @since 3.1
+ QWidget *latestKDockContainer();
+
+ /// @since 3.2
+ void setFormerBrotherDockWidget(KDockWidget *);
+
+signals:
+ /**
+ *@since 3.2
+ *is emitted after the setWidget method has finished
+ */
+ void widgetSet(QWidget*);
+
+ /**
+ * Emitted when another dock widget is docking to this.
+ *
+ * @param dw the dockwidget that is docking to this
+ * @param dp the DockPosition where it wants to dock to
+ */
+ void docking( KDockWidget* dw, KDockWidget::DockPosition dp);
+
+ /**
+ * Signals that the dock default position is set.
+ */
+ void setDockDefaultPos();
+
+ /**
+ * Emitted when the close button of the panel ( KDockWidgetHeader) has been clicked.
+ */
+ void headerCloseButtonClicked();
+
+ /**
+ * Emitted when the dockback button of the panel ( KDockWidgetHeader) has been clicked.
+ */
+ void headerDockbackButtonClicked();
+
+ /**
+ * Emitted when the widget processes a close event.
+ */
+ void iMBeingClosed();
+ /**
+ * Emitted when the widget has undocked.
+ */
+ void hasUndocked();
+
+protected slots:
+
+ /** Does several things here when it has noticed that the former brother widget (closest neighbor) gets lost.
+ * The former brother widget is needed for a possible dockback action, to speak with the Beatles:
+ * "To get back to where you once belonged" ;-)
+ */
+ void loseFormerBrotherDockWidget();
+
+ virtual void paintEvent(QPaintEvent*);
+
+ virtual void mousePressEvent(QMouseEvent*);
+ virtual void mouseReleaseEvent(QMouseEvent*);
+ virtual void mouseMoveEvent(QMouseEvent*);
+ virtual void leaveEvent(QEvent*);
+protected:
+ friend class KDockWidgetHeader;
+ /**
+ * earlier closest neighbor widget, so it's possible to dock back to it.
+ */
+ KDockWidget* formerBrotherDockWidget;
+ /**
+ * the current dock position.
+ */
+ DockPosition currentDockPos;
+ /**
+ * the former dock position when it really was at another position before.
+ */
+ DockPosition formerDockPos;
+ /**
+ * a string used as tooltip for the tab page header when in dock-centered mode.
+ */
+ QString toolTipStr;
+ /**
+ * a string used as title of the tab page when in tab page mode
+ */
+ QString tabPageTitle;
+
+private:
+ /**
+ * Sets the caption (window title) of the given tab widget.
+ *
+ * @param g the group (tab) widget
+ */
+ void setDockTabName( KDockTabGroup* g);
+
+ /**
+ * Reparent to s or set this to the KDockMainWindow's view if s is that dockmainwindow.
+ * If s is O, simply move the widget.
+ *
+ * @param s the target widget to reparent to
+ * @param p the point to move to (if it doesn't reparent)
+ */
+ void applyToWidget( QWidget* s, const QPoint& p = QPoint(0,0) );
+
+ /**
+ * A base class pointer to the header of this dockwidget
+ */
+ KDockWidgetAbstractHeader* header;
+
+ /**
+ * the embedded widget
+ */
+ QWidget* widget;
+
+ /**
+ * the layout manager that takes care about proper resizing and moving the embedded widget and the header
+ */
+ QVBoxLayout* layout;
+
+ /**
+ * the responsible dockmanager
+ */
+ KDockManager* manager;
+
+ /**
+ * an icon for the tab widget header
+ */
+ QPixmap* pix;
+
+ /**
+ * Information about the ability for docking to another dockwidget.
+ */
+ int eDocking;
+
+ /**
+ * Information which site of this dockwidget is free for docking of other dockwidgets.
+ */
+ int sDocking;
+
+ /**
+ * Previous side (left,right,top,bottom) where this dockwidget was before a dragging action, none if it wasn't dragged before.
+ */
+ KDockWidget::DockPosition prevSideDockPosBeforeDrag;
+
+ // GROUP data
+ QString firstName;
+ QString lastName;
+ Orientation splitterOrientation;
+ bool isGroup;
+ bool isTabGroup;
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ KDockWidgetPrivate *d;
+};
+
+/**
+ * The manager that knows all dockwidgets and handles the dock process (and member of the dockwidget class set).
+ * More or less a helper class for the KDockWidget class set but of interest for some functionality
+ * that can be called within a KDockMainWindow or a KDockWidget .
+ *
+ * An important feature is the ability to read or save the current state of all things concerning to
+ * dockwidgets to KConfig .
+ *
+ * The dockmanager is also often used when a certain dockwidget or a child of such dockwidget must be found.
+ *
+ * @author Max Judin (documentation: Falk Brettschneider).
+ */
+class KDEUI_EXPORT KDockManager: public QObject
+{
+ Q_OBJECT
+friend class KDockWidget;
+friend class KDockMainWindow;
+
+public:
+ enum EnReadDockConfigMode {
+ Unknown,
+ WrapExistingWidgetsOnly,
+ RestoreAllDockwidgets
+ };
+
+public:
+ /**
+ * Constructs a dockmanager. Some initialization happen:
+ * @li It installs an event filter for the main window,
+ * @li a control list for dock objects
+ * @li a control list for menu items concerning to menus provided by the dockmanager
+ * @li Some state variables are set
+ *
+ * @param mainWindow the main window controlled by this
+ * @param name the internal QOject name
+ */
+ KDockManager( QWidget* mainWindow, const char* name = 0L );
+
+ /**
+ * Destructs a dockmanager.
+ */
+ virtual ~KDockManager();
+
+ void dumpDockWidgets();
+
+#ifndef NO_KDE2
+ /**
+ * Saves the current state of the dockmanager and of all controlled widgets.
+ * State means here to save the geometry, visibility, parents, internal object names, orientation,
+ * separator positions, dockwidget-group information, tab widget states (if it is a tab group) and
+ * last but not least some necessary things for recovering the dockmainwindow state.
+ *
+ * @param c the KDE configuration saver
+ * @param group the name of the section in KConfig
+ */
+ void writeConfig( KConfig* c = 0L, QString group = QString::null );
+
+ /**
+ * Like writeConfig but reads the whole stuff in.
+ *
+ * In order to restore a window configuration
+ * from a config file, it looks up widgets by name
+ * (QObject::name) in the childDock variable of
+ * KDockManager. This list in turn contains all
+ * KDockWidgets (according to the KDockWidget constructor).
+ * So in principle, in order to restore a window layout,
+ * one must first construct all widgets, put each of them in a
+ * KDockWidget and then call readConfig(). And for all that
+ * to work, each widget must have a unique name.
+ *
+ * @param c the KDE configuration saver
+ * @param group the name of the section in KConfig
+ */
+ void readConfig ( KConfig* c = 0L, QString group = QString::null );
+#endif
+
+ /// @since 3.1
+ void setMainDockWidget2(KDockWidget *);
+
+ /**
+ * Saves the current dock window layout into a DOM tree below the given element.
+ */
+ void writeConfig(QDomElement &base);
+ /**
+ * Reads the current dock window layout from a DOM tree below the given element.
+ */
+ void readConfig(QDomElement &base);
+
+ /**
+ * Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are
+ * parent of a dockwidget tab group.
+ */
+ void activate();
+
+ /**
+ * It's more or less a method that catches several events which are interesting for the dockmanager.
+ * Mainly mouse events during the drag process of a dockwidgets are of interest here.
+ *
+ * @param object the object that sends the event
+ * @param event the event
+ * @return the return value of the method call of the base class method
+ */
+ virtual bool eventFilter( QObject * object, QEvent * event );
+
+ /**
+ * This method finds out what a widgets' dockwidget is. That means the dockmanager has a look at all
+ * dockwidgets it knows and tells you when one of those dockwidgets covers the given widget.
+ *
+ * @param w any widget that is supposed to be encapsulated by one of the controlled dockwidgets
+ * @return the dockwidget that encapsulates that widget, otherwise 0
+ */
+ KDockWidget* findWidgetParentDock( QWidget* w) const;
+
+ /**
+ * Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.
+ *
+ * @param w the widget that is encapsulated by a dockwidget that turns to visible.
+ */
+ void makeWidgetDockVisible( QWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
+
+ /**
+ * @return the popupmenu for showing/hiding dockwidgets
+ */
+ QPopupMenu* dockHideShowMenu() const { return menu; }
+
+ /**
+ * @param dockName an internal QObject name
+ * @return the dockwidget that has got that internal QObject name
+ */
+ KDockWidget* getDockWidgetFromName( const QString& dockName );
+
+ /**
+ * Enables opaque resizing. Opaque resizing defaults to KGlobalSettings::opaqueResize().
+ * Call this method before you create any dock widgets!
+ */
+ void setSplitterOpaqueResize(bool b=true);
+
+ /**
+ * Returns true if opaque resizing is enabled, false otherwise.
+ */
+ bool splitterOpaqueResize() const;
+
+ /**
+ * Try to preserve the widget's size. Works like KeepSize resize mode
+ * of QSplitter. Off by default.
+ * Call this method before you create any dock widgets!
+ */
+ void setSplitterKeepSize(bool b=true);
+
+ /**
+ * Returns true if the KeepSize is enabled, false otherwise.
+ */
+ bool splitterKeepSize() const;
+
+ /**
+ * Operate the splitter with a higher resolution. Off by default.
+ * Call this method before you create any dock widgets!
+ * If high resolution is used all splitter position parameters
+ * are percent*100 instead of percent.
+ */
+ void setSplitterHighResolution(bool b=true);
+
+ /**
+ * Returns true if the splitter uses the high resolution, false otherwise.
+ */
+ bool splitterHighResolution() const;
+
+ /**
+ * @since 3.2
+ */
+ void setSpecialLeftDockContainer(KDockWidget* container);
+ void setSpecialTopDockContainer(KDockWidget* container);
+ void setSpecialRightDockContainer(KDockWidget* container);
+ void setSpecialBottomDockContainer(KDockWidget* container);
+
+ void removeFromAutoCreateList(KDockWidget* pDockWidget);
+ void finishReadDockConfig();
+ void setReadDockConfigMode(int mode);
+
+signals:
+
+ /**
+ * Signals changes of the docking state of a dockwidget. Usually the dock-toolbar will be updated then.
+ */
+ void change();
+
+ /**
+ * Signals a dockwidget is replaced with another one.
+ */
+ void replaceDock( KDockWidget* oldDock, KDockWidget* newDock );
+
+ /**
+ * Signals a dockwidget without parent (toplevel) is shown.
+ */
+ void setDockDefaultPos( KDockWidget* );
+
+private slots:
+
+ /**
+ * Clears the popupmenu for showing/hiding dockwidgets and fills it with the current states of all controlled dockwidgets.
+ */
+ void slotMenuPopup();
+
+ /**
+ * This method assumes a menuitem of the popupmenu for showing/hiding dockwidgets is selected and toggles that state.
+ *
+ * @param id the popupmenu id of the selected menuitem
+ */
+ void slotMenuActivated( int id);
+
+ /* clears the old drawn drag rectangle (oldDragRect) from screen and
+ * draws the new current drag rectangle (dragRect) depending on the current mouse position.
+ * This highlights the dockwidget which is the currently chosen target during a dock action.
+ */
+ void drawDragRectangle();
+
+private:
+
+ /**
+ * A data structure containing data about every dockwidget that is under control.
+ */
+ struct MenuDockData
+ {
+ MenuDockData( KDockWidget* _dock, bool _hide )
+ {
+ dock = _dock;
+ hide = _hide;
+ };
+ ~MenuDockData(){};
+
+ KDockWidget* dock;
+ bool hide;
+ };
+
+ /**
+ * Finds the KDockWidget at the position given as parameter
+ *
+ * @param pos global (desktop) position of the wanted dockwidget
+ * @return the dockwidget at that position
+ */
+ KDockWidget* findDockWidgetAt( const QPoint& pos );
+
+ /**
+ * Finds the QWidget recursively at the position given as parameter
+ *
+ * @param w a variable where the method puts the QWidget at that position (instead of a return value)
+ * @param p the parent widget where the recursive search should start from
+ * @param pos global (desktop) position of the wanted dockwidget
+ */
+ void findChildDockWidget( QWidget*& w, const QWidget* p, const QPoint& pos );
+
+ /**
+ * Finds all dockwidgets which are child, grandchild and so on of p.
+ *
+ * @param p the parent widget where the recursive search starts from
+ * @param l the widget list that contains the search result after the return of this method
+ */
+ void findChildDockWidget( const QWidget* p, QWidgetList*& l);
+
+ /**
+ * Sets a dockwidget in drag mode.
+ */
+ void startDrag( KDockWidget* );
+
+ /**
+ * Moves a dockwidget that is in drag mode.
+ *
+ * @param d the dockwidget which is dragged
+ * @param pos the new position of the dragged dockwidget
+ */
+ void dragMove( KDockWidget* d, QPoint pos );
+
+ /**
+ * Aborts the drag mode. Restores the cursor and hides the drag indicator.
+ */
+ void cancelDrop();
+
+ /**
+ * Finishes the drag mode. If the user let it drop on an other dockwidget, it will possibly be docked (if allowed),
+ * if the user drops it outside of the application window it becomes toplevel.
+ */
+ void drop();
+
+// class members
+
+ /**
+ * Usually the KDockMainWindow but not necessarily.
+ */
+ QWidget* main;
+
+ /**
+ * The dockwidget that is being dragged at the moment
+ */
+ KDockWidget* currentDragWidget;
+
+ /**
+ * The target dockwidget where the currentDragWidget is dropped
+ */
+ KDockWidget* currentMoveWidget; // widget where mouse moving
+
+ /**
+ * It is of interest during the dock process. Then it contains all child dockwidgets.
+ */
+ QWidgetList* childDockWidgetList;
+
+ /**
+ * The dockposition where the dockwidget would be docked to, if we dropped it here.
+ */
+ KDockWidget::DockPosition curPos;
+
+ /**
+ * A QList of all objects that are important for docking.
+ * Some serve as group widgets of dockwidgets, others encapsulate normal widgets.
+ */
+ QObjectList* childDock;
+
+ /**
+ * Contains dockwidgets that are created automatically by the dockmanager. For internal use.
+ */
+ QObjectList* autoCreateDock;
+
+ /**
+ * For storing the width during the dragging of a dockwidget.
+ */
+ int storeW;
+
+ /**
+ * For storing the height during the dragging of a dockwidget.
+ */
+ int storeH;
+
+ /**
+ * State variable if there is a drag process active.
+ */
+ bool dragging;
+
+ /**
+ * State variable if there is an undock process active
+ */
+ bool undockProcess;
+
+ /**
+ * The dockmanager sets it to true if the user cancels the drag by moving the cursor
+ * on a invalid drop place
+ */
+ bool dropCancel;
+
+ /**
+ * A popup menu that contains one menuitem for each dockwidget that shows the current visibility state and
+ * to show or hide the appropriate dockwidget.
+ */
+ QPopupMenu* menu;
+
+ /**
+ * An internal list containing data for the menuitems for the visibility popup menu.
+ */
+ QPtrList<MenuDockData> *menuData;
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ class KDockManagerPrivate;
+ KDockManagerPrivate *d;
+};
+
+/**
+ * A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set).
+ *
+ * The main widget should be a KDockWidget where other KDockWidget can be docked to
+ * the left, right, top, bottom or to the middle.
+ * Note: dock to the middle means to drop on a dockwidget and to unite them to a new widget, a tab control.
+ *
+ * Furthermore, the KDockMainWindow has got the KDockManager and some data about the dock states.
+ *
+ * If you've got some dockwidgets, you can dock them to the dockmainwindow to initialize a start scene:
+ * Here an example:
+ * \code
+ * DockApplication::DockApplication( const char* name) : KDockMainWindow( name)
+ * {
+ * ...
+ * KDockWidget* mainDock;
+ * mainDock = createDockWidget( "Falk's MainDockWidget", mainPixmap, 0L, "main_dock_widget");
+ * AnyContentsWidget* cw = new AnyContentsWidget( mainDock);
+ * mainDock->setWidget( cw);
+ * // allow others to dock to the 4 sides
+ * mainDock->setDockSite(KDockWidget::DockCorner);
+ * // forbit docking abilities of mainDock itself
+ * mainDock->setEnableDocking(KDockWidget::DockNone);
+ * setView( mainDock); // central widget in a KDE mainwindow
+ * setMainDockWidget( mainDock); // master dockwidget
+ * ...
+ * KDockWidget* dockLeft;
+ * dockLeft = createDockWidget( "Intially left one", anyOtherPixmap, 0L, i18n("The left dockwidget"));
+ * AnotherWidget* aw = new AnotherWidget( dockLeft);
+ * dockLeft->setWidget( aw);
+ * dockLeft->manualDock( mainDock, // dock target
+ * KDockWidget::DockLeft, // dock site
+ * 20 ); // relation target/this (in percent)
+ * ...
+ * \endcode
+ *
+ * Docking is fully dynamic at runtime. That means you can always move dockwidgets via drag and drop.
+ *
+ * And last but not least you can use the popupmenu for showing or hiding any controlled dockwidget
+ * of this class and insert it to your main menu bar or anywhere else.
+ *
+ * @author Max Judin (documentation: Falk Brettschneider).
+ */
+class KDEUI_EXPORT KDockMainWindow : public KMainWindow
+{
+ Q_OBJECT
+
+friend class KDockManager;
+
+public:
+
+ /**
+ * Constructs a dockmainwindow. It calls its base class constructor and does additional things concerning
+ * to the dock stuff:
+ * @li information about the dock state of this' children gets initialized
+ * @li a dockmanager is created...
+ * @li ...and gets initialized
+ * @li the main dockwidget is set to 0
+ *
+ * @param parent Parent widget for the dock main widget
+ * @param name internal object name
+ * @param f Qt::WidgetFlags widget flags
+ */
+ KDockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+
+ /**
+ * Destructs a dockmainwindow.
+ */
+ virtual ~KDockMainWindow();
+
+ /**
+ * Returns the dockmanager of this. (see KDockManager)
+ * @return pointer to the wanted dockmanager
+ */
+ KDockManager* manager() const { return dockManager; }
+
+ /**
+ * Sets a new main dockwidget.
+ * Additionally, the toolbar is re-initialized.
+ *
+ * @param dockwidget dockwidget that become the new main dockwidget
+ */
+ void setMainDockWidget( KDockWidget* dockwidget);
+
+ /**
+ * Returns the main dockwidget.
+ *
+ * @return pointer to the main dockwidget
+ */
+ KDockWidget* getMainDockWidget() const { return mainDockWidget; }
+
+ /**
+ * This is one of the most important methods!
+ * The KDockMainWindow creates a new dockwidget object here that usually should encapsulate the user's widget.
+ * The new dockwidget is automatically taken under control by the dockmanager of the dockmainwindow.
+ *
+ * @param name QObject name (default dockwidget caption)
+ * @param pixmap window icon (for instance shown when docked as tabwidget entry)
+ * @param parent parent widget for the new dockwidget
+ * @param strCaption window title (shown when toplevel)
+ * @param strTabPageLabel title of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is 0L, the label is set to strCaption
+ * @return a pointer to the new created dockwidget
+ */
+ KDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L,
+ const QString& strCaption = QString::null, const QString& strTabPageLabel = QString::fromLatin1( " " ) );
+
+ /**
+ * Saves the current dock window layout into a DOM tree below the given element.
+ */
+ void writeDockConfig(QDomElement &base);
+ /**
+ * Reads the current dock window layout from a DOM tree below the given element.
+ */
+ void readDockConfig(QDomElement &base);
+
+#ifndef NO_KDE2
+ /**
+ * It writes the current dock state in the given section of KConfig.
+ *
+ * @param c KDE class for saving configurations
+ * @param group name of section to write to
+ */
+ void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
+
+ /**
+ * It reads the current dock state from the given section of KConfig.
+ *
+ * @param c KDE class for saving configurations
+ * @param group name of section to read from
+ */
+ void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+#endif
+
+ /**
+ * It runs through all dockwidgets which are under control of the dockmanager and calls show() for every
+ * encapsulated widget and show() for the dockwidget itself if it is not in tab mode.
+ * Additionally, if the main dockwidget is not a QDialog, it will be shown.
+ */
+ void activateDock(){ dockManager->activate(); }
+
+ /**
+ * Returns a popup menu that contains entries for all controlled dockwidgets making hiding and showing
+ * them possible.
+ *
+ * @return the wanted popup menu
+ */
+ QPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
+
+ /**
+ * This method shows the given dockwidget.
+ * The clue is that it also considers the dockwidget could be a tab page
+ * and must set to be the activate one.
+ *
+ * @param dock the dockwidget that is to be shown
+ */
+ void makeDockVisible( KDockWidget* dock );
+
+ /**
+ * This method hides the given dockwidget.
+ *
+ * @param dock the dockwidget that is to be shown
+ */
+ void makeDockInvisible( KDockWidget* dock );
+
+ /**
+ * This is an overloaded member function, provided for convenience.
+ * It differs from the above function only in what argument(s) it accepts.
+ */
+ void makeWidgetDockVisible( QWidget* widget );
+
+ /**
+ * This method calls the base class method.
+ * If the given widget inherits KDockWidget, applyToWidget(this) is called.
+ *
+ * @param widget any widget that should become the main view
+ */
+ void setView( QWidget * widget );
+
+signals:
+ /**
+ * Signals a certain dockwidget is undocked now.
+ */
+ void dockWidgetHasUndocked(KDockWidget*);
+
+protected:
+
+ /**
+ * A pointer to the main dockwidget (where one can manualDock() to
+ */
+ KDockWidget* mainDockWidget;
+
+ /**
+ * A pointer to the manager for the dock process
+ */
+ KDockManager* dockManager;
+
+protected slots:
+ /**
+ * Called whenever one of the dockwidgets of this has been undocked.
+ */
+ void slotDockWidgetUndocked();
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ class KDockMainWindowPrivate;
+ KDockMainWindowPrivate *d;
+};
+
+class KDEUI_EXPORT KDockArea : public QWidget
+{
+ Q_OBJECT
+
+friend class KDockManager;
+
+public:
+
+
+ KDockArea( QWidget* parent = 0L, const char *name = 0L);
+
+ virtual ~KDockArea();
+
+ KDockManager* manager(){ return dockManager; }
+
+
+ void setMainDockWidget( KDockWidget* );
+ KDockWidget* getMainDockWidget(){ return mainDockWidget; }
+
+ KDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L,
+ const QString& strCaption = QString::null, const QString& strTabPageLabel = QString::fromLatin1( " " ) );
+
+ void writeDockConfig(QDomElement &base);
+ void readDockConfig(QDomElement &base);
+
+#ifndef NO_KDE2
+ void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
+ void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+#endif
+
+
+
+ void activateDock(){ dockManager->activate(); }
+ QPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
+ void makeDockVisible( KDockWidget* dock );
+ void makeDockInvisible( KDockWidget* dock );
+ void makeWidgetDockVisible( QWidget* widget );
+ //void setView( QWidget* );
+
+signals:
+ /**
+ * Signals a certain dockwidget is undocked now.
+ */
+ void dockWidgetHasUndocked(KDockWidget*);
+
+protected:
+
+ KDockWidget* mainDockWidget;
+ KDockManager* dockManager;
+
+protected slots:
+ void slotDockWidgetUndocked();
+
+public:
+ virtual void resizeEvent(QResizeEvent *);
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ class KDockMainWindowPrivate;
+ KDockMainWindowPrivate *d;
+};
+
+
+#endif
+
+
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h b/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h
new file mode 100644
index 00000000..7c14394e
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h
@@ -0,0 +1,89 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2002,2003 Joseph Wenninger <jowenn@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.
+*/
+
+/***********************************************************************
+************************************************************************
+ IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT
+************************************************************************
+************************************************************************
+
+THIS IS ___NOT___ PART OF THE PUBLIC API YET. DON'T USE IT IN YOUR
+APPLICATIONS,SINCE IT'S MOST PROBABLY ___NOT___ GOING TO STAY BINARY
+COMPATIBLE. THIS HEADER IS ONLY INSTALLED, BECAUSE IT IS NEEDED IN
+ KDE 3.1'S KATE APPLICATON
+
+************************************************************************
+************************************************************************
+ IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT
+************************************************************************
+***********************************************************************/
+
+#ifndef KDOCKWIDGET_P_H
+#define KDOCKWIDGET_P_H
+
+#include <kdockwidget.h>
+#include <qstringlist.h>
+// Add some describing comment !!
+
+class KDEUI_EXPORT KDockContainer
+{
+public:
+ KDockContainer();
+ virtual ~KDockContainer();
+ virtual KDockWidget *parentDockWidget();
+ virtual void insertWidget (KDockWidget *, QPixmap, const QString &, int &);
+ virtual void showWidget(KDockWidget *);
+ virtual void removeWidget(KDockWidget*);
+ virtual void undockWidget(KDockWidget*);
+ virtual void save(KConfig *cfg,const QString& group_or_prefix);
+ virtual void save(QDomElement& dockElement);
+ virtual void load(KConfig *cfg,const QString& group_or_prefix);
+ virtual void load(QDomElement& dockElement);
+ virtual void setToolTip (KDockWidget *, QString &);
+ virtual void setPixmap(KDockWidget*,const QPixmap&);
+ QStringList containedWidgets() const;
+ virtual bool dockDragEnter(KDockWidget* dockWidget, QMouseEvent *event);
+ virtual bool dockDragMove(KDockWidget* dockWidget, QMouseEvent *event);
+ virtual bool dockDragLeave(KDockWidget* dockWidget, QMouseEvent *event);
+protected:
+ friend class KDockManager;
+ friend class KDockSplitter;
+ void prepareSave(QStringList &names);
+ void activateOverlapMode(int nonOverlapSize);
+ void deactivateOverlapMode();
+ bool isOverlapMode();
+private:
+
+ struct ListItem {
+ struct ListItem *prev;
+ struct ListItem *next;
+ char *data;
+ };
+
+
+
+ struct ListItem *m_childrenListBegin;
+ struct ListItem *m_childrenListEnd;
+
+ class KDockContainerPrivate;
+ KDockContainerPrivate *d;
+ bool m_overlapMode;
+ int m_nonOverlapSize;
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp
new file mode 100644
index 00000000..3c4783f1
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp
@@ -0,0 +1,631 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2000 Max Judin <novaprint@mtu-net.ru>
+ Copyright (C) 2002,2003 Joseph Wenninger <jowenn@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 "kdockwidget.h"
+#include "kdockwidget_p.h"
+#include "kdockwidget_private.h"
+
+#include <qpainter.h>
+#include <qcursor.h>
+#include <kdebug.h>
+#include <qtimer.h>
+#include <qapplication.h>
+
+KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orient, int pos, bool highResolution)
+: QWidget(parent, name)
+{
+ m_dontRecalc=false;
+ divider = 0L;
+ child0 = 0L;
+ child1 = 0L;
+ fixedWidth0=-1;
+ fixedWidth1=-1;
+ fixedHeight0=-1;
+ fixedHeight1=-1;
+
+ m_orientation = orient;
+ mOpaqueResize = false;
+ mKeepSize = false;
+ mHighResolution = highResolution;
+ setSeparatorPos( pos, false );
+ initialised = false;
+}
+
+void KDockSplitter::activate(QWidget *c0, QWidget *c1)
+{
+ if ( c0 ) child0 = c0;
+ if ( c1 ) child1 = c1;
+
+ setupMinMaxSize();
+
+ if (divider) delete divider;
+ divider = new QFrame(this, "pannerdivider");
+ divider->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ divider->setLineWidth(1);
+ divider->raise();
+
+ if (m_orientation == Horizontal)
+ divider->setCursor(QCursor(sizeVerCursor));
+ else
+ divider->setCursor(QCursor(sizeHorCursor));
+
+ divider->installEventFilter(this);
+
+ initialised= true;
+
+ updateName();
+ divider->show();
+ resizeEvent(0);
+ if (fixedWidth0!=-1) restoreFromForcedFixedSize((KDockWidget*)child0);
+ if (fixedWidth1!=-1) restoreFromForcedFixedSize((KDockWidget*)child1);
+ if (((KDockWidget*)child0)->forcedFixedWidth()!=-1)
+ {
+ setForcedFixedWidth(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedWidth());
+ //QTimer::singleShot(100,this,SLOT(delayedResize()));
+ }
+ else
+ if (((KDockWidget*)child1)->forcedFixedWidth()!=-1)
+ {
+ setForcedFixedWidth(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedWidth());
+ //QTimer::singleShot(100,this,SLOT(delayedResize()));
+ }
+
+ if (((KDockWidget*)child0)->forcedFixedHeight()!=-1)
+ {
+ setForcedFixedHeight(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedHeight());
+ //QTimer::singleShot(100,this,SLOT(delayedResize()));
+ }
+ else
+ if (((KDockWidget*)child1)->forcedFixedHeight()!=-1)
+ {
+ setForcedFixedHeight(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedHeight());
+ //QTimer::singleShot(100,this,SLOT(delayedResize()));
+ }
+
+
+}
+
+/*
+void KDockSplitter::delayedResize()
+{
+ kdDebug(282)<<"*********************** DELAYED RESIZE !!!!!!!!!!!!!!!"<<endl;
+ resizeEvent(0);
+}*/
+
+void KDockSplitter::setForcedFixedWidth(KDockWidget *dw,int w)
+{
+ int factor = (mHighResolution)? 10000:100;
+ if (dw==child0)
+ {
+ if (fixedWidth0==-1) savedXPos=xpos;
+ if (w==fixedWidth0) return;
+ fixedWidth0=w;
+ setSeparatorPos(w*factor/width(),true);
+
+// setupMinMaxSize();
+// kdDebug(282)<<"Set forced fixed width for widget 0 :"<<w<<endl;
+ }
+ else
+ {
+ if (fixedWidth1==-1) savedXPos=xpos;
+ if (w==fixedWidth1) return;
+ fixedWidth1=w;
+ setSeparatorPos((width()-w)*factor/width(),true);
+// kdDebug(282)<<"Set forced fixed width for widget 1 :"<<w<<endl;
+// kdDebug(282)<<"Width() :"<<width()<<endl;
+ }
+ divider->hide();
+ setupMinMaxSize();
+}
+
+void KDockSplitter::setForcedFixedHeight(KDockWidget *dw,int h)
+{
+ int factor = (mHighResolution)? 10000:100;
+ if (dw==child0)
+ {
+ if (fixedHeight0==-1) savedXPos=xpos;
+ if (h==fixedHeight0) return;
+ fixedHeight0=h;
+// setupMinMaxSize();
+ setSeparatorPos(h*factor/height(),true);
+// kdDebug(282)<<"Set forced fixed width for widget 0 :"<<h<<endl;
+ }
+ else
+ {
+ if (fixedHeight1==-1) savedXPos=xpos;
+ if (h==fixedHeight1) return;
+ fixedHeight1=h;
+ setSeparatorPos((height()-h)*factor/height(),true);
+// kdDebug(282)<<"Set forced fixed height for widget 1 :"<<h<<endl;
+ }
+ divider->hide();
+ setupMinMaxSize();
+}
+
+void KDockSplitter::restoreFromForcedFixedSize(KDockWidget *dw)
+{
+ if (dw==child0)
+ {
+ fixedWidth0=-1;
+ fixedHeight0=-1;
+ setSeparatorPos(savedXPos,true);
+ }
+ else
+ {
+ fixedWidth1=-1;
+ fixedHeight1=-1;
+ setSeparatorPos(savedXPos,true);
+ }
+ divider->show();
+}
+
+
+void KDockSplitter::setupMinMaxSize()
+{
+ // Set the minimum and maximum sizes
+ int minx, maxx, miny, maxy;
+ if (m_orientation == Horizontal) {
+ miny = child0->minimumSize().height() + child1->minimumSize().height()+4;
+ maxy = child0->maximumSize().height() + child1->maximumSize().height()+4;
+ minx = (child0->minimumSize().width() > child1->minimumSize().width()) ? child0->minimumSize().width() : child1->minimumSize().width();
+ maxx = (child0->maximumSize().width() > child1->maximumSize().width()) ? child0->maximumSize().width() : child1->maximumSize().width();
+
+ miny = (miny > 4) ? miny : 4;
+ maxy = (maxy < 32000) ? maxy : 32000;
+ minx = (minx > 2) ? minx : 2;
+ maxx = (maxx < 32000) ? maxx : 32000;
+ } else {
+ minx = child0->minimumSize().width() + child1->minimumSize().width()+4;
+ maxx = child0->maximumSize().width() + child1->maximumSize().width()+4;
+ miny = (child0->minimumSize().height() > child1->minimumSize().height()) ? child0->minimumSize().height() : child1->minimumSize().height();
+ maxy = (child0->maximumSize().height() > child1->maximumSize().height()) ? child0->maximumSize().height() : child1->maximumSize().height();
+
+ minx = (minx > 4) ? minx : 4;
+ maxx = (maxx < 32000) ? maxx : 32000;
+ miny = (miny > 2) ? miny : 2;
+ maxy = (maxy < 32000) ? maxy : 32000;
+
+ }
+ setMinimumSize(minx, miny);
+ setMaximumSize(maxx, maxy);
+}
+
+void KDockSplitter::deactivate()
+{
+ delete divider;
+ divider = 0L;
+ initialised= false;
+}
+
+void KDockSplitter::setSeparatorPos(int pos, bool do_resize)
+{
+ xpos = pos;
+ if (do_resize)
+ resizeEvent(0);
+}
+
+void KDockSplitter::setSeparatorPosX( int pos, bool do_resize )
+{
+ savedXPos = pos;
+ setSeparatorPos( pos, do_resize );
+}
+
+int KDockSplitter::separatorPos() const
+{
+ return xpos;
+}
+
+void KDockSplitter::resizeEvent(QResizeEvent *ev)
+{
+// kdDebug(282)<<"ResizeEvent :"<< ((initialised) ? "initialised":"not initialised")<<", "<< ((ev) ? "real event":"")<<
+// ", "<<(isVisible() ?"visible":"")<<endl;
+ if (initialised){
+ double factor = (mHighResolution)? 10000.0:100.0;
+ // real resize event, recalculate xpos
+ if (ev && mKeepSize && isVisible()) {
+// kdDebug(282)<<"mKeepSize : "<< ((m_orientation == Horizontal) ? "Horizontal":"Vertical") <<endl;
+
+ if (ev->oldSize().width() != ev->size().width())
+ {
+ if (m_orientation == Horizontal) {
+ xpos = qRound(factor * checkValue( child0->height()+1 ) / height());
+ } else {
+ xpos = qRound(factor * checkValue( child0->width()+1 ) / width());
+ }
+
+ }
+ }
+ else
+ {
+// kdDebug(282)<<"!mKeepSize : "<< ((m_orientation == Horizontal) ? "Horizontal":"Vertical") <<endl;
+ if (/*ev &&*/ isVisible()) {
+ if (m_orientation == Horizontal) {
+ /* if (ev->oldSize().height() != ev->size().height())*/
+ {
+ if (fixedHeight0!=-1)
+// xpos=floor(fixedHeight0*factor/height());
+ xpos=qRound(fixedHeight0*factor/height());
+ else
+ if (fixedHeight1!=-1)
+// xpos=ceil((height()-fixedHeight1)*factor/height());
+ xpos=qRound((height()-fixedHeight1)*factor/height());
+ }
+ }
+ else
+ {
+/* if (ev->oldSize().width() != ev->size().width()) */
+ {
+ if (fixedWidth0!=-1)
+// xpos=floor(fixedWidth0*factor/width());
+ xpos=qRound(fixedWidth0*factor/width());
+ else
+ if (fixedWidth1!=-1)
+// xpos=ceil((width()-fixedWidth1)*factor/width());
+ xpos=qRound((width()-fixedWidth1)*factor/width());
+ }
+ }
+ }
+// else kdDebug(282)<<"Something else happened"<<endl;
+ }
+
+ KDockContainer *dc;
+ KDockWidget *c0=(KDockWidget*)child0;
+ KDockWidget *c1=(KDockWidget*)child1;
+ bool stdHandling=false;
+ if ( ( (m_orientation==Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) ||
+ ( (m_orientation==Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) {
+ if ((c0->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c0->getWidget()))
+ && (dc->m_overlapMode)) {
+ int position= qRound((m_orientation == Vertical ? width() : height()) * xpos/factor);
+ position=checkValueOverlapped(position,child0);
+ child0->raise();
+ divider->raise();
+ if (m_orientation == Horizontal){
+ child0->setGeometry(0, 0, width(), position);
+ child1->setGeometry(0, dc->m_nonOverlapSize+4, width(),
+ height()-dc->m_nonOverlapSize-4);
+ divider->setGeometry(0, position, width(), 4);
+ } else {
+ child0->setGeometry(0, 0, position, height());
+ child1->setGeometry(dc->m_nonOverlapSize+4, 0,
+ width()-dc->m_nonOverlapSize-4, height());
+ divider->setGeometry(position, 0, 4, height());
+ }
+ } else {
+ if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))
+ && (dc->m_overlapMode)) {
+ int position= qRound((m_orientation == Vertical ? width() : height()) * xpos/factor);
+ position=checkValueOverlapped(position,child1);
+ child1->raise();
+ divider->raise();
+ if (m_orientation == Horizontal){
+ child0->setGeometry(0, 0, width(), height()-dc->m_nonOverlapSize-4);
+ child1->setGeometry(0, position+4, width(),
+ height()-position-4);
+ divider->setGeometry(0, position, width(), 4);
+ } else {
+ child0->setGeometry(0, 0, width()-dc->m_nonOverlapSize-4, height());
+ child1->setGeometry(position+4, 0,
+ width()-position-4, height());
+ divider->setGeometry(position, 0, 4, height());
+ }
+ }
+ else stdHandling=true;
+ }
+ }
+ else stdHandling=true;
+
+ if (stdHandling) {
+ int position = checkValue( qRound((m_orientation == Vertical ? width() : height()) * xpos/factor) );
+ if (m_orientation == Horizontal){
+ child0->setGeometry(0, 0, width(), position);
+ child1->setGeometry(0, position+4, width(), height()-position-4);
+ divider->setGeometry(0, position, width(), 4);
+ } else {
+ child0->setGeometry(0, 0, position, height());
+ child1->setGeometry(position+4, 0, width()-position-4, height());
+ divider->setGeometry(position, 0, 4, height());
+ }
+
+ }
+
+ }
+}
+
+int KDockSplitter::checkValueOverlapped(int position, QWidget *overlappingWidget) const {
+ if (initialised) {
+ if (m_orientation == Vertical) {
+ if (child0==overlappingWidget) {
+ if (position<(child0->minimumSize().width()))
+ position=child0->minimumSize().width();
+ if (position>width()) position=width()-4;
+ } else if (position>(width()-(child1->minimumSize().width())-4)){
+ position=width()-(child1->minimumSize().width())-4;
+ if (position<0) position=0;
+ }
+ } else {// orientation == Horizontal
+ if (child0==overlappingWidget) {
+ if (position<(child0->minimumSize().height()))
+ position=child0->minimumSize().height();
+ if (position>height()) position=height()-4;
+ } else if (position>(height()-(child1->minimumSize().height())-4)){
+ position=height()-(child1->minimumSize().height())-4;
+ if (position<0) position=0;
+
+ }
+ }
+
+ }
+ return position;
+}
+
+int KDockSplitter::checkValue( int position ) const
+{
+ if (initialised){
+ if (m_orientation == Vertical){
+ if (position < (child0->minimumSize().width()))
+ position = child0->minimumSize().width();
+ if ((width()-4-position) < (child1->minimumSize().width()))
+ position = width() - (child1->minimumSize().width()) -4;
+ } else {
+ if (position < (child0->minimumSize().height()))
+ position = (child0->minimumSize().height());
+ if ((height()-4-position) < (child1->minimumSize().height()))
+ position = height() - (child1->minimumSize().height()) -4;
+ }
+ }
+
+ if (position < 0) position = 0;
+
+ if ((m_orientation == Vertical) && (position > width()))
+ position = width();
+ if ((m_orientation == Horizontal) && (position > height()))
+ position = height();
+
+ return position;
+}
+
+bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
+{
+ QMouseEvent *mev;
+ bool handled = false;
+ int factor = (mHighResolution)? 10000:100;
+
+ switch (e->type()) {
+ case QEvent::MouseMove:
+ mev= (QMouseEvent*)e;
+ child0->setUpdatesEnabled(mOpaqueResize);
+ child1->setUpdatesEnabled(mOpaqueResize);
+ if (m_orientation == Horizontal) {
+ if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
+ {
+ handled=true; break;
+ }
+
+ if (!mOpaqueResize) {
+ int position = checkValue( mapFromGlobal(mev->globalPos()).y() );
+ divider->move( 0, position );
+ } else {
+ xpos = factor * checkValue( mapFromGlobal(mev->globalPos()).y() ) / height();
+ resizeEvent(0);
+ divider->repaint(true);
+ }
+ } else {
+ if ((fixedWidth0!=-1) || (fixedWidth1!=-1))
+ {
+ handled=true; break;
+ }
+ if (!mOpaqueResize) {
+ int position = checkValue( mapFromGlobal(QCursor::pos()).x() );
+ divider->move( position, 0 );
+ } else {
+ xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width();
+ resizeEvent(0);
+ divider->repaint(true);
+ }
+ }
+ handled= true;
+ break;
+ case QEvent::MouseButtonRelease:
+ child0->setUpdatesEnabled(true);
+ child1->setUpdatesEnabled(true);
+ mev= (QMouseEvent*)e;
+ if (m_orientation == Horizontal){
+ if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
+ {
+ handled=true; break;
+ }
+ xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).y() ) / height();
+ resizeEvent(0);
+ divider->repaint(true);
+ } else {
+ if ((fixedWidth0!=-1) || (fixedWidth1!=-1))
+ {
+ handled=true; break;
+ }
+ xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).x() ) / width();
+ resizeEvent(0);
+ divider->repaint(true);
+ }
+ handled= true;
+ break;
+ default:
+ break;
+ }
+ return (handled) ? true : QWidget::eventFilter( o, e );
+}
+
+bool KDockSplitter::event( QEvent* e )
+{
+ if ( e->type() == QEvent::LayoutHint ){
+ // change children min/max size
+ setupMinMaxSize();
+ setSeparatorPos(xpos);
+ }
+ return QWidget::event(e);
+}
+
+QWidget* KDockSplitter::getAnother( QWidget* w ) const
+{
+ return ( w == child0 ) ? child1 : child0;
+}
+
+void KDockSplitter::updateName()
+{
+ if ( !initialised ) return;
+
+ QString new_name = QString( child0->name() ) + "," + child1->name();
+ parentWidget()->setName( new_name.latin1() );
+ parentWidget()->setCaption( child0->caption() + "," + child1->caption() );
+ parentWidget()->repaint( false );
+
+ ((KDockWidget*)parentWidget())->firstName = child0->name();
+ ((KDockWidget*)parentWidget())->lastName = child1->name();
+ ((KDockWidget*)parentWidget())->splitterOrientation = m_orientation;
+
+ QWidget* p = parentWidget()->parentWidget();
+ if ( p && p->inherits("KDockSplitter" ) )
+ ((KDockSplitter*)p)->updateName();
+}
+
+void KDockSplitter::setOpaqueResize(bool b)
+{
+ mOpaqueResize = b;
+}
+
+bool KDockSplitter::opaqueResize() const
+{
+ return mOpaqueResize;
+}
+
+void KDockSplitter::setKeepSize(bool b)
+{
+ mKeepSize = b;
+}
+
+bool KDockSplitter::keepSize() const
+{
+ return mKeepSize;
+}
+
+void KDockSplitter::setHighResolution(bool b)
+{
+ if (mHighResolution) {
+ if (!b) xpos = xpos/100;
+ } else {
+ if (b) xpos = xpos*100;
+ }
+ mHighResolution = b;
+}
+
+bool KDockSplitter::highResolution() const
+{
+ return mHighResolution;
+}
+
+
+/*************************************************************************/
+KDockButton_Private::KDockButton_Private( QWidget *parent, const char * name )
+:QPushButton( parent, name )
+{
+ moveMouse = false;
+ setFocusPolicy( NoFocus );
+}
+
+KDockButton_Private::~KDockButton_Private()
+{
+}
+
+void KDockButton_Private::drawButton( QPainter* p )
+{
+ p->fillRect( 0,0, width(), height(), QBrush(colorGroup().brush(QColorGroup::Background)) );
+ p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() );
+ if ( moveMouse && !isDown() ){
+ p->setPen( white );
+ p->moveTo( 0, height() - 1 );
+ p->lineTo( 0, 0 );
+ p->lineTo( width() - 1, 0 );
+
+ p->setPen( colorGroup().dark() );
+ p->lineTo( width() - 1, height() - 1 );
+ p->lineTo( 0, height() - 1 );
+ }
+ if ( isOn() || isDown() ){
+ p->setPen( colorGroup().dark() );
+ p->moveTo( 0, height() - 1 );
+ p->lineTo( 0, 0 );
+ p->lineTo( width() - 1, 0 );
+
+ p->setPen( white );
+ p->lineTo( width() - 1, height() - 1 );
+ p->lineTo( 0, height() - 1 );
+ }
+}
+
+void KDockButton_Private::enterEvent( QEvent * )
+{
+ moveMouse = true;
+ repaint();
+}
+
+void KDockButton_Private::leaveEvent( QEvent * )
+{
+ moveMouse = false;
+ repaint();
+}
+
+/*************************************************************************/
+KDockWidgetPrivate::KDockWidgetPrivate()
+ : QObject()
+ ,index(-1)
+ ,splitPosInPercent(50)
+ ,pendingFocusInEvent(false)
+ ,blockHasUndockedSignal(false)
+ ,pendingDtor(false)
+ ,forcedWidth(-1)
+ ,forcedHeight(-1)
+ ,isContainer(false)
+ ,container(0)
+ ,resizePos(0,0)
+ ,resizing(false)
+{
+#ifndef NO_KDE2
+ windowType = NET::Normal;
+#endif
+
+ _parent = 0L;
+ transient = false;
+}
+
+KDockWidgetPrivate::~KDockWidgetPrivate()
+{
+}
+
+void KDockWidgetPrivate::slotFocusEmbeddedWidget(QWidget* w)
+{
+ if (w) {
+ QWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
+ if (embeddedWdg && ((embeddedWdg->focusPolicy() == QWidget::ClickFocus) || (embeddedWdg->focusPolicy() == QWidget::StrongFocus))) {
+ embeddedWdg->setFocus();
+ }
+ }
+}
+
+#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name
+#include "kdockwidget_private.moc"
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h
new file mode 100644
index 00000000..0857bd7a
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h
@@ -0,0 +1,204 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2000 Max Judin <novaprint@mtu-net.ru>
+
+ 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.
+*/
+
+/*
+ IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition
+*/
+
+#ifndef KDOCKWIDGET_PRIVATE_H
+#define KDOCKWIDGET_PRIVATE_H
+
+#include <qwidget.h>
+#include <qpushbutton.h>
+
+#ifndef NO_KDE2
+#include <netwm_def.h>
+#endif
+
+class QFrame;
+class KDockContainer;
+
+
+/**
+ * Like QSplitter but specially designed for dockwidgets stuff.
+ * @internal
+ *
+ * @author Max Judin.
+*/
+class KDEUI_EXPORT KDockSplitter : public QWidget
+{
+ Q_OBJECT
+public:
+ KDockSplitter(QWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false);
+ virtual ~KDockSplitter(){};
+
+ void activate(QWidget *c0, QWidget *c1 = 0L);
+ void deactivate();
+
+ int separatorPos() const;
+ void setSeparatorPos(int pos, bool do_resize = true);
+ /**
+ * For usage from outside.
+ * If the splitter is in fixed position when called,
+ * the value of @p pos will be saved and used when the splitter
+ * is restored.
+ * If @p do_resize is true, the size will be changed unless the splitter
+ * is in fixed mode.
+ */
+ // ### please come up with a nicer name
+ void setSeparatorPosX(int pos, bool do_resize=false);
+
+ virtual bool eventFilter(QObject *, QEvent *);
+ virtual bool event( QEvent * );
+
+ QWidget* getFirst() const { return child0; }
+ QWidget* getLast() const { return child1; }
+ QWidget* getAnother( QWidget* ) const;
+ void updateName();
+
+ void setOpaqueResize(bool b=true);
+ bool opaqueResize() const;
+
+ void setKeepSize(bool b=true);
+ bool keepSize() const;
+
+ void setHighResolution(bool b=true);
+ bool highResolution() const;
+
+ void setForcedFixedWidth(KDockWidget *dw,int w);
+ void setForcedFixedHeight(KDockWidget *dw,int h);
+ void restoreFromForcedFixedSize(KDockWidget *dw);
+
+ Orientation orientation(){return m_orientation;}
+
+protected:
+ friend class KDockContainer;
+ int checkValue( int ) const;
+ int checkValueOverlapped( int ,QWidget*) const;
+ virtual void resizeEvent(QResizeEvent *);
+/*
+protected slots:
+ void delayedResize();*/
+
+private:
+ void setupMinMaxSize();
+ QWidget *child0, *child1;
+ Orientation m_orientation;
+ bool initialised;
+ QFrame* divider;
+ int xpos, savedXPos;
+ bool mOpaqueResize, mKeepSize, mHighResolution;
+ int fixedWidth0,fixedWidth1;
+ int fixedHeight0,fixedHeight1;
+ bool m_dontRecalc;
+};
+
+/**
+ * A mini-button usually placed in the dockpanel.
+ * @internal
+ *
+ * @author Max Judin.
+*/
+class KDEUI_EXPORT KDockButton_Private : public QPushButton
+{
+ Q_OBJECT
+public:
+ KDockButton_Private( QWidget *parent=0, const char *name=0 );
+ ~KDockButton_Private();
+
+protected:
+ virtual void drawButton( QPainter * );
+ virtual void enterEvent( QEvent * );
+ virtual void leaveEvent( QEvent * );
+
+private:
+ bool moveMouse;
+};
+
+/**
+ * resizing enum
+ **/
+
+
+
+/**
+ * additional KDockWidget stuff (private)
+*/
+class KDEUI_EXPORT KDockWidgetPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ KDockWidgetPrivate();
+ ~KDockWidgetPrivate();
+
+public slots:
+ /**
+ * Especially used for Tab page docking. Switching the pages requires additional setFocus() for the embedded widget.
+ */
+ void slotFocusEmbeddedWidget(QWidget* w = 0L);
+
+public:
+ enum KDockWidgetResize
+{ResizeLeft,ResizeTop,ResizeRight,ResizeBottom,ResizeBottomLeft,ResizeTopLeft,ResizeBottomRight,ResizeTopRight};
+
+ int index;
+ int splitPosInPercent;
+ bool pendingFocusInEvent;
+ bool blockHasUndockedSignal;
+ bool pendingDtor;
+ int forcedWidth;
+ int forcedHeight;
+ bool isContainer;
+
+#ifndef NO_KDE2
+ NET::WindowType windowType;
+#endif
+
+ QWidget *_parent;
+ bool transient;
+
+ QGuardedPtr<QWidget> container;
+
+ QPoint resizePos;
+ bool resizing;
+ KDockWidgetResize resizeMode;
+};
+
+class KDEUI_EXPORT KDockWidgetHeaderPrivate
+ : public QObject
+{
+public:
+ KDockWidgetHeaderPrivate( QObject* parent )
+ : QObject( parent )
+ {
+ forceCloseButtonHidden=false;
+ toDesktopButton = 0;
+ showToDesktopButton = true;
+ topLevel = false;
+ dummy=0;
+ }
+ KDockButton_Private* toDesktopButton;
+
+ bool showToDesktopButton;
+ bool topLevel;
+ QPtrList<KDockButton_Private> btns;
+ bool forceCloseButtonHidden;
+ QWidget *dummy;
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp
new file mode 100644
index 00000000..8074dac4
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp
@@ -0,0 +1,789 @@
+//----------------------------------------------------------------------------
+// filename : kmdichildarea.cpp
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Szymon Stefanek (stefanek@tin.it)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#include "kmdichildarea.h"
+#include "kmdichildarea.moc"
+
+#include "kmdidefines.h"
+
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kglobal.h>
+#include <kglobalsettings.h>
+
+#include <math.h>
+#include <qpopupmenu.h>
+
+
+///////////////////////////////////////////////////////////////////////////////
+// KMdiChildArea
+///////////////////////////////////////////////////////////////////////////////
+
+//============ KMdiChildArea ============//
+
+KMdiChildArea::KMdiChildArea( QWidget *parent )
+ : QFrame( parent, "kmdi_childarea" )
+{
+ setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ m_captionFont = QFont();
+ QFontMetrics fm( m_captionFont );
+ m_captionFontLineSpacing = fm.lineSpacing();
+ m_captionActiveBackColor = KGlobalSettings::activeTitleColor();
+ m_captionActiveForeColor = KGlobalSettings::activeTextColor();
+ m_captionInactiveBackColor = KGlobalSettings::inactiveTitleColor();
+ m_captionInactiveForeColor = KGlobalSettings::inactiveTextColor();
+ m_pZ = new QPtrList<KMdiChildFrm>;
+ m_pZ->setAutoDelete( true );
+ setFocusPolicy( ClickFocus );
+ m_defaultChildFrmSize = QSize( 400, 300 );
+}
+
+
+KMdiChildArea::~KMdiChildArea()
+{
+ delete m_pZ; //This will destroy all the widgets inside.
+}
+
+
+void KMdiChildArea::manageChild( KMdiChildFrm* child, bool show, bool cascade )
+{
+ kdDebug( 760 ) << k_funcinfo << "Adding child " << child << " to be managed" << endl;
+ KMdiChildFrm* top = topChild();
+
+ //remove old references. There can be more than one so we remove them all
+ if ( m_pZ->findRef( child ) != -1 )
+ {
+ //QPtrList::find* moves current() to the found item
+ m_pZ->take();
+ while ( m_pZ->findNextRef( child ) != -1 )
+ m_pZ->take();
+ }
+
+ if ( show )
+ m_pZ->append( child ); //visible -> first in the Z order
+ else
+ m_pZ->insert( 0, child ); //hidden -> last in the Z order
+
+ if ( cascade )
+ child->move( getCascadePoint( m_pZ->count() - 1 ) );
+
+ if ( show )
+ {
+ if ( top && top->state() == KMdiChildFrm::Maximized )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Maximizing the new child" << endl;
+ emit sysButtonConnectionsMustChange( top, child );
+ top->setState( KMdiChildFrm::Normal, false /*animate*/ );
+ child->setState( KMdiChildFrm::Maximized, false /*animate*/ );
+ }
+ child->show();
+ focusTopChild();
+ }
+}
+
+
+void KMdiChildArea::destroyChild( KMdiChildFrm *child, bool focusTop )
+{
+ kdDebug( 760 ) << k_funcinfo << "Removing child " << child->caption() << endl;
+ bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized );
+
+ // destroy the old one
+ QObject::disconnect( child );
+ child->blockSignals( true );
+ m_pZ->setAutoDelete( false );
+ m_pZ->removeRef( child );
+
+ // focus the next new childframe
+ KMdiChildFrm* newTopChild = topChild();
+ if ( wasMaximized )
+ {
+ if ( newTopChild )
+ {
+ newTopChild->setState( KMdiChildFrm::Maximized, false );
+ emit sysButtonConnectionsMustChange( child, newTopChild );
+ }
+ else
+ emit noMaximizedChildFrmLeft( child ); // last childframe removed
+ }
+
+ delete child;
+ m_pZ->setAutoDelete( true );
+
+ if ( focusTop )
+ focusTopChild();
+}
+
+
+void KMdiChildArea::destroyChildButNotItsView( KMdiChildFrm* child, bool focusTop )
+{
+ kdDebug( 760 ) << k_funcinfo << "Removing child " << child->caption() << endl;
+ bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized );
+
+ // destroy the old one
+ QObject::disconnect( child );
+ child->unsetClient();
+ m_pZ->setAutoDelete( false );
+ m_pZ->removeRef( child );
+
+ // focus the next new childframe
+ KMdiChildFrm* newTopChild = topChild();
+ if ( wasMaximized )
+ {
+ if ( newTopChild )
+ {
+ newTopChild->setState( KMdiChildFrm::Maximized, false );
+ emit sysButtonConnectionsMustChange( child, newTopChild );
+ }
+ else
+ emit noMaximizedChildFrmLeft( child ); // last childframe removed
+ }
+ delete child;
+ m_pZ->setAutoDelete( true );
+
+ if ( focusTop )
+ focusTopChild();
+}
+
+void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ )
+{
+ if ( !child )
+ return;
+
+ if ( topChild() != child )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Setting " << child->caption() << " as the new top child" << endl;
+ m_pZ->setAutoDelete( false );
+ if ( child )
+ m_pZ->removeRef( child );
+ m_pZ->setAutoDelete( true );
+
+ //disable the labels of all the other children
+ QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ for ( ; ( *it ); ++it )
+ ( *it )->m_pCaption->setActive( false );
+
+ KMdiChildFrm* maximizedChild = topChild();
+ bool topChildMaximized = false;
+ if ( maximizedChild && maximizedChild->state() == KMdiChildFrm::Maximized )
+ topChildMaximized = true;
+
+ m_pZ->append( child );
+
+ int nChildAreaMinW = 0, nChildAreaMinH = 0;
+ int nChildAreaMaxW = QWIDGETSIZE_MAX, nChildAreaMaxH = QWIDGETSIZE_MAX;
+ if ( topChildMaximized && child->m_pClient )
+ {
+ //the former top child is maximized, so maximize the new one
+ nChildAreaMinW = child->m_pClient->minimumWidth();
+ nChildAreaMinH = child->m_pClient->minimumHeight();
+ /// @todo: setting the maximum size doesn't work properly - fix this later
+ // nChildAreaMaxW = child->m_pClient->maximumWidth();
+ // nChildAreaMaxH = child->m_pClient->maximumHeight();
+ }
+
+ //set the min and max sizes of this child area to the new top child
+ setMinimumSize( nChildAreaMinW, nChildAreaMinH );
+ setMaximumSize( nChildAreaMaxW, nChildAreaMaxH );
+
+ if ( topChildMaximized )
+ { //maximize the new view and restore the old
+ child->setState( KMdiChildFrm::Maximized, false /*animate*/);
+ maximizedChild->setState( KMdiChildFrm::Normal, false /*animate*/ );
+ emit sysButtonConnectionsMustChange( maximizedChild, child );
+ }
+ else
+ child->raise();
+
+ QFocusEvent::setReason( QFocusEvent::Other );
+ child->m_pClient->setFocus();
+ }
+}
+
+
+void KMdiChildArea::resizeEvent( QResizeEvent* e )
+{
+ //If we have a maximized children at the top , adjust its size
+ KMdiChildFrm* child = topChild();
+ if ( child && child->state() == KMdiChildFrm::Maximized )
+ {
+ int clientw = 0, clienth = 0;
+ if ( child->m_pClient != 0L )
+ {
+ clientw = child->m_pClient->width();
+ clienth = child->m_pClient->height();
+ }
+ child->resize( width() + KMDI_CHILDFRM_DOUBLE_BORDER,
+ height() + child->m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_DOUBLE_BORDER );
+
+ }
+ layoutMinimizedChildren();
+ QWidget::resizeEvent( e );
+}
+
+//=============== mousePressEvent =============//
+
+void KMdiChildArea::mousePressEvent( QMouseEvent *e )
+{
+ //Popup the window menu
+ if ( e->button() & RightButton )
+ emit popupWindowMenu( mapToGlobal( e->pos() ) );
+}
+
+//=============== getCascadePoint ============//
+
+QPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
+{
+ if ( indexOfWindow < 0 )
+ {
+ indexOfWindow = m_pZ->count(); //use the window count
+ kdDebug( 760 ) << k_funcinfo << "indexOfWindow was less than zero, using "
+ << indexOfWindow << " as new index" << endl;
+ }
+
+ QPoint pnt( 0, 0 );
+ if ( indexOfWindow == 0 )
+ {
+ kdDebug( 760 ) << k_funcinfo << "No windows. Returning QPoint( 0, 0 ) as the cascade point" << endl;
+ return pnt;
+ }
+
+ bool topLevelMode = false;
+ if ( height() == 1 ) // hacky?!
+ topLevelMode = true;
+
+ kdDebug( 760 ) << k_funcinfo << "Getting the cascade point for window index " << indexOfWindow << endl;
+ kdDebug( 760 ) << k_funcinfo << "Do we think we're in top level mode? " << topLevelMode << endl;
+
+ KMdiChildFrm* child = m_pZ->first();
+
+ //default values
+ int step = 20;
+ int h = ( topLevelMode ? QApplication::desktop()->height() : height() );
+ int w = ( topLevelMode ? QApplication::desktop()->width() : width() );
+
+ int availableHeight = h - m_defaultChildFrmSize.height();
+ int availableWidth = w - m_defaultChildFrmSize.width();
+ int ax = 0;
+ int ay = 0;
+
+ if ( child )
+ {
+ kdDebug( 760 ) << k_funcinfo << "child frame exists. resetting height and width values" << endl;
+ step = child->m_pCaption->heightHint() + KMDI_CHILDFRM_BORDER;
+ availableHeight = h - child->minimumHeight();
+ availableWidth = w - child->minimumWidth();
+ }
+
+ for ( int i = 0; i < indexOfWindow; i++ )
+ {
+ ax += step;
+ ay += step;
+
+ //do some bounds checking, because to not do it would be bad.
+ if ( ax > availableWidth )
+ ax = 0;
+
+ if ( ay > availableHeight )
+ ay = 0;
+ }
+ pnt.setX( ax );
+ pnt.setY( ay );
+ return pnt;
+}
+
+
+void KMdiChildArea::childMinimized( KMdiChildFrm *minimizedChild, bool wasMaximized )
+{
+ //can't find the child in our list, so we don't care.
+ if ( m_pZ->findRef( minimizedChild ) == -1 )
+ {
+ kdDebug( 760 ) << k_funcinfo << "child was minimized but wasn't in our list!" << endl;
+ return;
+ }
+
+ kdDebug( 760 ) << k_funcinfo << endl;
+ if ( m_pZ->count() > 1 )
+ {
+ //move the minimized child to the bottom
+ m_pZ->setAutoDelete( false );
+ m_pZ->removeRef( minimizedChild );
+ m_pZ->setAutoDelete( true );
+ m_pZ->insert( 0, minimizedChild );
+
+ if ( wasMaximized )
+ { // Need to maximize the new top child
+ kdDebug( 760 ) << k_funcinfo << "child just minimized from maximized state. maximize new top child" << endl;
+ minimizedChild = topChild();
+ if ( !minimizedChild )
+ return; //??
+
+ if ( minimizedChild->state() == KMdiChildFrm::Maximized )
+ return; //it's already maximized
+
+ minimizedChild->setState( KMdiChildFrm::Maximized, false ); //do not animate the change
+ }
+ focusTopChild();
+ }
+ else
+ setFocus(); //Remove focus from the child. We only have one window
+}
+
+void KMdiChildArea::focusTopChild()
+{
+ KMdiChildFrm* lastChild = topChild();
+ if ( !lastChild )
+ {
+ kdDebug( 760 ) << k_funcinfo << "No more child windows left" << endl;
+ emit lastChildFrmClosed();
+ return;
+ }
+
+ if ( !lastChild->m_pClient->hasFocus() )
+ {
+ //disable the labels of all the other children
+ QPtrListIterator<KMdiChildFrm> it ( *m_pZ );
+ for ( ; ( *it ); ++it )
+ {
+ if ( ( *it ) != lastChild )
+ ( *it )->m_pCaption->setActive( false );
+ }
+
+ kdDebug( 760 ) << k_funcinfo << "Giving focus to " << lastChild->caption() << endl;
+ lastChild->raise();
+ lastChild->m_pClient->activate();
+ }
+
+}
+
+void KMdiChildArea::cascadeWindows()
+{
+ kdDebug( 760 ) << k_funcinfo << "cascading windows but not changing their size" << endl;
+ int idx = 0;
+ QPtrList<KMdiChildFrm> list( *m_pZ );
+ list.setAutoDelete( false );
+ while ( !list.isEmpty() )
+ {
+ KMdiChildFrm* childFrm = list.first();
+ if ( childFrm->state() != KMdiChildFrm::Minimized )
+ {
+ if ( childFrm->state() == KMdiChildFrm::Maximized )
+ childFrm->restorePressed();
+
+ childFrm->move( getCascadePoint( idx ) );
+ idx++;
+ }
+ list.removeFirst();
+ }
+ focusTopChild();
+}
+
+void KMdiChildArea::cascadeMaximized()
+{
+ kdDebug( 760 ) << k_funcinfo << "cascading windows. will make sure they are minimum sized" << endl;
+ int idx = 0;
+ QPtrList<KMdiChildFrm> list( *m_pZ );
+
+ list.setAutoDelete( false );
+ while ( !list.isEmpty() )
+ {
+ KMdiChildFrm* childFrm = list.first();
+ if (childFrm->state() != KMdiChildFrm::Minimized )
+ {
+ if (childFrm->state() == KMdiChildFrm::Maximized )
+ childFrm->restorePressed();
+
+ QPoint pnt( getCascadePoint( idx ) );
+ childFrm->move( pnt );
+ QSize curSize( width() - pnt.x(), height() - pnt.y() );
+
+ if ( ( childFrm->minimumSize().width() > curSize.width() ) ||
+ ( childFrm->minimumSize().height() > curSize.height() ) )
+ {
+ childFrm->resize( childFrm->minimumSize() );
+ }
+ else
+ childFrm->resize( curSize );
+
+ idx++;
+ }
+ list.removeFirst();
+ }
+ focusTopChild();
+}
+
+void KMdiChildArea::expandVertical()
+{
+ kdDebug( 760 ) << k_funcinfo << "expanding all child frames vertically" << endl;
+ int idx = 0;
+ QPtrList<KMdiChildFrm> list( *m_pZ );
+ list.setAutoDelete( false );
+ while ( !list.isEmpty() )
+ {
+ KMdiChildFrm* childFrm = list.first();
+ if ( childFrm->state() != KMdiChildFrm::Minimized )
+ {
+ if ( childFrm->state() == KMdiChildFrm::Maximized )
+ childFrm->restorePressed();
+
+ childFrm->setGeometry( childFrm->x(), 0, childFrm->width(), height() );
+ idx++;
+ }
+ list.removeFirst();
+ }
+ focusTopChild();
+}
+
+void KMdiChildArea::expandHorizontal()
+{
+ kdDebug( 760 ) << k_funcinfo << "expanding all child frames horizontally" << endl;
+ int idx = 0;
+ QPtrList<KMdiChildFrm> list( *m_pZ );
+ list.setAutoDelete( false );
+ while ( !list.isEmpty() )
+ {
+ KMdiChildFrm* childFrm = list.first();
+ if ( childFrm->state() != KMdiChildFrm::Minimized )
+ {
+ if ( childFrm->state() == KMdiChildFrm::Maximized )
+ childFrm->restorePressed();
+
+ childFrm->setGeometry( 0, childFrm->y(), width(), childFrm->height() );
+ idx++;
+ }
+ list.removeFirst();
+ }
+ focusTopChild();
+}
+
+int KMdiChildArea::getVisibleChildCount() const
+{
+ int visibleChildCount = 0;
+ QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ for ( ; ( *it ); ++it )
+ {
+ if ( ( *it )->state() != KMdiChildFrm::Minimized && ( *it )->isVisible() )
+ visibleChildCount++;
+ }
+ return visibleChildCount;
+}
+
+void KMdiChildArea::tilePragma()
+{
+ kdDebug( 760 ) << k_funcinfo << endl;
+ tileAllInternal( 9 );
+}
+
+void KMdiChildArea::tileAllInternal( int maxWnds )
+{
+ kdDebug( 760 ) << k_funcinfo << endl;
+ //NUM WINDOWS = 1,2,3,4,5,6,7,8,9
+ static int colstable[ 9 ] = { 1, 1, 1, 2, 2, 2, 3, 3, 3 }; //num columns
+ static int rowstable[ 9 ] = { 1, 2, 3, 2, 3, 3, 3, 3, 3 }; //num rows
+ static int lastwindw[ 9 ] = { 1, 1, 1, 1, 2, 1, 3, 2, 1 }; //last window multiplier
+ static int colrecall[ 9 ] = { 0, 0, 0, 3, 3, 3, 6, 6, 6 }; //adjust self
+ static int rowrecall[ 9 ] = { 0, 0, 0, 0, 4, 4, 4, 4, 4 }; //adjust self
+
+ int numVisible = getVisibleChildCount();
+ if ( numVisible < 1 )
+ {
+ kdDebug( 760 ) << k_funcinfo << "No visible child windows to tile" << endl;
+ return;
+ }
+
+ KMdiChildFrm *tcw = topChild();
+ int numToHandle = ( ( numVisible > maxWnds ) ? maxWnds : numVisible );
+
+ int xQuantum = width() / colstable[ numToHandle - 1 ];
+ int widthToCompare;
+
+ if ( tcw->minimumWidth() > m_defaultChildFrmSize.width() )
+ widthToCompare = tcw->minimumWidth();
+ else
+ widthToCompare = m_defaultChildFrmSize.width();
+
+ if ( xQuantum < widthToCompare )
+ {
+ if ( colrecall[ numToHandle - 1 ] != 0 )
+ {
+ tileAllInternal( colrecall[ numToHandle - 1 ] );
+ return ;
+ }
+ }
+
+ int yQuantum = height() / rowstable[ numToHandle - 1 ];
+ int heightToCompare;
+ if ( tcw->minimumHeight() > m_defaultChildFrmSize.height() )
+ heightToCompare = tcw->minimumHeight();
+ else
+ heightToCompare = m_defaultChildFrmSize.height();
+
+ if ( yQuantum < heightToCompare )
+ {
+ if ( rowrecall[ numToHandle - 1 ] != 0 )
+ {
+ tileAllInternal( rowrecall[ numToHandle - 1 ] );
+ return ;
+ }
+ }
+ int curX = 0;
+ int curY = 0;
+ int curRow = 1;
+ int curCol = 1;
+ int curWin = 1;
+
+ QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ for ( ; ( *it ); ++it )
+ {
+ KMdiChildFrm* child = ( *it );
+ if ( child->state() != KMdiChildFrm::Minimized )
+ {
+ //restore the window
+ if ( child->state() == KMdiChildFrm::Maximized )
+ child->restorePressed();
+
+ if ( ( curWin % numToHandle ) == 0 )
+ child->setGeometry( curX, curY, xQuantum * lastwindw[ numToHandle - 1 ], yQuantum );
+ else
+ child->setGeometry( curX, curY, xQuantum, yQuantum );
+
+ //example : 12 windows : 3 cols 3 rows
+ if ( curCol < colstable[ numToHandle - 1 ] )
+ { //curCol<3
+ curX += xQuantum; //add a column in the same row
+ curCol++; //increase current column
+ }
+ else
+ {
+ curX = 0; //new row
+ curCol = 1; //column 1
+ if ( curRow < rowstable[ numToHandle - 1 ] )
+ { //curRow<3
+ curY += yQuantum; //add a row
+ curRow++; //increase current row
+ }
+ else
+ {
+ curY = 0; //restart from beginning
+ curRow = 1; //reset current row
+ }
+ }
+ curWin++;
+ }
+ }
+
+ if ( tcw )
+ tcw->m_pClient->activate();
+}
+
+void KMdiChildArea::tileAnodine()
+{
+ KMdiChildFrm * topChildWindow = topChild();
+ int numVisible = getVisibleChildCount(); // count visible windows
+ if ( numVisible < 1 )
+ return ;
+
+ int numCols = int( sqrt( ( double ) numVisible ) ); // set columns to square root of visible count
+ // create an array to form grid layout
+ int *numRows = new int[ numCols ];
+ int numCurCol = 0;
+
+ while ( numCurCol < numCols )
+ {
+ numRows[numCurCol] = numCols; // create primary grid values
+ numCurCol++;
+ }
+
+ int numDiff = numVisible - ( numCols * numCols ); // count extra rows
+ int numCurDiffCol = numCols; // set column limiting for grid updates
+
+ while ( numDiff > 0 )
+ {
+ numCurDiffCol--;
+ numRows[numCurDiffCol]++; // add extra rows to column grid
+
+ if ( numCurDiffCol < 1 )
+ numCurDiffCol = numCols; // rotate through the grid
+
+ numDiff--;
+ }
+
+ numCurCol = 0;
+ int numCurRow = 0;
+ int curX = 0;
+ int curY = 0;
+
+ // the following code will size everything based on my grid above
+ // there is no limit to the number of windows it will handle
+ // it's great when a kick-ass theory works!!! // Pragma :)
+ int xQuantum = width() / numCols;
+ int yQuantum = height() / numRows[numCurCol];
+ QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ for ( ; ( *it ); ++it )
+ {
+ KMdiChildFrm* child = ( *it );
+ if ( child->state() != KMdiChildFrm::Minimized )
+ {
+ if ( child->state() == KMdiChildFrm::Maximized )
+ child->restorePressed();
+
+ child->setGeometry( curX, curY, xQuantum, yQuantum );
+ numCurRow++;
+ curY += yQuantum;
+
+ if ( numCurRow == numRows[numCurCol] )
+ {
+ numCurRow = 0;
+ numCurCol++;
+ curY = 0;
+ curX += xQuantum;
+ if ( numCurCol != numCols )
+ yQuantum = height() / numRows[ numCurCol ];
+ }
+ }
+ }
+
+ delete[] numRows;
+
+ if ( topChildWindow )
+ topChildWindow->m_pClient->activate();
+}
+
+
+void KMdiChildArea::tileVertically()
+{
+ KMdiChildFrm * topChildWindow = topChild();
+ int numVisible = getVisibleChildCount(); // count visible windows
+ if ( numVisible < 1 )
+ return ;
+
+ int w = width() / numVisible;
+ int lastWidth = 0;
+
+ if ( numVisible > 1 )
+ lastWidth = width() - ( w * ( numVisible - 1 ) );
+ else
+ lastWidth = w;
+
+ int h = height();
+ int posX = 0;
+ int countVisible = 0;
+
+ QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ for ( ; ( *it ); ++it )
+ {
+ KMdiChildFrm* child = ( *it );
+ if ( child->state() != KMdiChildFrm::Minimized )
+ {
+ if ( child->state() == KMdiChildFrm::Maximized )
+ child->restorePressed();
+
+ countVisible++;
+
+ if ( countVisible < numVisible )
+ {
+ child->setGeometry( posX, 0, w, h );
+ posX += w;
+ }
+ else
+ { // last visible childframe
+ child->setGeometry( posX, 0, lastWidth, h );
+ }
+ }
+ }
+
+ if ( topChildWindow )
+ topChildWindow->m_pClient->activate();
+}
+
+
+void KMdiChildArea::layoutMinimizedChildren()
+{
+ int posX = 0;
+ int posY = height();
+ QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ for ( ; ( *it ); ++it )
+ {
+ KMdiChildFrm* child = *( it );
+ if ( child->state() == KMdiChildFrm::Minimized )
+ {
+
+ if ( ( posX > 0 ) && ( posX + child->width() > width() ) )
+ {
+ posX = 0;
+ posY -= child->height();
+ }
+
+ child->move( posX, posY - child->height() );
+ posX = child->geometry().right();
+ }
+ }
+}
+
+
+void KMdiChildArea::setMdiCaptionFont( const QFont& fnt )
+{
+ m_captionFont = fnt;
+ QFontMetrics fm( m_captionFont );
+ m_captionFontLineSpacing = fm.lineSpacing();
+
+ QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ for ( ; ( *it ); ++it )
+ ( *it )->doResize();
+
+}
+
+void KMdiChildArea::setMdiCaptionActiveForeColor( const QColor& clr )
+{
+ m_captionActiveForeColor = clr;
+}
+
+void KMdiChildArea::setMdiCaptionActiveBackColor( const QColor& clr )
+{
+ m_captionActiveBackColor = clr;
+}
+
+void KMdiChildArea::setMdiCaptionInactiveForeColor( const QColor& clr )
+{
+ m_captionInactiveForeColor = clr;
+}
+
+void KMdiChildArea::setMdiCaptionInactiveBackColor( const QColor& clr )
+{
+ m_captionInactiveBackColor = clr;
+}
+
+//KDE4: remove
+void KMdiChildArea::getCaptionColors( const QPalette& /*pal*/, QColor& activeBG,
+ QColor& activeFG, QColor& inactiveBG, QColor& inactiveFG )
+{
+ activeBG = KGlobalSettings::activeTitleColor();
+ activeFG = KGlobalSettings::activeTextColor();
+ inactiveBG = KGlobalSettings::inactiveTitleColor();
+ inactiveFG = KGlobalSettings::inactiveTextColor();
+}
+
+// kate: space-indent off; replace-tabs off; tab-width 4; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildarea.h b/lib/compatibility/kmdi/qextmdi/kmdichildarea.h
new file mode 100644
index 00000000..3eaac559
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildarea.h
@@ -0,0 +1,306 @@
+//----------------------------------------------------------------------------
+// filename : kmdichildarea.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Falk Brettschneider
+// and
+// Szymon Stefanek (stefanek@tin.it)
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#ifndef _KMDI_CHILD_AREA_H_
+#define _KMDI_CHILD_AREA_H_
+
+#include <qframe.h>
+#include <qptrlist.h>
+
+#include "kmdichildfrm.h"
+#include "kmdichildview.h"
+
+class KMdiChildAreaPrivate;
+
+/**
+ * @short Internal class.
+ *
+ * The main frame widget KMdiMainFrm consists of 2 child widgets. One is this class.
+ * It's the widget where the child frames (emulated toplevel MDI views) live in.
+ * This class is the manager for the child frame widgets because it controls the
+ * Z-order widget stack of KMdiChildFrm's.
+ * It provides all placing and positioning algorithms for docked (attached) MDI views.
+ *
+ * KMdiChildArea doesn't know anything about the actual MDI views. It only knows
+ * and manages the frame widgets of attached MDI views.
+ * All actions and stuff concerning only to childframes are handled here.
+ */
+class KMDI_EXPORT KMdiChildArea : public QFrame
+{
+ friend class KMdiChildFrmCaption;
+ friend class KMdiChildFrm;
+
+Q_OBJECT
+
+ // attributes
+public:
+ /**
+ * Z Order stack of KMdiChildFrm childframe windows (top=last)
+ */
+ QPtrList<KMdiChildFrm> *m_pZ; //Auto delete enabled
+
+ /**
+ * the default size of an newly created childframe
+ */
+ QSize m_defaultChildFrmSize;
+protected:
+ /**
+ * The MDI childframe window caption font
+ */
+ QFont m_captionFont;
+
+ /**
+ * The foreground color of the active MDI childframe window caption
+ */
+ QColor m_captionActiveBackColor;
+
+ /**
+ * The background color of the active MDI childframe window captions
+ */
+ QColor m_captionActiveForeColor;
+
+ /**
+ * The foreground color of inactive MDI childframe window captions
+ */
+ QColor m_captionInactiveBackColor;
+
+ /**
+ * The background color of inactive MDI childframe window captions
+ */
+ QColor m_captionInactiveForeColor;
+
+ int m_captionFontLineSpacing;
+
+ // methods
+public:
+
+ /**
+ * Consruction. Note: This class needn't to know about KMdiMainFrm .
+ */
+ KMdiChildArea( QWidget *parent );
+
+ /**
+ * Destructor : THERE should be no child windows anymore...
+ * Howewer it simply deletes all the child widgets :)
+ */
+ ~KMdiChildArea();
+
+ /**
+ * Appends a new KMdiChildFrm to this manager.
+ * The child is shown,raised and gets focus if this window has it.
+ */
+ void manageChild( KMdiChildFrm *lpC, bool bShow = true, bool bCascade = true );
+
+ /**
+ * Destroys a managed KMdiChildFrm
+ * Also deletes the client attached to this child.
+ */
+ void destroyChild( KMdiChildFrm* child, bool focusTopChild = true );
+
+ /**
+ * Destroys a managed KMdiChildFrm
+ * Clients attached to the KMdiChildFrm are not deleted.
+ * @param child
+ */
+ void destroyChildButNotItsView( KMdiChildFrm *lpC, bool bFocusTopChild = true );
+
+ /**
+ * Brings the child @p child to the top of the stack
+ * The child is focused if @p setFocus is true. If setFocus is false, the
+ * child is just raised.
+ * @param child
+ */
+ void setTopChild( KMdiChildFrm* child, bool setFocus = false );
+
+ /**
+ * Returns the topmost child (the active one) or 0 if there are no children.
+ * Note that the topmost child may be also hidded , if ALL the windows are minimized.
+ */
+ inline KMdiChildFrm * topChild() const { return m_pZ->last(); }
+
+ /**
+ * Returns the number of visible children
+ */
+ int getVisibleChildCount() const;
+
+ /**
+ * Calculates the cascade point for the given index. If index is -1
+ * the cascade point is calculated for the window following the last window
+ * @param indexOfWindow the index of the window in relation the z-ordered window list
+ */
+ QPoint getCascadePoint( int indexOfWindow = -1 );
+
+ /**
+ * Sets the MDI childframe window caption font
+ * A relayout does not occur when using this function
+ */
+ void setMdiCaptionFont( const QFont &fnt );
+
+ /**
+ * Sets the foreground color of the active MDI childframe window caption
+ * A relayout does not occur when using this function
+ */
+ void setMdiCaptionActiveForeColor( const QColor &clr );
+
+ /**
+ * Sets the background color of the active MDI childframe window captions
+ * A relayout does not occur when using this function
+ */
+ void setMdiCaptionActiveBackColor( const QColor &clr );
+
+ /**
+ * Sets the foreground color of inactive MDI childframe window captions
+ * A relayout does not occur when using this function
+ */
+ void setMdiCaptionInactiveForeColor( const QColor &clr );
+
+ /**
+ * Sets the background color of inactive MDI childframe window captions
+ * A relayout does not occur when using this function
+ */
+ void setMdiCaptionInactiveBackColor( const QColor &clr );
+
+ /**
+ * Gets all caption colors, consistent with current WM settings
+ * (or other Desktop settings e.g. system settings for win32)
+ * This method is useful not only for KMDI child windows.
+ * Colors are returned via activeBG, activeFG, inactiveBG, inactiveFG references.
+ *
+ * @deprecated Use KGlobalSettings::activeTitleColor(), KGlobalSettings::activeTextColor(),
+ * KGlobalSettings::inactiveTitleColor() and KGlobalSettings::inactiveTextColor() instead.
+ */
+ static void getCaptionColors( const QPalette &pal, QColor &activeBG, QColor &activeFG,
+ QColor &inactiveBG, QColor &inactiveFG ) KDE_DEPRECATED;
+
+public slots:
+ /**
+ * Cascades all windows resizing them to the minimum size.
+ */
+ void cascadeWindows();
+
+ /**
+ * Cascades all windows resizing them to the maximum available size.
+ */
+ void cascadeMaximized();
+
+ /**
+ * Maximize all windows but only in vertical direction
+ */
+ void expandVertical();
+
+ /**
+ * Maximize all windows but only in horizontal direction
+ */
+ void expandHorizontal();
+
+ /**
+ * Gives focus to the topmost child if it doesn't get focus
+ * automatically or you want to wait to give it focus
+ */
+ void focusTopChild();
+
+ /**
+ * Tile Pragma
+ */
+ void tilePragma();
+
+ /**
+ * Tile Anodine
+ */
+ void tileAnodine();
+
+ /**
+ * Tile all the windows in the child area vertically
+ */
+ void tileVertically();
+
+ /**
+ * Position and layout the minimized child frames
+ */
+ void layoutMinimizedChildren();
+
+protected:
+
+ /**
+ * Internally used for the tile algorithm
+ */
+ void tileAllInternal( int maxWnds );
+
+ /**
+ * Automatically resizes a maximized MDI view and layouts the positions of minimized MDI views.
+ */
+ virtual void resizeEvent( QResizeEvent * );
+
+ /**
+ * Shows the 'Window' popup menu on right mouse button click
+ */
+ void mousePressEvent( QMouseEvent *e );
+
+ /**
+ * Internally used. Actions that are necessary when an MDI view gets minimized
+ */
+ void childMinimized( KMdiChildFrm *lpC, bool bWasMaximized );
+
+signals:
+ /**
+ * Signals that there aren't maximized child frames any more
+ */
+ void noMaximizedChildFrmLeft( KMdiChildFrm* );
+
+ /**
+ * Signals that the child frames are maximized now
+ */
+ void nowMaximized( bool );
+
+ /**
+ * Signals a KMdiMainFrm that the signal/slot connections of the system buttons in the
+ * menubar (only in Maximize mode) must be updated to another MDI view because the focused
+ * MDI view has changed
+ * @internal
+ */
+ void sysButtonConnectionsMustChange( KMdiChildFrm*, KMdiChildFrm* );
+
+ /**
+ * Signals a KMdiMainFrm that the 'Window' popup menu must be shown
+ * @internal
+ */
+ void popupWindowMenu( QPoint );
+
+ /**
+ * Signals that the last attached (docked) MDI view has been closed.
+ * Note: Detached MDI views can remain.
+ */
+ void lastChildFrmClosed();
+
+private:
+
+ KMdiChildAreaPrivate *d;
+};
+
+#endif // _KMDICHILDAREA_H_
+
+// kate: indent-mode csands; tab-width 4; auto-insert-doxygen on;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp
new file mode 100644
index 00000000..1a30a601
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp
@@ -0,0 +1,1409 @@
+//----------------------------------------------------------------------------
+// filename : kmdichildfrm.cpp
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// : 01/2003 by Jens Zurheide to allow switching
+// between views based on timestamps
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Szymon Stefanek (stefanek@tin.it)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#include "kmdichildfrm.h"
+#include "kmdichildfrm.moc"
+
+#include "kmdidefines.h"
+#include "kmdichildfrmcaption.h"
+#include "kmdichildarea.h"
+#include "kmdimainfrm.h"
+
+#include <qpainter.h>
+#include <qapplication.h>
+#include <qcursor.h>
+#include <qobjectlist.h>
+#include <qframe.h>
+#include <qpopupmenu.h>
+#include <qtoolbutton.h>
+#include <qnamespace.h>
+#include <qimage.h>
+
+#include <klocale.h>
+#include <kiconloader.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// KMdiChildFrm
+//////////////////////////////////////////////////////////////////////////////
+
+#define KMDI_NORESIZE 0
+#define KMDI_RESIZE_TOP 1
+#define KMDI_RESIZE_LEFT 2
+#define KMDI_RESIZE_RIGHT 4
+#define KMDI_RESIZE_BOTTOM 8
+#define KMDI_RESIZE_TOPLEFT (1|2)
+#define KMDI_RESIZE_TOPRIGHT (1|4)
+#define KMDI_RESIZE_BOTTOMLEFT (8|2)
+#define KMDI_RESIZE_BOTTOMRIGHT (8|4)
+
+#include "filenew.xpm"
+#include "win_closebutton.xpm"
+#include "win_minbutton.xpm"
+#include "win_maxbutton.xpm"
+#include "win_restorebutton.xpm"
+#include "win_undockbutton.xpm"
+#include "kde_closebutton.xpm"
+#include "kde_minbutton.xpm"
+#include "kde_maxbutton.xpm"
+#include "kde_restorebutton.xpm"
+#include "kde_undockbutton.xpm"
+#include "kde2_closebutton.xpm"
+#include "kde2_minbutton.xpm"
+#include "kde2_maxbutton.xpm"
+#include "kde2_restorebutton.xpm"
+#include "kde2_undockbutton.xpm"
+#include "kde2laptop_closebutton.xpm"
+#include "kde2laptop_minbutton.xpm"
+#include "kde2laptop_maxbutton.xpm"
+#include "kde2laptop_restorebutton.xpm"
+#include "kde2laptop_undockbutton.xpm"
+
+
+KMdiWin32IconButton::KMdiWin32IconButton( QWidget* parent, const char* name )
+ : QLabel( parent, name )
+{}
+
+//============ mousePressEvent ============//
+
+void KMdiWin32IconButton::mousePressEvent( QMouseEvent* )
+{
+ //emit pressed();
+}
+
+//============ KMdiChildFrm ============//
+
+KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
+ : QFrame( parent, "kmdi_childfrm" )
+ , m_pClient( 0L )
+ , m_pManager( 0L )
+ , m_pCaption( 0L )
+ , m_pWinIcon( 0L )
+ , m_pUnixIcon( 0L )
+ , m_pMinimize( 0L )
+ , m_pMaximize( 0L )
+ , m_pClose( 0L )
+ , m_pUndock( 0L )
+ , m_state( Normal )
+ , m_restoredRect()
+ , m_iResizeCorner( KMDI_NORESIZE )
+ , m_iLastCursorCorner( KMDI_NORESIZE )
+ , m_bResizing( false )
+ , m_bDragging( false )
+ , m_pIconButtonPixmap( 0L )
+ , m_pMinButtonPixmap( 0L )
+ , m_pMaxButtonPixmap( 0L )
+ , m_pRestoreButtonPixmap( 0L )
+ , m_pCloseButtonPixmap( 0L )
+ , m_pUndockButtonPixmap( 0L )
+ , m_windowMenuID( 0 )
+ , m_pSystemMenu( 0L )
+ , m_oldClientMinSize()
+ , m_oldClientMaxSize()
+ , m_oldLayoutResizeMode( QLayout::Minimum )
+{
+ m_pCaption = new KMdiChildFrmCaption( this );
+
+ m_pManager = parent;
+
+ m_pWinIcon = new KMdiWin32IconButton( m_pCaption, "kmdi_iconbutton_icon" );
+ m_pUnixIcon = new QToolButton( m_pCaption, "kmdi_toolbutton_icon" );
+ m_pMinimize = new QToolButton( m_pCaption, "kmdi_toolbutton_min" );
+ m_pMaximize = new QToolButton( m_pCaption, "kmdi_toolbutton_max" );
+ m_pClose = new QToolButton( m_pCaption, "kmdi_toolbutton_close" );
+ m_pUndock = new QToolButton( m_pCaption, "kmdi_toolbutton_undock" );
+
+ QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
+ QObject::connect( m_pMaximize, SIGNAL( clicked() ), this, SLOT( maximizePressed() ) );
+ QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closePressed() ) );
+ QObject::connect( m_pUndock, SIGNAL( clicked() ), this, SLOT( undockPressed() ) );
+
+ m_pIconButtonPixmap = new QPixmap( SmallIcon( "filenew" ) );
+ if ( m_pIconButtonPixmap->isNull() )
+ * m_pIconButtonPixmap = QPixmap( filenew );
+
+ redecorateButtons();
+
+ m_pWinIcon->setFocusPolicy( NoFocus );
+ m_pUnixIcon->setFocusPolicy( NoFocus );
+ m_pClose->setFocusPolicy( NoFocus );
+ m_pMinimize->setFocusPolicy( NoFocus );
+ m_pMaximize->setFocusPolicy( NoFocus );
+ m_pUndock->setFocusPolicy( NoFocus );
+
+ setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ setFocusPolicy( NoFocus );
+
+ setMouseTracking( true );
+
+ setMinimumSize( KMDI_CHILDFRM_MIN_WIDTH, m_pCaption->heightHint() );
+
+ m_pSystemMenu = new QPopupMenu();
+}
+
+//============ ~KMdiChildFrm ============//
+
+KMdiChildFrm::~KMdiChildFrm()
+{
+ delete m_pMinButtonPixmap;
+ delete m_pMaxButtonPixmap;
+ delete m_pRestoreButtonPixmap;
+ delete m_pCloseButtonPixmap;
+ delete m_pUndockButtonPixmap;
+ delete m_pSystemMenu;
+ delete m_pIconButtonPixmap;
+}
+
+//============ mousePressEvent =============//
+void KMdiChildFrm::mousePressEvent( QMouseEvent *e )
+{
+ if ( m_bResizing )
+ {
+ if ( QApplication::overrideCursor() )
+ QApplication::restoreOverrideCursor();
+
+ m_bResizing = false;
+ releaseMouse();
+ }
+
+ m_pCaption->setActive( true );
+ m_pManager->setTopChild( this, false );
+
+ m_iResizeCorner = getResizeCorner( e->pos().x(), e->pos().y() );
+ if ( m_iResizeCorner != KMDI_NORESIZE )
+ {
+ m_bResizing = true;
+ //notify child view
+ KMdiChildFrmResizeBeginEvent ue( e );
+ if ( m_pClient != 0L )
+ QApplication::sendEvent( m_pClient, &ue );
+ }
+}
+
+//============ mouseReleaseEvent ==============//
+
+void KMdiChildFrm::mouseReleaseEvent( QMouseEvent *e )
+{
+ if ( m_bResizing )
+ {
+ if ( QApplication::overrideCursor() )
+ QApplication::restoreOverrideCursor();
+
+ m_bResizing = false;
+ //notify child view
+ KMdiChildFrmResizeEndEvent ue( e );
+ if ( m_pClient != 0L )
+ QApplication::sendEvent( m_pClient, &ue );
+ }
+}
+
+//============= setResizeCursor ===============//
+
+void KMdiChildFrm::setResizeCursor( int resizeCorner )
+{
+ if ( resizeCorner == m_iLastCursorCorner )
+ return ; //Don't do it twice
+
+ m_iLastCursorCorner = resizeCorner;
+ switch ( resizeCorner )
+ {
+ case KMDI_NORESIZE:
+ if ( QApplication::overrideCursor() )
+ QApplication::restoreOverrideCursor();
+ break;
+ case KMDI_RESIZE_LEFT:
+ case KMDI_RESIZE_RIGHT:
+ QApplication::setOverrideCursor( Qt::sizeHorCursor, true );
+ break;
+ case KMDI_RESIZE_TOP:
+ case KMDI_RESIZE_BOTTOM:
+ QApplication::setOverrideCursor( Qt::sizeVerCursor, true );
+ break;
+ case KMDI_RESIZE_TOPLEFT:
+ case KMDI_RESIZE_BOTTOMRIGHT:
+ QApplication::setOverrideCursor( Qt::sizeFDiagCursor, true );
+ break;
+ case KMDI_RESIZE_BOTTOMLEFT:
+ case KMDI_RESIZE_TOPRIGHT:
+ QApplication::setOverrideCursor( Qt::sizeBDiagCursor, true );
+ break;
+ }
+}
+
+//============= unsetResizeCursor ===============//
+
+void KMdiChildFrm::unsetResizeCursor()
+{
+ if ( !m_bResizing && m_iResizeCorner != KMDI_NORESIZE )
+ {
+ m_iResizeCorner = KMDI_NORESIZE;
+ m_iLastCursorCorner = KMDI_NORESIZE;
+ if ( QApplication::overrideCursor() )
+ QApplication::restoreOverrideCursor();
+ }
+}
+
+//============= mouseMoveEvent ===============//
+
+void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e )
+{
+ if ( m_state != Normal )
+ return;
+
+ if ( !m_pClient )
+ return;
+
+ if ( m_pClient->minimumSize() == m_pClient->maximumSize() )
+ return;
+
+ if ( m_bResizing )
+ {
+ if ( !( e->state() & RightButton ) && !( e->state() & MidButton ) )
+ {
+ // same as: if no button or left button pressed
+ QPoint p = parentWidget()->mapFromGlobal( e->globalPos() );
+ resizeWindow( m_iResizeCorner, p.x(), p.y() );
+ }
+ else
+ m_bResizing = false;
+ }
+ else
+ {
+ m_iResizeCorner = getResizeCorner( e->pos().x(), e->pos().y() );
+ setResizeCursor( m_iResizeCorner );
+ }
+}
+
+//============= moveEvent ===============//
+
+void KMdiChildFrm::moveEvent( QMoveEvent* me )
+{
+ // give its child view the chance to notify a childframe move
+ KMdiChildFrmMoveEvent cfme( me );
+ if ( m_pClient != 0L )
+ QApplication::sendEvent( m_pClient, &cfme );
+}
+
+//=============== leaveEvent ===============//
+
+void KMdiChildFrm::leaveEvent( QEvent * )
+{
+ unsetResizeCursor();
+}
+
+void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos )
+{
+ QRect resizeRect( x(), y(), width(), height() );
+
+ // Calculate the minimum width & height
+ int minWidth = 0;
+ int minHeight = 0;
+ int maxWidth = QWIDGETSIZE_MAX;
+ int maxHeight = QWIDGETSIZE_MAX;
+
+ // it could be the client forces the childframe to enlarge its minimum size
+ if ( m_pClient )
+ {
+ minWidth = m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER;
+ minHeight = m_pClient->minimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER +
+ m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR;
+ maxWidth = m_pClient->maximumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER;
+ maxHeight = m_pClient->maximumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER +
+ m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR;
+ }
+
+ if ( minWidth < minimumWidth() )
+ minWidth = minimumWidth();
+
+ if ( minHeight < minimumHeight() )
+ minHeight = minimumHeight();
+
+ if ( maxWidth > maximumWidth() )
+ maxWidth = maximumWidth();
+
+ if ( maxHeight > maximumHeight() )
+ maxHeight = maximumHeight();
+
+ QPoint mousePos( xPos, yPos );
+
+ // manipulate width
+ switch ( resizeCorner )
+ {
+ //left sides
+ case KMDI_RESIZE_TOPLEFT:
+ case KMDI_RESIZE_LEFT:
+ case KMDI_RESIZE_BOTTOMLEFT:
+ resizeRect.setLeft( mousePos.x() );
+ if ( resizeRect.width() < minWidth )
+ resizeRect.setLeft( resizeRect.right() - minWidth + 1 );
+ if ( resizeRect.width() > maxWidth )
+ resizeRect.setLeft( resizeRect.right() - maxWidth + 1 );
+ break;
+ //right sides
+ case KMDI_RESIZE_TOPRIGHT:
+ case KMDI_RESIZE_RIGHT:
+ case KMDI_RESIZE_BOTTOMRIGHT:
+ resizeRect.setRight( mousePos.x() );
+ if ( resizeRect.width() < minWidth )
+ resizeRect.setRight( resizeRect.left() + minWidth - 1 );
+ if ( resizeRect.width() > maxWidth )
+ resizeRect.setRight( resizeRect.left() + maxWidth - 1 );
+ break;
+ default:
+ break;
+ }
+
+ // manipulate height
+ switch ( resizeCorner )
+ {
+ case KMDI_RESIZE_TOPLEFT:
+ case KMDI_RESIZE_TOP:
+ case KMDI_RESIZE_TOPRIGHT:
+ resizeRect.setTop( mousePos.y() );
+ if ( resizeRect.height() < minHeight )
+ resizeRect.setTop( resizeRect.bottom() - minHeight + 1 );
+ if ( resizeRect.height() > maxHeight )
+ resizeRect.setTop( resizeRect.bottom() - maxHeight + 1 );
+ break;
+ case KMDI_RESIZE_BOTTOMLEFT:
+ case KMDI_RESIZE_BOTTOM:
+ case KMDI_RESIZE_BOTTOMRIGHT:
+ resizeRect.setBottom( mousePos.y() );
+ if ( resizeRect.height() < minHeight )
+ resizeRect.setBottom( resizeRect.top() + minHeight - 1 );
+ if ( resizeRect.height() > maxHeight )
+ resizeRect.setBottom( resizeRect.top() + maxHeight - 1 );
+ break;
+ default:
+ // nothing to do
+ break;
+ }
+ // actually resize
+ setGeometry( resizeRect );
+
+ if ( m_state == Maximized )
+ {
+ m_state = Normal;
+ m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
+ }
+}
+
+//================= getResizeCorner =============//
+
+int KMdiChildFrm::getResizeCorner( int ax, int ay )
+{
+ int ret = KMDI_NORESIZE;
+ if ( m_pClient->minimumWidth() != m_pClient->maximumWidth() )
+ {
+ if ( ( ax > 0 ) && ( ax < ( KMDI_CHILDFRM_BORDER + 2 ) ) )
+ ret |= KMDI_RESIZE_LEFT;
+
+ if ( ( ax < width() ) && ( ax > ( width() - ( KMDI_CHILDFRM_BORDER + 2 ) ) ) )
+ ret |= KMDI_RESIZE_RIGHT;
+ }
+ if ( m_pClient->minimumHeight() != m_pClient->maximumHeight() )
+ {
+ if ( ( ay > 0 ) && ( ay < ( KMDI_CHILDFRM_BORDER + 2 ) ) )
+ ret |= KMDI_RESIZE_TOP;
+
+ if ( ( ay < ( height() ) ) && ( ay > ( height() - ( KMDI_CHILDFRM_BORDER + 2 ) ) ) )
+ ret |= KMDI_RESIZE_BOTTOM;
+ }
+ return ret;
+}
+
+//============= maximizePressed ============//
+
+void KMdiChildFrm::maximizePressed()
+{
+ switch ( m_state )
+ {
+ case Maximized:
+ emit m_pManager->nowMaximized( false );
+ setState( Normal );
+ break;
+ case Normal:
+ case Minimized:
+ setState( Maximized );
+ emit m_pManager->nowMaximized( true );
+ break;
+ }
+}
+
+void KMdiChildFrm::restorePressed()
+{
+ if ( m_state == Normal )
+ return ;
+
+ if ( m_state == Maximized )
+ emit m_pManager->nowMaximized( false );
+
+ setState( Normal );
+}
+
+//============= minimizePressed ============//
+
+void KMdiChildFrm::minimizePressed()
+{
+ switch ( m_state )
+ {
+ case Minimized:
+ setState( Normal );
+ break;
+ case Normal:
+ setState( Minimized );
+ break;
+ case Maximized:
+ emit m_pManager->nowMaximized( false );
+ setState( Normal );
+ setState( Minimized );
+ break;
+ }
+}
+
+//============= closePressed ============//
+
+void KMdiChildFrm::closePressed()
+{
+ if ( m_pClient )
+ m_pClient->close();
+}
+
+//============= undockPressed ============//
+
+void KMdiChildFrm::undockPressed()
+{
+ if ( m_pClient )
+ {
+ if ( m_state == Minimized )
+ setState( Normal );
+ m_pClient->detach();
+ }
+}
+
+//============ setState =================//
+
+void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
+{
+ if ( m_state == Normal ) //save the current rect
+ m_restoredRect = QRect( x(), y(), width(), height() );
+
+ switch ( state )
+ {
+ case Normal:
+ switch ( m_state )
+ {
+ case Maximized:
+ m_pClient->m_stateChanged = true;
+ m_state = state;
+ // client min / max size / layout behavior don't change
+ // set frame max size indirectly by setting the clients max size to
+ // it's current value (calls setMaxSize() of frame)
+ m_pClient->setMaximumSize( m_pClient->maximumSize().width(), m_pClient->maximumSize().height() );
+ m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
+ setGeometry( m_restoredRect );
+ break;
+ case Minimized:
+ m_pClient->m_stateChanged = true;
+ m_state = state;
+ // restore client min / max size / layout behavior
+ m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() );
+ m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() );
+ if ( m_pClient->layout() != 0L )
+ {
+ m_pClient->layout() ->setResizeMode( m_oldLayoutResizeMode );
+ }
+ m_pMinimize->setPixmap( *m_pMinButtonPixmap );
+ m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
+ QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
+ QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
+ setGeometry( m_restoredRect );
+ break;
+ case Normal:
+ break;
+ }
+ break;
+ case Maximized:
+ switch ( m_state )
+ {
+ case Minimized:
+ {
+ m_pClient->m_stateChanged = true;
+ m_state = state;
+ // restore client min / max size / layout behavior
+ m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() );
+ m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() );
+ if ( m_pClient->layout() != 0L )
+ {
+ m_pClient->layout() ->setResizeMode( m_oldLayoutResizeMode );
+ }
+ setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
+ // reset to maximize-captionbar
+ m_pMaximize->setPixmap( *m_pRestoreButtonPixmap );
+ m_pMinimize->setPixmap( *m_pMinButtonPixmap );
+ QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
+ QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
+ int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER;
+ int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR +
+ m_pCaption->heightHint();
+ setGeometry( -m_pClient->x(), -m_pClient->y(),
+ m_pManager->width() + nFrameWidth,
+ m_pManager->height() + nFrameHeight );
+ raise();
+ }
+ break;
+ case Normal:
+ {
+ m_pClient->m_stateChanged = true;
+ m_state = state;
+ // client min / max size / layout behavior don't change
+ setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
+ m_pMaximize->setPixmap( *m_pRestoreButtonPixmap );
+ int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER;
+ int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR +
+ m_pCaption->heightHint();
+ QRect maximizedFrmRect( -m_pClient->x(), -m_pClient->y(),
+ m_pManager->width() + nFrameWidth,
+ m_pManager->height() + nFrameHeight );
+ if ( geometry() != maximizedFrmRect )
+ {
+ setGeometry( maximizedFrmRect );
+ }
+ raise();
+ }
+ break;
+ case Maximized:
+ break;
+ }
+ break;
+ case Minimized:
+ switch ( m_state )
+ {
+ case Maximized:
+ m_pClient->m_stateChanged = true;
+ m_state = state;
+ // save client min / max size / layout behavior
+ m_oldClientMinSize = m_pClient->minimumSize();
+ m_oldClientMaxSize = m_pClient->maximumSize();
+ if ( m_pClient->layout() != 0L )
+ {
+ m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode();
+ }
+ m_pClient->setMinimumSize( 0, 0 );
+ m_pClient->setMaximumSize( 0, 0 );
+ if ( m_pClient->layout() != 0L )
+ {
+ m_pClient->layout() ->setResizeMode( QLayout::FreeResize );
+ }
+ switchToMinimizeLayout();
+ m_pManager->childMinimized( this, true );
+ break;
+ case Normal:
+ m_pClient->m_stateChanged = true;
+ m_state = state;
+ // save client min / max size / layout behavior
+ m_oldClientMinSize = m_pClient->minimumSize();
+ m_oldClientMaxSize = m_pClient->maximumSize();
+ if ( m_pClient->layout() != 0L )
+ {
+ m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode();
+ }
+ m_restoredRect = geometry();
+ m_pClient->setMinimumSize( 0, 0 );
+ m_pClient->setMaximumSize( 0, 0 );
+ if ( m_pClient->layout() != 0L )
+ {
+ m_pClient->layout() ->setResizeMode( QLayout::FreeResize );
+ }
+ switchToMinimizeLayout();
+ m_pManager->childMinimized( this, false );
+ break;
+ case Minimized:
+ break;
+ }
+ break;
+ }
+
+ KMdiChildFrm* pTopFrame = m_pManager->topChild();
+ KMdiChildView* pTopChild = 0L;
+ if ( pTopFrame != 0L )
+ {
+ pTopChild = pTopFrame->m_pClient;
+ }
+ if ( ( pTopChild != 0L ) && pTopChild->isMaximized() )
+ {
+ m_pManager->setMinimumSize( pTopChild->minimumWidth(), pTopChild->minimumHeight() );
+ /// @todo: setting the maximum size doesn't work properly - fix this later
+ /// m_pManager->setMaximumSize(pTopChild->maximumWidth(), pTopChild->maximumHeight());
+ }
+ else
+ {
+ m_pManager->setMinimumSize( 0, 0 );
+ m_pManager->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
+ }
+}
+
+//============== restoreGeometry ================//
+
+QRect KMdiChildFrm::restoreGeometry() const
+{
+ return m_restoredRect;
+}
+
+//============== setRestoreGeometry ================//
+
+void KMdiChildFrm::setRestoreGeometry( const QRect& newRestGeo )
+{
+ m_restoredRect = newRestGeo;
+}
+
+//============ setCaption ===============//
+
+void KMdiChildFrm::setCaption( const QString& text )
+{
+ m_pCaption->setCaption( text );
+}
+
+//============ enableClose ==============//
+
+void KMdiChildFrm::enableClose( bool bEnable )
+{
+ m_pClose->setEnabled( bEnable );
+ m_pClose->repaint( false );
+}
+
+//============ setIcon ==================//
+
+void KMdiChildFrm::setIcon( const QPixmap& pxm )
+{
+ QPixmap p = pxm;
+ if ( p.width() != 18 || p.height() != 18 )
+ {
+ QImage img = p.convertToImage();
+ p = img.smoothScale( 18, 18, QImage::ScaleMin );
+ }
+ const bool do_resize = m_pIconButtonPixmap->size() != p.size();
+ *m_pIconButtonPixmap = p;
+ m_pWinIcon->setPixmap( p );
+ m_pUnixIcon->setPixmap( p );
+ if ( do_resize )
+ doResize( true );
+}
+
+//============ icon =================//
+
+QPixmap* KMdiChildFrm::icon() const
+{
+ return m_pIconButtonPixmap;
+}
+
+//============ setClient ============//
+void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
+{
+ m_pClient = w;
+
+ if ( w->icon() )
+ setIcon( *( w->icon() ) );
+
+ //resize to match the client
+ int clientYPos = m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_BORDER;
+ if ( bAutomaticResize || w->size().isEmpty() || ( w->size() == QSize( 1, 1 ) ) )
+ {
+ if ( m_pManager->topChild() )
+ {
+ resize( m_pManager->topChild() ->size() );
+ }
+ else
+ {
+ resize( m_pManager->m_defaultChildFrmSize.width() + KMDI_CHILDFRM_DOUBLE_BORDER,
+ m_pManager->m_defaultChildFrmSize.height() + KMDI_CHILDFRM_BORDER + clientYPos );
+ }
+ }
+ else
+ {
+ resize( w->width() + KMDI_CHILDFRM_DOUBLE_BORDER, w->height() + KMDI_CHILDFRM_BORDER + clientYPos );
+ }
+
+ // memorize the focuses in a dictionary because they will get lost during reparenting
+ QDict<FocusPolicy>* pFocPolDict = new QDict<FocusPolicy>;
+ pFocPolDict->setAutoDelete( true );
+ QObjectList *list = m_pClient->queryList( "QWidget" );
+ QObjectListIt it( *list ); // iterate over the buttons
+ QObject * obj;
+ int i = 1;
+ while ( ( obj = it.current() ) != 0 )
+ { // for each found object...
+ ++it;
+ QWidget* widg = ( QWidget* ) obj;
+ if ( widg->name( 0 ) == 0 )
+ {
+ QString tmpStr;
+ tmpStr.setNum( i );
+ tmpStr = "unnamed" + tmpStr;
+ widg->setName( tmpStr.latin1() );
+ i++;
+ }
+ FocusPolicy* pFocPol = new FocusPolicy;
+ *pFocPol = widg->focusPolicy();
+ pFocPolDict->insert( widg->name(), pFocPol );
+ }
+ delete list; // delete the list, not the objects
+
+ //Reparent if needed
+ if ( w->parent() != this )
+ {
+ //reparent to this widget , no flags , point , show it
+ QPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos );
+ QSize mincs = w->minimumSize();
+ QSize maxcs = w->maximumSize();
+ w->setMinimumSize( 0, 0 );
+ w->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
+
+ // min/max sizes, flags, DND get lost. :-(
+ w->reparent( this, 0, pnt2, w->isVisible() );
+
+ w->setMinimumSize( mincs.width(), mincs.height() );
+ w->setMaximumSize( maxcs.width(), maxcs.height() );
+ }
+ else
+ w->move( KMDI_CHILDFRM_BORDER, clientYPos );
+
+ linkChildren( pFocPolDict );
+
+ QObject::connect( m_pClient, SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, SIGNAL( nowMaximized( bool ) ) );
+
+ if ( m_pClient->minimumWidth() > m_pManager->m_defaultChildFrmSize.width() )
+ setMinimumWidth( m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER );
+
+ if ( m_pClient->minimumHeight() > m_pManager->m_defaultChildFrmSize.height() )
+ {
+ setMinimumHeight( m_pClient->minimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER +
+ m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR );
+ }
+}
+
+//============ unsetClient ============//
+
+void KMdiChildFrm::unsetClient( QPoint positionOffset )
+{
+ if ( !m_pClient )
+ return ;
+
+ QObject::disconnect( m_pClient, SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, SIGNAL( nowMaximized( bool ) ) );
+
+ //reparent to desktop widget , no flags , point , show it
+ QDict<FocusPolicy>* pFocPolDict;
+ pFocPolDict = unlinkChildren();
+
+ // get name of focused child widget
+ QWidget* focusedChildWidget = m_pClient->focusedChildWidget();
+ const char* nameOfFocusedWidget = "";
+ if ( focusedChildWidget != 0 )
+ nameOfFocusedWidget = focusedChildWidget->name();
+
+ QSize mins = m_pClient->minimumSize();
+ QSize maxs = m_pClient->maximumSize();
+ m_pClient->reparent( 0, 0, mapToGlobal( pos() ) - pos() + positionOffset, isVisible() );
+ m_pClient->setMinimumSize( mins.width(), mins.height() );
+ m_pClient->setMaximumSize( maxs.width(), maxs.height() );
+
+ // remember the focus policies using the dictionary and reset them
+ QObjectList *list = m_pClient->queryList( "QWidget" );
+ QObjectListIt it( *list ); // iterate over all child widgets of child frame
+ QObject * obj;
+ QWidget* firstFocusableChildWidget = 0;
+ QWidget* lastFocusableChildWidget = 0;
+ while ( ( obj = it.current() ) != 0 )
+ { // for each found object...
+ QWidget * widg = ( QWidget* ) obj;
+ ++it;
+ FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
+ if ( pFocPol )
+ widg->setFocusPolicy( *pFocPol );
+
+ // reset focus to old position (doesn't work :-( for its own unexplicable reasons)
+ if ( widg->name() == nameOfFocusedWidget )
+ widg->setFocus();
+
+ // get first and last focusable widget
+ if ( ( widg->focusPolicy() == QWidget::StrongFocus ) || ( widg->focusPolicy() == QWidget::TabFocus ) )
+ {
+ if ( firstFocusableChildWidget == 0 )
+ firstFocusableChildWidget = widg; // first widget
+ lastFocusableChildWidget = widg; // last widget
+
+ }
+ else
+ {
+ if ( widg->focusPolicy() == QWidget::WheelFocus )
+ {
+ if ( firstFocusableChildWidget == 0 )
+ firstFocusableChildWidget = widg; // first widget
+ lastFocusableChildWidget = widg; // last widget
+ //qDebug("*** %s (%s)",widg->name(),widg->className());
+ }
+ }
+ }
+ delete list; // delete the list, not the objects
+ delete pFocPolDict;
+
+ // reset first and last focusable widget
+ m_pClient->setFirstFocusableChildWidget( firstFocusableChildWidget );
+ m_pClient->setLastFocusableChildWidget( lastFocusableChildWidget );
+
+ // reset the focus policy of the view
+ m_pClient->setFocusPolicy( QWidget::ClickFocus );
+
+ // lose information about the view (because it's undocked now)
+ m_pClient = 0;
+}
+
+//============== linkChildren =============//
+void KMdiChildFrm::linkChildren( QDict<FocusPolicy>* pFocPolDict )
+{
+ // reset the focus policies for all widgets in the view (take them from the dictionary)
+ QObjectList* list = m_pClient->queryList( "QWidget" );
+ QObjectListIt it( *list ); // iterate over all child widgets of child frame
+ QObject* obj;
+ while ( ( obj = it.current() ) != 0 )
+ { // for each found object...
+ QWidget* widg = ( QWidget* ) obj;
+ ++it;
+ FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
+
+ if ( pFocPol != 0 )
+ widg->setFocusPolicy( *pFocPol );
+
+ if ( !( widg->inherits( "QPopupMenu" ) ) )
+ widg->installEventFilter( this );
+
+ }
+ delete list; // delete the list, not the objects
+ delete pFocPolDict;
+
+ // reset the focus policies for the rest
+ m_pWinIcon->setFocusPolicy( QWidget::NoFocus );
+ m_pUnixIcon->setFocusPolicy( QWidget::NoFocus );
+ m_pClient->setFocusPolicy( QWidget::ClickFocus );
+ m_pCaption->setFocusPolicy( QWidget::NoFocus );
+ m_pUndock->setFocusPolicy( QWidget::NoFocus );
+ m_pMinimize->setFocusPolicy( QWidget::NoFocus );
+ m_pMaximize->setFocusPolicy( QWidget::NoFocus );
+ m_pClose->setFocusPolicy( QWidget::NoFocus );
+
+ // install the event filter (catch mouse clicks) for the rest
+ m_pWinIcon->installEventFilter( this );
+ m_pUnixIcon->installEventFilter( this );
+ m_pCaption->installEventFilter( this );
+ m_pUndock->installEventFilter( this );
+ m_pMinimize->installEventFilter( this );
+ m_pMaximize->installEventFilter( this );
+ m_pClose->installEventFilter( this );
+ m_pClient->installEventFilter( this );
+ // m_pClient->installEventFilterForAllChildren();
+}
+
+//============== unlinkChildren =============//
+
+QDict<QWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
+{
+ // memorize the focuses in a dictionary because they will get lost during reparenting
+ QDict<FocusPolicy>* pFocPolDict = new QDict<FocusPolicy>;
+ pFocPolDict->setAutoDelete( true );
+
+ QObjectList *list = m_pClient->queryList( "QWidget" );
+ QObjectListIt it( *list ); // iterate over all child widgets of child frame
+ QObject * obj;
+ int i = 1;
+ while ( ( obj = it.current() ) != 0 )
+ { // for each found object...
+ ++it;
+ QWidget* w = ( QWidget* ) obj;
+ // get current widget object name
+ if ( w->name( 0 ) == 0 )
+ {
+ QString tmpStr;
+ tmpStr.setNum( i );
+ tmpStr = "unnamed" + tmpStr;
+ w->setName( tmpStr.latin1() );
+ i++;
+ }
+ FocusPolicy* pFocPol = new FocusPolicy;
+ *pFocPol = w->focusPolicy();
+ // memorize focus policy
+ pFocPolDict->insert( w->name(), pFocPol );
+ // remove event filter
+ ( ( QWidget* ) obj ) ->removeEventFilter( this );
+ }
+ delete list; // delete the list, not the objects
+
+ // remove the event filter (catch mouse clicks) for the rest
+ m_pWinIcon->removeEventFilter( this );
+ m_pUnixIcon->removeEventFilter( this );
+ m_pCaption->removeEventFilter( this );
+ m_pUndock->removeEventFilter( this );
+ m_pMinimize->removeEventFilter( this );
+ m_pMaximize->removeEventFilter( this );
+ m_pClose->removeEventFilter( this );
+ m_pClient->removeEventFilter( this );
+
+ //SCHEDULED_FOR_REMOVE m_pClient->removeEventFilterForAllChildren();
+
+ return pFocPolDict;
+}
+
+//============== resizeEvent ===============//
+
+void KMdiChildFrm::resizeEvent( QResizeEvent * )
+{
+ doResize(); // an extra method because it can also called directly
+}
+
+void KMdiChildFrm::doResize()
+{
+ doResize( false );
+}
+
+void KMdiChildFrm::doResize( bool captionOnly )
+{
+ //Resize the caption
+ int captionHeight = m_pCaption->heightHint();
+ int captionWidth = width() - KMDI_CHILDFRM_DOUBLE_BORDER;
+ int buttonHeight = m_pClose->pixmap() ->height();
+ int buttonWidth = m_pClose->pixmap() ->width();
+ int heightOffset = captionHeight / 2 - buttonHeight / 2;
+ int rightOffset1 = 1;
+ int rightOffset2 = 1;
+ int frmIconHeight = m_pWinIcon->pixmap() ->height();
+ int frmIconWidth = m_pWinIcon->pixmap() ->width();
+ int frmIconOffset = 1;
+ QWidget* pIconWidget = m_pWinIcon;
+ m_pCaption->setGeometry( KMDI_CHILDFRM_BORDER, KMDI_CHILDFRM_BORDER, captionWidth, captionHeight );
+
+ //The buttons are caption children
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
+ {
+ rightOffset2 += 2;
+ m_pUnixIcon->hide();
+ }
+ else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDE1Look )
+ {
+ buttonWidth += 4;
+ buttonHeight += 4;
+ heightOffset -= 2;
+ rightOffset1 = 0;
+ rightOffset2 = 0;
+ m_pWinIcon->hide();
+ frmIconHeight = buttonHeight;
+ frmIconWidth = buttonWidth;
+ frmIconOffset = 0;
+ pIconWidget = m_pUnixIcon;
+ }
+ else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDELook )
+ {
+ buttonWidth += 3;
+ buttonHeight += 3;
+ heightOffset -= 1;
+ m_pUnixIcon->hide();
+ }
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::KDELaptopLook )
+ {
+ pIconWidget->setGeometry( frmIconOffset, captionHeight / 2 - frmIconHeight / 2, frmIconWidth, frmIconHeight );
+ m_pClose->setGeometry( ( captionWidth - buttonWidth ) - rightOffset1, heightOffset, buttonWidth, buttonHeight );
+ m_pMaximize->setGeometry( ( captionWidth - ( buttonWidth * 2 ) ) - rightOffset2, heightOffset, buttonWidth, buttonHeight );
+ m_pMinimize->setGeometry( ( captionWidth - ( buttonWidth * 3 ) ) - rightOffset2, heightOffset, buttonWidth, buttonHeight );
+ m_pUndock->setGeometry( ( captionWidth - ( buttonWidth * 4 ) ) - rightOffset2, heightOffset, buttonWidth, buttonHeight );
+ }
+ else
+ { // KDELaptopLook
+ m_pWinIcon->hide();
+ m_pUnixIcon->hide();
+ buttonHeight += 5;
+ heightOffset -= 2;
+ m_pClose->setGeometry ( 0, heightOffset, 27, buttonHeight );
+ m_pMaximize->setGeometry( captionWidth - 27, heightOffset, 27, buttonHeight );
+ m_pMinimize->setGeometry( captionWidth - 27 * 2, heightOffset, 27, buttonHeight );
+ m_pUndock->setGeometry ( captionWidth - 27 * 3, heightOffset, 27, buttonHeight );
+ }
+
+ //Resize the client
+ if ( !captionOnly && m_pClient )
+ {
+ QSize newClientSize( captionWidth,
+ height() - ( KMDI_CHILDFRM_DOUBLE_BORDER + captionHeight + KMDI_CHILDFRM_SEPARATOR ) );
+ if ( newClientSize != m_pClient->size() )
+ {
+ m_pClient->setGeometry( KMDI_CHILDFRM_BORDER,
+ m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_BORDER,
+ newClientSize.width(), newClientSize.height() );
+ }
+ }
+}
+
+static bool hasParent( QObject* par, QObject* o )
+{
+ while ( o && o != par )
+ o = o->parent();
+ return o == par;
+}
+
+//============= eventFilter ===============//
+
+bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
+{
+ switch ( e->type() )
+ {
+ case QEvent::Enter:
+ {
+ // check if the receiver is really a child of this frame
+ bool bIsChild = false;
+ QObject* pObj = obj;
+ while ( ( pObj != 0L ) && !bIsChild )
+ {
+ bIsChild = ( pObj == this );
+ pObj = pObj->parent();
+ }
+ // unset the resize cursor if the cursor moved from the frame into a inner widget
+ if ( bIsChild )
+ unsetResizeCursor();
+ }
+ break;
+ case QEvent::MouseButtonPress:
+ {
+ if ( !hasParent( m_pClient, obj ) )
+ {
+ bool bIsSecondClick = false;
+ if ( m_timeMeasure.elapsed() <= QApplication::doubleClickInterval() )
+ bIsSecondClick = true; // of a possible double click
+
+ if ( !( ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) && bIsSecondClick ) )
+ {
+ // in case we didn't click on the icon button
+ QFocusEvent* pFE = new QFocusEvent( QFocusEvent::FocusIn );
+ QApplication::sendEvent( qApp->mainWidget(), pFE );
+ if ( m_pClient )
+ {
+ m_pClient->updateTimeStamp();
+ m_pClient->activate();
+ }
+
+ if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) )
+ {
+ QWidget* w = ( QWidget* ) obj;
+ if ( ( w->focusPolicy() == QWidget::ClickFocus ) || ( w->focusPolicy() == QWidget::StrongFocus ) )
+ {
+ w->setFocus();
+ }
+ }
+ }
+ if ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) )
+ {
+ // in case we clicked on the icon button
+ if ( m_timeMeasure.elapsed() > QApplication::doubleClickInterval() )
+ {
+ showSystemMenu();
+ m_timeMeasure.start();
+ }
+ else
+ closePressed(); // double click on icon button closes the view
+
+ return true;
+ }
+ }
+ }
+ break;
+ case QEvent::Resize:
+ {
+ if ( ( ( QWidget* ) obj == m_pClient ) && ( m_state == Normal ) )
+ {
+ QResizeEvent* re = ( QResizeEvent* ) e;
+ int captionHeight = m_pCaption->heightHint();
+ QSize newChildFrmSize( re->size().width() + KMDI_CHILDFRM_DOUBLE_BORDER,
+ re->size().height() + captionHeight + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_DOUBLE_BORDER );
+ if ( newChildFrmSize != size() )
+ resize( newChildFrmSize );
+ }
+ }
+ break;
+ case QEvent::ChildRemoved:
+ {
+ // if we lost a child we uninstall ourself as event filter for the lost
+ // child and its children
+ QObject* pLostChild = ( ( QChildEvent* ) e )->child();
+ if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("QWidget"))*/ )
+ {
+ QObjectList* list = pLostChild->queryList();
+ list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
+ QObjectListIt it( *list ); // iterate over all lost child widgets
+ QObject* obj;
+ while ( ( obj = it.current() ) != 0 )
+ { // for each found object...
+ QWidget* widg = ( QWidget* ) obj;
+ ++it;
+ widg->removeEventFilter( this );
+ }
+ delete list; // delete the list, not the objects
+ }
+ }
+ break;
+ case QEvent::ChildInserted:
+ {
+ // if we got a new child we install ourself as event filter for the new
+ // child and its children (as we did when we got our client).
+ // XXX see linkChildren() and focus policy stuff
+ QObject* pNewChild = ( ( QChildEvent* ) e ) ->child();
+ if ( ( pNewChild != 0L ) && ::qt_cast<QWidget*>( pNewChild ) )
+ {
+ QWidget * pNewWidget = static_cast<QWidget*>( pNewChild );
+ QObjectList *list = pNewWidget->queryList( "QWidget" );
+ list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
+ QObjectListIt it( *list ); // iterate over all new child widgets
+ QObject * obj;
+ while ( ( obj = it.current() ) != 0 )
+ { // for each found object...
+ QWidget * widg = ( QWidget* ) obj;
+ ++it;
+ if ( !::qt_cast<QPopupMenu*>( widg ) )
+ {
+ widg->installEventFilter( this );
+ }
+ }
+ delete list; // delete the list, not the objects
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return false; // standard event processing (see Qt documentation)
+}
+
+//============= raiseAndActivate ===============//
+
+void KMdiChildFrm::raiseAndActivate()
+{
+ m_pCaption->setActive( true );
+ m_pManager->setTopChild( this, false ); //Do not focus by now...
+}
+
+//============= setMinimumSize ===============//
+
+void KMdiChildFrm::setMinimumSize ( int minw, int minh )
+{
+ QWidget::setMinimumSize( minw, minh );
+ if ( m_state == Maximized )
+ {
+ m_pManager->setMinimumSize( minw, minh );
+ }
+}
+
+//============= systemMenu ===============//
+
+QPopupMenu* KMdiChildFrm::systemMenu() const
+{
+ if ( m_pSystemMenu == 0 )
+ return 0;
+
+ m_pSystemMenu->clear();
+
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
+ {
+ m_pSystemMenu->insertItem( i18n( "&Restore" ), this, SLOT( restorePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Move" ), m_pCaption, SLOT( slot_moveViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "R&esize" ), this, SLOT( slot_resizeViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "M&inimize" ), this, SLOT( minimizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "M&aximize" ), this, SLOT( maximizePressed() ) );
+ if ( state() == Normal )
+ m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 0 ), false );
+ else if ( state() == Maximized )
+ {
+ m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 1 ), false );
+ m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 2 ), false );
+ m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 4 ), false );
+ }
+ else if ( state() == Minimized )
+ {
+ m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 2 ), false );
+ m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 3 ), false );
+ }
+ }
+ else
+ {
+ if ( state() != Normal )
+ m_pSystemMenu->insertItem( i18n( "&Restore" ), this, SLOT( restorePressed() ) );
+ if ( state() != Maximized )
+ m_pSystemMenu->insertItem( i18n( "&Maximize" ), this, SLOT( maximizePressed() ) );
+ if ( state() != Minimized )
+ m_pSystemMenu->insertItem( i18n( "&Minimize" ), this, SLOT( minimizePressed() ) );
+ if ( state() != Maximized )
+ m_pSystemMenu->insertItem( i18n( "M&ove" ), m_pCaption, SLOT( slot_moveViaSystemMenu() ) );
+ if ( state() == Normal )
+ m_pSystemMenu->insertItem( i18n( "&Resize" ), this, SLOT( slot_resizeViaSystemMenu() ) );
+ }
+
+ m_pSystemMenu->insertItem( i18n( "&Undock" ), this, SLOT( undockPressed() ) );
+ m_pSystemMenu->insertSeparator();
+ m_pSystemMenu->insertItem( i18n( "&Close" ), this, SLOT( closePressed() ) );
+
+ return m_pSystemMenu;
+}
+
+/** Shows a system menu for child frame windows. */
+void KMdiChildFrm::showSystemMenu()
+{
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
+ m_pUnixIcon->setDown( false );
+
+ QPoint popupmenuPosition;
+
+ QRect iconGeom;
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
+ iconGeom = m_pWinIcon->geometry();
+ else
+ iconGeom = m_pUnixIcon->geometry();
+
+ popupmenuPosition = QPoint( iconGeom.x(), iconGeom.y() + captionHeight() + KMDI_CHILDFRM_BORDER );
+ systemMenu() ->popup( mapToGlobal( popupmenuPosition ) );
+}
+
+void KMdiChildFrm::switchToMinimizeLayout()
+{
+ setMinimumWidth( KMDI_CHILDFRM_MIN_WIDTH );
+ setFixedHeight( m_pCaption->height() + KMDI_CHILDFRM_DOUBLE_BORDER );
+
+ m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
+
+ // temporary use of minimize button for restore function
+ m_pMinimize->setPixmap( *m_pRestoreButtonPixmap );
+ QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
+ QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
+
+ // resizing
+ resize( 300, minimumHeight() );
+
+ // positioning
+ m_pManager->layoutMinimizedChildren();
+}
+
+void KMdiChildFrm::slot_resizeViaSystemMenu()
+{
+ grabMouse();
+ m_bResizing = true;
+ m_iResizeCorner = KMDI_RESIZE_BOTTOMLEFT;
+ setResizeCursor( m_iResizeCorner );
+}
+
+void KMdiChildFrm::redecorateButtons()
+{
+ delete m_pMinButtonPixmap;
+ delete m_pMaxButtonPixmap;
+ delete m_pRestoreButtonPixmap;
+ delete m_pCloseButtonPixmap;
+ delete m_pUndockButtonPixmap;
+
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
+ {
+ m_pMinButtonPixmap = new QPixmap( win_minbutton );
+ m_pMaxButtonPixmap = new QPixmap( win_maxbutton );
+ m_pRestoreButtonPixmap = new QPixmap( win_restorebutton );
+ m_pCloseButtonPixmap = new QPixmap( win_closebutton );
+ m_pUndockButtonPixmap = new QPixmap( win_undockbutton );
+ }
+ else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDE1Look )
+ {
+ m_pMinButtonPixmap = new QPixmap( kde_minbutton );
+ m_pMaxButtonPixmap = new QPixmap( kde_maxbutton );
+ m_pRestoreButtonPixmap = new QPixmap( kde_restorebutton );
+ m_pCloseButtonPixmap = new QPixmap( kde_closebutton );
+ m_pUndockButtonPixmap = new QPixmap( kde_undockbutton );
+ }
+ else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDELook )
+ {
+ m_pMinButtonPixmap = new QPixmap( kde2_minbutton );
+ m_pMaxButtonPixmap = new QPixmap( kde2_maxbutton );
+ m_pRestoreButtonPixmap = new QPixmap( kde2_restorebutton );
+ m_pCloseButtonPixmap = new QPixmap( kde2_closebutton );
+ m_pUndockButtonPixmap = new QPixmap( kde2_undockbutton );
+ }
+ else
+ { // kde2laptop look
+ m_pMinButtonPixmap = new QPixmap( kde2laptop_minbutton );
+ m_pMaxButtonPixmap = new QPixmap( kde2laptop_maxbutton );
+ m_pRestoreButtonPixmap = new QPixmap( kde2laptop_restorebutton );
+ m_pCloseButtonPixmap = new QPixmap( kde2laptop_closebutton );
+ m_pUndockButtonPixmap = new QPixmap( kde2laptop_undockbutton );
+ }
+
+ m_pUnixIcon->setAutoRaise( true );
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDE1Look )
+ {
+ m_pMinimize->setAutoRaise( true );
+ m_pMaximize->setAutoRaise( true );
+ m_pClose->setAutoRaise( true );
+ m_pUndock->setAutoRaise( true );
+ }
+ else
+ {
+ m_pMinimize->setAutoRaise( false );
+ m_pMaximize->setAutoRaise( false );
+ m_pClose->setAutoRaise( false );
+ m_pUndock->setAutoRaise( false );
+ }
+
+ if ( m_pClient && m_pClient->icon() )
+ {
+ m_pWinIcon->setPixmap( *( m_pClient )->icon() );
+ m_pUnixIcon->setPixmap( *( m_pClient )->icon() );
+ }
+ else
+ {
+ m_pWinIcon->setPixmap( *m_pIconButtonPixmap );
+ m_pUnixIcon->setPixmap( *m_pIconButtonPixmap );
+ }
+ m_pClose->setPixmap( *m_pCloseButtonPixmap );
+ m_pMinimize->setPixmap( *m_pMinButtonPixmap );
+ m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
+ m_pUndock->setPixmap( *m_pUndockButtonPixmap );
+}
+
+QRect KMdiChildFrm::mdiAreaContentsRect() const
+{
+ QFrame * p = ( QFrame* ) parentWidget();
+ if ( p )
+ {
+ return p->contentsRect();
+ }
+ else
+ {
+ QRect empty;
+ return empty;
+ }
+}
+
+// kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h
new file mode 100644
index 00000000..58959a42
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h
@@ -0,0 +1,446 @@
+//----------------------------------------------------------------------------
+// filename : kmdichildfrm.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+// patches : */2000 Lars Beikirch (Lars.Beikirch@gmx.net)
+//
+// copyright : (C) 1999-2003 by Falk Brettschneider
+// and
+// Szymon Stefanek (stefanek@tin.it)
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//------------------------------------------------------------------------------
+#ifndef _KMDI_CHILD_FRM_H_
+#define _KMDI_CHILD_FRM_H_
+
+#include <qptrlist.h>
+#include <qpixmap.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <qdatetime.h>
+#include <qlayout.h>
+
+#include <qdict.h>
+
+#include "kmdichildfrmcaption.h"
+
+class KMdiChildArea;
+class KMdiChildView;
+class QPopupMenu;
+class QToolButton;
+
+//==============================================================================
+/**
+ * @short Internal class, only used on Win32.
+ * This class provides a label widget that can process mouse click events.
+ */
+class KMDI_EXPORT KMdiWin32IconButton : public QLabel
+{
+ Q_OBJECT
+public:
+ KMdiWin32IconButton( QWidget* parent, const char* name = 0 );
+ virtual void mousePressEvent( QMouseEvent* );
+
+signals:
+ void pressed();
+};
+
+//==============================================================================
+/* some special events, see kmdidefines.h
+*/
+//------------------------------------------------------------------------------
+/**
+ * @short a QCustomEvent for move
+ * This special event will be useful, to inform view about child frame event.
+ */
+class KMDI_EXPORT KMdiChildFrmMoveEvent : public QCustomEvent
+{
+public:
+ KMdiChildFrmMoveEvent( QMoveEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_Move ) ), e ) {}
+
+};
+
+//------------------------------------------------------------------------------
+/**
+ * @short a QCustomEvent for begin of dragging
+ * This special event will be useful, to inform view about child frame event.
+ */
+class KMDI_EXPORT KMdiChildFrmDragBeginEvent : public QCustomEvent
+{
+public:
+ KMdiChildFrmDragBeginEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_DragBegin ) ), e ) {}
+};
+
+//------------------------------------------------------------------------------
+/**
+ * @short a QCustomEvent for end of dragging
+ * This special event will be useful, to inform view about child frame event.
+ */
+class KMDI_EXPORT KMdiChildFrmDragEndEvent : public QCustomEvent
+{
+public:
+ KMdiChildFrmDragEndEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_DragEnd ) ), e ) {}
+};
+
+//------------------------------------------------------------------------------
+/**
+ * @short a QCustomEvent for begin of resizing
+ * This special event will be useful, to inform view about child frame event.
+ */
+class KMDI_EXPORT KMdiChildFrmResizeBeginEvent : public QCustomEvent
+{
+public:
+ KMdiChildFrmResizeBeginEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_ResizeBegin ) ), e ) {}
+};
+
+//------------------------------------------------------------------------------
+/**
+ * @short a QCustomEvent for end of resizing
+ * This special event will be useful, to inform view about child frame event.
+ */
+class KMDI_EXPORT KMdiChildFrmResizeEndEvent : public QCustomEvent
+{
+public:
+ KMdiChildFrmResizeEndEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_ResizeEnd ) ), e ) {}
+};
+
+
+class KMdiChildFrmPrivate;
+//==============================================================================
+/**
+ * @short Internal class.
+ * It's an MDI child frame widget. It contains a view widget and a frame caption. Usually you derive from its view.
+ */
+//------------------------------------------------------------------------------
+class KMDI_EXPORT KMdiChildFrm : public QFrame
+{
+ friend class KMdiChildArea;
+ friend class KMdiChildFrmCaption;
+
+ Q_OBJECT
+
+ // attributes
+public:
+ enum MdiWindowState { Normal, Maximized, Minimized };
+ //positions same in h and cpp for fast order check
+ KMdiChildView* m_pClient;
+
+protected:
+ KMdiChildArea* m_pManager;
+ KMdiChildFrmCaption* m_pCaption;
+ KMdiWin32IconButton* m_pWinIcon;
+ QToolButton* m_pUnixIcon;
+ QToolButton* m_pMinimize;
+ QToolButton* m_pMaximize;
+ QToolButton* m_pClose;
+ QToolButton* m_pUndock;
+ MdiWindowState m_state;
+ QRect m_restoredRect;
+ int m_iResizeCorner;
+ int m_iLastCursorCorner;
+ bool m_bResizing;
+ bool m_bDragging;
+ QPixmap* m_pIconButtonPixmap;
+ QPixmap* m_pMinButtonPixmap;
+ QPixmap* m_pMaxButtonPixmap;
+ QPixmap* m_pRestoreButtonPixmap;
+ QPixmap* m_pCloseButtonPixmap;
+ QPixmap* m_pUndockButtonPixmap;
+
+ /**
+ * Every child frame window has an temporary ID in the Window menu of the child area.
+ */
+ int m_windowMenuID;
+
+ /**
+ * Imitates a system menu for child frame windows
+ */
+ QPopupMenu* m_pSystemMenu;
+
+ QSize m_oldClientMinSize;
+ QSize m_oldClientMaxSize;
+ QLayout::ResizeMode m_oldLayoutResizeMode;
+ QTime m_timeMeasure;
+
+ // methods
+public:
+
+ /**
+ * Creates a new KMdiChildFrm class.
+ */
+ KMdiChildFrm( KMdiChildArea *parent );
+
+ /**
+ * Destroys this KMdiChildFrm
+ * If a child is still here managed (no recreation was made) it is destroyed too.
+ */
+ ~KMdiChildFrm();
+
+ /**
+ * Reparents the widget w to this KMdiChildFrm (if this is not already done)
+ * Installs an event filter to catch focus events.
+ * Resizes this mdi child in a way that the child fits perfectly in.
+ */
+ void setClient( KMdiChildView *w, bool bAutomaticResize = false );
+
+ /**
+ * Reparents the client widget to 0 (desktop), moves with an offset from the original position
+ * Removes the event filter.
+ */
+ void unsetClient( QPoint positionOffset = QPoint( 0, 0 ) );
+
+ /**
+ * Sets the window icon pointer.
+ */
+ void setIcon( const QPixmap &pxm );
+
+ /**
+ * Returns the child frame icon.
+ */
+ QPixmap* icon() const;
+
+ /**
+ * Enables or disables the close button
+ */
+ void enableClose( bool bEnable );
+
+ /**
+ * Sets the caption of this window
+ */
+ void setCaption( const QString& text );
+
+ /**
+ * Gets the caption of this mdi child.
+ */
+ const QString& caption() { return m_pCaption->m_szCaption; }
+
+ /**
+ * Minimizes, Maximizes, or restores the window.
+ */
+ void setState( MdiWindowState state, bool bAnimate = true );
+
+ /**
+ * Returns the current state of the window
+ */
+ inline MdiWindowState state() const { return m_state; }
+
+ /**
+ * Returns the inner client area of the parent of this (which is KMdiChildArea).
+ */
+ QRect mdiAreaContentsRect() const;
+
+ /**
+ * Returns the geometry that will be restored by calling restore().
+ */
+ QRect restoreGeometry() const;
+
+ /**
+ * Sets the geometry that will be restored by calling restore().
+ */
+ void setRestoreGeometry( const QRect& newRestGeo );
+
+ /**
+ * Forces updating the rects of the caption and so...
+ * It may be useful when setting the mdiCaptionFont of the MdiManager
+ */
+ void updateRects() { resizeEvent( 0 ); }
+
+ /**
+ * Returns the system menu.
+ */
+ QPopupMenu* systemMenu() const;
+
+ /**
+ * Returns the caption bar height
+ */
+ inline int captionHeight() const { return m_pCaption->height(); }
+
+ /**
+ * sets new raise behavior and pixmaps of the buttons depending on the current decoration style
+ */
+ void redecorateButtons();
+
+ /**
+ * returns the mouse state "In Drag"
+ */
+ bool isInDrag() const { return m_bDragging; }
+
+ /**
+ * returns the mouse state "In Resize"
+ */
+ bool isInResize() const { return m_bResizing; }
+
+ /**
+ * Internally called from the signal focusInEventOccurs.
+ * It raises the MDI childframe to the top of all other MDI child frames and sets the focus on it.
+ */
+ void raiseAndActivate();
+
+ /**
+ * Sets the minimum size of the widget to w by h pixels.
+ * It extends it's base clase method in a way that the minimum size of
+ * the child area will be set additionally if the view is maximized.
+ */
+ virtual void setMinimumSize ( int minw, int minh );
+
+public slots:
+
+ void slot_resizeViaSystemMenu();
+
+protected:
+
+ /**
+ * Reimplemented from the base class.
+ * Resizes the captionbar, relayouts the position of the system buttons,
+ * and calls resize for its embedded KMdiChildView with the proper size
+ */
+ virtual void resizeEvent( QResizeEvent * );
+
+ /**
+ * Reimplemented from the base class.
+ * Detects if the mouse is on the edge of window and what resize cursor must be set.
+ * Calls KMdiChildFrm::resizeWindow if it is in m_bResizing.
+ */
+ virtual void mouseMoveEvent( QMouseEvent *e );
+
+ /**
+ * Reimplemented from the base class.
+ * Colours the caption, raises the childfrm widget and
+ * turns to resize mode if it is on the edge (resize-sensitive area)
+ */
+ virtual void mousePressEvent( QMouseEvent *e );
+
+ /**
+ * Reimplemented from the base class.
+ * Sets a normal cursor and leaves the resize mode.
+ */
+ virtual void mouseReleaseEvent( QMouseEvent * );
+
+ /**
+ * Reimplemented from the base class.
+ * give its child view the chance to notify a childframe move... that's why it sends
+ * a KMdiChildMovedEvent to the embedded KMdiChildView .
+ */
+ virtual void moveEvent( QMoveEvent* me );
+
+ /**
+ * Reimplemented from the base class. If not in resize mode, it sets the mouse cursor to normal appearance.
+ */
+ virtual void leaveEvent( QEvent * );
+
+ /**
+ * Reimplemented from the base class.
+ * In addition, the following are caught
+ * -the client's mousebutton press events which raises and activates the childframe
+ * -the client's resize event which resizes this widget as well
+ */
+ virtual bool eventFilter( QObject*, QEvent* );
+
+ /**
+ * Calculates the new geometry from the new mouse position given as parameters
+ * and calls KMdiChildFrm::setGeometry
+ */
+ void resizeWindow( int resizeCorner, int x, int y );
+
+ /**
+ * Override the cursor appearance depending on the widget corner given as parameter
+ */
+ void setResizeCursor( int resizeCorner );
+
+ /**
+ * Changes from the resize cursor to the normal (previous) cursor
+ */
+ void unsetResizeCursor();
+
+ /**
+ * That means to show a mini window showing the childframe's caption bar, only.
+ * It cannot be resized.
+ */
+ virtual void switchToMinimizeLayout();
+
+ /**
+ * Does the actual resize. Called from various places but from resizeEvent in general.
+ */
+ void doResize();
+
+ /**
+ * Does the actual resize, like doResize() but skips resize of the client if \a captionOnly is true.
+ * @todo: merge with doResize()
+ */
+ void doResize( bool captionOnly );
+
+protected slots:
+
+ /**
+ * Handles a click on the Maximize button
+ */
+ void maximizePressed();
+
+ /**
+ * Handles a click on the Restore (Normalize) button
+ */
+ void restorePressed();
+
+ /**
+ * Handles a click on the Minimize button.
+ */
+ void minimizePressed();
+
+ /**
+ * Handles a click on the Close button.
+ */
+ void closePressed();
+
+ /**
+ * Handles a click on the Undock (Detach) button
+ */
+ void undockPressed();
+
+ /**
+ * Shows a system menu for child frame windows.
+ */
+ void showSystemMenu();
+
+protected:
+
+ /**
+ * Restore the focus policies for _all_ widgets in the view using the list given as parameter.
+ * Install the event filter for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
+ */
+ void linkChildren( QDict<FocusPolicy>* pFocPolDict );
+
+ /**
+ * Backups all focus policies of _all_ child widgets in the MDI childview since they get lost during a reparent.
+ * Remove all event filters for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
+ */
+ QDict<QWidget::FocusPolicy>* unlinkChildren();
+
+ /**
+ * Calculates the corner id for the resize cursor. The return value can be tested for:
+ * KMDI_RESIZE_LEFT, KMDI_RESIZE_RIGHT, KMDI_RESIZE_TOP, KMDI_RESIZE_BOTTOM
+ * or an OR'd variant of them for the corners.
+ */
+ int getResizeCorner( int ax, int ay );
+
+private:
+ KMdiChildFrmPrivate *d;
+};
+
+#endif //_KMDICHILDFRM_H_
+
+// kate: space-indent off; replace-tabs off; tab-width 4; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp
new file mode 100644
index 00000000..815d07d4
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp
@@ -0,0 +1,322 @@
+//----------------------------------------------------------------------------
+// filename : kmdichildfrmcaption.cpp
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Szymon Stefanek (stefanek@tin.it)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#include "kmdichildfrmcaption.h"
+#include "kmdichildfrmcaption.moc"
+
+#include <qpainter.h>
+#include <qapplication.h>
+#include <qcursor.h>
+#include <qtoolbutton.h>
+#include <qpopupmenu.h>
+
+#include "kmdidefines.h"
+#include "kmdichildfrm.h"
+#include "kmdichildarea.h"
+#include "kmdimainfrm.h"
+#include <klocale.h>
+#include <iostream>
+
+#ifdef Q_WS_WIN
+//TODO: one day gradient can be added for win98/winnt5+
+// ask system properties on windows
+#ifndef SPI_GETGRADIENTCAPTIONS
+# define SPI_GETGRADIENTCAPTIONS 0x1008
+#endif
+#ifndef COLOR_GRADIENTACTIVECAPTION
+# define COLOR_GRADIENTACTIVECAPTION 27
+#endif
+#ifndef COLOR_GRADIENTINACTIVECAPTION
+# define COLOR_GRADIENTINACTIVECAPTION 28
+#endif
+#endif
+//#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// Class : KMdiChildFrmCaption
+// Purpose : An MDI label that draws the title
+//
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//============== KMdiChildFrmCaption =============//
+
+KMdiChildFrmCaption::KMdiChildFrmCaption( KMdiChildFrm *parent )
+ : QWidget( parent, "kmdi_childfrmcaption" )
+{
+ m_szCaption = i18n( "Unnamed" );
+ m_bActive = false;
+ m_pParent = parent;
+ setBackgroundMode( NoBackground );
+ setFocusPolicy( NoFocus );
+ m_bChildInDrag = false;
+}
+
+//============== ~KMdiChildFrmCaption =============//
+
+KMdiChildFrmCaption::~KMdiChildFrmCaption()
+{}
+
+//============= mousePressEvent ==============//
+
+void KMdiChildFrmCaption::mousePressEvent( QMouseEvent *e )
+{
+ if ( e->button() == LeftButton )
+ {
+ setMouseTracking( false );
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
+ {
+ QApplication::setOverrideCursor( Qt::sizeAllCursor, true );
+ }
+ m_pParent->m_bDragging = true;
+ m_offset = mapToParent( e->pos() );
+ }
+ else if ( e->button() == RightButton )
+ {
+ m_pParent->systemMenu()->popup( mapToGlobal( e->pos() ) );
+ }
+}
+
+//============= mouseReleaseEvent ============//
+
+void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e )
+{
+ if ( e->button() == LeftButton )
+ {
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
+ QApplication::restoreOverrideCursor();
+
+ releaseMouse();
+ if ( m_pParent->m_bDragging )
+ {
+ m_pParent->m_bDragging = false;
+ if ( m_bChildInDrag )
+ {
+ //notify child view
+ KMdiChildFrmDragEndEvent ue( e );
+ if ( m_pParent->m_pClient != 0L )
+ QApplication::sendEvent( m_pParent->m_pClient, &ue );
+
+ m_bChildInDrag = false;
+ }
+ }
+ }
+}
+
+//============== mouseMoveEvent =============//
+void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e )
+{
+ if ( !m_pParent->m_bDragging )
+ return ;
+
+ if ( !m_bChildInDrag )
+ {
+ //notify child view
+ KMdiChildFrmDragBeginEvent ue( e );
+ if ( m_pParent->m_pClient != 0L )
+ QApplication::sendEvent( m_pParent->m_pClient, &ue );
+
+ m_bChildInDrag = true;
+ }
+
+ QPoint relMousePosInChildArea = m_pParent->m_pManager->mapFromGlobal( e->globalPos() );
+
+ // mouse out of child area? stop child frame dragging
+ if ( !m_pParent->m_pManager->rect().contains( relMousePosInChildArea ) )
+ {
+ if ( relMousePosInChildArea.x() < 0 )
+ relMousePosInChildArea.rx() = 0;
+
+ if ( relMousePosInChildArea.y() < 0 )
+ relMousePosInChildArea.ry() = 0;
+
+ if ( relMousePosInChildArea.x() > m_pParent->m_pManager->width() )
+ relMousePosInChildArea.rx() = m_pParent->m_pManager->width();
+
+ if ( relMousePosInChildArea.y() > m_pParent->m_pManager->height() )
+ relMousePosInChildArea.ry() = m_pParent->m_pManager->height();
+ }
+ QPoint mousePosInChildArea = relMousePosInChildArea - m_offset;
+
+ // set new child frame position
+ parentWidget() ->move( mousePosInChildArea );
+}
+
+//=============== setActive ===============//
+
+void KMdiChildFrmCaption::setActive( bool bActive )
+{
+ if ( m_bActive == bActive )
+ return ;
+
+ // Ensure the icon's pixmap has the correct bg color
+ m_pParent->m_pWinIcon->setBackgroundColor( bActive ?
+ m_pParent->m_pManager->m_captionActiveBackColor :
+ m_pParent->m_pManager->m_captionInactiveBackColor );
+ m_pParent->m_pUnixIcon->setBackgroundColor( bActive ?
+ m_pParent->m_pManager->m_captionActiveBackColor :
+ m_pParent->m_pManager->m_captionInactiveBackColor );
+
+ m_bActive = bActive;
+ repaint( false );
+}
+
+//=============== setCaption ===============//
+
+void KMdiChildFrmCaption::setCaption( const QString& text )
+{
+ m_szCaption = text;
+ repaint( false );
+}
+
+//============== heightHint ===============//
+
+int KMdiChildFrmCaption::heightHint()
+{
+ int hint = m_pParent->m_pManager->m_captionFontLineSpacing + 3;
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
+ {
+ if ( hint < 18 )
+ hint = 18;
+ }
+ else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDE1Look )
+ {
+ if ( hint < 20 )
+ hint = 20;
+ }
+ else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDELook )
+ {
+ if ( hint < 16 )
+ hint = 16;
+ }
+ else
+ { // kde2laptop look
+ hint -= 4;
+ if ( hint < 14 )
+ hint = 14;
+ }
+ return hint;
+}
+
+//=============== paintEvent ==============//
+
+void KMdiChildFrmCaption::paintEvent( QPaintEvent * )
+{
+ QPainter p( this );
+ QRect r = rect();
+ p.setFont( m_pParent->m_pManager->m_captionFont );
+
+ if ( m_bActive )
+ {
+ p.fillRect( r, m_pParent->m_pManager->m_captionActiveBackColor );
+ p.setPen( m_pParent->m_pManager->m_captionActiveForeColor );
+ }
+ else
+ {
+ p.fillRect( r, m_pParent->m_pManager->m_captionInactiveBackColor );
+ p.setPen( m_pParent->m_pManager->m_captionInactiveForeColor );
+ }
+
+ //Shift the text after the icon
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
+ r.setLeft( r.left() + m_pParent->icon() ->width() + 3 );
+ else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDE1Look )
+ r.setLeft( r.left() + 22 );
+ else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDELook )
+ r.setLeft( r.left() + m_pParent->icon() ->width() + 3 );
+ else // kde2laptop look
+ r.setLeft( r.left() + 30 );
+
+ int captionWidthForText = width() - 4 * m_pParent->m_pClose->width() - m_pParent->icon() ->width() - 5;
+ QString text = abbreviateText( m_szCaption, captionWidthForText );
+ p.drawText( r, AlignVCenter | AlignLeft | SingleLine, text );
+
+}
+
+
+QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
+{
+ QFontMetrics fm = fontMetrics();
+ int actualWidth = fm.width( origStr );
+
+ int realLetterCount = origStr.length();
+ int newLetterCount;
+
+ if ( actualWidth != 0 )
+ newLetterCount = ( maxWidth * realLetterCount ) / actualWidth;
+ else
+ newLetterCount = realLetterCount; // should be 0 anyway
+
+ int w = maxWidth + 1;
+ QString s = origStr;
+
+ if ( newLetterCount <= 0 )
+ s = "";
+
+ while ( ( w > maxWidth ) && ( newLetterCount >= 1 ) )
+ {
+ if ( newLetterCount < realLetterCount )
+ {
+ if ( newLetterCount > 3 )
+ s = origStr.left( newLetterCount / 2 ) + "..." + origStr.right( newLetterCount / 2 );
+ else
+ {
+ if ( newLetterCount > 1 )
+ s = origStr.left( newLetterCount ) + "..";
+ else
+ s = origStr.left( 1 );
+ }
+ }
+ QFontMetrics fm = fontMetrics();
+ w = fm.width( s );
+ newLetterCount--;
+ }
+ return s;
+}
+
+//============= mouseDoubleClickEvent ===========//
+
+void KMdiChildFrmCaption::mouseDoubleClickEvent( QMouseEvent * )
+{
+ m_pParent->maximizePressed();
+}
+
+//============= slot_moveViaSystemMenu ===========//
+
+void KMdiChildFrmCaption::slot_moveViaSystemMenu()
+{
+ setMouseTracking( true );
+ grabMouse();
+
+ if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
+ QApplication::setOverrideCursor( Qt::sizeAllCursor, true );
+
+ m_pParent->m_bDragging = true;
+ m_offset = mapFromGlobal( QCursor::pos() );
+}
+
+// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h
new file mode 100644
index 00000000..158f76b0
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h
@@ -0,0 +1,145 @@
+//----------------------------------------------------------------------------
+// filename : kmdichildfrmcaption.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Falk Brettschneider
+// and
+// Szymon Stefanek (stefanek@tin.it)
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+#ifndef _KMDI_CHILD_FRM_CAPTION_H_
+#define _KMDI_CHILD_FRM_CAPTION_H_
+
+#include <qwidget.h>
+
+#include "kmdidefines.h"
+
+class KMdiChildFrm;
+
+
+class KMdiChildFrmCaptionPrivate;
+
+/**
+* @short Internal class.
+*
+* It's the caption bar of a child frame widget.
+*/
+class KMDI_EXPORT KMdiChildFrmCaption : public QWidget
+{
+ Q_OBJECT
+public:
+ /**
+ * Constructor
+ */
+ KMdiChildFrmCaption( KMdiChildFrm *parent );
+
+ /**
+ * Destructor
+ */
+ ~KMdiChildFrmCaption();
+
+ /**
+ * Repaint the caption bar in active background colors
+ */
+ void setActive( bool bActive );
+
+ /**
+ * Repaint with a new caption bar title
+ */
+ void setCaption( const QString& text );
+
+ /**
+ * Returns the caption bar height depending on the used font
+ */
+ int heightHint();
+
+public slots:
+ /**
+ * Grabs the mouse, a move cursor, sets a move indicator variable to true and keeps the global mouse position in mind
+ */
+ void slot_moveViaSystemMenu();
+
+protected:
+ /**
+ * Draws the caption bar and its title using the settings
+ */
+ virtual void paintEvent( QPaintEvent *e );
+
+ /**
+ * The same as KMdiChildFrmCaption::slot_moveViaSystemMenu
+ */
+ virtual void mousePressEvent( QMouseEvent * );
+
+ /**
+ * Calls maximizePressed of the parent widget ( KMdiChildFrm )
+ */
+ virtual void mouseDoubleClickEvent( QMouseEvent * );
+
+ /**
+ * Restore the normal mouse cursor, set the state variable back to 'not moving'
+ */
+ virtual void mouseReleaseEvent( QMouseEvent * );
+
+ /**
+ * Checks if out of move range of the KMdiChildArea and calls KMdiChildFrm::move
+ */
+ virtual void mouseMoveEvent( QMouseEvent *e );
+
+ /**
+ * Computes a new abbreviated string from a given string depending on a given maximum width
+ * @TODO Replace with a call to a KStringHandler function instead of rolling our own
+ */
+ QString abbreviateText( QString origStr, int maxWidth );
+
+ // attributes
+public:
+ /**
+ * the title string shown in the caption bar
+ */
+ QString m_szCaption;
+
+protected: // Protected attributes
+ /**
+ * parent widget
+ */
+ KMdiChildFrm *m_pParent;
+
+ /**
+ * state variable indicating whether activated or not activated
+ */
+ bool m_bActive;
+
+ /**
+ * the position offset related to its parent widget (internally used for translating mouse move positions
+ */
+ QPoint m_offset;
+
+ /**
+ * True if the child knows that it is currently being dragged.
+ */
+ bool m_bChildInDrag;
+
+private:
+ KMdiChildFrmCaptionPrivate *d;
+};
+
+#endif //_KMDICAPTION_H_
+
+// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp
new file mode 100644
index 00000000..f09cbb3e
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp
@@ -0,0 +1,773 @@
+//----------------------------------------------------------------------------
+// filename : kmdichildview.cpp
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create a
+// -06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+// patches : 02/2000 by Massimo Morin (mmorin@schedsys.com)
+// */2000 by Lars Beikirch (Lars.Beikirch@gmx.net)
+// 02/2001 by Eva Brucherseifer (eva@rt.e-technik.tu-darmstadt.de)
+// 01/2003 by Jens Zurheide (jens.zurheide@gmx.de)
+//
+// copyright : (C) 1999-2003 by Szymon Stefanek (stefanek@tin.it)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#include "kmdichildview.h"
+#include "kmdichildview.moc"
+
+#include <qdatetime.h>
+#include <qobjectlist.h>
+
+#include "kmdimainfrm.h"
+#include "kmdichildfrm.h"
+#include "kmdidefines.h"
+#include <kdebug.h>
+#include <klocale.h>
+#include <qiconset.h>
+
+//============ KMdiChildView ============//
+
+KMdiChildView::KMdiChildView( const QString& caption, QWidget* parentWidget, const char* name, WFlags f )
+ : QWidget( parentWidget, name, f )
+ , m_focusedChildWidget( 0L )
+ , m_firstFocusableChildWidget( 0L )
+ , m_lastFocusableChildWidget( 0L )
+ , m_stateChanged( true )
+ , m_bToolView( false )
+ , m_bInterruptActivation( false )
+ , m_bMainframesActivateViewIsPending( false )
+ , m_bFocusInEventIsPending( false )
+ , m_trackChanges( 0 )
+{
+ setGeometry( 0, 0, 0, 0 ); // reset
+ if ( caption != 0L )
+ m_szCaption = caption;
+ else
+ m_szCaption = i18n( "Unnamed" );
+
+ m_sTabCaption = m_szCaption;
+ setFocusPolicy( ClickFocus );
+ installEventFilter( this );
+
+ // store the current time
+ updateTimeStamp();
+}
+
+
+//============ KMdiChildView ============//
+
+KMdiChildView::KMdiChildView( QWidget* parentWidget, const char* name, WFlags f )
+ : QWidget( parentWidget, name, f )
+ , m_focusedChildWidget( 0L )
+ , m_firstFocusableChildWidget( 0L )
+ , m_lastFocusableChildWidget( 0L )
+ , m_stateChanged( true )
+ , m_bToolView( false )
+ , m_bInterruptActivation( false )
+ , m_bMainframesActivateViewIsPending( false )
+ , m_bFocusInEventIsPending( false )
+{
+ setGeometry( 0, 0, 0, 0 ); // reset
+ m_szCaption = i18n( "Unnamed" );
+ m_sTabCaption = m_szCaption;
+ setFocusPolicy( ClickFocus );
+ installEventFilter( this );
+
+ // store the current time
+ updateTimeStamp();
+}
+
+//============ ~KMdiChildView ============//
+
+KMdiChildView::~KMdiChildView()
+{
+ kdDebug( 760 ) << k_funcinfo << endl;
+}
+
+void KMdiChildView::trackIconAndCaptionChanges( QWidget *view )
+{
+ m_trackChanges = view;
+}
+
+
+//============== internal geometry ==============//
+
+QRect KMdiChildView::internalGeometry() const
+{
+ if ( mdiParent() )
+ { // is attached
+ // get the client area coordinates inside the MDI child frame
+ QRect posInFrame = geometry();
+ // map these values to the parent of the MDI child frame
+ // (this usually is the MDI child area) and return
+ QPoint ptTopLeft = mdiParent() ->mapToParent( posInFrame.topLeft() );
+ QSize sz = size();
+ return QRect( ptTopLeft, sz );
+ }
+ else
+ {
+ QRect geo = geometry();
+ QRect frameGeo = externalGeometry();
+ return QRect( frameGeo.x(), frameGeo.y(), geo.width(), geo.height() );
+ // return geometry();
+ }
+}
+
+//============== set internal geometry ==============//
+
+void KMdiChildView::setInternalGeometry( const QRect& newGeometry )
+{
+ if ( mdiParent() )
+ { // is attached
+ // retrieve the frame size
+ QRect geo = internalGeometry();
+ QRect frameGeo = externalGeometry();
+ int nFrameSizeTop = geo.y() - frameGeo.y();
+ int nFrameSizeLeft = geo.x() - frameGeo.x();
+
+ // create the new geometry that is accepted by the QWidget::setGeometry() method
+ QRect newGeoQt;
+ newGeoQt.setX( newGeometry.x() - nFrameSizeLeft );
+ newGeoQt.setY( newGeometry.y() - nFrameSizeTop );
+
+ newGeoQt.setWidth( newGeometry.width() + nFrameSizeLeft + KMDI_CHILDFRM_DOUBLE_BORDER / 2 );
+ newGeoQt.setHeight( newGeometry.height() + nFrameSizeTop + KMDI_CHILDFRM_DOUBLE_BORDER / 2 );
+ // newGeoQt.setWidth(newGeometry.width()+KMDI_MDI_CHILDFRM_DOUBLE_BORDER);
+ // newGeoQt.setHeight(newGeometry.height()+mdiParent()->captionHeight()+KMDI_MDI_CHILDFRM_DOUBLE_BORDER);
+
+ // set the geometry
+ mdiParent()->setGeometry( newGeoQt );
+ }
+ else
+ {
+ // retrieve the frame size
+ QRect geo = internalGeometry();
+ QRect frameGeo = externalGeometry();
+ int nFrameSizeTop = geo.y() - frameGeo.y();
+ int nFrameSizeLeft = geo.x() - frameGeo.x();
+
+ // create the new geometry that is accepted by the QWidget::setGeometry() method
+ QRect newGeoQt;
+
+ newGeoQt.setX( newGeometry.x() - nFrameSizeLeft );
+ newGeoQt.setY( newGeometry.y() - nFrameSizeTop );
+
+ newGeoQt.setWidth( newGeometry.width() );
+ newGeoQt.setHeight( newGeometry.height() );
+
+ // set the geometry
+ setGeometry( newGeoQt );
+ }
+}
+
+//============== external geometry ==============//
+
+QRect KMdiChildView::externalGeometry() const
+{
+ return mdiParent() ? mdiParent()->frameGeometry() : frameGeometry();
+}
+
+//============== set external geometry ==============//
+
+void KMdiChildView::setExternalGeometry( const QRect& newGeometry )
+{
+ if ( mdiParent() )
+ { // is attached
+ mdiParent() ->setGeometry( newGeometry );
+ }
+ else
+ {
+ // retrieve the frame size
+ QRect geo = internalGeometry();
+ QRect frameGeo = externalGeometry();
+ int nTotalFrameWidth = frameGeo.width() - geo.width();
+ int nTotalFrameHeight = frameGeo.height() - geo.height();
+ int nFrameSizeTop = geo.y() - frameGeo.y();
+ int nFrameSizeLeft = geo.x() - frameGeo.x();
+
+ // create the new geometry that is accepted by the QWidget::setGeometry() method
+ // not attached => the window system makes the frame
+ QRect newGeoQt;
+ newGeoQt.setX( newGeometry.x() + nFrameSizeLeft );
+ newGeoQt.setY( newGeometry.y() + nFrameSizeTop );
+ newGeoQt.setWidth( newGeometry.width() - nTotalFrameWidth );
+ newGeoQt.setHeight( newGeometry.height() - nTotalFrameHeight );
+
+ // set the geometry
+ setGeometry( newGeoQt );
+ }
+}
+
+//============== minimize ==============//
+
+void KMdiChildView::minimize( bool bAnimate )
+{
+ if ( mdiParent() )
+ {
+ if ( !isMinimized() )
+ {
+ mdiParent() ->setState( KMdiChildFrm::Minimized, bAnimate );
+ }
+ }
+ else
+ showMinimized();
+}
+
+void KMdiChildView::showMinimized()
+{
+ emit isMinimizedNow();
+ QWidget::showMinimized();
+}
+
+//slot:
+void KMdiChildView::minimize()
+{
+ minimize( true );
+}
+
+//============= maximize ==============//
+
+void KMdiChildView::maximize( bool bAnimate )
+{
+ if ( mdiParent() )
+ {
+ if ( !isMaximized() )
+ {
+ mdiParent() ->setState( KMdiChildFrm::Maximized, bAnimate );
+ emit mdiParentNowMaximized( true );
+ }
+ }
+ else
+ showMaximized();
+}
+
+void KMdiChildView::showMaximized()
+{
+ emit isMaximizedNow();
+ QWidget::showMaximized();
+}
+
+//slot:
+void KMdiChildView::maximize()
+{
+ maximize( true );
+}
+
+//============== restoreGeometry ================//
+
+QRect KMdiChildView::restoreGeometry()
+{
+ if ( mdiParent() )
+ return mdiParent() ->restoreGeometry();
+ else //FIXME not really supported, may be we must use Windows or X11 funtions
+ return geometry();
+}
+
+//============== setRestoreGeometry ================//
+
+void KMdiChildView::setRestoreGeometry( const QRect& newRestGeo )
+{
+ if ( mdiParent() )
+ mdiParent()->setRestoreGeometry( newRestGeo );
+}
+
+//============== attach ================//
+
+void KMdiChildView::attach()
+{
+ emit attachWindow( this, true );
+}
+
+//============== detach =================//
+
+void KMdiChildView::detach()
+{
+ emit detachWindow( this, true );
+}
+
+//=============== isMinimized ? =================//
+
+bool KMdiChildView::isMinimized() const
+{
+ if ( mdiParent() )
+ return ( mdiParent()->state() == KMdiChildFrm::Minimized );
+ else
+ return QWidget::isMinimized();
+}
+
+//============== isMaximized ? ==================//
+
+bool KMdiChildView::isMaximized() const
+{
+ if ( mdiParent() )
+ return ( mdiParent()->state() == KMdiChildFrm::Maximized );
+ else
+ return QWidget::isMaximized();
+}
+
+//============== restore ================//
+
+void KMdiChildView::restore()
+{
+ if ( mdiParent() )
+ {
+ if ( isMaximized() )
+ emit mdiParentNowMaximized( false );
+
+ if ( isMinimized() || isMaximized() )
+ mdiParent()->setState( KMdiChildFrm::Normal );
+ }
+ else
+ showNormal();
+}
+
+void KMdiChildView::showNormal()
+{
+ emit isRestoredNow();
+ QWidget::showNormal();
+}
+
+//=============== youAreAttached ============//
+
+void KMdiChildView::youAreAttached( KMdiChildFrm *lpC )
+{
+ lpC->setCaption( m_szCaption );
+ emit isAttachedNow();
+}
+
+//================ youAreDetached =============//
+
+void KMdiChildView::youAreDetached()
+{
+ setCaption( m_szCaption );
+
+ setTabCaption( m_sTabCaption );
+ if ( myIconPtr() )
+ setIcon( *( myIconPtr() ) );
+
+ setFocusPolicy( QWidget::StrongFocus );
+
+ emit isDetachedNow();
+}
+
+//================ setCaption ================//
+// this set the caption of only the window
+void KMdiChildView::setCaption( const QString& szCaption )
+{
+ // this will work only for window
+ m_szCaption = szCaption;
+ if ( mdiParent() )
+ mdiParent() ->setCaption( m_szCaption );
+ else //have to call the parent one
+ QWidget::setCaption( m_szCaption );
+
+ emit windowCaptionChanged( m_szCaption );
+}
+
+//============== closeEvent ================//
+
+void KMdiChildView::closeEvent( QCloseEvent *e )
+{
+ e->ignore(); //we ignore the event , and then close later if needed.
+ emit childWindowCloseRequest( this );
+}
+
+//================ myIconPtr =================//
+
+QPixmap* KMdiChildView::myIconPtr()
+{
+ return 0;
+}
+
+//============= focusInEvent ===============//
+
+void KMdiChildView::focusInEvent( QFocusEvent *e )
+{
+ QWidget::focusInEvent( e );
+
+ // every widget get a focusInEvent when a popup menu is opened!?! -> maybe bug of QT
+ if ( e && ( ( e->reason() ) == QFocusEvent::Popup ) )
+ return ;
+
+
+ m_bFocusInEventIsPending = true;
+ activate();
+ m_bFocusInEventIsPending = false;
+
+ emit gotFocus( this );
+}
+
+//============= activate ===============//
+
+void KMdiChildView::activate()
+{
+ // avoid circularity
+ static bool s_bActivateIsPending = false;
+ if ( s_bActivateIsPending )
+ return ;
+
+ s_bActivateIsPending = true;
+
+ // raise the view and push the taskbar button
+ if ( !m_bMainframesActivateViewIsPending )
+ emit focusInEventOccurs( this );
+
+ // if this method was called directly, check if the mainframe wants that we interrupt
+ if ( m_bInterruptActivation )
+ m_bInterruptActivation = false;
+ else
+ {
+ if ( !m_bFocusInEventIsPending )
+ setFocus();
+
+ kdDebug( 760 ) << k_funcinfo << endl;
+ emit activated( this );
+ }
+
+ if ( m_focusedChildWidget != 0L )
+ m_focusedChildWidget->setFocus();
+ else
+ {
+ if ( m_firstFocusableChildWidget != 0L )
+ {
+ m_firstFocusableChildWidget->setFocus();
+ m_focusedChildWidget = m_firstFocusableChildWidget;
+ }
+ }
+ s_bActivateIsPending = false;
+}
+
+//============= focusOutEvent ===============//
+
+void KMdiChildView::focusOutEvent( QFocusEvent* e )
+{
+ QWidget::focusOutEvent( e );
+ emit lostFocus( this );
+}
+
+//============= resizeEvent ===============//
+
+void KMdiChildView::resizeEvent( QResizeEvent* e )
+{
+ QWidget::resizeEvent( e );
+
+ if ( m_stateChanged )
+ {
+ m_stateChanged = false;
+ if ( isMaximized() )
+ { //maximized
+ emit isMaximizedNow();
+ }
+ else if ( isMinimized() )
+ { //minimized
+ emit isMinimizedNow();
+ }
+ else
+ { //is restored
+ emit isRestoredNow();
+ }
+ }
+}
+
+void KMdiChildView::slot_childDestroyed()
+{
+ // do what we do if a child is removed
+
+ // if we lost a child we uninstall ourself as event filter for the lost
+ // child and its children
+ const QObject * pLostChild = QObject::sender();
+ if ( pLostChild && ( pLostChild->isWidgetType() ) )
+ {
+ QObjectList* list = ( ( QObject* ) ( pLostChild ) ) ->queryList( "QWidget" );
+ list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
+ QObjectListIt it( *list ); // iterate over all lost child widgets
+ QObject* obj;
+ while ( ( obj = it.current() ) != 0 )
+ { // for each found object...
+ QWidget * widg = ( QWidget* ) obj;
+ ++it;
+ widg->removeEventFilter( this );
+ if ( m_firstFocusableChildWidget == widg )
+ m_firstFocusableChildWidget = 0L; // reset first widget
+
+ if ( m_lastFocusableChildWidget == widg )
+ m_lastFocusableChildWidget = 0L; // reset last widget
+
+ if ( m_focusedChildWidget == widg )
+ m_focusedChildWidget = 0L; // reset focused widget
+ }
+ delete list; // delete the list, not the objects
+ }
+}
+
+//============= eventFilter ===============//
+bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
+{
+ if ( e->type() == QEvent::KeyPress && isAttached() )
+ {
+ QKeyEvent* ke = ( QKeyEvent* ) e;
+ if ( ke->key() == Qt::Key_Tab )
+ {
+ QWidget* w = ( QWidget* ) obj;
+ FocusPolicy wfp = w->focusPolicy();
+ if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || w->focusPolicy() == QWidget::WheelFocus )
+ {
+ if ( m_lastFocusableChildWidget != 0 )
+ {
+ if ( w == m_lastFocusableChildWidget )
+ {
+ if ( w != m_firstFocusableChildWidget )
+ m_firstFocusableChildWidget->setFocus();
+ }
+ }
+ }
+ }
+ }
+ else if ( e->type() == QEvent::FocusIn )
+ {
+ if ( obj->isWidgetType() )
+ {
+ QObjectList * list = queryList( "QWidget" );
+ if ( list->find( obj ) != -1 )
+ m_focusedChildWidget = ( QWidget* ) obj;
+
+ delete list; // delete the list, not the objects
+ }
+ if ( !isAttached() )
+ { // is toplevel, for attached views activation is done by main frame event filter
+ static bool m_bActivationIsPending = false;
+ if ( !m_bActivationIsPending )
+ {
+ m_bActivationIsPending = true;
+ activate(); // sets the focus
+ m_bActivationIsPending = false;
+ }
+ }
+ }
+ else if ( e->type() == QEvent::ChildRemoved )
+ {
+ // if we lost a child we uninstall ourself as event filter for the lost
+ // child and its children
+ QObject * pLostChild = ( ( QChildEvent* ) e ) ->child();
+ if ( ( pLostChild != 0L ) && ( pLostChild->isWidgetType() ) )
+ {
+ QObjectList * list = pLostChild->queryList( "QWidget" );
+ list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
+ QObjectListIt it( *list ); // iterate over all lost child widgets
+ QObject * o;
+ while ( ( o = it.current() ) != 0 )
+ { // for each found object...
+ QWidget * widg = ( QWidget* ) o;
+ ++it;
+ widg->removeEventFilter( this );
+ FocusPolicy wfp = widg->focusPolicy();
+ if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || widg->focusPolicy() == QWidget::WheelFocus )
+ {
+ if ( m_firstFocusableChildWidget == widg )
+ m_firstFocusableChildWidget = 0L; // reset first widget
+
+ if ( m_lastFocusableChildWidget == widg )
+ m_lastFocusableChildWidget = 0L; // reset last widget
+ }
+ }
+ delete list; // delete the list, not the objects
+ }
+ }
+ else if ( e->type() == QEvent::ChildInserted )
+ {
+ // if we got a new child and we are attached to the MDI system we
+ // install ourself as event filter for the new child and its children
+ // (as we did when we were added to the MDI system).
+ QObject * pNewChild = ( ( QChildEvent* ) e ) ->child();
+ if ( ( pNewChild != 0L ) && ( pNewChild->isWidgetType() ) )
+ {
+ QWidget * pNewWidget = ( QWidget* ) pNewChild;
+ if ( pNewWidget->testWFlags( Qt::WType_Dialog | Qt::WShowModal ) )
+ return false;
+ QObjectList *list = pNewWidget->queryList( "QWidget" );
+ list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
+ QObjectListIt it( *list ); // iterate over all new child widgets
+ QObject * o;
+ while ( ( o = it.current() ) != 0 )
+ { // for each found object...
+ QWidget * widg = ( QWidget* ) o;
+ ++it;
+ widg->installEventFilter( this );
+ connect( widg, SIGNAL( destroyed() ), this, SLOT( slot_childDestroyed() ) );
+ FocusPolicy wfp = widg->focusPolicy();
+ if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || widg->focusPolicy() == QWidget::WheelFocus )
+ {
+ if ( m_firstFocusableChildWidget == 0 )
+ m_firstFocusableChildWidget = widg; // first widge
+
+ m_lastFocusableChildWidget = widg; // last widget
+ }
+ }
+ delete list; // delete the list, not the objects
+ }
+ }
+ else
+ {
+ if ( e->type() == QEvent::IconChange )
+ {
+ // qDebug("KMDiChildView:: QEvent:IconChange intercepted\n");
+ if ( obj == this )
+ iconUpdated( this, icon() ? ( *icon() ) : QPixmap() );
+ else if ( obj == m_trackChanges )
+ setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : QPixmap() );
+ }
+ if ( e->type() == QEvent::CaptionChange )
+ {
+ if ( obj == this )
+ captionUpdated( this, caption() );
+ }
+ }
+
+ return false; // standard event processing
+}
+
+/** Switches interposing in event loop of all current child widgets off. */
+void KMdiChildView::removeEventFilterForAllChildren()
+{
+ QObjectList* list = queryList( "QWidget" );
+ QObjectListIt it( *list ); // iterate over all child widgets
+ QObject* obj;
+ while ( ( obj = it.current() ) != 0 )
+ { // for each found object...
+ QWidget* widg = ( QWidget* ) obj;
+ ++it;
+ widg->removeEventFilter( this );
+ }
+ delete list; // delete the list, not the objects
+}
+
+QWidget* KMdiChildView::focusedChildWidget()
+{
+ return m_focusedChildWidget;
+}
+
+void KMdiChildView::setFirstFocusableChildWidget( QWidget* firstFocusableChildWidget )
+{
+ m_firstFocusableChildWidget = firstFocusableChildWidget;
+}
+
+void KMdiChildView::setLastFocusableChildWidget( QWidget* lastFocusableChildWidget )
+{
+ m_lastFocusableChildWidget = lastFocusableChildWidget;
+}
+
+/** Set a new value of the task bar button caption */
+void KMdiChildView::setTabCaption ( const QString& stbCaption )
+{
+ m_sTabCaption = stbCaption;
+ emit tabCaptionChanged( m_sTabCaption );
+}
+
+void KMdiChildView::setMDICaption ( const QString& caption )
+{
+ setCaption( caption );
+ setTabCaption( caption );
+}
+
+/** sets an ID */
+void KMdiChildView::setWindowMenuID( int id )
+{
+ m_windowMenuID = id;
+}
+
+//============= slot_clickedInWindowMenu ===============//
+
+/** called if someone click on the "Window" menu item for this child frame window */
+void KMdiChildView::slot_clickedInWindowMenu()
+{
+ updateTimeStamp();
+ emit clickedInWindowMenu( m_windowMenuID );
+}
+
+//============= slot_clickedInDockMenu ===============//
+
+/** called if someone click on the "Dock/Undock..." menu item for this child frame window */
+void KMdiChildView::slot_clickedInDockMenu()
+{
+ emit clickedInDockMenu( m_windowMenuID );
+}
+
+//============= setMinimumSize ===============//
+
+void KMdiChildView::setMinimumSize( int minw, int minh )
+{
+ QWidget::setMinimumSize( minw, minh );
+ if ( mdiParent() && mdiParent()->state() != KMdiChildFrm::Minimized )
+ {
+ mdiParent() ->setMinimumSize( minw + KMDI_CHILDFRM_DOUBLE_BORDER,
+ minh + KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR + mdiParent() ->captionHeight() );
+ }
+}
+
+//============= setMaximumSize ===============//
+
+void KMdiChildView::setMaximumSize( int maxw, int maxh )
+{
+ if ( mdiParent() && mdiParent()->state() == KMdiChildFrm::Normal )
+ {
+ int w = maxw + KMDI_CHILDFRM_DOUBLE_BORDER;
+ if ( w > QWIDGETSIZE_MAX )
+ w = QWIDGETSIZE_MAX;
+
+ int h = maxh + KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR + mdiParent() ->captionHeight();
+ if ( h > QWIDGETSIZE_MAX )
+ h = QWIDGETSIZE_MAX;
+
+ mdiParent()->setMaximumSize( w, h );
+ }
+ QWidget::setMaximumSize( maxw, maxh );
+}
+
+//============= show ===============//
+
+void KMdiChildView::show()
+{
+ if ( mdiParent() )
+ mdiParent()->show();
+
+ QWidget::show();
+}
+
+//============= hide ===============//
+
+void KMdiChildView::hide()
+{
+ if ( mdiParent() )
+ mdiParent()->hide();
+
+ QWidget::hide();
+}
+
+//============= raise ===============//
+
+void KMdiChildView::raise()
+{
+ if ( mdiParent() ) //TODO Check Z-order
+ mdiParent()->raise();
+
+ QWidget::raise();
+}
+
+// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildview.h b/lib/compatibility/kmdi/qextmdi/kmdichildview.h
new file mode 100644
index 00000000..fda0b95b
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildview.h
@@ -0,0 +1,615 @@
+//----------------------------------------------------------------------------
+// filename : kmdichildview.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+// patches : 02/2000 by Massimo Morin (mmorin@schedsys.com)
+// */2000 by Lars Beikirch (Lars.Beikirch@gmx.net)
+// 02/2001 by Eva Brucherseifer (eva@rt.e-technik.tu-darmstadt.de)
+// 01/2003 by Jens Zurheide (jens.zurheide@gmx.de)
+//
+// copyright : (C) 1999-2003 by Falk Brettschneider
+// and
+// Szymon Stefanek (stefanek@tin.it)
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+#ifndef _KMDI_CHILD_VIEW_H_
+#define _KMDI_CHILD_VIEW_H_
+
+#include <qwidget.h>
+#include <qpixmap.h>
+#include <qrect.h>
+#include <qapplication.h>
+#include <qdatetime.h>
+
+#include "kmdichildfrm.h"
+
+class KMdiChildViewPrivate;
+
+/**
+ * @short Base class for all your special view windows.
+ *
+ * Base class for all MDI view widgets. KMdi stores additional information in this class
+ * to handle the attach/detach mechanism and such things.
+ *
+ * All such windows 'lives' attached to a KMdiChildFrm widget
+ * managed by KMdiChildArea, or detached (managed by the window manager.)
+ * So remember that the KMdiChildView::parent pointer may change, and may be 0L, too.
+ *
+ * There are 2 possibilities for you to put your widgets under MDI control:
+ *
+ * Either you inherit all the views from KMdiChildView:
+ * \code
+ * class MyMdiWidget : public KMdiChildView
+ * { .... };
+ * ...
+ * MyMdiWidget w;
+ * mainframe->addWindow(w, flags);
+ * \endcode
+ *
+ * or you wrap them by a KMdiChildView somehow like this:
+ *
+ * \code
+ * void DocViewMan::addKMdiFrame(QWidget* pNewView, bool bShow, const QPixmap& icon)
+ * {
+ * // cover it by a KMdi childview and add that MDI system
+ * KMdiChildView* pMDICover = new KMdiChildView( pNewView->caption());
+ * pMDICover->setIcon(icon);
+ * m_MDICoverList.append( pMDICover);
+ * QBoxLayout* pLayout = new QHBoxLayout( pMDICover, 0, -1, "layout");
+ * pNewView->reparent( pMDICover, QPoint(0,0));
+ * pLayout->addWidget( pNewView);
+ * pMDICover->setName( pNewView->name());
+ * // captions
+ * QString shortName = pNewView->caption();
+ * int length = shortName.length();
+ * shortName = shortName.right(length - (shortName.findRev('/') +1));
+ * pMDICover->setTabCaption( shortName);
+ * pMDICover->setCaption(pNewView->caption());
+ *
+ * // fake a viewActivated to update the currentEditView/currentBrowserView pointers _before_ adding to MDI control
+ * slot_viewActivated( pMDICover);
+ *
+ * // take it under MDI mainframe control (note: this triggers also a setFocus())
+ * int flags;
+ * if (bShow) {
+ * flags = KMdi::StandardAdd;
+ * }
+ * else {
+ * flags = KMdi::Hide;
+ * }
+ * // set the accelerators for Toplevel MDI mode (each toplevel window needs its own accels
+ * connect( m_pParent, SIGNAL(childViewIsDetachedNow(QWidget*)), this, SLOT(initKeyAccel(QWidget*)) );
+ *
+ * m_pParent->addWindow( pMDICover, flags);
+ * // correct the default settings of KMdi ('cause we haven't a tab order for subwidget focuses)
+ * pMDICover->setFirstFocusableChildWidget(0L);
+ * pMDICover->setLastFocusableChildWidget(0L);
+ * }
+ * \endcode
+ *
+ */
+
+class KMDI_EXPORT KMdiChildView : public QWidget
+{
+ friend class KMdiMainFrm;
+ friend class KMdiChildFrm;
+ Q_OBJECT
+
+ // attributes
+protected:
+ /**
+ * See KMdiChildView::caption
+ */
+ QString m_szCaption;
+
+ /**
+ * See KMdiChildView::tabCaption
+ */
+ QString m_sTabCaption;
+
+ /**
+ * See KMdiChildView::focusedChildWidget
+ */
+ QWidget* m_focusedChildWidget;
+
+ /**
+ * See KMdiChildView::setFirstFocusableChildWidget
+ */
+ QWidget* m_firstFocusableChildWidget;
+
+ /**
+ * See KMdiChildView::setLastFocusableChildWidget
+ */
+ QWidget* m_lastFocusableChildWidget;
+
+ /**
+ * Every child view window has an temporary ID in the Window menu of the main frame.
+ */
+ int m_windowMenuID;
+
+ /**
+ * Holds a temporary information about if the MDI view state has changed but is not processed yet (pending state).
+ * For example it could be that a 'maximize' is pending, if this variable is true.
+ */
+ bool m_stateChanged;
+
+ /**
+ * Holds the time when this view was activated (not only displayed) for the last time.
+ */
+ QDateTime m_time;
+
+private:
+ /**
+ * Internally used as indicator whether this KMdiChildView is treated as document view or as tool view.
+ */
+ bool m_bToolView;
+
+ /**
+ * Internally used by KMdiMainFrm to store a temporary information that the method
+ * activate() is unnecessary and that it can by escaped.
+ * This saves from unnecessary calls when activate is called directly.
+ */
+ bool m_bInterruptActivation;
+
+ /**
+ * Internally used to prevent cycles between KMdiMainFrm::activateView() and KMdiChildView::activate().
+ */
+ bool m_bMainframesActivateViewIsPending;
+
+ /**
+ * Internally used to check if there is a focus in event pending
+ */
+ bool m_bFocusInEventIsPending;
+
+ // methods
+public:
+ /**
+ * Constructor
+ */
+ KMdiChildView( const QString& caption, QWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
+
+ /**
+ * Constructor
+ * sets "Unnamed" as default caption
+ */
+ KMdiChildView( QWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
+
+ /**
+ * Destructor
+ */
+ ~KMdiChildView();
+
+ /**
+ * This method does the same as focusInEvent(). That's why it is a replacement for the setFocus() call. It makes
+ * sense if you for instance want to focus (I mean raise and activate) this view although the real focus is
+ * in another toplevel widget. focusInEvent() will never get called in that case and your setFocus() call for this
+ * widget would fail without any effect.
+ * Use this method with caution, it always raises the view and pushes the taskbar button. Also when the focus is
+ * still on another MDI view in the same toplevel window where this is located!
+ */
+ void activate();
+
+ /**
+ * Memorizes the first focusable child widget of this widget
+ */
+ void setFirstFocusableChildWidget( QWidget* );
+
+ /**
+ * Memorizes the last focusable child widget of this widget
+ */
+ void setLastFocusableChildWidget( QWidget* );
+
+ /**
+ * Returns the current focused child widget of this widget
+ */
+ QWidget* focusedChildWidget();
+
+ /**
+ * Returns true if the MDI view is a child window within the MDI mainframe widget
+ * or false if the MDI view is in toplevel mode
+ */
+ bool isAttached() const { return ( mdiParent() != 0L ); }
+
+ /**
+ * Returns the caption of the child window (different from the caption on the button in the taskbar)
+ */
+ const QString& caption() const { return m_szCaption; }
+
+ /**
+ * Returns the caption of the button on the taskbar
+ */
+ const QString& tabCaption() const { return m_sTabCaption; }
+
+ /**
+ * Sets the window caption string...
+ * Calls updateButton on the taskbar button if it has been set.
+ */
+ virtual void setCaption( const QString& szCaption );
+
+ /**
+ * Sets the caption of the button referring to this window
+ */
+ virtual void setTabCaption( const QString& caption );
+
+ /**
+ * Sets the caption of both the window and the button on the taskbar
+ */
+ virtual void setMDICaption( const QString &caption );
+
+ /**
+ * Returns the KMdiChildFrm parent widget (or 0 if the window is not attached)
+ */
+ KMdiChildFrm *mdiParent() const;
+
+ /**
+ * Tells if the window is minimized when attached to the Mdi manager,
+ * or if it is VISIBLE when 'floating'.
+ */
+ bool isMinimized() const;
+
+ /**
+ * Tells if the window is minimized when attached to the Mdi manager,
+ * otherwise returns false.
+ */
+ bool isMaximized() const;
+
+ /**
+ * Returns the geometry of this MDI child window as QWidget::geometry() does.
+ */
+ QRect internalGeometry() const;
+
+ /**
+ * Sets the geometry of the client area of this MDI child window. The
+ * top left position of the argument is the position of the top left point
+ * of the client area in its parent coordinates and the arguments width
+ * and height is the width and height of the client area. Please note: This
+ * differs from the behavior of QWidget::setGeometry()!
+ */
+ void setInternalGeometry( const QRect& newGeomety );
+
+ /**
+ * Returns the frame geometry of this window or of the parent if there is any...
+ */
+ QRect externalGeometry() const;
+
+ /**
+ * Sets the geometry of the frame of this MDI child window. The top left
+ * position of the argument is the position of the top left point of the
+ * frame in its parent coordinates and the arguments width and height is
+ * the width and height of the widget frame. Please note: This differs
+ * from the behavior of QWidget::setGeometry()!
+ */
+ void setExternalGeometry( const QRect& newGeomety );
+
+ /**
+ * You should override this function in the derived class.
+ */
+ virtual QPixmap* myIconPtr();
+
+ /**
+ * Minimizes this window when it is attached to the Mdi manager.
+ * Otherwise has no effect
+ */
+ virtual void minimize( bool bAnimate );
+
+ /**
+ * Maximizes this window when it is attached to the Mdi manager.
+ * Otherwise has no effect
+ */
+ virtual void maximize( bool bAnimate );
+
+ /**
+ * Returns the geometry that will be restored by calling restore().
+ */
+ QRect restoreGeometry();
+
+ /**
+ * Sets the geometry that will be restored by calling restore().
+ */
+ void setRestoreGeometry( const QRect& newRestGeo );
+
+ /**
+ * Switches interposing in event loop of all current child widgets off.
+ */
+ void removeEventFilterForAllChildren();
+
+ /**
+ * Internally used for setting an ID for the 'Window' menu entry
+ */
+ void setWindowMenuID( int id );
+
+ /**
+ * Sets the minimum size of the widget to w by h pixels.
+ * It extends it base clase method in a way that the minimum size of
+ * its childframe (if there is one) will be set, additionally.
+ */
+ virtual void setMinimumSize ( int minw, int minh );
+
+ /**
+ * Sets the maximum size of the widget to w by h pixels.
+ * It extends it base clase method in a way that the maximum size of
+ * its childframe (if there is one) will be set, additionally.
+ */
+ virtual void setMaximumSize ( int maxw, int maxh );
+
+ /**
+ * Returns if this is added as MDI tool-view
+ */
+ inline bool isToolView() const { return m_bToolView; }
+
+ /**
+ * Remember the current time
+ */
+ inline void updateTimeStamp()
+ {
+ m_time.setDate( QDate::currentDate() );
+ m_time.setTime( QTime::currentTime() );
+ }
+
+ /**
+ * Recall a previously remembered time, i.e. the value of m_time
+ */
+ inline const QDateTime& getTimeStamp() const { return m_time; }
+
+public slots:
+ /**
+ * Attaches this window to the Mdi manager.
+ * It calls the KMdiMainFrm attachWindow function , so if you have a pointer
+ * to this KMdiMainFrm you'll be faster calling that function.
+ */
+ virtual void attach();
+
+ /**
+ * Detaches this window from the Mdi manager.
+ * It calls the KMdiMainFrm detachWindow function , so if you have a pointer
+ * to this KMdiMainFrm you'll be faster calling that function.
+ */
+ virtual void detach();
+
+ /**
+ * Mimimizes the MDI view. If attached, the covering childframe widget is minimized (only a mini widget
+ * showing the caption bar and the system buttons will remain visible). If detached, it will use the
+ * minimize of the underlying system ( QWidget::showMinimized ).
+ */
+ virtual void minimize();
+
+ /**
+ * Maximizes the MDI view. If attached, this widget will fill the whole MDI view area widget. The system buttons
+ * move to the main menubar (if set by KMdiMainFrm::setMenuForSDIModeSysButtons ).
+ * If detached, it will use the minimize of the underlying system ( QWidget::showMaximized ).
+ */
+ virtual void maximize();
+
+ /**
+ * Restores this window to its normal size. Also known as 'normalize'.
+ */
+ virtual void restore();
+
+ /**
+ * Internally called, if KMdiMainFrm::attach is called.
+ * Actually, only the caption of the covering childframe is set.
+ */
+ virtual void youAreAttached( KMdiChildFrm *lpC );
+
+ /**
+ * Internally called, if KMdiMainFrm::detach is called.
+ * Some things for going toplevel will be done here.
+ */
+ virtual void youAreDetached();
+
+ /**
+ * Called if someone click on the "Window" menu item for this child frame window
+ */
+ virtual void slot_clickedInWindowMenu();
+
+ /**
+ * Called if someone click on the "Dock/Undock..." menu item for this child frame window
+ */
+ virtual void slot_clickedInDockMenu();
+
+ /**
+ * Calls QWidget::show but also for it's parent widget if attached
+ */
+ virtual void show();
+
+ /**
+ * Calls QWidget::hide() or it's parent widget hide() if attached
+ */
+ virtual void hide();
+
+ /**
+ * Calls QWidget::raise() or it's parent widget raise() if attached
+ */
+ virtual void raise();
+
+ /**
+ * Overridden from its base class method. Emits a signal KMdiChildView::isMinimizedNow , additionally.
+ * Note that this method is not used by an external windows manager call on system minimizing.
+ */
+ virtual void showMinimized();
+
+ /**
+ * Overridden from its base class method. Emits a signal KMdiChildView::isMaximizedNow , additionally.
+ * Note that this method is not used by an external windows manager call on system maximizing.
+ */
+ virtual void showMaximized();
+
+ /**
+ * Overridden from its base class method. Emits a signal KMdiChildView::isRestoredNow , additionally.
+ * Note that this method is not used by an external windows manager call on system normalizing.
+ */
+ virtual void showNormal();
+
+
+protected:
+ /**
+ * Ignores the event and calls KMdiMainFrm::childWindowCloseRequest instead. This is because the
+ * mainframe has control over the views. Therefore the MDI view has to request the mainframe for a close.
+ */
+ virtual void closeEvent( QCloseEvent *e );
+
+ /**
+ * It only catches QEvent::KeyPress events there. If a Qt::Key_Tab is pressed, the internal MDI focus
+ * handling is called. That means if the last focusable child widget of this is called, it will jump to the
+ * first focusable child widget of this.
+ * See KMdiChildView::setFirstFocusableChildWidget and KMdiChildView::lastFirstFocusableChildWidget
+ */
+ virtual bool eventFilter( QObject *obj, QEvent *e );
+
+ /**
+ * If attached, the childframe will be activated and the MDI taskbar button will be pressed. Additionally, the
+ * memorized old focused child widget of this is focused again.
+ * Sends the focusInEventOccurs signal before changing the focus and the
+ * gotFocus signal after changing the focus.
+ */
+ virtual void focusInEvent( QFocusEvent *e );
+
+ /**
+ * Send the lostFocus signal
+ */
+ virtual void focusOutEvent( QFocusEvent *e );
+
+ /**
+ * Internally used for the minimize/maximize/restore mechanism when in attach mode.
+ */
+ virtual void resizeEvent( QResizeEvent *e );
+
+ void trackIconAndCaptionChanges( QWidget *view );
+
+protected slots:
+ void slot_childDestroyed();
+
+signals:
+ /**
+ * Internally used by KMdiChildView::attach to send it as command to the mainframe.
+ */
+ void attachWindow( KMdiChildView*, bool );
+
+ /**
+ * Internally used by KMdiChildView::detach to send it as command to the mainframe.
+ */
+ void detachWindow( KMdiChildView*, bool );
+
+ /**
+ * Is sent when this MDI child view is going to receive focus (before actually changing the focus).
+ * Internally used to send information to the mainframe that this MDI child view is focused.
+ * See KMdiChildView::focusInEvent
+ */
+ void focusInEventOccurs( KMdiChildView* );
+
+ /**
+ * Is sent when this MDI child has received the focus (after actually changing the focus).
+ * See KMdiChildView::focusInEvent
+ */
+ void gotFocus( KMdiChildView* );
+
+ /**
+ * Is sent when this MDI child was set to the activate view of all MDI views (after actually changing the focus).
+ * See KMdiChildView::activate
+ */
+ void activated( KMdiChildView* );
+
+ /** Is sent when this MDI child view has lost the focus (after actually changing the focus).
+ * See KMdiChildView::focusOutEvent
+ */
+ void lostFocus( KMdiChildView* );
+
+ /** Is sent when this MDI child view was deactivated (after actually changing the focus).
+ * See KMdiChildView::focusOutEvent
+ */
+ void deactivated( KMdiChildView* );
+
+ /**
+ * Internally used to send information to the mainframe that this MDI child view wants to be closed.
+ * See KMdiChildView::closeEvent and KMdiMainFrm::closeWindow
+ */
+ void childWindowCloseRequest( KMdiChildView* );
+
+ /**
+ * Emitted when the window caption is changed via KMdiChildView::setCaption or KMdiChildView::setMDICaption
+ */
+ void windowCaptionChanged( const QString& );
+
+ /**
+ * Emitted when the window caption is changed via KMdiChildView::setTabCaption or KMdiChildView::setMDICaption
+ */
+ void tabCaptionChanged( const QString& );
+
+ /**
+ * Internally used to send information to the mainframe that this MDI view is maximized now.
+ * Usually, the mainframe switches system buttons.
+ */
+ void mdiParentNowMaximized( bool );
+
+ /**
+ * Is automatically emitted when slot_clickedInWindowMenu is called
+ */
+ void clickedInWindowMenu( int );
+
+ /**
+ * Is automatically emitted when slot_clickedInDockMenu is called
+ */
+ void clickedInDockMenu( int );
+
+ /**
+ * Signals this has been maximized
+ */
+ void isMaximizedNow();
+
+ /**
+ * Signals this has been minimized
+ */
+ void isMinimizedNow();
+
+ /**
+ * Signals this has been restored (normalized)
+ */
+ void isRestoredNow();
+
+ /**
+ * Signals this has been attached
+ */
+ void isAttachedNow();
+
+ /**
+ * Signals this has been detached
+ */
+ void isDetachedNow();
+
+ void iconUpdated( QWidget*, QPixmap );
+ void captionUpdated( QWidget*, const QString& );
+
+
+private:
+ KMdiChildViewPrivate *d;
+ QWidget *m_trackChanges;
+};
+
+inline KMdiChildFrm *KMdiChildView::mdiParent() const
+{
+ QWidget * pw = parentWidget();
+ if ( pw != 0L )
+ if ( pw->inherits( "KMdiChildFrm" ) )
+ return ( KMdiChildFrm * ) pw;
+ return 0L;
+}
+
+#endif //_KMDICHILDVIEW_H_
+
+// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdidefines.h b/lib/compatibility/kmdi/qextmdi/kmdidefines.h
new file mode 100644
index 00000000..50343235
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdidefines.h
@@ -0,0 +1,117 @@
+//----------------------------------------------------------------------------
+// filename : kmdidefines.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Falk Brettschneider
+// and
+// Szymon Stefanek (stefanek@tin.it)
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+#ifndef _KMDI_DEFINES_H_
+#define _KMDI_DEFINES_H_
+
+#include <kdelibs_export.h>
+
+#define KMDI_CHILDFRM_SEPARATOR 2
+#define KMDI_CHILDFRM_BORDER 4
+#define KMDI_CHILDFRM_DOUBLE_BORDER 8
+#define KMDI_CHILDFRM_MIN_WIDTH 130
+
+//----------------------------------------------------------------------------
+/**
+* @short A namespace for the KMDI library
+*/
+namespace KMdi
+{
+ /** extent Qt events
+ @see QCustomEvent, QEvent::User
+ \code
+ bool B_MyWidget::event( QEvent* e) {
+ if( e->type() == QEvent::Type(QEvent::User + int(KMdi::EV_Move))) {
+ ...
+ }
+ ...
+ }
+ \endcode
+ */
+ enum EventType {
+ EV_Move=1,
+ EV_DragBegin,
+ EV_DragEnd,
+ EV_ResizeBegin,
+ EV_ResizeEnd
+ };
+
+ /**
+ * During KMdiMainFrm::addWindow the enum AddWindowFlags is used to determine how the view is initialy being added to the MDI system
+ */
+ enum AddWindowFlags {
+ /**
+ * standard is: show normal, attached, visible, document view (not toolview). Maximize, Minimize, Hide adds
+ * appropriately. Detach adds a view that appears toplevel, ToolWindow adds the view as tool view.
+ * That means it is stay-on-top and toplevel. UseKMdiSizeHint should use the restore geometry of the
+ * latest current top childframe but is not supported yet.
+ */
+ StandardAdd = 0,
+ Maximize = 1,
+ Minimize = 2,
+ Hide = 4,
+ Detach = 8,
+ ToolWindow = 16,
+ UseKMdiSizeHint = 32,
+ AddWindowFlags = 0xff
+ };
+
+ enum FrameDecor {
+ Win95Look = 0,
+ KDE1Look = 1,
+ KDELook = 2,
+ KDELaptopLook = 3
+ };
+
+ enum MdiMode {
+ UndefinedMode = 0,
+ ToplevelMode = 1,
+ ChildframeMode = 2,
+ TabPageMode = 3,
+ IDEAlMode = 4
+ };
+
+ enum TabWidgetVisibility {
+ AlwaysShowTabs = 0,
+ ShowWhenMoreThanOneTab = 1,
+ NeverShowTabs = 2
+ };
+
+ /**
+ * The style of the toolview tabs
+ * \since 3.3
+ */
+ enum ToolviewStyle {
+ /** Show only icons on the toolview tabs. The visible toolviews contain both the icon and text. */
+ IconOnly = 0,
+ /** Show only the text description on the toolview tabs. */
+ TextOnly = 1,
+ /** Show both the icon and description on the toolview tabs. */
+ TextAndIcon = 3
+ };
+} //namespace
+
+#endif //_KMDIDEFINES_H_
diff --git a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp
new file mode 100644
index 00000000..c1b1b03a
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp
@@ -0,0 +1,856 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002 Christoph Cullmann <cullmann@kde.org>
+ Copyright (C) 2002,2003 Joseph Wenninger <jowenn@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 "kmdimainfrm.h"
+#include "kmdidockcontainer.h"
+#include "kmdidockcontainer.moc"
+
+#include "kdockwidget_private.h"
+
+#include <qwidgetstack.h>
+#include <qlayout.h>
+#include <qtimer.h>
+#include <qtooltip.h>
+#include <kmultitabbar.h>
+#include <kglobalsettings.h>
+
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <kapplication.h>
+#include <kconfig.h>
+#include <klocale.h>
+
+//TODO: Well, this is already defined in kdeui/kdockwidget.cpp
+static const char* const kmdi_not_close_xpm[] =
+ {
+ "5 5 2 1",
+ "# c black",
+ ". c None",
+ "#####",
+ "#...#",
+ "#...#",
+ "#...#",
+ "#####"
+ };
+
+KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags )
+ : QWidget( parent ), KDockContainer()
+{
+ m_tabSwitching = false;
+ m_block = false;
+ m_inserted = -1;
+ m_mainWin = win;
+ oldtab = -1;
+ mTabCnt = 0;
+ m_position = position;
+ m_previousTab = -1;
+ m_separatorPos = 17;
+ m_movingState = NotMoving;
+ m_startEvent = 0;
+ kdDebug( 760 ) << k_funcinfo << endl;
+
+ QBoxLayout *l;
+ m_horizontal = ( ( position == KDockWidget::DockTop ) || ( position == KDockWidget::DockBottom ) );
+
+
+ if ( m_horizontal )
+ l = new QVBoxLayout( this ); //vertical layout for top and bottom docks
+ else
+ l = new QHBoxLayout( this ); //horizontal layout for left and right docks
+
+ l->setAutoAdd( false );
+
+ m_tb = new KMultiTabBar( m_horizontal ? KMultiTabBar::Horizontal : KMultiTabBar::Vertical, this );
+
+ m_tb->setStyle( KMultiTabBar::KMultiTabBarStyle( flags ) );
+ m_tb->showActiveTabTexts( true );
+
+ KMultiTabBar::KMultiTabBarPosition kmtbPos;
+ switch( position )
+ {
+ case KDockWidget::DockLeft:
+ kmtbPos = KMultiTabBar::Left;
+ break;
+ case KDockWidget::DockRight:
+ kmtbPos = KMultiTabBar::Right;
+ break;
+ case KDockWidget::DockTop:
+ kmtbPos = KMultiTabBar::Top;
+ break;
+ case KDockWidget::DockBottom:
+ kmtbPos = KMultiTabBar::Bottom;
+ break;
+ default:
+ kmtbPos = KMultiTabBar::Right;
+ break;
+ }
+ m_tb->setPosition( kmtbPos );
+
+ m_ws = new QWidgetStack( this );
+
+ m_ws->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+
+ //layout the tabbar
+ if ( position == KDockWidget::DockLeft || position == KDockWidget::DockTop )
+ {
+ //add the tabbar then the widget stack
+ l->add( m_tb );
+ l->add( m_ws );
+ }
+ else
+ {
+ //add the widget stack then the tabbar
+ l->add( m_ws );
+ l->add( m_tb );
+ }
+
+ l->activate();
+ m_ws->hide();
+
+}
+
+void KMdiDockContainer::setStyle( int style )
+{
+ if ( m_tb )
+ m_tb->setStyle( KMultiTabBar::KMultiTabBarStyle( style ) );
+}
+
+KMdiDockContainer::~KMdiDockContainer()
+{
+ QMap<KDockWidget*, int>::iterator it;
+ while ( m_map.count() )
+ {
+ it = m_map.begin();
+ KDockWidget *w = it.key();
+ if ( m_overlapButtons.contains( w ) )
+ {
+ ( static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[w] );
+ m_overlapButtons.remove( w );
+ }
+ m_map.remove( w );
+ w->undock();
+ }
+ deactivated( this );
+}
+
+
+void KMdiDockContainer::init()
+{
+ kdDebug( 760 ) << k_funcinfo << endl;
+ if ( !m_horizontal )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Horizontal tabbar. Setting forced fixed width." << endl;
+ parentDockWidget()->setForcedFixedWidth( m_tb->width() );
+ activateOverlapMode( m_tb->width() );
+ }
+ else
+ {
+ kdDebug( 760 ) << k_funcinfo << "Vertical tabbar. Setting forced fixed height." << endl;
+ parentDockWidget()->setForcedFixedHeight( m_tb->height() );
+ activateOverlapMode( m_tb->height() );
+ }
+
+ // try to restore splitter size
+ if ( parentDockWidget() && parentDockWidget()->parent() )
+ {
+ KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->qt_cast( "KDockSplitter" ) );
+ if ( sp )
+ sp->setSeparatorPosX( m_separatorPos );
+ }
+}
+
+KDockWidget* KMdiDockContainer::parentDockWidget()
+{
+ return ( ( KDockWidget* ) parent() );
+}
+
+void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const QString &text, int & )
+{
+ kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl;
+ KDockWidget* w = dwdg;
+ int tab;
+ bool alreadyThere = m_map.contains( w );
+
+ if ( alreadyThere )
+ {
+ tab = m_map[ w ];
+ if ( m_ws->addWidget( w, tab ) != tab )
+ kdDebug( 760 ) << "ERROR COULDN'T READD WIDGET" << endl;
+
+ kdDebug( 760 ) << k_funcinfo << "Readded widget " << dwdg << endl;
+ }
+ else
+ {
+ tab = m_ws->addWidget( w );
+ m_map.insert( w, tab );
+ m_revMap.insert( tab, w );
+
+ if ( ( ( KDockWidget* ) parentWidget() ) ->mayBeShow() )
+ ( ( KDockWidget* ) parentWidget() ) ->dockBack();
+
+ if ( w->getHeader()->qt_cast( "KDockWidgetHeader" ) )
+ {
+ kdDebug( 760 ) << k_funcinfo << "The dockwidget we're adding has a header" << endl;
+ kdDebug( 760 ) << k_funcinfo << "Adding our overlap mode button to it" << endl;
+
+ KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) );
+ KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
+
+ QToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
+
+ btn->setToggleButton( true );
+ btn->setPixmap( const_cast< const char** >( kmdi_not_close_xpm ) );
+ hdr->addButton( btn );
+ m_overlapButtons.insert( w, btn );
+ btn->setOn( !isOverlapMode() );
+
+ connect( btn, SIGNAL( clicked() ), this, SLOT( changeOverlapMode() ) );
+ }
+
+ m_tb->appendTab( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap, tab, w->tabPageLabel() );
+ m_tb->tab( tab )->installEventFilter( this );
+ kdDebug( 760 ) << k_funcinfo << "Added tab with label " << w->tabPageLabel() <<
+ " to the tabbar" << endl;
+
+ connect( m_tb->tab( tab ), SIGNAL( clicked( int ) ), this, SLOT( tabClicked( int ) ) );
+
+ mTabCnt++;
+ m_inserted = tab;
+ int dummy = 0;
+ KDockContainer::insertWidget( w, pixmap, text, dummy );
+ itemNames.append( w->name() );
+ tabCaptions.insert( w->name(), w->tabPageLabel() );
+ tabTooltips.insert( w->name(), w->toolTipString() );
+ }
+
+ //FB m_ws->raiseWidget(tab);
+}
+
+
+bool KMdiDockContainer::eventFilter( QObject *obj, QEvent *event )
+{
+ switch ( event->type() )
+ {
+ case QEvent::MouseButtonPress:
+ {
+ KMultiTabBarTab* kmtbTab = dynamic_cast<KMultiTabBarTab*>( obj );
+ if ( !obj )
+ {
+ kdDebug(760) << k_funcinfo << "Got a mouse button press but we have no tab" << endl;
+ break;
+ }
+
+ KDockWidget* w = m_revMap[ dynamic_cast<KMultiTabBarTab*>( obj )->id() ];
+ if ( !w )
+ {
+ kdDebug(760) << k_funcinfo << "Got a mouse button press but we have no widget" << endl;
+ break;
+ }
+
+ if ( !w->getHeader() )
+ {
+ kdDebug(760) << k_funcinfo << "Got a mouse button press but we have no header" << endl;
+ break;
+ }
+
+ KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) );
+ if ( !hdr )
+ {
+ kdDebug(760) << "Wrong header type in KMdiDockContainer::eventFilter" << endl;
+ break;
+ }
+
+ m_dockManager = w->dockManager();
+ m_dragPanel = hdr->dragPanel();
+
+ if ( m_dragPanel )
+ m_movingState = WaitingForMoveStart;
+
+ delete m_startEvent;
+ m_startEvent = new QMouseEvent( * ( ( QMouseEvent* ) event ) );
+ }
+ break;
+ case QEvent::MouseButtonRelease:
+ if ( m_movingState == Moving )
+ {
+ m_movingState = NotMoving;
+ QApplication::postEvent( m_dragPanel, new QMouseEvent( * ( ( QMouseEvent* ) event ) ) );
+ delete m_startEvent;
+ m_startEvent = 0;
+ }
+ case QEvent::MouseMove:
+ if ( m_movingState == WaitingForMoveStart )
+ {
+ QPoint p( ( ( QMouseEvent* ) event )->pos() - m_startEvent->pos() );
+ if ( p.manhattanLength() > KGlobalSettings::dndEventDelay() )
+ {
+ m_dockManager->eventFilter( m_dragPanel, m_startEvent );
+ m_dockManager->eventFilter( m_dragPanel, event );
+ m_movingState = Moving;
+ }
+ }
+ else if ( m_movingState == Moving )
+ m_dockManager->eventFilter( m_dragPanel, event );
+
+ break;
+ default:
+ break;
+
+ }
+ return false;
+
+}
+
+void KMdiDockContainer::showWidget( KDockWidget *w )
+{
+ if ( !m_map.contains( w ) )
+ return ;
+
+ int id = m_map[ w ];
+ m_tb->setTab( id, true );
+ tabClicked( id );
+}
+
+void KMdiDockContainer::changeOverlapMode()
+{
+ const KDockButton_Private * btn = dynamic_cast<const KDockButton_Private*>( sender() );
+
+ if ( !btn )
+ return ;
+
+ if ( !btn->isOn() )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Activating overlap mode" << endl;
+ if ( !m_horizontal )
+ activateOverlapMode( m_tb->width() );
+ else
+ activateOverlapMode( m_tb->height() );
+
+ }
+ else
+ {
+ kdDebug( 760 ) << k_funcinfo << "Deactivating overlap mode" << endl;
+ deactivateOverlapMode();
+ }
+
+ QMap<KDockWidget*, KDockButton_Private*>::iterator it;
+ for ( it = m_overlapButtons.begin(); it != m_overlapButtons.end(); ++it )
+ it.data()->setOn( !isOverlapMode() );
+}
+
+void KMdiDockContainer::hideIfNeeded()
+{
+ if ( itemNames.count() == 0 )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Hiding the dock container" << endl;
+ ( ( KDockWidget* ) parentWidget() )->undock();
+ }
+}
+
+void KMdiDockContainer::removeWidget( KDockWidget* dwdg )
+{
+ KDockWidget * w = dwdg;
+ if ( !m_map.contains( w ) )
+ return; //we don't have this widget in our container
+
+ kdDebug( 760 ) << k_funcinfo << endl;
+ //lower the tab. ( TODO: needed? )
+ int id = m_map[ w ];
+ if ( m_tb->isTabRaised( id ) )
+ {
+ m_tb->setTab( id, false );
+ tabClicked( id );
+ }
+
+ m_tb->removeTab( id );
+ m_ws->removeWidget( w );
+ m_map.remove( w );
+ m_revMap.remove( id );
+ if ( m_overlapButtons.contains( w ) )
+ {
+ ( static_cast<KDockWidgetHeader*>( w->getHeader() ->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[ w ] );
+ m_overlapButtons.remove( w );
+ }
+ KDockContainer::removeWidget( w );
+ itemNames.remove( w->name() );
+ tabCaptions.remove( w->name() );
+ tabTooltips.remove( w->name() );
+ hideIfNeeded();
+}
+
+void KMdiDockContainer::undockWidget( KDockWidget *dwdg )
+{
+ KDockWidget * w = dwdg;
+
+ if ( !m_map.contains( w ) )
+ return ;
+
+ int id = m_map[ w ];
+ if ( m_tb->isTabRaised( id ) )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Widget has been undocked, setting tab down" << endl;
+ m_tb->setTab( id, false );
+ tabClicked( id );
+ }
+}
+
+void KMdiDockContainer::tabClicked( int t )
+{
+ bool call_makeVisible = !m_tabSwitching;
+ m_tabSwitching = true;
+ if ( m_tb->isTabRaised( t ) )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Tab " << t << " was just activated" << endl;
+ if ( m_ws->isHidden() )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Showing widgetstack for tab just clicked" << endl;
+ m_ws->show();
+ parentDockWidget()->restoreFromForcedFixedSize();
+ }
+
+ if ( !m_ws->widget( t ) )
+ {
+ kdDebug( 760 ) << k_funcinfo << "Widget tab was clicked for is not in our stack" << endl;
+ kdDebug( 760 ) << k_funcinfo << "Docking it back in" << endl;
+ m_revMap[t]->manualDock( parentDockWidget(), KDockWidget::DockCenter, 20 );
+ if ( call_makeVisible )
+ m_revMap[t]->makeDockVisible();
+ m_tabSwitching = false;
+ emit activated( this );
+ return ;
+ }
+
+ if ( m_ws->widget( t ) )
+ {
+ m_ws->raiseWidget( t );
+ KDockWidget * tmpDw = static_cast<KDockWidget*>( m_ws->widget( t )->qt_cast( "KDockWidget" ) );
+ if ( tmpDw )
+ {
+ if ( tmpDw->getWidget() )
+ tmpDw->getWidget()->setFocus();
+ }
+ else
+ kdDebug( 760 ) << k_funcinfo << "Something really weird is going on" << endl;
+ }
+ else
+ kdDebug( 760 ) << k_funcinfo << "We have no widget to handle in our stack." << endl;
+
+ if ( oldtab != t )
+ m_tb->setTab( oldtab, false );
+
+ m_tabSwitching = true;
+ oldtab = t;
+ emit activated( this );
+ }
+ else
+ {
+ kdDebug( 760 ) << k_funcinfo << "Tab " << t << " was just deactiviated" << endl;
+ // try save splitter position
+ if ( parentDockWidget() && parentDockWidget()->parent() )
+ {
+ KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->qt_cast( "KDockSplitter" ) );
+ if ( sp )
+ m_separatorPos = sp->separatorPos();
+ }
+ m_previousTab = t;
+ // oldtab=-1;
+ if ( m_block )
+ return ;
+ emit deactivated( this );
+ m_block = true;
+ if ( m_ws->widget( t ) )
+ {
+ // ((KDockWidget*)m_ws->widget(t))->undock();
+ }
+ m_block = false;
+ m_ws->hide ();
+
+
+ kdDebug( 760 ) << k_funcinfo << "Fixed Width:" << m_tb->width() << endl;
+ if ( !m_horizontal )
+ parentDockWidget()->setForcedFixedWidth( m_tb->width() ); // strange why it worked before at all
+ else
+ parentDockWidget()->setForcedFixedHeight( m_tb->height() ); // strange why it worked before at all
+ }
+ m_tabSwitching = false;
+}
+
+void KMdiDockContainer::setToolTip ( KDockWidget* w, QString &s )
+{
+ kdDebug( 760 ) << k_funcinfo << "Setting tooltip '" << s << "' for widget " << w << endl;
+ int tabId = m_map[w];
+ KMultiTabBarTab *mbTab = m_tb->tab( tabId );
+ QToolTip::remove( mbTab );
+ QToolTip::add( mbTab, s );
+}
+
+void KMdiDockContainer::setPixmap( KDockWidget* widget , const QPixmap& pixmap )
+{
+ int id = m_ws->id( widget );
+ if ( id == -1 )
+ return ;
+ KMultiTabBarTab *tab = m_tb->tab( id );
+ tab->setIcon( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap );
+}
+
+void KMdiDockContainer::save( QDomElement& dockEl )
+{
+ QDomDocument doc = dockEl.ownerDocument();
+ QDomElement el;
+ el = doc.createElement( "name" );
+ el.appendChild( doc.createTextNode( QString( "%1" ).arg( parent() ->name() ) ) );
+ dockEl.appendChild( el );
+ el = doc.createElement( "overlapMode" );
+ el.appendChild( doc.createTextNode( isOverlapMode() ? "true" : "false" ) );
+ dockEl.appendChild( el );
+ QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ QPtrListIterator<KMultiTabBarTab> it( *tl );
+ QStringList::Iterator it2 = itemNames.begin();
+ int i = 0;
+ for ( ;it.current() != 0;++it, ++it2 )
+ {
+ el = doc.createElement( "child" );
+ el.setAttribute( "pos", QString( "%1" ).arg( i ) );
+ QString s = tabCaptions[ *it2 ];
+ if ( !s.isEmpty() )
+ {
+ el.setAttribute( "tabCaption", s );
+ }
+ s = tabTooltips[ *it2 ];
+ if ( !s.isEmpty() )
+ {
+ el.setAttribute( "tabTooltip", s );
+ }
+ el.appendChild( doc.createTextNode( *it2 ) );
+ dockEl.appendChild( el );
+ if ( m_tb->isTabRaised( it.current() ->id() ) )
+ {
+ QDomElement el2 = doc.createElement( "raised" );
+ el2.appendChild( doc.createTextNode( m_ws->widget( it.current() ->id() ) ->name() ) );
+ el.appendChild( el2 );
+ }
+ ++i;
+ }
+
+
+}
+
+void KMdiDockContainer::load( QDomElement& dockEl )
+{
+ QString raise;
+
+ for ( QDomNode n = dockEl.firstChild();!n.isNull();n = n.nextSibling() )
+ {
+ QDomElement el = n.toElement();
+ if ( el.isNull() )
+ continue;
+ if ( el.tagName() == "overlapMode" )
+ {
+ if ( el.attribute( "overlapMode" ) != "false" )
+ activateOverlapMode( m_tb->width() );
+ else
+ deactivateOverlapMode();
+ }
+ else if ( el.tagName() == "child" )
+ {
+ KDockWidget * dw = ( ( KDockWidget* ) parent() ) ->dockManager() ->getDockWidgetFromName( el.text() );
+ if ( dw )
+ {
+ if ( el.hasAttribute( "tabCaption" ) )
+ {
+ dw->setTabPageLabel( el.attribute( "tabCaption" ) );
+ }
+ if ( el.hasAttribute( "tabTooltip" ) )
+ {
+ dw->setToolTipString( el.attribute( "tabTooltip" ) );
+ }
+ dw->manualDock( ( KDockWidget* ) parent(), KDockWidget::DockCenter );
+ }
+ }
+ }
+
+ QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ QPtrListIterator<KMultiTabBarTab> it1( *tl );
+ m_ws->hide();
+ if ( !m_horizontal )
+ parentDockWidget()->setForcedFixedWidth( m_tb->width() );
+ else
+ parentDockWidget()->setForcedFixedHeight( m_tb->height() );
+
+ for ( ;it1.current() != 0;++it1 )
+ m_tb->setTab( it1.current() ->id(), false );
+
+ kapp->syncX();
+ m_delayedRaise = -1;
+
+ for ( QMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
+ it != m_overlapButtons.end();++it )
+ it.data() ->setOn( !isOverlapMode() );
+
+ if ( !raise.isEmpty() )
+ {
+ for ( QMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
+ {
+ if ( it.key() ->name() == raise )
+ {
+ m_delayedRaise = it.data();
+ QTimer::singleShot( 0, this, SLOT( delayedRaise() ) );
+ kdDebug( 760 ) << k_funcinfo << "raising " << it.key()->name() << endl;
+ break;
+ }
+ }
+
+ }
+ if ( m_delayedRaise == -1 )
+ QTimer::singleShot( 0, this, SLOT( init() ) );
+}
+
+void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix )
+{
+ QString grp = cfg->group();
+ cfg->deleteGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) );
+ cfg->setGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) );
+
+ if ( isOverlapMode() )
+ cfg->writeEntry( "overlapMode", "true" );
+ else
+ cfg->writeEntry( "overlapMode", "false" );
+
+ // try to save the splitter position
+ if ( parentDockWidget() && parentDockWidget() ->parent() )
+ {
+ KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget() ->
+ parent() ->qt_cast( "KDockSplitter" ) );
+ if ( sp )
+ cfg->writeEntry( "separatorPos", m_separatorPos );
+ }
+
+ QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ QPtrListIterator<KMultiTabBarTab> it( *tl );
+ QStringList::Iterator it2 = itemNames.begin();
+ int i = 0;
+ for ( ;it.current() != 0;++it, ++it2 )
+ {
+ // cfg->writeEntry(QString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
+ cfg->writeEntry( QString( "widget%1" ).arg( i ), ( *it2 ) );
+ QString s = tabCaptions[ *it2 ];
+ if ( !s.isEmpty() )
+ {
+ cfg->writeEntry( QString( "widget%1-tabCaption" ).arg( i ), s );
+ }
+ s = tabTooltips[ *it2 ];
+ if ( !s.isEmpty() )
+ {
+ cfg->writeEntry( QString( "widget%1-tabTooltip" ).arg( i ), s );
+ }
+ // kdDebug(760)<<"****************************************Saving: "<<m_ws->widget(it.current()->id())->name()<<endl;
+ if ( m_tb->isTabRaised( it.current() ->id() ) )
+ cfg->writeEntry( m_ws->widget( it.current() ->id() ) ->name(), true );
+ ++i;
+ }
+ cfg->sync();
+ cfg->setGroup( grp );
+
+}
+
+void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
+{
+ QString grp = cfg->group();
+ cfg->setGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) );
+
+ if ( cfg->readEntry( "overlapMode" ) != "false" )
+ activateOverlapMode( m_tb->width() );
+ else
+ deactivateOverlapMode();
+
+ m_separatorPos = cfg->readNumEntry( "separatorPos", 18 );
+
+ int i = 0;
+ QString raise;
+ while ( true )
+ {
+ QString dwn = cfg->readEntry( QString( "widget%1" ).arg( i ) );
+ if ( dwn.isEmpty() )
+ break;
+ kdDebug( 760 ) << k_funcinfo << "configuring dockwidget :" << dwn << endl;
+ KDockWidget *dw = ( ( KDockWidget* ) parent() ) ->dockManager() ->getDockWidgetFromName( dwn );
+ if ( dw )
+ {
+ QString s = cfg->readEntry( QString( "widget%1-tabCaption" ).arg( i ) );
+ if ( !s.isEmpty() )
+ {
+ dw->setTabPageLabel( s );
+ }
+ s = cfg->readEntry( QString( "widget%1-tabTooltip" ).arg( i ) );
+ if ( !s.isEmpty() )
+ {
+ dw->setToolTipString( s );
+ }
+ dw->manualDock( ( KDockWidget* ) parent(), KDockWidget::DockCenter );
+ }
+ if ( cfg->readBoolEntry( dwn, false ) )
+ raise = dwn;
+ i++;
+
+ }
+
+ QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ QPtrListIterator<KMultiTabBarTab> it1( *tl );
+ m_ws->hide();
+ if ( !m_horizontal )
+ parentDockWidget() ->setForcedFixedWidth( m_tb->width() );
+ else
+ parentDockWidget() ->setForcedFixedHeight( m_tb->height() );
+ for ( ;it1.current() != 0;++it1 )
+ {
+ m_tb->setTab( it1.current() ->id(), false );
+ }
+ kapp->syncX();
+ m_delayedRaise = -1;
+
+ for ( QMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
+ it != m_overlapButtons.end();++it )
+ it.data() ->setOn( !isOverlapMode() );
+
+ if ( !raise.isEmpty() )
+ {
+ for ( QMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
+ {
+ if ( it.key() ->name() == raise )
+ {
+ /* tabClicked(it.data());
+ m_tb->setTab(it.data(),true);
+ tabClicked(it.data());
+ m_ws->raiseWidget(it.key());
+ kapp->sendPostedEvents();
+ kapp->syncX();*/
+
+ m_delayedRaise = it.data();
+ QTimer::singleShot( 0, this, SLOT( delayedRaise() ) );
+ kdDebug( 760 ) << k_funcinfo << "raising" << it.key() ->name() << endl;
+ break;
+ }
+ }
+
+ }
+ if ( m_delayedRaise == -1 )
+ QTimer::singleShot( 0, this, SLOT( init() ) );
+ cfg->setGroup( grp );
+
+}
+
+void KMdiDockContainer::delayedRaise()
+{
+ m_tb->setTab( m_delayedRaise, true );
+ tabClicked( m_delayedRaise );
+}
+
+void KMdiDockContainer::collapseOverlapped()
+{
+ //don't collapse if we're switching tabs
+ if ( m_tabSwitching )
+ return;
+
+ if ( isOverlapMode() )
+ {
+ QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ QPtrListIterator<KMultiTabBarTab> it( *tl );
+ for ( ;it.current();++it )
+ {
+ if ( it.current()->isOn() )
+ {
+ kdDebug( 760 ) << k_funcinfo << "lowering tab with id " << ( *it )->id() << endl;
+ it.current()->setState( false );
+ tabClicked( ( *it )->id() );
+ }
+ }
+ }
+}
+
+void KMdiDockContainer::toggle()
+{
+ kdDebug( 760 ) << k_funcinfo << endl;
+
+ if ( m_tb->isTabRaised( oldtab ) )
+ {
+ kdDebug( 760 ) << k_funcinfo << "lowering tab" << endl;
+ m_tb->setTab( oldtab, false );
+ tabClicked( oldtab );
+ KMdiMainFrm *mainFrm = dynamic_cast<KMdiMainFrm*>( m_mainWin );
+ if ( mainFrm && mainFrm->activeWindow() )
+ mainFrm->activeWindow()->setFocus();
+ }
+ else
+ {
+ kdDebug( 760 ) << k_funcinfo << "raising tab" << endl;
+ if ( m_tb->tab( m_previousTab ) == 0 )
+ {
+ if ( m_tb->tabs() ->count() == 0 )
+ return ;
+
+ m_previousTab = m_tb->tabs() ->getFirst() ->id();
+ }
+ m_tb->setTab( m_previousTab, true );
+ tabClicked( m_previousTab );
+ }
+}
+
+void KMdiDockContainer::prevToolView()
+{
+ kdDebug( 760 ) << k_funcinfo << endl;
+ QPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
+ int pos = tabs->findRef( m_tb->tab( oldtab ) );
+
+ if ( pos == -1 )
+ return ;
+
+ pos--;
+ if ( pos < 0 )
+ pos = tabs->count() - 1;
+
+ KMultiTabBarTab *tab = tabs->at( pos );
+ if ( !tab )
+ return ; //can never happen here, but who knows
+
+ m_tb->setTab( tab->id(), true );
+ tabClicked( tab->id() );
+}
+
+void KMdiDockContainer::nextToolView()
+{
+ kdDebug( 760 ) << k_funcinfo << endl;
+ QPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
+ int pos = tabs->findRef( m_tb->tab( oldtab ) );
+
+ if ( pos == -1 )
+ return ;
+
+ pos++;
+ if ( pos >= ( int ) tabs->count() )
+ pos = 0;
+
+ KMultiTabBarTab *tab = tabs->at( pos );
+ if ( !tab )
+ return ; //can never happen here, but who knows
+
+ m_tb->setTab( tab->id(), true );
+ tabClicked( tab->id() );
+}
+
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h
new file mode 100644
index 00000000..917dac4d
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h
@@ -0,0 +1,167 @@
+ /* This file is part of the KDE project
+ Copyright (C) 2002 Christoph Cullmann <cullmann@kde.org>
+ Copyright (C) 2002,2003 Joseph Wenninger <jowenn@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.
+*/
+
+#ifndef _KMDI_DOCK_CONTAINER_
+#define _KMDI_DOCK_CONTAINER_
+
+#include <qwidget.h>
+#include <qstringlist.h>
+#include <kdockwidget.h>
+#include <qmap.h>
+#include <qdom.h>
+
+# include <kdockwidget_p.h>
+
+#include <qpushbutton.h>
+
+class QWidgetStack;
+class KMultiTabBar;
+class KDockButton_Private;
+
+class KMDI_EXPORT KMdiDockContainer: public QWidget, public KDockContainer
+{
+ Q_OBJECT
+
+public:
+ KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags );
+ virtual ~KMdiDockContainer();
+
+ /** Get the KDockWidget that is our parent */
+ KDockWidget *parentDockWidget();
+
+ /**
+ * Add a widget to this container
+ * \param w the KDockWidget we are adding
+ */
+ virtual void insertWidget ( KDockWidget *w, QPixmap, const QString &, int & );
+
+ /**
+ * Show a widget.
+ *
+ * The widget has to belong to this container otherwise
+ * it will not be shown
+ * \param w the KDockWidget to show
+ */
+ virtual void showWidget ( KDockWidget *w );
+
+ /**
+ * Set the tooltip for the widget.
+ * Currently, this method does nothing
+ */
+ virtual void setToolTip ( KDockWidget *, QString & );
+
+ /**
+ * Set the pixmap for the widget.
+ */
+ virtual void setPixmap( KDockWidget* widget, const QPixmap& pixmap );
+
+ /**
+ * Undock the widget from the container.
+ */
+ virtual void undockWidget( KDockWidget* dwdg );
+
+ /**
+ * Remove a widget from the container. The caller of this function
+ * is responsible for deleting the widget
+ */
+ virtual void removeWidget( KDockWidget* );
+
+ /**
+ * Hide the the dock container if the number of items is 0
+ */
+ void hideIfNeeded();
+
+ /**
+ * Save the config using a KConfig object
+ *
+ * The combination of the group_or_prefix variable and the parent
+ * dockwidget's name will be the group the configuration is saved in
+ * \param group_or_prefix the prefix to append to the parent dockwidget's name
+ */
+ virtual void save( KConfig *, const QString& group_or_prefix );
+
+ /**
+ * Load the config using a KConfig object
+ *
+ * The combination of the group_or_prefix variable and the parent
+ * dockwidget's name will be the group the configuration is loaded from
+ * \param group_or_prefix the prefix to append to the parent dockwidget's name
+ */
+ virtual void load( KConfig *, const QString& group_or_prefix );
+
+ /**
+ * Save the config to a QDomElement
+ */
+ virtual void save( QDomElement& );
+
+ /**
+ * Load the config from a QDomElement
+ */
+ virtual void load( QDomElement& );
+
+ /**
+ * Set the style for the tabbar
+ */
+ void setStyle( int );
+
+protected:
+ bool eventFilter( QObject*, QEvent* );
+
+public slots:
+ void init();
+ void collapseOverlapped();
+ void toggle();
+ void nextToolView();
+ void prevToolView();
+protected slots:
+ void tabClicked( int );
+ void delayedRaise();
+ void changeOverlapMode();
+private:
+ QWidget *m_mainWin;
+ QWidgetStack *m_ws;
+ KMultiTabBar *m_tb;
+ int mTabCnt;
+ int oldtab;
+ int m_previousTab;
+ int m_position;
+ int m_separatorPos;
+ QMap<KDockWidget*, int> m_map;
+ QMap<int, KDockWidget*> m_revMap;
+ QMap<KDockWidget*, KDockButton_Private*> m_overlapButtons;
+ QStringList itemNames;
+ QMap<QString, QString> tabCaptions;
+ QMap<QString, QString> tabTooltips;
+ int m_inserted;
+ int m_delayedRaise;
+ bool m_horizontal;
+ bool m_block;
+ bool m_tabSwitching;
+ QObject *m_dragPanel;
+ KDockManager *m_dockManager;
+ QMouseEvent *m_startEvent;
+ enum MovingState {NotMoving = 0, WaitingForMoveStart, Moving} m_movingState;
+signals:
+ void activated( KMdiDockContainer* );
+ void deactivated( KMdiDockContainer* );
+};
+
+#endif
+
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp
new file mode 100644
index 00000000..8b88fb2c
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp
@@ -0,0 +1,152 @@
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#include <ktabbar.h>
+#include <kpopupmenu.h>
+#include "kmdidocumentviewtabwidget.h"
+
+KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( QWidget* parent, const char* name ) : KTabWidget( parent, name )
+{
+ m_visibility = KMdi::ShowWhenMoreThanOneTab;
+ tabBar() ->hide();
+#ifndef Q_WS_WIN //todo
+
+ setHoverCloseButton( true );
+#endif
+
+ connect( this, SIGNAL( closeRequest( QWidget* ) ), this, SLOT( closeTab( QWidget* ) ) );
+}
+
+KMdiDocumentViewTabWidget::~KMdiDocumentViewTabWidget()
+{}
+
+void KMdiDocumentViewTabWidget::closeTab( QWidget* w )
+{
+ w->close();
+}
+void KMdiDocumentViewTabWidget::addTab ( QWidget * child, const QString & label )
+{
+ KTabWidget::addTab( child, label );
+ showPage( child );
+ maybeShow();
+}
+
+void KMdiDocumentViewTabWidget::addTab ( QWidget * child, const QIconSet & iconset, const QString & label )
+{
+ KTabWidget::addTab( child, iconset, label );
+ showPage( child );
+ maybeShow();
+}
+
+void KMdiDocumentViewTabWidget::addTab ( QWidget * child, QTab * tab )
+{
+ KTabWidget::addTab( child, tab );
+ showPage( child );
+ maybeShow();
+}
+
+void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QString & label, int index )
+{
+ KTabWidget::insertTab( child, label, index );
+ showPage( child );
+ maybeShow();
+ tabBar() ->repaint();
+}
+
+void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index )
+{
+ KTabWidget::insertTab( child, iconset, label, index );
+ showPage( child );
+ maybeShow();
+ tabBar() ->repaint();
+}
+
+void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, QTab * tab, int index )
+{
+ KTabWidget::insertTab( child, tab, index );
+ showPage( child );
+ maybeShow();
+ tabBar() ->repaint();
+}
+
+void KMdiDocumentViewTabWidget::removePage ( QWidget * w )
+{
+ KTabWidget::removePage( w );
+ maybeShow();
+}
+
+void KMdiDocumentViewTabWidget::updateIconInView( QWidget *w, QPixmap icon )
+{
+ changeTab( w, icon, tabLabel( w ) );
+}
+
+void KMdiDocumentViewTabWidget::updateCaptionInView( QWidget *w, const QString &caption )
+{
+ changeTab( w, caption );
+}
+
+void KMdiDocumentViewTabWidget::maybeShow()
+{
+ if ( m_visibility == KMdi::AlwaysShowTabs )
+ {
+ tabBar() ->show();
+ if ( cornerWidget() )
+ {
+ if ( count() == 0 )
+ cornerWidget() ->hide();
+ else
+ cornerWidget() ->show();
+ }
+ }
+
+ if ( m_visibility == KMdi::ShowWhenMoreThanOneTab )
+ {
+ if ( count() < 2 )
+ tabBar() ->hide();
+ if ( count() > 1 )
+ tabBar() ->show();
+ if ( cornerWidget() )
+ {
+ if ( count() < 2 )
+ cornerWidget() ->hide();
+ else
+ cornerWidget() ->show();
+ }
+ }
+
+ if ( m_visibility == KMdi::NeverShowTabs )
+ {
+ tabBar() ->hide();
+ }
+}
+
+void KMdiDocumentViewTabWidget::setTabWidgetVisibility( KMdi::TabWidgetVisibility visibility )
+{
+ m_visibility = visibility;
+ maybeShow();
+}
+
+void KMdiDocumentViewTabWidget::moveTab( int from, int to )
+{
+ emit initiateTabMove( from, to );
+ KTabWidget::moveTab( from, to );
+}
+
+KMdi::TabWidgetVisibility KMdiDocumentViewTabWidget::tabWidgetVisibility( )
+{
+ return m_visibility;
+}
+
+
+#ifndef NO_INCLUDE_MOCFILES
+#include "kmdidocumentviewtabwidget.moc"
+#endif
+
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h
new file mode 100644
index 00000000..b745bfa3
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h
@@ -0,0 +1,123 @@
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#ifndef _KMDI_DOCUMENT_VIEW_TAB_WIDGET_H_
+#define _KMDI_DOCUMENT_VIEW_TAB_WIDGET_H_
+
+#include <ktabwidget.h>
+#include <kmdidefines.h>
+
+class KPopupMenu;
+
+//KDE4: Add a d pointer
+/**
+ * A reimplementation of KTabWidget for KMDI
+ */
+class KMDI_EXPORT KMdiDocumentViewTabWidget:
+ public KTabWidget
+{
+ Q_OBJECT
+public:
+ KMdiDocumentViewTabWidget( QWidget* parent, const char* name = 0 );
+ ~KMdiDocumentViewTabWidget();
+
+ /**
+ * Add a tab into the tabwidget
+ * \sa QTabWidget
+ * \sa KTabWidget
+ */
+ virtual void addTab ( QWidget * child, const QString & label );
+
+ /**
+ * Add a tab into the tabwidget
+ * \sa QTabWidget
+ * \sa KTabWidget
+ */
+ virtual void addTab ( QWidget * child, const QIconSet & iconset, const QString & label );
+
+ /**
+ * Add a tab into the tabwidget
+ * \sa QTabWidget
+ * \sa KTabWidget
+ */
+ virtual void addTab ( QWidget * child, QTab * tab );
+
+ /**
+ * Insert a tab into the tabwidget with a label
+ * \sa QTabWidget
+ * \sa KTabWidget
+ */
+ virtual void insertTab ( QWidget * child, const QString & label, int index = -1 );
+
+ /**
+ * Inserts a tab into the tabwidget with an icon and label
+ * \sa QTabWidget
+ * \sa KTabWidget
+ */
+ virtual void insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 );
+
+ /**
+ * Inserts a tab into the tabwidget
+ * \sa QTabWidget
+ * \sa KTabWidget
+ */
+ virtual void insertTab ( QWidget * child, QTab * tab, int index = -1 );
+
+ /**
+ * Removes the tab from the tabwidget
+ * \sa QTabWidget
+ * \sa KTabWidget
+ */
+ virtual void removePage ( QWidget * w );
+
+ /**
+ * Set the tab widget's visibility and then make the change
+ * to match the new setting
+ */
+ KMdi::TabWidgetVisibility tabWidgetVisibility();
+
+ /** Get the tab widget's visibility */
+ void setTabWidgetVisibility( KMdi::TabWidgetVisibility );
+
+private slots:
+
+ /** Close the tab specified by w */
+ void closeTab( QWidget* w );
+
+ /** Moves a tab. Reimplemented for internal reasons. */
+ void moveTab( int from, int to );
+
+public slots:
+
+ /** Change the icon for the tab */
+ void updateIconInView( QWidget*, QPixmap );
+
+ /** Change the caption for the tab */
+ void updateCaptionInView( QWidget*, const QString& );
+
+private:
+
+ /**
+ * Determine whether or not we should show the tab bar
+ * The tab bar is hidden if it's determined that it should be hidden
+ * and shown if it's determined that it should be shown
+ */
+ void maybeShow();
+
+ KMdi::TabWidgetVisibility m_visibility;
+
+signals:
+ void initiateTabMove(int, int);
+};
+
+
+
+#endif
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp
new file mode 100644
index 00000000..c5a7578c
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp
@@ -0,0 +1,75 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Joseph Wenninger <jowenn@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 "kmdifocuslist.h"
+#include "kmdifocuslist.moc"
+#include <qobjectlist.h>
+#include <kdebug.h>
+
+KMdiFocusList::KMdiFocusList( QObject *parent ) : QObject( parent )
+{}
+
+KMdiFocusList::~KMdiFocusList()
+{}
+
+void KMdiFocusList::addWidgetTree( QWidget* w )
+{
+ //this method should never be called twice on the same hierarchy
+ m_list.insert( w, w->focusPolicy() );
+ w->setFocusPolicy( QWidget::ClickFocus );
+ kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding toplevel" << endl;
+ connect( w, SIGNAL( destroyed( QObject * ) ), this, SLOT( objectHasBeenDestroyed( QObject* ) ) );
+ QObjectList *l = w->queryList( "QWidget" );
+ QObjectListIt it( *l );
+ QObject *obj;
+ while ( ( obj = it.current() ) != 0 )
+ {
+ QWidget * wid = ( QWidget* ) obj;
+ m_list.insert( wid, wid->focusPolicy() );
+ wid->setFocusPolicy( QWidget::ClickFocus );
+ kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding widget" << endl;
+ connect( wid, SIGNAL( destroyed( QObject * ) ), this, SLOT( objectHasBeenDestroyed( QObject* ) ) );
+ ++it;
+ }
+ delete l;
+}
+
+void KMdiFocusList::restore()
+{
+#if (QT_VERSION-0 >= 0x030200)
+ for ( QMap<QWidget*, QWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
+ {
+#else
+ for ( QMap<QWidget*, QWidget::FocusPolicy>::iterator it = m_list.begin();it != m_list.end();++it )
+ {
+#endif
+ it.key() ->setFocusPolicy( it.data() );
+ }
+ m_list.clear();
+}
+
+
+void KMdiFocusList::objectHasBeenDestroyed( QObject * o )
+{
+ if ( !o || !o->isWidgetType() )
+ return ;
+ QWidget *w = ( QWidget* ) o;
+ m_list.remove( w );
+}
+
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h
new file mode 100644
index 00000000..fbc178d1
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h
@@ -0,0 +1,42 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Joseph Wenninger <jowenn@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.
+*/
+#ifndef KMDI_FOCUS_LIST
+#define KMDI_FOCUS_LIST
+
+#include <qobject.h>
+#include <qmap.h>
+#include <qwidget.h>
+#include <kdelibs_export.h>
+
+class KMDI_EXPORT KMdiFocusList: public QObject
+{
+ Q_OBJECT
+public:
+ KMdiFocusList( QObject *parent );
+ ~KMdiFocusList();
+ void addWidgetTree( QWidget* );
+ void restore();
+protected slots:
+ void objectHasBeenDestroyed( QObject* );
+private:
+ QMap<QWidget*, QWidget::FocusPolicy> m_list;
+
+};
+
+#endif
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp
new file mode 100644
index 00000000..ec00ec78
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp
@@ -0,0 +1,320 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org>
+ based on ktoolbarhandler.cpp: Copyright (C) 2002 Simon Hausmann <hausmann@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 "kmdiguiclient.h"
+#include "kmdiguiclient.moc"
+
+#include <qpopupmenu.h>
+#include <kapplication.h>
+#include <kconfig.h>
+#include <ktoolbar.h>
+#include <kmainwindow.h>
+#include <klocale.h>
+#include <kaction.h>
+#include <qstring.h>
+#include <assert.h>
+#include <kdebug.h>
+#include <kdockwidget.h>
+#include <kdeversion.h>
+#include "kmdimainfrm.h"
+#include "kmditoolviewaccessor.h"
+#include "kmditoolviewaccessor_p.h"
+namespace
+{
+const char *actionListName = "show_kmdi_document_tool_view_actions";
+
+const char *guiDescription = ""
+ "<!DOCTYPE kpartgui><kpartgui name=\"KMDIViewActions\">"
+ "<MenuBar>"
+ " <Menu name=\"view\">"
+ " <ActionList name=\"%1\" />"
+ " </Menu>"
+ "</MenuBar>"
+ "</kpartgui>";
+
+const char *resourceFileName = "kmdiviewactions.rc";
+
+}
+
+
+using namespace KMDIPrivate;
+
+
+
+ToggleToolViewAction::ToggleToolViewAction( const QString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm,
+ QObject* parent, const char* name )
+ : KToggleAction( text, cut, parent, name ), m_dw( dw ), m_mdiMainFrm( mdiMainFrm )
+{
+ if ( m_dw )
+ {
+ connect( this, SIGNAL( toggled( bool ) ), this, SLOT( slotToggled( bool ) ) );
+ connect( m_dw->dockManager(), SIGNAL( change() ), this, SLOT( anDWChanged() ) );
+ connect( m_dw, SIGNAL( destroyed() ), this, SLOT( slotWidgetDestroyed() ) );
+ setChecked( m_dw->mayBeHide() );
+ }
+}
+
+
+ToggleToolViewAction::~ToggleToolViewAction()
+{
+ unplugAll();
+}
+
+void ToggleToolViewAction::anDWChanged()
+{
+ if ( isChecked() && m_dw->mayBeShow() )
+ setChecked( false );
+ else if ( ( !isChecked() ) && m_dw->mayBeHide() )
+ setChecked( true );
+ else if ( isChecked() && ( m_dw->parentDockTabGroup() &&
+ ( ( static_cast<KDockWidget*>( m_dw->parentDockTabGroup() ->
+ parent() ->qt_cast( "KDockWidget" ) ) ) ->mayBeShow() ) ) )
+ setChecked( false );
+}
+
+
+void ToggleToolViewAction::slotToggled( bool t )
+{
+ // m_mw->mainDock->setDockSite( KDockWidget::DockCorner );
+
+ if ( ( !t ) && m_dw->mayBeHide() )
+ m_dw->undock();
+ else
+ if ( t && m_dw->mayBeShow() )
+ m_mdiMainFrm->makeDockVisible( m_dw );
+
+ // m_mw->mainDock->setDockSite( KDockWidget::DockNone );
+}
+
+void ToggleToolViewAction::slotWidgetDestroyed()
+{
+ disconnect( m_dw->dockManager(), SIGNAL( change() ), this, SLOT( anDWChanged() ) );
+ disconnect( this, SIGNAL( toggled( bool ) ), 0, 0 );
+ unplugAll();
+ deleteLater();
+}
+
+
+KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, const char* name ) : QObject( mdiMainFrm, name ),
+ KXMLGUIClient( mdiMainFrm )
+{
+ m_mdiMode = KMdi::ChildframeMode;
+ m_mdiMainFrm = mdiMainFrm;
+ connect( mdiMainFrm->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ),
+ this, SLOT( clientAdded( KXMLGUIClient * ) ) );
+
+ /* re-use an existing resource file if it exists. can happen if the user launches the
+ * toolbar editor */
+ /*
+ setXMLFile( resourceFileName );
+ */
+
+ if ( domDocument().documentElement().isNull() )
+ {
+
+ QString completeDescription = QString::fromLatin1( guiDescription )
+ .arg( actionListName );
+
+ setXML( completeDescription, false /*merge*/ );
+ }
+
+ if ( actionCollection() ->kaccel() == 0 )
+ actionCollection() ->setWidget( mdiMainFrm );
+ m_toolMenu = new KActionMenu( i18n( "Tool &Views" ), actionCollection(), "kmdi_toolview_menu" );
+ if ( showMDIModeAction )
+ {
+ m_mdiModeAction = new KSelectAction( i18n( "MDI Mode" ), 0, actionCollection() );
+ QStringList modes;
+ modes << i18n( "&Toplevel Mode" ) << i18n( "C&hildframe Mode" ) << i18n( "Ta&b Page Mode" ) << i18n( "I&DEAl Mode" );
+ m_mdiModeAction->setItems( modes );
+ connect( m_mdiModeAction, SIGNAL( activated( int ) ), this, SLOT( changeViewMode( int ) ) );
+ }
+ else
+ m_mdiModeAction = 0;
+
+ connect( m_mdiMainFrm, SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ),
+ this, SLOT( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ) );
+
+ m_gotoToolDockMenu = new KActionMenu( i18n( "Tool &Docks" ), actionCollection(), "kmdi_tooldock_menu" );
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, SIGNAL( toggleTop() ),
+ actionCollection(), "kmdi_activate_top" ) );
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, SIGNAL( toggleLeft() ),
+ actionCollection(), "kmdi_activate_left" ) );
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, SIGNAL( toggleRight() ),
+ actionCollection(), "kmdi_activate_right" ) );
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, SIGNAL( toggleBottom() ),
+ actionCollection(), "kmdi_activate_bottom" ) );
+ m_gotoToolDockMenu->insert( new KActionSeparator( actionCollection(), "kmdi_goto_menu_separator" ) );
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, m_mdiMainFrm, SLOT( prevToolViewInDock() ),
+ actionCollection(), "kmdi_prev_toolview" ) );
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, m_mdiMainFrm, SLOT( nextToolViewInDock() ),
+ actionCollection(), "kmdi_next_toolview" ) );
+
+ actionCollection() ->readShortcutSettings( "Shortcuts", kapp->config() );
+}
+
+KMDIGUIClient::~KMDIGUIClient()
+{
+
+ // actionCollection()->writeShortcutSettings( "KMDI Shortcuts", kapp->config() );
+ for ( uint i = 0;i < m_toolViewActions.count();i++ )
+ disconnect( m_toolViewActions.at( i ), 0, this, 0 );
+
+ m_toolViewActions.setAutoDelete( false );
+ m_toolViewActions.clear();
+ m_documentViewActions.setAutoDelete( false );
+ m_documentViewActions.clear();
+}
+
+void KMDIGUIClient::changeViewMode( int id )
+{
+ switch ( id )
+ {
+ case 0:
+ m_mdiMainFrm->switchToToplevelMode();
+ break;
+ case 1:
+ m_mdiMainFrm->switchToChildframeMode();
+ break;
+ case 2:
+ m_mdiMainFrm->switchToTabPageMode();
+ break;
+ case 3:
+ m_mdiMainFrm->switchToIDEAlMode();
+ break;
+ default:
+ Q_ASSERT( 0 );
+ }
+}
+
+void KMDIGUIClient::setupActions()
+{
+ if ( !factory() || !m_mdiMainFrm )
+ return ;
+
+ // BarActionBuilder builder( actionCollection(), m_mainWindow, m_toolBars );
+
+ // if ( !builder.needsRebuild() )
+ // return;
+
+
+ unplugActionList( actionListName );
+
+ // m_actions.setAutoDelete( true );
+ // m_actions.clear();
+ // m_actions.setAutoDelete( false );
+
+ // m_actions = builder.create();
+
+ // m_toolBars = builder.toolBars();
+
+ // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", QString::null, 0,
+ // this, SLOT(blah()),actionCollection(),"nothing"));
+
+ QPtrList<KAction> addList;
+ if ( m_toolViewActions.count() < 3 )
+ for ( uint i = 0;i < m_toolViewActions.count();i++ )
+ addList.append( m_toolViewActions.at( i ) );
+ else
+ addList.append( m_toolMenu );
+ if ( m_mdiMode == KMdi::IDEAlMode )
+ addList.append( m_gotoToolDockMenu );
+ if ( m_mdiModeAction )
+ addList.append( m_mdiModeAction );
+ kdDebug( 760 ) << "KMDIGUIClient::setupActions: plugActionList" << endl;
+ plugActionList( actionListName, addList );
+
+ // connectToActionContainers();
+}
+
+void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva )
+{
+ kdDebug( 760 ) << "*****void KMDIGUIClient::addToolView(KMdiToolViewAccessor* mtva)*****" << endl;
+ // kdDebug()<<"name: "<<mtva->wrappedWidget()->name()<<endl;
+ QString aname = QString( "kmdi_toolview_" ) + mtva->wrappedWidget() ->name();
+
+ // try to read the action shortcut
+ KShortcut sc;
+ KConfig *cfg = kapp->config();
+ QString _grp = cfg->group();
+ cfg->setGroup( "Shortcuts" );
+ // if ( cfg->hasKey( aname ) )
+ sc = KShortcut( cfg->readEntry( aname, "" ) );
+ cfg->setGroup( _grp );
+ KAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ),
+ /*QString::null*/sc, dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ),
+ m_mdiMainFrm, actionCollection(), aname.latin1() );
+#if KDE_IS_VERSION(3,2,90)
+
+ ( ( ToggleToolViewAction* ) a ) ->setCheckedState( i18n( "Hide %1" ).arg( mtva->wrappedWidget() ->caption() ) );
+#endif
+
+ connect( a, SIGNAL( destroyed( QObject* ) ), this, SLOT( actionDeleted( QObject* ) ) );
+ m_toolViewActions.append( a );
+ m_toolMenu->insert( a );
+ mtva->d->action = a;
+
+ setupActions();
+}
+
+void KMDIGUIClient::actionDeleted( QObject* a )
+{
+ m_toolViewActions.remove( static_cast<KAction*>( a ) );
+ /* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast<KAction*>(a));*/
+ setupActions();
+}
+
+
+void KMDIGUIClient::clientAdded( KXMLGUIClient *client )
+{
+ if ( client == this )
+ setupActions();
+}
+
+
+void KMDIGUIClient::mdiModeHasBeenChangedTo( KMdi::MdiMode mode )
+{
+ kdDebug( 760 ) << "KMDIGUIClient::mdiModeHasBennChangeTo" << endl;
+ m_mdiMode = mode;
+ if ( m_mdiModeAction )
+ {
+ switch ( mode )
+ {
+ case KMdi::ToplevelMode:
+ m_mdiModeAction->setCurrentItem( 0 );
+ break;
+ case KMdi::ChildframeMode:
+ m_mdiModeAction->setCurrentItem( 1 );
+ break;
+ case KMdi::TabPageMode:
+ m_mdiModeAction->setCurrentItem( 2 );
+ break;
+ case KMdi::IDEAlMode:
+ m_mdiModeAction->setCurrentItem( 3 );
+ break;
+ default:
+ Q_ASSERT( 0 );
+ }
+ }
+ setupActions();
+
+}
+
+
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h
new file mode 100644
index 00000000..a52db681
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h
@@ -0,0 +1,146 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2003 Joseph Wenninger
+
+ 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.
+*/
+
+#ifndef KMDIGUICLIENT_H
+#define KMDIGUICLIENT_H
+
+#include <qobject.h>
+#include <qguardedptr.h>
+#include <kxmlguiclient.h>
+#include <kaction.h>
+#include "kmdidefines.h"
+
+class KMainWindow;
+class KToolBar;
+class KMdiToolViewAccessor;
+class KMdiMainFrm;
+class KDockWidget;
+
+namespace KMDIPrivate
+{
+
+/**
+ * A class derived from KXMLGUIClient that handles the various
+ * KMDI modes
+ */
+class KMDI_EXPORT KMDIGUIClient : public QObject,
+ public KXMLGUIClient
+{
+ Q_OBJECT
+public:
+
+ KMDIGUIClient( KMdiMainFrm *mdiMainFrm, bool showMDIModeAction, const char *name = 0 );
+ virtual ~KMDIGUIClient();
+
+ /**
+ * Add a new tool view to this KMDIGUIClient. Reads the shortcut
+ * for the tool view from the KMDI application's config file and also
+ * adds a ToggleToolViewAction so that the visibility of the toolviews
+ * can be turned on and off
+ */
+ void addToolView( KMdiToolViewAccessor* );
+
+private slots:
+
+ /**
+ * The XMLGUIClient factory has added an XMLGUI client. Plug our actions
+ * in if we're the client that's been added.
+ */
+ void clientAdded( KXMLGUIClient *client );
+ /**
+ * Plug in the various toggle actions we have into the tool views menu
+ */
+ void setupActions();
+
+ /**
+ * Change the view mode. This will automatically change the view mode
+ * of the KMdiMainFrm associated with this KMDIGUIClient
+ */
+ void changeViewMode( int id );
+
+ /**
+ * One of our tool view toggle actions has been deleted. Redo the
+ * tool views menu
+ */
+ void actionDeleted( QObject* );
+
+ /**
+ * Updates the action that lets the user change the MDI mode to the
+ * correct value based on the current mode
+ */
+ void mdiModeHasBeenChangedTo( KMdi::MdiMode );
+
+signals:
+ /** Toggle the top tool dock */
+ void toggleTop();
+
+ /** Toggle the left tool dock */
+ void toggleLeft();
+
+ /** Toggle the right tool dock */
+ void toggleRight();
+
+ /** Toggle the bottom tool dock */
+ void toggleBottom();
+
+private:
+ class KMDIGUIClientPrivate;
+ KMDIGUIClientPrivate *d;
+ KMdi::MdiMode m_mdiMode;
+
+ QGuardedPtr<KMdiMainFrm> m_mdiMainFrm;
+ QPtrList<KAction> m_toolViewActions;
+ QPtrList<KAction> m_documentViewActions;
+
+ KActionMenu *m_docMenu;
+ KActionMenu *m_toolMenu;
+ KSelectAction *m_mdiModeAction;
+
+ KActionMenu *m_gotoToolDockMenu;
+};
+
+/**
+ * A KToggleAction specifically for toggling the showing
+ * or the hiding of a KMDI tool view
+ */
+class KMDI_EXPORT ToggleToolViewAction: public KToggleAction
+{
+ Q_OBJECT
+public:
+
+ ToggleToolViewAction( const QString& text, const KShortcut& cut = KShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0,
+ QObject* parent = 0, const char* name = 0 );
+
+ virtual ~ToggleToolViewAction();
+
+private:
+
+ KDockWidget *m_dw;
+ KMdiMainFrm *m_mdiMainFrm;
+protected slots:
+
+ void slotToggled( bool );
+ void anDWChanged();
+ void slotWidgetDestroyed();
+};
+
+
+}
+
+#endif
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdiiterator.h b/lib/compatibility/kmdi/qextmdi/kmdiiterator.h
new file mode 100644
index 00000000..6bb6f7ea
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdiiterator.h
@@ -0,0 +1,51 @@
+//----------------------------------------------------------------------------
+// filename : kmdiiterator.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 02/2000 by Massimo Morin
+// changes : 02/2000 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Massimo Morin (mmorin@schedsys.com)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#ifndef _KMDIITERATOR_H_
+#define _KMDIITERATOR_H_
+
+
+template <class Item>
+class KMdiIterator
+{
+public:
+ virtual ~KMdiIterator() {}
+
+ virtual void first() = 0;
+ virtual void last() = 0;
+ virtual void next() = 0;
+ virtual void prev() = 0;
+ virtual bool isDone() const = 0;
+ virtual Item currentItem() const = 0;
+
+protected:
+ KMdiIterator() {}
+}
+;
+
+#endif // _KMDIITERATOR_H_
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h b/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h
new file mode 100644
index 00000000..110fae7e
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h
@@ -0,0 +1,61 @@
+//----------------------------------------------------------------------------
+// filename : kmdilistiterator.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 02/2000 by Massimo Morin
+// changes : 02/2000 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Massimo Morin (mmorin@schedsys.com)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#ifndef _KMDILISTITERATOR_H_
+#define _KMDILISTITERATOR_H_
+
+#include <kmdiiterator.h>
+
+template <class I>
+class QPtrList;
+template <class I>
+class QPtrListIterator;
+
+template <class Item>
+class KMdiListIterator : public KMdiIterator<Item*>
+{
+public:
+ KMdiListIterator( QPtrList<Item>& list )
+ {
+ m_iterator = new QPtrListIterator<Item>( list );
+ }
+
+ virtual void first() { m_iterator->toFirst(); }
+ virtual void last() { m_iterator->toLast(); }
+ virtual void next() { ++( *m_iterator ); }
+ virtual void prev() { --( *m_iterator ); }
+ virtual bool isDone() const { return m_iterator->current() == NULL; }
+ virtual Item* currentItem() const { return m_iterator->current(); }
+
+ virtual ~KMdiListIterator() { delete m_iterator; }
+
+private:
+ QPtrListIterator<Item> *m_iterator;
+};
+
+#endif // _KMDILISTITERATOR_H_
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp
new file mode 100644
index 00000000..449ce6f9
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp
@@ -0,0 +1,2941 @@
+//----------------------------------------------------------------------------
+// filename : kmdimainfrm.cpp
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+// patches : 02/2000 by Massimo Morin (mmorin@schedsys.com)
+// */2000 by Lars Beikirch (Lars.Beikirch@gmx.net)
+// 01/2003 by Jens Zurheide (jens.zurheide@gmx.de)
+//
+// copyright : (C) 1999-2003 by Szymon Stefanek (stefanek@tin.it)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+
+/*
+ * ATTENTION: please do you part to try to make this file legible. It's
+ * extremely hard to read already. Especially follow the indenting rules.
+ */
+#include "config.h"
+
+#include <assert.h>
+
+#include <qcursor.h>
+#include <qclipboard.h>
+#include <qobjectlist.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+
+#include <kmenubar.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kdeversion.h>
+#include <qtabwidget.h>
+#include <klocale.h>
+
+#include <kiconloader.h>
+#include <kmdidockcontainer.h>
+
+
+#include <qtoolbutton.h>
+#include <qdockarea.h>
+#include <qlayout.h>
+#include <qtimer.h>
+#include <qtextstream.h>
+#include <qstring.h>
+#include <qmap.h>
+#include <qvaluelist.h>
+
+#include "kmdimainfrm.h"
+#include "kmditaskbar.h"
+#include "kmdichildfrm.h"
+#include "kmdichildarea.h"
+#include "kmdichildview.h"
+#include "kmdidockcontainer.h"
+#include "kmditoolviewaccessor_p.h"
+#include "kmdifocuslist.h"
+#include "kmdidocumentviewtabwidget.h"
+#include "kmdiguiclient.h"
+
+#include "win_undockbutton.xpm"
+#include "win_minbutton.xpm"
+#include "win_restorebutton.xpm"
+#include "win_closebutton.xpm"
+#include "kde_undockbutton.xpm"
+#include "kde_minbutton.xpm"
+#include "kde_restorebutton.xpm"
+#include "kde_closebutton.xpm"
+#include "kde2_undockbutton.xpm"
+#include "kde2_minbutton.xpm"
+#include "kde2_restorebutton.xpm"
+#include "kde2_closebutton.xpm"
+#include "kde2laptop_undockbutton.xpm"
+#include "kde2laptop_minbutton.xpm"
+#include "kde2laptop_restorebutton.xpm"
+#include "kde2laptop_closebutton.xpm"
+#include "kde2laptop_closebutton_menu.xpm"
+
+#ifdef Q_WS_X11
+#ifndef NO_KDE
+#include <X11/X.h> // schroder
+#include <X11/Xlib.h> // schroder
+#endif
+
+#ifdef KeyRelease
+/* I hate the defines in the X11 header files. Get rid of one of them */
+#undef KeyRelease
+#endif
+
+#ifdef KeyPress
+/* I hate the defines in the X11 header files. Get rid of one of them */
+#undef KeyPress
+#endif
+#endif // Q_WS_X11 && ! K_WS_QTONLY
+
+using namespace KParts;
+
+KMdi::FrameDecor KMdiMainFrm::m_frameDecoration = KMdi::KDELook;
+
+class KMdiMainFrmPrivate
+{
+public:
+ KMdiMainFrmPrivate() : focusList( 0 )
+ {
+ for ( int i = 0;i < 4;i++ )
+ {
+ activeDockPriority[ i ] = 0;
+ m_styleIDEAlMode = 0;
+ m_toolviewStyle = 0;
+ }
+ }
+ ~KMdiMainFrmPrivate()
+ {}
+ KMdiDockContainer* activeDockPriority[ 4 ];
+ KMdiFocusList *focusList;
+ int m_styleIDEAlMode;
+ int m_toolviewStyle;
+ KAction *closeWindowAction;
+};
+
+//============ constructor ============//
+KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags )
+ : KParts::DockMainWindow( parentWidget, name, flags )
+ , m_mdiMode( KMdi::UndefinedMode )
+ , m_pMdi( 0L )
+ , m_pTaskBar( 0L )
+ , m_pDocumentViews( 0L )
+ , m_pCurrentWindow( 0L )
+ , m_pWindowPopup( 0L )
+ , m_pTaskBarPopup( 0L )
+ , m_pWindowMenu( 0L )
+ , m_pDockMenu( 0L )
+ , m_pMdiModeMenu( 0L )
+ , m_pPlacingMenu( 0L )
+ , m_pMainMenuBar( 0L )
+ , m_pUndockButtonPixmap( 0L )
+ , m_pMinButtonPixmap( 0L )
+ , m_pRestoreButtonPixmap( 0L )
+ , m_pCloseButtonPixmap( 0L )
+ , m_pUndock( 0L )
+ , m_pMinimize( 0L )
+ , m_pRestore( 0L )
+ , m_pClose( 0L )
+ , m_bMaximizedChildFrmMode( false )
+ , m_oldMainFrmHeight( 0 )
+ , m_oldMainFrmMinHeight( 0 )
+ , m_oldMainFrmMaxHeight( 0 )
+ , m_bSDIApplication( false )
+ , m_pDockbaseAreaOfDocumentViews( 0L )
+ , m_pTempDockSession( 0L )
+ , m_bClearingOfWindowMenuBlocked( false )
+ , m_pDragEndTimer( 0L )
+ , m_bSwitching( false )
+ , m_leftContainer( 0 )
+ , m_rightContainer( 0 )
+ , m_topContainer( 0 )
+ , m_bottomContainer( 0 )
+ , d( new KMdiMainFrmPrivate() )
+ , m_mdiGUIClient( 0 )
+ , m_managedDockPositionMode( false )
+ , m_documentTabWidget( 0 )
+{
+ kdDebug(760) << k_funcinfo << endl;
+ // Create the local lists of windows
+ m_pDocumentViews = new QPtrList<KMdiChildView>;
+ m_pDocumentViews->setAutoDelete( false );
+ m_pToolViews = new QMap<QWidget*, KMdiToolViewAccessor*>;
+
+ // This seems to be needed (re-check it after Qt2.0 comed out)
+ setFocusPolicy( ClickFocus );
+
+ // create the central widget
+ createMdiManager();
+
+ // cover KMdi's childarea by a dockwidget
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
+ m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
+ m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
+ m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
+ // set this dock to main view
+ setView( m_pDockbaseAreaOfDocumentViews );
+ setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
+
+ // Apply options for the MDI manager
+ applyOptions();
+
+ m_pTaskBarPopup = new QPopupMenu( this, "taskbar_popup_menu" );
+ m_pWindowPopup = new QPopupMenu( this, "window_popup_menu" );
+
+ m_pWindowMenu = new QPopupMenu( this, "window_menu" );
+ m_pWindowMenu->setCheckable( true );
+ QObject::connect( m_pWindowMenu, SIGNAL( aboutToShow() ), this, SLOT( fillWindowMenu() ) );
+
+ m_pDockMenu = new QPopupMenu( this, "dock_menu" );
+ m_pDockMenu->setCheckable( true );
+
+ m_pMdiModeMenu = new QPopupMenu( this, "mdimode_menu" );
+ m_pMdiModeMenu->setCheckable( true );
+
+ m_pPlacingMenu = new QPopupMenu( this, "placing_menu" );
+
+ d->closeWindowAction = new KAction(i18n("&Close"),
+#ifdef Q_WS_WIN
+ CTRL|Key_F4,
+#else
+ 0,
+#endif
+ this, SLOT(closeActiveView()), actionCollection(), "window_close");
+
+ // the MDI view taskbar
+ createTaskBar();
+
+ // this is only a hack, but prevents us from crash because the buttons are otherwise
+ // not created before we switch the modes where we need them !!!
+ setMenuForSDIModeSysButtons( menuBar() );
+
+ switch ( mdiMode )
+ {
+ case KMdi::IDEAlMode:
+ kdDebug(760) << k_funcinfo << "Switching to IDEAl mode" << endl;
+ switchToIDEAlMode();
+ break;
+ case KMdi::TabPageMode:
+ kdDebug(760) << k_funcinfo << "Switching to tab page mode" << endl;
+ switchToTabPageMode();
+ break;
+ case KMdi::ToplevelMode:
+ kdDebug(760) << k_funcinfo << "Switching to top level mode" << endl;
+ switchToToplevelMode();
+ break;
+ default:
+ m_mdiMode = KMdi::ChildframeMode;
+ kdDebug(760) << k_funcinfo << "Switching to child frame mode" << endl;
+ break;
+ }
+
+ // drag end timer
+ m_pDragEndTimer = new QTimer();
+ connect( m_pDragEndTimer, SIGNAL( timeout() ), this, SLOT( dragEndTimeOut() ) );
+ connect( guiFactory(), SIGNAL( clientAdded( KXMLGUIClient* ) ),
+ this, SLOT( verifyToplevelHeight() ) );
+ connect( guiFactory(), SIGNAL( clientRemoved( KXMLGUIClient* ) ),
+ this, SLOT( verifyToplevelHeight() ) );
+}
+
+void KMdiMainFrm::verifyToplevelHeight()
+{
+ if ( m_mdiMode != KMdi::ToplevelMode )
+ return;
+
+ //kdDebug(760) << k_funcinfo << endl;
+ int topDockHeight = topDock() ? topDock()->height() : 0;
+ int menuBarHeight = hasMenuBar() ? menuBar()->height() : 0;
+ setFixedHeight( topDockHeight + menuBarHeight );
+ resize( width(), height() );
+}
+
+void KMdiMainFrm::setStandardMDIMenuEnabled( bool showModeMenu )
+{
+ m_mdiGUIClient = new KMDIPrivate::KMDIGUIClient( this, showModeMenu );
+ connect( m_mdiGUIClient, SIGNAL( toggleTop() ), this, SIGNAL( toggleTop() ) );
+ connect( m_mdiGUIClient, SIGNAL( toggleLeft() ), this, SIGNAL( toggleLeft() ) );
+ connect( m_mdiGUIClient, SIGNAL( toggleRight() ), this, SIGNAL( toggleRight() ) );
+ connect( m_mdiGUIClient, SIGNAL( toggleBottom() ), this, SIGNAL( toggleBottom() ) );
+
+ if ( m_mdiMode == KMdi::IDEAlMode )
+ {
+ if ( m_topContainer )
+ connect( this, SIGNAL( toggleTop() ), m_topContainer->getWidget(), SLOT( toggle() ) );
+ if ( m_leftContainer )
+ connect( this, SIGNAL( toggleLeft() ), m_leftContainer->getWidget(), SLOT( toggle() ) );
+ if ( m_rightContainer )
+ connect( this, SIGNAL( toggleRight() ), m_rightContainer->getWidget(), SLOT( toggle() ) );
+ if ( m_bottomContainer )
+ connect( this, SIGNAL( toggleBottom() ), m_bottomContainer->getWidget(), SLOT( toggle() ) );
+ }
+
+ emit mdiModeHasBeenChangedTo( m_mdiMode );
+}
+
+//============ ~KMdiMainFrm ============//
+KMdiMainFrm::~KMdiMainFrm()
+{
+ //save the children first to a list, as removing invalidates our iterator
+ QValueList<KMdiChildView*> children;
+ for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
+ children.append( w );
+
+ // safely close the windows so properties are saved...
+ QValueListIterator<KMdiChildView*> childIt;
+ for ( childIt = children.begin(); childIt != children.end(); ++childIt )
+ {
+ closeWindow( *childIt, false ); // without re-layout taskbar!
+ }
+
+ emit lastChildViewClosed();
+ delete m_pDocumentViews;
+ delete m_pToolViews;
+ m_pToolViews = 0;
+ delete m_pDragEndTimer;
+
+ delete m_pUndockButtonPixmap;
+ delete m_pMinButtonPixmap;
+ delete m_pRestoreButtonPixmap;
+ delete m_pCloseButtonPixmap;
+
+ //deletes added for Release-Version-Pop-Up-WinMenu-And-Go-Out-Problem
+ delete m_pDockMenu;
+ delete m_pMdiModeMenu;
+ delete m_pPlacingMenu;
+ delete m_pTaskBarPopup;
+ delete m_pWindowPopup;
+ delete m_pWindowMenu;
+ delete m_mdiGUIClient;
+ delete m_pTempDockSession;
+ m_mdiGUIClient = 0;
+ delete d;
+ d = 0;
+}
+
+//============ applyOptions ============//
+//FIXME something wrong with this function. dunno what though
+void KMdiMainFrm::applyOptions()
+{
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; ( *it ); ++it )
+ {
+ QWidget* childFrame = 0L;
+ if ( ( *it )->mdiParent() )
+ {
+ kdDebug(760) << k_funcinfo << "using child view's mdi parent for resize hack" << endl;
+ childFrame = ( *it )->mdiParent();
+ }
+ else
+ {
+ kdDebug(760) << k_funcinfo << "using child view for resize hack" << endl;
+ childFrame = ( *it );
+ }
+
+ int w = childFrame->width();
+ int h = childFrame->height();
+ childFrame->resize( w + 1, h + 1 );
+ childFrame->resize( w - 1, h - 1 );
+ }
+}
+
+//============ createMdiManager ============//
+void KMdiMainFrm::createMdiManager()
+{
+ kdDebug(760) << k_funcinfo << "creating MDI manager" << endl;
+ m_pMdi = new KMdiChildArea( this );
+ setCentralWidget( m_pMdi );
+ QObject::connect( m_pMdi, SIGNAL( nowMaximized( bool ) ),
+ this, SLOT( setEnableMaximizedChildFrmMode( bool ) ) );
+ QObject::connect( m_pMdi, SIGNAL( noMaximizedChildFrmLeft( KMdiChildFrm* ) ),
+ this, SLOT( switchOffMaximizeModeForMenu( KMdiChildFrm* ) ) );
+ QObject::connect( m_pMdi, SIGNAL( sysButtonConnectionsMustChange( KMdiChildFrm*, KMdiChildFrm* ) ),
+ this, SLOT( updateSysButtonConnections( KMdiChildFrm*, KMdiChildFrm* ) ) );
+ QObject::connect( m_pMdi, SIGNAL( popupWindowMenu( QPoint ) ),
+ this, SLOT( popupWindowMenu( QPoint ) ) );
+ QObject::connect( m_pMdi, SIGNAL( lastChildFrmClosed() ),
+ this, SIGNAL( lastChildFrmClosed() ) );
+}
+
+//============ createTaskBar ==============//
+void KMdiMainFrm::createTaskBar()
+{
+ m_pTaskBar = new KMdiTaskBar( this, QMainWindow::DockBottom );
+ m_pTaskBar->installEventFilter( this );
+}
+
+void KMdiMainFrm::slot_toggleTaskBar()
+{
+ if ( !m_pTaskBar )
+ return;
+ m_pTaskBar->switchOn( !m_pTaskBar->isSwitchedOn() );
+}
+
+void KMdiMainFrm::resizeEvent( QResizeEvent *e )
+{
+ if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ {
+ if ( e->oldSize().height() != e->size().height() )
+ return ;
+ }
+ KParts::DockMainWindow::resizeEvent( e );
+ if ( !m_mdiGUIClient )
+ return ;
+ setSysButtonsAtMenuPosition();
+}
+
+//================ setMinimumSize ===============//
+
+void KMdiMainFrm::setMinimumSize( int minw, int minh )
+{
+ if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ return ;
+ DockMainWindow::setMinimumSize( minw, minh );
+}
+
+//================ wrapper ===============//
+
+KMdiChildView* KMdiMainFrm::createWrapper( QWidget *view, const QString& name, const QString& shortName )
+{
+ Q_ASSERT( view ); // if this assert fails, then some part didn't return a widget. Fix the part ;)
+
+ KMdiChildView* pMDICover = new KMdiChildView( name /*caption*/, 0L /*parent*/,
+ name.latin1() );
+ QBoxLayout* pLayout = new QHBoxLayout( pMDICover, 0, -1, "layout" );
+ view->reparent( pMDICover, QPoint( 0, 0 ) );
+ pLayout->addWidget( view );
+ // pMDICover->setName(name);
+ pMDICover->setTabCaption( shortName );
+ pMDICover->setCaption( name );
+
+ const QPixmap* wndIcon = view->icon();
+ if ( wndIcon )
+ pMDICover->setIcon( *wndIcon );
+
+ pMDICover->trackIconAndCaptionChanges( view );
+ return pMDICover;
+}
+
+//================ addWindow ===============//
+
+void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags )
+{
+ addWindow( pWnd, flags, -1 );
+}
+
+void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index )
+{
+ if ( windowExists( pWnd, AnyView ) ) //already added
+ return;
+
+ if ( flags & KMdi::ToolWindow )
+ {
+ addToolWindow( pWnd );
+ // some kind of cascading
+ pWnd->move( m_pMdi->mapToGlobal( m_pMdi->getCascadePoint() ) );
+
+ return ;
+ }
+
+ d->closeWindowAction->setEnabled(true);
+
+ // common connections used when under MDI control
+ QObject::connect( pWnd, SIGNAL( clickedInWindowMenu( int ) ), this, SLOT( windowMenuItemActivated( int ) ) );
+ QObject::connect( pWnd, SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, SLOT( activateView( KMdiChildView* ) ) );
+ QObject::connect( pWnd, SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
+ QObject::connect( pWnd, SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, SLOT( attachWindow( KMdiChildView*, bool ) ) );
+ QObject::connect( pWnd, SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, SLOT( detachWindow( KMdiChildView*, bool ) ) );
+ QObject::connect( pWnd, SIGNAL( clickedInDockMenu( int ) ), this, SLOT( dockMenuItemActivated( int ) ) );
+ QObject::connect( pWnd, SIGNAL( activated( KMdiChildView* ) ), this, SIGNAL( viewActivated( KMdiChildView* ) ) );
+ QObject::connect( pWnd, SIGNAL( deactivated( KMdiChildView* ) ), this, SIGNAL( viewDeactivated( KMdiChildView* ) ) );
+
+ if ( index == -1 )
+ m_pDocumentViews->append( pWnd );
+ else
+ m_pDocumentViews->insert( index, pWnd );
+
+ if ( m_pTaskBar )
+ {
+ KMdiTaskBarButton* but = m_pTaskBar->addWinButton( pWnd );
+ QObject::connect( pWnd, SIGNAL( tabCaptionChanged( const QString& ) ), but, SLOT( setNewText( const QString& ) ) );
+ }
+
+ // embed the view depending on the current MDI mode
+ if ( m_mdiMode == KMdi::TabPageMode || m_mdiMode == KMdi::IDEAlMode )
+ {
+ QPixmap pixmap;
+ if ( pWnd->icon() )
+ pixmap = *( pWnd->icon() );
+
+ m_documentTabWidget->insertTab( pWnd, pixmap, pWnd->tabCaption(), index );
+
+ connect( pWnd, SIGNAL( iconUpdated( QWidget*, QPixmap ) ), m_documentTabWidget, SLOT( updateIconInView( QWidget*, QPixmap ) ) );
+ connect( pWnd, SIGNAL( captionUpdated( QWidget*, const QString& ) ), m_documentTabWidget, SLOT( updateCaptionInView( QWidget*, const QString& ) ) );
+ }
+ else
+ {
+ if ( ( flags & KMdi::Detach ) || ( m_mdiMode == KMdi::ToplevelMode ) )
+ {
+ detachWindow( pWnd, !( flags & KMdi::Hide ) );
+ emit childViewIsDetachedNow( pWnd ); // fake it because detach won't call it in this case of addWindow-to-MDI
+ }
+ else
+ attachWindow( pWnd, !( flags & KMdi::Hide ), flags & KMdi::UseKMdiSizeHint );
+
+ if ( ( m_bMaximizedChildFrmMode && ( !m_bSDIApplication && ( flags & KMdi::Detach ) )
+ && m_mdiMode != KMdi::ToplevelMode ) || ( flags & KMdi::Maximize ) )
+ {
+ if ( !pWnd->isMaximized() )
+ pWnd->maximize();
+ }
+
+ if ( !m_bSDIApplication || ( flags & KMdi::Detach ) )
+ {
+ if ( flags & KMdi::Minimize )
+ pWnd->minimize();
+
+ if ( !( flags & KMdi::Hide ) )
+ {
+ if ( pWnd->isAttached() )
+ pWnd->mdiParent()->show();
+ else
+ pWnd->show();
+ }
+ }
+ }
+}
+
+//============ addWindow ============//
+void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags )
+{
+ addWindow( pWnd, flags );
+ if ( m_bMaximizedChildFrmMode && pWnd->isAttached() )
+ pWnd->setRestoreGeometry( rectNormal );
+ else
+ pWnd->setGeometry( rectNormal );
+}
+
+//============ addWindow ============//
+void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QPoint pos, int flags )
+{
+ addWindow( pWnd, flags );
+ if ( m_bMaximizedChildFrmMode && pWnd->isAttached() )
+ pWnd->setRestoreGeometry( QRect( pos, pWnd->restoreGeometry().size() ) );
+ else
+ pWnd->move( pos );
+}
+
+
+
+KMdiToolViewAccessor *KMdiMainFrm::createToolWindow()
+{
+ return new KMdiToolViewAccessor( this );
+}
+
+
+void KMdiMainFrm::deleteToolWindow( QWidget* pWnd )
+{
+ if ( m_pToolViews->contains( pWnd ) )
+ deleteToolWindow( ( *m_pToolViews ) [ pWnd ] );
+}
+
+void KMdiMainFrm::deleteToolWindow( KMdiToolViewAccessor *accessor )
+{
+ delete accessor;
+}
+
+//============ addWindow ============//
+KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos, QWidget* pTargetWnd,
+ int percent, const QString& tabToolTip, const QString& tabCaption )
+{
+ QWidget* tvta = pWnd;
+ KDockWidget* pDW = dockManager->getDockWidgetFromName( pWnd->name() );
+ if ( pDW )
+ {
+ // probably readDockConfig already created the widgetContainer, use that
+ pDW->setWidget( pWnd );
+
+ if ( pWnd->icon() )
+ pDW->setPixmap( *pWnd->icon() );
+
+ pDW->setTabPageLabel( ( tabCaption == 0 ) ? pWnd->caption() : tabCaption );
+ pDW->setToolTipString( tabToolTip );
+ dockManager->removeFromAutoCreateList( pDW );
+ pWnd = pDW;
+ }
+
+ QRect r = pWnd->geometry();
+
+ KMdiToolViewAccessor *mtva = new KMdiToolViewAccessor( this, pWnd, tabToolTip, ( tabCaption == 0 ) ? pWnd->caption() : tabCaption );
+ m_pToolViews->insert( tvta, mtva );
+
+ if ( pos == KDockWidget::DockNone )
+ {
+ mtva->d->widgetContainer->setEnableDocking( KDockWidget::DockNone );
+ mtva->d->widgetContainer->reparent( this, Qt::WType_TopLevel | Qt::WType_Dialog, r.topLeft(), true ); //pToolView->isVisible());
+ }
+ else //add and dock the toolview as a dockwidget view
+ mtva->place( pos, pTargetWnd, percent );
+
+
+ return mtva;
+}
+
+//============ attachWindow ============//
+void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomaticResize )
+{
+ pWnd->installEventFilter( this );
+
+ // decide whether window shall be cascaded
+ bool bCascade = false;
+ QApplication::sendPostedEvents();
+ QRect frameGeo = pWnd->frameGeometry();
+ QPoint topLeftScreen = pWnd->mapToGlobal( QPoint( 0, 0 ) );
+ QPoint topLeftMdiChildArea = m_pMdi->mapFromGlobal( topLeftScreen );
+ QRect childAreaGeo = m_pMdi->geometry();
+ if ( topLeftMdiChildArea.x() < 0 || topLeftMdiChildArea.y() < 0 ||
+ ( topLeftMdiChildArea.x() + frameGeo.width() > childAreaGeo.width() ) ||
+ ( topLeftMdiChildArea.y() + frameGeo.height() > childAreaGeo.height() ) )
+ {
+ bCascade = true;
+ }
+
+ // create frame and insert child view
+ KMdiChildFrm *lpC = new KMdiChildFrm( m_pMdi );
+ pWnd->hide();
+ if ( !bCascade )
+ lpC->move( topLeftMdiChildArea );
+
+ lpC->setClient( pWnd, bAutomaticResize );
+ lpC->setFocus();
+ pWnd->youAreAttached( lpC );
+ if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ {
+ setMinimumHeight( m_oldMainFrmMinHeight );
+ setMaximumHeight( m_oldMainFrmMaxHeight );
+ resize( width(), m_oldMainFrmHeight );
+ m_oldMainFrmHeight = 0;
+ switchToChildframeMode();
+ }
+
+ m_pMdi->manageChild( lpC, false, bCascade );
+ if ( m_pMdi->topChild() && m_pMdi->topChild() ->isMaximized() )
+ {
+ QRect r = lpC->geometry();
+ lpC->setGeometry( -lpC->m_pClient->x(), -lpC->m_pClient->y(),
+ m_pMdi->width() + KMDI_CHILDFRM_DOUBLE_BORDER,
+ m_pMdi->height() + lpC->captionHeight() + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_DOUBLE_BORDER );
+ lpC->setRestoreGeometry( r );
+ }
+
+ if ( bShow )
+ {
+ lpC->show();
+ }
+
+#undef FocusIn
+ QFocusEvent fe( QEvent::FocusIn );
+ QApplication::sendEvent( pWnd, &fe );
+
+ m_pCurrentWindow = pWnd; // required for checking the active item
+}
+
+//============= detachWindow ==============//
+void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
+{
+ if ( pWnd->isAttached() )
+ {
+ pWnd->removeEventFilter( this );
+ pWnd->youAreDetached();
+ // this is only if it was attached and you want to detach it
+ if ( pWnd->parent() )
+ {
+ KMdiChildFrm * lpC = pWnd->mdiParent();
+ if ( lpC )
+ {
+ if ( lpC->icon() )
+ {
+ QPixmap pixm( *( lpC->icon() ) );
+ pWnd->setIcon( pixm );
+ }
+ QString capt( lpC->caption() );
+ if ( !bShow )
+ lpC->hide();
+ lpC->unsetClient( m_undockPositioningOffset );
+ m_pMdi->destroyChildButNotItsView( lpC, false ); //Do not focus the new top child , we loose focus...
+ pWnd->setCaption( capt );
+ }
+ }
+ }
+ else
+ {
+ if ( pWnd->size().isEmpty() || ( pWnd->size() == QSize( 1, 1 ) ) )
+ {
+ if ( m_pCurrentWindow )
+ {
+ pWnd->setGeometry( QRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), m_pCurrentWindow->size() ) );
+ }
+ else
+ {
+ pWnd->setGeometry( QRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) );
+ }
+ }
+#ifdef Q_WS_X11
+ if ( mdiMode() == KMdi::ToplevelMode )
+ {
+ XSetTransientForHint( qt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
+ }
+#endif
+
+ return ;
+ }
+
+#ifdef Q_WS_X11
+ if ( mdiMode() == KMdi::ToplevelMode )
+ {
+ XSetTransientForHint( qt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
+ }
+#endif
+
+ // this will show it...
+ if ( bShow )
+ {
+ activateView( pWnd );
+ }
+
+ emit childViewIsDetachedNow( pWnd );
+}
+
+//============== removeWindowFromMdi ==============//
+void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
+{
+ Q_UNUSED( pWnd );
+ //Closes a child window. sends no close event : simply deletes it
+ //FIXME something wrong with this, but nobody knows whatcart
+#if 0
+ if ( !( m_pWinList->removeRef( pWnd ) ) )
+ return ;
+ if ( m_pWinList->count() == 0 )
+ m_pCurrentWindow = 0L;
+
+ QObject::disconnect( pWnd, SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, SLOT( attachWindow( KMdiChildView*, bool ) ) );
+ QObject::disconnect( pWnd, SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, SLOT( detachWindow( KMdiChildView*, bool ) ) );
+ QObject::disconnect( pWnd, SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, SLOT( activateView( KMdiChildView* ) ) );
+ QObject::disconnect( pWnd, SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
+ QObject::disconnect( pWnd, SIGNAL( clickedInWindowMenu( int ) ), this, SLOT( windowMenuItemActivated( int ) ) );
+ QObject::disconnect( pWnd, SIGNAL( clickedInDockMenu( int ) ), this, SLOT( dockMenuItemActivated( int ) ) );
+
+ if ( m_pTaskBar )
+ {
+ KMdiTaskBarButton * but = m_pTaskBar->getButton( pWnd );
+ if ( but != 0L )
+ {
+ QObject::disconnect( pWnd, SIGNAL( tabCaptionChanged( const QString& ) ), but, SLOT( setNewText( const QString& ) ) );
+ }
+ m_pTaskBar->removeWinButton( pWnd );
+ }
+
+ if ( m_mdiMode == KMdi::TabPageMode )
+ {
+ if ( m_pWinList->count() == 0 )
+ {
+ if ( !m_pDockbaseAreaOfDocumentViews )
+ {
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
+
+ m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
+ setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
+ }
+ m_pDockbaseOfTabPage->setDockSite( KDockWidget::DockFullSite );
+ m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockCenter );
+ m_pDockbaseAreaOfDocumentViews->manualDock( m_pDockbaseOfTabPage, KDockWidget::DockCenter );
+ m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
+ m_pDockbaseOfTabPage = m_pDockbaseAreaOfDocumentViews;
+ m_pClose->hide();
+ }
+ KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget();
+ pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ pDockW->setWidget( 0L );
+ if ( pDockW == m_pDockbaseOfTabPage )
+ {
+ QTabWidget * pTab = ( QTabWidget* ) pDockW->parentWidget() ->parentWidget();
+ int cnt = pTab->count();
+ m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 );
+ if ( pDockW == m_pDockbaseOfTabPage )
+ {
+ m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 1 ); // different to the one deleted next
+ }
+ }
+ delete pDockW;
+ if ( m_pWinList->count() == 1 )
+ {
+ m_pWinList->last() ->activate(); // all other views are activated by tab switch
+ }
+ }
+ else if ( pWnd->isAttached() )
+ {
+ pWnd->mdiParent() ->hide();
+ m_pMdi->destroyChildButNotItsView( pWnd->mdiParent() );
+ }
+ else
+ {
+ // is not attached
+ if ( m_pMdi->getVisibleChildCount() > 0 )
+ {
+ setActiveWindow();
+ m_pCurrentWindow = 0L;
+ KMdiChildView* pView = m_pMdi->topChild() ->m_pClient;
+ if ( pView )
+ {
+ pView->activate();
+ }
+ }
+ else if ( m_pWinList->count() > 0 )
+ {
+ //crash? m_pWinList->last()->activate();
+ //crash? m_pWinList->last()->setFocus();
+ }
+ }
+
+ if ( pWnd->isToolView() )
+ pWnd->m_bToolView = false;
+
+ if ( !m_pCurrentWindow )
+ emit lastChildViewClosed();
+#endif
+}
+
+//============== closeWindow ==============//
+void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
+{
+ if ( !pWnd )
+ return ;
+ //Closes a child window. sends no close event : simply deletes it
+ m_pDocumentViews->removeRef( pWnd );
+ if ( m_pDocumentViews->count() == 0 )
+ m_pCurrentWindow = 0L;
+
+ if ( m_pTaskBar )
+ {
+ m_pTaskBar->removeWinButton( pWnd, layoutTaskBar );
+ }
+
+ if ( ( m_mdiMode == KMdi::TabPageMode ) || ( m_mdiMode == KMdi::IDEAlMode ) )
+ {
+ if ( !m_documentTabWidget )
+ return ; //oops
+ if ( m_pDocumentViews->count() == 0 )
+ m_pClose->hide();
+ pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ kdDebug(760) << "-------- 1" << endl;
+ if ( m_pDocumentViews->count() == 1 )
+ {
+ m_pDocumentViews->last() ->activate(); // all other views are activated by tab switch
+ }
+ }
+ if ( ( m_mdiMode == KMdi::TabPageMode ) || ( m_mdiMode == KMdi::IDEAlMode ) )
+ {
+ if ( m_pDocumentViews->count() == 0 )
+ {
+ if ( !m_pDockbaseAreaOfDocumentViews )
+ {
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
+ m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
+ setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
+ }
+#if 0
+ m_pDockbaseOfTabPage->setDockSite( KDockWidget::DockFullSite );
+ m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockCenter );
+ m_pDockbaseAreaOfDocumentViews->manualDock( m_pDockbaseOfTabPage, KDockWidget::DockCenter );
+ m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
+ m_pDockbaseOfTabPage = m_pDockbaseAreaOfDocumentViews;
+#endif
+
+ m_pClose->hide();
+ }
+#if 0
+ KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget();
+ pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ pDockW->setWidget( 0L );
+ if ( pDockW == m_pDockbaseOfTabPage )
+ {
+ QTabWidget * pTab = ( QTabWidget* ) pDockW->parentWidget() ->parentWidget();
+ int cnt = pTab->count();
+ m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 );
+ if ( pDockW == m_pDockbaseOfTabPage )
+ {
+ m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 1 ); // different to the one deleted next
+ }
+ }
+ delete pDockW;
+#endif
+
+ delete pWnd;
+ if ( m_pDocumentViews->count() == 1 )
+ {
+ m_pDocumentViews->last() ->activate(); // all other views are activated by tab switch
+ }
+ }
+ else if ( pWnd->isAttached() )
+ {
+ m_pMdi->destroyChild( pWnd->mdiParent() );
+ }
+ else
+ {
+ delete pWnd;
+ // is not attached
+ if ( m_pMdi->getVisibleChildCount() > 0 )
+ {
+ setActiveWindow();
+ m_pCurrentWindow = 0L;
+ KMdiChildView* pView = m_pMdi->topChild() ->m_pClient;
+ if ( pView )
+ {
+ pView->activate();
+ }
+ }
+ else if ( m_pDocumentViews->count() > 0 )
+ {
+ if ( m_pDocumentViews->current() )
+ {
+ m_pDocumentViews->current() ->activate();
+ m_pDocumentViews->current() ->setFocus();
+ }
+ else
+ {
+ m_pDocumentViews->last() ->activate();
+ m_pDocumentViews->last() ->setFocus();
+ }
+ }
+ }
+
+ if ( !m_pCurrentWindow )
+ {
+ d->closeWindowAction->setEnabled(false);
+ emit lastChildViewClosed();
+ }
+}
+
+//================== findWindow =================//
+KMdiChildView* KMdiMainFrm::findWindow( const QString& caption )
+{
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; ( *it ); ++it )
+ {
+ if ( ( *it )->caption() == caption )
+ return ( *it );
+ }
+ return 0L;
+}
+
+//================== activeWindow ===================//
+KMdiChildView* KMdiMainFrm::activeWindow()
+{
+ return m_pCurrentWindow;
+}
+
+//================== windowExists ? =================//
+bool KMdiMainFrm::windowExists( KMdiChildView *pWnd, ExistsAs as )
+{
+ if ( ( as == ToolView ) || ( as == AnyView ) )
+ {
+ if ( m_pToolViews->contains( pWnd ) )
+ return true;
+ if ( as == ToolView )
+ return false;
+ }
+
+ if ( m_pDocumentViews->findRef( pWnd ) != -1 )
+ return true;
+
+ return false;
+}
+
+QPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskbarPopup )
+{
+ m_pWindowPopup->clear();
+ if ( bIncludeTaskbarPopup )
+ {
+ m_pWindowPopup->insertItem( i18n( "Window" ), taskBarPopup( pWnd, false ) );
+ m_pWindowPopup->insertSeparator();
+ }
+ return m_pWindowPopup;
+}
+
+//================ taskBarPopup =================//
+QPopupMenu* KMdiMainFrm::taskBarPopup( KMdiChildView *pWnd, bool /*bIncludeWindowPopup*/ )
+{
+ //returns the g_pTaskBarPopup filled according to the KMdiChildView state
+ m_pTaskBarPopup->clear();
+ if ( pWnd->isAttached() )
+ {
+ m_pTaskBarPopup->insertItem( i18n( "Undock" ), pWnd, SLOT( detach() ) );
+ m_pTaskBarPopup->insertSeparator();
+ if ( pWnd->isMinimized() || pWnd->isMaximized() )
+ m_pTaskBarPopup->insertItem( i18n( "Restore" ), pWnd, SLOT( restore() ) );
+ if ( !pWnd->isMaximized() )
+ m_pTaskBarPopup->insertItem( i18n( "Maximize" ), pWnd, SLOT( maximize() ) );
+ if ( !pWnd->isMinimized() )
+ m_pTaskBarPopup->insertItem( i18n( "Minimize" ), pWnd, SLOT( minimize() ) );
+ }
+ else
+ m_pTaskBarPopup->insertItem( i18n( "Dock" ), pWnd, SLOT( attach() ) );
+ m_pTaskBarPopup->insertSeparator();
+ m_pTaskBarPopup->insertItem( i18n( "Close" ), pWnd, SLOT( close() ) );
+ // the window has a view...get the window popup
+ m_pTaskBarPopup->insertSeparator();
+ m_pTaskBarPopup->insertItem( i18n( "Operations" ), windowPopup( pWnd, false ) ); //alvoid recursion
+ return m_pTaskBarPopup;
+}
+
+void KMdiMainFrm::slotDocCurrentChanged( QWidget* pWidget )
+{
+ KMdiChildView * pWnd = static_cast<KMdiChildView*>( pWidget );
+ pWnd->m_bMainframesActivateViewIsPending = true;
+
+ bool bActivateNecessary = true;
+ if ( m_pCurrentWindow != pWnd )
+ m_pCurrentWindow = pWnd;
+
+ if ( m_pTaskBar )
+ m_pTaskBar->setActiveButton( pWnd );
+
+ if ( m_documentTabWidget && ( m_mdiMode == KMdi::TabPageMode || m_mdiMode == KMdi::IDEAlMode ) )
+ {
+ m_documentTabWidget->showPage( pWnd );
+ pWnd->activate();
+ }
+ else
+ {
+ if ( pWnd->isAttached() )
+ {
+ if ( bActivateNecessary && ( m_pMdi->topChild() == pWnd->mdiParent() ) )
+ pWnd->activate();
+
+ pWnd->mdiParent()->raiseAndActivate();
+ }
+ if ( !pWnd->isAttached() )
+ {
+ if ( bActivateNecessary )
+ pWnd->activate();
+
+ m_pMdi->setTopChild( 0L ); // lose focus in the mainframe window
+ if ( !pWnd->isActiveWindow() )
+ pWnd->setActiveWindow();
+
+ pWnd->raise();
+ }
+ }
+ if ( !switching() )
+ activeWindow()->updateTimeStamp();
+ emit collapseOverlapContainers();
+ pWnd->m_bMainframesActivateViewIsPending = false;
+}
+
+
+void KMdiMainFrm::activateView( KMdiChildView* pWnd )
+{
+ pWnd->m_bMainframesActivateViewIsPending = true;
+
+ bool bActivateNecessary = true;
+ if ( m_pCurrentWindow != pWnd )
+ m_pCurrentWindow = pWnd;
+ else
+ {
+ bActivateNecessary = false;
+ // if this method is called as answer to view->activate(),
+ // interrupt it because it's not necessary
+ pWnd->m_bInterruptActivation = true;
+ }
+
+ if ( m_pTaskBar )
+ m_pTaskBar->setActiveButton( pWnd );
+
+ if ( m_documentTabWidget && m_mdiMode == KMdi::TabPageMode || m_mdiMode == KMdi::IDEAlMode )
+ {
+ m_documentTabWidget->showPage( pWnd );
+ pWnd->activate();
+ }
+ else
+ {
+ if ( pWnd->isAttached() )
+ {
+ if ( bActivateNecessary && ( m_pMdi->topChild() == pWnd->mdiParent() ) )
+ pWnd->activate();
+
+ pWnd->mdiParent() ->raiseAndActivate();
+ }
+ if ( !pWnd->isAttached() )
+ {
+ if ( bActivateNecessary )
+ pWnd->activate();
+
+ m_pMdi->setTopChild( 0L ); // lose focus in the mainframe window
+ if ( !pWnd->isActiveWindow() )
+ pWnd->setActiveWindow();
+
+ pWnd->raise();
+ }
+ }
+
+ emit collapseOverlapContainers();
+
+ pWnd->m_bMainframesActivateViewIsPending = false;
+}
+
+void KMdiMainFrm::taskbarButtonRightClicked( KMdiChildView *pWnd )
+{
+ activateView( pWnd ); // set focus
+ //QApplication::sendPostedEvents();
+ taskBarPopup( pWnd, true ) ->popup( QCursor::pos() );
+}
+
+void KMdiMainFrm::childWindowCloseRequest( KMdiChildView *pWnd )
+{
+ KMdiViewCloseEvent * ce = new KMdiViewCloseEvent( pWnd );
+ QApplication::postEvent( this, ce );
+}
+
+bool KMdiMainFrm::event( QEvent* e )
+{
+ if ( e->type() == QEvent::User )
+ {
+ KMdiChildView * pWnd = ( KMdiChildView* ) ( ( KMdiViewCloseEvent* ) e )->data();
+ if ( pWnd != 0L )
+ closeWindow( pWnd );
+ return true;
+ // A little hack: If MDI child views are moved implicietly by moving
+ // the main widget they should know this too. Unfortunately there seems to
+ // be no way to catch the move start / move stop situations for the main
+ // widget in a clean way. (There is no MouseButtonPress/Release or
+ // something like that.) Therefore we do the following: When we get the
+ // "first" move event we start a timer and interprete it as "drag begin".
+ // If we get the next move event and the timer is running we restart the
+ // timer and don't do anything else. If the timer elapses (this meens we
+ // haven't had any move event for a while) we interprete this as "drag
+ // end". If the moving didn't stop actually, we will later get another
+ // "drag begin", so we get a drag end too much, but this would be the same
+ // as if the user would stop moving for a little while.
+ // Actually we seem to be lucky that the timer does not elapse while we
+ // are moving -> so we have no obsolete drag end / begin
+ }
+ else if ( isVisible() && e->type() == QEvent::Move )
+ {
+ if ( m_pDragEndTimer->isActive() )
+ {
+ // this is not the first move -> stop old timer
+ m_pDragEndTimer->stop();
+ }
+ else
+ {
+ // this is the first move -> send the drag begin to all concerned views
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; ( *it ); ++it )
+ {
+ KMdiChildFrmDragBeginEvent dragBeginEvent( 0L );
+ QApplication::sendEvent( ( *it ), &dragBeginEvent );
+ }
+ }
+ m_pDragEndTimer->start( 200, true ); // single shot after 200 ms
+ }
+
+ return DockMainWindow::event( e );
+}
+
+bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
+{
+ if ( e->type() == QEvent::Resize && m_mdiMode == KMdi::ToplevelMode )
+ {
+ verifyToplevelHeight();
+ return false; //let the rest of the resize magic do its work
+ }
+
+ if ( e->type() == QEvent::FocusIn )
+ {
+ QFocusEvent * pFE = ( QFocusEvent* ) e;
+ if ( pFE->reason() == QFocusEvent::ActiveWindow )
+ {
+ if ( m_pCurrentWindow && !m_pCurrentWindow->isHidden() &&
+ !m_pCurrentWindow->isAttached() && m_pMdi->topChild() )
+ {
+ return true; // eat the event
+ }
+ }
+ if ( m_pMdi )
+ {
+ static bool focusTCIsPending = false;
+ if ( !focusTCIsPending )
+ {
+ focusTCIsPending = true;
+ m_pMdi->focusTopChild();
+ focusTCIsPending = false;
+ }
+ }
+ }
+ else if ( e->type() == QEvent::KeyRelease )
+ {
+ if ( switching() )
+ {
+ KAction * a = actionCollection() ->action( "view_last_window" ) ;
+ if ( a )
+ {
+ const KShortcut cut( a->shortcut() );
+ const KKeySequence& seq = cut.seq( 0 );
+ const KKey& key = seq.key( 0 );
+ int modFlags = key.modFlags();
+ int state = ( ( QKeyEvent * ) e ) ->state();
+ KKey key2( ( QKeyEvent * ) e );
+
+ /** these are quite some assumptions:
+ * The key combination uses exactly one modifier key
+ * The WIN button in KDE is the meta button in Qt
+ **/
+ if ( state != ( ( QKeyEvent * ) e ) ->stateAfter() &&
+ ( ( modFlags & KKey::CTRL ) > 0 ) == ( ( state & Qt::ControlButton ) > 0 ) &&
+ ( ( modFlags & KKey::ALT ) > 0 ) == ( ( state & Qt::AltButton ) > 0 ) &&
+ ( ( modFlags & KKey::WIN ) > 0 ) == ( ( state & Qt::MetaButton ) > 0 ) )
+ {
+ activeWindow() ->updateTimeStamp();
+ setSwitching( false );
+ }
+ return true;
+ }
+ else
+ {
+ kdDebug(760) << "KAction( \"view_last_window\") not found." << endl;
+ }
+ }
+ }
+ return false; // standard event processing
+}
+
+/**
+ * close all views
+ */
+void KMdiMainFrm::closeAllViews()
+{
+ //save the children first to a list, as removing invalidates our iterator
+ QValueList<KMdiChildView*> children;
+ for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
+ {
+ children.append( w );
+ }
+ QValueListIterator<KMdiChildView *> childIt;
+ for ( childIt = children.begin(); childIt != children.end(); ++childIt )
+ {
+ ( *childIt )->close();
+ }
+}
+
+
+/**
+ * iconify all views
+ */
+void KMdiMainFrm::iconifyAllViews()
+{
+ kdDebug(760) << k_funcinfo << "minimizing all the views" << endl;
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; ( *it ); ++it )
+ ( *it )->minimize();
+}
+
+/**
+ * closes the view of the active (topchild) window
+ */
+void KMdiMainFrm::closeActiveView()
+{
+ kdDebug(760) << k_funcinfo << "closing the active view" << endl;
+ if ( m_pCurrentWindow )
+ m_pCurrentWindow->close();
+}
+
+/** find the root dockwidgets and store their geometry */
+void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList, QValueList<QRect>* positionList )
+{
+ //nothing is valid
+ if ( !rootDockWidgetList && !positionList )
+ return ;
+
+ // since we set some windows to toplevel, we must consider the window manager's window frame
+ const int frameBorderWidth = 7; // @todo: Can we / do we need to ask the window manager?
+ const int windowTitleHeight = 10; // @todo: -"-
+
+ QObjectList* pObjList = queryList( "KDockWidget" );
+ if ( pObjList->isEmpty() )
+ pObjList = queryList( "KDockWidget_Compat::KDockWidget" );
+
+ QObjectListIt it( *pObjList );
+ // for all dockwidgets (which are children of this mainwindow)
+ while ( ( *it ) )
+ {
+ KDockWidget* dockWindow = 0L; /* pDockW */
+ KDockWidget* rootDockWindow = 0L; /* pRootDockWindow */
+ KDockWidget* undockCandidate = 0L; /* pUndockCandidate */
+ QWidget* pW = static_cast<QWidget*>( ( *it ) );
+
+ // find the oldest ancestor of the current dockwidget that can be undocked
+ while ( !pW->isTopLevel() )
+ {
+ if ( ::qt_cast<KDockWidget*>( pW ) || pW->inherits( "KDockWidget_Compat::KDockWidget" ) )
+ {
+ undockCandidate = static_cast<KDockWidget*>( pW );
+ if ( undockCandidate->enableDocking() != KDockWidget::DockNone )
+ rootDockWindow = undockCandidate;
+ }
+ pW = pW->parentWidget();
+ }
+
+ if ( rootDockWindow )
+ {
+ // if that oldest ancestor is not already in the list, append it
+ bool found = false;
+ if ( !rootDockWidgetList->isEmpty() )
+ {
+ QPtrListIterator<KDockWidget> it2( *rootDockWidgetList );
+ for ( ; it2.current() && !found; ++it2 )
+ {
+ dockWindow = it2.current();
+ if ( dockWindow == rootDockWindow )
+ found = true;
+ }
+ }
+
+ if ( !found || rootDockWidgetList->isEmpty() )
+ {
+ rootDockWidgetList->append( dockWindow );
+ kdDebug(760) << k_funcinfo << "Appending " << rootDockWindow << " to our list of " <<
+ "root dock windows" << endl;
+ QPoint p = rootDockWindow->mapToGlobal( rootDockWindow->pos() ) - rootDockWindow->pos();
+ QRect r( p.x(), p.y() + m_undockPositioningOffset.y(),
+ rootDockWindow->width() - windowTitleHeight - frameBorderWidth * 2,
+ rootDockWindow->height() - windowTitleHeight - frameBorderWidth * 2 );
+ positionList->append( r );
+ }
+ }
+ ++it;
+ }
+ delete pObjList;
+}
+
+/**
+ * undocks all view windows (unix-like)
+ */
+void KMdiMainFrm::switchToToplevelMode()
+{
+ if ( m_mdiMode == KMdi::ToplevelMode )
+ {
+ emit mdiModeHasBeenChangedTo( KMdi::ToplevelMode );
+ return ;
+ }
+
+ KMdi::MdiMode oldMdiMode = m_mdiMode;
+
+ const int frameBorderWidth = 7; // @todo: Can we / do we need to ask the window manager?
+ setUndockPositioningOffset( QPoint( 0, ( m_pTaskBar ? m_pTaskBar->height() : 0 ) + frameBorderWidth ) );
+
+ // 1.) select the dockwidgets to be undocked and store their geometry
+ QPtrList<KDockWidget> rootDockWidgetList;
+ QValueList<QRect> positionList;
+
+ // 2.) undock the MDI views of KMDI
+ switch( oldMdiMode )
+ {
+ case KMdi::ChildframeMode:
+ finishChildframeMode();
+ break;
+ case KMdi::TabPageMode:
+ finishTabPageMode();
+ break;
+ case KMdi::IDEAlMode:
+ finishIDEAlMode();
+ findRootDockWidgets( &rootDockWidgetList, &positionList );
+ break;
+ default:
+ break; //do nothing
+ }
+
+ // 3.) undock all these found oldest ancestors (being KDockWidgets)
+ QPtrListIterator<KDockWidget> kdwit( rootDockWidgetList );
+ for ( ; ( *kdwit ); ++kdwit )
+ ( *kdwit )->undock();
+
+ // 4.) recreate the MDI childframe area and hide it
+ if ( oldMdiMode == KMdi::TabPageMode || oldMdiMode == KMdi::IDEAlMode )
+ {
+ if ( !m_pDockbaseAreaOfDocumentViews )
+ {
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
+ m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
+ m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
+ m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
+ }
+ // set this dock to main view
+ setView( m_pDockbaseAreaOfDocumentViews );
+ setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
+ }
+ // QApplication::sendPostedEvents(); //why do we need to empty the event queue?
+ if ( !parentWidget() )
+ {
+ //if we don't have a parent widget ( which i expect we wouldn't )
+ //make sure we take into account the size of the docks provided by
+ //QMainWindow
+ int topDockHeight = topDock() ? topDock()->height() : 0;
+ int bottomDockHeight = bottomDock() ? bottomDock()->height() : 0;
+ int menuBarHeight = hasMenuBar() ? menuBar()->height() : 0;
+ if ( m_pDocumentViews->count() != 0 )
+ setFixedHeight( height() - m_pDockbaseAreaOfDocumentViews->height() );
+ else
+ {
+ kdDebug(760) << k_funcinfo << "height is: " << height() << endl;
+ kdDebug(760) << k_funcinfo << "top dock height: " << topDockHeight << endl;
+ kdDebug(760) << k_funcinfo << "bottom dock height: " << bottomDockHeight << endl;
+ kdDebug(760) << k_funcinfo << "menu bar height: " << menuBarHeight << endl;
+ kdDebug(760) << k_funcinfo << "dock base area height: " << m_pDockbaseAreaOfDocumentViews->height() << endl;
+ setFixedHeight( topDockHeight + menuBarHeight );
+ }
+ }
+
+ //FIXME although i don't know what to fix
+ // 5. show the child views again
+ QPtrListIterator<KMdiChildView> kmdicvit( *m_pDocumentViews );
+ for ( kmdicvit.toFirst(); ( *kmdicvit ); ++kmdicvit )
+ {
+#ifdef Q_WS_X11
+ XSetTransientForHint( qt_xdisplay(), ( *kmdicvit )->winId(), winId() );
+#endif
+ ( *kmdicvit )->show();
+ }
+
+ // 6.) reset all memorized positions of the undocked ones and show them again
+ QValueList<QRect>::Iterator qvlqrit;
+ QValueList<QRect>::Iterator qvlEnd = positionList.end();
+ for ( kmdicvit.toFirst(), qvlqrit = positionList.begin() ; ( *kmdicvit ) && qvlqrit != qvlEnd; ++kmdicvit, ++qvlqrit )
+ {
+ ( *kmdicvit )->setGeometry( ( *qvlqrit ) );
+ ( *kmdicvit )->show();
+ }
+
+ m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockNone );
+ m_mdiMode = KMdi::ToplevelMode;
+
+ kdDebug(760) << k_funcinfo << "Switch to toplevel mode completed" << endl;
+ emit mdiModeHasBeenChangedTo( KMdi::ToplevelMode );
+
+}
+
+void KMdiMainFrm::finishToplevelMode()
+{
+ m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
+}
+
+/**
+ * docks all view windows (Windows-like)
+ */
+void KMdiMainFrm::switchToChildframeMode()
+{
+ if ( m_mdiMode == KMdi::ChildframeMode )
+ {
+ emit mdiModeHasBeenChangedTo( KMdi::ChildframeMode );
+ return ;
+ }
+
+ QPtrList<KDockWidget> rootDockWidgetList;
+ QValueList<QRect> positionList;
+
+ if ( m_mdiMode == KMdi::TabPageMode )
+ {
+ kdDebug(760) << k_funcinfo << "finishing tab page mode" << endl;
+ // select the dockwidgets to be undocked and store their geometry
+ findRootDockWidgets( &rootDockWidgetList, &positionList );
+ kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl;
+
+ // undock all these found oldest ancestors (being KDockWidgets)
+ QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ for ( ; ( *it ) ; ++it )
+ ( *it )->undock();
+
+ finishTabPageMode();
+ }
+ else if ( m_mdiMode == KMdi::ToplevelMode )
+ {
+ finishToplevelMode();
+ }
+ else if ( m_mdiMode == KMdi::IDEAlMode )
+ {
+ kdDebug(760) << k_funcinfo << "finishing ideal mode" << endl;
+ finishIDEAlMode( false );
+
+ // select the dockwidgets to be undocked and store their geometry
+ findRootDockWidgets( &rootDockWidgetList, &positionList );
+ kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl;
+
+ // undock all these found oldest ancestors (being KDockWidgets)
+ QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ for ( ; ( *it ) ; ++it )
+ ( *it )->undock();
+
+ m_mdiMode = KMdi::TabPageMode;
+ finishTabPageMode();
+ m_mdiMode = KMdi::IDEAlMode;
+ }
+
+ if ( !m_pDockbaseAreaOfDocumentViews )
+ {
+ // cover KMdi's childarea by a dockwidget
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
+ m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
+ m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
+ m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
+ kdDebug(760) << k_funcinfo << "childarea is now covered by a dockwidget" << endl;
+ }
+
+ if ( m_pDockbaseAreaOfDocumentViews->isTopLevel() )
+ {
+ // set this dock to main view
+ setView( m_pDockbaseAreaOfDocumentViews );
+ setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
+ m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
+ m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
+ kdDebug(760) << k_funcinfo << "Dock base area has been set to the main view" << endl;
+ }
+ m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi ); //JW
+ m_pDockbaseAreaOfDocumentViews->show();
+
+ if ( ( m_mdiMode == KMdi::TabPageMode ) || ( m_mdiMode == KMdi::IDEAlMode ) )
+ {
+ kdDebug(760) << k_funcinfo << "trying to dock back the undock toolviews" << endl;
+ QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ for ( ; ( *it ); ++it )
+ ( *it )->dockBack();
+ }
+
+ if ( m_mdiMode == KMdi::ToplevelMode && m_pTempDockSession )
+ {
+ // restore the old dock scenario which we memorized at the time we switched to toplevel mode
+ kdDebug(760) << k_funcinfo << "Restoring old dock scenario memorized from toplevel mode" << endl;
+ QDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
+ readDockConfig( oldDockState );
+ }
+
+ KMdi::MdiMode oldMdiMode = m_mdiMode;
+ m_mdiMode = KMdi::ChildframeMode;
+
+ //FIXME although i don't know what to fix.
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; ( *it ); ++it )
+ {
+ KMdiChildView* pView = ( *it );
+ if ( !pView->isToolView() && pView->isAttached() )
+ attachWindow( pView, true );
+ }
+ for ( it.toFirst(); ( *it ); ++it )
+ {
+ KMdiChildView* pView = ( *it );
+ if ( !pView->isToolView() )
+ pView->show();
+ }
+ if ( ( oldMdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ {
+ setMinimumHeight( m_oldMainFrmMinHeight );
+ setMaximumHeight( m_oldMainFrmMaxHeight );
+ resize( width(), m_oldMainFrmHeight );
+ m_oldMainFrmHeight = 0;
+ kdDebug(760) << k_funcinfo << "left top level mode completely" << endl;
+ emit leftTopLevelMode();
+ }
+ emit mdiModeHasBeenChangedTo( KMdi::ChildframeMode );
+}
+
+void KMdiMainFrm::finishChildframeMode()
+{
+ // save the old dock scenario of the dockwidget-like tool views to a DOM tree
+ kdDebug(760) << k_funcinfo << "saving the current dock scenario" << endl;
+ delete m_pTempDockSession;
+ m_pTempDockSession = new QDomDocument( "docksession" );
+ QDomElement curDockState = m_pTempDockSession->createElement( "cur_dock_state" );
+ m_pTempDockSession->appendChild( curDockState );
+ writeDockConfig( curDockState );
+
+ // detach all non-tool-views to toplevel
+ kdDebug(760) << k_funcinfo << "detaching all document views and moving them to toplevel" << endl;
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; ( *it ); ++it )
+ {
+ KMdiChildView* pView = ( *it );
+ if ( pView->isToolView() )
+ continue;
+ if ( pView->isAttached() )
+ {
+ if ( pView->isMaximized() )
+ pView->mdiParent()->setGeometry( 0, 0, m_pMdi->width(), m_pMdi->height() );
+ detachWindow( pView, false );
+ }
+ }
+}
+
+/**
+ * Docks all view windows (Windows-like)
+ */
+void KMdiMainFrm::switchToTabPageMode()
+{
+ if ( m_mdiMode == KMdi::TabPageMode )
+ {
+ emit mdiModeHasBeenChangedTo( KMdi::TabPageMode );
+ return ; // nothing need to be done
+ }
+
+ switch( m_mdiMode )
+ {
+ case KMdi::ChildframeMode:
+ finishChildframeMode();
+ break;
+ case KMdi::ToplevelMode:
+ finishToplevelMode();
+ break;
+ case KMdi::IDEAlMode:
+ finishIDEAlMode( false );
+ emit mdiModeHasBeenChangedTo( KMdi::TabPageMode );
+ m_mdiMode = KMdi::TabPageMode;
+ return;
+ break;
+ default:
+ break;
+ }
+
+ setupTabbedDocumentViewSpace();
+ m_mdiMode = KMdi::TabPageMode;
+ if ( m_pCurrentWindow )
+ m_pCurrentWindow->setFocus();
+
+ m_pTaskBar->switchOn( false );
+
+ if ( m_pClose )
+ {
+ QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ if ( m_pDocumentViews->count() > 0 )
+ m_pClose->show();
+ }
+ else
+ kdDebug(760) << "close button nonexistant. strange things might happen" << endl;
+
+ kdDebug(760) << "Switch to tab page mode complete" << endl;
+ emit mdiModeHasBeenChangedTo( KMdi::TabPageMode );
+}
+
+void KMdiMainFrm::finishTabPageMode()
+{
+ // if tabified, release all views from their docking covers
+ if ( m_mdiMode == KMdi::TabPageMode )
+ {
+ m_pClose->hide();
+ QObject::disconnect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; it.current(); ++it )
+ {
+ KMdiChildView* pView = it.current();
+ if ( pView->isToolView() )
+ continue;
+ kdDebug(760) << "KMdiMainFrm::finishTabPageMode: in loop" << endl;
+ QSize mins = pView->minimumSize();
+ QSize maxs = pView->maximumSize();
+ QSize sz = pView->size();
+ QWidget* pParent = pView->parentWidget();
+ QPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
+ m_documentTabWidget->removePage( pView );
+ pView->reparent( 0, 0, p );
+ // pView->reparent(0,0,p);
+ pView->resize( sz );
+ pView->setMinimumSize( mins.width(), mins.height() );
+ pView->setMaximumSize( maxs.width(), maxs.height() );
+ // ((KDockWidget*)pParent)->undock(); // this destroys the dockwiget cover, too
+ // pParent->close();
+ // delete pParent;
+ // if (centralWidget() == pParent) {
+ // setCentralWidget(0L); // avoid dangling pointer
+ // }
+ }
+ delete m_documentTabWidget;
+ m_documentTabWidget = 0;
+ m_pTaskBar->switchOn( true );
+ }
+}
+
+
+
+void KMdiMainFrm::setupTabbedDocumentViewSpace()
+{
+ // resize to childframe mode size of the mainwindow if we were in toplevel mode
+ if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ {
+ setMinimumHeight( m_oldMainFrmMinHeight );
+ setMaximumHeight( m_oldMainFrmMaxHeight );
+ resize( width(), m_oldMainFrmHeight );
+ m_oldMainFrmHeight = 0;
+ //qDebug("TopLevelMode off");
+ emit leftTopLevelMode();
+ QApplication::sendPostedEvents();
+
+ // restore the old dock szenario which we memorized at the time we switched to toplevel mode
+ if ( m_pTempDockSession )
+ {
+ QDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
+ readDockConfig( oldDockState );
+ }
+ }
+
+#if 0
+ if ( m_pDockbaseOfTabPage != m_pDockbaseAreaOfDocumentViews )
+ {
+ delete m_pDockbaseOfTabPage;
+ m_pDockbaseOfTabPage = m_pDockbaseAreaOfDocumentViews;
+ }
+#endif
+ delete m_documentTabWidget;
+ m_documentTabWidget = new KMdiDocumentViewTabWidget( m_pDockbaseAreaOfDocumentViews );
+ connect( m_documentTabWidget, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( slotDocCurrentChanged( QWidget* ) ) );
+ m_pDockbaseAreaOfDocumentViews->setWidget( m_documentTabWidget );
+ m_documentTabWidget->show();
+ QPtrListIterator<KMdiChildView> it4( *m_pDocumentViews );
+ for ( ; it4.current(); ++it4 )
+ {
+ KMdiChildView* pView = it4.current();
+ m_documentTabWidget->addTab( pView, pView->icon() ? *( pView->icon() ) : QPixmap(), pView->tabCaption() );
+ /*
+ connect(pView,SIGNAL(iconOrCaptionUdpated(QWidget*,QPixmap,const QString&)),
+ m_documentTabWidget,SLOT(updateView(QWidget*,QPixmap,const QString&)));
+ */
+ connect( pView, SIGNAL( iconUpdated( QWidget*, QPixmap ) ), m_documentTabWidget, SLOT( updateIconInView( QWidget*, QPixmap ) ) );
+ connect( pView, SIGNAL( captionUpdated( QWidget*, const QString& ) ), m_documentTabWidget, SLOT( updateCaptionInView( QWidget*, const QString& ) ) );
+
+ }
+}
+
+
+void KMdiMainFrm::setIDEAlModeStyle( int flags )
+{
+ d->m_styleIDEAlMode = flags; // see KMultiTabBar for the first 3 bits
+ if ( m_leftContainer )
+ {
+ KMdiDockContainer * tmpL = ( KMdiDockContainer* ) ( m_leftContainer->getWidget()->qt_cast( "KMdiDockContainer" ) );
+ if ( tmpL )
+ tmpL->setStyle( flags );
+ }
+
+ if ( m_rightContainer )
+ {
+ KMdiDockContainer * tmpR = ( KMdiDockContainer* ) ( m_rightContainer->getWidget()->qt_cast( "KMdiDockContainer" ) );
+ if ( tmpR )
+ tmpR->setStyle( flags );
+ }
+
+ if ( m_topContainer )
+ {
+ KMdiDockContainer * tmpT = ( KMdiDockContainer* ) ( m_topContainer->getWidget()->qt_cast( "KMdiDockContainer" ) );
+ if ( tmpT )
+ tmpT->setStyle( flags );
+ }
+
+ if ( m_bottomContainer )
+ {
+ KMdiDockContainer * tmpB = ( KMdiDockContainer* ) ( m_bottomContainer->getWidget()->qt_cast( "KMdiDockContainer" ) );
+ if ( tmpB )
+ tmpB->setStyle( flags );
+ }
+}
+
+void KMdiMainFrm::setToolviewStyle( int flag )
+{
+ if ( m_mdiMode == KMdi::IDEAlMode )
+ {
+ setIDEAlModeStyle( flag );
+ }
+ d->m_toolviewStyle = flag;
+ bool toolviewExists = false;
+ QMap<QWidget*, KMdiToolViewAccessor*>::Iterator it;
+ for ( it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it )
+ {
+ KDockWidget *dockWidget = dynamic_cast<KDockWidget*>( it.data()->wrapperWidget() );
+ if ( dockWidget )
+ {
+ switch ( flag )
+ {
+ case KMdi::IconOnly:
+ dockWidget->setTabPageLabel( QString::null );
+ dockWidget->setPixmap( *( it.data()->wrappedWidget()->icon() ) );
+ break;
+ case KMdi::TextOnly:
+ dockWidget->setPixmap(); //FIXME: Does not hide the icon in the IDEAl mode.
+ dockWidget->setTabPageLabel( it.data()->wrappedWidget()->caption() );
+ break;
+ case KMdi::TextAndIcon:
+ dockWidget->setPixmap( *( it.data()->wrappedWidget()->icon() ) );
+ dockWidget->setTabPageLabel( it.data()->wrappedWidget()->caption() );
+ default:
+ break;
+ }
+ toolviewExists = true;
+ }
+ }
+
+ if ( toolviewExists )
+ {
+ //workaround for the above FIXME to make switching to TextOnly mode work in IDEAl as well. Be sure that this version of switch* is called.
+ if ( m_mdiMode == KMdi::IDEAlMode && flag == KMdi::TextOnly )
+ {
+ KMdiMainFrm::switchToTabPageMode();
+ KMdiMainFrm::switchToIDEAlMode();
+ }
+ else
+ {
+ writeDockConfig();
+ readDockConfig();
+ }
+ }
+}
+
+/**
+ * Docks all view windows (Windows-like)
+ */
+void KMdiMainFrm::switchToIDEAlMode()
+{
+ kdDebug(760) << k_funcinfo << "switching to IDEAl mode" << endl;
+
+ if ( m_mdiMode == KMdi::IDEAlMode )
+ {
+ emit mdiModeHasBeenChangedTo( KMdi::IDEAlMode );
+ return ; // nothing need to be done
+ }
+
+ switch( m_mdiMode )
+ {
+ case KMdi::ChildframeMode:
+ finishChildframeMode();
+ break;
+ case KMdi::ToplevelMode:
+ finishToplevelMode();
+ break;
+ case KMdi::TabPageMode:
+ m_mdiMode = KMdi::IDEAlMode;
+ setupToolViewsForIDEALMode();
+ emit mdiModeHasBeenChangedTo( KMdi::IDEAlMode );
+ return;
+ break;
+ default:
+ break;
+ }
+
+ setupTabbedDocumentViewSpace();
+ m_mdiMode = KMdi::IDEAlMode;
+ setupToolViewsForIDEALMode();
+
+ if ( m_pCurrentWindow )
+ m_pCurrentWindow->setFocus();
+
+ m_pTaskBar->switchOn( false );
+
+ if ( m_pClose )
+ {
+ QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ if ( m_pDocumentViews->count() > 0 )
+ m_pClose->show();
+ }
+ else
+ kdWarning(760) << k_funcinfo << "close button pointer does not exist!" << endl;
+
+ kdDebug(760) << k_funcinfo << "switch to IDEAl mode complete" << endl;
+
+ emit mdiModeHasBeenChangedTo( KMdi::IDEAlMode );
+}
+
+
+void KMdiMainFrm::dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container )
+{
+ QPtrListIterator<KDockWidget> it( widgetsToReparent );
+ for ( ; ( *it ); ++it )
+ {
+ ( *it )->manualDock( container, KDockWidget::DockCenter, 20 );
+ ( *it )->loseFormerBrotherDockWidget();
+ }
+}
+
+void KMdiMainFrm::findToolViewsDockedToMain( QPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw )
+{
+ KDockWidget* mainDock = getMainDockWidget();
+ if ( mainDock->parentDockTabGroup() )
+ {
+ mainDock = dynamic_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
+ // FIXME: will likely crash below due to unchecked cast
+ }
+
+ if ( !mainDock )
+ {
+ kdDebug(760) << k_funcinfo << "mainDock invalid. No main dock widget found." << endl;
+ return;
+ }
+
+ KDockWidget* widget = mainDock->findNearestDockWidget( dprtmw );
+ if ( widget && widget->parentDockTabGroup() )
+ {
+ widget = static_cast<KDockWidget*>( widget->parentDockTabGroup() ->parent() );
+
+ if ( widget )
+ {
+ KDockTabGroup* tg = dynamic_cast<KDockTabGroup*>( widget->getWidget() );
+ if ( tg )
+ {
+ kdDebug(760) << k_funcinfo << "KDockTabGroup found" << endl;
+ for ( int i = 0;i < tg->count();i++ )
+ list->append( static_cast<KDockWidget*>( tg->page( i ) ) );
+ }
+ else
+ list->append( widget );
+ }
+ else
+ kdDebug(760) << k_funcinfo << "no widget found" << endl;
+ }
+ else
+ kdDebug(760) << "No main dock widget found" << endl;
+}
+
+
+void KMdiMainFrm::setupToolViewsForIDEALMode()
+{
+ m_leftContainer = createDockWidget( "KMdiDock::leftDock", SmallIcon( "misc" ), 0L, "Left Dock" );
+ m_rightContainer = createDockWidget( "KMdiDock::rightDock", SmallIcon( "misc" ), 0L, "Right Dock" );
+ m_topContainer = createDockWidget( "KMdiDock::topDock", SmallIcon( "misc" ), 0L, "Top Dock" );
+ m_bottomContainer = createDockWidget( "KMdiDock::bottomDock", SmallIcon( "misc" ), 0L, "Bottom Dock" );
+
+ KDockWidget *mainDock = getMainDockWidget();
+ KDockWidget *w = mainDock;
+ if ( mainDock->parentDockTabGroup() )
+ w = static_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
+
+ QPtrList<KDockWidget> leftReparentWidgets;
+ QPtrList<KDockWidget> rightReparentWidgets;
+ QPtrList<KDockWidget> bottomReparentWidgets;
+ QPtrList<KDockWidget> topReparentWidgets;
+
+ if ( mainDock->parentDockTabGroup() )
+ mainDock = static_cast<KDockWidget*>( mainDock->parentDockTabGroup() ->parent() );
+
+ findToolViewsDockedToMain( &leftReparentWidgets, KDockWidget::DockLeft );
+ findToolViewsDockedToMain( &rightReparentWidgets, KDockWidget::DockRight );
+ findToolViewsDockedToMain( &bottomReparentWidgets, KDockWidget::DockBottom );
+ findToolViewsDockedToMain( &topReparentWidgets, KDockWidget::DockTop );
+
+ mainDock->setEnableDocking( KDockWidget::DockNone ); //::DockCorner);
+ mainDock->setDockSite( KDockWidget::DockCorner );
+
+
+ KMdiDockContainer *tmpDC;
+ m_leftContainer->setWidget( tmpDC = new KMdiDockContainer( m_leftContainer, this, KDockWidget::DockLeft, d->m_styleIDEAlMode ) );
+ m_leftContainer->setEnableDocking( KDockWidget::DockLeft );
+ m_leftContainer->manualDock( mainDock, KDockWidget::DockLeft, 20 );
+ tmpDC->init();
+ if ( m_mdiGUIClient )
+ connect ( this, SIGNAL( toggleLeft() ), tmpDC, SLOT( toggle() ) );
+ connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
+ connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+
+ m_rightContainer->setWidget( tmpDC = new KMdiDockContainer( m_rightContainer, this, KDockWidget::DockRight, d->m_styleIDEAlMode ) );
+ m_rightContainer->setEnableDocking( KDockWidget::DockRight );
+ m_rightContainer->manualDock( mainDock, KDockWidget::DockRight, 80 );
+ tmpDC->init();
+ if ( m_mdiGUIClient )
+ connect ( this, SIGNAL( toggleRight() ), tmpDC, SLOT( toggle() ) );
+ connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
+ connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+
+ m_topContainer->setWidget( tmpDC = new KMdiDockContainer( m_topContainer, this, KDockWidget::DockTop, d->m_styleIDEAlMode ) );
+ m_topContainer->setEnableDocking( KDockWidget::DockTop );
+ m_topContainer->manualDock( mainDock, KDockWidget::DockTop, 20 );
+ tmpDC->init();
+ if ( m_mdiGUIClient )
+ connect ( this, SIGNAL( toggleTop() ), tmpDC, SLOT( toggle() ) );
+ connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
+ connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+
+ m_bottomContainer->setWidget( tmpDC = new KMdiDockContainer( m_bottomContainer, this, KDockWidget::DockBottom, d->m_styleIDEAlMode ) );
+ m_bottomContainer->setEnableDocking( KDockWidget::DockBottom );
+ m_bottomContainer->manualDock( mainDock, KDockWidget::DockBottom, 80 );
+ tmpDC->init();
+ if ( m_mdiGUIClient )
+ connect ( this, SIGNAL( toggleBottom() ), tmpDC, SLOT( toggle() ) );
+ connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
+ connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+
+ m_leftContainer->setDockSite( KDockWidget::DockCenter );
+ m_rightContainer->setDockSite( KDockWidget::DockCenter );
+ m_topContainer->setDockSite( KDockWidget::DockCenter );
+ m_bottomContainer->setDockSite( KDockWidget::DockCenter );
+
+ dockToolViewsIntoContainers( leftReparentWidgets, m_leftContainer );
+ dockToolViewsIntoContainers( rightReparentWidgets, m_rightContainer );
+ dockToolViewsIntoContainers( bottomReparentWidgets, m_bottomContainer );
+ dockToolViewsIntoContainers( topReparentWidgets, m_topContainer );
+
+
+ dockManager->setSpecialLeftDockContainer( m_leftContainer );
+ dockManager->setSpecialRightDockContainer( m_rightContainer );
+ dockManager->setSpecialTopDockContainer( m_topContainer );
+ dockManager->setSpecialBottomDockContainer( m_bottomContainer );
+
+
+ ( ( KMdiDockContainer* ) ( m_leftContainer->getWidget() ) ) ->hideIfNeeded();
+ ( ( KMdiDockContainer* ) ( m_rightContainer->getWidget() ) ) ->hideIfNeeded();
+ ( ( KMdiDockContainer* ) ( m_topContainer->getWidget() ) ) ->hideIfNeeded();
+ ( ( KMdiDockContainer* ) ( m_bottomContainer->getWidget() ) ) ->hideIfNeeded();
+
+}
+
+
+
+void KMdiMainFrm::finishIDEAlMode( bool full )
+{
+ // if tabified, release all views from their docking covers
+ if ( m_mdiMode == KMdi::IDEAlMode )
+ {
+ assert( m_pClose );
+ m_pClose->hide();
+ QObject::disconnect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+
+
+ QStringList leftNames;
+ leftNames = prepareIdealToTabs( m_leftContainer );
+ int leftWidth = m_leftContainer->width();
+
+ QStringList rightNames;
+ rightNames = prepareIdealToTabs( m_rightContainer );
+ int rightWidth = m_rightContainer->width();
+
+ QStringList topNames;
+ topNames = prepareIdealToTabs( m_topContainer );
+ int topHeight = m_topContainer->height();
+
+ QStringList bottomNames;
+ bottomNames = prepareIdealToTabs( m_bottomContainer );
+ int bottomHeight = m_bottomContainer->height();
+
+
+ kdDebug(760) << "leftNames" << leftNames << endl;
+ kdDebug(760) << "rightNames" << rightNames << endl;
+ kdDebug(760) << "topNames" << topNames << endl;
+ kdDebug(760) << "bottomNames" << bottomNames << endl;
+
+ delete m_leftContainer;
+ m_leftContainer = 0;
+ delete m_rightContainer;
+ m_rightContainer = 0;
+ delete m_bottomContainer;
+ m_bottomContainer = 0;
+ delete m_topContainer;
+ m_topContainer = 0;
+
+
+ idealToolViewsToStandardTabs( bottomNames, KDockWidget::DockBottom, bottomHeight );
+ idealToolViewsToStandardTabs( leftNames, KDockWidget::DockLeft, leftWidth );
+ idealToolViewsToStandardTabs( rightNames, KDockWidget::DockRight, rightWidth );
+ idealToolViewsToStandardTabs( topNames, KDockWidget::DockTop, topHeight );
+
+ QApplication::sendPostedEvents();
+
+ if ( !full )
+ return ;
+
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; it.current(); ++it )
+ {
+ KMdiChildView* pView = it.current();
+ if ( pView->isToolView() )
+ continue;
+ QSize mins = pView->minimumSize();
+ QSize maxs = pView->maximumSize();
+ QSize sz = pView->size();
+ QWidget* pParent = pView->parentWidget();
+ QPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
+ pView->reparent( 0, 0, p );
+ pView->reparent( 0, 0, p );
+ pView->resize( sz );
+ pView->setMinimumSize( mins.width(), mins.height() );
+ pView->setMaximumSize( maxs.width(), maxs.height() );
+ KDockWidget* pDockW = 0L;
+ // find the oldest ancestor of the current dockwidget that can be undocked
+ do
+ {
+ if ( pParent->inherits( "KDockWidget" ) || pParent->inherits( "KDockWidget_Compat::KDockWidget" ) )
+ {
+ pDockW = ( KDockWidget* ) pParent;
+ pDockW->undock(); // this destroys the dockwiget cover, too
+ if ( pParent != m_pDockbaseAreaOfDocumentViews )
+ {
+ pParent->close();
+ delete pParent;
+ }
+ }
+ else
+ {
+ pParent = pParent->parentWidget();
+ }
+ }
+ while ( pParent && !pDockW );
+ if ( centralWidget() == pParent )
+ {
+ setCentralWidget( 0L ); // avoid dangling pointer
+ }
+ }
+ m_pTaskBar->switchOn( true );
+
+ }
+
+}
+
+QStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container )
+{
+ KDockContainer * pDW = dynamic_cast<KDockContainer*>( container->getWidget() );
+ QStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets();
+ for ( QStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it )
+ {
+ KDockWidget* dw = ( KDockWidget* ) manager() ->getDockWidgetFromName( *it );
+ dw->undock();
+ dw->setLatestKDockContainer( 0 );
+ dw->loseFormerBrotherDockWidget();
+ }
+ return widgetNames;
+}
+
+void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int size )
+{
+ Q_UNUSED( size )
+
+ KDockWidget * mainDock = getMainDockWidget();
+ if ( mainDock->parentDockTabGroup() )
+ {
+ mainDock = static_cast<KDockWidget*>( mainDock->parentDockTabGroup() ->parent() );
+ }
+
+ if ( widgetNames.count() > 0 )
+ {
+ QStringList::iterator it = widgetNames.begin();
+ KDockWidget *dwpd = manager() ->getDockWidgetFromName( *it );
+ if ( !dwpd )
+ {
+ kdDebug(760) << "Fatal error in finishIDEAlMode" << endl;
+ return ;
+ }
+ dwpd->manualDock( mainDock, pos, 20 );
+ ++it;
+ for ( ;it != widgetNames.end();++it )
+ {
+ KDockWidget *tmpdw = manager() ->getDockWidgetFromName( *it );
+ if ( !tmpdw )
+ {
+ kdDebug(760) << "Fatal error in finishIDEAlMode" << endl;
+ return ;
+ }
+ tmpdw->manualDock( dwpd, KDockWidget::DockCenter, 20 );
+ }
+
+#if 0
+ QWidget *wid = dwpd->parentDockTabGroup();
+ if ( !wid )
+ wid = dwpd;
+ wid->setGeometry( 0, 0, 20, 20 );
+ /* wid->resize(
+ ((pos==KDockWidget::DockLeft) || (pos==KDockWidget::DockRight))?size:wid->width(),
+ ((pos==KDockWidget::DockLeft) || (pos==KDockWidget::DockRight))?wid->height():size);
+ */
+#endif
+
+ }
+
+}
+
+
+/**
+ * redirect the signal for insertion of buttons to an own slot
+ * that means: If the menubar (where the buttons should be inserted) is given,
+ * QextMDI can insert them automatically.
+ * Otherwise only signals can be emitted to tell the outside that
+ * someone must do this job itself.
+ */
+void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar )
+{
+ if ( m_bSDIApplication ) // there are no buttons in the menubar in this mode (although the view is always maximized)
+ return ;
+
+ m_pMainMenuBar = pMenuBar;
+ if ( m_pMainMenuBar == 0L )
+ return ; // use setMenuForSDIModeSysButtons( 0L) for unsetting the external main menu!
+
+ if ( !m_pUndock )
+ m_pUndock = new QToolButton( pMenuBar );
+ if ( !m_pRestore )
+ m_pRestore = new QToolButton( pMenuBar );
+ if ( !m_pMinimize )
+ m_pMinimize = new QToolButton( pMenuBar );
+ if ( !m_pClose )
+ m_pClose = new QToolButton( pMenuBar );
+ m_pUndock->setAutoRaise( false );
+ m_pMinimize->setAutoRaise( false );
+ m_pRestore->setAutoRaise( false );
+ m_pClose->setAutoRaise( false );
+
+ setSysButtonsAtMenuPosition();
+
+ delete m_pUndockButtonPixmap;
+ delete m_pMinButtonPixmap;
+ delete m_pRestoreButtonPixmap;
+ delete m_pCloseButtonPixmap;
+ // create the decoration pixmaps
+ if ( frameDecorOfAttachedViews() == KMdi::Win95Look )
+ {
+ m_pUndockButtonPixmap = new QPixmap( win_undockbutton );
+ m_pMinButtonPixmap = new QPixmap( win_minbutton );
+ m_pRestoreButtonPixmap = new QPixmap( win_restorebutton );
+ m_pCloseButtonPixmap = new QPixmap( win_closebutton );
+ }
+ else if ( frameDecorOfAttachedViews() == KMdi::KDE1Look )
+ {
+ m_pUndockButtonPixmap = new QPixmap( kde_undockbutton );
+ m_pMinButtonPixmap = new QPixmap( kde_minbutton );
+ m_pRestoreButtonPixmap = new QPixmap( kde_restorebutton );
+ m_pCloseButtonPixmap = new QPixmap( kde_closebutton );
+ m_pUndock->setAutoRaise( true );
+ m_pMinimize->setAutoRaise( true );
+ m_pRestore->setAutoRaise( true );
+ m_pClose->setAutoRaise( true );
+ }
+ else if ( frameDecorOfAttachedViews() == KMdi::KDELook )
+ {
+ m_pUndockButtonPixmap = new QPixmap( kde2_undockbutton );
+ m_pMinButtonPixmap = new QPixmap( kde2_minbutton );
+ m_pRestoreButtonPixmap = new QPixmap( kde2_restorebutton );
+ m_pCloseButtonPixmap = new QPixmap( kde2_closebutton );
+ }
+ else
+ { // kde2laptop look
+ m_pUndockButtonPixmap = new QPixmap( kde2laptop_undockbutton );
+ m_pMinButtonPixmap = new QPixmap( kde2laptop_minbutton );
+ m_pRestoreButtonPixmap = new QPixmap( kde2laptop_restorebutton );
+ m_pCloseButtonPixmap = new QPixmap( kde2laptop_closebutton );
+ }
+
+ m_pUndock->hide();
+ m_pMinimize->hide();
+ m_pRestore->hide();
+ m_pClose->hide();
+
+ m_pUndock->setPixmap( *m_pUndockButtonPixmap );
+ m_pMinimize->setPixmap( *m_pMinButtonPixmap );
+ m_pRestore->setPixmap( *m_pRestoreButtonPixmap );
+ m_pClose->setPixmap( *m_pCloseButtonPixmap );
+}
+
+void KMdiMainFrm::setSysButtonsAtMenuPosition()
+{
+ if ( m_pMainMenuBar == 0L )
+ return ;
+ if ( m_pMainMenuBar->parentWidget() == 0L )
+ return ;
+
+ int menuW = m_pMainMenuBar->parentWidget() ->width();
+ int h;
+ int y;
+ if ( frameDecorOfAttachedViews() == KMdi::Win95Look )
+ h = 16;
+ else if ( frameDecorOfAttachedViews() == KMdi::KDE1Look )
+ h = 20;
+ else if ( frameDecorOfAttachedViews() == KMdi::KDELook )
+ h = 16;
+ else
+ h = 14;
+ y = m_pMainMenuBar->height() / 2 - h / 2;
+
+ if ( frameDecorOfAttachedViews() == KMdi::KDELaptopLook )
+ {
+ int w = 27;
+ m_pUndock->setGeometry( ( menuW - ( w * 3 ) - 5 ), y, w, h );
+ m_pMinimize->setGeometry( ( menuW - ( w * 2 ) - 5 ), y, w, h );
+ m_pRestore->setGeometry( ( menuW - w - 5 ), y, w, h );
+ }
+ else
+ {
+ m_pUndock->setGeometry( ( menuW - ( h * 4 ) - 5 ), y, h, h );
+ m_pMinimize->setGeometry( ( menuW - ( h * 3 ) - 5 ), y, h, h );
+ m_pRestore->setGeometry( ( menuW - ( h * 2 ) - 5 ), y, h, h );
+ m_pClose->setGeometry( ( menuW - h - 5 ), y, h, h );
+ }
+}
+
+/** Activates the next open view */
+void KMdiMainFrm::activateNextWin()
+{
+ KMdiIterator<KMdiChildView*>* it = createIterator();
+ KMdiChildView* aWin = activeWindow();
+ for ( it->first(); !it->isDone(); it->next() )
+ {
+ if ( it->currentItem() == aWin )
+ {
+ it->next();
+ if ( !it->currentItem() )
+ {
+ it->first();
+ }
+ if ( it->currentItem() )
+ {
+ activateView( it->currentItem() );
+ }
+ break;
+ }
+ }
+ delete it;
+}
+
+/** Activates the previous open view */
+void KMdiMainFrm::activatePrevWin()
+{
+ KMdiIterator<KMdiChildView*>* it = createIterator();
+ KMdiChildView* aWin = activeWindow();
+ for ( it->first(); !it->isDone(); it->next() )
+ {
+ if ( it->currentItem() == aWin )
+ {
+ it->prev();
+ if ( !it->currentItem() )
+ {
+ it->last();
+ }
+ if ( it->currentItem() )
+ {
+ activateView( it->currentItem() );
+ }
+ break;
+ }
+ }
+ delete it;
+}
+
+/** Activates the view we accessed the most time ago */
+void KMdiMainFrm::activateFirstWin()
+{
+ m_bSwitching= true; // flag that we are currently switching between windows
+ KMdiIterator<KMdiChildView*>* it = createIterator();
+ QMap<QDateTime, KMdiChildView*> m;
+ for ( it->first(); !it->isDone(); it->next() )
+ {
+ m.insert( it->currentItem() ->getTimeStamp(), it->currentItem() );
+ }
+
+ if ( !activeWindow() )
+ return ;
+
+ QDateTime current = activeWindow() ->getTimeStamp();
+ QMap<QDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ QMap<QDateTime, KMdiChildView*>::iterator newPos = pos;
+ if ( pos != m.end() )
+ {
+ ++newPos;
+ }
+ if ( newPos != m.end() )
+ { // look ahead
+ ++pos;
+ }
+ else
+ {
+ pos = m.begin();
+ }
+ activateView( pos.data() );
+ delete it;
+}
+
+/** Activates the previously accessed view before this one was activated */
+void KMdiMainFrm::activateLastWin()
+{
+ m_bSwitching= true; // flag that we are currently switching between windows
+ KMdiIterator<KMdiChildView*>* it = createIterator();
+ QMap<QDateTime, KMdiChildView*> m;
+ for ( it->first(); !it->isDone(); it->next() )
+ {
+ m.insert( it->currentItem() ->getTimeStamp(), it->currentItem() );
+ }
+
+ if ( !activeWindow() )
+ return ;
+
+ QDateTime current = activeWindow() ->getTimeStamp();
+ QMap<QDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ if ( pos != m.begin() )
+ {
+ --pos;
+ }
+ else
+ {
+ pos = m.end();
+ --pos;
+ }
+ activateView( pos.data() );
+ delete it;
+}
+
+/** Activates the view with a certain index (TabPage mode only) */
+void KMdiMainFrm::activateView( int index )
+{
+ KMdiChildView * pView = m_pDocumentViews->first();
+ for ( int i = 0; pView && ( i < index ); i++ )
+ {
+ pView = m_pDocumentViews->next();
+ }
+ if ( pView )
+ {
+ pView->activate();
+ }
+}
+
+/** turns the system buttons for maximize mode (SDI mode) on, and connects them with the current child frame */
+void KMdiMainFrm::setEnableMaximizedChildFrmMode( bool enableMaxChildFrameMode )
+{
+ if ( enableMaxChildFrameMode )
+ {
+ kdDebug(760) << k_funcinfo << "Turning on maximized child frame mode" << endl;
+ m_bMaximizedChildFrmMode = true;
+
+ KMdiChildFrm* pCurrentChild = m_pMdi->topChild();
+
+ //If we have no child or there is no menubar, we do nothing
+ if ( !pCurrentChild || !m_pMainMenuBar )
+ return ;
+
+ QObject::connect( m_pUndock, SIGNAL( clicked() ), pCurrentChild, SLOT( undockPressed() ) );
+ QObject::connect( m_pMinimize, SIGNAL( clicked() ), pCurrentChild, SLOT( minimizePressed() ) );
+ QObject::connect( m_pRestore, SIGNAL( clicked() ), pCurrentChild, SLOT( maximizePressed() ) );
+ m_pMinimize->show();
+ m_pUndock->show();
+ m_pRestore->show();
+
+ if ( frameDecorOfAttachedViews() == KMdi::KDELaptopLook )
+ {
+ m_pMainMenuBar->insertItem( QPixmap( kde2laptop_closebutton_menu ), m_pMdi->topChild(), SLOT( closePressed() ), 0, -1, 0 );
+ }
+ else
+ {
+ m_pMainMenuBar->insertItem( *pCurrentChild->icon(), pCurrentChild->systemMenu(), -1, 0 );
+ if ( m_pClose )
+ {
+ QObject::connect( m_pClose, SIGNAL( clicked() ), pCurrentChild, SLOT( closePressed() ) );
+ m_pClose->show();
+ }
+ else
+ kdDebug(760) << k_funcinfo << "no close button. things won't behave correctly" << endl;
+ }
+ }
+ else
+ {
+ if ( !m_bMaximizedChildFrmMode )
+ return ; // already set, nothing to do
+
+ kdDebug(760) << k_funcinfo << "Turning off maximized child frame mode" << endl;
+ m_bMaximizedChildFrmMode = false;
+
+ KMdiChildFrm* pFrmChild = m_pMdi->topChild();
+ if ( pFrmChild && pFrmChild->m_pClient && pFrmChild->state() == KMdiChildFrm::Maximized )
+ {
+ pFrmChild->m_pClient->restore();
+ switchOffMaximizeModeForMenu( pFrmChild );
+ }
+ }
+}
+
+/** turns the system buttons for maximize mode (SDI mode) off, and disconnects them */
+void KMdiMainFrm::switchOffMaximizeModeForMenu( KMdiChildFrm* oldChild )
+{
+ // if there is no menubar given, those system buttons aren't possible
+ if ( !m_pMainMenuBar )
+ return ;
+
+ m_pMainMenuBar->removeItem( m_pMainMenuBar->idAt( 0 ) );
+
+ if ( oldChild )
+ {
+ Q_ASSERT( m_pClose );
+ QObject::disconnect( m_pUndock, SIGNAL( clicked() ), oldChild, SLOT( undockPressed() ) );
+ QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), oldChild, SLOT( minimizePressed() ) );
+ QObject::disconnect( m_pRestore, SIGNAL( clicked() ), oldChild, SLOT( maximizePressed() ) );
+ QObject::disconnect( m_pClose, SIGNAL( clicked() ), oldChild, SLOT( closePressed() ) );
+ }
+ m_pUndock->hide();
+ m_pMinimize->hide();
+ m_pRestore->hide();
+ m_pClose->hide();
+}
+
+/** reconnects the system buttons form maximize mode (SDI mode) with the new child frame */
+void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildFrm* newChild )
+{
+ //qDebug("updateSysButtonConnections");
+ // if there is no menubar given, those system buttons aren't possible
+ if ( !m_pMainMenuBar )
+ return ;
+
+ if ( newChild )
+ {
+ if ( frameDecorOfAttachedViews() == KMdi::KDELaptopLook )
+ m_pMainMenuBar->insertItem( QPixmap( kde2laptop_closebutton_menu ), newChild, SLOT( closePressed() ), 0, -1, 0 );
+ else
+ m_pMainMenuBar->insertItem( *newChild->icon(), newChild->systemMenu(), -1, 0 );
+ }
+
+ if ( oldChild )
+ {
+ m_pMainMenuBar->removeItem( m_pMainMenuBar->idAt( 1 ) );
+ Q_ASSERT( m_pClose );
+ QObject::disconnect( m_pUndock, SIGNAL( clicked() ), oldChild, SLOT( undockPressed() ) );
+ QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), oldChild, SLOT( minimizePressed() ) );
+ QObject::disconnect( m_pRestore, SIGNAL( clicked() ), oldChild, SLOT( maximizePressed() ) );
+ QObject::disconnect( m_pClose, SIGNAL( clicked() ), oldChild, SLOT( closePressed() ) );
+ }
+ if ( newChild )
+ {
+ Q_ASSERT( m_pClose );
+ QObject::connect( m_pUndock, SIGNAL( clicked() ), newChild, SLOT( undockPressed() ) );
+ QObject::connect( m_pMinimize, SIGNAL( clicked() ), newChild, SLOT( minimizePressed() ) );
+ QObject::connect( m_pRestore, SIGNAL( clicked() ), newChild, SLOT( maximizePressed() ) );
+ QObject::connect( m_pClose, SIGNAL( clicked() ), newChild, SLOT( closePressed() ) );
+ }
+}
+
+/** Shows the view taskbar. This should be connected with your "View" menu. */
+bool KMdiMainFrm::isViewTaskBarOn()
+{
+ if ( m_pTaskBar )
+ return m_pTaskBar->isSwitchedOn();
+ else
+ return false;
+}
+
+/** Shows the view taskbar. This should be connected with your "View" menu. */
+void KMdiMainFrm::showViewTaskBar()
+{
+ if ( m_pTaskBar )
+ m_pTaskBar->switchOn( true );
+}
+
+/** Hides the view taskbar. This should be connected with your "View" menu. */
+void KMdiMainFrm::hideViewTaskBar()
+{
+ if ( m_pTaskBar )
+ m_pTaskBar->switchOn( false );
+}
+
+//=============== fillWindowMenu ===============//
+void KMdiMainFrm::fillWindowMenu()
+{
+ bool tabPageMode = false;
+ if ( m_mdiMode == KMdi::TabPageMode )
+ tabPageMode = true;
+
+ bool IDEAlMode = false;
+ if ( m_mdiMode == KMdi::IDEAlMode )
+ IDEAlMode = true;
+
+ bool noViewOpened = false;
+ if ( m_pDocumentViews->isEmpty() )
+ noViewOpened = true;
+
+ // construct the menu and its submenus
+ if ( !m_bClearingOfWindowMenuBlocked )
+ m_pWindowMenu->clear();
+
+ d->closeWindowAction->plug(m_pWindowMenu);
+
+ int closeAllId = m_pWindowMenu->insertItem( i18n( "Close &All" ), this, SLOT( closeAllViews() ) );
+ if ( noViewOpened )
+ {
+ d->closeWindowAction->setEnabled(false);
+ m_pWindowMenu->setItemEnabled( closeAllId, false );
+ }
+
+ if ( !tabPageMode && !IDEAlMode )
+ {
+ int iconifyId = m_pWindowMenu->insertItem( i18n( "&Minimize All" ), this, SLOT( iconifyAllViews() ) );
+ if ( noViewOpened )
+ m_pWindowMenu->setItemEnabled( iconifyId, false );
+ }
+
+ m_pWindowMenu->insertSeparator();
+ m_pWindowMenu->insertItem( i18n( "&MDI Mode" ), m_pMdiModeMenu );
+ m_pMdiModeMenu->clear();
+ m_pMdiModeMenu->insertItem( i18n( "&Toplevel Mode" ), this, SLOT( switchToToplevelMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "C&hildframe Mode" ), this, SLOT( switchToChildframeMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "Ta&b Page Mode" ), this, SLOT( switchToTabPageMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "I&DEAl Mode" ), this, SLOT( switchToIDEAlMode() ) );
+ switch ( m_mdiMode )
+ {
+ case KMdi::ToplevelMode:
+ m_pMdiModeMenu->setItemChecked( m_pMdiModeMenu->idAt( 0 ), true );
+ break;
+ case KMdi::ChildframeMode:
+ m_pMdiModeMenu->setItemChecked( m_pMdiModeMenu->idAt( 1 ), true );
+ break;
+ case KMdi::TabPageMode:
+ m_pMdiModeMenu->setItemChecked( m_pMdiModeMenu->idAt( 2 ), true );
+ break;
+ case KMdi::IDEAlMode:
+ m_pMdiModeMenu->setItemChecked( m_pMdiModeMenu->idAt( 3 ), true );
+ break;
+ default:
+ break;
+ }
+
+ m_pWindowMenu->insertSeparator();
+ if ( !tabPageMode && !IDEAlMode )
+ {
+ int placMenuId = m_pWindowMenu->insertItem( i18n( "&Tile" ), m_pPlacingMenu );
+ m_pPlacingMenu->clear();
+ m_pPlacingMenu->insertItem( i18n( "Ca&scade Windows" ), m_pMdi, SLOT( cascadeWindows() ) );
+ m_pPlacingMenu->insertItem( i18n( "Cascade &Maximized" ), m_pMdi, SLOT( cascadeMaximized() ) );
+ m_pPlacingMenu->insertItem( i18n( "Expand &Vertically" ), m_pMdi, SLOT( expandVertical() ) );
+ m_pPlacingMenu->insertItem( i18n( "Expand &Horizontally" ), m_pMdi, SLOT( expandHorizontal() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile &Non-Overlapped" ), m_pMdi, SLOT( tileAnodine() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile Overla&pped" ), m_pMdi, SLOT( tilePragma() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile V&ertically" ), m_pMdi, SLOT( tileVertically() ) );
+ if ( m_mdiMode == KMdi::ToplevelMode )
+ {
+ m_pWindowMenu->setItemEnabled( placMenuId, false );
+ }
+ m_pWindowMenu->insertSeparator();
+ int dockUndockId = m_pWindowMenu->insertItem( i18n( "&Dock/Undock" ), m_pDockMenu );
+ m_pDockMenu->clear();
+ m_pWindowMenu->insertSeparator();
+ if ( noViewOpened )
+ {
+ m_pWindowMenu->setItemEnabled( placMenuId, false );
+ m_pWindowMenu->setItemEnabled( dockUndockId, false );
+ }
+ }
+ int entryCount = m_pWindowMenu->count();
+
+ // for all child frame windows: give an ID to every window and connect them in the end with windowMenuItemActivated()
+ int i = 100;
+ KMdiChildView* pView = 0L;
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ QValueList<QDateTime> timeStamps;
+ for ( ; it.current(); ++it )
+ {
+ pView = it.current();
+ QDateTime timeStamp( pView->getTimeStamp() );
+
+ if ( pView->isToolView() )
+ {
+ continue;
+ }
+
+ QString item;
+ // set titles of minimized windows in brackets
+ if ( pView->isMinimized() )
+ {
+ item += "(";
+ item += pView->caption();
+ item += ")";
+ }
+ else
+ {
+ item += " ";
+ item += pView->caption();
+ }
+
+ // insert the window entry sorted by access time
+ unsigned int indx;
+ unsigned int windowItemCount = m_pWindowMenu->count() - entryCount;
+ bool inserted = false;
+ QString tmpString;
+ QValueList<QDateTime>::iterator timeStampIterator = timeStamps.begin();
+ for ( indx = 0; indx <= windowItemCount; indx++, ++timeStampIterator )
+ {
+ bool putHere = false;
+ if ( ( *timeStampIterator ) < timeStamp )
+ {
+ putHere = true;
+ timeStamps.insert( timeStampIterator, timeStamp );
+ }
+ if ( putHere )
+ {
+ m_pWindowMenu->insertItem( item, pView, SLOT( slot_clickedInWindowMenu() ), 0, -1, indx + entryCount );
+ if ( pView == m_pCurrentWindow )
+ {
+ m_pWindowMenu->setItemChecked( m_pWindowMenu->idAt( indx + entryCount ), true );
+ }
+ pView->setWindowMenuID( i );
+ if ( !tabPageMode )
+ {
+ m_pDockMenu->insertItem( item, pView, SLOT( slot_clickedInDockMenu() ), 0, -1, indx );
+ if ( pView->isAttached() )
+ {
+ m_pDockMenu->setItemChecked( m_pDockMenu->idAt( indx ), true );
+ }
+ }
+ inserted = true;
+ break;
+ indx = windowItemCount + 1; // break the loop
+ }
+ }
+ if ( !inserted )
+ { // append it
+ m_pWindowMenu->insertItem( item, pView, SLOT( slot_clickedInWindowMenu() ), 0, -1, windowItemCount + entryCount );
+ if ( pView == m_pCurrentWindow )
+ {
+ m_pWindowMenu->setItemChecked( m_pWindowMenu->idAt( windowItemCount + entryCount ), true );
+ }
+ pView->setWindowMenuID( i );
+ if ( !tabPageMode )
+ {
+ m_pDockMenu->insertItem( item, pView, SLOT( slot_clickedInDockMenu() ), 0, -1, windowItemCount );
+ if ( pView->isAttached() )
+ {
+ m_pDockMenu->setItemChecked( m_pDockMenu->idAt( windowItemCount ), true );
+ }
+ }
+ }
+ i++;
+ }
+}
+
+//================ windowMenuItemActivated ===============//
+
+void KMdiMainFrm::windowMenuItemActivated( int id )
+{
+ if ( id < 100 )
+ return ;
+ id -= 100;
+ KMdiChildView *pView = m_pDocumentViews->at( id );
+ if ( !pView )
+ return ;
+ if ( pView->isMinimized() )
+ pView->minimize();
+ if ( m_mdiMode != KMdi::TabPageMode )
+ {
+ KMdiChildFrm * pTopChild = m_pMdi->topChild();
+ if ( pTopChild )
+ {
+ if ( ( pView == pTopChild->m_pClient ) && pView->isAttached() )
+ {
+ return ;
+ }
+ }
+ }
+ activateView( pView );
+}
+
+//================ dockMenuItemActivated ===============//
+
+void KMdiMainFrm::dockMenuItemActivated( int id )
+{
+ if ( id < 100 )
+ return ;
+ id -= 100;
+ KMdiChildView *pView = m_pDocumentViews->at( id );
+ if ( !pView )
+ return ;
+ if ( pView->isMinimized() )
+ pView->minimize();
+ if ( pView->isAttached() )
+ {
+ detachWindow( pView, true );
+ }
+ else
+ { // is detached
+ attachWindow( pView, true );
+ }
+}
+
+//================ popupWindowMenu ===============//
+
+void KMdiMainFrm::popupWindowMenu( QPoint p )
+{
+ if ( !isFakingSDIApplication() )
+ {
+ m_pWindowMenu->popup( p );
+ }
+}
+
+//================ dragEndTimeOut ===============//
+void KMdiMainFrm::dragEndTimeOut()
+{
+ // send drag end to all concerned views.
+ KMdiChildView * pView;
+ for ( m_pDocumentViews->first(); ( pView = m_pDocumentViews->current() ) != 0L; m_pDocumentViews->next() )
+ {
+ KMdiChildFrmDragEndEvent dragEndEvent( 0L );
+ QApplication::sendEvent( pView, &dragEndEvent );
+ }
+}
+
+//================ setFrameDecorOfAttachedViews ===============//
+
+void KMdiMainFrm::setFrameDecorOfAttachedViews( int frameDecor )
+{
+ switch ( frameDecor )
+ {
+ case 0:
+ m_frameDecoration = KMdi::Win95Look;
+ break;
+ case 1:
+ m_frameDecoration = KMdi::KDE1Look;
+ break;
+ case 2:
+ m_frameDecoration = KMdi::KDELook;
+ break;
+ case 3:
+ m_frameDecoration = KMdi::KDELaptopLook;
+ break;
+ default:
+ qDebug( "unknown MDI decoration" );
+ break;
+ }
+ setMenuForSDIModeSysButtons( m_pMainMenuBar );
+ QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ for ( ; it.current(); ++it )
+ {
+ KMdiChildView* pView = it.current();
+ if ( pView->isToolView() )
+ continue;
+ if ( pView->isAttached() )
+ pView->mdiParent() ->redecorateButtons();
+ }
+}
+
+void KMdiMainFrm::fakeSDIApplication()
+{
+ m_bSDIApplication = true;
+ if ( m_pTaskBar )
+ m_pTaskBar->close();
+ m_pTaskBar = 0L;
+}
+
+void KMdiMainFrm::closeViewButtonPressed()
+{
+ KMdiChildView * pView = activeWindow();
+ if ( pView )
+ {
+ pView->close();
+ }
+}
+
+void KMdiMainFrm::setManagedDockPositionModeEnabled( bool enabled )
+{
+ m_managedDockPositionMode = enabled;
+}
+
+void KMdiMainFrm::setActiveToolDock( KMdiDockContainer* td )
+{
+ if ( td == d->activeDockPriority[ 0 ] )
+ return ;
+ if ( d->activeDockPriority[ 0 ] == 0 )
+ {
+ d->activeDockPriority[ 0 ] = td;
+ // d->focusList=new KMdiFocusList(this);
+ // if (m_pMdi) d->focusList->addWidgetTree(m_pMdi);
+ // if (m_documentTabWidget) d->focusList->addWidgetTree(m_documentTabWidget);
+ return ;
+ }
+ for ( int dst = 3, src = 2;src >= 0;dst--, src-- )
+ {
+ if ( d->activeDockPriority[ src ] == td )
+ src--;
+ if ( src < 0 )
+ break;
+ d->activeDockPriority[ dst ] = d->activeDockPriority[ src ];
+ }
+ d->activeDockPriority[ 0 ] = td;
+}
+
+void KMdiMainFrm::removeFromActiveDockList( KMdiDockContainer* td )
+{
+ for ( int i = 0;i < 4;i++ )
+ {
+ if ( d->activeDockPriority[ i ] == td )
+ {
+ for ( ;i < 3;i++ )
+ d->activeDockPriority[ i ] = d->activeDockPriority[ i + 1 ];
+ d->activeDockPriority[ 3 ] = 0;
+ break;
+ }
+ }
+ /*
+ if (d->activeDockPriority[0]==0) {
+ if (d->focusList) d->focusList->restore();
+ delete d->focusList;
+ d->focusList=0;
+ }
+ */
+}
+
+void KMdiMainFrm::prevToolViewInDock()
+{
+ KMdiDockContainer * td = d->activeDockPriority[ 0 ];
+ if ( !td )
+ return ;
+ td->prevToolView();
+}
+
+void KMdiMainFrm::nextToolViewInDock()
+{
+ KMdiDockContainer * td = d->activeDockPriority[ 0 ];
+ if ( !td )
+ return ;
+ td->nextToolView();
+}
+
+KMdi::TabWidgetVisibility KMdiMainFrm::tabWidgetVisibility()
+{
+ if ( m_documentTabWidget )
+ return m_documentTabWidget->tabWidgetVisibility();
+
+ return KMdi::NeverShowTabs;
+}
+
+void KMdiMainFrm::setTabWidgetVisibility( KMdi::TabWidgetVisibility visibility )
+{
+ if ( m_documentTabWidget )
+ m_documentTabWidget->setTabWidgetVisibility( visibility );
+}
+
+KTabWidget * KMdiMainFrm::tabWidget() const
+{
+ return m_documentTabWidget;
+}
+
+#include "kmdimainfrm.moc"
+
+// vim: ts=2 sw=2 et
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h
new file mode 100644
index 00000000..24a956cf
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h
@@ -0,0 +1,872 @@
+//----------------------------------------------------------------------------
+// filename : kmdimainfrm.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// : 02/2000 by Massimo Morin (mmorin@schedsys.com)
+// 2000-2003 maintained by the KDevelop project
+// patches : */2000 by Lars Beikirch (Lars.Beikirch@gmx.net)
+// : 01/2003 by Jens Zurheide (jens.zurheide@gmx.de)
+//
+// copyright : (C) 1999-2003 by Falk Brettschneider
+// and
+// Szymon Stefanek (stefanek@tin.it)
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#ifndef _KMDIMAINFRM_H_
+#define _KMDIMAINFRM_H_
+
+#include <kparts/dockmainwindow.h>
+#include <kmenubar.h>
+#include <kpopupmenu.h>
+
+#include <qptrlist.h>
+#include <qrect.h>
+#include <qapplication.h>
+#include <qdom.h>
+#include <qguardedptr.h>
+
+#include "kmditaskbar.h"
+#include "kmdichildarea.h"
+#include "kmdichildview.h"
+#include "kmdiiterator.h"
+#include "kmdilistiterator.h"
+#include "kmdinulliterator.h"
+#include "kmditoolviewaccessor.h"
+
+class QTimer;
+class QPopupMenu;
+class QMenuBar;
+
+
+class QToolButton;
+
+namespace KMDIPrivate
+{
+class KMDIGUIClient;
+}
+
+class KMdiDockContainer;
+class KMdiMainFrmPrivate;
+
+/**
+ * @short Internal class
+ *
+ * This special event is needed because the view has to inform the main frame that it`s being closed.
+ */
+class KMDI_EXPORT KMdiViewCloseEvent : public QCustomEvent
+{
+public:
+ KMdiViewCloseEvent( KMdiChildView* pWnd ) : QCustomEvent( QEvent::User, pWnd ) {}
+};
+
+/**
+ * \short Base class for all your special main frames.
+ *
+ * It contains the child frame area (QMainWindow's central widget) and a child view taskbar
+ * for switching the MDI views. Most methods are virtual functions for later overriding.
+ *
+ * Basically, this class provides functionality for docking/undocking view windows and
+ * manages the taskbar. Usually a developer will only need to know about this class and
+ * \ref KMdiChildView.
+ *
+ * \par General usage
+ *
+ * Your program mainwidget should inherit KMdiMainFrm. Then usually you'll just need
+ * addWindow() and removeWindowFromMdi() to control the views.
+ * \code
+ * class MyMainWindow : public KMdiMainFrm
+ * { .... };
+ * \endcode
+ *
+ * to define your main window class and
+ *
+ * \code
+ * MyMainWindow mainframe;
+ * qApp->setMainWidget(&mainframe);
+ * mainframe->addWindow(view1); // put it under MDI control
+ * mainframe->addWindow(view2);
+ * \endcode
+ *
+ * when you wish to use your main window class. The above example also adds a few windows
+ * to the frame.
+ *
+ * KMdiMainFrm will provide the "Window" menu needed in common MDI applications. Just
+ * insert it in your main menu:
+ *
+ * \code
+ * if ( !isFakingSDIApplication() )
+ * {
+ * menuBar()->insertItem( i18n( "&Window" ), windowMenu() );
+ * }
+ * \endcode
+ *
+ * To synchronize the positions of the MDI control buttons inserted in your mainmenu:
+ * \code
+ * void B_MainModuleWidget::initMenuBar()
+ * {
+ * setMenuForSDIModeSysButtons( menuBar() );
+ * }
+ * ...
+ * void B_MainModuleWidget::resizeEvent ( QResizeEvent *e )
+ * {
+ * KMdiMainFrm::resizeEvent( e );
+ * setSysButtonsAtMenuPosition();
+ * }
+ * \endcode
+ *
+ * \par Dynamic mode switching
+ *
+ * Dynamic switching of the MDI mode can be done via the following functions:
+ * - switchToChildframeMode()
+ * - switchToToplevelMode()
+ * - switchToTabPageMode()
+ * - switchToIDEAlMode()
+ *
+ * The MDI mode can be gotten using mdiMode(). If you need to fake the look of an SDI application
+ * use fakeSDIApplication() to fake it and isFakingSDIApplication() to query whether or not an SDI
+ * interface is being faked.
+ *
+ * You can dynamically change the shape of the attached MDI views using setFrameDecorOfAttachedViews().
+ *
+ * Additionally, here's a hint how to restore the mainframe's settings from config file:
+ * \code
+ *
+ * // restore MDI mode (toplevel, childframe, tabpage)
+ * int mdiMode = config->readIntEntry( "mainmodule session", "MDI mode", KMdi::ChildframeMode);
+ * switch (mdiMode) {
+ * case KMdi::ToplevelMode:
+ * {
+ * int childFrmModeHt = config->readIntEntry( "mainmodule session", "Childframe mode height", desktop()->height() - 50);
+ * mainframe->resize( m_pMdiMainFrm->width(), childFrmModeHt);
+ * mainframe->switchToToplevelMode();
+ * }
+ * break;
+ * case KMdi::ChildframeMode:
+ * break;
+ * case KMdi::TabPageMode:
+ * {
+ * int childFrmModeHt = m_pCfgFileManager->readIntEntry( "mainmodule session", "Childframe mode height", desktop()->height() - 50);
+ * mainframe->resize( m_pMdiMainFrm->width(), childFrmModeHt);
+ * mainframe->switchToTabPageMode();
+ * }
+ * break;
+ * default:
+ * break;
+ * }
+ *
+ * // restore a possible maximized Childframe mode
+ * bool maxChildFrmMode = config->readBoolEntry( "mainmodule session", "maximized childframes", true);
+ * mainframe->setEnableMaximizedChildFrmMode(maxChildFrmMode);
+ * \endcode
+ * The maximized-Childframe mode means that currently all views are maximized in Childframe mode's application desktop.
+ *
+ * \par Managing views
+ *
+ * This class provides placing algorithms in Childframe mode. The following is a list of the window placement functions
+ * - tilePragma() - Tile the windows and allow them to overlap
+ * - tileAnodine() - Tile the windows but don't allow them to overlap
+ * - tileVertically() - Tile the windows vertically
+ * - cascadeWindows() - cascade windows
+ * - cascadeMaximized() - cascade windows and maximize their viewing area
+ * - expandVertical() - expand all the windows to use the most amount of vertical space
+ * - expandHorizontal() - expand all the windows to use the most amount of horizontal space
+ *
+ * activateView(KMdiChildView*) and activateView(int index) set the appropriate MDI child view as the active
+ * one. It will be raised, will get an active MDI frame and will get the focus. Call activeView() to find out what the
+ * current MDI view is.
+ *
+ * Use detachWindow() and attachWindow() for docking the MDI views to desktop and back.
+ *
+ * Connect accels of your program with activatePrevWin(), activateNextWin() and activateView(int index).
+ *
+ * Note: KMdiChildViews can be added in 2 meanings: Either as a normal child view (usually containing
+ * user document views) or as a tool-view (usually containing status, info or control widgets).
+ * The tool-views can be added as floating dockwidgets or as stay-on-top desktop windows in tool style.
+ *
+ * Also, pay attention to the fact that when you click on the close button of MDI views that their
+ * close event should be redirected to closeWindow(). Otherwise the mainframe class will
+ * not get noticed about the deleted view and a dangling pointer will remain in the MDI control. The
+ * closeWindow() or the removeWindowFromMdi() method is for that issue. The difference is closeWindow()
+ * deletes the view object. So if your application wants to control that by itself, call removeWindowFromMdi()
+ * and call delete by yourself. See also KMdiChildView::closeEvent() for that issue.
+ *
+ * Here's an example how you can suggest things for the adding of views to the MDI control via flags:
+ * \code
+ * m_mapOfMdiWidgets.insert( pWnd, mh );
+ * unsigned int mdiFlags = KMdi::StandardAdd;
+ *
+ * if ( !show )
+ * mdiFlags |= KMdi::Hide;
+ *
+ * if ( !attach )
+ * mdiFlags |= KMdi::Detach;
+ *
+ * if ( minimize )
+ * mdiFlags |= KMdi::Minimize;
+ *
+ * if ( bToolWindow)
+ * mdiFlags |= KMdi::ToolWindow;
+ *
+ * if ( m_pMdiMainFrm->isFakingSDIApplication() )
+ * {
+ * if ( attach ) //fake an SDI app
+ * mdiFlags |= KMdi::Maximize;
+ * }
+ * else
+ * {
+ * m_pMdiMainFrm->addWindow( pWnd, QPoint(20, 20), KMdi::AddWindowFlags(mdiFlags));
+ * return;
+ * }
+ * m_pMdiMainFrm->addWindow( pWnd, KMdi::AddWindowFlags(mdiFlags));
+ * \endcode
+ */
+class KMDI_EXPORT KMdiMainFrm : public KParts::DockMainWindow
+{
+ friend class KMdiChildView;
+ friend class KMdiTaskBar;
+ Q_OBJECT
+
+ friend class KMdiToolViewAccessor;
+ // attributes
+protected:
+ KMdi::MdiMode m_mdiMode;
+ KMdiChildArea *m_pMdi;
+ KMdiTaskBar *m_pTaskBar;
+ QPtrList<KMdiChildView> *m_pDocumentViews;
+ QMap<QWidget*, KMdiToolViewAccessor*> *m_pToolViews;
+ KMdiChildView *m_pCurrentWindow;
+ QPopupMenu *m_pWindowPopup;
+ QPopupMenu *m_pTaskBarPopup;
+ QPopupMenu *m_pWindowMenu;
+ QPopupMenu *m_pDockMenu;
+ QPopupMenu *m_pMdiModeMenu;
+ QPopupMenu *m_pPlacingMenu;
+ KMenuBar *m_pMainMenuBar;
+
+ QPixmap *m_pUndockButtonPixmap;
+ QPixmap *m_pMinButtonPixmap;
+ QPixmap *m_pRestoreButtonPixmap;
+ QPixmap *m_pCloseButtonPixmap;
+
+ QToolButton *m_pUndock;
+ QToolButton *m_pMinimize;
+ QToolButton *m_pRestore;
+ QToolButton *m_pClose;
+ QPoint m_undockPositioningOffset;
+ bool m_bMaximizedChildFrmMode;
+ int m_oldMainFrmHeight;
+ int m_oldMainFrmMinHeight;
+ int m_oldMainFrmMaxHeight;
+ static KMdi::FrameDecor m_frameDecoration;
+ bool m_bSDIApplication;
+ KDockWidget* m_pDockbaseAreaOfDocumentViews;
+ QDomDocument* m_pTempDockSession;
+ bool m_bClearingOfWindowMenuBlocked;
+
+ QTimer* m_pDragEndTimer;
+
+ bool m_bSwitching;
+
+ KDockWidget* m_leftContainer;
+ KDockWidget* m_rightContainer;
+ KDockWidget* m_topContainer;
+ KDockWidget* m_bottomContainer;
+
+
+private:
+ KMdiMainFrmPrivate* d;
+ KMDIPrivate::KMDIGUIClient* m_mdiGUIClient;
+ bool m_managedDockPositionMode;
+
+ // methods
+public:
+ KMdiMainFrm( QWidget* parentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = WType_TopLevel | WDestructiveClose );
+ virtual ~KMdiMainFrm();
+
+ /**
+ * Control whether or not the standard MDI menu is displayed
+ * when a context menu is displayed
+ */
+ void setStandardMDIMenuEnabled( bool showModeMenu = true );
+
+ void setManagedDockPositionModeEnabled( bool enabled );
+
+ /**
+ * Returns whether the application's MDI views are in maximized state or not.
+ */
+ bool isInMaximizedChildFrmMode() { return m_bMaximizedChildFrmMode; }
+
+ /**
+ * Returns the MDI mode. This can be one of the enumerations KMdi::MdiMode.
+ */
+ KMdi::MdiMode mdiMode() { return m_mdiMode; }
+
+ /**
+ * Returns the focused attached MDI view.
+ */
+ KMdiChildView* activeWindow();
+
+ /**
+ * Returns a popup menu filled according to the MDI view state. You can override this
+ * method to insert additional entries there. The popup menu is usually popuped when the user
+ * clicks with the right mouse button on a taskbar entry. The default entries are:
+ * Undock/Dock, Restore/Maximize/Minimize, Close and an empty sub-popup ( windowPopup() )
+ * menu called Operations.
+ */
+ virtual QPopupMenu * taskBarPopup( KMdiChildView *pWnd, bool bIncludeWindowPopup = false );
+
+ /**
+ * Returns a popup menu with only a title "Window". You can fill it with own operations entries
+ * on the MDI view. This popup menu is inserted as last menu item in taskBarPopup() .
+ */
+ virtual QPopupMenu * windowPopup( KMdiChildView *pWnd, bool bIncludeTaskbarPopup = true );
+
+ /**
+ * Called in the constructor (forces a resize of all MDI views)
+ */
+ virtual void applyOptions();
+
+ /**
+ * Returns the KMdiChildView belonging to the given caption string.
+ */
+ KMdiChildView * findWindow( const QString& caption );
+
+ enum ExistsAs {DocumentView, ToolView, AnyView};
+ /**
+ * Returns whether this MDI child view is under MDI control (using addWindow() ) or not.
+ */
+ bool windowExists( KMdiChildView *pWnd, ExistsAs as );
+
+ /**
+ * Catches certain Qt events and processes it here.
+ * Currently, here this catches only the KMdiViewCloseEvent (a KMdi user event) which is sent
+ * from itself in childWindowCloseRequest() right after a KMdiChildView::closeEvent() .
+ * The reason for this event to itself is simple: It just wants to break the function call stack.
+ * It continues the processing with calling closeWindow() .
+ * You see, a close() is translated to a closeWindow() .
+ * It is necessary that the main frame has to start an MDI view close action because it must
+ * remove the MDI view from MDI control, additionally.
+ *
+ * This method calls QMainWindow::event , additionally.
+ */
+ virtual bool event( QEvent* e );
+
+ /**
+ * If there's a main menubar given, it will create the 4 maximize mode buttons there (undock, minimize, restore, close).
+ */
+ virtual void setSysButtonsAtMenuPosition();
+
+ /**
+ * Returns the height of the taskbar.
+ */
+ virtual int taskBarHeight() { return m_pTaskBar ? m_pTaskBar->height() : 0; }
+
+ /**
+ * Sets an offset value that is used on detachWindow() . The undocked window
+ * is visually moved on the desktop by this offset.
+ */
+ virtual void setUndockPositioningOffset( QPoint offset ) { m_undockPositioningOffset = offset; }
+
+ /**
+ * If you don't want to know about the inner structure of the KMdi system, you can use
+ * this iterator to handle with the MDI view list in a more abstract way.
+ * The iterator hides what special data structure is used in KMdi.
+ */
+ // FIXME And what exactly are we supposed to fix? -mattr
+ KMdiIterator<KMdiChildView*>* createIterator()
+ {
+ if ( m_pDocumentViews == 0L )
+ {
+ return new KMdiNullIterator<KMdiChildView*>();
+ }
+ else
+ {
+ return new KMdiListIterator<KMdiChildView>( *m_pDocumentViews );
+ }
+ }
+
+ /**
+ * Deletes an KMdiIterator created in the KMdi library (needed for the windows dll problem).
+ */
+ void deleteIterator( KMdiIterator<KMdiChildView*>* pIt )
+ {
+ delete pIt;
+ }
+
+ /**
+ * Returns a popup menu that contains the MDI controlled view list.
+ * Additionally, this menu provides some placing actions for these views.
+ * Usually, you insert this popup menu in your main menubar as "Window" menu.
+ */
+ QPopupMenu* windowMenu() const { return m_pWindowMenu; };
+
+ /**
+ * Sets a background color for the MDI view area widget.
+ */
+ virtual void setBackgroundColor( const QColor &c ) { m_pMdi->setBackgroundColor( c ); }
+
+ /**
+ * Sets a background pixmap for the MDI view area widget.
+ */
+ virtual void setBackgroundPixmap( const QPixmap &pm ) { m_pMdi->setBackgroundPixmap( pm ); }
+
+ /**
+ * Sets a size that is used as the default size for a newly to the MDI system added KMdiChildView .
+ * By default this size is 600x400. So all non-resized added MDI views appear in that size.
+ */
+ void setDefaultChildFrmSize( const QSize& sz ) { m_pMdi->m_defaultChildFrmSize = sz; }
+
+ /**
+ * Returns the default size for a newly added KMdiChildView. See setDefaultChildFrmSize() .
+ */
+ QSize defaultChildFrmSize() { return m_pMdi->m_defaultChildFrmSize; }
+
+ /**
+ * Do nothing when in Toplevel mode
+ */
+ virtual void setMinimumSize( int minw, int minh );
+
+ /**
+ * Returns the Childframe mode height of this. Makes only sense when in Toplevel mode.
+ */
+ int childFrameModeHeight() { return m_oldMainFrmHeight; };
+ /**
+ * Tells the MDI system a QMenu where it can insert buttons for
+ * the system menu, undock, minimize, restore actions.
+ * If no such menu is given, KMdi simply overlays the buttons
+ * at the upper right-hand side of the main widget.
+ */
+ virtual void setMenuForSDIModeSysButtons( KMenuBar* menuBar = 0 );
+
+ /**
+ * @return the decoration of the window frame of docked (attached) MDI views
+ */
+ static int frameDecorOfAttachedViews() { return m_frameDecoration; }
+
+ /**
+ * An SDI application user interface is faked:
+ * @li an opened view is always maximized
+ * @li buttons for maximized childframe mode aren't inserted in the main menubar
+ * @li taskbar and windowmenu are not created/updated
+ */
+ void fakeSDIApplication();
+
+ /**
+ * @returns if we are faking an SDI application (fakeSDIApplication())
+ */
+ bool isFakingSDIApplication() const { return m_bSDIApplication; }
+
+ virtual bool eventFilter( QObject *obj, QEvent *e );
+ void findRootDockWidgets( QPtrList<KDockWidget>* pRootDockWidgetList, QValueList<QRect>* pPositionList );
+
+ /** We're switching something.*/
+ void setSwitching( const bool switching ) { m_bSwitching = switching; }
+ bool switching( void ) const { return m_bSwitching; }
+
+public slots:
+ /**
+ * addWindow demands a KMdiChildView. This method wraps every QWidget in such an object and
+ * this way you can put every widget under MDI control.
+ */
+ KMdiChildView* createWrapper( QWidget *view, const QString& name, const QString& shortName );
+
+ /**
+ * Adds a KMdiChildView to the MDI system. The main frame takes control of it.
+ * \param flags the flags for the view such as:
+ * \li whether the view should be attached or detached.
+ * \li whether the view should be shown or hidden
+ * \li whether the view should be maximized, minimized or restored (normalized)
+ * \li whether the view should be added as tool view (stay-on-top and toplevel) or added as document-type view.
+ */
+ virtual void addWindow( KMdiChildView* pView, int flags = KMdi::StandardAdd );
+
+ //KDE4: merge the two methods
+ /**
+ * Adds a KMdiChildView to the MDI system. The main frame takes control of it.
+ * \param index the index of the tab we should insert the new tab after. If index == -1 then
+ * the tab will just be appended to the end. Using this parameter in childview mode has no effect.
+ * \param flags
+ * You can specify here whether:
+ * \li the view should be attached or detached.
+ * \li shown or hidden
+ * \li maximized, minimized or restored (normalized)
+ * \li added as tool view (stay-on-top and toplevel) or added as document-type view.
+ * \since 3.3
+ */
+ void addWindow( KMdiChildView* pView, int flags, int index );
+
+ /**
+ * Adds a KMdiChildView to the MDI system. The main frame takes control of it.
+ * \param pos move the child view to the specified position
+ * \param flags the flags for the view such as:
+ * \li whether the view should be attached or detached.
+ * \li whether the view should be shown or hidden
+ * \li whether the view should be maximized, minimized or restored (normalized)
+ * \li whether the view should be added as tool view (stay-on-top and toplevel) or
+ * added as document-type view.
+ */
+ virtual void addWindow( KMdiChildView* pView, QPoint pos, int flags = KMdi::StandardAdd );
+
+ /**
+ * Adds a KMdiChildView to the MDI system. The main frame takes control of it.
+ * \param rectNormal Sets the geometry for this child view
+ * \param flags the flags for the view such as:
+ * \li whether the view should be attached or detached.
+ * \li whether the view should be shown or hidden
+ * \li whether the view should be maximized, minimized or restored (normalized)
+ * \li whether the view should be added as tool view (stay-on-top and toplevel) or
+ * added as document-type view.
+ */
+ virtual void addWindow( KMdiChildView* pView, QRect rectNormal, int flags = KMdi::StandardAdd );
+
+ /**
+ * Usually called from addWindow() when adding a tool view window. It reparents the given widget
+ * as toplevel and stay-on-top on the application's main widget.
+ */
+ virtual KMdiToolViewAccessor *addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone,
+ QWidget* pTargetWnd = 0L, int percent = 50, const QString& tabToolTip = 0,
+ const QString& tabCaption = 0 );
+
+ virtual void deleteToolWindow( QWidget* pWnd );
+ virtual void deleteToolWindow( KMdiToolViewAccessor *accessor );
+
+ /**
+ * Using this method you have to use the setWidget method of the access object, and it is very recommendet, that you use
+ * the widgetContainer() method for the parent of your newly created widget
+ */
+ KMdiToolViewAccessor *createToolWindow();
+
+ /**
+ * Removes a KMdiChildView from the MDI system and from the main frame`s control.
+ * The caller is responsible for deleting the view. If the view is not deleted it will
+ * be reparented to 0
+ */
+ virtual void removeWindowFromMdi( KMdiChildView *pWnd );
+
+ /**
+ * Removes a KMdiChildView from the MDI system and from the main frame`s control.
+ * Note: The view will be deleted!
+ */
+ virtual void closeWindow( KMdiChildView *pWnd, bool layoutTaskBar = true );
+
+ /**
+ * Switches the KMdiTaskBar on and off.
+ */
+ virtual void slot_toggleTaskBar();
+
+ /**
+ * Makes a main frame controlled undocked KMdiChildView docked.
+ * Doesn't work on KMdiChildView which aren't added to the MDI system.
+ * Use addWindow() for that.
+ */
+ virtual void attachWindow( KMdiChildView *pWnd, bool bShow = true, bool bAutomaticResize = false );
+
+ /**
+ * Makes a docked KMdiChildView undocked.
+ * The view window still remains under the main frame's MDI control.
+ */
+ virtual void detachWindow( KMdiChildView *pWnd, bool bShow = true );
+
+ /**
+ * Someone wants that the MDI view to be closed. This method sends a KMdiViewCloseEvent to itself
+ * to break the function call stack. See also event() .
+ */
+ virtual void childWindowCloseRequest( KMdiChildView *pWnd );
+
+ /**
+ * Close all views
+ */
+ virtual void closeAllViews();
+
+ /**
+ * Iconfiy all views
+ */
+ virtual void iconifyAllViews();
+
+ /**
+ * Closes the view of the active (topchild) window
+ */
+ virtual void closeActiveView();
+
+ /**
+ * Undocks all view windows (unix-like)
+ */
+ virtual void switchToToplevelMode();
+ virtual void finishToplevelMode();
+
+ /**
+ * Docks all view windows (Windows-like)
+ */
+ virtual void switchToChildframeMode();
+ virtual void finishChildframeMode();
+
+ /**
+ * Docks all view windows (Windows-like)
+ */
+ virtual void switchToTabPageMode();
+ virtual void finishTabPageMode();
+
+ /**
+ * Docks all view windows. Toolviews use dockcontainers
+ */
+ virtual void switchToIDEAlMode();
+ virtual void finishIDEAlMode( bool full = true );
+
+ /**
+ * Sets the appearance of the IDEAl mode. See KMultiTabBar styles for the first 3 bits.
+ * @deprecated use setToolviewStyle(int flags) instead
+ */
+ void setIDEAlModeStyle( int flags ) KDE_DEPRECATED;
+ //KDE4: Get rid of the above.
+ /**
+ * Sets the appearance of the toolview tabs.
+ * @param flags See KMdi::ToolviewStyle.
+ * @since 3.3
+ */
+ void setToolviewStyle( int flags );
+ /**
+ * @return if the view taskbar should be shown if there are MDI views
+ */
+ bool isViewTaskBarOn();
+
+ /**
+ * Shows the view taskbar. This should be connected with your "View" menu.
+ */
+ virtual void showViewTaskBar();
+
+ /**
+ * Hides the view taskbar. This should be connected with your "View" menu.
+ */
+ virtual void hideViewTaskBar();
+
+ /**
+ * Update of the window menu contents.
+ */
+ virtual void fillWindowMenu();
+
+ /**
+ * Cascades the windows without resizing them.
+ */
+ virtual void cascadeWindows() { m_pMdi->cascadeWindows(); }
+
+ /**
+ * Cascades the windows resizing them to the maximum available size.
+ */
+ virtual void cascadeMaximized() { m_pMdi->cascadeMaximized(); }
+
+ /**
+ * Maximizes only in vertical direction.
+ */
+ virtual void expandVertical() { m_pMdi->expandVertical(); }
+
+ /**
+ * Maximizes only in horizontal direction.
+ */
+ virtual void expandHorizontal() { m_pMdi->expandHorizontal(); }
+
+ /**
+ * Tile Pragma
+ */
+ virtual void tilePragma() { m_pMdi->tilePragma(); }
+
+ /**
+ * Tile Anodine
+ */
+ virtual void tileAnodine() { m_pMdi->tileAnodine(); }
+
+ /**
+ * Tile Vertically
+ */
+ virtual void tileVertically() { m_pMdi->tileVertically(); }
+
+ /**
+ * Sets the decoration of the window frame of docked (attached) MDI views
+ * @deprecated Will be removed in KDE 4
+ */
+ virtual void setFrameDecorOfAttachedViews( int frameDecor );
+
+ /**
+ * If in Childframe mode, we can switch between maximized or restored shown MDI views
+ */
+ virtual void setEnableMaximizedChildFrmMode( bool bEnable );
+
+ /**
+ * Activates the next open view
+ */
+ virtual void activateNextWin();
+
+ /**
+ * Activates the previous open view
+ */
+ virtual void activatePrevWin();
+
+ /**
+ * Activates the view first viewed concerning to the access time.
+ */
+ virtual void activateFirstWin();
+
+ /**
+ * Activates the view last viewed concerning to the access time.
+ */
+ virtual void activateLastWin();
+
+ /**
+ * Activates the view with the tab page index (TabPage mode only)
+ */
+ virtual void activateView( int index );
+
+private:
+ void setupToolViewsForIDEALMode();
+ void setupTabbedDocumentViewSpace();
+ class KMdiDocumentViewTabWidget * m_documentTabWidget;
+
+protected:
+
+ virtual void resizeEvent( QResizeEvent * );
+
+ /**
+ * Creates a new MDI taskbar (showing the MDI views as taskbar entries) and shows it.
+ */
+ virtual void createTaskBar();
+
+ /**
+ * Creates the MDI view area and connects some signals and slots with the KMdiMainFrm widget.
+ */
+ virtual void createMdiManager();
+
+ /**
+ * prevents fillWindowMenu() from m_pWindowMenu->clear(). You have to care for it by yourself.
+ * This is useful if you want to add some actions in your overridden fillWindowMenu() method.
+ */
+ void blockClearingOfWindowMenu( bool bBlocked ) { m_bClearingOfWindowMenuBlocked = bBlocked; }
+
+ void findToolViewsDockedToMain( QPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw );
+ void dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container );
+ QStringList prepareIdealToTabs( KDockWidget* container );
+ void idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int sizee );
+
+ /** Get tabwidget visibility */
+ KMdi::TabWidgetVisibility tabWidgetVisibility();
+
+ /** Set tabwidget visibility */
+ void setTabWidgetVisibility( KMdi::TabWidgetVisibility );
+
+ /** Returns the tabwidget used in IDEAl and Tabbed modes. Returns 0 in other modes. */
+ class KTabWidget * tabWidget() const;
+
+
+protected slots: // Protected slots
+ /**
+ * Sets the focus to this MDI view, raises it, activates its taskbar button and updates
+ * the system buttons in the main menubar when in maximized (Maximize mode).
+ */
+ virtual void activateView( KMdiChildView *pWnd );
+
+ /**
+ * Activates the MDI view (see activateView() ) and popups the taskBar popup menu (see taskBarPopup() ).
+ */
+ virtual void taskbarButtonRightClicked( KMdiChildView *pWnd );
+
+ /**
+ * Turns the system buttons for maximize mode (SDI mode) off, and disconnects them
+ */
+ void switchOffMaximizeModeForMenu( KMdiChildFrm* oldChild );
+
+ /**
+ * Reconnects the system buttons form maximize mode (SDI mode) with the new child frame
+ */
+ void updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildFrm* newChild );
+
+ /**
+ * Usually called when the user clicks an MDI view item in the "Window" menu.
+ */
+ void windowMenuItemActivated( int id );
+
+ /**
+ * Usually called when the user clicks an MDI view item in the sub-popup menu "Docking" of the "Window" menu.
+ */
+ void dockMenuItemActivated( int id );
+
+ /**
+ * Popups the "Window" menu. See also windowPopup() .
+ */
+ void popupWindowMenu( QPoint p );
+
+ /**
+ * The timer for main widget moving has elapsed -> send drag end to all concerned views.
+ */
+ void dragEndTimeOut();
+
+ /**
+ * internally used to handle click on view close button (TabPage mode, only)
+ */
+ void closeViewButtonPressed();
+
+signals:
+ /**
+ * Signals the last attached KMdiChildView has been closed
+ */
+ void lastChildFrmClosed();
+
+ /**
+ * Signals the last KMdiChildView (that is under MDI control) has been closed
+ */
+ void lastChildViewClosed();
+
+ /**
+ * Signals that the Toplevel mode has been left
+ */
+ void leftTopLevelMode();
+
+ /**
+ * Signals that a child view has been detached (undocked to desktop)
+ */
+ void childViewIsDetachedNow( QWidget* );
+
+ /** Signals we need to collapse the overlapped containers */
+ void collapseOverlapContainers();
+
+ /** Signals the MDI mode has been changed */
+ void mdiModeHasBeenChangedTo( KMdi::MdiMode );
+
+ void viewActivated( KMdiChildView* );
+ void viewDeactivated( KMdiChildView* );
+
+public slots:
+ void prevToolViewInDock();
+ void nextToolViewInDock();
+
+private slots:
+ void setActiveToolDock( KMdiDockContainer* );
+ void removeFromActiveDockList( KMdiDockContainer* );
+ void slotDocCurrentChanged( QWidget* );
+ void verifyToplevelHeight();
+#define protected public
+signals:
+#undef protected
+
+ void toggleTop();
+ void toggleLeft();
+ void toggleRight();
+ void toggleBottom();
+};
+
+#endif //_KMDIMAINFRM_H_
+
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmdinulliterator.h b/lib/compatibility/kmdi/qextmdi/kmdinulliterator.h
new file mode 100644
index 00000000..3c976caa
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmdinulliterator.h
@@ -0,0 +1,49 @@
+//----------------------------------------------------------------------------
+// filename : kmdinulliterator.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 02/2000 by Massimo Morin
+// changes : 02/2000 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Massimo Morin (mmorin@schedsys.com)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#ifndef _KMDINULLITERATOR_H_
+#define _KMDINULLITERATOR_H_
+
+#include "kmdiiterator.h"
+
+template <class Item>
+class KMdiNullIterator : public KMdiIterator<Item> {
+public:
+ KMdiNullIterator() {};
+ virtual void first() {}
+ virtual void last() {}
+ virtual void next() {}
+ virtual void prev() {}
+ virtual bool isDone() const { return true; }
+ virtual Item currentItem() const {
+ /* should really never go inside here */
+ return 0;
+ }
+};
+
+#endif // _KMDINULLITERATOR_H_
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp
new file mode 100644
index 00000000..2b86c0c8
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp
@@ -0,0 +1,390 @@
+//----------------------------------------------------------------------------
+// filename : kmditaskbar.cpp
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+// patches : 02/2000 by Massimo Morin (mmorin@schedsys.com)
+//
+// copyright : (C) 1999-2003 by Szymon Stefanek (stefanek@tin.it)
+// and
+// Falk Brettschneider
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#include "kmditaskbar.h"
+#include "kmditaskbar.moc"
+
+#include "kmdimainfrm.h"
+#include "kmdichildview.h"
+#include "kmdidefines.h"
+
+#include <qtooltip.h>
+#include <qlabel.h>
+#include <qwidget.h>
+#include <qstyle.h>
+
+#include <qnamespace.h>
+
+/*
+ @quickhelp: KMdiTaskBar
+ @widget: Taskbar
+ This window lists the currently open windows.<br>
+ Each button corresponds to a single MDI (child) window.<br>
+ The button is enabled (clickable) when the window is docked , and can be
+ pressed to bring it to the top of the other docked windows.<br>
+ The button text becomes red when new output is shown in the window and it is not the active one.<br>
+*/
+
+//####################################################################
+//
+// KMdiTaskBarButton
+//
+//####################################################################
+KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_ptr )
+ : QPushButton( pTaskBar ),
+ m_actualText( "" )
+{
+ setToggleButton( true );
+ m_pWindow = win_ptr;
+ QToolTip::add
+ ( this, win_ptr->caption() );
+ setFocusPolicy( NoFocus );
+}
+
+KMdiTaskBarButton::~KMdiTaskBarButton()
+{}
+
+void KMdiTaskBarButton::mousePressEvent( QMouseEvent* e )
+{
+ switch ( e->button() )
+ {
+ case QMouseEvent::LeftButton:
+ emit leftMouseButtonClicked( m_pWindow );
+ break;
+ case QMouseEvent::RightButton:
+ emit rightMouseButtonClicked( m_pWindow );
+ break;
+ default:
+ break;
+ }
+ emit clicked( m_pWindow );
+}
+
+/** slot version of setText */
+void KMdiTaskBarButton::setNewText( const QString& s )
+{
+ setText( s );
+ emit buttonTextChanged( 0 );
+}
+
+void KMdiTaskBarButton::setText( const QString& s )
+{
+ m_actualText = s;
+ QButton::setText( s );
+}
+
+void KMdiTaskBarButton::fitText( const QString& origStr, int newWidth )
+{
+ QButton::setText( m_actualText );
+
+ int actualWidth = sizeHint().width();
+ int realLetterCount = origStr.length();
+ int newLetterCount = ( newWidth * realLetterCount ) / actualWidth;
+ int w = newWidth + 1;
+ QString s = origStr;
+ while ( ( w > newWidth ) && ( newLetterCount >= 1 ) )
+ {
+ if ( newLetterCount < realLetterCount )
+ {
+ if ( newLetterCount > 3 )
+ s = origStr.left( newLetterCount / 2 ) + "..." + origStr.right( newLetterCount / 2 );
+ else
+ {
+ if ( newLetterCount > 1 )
+ s = origStr.left( newLetterCount ) + "..";
+ else
+ s = origStr.left( 1 );
+ }
+ }
+ QFontMetrics fm = fontMetrics();
+ w = fm.width( s );
+ newLetterCount--;
+ }
+
+ QButton::setText( s );
+}
+
+QString KMdiTaskBarButton::actualText() const
+{
+ return m_actualText;
+}
+
+//####################################################################
+//
+// KMdiTaskBar
+//
+//####################################################################
+
+KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock )
+ : KToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true )
+ , m_pCurrentFocusedWindow( 0 )
+ , m_pStretchSpace( 0 )
+ , m_layoutIsPending( false )
+ , m_bSwitchedOn( false )
+{
+ m_pFrm = parent;
+ m_pButtonList = new QPtrList<KMdiTaskBarButton>;
+ m_pButtonList->setAutoDelete( true );
+ //QT30 setFontPropagation(QWidget::SameFont);
+ setMinimumWidth( 1 );
+ setFocusPolicy( NoFocus );
+ parent->moveToolBar( this, dock ); //XXX obsolete!
+}
+
+KMdiTaskBar::~KMdiTaskBar()
+{
+ delete m_pButtonList;
+}
+
+KMdiTaskBarButton * KMdiTaskBar::addWinButton( KMdiChildView *win_ptr )
+{
+ if ( m_pStretchSpace )
+ {
+ delete m_pStretchSpace;
+ m_pStretchSpace = 0L;
+ setStretchableWidget( 0L );
+ }
+
+ KMdiTaskBarButton *b = new KMdiTaskBarButton( this, win_ptr );
+ QObject::connect( b, SIGNAL( clicked() ), win_ptr, SLOT( setFocus() ) );
+ QObject::connect( b, SIGNAL( clicked( KMdiChildView* ) ), this, SLOT( setActiveButton( KMdiChildView* ) ) );
+ QObject::connect( b, SIGNAL( leftMouseButtonClicked( KMdiChildView* ) ), m_pFrm, SLOT( activateView( KMdiChildView* ) ) );
+ QObject::connect( b, SIGNAL( rightMouseButtonClicked( KMdiChildView* ) ), m_pFrm, SLOT( taskbarButtonRightClicked( KMdiChildView* ) ) );
+ QObject::connect( b, SIGNAL( buttonTextChanged( int ) ), this, SLOT( layoutTaskBar( int ) ) );
+ m_pButtonList->append( b );
+ b->setToggleButton( true );
+ b->setText( win_ptr->tabCaption() );
+
+ layoutTaskBar();
+
+ m_pStretchSpace = new QLabel( this, "empty" );
+ m_pStretchSpace->setText( "" );
+ setStretchableWidget( m_pStretchSpace );
+ m_pStretchSpace->show();
+
+ if ( m_bSwitchedOn )
+ {
+ b->show();
+ show();
+ }
+ return b;
+}
+
+void KMdiTaskBar::removeWinButton( KMdiChildView *win_ptr, bool haveToLayoutTaskBar )
+{
+ KMdiTaskBarButton * b = getButton( win_ptr );
+ if ( b )
+ {
+ m_pButtonList->removeRef( b );
+ if ( haveToLayoutTaskBar )
+ layoutTaskBar();
+ }
+ if ( m_pButtonList->count() == 0 )
+ {
+ if ( m_pStretchSpace != 0L )
+ {
+ delete m_pStretchSpace;
+ m_pStretchSpace = 0L;
+ hide();
+ }
+ }
+}
+
+void KMdiTaskBar::switchOn( bool bOn )
+{
+ m_bSwitchedOn = bOn;
+ if ( !bOn )
+ {
+ hide();
+ }
+ else
+ {
+ if ( m_pButtonList->count() > 0 )
+ {
+ show();
+ }
+ else
+ {
+ hide();
+ }
+ }
+}
+
+KMdiTaskBarButton * KMdiTaskBar::getButton( KMdiChildView *win_ptr )
+{
+ for ( KMdiTaskBarButton * b = m_pButtonList->first();b;b = m_pButtonList->next() )
+ {
+ if ( b->m_pWindow == win_ptr )
+ return b;
+ }
+ return 0;
+}
+
+KMdiTaskBarButton * KMdiTaskBar::getNextWindowButton( bool bRight, KMdiChildView *win_ptr )
+{
+ if ( bRight )
+ {
+ for ( KMdiTaskBarButton * b = m_pButtonList->first();b;b = m_pButtonList->next() )
+ {
+ if ( b->m_pWindow == win_ptr )
+ {
+ b = m_pButtonList->next();
+ if ( !b )
+ b = m_pButtonList->first();
+ if ( win_ptr != b->m_pWindow )
+ return b;
+ else
+ return 0;
+ }
+ }
+ }
+ else
+ {
+ for ( KMdiTaskBarButton * b = m_pButtonList->first();b;b = m_pButtonList->next() )
+ {
+ if ( b->m_pWindow == win_ptr )
+ {
+ b = m_pButtonList->prev();
+ if ( !b )
+ b = m_pButtonList->last();
+ if ( win_ptr != b->m_pWindow )
+ return b;
+ else
+ return 0;
+ }
+ }
+ }
+ return 0;
+}
+
+void KMdiTaskBar::setActiveButton( KMdiChildView *win_ptr )
+{
+ KMdiTaskBarButton * newPressedButton = 0L;
+ KMdiTaskBarButton* oldPressedButton = 0L;
+ for ( KMdiTaskBarButton * b = m_pButtonList->first();b;b = m_pButtonList->next() )
+ {
+ if ( b->m_pWindow == win_ptr )
+ newPressedButton = b;
+ if ( b->m_pWindow == m_pCurrentFocusedWindow )
+ oldPressedButton = b;
+ }
+
+ if ( newPressedButton != 0L && newPressedButton != oldPressedButton )
+ {
+ if ( oldPressedButton != 0L )
+ oldPressedButton->toggle(); // switch off
+ newPressedButton->toggle(); // switch on
+ m_pCurrentFocusedWindow = win_ptr;
+ }
+}
+
+void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
+{
+ if ( m_layoutIsPending )
+ return ;
+ m_layoutIsPending = true;
+
+ if ( !taskBarWidth )
+ // no width is given
+ taskBarWidth = width();
+
+ // calculate current width of all taskbar buttons
+ int allButtonsWidth = 0;
+ KMdiTaskBarButton *b = 0;
+ for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
+ {
+ allButtonsWidth += b->width();
+ }
+
+ // calculate actual width of all taskbar buttons
+ int allButtonsWidthHint = 0;
+ for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
+ {
+ QFontMetrics fm = b->fontMetrics();
+ QString s = b->actualText();
+ QSize sz = fm.size( ShowPrefix, s );
+ int w = sz.width() + 6;
+ int h = sz.height() + sz.height() / 8 + 10;
+ w += h;
+ allButtonsWidthHint += w;
+ }
+
+ // if there's enough space, use actual width
+ int buttonCount = m_pButtonList->count();
+ int tbHandlePixel;
+ tbHandlePixel = style().pixelMetric( QStyle::PM_DockWindowHandleExtent, this );
+ int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().pixelMetric( QStyle::PM_DefaultFrameWidth, this ) - 5;
+ if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < parentWidget() ->width() ) )
+ {
+ for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
+ {
+ b->setText( b->actualText() );
+ if ( b->width() != b->sizeHint().width() )
+ {
+ b->setFixedWidth( b->sizeHint().width() );
+ b->show();
+ }
+ }
+ }
+ else
+ {
+ // too many buttons for actual width
+ int newButtonWidth;
+ if ( buttonCount != 0 )
+ newButtonWidth = buttonAreaWidth / buttonCount;
+ else
+ newButtonWidth = 0;
+ if ( orientation() == Qt::Vertical )
+ newButtonWidth = 80;
+ if ( newButtonWidth > 0 )
+ for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
+ {
+ b->fitText( b->actualText(), newButtonWidth );
+ if ( b->width() != newButtonWidth )
+ {
+ b->setFixedWidth( newButtonWidth );
+ b->show();
+ }
+ }
+ }
+ m_layoutIsPending = false;
+}
+
+void KMdiTaskBar::resizeEvent( QResizeEvent* rse )
+{
+ if ( !m_layoutIsPending )
+ {
+ if ( m_pButtonList->count() != 0 )
+ {
+ layoutTaskBar( rse->size().width() );
+ }
+ }
+ KToolBar::resizeEvent( rse );
+}
+
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
diff --git a/lib/compatibility/kmdi/qextmdi/kmditaskbar.h b/lib/compatibility/kmdi/qextmdi/kmditaskbar.h
new file mode 100644
index 00000000..f1aac814
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmditaskbar.h
@@ -0,0 +1,219 @@
+//----------------------------------------------------------------------------
+// filename : kmditaskbar.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 07/1999 by Szymon Stefanek as part of kvirc
+// (an IRC application)
+// changes : 09/1999 by Falk Brettschneider to create an
+// - 06/2000 stand-alone Qt extension set of
+// classes and a Qt-based library
+// 2000-2003 maintained by the KDevelop project
+//
+// copyright : (C) 1999-2003 by Falk Brettschneider
+// and
+// Szymon Stefanek (stefanek@tin.it)
+// email : falkbr@kdevelop.org (Falk Brettschneider)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#ifndef _KMDITASKBAR_H_
+#define _KMDITASKBAR_H_
+
+#include <ktoolbar.h>
+#include <qptrlist.h>
+#include <qpixmap.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+
+#include "kmdidefines.h"
+
+class KMdiMainFrm;
+class KMdiChildView;
+class KMdiTaskBar;
+
+class KMdiTaskBarButtonPrivate;
+
+/**
+ * @short Internal class.
+ *
+ * It's a special kind of QPushButton catching mouse clicks.
+ * And you have the ability to abbreviate the text that it fits in the button.
+ */
+class KMdiTaskBarButton : public QPushButton
+{
+ Q_OBJECT
+ // methods
+public:
+ /**
+ * Constructor (sets to toggle button, adds a tooltip (caption) and sets to NoFocus
+ */
+ KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_ptr );
+ /**
+ * Destructor
+ */
+ ~KMdiTaskBarButton();
+ /**
+ * text() returns the possibly abbreviated text including the dots in it. But actualText() returns the full text.
+ */
+ QString actualText() const;
+ /**
+ * Given the parameter newWidth this function possibly abbreviates the parameter string and sets a new button text.
+ */
+ void fitText( const QString&, int newWidth );
+ /**
+ * Sets the text and avoids any abbreviation. Memorizes that text in m_actualText, too.
+ */
+ void setText( const QString& );
+signals:
+ /**
+ * Emitted when the button has been clicked. Internally connected to setFocus of the according MDI view.
+ */
+ void clicked( KMdiChildView* );
+ /**
+ * Internally connected with KMdiMainFrm::activateView
+ */
+ void leftMouseButtonClicked( KMdiChildView* );
+ /**
+ * Internally connected with KMdiMainFrm::taskbarButtonRightClicked
+ */
+ void rightMouseButtonClicked( KMdiChildView* );
+ /**
+ * Emitted when the button text has changed. Internally connected with KMdiTaskBar::layoutTaskBar
+ */
+ void buttonTextChanged( int );
+public slots:
+ /**
+ * A slot version of setText
+ */
+ void setNewText( const QString& );
+protected slots:
+ /**
+ * Reimplemented from its base class to catch right and left mouse button clicks
+ */
+ void mousePressEvent( QMouseEvent* );
+
+ // attributes
+public:
+ /**
+ * The according MDI view
+ */
+ KMdiChildView *m_pWindow;
+protected:
+ /**
+ * Internally we must remember the real text because the button text can be abbreviated.
+ */
+ QString m_actualText;
+
+private:
+ KMdiTaskBarButtonPrivate *d;
+};
+
+
+class KMdiTaskBarPrivate;
+/**
+ * @short Internal class.
+ *
+ * It's a special kind of QToolBar that acts as taskbar for child views.
+ * KMdiTaskBarButtons can be added or removed dynamically.<br>
+ * The button sizes are adjusted dynamically, as well.
+ */
+class KMDI_EXPORT KMdiTaskBar : public KToolBar
+{
+ Q_OBJECT
+public:
+ /**
+ * Constructor (NoFocus, minimum width = 1, an internal QPtrList of taskbar buttons (autodelete))
+ */
+ KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock );
+ /**
+ * Destructor (deletes the taskbar button list)
+ */
+ ~KMdiTaskBar();
+ /**
+ *Add a new KMdiTaskBarButton . The width doesn't change.
+ * If there's not enough space, all taskbar buttons will be resized to a new smaller size.
+ * Probably button texts must be abbreviated now.
+ */
+ KMdiTaskBarButton * addWinButton( KMdiChildView *win_ptr );
+ /**
+ * Removes a KMdiTaskBarButton and deletes it. If the rest of the buttons are smaller
+ * than they usually are, all those buttons will be resized in a way that the new free size is used as well.
+ */
+ void removeWinButton( KMdiChildView *win_ptr, bool haveToLayoutTaskBar = true );
+ /**
+ * Returns the neighbor taskbar button of the taskbar button of the MDI view given by parameter
+ * bRight specifies the side, of course left is used if bRight is false.
+ */
+ KMdiTaskBarButton * getNextWindowButton( bool bRight, KMdiChildView *win_ptr );
+ /**
+ * Get the button belonging to the MDI view given as parameter.
+ */
+ KMdiTaskBarButton * getButton( KMdiChildView *win_ptr );
+ /**
+ * Switch it on or off.
+ */
+ void switchOn( bool bOn );
+ /**
+ * @return whether switched on or off.
+ */
+ bool isSwitchedOn() const
+ {
+ return m_bSwitchedOn;
+ };
+protected:
+ /**
+ * Reimplemented from its base class to call layoutTaskBar, additionally.
+ */
+ void resizeEvent( QResizeEvent* );
+protected slots:
+ /**
+ * Checks if all buttons fits into this. If not, it recalculates all button widths
+ * in a way that all buttons fits into the taskbar and have got equal width.
+ * The text of the buttons will be abbreviated when nessecary, all buttons get a
+ * fixed width and show() is called for each one.
+ * If one drags the taskbar to a vertical orientation, the button width is set to 80 pixel.
+ */
+ void layoutTaskBar( int taskBarWidth = 0 );
+public slots:
+ /**
+ * Pushes the desired taskbar button down (switch on), the old one is released (switched off).
+ * Actually it's a radiobutton group behavior.
+ */
+ void setActiveButton( KMdiChildView *win_ptr );
+protected:
+ /**
+ * A list of taskbar buttons.
+ * Note: Each button stands for one MDI view (toolviews doesn't have got a taskbar button).
+ */
+ QPtrList<KMdiTaskBarButton>* m_pButtonList;
+ /**
+ * The belonging MDI mainframe (parent widget of this)
+ */
+ KMdiMainFrm* m_pFrm;
+ /**
+ * The MDI view belonging to the currently pressed taskbar button
+ */
+ KMdiChildView* m_pCurrentFocusedWindow;
+ /**
+ * A stretchable widget used as 'space' at the end of a half filled taskbar
+ */
+ QLabel* m_pStretchSpace;
+ bool m_layoutIsPending;
+ bool m_bSwitchedOn;
+
+private:
+ KMdiTaskBarPrivate *d;
+};
+
+#endif //_KMDITASKBAR_H_
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp
new file mode 100644
index 00000000..f9921e18
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp
@@ -0,0 +1,269 @@
+//----------------------------------------------------------------------------
+// filename : kmditoolviewaccessor.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 08/2003 by Joseph Wenninger (jowenn@kde.org)
+// changes : ---
+// patches : ---
+//
+// copyright : (C) 2003 by Joseph Wenninger (jowenn@kde.org)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+#ifndef NO_KDE
+# include <kdebug.h>
+#endif
+#include "kmditoolviewaccessor_p.h"
+#include "kmdiguiclient.h"
+#include "kmdimainfrm.h"
+
+#include "kmditoolviewaccessor.h"
+#include "kmditoolviewaccessor_p.h"
+
+KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption )
+ : QObject( parent )
+{
+ mdiMainFrm = parent;
+ d = new KMdiToolViewAccessorPrivate();
+ if ( widgetToWrap->inherits( "KDockWidget" ) )
+ {
+ d->widgetContainer = dynamic_cast<KDockWidget*>( widgetToWrap );
+ d->widget = d->widgetContainer->getWidget();
+ }
+ else
+ {
+ d->widget = widgetToWrap;
+ QString finalTabCaption;
+ if ( tabCaption == 0 )
+ {
+ finalTabCaption = widgetToWrap->caption();
+ if ( finalTabCaption.isEmpty() && !widgetToWrap->icon() )
+ {
+ finalTabCaption = widgetToWrap->name();
+ }
+ }
+ else
+ {
+ finalTabCaption = tabCaption;
+ }
+ d->widgetContainer = parent->createDockWidget( widgetToWrap->name(),
+ ( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap() ),
+ 0L, // parent
+ widgetToWrap->caption(),
+ finalTabCaption );
+ d->widgetContainer->setWidget( widgetToWrap );
+ if ( tabToolTip != 0 )
+ {
+ d->widgetContainer->setToolTipString( tabToolTip );
+ }
+ }
+ //mdiMainFrm->m_pToolViews->insert(d->widget,this);
+ if ( mdiMainFrm->m_mdiGUIClient )
+ mdiMainFrm->m_mdiGUIClient->addToolView( this );
+ else
+ kdDebug( 760 ) << "mdiMainFrm->m_mdiGUIClient == 0 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << endl;
+
+ d->widget->installEventFilter( this );
+}
+
+KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent )
+{
+ mdiMainFrm = parent;
+ d = new KMdiToolViewAccessorPrivate();
+}
+
+KMdiToolViewAccessor::~KMdiToolViewAccessor()
+{
+ if ( mdiMainFrm->m_pToolViews )
+ mdiMainFrm->m_pToolViews->remove
+ ( d->widget );
+ delete d;
+
+}
+
+QWidget *KMdiToolViewAccessor::wrapperWidget()
+{
+ if ( !d->widgetContainer )
+ {
+ d->widgetContainer = mdiMainFrm->createDockWidget( "KMdiToolViewAccessor::null", QPixmap() );
+ connect( d->widgetContainer, SIGNAL( widgetSet( QWidget* ) ), this, SLOT( setWidgetToWrap( QWidget* ) ) );
+ }
+ return d->widgetContainer;
+}
+
+QWidget *KMdiToolViewAccessor::wrappedWidget()
+{
+ return d->widget;
+}
+
+
+void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption )
+{
+ Q_ASSERT( !( d->widget ) );
+ Q_ASSERT( !widgetToWrap->inherits( "KDockWidget" ) );
+ disconnect( d->widgetContainer, SIGNAL( widgetSet( QWidget* ) ), this, SLOT( setWidgetToWrap( QWidget* ) ) );
+ delete d->widget;
+ d->widget = widgetToWrap;
+ KDockWidget *tmp = d->widgetContainer;
+
+ QString finalTabCaption;
+ if ( tabCaption == 0 )
+ {
+ finalTabCaption = widgetToWrap->caption();
+ if ( finalTabCaption.isEmpty() && !widgetToWrap->icon() )
+ {
+ finalTabCaption = widgetToWrap->name();
+ }
+ }
+ else
+ {
+ finalTabCaption = tabCaption;
+ }
+
+ if ( !tmp )
+ {
+ tmp = mdiMainFrm->createDockWidget( widgetToWrap->name(),
+ widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap(),
+ 0L, // parent
+ widgetToWrap->caption(),
+ finalTabCaption );
+ d->widgetContainer = tmp;
+ if ( tabToolTip != 0 )
+ {
+ d->widgetContainer->setToolTipString( tabToolTip );
+ }
+ }
+ else
+ {
+ tmp->setCaption( widgetToWrap->caption() );
+ tmp->setTabPageLabel( finalTabCaption );
+ tmp->setPixmap( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap() );
+ tmp->setName( widgetToWrap->name() );
+ if ( tabToolTip != 0 )
+ {
+ d->widgetContainer->setToolTipString( tabToolTip );
+ }
+ }
+ tmp->setWidget( widgetToWrap );
+ mdiMainFrm->m_pToolViews->insert( widgetToWrap, this );
+ if ( mdiMainFrm->m_mdiGUIClient )
+ mdiMainFrm->m_mdiGUIClient->addToolView( this );
+ else
+ kdDebug( 760 ) << "mdiMainFrm->m_mdiGUIClient == 0 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << endl;
+
+ d->widget->installEventFilter( this );
+}
+
+
+bool KMdiToolViewAccessor::eventFilter( QObject *, QEvent *e )
+{
+ if ( e->type() == QEvent::IconChange )
+ {
+ d->widgetContainer->setPixmap( d->widget->icon() ? ( *d->widget->icon() ) : QPixmap() );
+ }
+ return false;
+}
+
+void KMdiToolViewAccessor::placeAndShow( KDockWidget::DockPosition pos, QWidget* pTargetWnd , int percent )
+{
+ place( pos, pTargetWnd, percent );
+ show();
+}
+void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTargetWnd , int percent )
+{
+ Q_ASSERT( d->widgetContainer );
+ if ( !d->widgetContainer )
+ return ;
+ if ( pos == KDockWidget::DockNone )
+ {
+ d->widgetContainer->setEnableDocking( KDockWidget::DockNone );
+ d->widgetContainer->reparent( mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, QPoint( 0, 0 ), true ); //pToolView->isVisible());
+ }
+ else
+ { // add (and dock) the toolview as DockWidget view
+
+ KDockWidget* pCover = d->widgetContainer;
+
+ KDockWidget* pTargetDock = 0L;
+ if ( pTargetWnd->inherits( "KDockWidget" ) || pTargetWnd->inherits( "KDockWidget_Compat::KDockWidget" ) )
+ {
+ pTargetDock = ( KDockWidget* ) pTargetWnd;
+ }
+
+ // Should we dock to ourself?
+ bool DockToOurself = false;
+ if ( mdiMainFrm->m_pDockbaseAreaOfDocumentViews )
+ {
+ if ( pTargetWnd == mdiMainFrm->m_pDockbaseAreaOfDocumentViews->getWidget() )
+ {
+ DockToOurself = true;
+ pTargetDock = mdiMainFrm->m_pDockbaseAreaOfDocumentViews;
+ }
+ else if ( pTargetWnd == mdiMainFrm->m_pDockbaseAreaOfDocumentViews )
+ {
+ DockToOurself = true;
+ pTargetDock = mdiMainFrm->m_pDockbaseAreaOfDocumentViews;
+ }
+ }
+ // this is not inheriting QWidget*, its plain impossible that this condition is true
+ //if (pTargetWnd == this) DockToOurself = true;
+ if ( !DockToOurself )
+ if ( pTargetWnd != 0L )
+ {
+ pTargetDock = mdiMainFrm->dockManager->findWidgetParentDock( pTargetWnd );
+ if ( !pTargetDock )
+ {
+ if ( pTargetWnd->parentWidget() )
+ {
+ pTargetDock = mdiMainFrm->dockManager->findWidgetParentDock( pTargetWnd->parentWidget() );
+ }
+ }
+ }
+ if ( !pTargetDock || pTargetWnd == mdiMainFrm->getMainDockWidget() )
+ {
+ if ( mdiMainFrm->m_managedDockPositionMode && ( mdiMainFrm->m_pMdi || mdiMainFrm->m_documentTabWidget ) )
+ {
+ KDockWidget * dw1 = pTargetDock->findNearestDockWidget( pos );
+ if ( dw1 )
+ pCover->manualDock( dw1, KDockWidget::DockCenter, percent );
+ else
+ pCover->manualDock ( pTargetDock, pos, 20 );
+ return ;
+ }
+ }
+ pCover->manualDock( pTargetDock, pos, percent );
+ //check pCover->show();
+ }
+}
+
+void KMdiToolViewAccessor::hide()
+{
+ Q_ASSERT( d->widgetContainer );
+ if ( !d->widgetContainer )
+ return ;
+ d->widgetContainer->undock();
+}
+
+void KMdiToolViewAccessor::show()
+{
+ Q_ASSERT( d->widgetContainer );
+ if ( !d->widgetContainer )
+ return ;
+ d->widgetContainer->makeDockVisible();
+}
+
+
+#ifndef NO_INCLUDE_MOCFILES
+#include "kmditoolviewaccessor.moc"
+#endif
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h
new file mode 100644
index 00000000..d5bd49a7
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h
@@ -0,0 +1,86 @@
+//----------------------------------------------------------------------------
+// filename : kmditoolviewaccessor.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 08/2003 by Joseph Wenninger (jowenn@kde.org)
+// changes : ---
+// patches : ---
+//
+// copyright : (C) 2003 by Joseph Wenninger (jowenn@kde.org)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+#ifndef _KMDITOOLVIEWACCESSOR_H_
+#define _KMDITOOLVIEWACCESSOR_H_
+
+#include <qwidget.h>
+#include <qpixmap.h>
+#include <qrect.h>
+#include <qapplication.h>
+#include <qdatetime.h>
+
+#include <kdockwidget.h>
+
+namespace KMDIPrivate
+{
+class KMDIGUIClient;
+}
+
+
+class KMDI_EXPORT KMdiToolViewAccessor : public QObject
+{
+ Q_OBJECT
+
+
+ friend class KMdiMainFrm;
+ friend class KMDIPrivate::KMDIGUIClient;
+
+private:
+ /**
+ * Internally used by KMdiMainFrm to store a temporary information that the method
+ * activate() is unnecessary and that it can by escaped.
+ * This saves from unnecessary calls when activate is called directly.
+ */
+ bool m_bInterruptActivation;
+ /**
+ * Internally used to prevent cycles between KMdiMainFrm::activateView() and KMdiChildView::activate().
+ */
+ bool m_bMainframesActivateViewIsPending;
+ /**
+ *
+ */
+ bool m_bFocusInEventIsPending;
+
+private:
+ KMdiToolViewAccessor( class KMdiMainFrm *parent , QWidget *widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 );
+ KMdiToolViewAccessor( class KMdiMainFrm *parent );
+public:
+ ~KMdiToolViewAccessor();
+ QWidget *wrapperWidget();
+ QWidget *wrappedWidget();
+ void place( KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50 );
+ void placeAndShow( KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50 );
+ void show();
+public slots:
+ void setWidgetToWrap( QWidget* widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 );
+ void hide();
+private:
+ class KMdiToolViewAccessorPrivate *d;
+ class KMdiMainFrm *mdiMainFrm;
+
+protected:
+ bool eventFilter( QObject *o, QEvent *e );
+};
+
+
+#endif //_KMDITOOLVIEWACCESSOR_H_
+// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h
new file mode 100644
index 00000000..913b8854
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h
@@ -0,0 +1,51 @@
+//----------------------------------------------------------------------------
+// filename : kmditoolviewaccessor_p.h
+//----------------------------------------------------------------------------
+// Project : KDE MDI extension
+//
+// begin : 08/2003 by Joseph Wenninger (jowenn@kde.org)
+// changes : ---
+// patches : ---
+//
+// copyright : (C) 2003 by Joseph Wenninger (jowenn@kde.org)
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+//
+// This program 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.
+//
+//----------------------------------------------------------------------------
+
+
+#ifndef KMDI_TOOLVIEW_ACCESSOR_PRIVATE_H_
+#define KMDI_TOOLVIEW_ACCESSOR_PRIVATE_H_
+
+
+#include <qwidget.h>
+#include <kdockwidget.h>
+#include <qguardedptr.h>
+#include <kaction.h>
+
+class KMDI_EXPORT KMdiToolViewAccessorPrivate {
+public:
+ KMdiToolViewAccessorPrivate() {
+ widgetContainer=0;
+ widget=0;
+ }
+ ~KMdiToolViewAccessorPrivate() {
+ delete action;
+ if (!widgetContainer.isNull()) widgetContainer->undock();
+ delete (KDockWidget*)widgetContainer;
+ }
+ QGuardedPtr<KDockWidget> widgetContainer;
+ QWidget* widget;
+ QGuardedPtr<KAction> action;
+};
+
+
+#endif
+
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp b/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp
new file mode 100644
index 00000000..335f82db
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp
@@ -0,0 +1,988 @@
+/***************************************************************************
+ kmultitabbar.cpp - description
+ -------------------
+ begin : 2001
+ copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@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.
+ ***************************************************************************/
+
+#include "kmultitabbar.h"
+#include "kmultitabbar.moc"
+#include "kmultitabbar_p.h"
+#include "kmultitabbar_p.moc"
+#include <qbutton.h>
+#include <qpopupmenu.h>
+#include <qlayout.h>
+#include <qpainter.h>
+#include <qtooltip.h>
+#include <qfontmetrics.h>
+#include <qstyle.h>
+
+#include <kiconloader.h>
+#include <kdebug.h>
+#include <qapplication.h>
+#include <math.h>
+
+#define NEARBYINT(i) ((int(float(i) + 0.5)))
+
+class KMultiTabBarTabPrivate {
+public:
+ QPixmap pix;
+};
+
+
+KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode bm):QScrollView(parent)
+{
+ m_expandedTabSize=-1;
+ m_showActiveTabTexts=false;
+ m_tabs.setAutoDelete(true);
+ m_barMode=bm;
+ setHScrollBarMode(AlwaysOff);
+ setVScrollBarMode(AlwaysOff);
+ if (bm==KMultiTabBar::Vertical)
+ {
+ box=new QWidget(viewport());
+ mainLayout=new QVBoxLayout(box);
+ mainLayout->setAutoAdd(true);
+ box->setFixedWidth(24);
+ setFixedWidth(24);
+ }
+ else
+ {
+ box=new QWidget(viewport());
+ mainLayout=new QHBoxLayout(box);
+ mainLayout->setAutoAdd(true);
+ box->setFixedHeight(24);
+ setFixedHeight(24);
+ }
+ addChild(box);
+ setFrameStyle(NoFrame);
+ viewport()->setBackgroundMode(Qt::PaletteBackground);
+/* box->setPaletteBackgroundColor(Qt::red);
+ setPaletteBackgroundColor(Qt::green);*/
+}
+
+void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style)
+{
+ m_style=style;
+ for (uint i=0;i<m_tabs.count();i++)
+ m_tabs.at(i)->setStyle(m_style);
+
+ if ( (m_style==KMultiTabBar::KDEV3) ||
+ (m_style==KMultiTabBar::KDEV3ICON ) ) {
+ delete mainLayout;
+ mainLayout=0;
+ resizeEvent(0);
+ } else if (mainLayout==0) {
+ if (m_barMode==KMultiTabBar::Vertical)
+ {
+ box=new QWidget(viewport());
+ mainLayout=new QVBoxLayout(box);
+ box->setFixedWidth(24);
+ setFixedWidth(24);
+ }
+ else
+ {
+ box=new QWidget(viewport());
+ mainLayout=new QHBoxLayout(box);
+ box->setFixedHeight(24);
+ setFixedHeight(24);
+ }
+ addChild(box);
+ for (uint i=0;i<m_tabs.count();i++)
+ mainLayout->add(m_tabs.at(i));
+ mainLayout->setAutoAdd(true);
+
+ }
+ viewport()->repaint();
+}
+
+void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy, int clipw, int cliph )
+{
+ QScrollView::drawContents (paint , clipx, clipy, clipw, cliph );
+
+ if (m_position==KMultiTabBar::Right)
+ {
+
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,0,0,viewport()->height());
+ paint->setPen(colorGroup().background().dark(120));
+ paint->drawLine(1,0,1,viewport()->height());
+
+
+ }
+ else
+ if (m_position==KMultiTabBar::Left)
+ {
+ paint->setPen(colorGroup().light());
+ paint->drawLine(23,0,23,viewport()->height());
+ paint->drawLine(22,0,22,viewport()->height());
+
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,0,0,viewport()->height());
+ }
+ else
+ if (m_position==KMultiTabBar::Bottom)
+ {
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,0,viewport()->width(),0);
+ paint->setPen(colorGroup().background().dark(120));
+ paint->drawLine(0,1,viewport()->width(),1);
+ }
+ else
+ {
+ paint->setPen(colorGroup().light());
+ paint->drawLine(0,23,viewport()->width(),23);
+ paint->drawLine(0,22,viewport()->width(),22);
+
+/* paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,0,0,viewport()->height());*/
+
+ }
+
+
+}
+
+void KMultiTabBarInternal::contentsMousePressEvent(QMouseEvent *ev)
+{
+ ev->ignore();
+}
+
+void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev)
+{
+ ev->ignore();
+}
+
+
+#define CALCDIFF(m_tabs,diff,i) if (m_lines>(int)lines) {\
+ /*kdDebug()<<"i="<<i<<" tabCount="<<tabCount<<" space="<<space<<endl;*/ \
+ uint ulen=0;\
+ diff=0; \
+ for (uint i2=i;i2<tabCount;i2++) {\
+ uint l1=m_tabs.at(i2)->neededSize();\
+ if ((ulen+l1)>space){\
+ if (ulen==0) diff=0;\
+ else diff=((float)(space-ulen))/(i2-i);\
+ break;\
+ }\
+ ulen+=l1;\
+ }\
+ } else {diff=0; }
+
+
+void KMultiTabBarInternal::resizeEvent(QResizeEvent *ev) {
+/* kdDebug()<<"KMultiTabBarInternal::resizeEvent"<<endl;
+ kdDebug()<<"KMultiTabBarInternal::resizeEvent - box geometry"<<box->geometry()<<endl;
+ kdDebug()<<"KMultiTabBarInternal::resizeEvent - geometry"<<geometry()<<endl;*/
+ if (ev) QScrollView::resizeEvent(ev);
+
+ if ( (m_style==KMultiTabBar::KDEV3) ||
+ (m_style==KMultiTabBar::KDEV3ICON) ){
+ box->setGeometry(0,0,width(),height());
+ int lines=1;
+ uint space;
+ float tmp=0;
+ if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top))
+ space=width();
+ else
+ space=height();
+
+ int cnt=0;
+//CALCULATE LINES
+ const uint tabCount=m_tabs.count();
+ for (uint i=0;i<tabCount;i++) {
+ cnt++;
+ tmp+=m_tabs.at(i)->neededSize();
+ if (tmp>space) {
+ if (cnt>1)i--;
+ else if (i==(tabCount-1)) break;
+ cnt=0;
+ tmp=0;
+ lines++;
+ }
+ }
+//SET SIZE & PLACE
+ float diff=0;
+ cnt=0;
+
+ if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top)) {
+
+ setFixedHeight(lines*24);
+ box->setFixedHeight(lines*24);
+ m_lines=height()/24-1;
+ lines=0;
+ CALCDIFF(m_tabs,diff,0)
+ tmp=-diff;
+
+ //kdDebug()<<"m_lines recalculated="<<m_lines<<endl;
+ for (uint i=0;i<tabCount;i++) {
+ KMultiTabBarTab *tab=m_tabs.at(i);
+ cnt++;
+ tmp+=tab->neededSize()+diff;
+ if (tmp>space) {
+ //kdDebug()<<"about to start new line"<<endl;
+ if (cnt>1) {
+ CALCDIFF(m_tabs,diff,i)
+ i--;
+ }
+ else {
+ //kdDebug()<<"placing line on old line"<<endl;
+ kdDebug()<<"diff="<<diff<<endl;
+ tab->removeEventFilter(this);
+ tab->move(NEARBYINT(tmp-tab->neededSize()),lines*24);
+// tab->setFixedWidth(tab->neededSize()+diff);
+ tab->setFixedWidth(NEARBYINT(tmp+diff)-tab->x());;
+ tab->installEventFilter(this);
+ CALCDIFF(m_tabs,diff,(i+1))
+
+ }
+ tmp=-diff;
+ cnt=0;
+ lines++;
+ //kdDebug()<<"starting new line:"<<lines<<endl;
+
+ } else {
+ //kdDebug()<<"Placing line on line:"<<lines<<" pos: (x/y)=("<<tmp-m_tabs.at(i)->neededSize()<<"/"<<lines*24<<")"<<endl;
+ //kdDebug()<<"diff="<<diff<<endl;
+ tab->removeEventFilter(this);
+ tab->move(NEARBYINT(tmp-tab->neededSize()),lines*24);
+ tab->setFixedWidth(NEARBYINT(tmp+diff)-tab->x());;
+
+ //tab->setFixedWidth(tab->neededSize()+diff);
+ tab->installEventFilter(this);
+
+ }
+ }
+ }
+ else {
+ setFixedWidth(lines*24);
+ box->setFixedWidth(lines*24);
+ m_lines=lines=width()/24;
+ lines=0;
+ CALCDIFF(m_tabs,diff,0)
+ tmp=-diff;
+
+ for (uint i=0;i<tabCount;i++) {
+ KMultiTabBarTab *tab=m_tabs.at(i);
+ cnt++;
+ tmp+=tab->neededSize()+diff;
+ if (tmp>space) {
+ if (cnt>1) {
+ CALCDIFF(m_tabs,diff,i);
+ tmp=-diff;
+ i--;
+ }
+ else {
+ tab->removeEventFilter(this);
+ tab->move(lines*24,NEARBYINT(tmp-tab->neededSize()));
+ tab->setFixedHeight(NEARBYINT(tmp+diff)-tab->y());;
+ tab->installEventFilter(this);
+ }
+ cnt=0;
+ tmp=-diff;
+ lines++;
+ } else {
+ tab->removeEventFilter(this);
+ tab->move(lines*24,NEARBYINT(tmp-tab->neededSize()));
+ tab->setFixedHeight(NEARBYINT(tmp+diff)-tab->y());;
+ tab->installEventFilter(this);
+ }
+ }
+ }
+
+
+ //kdDebug()<<"needed lines:"<<m_lines<<endl;
+ } else {
+ int size=0; /*move the calculation into another function and call it only on add tab and tab click events*/
+ for (int i=0;i<(int)m_tabs.count();i++)
+ size+=(m_barMode==KMultiTabBar::Vertical?m_tabs.at(i)->height():m_tabs.at(i)->width());
+ if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top))
+ box->setGeometry(0,0,size,height());
+ else box->setGeometry(0,0,width(),size);
+
+ }
+}
+
+
+void KMultiTabBarInternal::showActiveTabTexts(bool show)
+{
+ m_showActiveTabTexts=show;
+}
+
+
+KMultiTabBarTab* KMultiTabBarInternal::tab(int id) const
+{
+ for (QPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
+ if (it.current()->id()==id) return it.current();
+ }
+ return 0;
+}
+
+bool KMultiTabBarInternal::eventFilter(QObject *, QEvent *e) {
+ if (e->type()==QEvent::Resize) resizeEvent(0);
+ return false;
+}
+
+int KMultiTabBarInternal::appendTab(const QPixmap &pic ,int id,const QString& text)
+{
+ KMultiTabBarTab *tab;
+ m_tabs.append(tab= new KMultiTabBarTab(pic,text,id,box,m_position,m_style));
+ tab->installEventFilter(this);
+ tab->showActiveTabText(m_showActiveTabTexts);
+
+ if (m_style==KMultiTabBar::KONQSBC)
+ {
+ if (m_expandedTabSize<tab->neededSize()) {
+ m_expandedTabSize=tab->neededSize();
+ for (uint i=0;i<m_tabs.count();i++)
+ m_tabs.at(i)->setSize(m_expandedTabSize);
+
+ } else tab->setSize(m_expandedTabSize);
+ } else tab->updateState();
+ tab->show();
+ resizeEvent(0);
+ return 0;
+}
+
+void KMultiTabBarInternal::removeTab(int id)
+{
+ for (uint pos=0;pos<m_tabs.count();pos++)
+ {
+ if (m_tabs.at(pos)->id()==id)
+ {
+ m_tabs.remove(pos);
+ resizeEvent(0);
+ break;
+ }
+ }
+}
+
+void KMultiTabBarInternal::setPosition(enum KMultiTabBar::KMultiTabBarPosition pos)
+{
+ m_position=pos;
+ for (uint i=0;i<m_tabs.count();i++)
+ m_tabs.at(i)->setTabsPosition(m_position);
+ viewport()->repaint();
+}
+
+
+KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, QPopupMenu *popup,
+ int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
+ :QPushButton(QIconSet(),text,parent),m_style(style)
+{
+ setIconSet(pic);
+ setText(text);
+ m_position=pos;
+ if (popup) setPopup(popup);
+ setFlat(true);
+ setFixedHeight(24);
+ setFixedWidth(24);
+ m_id=id;
+ QToolTip::add(this,text);
+ connect(this,SIGNAL(clicked()),this,SLOT(slotClicked()));
+}
+
+KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup,
+ int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
+ :QPushButton(QIconSet(),text,parent),m_style(style)
+{
+ setText(text);
+ m_position=pos;
+ if (popup) setPopup(popup);
+ setFlat(true);
+ setFixedHeight(24);
+ setFixedWidth(24);
+ m_id=id;
+ QToolTip::add(this,text);
+ connect(this,SIGNAL(clicked()),this,SLOT(slotClicked()));
+}
+
+KMultiTabBarButton::~KMultiTabBarButton() {
+}
+
+int KMultiTabBarButton::id() const{
+ return m_id;
+}
+
+void KMultiTabBarButton::setText(const QString& text)
+{
+ QPushButton::setText(text);
+ m_text=text;
+ QToolTip::add(this,text);
+}
+
+void KMultiTabBarButton::slotClicked()
+{
+ emit clicked(m_id);
+}
+
+void KMultiTabBarButton::setPosition(KMultiTabBar::KMultiTabBarPosition pos)
+{
+ m_position=pos;
+ repaint();
+}
+
+void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style)
+{
+ m_style=style;
+ repaint();
+}
+
+void KMultiTabBarButton::hideEvent( QHideEvent* he) {
+ QPushButton::hideEvent(he);
+ KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
+ if (tb) tb->updateSeparator();
+}
+
+void KMultiTabBarButton::showEvent( QShowEvent* he) {
+ QPushButton::showEvent(he);
+ KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
+ if (tb) tb->updateSeparator();
+}
+
+
+QSize KMultiTabBarButton::sizeHint() const
+{
+ constPolish();
+
+ int w = 0, h = 0;
+
+ // calculate contents size...
+#ifndef QT_NO_ICONSET
+ if ( iconSet() && !iconSet()->isNull() ) {
+ int iw = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4;
+ int ih = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+ w += iw;
+ h = QMAX( h, ih );
+ }
+#endif
+ if ( isMenuButton() )
+ w += style().pixelMetric(QStyle::PM_MenuButtonIndicator, this);
+
+ if ( pixmap() ) {
+ QPixmap *pm = (QPixmap *)pixmap();
+ w += pm->width();
+ h += pm->height();
+ } else {
+ QString s( text() );
+ bool empty = s.isEmpty();
+ if ( empty )
+ s = QString::fromLatin1("XXXX");
+ QFontMetrics fm = fontMetrics();
+ QSize sz = fm.size( ShowPrefix, s );
+ if(!empty || !w)
+ w += sz.width();
+ if(!empty || !h)
+ h = QMAX(h, sz.height());
+ }
+
+ return (style().sizeFromContents(QStyle::CT_ToolButton, this, QSize(w, h)).
+ expandedTo(QApplication::globalStrut()));
+}
+
+
+KMultiTabBarTab::KMultiTabBarTab(const QPixmap& pic, const QString& text,
+ int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,
+ KMultiTabBar::KMultiTabBarStyle style)
+ :KMultiTabBarButton(text,0,id,parent,pos,style),
+ m_showActiveTabText(false)
+{
+ d=new KMultiTabBarTabPrivate();
+ setIcon(pic);
+ m_expandedSize=24;
+ setToggleButton(true);
+}
+
+KMultiTabBarTab::~KMultiTabBarTab() {
+ delete d;
+}
+
+
+void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos)
+{
+ if ((pos!=m_position) && ((pos==KMultiTabBar::Left) || (pos==KMultiTabBar::Right))) {
+ if (!d->pix.isNull()) {
+ QWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
+ temp.rotate(180);
+ d->pix=d->pix.xForm(temp);
+ setIconSet(d->pix);
+ }
+ }
+
+ setPosition(pos);
+// repaint();
+}
+
+void KMultiTabBarTab::setIcon(const QString& icon)
+{
+ QPixmap pic=SmallIcon(icon);
+ setIcon(pic);
+}
+
+void KMultiTabBarTab::setIcon(const QPixmap& icon)
+{
+
+ if (m_style!=KMultiTabBar::KDEV3) {
+ if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right)) {
+ QWMatrix rotateMatrix;
+ if (m_position==KMultiTabBar::Left)
+ rotateMatrix.rotate(90);
+ else
+ rotateMatrix.rotate(-90);
+ QPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW
+ d->pix=pic;
+ setIconSet(pic);
+ } else setIconSet(icon);
+ }
+}
+
+void KMultiTabBarTab::slotClicked()
+{
+ updateState();
+ KMultiTabBarButton::slotClicked();
+}
+
+void KMultiTabBarTab::setState(bool b)
+{
+ setOn(b);
+ updateState();
+}
+
+void KMultiTabBarTab::updateState()
+{
+
+ if (m_style!=KMultiTabBar::KONQSBC) {
+ if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
+ QPushButton::setText(m_text);
+ } else {
+ kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty QString***************"<<endl;
+ QPushButton::setText(QString::null);
+ }
+
+ if ((m_position==KMultiTabBar::Right || m_position==KMultiTabBar::Left)) {
+ setFixedWidth(24);
+ if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
+ setFixedHeight(KMultiTabBarButton::sizeHint().width());
+ } else setFixedHeight(36);
+ } else {
+ setFixedHeight(24);
+ if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
+ setFixedWidth(KMultiTabBarButton::sizeHint().width());
+ } else setFixedWidth(36);
+ }
+ } else {
+ if ((!isOn()) || (!m_showActiveTabText))
+ {
+ setFixedWidth(24);
+ setFixedHeight(24);
+ return;
+ }
+ if ((m_position==KMultiTabBar::Right || m_position==KMultiTabBar::Left))
+ setFixedHeight(m_expandedSize);
+ else
+ setFixedWidth(m_expandedSize);
+ }
+ QApplication::sendPostedEvents(0,QEvent::Paint | QEvent::Move | QEvent::Resize | QEvent::LayoutHint);
+ QApplication::flush();
+}
+
+int KMultiTabBarTab::neededSize()
+{
+ return (((m_style!=KMultiTabBar::KDEV3)?24:0)+QFontMetrics(QFont()).width(m_text)+6);
+}
+
+void KMultiTabBarTab::setSize(int size)
+{
+ m_expandedSize=size;
+ updateState();
+}
+
+void KMultiTabBarTab::showActiveTabText(bool show)
+{
+ m_showActiveTabText=show;
+}
+
+void KMultiTabBarTab::drawButtonLabel(QPainter *p) {
+ drawButton(p);
+}
+void KMultiTabBarTab::drawButton(QPainter *paint)
+{
+ if (m_style!=KMultiTabBar::KONQSBC) drawButtonStyled(paint);
+ else drawButtonClassic(paint);
+}
+
+void KMultiTabBarTab::drawButtonStyled(QPainter *paint) {
+
+ QSize sh;
+ const int width = 36; // rotated
+ const int height = 24;
+ if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
+ if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right))
+ sh=QSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
+ else sh=QSize(this->width(),this->height());
+ }
+ else
+ sh=QSize(width,height);
+
+ QPixmap pixmap( sh.width(),height); ///,sh.height());
+ pixmap.fill(eraseColor());
+ QPainter painter(&pixmap);
+
+
+ QStyle::SFlags st=QStyle::Style_Default;
+
+ st|=QStyle::Style_Enabled;
+
+ if (isOn()) st|=QStyle::Style_On;
+
+ style().drawControl(QStyle::CE_PushButton,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+ style().drawControl(QStyle::CE_PushButtonLabel,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+
+ switch (m_position) {
+ case KMultiTabBar::Left:
+ paint->rotate(-90);
+ paint->drawPixmap(1-pixmap.width(),0,pixmap);
+ break;
+ case KMultiTabBar::Right:
+ paint->rotate(90);
+ paint->drawPixmap(0,1-pixmap.height(),pixmap);
+ break;
+
+ default:
+ paint->drawPixmap(0,0,pixmap);
+ break;
+ }
+// style().drawControl(QStyle::CE_PushButtonLabel,painter,this, QRect(0,0,pixmap.width(),pixmap.height()),
+// colorGroup(),QStyle::Style_Enabled);
+
+
+}
+
+void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
+{
+ QPixmap pixmap;
+ if ( iconSet())
+ pixmap = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal );
+ paint->fillRect(0, 0, 24, 24, colorGroup().background());
+
+ if (!isOn())
+ {
+
+ if (m_position==KMultiTabBar::Right)
+ {
+ paint->fillRect(0,0,21,21,QBrush(colorGroup().background()));
+
+ paint->setPen(colorGroup().background().dark(150));
+ paint->drawLine(0,22,23,22);
+
+ paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
+
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,0,0,23);
+ paint->setPen(colorGroup().background().dark(120));
+ paint->drawLine(1,0,1,23);
+
+ }
+ else
+ if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top))
+ {
+ paint->fillRect(0,1,23,22,QBrush(colorGroup().background()));
+
+ paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
+
+ paint->setPen(colorGroup().background().dark(120));
+ paint->drawLine(23,0,23,23);
+
+
+ paint->setPen(colorGroup().light());
+ paint->drawLine(0,22,23,22);
+ paint->drawLine(0,23,23,23);
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,0,23,0);
+ paint->setPen(colorGroup().background().dark(120));
+ paint->drawLine(0,1,23,1);
+
+ }
+ else
+ {
+ paint->setPen(colorGroup().background().dark(120));
+ paint->drawLine(0,23,23,23);
+ paint->fillRect(0,0,23,21,QBrush(colorGroup().background()));
+ paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
+
+ paint->setPen(colorGroup().light());
+ paint->drawLine(23,0,23,23);
+ paint->drawLine(22,0,22,23);
+
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,0,0,23);
+
+ }
+
+
+ }
+ else
+ {
+ if (m_position==KMultiTabBar::Right)
+ {
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,height()-1,23,height()-1);
+ paint->drawLine(0,height()-2,23,height()-2);
+ paint->drawLine(23,0,23,height()-1);
+ paint->drawLine(22,0,22,height()-1);
+ paint->fillRect(0,0,21,height()-3,QBrush(colorGroup().light()));
+ paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
+
+ if (m_showActiveTabText)
+ {
+ if (height()<25+4) return;
+
+ QPixmap tpixmap(height()-25-3, width()-2);
+ QPainter painter(&tpixmap);
+
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light()));
+
+ painter.setPen(colorGroup().text());
+ painter.drawText(0,+width()/2+QFontMetrics(QFont()).height()/2,m_text);
+
+ paint->rotate(90);
+ kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl;
+ paint->drawPixmap(25,-tpixmap.height()+1,tpixmap);
+ }
+
+ }
+ else
+ if (m_position==KMultiTabBar::Top)
+ {
+ paint->fillRect(0,0,width()-1,23,QBrush(colorGroup().light()));
+ paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
+ if (m_showActiveTabText)
+ {
+ paint->setPen(colorGroup().text());
+ paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text);
+ }
+ }
+ else
+ if (m_position==KMultiTabBar::Bottom)
+ {
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,23,width()-1,23);
+ paint->drawLine(0,22,width()-1,22);
+ paint->fillRect(0,0,width()-1,21,QBrush(colorGroup().light()));
+ paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
+ if (m_showActiveTabText)
+ {
+ paint->setPen(colorGroup().text());
+ paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text);
+ }
+
+ }
+ else
+ {
+
+
+ paint->setPen(colorGroup().shadow());
+ paint->drawLine(0,height()-1,23,height()-1);
+ paint->drawLine(0,height()-2,23,height()-2);
+ paint->fillRect(0,0,23,height()-3,QBrush(colorGroup().light()));
+ paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
+ if (m_showActiveTabText)
+ {
+
+ if (height()<25+4) return;
+
+ QPixmap tpixmap(height()-25-3, width()-2);
+ QPainter painter(&tpixmap);
+
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light()));
+
+ painter.setPen(colorGroup().text());
+ painter.drawText(tpixmap.width()-QFontMetrics(QFont()).width(m_text),+width()/2+QFontMetrics(QFont()).height()/2,m_text);
+
+ paint->rotate(-90);
+ kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl;
+
+ paint->drawPixmap(-24-tpixmap.width(),2,tpixmap);
+
+ }
+
+ }
+
+ }
+}
+
+
+
+
+
+
+
+KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name):QWidget(parent,name)
+{
+ m_buttons.setAutoDelete(false);
+ if (bm==Vertical)
+ {
+ m_l=new QVBoxLayout(this);
+ setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding, true);
+// setFixedWidth(24);
+ }
+ else
+ {
+ m_l=new QHBoxLayout(this);
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed, true);
+// setFixedHeight(24);
+ }
+ m_l->setMargin(0);
+ m_l->setAutoAdd(false);
+
+ m_internal=new KMultiTabBarInternal(this,bm);
+ setPosition((bm==KMultiTabBar::Vertical)?KMultiTabBar::Right:KMultiTabBar::Bottom);
+ setStyle(VSNET);
+ // setStyle(KDEV3);
+ //setStyle(KONQSBC);
+ m_l->insertWidget(0,m_internal);
+ m_l->insertWidget(0,m_btnTabSep=new QFrame(this));
+ m_btnTabSep->setFixedHeight(4);
+ m_btnTabSep->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ m_btnTabSep->setLineWidth(2);
+ m_btnTabSep->hide();
+
+ updateGeometry();
+}
+
+KMultiTabBar::~KMultiTabBar() {
+}
+
+/*int KMultiTabBar::insertButton(QPixmap pic,int id ,const QString&)
+{
+ (new KToolbarButton(pic,id,m_internal))->show();
+ return 0;
+}*/
+
+int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,const QString&)
+{
+ KMultiTabBarButton *btn;
+ m_buttons.append(btn= new KMultiTabBarButton(pic,QString::null,
+ popup,id,this,m_position,m_internal->m_style));
+ m_l->insertWidget(0,btn);
+ btn->show();
+ m_btnTabSep->show();
+ return 0;
+}
+
+void KMultiTabBar::updateSeparator() {
+ bool hideSep=true;
+ for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ if (it.current()->isVisibleTo(this)) {
+ hideSep=false;
+ break;
+ }
+ }
+ if (hideSep) m_btnTabSep->hide();
+ else m_btnTabSep->show();
+
+}
+
+int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text)
+{
+ m_internal->appendTab(pic,id,text);
+ return 0;
+}
+
+KMultiTabBarButton* KMultiTabBar::button(int id) const
+{
+ for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ if (it.current()->id()==id) return it.current();
+ }
+ return 0;
+}
+
+KMultiTabBarTab* KMultiTabBar::tab(int id) const
+{
+ return m_internal->tab(id);
+}
+
+
+
+void KMultiTabBar::removeButton(int id)
+{
+ for (uint pos=0;pos<m_buttons.count();pos++)
+ {
+ if (m_buttons.at(pos)->id()==id)
+ {
+ m_buttons.take(pos)->deleteLater();
+ break;
+ }
+ }
+ if (m_buttons.count()==0) m_btnTabSep->hide();
+}
+
+void KMultiTabBar::removeTab(int id)
+{
+ m_internal->removeTab(id);
+}
+
+void KMultiTabBar::setTab(int id,bool state)
+{
+ KMultiTabBarTab *ttab=tab(id);
+ if (ttab)
+ {
+ ttab->setState(state);
+ }
+}
+
+bool KMultiTabBar::isTabRaised(int id) const
+{
+ KMultiTabBarTab *ttab=tab(id);
+ if (ttab)
+ {
+ return ttab->isOn();
+ }
+
+ return false;
+}
+
+
+void KMultiTabBar::showActiveTabTexts(bool show)
+{
+ m_internal->showActiveTabTexts(show);
+}
+
+void KMultiTabBar::setStyle(KMultiTabBarStyle style)
+{
+ m_internal->setStyle(style);
+}
+
+void KMultiTabBar::setPosition(KMultiTabBarPosition pos)
+{
+ m_position=pos;
+ m_internal->setPosition(pos);
+ for (uint i=0;i<m_buttons.count();i++)
+ m_buttons.at(i)->setPosition(pos);
+}
+void KMultiTabBar::fontChange(const QFont& /* oldFont */)
+{
+ for (uint i=0;i<tabs()->count();i++)
+ tabs()->at(i)->resize();
+ repaint();
+}
+
+QPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
+QPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;}
+
diff --git a/lib/compatibility/kmdi/qextmdi/kmultitabbar.h b/lib/compatibility/kmdi/qextmdi/kmultitabbar.h
new file mode 100644
index 00000000..0d1a6841
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar.h
@@ -0,0 +1,246 @@
+/***************************************************************************
+ kmultitabbar.h - description
+ -------------------
+ begin : 2001
+ copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@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.
+ ***************************************************************************/
+
+#ifndef _KMultitabbar_h_
+#define _KMultitabbar_h_
+
+#include <qscrollview.h>
+#include <qvbox.h>
+#include <qhbox.h>
+#include <qlayout.h>
+#include <qstring.h>
+#include <qptrlist.h>
+#include <qpushbutton.h>
+
+#include <kdelibs_export.h>
+
+class QPixmap;
+class QPainter;
+class QFrame;
+
+class KMultiTabBarPrivate;
+class KMultiTabBarTabPrivate;
+class KMultiTabBarButtonPrivate;
+class KMultiTabBarInternal;
+
+/**
+ * A Widget for horizontal and vertical tabs.
+ * It is possible to add normal buttons to the top/left
+ * The handling if only one tab at a time or multiple tabs
+ * should be raisable is left to the "user".
+ *@author Joseph Wenninger
+ */
+class KUTILS_EXPORT KMultiTabBar: public QWidget
+{
+ Q_OBJECT
+public:
+ enum KMultiTabBarMode{Horizontal, Vertical};
+ enum KMultiTabBarPosition{Left, Right, Top, Bottom};
+
+ /**
+ * VSNET == Visual Studio .Net like (only show the text of active tabs
+ * KDEV3 == Kdevelop 3 like (always show the text)
+ * KONQSBC == konqy's classic sidebar style (unthemed), this one is disabled
+ * at the moment, but will be renabled soon too
+ */
+ enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONQSBC=2, KDEV3ICON=3,STYLELAST=0xffff};
+
+ KMultiTabBar(KMultiTabBarMode bm,QWidget *parent=0,const char *name=0);
+ virtual ~KMultiTabBar();
+
+ /**
+ * append a new button to the button area. The button can later on be accessed with button(ID)
+ * eg for connecting signals to it
+ * @param pic a pixmap for the button
+ * @param id an arbitraty ID value. It will be emitted in the clicked signal for identifying the button
+ * if more than one button is connected to a signals.
+ * @param popup A popup menu which should be displayed if the button is clicked
+ * @param not_used_yet will be used for a popup text in the future
+ */
+ int appendButton(const QPixmap &pic,int id=-1,QPopupMenu* popup=0,const QString& not_used_yet=QString::null);
+ /**
+ * remove a button with the given ID
+ */
+ void removeButton(int id);
+ /**
+ * append a new tab to the tab area. It can be accessed lateron with tabb(id);
+ * @param pic a bitmap for the tab
+ * @param id an arbitrary ID which can be used later on to identify the tab
+ * @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
+ */
+ int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null);
+ /**
+ * remove a tab with a given ID
+ */
+ void removeTab(int id);
+ /**
+ * set a tab to "raised"
+ * @param id The ID of the tab to manipulate
+ * @param state true == activated/raised, false == not active
+ */
+ void setTab(int id ,bool state);
+ /**
+ * return the state of a tab, identified by it's ID
+ */
+ bool isTabRaised(int id) const;
+ /**
+ * get a pointer to a button within the button area identified by its ID
+ */
+ class KMultiTabBarButton *button(int id) const;
+
+ /**
+ * get a pointer to a tab within the tab area, identiifed by its ID
+ */
+ class KMultiTabBarTab *tab(int id) const;
+ /**
+ * set the real position of the widget.
+ * @param pos if the mode is horizontal, only use top, bottom, if it is vertical use left or right
+ */
+ void setPosition(KMultiTabBarPosition pos);
+ /**
+ * set the display style of the tabs
+ */
+ void setStyle(KMultiTabBarStyle style);
+ /**
+ * be carefull, don't delete tabs yourself and don't delete the list itself
+ */
+ QPtrList<KMultiTabBarTab>* tabs();
+ /**
+ * be carefull, don't delete buttons yourself and don't delete the list itself
+ */
+ QPtrList<KMultiTabBarButton>* buttons();
+
+ /**
+ * might vanish, not sure yet
+ */
+ void showActiveTabTexts(bool show=true);
+protected:
+ friend class KMultiTabBarButton;
+ virtual void fontChange( const QFont& );
+ void updateSeparator();
+private:
+ class KMultiTabBarInternal *m_internal;
+ QBoxLayout *m_l;
+ QFrame *m_btnTabSep;
+ QPtrList<KMultiTabBarButton> m_buttons;
+ KMultiTabBarPosition m_position;
+ KMultiTabBarPrivate *d;
+};
+
+/**
+ * This class should never be created except with the appendButton call of KMultiTabBar
+ */
+class KUTILS_EXPORT KMultiTabBarButton: public QPushButton
+{
+ Q_OBJECT
+public:
+ KMultiTabBarButton(const QPixmap& pic,const QString&, QPopupMenu *popup,
+ int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
+ KMultiTabBarButton(const QString&, QPopupMenu *popup,
+ int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
+ virtual ~KMultiTabBarButton();
+ int id() const;
+
+public slots:
+ /**
+ * this is used internaly, but can be used by the user, if (s)he wants to
+ * It the according call of KMultiTabBar is invoked though this modifications will be overwritten
+ */
+ void setPosition(KMultiTabBar::KMultiTabBarPosition);
+ /**
+ * this is used internaly, but can be used by the user, if (s)he wants to
+ * It the according call of KMultiTabBar is invoked though this modifications will be overwritten
+ */
+ void setStyle(KMultiTabBar::KMultiTabBarStyle);
+
+ /**
+ * modify the text of the button
+ */
+ void setText(const QString &);
+
+ QSize sizeHint() const;
+
+protected:
+ KMultiTabBar::KMultiTabBarPosition m_position;
+ KMultiTabBar::KMultiTabBarStyle m_style;
+ QString m_text;
+ virtual void hideEvent( class QHideEvent*);
+ virtual void showEvent( class QShowEvent*);
+private:
+ int m_id;
+ KMultiTabBarButtonPrivate *d;
+signals:
+ /**
+ * this is emitted if the button is clicked
+ * @param id the ID identifying the button
+ */
+ void clicked(int id);
+protected slots:
+ virtual void slotClicked();
+};
+
+/**
+ * This class should never be created except with the appendTab call of KMultiTabBar
+ */
+class KUTILS_EXPORT KMultiTabBarTab: public KMultiTabBarButton
+{
+ Q_OBJECT
+public:
+ KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent,
+ KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style);
+ virtual ~KMultiTabBarTab();
+ /**
+ * set the active state of the tab
+ * @param state true==active false==not active
+ */
+ void setState(bool state);
+ /**
+ * choose if the text should always be displayed
+ * this is only used in classic mode if at all
+ */
+ void showActiveTabText(bool show);
+ void resize(){ setSize( neededSize() ); }
+private:
+ bool m_showActiveTabText;
+ int m_expandedSize;
+ KMultiTabBarTabPrivate *d;
+protected:
+ friend class KMultiTabBarInternal;
+ void setSize(int);
+ int neededSize();
+ void updateState();
+ virtual void drawButton(QPainter *);
+ virtual void drawButtonLabel(QPainter *);
+ void drawButtonStyled(QPainter *);
+ void drawButtonClassic(QPainter *);
+protected slots:
+ virtual void slotClicked();
+ void setTabsPosition(KMultiTabBar::KMultiTabBarPosition);
+
+public slots:
+ virtual void setIcon(const QString&);
+ virtual void setIcon(const QPixmap&);
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h b/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h
new file mode 100644
index 00000000..f47cc538
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h
@@ -0,0 +1,67 @@
+/***************************************************************************
+ kmultitabbar_p.h - description
+ -------------------
+ begin : 2003
+ copyright : (C) 2003 by Joseph Wenninger <jowenn@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.
+ ***************************************************************************/
+
+#ifndef K_MULTI_TAB_BAR_P_H
+#define K_MULTI_TAB_BAR_P_H
+#include <qscrollview.h>
+#include <kmultitabbar.h>
+
+class KMultiTabBarInternal: public QScrollView
+{
+ Q_OBJECT
+public:
+ KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
+ int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
+ KMultiTabBarTab *tab(int) const;
+ void removeTab(int);
+ void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
+ void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
+ void showActiveTabTexts(bool show);
+ QPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;}
+private:
+ friend class KMultiTabBar;
+ QWidget *box;
+ QBoxLayout *mainLayout;
+ QPtrList<KMultiTabBarTab> m_tabs;
+ enum KMultiTabBar::KMultiTabBarPosition m_position;
+ bool m_showActiveTabTexts;
+ enum KMultiTabBar::KMultiTabBarStyle m_style;
+ int m_expandedTabSize;
+ int m_lines;
+ KMultiTabBar::KMultiTabBarMode m_barMode;
+protected:
+ virtual bool eventFilter(QObject *,QEvent*);
+ virtual void drawContents ( QPainter *, int, int, int, int);
+
+ /**
+ * [contentsM|m]ousePressEvent are reimplemented from QScrollView
+ * in order to ignore all mouseEvents on the viewport, so that the
+ * parent can handle them.
+ */
+ virtual void contentsMousePressEvent(QMouseEvent *);
+ virtual void mousePressEvent(QMouseEvent *);
+ virtual void resizeEvent(QResizeEvent *);
+};
+#endif
+
diff --git a/lib/compatibility/kmdi/qextmdi/ktabbar.cpp b/lib/compatibility/kmdi/qextmdi/ktabbar.cpp
new file mode 100644
index 00000000..d8ee58cd
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/ktabbar.cpp
@@ -0,0 +1,426 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2003 Stephan Binner <binner@kde.org>
+ Copyright (C) 2003 Zack Rusin <zack@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.
+*/
+
+#include <qapplication.h>
+#include <qcursor.h>
+#include <qpainter.h>
+#include <qstyle.h>
+#include <qtimer.h>
+#include <qpushbutton.h>
+#include <qtooltip.h>
+
+#include <kglobalsettings.h>
+#include <kiconloader.h>
+#include <klocale.h>
+
+#include "ktabbar.h"
+#include "ktabwidget.h"
+
+KTabBar::KTabBar( QWidget *parent, const char *name )
+ : QTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ),
+ mHoverCloseButtonTab( 0 ), mDragSwitchTab( 0 ), mHoverCloseButton( 0 ),
+ mHoverCloseButtonEnabled( false ), mHoverCloseButtonDelayed( true ),
+ mTabReorderingEnabled( false ), mTabCloseActivatePrevious( false )
+{
+ setAcceptDrops( true );
+ setMouseTracking( true );
+
+ mEnableCloseButtonTimer = new QTimer( this );
+ connect( mEnableCloseButtonTimer, SIGNAL( timeout() ), SLOT( enableCloseButton() ) );
+
+ mActivateDragSwitchTabTimer = new QTimer( this );
+ connect( mActivateDragSwitchTabTimer, SIGNAL( timeout() ), SLOT( activateDragSwitchTab() ) );
+
+ connect(this, SIGNAL(layoutChanged()), SLOT(onLayoutChange()));
+}
+
+KTabBar::~KTabBar()
+{
+ //For the future
+ //delete d;
+}
+
+void KTabBar::setTabEnabled( int id, bool enabled )
+{
+ QTab * t = tab( id );
+ if ( t ) {
+ if ( t->isEnabled() != enabled ) {
+ t->setEnabled( enabled );
+ QRect r( t->rect() );
+ if ( !enabled && id == currentTab() && count()>1 ) {
+ QPtrList<QTab> *tablist = tabList();
+ if ( mTabCloseActivatePrevious )
+ t = tablist->at( count()-2 );
+ else {
+ int index = indexOf( id );
+ index += ( index+1 == count() ) ? -1 : 1;
+ t = tabAt( index );
+ }
+
+ if ( t->isEnabled() ) {
+ r = r.unite( t->rect() );
+ tablist->append( tablist->take( tablist->findRef( t ) ) );
+ emit selected( t->identifier() );
+ }
+ }
+ repaint( r );
+ }
+ }
+}
+
+void KTabBar::mouseDoubleClickEvent( QMouseEvent *e )
+{
+ if( e->button() != LeftButton )
+ return;
+
+ QTab *tab = selectTab( e->pos() );
+ if( tab ) {
+ emit( mouseDoubleClick( indexOf( tab->identifier() ) ) );
+ return;
+ }
+ QTabBar::mouseDoubleClickEvent( e );
+}
+
+void KTabBar::mousePressEvent( QMouseEvent *e )
+{
+ if( e->button() == LeftButton ) {
+ mEnableCloseButtonTimer->stop();
+ mDragStart = e->pos();
+ }
+ else if( e->button() == RightButton ) {
+ QTab *tab = selectTab( e->pos() );
+ if( tab ) {
+ emit( contextMenu( indexOf( tab->identifier() ), mapToGlobal( e->pos() ) ) );
+ return;
+ }
+ }
+ QTabBar::mousePressEvent( e );
+}
+
+void KTabBar::mouseMoveEvent( QMouseEvent *e )
+{
+ if ( e->state() == LeftButton ) {
+ QTab *tab = selectTab( e->pos() );
+ if ( mDragSwitchTab && tab != mDragSwitchTab ) {
+ mActivateDragSwitchTabTimer->stop();
+ mDragSwitchTab = 0;
+ }
+
+ int delay = KGlobalSettings::dndEventDelay();
+ QPoint newPos = e->pos();
+ if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay ||
+ newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay )
+ {
+ if( tab ) {
+ emit( initiateDrag( indexOf( tab->identifier() ) ) );
+ return;
+ }
+ }
+ }
+ else if ( e->state() == MidButton ) {
+ if (mReorderStartTab==-1) {
+ int delay = KGlobalSettings::dndEventDelay();
+ QPoint newPos = e->pos();
+ if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay ||
+ newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay )
+ {
+ QTab *tab = selectTab( e->pos() );
+ if( tab && mTabReorderingEnabled ) {
+ mReorderStartTab = indexOf( tab->identifier() );
+ grabMouse( sizeAllCursor );
+ return;
+ }
+ }
+ }
+ else {
+ QTab *tab = selectTab( e->pos() );
+ if( tab ) {
+ int reorderStopTab = indexOf( tab->identifier() );
+ if ( mReorderStartTab!=reorderStopTab && mReorderPreviousTab!=reorderStopTab ) {
+ emit( moveTab( mReorderStartTab, reorderStopTab ) );
+ mReorderPreviousTab=mReorderStartTab;
+ mReorderStartTab=reorderStopTab;
+ return;
+ }
+ }
+ }
+ }
+
+ if ( mHoverCloseButtonEnabled && mReorderStartTab==-1) {
+ QTab *t = selectTab( e->pos() );
+ if( t && t->iconSet() && t->isEnabled() ) {
+ QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal );
+ QRect rect( 0, 0, pixmap.width() + 4, pixmap.height() +4);
+
+ int xoff = 0, yoff = 0;
+ // The additional offsets were found by try and error, TODO: find the rational behind them
+ if ( t == tab( currentTab() ) ) {
+ xoff = style().pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, this ) + 3;
+ yoff = style().pixelMetric( QStyle::PM_TabBarTabShiftVertical, this ) - 4;
+ }
+ else {
+ xoff = 7;
+ yoff = 0;
+ }
+ rect.moveLeft( t->rect().left() + 2 + xoff );
+ rect.moveTop( t->rect().center().y()-pixmap.height()/2 + yoff );
+ if ( rect.contains( e->pos() ) ) {
+ if ( mHoverCloseButton ) {
+ if ( mHoverCloseButtonTab == t )
+ return;
+ mEnableCloseButtonTimer->stop();
+ delete mHoverCloseButton;
+ }
+
+ mHoverCloseButton = new QPushButton( this );
+ mHoverCloseButton->setIconSet( KGlobal::iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, KIcon::SizeSmall) );
+ mHoverCloseButton->setGeometry( rect );
+ QToolTip::add(mHoverCloseButton,i18n("Close this tab"));
+ mHoverCloseButton->setFlat(true);
+ mHoverCloseButton->show();
+ if ( mHoverCloseButtonDelayed ) {
+ mHoverCloseButton->setEnabled(false);
+ mEnableCloseButtonTimer->start( QApplication::doubleClickInterval(), true );
+ }
+ mHoverCloseButtonTab = t;
+ connect( mHoverCloseButton, SIGNAL( clicked() ), SLOT( closeButtonClicked() ) );
+ return;
+ }
+ }
+ if ( mHoverCloseButton ) {
+ mEnableCloseButtonTimer->stop();
+ delete mHoverCloseButton;
+ mHoverCloseButton = 0;
+ }
+ }
+
+ QTabBar::mouseMoveEvent( e );
+}
+
+void KTabBar::enableCloseButton()
+{
+ mHoverCloseButton->setEnabled(true);
+}
+
+void KTabBar::activateDragSwitchTab()
+{
+ QTab *tab = selectTab( mapFromGlobal( QCursor::pos() ) );
+ if ( tab && mDragSwitchTab == tab )
+ setCurrentTab( mDragSwitchTab );
+ mDragSwitchTab = 0;
+}
+
+void KTabBar::mouseReleaseEvent( QMouseEvent *e )
+{
+ if( e->button() == MidButton ) {
+ if ( mReorderStartTab==-1 ) {
+ QTab *tab = selectTab( e->pos() );
+ if( tab ) {
+ emit( mouseMiddleClick( indexOf( tab->identifier() ) ) );
+ return;
+ }
+ }
+ else {
+ releaseMouse();
+ setCursor( arrowCursor );
+ mReorderStartTab=-1;
+ mReorderPreviousTab=-1;
+ }
+ }
+ QTabBar::mouseReleaseEvent( e );
+}
+
+void KTabBar::dragMoveEvent( QDragMoveEvent *e )
+{
+ QTab *tab = selectTab( e->pos() );
+ if( tab ) {
+ bool accept = false;
+ // The receivers of the testCanDecode() signal has to adjust
+ // 'accept' accordingly.
+ emit testCanDecode( e, accept);
+ if ( accept && tab != QTabBar::tab( currentTab() ) ) {
+ mDragSwitchTab = tab;
+ mActivateDragSwitchTabTimer->start( QApplication::doubleClickInterval()*2, true );
+ }
+ e->accept( accept );
+ return;
+ }
+ e->accept( false );
+ QTabBar::dragMoveEvent( e );
+}
+
+void KTabBar::dropEvent( QDropEvent *e )
+{
+ QTab *tab = selectTab( e->pos() );
+ if( tab ) {
+ mActivateDragSwitchTabTimer->stop();
+ mDragSwitchTab = 0;
+ emit( receivedDropEvent( indexOf( tab->identifier() ) , e ) );
+ return;
+ }
+ QTabBar::dropEvent( e );
+}
+
+#ifndef QT_NO_WHEELEVENT
+void KTabBar::wheelEvent( QWheelEvent *e )
+{
+ if ( e->orientation() == Horizontal )
+ return;
+
+ emit( wheelDelta( e->delta() ) );
+}
+#endif
+
+void KTabBar::setTabColor( int id, const QColor& color )
+{
+ QTab *t = tab( id );
+ if ( t ) {
+ mTabColors.insert( id, color );
+ repaint( t->rect(), false );
+ }
+}
+
+const QColor &KTabBar::tabColor( int id ) const
+{
+ if ( mTabColors.contains( id ) )
+ return mTabColors[id];
+
+ return colorGroup().foreground();
+}
+
+int KTabBar::insertTab( QTab *t, int index )
+{
+ int res = QTabBar::insertTab( t, index );
+
+ if ( mTabCloseActivatePrevious && count() > 2 ) {
+ QPtrList<QTab> *tablist = tabList();
+ tablist->insert( count()-2, tablist->take( tablist->findRef( t ) ) );
+ }
+
+ return res;
+}
+
+void KTabBar::removeTab( QTab *t )
+{
+ mTabColors.remove( t->identifier() );
+ QTabBar::removeTab( t );
+}
+
+void KTabBar::paintLabel( QPainter *p, const QRect& br,
+ QTab *t, bool has_focus ) const
+{
+ QRect r = br;
+ bool selected = currentTab() == t->identifier();
+ if ( t->iconSet() ) {
+ // the tab has an iconset, draw it in the right mode
+ QIconSet::Mode mode = ( t->isEnabled() && isEnabled() )
+ ? QIconSet::Normal : QIconSet::Disabled;
+ if ( mode == QIconSet::Normal && has_focus )
+ mode = QIconSet::Active;
+ QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode );
+ int pixw = pixmap.width();
+ int pixh = pixmap.height();
+ r.setLeft( r.left() + pixw + 4 );
+ r.setRight( r.right() + 2 );
+
+ int inactiveXShift = style().pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, this );
+ int inactiveYShift = style().pixelMetric( QStyle::PM_TabBarTabShiftVertical, this );
+
+ int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2;
+
+ p->drawPixmap( right + (selected ? 0 : inactiveXShift),
+ br.center().y() - pixh / 2 + (selected ? 0 : inactiveYShift),
+ pixmap );
+ }
+
+ QStyle::SFlags flags = QStyle::Style_Default;
+
+ if ( isEnabled() && t->isEnabled() )
+ flags |= QStyle::Style_Enabled;
+ if ( has_focus )
+ flags |= QStyle::Style_HasFocus;
+
+ QColorGroup cg( colorGroup() );
+ if ( mTabColors.contains( t->identifier() ) )
+ cg.setColor( QColorGroup::Foreground, mTabColors[t->identifier()] );
+
+ style().drawControl( QStyle::CE_TabBarLabel, p, this, r,
+ t->isEnabled() ? cg : palette().disabled(),
+ flags, QStyleOption(t) );
+}
+
+bool KTabBar::isTabReorderingEnabled() const
+{
+ return mTabReorderingEnabled;
+}
+
+void KTabBar::setTabReorderingEnabled( bool on )
+{
+ mTabReorderingEnabled = on;
+}
+
+bool KTabBar::tabCloseActivatePrevious() const
+{
+ return mTabCloseActivatePrevious;
+}
+
+void KTabBar::setTabCloseActivatePrevious( bool on )
+{
+ mTabCloseActivatePrevious = on;
+}
+
+void KTabBar::closeButtonClicked()
+{
+ emit closeRequest( indexOf( mHoverCloseButtonTab->identifier() ) );
+}
+
+void KTabBar::setHoverCloseButton( bool button )
+{
+ mHoverCloseButtonEnabled = button;
+ if ( !button )
+ onLayoutChange();
+}
+
+bool KTabBar::hoverCloseButton() const
+{
+ return mHoverCloseButtonEnabled;
+}
+
+void KTabBar::setHoverCloseButtonDelayed( bool delayed )
+{
+ mHoverCloseButtonDelayed = delayed;
+}
+
+bool KTabBar::hoverCloseButtonDelayed() const
+{
+ return mHoverCloseButtonDelayed;
+}
+
+void KTabBar::onLayoutChange()
+{
+ mEnableCloseButtonTimer->stop();
+ delete mHoverCloseButton;
+ mHoverCloseButton = 0;
+ mHoverCloseButtonTab = 0;
+ mActivateDragSwitchTabTimer->stop();
+ mDragSwitchTab = 0;
+}
+
+#include "ktabbar.moc"
diff --git a/lib/compatibility/kmdi/qextmdi/ktabbar.h b/lib/compatibility/kmdi/qextmdi/ktabbar.h
new file mode 100644
index 00000000..2ea300db
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/ktabbar.h
@@ -0,0 +1,113 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2003 Stephan Binner <binner@kde.org>
+ Copyright (C) 2003 Zack Rusin <zack@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.
+*/
+
+#ifndef KTABBAR_H
+#define KTABBAR_H
+
+#include <qtabbar.h>
+
+#include <kdelibs_export.h>
+
+class QTimer;
+class QPushButton;
+class KTabBarPrivate;
+
+/**
+ * @since 3.2
+ */
+class KDEUI_EXPORT KTabBar: public QTabBar
+{
+ Q_OBJECT
+
+public:
+ KTabBar( QWidget* parent=0, const char* name=0 );
+ virtual ~KTabBar();
+
+ virtual void setTabEnabled( int, bool );
+
+ const QColor &tabColor( int ) const;
+ void setTabColor( int, const QColor& );
+
+ virtual int insertTab( QTab *, int index = -1 );
+ virtual void removeTab( QTab * );
+
+ void setTabReorderingEnabled( bool enable );
+ bool isTabReorderingEnabled() const;
+
+ void setHoverCloseButton( bool );
+ bool hoverCloseButton() const;
+
+ void setHoverCloseButtonDelayed( bool );
+ bool hoverCloseButtonDelayed() const;
+
+ void setTabCloseActivatePrevious( bool );
+ bool tabCloseActivatePrevious() const;
+
+signals:
+ void contextMenu( int, const QPoint & );
+ void mouseDoubleClick( int );
+ void mouseMiddleClick( int );
+ void initiateDrag( int );
+ void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
+ void receivedDropEvent( int, QDropEvent * );
+ void moveTab( int, int );
+ void closeRequest( int );
+#ifndef QT_NO_WHEELEVENT
+ void wheelDelta( int );
+#endif
+
+protected:
+ virtual void mouseDoubleClickEvent( QMouseEvent *e );
+ virtual void mousePressEvent( QMouseEvent *e );
+ virtual void mouseMoveEvent( QMouseEvent *e );
+ virtual void mouseReleaseEvent( QMouseEvent *e );
+#ifndef QT_NO_WHEELEVENT
+ virtual void wheelEvent( QWheelEvent *e );
+#endif
+
+ virtual void dragMoveEvent( QDragMoveEvent *e );
+ virtual void dropEvent( QDropEvent *e );
+
+ virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const;
+
+protected slots:
+ virtual void closeButtonClicked();
+ virtual void onLayoutChange();
+ virtual void enableCloseButton();
+ virtual void activateDragSwitchTab();
+
+private:
+ QPoint mDragStart;
+ int mReorderStartTab;
+ int mReorderPreviousTab;
+ QMap<int, QColor> mTabColors;
+ QTab *mHoverCloseButtonTab, *mDragSwitchTab;
+ QPushButton *mHoverCloseButton;
+ QTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
+
+ bool mHoverCloseButtonEnabled;
+ bool mHoverCloseButtonDelayed;
+ bool mTabReorderingEnabled;
+ bool mTabCloseActivatePrevious;
+
+ KTabBarPrivate * d;
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
new file mode 100644
index 00000000..af73e013
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
@@ -0,0 +1,523 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2003 Stephan Binner <binner@kde.org>
+ Copyright (C) 2003 Zack Rusin <zack@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.
+*/
+
+#include <qapplication.h>
+#include <qstyle.h>
+
+#include <kconfig.h>
+#include <kiconloader.h>
+#include <kstringhandler.h>
+
+#include "ktabwidget.h"
+#include "ktabbar.h"
+
+class KTabWidgetPrivate {
+public:
+ bool m_automaticResizeTabs;
+ int m_maxLength;
+ int m_minLength;
+ unsigned int m_CurrentMaxLength;
+
+ //holds the full names of the tab, otherwise all we
+ //know about is the shortened name
+ QStringList m_tabNames;
+
+ KTabWidgetPrivate() {
+ m_automaticResizeTabs = false;
+ KConfigGroupSaver groupsaver(KGlobal::config(), "General");
+ m_maxLength = KGlobal::config()->readNumEntry("MaximumTabLength", 30);
+ m_minLength = KGlobal::config()->readNumEntry("MinimumTabLength", 3);
+ m_CurrentMaxLength = m_minLength;
+ }
+};
+
+KTabWidget::KTabWidget( QWidget *parent, const char *name, WFlags f )
+ : QTabWidget( parent, name, f )
+{
+ d = new KTabWidgetPrivate;
+ setTabBar( new KTabBar(this, "tabbar") );
+ setAcceptDrops( true );
+
+ connect(tabBar(), SIGNAL(contextMenu( int, const QPoint & )), SLOT(contextMenu( int, const QPoint & )));
+ connect(tabBar(), SIGNAL(mouseDoubleClick( int )), SLOT(mouseDoubleClick( int )));
+ connect(tabBar(), SIGNAL(mouseMiddleClick( int )), SLOT(mouseMiddleClick( int )));
+ connect(tabBar(), SIGNAL(initiateDrag( int )), SLOT(initiateDrag( int )));
+ connect(tabBar(), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )));
+ connect(tabBar(), SIGNAL(receivedDropEvent( int, QDropEvent * )), SLOT(receivedDropEvent( int, QDropEvent * )));
+ connect(tabBar(), SIGNAL(moveTab( int, int )), SLOT(moveTab( int, int )));
+ connect(tabBar(), SIGNAL(closeRequest( int )), SLOT(closeRequest( int )));
+#ifndef QT_NO_WHEELEVENT
+ connect(tabBar(), SIGNAL(wheelDelta( int )), SLOT(wheelDelta( int )));
+#endif
+}
+
+KTabWidget::~KTabWidget()
+{
+ delete d;
+}
+
+void KTabWidget::insertTab( QWidget *child, const QString &label, int index )
+{
+ QTabWidget::insertTab( child, label, index );
+}
+
+void KTabWidget::insertTab( QWidget *child, const QIconSet& iconset, const QString &label, int index )
+{
+ QTabWidget::insertTab( child, iconset, label, index );
+}
+
+void KTabWidget::insertTab( QWidget *child, QTab *tab, int index )
+{
+ QTabWidget::insertTab( child, tab, index);
+ if ( d->m_automaticResizeTabs ) {
+ if ( index < 0 || index >= count() ) {
+ d->m_tabNames.append( tab->text() );
+ resizeTabs( d->m_tabNames.count()-1 );
+ }
+ else {
+ d->m_tabNames.insert( d->m_tabNames.at( index ), tab->text() );
+ resizeTabs( index );
+ }
+ }
+}
+
+void KTabWidget::setTabBarHidden( bool hide )
+{
+ QWidget *rightcorner = this->cornerWidget( TopRight );
+ QWidget *leftcorner = this->cornerWidget( TopLeft );
+
+ if ( hide ) {
+ if ( leftcorner ) leftcorner->hide();
+ if ( rightcorner ) rightcorner->hide();
+ tabBar()->hide();
+ } else {
+ tabBar()->show();
+ if ( leftcorner ) leftcorner->show();
+ if ( rightcorner ) rightcorner->show();
+ }
+}
+
+bool KTabWidget::isTabBarHidden() const
+{
+ return !( tabBar()->isVisible() );
+}
+
+void KTabWidget::setTabColor( QWidget *w, const QColor& color )
+{
+ QTab *t = tabBar()->tabAt( indexOf( w ) );
+ if (t) {
+ static_cast<KTabBar*>(tabBar())->setTabColor( t->identifier(), color );
+ }
+}
+
+QColor KTabWidget::tabColor( QWidget *w ) const
+{
+ QTab *t = tabBar()->tabAt( indexOf( w ) );
+ if (t) {
+ return static_cast<KTabBar*>(tabBar())->tabColor( t->identifier() );
+ } else {
+ return QColor();
+ }
+}
+
+void KTabWidget::setTabReorderingEnabled( bool on)
+{
+ static_cast<KTabBar*>(tabBar())->setTabReorderingEnabled( on );
+}
+
+bool KTabWidget::isTabReorderingEnabled() const
+{
+ return static_cast<KTabBar*>(tabBar())->isTabReorderingEnabled();
+}
+
+void KTabWidget::setTabCloseActivatePrevious( bool previous)
+{
+ static_cast<KTabBar*>(tabBar())->setTabCloseActivatePrevious( previous );
+}
+
+bool KTabWidget::tabCloseActivatePrevious() const
+{
+ return static_cast<KTabBar*>(tabBar())->tabCloseActivatePrevious();
+}
+
+unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength )
+{
+ int hframe, overlap;
+ hframe = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabHSpace, tabBar() );
+ overlap = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabOverlap, tabBar() );
+
+ QFontMetrics fm = tabBar()->fontMetrics();
+ int x = 0;
+ for( int i=0; i < count(); ++i ) {
+ QString newTitle = d->m_tabNames[ i ];
+ newTitle = KStringHandler::rsqueeze( newTitle, maxLength ).leftJustify( d->m_minLength, ' ' );
+
+ QTab* tab = tabBar()->tabAt( i );
+ int lw = fm.width( newTitle );
+ int iw = 0;
+ if ( tab->iconSet() )
+ iw = tab->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4;
+ x += ( tabBar()->style().sizeFromContents( QStyle::CT_TabBarTab, this,
+ QSize( QMAX( lw + hframe + iw, QApplication::globalStrut().width() ), 0 ),
+ QStyleOption( tab ) ) ).width();
+ }
+ return x;
+}
+
+void KTabWidget::changeTab( QWidget *w, const QString &label )
+{
+ QTabWidget::changeTab( w, label );
+ if ( d->m_automaticResizeTabs ) {
+ int index = indexOf( w );
+ if ( index != -1 ) {
+ d->m_tabNames[ index ] = label;
+ resizeTabs( index );
+ }
+ }
+}
+
+void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString &label )
+{
+ QTabWidget::changeTab( w, iconset, label );
+ if ( d->m_automaticResizeTabs ) {
+ int index = indexOf( w );
+ if ( index != -1 ) {
+ d->m_tabNames[ index ] = label;
+ resizeTabs( index );
+ }
+ }
+}
+
+QString KTabWidget::label( int index ) const
+{
+ if ( d->m_automaticResizeTabs ) {
+ if ( index >= 0 && index < count() )
+ return d->m_tabNames[ index ];
+ else
+ return QString::null;
+ }
+ else
+ return QTabWidget::label( index );
+}
+
+QString KTabWidget::tabLabel( QWidget * w ) const
+{
+ if ( d->m_automaticResizeTabs ) {
+ int index = indexOf( w );
+ if ( index == -1 )
+ return QString::null;
+ else
+ return d->m_tabNames[ index ];
+ }
+ else
+ return QTabWidget::tabLabel( w );
+}
+
+void KTabWidget::setTabLabel( QWidget *w, const QString &l )
+{
+ QTabWidget::setTabLabel( w, l );
+ if ( d->m_automaticResizeTabs ) {
+ int index = indexOf( w );
+ if ( index != -1 ) {
+ d->m_tabNames[ index ] = l;
+ resizeTabs( index );
+ }
+ }
+}
+
+void KTabWidget::resizeTabs( int changeTabIndex )
+{
+ uint newMaxLength;
+ if ( d->m_automaticResizeTabs ) {
+ // Calculate new max length
+ newMaxLength=d->m_maxLength;
+ uint lcw=0, rcw=0;
+
+ int tabBarHeight = tabBar()->sizeHint().height();
+ if ( cornerWidget( TopLeft ) && cornerWidget( TopLeft )->isVisible() )
+ lcw = QMAX( cornerWidget( TopLeft )->width(), tabBarHeight );
+ if ( cornerWidget( TopRight ) && cornerWidget( TopRight )->isVisible() )
+ rcw = QMAX( cornerWidget( TopRight )->width(), tabBarHeight );
+
+ uint maxTabBarWidth = width() - lcw - rcw;
+
+ for ( ; newMaxLength > (uint)d->m_minLength; newMaxLength-- ) {
+ if ( tabBarWidthForMaxChars( newMaxLength ) < maxTabBarWidth )
+ break;
+ }
+ }
+ else
+ newMaxLength = 4711;
+
+ // Update hinted or all tabs
+ if ( d->m_CurrentMaxLength != newMaxLength ) {
+ d->m_CurrentMaxLength = newMaxLength;
+ for( int i = 0; i < count(); ++i )
+ updateTab( i );
+ }
+ else if ( changeTabIndex != -1 )
+ updateTab( changeTabIndex );
+}
+
+void KTabWidget::updateTab( int index )
+{
+ QString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : QTabWidget::label( index );
+ removeTabToolTip( page( index ) );
+ if ( title.length() > d->m_CurrentMaxLength )
+ setTabToolTip( page( index ), title );
+
+ title = KStringHandler::rsqueeze( title, d->m_CurrentMaxLength ).leftJustify( d->m_minLength, ' ' );
+ title.replace( '&', "&&" );
+
+ if ( QTabWidget::label( index ) != title )
+ QTabWidget::setTabLabel( page( index ), title );
+}
+
+void KTabWidget::dragMoveEvent( QDragMoveEvent *e )
+{
+ if ( isEmptyTabbarSpace( e->pos() ) ) {
+ bool accept = false;
+ // The receivers of the testCanDecode() signal has to adjust
+ // 'accept' accordingly.
+ emit testCanDecode( e, accept);
+ e->accept( accept );
+ return;
+ }
+ e->accept( false );
+ QTabWidget::dragMoveEvent( e );
+}
+
+void KTabWidget::dropEvent( QDropEvent *e )
+{
+ if ( isEmptyTabbarSpace( e->pos() ) ) {
+ emit ( receivedDropEvent( e ) );
+ return;
+ }
+ QTabWidget::dropEvent( e );
+}
+
+#ifndef QT_NO_WHEELEVENT
+void KTabWidget::wheelEvent( QWheelEvent *e )
+{
+ if ( e->orientation() == Horizontal )
+ return;
+
+ if ( isEmptyTabbarSpace( e->pos() ) )
+ wheelDelta( e->delta() );
+ else
+ e->ignore();
+}
+
+void KTabWidget::wheelDelta( int delta )
+{
+ if ( count() < 2 )
+ return;
+
+ int page = currentPageIndex();
+ if ( delta < 0 )
+ page = (page + 1) % count();
+ else {
+ page--;
+ if ( page < 0 )
+ page = count() - 1;
+ }
+ setCurrentPage( page );
+}
+#endif
+
+void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e )
+{
+ if( e->button() != LeftButton )
+ return;
+
+ if ( isEmptyTabbarSpace( e->pos() ) ) {
+ emit( mouseDoubleClick() );
+ return;
+ }
+ QTabWidget::mouseDoubleClickEvent( e );
+}
+
+void KTabWidget::mousePressEvent( QMouseEvent *e )
+{
+ if ( e->button() == RightButton ) {
+ if ( isEmptyTabbarSpace( e->pos() ) ) {
+ emit( contextMenu( mapToGlobal( e->pos() ) ) );
+ return;
+ }
+ } else if ( e->button() == MidButton ) {
+ if ( isEmptyTabbarSpace( e->pos() ) ) {
+ emit( mouseMiddleClick() );
+ return;
+ }
+ }
+ QTabWidget::mousePressEvent( e );
+}
+
+void KTabWidget::receivedDropEvent( int index, QDropEvent *e )
+{
+ emit( receivedDropEvent( page( index ), e ) );
+}
+
+void KTabWidget::initiateDrag( int index )
+{
+ emit( initiateDrag( page( index ) ) );
+}
+
+void KTabWidget::contextMenu( int index, const QPoint &p )
+{
+ emit( contextMenu( page( index ), p ) );
+}
+
+void KTabWidget::mouseDoubleClick( int index )
+{
+ emit( mouseDoubleClick( page( index ) ) );
+}
+
+void KTabWidget::mouseMiddleClick( int index )
+{
+ emit( mouseMiddleClick( page( index ) ) );
+}
+
+void KTabWidget::moveTab( int from, int to )
+{
+ QString tablabel = label( from );
+ QWidget *w = page( from );
+ QColor color = tabColor( w );
+ QIconSet tabiconset = tabIconSet( w );
+ QString tabtooltip = tabToolTip( w );
+ bool current = ( w == currentPage() );
+ bool enabled = isTabEnabled( w );
+ blockSignals(true);
+ removePage( w );
+
+ // Work-around kmdi brain damage which calls showPage() in insertTab()
+ QTab * t = new QTab();
+ t->setText(tablabel);
+ QTabWidget::insertTab( w, t, to );
+ if ( d->m_automaticResizeTabs ) {
+ if ( to < 0 || to >= count() )
+ d->m_tabNames.append( QString::null );
+ else
+ d->m_tabNames.insert( d->m_tabNames.at( to ), QString::null );
+ }
+
+ w = page( to );
+ changeTab( w, tabiconset, tablabel );
+ setTabToolTip( w, tabtooltip );
+ setTabColor( w, color );
+ if ( current )
+ showPage( w );
+ setTabEnabled( w, enabled );
+ blockSignals(false);
+
+ emit ( movedTab( from, to ) );
+}
+
+void KTabWidget::removePage( QWidget * w ) {
+ if ( d->m_automaticResizeTabs ) {
+ int index = indexOf( w );
+ if ( index != -1 )
+ d->m_tabNames.remove( d->m_tabNames.at( index ) );
+ }
+ QTabWidget::removePage( w );
+ if ( d->m_automaticResizeTabs )
+ resizeTabs();
+}
+
+
+bool KTabWidget::isEmptyTabbarSpace( const QPoint &p ) const
+{
+ QPoint point( p );
+ QSize size( tabBar()->sizeHint() );
+ if ( ( tabPosition()==Top && point.y()< size.height() ) || ( tabPosition()==Bottom && point.y()>(height()-size.height() ) ) ) {
+ QWidget *rightcorner = cornerWidget( TopRight );
+ if ( rightcorner ) {
+ if ( point.x()>=width()-rightcorner->width() )
+ return false;
+ }
+ QWidget *leftcorner = cornerWidget( TopLeft );
+ if ( leftcorner ) {
+ if ( point.x()<=leftcorner->width() )
+ return false;
+ point.setX( point.x()-size.height() );
+ }
+ if ( tabPosition()==Bottom )
+ point.setY( point.y()-( height()-size.height() ) );
+ QTab *tab = tabBar()->selectTab( point);
+ if( !tab )
+ return true;
+ }
+ return false;
+}
+
+void KTabWidget::setHoverCloseButton( bool button )
+{
+ static_cast<KTabBar*>(tabBar())->setHoverCloseButton( button );
+}
+
+bool KTabWidget::hoverCloseButton() const
+{
+ return static_cast<KTabBar*>(tabBar())->hoverCloseButton();
+}
+
+void KTabWidget::setHoverCloseButtonDelayed( bool delayed )
+{
+ static_cast<KTabBar*>(tabBar())->setHoverCloseButtonDelayed( delayed );
+}
+
+bool KTabWidget::hoverCloseButtonDelayed() const
+{
+ return static_cast<KTabBar*>(tabBar())->hoverCloseButtonDelayed();
+}
+
+void KTabWidget::setAutomaticResizeTabs( bool enabled )
+{
+ if ( d->m_automaticResizeTabs==enabled )
+ return;
+
+ d->m_automaticResizeTabs = enabled;
+ if ( enabled ) {
+ d->m_tabNames.clear();
+ for( int i = 0; i < count(); ++i )
+ d->m_tabNames.append( tabBar()->tabAt( i )->text() );
+ }
+ else
+ for( int i = 0; i < count(); ++i )
+ tabBar()->tabAt( i )->setText( d->m_tabNames[ i ] );
+ resizeTabs();
+}
+
+bool KTabWidget::automaticResizeTabs() const
+{
+ return d->m_automaticResizeTabs;
+}
+
+void KTabWidget::closeRequest( int index )
+{
+ emit( closeRequest( page( index ) ) );
+}
+
+void KTabWidget::resizeEvent( QResizeEvent *e )
+{
+ QTabWidget::resizeEvent( e );
+ resizeTabs();
+}
+
+#include "ktabwidget.moc"
diff --git a/lib/compatibility/kmdi/qextmdi/ktabwidget.h b/lib/compatibility/kmdi/qextmdi/ktabwidget.h
new file mode 100644
index 00000000..634dcda3
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/ktabwidget.h
@@ -0,0 +1,291 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2003 Stephan Binner <binner@kde.org>
+ Copyright (C) 2003 Zack Rusin <zack@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.
+*/
+
+#ifndef KTABWIDGET_H
+#define KTABWIDGET_H
+
+#include <qtabwidget.h>
+#include <qstringlist.h>
+
+#include <kdelibs_export.h>
+
+class KTabWidgetPrivate;
+
+/**
+ * \brief A widget containing multiple tabs
+ *
+ * @since 3.2
+ */
+class KDEUI_EXPORT KTabWidget : public QTabWidget
+{
+ Q_OBJECT
+ Q_PROPERTY( bool tabReorderingEnabled READ isTabReorderingEnabled WRITE setTabReorderingEnabled )
+ Q_PROPERTY( bool hoverCloseButton READ hoverCloseButton WRITE setHoverCloseButton )
+ Q_PROPERTY( bool hoverCloseButtonDelayed READ hoverCloseButtonDelayed WRITE setHoverCloseButtonDelayed )
+ Q_PROPERTY( bool tabCloseActivatePrevious READ tabCloseActivatePrevious WRITE setTabCloseActivatePrevious )
+ Q_PROPERTY( bool automaticResizeTabs READ automaticResizeTabs WRITE setAutomaticResizeTabs )
+
+public:
+ KTabWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ /**
+ * Destructor.
+ */
+ virtual ~KTabWidget();
+ /*!
+ Set the tab of the given widget to \a color.
+ */
+ void setTabColor( QWidget *, const QColor& color );
+ QColor tabColor( QWidget * ) const;
+
+ /*!
+ Returns true if tab ordering with the middle mouse button
+ has been enabled.
+ */
+ bool isTabReorderingEnabled() const;
+
+ /*!
+ Returns true if the close button is shown on tabs
+ when mouse is hovering over them.
+ */
+ bool hoverCloseButton() const;
+
+ /*!
+ Returns true if the close button is shown on tabs
+ after a delay.
+ */
+ bool hoverCloseButtonDelayed() const;
+
+ /*!
+ Returns true if closing the current tab activates the previous
+ actice tab instead of the one to the right.
+ @since 3.3
+ */
+ bool tabCloseActivatePrevious() const;
+
+ /*!
+ Returns true if calling setTitle() will resize tabs
+ to the width of the tab bar.
+ @since 3.4
+ */
+ bool automaticResizeTabs() const;
+
+ /*!
+ If \a hide is true, the tabbar is hidden along with any corner
+ widgets.
+ @since 3.4
+ */
+ void setTabBarHidden( bool hide );
+
+ /*!
+ Return true if the tabbar is hidden.
+ @since 3.4
+ */
+ bool isTabBarHidden() const;
+
+ /*!
+ Reimplemented for internal reasons.
+ */
+ virtual void insertTab( QWidget *, const QString &, int index = -1 );
+
+ /*!
+ Reimplemented for internal reasons.
+ */
+ virtual void insertTab( QWidget *child, const QIconSet& iconset,
+ const QString &label, int index = -1 );
+ /*!
+ Reimplemented for internal reasons.
+ */
+ virtual void insertTab( QWidget *, QTab *, int index = -1 );
+
+ /*!
+ Reimplemented for internal reasons.
+ */
+ void changeTab( QWidget *, const QString & );
+
+ /*!
+ Reimplemented for internal reasons.
+ */
+ void changeTab( QWidget *child, const QIconSet& iconset, const QString &label );
+
+ /*!
+ Reimplemented for internal reasons.
+ */
+ QString label( int ) const;
+
+ /*!
+ Reimplemented for internal reasons.
+ */
+ QString tabLabel( QWidget * ) const;
+
+ /*!
+ Reimplemented for internal reasons.
+ */
+ void setTabLabel( QWidget *, const QString & );
+
+public slots:
+ /*!
+ Move a widget's tab from first to second specified index and emit
+ signal movedTab( int, int ) afterwards.
+ */
+ virtual void moveTab( int, int );
+
+ /*!
+ Removes the widget, reimplemented for
+ internal reasons (keeping labels in sync).
+ */
+ virtual void removePage ( QWidget * w );
+
+ /*!
+ If \a enable is true, tab reordering with middle button will be enabled.
+
+ Note that once enabled you shouldn't rely on previously queried
+ currentPageIndex() or indexOf( QWidget * ) values anymore.
+
+ You can connect to signal movedTab(int, int) which will notify
+ you from which index to which index a tab has been moved.
+ */
+ void setTabReorderingEnabled( bool enable );
+
+ /*!
+ If \a enable is true, a close button will be shown on mouse hover
+ over tab icons which will emit signal closeRequest( QWidget * )
+ when pressed.
+ */
+ void setHoverCloseButton( bool enable );
+
+ /*!
+ If \a delayed is true, a close button will be shown on mouse hover
+ over tab icons after mouse double click delay else immediately.
+ */
+ void setHoverCloseButtonDelayed( bool delayed );
+
+ /*!
+ If \a delayed is true, closing the current tab activates the
+ previous active tab instead of the one to the right.
+ @since 3.3
+ */
+ void setTabCloseActivatePrevious( bool previous );
+
+ /*!
+ If \a enable is true, tabs will be resized to the width of the tab bar.
+
+ Does not work reliable with "QTabWidget* foo=new KTabWidget()" and if
+ you change tabs via the tabbar or by accessing tabs directly.
+ @since 3.4
+ */
+ void setAutomaticResizeTabs( bool enable );
+
+signals:
+ /*!
+ Connect to this and set accept to true if you can and want to decode the event.
+ */
+ void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
+
+ /*!
+ Received an event in the empty space beside tabbar. Usually creates a new tab.
+ This signal is only possible after testCanDecode and positive accept result.
+ */
+ void receivedDropEvent( QDropEvent * );
+
+ /*!
+ Received an drop event on given widget's tab.
+ This signal is only possible after testCanDecode and positive accept result.
+ */
+ void receivedDropEvent( QWidget *, QDropEvent * );
+
+ /*!
+ Request to start a drag operation on the given tab.
+ */
+ void initiateDrag( QWidget * );
+
+ /*!
+ The right mouse button was pressed over empty space besides tabbar.
+ */
+ void contextMenu( const QPoint & );
+
+ /*!
+ The right mouse button was pressed over a widget.
+ */
+ void contextMenu( QWidget *, const QPoint & );
+
+ /*!
+ A tab was moved from first to second index. This signal is only
+ possible after you have called setTabReorderingEnabled( true ).
+ */
+ void movedTab( int, int );
+
+ /*!
+ A double left mouse button click was performed over empty space besides tabbar.
+ @since 3.3
+ */
+ void mouseDoubleClick();
+
+ /*!
+ A double left mouse button click was performed over the widget.
+ */
+ void mouseDoubleClick( QWidget * );
+
+ /*!
+ A middle mouse button click was performed over empty space besides tabbar.
+ */
+ void mouseMiddleClick();
+
+ /*!
+ A middle mouse button click was performed over the widget.
+ */
+ void mouseMiddleClick( QWidget * );
+
+ /*!
+ The close button of a widget's tab was clicked. This signal is
+ only possible after you have called setHoverCloseButton( true ).
+ */
+ void closeRequest( QWidget * );
+
+protected:
+ virtual void mouseDoubleClickEvent( QMouseEvent *e );
+ virtual void mousePressEvent( QMouseEvent * );
+ virtual void dragMoveEvent( QDragMoveEvent * );
+ virtual void dropEvent( QDropEvent * );
+ unsigned int tabBarWidthForMaxChars( uint maxLength );
+#ifndef QT_NO_WHEELEVENT
+ virtual void wheelEvent( QWheelEvent *e );
+#endif
+ virtual void resizeEvent( QResizeEvent * );
+
+protected slots:
+ virtual void receivedDropEvent( int, QDropEvent * );
+ virtual void initiateDrag( int );
+ virtual void contextMenu( int, const QPoint & );
+ virtual void mouseDoubleClick( int );
+ virtual void mouseMiddleClick( int );
+ virtual void closeRequest( int );
+#ifndef QT_NO_WHEELEVENT
+ virtual void wheelDelta( int );
+#endif
+
+private:
+ bool isEmptyTabbarSpace( const QPoint & ) const;
+ void resizeTabs( int changedTabIndex = -1 );
+ void updateTab( int index );
+
+ KTabWidgetPrivate *d;
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/filenew.xpm b/lib/compatibility/kmdi/qextmdi/res/filenew.xpm
new file mode 100644
index 00000000..b261800d
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/filenew.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+#ifndef _FILENEW_XPM_
+#define _FILENEW_XPM_
+
+static const char *filenew[] = {
+"10 14 5 1",
+" c None",
+". c #000000",
+"+ c #FFFFFF",
+"@ c #DCDCDC",
+"# c #C0C0C0",
+"....... ",
+".++++@@. ",
+".++++#+@. ",
+".++++#++@.",
+".++++#....",
+".+++++###.",
+".++++++++.",
+".++++++++.",
+".++++++++.",
+".++++++++.",
+".++++++++.",
+".++++++++.",
+".++++++++.",
+".........."};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2_closebutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2_closebutton.xpm
new file mode 100644
index 00000000..5c05e714
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2_closebutton.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+#ifndef _KDE2_CLOSEBUTTON_XPM_
+#define _KDE2_CLOSEBUTTON_XPM_
+
+static const char* kde2_closebutton[]={
+"12 12 2 1",
+". s None c None",
+"# c #000000",
+"............",
+"............",
+"...#....#...",
+"..###..###..",
+"...######...",
+"....####....",
+"....####....",
+"...######...",
+"..###..###..",
+"...#....#...",
+"............",
+"............"};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2_maxbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2_maxbutton.xpm
new file mode 100644
index 00000000..c8ef8113
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2_maxbutton.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+#ifndef _KDE2_MAXBUTTON_XPM_
+#define _KDE2_MAXBUTTON_XPM_
+
+static const char* kde2_maxbutton[]={
+"12 12 2 1",
+". s None c None",
+"# c #000000",
+"............",
+"............",
+"..########..",
+"..########..",
+"..##....##..",
+"..##....##..",
+"..##....##..",
+"..##....##..",
+"..########..",
+"..########..",
+"............",
+"............"};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2_minbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2_minbutton.xpm
new file mode 100644
index 00000000..98669195
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2_minbutton.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+#ifndef _KDE2_MINBUTTON_XPM_
+#define _KDE2_MINBUTTON_XPM_
+
+static const char* kde2_minbutton[]={
+"12 12 2 1",
+". s None c None",
+"# c #000000",
+"............",
+"............",
+"............",
+"............",
+"....####....",
+"....####....",
+"....####....",
+"....####....",
+"............",
+"............",
+"............",
+"............"};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2_restorebutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2_restorebutton.xpm
new file mode 100644
index 00000000..a6e01fcb
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2_restorebutton.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+#ifndef _KDE2_RESTOREBUTTON_XPM_
+#define _KDE2_RESTOREBUTTON_XPM_
+
+static const char* kde2_restorebutton[]={
+"12 12 2 1",
+". s None c None",
+"# c #000000",
+"............",
+".########...",
+".########...",
+".##....##...",
+".##.########",
+".##.########",
+".#####....##",
+".#####....##",
+"....##....##",
+"....########",
+"....########",
+"............"};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2_undockbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2_undockbutton.xpm
new file mode 100644
index 00000000..711bf01c
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2_undockbutton.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+#ifndef _KDE2_UNDOCKBUTTON_XPM_
+#define _KDE2_UNDOCKBUTTON_XPM_
+
+static const char* kde2_undockbutton[]={
+"12 12 2 1",
+". s None c None",
+"# c #000000",
+"............",
+".#####......",
+".#####......",
+".####.......",
+".#####......",
+".##.###.....",
+".....###....",
+"......###...",
+".......###..",
+"........##..",
+"............",
+"............"};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2laptop_closebutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_closebutton.xpm
new file mode 100644
index 00000000..6801e4e3
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_closebutton.xpm
@@ -0,0 +1,18 @@
+/* XPM */
+#ifndef _KDE2LAPTOP_CLOSEBUTTON_XPM_
+#define _KDE2LAPTOP_CLOSEBUTTON_XPM_
+
+static const char* kde2laptop_closebutton[]={
+"20 8 2 1",
+". s None c None",
+"# c #000000",
+".......#....#.......",
+"......###..###......",
+".......######.......",
+"........####........",
+"........####........",
+".......######.......",
+"......###..###......",
+".......#....#......."};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2laptop_closebutton_menu.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_closebutton_menu.xpm
new file mode 100644
index 00000000..9d071231
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_closebutton_menu.xpm
@@ -0,0 +1,25 @@
+/* XPM */
+#ifndef _KDE2LAPTOP_CLOSEBUTTON_MENU_XPM_
+#define _KDE2LAPTOP_CLOSEBUTTON_MENU_XPM_
+
+static const char* kde2laptop_closebutton_menu[]={
+"27 14 3 1",
+". s None c None",
+"+ c #303030",
+"# c #000000",
+"##########################.",
+"#........................#+",
+"#........................#+",
+"#.........#....#.........#+",
+"#........###..###........#+",
+"#.........######.........#+",
+"#..........####..........#+",
+"#..........####..........#+",
+"#.........######.........#+",
+"#........###..###........#+",
+"#.........#....#.........#+",
+"#........................#+",
+"##########################+",
+".++++++++++++++++++++++++++"};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2laptop_maxbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_maxbutton.xpm
new file mode 100644
index 00000000..b8ce6de2
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_maxbutton.xpm
@@ -0,0 +1,18 @@
+/* XPM */
+#ifndef _KDE2LAPTOP_MAXBUTTON_XPM_
+#define _KDE2LAPTOP_MAXBUTTON_XPM_
+
+static const char* kde2laptop_maxbutton[]={
+"20 8 2 1",
+". s None c None",
+"# c #000000",
+"........##..........",
+".......####.........",
+"......######........",
+".....########.......",
+".....########.......",
+"....................",
+".....########.......",
+".....########......."};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2laptop_minbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_minbutton.xpm
new file mode 100644
index 00000000..6bcf76c5
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_minbutton.xpm
@@ -0,0 +1,18 @@
+/* XPM */
+#ifndef _KDE2LAPTOP_MINBUTTON_XPM_
+#define _KDE2LAPTOP_MINBUTTON_XPM_
+
+static const char* kde2laptop_minbutton[]={
+"20 8 2 1",
+". s None c None",
+"# c #000000",
+"......########......",
+"......########......",
+"....................",
+"......########......",
+"......########......",
+".......######.......",
+"........####........",
+".........##........."};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2laptop_restorebutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_restorebutton.xpm
new file mode 100644
index 00000000..803ce6db
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_restorebutton.xpm
@@ -0,0 +1,18 @@
+/* XPM */
+#ifndef _KDE2LAPTOP_RESTOREBUTTON_XPM_
+#define _KDE2LAPTOP_RESTOREBUTTON_XPM_
+
+static const char* kde2laptop_restorebutton[]={
+"20 8 2 1",
+". s None c None",
+"# c #000000",
+".......##...........",
+"........##..........",
+".....##..##.........",
+".....###..##........",
+".....####..##.......",
+".....#####..#.......",
+".....######.........",
+".....#######........"};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde2laptop_undockbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_undockbutton.xpm
new file mode 100644
index 00000000..1f23ecaf
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde2laptop_undockbutton.xpm
@@ -0,0 +1,18 @@
+/* XPM */
+#ifndef _KDE2LAPTOP_UNDOCKBUTTON_XPM_
+#define _KDE2LAPTOP_UNDOCKBUTTON_XPM_
+
+static const char* kde2laptop_undockbutton[]={
+"20 8 2 1",
+". s None c None",
+"# c #000000",
+".....######.........",
+".....#####..........",
+".....####...........",
+".....#####..........",
+".....##.###.........",
+".....#...###........",
+"..........###.......",
+"...........##......."};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde_closebutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde_closebutton.xpm
new file mode 100644
index 00000000..e714359a
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde_closebutton.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+#ifndef _KDE_CLOSEBUTTON_XPM_
+#define _KDE_CLOSEBUTTON_XPM_
+
+static const char *kde_closebutton[] = {
+/* width height num_colors chars_per_pixel */
+"16 16 3 1",
+/* colors */
+" s None c None",
+". c white",
+"X c #707070",
+/* pixels */
+" ",
+" ",
+" .X .X ",
+" .XX .XX ",
+" .XX .XX ",
+" .XX .XX ",
+" .XX.XX ",
+" .XXX ",
+" .XXX ",
+" .XX.XX ",
+" .XX .XX ",
+" .XX .XX ",
+" .XX .XX ",
+" .X .X ",
+" ",
+" "};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde_maxbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde_maxbutton.xpm
new file mode 100644
index 00000000..2af3bf88
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde_maxbutton.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+#ifndef _KDE_MAXBUTTON_XPM_
+#define _KDE_MAXBUTTON_XPM_
+
+static const char *kde_maxbutton[] = {
+/* width height num_colors chars_per_pixel */
+"16 16 3 1",
+/* colors */
+" s None c None",
+". c white",
+"X c #707070",
+/* pixels */
+" ",
+" ",
+" ........... ",
+" .XXXXXXXXXX ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X........X ",
+" .XXXXXXXXXX ",
+" ",
+" ",
+" "};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde_minbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde_minbutton.xpm
new file mode 100644
index 00000000..c4e609ae
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde_minbutton.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+#ifndef _KDE_MINBUTTON_XPM_
+#define _KDE_MINBUTTON_XPM_
+
+static const char *kde_minbutton[] = {
+/* width height num_colors chars_per_pixel */
+"16 16 3 1",
+/* colors */
+" s None c None",
+". c white",
+"X c #707070",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ... ",
+" . X ",
+" .XX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde_restorebutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde_restorebutton.xpm
new file mode 100644
index 00000000..4ec18513
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde_restorebutton.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+#ifndef _KDE_RESTOREBUTTON_XPM_
+#define _KDE_RESTOREBUTTON_XPM_
+
+static const char *kde_restorebutton[] = {
+/* width height num_colors chars_per_pixel */
+"16 16 3 1",
+/* colors */
+" s None c None",
+". c #707070",
+"X c white",
+/* pixels */
+" ",
+" ",
+" ........... ",
+" .XXXXXXXXXX ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X .X ",
+" .X........X ",
+" .XXXXXXXXXX ",
+" ",
+" ",
+" "};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/kde_undockbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/kde_undockbutton.xpm
new file mode 100644
index 00000000..de97e9e7
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/kde_undockbutton.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+#ifndef _KDE_UNDOCKBUTTON_XPM_
+#define _KDE_UNDOCKBUTTON_XPM_
+
+static const char *kde_undockbutton[]={
+"16 16 3 1",
+". c None",
+"# c #ffffff",
+"a c #707070",
+"................",
+"................",
+"..#aaaaaaa......",
+"..#aa#####......",
+"..#aaa..........",
+"..#a#aa.........",
+"..#a.#aa........",
+"..#a..#aa.......",
+"..#a...#aa......",
+"..#a....#aa.....",
+".........#aa....",
+"..........#aa...",
+"...........#aa..",
+"............#...",
+"................",
+"................"};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/win_closebutton.xpm b/lib/compatibility/kmdi/qextmdi/res/win_closebutton.xpm
new file mode 100644
index 00000000..d8be0243
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/win_closebutton.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+#ifndef _WIN_CLOSEBUTTON_XPM_
+#define _WIN_CLOSEBUTTON_XPM_
+
+static const char *win_closebutton[] = {
+/* width height num_colors chars_per_pixel */
+" 16 14 4 1",
+/* colors */
+". c #000000",
+"# c #808080",
+"a c None",
+"b c #ffffff",
+/* pixels */
+"bbbbbbbbbbbbbbb.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"baaa..aaaa..aa#.",
+"baaaa..aa..aaa#.",
+"baaaaa....aaaa#.",
+"baaaaaa..aaaaa#.",
+"baaaaa....aaaa#.",
+"baaaa..aa..aaa#.",
+"baaa..aaaa..aa#.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"b##############.",
+"................"
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/win_maxbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/win_maxbutton.xpm
new file mode 100644
index 00000000..95e501a8
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/win_maxbutton.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+#ifndef _WIN_MAXBUTTON_XPM_
+#define _WIN_MAXBUTTON_XPM_
+
+static const char *win_maxbutton[] = {
+/* width height num_colors chars_per_pixel */
+" 16 14 4 1",
+/* colors */
+". c #000000",
+"# c #808080",
+"a c None",
+"b c #ffffff",
+/* pixels */
+"bbbbbbbbbbbbbbb.",
+"baaaaaaaaaaaaa#.",
+"baa.........aa#.",
+"baa.........aa#.",
+"baa.aaaaaaa.aa#.",
+"baa.aaaaaaa.aa#.",
+"baa.aaaaaaa.aa#.",
+"baa.aaaaaaa.aa#.",
+"baa.aaaaaaa.aa#.",
+"baa.aaaaaaa.aa#.",
+"baa.........aa#.",
+"baaaaaaaaaaaaa#.",
+"b##############.",
+"................"
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/win_minbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/win_minbutton.xpm
new file mode 100644
index 00000000..1e8787e7
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/win_minbutton.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+#ifndef _WIN_MINBUTTON_XPM_
+#define _WIN_MINBUTTON_XPM_
+
+static const char *win_minbutton[] = {
+/* width height num_colors chars_per_pixel */
+" 16 14 4 1",
+/* colors */
+". c #000000",
+"# c #808080",
+"a c None",
+"b c #ffffff",
+/* pixels */
+"bbbbbbbbbbbbbbb.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"baaaaaaaaaaaaa#.",
+"baaa......aaaa#.",
+"baaa......aaaa#.",
+"baaaaaaaaaaaaa#.",
+"b##############.",
+"................"
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/win_restorebutton.xpm b/lib/compatibility/kmdi/qextmdi/res/win_restorebutton.xpm
new file mode 100644
index 00000000..87bb5b30
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/win_restorebutton.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+#ifndef _WIN_RESTOREBUTTON_XPM_
+#define _WIN_RESTOREBUTTON_XPM_
+
+static const char *win_restorebutton[] = {
+/* width height num_colors chars_per_pixel */
+" 16 14 4 1",
+/* colors */
+". c #000000",
+"# c #808080",
+"a c None",
+"b c #ffffff",
+/* pixels */
+"bbbbbbbbbbbbbbb.",
+"baaaaaaaaaaaaa#.",
+"baaaa......aaa#.",
+"baaaa......aaa#.",
+"baaaa.aaaa.aaa#.",
+"baa......a.aaa#.",
+"baa......a.aaa#.",
+"baa.aaaa...aaa#.",
+"baa.aaaa.aaaaa#.",
+"baa.aaaa.aaaaa#.",
+"baa......aaaaa#.",
+"baaaaaaaaaaaaa#.",
+"b##############.",
+"................"
+};
+
+#endif
diff --git a/lib/compatibility/kmdi/qextmdi/res/win_undockbutton.xpm b/lib/compatibility/kmdi/qextmdi/res/win_undockbutton.xpm
new file mode 100644
index 00000000..386ebd8a
--- /dev/null
+++ b/lib/compatibility/kmdi/qextmdi/res/win_undockbutton.xpm
@@ -0,0 +1,26 @@
+/* XPM */
+#ifndef _WIN_UNDOCKBUTTON_XPM_
+#define _WIN_UNDOCKBUTTON_XPM_
+
+static const char* win_undockbutton[]={
+"16 14 4 1",
+"b c #808080",
+"# c #000000",
+"a c None",
+". c #ffffff",
+"...............#",
+".aaaaaaaaaaaaab#",
+".aaaaaaaaaaaaab#",
+".aaa####aaaaaab#",
+".aaa###aaaaaaab#",
+".aaa####aaaaaab#",
+".aaa#a###aaaaab#",
+".aaaaaa###aaaab#",
+".aaaaaaa###aaab#",
+".aaaaaaaa###aab#",
+".aaaaaaaaa#aaab#",
+".aaaaaaaaaaaaab#",
+".bbbbbbbbbbbbbb#",
+"################"};
+
+#endif
diff --git a/lib/compatibility/knewstuff/Makefile.am b/lib/compatibility/knewstuff/Makefile.am
new file mode 100644
index 00000000..d0718429
--- /dev/null
+++ b/lib/compatibility/knewstuff/Makefile.am
@@ -0,0 +1,13 @@
+AM_CPPFLAGS = -I$(srcdir)/.. $(all_includes)
+
+METASOURCES = AUTO
+
+noinst_LTLIBRARIES = libknewstuff.la
+
+libknewstuff_la_LDFLAGS = $(all_libraries)
+libknewstuff_la_LIBADD = $(LIB_KIO)
+libknewstuff_la_SOURCES = engine.cpp entry.cpp downloaddialog.cpp \
+ uploaddialog.cpp providerdialog.cpp provider.cpp knewstuff.cpp \
+ knewstuffgeneric.cpp knewstuffsecure.cpp security.cpp
+
+KDE_ICON=AUTO
diff --git a/lib/compatibility/knewstuff/cr16-action-knewstuff.png b/lib/compatibility/knewstuff/cr16-action-knewstuff.png
new file mode 100644
index 00000000..ef5ea45e
--- /dev/null
+++ b/lib/compatibility/knewstuff/cr16-action-knewstuff.png
Binary files differ
diff --git a/lib/compatibility/knewstuff/cr32-action-knewstuff.png b/lib/compatibility/knewstuff/cr32-action-knewstuff.png
new file mode 100644
index 00000000..757e9266
--- /dev/null
+++ b/lib/compatibility/knewstuff/cr32-action-knewstuff.png
Binary files differ
diff --git a/lib/compatibility/knewstuff/cr64-action-knewstuff.png b/lib/compatibility/knewstuff/cr64-action-knewstuff.png
new file mode 100644
index 00000000..ad6d5e56
--- /dev/null
+++ b/lib/compatibility/knewstuff/cr64-action-knewstuff.png
Binary files differ
diff --git a/lib/compatibility/knewstuff/downloaddialog.cpp b/lib/compatibility/knewstuff/downloaddialog.cpp
new file mode 100644
index 00000000..be3cf66d
--- /dev/null
+++ b/lib/compatibility/knewstuff/downloaddialog.cpp
@@ -0,0 +1,628 @@
+/*
+ This file is part of KNewStuff.
+ Copyright (c) 2003 Josef Spillner <spillner@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.
+*/
+
+#include "downloaddialog.h"
+#include "downloaddialog.moc"
+
+#include <klocale.h>
+#include <ktabctl.h>
+#include <klistview.h>
+#include <kdebug.h>
+#include <kio/job.h>
+#include <kio/netaccess.h>
+#include <kmessagebox.h>
+#include <kurl.h>
+#include <kconfig.h>
+#include <kapplication.h>
+#include <kiconloader.h>
+
+#include <knewstuff/entry.h>
+#include <knewstuff/knewstuffgeneric.h>
+#include <knewstuff/engine.h>
+
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qdom.h>
+#include <qlabel.h>
+#include <qtextbrowser.h>
+#include <qtimer.h> // hack
+
+using namespace KNS;
+
+class NumSortListViewItem : public KListViewItem
+{
+ public:
+ NumSortListViewItem( QListView * parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null ) :
+ KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
+ {
+ }
+
+ QString key(int col, bool asc) const {
+ if (col == 2)
+ {
+
+ QString s;
+ s.sprintf("%08d", text(col).toInt());
+ return s;
+ }
+ return KListViewItem::key( col, asc );
+ }
+};
+
+// BEGIN deprecated for KDE 4
+DownloadDialog::DownloadDialog(Engine *engine, QWidget *)
+: KDialogBase(KDialogBase::IconList, i18n("Get Hot New Stuff"),
+ KDialogBase::Close, KDialogBase::Close)
+{
+ init(engine);
+}
+
+DownloadDialog::DownloadDialog(QWidget *)
+: KDialogBase(KDialogBase::IconList, i18n("Get Hot New Stuff"),
+ KDialogBase::Close, KDialogBase::Close)
+{
+ init(0);
+}
+
+void DownloadDialog::open(QString type)
+{
+ DownloadDialog d;
+ d.setType(type);
+ d.load();
+ d.exec();
+}
+// END deprecated for KDE 4
+
+DownloadDialog::DownloadDialog(Engine *engine, QWidget *, const QString& caption)
+: KDialogBase(KDialogBase::IconList, (caption.isNull() ? i18n("Get Hot New Stuff") : caption),
+ KDialogBase::Close, KDialogBase::Close)
+{
+ init(engine);
+}
+
+DownloadDialog::DownloadDialog(QWidget *, const QString& caption)
+: KDialogBase(KDialogBase::IconList, (caption.isNull() ? i18n("Get Hot New Stuff") : caption),
+ KDialogBase::Close, KDialogBase::Close)
+{
+ init(0);
+}
+
+void DownloadDialog::init(Engine *engine)
+{
+ resize(700, 400);
+
+ m_engine = engine;
+ m_page = NULL;
+
+ connect(this, SIGNAL(aboutToShowPage(QWidget*)), SLOT(slotPage(QWidget*)));
+
+ if(!engine)
+ {
+ m_loader = new ProviderLoader(this);
+ connect(m_loader, SIGNAL(providersLoaded(Provider::List*)), SLOT(slotProviders(Provider::List*)));
+ }
+}
+
+DownloadDialog::~DownloadDialog()
+{
+}
+
+void DownloadDialog::load()
+{
+ m_loader->load(m_filter, m_providerlist);
+}
+
+void DownloadDialog::load(QString providerList)
+{
+ m_loader->load(m_filter, providerList);
+}
+
+void DownloadDialog::clear()
+{
+ QMap<QWidget*, QValueList<KListView*>* >::Iterator it;
+ for(it = m_map.begin(); it != m_map.end(); ++it)
+ {
+ QValueList<KListView*> *v = it.data();
+ kdDebug() << "clear listviews in " << v << endl;
+ if(v)
+ {
+ (*(v->at(0)))->clear();
+ (*(v->at(1)))->clear();
+ (*(v->at(2)))->clear();
+
+ //delete (*it);
+ }
+
+ delete it.key();
+ }
+ m_map.clear();
+}
+
+void DownloadDialog::slotProviders(Provider::List *list)
+{
+ Provider *p;
+ /*QFrame *frame;*/
+
+ for(p = list->first(); p; p = list->next())
+ {
+ kdDebug() << "++ provider ++ " << p->name() << endl;
+
+ if(!m_filter.isEmpty())
+ loadProvider(p);
+ else
+ addProvider(p);
+ /*if(p == list->getFirst())
+ slotPage(m_frame);*/ // only if !qtbug
+ }
+}
+
+void DownloadDialog::addProvider(Provider *p)
+{
+ QFrame *frame;
+ KTabCtl *ctl;
+ QWidget *w_d, *w_r, *w_l;
+ QWidget *w2;
+ KListView *lvtmp_r, *lvtmp_d, *lvtmp_l;
+ QTextBrowser *rt;
+ QString tmp;
+ int ret;
+ QPixmap pix;
+
+ if(m_map.count() == 0)
+ {
+ frame = addPage(i18n("Welcome"), i18n("Welcome"), QPixmap(""));
+ delete frame;
+ }
+
+ kdDebug() << "addProvider()/begin" << endl;
+
+ ret = true;
+ if(!p->icon().isValid()) ret = false;
+ else ret = KIO::NetAccess::download(p->icon(), tmp, this);
+ if(ret) pix = QPixmap(tmp);
+ else pix = KGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel);
+ frame = addPage(p->name(), p->name(), pix);
+ m_frame = frame;
+
+ w2 = new QWidget(frame);
+ w_d = new QWidget(frame);
+ w_r = new QWidget(frame);
+ w_l = new QWidget(frame);
+
+ ctl = new KTabCtl(frame);
+ ctl->addTab(w_r, i18n("Highest Rated"));
+ ctl->addTab(w_d, i18n("Most Downloads"));
+ ctl->addTab(w_l, i18n("Latest"));
+
+ m_curtab = 0;
+ connect(ctl, SIGNAL(tabSelected(int)), SLOT(slotTab(int)));
+
+ QHBoxLayout *box = new QHBoxLayout(frame);
+ box->add(ctl);
+
+ lvtmp_r = new KListView(w_r);
+ lvtmp_r->addColumn(i18n("Name"));
+ lvtmp_r->addColumn(i18n("Version"));
+ lvtmp_r->addColumn(i18n("Rating"));
+ lvtmp_r->setSorting(2, false);
+
+ lvtmp_d = new KListView(w_d);
+ lvtmp_d->addColumn(i18n("Name"));
+ lvtmp_d->addColumn(i18n("Version"));
+ lvtmp_d->addColumn(i18n("Downloads"));
+ lvtmp_d->setSorting(2, false);
+
+ lvtmp_l = new KListView(w_l);
+ lvtmp_l->addColumn(i18n("Name"));
+ lvtmp_l->addColumn(i18n("Version"));
+ lvtmp_l->addColumn(i18n("Release Date"));
+ lvtmp_l->setSorting(2, false);
+
+ connect(lvtmp_r, SIGNAL(selectionChanged()), SLOT(slotSelected()));
+ connect(lvtmp_d, SIGNAL(selectionChanged()), SLOT(slotSelected()));
+ connect(lvtmp_l, SIGNAL(selectionChanged()), SLOT(slotSelected()));
+
+ rt = new QTextBrowser(frame);
+ rt->setMinimumWidth(150);
+
+ QPushButton *in = new QPushButton(i18n("Install"), frame);
+ QPushButton *de = new QPushButton(i18n("Details"), frame);
+ in->setEnabled(false);
+ de->setEnabled(false);
+
+ box->addSpacing(spacingHint());
+ QVBoxLayout *vbox = new QVBoxLayout(box);
+ vbox->add(rt);
+ vbox->addSpacing(spacingHint());
+ vbox->add(de);
+ vbox->add(in);
+
+ connect(in, SIGNAL(clicked()), SLOT(slotInstall()));
+ connect(de, SIGNAL(clicked()), SLOT(slotDetails()));
+
+ QVBoxLayout *box2 = new QVBoxLayout(w_r);
+ box2->add(lvtmp_r);
+ QVBoxLayout *box3 = new QVBoxLayout(w_d);
+ box3->add(lvtmp_d);
+ QVBoxLayout *box4 = new QVBoxLayout(w_l);
+ box4->add(lvtmp_l);
+
+ QValueList<KListView*> *v = new QValueList<KListView*>;
+ *v << lvtmp_r << lvtmp_d << lvtmp_l;
+ m_map[frame] = v;
+ m_rts[frame] = rt;
+ QValueList<QPushButton*> *vb = new QValueList<QPushButton*>;
+ *vb << in << de;
+ m_buttons[frame] = vb;
+ m_providers[frame] = p;
+
+ kdDebug() << "addProvider()/end; lvtmp_r = " << lvtmp_r << endl;
+
+ if(m_engine) slotPage(frame);
+
+ QTimer::singleShot(100, this, SLOT(slotFinish()));
+}
+
+void DownloadDialog::slotResult(KIO::Job *job)
+{
+ QDomDocument dom;
+ QDomElement knewstuff;
+
+ kdDebug() << "got data: " << m_data[job] << endl;
+
+ kapp->config()->setGroup("KNewStuffStatus");
+
+ dom.setContent(m_data[job]);
+ knewstuff = dom.documentElement();
+
+ for(QDomNode pn = knewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling())
+ {
+ QDomElement stuff = pn.toElement();
+
+ kdDebug() << "element: " << stuff.tagName() << endl;
+
+ if(stuff.tagName() == "stuff")
+ {
+ Entry *entry = new Entry(stuff);
+ kdDebug() << "TYPE::" << entry->type() << " FILTER::" << m_filter << endl;
+ if(!entry->type().isEmpty())
+ {
+ if((!m_filter.isEmpty()) && (entry->type() != m_filter)) continue;
+ }
+
+ if((!m_filter.isEmpty()) && (m_jobs[job]))
+ {
+ Provider *p = m_jobs[job];
+ addProvider(p);
+ slotPage(m_frame);
+ m_jobs[job] = 0;
+ }
+ addEntry(entry);
+ }
+ }
+
+ m_data[job] = "";
+}
+
+int DownloadDialog::installStatus(Entry *entry)
+{
+ QDate date;
+ QString datestring;
+ int installed;
+
+ kapp->config()->setGroup("KNewStuffStatus");
+ datestring = kapp->config()->readEntry(entry->name());
+ if(datestring.isNull()) installed = 0;
+ else
+ {
+ date = QDate::fromString(datestring, Qt::ISODate);
+ if(!date.isValid()) installed = 0;
+ else if(date < entry->releaseDate()) installed = -1;
+ else installed = 1;
+ }
+
+ return installed;
+}
+
+void DownloadDialog::addEntry(Entry *entry)
+{
+ QPixmap pix;
+ int installed;
+
+ /*if(m_engine)
+ {
+ if(m_map.count() == 0)
+ {
+ m_frame = addPage(i18n("Welcome"), i18n("Welcome"), QPixmap(""));
+ Provider *p = new Provider();
+ p->setName(i18n("Generic"));
+ addProvider(p);
+ slotPage(m_frame);
+ }
+ }*/
+ installed = installStatus(entry);
+
+ if(installed > 0) pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ else if(installed < 0) pix = KGlobal::iconLoader()->loadIcon("history", KIcon::Small);
+ else pix = QPixmap();
+
+ KListViewItem *tmp_r = new KListViewItem(lv_r,
+ entry->name(), entry->version(), QString("%1").arg(entry->rating()));
+ KListViewItem *tmp_d = new NumSortListViewItem(lv_d,
+ entry->name(), entry->version(), QString("%1").arg(entry->downloads()));
+ KListViewItem *tmp_l = new KListViewItem(lv_l,
+ entry->name(), entry->version(), KGlobal::locale()->formatDate(entry->releaseDate()));
+
+ tmp_r->setPixmap(0, pix);
+ tmp_d->setPixmap(0, pix);
+ tmp_l->setPixmap(0, pix);
+
+ m_entries.append(entry);
+
+ kdDebug() << "added entry " << entry->name() << endl;
+}
+
+void DownloadDialog::slotData(KIO::Job *job, const QByteArray &a)
+{
+ QCString tmp(a, a.size() + 1);
+ m_data[job].append(QString::fromUtf8(tmp));
+}
+
+void DownloadDialog::slotDetails()
+{
+ Entry *e = getEntry();
+ if(!e) return;
+
+ QString lang = KGlobal::locale()->language();
+
+ QString info = i18n
+ (
+ "Name: %1\n"
+ "Author: %2\n"
+ "License: %3\n"
+ "Version: %4\n"
+ "Release: %5\n"
+ "Rating: %6\n"
+ "Downloads: %7\n"
+ "Release date: %8\n"
+ "Summary: %9\n"
+ ).arg(e->name()
+ ).arg(e->author()
+ ).arg(e->license()
+ ).arg(e->version()
+ ).arg(e->release()
+ ).arg(e->rating()
+ ).arg(e->downloads()
+ ).arg(KGlobal::locale()->formatDate(e->releaseDate())
+ ).arg(e->summary(lang)
+ );
+
+ info.append(i18n
+ (
+ "Preview: %1\n"
+ "Payload: %2\n"
+ ).arg(e->preview().url()
+ ).arg(e->payload().url()
+ ));
+
+ KMessageBox::information(this, info, i18n("Details"));
+}
+
+void DownloadDialog::slotInstall()
+{
+ Entry *e = getEntry();
+ if(!e) return;
+
+ kdDebug() << "download entry now" << endl;
+
+ if(m_engine)
+ {
+ m_engine->download(e);
+ install(e);
+ }
+ else
+ {
+ m_s = new KNewStuffGeneric(e->type(), this);
+
+ m_entry = e;
+
+ KURL source = e->payload();
+ KURL dest = KURL(m_s->downloadDestination(e));
+
+ KIO::FileCopyJob *job = KIO::file_copy(source, dest, -1, true);
+ connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotInstalled(KIO::Job*)));
+ }
+}
+
+void DownloadDialog::install(Entry *e)
+{
+ kapp->config()->setGroup("KNewStuffStatus");
+ kapp->config()->writeEntry(m_entryname, e->releaseDate().toString(Qt::ISODate));
+ kapp->config()->sync();
+
+ QPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ m_entryitem = lv_r->findItem(m_entryname, 0);
+ if(m_entryitem) m_entryitem->setPixmap(0, pix);
+ m_entryitem = lv_d->findItem(m_entryname, 0);
+ if(m_entryitem) m_entryitem->setPixmap(0, pix);
+ m_entryitem = lv_l->findItem(m_entryname, 0);
+ if(m_entryitem) m_entryitem->setPixmap(0, pix);
+
+
+ QPushButton *in;
+ in = *(m_buttons[m_page]->at(0));
+ if(in) in->setEnabled(false);
+}
+
+void DownloadDialog::slotInstalled(KIO::Job *job)
+{
+ bool ret = (job->error() == 0);
+ KIO::FileCopyJob *cjob;
+
+ if(ret)
+ {
+ cjob = static_cast<KIO::FileCopyJob*>(job);
+ if(cjob)
+ {
+ ret = m_s->install(cjob->destURL().path());
+ }
+ else ret = false;
+ }
+
+ if(ret)
+ {
+ install(m_entry);
+
+ KMessageBox::information(this, i18n("Installation successful."), i18n("Installation"));
+ }
+ else KMessageBox::error(this, i18n("Installation failed."), i18n("Installation"));
+
+ delete m_s;
+}
+
+void DownloadDialog::slotTab(int tab)
+{
+ kdDebug() << "switch tab to: " << tab << endl;
+ m_curtab = tab;
+}
+
+void DownloadDialog::slotSelected()
+{
+ QString tmp;
+ bool enabled;
+ Entry *e = getEntry();
+ QString lang = KGlobal::locale()->language();
+
+ if(e)
+ {
+ if(!e->preview(lang).isValid())
+ {
+ m_rt->setText(QString("<b>%1</b><br>%2<br>%3<br><br><i>%4</i><br>(%5)").arg(
+ e->name()).arg(e->author()).arg(KGlobal::locale()->formatDate(e->releaseDate())).arg(e->summary(lang)).arg(e->license()));
+ }
+ else
+ {
+ KIO::NetAccess::download(e->preview(lang), tmp, this);
+ m_rt->setText(QString("<b>%1</b><br>%2<br>%3<br><br><img src='%4'><br><i>%5</i><br>(%6)").arg(
+ e->name()).arg(e->author()).arg(KGlobal::locale()->formatDate(e->releaseDate())).arg(tmp).arg(e->summary(lang)).arg(e->license()));
+ }
+
+ if(installStatus(e) == 1) enabled = false;
+ else enabled = true;
+
+ QPushButton *de, *in;
+ in = *(m_buttons[m_page]->at(0));
+ de = *(m_buttons[m_page]->at(1));
+ if(in) in->setEnabled(enabled);
+ if(de) de->setEnabled(true);
+ }
+}
+
+Entry *DownloadDialog::getEntry()
+{
+ if(m_curtab == 0) m_entryitem = lv_r->currentItem();
+ else if(m_curtab == 1) m_entryitem = lv_d->currentItem();
+ else if(m_curtab == 2) m_entryitem = lv_l->currentItem();
+ else return 0;
+
+ m_entryname = m_entryitem->text(0);
+
+ for(Entry *e = m_entries.first(); e; e = m_entries.next())
+ {
+ if(e->name() == m_entryname) return e;
+ }
+
+ return 0;
+}
+
+void DownloadDialog::slotPage(QWidget *w)
+{
+ Provider *p;
+
+ kdDebug() << "changed widget!!!" << endl;
+
+ if(m_map.find(w) == m_map.end()) return;
+
+ m_page = w;
+
+ lv_r = *(m_map[w]->at(0));
+ lv_d = *(m_map[w]->at(1));
+ lv_l = *(m_map[w]->at(2));
+ p = m_providers[w];
+ m_rt = m_rts[w];
+
+ kdDebug() << "valid change!!!; lv_r = " << lv_r << endl;
+
+ if(m_engine) return;
+
+ if(!m_filter.isEmpty()) return;
+
+ lv_r->clear();
+ lv_d->clear();
+ lv_l->clear();
+
+ kdDebug() << "-- fetch -- " << p->downloadUrl() << endl;
+
+ loadProvider(p);
+}
+
+void DownloadDialog::loadProvider(Provider *p)
+{
+ KIO::TransferJob *job = KIO::get(p->downloadUrl());
+
+ m_jobs[job] = p;
+
+ connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)));
+ connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)),
+ SLOT(slotData(KIO::Job*, const QByteArray&)));
+}
+
+void DownloadDialog::setType(QString type)
+{
+ m_filter = type;
+}
+
+void DownloadDialog::setProviderList(const QString& providerList)
+{
+ m_providerlist = providerList;
+}
+
+void DownloadDialog::slotOk()
+{
+}
+
+void DownloadDialog::slotApply()
+{
+}
+
+void DownloadDialog::open(const QString& type, const QString& caption)
+{
+ DownloadDialog d(0, caption);
+ d.setType(type);
+ d.load();
+ d.exec();
+}
+
+void DownloadDialog::slotFinish()
+{
+ showPage(1);
+ //updateBackground();
+}
+
diff --git a/lib/compatibility/knewstuff/downloaddialog.h b/lib/compatibility/knewstuff/downloaddialog.h
new file mode 100644
index 00000000..34b2b22b
--- /dev/null
+++ b/lib/compatibility/knewstuff/downloaddialog.h
@@ -0,0 +1,237 @@
+/*
+ This file is part of KNewStuff.
+ Copyright (c) 2003 Josef Spillner <spillner@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.
+*/
+#ifndef KNEWSTUFF_DOWNLOADDIALOG_H
+#define KNEWSTUFF_DOWNLOADDIALOG_H
+
+#include <kdialogbase.h>
+#include <knewstuff/provider.h>
+
+namespace KIO
+{
+ class Job;
+}
+
+class KListView;
+class QTextBrowser;
+class QFrame;
+class KNewStuffGeneric;
+
+namespace KNS
+{
+
+class ProviderLoader;
+class Entry;
+class Provider;
+class Engine;
+
+/**
+ * @short Common download dialog for data browsing and installation.
+ *
+ * It provides an easy-to-use convenience method named open() which does all
+ * the work, unless a more complex operation is needed.
+ * \code
+ * KNewStuff::DownloadDialog::open("kdesktop/wallpapers");
+ * \endcode
+ *
+ * @author Josef Spillner (spillner@kde.org)
+ * \par Maintainer:
+ * Josef Spillner (spillner@kde.org)
+ */
+class KDE_EXPORT DownloadDialog : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ /**
+ Constructor.
+
+ @param engine a pre-built engine object, or NULL if the download
+ dialog should create an engine on its own
+ @param parent the parent window
+ @param caption the dialog caption
+ */
+ DownloadDialog(Engine *engine, QWidget *parent, const QString& caption);
+
+ /**
+ Alternative constructor.
+ Always uses an internal engine.
+
+ @param parent the parent window
+ @param caption the dialog caption
+ */
+ DownloadDialog(QWidget *parent, const QString& caption);
+
+ /**
+ Destructor.
+ */
+ ~DownloadDialog();
+
+ /**
+ Restricts the display of available data to a certain data type.
+
+ @param type a Hotstuff data type such as "korganizer/calendar"
+ */
+ void setType(QString type);
+ // ### KDE 4.0: use const QString&
+
+ /**
+ Fetches descriptions of all available data, optionally considering
+ a previously set type.
+ */
+ void load();
+
+ /**
+ Explicitly uses this provider list instead of the one read from
+ the application configuration.
+
+ @param providerList the URL of the provider list
+
+ @since 3.4
+ */
+ void setProviderList(const QString& providerList);
+
+ /**
+ Fetches descriptions of all available data, optionally considering
+ a previously set type.
+
+ @param providerList the URl to the list of providers; if empty
+ we first try the ProvidersUrl from KGlobal::config, then we
+ fall back to a hardcoded value.
+ */
+ void load(QString providerList); // KDE4: merge with load() above
+
+ /**
+ Adds another provider to the download dialog.
+ This is normally done internally.
+
+ @param p the Hotstuff provider to be added
+ */
+ void addProvider(Provider *p);
+
+ /**
+ Adds an additional entry to the current provider.
+ This is normally done internally.
+
+ @param entry a Hotstuff data entry to be added
+ */
+ void addEntry(Entry *entry);
+
+ /**
+ Clears the entry list of the current provider.
+ This is normally done internally.
+ */
+ void clear();
+
+ /**
+ Opens the download dialog.
+ This is a convenience method which automatically sets up the dialog.
+ @see setType()
+ @see load()
+
+ @param type a data type such as "korganizer/calendar"
+ @param caption the dialog caption
+ */
+ static void open(const QString& type, const QString& caption);
+
+ /**
+ Constructor.
+
+ @param engine a pre-built engine object, or NULL if the download
+ dialog should create an engine on its own
+ @param parent the parent window
+ */
+ DownloadDialog(Engine *engine, QWidget *parent = 0);
+ // ### KDE 4.0: remove and make caption/parent argument optional
+
+ /**
+ Alternative constructor.
+ Always uses an internal engine.
+
+ @param parent the parent window
+ */
+ DownloadDialog(QWidget *parent = 0);
+ // ### KDE 4.0: remove and make caption/parent argument optional
+
+ /**
+ Opens the download dialog.
+ This is a convenience method which automatically sets up the dialog.
+ @see setType()
+ @see load()
+
+ @param type a data type such as "korganizer/calendar"
+ */
+ static void open(QString type);
+ // ### KDE 4.0: remove and make caption/parent argument optional
+
+ public slots:
+ /**
+ Availability of the provider list.
+
+ @param list list of Hotstuff providers
+ */
+ void slotProviders(Provider::List *list);
+
+ protected slots:
+ void slotApply();
+ void slotOk();
+
+ private slots:
+ void slotResult(KIO::Job *job);
+ void slotData(KIO::Job *job, const QByteArray &a);
+ void slotInstall();
+ void slotDetails();
+ void slotInstalled(KIO::Job *job);
+ void slotTab(int tab);
+ void slotSelected();
+ void slotPage(QWidget *w);
+ void slotFinish();
+
+ private:
+ void init(Engine *e);
+ Entry *getEntry();
+ void loadProvider(Provider *p);
+ void install(Entry *e);
+ int installStatus(Entry *e);
+
+ ProviderLoader *m_loader;
+ QString m_entryname;
+ KListView *lv_r, *lv_d, *lv_l;
+ QTextBrowser *m_rt;
+ QFrame *m_frame;
+ QListViewItem *m_entryitem;
+ QPtrList<Entry> m_entries;
+ Entry *m_entry;
+ KNewStuffGeneric *m_s;
+ int m_curtab;
+ QMap<QWidget*, QValueList<KListView*>* > m_map;
+ QMap<QWidget*, Provider*> m_providers;
+ QMap<QWidget*, QTextBrowser*> m_rts;
+ QMap<QWidget*, QValueList<QPushButton*>* > m_buttons;
+ QMap<KIO::Job*, Provider*> m_jobs;
+ QMap<KIO::Job*, QString> m_data;
+ QString m_filter;
+ QString m_providerlist;
+ Engine *m_engine;
+ QWidget *m_page;
+};
+
+}
+
+#endif
+
diff --git a/lib/compatibility/knewstuff/engine.cpp b/lib/compatibility/knewstuff/engine.cpp
new file mode 100644
index 00000000..c141aeeb
--- /dev/null
+++ b/lib/compatibility/knewstuff/engine.cpp
@@ -0,0 +1,420 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+
+#include <qcstring.h>
+#include <qdom.h>
+#include <qfileinfo.h>
+
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kio/job.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstandarddirs.h>
+
+#include "knewstuff.h"
+#include "downloaddialog.h"
+#include "uploaddialog.h"
+#include "providerdialog.h"
+
+#include "engine.h"
+#include "engine.moc"
+
+using namespace KNS;
+
+Engine::Engine( KNewStuff *newStuff, const QString &type,
+ QWidget *parentWidget ) :
+ mParentWidget( parentWidget ), mDownloadDialog( 0 ),
+ mUploadDialog( 0 ), mProviderDialog( 0 ), mUploadProvider( 0 ),
+ mNewStuff( newStuff ), mType( type )
+{
+ mProviderLoader = new ProviderLoader( mParentWidget );
+
+ mNewStuffList.setAutoDelete( true );
+}
+
+Engine::Engine( KNewStuff *newStuff, const QString &type,
+ const QString &providerList, QWidget *parentWidget ) :
+ mParentWidget( parentWidget ),
+ mDownloadDialog( 0 ), mUploadDialog( 0 ),
+ mProviderDialog( 0 ), mUploadProvider( 0 ),
+ mProviderList( providerList ), mNewStuff( newStuff ),
+ mType( type )
+{
+ mProviderLoader = new ProviderLoader( mParentWidget );
+ mNewStuffList.setAutoDelete( true );
+}
+
+Engine::~Engine()
+{
+ delete mProviderLoader;
+
+ delete mUploadDialog;
+ delete mDownloadDialog;
+}
+
+void Engine::download()
+{
+ kdDebug(5850) << "Engine::download()" << endl;
+
+ connect( mProviderLoader,
+ SIGNAL( providersLoaded( Provider::List * ) ),
+ SLOT( getMetaInformation( Provider::List * ) ) );
+ mProviderLoader->load( mType, mProviderList );
+}
+
+void Engine::getMetaInformation( Provider::List *providers )
+{
+ mProviderLoader->disconnect();
+
+ mNewStuffJobData.clear();
+
+ if ( !mDownloadDialog ) {
+ mDownloadDialog = new DownloadDialog( this, mParentWidget );
+ mDownloadDialog->show();
+ }
+ mDownloadDialog->clear();
+
+ Provider *p;
+ for ( p = providers->first(); p; p = providers->next() ) {
+ if ( p->downloadUrl().isEmpty() ) continue;
+
+ KIO::TransferJob *job = KIO::get( p->downloadUrl() );
+ connect( job, SIGNAL( result( KIO::Job * ) ),
+ SLOT( slotNewStuffJobResult( KIO::Job * ) ) );
+ connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
+ SLOT( slotNewStuffJobData( KIO::Job *, const QByteArray & ) ) );
+
+ mNewStuffJobData.insert( job, "" );
+ mProviderJobs[ job ] = p;
+ }
+}
+
+void Engine::slotNewStuffJobData( KIO::Job *job, const QByteArray &data )
+{
+ if ( data.isEmpty() ) return;
+
+ kdDebug(5850) << "Engine:slotNewStuffJobData()" << endl;
+
+ QCString str( data, data.size() + 1 );
+
+ mNewStuffJobData[ job ].append( QString::fromUtf8( str ) );
+}
+
+void Engine::slotNewStuffJobResult( KIO::Job *job )
+{
+ if ( job->error() ) {
+ kdDebug(5850) << "Error downloading new stuff descriptions." << endl;
+ job->showErrorDialog( mParentWidget );
+ } else {
+ QString knewstuffDoc = mNewStuffJobData[ job ];
+
+ kdDebug(5850) << "---START---" << endl << knewstuffDoc << "---END---" << endl;
+
+ mDownloadDialog->addProvider( mProviderJobs[ job ] );
+
+ QDomDocument doc;
+ if ( !doc.setContent( knewstuffDoc ) ) {
+ kdDebug(5850) << "Error parsing knewstuff.xml." << endl;
+ return;
+ } else {
+ QDomElement knewstuff = doc.documentElement();
+
+ if ( knewstuff.isNull() ) {
+ kdDebug(5850) << "No document in knewstuffproviders.xml." << endl;
+ } else {
+ QDomNode p;
+ for ( p = knewstuff.firstChild(); !p.isNull(); p = p.nextSibling() ) {
+ QDomElement stuff = p.toElement();
+ if ( stuff.tagName() != "stuff" ) continue;
+ if ( stuff.attribute("type", mType) != mType ) continue;
+
+ Entry *entry = new Entry( stuff );
+ mNewStuffList.append( entry );
+
+ mDownloadDialog->show();
+
+ mDownloadDialog->addEntry( entry );
+
+ kdDebug(5850) << "KNEWSTUFF: " << entry->name() << endl;
+
+ kdDebug(5850) << " SUMMARY: " << entry->summary() << endl;
+ kdDebug(5850) << " VERSION: " << entry->version() << endl;
+ kdDebug(5850) << " RELEASEDATE: " << entry->releaseDate().toString() << endl;
+ kdDebug(5850) << " RATING: " << entry->rating() << endl;
+
+ kdDebug(5850) << " LANGS: " << entry->langs().join(", ") << endl;
+ }
+ }
+ }
+ }
+
+ mNewStuffJobData.remove( job );
+ mProviderJobs.remove( job );
+
+ if ( mNewStuffJobData.count() == 0 ) {
+ mDownloadDialog->show();
+ mDownloadDialog->raise();
+ }
+}
+
+void Engine::download( Entry *entry )
+{
+ kdDebug(5850) << "Engine::download(entry)" << endl;
+
+ KURL source = entry->payload();
+ mDownloadDestination = mNewStuff->downloadDestination( entry );
+
+ if ( mDownloadDestination.isEmpty() ) {
+ kdDebug(5850) << "Empty downloadDestination. Cancelling download." << endl;
+ return;
+ }
+
+ KURL destination = KURL( mDownloadDestination );
+
+ kdDebug(5850) << " SOURCE: " << source.url() << endl;
+ kdDebug(5850) << " DESTINATION: " << destination.url() << endl;
+
+ KIO::FileCopyJob *job = KIO::file_copy( source, destination, -1, true );
+ connect( job, SIGNAL( result( KIO::Job * ) ),
+ SLOT( slotDownloadJobResult( KIO::Job * ) ) );
+}
+
+void Engine::slotDownloadJobResult( KIO::Job *job )
+{
+ if ( job->error() ) {
+ kdDebug(5850) << "Error downloading new stuff payload." << endl;
+ job->showErrorDialog( mParentWidget );
+ return;
+ }
+
+ if ( mNewStuff->install( mDownloadDestination ) ) {
+ if ( !mIgnoreInstallResult ) {
+ KMessageBox::information( mParentWidget,
+ i18n("Successfully installed hot new stuff.") );
+ }
+ } else
+ if ( !mIgnoreInstallResult ){
+ KMessageBox::error( mParentWidget,
+ i18n("Failed to install hot new stuff.") );
+ }
+}
+
+void Engine::upload(const QString &fileName, const QString &previewName )
+{
+ mUploadFile = fileName;
+ mPreviewFile = previewName;
+
+ connect( mProviderLoader,
+ SIGNAL( providersLoaded( Provider::List * ) ),
+ SLOT( selectUploadProvider( Provider::List * ) ) );
+ mProviderLoader->load( mType );
+}
+
+void Engine::selectUploadProvider( Provider::List *providers )
+{
+ kdDebug(5850) << "Engine:selectUploadProvider()" << endl;
+
+ mProviderLoader->disconnect();
+
+ if ( !mProviderDialog ) {
+ mProviderDialog = new ProviderDialog( this, mParentWidget );
+ }
+
+ mProviderDialog->clear();
+
+ mProviderDialog->show();
+ mProviderDialog->raise();
+
+ for( Provider *p = providers->first(); p; p = providers->next() ) {
+ mProviderDialog->addProvider( p );
+ }
+}
+
+void Engine::requestMetaInformation( Provider *provider )
+{
+ mUploadProvider = provider;
+
+ if ( !mUploadDialog ) {
+ mUploadDialog = new UploadDialog( this, mParentWidget );
+ }
+ mUploadDialog->setPreviewFile( mPreviewFile );
+ mUploadDialog->show();
+ mUploadDialog->raise();
+}
+
+void Engine::upload( Entry *entry )
+{
+ if ( mUploadFile.isNull()) {
+ mUploadFile = entry->fullName();
+ mUploadFile = locateLocal( "data", QString(kapp->instanceName()) + "/upload/" + mUploadFile );
+
+ if ( !mNewStuff->createUploadFile( mUploadFile ) ) {
+ KMessageBox::error( mParentWidget, i18n("Unable to create file to upload.") );
+ emit uploadFinished( false );
+ return;
+ }
+ }
+
+ QString lang = entry->langs().first();
+ QFileInfo fi( mUploadFile );
+ entry->setPayload( KURL::fromPathOrURL( fi.fileName() ), lang );
+
+ if ( !createMetaFile( entry ) ) {
+ emit uploadFinished( false );
+ return;
+ }
+
+ QString text = i18n("The files to be uploaded have been created at:\n");
+ text.append( i18n("Data file: %1\n").arg( mUploadFile) );
+ if (!mPreviewFile.isEmpty()) {
+ text.append( i18n("Preview image: %1\n").arg( mPreviewFile) );
+ }
+ text.append( i18n("Content information: %1\n").arg( mUploadMetaFile) );
+ text.append( i18n("Those files can now be uploaded.\n") );
+ text.append( i18n("Beware that any people might have access to them at any time.") );
+
+ QString caption = i18n("Upload Files");
+
+ if ( mUploadProvider->noUpload() ) {
+ KURL noUploadUrl = mUploadProvider->noUploadUrl();
+ if ( noUploadUrl.isEmpty() ) {
+ text.append( i18n("Please upload the files manually.") );
+ KMessageBox::information( mParentWidget, text, caption );
+ } else {
+ int result = KMessageBox::questionYesNo( mParentWidget, text, caption,
+ i18n("Upload Info"),
+ KStdGuiItem::close() );
+ if ( result == KMessageBox::Yes ) {
+ kapp->invokeBrowser( noUploadUrl.url() );
+ }
+ }
+ } else {
+ int result = KMessageBox::questionYesNo( mParentWidget, text, caption,
+ i18n("&Upload"), KStdGuiItem::cancel() );
+ if ( result == KMessageBox::Yes ) {
+ KURL destination = mUploadProvider->uploadUrl();
+ destination.setFileName( fi.fileName() );
+
+ KIO::FileCopyJob *job = KIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination );
+ connect( job, SIGNAL( result( KIO::Job * ) ),
+ SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) );
+ } else {
+ emit uploadFinished( false );
+ }
+ }
+}
+
+bool Engine::createMetaFile( Entry *entry )
+{
+ QDomDocument doc("knewstuff");
+ doc.appendChild( doc.createProcessingInstruction(
+ "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
+ QDomElement de = doc.createElement("knewstuff");
+ doc.appendChild( de );
+
+ entry->setType(type());
+ de.appendChild( entry->createDomElement( doc, de ) );
+
+ kdDebug(5850) << "--DOM START--" << endl << doc.toString()
+ << "--DOM_END--" << endl;
+
+ if ( mUploadMetaFile.isNull() ) {
+ mUploadMetaFile = entry->fullName() + ".meta";
+ mUploadMetaFile = locateLocal( "data", QString(kapp->instanceName()) + "/upload/" + mUploadMetaFile );
+ }
+
+ QFile f( mUploadMetaFile );
+ if ( !f.open( IO_WriteOnly ) ) {
+ mUploadMetaFile = QString::null;
+ return false;
+ }
+
+ QTextStream ts( &f );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << doc.toString();
+
+ f.close();
+
+ return true;
+}
+
+void Engine::slotUploadPayloadJobResult( KIO::Job *job )
+{
+ if ( job->error() ) {
+ kdDebug(5850) << "Error uploading new stuff payload." << endl;
+ job->showErrorDialog( mParentWidget );
+ emit uploadFinished( false );
+ return;
+ }
+
+ if (mPreviewFile.isEmpty()) {
+ slotUploadPreviewJobResult(job);
+ return;
+ }
+
+ QFileInfo fi( mPreviewFile );
+
+ KURL previewDestination = mUploadProvider->uploadUrl();
+ previewDestination.setFileName( fi.fileName() );
+
+ KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination );
+ connect( newJob, SIGNAL( result( KIO::Job * ) ),
+ SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) );
+}
+
+void Engine::slotUploadPreviewJobResult( KIO::Job *job )
+{
+ if ( job->error() ) {
+ kdDebug(5850) << "Error uploading new stuff preview." << endl;
+ job->showErrorDialog( mParentWidget );
+ emit uploadFinished( true );
+ return;
+ }
+
+ QFileInfo fi( mUploadMetaFile );
+
+ KURL metaDestination = mUploadProvider->uploadUrl();
+ metaDestination.setFileName( fi.fileName() );
+
+ KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination );
+ connect( newJob, SIGNAL( result( KIO::Job * ) ),
+ SLOT( slotUploadMetaJobResult( KIO::Job * ) ) );
+}
+
+void Engine::slotUploadMetaJobResult( KIO::Job *job )
+{
+ mUploadMetaFile = QString::null;
+ if ( job->error() ) {
+ kdDebug(5850) << "Error uploading new stuff metadata." << endl;
+ job->showErrorDialog( mParentWidget );
+ emit uploadFinished( false );
+ return;
+ }
+
+ KMessageBox::information( mParentWidget,
+ i18n("Successfully uploaded new stuff.") );
+ emit uploadFinished( true );
+}
+
+void Engine::ignoreInstallResult(bool ignore)
+{
+ mIgnoreInstallResult = ignore;
+}
diff --git a/lib/compatibility/knewstuff/engine.h b/lib/compatibility/knewstuff/engine.h
new file mode 100644
index 00000000..dd3f2b30
--- /dev/null
+++ b/lib/compatibility/knewstuff/engine.h
@@ -0,0 +1,189 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+#ifndef KNEWSTUFF_ENGINE_H
+#define KNEWSTUFF_ENGINE_H
+
+#include <qmap.h>
+#include <qobject.h>
+#include <qstring.h>
+
+#include "entry.h"
+#include "provider.h"
+
+namespace KIO { class Job; }
+
+class KNewStuff;
+
+namespace KNS {
+
+class DownloadDialog;
+class UploadDialog;
+class ProviderDialog;
+
+/**
+ * @short Central class combining all possible KNewStuff operations.
+ *
+ * In most cases, Engine objects are built and used internally.
+ * Using this class explicitely does however give fine-grained control about the
+ * upload and download operations.
+ *
+ * @author Cornelius Schumacher (schumacher@kde.org)
+ * \par Maintainer:
+ * Josef Spillner (spillner@kde.org)
+ */
+class Engine : public QObject
+{
+ Q_OBJECT
+ public:
+ /**
+ Constructor.
+
+ @param newStuff a KNewStuff object
+ @param type the Hotstuff data type such as "korganizer/calendar"
+ @param parentWidget the parent window
+ */
+ Engine( KNewStuff *newStuff, const QString &type, QWidget *parentWidget = 0 );
+ /**
+ Constructor.
+
+ @param newStuff a KNewStuff object
+ @param type the Hotstuff data type such as "korganizer/calendar"
+ @param providerList the URL of the provider list
+ @param parentWidget the parent window
+ */
+ Engine( KNewStuff *newStuff, const QString &type, const QString &providerList, QWidget *parentWidget = 0 );
+
+ /**
+ Destructor.
+ */
+ virtual ~Engine();
+
+ /**
+ Returns the previously set data type.
+
+ @return the Hotstuff data type
+ */
+ QString type() const { return mType; }
+
+ /**
+ Returns the previously set parent widget.
+
+ @return parent widget
+ */
+ QWidget *parentWidget() const { return mParentWidget; }
+
+ /**
+ Initiates the download process, retrieving provider lists and invoking
+ the download dialog.
+ */
+ void download();
+
+ /**
+ Initiates the upload process, invoking the provider selection dialog
+ and the file upload dialog.
+
+ @param fileName name of the payload data file
+ @param previewName name of the preview image file
+ */
+ void upload( const QString &fileName = QString::null, const QString &previewName = QString::null );
+
+ /**
+ Downloads the specified data file.
+
+ @param entry the Hotstuff data object to be downloaded
+ */
+ void download( Entry *entry );
+
+ /**
+ Asynchronous lookup of provider information such as upload and
+ download locations, icon etc.
+
+ @param provider the Hotstuff provider to request information from
+ */
+ void requestMetaInformation( Provider *provider );
+
+ /**
+ Uploads the specified data file to the provider-dependent location.
+
+ @param entry the Hotstuff data object to be uploaded
+ */
+ void upload( Entry *entry );
+
+ /**
+ Ignores the return value of the install method. Used internally to
+ avoid showing of the success/failure dialog when installation is done
+ in another place, like in @ref KNewStuffSecure
+ */
+ void ignoreInstallResult(bool ignore);
+
+ signals:
+ /** Emitted when the upload has finished.
+ @param result indicates the success/failure of the upload
+ */
+ void uploadFinished( bool result );
+ protected slots:
+ void getMetaInformation( Provider::List *providers );
+ void selectUploadProvider( Provider::List *providers );
+
+ void slotNewStuffJobData( KIO::Job *job, const QByteArray &data );
+ void slotNewStuffJobResult( KIO::Job *job );
+
+ void slotDownloadJobResult( KIO::Job *job );
+
+ void slotUploadPayloadJobResult( KIO::Job *job );
+ void slotUploadPreviewJobResult (KIO::Job *job );
+ void slotUploadMetaJobResult( KIO::Job *job );
+
+ protected:
+ bool createMetaFile( Entry * );
+
+ private:
+ QWidget *mParentWidget;
+
+ ProviderLoader *mProviderLoader;
+
+ QMap<KIO::Job *,QString> mNewStuffJobData;
+ QMap<KIO::Job *,Provider *> mProviderJobs;
+
+ QPtrList<Entry> mNewStuffList;
+
+ DownloadDialog *mDownloadDialog;
+ UploadDialog *mUploadDialog;
+ ProviderDialog *mProviderDialog;
+
+ QString mDownloadDestination;
+
+ Provider *mUploadProvider;
+
+ QString mUploadMetaFile;
+ QString mUploadFile;
+ QString mPreviewFile;
+ QString mProviderList;
+
+ KNewStuff *mNewStuff;
+
+ QString mType;
+
+ bool mIgnoreInstallResult;
+};
+
+}
+
+#endif
diff --git a/lib/compatibility/knewstuff/entry.cpp b/lib/compatibility/knewstuff/entry.cpp
new file mode 100644
index 00000000..1d4f7e72
--- /dev/null
+++ b/lib/compatibility/knewstuff/entry.cpp
@@ -0,0 +1,294 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+
+#include "entry.h"
+
+#include <kglobal.h>
+#include <klocale.h>
+
+using namespace KNS;
+
+Entry::Entry() :
+ mRelease( 0 ), mReleaseDate( QDate::currentDate() ), mRating( 0 ),
+ mDownloads( 0 )
+{
+}
+
+Entry::Entry( const QDomElement &e )
+{
+ parseDomElement( e );
+}
+
+Entry::~Entry()
+{
+}
+
+
+void Entry::setName( const QString &name )
+{
+ mName = name;
+}
+
+QString Entry::name() const
+{
+ return mName;
+}
+
+
+void Entry::setType( const QString &type )
+{
+ mType = type;
+}
+
+QString Entry::type() const
+{
+ return mType;
+}
+
+
+void Entry::setAuthor( const QString &author )
+{
+ mAuthor = author;
+}
+
+QString Entry::author() const
+{
+ return mAuthor;
+}
+
+
+void Entry::setLicence( const QString &license )
+{
+ mLicence = license;
+}
+
+QString Entry::license() const
+{
+ return mLicence;
+}
+
+
+void Entry::setSummary( const QString &text, const QString &lang )
+{
+ mSummaryMap.insert( lang, text );
+
+ if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
+}
+
+QString Entry::summary( const QString &lang ) const
+{
+ if ( mSummaryMap.isEmpty() ) return QString::null;
+
+ if ( !mSummaryMap[ lang ].isEmpty() ) return mSummaryMap[ lang ];
+ else {
+ QStringList langs = KGlobal::locale()->languageList();
+ for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ if( !mSummaryMap[ *it ].isEmpty() ) return mSummaryMap[ *it ];
+ }
+ if ( !mSummaryMap[ QString::null ].isEmpty() ) return mSummaryMap[ QString::null ];
+ else return *(mSummaryMap.begin());
+}
+
+
+void Entry::setVersion( const QString &version )
+{
+ mVersion = version;
+}
+
+QString Entry::version() const
+{
+ return mVersion;
+}
+
+
+void Entry::setRelease( int release )
+{
+ mRelease = release;
+}
+
+int Entry::release() const
+{
+ return mRelease;
+}
+
+
+void Entry::setReleaseDate( const QDate &d )
+{
+ mReleaseDate = d;
+}
+
+QDate Entry::releaseDate() const
+{
+ return mReleaseDate;
+}
+
+
+void Entry::setPayload( const KURL &url, const QString &lang )
+{
+ mPayloadMap.insert( lang, url );
+
+ if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
+}
+
+KURL Entry::payload( const QString &lang ) const
+{
+ KURL payload = mPayloadMap[ lang ];
+ if ( payload.isEmpty() ) {
+ QStringList langs = KGlobal::locale()->languageList();
+ for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ if( !mPayloadMap[ *it ].isEmpty() ) return mPayloadMap[ *it ];
+ }
+ if ( payload.isEmpty() ) payload = mPayloadMap [ QString::null ];
+ if ( payload.isEmpty() && !mPayloadMap.isEmpty() ) {
+ payload = *(mPayloadMap.begin());
+ }
+ return payload;
+}
+
+
+void Entry::setPreview( const KURL &url, const QString &lang )
+{
+ mPreviewMap.insert( lang, url );
+
+ if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
+}
+
+KURL Entry::preview( const QString &lang ) const
+{
+ KURL preview = mPreviewMap[ lang ];
+ if ( preview.isEmpty() ) {
+ QStringList langs = KGlobal::locale()->languageList();
+ for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ if( !mPreviewMap[ *it ].isEmpty() ) return mPreviewMap[ *it ];
+ }
+ if ( preview.isEmpty() ) preview = mPreviewMap [ QString::null ];
+ if ( preview.isEmpty() && !mPreviewMap.isEmpty() ) {
+ preview = *(mPreviewMap.begin());
+ }
+ return preview;
+}
+
+
+void Entry::setRating( int rating )
+{
+ mRating = rating;
+}
+
+int Entry::rating()
+{
+ return mRating;
+}
+
+
+void Entry::setDownloads( int downloads )
+{
+ mDownloads = downloads;
+}
+
+int Entry::downloads()
+{
+ return mDownloads;
+}
+
+QString Entry::fullName()
+{
+ return name() + "-" + version() + "-" + QString::number( release() );
+}
+
+QStringList Entry::langs()
+{
+ return mLangs;
+}
+
+void Entry::parseDomElement( const QDomElement &element )
+{
+ if ( element.tagName() != "stuff" ) return;
+ mType = element.attribute("type");
+
+ QDomNode n;
+ for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ QDomElement e = n.toElement();
+ if ( e.tagName() == "name" ) setName( e.text().stripWhiteSpace() );
+ if ( e.tagName() == "author" ) setAuthor( e.text().stripWhiteSpace() );
+ if ( e.tagName() == "licence" ) setLicence( e.text().stripWhiteSpace() );
+ if ( e.tagName() == "summary" ) {
+ QString lang = e.attribute( "lang" );
+ setSummary( e.text().stripWhiteSpace(), lang );
+ }
+ if ( e.tagName() == "version" ) setVersion( e.text().stripWhiteSpace() );
+ if ( e.tagName() == "release" ) setRelease( e.text().toInt() );
+ if ( e.tagName() == "releasedate" ) {
+ QDate date = QDate::fromString( e.text().stripWhiteSpace(), Qt::ISODate );
+ setReleaseDate( date );
+ }
+ if ( e.tagName() == "preview" ) {
+ QString lang = e.attribute( "lang" );
+ setPreview( KURL( e.text().stripWhiteSpace() ), lang );
+ }
+ if ( e.tagName() == "payload" ) {
+ QString lang = e.attribute( "lang" );
+ setPayload( KURL( e.text().stripWhiteSpace() ), lang );
+ }
+ if ( e.tagName() == "rating" ) setRating( e.text().toInt() );
+ if ( e.tagName() == "downloads" ) setDownloads( e.text().toInt() );
+ }
+}
+
+QDomElement Entry::createDomElement( QDomDocument &doc,
+ QDomElement &parent )
+{
+ QDomElement entry = doc.createElement( "stuff" );
+ entry.setAttribute("type", mType);
+ parent.appendChild( entry );
+
+ addElement( doc, entry, "name", name() );
+ addElement( doc, entry, "author", author() );
+ addElement( doc, entry, "licence", license() );
+ addElement( doc, entry, "version", version() );
+ addElement( doc, entry, "release", QString::number( release() ) );
+ addElement( doc, entry, "rating", QString::number( rating() ) );
+ addElement( doc, entry, "downloads", QString::number( downloads() ) );
+
+ addElement( doc, entry, "releasedate",
+ releaseDate().toString( Qt::ISODate ) );
+
+ QStringList ls = langs();
+ QStringList::ConstIterator it;
+ for( it = ls.begin(); it != ls.end(); ++it ) {
+ QDomElement e = addElement( doc, entry, "summary", summary( *it ) );
+ e.setAttribute( "lang", *it );
+ e = addElement( doc, entry, "preview", preview( *it ).url() );
+ e.setAttribute( "lang", *it );
+ e = addElement( doc, entry, "payload", payload( *it ).url() );
+ e.setAttribute( "lang", *it );
+ }
+
+ return entry;
+}
+
+QDomElement Entry::addElement( QDomDocument &doc, QDomElement &parent,
+ const QString &tag, const QString &value )
+{
+ QDomElement n = doc.createElement( tag );
+ n.appendChild( doc.createTextNode( value ) );
+ parent.appendChild( n );
+
+ return n;
+}
diff --git a/lib/compatibility/knewstuff/entry.h b/lib/compatibility/knewstuff/entry.h
new file mode 100644
index 00000000..3a16964d
--- /dev/null
+++ b/lib/compatibility/knewstuff/entry.h
@@ -0,0 +1,257 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+#ifndef KNEWSTUFF_ENTRY_H
+#define KNEWSTUFF_ENTRY_H
+
+#include <qdatetime.h>
+#include <qdom.h>
+#include <qmap.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include <kurl.h>
+
+namespace KNS {
+
+/**
+ * @short KNewStuff data entry container.
+ *
+ * This class provides accessor methods to the data objects
+ * as used by KNewStuff.
+ * It should probably not be used directly by the application.
+ *
+ * @author Cornelius Schumacher (schumacher@kde.org)
+ * \par Maintainer:
+ * Josef Spillner (spillner@kde.org)
+ */
+class KDE_EXPORT Entry
+{
+ public:
+ Entry();
+ /**
+ * Constructor.
+ */
+ Entry( const QDomElement & );
+
+ /**
+ * Destructor.
+ */
+ ~Entry();
+
+ /**
+ * Sets the (unique) name for this data object.
+ */
+ void setName( const QString & );
+
+ /**
+ * Retrieve the name of the data object.
+ *
+ * @return object name
+ */
+ QString name() const;
+
+ /**
+ * Sets the application type, e.g. 'kdesktop/wallpaper'.
+ */
+ void setType( const QString & );
+
+ /**
+ * Retrieve the type of the data object.
+ *
+ * @return object type
+ */
+ QString type() const;
+
+ /**
+ * Sets the full name of the object's author.
+ */
+ void setAuthor( const QString & );
+
+ /**
+ * Retrieve the author's name of the object.
+ *
+ * @return object author
+ */
+ QString author() const;
+
+ /**
+ * Sets the license (abbreviation) applicable to the object.
+ */
+ void setLicence( const QString & );
+
+ /**
+ * Retrieve the license name of the object.
+ *
+ * @return object license
+ */
+ QString license() const;
+
+ /**
+ * Sets a short description on what the object is all about.
+ */
+ void setSummary( const QString &, const QString &lang = QString::null );
+
+ /**
+ * Retrieve a short description about the object.
+ *
+ * @param lang preferred language, or QString::null for KDE default
+ * @return object description
+ */
+ QString summary( const QString &lang = QString::null ) const;
+
+ /**
+ * Sets the version number.
+ */
+ void setVersion( const QString & );
+
+ /**
+ * Retrieve the version string of the object.
+ *
+ * @return object version
+ */
+ QString version() const;
+
+ /**
+ * Sets the release number, which is increased for feature-equal objects
+ * with the same version number, but slightly updated contents.
+ */
+ void setRelease( int );
+
+ /**
+ * Retrieve the release number of the object
+ *
+ * @return object release
+ */
+ int release() const;
+
+ /**
+ * Sets the release date.
+ */
+ void setReleaseDate( const QDate & );
+
+ /**
+ * Retrieve the date of the object's publication.
+ *
+ * @return object release date
+ */
+ QDate releaseDate() const;
+
+ /**
+ * Sets the object's file.
+ */
+ void setPayload( const KURL &, const QString &lang = QString::null );
+
+ /**
+ * Retrieve the file name of the object.
+ *
+ * @param lang preferred language, or QString::null for KDE default
+ * @return object filename
+ */
+ KURL payload( const QString &lang = QString::null ) const;
+
+ /**
+ * Sets the object's preview file, if available. This should be a
+ * picture file.
+ */
+ void setPreview( const KURL &, const QString &lang = QString::null );
+
+ /**
+ * Retrieve the file name of an image containing a preview of the object.
+ *
+ * @param lang preferred language, or QString::null for KDE default
+ * @return object preview filename
+ */
+ KURL preview( const QString &lang = QString::null ) const;
+
+ /**
+ * Sets the rating between 0 (worst) and 10 (best).
+ *
+ * @internal
+ */
+ void setRating( int );
+
+ /**
+ * Retrieve the rating for the object, which has been determined by its
+ * users and thus might change over time.
+ *
+ * @return object rating
+ */
+ int rating();
+
+ /**
+ * Sets the number of downloads.
+ *
+ * @internal
+ */
+ void setDownloads( int );
+
+ /**
+ * Retrieve the download count for the object, which has been determined
+ * by its hosting sites and thus might change over time.
+ *
+ * @return object download count
+ */
+ int downloads();
+
+ /**
+ * Return the full name for the meta information. It is constructed as
+ * name-version-release.
+ */
+ QString fullName();
+
+ /**
+ * Return the list of languages this object supports.
+ */
+ QStringList langs();
+
+ /**
+ * @internal
+ */
+ void parseDomElement( const QDomElement & );
+
+ /**
+ * @internal
+ */
+ QDomElement createDomElement( QDomDocument &, QDomElement &parent );
+
+ protected:
+ QDomElement addElement( QDomDocument &doc, QDomElement &parent,
+ const QString &tag, const QString &value );
+
+ private:
+ QString mName;
+ QString mType;
+ QString mAuthor;
+ QString mLicence;
+ QMap<QString,QString> mSummaryMap;
+ QString mVersion;
+ int mRelease;
+ QDate mReleaseDate;
+ QMap<QString,KURL> mPayloadMap;
+ QMap<QString,KURL> mPreviewMap;
+ int mRating;
+ int mDownloads;
+
+ QStringList mLangs;
+};
+
+}
+
+#endif
diff --git a/lib/compatibility/knewstuff/knewstuff.cpp b/lib/compatibility/knewstuff/knewstuff.cpp
new file mode 100644
index 00000000..5387e647
--- /dev/null
+++ b/lib/compatibility/knewstuff/knewstuff.cpp
@@ -0,0 +1,86 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+
+#include <kaction.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+
+#include "engine.h"
+
+#include "knewstuff.h"
+
+using namespace KNS;
+
+KAction* KNS::standardAction(const QString& what,
+ const QObject *recvr,
+ const char *slot, KActionCollection* parent,
+ const char *name)
+{
+ return new KAction(i18n("Download New %1").arg(what), "knewstuff",
+ 0, recvr, slot, parent, name);
+}
+
+KNewStuff::KNewStuff( const QString &type, QWidget *parentWidget )
+{
+ mEngine = new Engine( this, type, parentWidget );
+}
+
+KNewStuff::KNewStuff( const QString &type, const QString &providerList, QWidget *parentWidget )
+{
+ mEngine = new Engine( this, type, providerList, parentWidget );
+}
+
+QString KNewStuff::type() const
+{
+ return mEngine->type();
+}
+
+QWidget *KNewStuff::parentWidget() const
+{
+ return mEngine->parentWidget();
+}
+
+KNewStuff::~KNewStuff()
+{
+ delete mEngine;
+}
+
+void KNewStuff::download()
+{
+ mEngine->download();
+}
+
+QString KNewStuff::downloadDestination( Entry * )
+{
+ return KGlobal::dirs()->saveLocation( "tmp" ) +
+ KApplication::randomString( 10 );
+}
+
+void KNewStuff::upload()
+{
+ mEngine->upload();
+}
+
+void KNewStuff::upload( const QString &fileName, const QString previewName )
+{
+ mEngine->upload(fileName, previewName);
+}
diff --git a/lib/compatibility/knewstuff/knewstuff.h b/lib/compatibility/knewstuff/knewstuff.h
new file mode 100644
index 00000000..9d2d10ed
--- /dev/null
+++ b/lib/compatibility/knewstuff/knewstuff.h
@@ -0,0 +1,161 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+#ifndef KNEWSTUFF_H
+#define KNEWSTUFF_H
+
+#include <qstring.h>
+
+#include <kdemacros.h>
+
+class QObject;
+class QWidget;
+class KAction;
+class KActionCollection;
+
+namespace KNS {
+class Engine;
+class Entry;
+
+KAction* standardAction(const QString& what,
+ const QObject *recvr,
+ const char *slot,
+ KActionCollection* parent,
+ const char *name = 0);
+}
+
+/**
+ * @short This class provides the functionality to download and upload "new stuff".
+ *
+ * Applications have to subclass KNewStuff, implement the pure virtual functions
+ * and link to against libknewstuff.
+ *
+ * By calling download() the download process is started which means that a list
+ * of "providers" is fetched from a "master server", information about new stuff
+ * is collected from the providers and presented to the user. Selected entries
+ * get downloaded and installed to the application. The required functions to
+ * install new stuff are provided by implementing install(). The location where
+ * the downloaded files are stored can be customized by reimplementing
+ * downloadDestination().
+ *
+ * By calling upload() the upload process is started which means the user has to
+ * select a provider from the list fetched from the master server and to put in
+ * information about the entry to be uploaded. Then the file to be uploaded is
+ * fetched from the application by calling createUploadFile() and transfered to
+ * the upload destination specified in the provider list.
+ *
+ * @author Cornelius Schumacher (schumacher@kde.org)
+ * \par Maintainer:
+ * Josef Spillner (spillner@kde.org)
+ *
+ * @since 3.3
+ */
+class KDE_EXPORT KNewStuff
+{
+ public:
+ /**
+ Constructor.
+
+ @param type type of data to be handled, should be something like
+ korganizer/calendar, kword/template, kdesktop/wallpaper
+ @param parentWidget parent widget of dialogs opened by the KNewStuff
+ engine
+ */
+ KNewStuff( const QString &type, QWidget *parentWidget = 0 );
+
+ /**
+ Constructor.
+
+ @param type type of data to be handled, should be something like
+ korganizer/calendar, kword/template, kdesktop/wallpaper
+ @param providerList the URL of the provider list
+ @param parentWidget parent widget of dialogs opened by the KNewStuff
+ engine
+ */
+ KNewStuff( const QString &type, const QString &providerList, QWidget *parentWidget = 0 );
+ virtual ~KNewStuff();
+
+ /**
+ Return type of data.
+ */
+ QString type() const;
+
+ /**
+ Return parent widget.
+ */
+ QWidget *parentWidget() const;
+
+ /**
+ Start download process.
+ */
+ void download();
+
+ /**
+ Start upload process.
+ */
+ void upload();
+
+ /**
+ Upload with pre-defined files.
+ */
+ void upload( const QString &fileName, const QString previewName );
+
+ /**
+ Install file to application. The given fileName points to the file
+ downloaded by the KNewStuff engine. This is a temporary file by default.
+ The application can do whatever is needed to handle the information
+ contained in the file.
+
+ The function returns true, when the installation
+ was successful and false if were errors.
+
+ @param fileName name of downloaded file
+ */
+ virtual bool install( const QString &fileName ) = 0;
+ /**
+ Create a file to be uploaded to a "new stuff provider" and return the
+ filename. The format of the file is application specific. The only
+ constraint is that the corresponding install() implementation is able to
+ use the file.
+
+ @param fileName name of the file to be written
+ @return @c true on success, @c false on error.
+ */
+ virtual bool createUploadFile( const QString &fileName ) = 0;
+
+ /**
+ Return a filename which should be used as destination for downloading the
+ specified new stuff entry. Reimplement this function, if you don't want
+ the new stuff to be downloaded to a temporary file.
+ */
+ virtual QString downloadDestination( KNS::Entry *entry );
+
+
+ protected:
+ /**
+ Get the pointer to the engine. Needed by subclasses to access the KNS::Engine object.
+ */
+ KNS::Engine *engine() { return mEngine; }
+
+
+ private:
+ KNS::Engine *mEngine;
+};
+
+#endif
diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.cpp b/lib/compatibility/knewstuff/knewstuffgeneric.cpp
new file mode 100644
index 00000000..22673dac
--- /dev/null
+++ b/lib/compatibility/knewstuff/knewstuffgeneric.cpp
@@ -0,0 +1,140 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2003 Cornelius Schumacher <schumacher@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.
+*/
+
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qdir.h>
+
+#include <kdebug.h>
+#include <klocale.h>
+#include <kprocess.h>
+#include <kconfig.h>
+#include <kstandarddirs.h>
+#include <kmessagebox.h>
+#include <ktar.h>
+
+#include "entry.h"
+
+#include "knewstuffgeneric.h"
+
+using namespace std;
+
+KNewStuffGeneric::KNewStuffGeneric( const QString &type, QWidget *parent )
+ : KNewStuff( type, parent )
+{
+ mConfig = KGlobal::config();
+}
+
+KNewStuffGeneric::~KNewStuffGeneric()
+{
+}
+
+bool KNewStuffGeneric::install( const QString &fileName )
+{
+ kdDebug(5850) << "KNewStuffGeneric::install(): " << fileName << endl;
+ QStringList list, list2;
+
+ mConfig->setGroup("KNewStuff");
+
+ QString uncompress = mConfig->readEntry( "Uncompress" );
+ if ( !uncompress.isEmpty() ) {
+ kdDebug(5850) << "Uncompression method: " << uncompress << endl;
+ KTar tar(fileName, uncompress);
+ tar.open(IO_ReadOnly);
+ const KArchiveDirectory *dir = tar.directory();
+ dir->copyTo(destinationPath(0));
+ tar.close();
+ QFile::remove(fileName);
+ }
+
+ QString cmd = mConfig->readEntry( "InstallationCommand" );
+ if ( !cmd.isEmpty() ) {
+ kdDebug(5850) << "InstallationCommand: " << cmd << endl;
+ list = QStringList::split( " ", cmd );
+ for ( QStringList::iterator it = list.begin(); it != list.end(); ++it) {
+ list2 << (*it).replace("%f", fileName);
+ }
+ KProcess proc;
+ proc << list2;
+ proc.start( KProcess::Block );
+ }
+
+ return true;
+}
+
+bool KNewStuffGeneric::createUploadFile( const QString & /*fileName*/ )
+{
+ return false;
+}
+
+QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
+{
+ QString path, file, target;
+
+ mConfig->setGroup("KNewStuff");
+
+ if( entry ) target = entry->fullName();
+ else target = "/";
+ QString res = mConfig->readEntry( "StandardResource" );
+ if ( res.isEmpty() )
+ {
+ target = mConfig->readEntry("TargetDir");
+ if ( !target.isEmpty())
+ {
+ res = "data";
+ if ( entry ) target.append("/" + entry->fullName());
+ else target.append("/");
+ }
+ }
+ if ( res.isEmpty() )
+ {
+ path = mConfig->readEntry( "InstallPath" );
+ }
+ if ( res.isEmpty() && path.isEmpty() )
+ {
+ if ( !entry ) return QString::null;
+ else return KNewStuff::downloadDestination( entry );
+ }
+
+ if ( !path.isEmpty() )
+ {
+ file = QDir::home().path() + "/" + path + "/";
+ if ( entry ) file += entry->fullName();
+ }
+ else file = locateLocal( res.utf8() , target );
+
+ return file;
+}
+
+QString KNewStuffGeneric::downloadDestination( KNS::Entry *entry )
+{
+ QString file = destinationPath(entry);
+
+ if ( KStandardDirs::exists( file ) ) {
+ int result = KMessageBox::warningContinueCancel( parentWidget(),
+ i18n("The file '%1' already exists. Do you want to override it?")
+ .arg( file ),
+ QString::null, i18n("Overwrite") );
+ if ( result == KMessageBox::Cancel ) return QString::null;
+ }
+
+ return file;
+}
diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.h b/lib/compatibility/knewstuff/knewstuffgeneric.h
new file mode 100644
index 00000000..5443e24a
--- /dev/null
+++ b/lib/compatibility/knewstuff/knewstuffgeneric.h
@@ -0,0 +1,86 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2003 Cornelius Schumacher <schumacher@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.
+*/
+#ifndef KNEWSTUFFGENERIC_H
+#define KNEWSTUFFGENERIC_H
+
+#include "knewstuff.h"
+
+class KConfig;
+
+/**
+ * @short Basic KNewStuff class with predefined actions.
+ *
+ * This class is used for data uploads and installation.
+ * \code
+ * QString payload, preview;
+ * KNewStuffGeneric *ns = new KNewStuffGeneric("kamikaze/level", this);
+ * ns->upload(payload, preview);
+ * \endcode
+ *
+ * @author Cornelius Schumacher (schumacher@kde.org)
+ * \par Maintainer:
+ * Josef Spillner (spillner@kde.org)
+ */
+class KDE_EXPORT KNewStuffGeneric : public KNewStuff
+{
+ public:
+ /**
+ Constructor.
+
+ @param type a Hotstuff data type such as "korganizer/calendar"
+ @param parent the parent window.
+ */
+ KNewStuffGeneric( const QString &type, QWidget *parent = 0 );
+ ~KNewStuffGeneric();
+
+ /**
+ Installs a downloaded file according to the application's configuration.
+
+ @param fileName filename of the donwloaded file
+ @return @c true in case of installation success, @c false otherwise
+ */
+ bool install( const QString &fileName );
+
+ /**
+ Creates a file suitable for upload.
+ Note that this method always fails, since using KNewStuffGeneric
+ means that the provided file must already be in a usable format.
+
+ @param fileName the name of the file to upload after its creation
+ @return @c true in case of creation success, @c false otherwise
+ */
+ bool createUploadFile( const QString &fileName );
+
+ /**
+ Queries the preferred destination file for a download.
+
+ @param entry a Hotstuff data entry
+ @return destination filename, or 0 to return directory only
+ */
+ QString downloadDestination( KNS::Entry *entry );
+
+ private:
+ QString destinationPath( KNS::Entry *entry );
+
+ KConfig *mConfig;
+};
+
+#endif
diff --git a/lib/compatibility/knewstuff/knewstuffsecure.cpp b/lib/compatibility/knewstuff/knewstuffsecure.cpp
new file mode 100644
index 00000000..270d9449
--- /dev/null
+++ b/lib/compatibility/knewstuff/knewstuffsecure.cpp
@@ -0,0 +1,240 @@
+/***************************************************************************
+ knewstuffsecure.cpp - description
+ -------------------
+ begin : Tue Jun 22 12:19:55 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 Library General Public License as *
+ * published by the Free Software Foundation; version 2 of the License. *
+ * *
+ ***************************************************************************/
+//qt includes
+#include <qfileinfo.h>
+
+//kde includes
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kglobal.h>
+#include <kio/netaccess.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstandarddirs.h>
+#include <ktar.h>
+#include <ktempdir.h>
+
+//app includes
+#include "engine.h"
+#include "knewstuffsecure.h"
+#include "security.h"
+
+using namespace KNS;
+
+KNewStuffSecure::KNewStuffSecure(const QString &type, QWidget *parentWidget)
+ : KNewStuff(type, parentWidget)
+{
+ m_tempDir = 0L;
+ connect(engine(), SIGNAL(uploadFinished(bool)), SLOT(slotUploadFinished(bool)));
+}
+
+
+KNewStuffSecure::~KNewStuffSecure()
+{
+ removeTempDirectory();
+}
+
+bool KNewStuffSecure::install(const QString &fileName)
+{
+ bool ok = true;
+
+ removeTempDirectory();
+ m_tempDir = new KTempDir();
+ m_tempDir->setAutoDelete(true);
+ KTar tar(fileName, "application/x-gzip");
+ if (tar.open(IO_ReadOnly))
+ {
+ const KArchiveDirectory *directory = tar.directory();
+ directory->copyTo(m_tempDir->name(), true);
+ m_tarName = "";
+ QStringList entries = directory->entries();
+ for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
+ {
+ if (*it != "signature" && *it != "md5sum")
+ {
+ m_tarName = *it;
+ break;
+ }
+ }
+ tar.close();
+ if (m_tarName.isEmpty())
+ ok = false;
+ else
+ {
+ m_tarName.prepend(m_tempDir->name());
+ connect(Security::ref(), SIGNAL(validityResult(int)), this, SLOT(slotValidated(int)));
+ Security::ref()->checkValidity(m_tarName);
+ }
+ } else
+ ok = false;
+ if (!ok)
+ KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded resource tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("Resource Installation Error"));
+ return ok;
+}
+
+void KNewStuffSecure::slotValidated(int result)
+{
+ QString errorString;
+ QString signatureStr;
+ bool valid = true;
+ if (result == -1)
+ {
+ errorString ="<br>- " + i18n("No keys were found.");
+ valid = false;
+ } else
+ if (result == 0)
+ {
+ errorString ="<br>- " + i18n("The validation failed for unknown reason.");
+ valid = false;
+ } else
+ {
+ KeyStruct key = Security::ref()->signatureKey();
+ if (!(result & Security::MD5_OK ))
+ {
+ errorString = "<br>- " + i18n("The MD5SUM check failed, the archive might be broken.");
+ valid = false;
+ }
+ if (result & Security::SIGNED_BAD)
+ {
+ errorString += "<br>- " + i18n("The signature is bad, the archive might be broken or altered.");
+ valid = false;
+ }
+ if (result & Security::SIGNED_OK)
+ {
+ if (result & Security::TRUSTED)
+ {
+ kdDebug() << "Signed and trusted " << endl;
+ } else
+ {
+ errorString += "<br>- " + i18n("The signature is valid, but untrusted.");
+ valid = false;
+ }
+ }
+ if (result & Security::UNKNOWN)
+ {
+ errorString += "<br>- " + i18n("The signature is unknown.");
+ valid = false;
+ } else
+ {
+ signatureStr = i18n("The resource was signed with key <i>0x%1</i>, belonging to <i>%2 &lt;%3&gt;</i>.").arg(key.id.right(8)).arg(key.name).arg(key.mail);
+ }
+ }
+ if (!valid)
+ {
+ signatureStr.prepend( "<br>");
+ if (KMessageBox::warningContinueCancel(parentWidget(), i18n("<qt>There is a problem with the resource file you have downloaded. The errors are :<b>%1</b><br>%2<br><br>Installation of the resource is <b>not recommended</b>.<br><br>Do you want to proceed with the installation?</qt>").arg(errorString).arg(signatureStr), i18n("Problematic Resource File")) == KMessageBox::Continue)
+ valid = true;
+ } else
+ KMessageBox::information(parentWidget(), i18n("<qt>%1<br><br>Press OK to install it.</qt>").arg(signatureStr), i18n("Valid Resource"), "Show Valid Signature Information");
+ if (valid)
+ {
+ installResource();
+ emit installFinished();
+ } else
+ {
+ KConfig *cfg = KGlobal::config();
+ cfg->deleteGroup("KNewStuffStatus");
+ cfg->setGroup("KNewStuffStatus");
+ for (QMap<QString, QString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it)
+ {
+ cfg->writeEntry(it.key(), it.data());
+ }
+ cfg->sync();
+ }
+ removeTempDirectory();
+ disconnect(Security::ref(), SIGNAL(validityResult(int)), this, SLOT(slotValidated(int)));
+}
+
+void KNewStuffSecure::downloadResource()
+{
+ KConfig *cfg = KGlobal::config();
+ m_installedResources = cfg->entryMap("KNewStuffStatus");
+ engine()->ignoreInstallResult(true);
+ KNewStuff::download();
+}
+
+bool KNewStuffSecure::createUploadFile(const QString &fileName)
+{
+ Q_UNUSED(fileName);
+ return true;
+}
+
+void KNewStuffSecure::uploadResource(const QString& fileName)
+{
+ connect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ removeTempDirectory();
+ m_tempDir = new KTempDir();
+ m_tempDir->setAutoDelete(true);
+ QFileInfo f(fileName);
+ m_signedFileName = m_tempDir->name() + "/" + f.fileName();
+ KIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true);
+ Security::ref()->signFile(m_signedFileName);
+}
+
+void KNewStuffSecure::slotFileSigned(int result)
+{
+ if (result == 0)
+ {
+ KMessageBox::error(parentWidget(), i18n("The signing failed for unknown reason."));
+ } else
+ {
+ if (result & Security::BAD_PASSPHRASE)
+ {
+ if (KMessageBox::warningContinueCancel(parentWidget(), i18n("There are no keys usable for signing or you did not entered the correct passphrase.\nProceed without signing the resource?")) == KMessageBox::Cancel)
+ {
+ disconnect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ removeTempDirectory();
+ return;
+ }
+ }
+ KTar tar(m_signedFileName + ".signed", "application/x-gzip");
+ tar.open(IO_WriteOnly);
+ QStringList files;
+ files << m_signedFileName;
+ files << m_tempDir->name() + "/md5sum";
+ files << m_tempDir->name() + "/signature";
+
+ for (QStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f)
+ {
+ QFile file(*it_f);
+ file.open(IO_ReadOnly);
+ QByteArray bArray = file.readAll();
+ tar.writeFile(QFileInfo(file).fileName(), "user", "group", bArray.size(), bArray.data());
+ file.close();
+ }
+ tar.close();
+ KIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true);
+ KNewStuff::upload(m_signedFileName, QString::null);
+ disconnect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ }
+}
+
+void KNewStuffSecure::slotUploadFinished(bool result)
+{
+ Q_UNUSED(result);
+ removeTempDirectory();
+}
+
+void KNewStuffSecure::removeTempDirectory()
+{
+ if (m_tempDir)
+ {
+ KIO::NetAccess::del(KURL().fromPathOrURL(m_tempDir->name()), parentWidget());
+ delete m_tempDir;
+ m_tempDir = 0L;
+ }
+}
+
+#include "knewstuffsecure.moc"
diff --git a/lib/compatibility/knewstuff/knewstuffsecure.h b/lib/compatibility/knewstuff/knewstuffsecure.h
new file mode 100644
index 00000000..2aed131a
--- /dev/null
+++ b/lib/compatibility/knewstuff/knewstuffsecure.h
@@ -0,0 +1,101 @@
+/***************************************************************************
+ knewstuffsecure.h - description
+ -------------------
+ begin : Tue Jun 22 12:19:55 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 Library General Public License as *
+ * published by the Free Software Foundation; version 2 of the License. *
+ * *
+ ***************************************************************************/
+
+#ifndef KNEWSTUFFSECURE_H
+#define KNEWSTUFFSECURE_H
+
+//qt includes
+#include <qobject.h>
+
+//kde includes
+#include "knewstuff.h"
+
+class KTempDir;
+/**
+Makes possible downloading and installing signed resource files from a server.
+You must subclass it and implement the @ref installResource() pure
+virtual method to install a resource. For uploading you must create a resource
+tarball (which is installabale by @ref installResource()) and call the
+@ref uploadResource() method with this tarball as the argument.
+Signing and verification is done by the gpg application, so the user must
+have it installed, otherwise this class does not give any extra security compared
+to the standard KNewStuff class.
+
+@since 3.4
+
+@author Andras Mantia <amantia@kde.org>
+*/
+class KDE_EXPORT KNewStuffSecure : public QObject, public KNewStuff
+{
+ Q_OBJECT
+
+public:
+ /** Constructor.
+
+ @param type type of data to be handled, should be something like
+ korganizer/calendar, kword/template, kdesktop/wallpaper
+ @param parentWidget parent widget of dialogs opened by the KNewStuff
+ engine
+ */
+ KNewStuffSecure(const QString &type, QWidget *parentWidget=0);
+ virtual ~KNewStuffSecure();
+
+ /** Installs the downloaded resource. Do not call or reimplement directly.
+ It's reimplemented from KNewStuff for internal reasons.
+ */
+ bool install( const QString &fileName );
+
+ /** Reimplemented for internal reasons. */
+ bool createUploadFile(const QString &fileName);
+
+ /** Initiates a download. This is the method that must be called in
+ * order to download a signed resource. */
+ void downloadResource();
+
+ /** Signs the file and uploads to the central server.
+ * @param fileName The file to be signed and uploaded
+ */
+ void uploadResource(const QString &fileName);
+
+
+private slots:
+ /** Checks the validity of the downloaded tarball and installs it*/
+ void slotValidated(int result);
+ /** The file is signed, so it can be uploaded.*/
+ void slotFileSigned(int result);
+ /** Called when the upload has finished.
+ @param result the result of the upload
+ Be careful if you reimplement it, as it deletes the temporary directory
+ m_tempDir used for upload. You must also delete it (call the parent's method)
+ if you reimplement it.
+ */
+ void slotUploadFinished(bool result);
+
+signals:
+ void installFinished();
+
+protected:
+ /** Installs the resource specified by m_tarName. Implement it in the subclass. */
+ virtual void installResource() = 0;
+ /** Removes the temporary directory m_tempDir. */
+ void removeTempDirectory();
+
+ KTempDir *m_tempDir;
+ QString m_tarName;
+ QString m_signedFileName;
+ QMap<QString, QString> m_installedResources;
+};
+
+#endif
diff --git a/lib/compatibility/knewstuff/provider.cpp b/lib/compatibility/knewstuff/provider.cpp
new file mode 100644
index 00000000..2ab48f18
--- /dev/null
+++ b/lib/compatibility/knewstuff/provider.cpp
@@ -0,0 +1,223 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kio/job.h>
+#include <kglobal.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+
+#include "provider.h"
+#include "provider.moc"
+
+using namespace KNS;
+
+Provider::Provider() : mNoUpload( false )
+{
+}
+
+Provider::Provider( const QDomElement &e ) : mNoUpload( false )
+{
+ parseDomElement( e );
+}
+
+Provider::~Provider()
+{
+}
+
+
+void Provider::setName( const QString &name )
+{
+ mName = name;
+}
+
+QString Provider::name() const
+{
+ return mName;
+}
+
+
+void Provider::setIcon( const KURL &url )
+{
+ mIcon = url;
+}
+
+KURL Provider::icon() const
+{
+ return mIcon;
+}
+
+
+void Provider::setDownloadUrl( const KURL &url )
+{
+ mDownloadUrl = url;
+}
+
+KURL Provider::downloadUrl() const
+{
+ return mDownloadUrl;
+}
+
+
+void Provider::setUploadUrl( const KURL &url )
+{
+ mUploadUrl = url;
+}
+
+KURL Provider::uploadUrl() const
+{
+ return mUploadUrl;
+}
+
+
+void Provider::setNoUploadUrl( const KURL &url )
+{
+ mNoUploadUrl = url;
+}
+
+KURL Provider::noUploadUrl() const
+{
+ return mNoUploadUrl;
+}
+
+
+void Provider::setNoUpload( bool enabled )
+{
+ mNoUpload = enabled;
+}
+
+bool Provider::noUpload() const
+{
+ return mNoUpload;
+}
+
+
+void Provider::parseDomElement( const QDomElement &element )
+{
+ if ( element.tagName() != "provider" ) return;
+
+ setDownloadUrl( KURL( element.attribute("downloadurl") ) );
+ setUploadUrl( KURL( element.attribute("uploadurl") ) );
+ setNoUploadUrl( KURL( element.attribute("nouploadurl") ) );
+ setIcon( KURL( element.attribute("icon") ) );
+
+ QDomNode n;
+ for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ QDomElement p = n.toElement();
+
+ if ( p.tagName() == "noupload" ) setNoUpload( true );
+ if ( p.tagName() == "title" ) setName( p.text().stripWhiteSpace() );
+ }
+}
+
+QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent )
+{
+ QDomElement entry = doc.createElement( "stuff" );
+ parent.appendChild( entry );
+
+ QDomElement n = doc.createElement( "name" );
+ n.appendChild( doc.createTextNode( name() ) );
+ entry.appendChild( n );
+
+ return entry;
+}
+
+
+ProviderLoader::ProviderLoader( QWidget *parentWidget ) :
+ mParentWidget( parentWidget )
+{
+ mProviders.setAutoDelete( true );
+}
+
+void ProviderLoader::load( const QString &type, const QString &providersList )
+{
+ kdDebug(5850) << "ProviderLoader::load()" << endl;
+
+ mProviders.clear();
+ mJobData = "";
+
+ KConfig *cfg = KGlobal::config();
+ cfg->setGroup("KNewStuff");
+
+ QString providersUrl = providersList;
+ if( providersUrl.isEmpty() )
+ providersUrl = cfg->readEntry( "ProvidersUrl" );
+
+ if ( providersUrl.isEmpty() ) {
+ // TODO: Replace the default by the real one.
+ QString server = cfg->readEntry( "MasterServer",
+ "http://korganizer.kde.org" );
+
+ providersUrl = server + "/knewstuff/" + type + "/providers.xml";
+ }
+
+ kdDebug(5850) << "ProviderLoader::load(): providersUrl: " << providersUrl << endl;
+
+ KIO::TransferJob *job = KIO::get( KURL( providersUrl ) );
+ connect( job, SIGNAL( result( KIO::Job * ) ),
+ SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
+ SLOT( slotJobData( KIO::Job *, const QByteArray & ) ) );
+
+// job->dumpObjectInfo();
+}
+
+void ProviderLoader::slotJobData( KIO::Job *, const QByteArray &data )
+{
+ kdDebug(5850) << "ProviderLoader::slotJobData()" << endl;
+
+ if ( data.size() == 0 ) return;
+
+ QCString str( data, data.size() + 1 );
+
+ mJobData.append( QString::fromUtf8( str ) );
+}
+
+void ProviderLoader::slotJobResult( KIO::Job *job )
+{
+ if ( job->error() ) {
+ job->showErrorDialog( mParentWidget );
+ }
+
+ kdDebug(5850) << "--PROVIDERS-START--" << endl << mJobData << "--PROV_END--"
+ << endl;
+
+ QDomDocument doc;
+ if ( !doc.setContent( mJobData ) ) {
+ KMessageBox::error( mParentWidget, i18n("Error parsing providers list.") );
+ return;
+ }
+
+ QDomElement providers = doc.documentElement();
+
+ if ( providers.isNull() ) {
+ kdDebug(5850) << "No document in Providers.xml." << endl;
+ }
+
+ QDomNode n;
+ for ( n = providers.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ QDomElement p = n.toElement();
+
+ mProviders.append( new Provider( p ) );
+ }
+
+ emit providersLoaded( &mProviders );
+}
diff --git a/lib/compatibility/knewstuff/provider.h b/lib/compatibility/knewstuff/provider.h
new file mode 100644
index 00000000..69898bc4
--- /dev/null
+++ b/lib/compatibility/knewstuff/provider.h
@@ -0,0 +1,206 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+#ifndef KNEWSTUFF_PROVIDER_H
+#define KNEWSTUFF_PROVIDER_H
+
+#include <qcstring.h>
+#include <qdom.h>
+#include <qobject.h>
+#include <qptrlist.h>
+#include <qstring.h>
+
+#include <kurl.h>
+
+namespace KIO { class Job; }
+
+namespace KNS {
+
+/**
+ * @short KNewStuff provider container.
+ *
+ * This class provides accessors for the provider object.
+ * as used by KNewStuff.
+ * It should probably not be used directly by the application.
+ *
+ * @author Cornelius Schumacher (schumacher@kde.org)
+ * \par Maintainer:
+ * Josef Spillner (spillner@kde.org)
+ */
+class Provider
+{
+ public:
+ typedef QPtrList<Provider> List;
+
+ /**
+ * Constructor.
+ */
+ Provider();
+
+ /**
+ * Constructor with XML feed.
+ */
+ Provider( const QDomElement & );
+
+ /**
+ * Destructor.
+ */
+ ~Provider();
+
+ /**
+ * Sets the common name of the provider.
+ */
+ void setName( const QString & );
+
+ /**
+ * Retrieves the common name of the provider.
+ *
+ * @return provider name
+ */
+ QString name() const;
+
+ /**
+ * Sets the download URL.
+ */
+ void setDownloadUrl( const KURL & );
+
+ /**
+ * Retrieves the download URL.
+ *
+ * @return download URL
+ */
+ KURL downloadUrl() const;
+
+ /**
+ * Sets the upload URL.
+ */
+ void setUploadUrl( const KURL & );
+
+ /**
+ * Retrieves the upload URL.
+ *
+ * @return upload URL
+ */
+ KURL uploadUrl() const;
+
+ /**
+ * Sets the URL where a user is led if the provider does not support
+ * uploads.
+ *
+ * @see setNoUpload
+ */
+ void setNoUploadUrl( const KURL & );
+
+ /**
+ * Retrieves the URL where a user is led if the provider does not
+ * support uploads.
+ *
+ * @return website URL
+ */
+ KURL noUploadUrl() const;
+
+ /**
+ * Indicate whether provider supports uploads.
+ */
+ void setNoUpload( bool );
+
+ /**
+ * Query whether provider supports uploads.
+ *
+ * @return upload support status
+ */
+ bool noUpload() const;
+
+ /**
+ * Sets the URL for an icon for this provider.
+ * The icon should be in 32x32 format. If not set, the default icon
+ * of KDialogBase is used.
+ */
+ void setIcon( const KURL & );
+
+ /**
+ * Retrieves the icon URL for this provider.
+ *
+ * @return icon URL
+ */
+ KURL icon() const;
+
+ protected:
+ void parseDomElement( const QDomElement & );
+
+ QDomElement createDomElement( QDomDocument &, QDomElement &parent );
+
+ private:
+ QString mName;
+ KURL mDownloadUrl;
+ KURL mUploadUrl;
+ KURL mNoUploadUrl;
+ KURL mIcon;
+ bool mNoUpload;
+};
+
+/**
+ * KNewStuff provider loader.
+ * This class sets up a list of all possible providers by querying
+ * the main provider database for this specific application.
+ * It should probably not be used directly by the application.
+ */
+class ProviderLoader : public QObject
+{
+ Q_OBJECT
+ public:
+ /**
+ * Constructor.
+ *
+ * @param parentWidget the parent widget
+ */
+ ProviderLoader( QWidget *parentWidget );
+
+ /**
+ * Starts asynchronously loading the list of providers of the
+ * specified type.
+ *
+ * @param type data type such as 'kdesktop/wallpaper'.
+ * @param providerList the URl to the list of providers; if empty
+ * we first try the ProvidersUrl from KGlobal::config, then we
+ * fall back to a hardcoded value.
+ */
+ void load( const QString &type, const QString &providerList = QString::null );
+
+ signals:
+ /**
+ * Indicates that the list of providers has been successfully loaded.
+ */
+ void providersLoaded( Provider::List * );
+
+ protected slots:
+ void slotJobData( KIO::Job *, const QByteArray & );
+ void slotJobResult( KIO::Job * );
+
+ private:
+ QWidget *mParentWidget;
+
+ QString mJobData;
+
+ Provider::List mProviders;
+};
+
+}
+
+#endif
diff --git a/lib/compatibility/knewstuff/providerdialog.cpp b/lib/compatibility/knewstuff/providerdialog.cpp
new file mode 100644
index 00000000..00374a34
--- /dev/null
+++ b/lib/compatibility/knewstuff/providerdialog.cpp
@@ -0,0 +1,95 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+
+#include <qlayout.h>
+#include <qstring.h>
+#include <qlabel.h>
+
+#include <klistview.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+
+#include "engine.h"
+#include "provider.h"
+
+#include "providerdialog.h"
+#include "providerdialog.moc"
+
+using namespace KNS;
+
+class ProviderItem : public KListViewItem
+{
+ public:
+ ProviderItem( KListView *parent, Provider *provider ) :
+ KListViewItem( parent ), mProvider( provider )
+ {
+ setText( 0, provider->name() );
+ }
+
+ Provider *provider() { return mProvider; }
+
+ private:
+ Provider *mProvider;
+};
+
+ProviderDialog::ProviderDialog( Engine *engine, QWidget *parent ) :
+ KDialogBase( Plain, i18n("Hot New Stuff Providers"), Ok | Cancel, Cancel,
+ parent, 0, false, true ),
+ mEngine( engine )
+{
+ QFrame *topPage = plainPage();
+
+ QBoxLayout *topLayout = new QVBoxLayout( topPage );
+
+ QLabel *description = new QLabel( i18n("Please select one of the providers listed below:"), topPage );
+ topLayout->addWidget( description );
+
+ mListView = new KListView( topPage );
+ mListView->addColumn( i18n("Name") );
+ topLayout->addWidget( mListView );
+}
+
+void ProviderDialog::clear()
+{
+ mListView->clear();
+}
+
+void ProviderDialog::addProvider( Provider *provider )
+{
+ new ProviderItem( mListView, provider );
+ if ( mListView->childCount() == 1 ) {
+ mListView->setSelected(mListView->firstChild(), true);
+ } else if (mListView->childCount() > 1) {
+ mListView->setSelected(mListView->firstChild(), false);
+ }
+}
+
+void ProviderDialog::slotOk()
+{
+ ProviderItem *item = static_cast<ProviderItem *>( mListView->selectedItem() );
+ if ( !item ) {
+ KMessageBox::error( this, i18n("No provider selected.") );
+ return;
+ }
+
+ mEngine->requestMetaInformation( item->provider() );
+
+ accept();
+}
diff --git a/lib/compatibility/knewstuff/providerdialog.h b/lib/compatibility/knewstuff/providerdialog.h
new file mode 100644
index 00000000..c75cc3a1
--- /dev/null
+++ b/lib/compatibility/knewstuff/providerdialog.h
@@ -0,0 +1,76 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+#ifndef KNEWSTUFF_PROVIDERDIALOG_H
+#define KNEWSTUFF_PROVIDERDIALOG_H
+
+#include <kdialogbase.h>
+
+class KListView;
+
+namespace KNS {
+
+class Provider;
+class Engine;
+
+/**
+ * @short Dialog displaying a list of Hotstuff providers.
+ *
+ * This is normally used in the process of uploading data, thus limiting the
+ * list to providers which support uploads.
+ * One of the providers is then chosen by the user for further operation.
+ *
+ * @author Cornelius Schumacher (schumacher@kde.org)
+ * \par Maintainer:
+ * Josef Spillner (spillner@kde.org)
+ */
+class ProviderDialog : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ /**
+ Constructor.
+
+ @param engine a KNewStuff engine object
+ @param parent the parent window
+ */
+ ProviderDialog( Engine *engine, QWidget *parent );
+
+ /**
+ Clears the list of providers.
+ */
+ void clear();
+
+ /**
+ Adds a Hotstuff provider to the list.
+ */
+ void addProvider( Provider * );
+
+ protected slots:
+ void slotOk();
+
+ private:
+ Engine *mEngine;
+
+ KListView *mListView;
+};
+
+}
+
+#endif
diff --git a/lib/compatibility/knewstuff/security.cpp b/lib/compatibility/knewstuff/security.cpp
new file mode 100644
index 00000000..f7099c72
--- /dev/null
+++ b/lib/compatibility/knewstuff/security.cpp
@@ -0,0 +1,344 @@
+/***************************************************************************
+ security.cpp - description
+ -------------------
+ begin : Thu Jun 24 11:22:12 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 Library General Public License as *
+ * published by the Free Software Foundation; version 2 of the License. *
+ * *
+ ***************************************************************************/
+
+ //qt includes
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qstringlist.h>
+#include <qtimer.h>
+
+ //kde includes
+#include <kdebug.h>
+#include <kinputdialog.h>
+#include <klocale.h>
+#include <kmdcodec.h>
+#include <kmessagebox.h>
+#include <kpassdlg.h>
+#include <kprocio.h>
+
+ //app includes
+#include "security.h"
+
+using namespace KNS;
+
+Security::Security()
+{
+ m_keysRead = false;
+ m_gpgRunning = false;
+ readKeys();
+ readSecretKeys();
+}
+
+
+Security::~Security()
+{
+}
+
+void Security::readKeys()
+{
+ if (m_gpgRunning)
+ {
+ QTimer::singleShot(5, this, SLOT(readKeys()));
+ return;
+ }
+ m_runMode = List;
+ m_keys.clear();
+ KProcIO *readProcess=new KProcIO();
+ *readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
+ connect(readProcess, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, SIGNAL(readReady(KProcIO *)) ,this, SLOT(slotDataArrived(KProcIO *)));
+ if (!readProcess->start(KProcess::NotifyOnExit, true))
+ KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and retrieve the available keys. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>"));
+ else
+ m_gpgRunning = true;
+}
+
+void Security::readSecretKeys()
+{
+ if (m_gpgRunning)
+ {
+ QTimer::singleShot(5, this, SLOT(readSecretKeys()));
+ return;
+ }
+ m_runMode = ListSecret;
+ KProcIO *readProcess=new KProcIO();
+ *readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-secret-keys";
+ connect(readProcess, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, SIGNAL(readReady(KProcIO *)) ,this, SLOT(slotDataArrived(KProcIO *)));
+ if (readProcess->start(KProcess::NotifyOnExit, true))
+ m_gpgRunning = true;
+}
+
+void Security::slotProcessExited(KProcess *process)
+{
+ switch (m_runMode)
+ {
+ case ListSecret:
+ m_keysRead = true;
+ break;
+ case Verify: emit validityResult(m_result);
+ break;
+ case Sign: emit fileSigned(m_result);
+ break;
+
+ }
+ m_gpgRunning = false;
+ delete process;
+}
+
+void Security::slotDataArrived(KProcIO *procIO)
+{
+ QString data;
+ while (procIO->readln(data, true) != -1)
+ {
+ switch (m_runMode)
+ {
+ case List:
+ case ListSecret:
+ if (data.startsWith("pub") || data.startsWith("sec"))
+ {
+ KeyStruct key;
+ if (data.startsWith("pub"))
+ key.secret = false;
+ else
+ key.secret = true;
+ QStringList line = QStringList::split(":", data, true);
+ key.id = line[4];
+ QString shortId = key.id.right(8);
+ QString trustStr = line[1];
+ key.trusted = false;
+ if (trustStr == "u" || trustStr == "f")
+ key.trusted = true;
+ data = line[9];
+ key.mail=data.section('<', -1, -1);
+ key.mail.truncate(key.mail.length() - 1);
+ key.name=data.section('<',0,0);
+ if (key.name.find("(")!=-1)
+ key.name=key.name.section('(',0,0);
+ m_keys[shortId] = key;
+ }
+ break;
+ case Verify:
+ data = data.section("]",1,-1).stripWhiteSpace();
+ if (data.startsWith("GOODSIG"))
+ {
+ m_result &= SIGNED_BAD_CLEAR;
+ m_result |= SIGNED_OK;
+ QString id = data.section(" ", 1 , 1).right(8);
+ if (!m_keys.contains(id))
+ {
+ m_result |= UNKNOWN;
+ } else
+ {
+ m_signatureKey = m_keys[id];
+ }
+ } else
+ if (data.startsWith("NO_PUBKEY"))
+ {
+ m_result &= SIGNED_BAD_CLEAR;
+ m_result |= UNKNOWN;
+ } else
+ if (data.startsWith("BADSIG"))
+ {
+ m_result |= SIGNED_BAD;
+ QString id = data.section(" ", 1 , 1).right(8);
+ if (!m_keys.contains(id))
+ {
+ m_result |= UNKNOWN;
+ } else
+ {
+ m_signatureKey = m_keys[id];
+ }
+ } else
+ if (data.startsWith("TRUST_ULTIMATE"))
+ {
+ m_result &= SIGNED_BAD_CLEAR;
+ m_result |= TRUSTED;
+ }
+ break;
+
+ case Sign:
+ if (data.find("passphrase.enter") != -1)
+ {
+ QCString password;
+ KeyStruct key = m_keys[m_secretKey];
+ int result = KPasswordDialog::getPassword(password, i18n("<qt>Enter passphrase for key <b>0x%1</b>, belonging to<br><i>%2&lt;%3&gt;</i>:</qt>").arg(m_secretKey).arg(key.name).arg(key.mail));
+ if (result == KPasswordDialog::Accepted)
+ {
+ procIO->writeStdin(password, true);
+ password.fill(' ');
+ }
+ else
+ {
+ m_result |= BAD_PASSPHRASE;
+ slotProcessExited(procIO);
+ return;
+ }
+ } else
+ if (data.find("BAD_PASSPHRASE") != -1)
+ {
+ m_result |= BAD_PASSPHRASE;
+ }
+ break;
+ }
+ }
+}
+
+void Security::checkValidity(const QString& filename)
+{
+ m_fileName = filename;
+ slotCheckValidity();
+}
+
+void Security::slotCheckValidity()
+{
+ if (!m_keysRead || m_gpgRunning)
+ {
+ QTimer::singleShot(5, this, SLOT(slotCheckValidity()));
+ return;
+ }
+ if (m_keys.count() == 0)
+ {
+ emit validityResult(-1);
+ return;
+ }
+
+ m_result = 0;
+ m_runMode = Verify;
+ QFileInfo f(m_fileName);
+ //check the MD5 sum
+ QString md5sum;
+ const char* c = "";
+ KMD5 context(c);
+ QFile file(m_fileName);
+ if (file.open(IO_ReadOnly))
+ {
+ context.reset();
+ context.update(file);
+ md5sum = context.hexDigest();
+ file.close();
+ }
+ file.setName(f.dirPath() + "/md5sum");
+ if (file.open(IO_ReadOnly))
+ {
+ QString md5sum_file;
+ file.readLine(md5sum_file, 50);
+ if (!md5sum.isEmpty() && !md5sum_file.isEmpty() && md5sum_file.startsWith(md5sum))
+ m_result |= MD5_OK;
+ file.close();
+ }
+ m_result |= SIGNED_BAD;
+ m_signatureKey.id = "";
+ m_signatureKey.name = "";
+ m_signatureKey.mail = "";
+ m_signatureKey.trusted = false;
+
+ //verify the signature
+ KProcIO *verifyProcess=new KProcIO();
+ *verifyProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--verify" << f.dirPath() + "/signature"<< m_fileName;
+ connect(verifyProcess, SIGNAL(processExited(KProcess *)),this, SLOT(slotProcessExited(KProcess *)));
+ connect(verifyProcess, SIGNAL(readReady(KProcIO *)),this, SLOT(slotDataArrived(KProcIO *)));
+ if (verifyProcess->start(KProcess::NotifyOnExit,true))
+ m_gpgRunning = true;
+ else
+ {
+ KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and check the validity of the file. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>"));
+ emit validityResult(0);
+ delete verifyProcess;
+ }
+}
+
+void Security::signFile(const QString &fileName)
+{
+ m_fileName = fileName;
+ slotSignFile();
+}
+
+void Security::slotSignFile()
+{
+ if (!m_keysRead || m_gpgRunning)
+ {
+ QTimer::singleShot(5, this, SLOT(slotSignFile()));
+ return;
+ }
+
+ QStringList secretKeys;
+ for (QMap<QString, KeyStruct>::Iterator it = m_keys.begin(); it != m_keys.end(); ++it)
+ {
+ if (it.data().secret)
+ secretKeys.append(it.key());
+ }
+
+ if (secretKeys.count() == 0)
+ {
+ emit fileSigned(-1);
+ return;
+ }
+
+ m_result = 0;
+ QFileInfo f(m_fileName);
+
+ //create the MD5 sum
+ QString md5sum;
+ const char* c = "";
+ KMD5 context(c);
+ QFile file(m_fileName);
+ if (file.open(IO_ReadOnly))
+ {
+ context.reset();
+ context.update(file);
+ md5sum = context.hexDigest();
+ file.close();
+ }
+ file.setName(f.dirPath() + "/md5sum");
+ if (file.open(IO_WriteOnly))
+ {
+ QTextStream stream(&file);
+ stream << md5sum;
+ m_result |= MD5_OK;
+ file.close();
+ }
+
+ if (secretKeys.count() > 1)
+ {
+ bool ok;
+ secretKeys = KInputDialog::getItemList(i18n("Select Signing Key"), i18n("Key used for signing:"), secretKeys, secretKeys[0], false, &ok);
+ if (ok)
+ m_secretKey = secretKeys[0];
+ else
+ {
+ emit fileSigned(0);
+ return;
+ }
+ } else
+ m_secretKey = secretKeys[0];
+
+ //verify the signature
+ KProcIO *signProcess=new KProcIO();
+ *signProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--no-tty"<<"--detach-sign" << "-u" << m_secretKey << "-o" << f.dirPath() + "/signature" << m_fileName;
+ connect(signProcess, SIGNAL(processExited(KProcess *)),this, SLOT(slotProcessExited(KProcess *)));
+ connect(signProcess, SIGNAL(readReady(KProcIO *)),this, SLOT(slotDataArrived(KProcIO *)));
+ m_runMode = Sign;
+ if (signProcess->start(KProcess::NotifyOnExit,true))
+ m_gpgRunning = true;
+ else
+ {
+ KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and sign the file. Make sure that <i>gpg</i> is installed, otherwise signing of the resources will not be possible.</qt>"));
+ emit fileSigned(0);
+ delete signProcess;
+ }
+}
+
+#include "security.moc"
diff --git a/lib/compatibility/knewstuff/security.h b/lib/compatibility/knewstuff/security.h
new file mode 100644
index 00000000..5eea64ae
--- /dev/null
+++ b/lib/compatibility/knewstuff/security.h
@@ -0,0 +1,141 @@
+/***************************************************************************
+ security.h - description
+ -------------------
+ begin : Thu Jun 24 11:22:12 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 Library General Public License as *
+ * published by the Free Software Foundation; version 2 of the License. *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SECURITY_H
+#define SECURITY_H
+
+//qt includes
+#include <qmap.h>
+#include <qobject.h>
+
+class KProcIO;
+class KProcess;
+
+struct KeyStruct {
+ QString id;
+ QString name;
+ QString mail;
+ bool trusted;
+ bool secret;
+};
+
+/**
+Handles security releated issues, like signing, verifying.
+It is a private class, not meant to be used by third party applications.
+
+@author Andras Mantia <amantia@kde.org>
+*/
+
+namespace KNS {
+
+class Security : public QObject
+{
+Q_OBJECT
+public:
+ static Security* const ref()
+ {
+ static Security *m_ref;
+ if (!m_ref) m_ref = new Security();
+ return m_ref;
+ }
+ ~Security();
+
+
+ /** Verifies the integrity and the signature of a tarball file.
+ * @param fileName the file to be verified. It should be a tar.gz (.tgz) file. The directory where
+ * the file is should contain a "signature" and a "md5sum" file, otherwise verification will fail.
+ * The method is asynchronous and the result is signalled with @ref validityResult.
+ */
+ void checkValidity(const QString &fileName);
+
+ /** Creates a signature and an md5sum file for the fileName and packs
+ * everything into a gzipped tarball.
+ * @param fileName the file with full path to sign
+ *
+ * The method is asynchronous and the result is signalled with @ref fileSigned.
+ */
+ void signFile(const QString &fileName);
+ /** Get the key used for signing. This method is valid only if:
+ * - the checkValidity was called
+ * - the result of the validity check does not have the UNKNOWN bit set
+ *
+ * @return the key used for signing the file
+ */
+ KeyStruct signatureKey() {return m_signatureKey;}
+
+ enum Results {
+ MD5_OK = 1, /// The MD5 sum check is OK
+ SIGNED_OK = 2, /// The file is signed with a good signature
+ SIGNED_BAD = 4, /// The file is signed with a bad signature
+ TRUSTED = 8, /// The signature is trusted
+ UNKNOWN = 16, ///The key is unknown
+ SIGNED_BAD_CLEAR = 27, ///used to clear the SIGNED_BAD flag
+ BAD_PASSPHRASE = 32 ///wrong passhprase entered
+ };
+
+public slots:
+ /** Reads the available public keys */
+ void readKeys();
+ /** Reads the available secret keys */
+ void readSecretKeys();
+ /** Verifies the integrity and the signature of a tarball file (@see m_fileName).
+ */
+ void slotCheckValidity();
+
+ /** Creates a signature and an md5sum file for the @see m_fileName and packs
+ * everything into a gzipped tarball.
+ */
+ void slotSignFile();
+
+private:
+ Security();
+
+ enum RunMode {
+ List = 0, ///read the public keys
+ ListSecret, ///read the secret keys
+ Verify, ///verify the signature
+ Sign ///create signature
+ };
+
+ KeyStruct m_signatureKey;
+ int m_result;
+ int m_runMode;
+ bool m_gpgRunning; /// true if gpg is currently running
+ bool m_keysRead; /// true if all the keys were read
+ QMap<QString, KeyStruct> m_keys; /// holds information about the available key
+ QString m_fileName; /// the file to sign/verify
+ QString m_secretKey; /// the key used for signing
+
+private slots:
+ void slotProcessExited(KProcess *process);
+ void slotDataArrived(KProcIO *process);
+
+signals:
+ /** Sent when the validity check is done.
+ *
+ * @return the result of the check. See @ref Results
+ */
+ void validityResult(int result);
+ /** Sent when the signing is done.
+ *
+ * @return the result of the operation. See @ref Results
+ */
+ void fileSigned(int result);
+};
+
+}
+
+#endif
diff --git a/lib/compatibility/knewstuff/uploaddialog.cpp b/lib/compatibility/knewstuff/uploaddialog.cpp
new file mode 100644
index 00000000..5116785d
--- /dev/null
+++ b/lib/compatibility/knewstuff/uploaddialog.cpp
@@ -0,0 +1,176 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qspinbox.h>
+#include <qstring.h>
+#include <ktextedit.h>
+
+#include <klistview.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kurlrequester.h>
+#include <kmessagebox.h>
+#include <kconfig.h>
+#include <kapplication.h>
+
+#include "engine.h"
+#include "entry.h"
+
+#include "uploaddialog.h"
+#include "uploaddialog.moc"
+
+using namespace KNS;
+
+UploadDialog::UploadDialog( Engine *engine, QWidget *parent ) :
+ KDialogBase( Plain, i18n("Share Hot New Stuff"), Ok | Cancel, Cancel,
+ parent, 0, false, true ),
+ mEngine( engine )
+{
+ mEntryList.setAutoDelete( true );
+
+ QFrame *topPage = plainPage();
+
+ QGridLayout *topLayout = new QGridLayout( topPage );
+ topLayout->setSpacing( spacingHint() );
+
+ QLabel *nameLabel = new QLabel( i18n("Name:"), topPage );
+ topLayout->addWidget( nameLabel, 0, 0 );
+ mNameEdit = new QLineEdit( topPage );
+ topLayout->addWidget( mNameEdit, 0, 1 );
+
+ QLabel *authorLabel = new QLabel( i18n("Author:"), topPage );
+ topLayout->addWidget( authorLabel, 1, 0 );
+ mAuthorEdit = new QLineEdit( topPage );
+ topLayout->addWidget( mAuthorEdit, 1, 1 );
+
+ QLabel *versionLabel = new QLabel( i18n("Version:"), topPage );
+ topLayout->addWidget( versionLabel, 2, 0 );
+ mVersionEdit = new QLineEdit( topPage );
+ topLayout->addWidget( mVersionEdit, 2, 1 );
+
+ QLabel *releaseLabel = new QLabel( i18n("Release:"), topPage );
+ topLayout->addWidget( releaseLabel, 3, 0 );
+ mReleaseSpin = new QSpinBox( topPage );
+ mReleaseSpin->setMinValue( 1 );
+ topLayout->addWidget( mReleaseSpin, 3, 1 );
+
+ QLabel *licenceLabel = new QLabel( i18n("License:"), topPage );
+ topLayout->addWidget( licenceLabel, 4, 0 );
+ mLicenceCombo = new QComboBox( topPage );
+ mLicenceCombo->setEditable( true );
+ mLicenceCombo->insertItem( i18n("GPL") );
+ mLicenceCombo->insertItem( i18n("LGPL") );
+ mLicenceCombo->insertItem( i18n("BSD") );
+ topLayout->addWidget( mLicenceCombo, 4, 1 );
+
+ QLabel *languageLabel = new QLabel( i18n("Language:"), topPage );
+ topLayout->addWidget( languageLabel, 5, 0 );
+ mLanguageCombo = new QComboBox( topPage );
+ topLayout->addWidget( mLanguageCombo, 5, 1 );
+ mLanguageCombo->insertStringList( KGlobal::locale()->languageList() );
+
+ QLabel *previewLabel = new QLabel( i18n("Preview URL:"), topPage );
+ topLayout->addWidget( previewLabel, 6, 0 );
+ mPreviewUrl = new KURLRequester( topPage );
+ topLayout->addWidget( mPreviewUrl, 6, 1 );
+
+ QLabel *summaryLabel = new QLabel( i18n("Summary:"), topPage );
+ topLayout->addMultiCellWidget( summaryLabel, 7, 7, 0, 1 );
+ mSummaryEdit = new KTextEdit( topPage );
+ topLayout->addMultiCellWidget( mSummaryEdit, 8, 8, 0, 1 );
+
+ KConfig *conf = kapp->config();
+ conf->setGroup("KNewStuffUpload");
+ QString name = conf->readEntry("name");
+ QString author = conf->readEntry("author");
+ QString version = conf->readEntry("version");
+ QString release = conf->readEntry("release");
+ QString preview = conf->readEntry("preview");
+ QString summary = conf->readEntry("summary");
+ QString lang = conf->readEntry("language");
+ QString licence = conf->readEntry("licence");
+
+ if(!name.isNull())
+ {
+ int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"), QString::null, i18n("Fill Out Fields"), i18n("Do Not Fill Out"));
+ if(prefill == KMessageBox::Yes)
+ {
+ mNameEdit->setText(name);
+ mAuthorEdit->setText(author);
+ mVersionEdit->setText(version);
+ mReleaseSpin->setValue(release.toInt());
+ mPreviewUrl->setURL(preview);
+ mSummaryEdit->setText(summary);
+ if(!lang.isEmpty()) mLanguageCombo->setCurrentText(lang);
+ if(!licence.isEmpty()) mLicenceCombo->setCurrentText(licence);
+ }
+ }
+}
+
+UploadDialog::~UploadDialog()
+{
+ mEntryList.clear();
+}
+
+void UploadDialog::slotOk()
+{
+ if ( mNameEdit->text().isEmpty() ) {
+ KMessageBox::error( this, i18n("Please put in a name.") );
+ return;
+ }
+
+ Entry *entry = new Entry;
+
+ mEntryList.append( entry );
+
+ entry->setName( mNameEdit->text() );
+ entry->setAuthor( mAuthorEdit->text() );
+ entry->setVersion( mVersionEdit->text() );
+ entry->setRelease( mReleaseSpin->value() );
+ entry->setLicence( mLicenceCombo->currentText() );
+ entry->setPreview( KURL( mPreviewUrl->url().section("/", -1) ), mLanguageCombo->currentText() );
+ entry->setSummary( mSummaryEdit->text(), mLanguageCombo->currentText() );
+
+ KConfig *conf = kapp->config();
+ conf->setGroup("KNewStuffUpload");
+ conf->writeEntry("name", mNameEdit->text());
+ conf->writeEntry("author", mAuthorEdit->text());
+ conf->writeEntry("version", mVersionEdit->text());
+ conf->writeEntry("release", mReleaseSpin->value());
+ conf->writeEntry("licence", mLicenceCombo->currentText());
+ conf->writeEntry("preview", mPreviewUrl->url());
+ conf->writeEntry("summary", mSummaryEdit->text());
+ conf->writeEntry("language", mLanguageCombo->currentText());
+ conf->sync();
+
+ mEngine->upload( entry );
+
+ accept();
+}
+
+void UploadDialog::setPreviewFile( const QString &previewFile )
+{
+ mPreviewUrl->setURL( previewFile );
+}
+
diff --git a/lib/compatibility/knewstuff/uploaddialog.h b/lib/compatibility/knewstuff/uploaddialog.h
new file mode 100644
index 00000000..8e962ccb
--- /dev/null
+++ b/lib/compatibility/knewstuff/uploaddialog.h
@@ -0,0 +1,92 @@
+/*
+ This file is part of KOrganizer.
+ Copyright (c) 2002 Cornelius Schumacher <schumacher@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.
+*/
+#ifndef KNEWSTUFF_UPLOADDIALOG_H
+#define KNEWSTUFF_UPLOADDIALOG_H
+
+#include <kdialogbase.h>
+
+class QLineEdit;
+class QSpinBox;
+class KURLRequester;
+class QTextEdit;
+class QComboBox;
+
+namespace KNS {
+
+class Engine;
+class Entry;
+
+/**
+ * @short KNewStuff file upload dialog.
+ *
+ * Using this dialog, data can easily be uploaded to the Hotstuff servers.
+ * It should however not be used on its own, instead a KNewStuff (or
+ * KNewStuffGeneric) object invokes it.
+ *
+ * @author Cornelius Schumacher (schumacher@kde.org)
+ * \par Maintainer:
+ * Josef Spillner (spillner@kde.org)
+ */
+class UploadDialog : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ /**
+ Constructor.
+
+ @param engine a KNewStuff engine object to be used for uploads
+ @param parent the parent window
+ */
+ UploadDialog( Engine *engine, QWidget *parent );
+
+ /**
+ Destructor.
+ */
+ ~UploadDialog();
+
+ /**
+ Sets the preview filename.
+ This is only meaningful if the application supports previews.
+
+ @param previewFile the preview image file
+ */
+ void setPreviewFile( const QString &previewFile );
+
+ protected slots:
+ void slotOk();
+
+ private:
+ Engine *mEngine;
+
+ QLineEdit *mNameEdit;
+ QLineEdit *mAuthorEdit;
+ QLineEdit *mVersionEdit;
+ QSpinBox *mReleaseSpin;
+ KURLRequester *mPreviewUrl;
+ QTextEdit *mSummaryEdit;
+ QComboBox *mLanguageCombo;
+ QComboBox *mLicenceCombo;
+
+ QPtrList<Entry> mEntryList;
+};
+
+}
+
+#endif
diff --git a/lib/ksavealldialog.cpp b/lib/ksavealldialog.cpp
new file mode 100644
index 00000000..620f018e
--- /dev/null
+++ b/lib/ksavealldialog.cpp
@@ -0,0 +1,189 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002 Harald Fernengel <harry@kdevelop.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.
+*/
+
+#include <qvbox.h>
+#include <qlabel.h>
+#include <qheader.h>
+
+#include <klocale.h>
+#include <kpushbutton.h>
+#include <klistbox.h>
+#include <klistview.h>
+#include <kstdguiitem.h>
+
+#include "ksavealldialog.h"
+
+namespace
+{
+
+class CheckURL : public QCheckListItem
+{
+public:
+ CheckURL( QListView * lv, KURL const & url )
+ : QCheckListItem( lv, url.path(), QCheckListItem::CheckBox),
+ _url( url )
+ {}
+
+ KURL const & url() const { return _url; }
+
+private:
+ KURL _url;
+};
+
+}
+
+
+KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, QWidget * parent ) :
+ KDialogBase( parent, "SaveAllDialog", true, i18n("Save Modified Files?"),
+ Ok | User1 | Close )
+{
+ QVBox *top = makeVBoxMainWidget();
+
+ (void)new QLabel( i18n("The following files have been modified. Save them?"), top );
+
+ _listview = new KListView( top );
+ _listview->addColumn( "" );
+ _listview->header()->hide();
+ _listview->setResizeMode( QListView::LastColumn );
+
+ setButtonOKText( i18n("Save &Selected"), i18n("Saves all selected files") );
+ setButtonText( User1, i18n("Save &None") );
+ setButtonText( Close, KStdGuiItem::cancel().text() );
+ setButtonTip( User1, i18n("Lose all modifications") );
+ setButtonTip( Close, i18n("Cancels the action") );
+
+ KURL::List::ConstIterator it = filelist.begin();
+ while ( it != filelist.end() )
+ {
+ if ( !ignorelist.contains( *it ) )
+ {
+ QCheckListItem * x = new CheckURL( _listview, *it );
+ x->setOn( true );
+ }
+ ++it;
+ }
+
+ connect( this, SIGNAL(closeClicked()), this, SLOT(cancel()) );
+ connect( this, SIGNAL(okClicked()), this, SLOT(save()) );
+ connect( this, SIGNAL(user1Clicked()), this, SLOT(saveNone()) );
+}
+
+KSaveSelectDialog::~KSaveSelectDialog() {}
+
+void KSaveSelectDialog::saveNone( )
+{
+ // deselect all
+ CheckURL * item = static_cast<CheckURL*>( _listview->firstChild() );
+ while ( item )
+ {
+ item->setOn( false );
+ item = static_cast<CheckURL*>( item->nextSibling() );
+ }
+
+ QDialog::accept();
+}
+
+void KSaveSelectDialog::save( )
+{
+ QDialog::accept();
+}
+
+void KSaveSelectDialog::cancel( )
+{
+ QDialog::reject();
+}
+
+KURL::List KSaveSelectDialog::filesToSave( )
+{
+ KURL::List filelist;
+ CheckURL const * item = static_cast<CheckURL*>( _listview->firstChild() );
+ while ( item )
+ {
+ if ( item->isOn() )
+ {
+ filelist << item->url();
+ }
+ item = static_cast<CheckURL*>( item->nextSibling() );
+ }
+ return filelist;
+}
+
+KURL::List KSaveSelectDialog::filesNotToSave( )
+{
+ KURL::List filelist;
+ CheckURL const * item = static_cast<CheckURL*>( _listview->firstChild() );
+ while ( item )
+ {
+ if ( ! item->isOn() )
+ {
+ filelist << item->url();
+ }
+ item = static_cast<CheckURL*>( item->nextSibling() );
+ }
+ return filelist;
+}
+
+
+KSaveAllDialog::KSaveAllDialog( const QStringList& filenames, QWidget* parent ) :
+ KDialogBase( parent, "SaveAllDialog", true, i18n("Save Modified Files?"),
+ Ok | User1 | Close )
+{
+ m_result = Cancel;
+
+ QVBox *top = makeVBoxMainWidget();
+
+ (void)new QLabel( i18n("The following files have been modified. Save them?"), top );
+ KListBox* lb = new KListBox( top );
+ lb->setMinimumHeight( lb->fontMetrics().height() * 5 );
+ lb->insertStringList( filenames );
+
+ setButtonOKText( i18n("Save &All"), i18n("Saves all modified files") );
+ setButtonText( User1, i18n("Save &None") );
+ setButtonText( Close, KStdGuiItem::cancel().text() );
+ setButtonTip( User1, i18n("Lose all modifications") );
+ setButtonTip( Close, i18n("Cancels the action") );
+
+ connect( this, SIGNAL(closeClicked()), this, SLOT(cancel()) );
+ connect( this, SIGNAL(okClicked()), this, SLOT(saveAll()) );
+ connect( this, SIGNAL(user1Clicked()), this, SLOT(revert()) );
+}
+
+KSaveAllDialog::~KSaveAllDialog()
+{
+}
+
+void KSaveAllDialog::revert()
+{
+ m_result = Revert;
+ QDialog::accept();
+}
+
+void KSaveAllDialog::saveAll()
+{
+ m_result = SaveAll;
+ QDialog::accept();
+}
+
+void KSaveAllDialog::cancel()
+{
+ m_result = Cancel;
+ QDialog::reject();
+}
+
+#include "ksavealldialog.moc"
diff --git a/lib/ksavealldialog.h b/lib/ksavealldialog.h
new file mode 100644
index 00000000..9d7860cf
--- /dev/null
+++ b/lib/ksavealldialog.h
@@ -0,0 +1,83 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002 Harald Fernengel <harry@kdevelop.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.
+*/
+
+#ifndef SAVEALLDIALOG_H
+#define SAVEALLDIALOG_H
+
+#include <qstringlist.h>
+#include <kdialogbase.h>
+#include <kurl.h>
+
+class KListView;
+/**
+@file ksavealldialog.h
+Dialogs to save multiple files.
+*/
+
+/**
+Dialog to save selected files.
+*/
+class KSaveSelectDialog : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, QWidget * parent );
+ virtual ~KSaveSelectDialog();
+
+ KURL::List filesToSave();
+ KURL::List filesNotToSave();
+
+private slots:
+ void saveNone();
+ void save();
+ void cancel();
+
+private:
+ KListView * _listview;
+
+};
+
+
+/**
+Dialog to save all files.
+*/
+class KSaveAllDialog : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ enum SaveAllResult{ SaveAll, Cancel, Revert };
+
+ KSaveAllDialog( const QStringList& filenames, QWidget* parent );
+ virtual ~KSaveAllDialog();
+
+ SaveAllResult result() const { return m_result; }
+
+private slots:
+ void revert();
+ void saveAll();
+ void cancel();
+
+private:
+ SaveAllResult m_result;
+
+};
+
+#endif
diff --git a/lib/qextfileinfo.cpp b/lib/qextfileinfo.cpp
new file mode 100644
index 00000000..b7c7e741
--- /dev/null
+++ b/lib/qextfileinfo.cpp
@@ -0,0 +1,619 @@
+/*
+ From WebMaker - KDE HTML Editor
+ Copyright (C) 1998, 1999 Alexei Dets <dets@services.ru>
+
+ Rewritten for Quanta Plus: (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 <qdir.h>
+#include <qapplication.h>
+#include <qptrlist.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+#include <qtimer.h>
+
+//kde includes
+#include <kurl.h>
+#include <kio/job.h>
+#include <kio/netaccess.h>
+#include <kio/scheduler.h>
+#include <kdirlister.h>
+#include <kfileitem.h>
+#include <kglobal.h>
+#include <kdebug.h>
+
+//app includes
+#include "qextfileinfo.h"
+
+QString QExtFileInfo::lastErrorMsg = "";
+
+QString QExtFileInfo::canonicalPath(const QString& path)
+{
+ if (!path.startsWith("/") || path == "/")
+ return path;
+ bool endsWithSlash = path.endsWith("/");
+ QDir dir(path);
+ if (dir.exists() || QFileInfo(path).exists())
+ {
+ QString s = dir.canonicalPath();
+ if (endsWithSlash)
+ s.append("/");
+ return s;
+ } else
+ {
+ KURL u = KURL::fromPathOrURL(path).upURL();
+ QString s = u.path(-1) + "/";
+ if (s == "//") s = "/";
+ QString s2 = path.mid(s.length());
+ s2 = QExtFileInfo::canonicalPath(s) + s2;
+ return s2;
+ }
+}
+
+QString QExtFileInfo::homeDirPath()
+{
+ return QDir(QDir::homeDirPath()).canonicalPath();
+}
+
+/** create a relative short url based in baseURL*/
+KURL QExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bool resolveSymlinks)
+{
+ KURL urlToConvert = _urlToConvert;
+ KURL baseURL = _baseURL;
+ KURL resultURL = urlToConvert;
+ if (urlToConvert.protocol() == baseURL.protocol())
+ {
+ if (urlToConvert.isLocalFile())
+ {
+ QString path;
+ if (resolveSymlinks)
+ path = QExtFileInfo::canonicalPath(urlToConvert.path());
+ else
+ path = urlToConvert.path();
+ if (!path.isEmpty())
+ urlToConvert.setPath(path);
+ if (resolveSymlinks)
+ path = QExtFileInfo::canonicalPath(baseURL.path());
+ else
+ path = baseURL.path();
+ if (!path.isEmpty())
+ baseURL.setPath(path);
+ }
+ QString path = urlToConvert.path();
+ QString basePath = baseURL.path(1);
+ if (path.startsWith("/"))
+ {
+ path.remove(0, 1);
+ basePath.remove(0, 1);
+ if ( basePath.right(1) != "/" ) basePath.append("/");
+
+ int pos=0;
+ int pos1=0;
+ for (;;)
+ {
+ pos=path.find("/");
+ pos1=basePath.find("/");
+ if ( pos<0 || pos1<0 ) break;
+ if ( path.left(pos+1 ) == basePath.left(pos1+1) )
+ {
+ path.remove(0, pos+1);
+ basePath.remove(0, pos1+1);
+ }
+ else
+ break;
+ };
+
+ if ( basePath == "/" ) basePath="";
+ int level = basePath.contains("/");
+ for (int i=0; i<level; i++)
+ {
+ path="../"+path;
+ };
+ }
+
+ resultURL.setPath(QDir::cleanDirPath(path));
+ }
+
+ if (urlToConvert.path().endsWith("/") && !resultURL.path().isEmpty())
+ resultURL.adjustPath(1);
+ return resultURL;
+}
+/** convert relative filename to absolute */
+KURL QExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL)
+{
+ KURL urlToConvert = _urlToConvert;
+ KURL baseURL = _baseURL;
+ KURL resultURL = urlToConvert;
+
+ if (urlToConvert.protocol() == baseURL.protocol() && !urlToConvert.path().startsWith("/"))
+ {
+ if (urlToConvert.isLocalFile())
+ {
+ QString path = QExtFileInfo::canonicalPath(baseURL.path());
+ if (!path.isEmpty())
+ baseURL.setPath(path);
+ }
+ int pos;
+ QString cutname = urlToConvert.path();
+ QString cutdir = baseURL.path(1);
+ while ( (pos = cutname.find("../")) >=0 )
+ {
+ cutname.remove( 0, pos+3 );
+ cutdir.remove( cutdir.length()-1, 1 );
+ cutdir.remove( cutdir.findRev('/')+1 , 1000);
+ }
+ resultURL.setPath(QDir::cleanDirPath(cutdir+cutname));
+ }
+
+ if (urlToConvert.path().endsWith("/")) resultURL.adjustPath(1);
+ return resultURL;
+}
+
+/** All files in a dir.
+ The return will also contain the name of the subdirectories.
+ This is needed for empty directory adding/handling. (Andras)
+ Currently works only for local directories
+*/
+KURL::List QExtFileInfo::allFiles( const KURL& path, const QString& mask, QWidget *window)
+{
+ QExtFileInfo internalFileInfo;
+ return internalFileInfo.allFilesInternal(path, mask, window);
+}
+
+KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const QString& mask, QWidget *window, bool resolveSymlinks)
+{
+ QExtFileInfo internalFileInfo;
+ KURL::List r = internalFileInfo.allFilesInternal(path, mask, window);
+
+ KURL::List::Iterator it;
+ for ( it = r.begin(); it != r.end(); ++it )
+ {
+ *it = QExtFileInfo::toRelative( *it, path, resolveSymlinks );
+ }
+
+ return r;
+}
+
+QDict<KFileItem> QExtFileInfo::allFilesDetailed(const KURL& path, const QString& mask, QWidget *window)
+{
+ QExtFileInfo internalFileInfo;
+ return internalFileInfo.allFilesDetailedInternal(path, mask, window);
+}
+
+
+bool QExtFileInfo::createDir(const KURL& path, QWidget *window)
+{
+ int i = 0;
+ bool result;
+ KURL dir3;
+ KURL dir2;
+ KURL dir1 = path;
+ dir1.setPath("/");
+ if (!exists(dir1, false, window) && path.protocol() != "webdav" )
+ {
+ return false; //the root is not accessible, possible wrong username/password supplied
+ }
+ while (!exists(path, false, window) && dir2.path() != path.path())
+ {
+ dir1 = path;
+ dir2 = path;
+
+ dir1=cdUp(dir1);
+ while (!exists(dir1, false, window) && dir1.path() != "/")
+ {
+ dir1 = cdUp(dir1);
+ dir2 = cdUp(dir2);
+ // debug(d1);
+ }
+ dir3 = dir2;
+ dir3.adjustPath(-1); //some servers refuse to create directories ending with a slash
+ result = KIO::NetAccess::mkdir(dir3, window);
+ if (dir2.path() == "/" || !result)
+ break;
+ i++;
+ }
+ result = exists(path, false, window);
+ return result;
+}
+
+KURL QExtFileInfo::cdUp(const KURL &url)
+{
+ KURL u = url;
+ QString dir = u.path(-1);
+ while ( !dir.isEmpty() && dir.right(1) != "/" )
+ {
+ dir.remove( dir.length()-1,1);
+ }
+ u.setPath(dir);
+ return u;
+}
+
+QString QExtFileInfo::shortName(const QString &fname)
+{
+ return fname.section("/", -1);
+}
+
+KURL QExtFileInfo::path( const KURL &url )
+{
+ KURL result = url;
+ result.setPath(result.directory(false,false));
+ return result;
+}
+
+KURL QExtFileInfo::home()
+{
+ KURL url;
+ url.setPath(QDir::currentDirPath()+"/");
+ return url;
+}
+
+
+bool QExtFileInfo::exists(const KURL& a_url, bool readingOnly, QWidget *window)
+{
+// Andras: Don't use it now, as it brings up an extra dialog and need manual
+// intervention when usign fish
+// return KIO::NetAccess::exists(a_url, false);
+
+// No dialog when stating.
+ if (a_url.isLocalFile())
+ {
+ return QFile::exists(a_url.path());
+ } else
+ {
+ QExtFileInfo internalFileInfo;
+ return internalFileInfo.internalExists(a_url, readingOnly, window);
+ }
+}
+
+/* Synchronous copy, like NetAccess::file_copy in KDE 3.2 */
+bool QExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window )
+{
+ QExtFileInfo internalFileInfo;
+ return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window );
+}
+
+/** No descriptions */
+KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const QString& mask, QWidget *window)
+{
+ if (startURL.isLocalFile())
+ return allLocalFiles(startURL.path(-1), mask);
+
+ dirListItems.clear();
+ if (internalExists(startURL, true, window))
+ {
+ lstFilters.setAutoDelete(true);
+ lstFilters.clear();
+ // Split on white space
+ QStringList list = QStringList::split( ' ', mask );
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ lstFilters.append( new QRegExp(*it, false, true ) );
+
+ bJobOK = true;
+ KIO::ListJob *job = KIO::listRecursive(startURL, false, true);
+ job->setWindow(window);
+ m_listJobCount = 1;
+ connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList&)),
+ this, SLOT(slotNewEntries(KIO::Job *, const KIO::UDSEntryList&)));
+ connect( job, SIGNAL( result (KIO::Job *) ),
+ this, SLOT( slotListResult (KIO::Job *) ) );
+ m_listStartURL = startURL.url();
+
+ //kdDebug(24000) << "Now listing: " << startURL.url() << endl;
+ enter_loop();
+ //kdDebug(24000) << "Listing done: " << startURL.url() << endl;
+ lstFilters.clear();
+ if (!bJobOK)
+ {
+ // kdDebug(24000) << "Error while listing "<< startURL.url() << endl;
+ dirListItems.clear();
+ }
+ }
+ return dirListItems;
+}
+
+/** No descriptions */
+QDict<KFileItem> QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const QString& mask, QWidget *window)
+{
+ detailedDirListItems.setAutoDelete(true);
+ detailedDirListItems.clear();
+ detailedDirListItems.setAutoDelete(false);
+ if (internalExists(startURL, true, window))
+ {
+ lstFilters.setAutoDelete(true);
+ lstFilters.clear();
+ // Split on white space
+ QStringList list = QStringList::split( ' ', mask );
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ lstFilters.append( new QRegExp(*it, false, true ) );
+
+ bJobOK = true;
+ KIO::ListJob *job = KIO::listRecursive(startURL, false, true);
+ job->setWindow(window);
+ m_listJobCount = 1;
+ connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList&)),
+ this, SLOT(slotNewDetailedEntries(KIO::Job *, const KIO::UDSEntryList&)));
+ connect( job, SIGNAL( result (KIO::Job *) ),
+ this, SLOT( slotListResult (KIO::Job *) ) );
+ m_listStartURL = startURL.url();
+ //kdDebug(24000) << "Now listing: " << startURL.url() << endl;
+ enter_loop();
+ //kdDebug(24000) << "Listing done: " << startURL.url() << endl;
+ lstFilters.clear();
+ if (!bJobOK)
+ {
+ // kdDebug(24000) << "Error while listing "<< startURL.url() << endl;
+ detailedDirListItems.clear();
+ }
+ }
+ return detailedDirListItems;
+}
+
+KURL::List QExtFileInfo::allLocalFiles(const QString& startPath, const QString& mask)
+{
+ KURL::List list;
+ QDir d(startPath, mask);
+ QStringList l = d.entryList();
+ QStringList::ConstIterator end = l.constEnd();
+ QString path;
+ for (QStringList::ConstIterator it = l.constBegin(); it != end; ++it)
+ {
+ path = *it;
+ if (path != "." && path != "..")
+ {
+ path = startPath + "/" + path;
+ if (QFileInfo(path).isDir())
+ path.append("/");
+ list.append(KURL::fromPathOrURL(path));
+ }
+ }
+ l = d.entryList("*", QDir::Dirs);
+ end = l.constEnd();
+ for (QStringList::ConstIterator it = l.constBegin(); it != end; ++it)
+ {
+ if ((*it) != "." && (*it) != "..")
+ list += allLocalFiles(startPath + "/" + (*it), mask);
+ }
+ return list;
+}
+
+
+//Some hackery from KIO::NetAccess as they do not do exactly what we want
+/* return true if the url exists*/
+bool QExtFileInfo::internalExists(const KURL& url, bool readingOnly, QWidget *window)
+{
+ bJobOK = true;
+ KURL url2 = url;
+ url2.adjustPath(-1);
+ // kdDebug(24000)<<"QExtFileInfo::internalExists"<<endl;
+ KIO::StatJob * job = KIO::stat(url2, false);
+ job->setWindow(window);
+ job->setDetails(0);
+ job->setSide(readingOnly);
+ connect( job, SIGNAL( result (KIO::Job *) ),
+ this, SLOT( slotResult (KIO::Job *) ) );
+
+ //To avoid lock-ups, start a timer.
+ QTimer::singleShot(60*1000, this,SLOT(slotTimeout()));
+ //kdDebug(24000)<<"QExtFileInfo::internalExists:before enter_loop"<<endl;
+ enter_loop();
+ //kdDebug(24000)<<"QExtFileInfo::internalExists:after enter_loop"<<endl;
+ return bJobOK;
+}
+
+bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window)
+{
+ bJobOK = true; // success unless further error occurs
+
+ KIO::Scheduler::checkSlaveOnHold(true);
+ KIO::Job * job = KIO::file_copy( src, target, permissions, overwrite, resume, false );
+// KIO::Job * job2 = KIO::del(target, false );
+ //job2->setWindow (window);
+ //connect( job2, SIGNAL( result (KIO::Job *) ),
+// this, SLOT( slotResult (KIO::Job *) ) );
+
+ //enter_loop();
+ //if (bJobOK)
+ {
+// kdDebug(24000) << "Copying " << src << " to " << target << endl;
+ // KIO::Job *job = KIO::copy( src, target, false );
+ job->setWindow (window);
+ connect( job, SIGNAL( result (KIO::Job *) ),
+ this, SLOT( slotResult (KIO::Job *) ) );
+ enter_loop();
+ }
+ return bJobOK;
+}
+
+
+void qt_enter_modal( QWidget *widget );
+void qt_leave_modal( QWidget *widget );
+
+void QExtFileInfo::enter_loop()
+{
+ QWidget dummy(0,0,WType_Dialog | WShowModal);
+ dummy.setFocusPolicy( QWidget::NoFocus );
+ qt_enter_modal(&dummy);
+ //kdDebug(24000)<<"QExtFileInfo::enter_loop:before qApp->enter_loop()"<< endl;
+ qApp->enter_loop();
+// kdDebug(24000)<<"QExtFileInfo::enter_loop:after qApp->enter_loop()"<<endl;
+ qt_leave_modal(&dummy);
+}
+
+void QExtFileInfo::slotListResult(KIO::Job *job)
+{
+ m_listJobCount--;
+ if (m_listJobCount == 0)
+ slotResult(job);
+}
+
+void QExtFileInfo::slotResult(KIO::Job *job)
+{
+ //kdDebug(24000)<<"QExtFileInfo::slotResult"<<endl;
+ bJobOK = !job->error();
+ if ( !bJobOK )
+ {
+ if ( !lastErrorMsg )
+ lastErrorMsg = job->errorString();
+ }
+ if ( job->isA("KIO::StatJob") )
+ m_entry = static_cast<KIO::StatJob *>(job)->statResult();
+ qApp->exit_loop();
+}
+
+void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
+{
+ 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 = udsList.begin();
+ KIO::UDSEntryListConstIterator end = udsList.end();
+ KURL itemURL;
+ QPtrList<KFileItem> linkItems;
+ linkItems.setAutoDelete(true);
+ for ( ; it != end; ++it )
+ {
+ QString name;
+
+ // find out about the name
+ KIO::UDSEntry::ConstIterator entit = (*it).begin();
+ for( ; entit != (*it).end(); ++entit )
+ if ((*entit).m_uds == KIO::UDS_NAME)
+ {
+ name = (*entit).m_str;
+ break;
+ }
+
+ if (!name.isEmpty() && name != dot && name != dotdot)
+ {
+ KFileItem* item = new KFileItem( *it, url, false, true );
+ if (item->isDir() && item->isLink())
+ {
+ KURL u = item->url();
+ QString linkDest = item->linkDest();
+ kdDebug(24000) << "Got link: " << name << " Points to:" << linkDest << endl;
+ if (linkDest.startsWith("./") || linkDest.startsWith("../") )
+ {
+ u.setPath(u.directory(false, true) + linkDest);
+ u.cleanPath();
+ }
+ else
+ u.setPath(linkDest);
+ u.adjustPath(+1);
+ if (!dirListItems.contains(u) && u.url() != m_listStartURL && !u.isParentOf(item->url()))
+ {
+ linkItems.append(new KFileItem(*item));
+ } else
+ {
+ kdDebug(24000) << "Recursive link " << u.url() << endl;
+ continue;
+ }
+ }
+ itemURL = item->url();
+ if (item->isDir())
+ itemURL.adjustPath(1);
+ for (QPtrListIterator<QRegExp> filterIt(lstFilters); filterIt.current(); ++filterIt )
+ {
+ if (filterIt.current()->exactMatch(item->text()))
+ dirListItems.append(itemURL);
+ }
+ delete item;
+ }
+ }
+ for (QPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
+ {
+ KIO::ListJob *ljob = KIO::listRecursive((*it)->url(), false, true);
+ m_listJobCount++;
+ //kdDebug(24000) << "Now listing: " << (*it)->url() << endl;
+ connect( ljob, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
+ this,SLOT (slotNewEntries(KIO::Job *,const KIO::UDSEntryList &)));
+ connect( ljob, SIGNAL(result(KIO::Job *)),
+ this,SLOT (slotListResult(KIO::Job *)));
+ }
+}
+
+void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
+{
+ 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 = udsList.begin();
+ KIO::UDSEntryListConstIterator end = udsList.end();
+ KURL itemURL;
+ QPtrList<KFileItem> linkItems;
+ linkItems.setAutoDelete(true);
+ for ( ; it != end; ++it )
+ {
+ QString name;
+
+ // find out about the name
+ KIO::UDSEntry::ConstIterator entit = (*it).begin();
+ for( ; entit != (*it).end(); ++entit )
+ if ((*entit).m_uds == KIO::UDS_NAME)
+ {
+ name = (*entit).m_str;
+ break;
+ }
+
+ if (!name.isEmpty() && name != dot && name != dotdot)
+ {
+ KFileItem *item= new KFileItem(*it, url, false, true );
+ if (item->isDir() && item->isLink())
+ {
+ KURL u = item->url();
+ u.setPath(item->linkDest());
+ QString urlStr = u.url();
+ if (detailedDirListItems.find(urlStr) == 0L &&
+ (urlStr != m_listStartURL))
+ {
+ linkItems.append(new KFileItem(*item));
+ } else
+ {
+ kdDebug(24000) << "Recursive link" << item->url() << endl;
+ continue;
+ }
+ }
+ bool added = false;
+ for (QPtrListIterator<QRegExp> filterIt( lstFilters ); filterIt.current(); ++filterIt)
+ if (filterIt.current()->exactMatch(item->text()))
+ {
+ detailedDirListItems.insert(item->url().url(), item);
+ added = true;
+ }
+ if (!added)
+ delete item;
+ }
+ }
+ for (QPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
+ {
+ KIO::ListJob *ljob = KIO::listRecursive((*it)->url(), false, true);
+ m_listJobCount++;
+ // kdDebug(24000) << "Now listing: " << (*it)->url() << endl;
+ connect( ljob, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
+ this,SLOT (slotNewDetailedEntries(KIO::Job *,const KIO::UDSEntryList &)));
+ connect( ljob, SIGNAL(result(KIO::Job *)),
+ this,SLOT (slotListResult(KIO::Job *)));
+ }
+}
+
+/** Timeout occurred while waiting for some network function to return. */
+void QExtFileInfo::slotTimeout()
+{
+ bJobOK = false;
+ qApp->exit_loop();
+}
+#include "qextfileinfo.moc"
diff --git a/lib/qextfileinfo.h b/lib/qextfileinfo.h
new file mode 100644
index 00000000..dd05cb41
--- /dev/null
+++ b/lib/qextfileinfo.h
@@ -0,0 +1,119 @@
+/*
+ From WebMaker - KDE HTML Editor
+ Copyright (C) 1998, 1999 Alexei Dets <dets@services.ru>
+ Rewritten for Quanta Plus: (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 _QEXTFILEINFO_H_
+#define _QEXTFILEINFO_H_
+
+#include <kio/global.h>
+#include <kio/job.h>
+#include <kurl.h>
+#include <kfileitem.h>
+
+#include <qobject.h>
+#include <qptrlist.h>
+#include <qdict.h>
+#include <qregexp.h>
+
+class QExtFileInfo:public QObject
+{
+ Q_OBJECT
+public:
+ QExtFileInfo() {};
+ ~QExtFileInfo() {};
+
+ /**
+ * Works like QDir::canonicalPath, but it does not return an empty
+ * string if the path does not exists, but tries to find if there
+ * is a part of the path which exists and resolv the symlinks for
+ * that part. The ending slash is kept in the result.
+ * Example:
+ * /home/user/foo points to /mnt/foo
+ * /home/user/foo/foo2 does not exists
+ * QExtFileInfo::canonicalPath("/home/user/foo/foo2/") will return
+ * /mnt/foo/foo2/ .
+ * @param path the path to resolve
+ * @return the canonical path (symlinks resolved)
+ */
+ static QString canonicalPath(const QString& path);
+
+ /**
+ * Similar to QDir::homeDirPath(), but returns a resolved path.
+ *
+ */
+ static QString homeDirPath();
+
+ /** Returns the relative url of urlToConvert to baseURL. */
+ static KURL toRelative(const KURL& urlToConvert, const KURL& baseURL, bool resolveSymlinks = true);
+ /** Convert relative url to absolute, based on baseURL. */
+ static KURL toAbsolute(const KURL& urlToConvert, const KURL& baseURL);
+ /** Returns a recursive list of files under path, matching the specified file mask. */
+ static KURL::List allFiles( const KURL& path, const QString &mask, QWidget *window);
+ /** Returns a recursive list of files under path, matching the specified file mask.
+ The returned urls are relative to path.
+ */
+ static KURL::List allFilesRelative( const KURL& path, const QString &mask, QWidget *window, bool resolveSymlinks = true);
+ /** Returns a recursive list of files under path, matching the specified file mask.
+ The returned list contains detailed information about each url.
+ The user should delete the KFileItems and clear the dict
+ after they are not needed.
+ */
+ static QDict<KFileItem> allFilesDetailed(const KURL& path, const QString &mask, QWidget *window);
+ /** Creates a dir if don't exists. */
+ static bool createDir(const KURL & path, QWidget *window);
+ /** Returns the parent directory of dir. */
+ static KURL cdUp(const KURL &dir);
+ /** Returns the filename from a path string. */
+ static QString shortName(const QString &fname );
+ /** Returns the path to the url. */
+ static KURL path(const KURL &);
+ /** Returns the user's home directory as an url. */
+ static KURL home();
+ /** A slightly better working alternative of KIO::NetAccess::exists().
+ Checks for the existance of the url. readingOnly is true if we check if
+ the url is readable, and false if we check if it is writable.*/
+ static bool exists(const KURL& url, bool readingOnly, QWidget *window);
+ /** Synchronous copy, like NetAccess::file_copy in KDE 3.2, just that it doesn't show a progress dialog */
+ static bool copy( const KURL& src, const KURL& dest, int permissions=-1,
+ bool overwrite=false, bool resume=false, QWidget* window = 0L );
+ /** Reenters the event loop. You must call qApp->exit_loop() to exit it. */
+ void enter_loop();
+
+private:
+ /** Internal methods called by the above ones. They start their own event loop and
+ exit when the even loop is exited */
+ bool internalExists(const KURL& url, bool readingOnly, QWidget *window);
+ bool internalCopy(const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window);
+ KURL::List allFilesInternal(const KURL& startURL, const QString& mask, QWidget *window);
+ QDict<KFileItem> allFilesDetailedInternal(const KURL& startURL, const QString& mask, QWidget *window);
+ KURL::List allLocalFiles(const QString& startPath, const QString& mask);
+
+ bool bJobOK;
+ static QString lastErrorMsg;
+ KIO::UDSEntry m_entry;
+ KURL::List dirListItems;
+ QDict<KFileItem> detailedDirListItems;
+ QPtrList<QRegExp> lstFilters;
+ int m_listJobCount;
+ QString m_listStartURL;
+
+private slots:
+ void slotListResult(KIO::Job *job);
+ void slotResult(KIO::Job * job);
+ void slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList);
+ void slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList& udsList);
+public slots:
+ /** Timeout occurred while waiting for some network function to return. */
+ void slotTimeout();
+};
+
+
+#endif
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